Encoding method and decoding method of a video signal and apparatuses therefor
By acquiring the intra-frame prediction mode of adjacent blocks and dividing the video signal block into sub-blocks for local transformation, the problem of increased data volume in high-definition video is solved, and the encoding and decoding efficiency of video signals is improved.
Patent Information
- Application Number
- CN202310275594.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-01-18
- Filing Date
- 2019-10-11
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2039-10-11
AI Technical Summary
Existing video coding technologies face the problem of a significant increase in data volume in high-definition video services. HEVC's compression performance is gradually showing its limitations, and there is a need to improve the efficiency of video signal encoding and decoding.
By determining the reference sample line of the current block, the intra-prediction mode with the adjacent blocks is obtained, intra-prediction is performed using the candidate intra-prediction mode, and the coding block or transform block is divided into multiple sub-blocks. Transformation is performed only on some sub-blocks, the intra-prediction mode is shared, and an appropriate transform type is selected.
It improves the efficiency of intra-frame prediction and encoding or decoding, and increases the compression rate of video signals.
Smart Images

Figure CN116347072B_ABST
Abstract
Description
[0001] Divisional Explanation
[0002] This application is a divisional application of PCT / KR2019 / 013384, filed on October 11, 2019, entered into Chinese National Phase as Chinese Patent Application No. 201980056255.0, with the title of "Encoding method and decoding method of video signal and apparatus therefor", the priority of which is claimed in the present application.
[0003] Cross Reference to Related Applications
[0004] The present application is based on and claims priority under 35 U.S.C. 119(a) to Korean Patent Application No. 10-2018-0121713, filed on October 12, 2018, the entire disclosure of which is hereby incorporated by reference herein in its entirety.
[0005] The present application is based on and claims priority under 35 U.S.C. 119(a) to Korean Patent Application No. 10-2018-0121757, filed on October 12, 2018, the entire disclosure of which is hereby incorporated by reference herein in its entirety.
[0006] The present application is based on and claims priority under 35 U.S.C. 119(a) to Korean Patent Application No. 10-2019-0006611, filed on January 18, 2019, the entire disclosure of which is hereby incorporated by reference herein in its entirety. TECHNICAL FIELD
[0007] The present application relates to an encoding method and a decoding method of a video signal and an apparatus therefor. BACKGROUND
[0008] Under the trend of gradual large-scale of display panels, higher quality video services are gradually pursued. The biggest problem of high quality video services is that the data volume is greatly increased, in order to solve this problem, researches aiming to improve the video compression rate are actively carried out. As a representative example, in 2009, MPEG (Motion Picture Experts Group) and VCEG (Video Coding Experts Group) under the ITU-T (International Telecommunication Union-Telecommunication) established JCT-VC (Joint Collaborative Team on Video Coding). JCT-VC proposed a video compression standard HEVC (High Efficiency Video Coding) with about 2 times compression performance compared with H.264 / AVC, and the standard was approved on January 25, 2013. However, with the rapid development of high quality video services, the performance of HEVC is gradually showing its limitations. SUMMARY
[0009] The present application aims to provide a method of obtaining a candidate intra prediction mode based on an intra prediction mode of a neighboring block adjacent to a current block and an apparatus for performing the method in video signal encoding or decoding.
[0010] The present application aims to provide a method of dividing an encoding block or a transform block into a plurality of sub-blocks and performing intra prediction on each sub-block and an apparatus for performing the method in video signal encoding or decoding.
[0011] The present application aims to provide a method of dividing an encoding block or a transform block into a plurality of sub-blocks and performing transform on only a part of the sub-blocks and an apparatus for performing the method in video signal encoding or decoding.
[0012] The technical subject matter to be achieved by the present application is not limited to the above-mentioned technical subject matter, and other technical subject matter not mentioned can be clearly understood by a person of ordinary skill in the art to which the present application pertains from the following description.
[0013] The video signal decoding or encoding method of the present application includes determining a reference sample line of a current block, determining whether there are candidate intra prediction modes identical to an intra prediction mode of the current block, obtaining the intra prediction mode of the current block based on the determination result, and performing intra prediction on the current block according to the reference sample line and the intra prediction mode. At this time, at least one of the candidate intra prediction modes can be the maximum value of an intra prediction mode of an upper neighboring block of the current block and an intra prediction mode of a left neighboring block of the current block plus or minus an offset.
[0014] In the video signal decoding or encoding method of the present application, when the difference between the intra prediction mode of the upper neighboring block and the intra prediction mode of the left neighboring block is 64, at least one of the candidate intra prediction modes can be the maximum value plus or minus 2.
[0015] In the video signal decoding or encoding method of the present application, the number of candidate intra prediction modes can be different according to the index of the reference sample line.
[0016] In the video signal decoding or encoding method of the present application, it can further include determining whether to divide the current block into a plurality of sub-blocks, and when the current block is divided into a plurality of sub-blocks, the plurality of sub-blocks can share one intra prediction mode.
[0017] In the video signal decoding or encoding method of the present application, for some of the plurality of sub-blocks, inverse transform can be skipped.
[0018] In the video signal decoding or encoding method of the present application, the horizontal direction transform type of a sub-block can be determined according to the width of the sub-block, and the vertical direction transform type of the sub-block can be determined according to the height of the sub-block.
[0019] In the video signal decoding or encoding method of the present application, the horizontal direction transform type and the vertical direction transform type of a sub-block can be determined according to the shape of the sub-block.
[0020] The features described above with respect to the present application are only examples of the following detailed description and do not limit the scope of the present application.
[0021] The present application has the following technical effects.
[0022] According to the present application, by obtaining a candidate intra prediction mode similar to the intra prediction mode of a neighboring block of a neighboring current block, the intra prediction efficiency can be improved.
[0023] According to the present application, by dividing a coding block or a transform block into a plurality of sub-blocks and performing intra prediction on each sub-block, the intra prediction efficiency can be improved.
[0024] According to the present application, by dividing the coding block or the transform block into a plurality of sub-blocks and performing the transform only on part of the sub-blocks, the coding or decoding efficiency can be improved.
[0025] The effects obtainable with the present application are not limited to those mentioned above and additional effects which can become clear to those skilled in the art from the following description are intended to be embraced by the present application. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 is a block diagram of a video encoder according to an embodiment of the present application.
[0027] Figure 2 is a block diagram of a video decoder according to an embodiment of the present application.
[0028] Figure 3 is a diagram illustrating a basic coding tree unit according to an embodiment of the present application.
[0029] Figure 4 is a diagram illustrating various division shapes of a coding block.
[0030] Figure 5 is a diagram illustrating a division shape of a coding tree unit.
[0031] Figure 6 is a flowchart of an inter prediction method according to an embodiment of the present application.
[0032] Figure 7 is a diagram of a collocated block.
[0033] Figure 8 is a flowchart of an intra prediction method according to an embodiment of the present application.
[0034] Figure 9 is a diagram of reference samples included in each reference sample line.
[0035] Figure 10 is a diagram of intra prediction modes.
[0036] Figure 11 and Figure 12 is a diagram of an example of one-dimensional arrangement in which reference samples are arranged in a column.
[0037] Figure 13 is a diagram of an angle formed by an angular intra prediction mode and a straight line parallel to the X axis.
[0038] Figure 14 is a diagram of a shape obtained by a prediction sample when the current block is a non-square shape.
[0039] Figure 15 is a diagram showing a wide-angle intra prediction mode.
[0040] Figure 16 is a schematic diagram of an example of vertical and horizontal partitioning.
[0041] Figure 17 is a schematic diagram of an example of determining a partition shape of a coding block.
[0042] Figure 18 is a schematic diagram of an example of determining a partition shape of a coding block.
[0043] Figure 19 is a schematic diagram of an example of determining a partition shape of a coding block based on an intra prediction mode of the coding block.
[0044] Figure 20 is a schematic diagram for illustrating a partition shape of a coding block.
[0045] Figure 21 is a schematic diagram of an example of prediction coding modes set for different sub-blocks.
[0046] Figure 22 is a schematic diagram of an example of applying PDPC.
[0047] Figure 23 and Figure 24 is a schematic diagram of a sub-block for which a secondary transform is to be performed.
[0048] Figure 25 is a schematic diagram for illustrating an example of determining a transform type of a current block.
[0049] Figure 26 is a schematic diagram of an example of confirming a transform type of a sub-block.
[0050] Figure 27 is a schematic diagram for illustrating an example of setting residual coefficients of a sub-block to 0.
[0051] Figure 28 is an example of passing information through a bitstream to indicate a position of a sub-block for which a transform and / or quantization is performed.
[0052] Figure 29 is a flowchart of a process of determining a block strength.
[0053] Figure 30 denotes a pre-defined filter candidate. DETAILED DESCRIPTION
[0054] Embodiments of the present application will be described in detail below with reference to the attached drawings.
[0055] Video encoding and decoding are performed on a block-by-block basis. As an example, encoding or decoding processes such as transform, quantization, prediction, loop filtering, or reconstruction can be performed on encoded blocks, transform blocks, or prediction blocks.
[0056] The block that is used for encoding or decoding will be referred to as the "current block". As an example, the current block can be represented as an encoded block, a transform block, or a prediction block, depending on the current encoding or decoding process.
[0057] Furthermore, the term "unit" as used in this specification refers to the basic unit used to perform a specific encoding or decoding process, and "block" can be understood as a sample array of a given size. Unless otherwise stated, "block" and "unit" can have the same meaning. As an example, in the embodiments described later, encoding block and encoding unit can be understood to have the same meaning.
[0058] Figure 1 This is a block diagram of a video encoder according to an embodiment of this application.
[0059] like Figure 1 As shown, the video encoding apparatus 100 may include an image segmentation unit 110, a prediction unit 120, 125, a transformation unit 130, a quantization unit 135, a reordering unit 160, an entropy encoding unit 165, an inverse quantization unit 140, an inverse transformation unit 145, a filtering unit 150, and a memory 155.
[0060] Figure 1 The various components shown are illustrated independently in the video encoding apparatus to illustrate their distinct characteristic functions, but this does not imply that each component is composed of a separate hardware or software unit. That is, the components are listed as separate components for ease of explanation. At least two components may be combined into one component, or one component may be divided into multiple components to perform functions. Such integrated and separate embodiments of the components are included within the scope of protection of this application, provided they do not depart from its essence.
[0061] Furthermore, some constituent elements are not essential for the essential functions of this application, but are selected to improve performance. This application may include only the constituent parts necessary to realize the essence of this application (i.e., this application may not include constituent elements used only to improve performance), and structures that include only essential constituent elements are also included within the scope of protection of this application.
[0062] The image division section 110 can divide an input image into at least one processing unit. At this time, the processing unit can be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). In the image division section 110, one image can be divided into a combination of coding units, prediction units, and transform units, and the combination of the coding units, the prediction units, and the transform units can be selected to encode the image according to a predetermined criterion (e.g., a cost function).
[0063] For example, one image can be divided into a plurality of coding units. To divide the coding units from the image, a recursive tree structure such as a quad tree structure can be used, and one video or a largest coding unit can be divided into different coding units using child nodes corresponding to the number of divided coding units, with the largest coding unit as a root. A coding unit that cannot be further divided according to a predetermined limit becomes a leaf node. That is, assuming that only a square division is possible for one coding unit, one coding unit can be maximally divided into four different coding units.
[0064] Hereinafter, in the embodiments of the present application, a coding unit can mean a unit for which encoding is performed, or a unit for which decoding is performed.
[0065] A prediction unit can be divided into at least one square or rectangle having the same size within one coding unit, or can be divided into a prediction unit having a different shape and / or size from another prediction unit within one coding unit.
[0066] When a prediction unit for performing intra prediction is generated according to a coding unit, intra prediction can be performed without being divided into a plurality of prediction units N x N when the coding unit is not a minimum coding unit.
[0067] The prediction units 120, 125 can include an inter-prediction unit 120 that performs inter-prediction and an intra-prediction unit 125 that performs intra-prediction. It can be determined whether to use inter-prediction or perform intra-prediction for a prediction unit, and determine specific information based on each prediction method (e.g., intra-prediction mode, motion vector, reference image, etc.). At this time, the processing unit that performs prediction can differ depending on the prediction method and the specific content of the processing unit. For example, the prediction method and the prediction mode are determined per prediction unit, and the execution of prediction can also be performed per transform unit. The residual value (residual block) between the generated prediction block and the original block can be input to the transform unit 130. In addition, the prediction mode information, motion vector information, etc. used for prediction can be encoded together with the residual value in the entropy encoding unit 165 and transmitted to the decoder. When a specific encoding mode is used, the prediction unit 120, 125 can not generate a prediction block, but can directly encode the original block and transmit it to the decoding unit.
[0068] The inter-prediction unit 120 can predict a prediction unit based on information of at least one of a previous image or a subsequent image of the current image, or based on information of a part of an already encoded region within the current image, depending on the situation. The inter-prediction unit 120 can include a reference image interpolation unit, a motion prediction unit, and a motion compensation unit.
[0069] The reference image interpolation unit can obtain the provided reference image information from the memory 155, and generate pixel information below the integer pixel in the reference image. If it is a luminance pixel, in order to generate pixel information below the integer pixel per 1 / 4 pixel unit, a DCT-based 8-tap interpolation filter with different filter coefficients can be used. If it is a color difference signal, in order to generate pixel information below the integer pixel per 1 / 8 pixel unit, a DCT-based 4-tap interpolation filter with different filter coefficients can be used.
[0070] The motion prediction section can perform motion prediction based on a reference picture interpolated by the reference picture interpolation section. As a method for calculating a motion vector, various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), NTS (New Three-Step Search Algorithm), and the like can be used. A motion vector can have a motion vector value of 1 / 2 or 1 / 4 pixel unit based on an interpolated pixel. The motion prediction section can employ different motion prediction methods to predict a current prediction unit. As a motion prediction method, various modes such as a Skip mode, a Merge mode, an AMVP (Advanced Motion Vector Prediction) mode, an Intra Block Copy mode, and the like can be used.
[0071] The intra prediction section 125 can generate a prediction unit based on neighboring reference pixel information of a current block as pixel information within a current picture. A neighboring block of a current prediction unit is a block in which inter prediction is performed, and thus, when a reference pixel is a pixel in which inter prediction is performed, the reference pixel included in the block in which inter prediction is performed can be replaced with reference pixel information of a neighboring block in which intra prediction is performed. That is, when a reference pixel is unavailable, at least one of available reference pixels can be used to replace unavailable reference pixel information.
[0072] In intra prediction, a prediction mode can have an angular prediction mode in which reference pixel information is used according to a prediction direction and a non-angular mode in which angular information is not used when performing prediction. A mode used to predict luminance information can be different from a mode used to predict color difference information, and to predict color difference information, intra prediction mode information or predicted luminance signal information used to predict luminance information can be used.
[0073] When performing intra prediction, in a case in which a size of a prediction unit is the same as a size of a transform unit, intra prediction of the prediction unit can be performed according to a pixel on the left side of the prediction unit, a pixel on the upper end of the left side, and a pixel on the upper end. However, when performing intra prediction, in a case in which the size of the prediction unit is different from the size of the transform unit, intra prediction can be performed using reference pixels based on the transform unit. In addition, for a minimum coding unit, intra prediction in which N x N division is performed can be used.
[0074] The intra prediction method can generate a prediction block by applying an AIS (Adaptive Intra Smoothing) filter to reference pixels according to a prediction mode. The kind of AIS filter applied to the reference pixels can be different. In order to perform the intra prediction method, the intra prediction mode of the current prediction unit can be predicted from the intra prediction mode of a prediction unit that is present adjacent to the current prediction unit. When the prediction mode of the current prediction unit is predicted using the mode information predicted from the adjacent prediction unit, if the intra prediction mode of the current prediction unit is the same as that of the adjacent prediction unit, information indicating that the prediction mode of the current prediction unit is the same as that of the adjacent prediction unit can be transmitted using predetermined identification information, and if the prediction mode of the current prediction unit is different from that of the adjacent prediction unit, entropy encoding can be performed to encode the prediction mode information of the current block.
[0075] In addition, a residual block including residual information, which is a difference value between a prediction unit for which prediction is performed and an original block of the prediction unit, can be generated based on the prediction unit generated by the prediction section 120, 125. The generated residual block can be input to the transform section 130.
[0076] In the transform section 130, the residual block including residual information of the original block and the prediction unit generated by the prediction section 120, 125 can be transformed using a transform method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. In order to transform the residual block, whether to apply DCT or to apply DST or to apply KLT can be determined based on the intra prediction mode information of the prediction unit used in order to generate the residual block.
[0077] The quantization section 135 can quantize values transformed into a frequency domain in the transform section 130. The quantization coefficient can vary according to a block or according to the importance of a video. The value calculated by the quantization section 135 can be provided to the inverse quantization section 140 and the reordering section 160.
[0078] The reordering section 160 can perform reordering of coefficient values with respect to the quantized residual values.
[0079] The reordering unit 160 can transform the two-dimensional block-shaped coefficients into a one-dimensional vector shape by a coefficient scanning method. For example, the reordering unit 160 can transform the two-dimensional block-shaped coefficients into a one-dimensional vector shape by scanning from a DC coefficient to a high frequency domain coefficient using a zig-zag scan method. Depending on the size of the transform unit and the intra prediction mode, a vertical scan that scans the two-dimensional block-shaped coefficients in a column direction, or a horizontal scan that scans the two-dimensional block-shaped coefficients in a row direction can be used instead of the zig-zag scan. That is, depending on the size of the transform unit and the intra prediction mode, any of the zig-zag scan, the vertical scan, and the horizontal scan can be used.
[0080] The entropy encoding unit 165 can perform entropy encoding based on the values calculated by the reordering unit 160. The entropy encoding can use various encoding methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), CABAC (Context-Adaptive Binary Arithmetic Coding), for example.
[0081] The entropy encoding unit 165 can encode various information such as residual value coefficient information of the encoding unit from the reordering unit 160 and the prediction units 120, 125, block type information, prediction mode information, partition unit information, prediction unit information, and transmission unit information, motion vector information, reference frame information, interpolation information of the block, filtering information, and the like.
[0082] The entropy encoding unit 165 can entropy-encode the coefficient values of the encoding unit input from the reordering unit 160.
[0083] The inverse quantization unit 140 and the inverse transform unit 145 inverse-quantize the values quantized by the quantization unit 135 and inverse-transform the values transformed by the transform unit 130. The residual values generated by the inverse quantization unit 140 and the inverse transform unit 145 can be combined with the prediction unit predicted by the motion prediction unit, the motion compensation unit, and the intra prediction unit included in the prediction unit 120, 125 to generate a reconstructed block.
[0084] The filtering unit 150 can include at least one of a deblocking filter, an offset compensation unit, and an ALF (Adaptive Loop Filter).
[0085] A deblocking filter can remove block distortion that occurs due to an inter-block boundary from a reconstructed image. In order to determine whether to perform deblocking, it can be determined whether to apply deblocking filtering to a current block based on pixels included in several columns or rows included in the block. In applying deblocking filtering to a block, a strong filter or a weak filter can be applied according to a required deblocking filtering strength. In addition, in applying a deblocking filter, horizontal filtering and vertical filtering can be processed in parallel.
[0086] The offset compensation section can compensate for an offset from an original video in pixel units with respect to a video on which deblocking is performed. In order to perform offset compensation with respect to a specific image, pixels included in a video can be divided into a predetermined number of regions, an area to which an offset is to be applied is determined, the offset is applied to the corresponding area, or the offset is applied according to edge information of each pixel.
[0087] ALF (Adaptive Loop Filtering) can be performed based on a comparison of values of a filtered reconstructed image and an original image. Pixels included in an image can be divided into predetermined groups, and one filter to be applied to the corresponding groups can be determined, and filtering can be performed differently for each group. Information on whether to apply ALF, i.e., a luma signal, can be transmitted per coding unit (CU), and the shape of an ALF filter to be applied and filter coefficients can be different for each block. In addition, the same shape (fixed shape) of an ALF filter can be used regardless of the characteristics of a block to which the ALF filter is applied.
[0088] The memory 155 can store a reconstructed block or a reconstructed image calculated by the filtering section 150, and the stored reconstructed block or image can be provided to the prediction sections 120 and 125 when inter-frame prediction is performed.
[0089] Figure 2 is a block diagram of a video decoder according to an embodiment of the present application.
[0090] As shown in Figure 2 , the video decoder 200 can include an entropy decoding section 210, a reordering section 215, an inverse quantization section 220, an inverse transform section 225, prediction sections 230 and 235, a filtering section 240, and a memory 245.
[0091] When a video bitstream is input to a video encoder, the input bitstream can be decoded in steps opposite to those of the video encoder.
[0092] The entropy decoding unit 210 can perform entropy decoding in a manner opposite to that of the entropy encoding unit of the video encoder. For example, in correspondence to the method performed by the video encoder, a plurality of methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), CABAC (Context-Adaptive Binary Arithmetic Coding) can be used.
[0093] The entropy decoding unit 210 can decode information related to intra prediction and inter prediction performed by the encoder.
[0094] The reordering unit 215 can perform reordering based on the bitstream entropy-decoded by the entropy decoding unit 210 in a manner in which the encoding unit utilizes a reordering method. Coefficients expressed in a one-dimensional vector shape can be reconstructed as coefficients of a two-dimensional block shape, and reordering can be performed. The reordering unit 215 receives information for performing a coefficient scan-related from the encoding unit, and can perform reordering by an inverse scanning method based on a scan order performed by the corresponding encoding unit.
[0095] The inverse quantization unit 220 can perform inverse quantization based on a quantization parameter provided by the encoder and the coefficient values of the reordered block.
[0096] The inverse transform unit 225 performs inverse transform on the transform performed by the transform unit of the video encoder, i.e., performs inverse DCT transform, inverse DST transform, and inverse KLT transform in correspondence to DCT, DST, and KLT transform. The inverse transform can be performed based on a transmission unit determined by the video encoder. In the inverse transform unit 225 of the video decoder, a transform method (e.g., DCT transform, DST transform, KLT transform) can be selectively performed according to a plurality of information such as a prediction method, a size of a current block, and a prediction direction.
[0097] The prediction units 230, 235 can generate a prediction block based on information related to generation of the prediction block provided by the entropy decoding unit 210 and previously decoded block or image information provided by the memory 245.
[0098] As described above, when intra prediction is performed in the same manner as the action of the video encoder, in a case in which the size of the prediction unit is the same as the size of the transform unit, intra prediction of the prediction unit is performed based on pixels on the left side of the prediction unit, pixels on the upper end of the left side, and pixels on the upper end. However, in a case in which the size of the prediction unit is different from the size of the transform unit, intra prediction can be performed using reference pixels based on the transform unit. In addition, intra prediction using NxN partitioning can be performed only for the smallest coding unit.
[0099] The prediction units determination section can accept various information input from the entropy decoding section 210, prediction mode information of the intra prediction method, motion prediction related information of the inter prediction method, etc., and determine whether to perform inter prediction or intra prediction for each prediction unit in the current coding unit. The inter prediction section 230 can perform inter prediction for the current prediction unit based on information included in at least one of the previous image or the subsequent image of the current image included in the current prediction unit using information required for inter prediction of the current prediction unit provided by the video encoder. Alternatively, inter prediction can be performed based on information of a part of the region that has been reconstructed within the current image including the current prediction unit.
[0100] To perform inter prediction, it can be determined which of the Skip mode, the Merge mode, the AMVP mode, and the Intra BC mode is used as the motion prediction method for the prediction unit included in the corresponding coding unit based on the coding unit.
[0101] The intra prediction section 235 can generate a prediction block based on pixel information within the current image. When the prediction unit is a prediction unit for which intra prediction is performed, intra prediction can be performed based on intra prediction mode information of the prediction unit provided by the video encoder. The intra prediction section 235 can include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation section, and a DC filter. The AIS filter, which is a section that performs filtering on reference pixels of the current block, can determine whether to apply the filter according to the prediction mode of the current prediction unit. The AIS filter can perform AIS filtering on the reference pixels of the current block based on the prediction mode of the prediction unit and the AIS filter information provided by the video encoder. When the prediction mode of the current block is a mode in which the AIS filter is not applied, the AIS filter can not be applied.
[0102] The reference pixel interpolation section can interpolate reference pixels of a pixel unit having a value less than an integer value when the prediction mode of the prediction unit is a prediction unit for which intra prediction is performed based on a pixel value into which a reference pixel value is inserted. When the prediction mode of the current prediction unit is a prediction mode in which a prediction block is generated without inserting a reference pixel value, the reference pixel can not be interpolated. The DC filter can generate a prediction block by filtering when the prediction mode of the current block is a DC mode.
[0103] The reconstructed block or image can be provided to the filtering section 240. The filtering section 240 can include a deblocking filter, an offset compensation section, and an ALF.
[0104] Information on whether a deblocking filter is applied to a corresponding block or picture can be obtained from the video encoder, and when the deblocking filter is applied, information on whether a strong filter is applied or a weak filter is applied can be obtained. A deblocking filter of the video decoder can accept the relevant information of the deblocking filter provided by the video encoder, and the video decoder can perform deblocking filtering on the corresponding block.
[0105] The offset compensation section can perform offset compensation on the reconstructed video based on the kind of offset compensation applied to the video at the time of encoding, offset value information, etc.
[0106] The ALF can be applied to the coding unit based on information on whether the ALF is applied from the encoder, ALF coefficient information, etc. Such ALF information can be included in a specific parameter set and provided.
[0107] The memory 245 can store the reconstructed picture or block so that it can be used as a reference picture or a reference block, and in addition, the reconstructed picture can be provided to the output section.
[0108] Figure 3 FIG. 1 is a diagram illustrating a basic coding tree unit according to an embodiment of the present application.
[0109] A maximum coding block can be defined as a coding tree block. One picture is divided into a plurality of coding tree units (CTU). The coding tree unit is also referred to as an LCU (Largest Coding Unit) as a maximum coding unit. Figure 3 FIG. 2 illustrates an example in which one picture is divided into a plurality of coding tree units.
[0110] The size of the coding tree unit can be defined at a picture level or a sequence level. For this, information indicating the size of the coding tree unit can be signaled through a picture parameter set or a sequence parameter set.
[0111] As an example, the size of the coding tree unit for all pictures within a sequence can be set to 128x128. Alternatively, one of 128x128 or 256x256 can be determined as the size of the coding tree unit at a picture level. As an example, the size of the coding tree unit can be set to 128x128 in a first picture, and the size of the coding tree unit can be set to 256x256 in a second picture.
[0112] A coding tree unit can be divided to generate a coding block. The coding block represents a basic unit for encoding or decoding processing. As an example, prediction or transform can be performed in terms of the coding block, or a prediction coding mode can be determined in terms of the coding block. The prediction coding mode represents a method of generating a predicted video. As an example, the prediction coding mode can include Intra Prediction (frame-intra prediction), Inter Prediction (frame-inter prediction), Current Picture Referencing (CPR or Intra Block Copy (IBC)), or Combined Prediction. A predicted block for the coding block can be generated by using at least one of the Intra Prediction, the Inter Prediction, the Current Picture Referencing, or the Combined Prediction for the coding block.
[0113] Information representing the prediction coding mode of the current block can be signaled through a bitstream. As an example, the information can be a 1-bit flag indicating whether the prediction coding mode is an Intra mode or an Inter mode. The Current Picture Referencing or the Combined Prediction can be used only when the prediction coding mode of the current block is determined to be the Inter mode.
[0114] The Current Picture Referencing is used to set the current picture as a reference picture to obtain the predicted block of the current block from an already encoded or decoded region in the current picture. The current picture refers to a picture including the current block. Information representing whether the Current Picture Referencing is applied to the current block can be signaled through a bitstream. As an example, the information can be a 1-bit flag. When the flag is true, the prediction coding mode of the current block can be determined to be the Current Picture Referencing, and when the flag is false, the prediction mode of the current block can be determined to be the Inter Prediction.
[0115] Alternatively, the prediction coding mode of the current block can be determined based on a reference picture index. As an example, when the reference picture index points to the current picture, the prediction coding mode of the current block can be determined to be the Current Picture Referencing. When the reference picture index points to another picture other than the current picture, the prediction coding mode of the current block can be determined to be the Inter Prediction. That is, the Current Picture Referencing is a prediction method using information of an already encoded or decoded region in the current picture, and the Inter Prediction is a prediction method using information of another already encoded or decoded picture.
[0116] A compound prediction combines intra prediction, inter prediction and more than one coding mode in the current reference picture. As an example, when compound prediction is applied, a first prediction block can be generated based on one of the intra prediction, inter prediction or the current reference picture, and a second prediction block can be generated based on another one. After the first prediction block and the second prediction block are generated, a final prediction block can be generated by averaging or weighted summing the first prediction block and the second prediction block. Information indicating whether compound prediction is applied or not can be signaled through the bitstream. The information can be a 1-bit flag.
[0117] Figure 4 Figures are schematic illustrations of various partition shapes of a coding block.
[0118] A coding block can be partitioned into multiple coding blocks based on a quad-tree partitioning, a binary-tree partitioning or a ternary-tree partitioning. A partitioned coding block can also be partitioned into multiple coding blocks based on a quad-tree partitioning, a binary-tree partitioning or a ternary-tree partitioning.
[0119] A quad-tree partitioning indicates a partitioning method that partitions a current block into 4 blocks. As a result of a quad-tree partitioning, a current block can be partitioned into 4 square sub-regions (see Figure 4 (a) “SPLIT_QT” of FIG. 1).
[0120] A binary-tree partitioning indicates a partitioning method that partitions a current block into 2 blocks. A case where a current block is partitioned into two blocks along a vertical direction (i.e., by a vertical line that crosses the current block) can be referred to as a vertical direction binary-tree partitioning, and a case where a current block is partitioned into two blocks along a horizontal direction (i.e., by a horizontal line that crosses the current block) can be referred to as a horizontal direction binary-tree partitioning. As a result of a binary-tree partitioning, a current block can be partitioned into 2 non-square sub-regions. Figure 4 (b) “SPLIT_BT_VER” of FIG. 1 illustrates a result of a vertical direction binary-tree partitioning, Figure 4 (c) “SPLIT_BT_HOR” of FIG. 1 illustrates a result of a horizontal direction binary-tree partitioning.
[0121] A ternary-tree partitioning indicates a partitioning method that partitions a current block into 3 blocks. A case where a current block is partitioned into three blocks along a vertical direction (i.e., by two vertical lines that cross the current block) can be referred to as a vertical direction ternary-tree partitioning, and a case where a current block is partitioned into three blocks along a horizontal direction (i.e., by two horizontal lines that cross the current block) can be referred to as a horizontal direction ternary-tree partitioning. As a result of a ternary-tree partitioning, a current block can be partitioned into 3 non-square sub-regions. At this time, a width or a height of a sub-region located at the center of the current block can be 2 times a width or a height of the other sub-regions. Figure 4 (d) “SPLIT_TT_VER” of FIG. 1 illustrates a result of a vertical direction ternary-tree partitioning, Figure 4(e) "SPLIT_TT_HOR" shows the horizontal ternary tree partitioning result.
[0122] The number of partitioning of a coding tree unit can be defined as a partitioning depth. The maximum partitioning depth of a coding tree unit can be determined in a sequence level or a picture level. Therefore, the maximum partitioning depth of a coding tree unit can be different according to a sequence or a picture.
[0123] Alternatively, the maximum partitioning depth of each partitioning method can be determined individually. As an example, the maximum partitioning depth allowing quad-tree partitioning can be different from the maximum partitioning depth allowing binary-tree partitioning and / or ternary-tree partitioning.
[0124] An encoder can deliver information representing at least one of a partitioning shape or a partitioning depth of a current block through a bitstream. A decoder can determine a partitioning shape and a partitioning depth of a coding tree unit based on the information parsed from the bitstream.
[0125] Figure 5 is an exemplary diagram of a partitioning shape of a coding tree unit.
[0126] A case where a coding block is partitioned using a partitioning method such as quad-tree partitioning, binary-tree partitioning, and / or ternary-tree partitioning can be referred to as multi-tree partitioning.
[0127] A coding block generated by applying multi-tree partitioning to a coding block can be referred to as a lower-level coding block. When a partitioning depth of a coding block is k, a partitioning depth of a lower-level coding block is set to k+1.
[0128] On the contrary, for a coding block having a partitioning depth of k+1, a coding block having a partitioning depth of k can be referred to as an upper-level coding block.
[0129] A partitioning type of a current coding block can be determined based on at least one of a partitioning shape of an upper-level coding block or a partitioning type of a neighboring coding block. The neighboring coding block can include at least one of a top neighboring block, a left neighboring block, or a neighboring block adjacent to a top-left corner of the current coding block. The partitioning type can include at least one of whether it is quad-tree partitioning, whether it is binary-tree partitioning, a binary-tree partitioning direction, whether it is ternary-tree partitioning, or a ternary-tree partitioning direction.
[0130] In order to determine a partitioning shape of a coding block, information representing whether the coding block is partitioned can be signaled through a bitstream. The information is a one-bit flag "split_cu_flag" which is true, indicating that the coding block is partitioned according to a quad-tree partitioning method.
[0131] When the split_cu_flag is true, information indicating whether the coding block is quad-tree partitioned can be signaled through the bitstream. The information is a one-bit flag, split_qt_flag, and when the flag is true, the coding block can be partitioned into four blocks.
[0132] As an example, in Figure 5 In the example shown, the coding tree unit is quad-tree partitioned, and thus the generation of four coding blocks with a partition depth of one is illustrated. In addition, the case where quad-tree partitioning is applied again to the first and fourth of the four coding blocks generated by the quad-tree partitioning result is illustrated. As a result, four coding blocks with a partition depth of two can be generated.
[0133] In addition, by applying quad-tree partitioning again to the coding blocks with a partition depth of two, coding blocks with a partition depth of three can be generated.
[0134] When the coding block is not quad-tree partitioned, whether to perform binary-tree partitioning or ternary-tree partitioning on the coding block can be determined based on at least one of the size of the coding block, whether the coding block is located at an image boundary, the maximum partition depth, or the partition shape of a neighboring block. When it is determined to perform binary-tree partitioning or ternary-tree partitioning on the coding block, information indicating the partition direction can be signaled through the bitstream. The information can be a one-bit flag, mtt_split_cu_vertical_flag, based on which it can be determined whether the partition direction is vertical or horizontal. Alternatively, information indicating which of binary-tree partitioning or ternary-tree partitioning is applied to the coding block can be signaled through the bitstream. The information can be a one-bit flag, mtt_split_cu_binary_flag, based on which it can be determined whether binary-tree partitioning or ternary-tree partitioning is applied to the coding block.
[0135] As an example, in Figure 5 In the example shown, the case where vertical binary-tree partitioning is applied to a coding block with a partition depth of one, vertical ternary-tree partitioning is applied to the left coding block generated as a result of the partitioning, and vertical binary-tree partitioning is applied to the right coding block is illustrated.
[0136] Inter prediction is a prediction encoding mode in which information of a previous image is used to predict a current block. As an example, a block in the previous image that is in the same position as the current block (hereinafter referred to as a collocated block) can be set as a prediction block of the current block. Hereinafter, a prediction block generated based on a block in the same position as the current block will be referred to as a collocated prediction block.
[0137] On the contrary, if an object present in the previous image moves to another position in the current image, the motion of the object can be used to effectively predict the current block. For example, if the motion direction and size of the object can be obtained by comparing the previous image with the current image, a prediction block (or, a predicted video) of the current block can be generated according to the motion information of the object. The prediction block generated from the motion information is referred to as a motion prediction block.
[0138] A residual block is generated by differencing the prediction block from the current block. At this time, if there is a movement of the object, the residual block can be reduced in energy by using the motion prediction block instead of the collocated prediction block, and thus the compression performance of the residual block can be improved.
[0139] As described above, a case where a prediction block is generated using motion information is referred to as motion-compensated prediction. In most inter-prediction, a prediction block can be generated based on motion-compensated prediction.
[0140] The motion information can include at least one of a motion vector, a reference picture index, a prediction direction, or a bi-directional weighting value index. The motion vector indicates a moving direction and distance of the object. The reference picture index indicates a reference picture of the current block among reference pictures included in a reference picture list. The prediction direction refers to one of a uni-prediction L0, a uni-prediction L1, or a bi-prediction (L0 prediction and L1 prediction). According to the prediction direction of the current block, at least one of motion information of the L0 direction or motion information of the L1 direction can be used. The bi-directional weighting value index specifies a weighting value applied in the L0 prediction block and a weighting value applied in the L1 prediction block.
[0141] Figure 6 is a flowchart of an inter-prediction method according to an embodiment of the present application.
[0142] As shown in Figure 6 , the inter-prediction method includes determining an inter-prediction mode of a current block (S601), obtaining motion information of the current block according to the determined inter-prediction mode (S602), and performing motion-compensated prediction of the current block based on the obtained motion information (S603).
[0143] The inter prediction mode indicates a plurality of methods for determining the motion information of the current block, and can include an inter prediction mode using translation motion information and an inter prediction mode using affine motion information. As an example, the inter prediction mode using translation motion information can include a merge mode and a motion vector prediction mode, and the inter prediction mode using affine motion information can include an affine merge mode and an affine motion vector prediction mode. The motion information of the current block is determined according to the inter prediction mode and based on neighboring blocks adjacent to the current block or information parsed from a bitstream.
[0144] As an example, the motion information of the current block can be derived from motion information of a spatial neighboring block included in the same image as the current block or a collocated block included in a different image from the current block. The spatial neighboring block includes at least one of a neighboring block adjacent to an upper end of the current block, a neighboring block adjacent to a left side, a neighboring block adjacent to a left upper corner, a neighboring block adjacent to a right upper corner, or a neighboring block adjacent to a left lower corner. The collocated block can have the same position and size as the current block within a reference image. As an example, Figure 7 is a diagram illustrating a collocated block. The reference image can be determined according to a reference image indicated by index information.
[0145] The precision of the motion vector of the current block can be determined from among a plurality of motion vector precision candidates. As an example, the motion vector precision candidate can include at least one of an eighth-pel, a quarter-pel, a half-pel, an integer-pel, an integer multiple of 2 pel, or an integer multiple of 4 pel. The number or type of the motion vector precision candidate can be determined according to a sequence, a frame, or a block unit. As an example, information for determining the number or type of the motion vector precision candidate can be signaled through a bitstream. Alternatively, the number or type of the motion vector precision candidate can be determined based on whether an inter prediction mode or an affine motion model of the current block is used. Information for specifying one of the plurality of motion vector precision candidates can also be signaled through a bitstream.
[0146] Intra prediction refers to predicting the current block using reconstructed samples of neighboring blocks that have been coded or decoded. At this time, the reconstructed samples before applying loop filtering can be used in the intra prediction of the current block.
[0147] The intra prediction methods include matrix-based intra prediction and normal intra prediction based on angles of neighboring reconstructed samples. Information indicating the intra prediction method of the current block can be signaled through a bitstream. The information can be a 1-bit flag. Alternatively, the intra prediction method of the current block can be determined based on at least one of a position, a size, a shape of the current block, or an intra prediction method of a neighboring block. As an example, if the current block crosses an image boundary, the matrix-based intra prediction can be disabled in the current block.
[0148] The matrix-based intra prediction is a method of obtaining a prediction block of the current block based on a matrix product between a matrix stored in the encoder and the decoder and reconstructed samples neighboring the current block. Information indicating a specific one of a plurality of stored matrices can be signaled through a bitstream. The decoder can determine a matrix required for the intra prediction of the current block based on the information and a size of the current block.
[0149] The normal intra prediction is a method of obtaining a prediction block of the current block based on a non-angular intra prediction mode or an angular intra prediction mode. The execution of the intra prediction based on the normal intra prediction will be described in more detail below with reference to the accompanying drawings.
[0150] Figure 8 is a flowchart of an intra prediction method according to an embodiment of the present application.
[0151] A reference sample line of the current block can be determined (S801). The reference sample line means a set of reference samples included in the k-th row from the top and / or the left of the current block. The reference samples can be obtained from reconstructed samples neighboring the current block that have been encoded or decoded.
[0152] Index information of a reference sample line of the current block among a plurality of reference sample lines can be signaled through a bitstream. As an example, index information intra_luma_ref_idx indicating a specific reference sample line of the current block can be signaled through a bitstream. The index information can be signaled in units of a coded block.
[0153] The plurality of reference sample lines can include at least one of a first line, a second line, a third line, or a fourth line from the top and / or the left of the current block. A reference sample line formed of a row neighboring the top of the current block and a column neighboring the left of the current block among the plurality of reference sample lines can be referred to as a neighboring reference sample line, and the other reference sample lines can be referred to as non-neighboring reference sample lines.
[0154] Figure 9 is a diagram of reference sample lines.
[0155] In Figure 9In this case, one adjacent reference sample line composed of a row or a column adjacent to the current block and three non-adjacent reference sample lines composed of a row or a column not adjacent to the current block are illustrated.
[0156] Only a part of the plurality of reference sample lines can be selected as the reference sample lines of the current block. As one example, the first non-adjacent reference sample line and the third non-adjacent reference sample line can be selected as the reference sample lines of the current block. Figure 9 The reference sample lines other than the second non-adjacent reference sample line illustrated in FIG. 1 can be set as candidate reference sample lines. Table 1 illustrates indices assigned to the respective candidate reference sample lines.
[0157]
Table 1
[0158] Index (intra_luma_ref_idx) Reference sample line 0 Neighboring reference sample line 1 First non-neighboring reference sample line 2 Second non-neighboring reference sample line
[0159] More or less candidate reference sample lines than the illustrated number can be set. In addition, the number or the positions of the non-adjacent reference sample lines set as the candidate reference sample lines are not limited to the illustrated examples. As one example, the first non-adjacent reference sample line and the third non-adjacent reference sample line can be set as the candidate reference sample lines, or the second non-adjacent reference sample line and the third non-adjacent reference sample line can be set as the candidate reference sample lines. Alternatively, the first non-adjacent reference sample line, the second non-adjacent reference sample line, and the third non-adjacent reference sample line can all be set as the candidate reference sample lines.
[0160] The number or the kind of the candidate reference sample lines can be determined based on at least one of the size, the shape, the position of the current block, whether the current block is divided into sub-blocks, or the intra prediction mode.
[0161] The reference sample lines of the current block can also be determined based on at least one of the position, the size, the shape of the current block, or the prediction encoding mode of the neighboring block. As one example, if the current block is located at a boundary of an image, a tile, a slice, or a coding tree unit, the adjacent reference sample lines can be determined as the reference sample lines of the current block.
[0162] Alternatively, if the current block is non-square, the adjacent reference sample lines can be determined as the reference sample lines of the current block. Alternatively, if the width and the height of the current block are greater than or less than a threshold, the adjacent reference sample lines can be determined as the reference sample lines of the current block.
[0163] The reference sample lines can include an upper end reference sample located at an upper end of the current block and a left side reference sample located at a left side of the current block. The upper end reference sample and the left side reference sample can be derived from reconstructed samples adjacent to the current block. The reconstructed samples can be in a state before loop filtering is applied.
[0164] The number of reference samples included in a reference sample line can be determined based on the distance of the reference sample line from the current block. As an example, the number of reference samples included in a non-adjacent reference sample line having a distance of i from the current block can be more than the number of reference samples included in a non-adjacent reference sample line having a distance of i-1 from the current block. Thus, the number of reference samples included in a non-adjacent reference sample line can be more than the number of reference samples included in an adjacent reference sample line.
[0165] The difference in the number of reference samples included in a non-adjacent reference sample line having a distance of i from the current block and the number of reference samples included in an adjacent reference sample line can be defined as a reference sample number offset. At this time, the difference in the number of top reference samples located at the top of the current block can be defined as offsetX[i], and the difference in the number of left reference samples located at the left of the current block can be defined as offsetY[i]. The offsetX and the offsetY can be determined based on the distance of the current block from the non-adjacent reference sample line. As an example, the offsetX and the offsetY can be set to an integer multiple of i. As an example, the offsetX[i] and the offset[i] can be 2i.
[0166] Alternatively, the reference sample number offset can be determined based on the width and height ratio of the current block. Equation 1 gives an example of numerically representing the width and height ratio of the current block.
[0167] [Equation 1]
[0168] whRatio = Log2(nTbW / nTbH)
[0169] Numerical representation of the width and height ratio of the current block can be performed using something other than Equation 1.
[0170] The values of the offsetX and the offsetY can be determined based on the width and height ratio of the current block. For example, in the case where the value of the whRatio is greater than 1, the value of the offsetX can be set to be greater than the value of the offsetY. As an example, the value of the offsetX can be set to 1, and the value of the offsetY can be set to 0. In contrast, in the case where the value of the whRatio is less than 1, the value of the offsetY can be set to be greater than the value of the offsetX. As an example, the value of the offsetX can be set to 0, and the value of the offsetY can be set to 1.
[0171] The non-adjacent reference sample line with distance i from the current block, except the left-top reference sample with the same x and y coordinates as the current block, can be composed of (refW + offsetX[i]) top reference samples and (refH + offsetY[i]) left reference samples. Wherein, refW and refH represent the length of the adjacent reference sample line, which can be set as shown in the following formulas 2 and 3 respectively.
[0172] [Formula 2]
[0173] refW = 2 * nTbW
[0174] [Formula 3]
[0175] refH = 2 * nTbH
[0176] In the formulas 2 and 3, nTbW represents the width of the coding block or the transform block performing the intra prediction, and nTbH represents the height of the coding block or the transform block performing the intra prediction.
[0177] As a result, the reference sample line with distance i from the current block can be composed of (refW + refH + offsetX[i] + offsetY[i] + 1) reference samples.
[0178] According to the intra prediction mode of the current block, at least one of the reference samples belonging to the reference sample line is used to obtain a prediction sample.
[0179] Then, the intra prediction mode of the current block can be determined (S802). The intra prediction mode of the current block can be determined as the intra prediction mode of the current block from at least one of a non-angular intra prediction mode or an angular intra prediction mode. The non-angular intra prediction mode includes planner and DC, and the angular intra prediction mode includes 33 or 65 modes from the left-bottom diagonal direction to the right-top diagonal direction.
[0180] Figure 10 is a schematic diagram of the intra prediction mode.
[0181] Figure 10 (a) of shows 35 intra prediction modes, Figure 10 (b) of shows 67 intra prediction modes.
[0182] More or less than the number of intra prediction modes shown in Figure 10 can also be defined.
[0183] The MPM (Most Probable Mode) can be set based on the intra prediction mode of the neighboring block adjacent to the current block. The neighboring block can include a left neighboring block adjacent to the left side of the current block and an upper neighboring block adjacent to the upper end of the current block. When the coordinates of the left upper end sample of the current block are referred to as (0, 0), the left neighboring block can include samples at positions (-1, 0), (-1, H-1), or (-1, (H-1) / 2). Here, H denotes the height of the current block. The upper neighboring block can include samples at positions (0, -1), (W-1, -1), or ((W-1) / 2, -1). Here, W denotes the width of the current block.
[0184] When the neighboring block is encoded with the normal intra prediction, the MPM can be obtained based on the intra prediction mode of the neighboring block. Specifically, the intra prediction mode of the left neighboring block can be set as a parameter candIntraPredModeA, and the intra prediction mode of the upper neighboring block can be set as a parameter candIntraPredModeB.
[0185] At this time, when the neighboring block is not available (for example, when the neighboring block has not been encoded or decoded or when the position of the neighboring block exceeds the image boundary), the parameter candIntraPredModeX (where X is A or B) obtained based on the intra prediction mode of the neighboring block can be set as a default mode in the case where the neighboring block is encoded with the matrix-based intra prediction, the case where the neighboring block is encoded with the inter prediction, or the case where the neighboring block is included in a different coding tree unit from the current block. The default mode can include at least one of planner, DC, vertical direction mode, or horizontal direction mode.
[0186] Alternatively, when the neighboring block is encoded with the matrix-based intra prediction, the intra prediction mode corresponding to the index value used to specify the certain one of the matrix can be set as candIntraPredModeX. For this purpose, a look-up table indicating the mapping relationship of the index value used to specify the matrix and the intra prediction mode can be pre-stored in the encoder and the decoder.
[0187] The MPMs can be derived based on the parameter candIntraPredModeA and the parameter candIntraPredModeB. As an example, the candIntraPredModeA and the candIntraPredModeB can be set as the MPMs, or an intra prediction mode close to the larger value or the smaller value of the candIntraPredModeA or the candIntraPredModeB can be set as the MPM. Wherein, the intra prediction mode close to the candIntraPredModeX (X is A or B) can be the intra prediction mode with an index difference of ±1 or ±2 from the candIntraPredModeX.
[0188] The number of MPMs included in the MPM list can be pre-set in the encoder and the decoder. As an example, the number of MPMs can be 3, 4, 5 or 6. Alternatively, information indicating the number of MPMs can be signaled through the bitstream. Alternatively, the number of MPMs can be determined based on at least one of the prediction mode of the neighboring blocks, the size, the shape or the reference sample line index of the current block. As an example, in the case that the neighboring reference sample line is determined as the reference sample line of the current block, N MPMs can be utilized, and in the case that the non-neighboring reference sample line is determined as the reference sample line of the current block, M MPMs can be utilized. M is a natural number smaller than N, as an example, N is 6, and M can be 5, 4 or 3. Therefore, if the index of the reference sample line of the current block is 0 and the MPM flag is true, the intra prediction mode of the current block can be determined as one of the 6 candidate intra prediction modes, and in the case that the index of the reference sample line of the current block is greater than 0 and the MPM flag is true, the intra prediction mode of the current block can be determined as one of the 5 candidate intra prediction modes.
[0189] Alternatively, a fixed number (e.g., 6 or 5) of MPM candidates can also be used regardless of the index of the reference sample line of the current block.
[0190] In the embodiments described later, it is assumed that the number of MPMs is 6, and the 6 MPMs are referred to as MPM[0], MPM[1], MPM[2], MPM[3], MPM[4] and MPM[5]. In the embodiments in which the number of MPMs is less than 6, only a part of the 6 MPMs described in the embodiments described later can be utilized. Alternatively, in the embodiments in which the number of MPMs is greater than 6, the 6 MPMs described in the embodiments described later can be included.
[0191] The initial value of the MPMs can be set to a non-angular intra prediction mode or an angular intra prediction mode different from candIntraPredModeA and candIntraPredModeA. Among them, the angular intra prediction mode that can be set to the MPMs can include at least one of a vertical direction intra prediction mode, a horizontal direction intra prediction mode, a left bottom diagonal direction intra prediction mode, a left top diagonal direction intra prediction mode, or a right top diagonal direction intra prediction mode. As an example, the initial value of the MPMs can be set as follows.
[0192] MPM[0] = candIntraPredModeA
[0193] MPM[1] = (candIntraPredModeA == INTRA_PLANAR)? INTRA_DC : INTRA_PLANAR
[0194] MPM[2] = INTRA_ANGULAR50
[0195] MPM[3] = INTRA_ANGULAR18
[0196] MPM[4] = INTRA_ANGULAR2
[0197] MPM[5] = INTRA_ANGULAR34
[0198] In the above example, ((A)? B : C) represents a function that returns the value of B when the condition described in A is true, and returns the value of C when the condition described in A is false.
[0199] When candIntraPredModeA and candIntraPredModeB are the same, and candIntraPredModeA is an angular intra prediction mode, MPM[0] can be set to candIntraPredModeA, and an intra prediction mode similar to candIntraPredModeA can be set to MPM. The intra prediction mode similar to candIntraPredModeA can be an intra prediction mode whose index difference from candIntraPredModeA is ±1 or ±2. To get the intra prediction mode similar to candIntraPredModeA, modulus operation (%) and an offset can be used. In addition, at least one of a non-angular intra prediction mode or an intra prediction mode whose angular difference from candIntraPredModeA is a pre-defined value can be set to MPM. Among them, the intra prediction mode whose angular difference from candIntraPredModeA is a pre-defined value can be an intra prediction mode perpendicular to candIntraPredModeA or an intra prediction mode in the opposite direction of candIntraPredModeA. As an example, MPM can be obtained as follows.
[0200] MPM[0] = candIntraPredModeA
[0201] MPM[1] = INTRA_PLANAR
[0202] MPM[2] = INTRA_DC
[0203] MPM[3] = 2 + ((candIntraPredModeA + 62) % 65)
[0204] MPM[4] = 2 + ((candIntraPredModeA - 1) % 65)
[0205] MPM[5] = 2 + ((candIntraPredModeA + 94) % 65)
[0206] MPM[3] corresponds to (candIntraPredModeA - 1), and MPM[4] corresponds to (candIntraPredModeA + 1). MPM[5] represents an intra prediction mode perpendicular to candIntraPredModeA.
[0207] When candIntraPredModeA and candIntraPredModeB are different, candIntraPredModeA and candIntraPredModeB can be set as MPM[0] and MPM[1], respectively. Alternatively, candIntraPredA and candIntraPredModeB can be compared, and the maximum value can be set as MPM[0] and the minimum value can be set as MPM[1]. Conversely, the minimum value can be set as MPM[0] and the maximum value can be set as MPM[1].
[0208] At this time, when candIntraPredModeA and candIntraPredModeB are both angular intra prediction modes, a non-angular intra prediction mode can be set as MPM. As an example, planner and DC can be set as MPM[2] and MPM[3], respectively.
[0209] Alternatively, an intra prediction mode similar to the maximum or minimum of candIntraPredModeA and candIntraPredModeB can be set as MPM. An intra prediction mode similar to candIntraPredModeX can be obtained by adding or subtracting an offset to candIntraPredModeX. At this time, the maximum size of the offset can be determined based on the difference between the maximum and minimum of candIntraPredModeA and candIntraPredModeB. As an example, the offset can be a natural number such as 1 or 2.
[0210] As an example, when the difference between MAX(candIntraPredModeA, candIntraPredModeB) and MIN(candIntraPredModeA, candIntraPredModeB) is not 64 or 1, MPM[4] and MPM[5] can be obtained by the following equations.
[0211] MPM[4] = 2 + ((MAX(MPM[0], MPM[1]) + 62) % 65
[0212] MPM[5] = 2 + ((MAX(MPM[0], MPM[1]) - 1) % 65
[0213] MAX(A, B) is a function that returns the larger of A and B, and MIN(A, B) is a function that returns the smaller of A and B. MPM[4] corresponds to (MAX(MPM[0], MPM[1]) - 1), and MPM[5] corresponds to (MAX(MPM[0], MPM[1]) + 1). Conversely, when the difference between MAX(candIntraPredModeA, candIntraPredModeB) and MIN(candIntraPredModeA, candIntraPredModeB) is 64 or 1, MPM[4] and MPM[5] can be obtained as follows.
[0214] MPM[4] = 2 + ((MAX(MPM[0], MPM[1]) + 61) % 65
[0215] MPM[5] = 2 + (MAX(MPM[0], MPM[1]) % 65
[0216] MPM[4] corresponds to (MAX(MPM[0], MPM[1]) - 2), and MPM[5] corresponds to (MAX(MPM[0], MPM[1]) + 2).
[0217] When one of candIntraPredModeA and candIntraPredModeB is an angular intra prediction mode and the other is a non-angular intra prediction mode, at least one of the non-angular intra prediction mode that is different from MIN(candIntraPredModeA, candIntraPredModeB), the angular intra prediction mode that is close to MAX(candIntraPredModeA, candIntraPredModeB), or the intra prediction mode that has a predefined value of angular difference from MAX(candIntraPredModeA, candIntraPredModeB) can be set as MPM. As one example, MPM[2] to MPM[5] can be obtained as follows.
[0218] MPM[2] =!MIN(MPM[0], MPM[1])
[0219] MPM[3] = 2 + ((MAX(MPM[0], MPM[1]) + 62) % 65
[0220] MPM[4] = 2 + ((MAX(MPM[0], MPM[1]) - 1) % 65
[0221] MPM[5] = 2 + ((MAX(MPM[0], MPM[1]) + 94) % 65
[0222] MPM[2] represents a non-angular intra prediction mode different from MPM[0] or MPM[1]. For example, when MIN(MPM[0], MPM[1]) is DC, MPM[2] is set to planar, and when MIN(MPM[0], MPM[1]) is planar, MPM[2] is set to DC. MPM[3] corresponds to ((MAX(MPM[0], MPM[1]) - 1), MPM[4] corresponds to (MAX(MPM[0], MPM[1]) + 1). MPM[5] represents an intra prediction mode perpendicular to (MAX(MPM[0], MPM[1]). Different from the examples listed above, MPMs obtained by adding 2 or subtracting 2 from (MAX(MPM[0], MPM[1]) can also be added to the MPM list.
[0223] When one of candIntraPredA and candIntraPredB is a non-angular intra mode and the other is an angular intra prediction mode, i.e., when one of candIntraPredA and candIntraPredB is less than 2 and the other is greater than or equal to 2, the maximum of candIntraPredA and candIntraPredB can be set as MPM. In addition, an intra prediction mode similar to the maximum or an intra prediction mode perpendicular to the maximum can be set as MPM. As one example, MPM[0] to MPM[5] can be obtained as follows.
[0224] MPM[0] = MAX(candIntraPredA, candIntraPredB)
[0225] MPM[1] = INTRA PLANAR
[0226] MPM[2] = INTRA DC
[0227] MPM[3] = 2 + ((MAX(candIntraPredA, candIntraPredB) + 62) % 65
[0228] MPM[4] = 2 + ((MAX(candIntraPredA, candIntraPredB) - 1) % 65
[0229] MPM[5] = 2 + ((MAX(candIntraPredA, candIntraPredB) + 94) % 65
[0230] MPM[3] corresponds to ((MAX(candlntraPredA, candlntraPredB) - 1), and MPM[4] corresponds to (MAX(candlntraPredA, candlntraPredB) + 1). MPM[5] represents an intra prediction mode that is vertical to (MAX(candlntraPredA, candlntraPredB). Unlike the examples listed above, MPMs that are 2 more or 2 less than (MAX(candlntraPredA, candlntraPredB) can also be added to the MPM list.
[0231] The MPMs can be derived according to the index of the reference sample line of the current block. In particular, when a non-adjacent reference sample line is determined to be the reference sample line of the current block, non-angular prediction modes such as planner or DC can not be set as MPMs. As one example, the initial values of the MPMs can be set as follows according to whether an adjacent reference sample line is determined to be the reference sample line of the current block.
[0232] MPM[0] = (IntraLumaRefLineIdx == 0)? candlntraPredModeA : INTRA_ANGULAR2
[0233] MPM[1] = (IntraLumaRefLineIdx == 0)? (candlntraPredModeA : == INTRA_PLANAR? INTRA_DC : INTRA_PLANAR) : INTRA_ANGULAR18
[0234] MPM[2] = INTRA_ANGULAR50
[0235] MPM[3] = (IntraLumaRefLineIdx == 0)? INTRA_ANGULAR18 : INTRA_ANGULAR34
[0236] MPM[4] = (IntraLumaRefLineIdx == 0)? INTRA_ANGULAR2 : INTRA_ANGULAR66
[0237] MPM[5] = (IntraLumaRefLineIdx == 0)? INTRA_ANGULAR34 : INTRA_ANGULAR42
[0238] If the reference sample line of the current block is a non-adjacent reference sample line, and both candIntraPredModeA and candIntraPredModeB are angular intra prediction modes, the MPMs can be derived as follows.
[0239] MPM[0] = candIntraPredModeA
[0240] MPM[1] = candIntraPredModeB
[0241] MPM[2] = INTRA_ANGULAR2
[0242] MPM[3] = INTRA_ANGULAR18
[0243] MPM[4] = INTRA_ANGULAR50
[0244] MPM[5] = INTRA_ANGULAR34
[0245] If the reference sample line of the current block is a non-adjacent reference sample line, and one of candIntraPredModeA and candIntraPredModeB is a non-angular intra prediction mode and the other is an angular intra prediction mode, the MPMs can be derived as follows.
[0246] MPM[0] = MAX(candIntraPredModeA, candIntraPredModeB)
[0247] MPM[1] = INTRA_ANGULAR2
[0248] MPM[2] = INTRA_ANGULAR18
[0249] MPM[3] = INTRA_ANGULAR50
[0250] MPM[4] = INTRA_ANGULAR34
[0251] MPM[5] = INTRA_ANGULAR66
[0252] After the MPM list including a plurality of MPMs is generated, information indicating whether an MPM identical to the intra prediction mode of the current block is included in the MPM list can be signaled through a bitstream. The information is a 1-bit flag, which can be referred to as an MPM flag. When the MPM flag indicates that the MPM identical to the current block is included in the MPM list, index information identifying one of the MPMs can be signaled through the bitstream. As an example, specific index information mpm_idx for one of the plurality of MPMs can be signaled through the bitstream. The MPM specific by the index information can be set as the intra prediction mode of the current block. When the MPM flag indicates that the MPM identical to the current block is not included in the MPM list, other mode information indicating one of the intra prediction modes other than the MPMs can be signaled through the bitstream. The other mode information indicates an index value corresponding to the intra prediction mode of the current block when the index is re-allocated to the intra prediction modes other than the MPMs. A decoder can compare the MPMs in ascending order with the other mode information and determine the intra prediction mode of the current block. As an example, when the other mode information is equal to or smaller than the MPM, the intra prediction mode of the current block can be obtained by adding 1 to the other mode information.
[0253] When the intra prediction mode of the current block is obtained, a comparison between a part of the MPMs and the other mode information can be skipped. As an example, the MPMs that are non-angular intra prediction modes among the MPMs can be excluded from the comparison targets. When the non-angular intra prediction mode is set as the MPM, the other mode information explicitly indicates an angular intra prediction mode, and thus the intra prediction mode of the current block can be obtained by comparing the other MPMs other than the non-angular intra prediction mode with the other mode information. The non-angular intra prediction mode can not be excluded from the comparison targets, and a result value obtained by adding the number of the non-angular intra prediction modes to the other mode information can be compared with the other MPMs.
[0254] Instead of setting a default mode as the MPM, information indicating whether the intra prediction mode of the current block is the default mode can be signaled through the bitstream. The information is a 1-bit flag, which can be referred to as a default mode flag. The default mode flag can be signaled only when the MPM flag indicates that the MPM identical to the current block is included in the MPM list. As described above, the default mode can include at least one of planner, DC, vertical mode, or horizontal mode. As an example, when the planner is set as the default mode, the default mode flag can indicate whether the intra prediction mode of the current block is the planner. When the default mode flag indicates that the intra prediction mode of the current block is not the default mode, one of the plurality of MPMs indicated by the index information can be set as the intra prediction mode of the current block.
[0255] When the default mode is identified, the intra prediction mode identical to the default mode can not be set as the MPM. As an example, when the default mode identification indicates whether the intra prediction mode of the current block is planner, the MPM corresponding to the planner among the above-mentioned 6 MPMs can be replaced with another mode, or 5 MPMs other than the MPM corresponding to the planner can be used to obtain the intra prediction mode of the current block.
[0256] When the plurality of intra prediction modes are set as the default mode, index information indicating one of the default modes can also be transmitted. The intra prediction mode of the current block can be set as the default mode indicated by the index information.
[0257] In the case where the index of the reference sample line of the current block is not 0, the default mode can be set not to be used. As an example, when the non-adjacent reference sample line is determined as the reference sample line of the current block, the non-angular intra prediction mode such as the DC mode or the planner mode can be set not to be used. Accordingly, in the case where the index of the reference sample line is not 0, the default mode identification can not be transmitted, and the value of the default mode identification can be set as a pre-defined value (i.e., dummy).
[0258] After the intra prediction mode of the current block is determined, the predicted samples with respect to the current block can be obtained based on the determined intra prediction mode (S803).
[0259] When the DC mode is selected, the predicted samples with respect to the current block can be generated based on the average value of the reference samples. Specifically, the values of all the samples in the predicted block can be generated based on the average value of the reference samples. The average value can be obtained using at least one of the upper reference sample located at the upper end of the current block and the left reference sample located at the left side of the current block.
[0260] The number or range of the reference samples used to obtain the average value can be different according to the shape of the current block. As an example, if the current block is a non-square block having a width greater than a height, only the upper reference sample can be used to calculate the average value. In contrast, if the current block is a non-square block having a width less than a height, only the left reference sample can be used to calculate the average value. That is, if the width and the height of the current block are different, only the reference sample adjacent to the side having a longer length can be used to calculate the average value. Alternatively, whether to use only the upper reference sample to calculate the average value or to use only the left reference sample to calculate the average value can be determined based on the ratio of the width to the height of the current block.
[0261] When the planner mode is selected, a prediction sample can be obtained using a horizontal direction prediction sample and a vertical direction prediction sample. The horizontal direction prediction sample is obtained based on a left reference sample and a right reference sample located on the same horizontal line as the prediction sample, and the vertical direction prediction sample is obtained based on an upper reference sample and a lower reference sample located on the same vertical line as the prediction sample. The right reference sample can be generated by copying a reference sample adjacent to the upper right corner of the current block, and the lower reference sample can be generated by copying a reference sample adjacent to the lower left corner of the current block. The horizontal direction prediction sample can be obtained based on a weighted sum operation of the left reference sample and the right reference sample, and the vertical direction prediction sample can be obtained based on a weighted sum operation of the upper reference sample and the lower reference sample. At this time, the weight values corresponding to the respective reference samples can be determined according to the position of the prediction sample. The prediction sample can be obtained based on an average operation or a weighted sum operation of the horizontal direction prediction sample and the vertical direction prediction sample. When the weighted sum operation is performed, the weight values corresponding to the horizontal direction prediction sample and the vertical direction prediction sample can be determined based on the position of the prediction sample.
[0262] When the angular prediction mode is selected, a parameter for representing a prediction direction (or a prediction angle) of the selected angular prediction mode can be determined. Table 2 below shows an intra direction parameter intraPredAng of each intra prediction mode.
[0263] [Table 2]
[0264]
[0265] Table 2 shows the intra direction parameter of each intra prediction mode having an index of one of 2 to 34 when 35 intra prediction modes are defined. When more than 33 angular intra prediction modes are defined, Table 2 can be further refined to set the intra direction parameter of each angular intra prediction mode.
[0266] After the upper reference sample and the left reference sample of the current block are arranged in a column, the prediction sample can be obtained based on the value of the intra direction parameter. At this time, when the value of the intra direction parameter is negative, the left reference sample and the upper reference sample can be arranged in a column.
[0267] Figure 11 and Figure 12 is a schematic diagram of an example of a one-dimensional arrangement in which reference samples are arranged in a column.
[0268] Figure 11 shows an example of a vertical direction one-dimensional arrangement in which reference samples are arranged in a vertical direction, Figure 12 shows an example of a horizontal direction one-dimensional arrangement in which reference samples are arranged in a horizontal direction. It is assumed that 35 intra prediction modes are defined, and the intra direction parameter of each intra prediction mode is determined as shown in Table 2. Figure 11 andFigure 12 The embodiments are described below.
[0269] When the intra-prediction mode index is one of 11 to 18, a one-dimensional horizontal arrangement with the upper reference sample rotated counterclockwise can be applied. When the intra-prediction mode index is one of 19 to 25, a one-dimensional vertical arrangement with the left reference sample rotated clockwise can be applied. The reference samples can be arranged in a column according to the angle of the intra-prediction mode.
[0270] Reference sample determination parameters can be determined based on intra-frame orientation parameters. These parameters may include specific reference sample indexing for the reference samples and weighting parameters for determining the weights applied within the reference samples.
[0271] The reference sample index iIdx and the weighted parameter ifact can be obtained through formulas 4 and 5 below, respectively.
[0272] [Formula 4]
[0273] iIdx=(y+1)*P ang / 32
[0274] [Formula 5]
[0275] i fact =[(y+1)*P ang ]&31
[0276] In formulas 4 and 5, P ang This represents the intra-frame orientation parameter. A specific reference sample corresponds to an integer pixel (pel) based on the reference sample index iIdx.
[0277] To obtain the predicted sample, at least one reference sample can be specified. Specifically, the position of the reference sample used when obtaining the predicted sample can be specified, taking into account the slope of the prediction pattern. As an example, the reference sample index iIdx can be used to specify the reference sample used when obtaining the predicted sample.
[0278] In this case, when the slope of the intra-prediction mode is not represented by a single reference sample, multiple reference samples can be interpolated to generate a prediction sample. As an example, when the slope of the intra-prediction mode is a value between the slope between the prediction sample and the first reference sample, and between the slope between the prediction sample and the second reference sample, the first and second reference samples can be interpolated to obtain the prediction sample. That is, when the angular line based on the intra-prediction angle does not pass through a reference sample located at an integer pixel, reference samples located to the left, right, or top and bottom adjacent to the position through which the angular line passes can be interpolated to obtain the prediction sample.
[0279] The following Equation 6 shows an example of obtaining a prediction sample based on a reference sample.
[0280]
Equation 6
[0281] P(x, y) = ((32 - i fact ) / 32) * Ref_1D(x + iIdx + 1) + (i fact / 32) * Ref_1D(x + iIdx + 2)
[0282] In Equation 6, P denotes a prediction sample, and Ref_1D denotes a certain one of the reference samples arranged in one dimension. At this time, the position of the reference sample can be determined according to the position (x, y) of the prediction sample and the reference sample index iIdx.
[0283] When the slope of the intra prediction mode can be represented by one reference sample, the weighting value parameter i fact is set to 0. Accordingly, Equation 6 can be simplified as shown in the following Equation 7.
[0284]
Equation 7
[0285] P(x, y) = Ref_1D(x + iIdx + 1)
[0286] The intra prediction of the current block can also be performed based on a plurality of intra prediction modes. As one example, the intra prediction modes can be obtained in accordance with the prediction samples, and the prediction samples can be obtained based on the intra prediction modes assigned to the respective prediction samples.
[0287] Alternatively, the intra prediction modes can be obtained in accordance with regions, and the intra prediction of the respective regions can be performed based on the intra prediction modes assigned to the respective regions. The regions can include at least one sample. At least one of the size or shape of the regions can be adaptively determined based on at least one of the size, shape, or intra prediction mode of the current block. Alternatively, at least one of the size or shape of the regions can be predefined in the encoder and the decoder independently of the size or shape of the current block.
[0288] Alternatively, intra-prediction can be performed based on multiple intra-prediction methods, and the final prediction sample can be obtained by averaging or weighting the multiple prediction samples obtained through multiple intra-prediction methods. As an example, intra-prediction can be performed based on a first intra-prediction mode to obtain a first prediction sample, and intra-prediction can be performed based on a second intra-prediction mode to obtain a second prediction sample. Then, the final prediction sample can be obtained by averaging or weighting the first and second prediction samples. In this case, the weights assigned to the first and second prediction samples can be determined based on at least one of whether the first intra-prediction mode is a non-angular or angular prediction mode, whether the second intra-prediction mode is a non-angular or angular prediction mode, or the intra-prediction modes of adjacent blocks.
[0289] Multiple intra-frame prediction modes can be combinations of non-angle intra-frame prediction modes and angle prediction modes, combinations of angle prediction modes, or combinations of non-angle prediction modes.
[0290] Figure 13 This is an exemplary illustration of the angle formed by the intra-frame prediction mode of the angle and a straight line parallel to the X-axis.
[0291] like Figure 13 As shown, the angle prediction pattern can exist between the lower left diagonal direction and the upper right diagonal direction. If we use the angle formed by the x-axis and the angle prediction pattern, the angle prediction pattern can exist between 45 degrees (lower left diagonal direction) and -135 degrees (upper right diagonal direction).
[0292] If the current block is not square, depending on the intra-prediction mode of the current block, the reference sample that is closer to the prediction sample among the reference samples located on the corner of the intra-prediction angle will be used instead to obtain the prediction sample.
[0293] Figure 14 This is a schematic diagram illustrating the shape obtained by predicting a sample when the current block is not a square.
[0294] As an example, such as Figure 14 As shown in (a), assuming the current block is a non-square with a width greater than its height, and the intra-frame prediction mode of the current block is an angular intra-frame prediction mode with an angle between 0 and 45 degrees. In the above case, when a predicted sample A near the right column of the current block is obtained, a situation occurs in which the reference sample located in the angular mode of the angle does not utilize the upper reference sample T which is closer to the predicted sample, but instead utilizes the left reference sample L which is farther from the predicted sample.
[0295] As another example, such as Figure 14As shown in (b), assuming the current block is a non-square with a height greater than its width, and the intra-frame prediction mode of the current block is an angular intra-frame prediction mode between -90 degrees and -135 degrees. In the above case, when a prediction sample A near the lower row of the current block is obtained, a situation occurs in which, in the reference sample located on the angular mode according to the angle, the upper reference sample T, which is farther from the prediction sample, replaces the left reference sample L, which is closer to the prediction sample.
[0296] To eliminate the problem described above, if the current block is not square, the intra-prediction mode of the current block can be replaced with an intra-prediction mode in the opposite direction. Therefore, for non-square blocks, a mode with a higher frequency of prediction can be used. Figure 10 The angle prediction modes shown are for angles larger or smaller than the predicted angles. This type of intra-frame prediction mode can be defined as a wide-angle intra-frame prediction mode. A wide-angle intra-frame prediction mode refers to an intra-frame prediction mode for angles not falling within the range of 45 degrees to -135 degrees.
[0297] Figure 15 This is a schematic diagram of the wide-angle intra-frame prediction mode.
[0298] exist Figure 15 In the example shown, the intra-prediction modes with indices of -1 to -14 and the intra-prediction modes with indices of 67 to 80 represent the wide-angle intra-prediction modes.
[0299] exist Figure 15 The illustrations show 14 wide-angle intra-frame prediction modes (-1 to -14) with angles greater than 45 degrees and 14 wide-angle intra-frame prediction modes (67 to 80) with angles less than -135 degrees, but more or fewer wide-angle intra-frame prediction modes can also be defined.
[0300] When using the wide-angle intra-frame prediction mode, the length of the upper reference sample can be set to 2W+1, and the length of the left reference sample can be set to 2H+1.
[0301] With the use of wide-angle intra-frame prediction mode Figure 14 (a) The sample A shown can be predicted using the reference sample T. Figure 14 The sample A shown in (b) can be predicted using the reference sample L.
[0302] Including the existing intra-prediction mode and N wide-angle intra-prediction modes, a total of 67+N intra-prediction modes can be used. As an example, Table 3 shows the intra-prediction mode intra-direction parameters when 20 wide-angle intra-prediction modes are defined.
[0303] Table 3
[0304] PredModeIntra -10 -9 -8 -7 -6 -5 -4 -3 -2 intraPredAngle 114 93 79 68 60 54 49 45 39 PredModeIntra -1 2 3 4 5 6 7 8 9 intraPredAngle 35 32 29 26 23 21 19 17 15 PredModeIntra 10 11 12 13 14 15 16 17 18 intraPredAngle 13 11 9 7 5 3 2 1 0 PredModeIntra 19 20 21 22 23 24 25 26 27 intraPredAngle -1 -2 -3 -5 -7 -9 -11 -13 -15 PredModeIntra 28 29 30 31 32 33 34 35 36 intraPredAngle -17 -19 -21 -23 -26 -29 -32 -29 -26 PredModeIntra 37 38 39 40 41 42 43 44 45 intraPredAngle -23 -21 -19 -17 -15 -13 -11 -9 -7 PredModeIntra 46 47 48 49 50 51 52 53 54 intraPredAngle -5 -3 -2 -1 0 1 2 3 5 PredModeIntra 55 56 57 58 59 60 61 62 63 intraPredAngle 7 9 11 13 15 17 19 21 23 PredModeIntra 64 65 66 67 68 69 70 71 72 intraPredAngle 26 29 32 35 39 45 49 54 60 PredModeIntra 73 74 75 76 intraPredAngle 68 79 93 114
[0305] If the current block is a non-square block and the intra prediction mode of the current block obtained in step S802 belongs to a transform range, the intra prediction mode of the current block can be transformed into a wide-angle intra prediction mode. The transform range can be determined based on at least one of a size, a shape, or a ratio of the current block. The ratio can represent a ratio between a width and a height of the current block.
[0306] If the current block is a non-square block with a width greater than a height, the transform range can be set from an index of an upper-right diagonal intra prediction mode (e.g., 66) to an index of a lower-left diagonal intra prediction mode (e.g., -N). N can be determined based on a ratio of the current block. If the intra prediction mode of the current block belongs to the transform range, the intra prediction mode can be transformed into a wide-angle intra prediction mode. The transformation can be subtracting a predefined value from the intra prediction mode. The predefined value can be a total number of intra prediction modes other than the wide-angle intra prediction mode (e.g., 67).
[0307] According to the embodiment, the intra prediction modes between 66 and 53 can be transformed into the wide-angle intra prediction modes between -1 and -14, respectively.
[0308] If the current block is a non-square block with a height greater than a width, the transform range can be set from an index of a lower-left diagonal intra prediction mode (e.g., 2) to an index of an upper-right diagonal intra prediction mode (e.g., +M). M can be determined based on a ratio of the current block. If the intra prediction mode of the current block belongs to the transform range, the intra prediction mode can be transformed into a wide-angle intra prediction mode. The transformation can be adding a predefined value to the intra prediction mode. The predefined value can be a total number of angular intra prediction modes other than the wide-angle intra prediction mode (e.g., 65).
[0309] According to the embodiment, the intra prediction modes between 2 and 15 can be transformed into the wide-angle intra prediction modes between 67 and 80, respectively.
[0310] The intra prediction modes belonging to the transform range will be referred to as substitute wide-angle intra prediction modes.
[0311] The transform range can be determined based on a ratio of the current block. As an example, Table 4 and Table 5 represent the transform range when 35 intra prediction modes are defined other than the wide-angle intra prediction mode and when 67 intra prediction modes are defined, respectively.
[0312]
Table 4
[0313] Condition Alternative intra prediction mode W / H = 2 Modes 2, 3, 4 W / H > 2 Modes 2, 3, 4, 5, 6 W / H = 1 None H / W = 1 / 2 Modes 32, 33, 34 H / W <1 / 2 Modes 30, 31, 32, 33, 34
[0314] Table 5
[0315] Condition Alternative intra prediction mode W / H = 2 Modes 2, 3, 4, 5, 6, 7 W / H > 2 Modes 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 W / H = 1 None H / W = 1 / 2 Modes 61, 62, 63, 64, 65, 66 H / W <1 / 2 Modes 57, 58, 59, 60, 61, 62, 63, 64, 65, 66
[0316] As shown in Table 4 and Table 5, the number of alternative wide-angle intra prediction modes included in the transform range can be different according to the ratio of the current block.
[0317] The ratio of the current block can be further refined, and the transform range can be set as shown in Table 6 below.
[0318] Table 6
[0319] Condition Alternative intra prediction mode W / H = 16 Modes 12, 13, 14, 15 W / H = 8 Modes 12, 13 W / H = 4 Modes 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 H / W = 2 Modes 2, 3, 4, 5, 6, 7 H / W = 1 None W / H = 1 / 2 Modes 61, 62, 63, 64, 65, 66 W / H = 1 / 4 Modes 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 W / H = 1 / 8 Modes 55, 56 H / W = 1 / 16 Modes 53, 54, 55, 56
[0320] The non-adjacent reference sample line can be determined as the case where the reference sample line of the current block is determined, or the multi-reference line intra prediction where one of the plurality of reference sample lines is selected, can be set not to use the wide-angle intra prediction mode. That is, even in the case where the current block is non-square and the intra prediction mode of the current block belongs to the transform range, the intra prediction mode of the current block can not be transformed into the wide-angle intra prediction mode.
[0321] Alternatively, if the intra prediction mode of the current block is determined as the wide-angle intra prediction mode, it can be set not to use the non-adjacent reference sample line as the reference sample line of the current block, or not to use the multi-reference line intra prediction where one of the plurality of reference sample lines is selected. When the multi-reference line intra prediction is not used, the adjacent reference sample line can be determined as the reference sample line of the current block.
[0322] When the wide-angle intra prediction mode is not used, refW and refH can be set as the sum of nTbW and nTbH. Accordingly, the non-adjacent reference sample having a distance of i from the current block can include (nTbW + nTbH + offsetX[i]) upper end reference samples and (nTbW + nTbH + offsetY[i]) left side reference samples, in addition to the left side upper end reference sample. That is, the non-adjacent reference sample having a distance of i from the current block can include (2nTbW + 2nTbH + offsetX[i] + offsetY[i] + 1) reference samples. For example, in the case where the value of whRatio is greater than 1, the value of offsetX can be set to be greater than the value of offsetY. As one example, the value of offsetX can be set to 1, and the value of offsetY can be set to 0. In contrast, in the case where the value of whRatio is less than 1, the value of offsetY can be set to be greater than the value of offsetX. As one example, the value of offsetX can be set to 0, and the value of offsetY can be set to 1.
[0323] With the addition of the wide-angle intra prediction mode in the original intra prediction modes, the resources required for encoding the wide-angle intra prediction mode increase, and the encoding efficiency decreases. Therefore, instead of directly encoding the wide-angle intra prediction mode, the alternative intra prediction mode of the wide-angle intra prediction mode can be encoded, so as to improve the encoding efficiency.
[0324] As an example, if the current block is encoded by using the wide-angle intra prediction mode No. 67, the intra prediction mode No. 2, which is the alternative intra prediction mode of the wide-angle intra prediction mode No. 67, can be encoded as the intra prediction mode of the current block. In addition, if the current block is encoded by using the wide-angle intra prediction mode No. -1, the intra prediction mode No. 66, which is the alternative intra prediction mode of the wide-angle intra prediction mode No. -1, can be encoded as the intra prediction mode of the current block.
[0325] The decoder can decode the intra prediction mode of the current block, and determine whether the decoded intra prediction mode is included in the transform range. When the decoded intra prediction mode is the alternative intra prediction mode of the wide-angle intra prediction mode, the intra prediction mode can be transformed into the wide-angle intra prediction mode.
[0326] Alternatively, if the current block is encoded by using the wide-angle intra prediction mode, the wide-angle intra prediction mode can also be directly encoded.
[0327] The encoding of the intra prediction mode can be implemented based on the above-mentioned MPM list. Specifically, when the neighboring block is encoded by using the wide-angle intra prediction mode, the MPM can be set based on the alternative intra prediction mode of the wide-angle intra prediction mode corresponding to the wide-angle intra prediction mode. As an example, when the neighboring block is encoded by using the wide-angle intra prediction mode, the parameter candIntraPredModeX (X is A or B) can be set as the alternative intra prediction mode of the wide-angle intra prediction mode.
[0328] Alternatively, the MPM can also be set based on the wide-angle intra prediction mode of the neighboring block. As an example, when the neighboring block is encoded by using the wide-angle intra prediction mode, the parameter candIntraPredModeX can be set as the wide-angle intra prediction mode.
[0329] The MPM can also be obtained based on whether the reference sample line of the current block is a non-adjacent reference sample line or whether the multi-reference line intra prediction of selecting one from multiple reference sample lines is applied. As an example, if the reference sample line of the current block is a non-adjacent reference sample line, and the intra prediction mode of the neighboring block adjacent to the current block is a wide-angle intra prediction mode, the default mode can be set as the MPM of the current block.
[0330] As an example, when candIntraPredModeA derived based on the intra prediction mode of the left neighboring block is the same as candIntraPredModeB derived based on the intra prediction mode of the above neighboring block, and candIntraPredModeA is planner or DC, the MPM can be derived as follows according to whether the index of the reference sample line of the current block is 0.
[0331] MPM[0] = (IntraLumaRefLineIdx == 0)? Intra_Planar : INTRA_ANGULAR 50
[0332] MPM[1] = (IntraLumaRefLineIdx == 0)? Intra_DC : INTRA_ANGULAR 18
[0333] MPM[2] = INTRA_ANGULAR 2
[0334] That is, in the case where the index of the reference sample line of the current block is 0, the planner mode and the DC mode are set as the MPM, and conversely, in the case where the index of the reference sample line of the current block is not 0, the vertical direction intra prediction mode (INTRA_ANGULAR 50) and the horizontal direction intra prediction mode (INTRA_ANGULAR 18) can be set as the MPM.
[0335] If the index of the reference sample line of the current block is not 0, and candIntraPredModeA is the same as candIntraPredModeB or candIntraPredModeA is a wide-angle intra prediction mode, the MPM can be derived as follows.
[0336] MPM[0] = INTRA_ANGULAR 2
[0337] MPM[1] = INTRA_ANGULAR 18
[0338] MPM[2] = INTRA_ANGULAR 50
[0339] Alternatively, the MPM can also be derived as follows.
[0340] MPM[0] = INTRA_ANGULAR 50
[0341] MPM[1] = INTRA_ANGULAR 18
[0342] MPM[2] = INTRA_ANGULAR 2
[0343] That is, in a case where the index of the reference sample line of the current block is not 0, the wide-angle intra prediction mode can not be set as the MPM.
[0344] When candIntraPredModeA and candIntraPredModeB are the same, and candIntraPredModeA is an angular intra prediction mode, the MPMs can be derived as follows.
[0345] MPM[0] = candIntraPredModeA
[0346] MPM[1] = 2 + ((candIntraPredModeA + 61) % 64)
[0347] MPM[2] = 2 + ((candIntraPredModeA - 1) % 64)
[0348] If the index of the reference sample line of the current block is 0, and candIntraPredModeA and candIntraPredModeB are different, MPM[0] and MPM[1] can be set as candIntraPredModeA and candIntraPredModeB, respectively. MPM[2] can be set as the one of the planner, DC, and vertical modes that is different from MPM[0] and MPM[1].
[0349] If the index of the reference sample line of the current block is not 0, and one of candIntraPredModeA and candIntraPredModeB is the planner and the other is DC, the MPMs can be derived as follows.
[0350] MPM[0] = INTRA_ANGULAR2
[0351] MPM[1] = INTRA_ANGULAR18
[0352] MPM[2] = INTRA_ANGULAR50
[0353] If the index of the reference sample line of the current block is not 0, and both candIntraPredModeA and candIntraPredModeB are wide-angle intra prediction modes, the MPMs can be derived as follows.
[0354] MPM[0] = INTRA_ANGULAR2
[0355] MPM[1] = INTRA_ANGULAR18
[0356] MPM[2] = INTRA ANGULAR 50
[0357] If the index of the reference sample line of the current block is not 0, and one of candlntraPredModeA and candlntraPredModeB is the wide-angle intra prediction mode, the one of candlntraPredModeA and candlntraPredModeB that is not the wide-angle intra prediction mode can be set to MPM[0], and an intra prediction mode similar to MPM[0] can be set to MPM[1] and MPM[2]. As an example, when candlntraPredModeA is the non-wide-angle intra prediction mode, and candlntraPredModeB is the wide-angle intra prediction mode, the MPMs can be derived as follows.
[0358] MPM[0] = candlntraPredModeA
[0359] MPM[1] = 2 + ((candlntraPredModeA + 61) % 64)
[0360] MPM[2] = 2 + ((candlntraPredModeA - 1) % 64)
[0361] Conversely, when candlntraPredModeA is the wide-angle intra prediction mode, and candlntraPredModeB is the non-wide-angle intra prediction mode, the MPMs can be derived as follows.
[0362] MPM[0] = candlntraPredModeB
[0363] MPM[1] = 2 + ((candlntraPredModeB + 61) % 64)
[0364] MPM[2] = 2 + ((candlntraPredModeB - 1) % 64)
[0365] If the index of the reference sample line of the current block is not 0, and one of candIntraPredModeA and candIntraPredModeB is planner or DC and the other is a non-wide-angle intra prediction mode, candIntraPredModeA and candIntraPredModeB can be set as MPM[0] and MPM[1], respectively. One of the intra prediction modes similar to MPM[0] and MPM[1] can be set as MPM[2]. As an example, when candIntraPredModeA is a non-wide-angle intra prediction mode and candIntraPredModeB is planner or DC, MPMs can be derived as follows.
[0366] MPM[0] = candIntraPredModeA
[0367] MPM[1] = 2 + ((candIntraPredModeA + 61) % 64)
[0368] MPM[2] = 2 + ((candIntraPredModeA - 1) % 64)
[0369] On the contrary, when candIntraPredModeA is planner or DC and candIntraPredModeB is a non-wide-angle intra prediction mode, MPMs can be derived as follows.
[0370] MPM[0] = candIntraPredModeB
[0371] MPM[1] = 2 + ((candIntraPredModeB + 61) % 64)
[0372] MPM[2] = 2 + ((candIntraPredModeB - 1) % 64)
[0373] If the index of the reference sample line of the current block is not 0, and both candIntraPredModeA and candIntraPredModeB are non-wide-angle intra prediction modes, candIntraPredModeA and candIntraPredModeB can be set as MPM[0] and MPM[1], respectively. One of the vertical direction intra prediction mode (INTRA_ANGULAR50), horizontal direction intra prediction mode (INTRA_ANGULAR18), or left-bottom diagonal direction intra prediction mode (INTRA_ANGULAR2) that is not duplicated with MPM[0] and MPM[1] can be set as MPM[2].
[0374] The coding block or the transform block can be divided into a plurality of sub-blocks (or sub-partitions). When the coding block or the transform block is divided into a plurality of sub-blocks, prediction, transform and quantization can be performed for each sub-block. The case that the coding block or the transform block is divided into a plurality of sub-blocks can be defined as a sub-partition intra coding method.
[0375] The information indicating whether the sub-partition intra coding method is applied can be signaled through a bitstream. The information can be a 1-bit flag. As an example, a syntax element "intra_subpartitions_mode_flag" indicating whether the coding block or the transform block is divided into a plurality of sub-blocks can be signaled through a bitstream.
[0376] Alternatively, whether the sub-partition intra coding method is applied can be determined based on at least one of a size, a shape of the coding block or the transform block, or an intra prediction mode. As an example, in a case that the intra prediction mode of the coding block is a non-angular intra prediction mode (e.g., planar or DC) or a pre-defined angular intra prediction mode (e.g., a horizontal direction intra prediction mode, a vertical direction intra prediction mode, or a diagonal direction intra prediction mode), the sub-partition intra coding method can not be applied. Alternatively, when the size of the coding block is less than a threshold, the sub-partition intra coding method can be set not to be used.
[0377] Alternatively, when the intra prediction of the sub-block is performed based on the intra prediction mode of the coding block, whether the sub-partition intra coding method is applied can be determined based on whether a reconstructed sample included in a neighboring sub-block needs to be used as a reference sample in the intra prediction of the sub-block. As an example, in a case that the intra prediction mode of the coding block is a diagonal direction intra prediction mode or a wide angle intra prediction mode, when the intra prediction of the sub-block is performed based on the intra prediction mode, in a case that the neighboring sub-block cannot be used as the reference sample, the sub-partition intra coding method can be set not to be used.
[0378] Alternatively, when a ratio of a height and a width of the coding block is above or below a threshold, the sub-partition intra coding method can be set not to be used. Alternatively, when at least one of the height or the width of the coding block is below a threshold, the sub-partition intra coding method can not be used. As an example, when both the height and the width of the coding block are below a threshold, the sub-partition intra coding method can not be used. The threshold can have a pre-defined value in an encoder and a decoder. Alternatively, information for determining the threshold can be signaled through a bitstream.
[0379] Alternatively, the indication of whether the sub-partition intra coding method is applied or not can be signaled according to at least one of the size, shape of the coding block or transform block, or the intra prediction mode. As an example, the indication of whether the sub-partition intra coding method is applied or not can be coded and signaled only in the case that both the height and the width of the coding block are below a threshold and / or the size of the coding block is above a threshold. When the indication of whether the sub-partition intra coding method is applied or not is not coded, the sub-partition intra coding method can not be applied.
[0380] When the sub-partition intra coding method is applied, the partition shape of the coding block or transform block can be determined. The partition shape indicates the partition direction of the coding block or transform block. As an example, the vertical partition means that the coding block or transform block is partitioned by at least one vertical line, and the horizontal partition means that the coding block or transform block is partitioned by at least one horizontal line.
[0381] Figure 16 Fig. 1 is a schematic diagram of an example of the vertical partition and the horizontal partition.
[0382] Figure 16 Fig. 1(a) shows an example that the coding block is partitioned into 2 sub-blocks, Figure 16 Fig. 1(b) shows an example that the coding block is partitioned into 4 sub-blocks.
[0383] The information for determining the partition shape of the coding block and transform block can be signaled through the bitstream. As an example, the information indicating whether the coding block or transform block is partitioned in the vertical direction or in the horizontal direction can be signaled through the bitstream. The information can be an indication intra_subpart_type_flag of 1 bit. When the value of the indication is 1, it indicates that the coding block or transform block is partitioned in the horizontal direction, and when the value of the indication is 0, it indicates that the coding block or transform block is partitioned in the vertical direction.
[0384] Alternatively, the partition shape of the coding block or transform block can be determined based on the size, shape of the coding block or transform block, or the intra prediction mode. As an example, the partition shape of the coding block can be determined based on the width-to-height ratio of the coding block. For example, when the value of the whRatio indicating the width-to-height ratio of the coding block is above a first threshold, the vertical partition can be applied to the coding block. Otherwise, the horizontal partition can be applied to the coding block.
[0385] Figure 17 Fig. 2 is a schematic diagram of an example of determining the partition shape of the coding block.
[0386] For ease of illustration, the first threshold is assumed to be 2. In the case that the width-to-height ratio of the coding block is below the first threshold, the horizontal partition can be applied to the coding block. Figure 17In the example shown in (a) of FIG. 10, the whRatio of the coding block is 1, which is less than the first threshold. Thus, the encoding of the information representative of the coding block partition shape can be skipped, and a horizontal direction partition is applied to the coding block.
[0387] In Figure 17 In the example shown in (b) of FIG. 10, the whRatio of the coding block is 2, which is the same as the first threshold. Thus, the encoding of the information representative of the coding block partition shape can be skipped, and a vertical direction partition is applied to the coding block.
[0388] The partition shape of the coding block can also be determined with a second threshold having a sign opposite to the first threshold. As an example, a horizontal direction partition can be applied to the coding block when the value of the whRatio is below the second threshold, otherwise, a vertical direction partition can be applied to the coding block. The absolute values of the first threshold and the second threshold can be the same, and their signs can be different. As an example, when the first threshold is N (where N is an integer of 1, 2, 4, etc.), the second threshold can be -N.
[0389] Figure 18 FIG. 11 is a schematic diagram of examples of determining the partition shape of a coding block.
[0390] For ease of illustration, the second threshold is assumed to be -2. In Figure 18 In the example shown in (a) of FIG. 11, the whRatio of the coding block is -1, which is greater than the second threshold. Thus, the encoding of the information representative of the coding block partition shape can be skipped, and a vertical direction partition is applied to the coding block.
[0391] In Figure 18 In the example shown in (b) of FIG. 11, the whRatio of the coding block is -2, which is the same as the second threshold. Thus, the encoding of the information representative of the coding block partition shape can be skipped, and a horizontal direction partition is applied to the coding block.
[0392] Alternatively, the partition shape of the coding block can also be determined with reference to the first threshold and the second threshold. As an example, a horizontal direction partition can be applied to the coding block when the value of the whRatio is above the first threshold, and a vertical direction partition can be applied to the coding block when the value of the whRatio is below the second threshold. When the value of the whRatio is between the first threshold and the second threshold, the information representative of the partition shape of the current block can be parsed from the bitstream.
[0393] The first threshold and the second threshold can be predefined in the encoder and the decoder. Alternatively, the first threshold and the second threshold can be defined per sequence, per picture, or per slice.
[0394] Alternatively, the partition shape can be determined based on the size of the coding block or the transform block. As an example, when the size of the coding block is N x n, vertical direction partition can be applied, and when the size of the coding block is n x N, horizontal direction partition can be applied. Wherein, n can be a natural number smaller than N. N and / or n can be a value predefined in the encoder and the decoder. Alternatively, information for determining N and / or n can be signaled through the bitstream. As an example, N can be 32, 64, 128, or 256, etc. Thus, in the case that the size of the coding block is 128 x n (wherein n is a natural number of 16, 32, or 64, etc.), vertical direction partition can be applied, and in the case that the size of the coding block is n x 128, horizontal direction partition can be applied.
[0395] Alternatively, the partition shape of the coding block or the transform block can be determined based on the intra prediction mode of the coding block or the transform block. As an example, when the intra prediction mode of the coding block is horizontal direction or a direction similar to the horizontal direction, vertical direction partition can be applied to the coding block. Wherein, the intra prediction mode of the direction similar to the horizontal direction means the intra prediction mode whose index difference with the intra prediction mode of the horizontal direction (e.g., INTRA_ANGULAR 18) shown in (b) of FIG. 1A is below a threshold value (e.g., INTRA_ANGULAR 18 ± N). Conversely, when the intra prediction mode of the coding block is vertical direction or a direction similar to the vertical direction, horizontal direction partition can be applied to the coding block. Wherein, the intra prediction mode of the direction similar to the vertical direction means the intra prediction mode whose index difference with the intra prediction mode of the vertical direction (e.g., INTRA_ANGULAR 50) shown in (b) of FIG. 1A is below a threshold value (e.g., INTRA_ANGULAR 50 ± N). Figure 10 Figure 10 Alternatively, the partition shape of the coding block or the transform block can be determined based on the intra prediction mode of the coding block or the transform block. As an example, when the intra prediction mode of the coding block is horizontal direction or a direction similar to the horizontal direction, vertical direction partition can be applied to the coding block. Wherein, the intra prediction mode of the direction similar to the horizontal direction means the intra prediction mode whose index difference with the intra prediction mode of the horizontal direction (e.g., INTRA_ANGULAR 18) shown in (b) of FIG. 1A is below a threshold value (e.g., INTRA_ANGULAR 18 ± N). Conversely, when the intra prediction mode of the coding block is vertical direction or a direction similar to the vertical direction, horizontal direction partition can be applied to the coding block. Wherein, the intra prediction mode of the direction similar to the vertical direction means the intra prediction mode whose index difference with the intra prediction mode of the vertical direction (e.g., INTRA_ANGULAR 50) shown in (b) of FIG. 1A is below a threshold value (e.g., INTRA_ANGULAR 50 ± N).
[0396] Figure 19 FIG. 1B is a schematic diagram of an example of determining the partition shape of the coding block based on the intra prediction mode of the coding block.
[0397] As shown in (a) of FIG. 1A, when the intra prediction mode of the coding block is a direction similar to the vertical direction, horizontal direction partition can be applied to the coding block. Figure 19 Conversely, as shown in (b) of FIG. 1A, when the intra prediction mode of the coding block is a direction similar to the horizontal direction, vertical direction partition can be applied to the coding block.
[0398] Figure 19 Conversely, as shown in (b) of FIG. 1A, when the intra prediction mode of the coding block is a direction similar to the horizontal direction, vertical direction partition can be applied to the coding block.
[0399] Conversely to the example shown, horizontal partitioning can be applied when the intra-prediction mode of the coded block is horizontal or a similar direction, and vertical partitioning can be applied when the intra-prediction mode of the coded block is vertical or a similar direction.
[0400] When applying vertical or horizontal partitioning, the partitioning shape of the coded block or transform block can be determined based on whether at least one of the width or height of the sub-blocks generated by partitioning the coded block or transform block is less than a threshold. The threshold can be an integer such as 2, 4, or 8.
[0401] Figure 20 This is a schematic diagram used to illustrate the shape of the coded block division.
[0402] When on Figure 20 When a 4×8 coded block as shown in (a) is divided horizontally, it is divided into 2×8 sub-blocks. In this case, the width of the sub-blocks is less than a threshold, therefore horizontal division cannot be used for the coded block. Conversely, when a 4×8 coded block is divided vertically, it is divided into 4×4 sub-blocks. The width and height of the sub-blocks are both above the threshold, therefore vertical division can be used for the coded block. Since only vertical division can be used for the coded block, the encoding of information representing the division shape of the coded block can be skipped, and vertical division can be applied to the coded block.
[0403] When on Figure 20 When the 8×4 coded block shown in (b) is vertically divided, it is divided into 8×2 sub-blocks. In this case, the height of the sub-blocks is less than a threshold, therefore, vertical division cannot be used for the coded block. Conversely, when the 8×4 coded block is horizontally divided, it is divided into 4×4 sub-blocks. The width and height of the sub-blocks are both above the threshold, therefore, horizontal division can be used for the coded block. Since only horizontal division is possible for the coded block, the encoding of information representing the division shape of the coded block can be skipped, and vertical division can be applied to the coded block.
[0404] When both vertical and horizontal divisions are available, the information representing the division shape of the coding block can be parsed to determine the division shape of the coding block.
[0405] The number of sub-blocks can be determined based on at least one of a size or a shape of the coding block or the transform block. As an example, when one of a width or a height of the coding block is 8 and the other is 4, the coding block can be divided into 2 sub-blocks. In contrast, when both the width and the height of the coding block are 8 or more or one of the width or the height of the coding block is greater than 8, the coding block can be divided into 4 sub-blocks. In short, in a case where the coding block is of a size of 4x4, the coding block can not be divided into sub-blocks. In a case where the coding block is of a size of 4x8 or 8x4, the coding block can be divided into 2 sub-blocks. In other cases, the coding block can be divided into 4 sub-blocks.
[0406] Alternatively, information indicating a size, a shape, or a number of sub-blocks can be signaled through a bitstream. Based on the information indicating the number of sub-blocks, the size or the shape of the sub-blocks can be determined. Alternatively, based on the information indicating the size or the shape of the sub-blocks, the number of sub-blocks can be determined.
[0407] When the sub-partition intra coding method is applied, the sub-blocks generated by dividing the coding block or the transform block can use the same intra prediction mode. As an example, based on an intra prediction mode of a neighboring block adjacent to the coding block, an MPM for the coding block can be derived, and based on the derived MPM, an intra prediction mode for the coding block can be determined. If the intra prediction mode for the coding block is determined, each of the sub-blocks can perform intra prediction using the determined intra prediction mode.
[0408] When the sub-partition intra coding method is applied, one of the MPMs can be determined as the intra prediction mode for the coding block. That is, when the sub-partition intra coding method is applied, even if the MPM flag is not signaled, it can be considered that the MPM flag is true.
[0409] Alternatively, when the sub-partition intra coding method is applied, one of pre-defined candidate intra prediction modes can be determined as the intra prediction mode for the coding block. As an example, one of a horizontal direction intra prediction mode, a vertical direction intra prediction mode, a diagonal direction intra prediction mode (e.g., at least one of a top-left, a top-right, or a bottom-left intra prediction mode), or a non-angular intra prediction mode (e.g., at least one of planner or DC) can be determined as the intra prediction mode for the coding block. Specific index information for the one of the pre-defined candidate intra prediction modes can be signaled through a bitstream.
[0410] According to an embodiment of the present application, at least one of the intra prediction modes of the sub-blocks can be set differently from the other sub-blocks. As an example, the intra prediction mode of the Nth sub-block can be obtained by adding or subtracting an offset to or from the intra prediction mode of the (N-1)th sub-block. The offset can be predefined in the encoder and the decoder. Alternatively, the offset can be obtained based on at least one of the size, shape, intra prediction mode of the coding block, the size, shape, number of sub-blocks, or the partition direction of the coding block. Alternatively, information for obtaining the offset can be signaled through the bitstream.
[0411] Alternatively, in the case that the intra prediction mode of the (N-1)th sub-block is a non-angular mode, the intra prediction mode of the Nth sub-block can also be set the same as the intra prediction mode of the (N-1)th sub-block, and in the case that the intra prediction mode of the (N-1)th sub-block is an angular mode, the intra prediction mode of the Nth sub-block can be obtained by adding or subtracting an offset to or from the intra prediction mode of the (N-1)th sub-block, so that the obtained intra prediction mode is the same as the intra prediction mode of the Nth sub-block.
[0412] Alternatively, the angular intra prediction mode can be applied to some of the sub-blocks and the non-angular intra prediction mode can be applied to the remaining sub-blocks. The sub-blocks to which the non-angular intra prediction mode is applied can be determined according to at least one of the size, shape, position of the sub-blocks, or the number of sub-blocks. Alternatively, the non-angular intra prediction mode can be applied only when the angular intra prediction mode applied to one of the sub-blocks is a predefined value.
[0413] Alternatively, the intra prediction mode of each sub-block can be obtained from the MPM. To this end, specific index information for one of the MPMs can be signaled for each sub-block.
[0414] Alternatively, the intra prediction mode of each sub-block can be obtained from the predefined candidate intra prediction modes. To this end, specific index information for one of the predefined candidate intra prediction modes can be signaled for each sub-block.
[0415] Alternatively, information indicating whether the intra prediction modes of the sub-blocks are set the same or not can be signaled through the bitstream.
[0416] The quantization parameters of the sub-blocks can be determined individually. Thus, the values of the quantization parameters of the sub-blocks can be set differently. To determine the quantization parameters of the sub-blocks, information indicating the difference from the quantization parameter of the previous sub-block can be coded. As an example, for the Nth sub-block, the difference between the quantization parameter of the Nth sub-block and the quantization parameter of the (N-1)th sub-block can be coded.
[0417] The intra prediction of a sub-block can be performed using reference samples. In this case, the reference samples can be derived from the reconstructed samples of neighboring blocks adjacent to the sub-block. When the neighboring blocks adjacent to the sub-block are other sub-blocks included in the same coding block as the sub-block, the reference samples of the sub-block can be derived based on the reconstructed samples of the other sub-blocks. As an example, when a first sub-block is located at the left side or the top end of a second sub-block, the reference samples of the second sub-block can be derived from the reconstructed samples of the first sub-block. To this end, the side-by-side intra prediction can not be applied among the sub-blocks. That is, the sub-blocks included in a coding block can be sequentially encoded or decoded. Thus, the intra prediction of the second sub-block can be performed after the encoding or decoding of the first sub-block is completed.
[0418] In the case of applying the sub-partition intra coding method, the multi-reference line intra prediction using the index information for specifying one of the multiple reference sample line candidates can be set not to be used. In the case of not using the multi-reference line intra prediction, the neighboring reference sample lines adjacent to each sub-block can be determined as the reference sample lines of each sub-block.
[0419] Alternatively, even in the case of applying the sub-partition intra coding method, the multi-reference line intra prediction can be used. To this end, the index information for specifying the reference sample lines can be signaled for each sub-block. Alternatively, the index information for specifying the reference sample lines can be signaled only for one of the multiple sub-blocks, and the index information can be directly applied to the remaining sub-blocks. Alternatively, the index information for specifying the reference sample lines for a coding block including multiple sub-blocks sharing the index information can be set to be signaled.
[0420] Alternatively, it can be set that only the sub-blocks including a pre-defined position or a pre-defined partition index among the sub-blocks use the multi-reference line intra prediction. As an example, the index information for specifying one of the reference sample line candidates can be signaled only for the sub-blocks having a partition index of 0 or the sub-blocks bordering the top or left boundary of the coding block among the multiple sub-blocks. The multi-reference line intra prediction can not be applied to the other sub-blocks. Thus, the other sub-blocks can perform the intra prediction using the neighboring reference sample lines.
[0421] The prediction coding mode can be set differently according to the sub-blocks. As an example, the intra prediction can be applied to some of the sub-blocks, and the inter prediction, the current reference picture or the compound prediction can be applied to the other sub-blocks.
[0422] Figure 21 FIG. 1 is a schematic diagram of an example of setting the prediction coding mode differently according to the sub-blocks.
[0423] The intra prediction mode can be set differently according to the sub-blocks, or the prediction coding mode can be set differently. As an example, in the case of applying the sub-partition intra coding method, the intra prediction mode can be set differently according to the sub-blocks. As an example, the intra prediction mode can be set to be the same for all the sub-blocks included in a coding block, or the intra prediction mode can be set differently for each sub-block. Figure 21In the illustrated example, the case where intra prediction is applied to subblock 0 and subblock 1, and current reference picture is applied to subblock 1 and subblock 2 is illustrated.
[0424] When the current reference picture is utilized, the prediction block of a subblock can be derived from the decoded region of the current picture or slice (or tile group). When the current reference picture is applied, a motion vector can be derived for the prediction block of a subblock. The motion vector under the current reference picture can also be referred to as a "block vector".
[0425] The motion vector can be derived based on the motion vector of a neighboring block adjacent to the coding block or subblock. Alternatively, information for determining the motion vector can also be signaled through the bitstream.
[0426] At this time, the maximum value of the motion vector of a subblock can be determined according to the size of the coding block or transform block to which the subblock belongs. As one example, the motion vector of a subblock can be set not to exceed the boundary of the coding block or transform block to which the subblock belongs. That is, the prediction block of a subblock can be derived from the region of the coding block within which the subblock has been previously coded or decoded.
[0427] Instead of the motion vector, index information indicating one of the decoded subblocks within the coding block can be coded and signaled. The prediction block of a subblock can be determined as the decoded subblock specified according to the index information.
[0428] As another example, the motion vector of a subblock can also be allowed to exceed the boundary of the coding block or transform block to which the subblock belongs.
[0429] If the prediction block is generated as a result of performing intra prediction, the prediction samples included in the prediction block can be updated based on the respective positions of the prediction samples. This updating method can be referred to as a position dependent intra weighting prediction combination (PDPC) method.
[0430] Whether to use the PDPC can be determined according to the size, shape, intra prediction mode of the current block, reference sample line of the current block, size of the current block, or chroma component. As an example, the PDPC can be used if the intra prediction mode of the current block is at least one of planner, DC, vertical, horizontal, mode with index value less than vertical, or mode with index value greater than horizontal. Alternatively, the PDPC can be used only if at least one of the width or height of the current block is greater than 4. Alternatively, the PDPC can be used only if the index of the reference picture line of the current block is 0. Alternatively, the PDPC can be used only if the index of the reference picture line of the current block is greater than or equal to a predetermined value. Alternatively, the PDPC can be used only for the luma component. Alternatively, whether to use the PDPC can be determined according to whether two or more of the enumerated conditions are satisfied.
[0431] Alternatively, whether to use the PDPC can be determined according to whether the sub-partition intra coding method is used. As an example, when the sub-partition intra coding method is applied to the coding block or the transform block, the PDPC can be set not to be used. Alternatively, when the sub-partition intra coding method is applied to the coding block or the transform block, the PDPC can be applied to at least one of the sub-blocks. In this case, the sub-block to which the PDPC is applied can be determined based on at least one of the size, shape, position, intra prediction mode, or reference sample line index of the coding block or the sub-block. As an example, the PDPC can be applied to the sub-block adjacent to the upper and / or left boundary of the coding block or the sub-block adjacent to the lower and / or right boundary of the coding block. Alternatively, it can be set that the PDPC is applied to all of the sub-blocks included in the coding block based on the size or shape of the sub-block or the PDPC is not applied to all of the sub-blocks included in the coding block. As still another example, the PDPC can be applied to all of the sub-blocks in the coding block.
[0432] Alternatively, whether to apply the PDPC to the sub-blocks generated by partitioning the coding block or the transform block can be determined according to whether at least one of the size, shape, intra prediction mode, or reference picture index of the sub-block satisfies a set condition. As an example, the PDPC can be applied to the sub-block if at least one of the width or height of the sub-block is greater than 4.
[0433] As another example, information indicating whether to apply the PDPC can be delivered through a bitstream.
[0434] Alternatively, the region to which the PDPC is applied can be determined based on at least one of a size, a shape, an intra prediction mode of the current block, or a position of the prediction sample. As an example, if the intra prediction mode of the current block has an index greater than a vertical direction, the prediction sample having at least one of an x-axis coordinate or a y-axis coordinate greater than a threshold value can not be compensated, and the compensation operation can be performed only on the prediction sample having the x-axis coordinate or the y-axis coordinate less than the threshold value. Alternatively, if the intra prediction mode of the current block has an index less than a horizontal direction, the prediction sample having at least one of the x-axis coordinate or the y-axis coordinate greater than the threshold value can not be compensated, and the compensation operation can be performed only on the prediction sample having the x-axis coordinate or the y-axis coordinate less than the threshold value. At this time, the threshold value can be determined based on at least one of the size, the shape, or the intra prediction mode of the current block.
[0435] If the prediction sample is obtained through the intra prediction sample, a reference sample utilized for compensating the prediction sample can be determined based on a position of the obtained prediction sample. For convenience of explanation, in the embodiments described later, the reference sample utilized for compensating the prediction sample can be referred to as a PDPC reference sample. Also, the prediction sample obtained through the intra prediction can be referred to as a first prediction sample, and the prediction sample obtained by compensating the first prediction sample can be referred to as a second prediction sample.
[0436] Figure 22 is an illustration of an application shape of the PDPC.
[0437] The first prediction sample can be compensated using at least one PDPC reference sample. The PDPC reference sample can include at least one of a reference sample adjacent to a left upper corner of the current block, an upper reference sample located at an upper end of the current block, or a left reference sample located at a left side of the current block.
[0438] At least one of the reference samples belonging to the reference sample line of the current block can be set as the PDPC reference sample. Alternatively, at least one of the reference samples belonging to the reference sample line having an index of 0 can be set as the PDPC reference sample regardless of the reference sample line of the current block. As an example, even if the first prediction sample is obtained using the reference sample included in the reference sample line having an index of 1 or an index of 2, the second prediction sample can be obtained using the reference sample included in the reference sample line having an index of 0.
[0439] The number or the position of the PDPC reference sample utilized for compensating the first prediction sample can be determined according to at least one of an intra prediction mode of the current block, a size of the current block, a shape of the current block, or a position of the first prediction sample.
[0440] As an example, if the intra prediction mode of the current block is planner or DC mode, the second prediction sample can be obtained using the top reference sample and the left reference sample. At this time, the top reference sample can be a reference sample vertically adjacent to the first prediction sample (e.g., a reference sample having the same x coordinate as the first prediction sample), and the left reference sample can be a reference sample horizontally adjacent to the first prediction sample (e.g., a reference sample having the same y coordinate as the first prediction sample).
[0441] If the intra prediction mode of the current block is a horizontal direction intra prediction mode, the second prediction sample can be obtained using the top reference sample. At this time, the top reference sample can be a reference sample vertically adjacent to the first prediction sample.
[0442] If the intra prediction mode of the current block is a vertical direction intra prediction mode, the second prediction sample can be obtained using the left reference sample. At this time, the left reference sample can be a reference sample horizontally adjacent to the first prediction sample.
[0443] If the intra prediction mode of the current block is a left-top diagonal or right-top diagonal intra prediction mode, the second prediction sample can be obtained based on a left-top reference sample, a top reference sample, and a left reference sample. The left-top reference sample can be a reference sample adjacent to a left-top corner of the current block (e.g., a reference sample at a (-1, -1) position). The top reference sample can be a reference sample located in a right-top diagonal direction of the first prediction sample, and the left reference sample can be a reference sample located in a left-bottom diagonal direction of the first prediction sample.
[0444] In short, when the position of the first prediction sample is (x, y), R(-1, -1) can be set as the left-top reference sample, and R(x+y+1, -1) or R(x, -1) can be set as the top reference sample. In addition, R(-1, x+y+1) or R(-1, y) can be set as the left reference sample.
[0445] As another example, the position of the left reference sample or the top reference sample can be determined according to at least one of a shape of the current block or whether a wide-angle intra mode is applied.
[0446] Specifically, if the intra prediction mode of the current block is a wide-angle intra prediction mode, a reference sample located at an offset from a reference sample diagonally adjacent to the first prediction sample can be set as a PDPC reference sample. As an example, the top reference sample R(x+y+k+1, -1) and the left reference sample R(-1, x+y-k+1) can be set as the PDPC reference sample.
[0447] At this time, the offset k can be determined based on the wide-angle intra prediction mode. Equations 8 and 9 show examples of obtaining the offset k based on the wide-angle intra prediction mode.
[0448] [Equation 8]
[0449] k = CurrIntraMode - 66
[0450] if (CurrIntraMode > 66)
[0451] [Equation 9]
[0452] k = -CurrIntraMode
[0453] if (CurrIntraMode < 0)
[0454] The second prediction sample can be determined based on a weighted sum operation between the first prediction sample and the PDPC reference sample. As one example, the second prediction sample can be obtained based on Equation 10 as follows.
[0455] [Equation 10]
[0456] pred(x, y) = (xL * R L + wT * R T - wTL * R TL + (64 - wL - wT + wTL) * pred(x, y) + 32) » 6
[0457] In the Equation 10, R L denotes the left reference sample, R T denotes the top reference sample, and R TL denotes the left-top reference sample. pred(x, y) denotes the prediction sample at the (x, y) position. wL denotes the weighting value of the left reference sample, wT denotes the weighting value of the top reference sample, and wTL denotes the weighting value of the left-top reference sample. The weighting value of the first prediction sample can be obtained by subtracting the weighting value of the reference sample from the maximum value. For convenience of explanation, the weighting value assigned to the PDPC reference sample is referred to as the PDPC weighting value.
[0458] The weighting value assigned to each reference sample can be determined based on at least one of the intra prediction mode of the current block or the position of the first prediction sample.
[0459] As one example, at least one of wL, wT, or wTL can be in a proportional or inverse relationship with at least one of the x-axis coordinate value or the y-axis coordinate value of the prediction sample. Alternatively, at least one of wL, wT, or wTL can be in a proportional or inverse relationship with at least one of the width or the height of the current block.
[0460] If the intra prediction mode of the current block is DC, the PDPC weighting value can be determined as shown in Equation 11 below.
[0461] [Equation 11]
[0462] wT = 32 » ((y « 1) » shift)
[0463] wL = 32 » ((x « 1) » shift)
[0464] wTL = (wL » 4) + (wT » 4)
[0465] In Equation 11, x and y denote the positions of the first prediction samples.
[0466] In Equation 11, the parameter shift utilized in the bit shift operation can be derived based on the width or height of the current block. As an example, the parameter shift can be derived based on Equation 12 or Equation 13 below.
[0467] [Equation 12]
[0468] shift = (log2(width) - 2 + log2(height) - 2 + 2) » 2
[0469] [Equation 13]
[0470] shift = ((Log2(nTbW) + Log2(nTbH) - 2) » 2)
[0471] Alternatively, the parameter shift can also be derived based on the intra direction parameter of the current block.
[0472] The number or type of parameters utilized to derive the parameter shift can vary depending on the intra prediction mode of the current block. As an example, if the intra prediction mode of the current block is planner, DC, vertical, or horizontal, the parameter shift can be derived using the width and height of the current block as shown in Equation 12 or Equation 13. If the intra prediction mode of the current block is an intra prediction mode having a greater index than the vertical intra prediction mode, the parameter shift can be derived using the height of the current block and the intra direction parameter. If the intra prediction mode of the current block is an intra prediction mode having a smaller index than the horizontal intra prediction mode, the parameter shift can be derived using the width of the current block and the intra direction parameter.
[0473] If the intra prediction mode of the current block is planner, the value of wTL can be set to 0. wL and wT can be derived based on Equation 14 below.
[0474] [Equation 14]
[0475] wT[y] = 32 » ((y « 1) » shift)
[0476] wL[x] = 32 » ((x « 1) » shift)
[0477] In a case where the intra prediction mode of the current block is the horizontal direction intra prediction mode, wT can be set to 0, and wTL and wL are set identically. In contrast, in a case where the intra prediction mode of the current block is the vertical direction intra prediction mode, wL can be set to 0, and wTL and wT are set identically.
[0478] If the intra prediction mode of the current block is the intra prediction mode having a larger index value than the vertical direction intra prediction mode and oriented to the right upper end direction, the PDPC weighting value can be obtained as shown in Equation 15 below.
[0479] [Equation 15]
[0480] wT = 16 » ((y « 1) » shift)
[0481] wL = 16 » ((x « 1) » shift)
[0482] wTL = 0
[0483] In contrast, if the intra prediction mode of the current block is the intra prediction mode having a smaller index value than the horizontal direction intra prediction mode and oriented to the left lower end direction, the PDPC weighting value can be obtained as shown in Equation 16 below.
[0484] [Equation 16]
[0485] wT = 16 » ((y « 1) » shift)
[0486] wL = 16 » ((x « 1) » shift)
[0487] wTL = 0
[0488] As shown in the above embodiments, the PDPC weighting value can be determined based on the positions x and y of the prediction samples.
[0489] As another example, the weighting values respectively assigned to the PDPC reference samples can also be determined in a sub-block unit. The prediction samples included in a sub-block can share the same PDPC weighting value.
[0490] The sub-block size as the basic unit of determining the weighting value can be predefined in the encoder and the decoder. As one example, the weighting value can be determined for a sub-block of a 2x2 size or a 4x4 size, respectively.
[0491] Alternatively, the size, shape, or number of sub-blocks can be determined according to the size or shape of the current block. As an example, the coding block can be divided into 4 sub-blocks regardless of the size of the coding block. Alternatively, the coding block can be divided into 4 or 16 sub-blocks according to the size of the coding block.
[0492] Alternatively, the size, shape, or number of sub-blocks can also be determined based on the intra prediction mode of the current block. As an example, in case that the intra prediction mode of the current block is horizontal direction, N columns (or N rows) can be set as one sub-block, and vice versa, in case that the intra prediction mode of the current block is vertical direction, N rows (or N columns) can be set as one sub-block.
[0493] Equations 17 to 19 show examples of determining the PDPC weighting values for 2x2 size sub-blocks. Equation 17 gives an example of the case that the intra prediction mode of the current block is DC mode.
[0494] [Equation 17]
[0495] wT = 32 » (((y « log2K) » log2K) « 1) » shift
[0496] wL = 32 » (((x « log2K) » log2K) « 1) » shift
[0497] wTL = (wL » 4) + (wT » 4)
[0498] In the equation 17, the value of K can be determined based on the size of the sub-block.
[0499] Equation 18 gives an example of the case that the intra prediction mode of the current block is the intra prediction mode having a larger index value than the vertical direction intra prediction mode and is toward the right upper end direction.
[0500] [Equation 18]
[0501] wT = 16 » (((y « log2K) » log2K) « 1) » shift
[0502] wL = 16 » (((x « log2K) » log2K) « 1) » shift
[0503] wTL = 0
[0504] Equation 19 gives an example of the case that the intra prediction mode of the current block is the intra prediction mode having a smaller index value than the horizontal direction intra prediction mode and is toward the left lower end direction.
[0505] [Equation 19]
[0506] wT = 16 » ( ( ( y « log2K ) » log2K ) « 1 ) » shift)
[0507] wL = 16 » ( ( ( x « log2K ) » log2K ) « 1 ) » shift)
[0508] wTL = 0
[0509] In Equations 17 to 19, x and y represent the positions of the reference sample within the sub-block. The reference sample can be one of the sample located on the left upper end of the sub-block, the sample located in the center of the sub-block, or the sample located on the right lower end of the sub-block.
[0510] Equations 20 to 22 show an example of determining the PDPC weighting values for a 4x4 size sub-block. Equation 20 gives an example of the case where the intra prediction mode of the current block is the DC mode.
[0511] [Equation 20]
[0512] wT = 32 » ( ( ( y « 2 ) » 2 ) « 1 ) » shift)
[0513] wL = 32 » ( ( ( x « 2 ) » 2 ) « 1 ) » shift)
[0514] wTL = ( wL » 4 ) + ( wT » 4 )
[0515] Equation 21 exemplifies the case where the intra prediction mode of the current block is the intra prediction mode having a larger index value than the vertical direction intra prediction mode and is oriented in the right upper end direction.
[0516] [Equation 21]
[0517] wT = 16 » ( ( ( y « 2 ) » 2 ) « 1 ) » shift)
[0518] wL = 16 » ( ( ( x « 2 ) » 2 ) « 1 ) » shift)
[0519] wTL = 0
[0520] Equation 22 exemplifies the case where the intra prediction mode of the current block is the intra prediction mode having a smaller index value than the horizontal direction intra prediction mode and is oriented in the left lower end direction.
[0521] [Equation 22]
[0522] wT = 16 » ( ( ( y « 2 ) » 2 ) « 1 ) » shift)
[0523] wL = 16 » (((x « 2) » 2) « 1) » shift
[0524] wTL = 0
[0525] In the above embodiments, the case of determining the PDPC weighting value according to the position of the first prediction sample or the prediction sample contained in the sub-block is explained. The PDPC weighting value can also be determined according to the shape of the current block.
[0526] As an example, if it is the DC mode, the method of obtaining the PDPC weighting value will be different according to whether the current block is a non-square with the width greater than the height or a non-square with the height greater than the width.
[0527] Formula 23 is an example of obtaining the PDPC weighting value when the current block is a non-square with the width greater than the height, and formula 24 is an example of obtaining the PDPC weighting value when the current block is a non-square with the height greater than the width.
[0528] [Formula 23]
[0529] wT = 32 » ((y « 1) » shift)
[0530] wL = 32 » (x » shift)
[0531] wTL = (wL » 4) + (wT » 4)
[0532] [Formula 24]
[0533] wT = 32 » ((y « 1) » shift)
[0534] wL = 32 » ((x « 1) » shift)
[0535] wTL = (wL » 4) + (wT » 4)
[0536] If the current block is a non-square, the wide-angle intra prediction mode can be used to predict the current block. In the case of applying the wide-angle intra prediction mode, PDPC can also be applied to update the first prediction sample.
[0537] When the wide-angle intra prediction is applied to the current block, the PDPC weighting value can be determined according to the shape of the coding block.
[0538] As an example, if the current block is a non-square block with a width greater than a height, according to the position of the first prediction sample, the situation that the top reference sample located at the top right end of the first prediction sample is closer to the first prediction sample than the left reference sample located at the bottom left end of the first prediction sample can occur. Therefore, in terms of the first prediction sample compensation, the weighting value applied to the top reference sample can be set to be greater than the weighting value applied to the left reference sample.
[0539] On the contrary, if the current block is a non-square block with a height greater than a width, according to the position of the first prediction sample, the situation that the left reference sample located at the bottom left end of the first prediction sample is closer to the first prediction sample than the top reference sample located at the top right end of the first prediction sample can occur. Therefore, in terms of the first prediction sample compensation, the weighting value applied to the left reference sample can be set to be greater than the weighting value applied to the top reference sample.
[0540] Equation 25 shows an example of obtaining the PDPC weighting value when the intra prediction mode of the current block is a wide-angle intra prediction mode with an index greater than 66.
[0541] [Equation 25]
[0542] wT = 16 » (y » shift)
[0543] wL = 16 » ((x « 1) » shift)
[0544] wTL = 0
[0545] Equation 26 shows an example of obtaining the PDPC weighting value when the intra prediction mode of the current block is a wide-angle intra prediction mode with an index less than 0.
[0546] [Equation 26]
[0547] wT = 16 » ((y « 1) » shift)
[0548] wL = 16 » (x » shift)
[0549] wTL = 0
[0550] The PDPC weighting value can also be determined based on the ratio of the current block. The ratio of the current block represents the ratio of the width to the height of the current block, which can be defined as shown in Equation 27 below.
[0551] [Equation 27]
[0552] whRatio = CUwidth / CUheight
[0553] The method of obtaining the PDPC weighting value can be variably determined according to the intra prediction mode of the current block.
[0554] As an example, Equation 28 and Equation 29 show an example of deriving the PDPC weighting values when the intra prediction mode of the current block is DC. Specifically, Equation 28 is an example when the current block is a non-square block with width greater than height, and Equation 29 is an example when the current block is a non-square block with height greater than width.
[0555] [Equation 28]
[0556] wT = 32 » ((y « 1) » shift)
[0557] wL = 32 » (((x « 1) » whRatio) » shift)
[0558] wTL = (wL » 4) + (wT » 4)
[0559] [Equation 29]
[0560] wT = 32 » (((y « 1) » 1 / whRatio) » shift)
[0561] wL = 32 » ((x « 1) » shift)
[0562] wTL = (wL » 4) + (wT » 4)
[0563] Equation 30 shows an example of deriving the PDPC weighting values when the intra prediction mode of the current block is a wide-angle intra prediction mode with index greater than 66.
[0564] [Equation 30]
[0565] wT = 16 » (((y « 1) » 1 / whRatio) » shift)
[0566] wL = 16 » ((x « 1) » shift)
[0567] wTL = 0
[0568] Equation 31 shows an example of deriving the PDPC weighting values when the intra prediction mode of the current block is a wide-angle intra prediction mode with index less than 0.
[0569] [Equation 31]
[0570] wT = 16 » ((y « 1) » shift)
[0571] wL = 16 » (((x « 1) » whRatio) » shift
[0572] wTL = 0
[0573] The residual image can be obtained by differencing the prediction image from the original image. At this time, when the residual video is transformed into a frequency domain, the subjective quality of the video does not greatly decrease even if high frequency components among the frequency components are removed. Therefore, if the value of the high frequency component is made small or set to 0, there is an effect that the compression efficiency can be increased while visual distortion does not greatly occur. In order to decompose the residual image into two-dimensional frequency components and reflect the above-described characteristics, a transform can be performed on the current block. The transform can be performed using a transform method such as DCT (Discrete Cosine Transform) or DST (Discrete Sine Transform).
[0574] DCT is a transform that decomposes (or transforms) a residual video into two-dimensional frequency components using a cosine transform, and DST is a transform that decomposes (or transforms) a residual video into two-dimensional frequency components using a sine transform. The transform result of the residual video, the frequency components, can represent image characteristics. As one example, when DCT transform is performed on a block of N x N size, N 2 image characteristics corresponding to the weights can be obtained. According to the transform method used, the weights corresponding to the image characteristics can be referred to as DCT coefficients or DST coefficients.
[0575] The transform method DCT is mainly used for transforming a video in which a large number of low frequency components are distributed other than 0. The transform method DST is mainly used for a video in which a large number of high frequency components are distributed.
[0576] A transform method other than DCT or DST can also be used to transform the residual video.
[0577] Hereinafter, a case in which the residual video is transformed into two-dimensional frequency components is referred to as two-dimensional image transform. Also, the weights corresponding to the image characteristics obtained in the transform result are referred to as transform coefficients. As one example, the transform coefficients can represent DCT coefficients or DST coefficients. When both the primary transform and the secondary transform are applied as described later, the transform coefficients can represent the weights corresponding to the image characteristics generated as a result of the secondary transform.
[0578] The transform method can be determined in units of blocks. The transform method can be determined based on at least one of a prediction encoding mode of the current block, a size of the current block, or the size of the current block. As one example, in a case where the current block is encoded in an intra prediction mode and the size of the current block is smaller than N x N, the transform can be performed using the transform method DST. In contrast, when the conditions are not satisfied, the transform can be performed using the transform method DCT.
[0579] For a part of blocks in residual video, a two-dimensional video transform can not be performed. A case where a two-dimensional video transform is not performed can be referred to as a transform skip. When a transform skip is applied, quantization can be applied with respect to residual values for which a transform is not performed.
[0580] After a current block is transformed using DCT or DST, the transformed current block can be transformed again. At this time, the transform based on DCT or DST can be defined as a primary transform, and a case where a block to which the primary transform is applied is transformed again can be defined as a secondary transform.
[0581] The primary transform can be performed using one of a plurality of transform kernel candidates. As one example, the primary transform can be performed using one of DCT2, DCT8, or DCT7.
[0582] Different transform kernels can also be used for a horizontal direction and a vertical direction. Information indicating a combination of a horizontal direction transform kernel and a vertical direction transform kernel can be signaled through a bitstream.
[0583] The primary transform and the secondary transform can be performed by different units. As one example, the primary transform can be performed with respect to an 8x8 block, and the secondary transform can be performed with respect to a 4x4 size sub-block of the transformed 8x8 block. At this time, transform coefficients of other regions for which the secondary transform is not performed can also be set to 0.
[0584] Alternatively, the primary transform can be performed with respect to a 4x4 block, and the secondary transform can be performed with respect to an 8x8 size region including the transformed 4x4 block.
[0585] Information indicating whether the secondary transform is performed can be signaled through a bitstream.
[0586] Alternatively, whether the secondary transform is performed can be determined according to whether a horizontal direction transform kernel and a vertical direction transform kernel are the same. As one example, the secondary transform can be performed only in a case where the horizontal direction transform kernel and the vertical direction transform kernel are the same. Alternatively, the secondary transform can be performed only in a case where the horizontal direction transform kernel and the vertical direction transform kernel are different.
[0587] Alternatively, the secondary transform can be allowed only in a case where a horizontal direction transform and a vertical direction transform use a pre-defined transform kernel. As one example, the secondary transform can be allowed when the horizontal direction transform and the vertical direction transform use a DCT2 transform kernel.
[0588] Alternatively, it can be determined whether to perform the secondary transform according to the number of non-zero transform coefficients of the current block. As an example, if the number of non-zero transform coefficients of the current block is less than or equal to a threshold, it can be set not to use the secondary transform, and if the number of non-zero transform coefficients of the current block is greater than the threshold, it can be set to use the secondary transform. It can also be set to use the secondary transform only when the current block is coded with intra prediction.
[0589] The size or shape of the sub-block on which the secondary transform is to be performed can be determined according to the shape of the current block.
[0590] Figure 23 and Figure 24 A diagram showing a sub-block on which the secondary transform is performed is shown.
[0591] If the current block is a square, after performing the primary transform, the secondary transform can be performed on a sub-block of N x N size at the left upper end of the current block. As an example, if the current block is an 8 x 8 size coded block, after performing the primary transform on the current block, the secondary transform can be performed on a sub-block of 4 x 4 size at the left upper end of the current block (refer to FIG. 4(a)). Figure 23
[0592] If the current block is a non-square block in which the width is more than 4 times greater than the height, after performing the primary transform, the secondary transform can be performed on a sub-block of (kN) x (4kN) size at the left upper end of the current block. As an example, if the current block is a 16 x 4 size non-square block, after performing the primary transform on the current block, the secondary transform can be performed on a sub-block of 2 x 8 size at the left upper end of the current block (refer to (a) of FIG. 4). Figure 24
[0593] If the current block is a non-square block in which the height is more than 4 times greater than the width, after performing the primary transform, the secondary transform can be performed on a sub-block of (4kN) x (kN) size at the left upper end of the current block. As an example, if the current block is a 16 x 4 size non-square block, after performing the primary transform on the current block, the secondary transform can be performed on a sub-block of 2 x 8 size at the left upper end of the current block (refer to (b) of FIG. 4). Figure 24
[0594] An inverse transform (second inverse transform) of the secondary transform can be performed in the decoder, and according to the result of the second inverse transform, an inverse transform (first inverse transform) of the primary transform is performed. According to the results of the second inverse transform and the first inverse transform, a residual signal for the current block is obtained.
[0595] Information indicating the transform type of the current block can be signaled through a bitstream. The information can be index information tu_mts_idx of one of a combination of a horizontal direction transform type and a vertical direction transform type.
[0596] The transform kernel in the vertical direction and the transform kernel in the horizontal direction can be determined according to the transform type candidate specified by the index information tu_mts_idx. Table 7 and Table 8 show transform type combinations according to tu_mts_idx.
[0597]
Table 7
[0598]
[0599]
Table 8
[0600]
[0601] The transform type can be determined as one of DCT2, DST7, DCT8 or transform skip. Alternatively, transform type combination candidates can be constructed using only transform kernels, except for transform skip.
[0602] When Table 7 is used, if tu_mts_idx is 0, transform skip can be applied to the horizontal direction and the vertical direction. If tu_mts_idx is 1, DCT2 can be applied to the horizontal direction and the vertical direction. If tu_mts_idx is 3, DCT8 can be applied to the horizontal direction and DCT7 can be applied to the vertical direction.
[0603] When Table 8 is used, if tu_mts_idx is 0, DCT2 can be applied to the horizontal direction and the vertical direction. If tu_mts_idx is 1, transform skip can be applied to the horizontal direction and the vertical direction. If tu_mts_idx is 3, DCT8 can be applied to the horizontal direction and DCT7 can be applied to the vertical direction.
[0604] The index information can be determined to be coded according to at least one of the size, shape or number of non-zero coefficients of the current block. As an example, when the number of non-zero coefficients is equal to or less than a threshold, the index information can not be transmitted and a default transform type can be applied to the current block. The default transform type can be DST7. Alternatively, the default mode can be different according to the size, shape or intra prediction mode of the current block.
[0605] The threshold can be determined based on the size or shape of the current block. As an example, the threshold can be set to 2 when the size of the current block is less than or equal to 32x32, and the threshold can be set to 4 when the size of the current block is greater than 32x32 (e.g., when the current block is a coding block of 32x64 or 64x32 size).
[0606] The plurality of lookup tables can be pre-stored in the encoder or the decoder. At least one of an index value of the plurality of lookup tables assigned to the transform type combination candidate, a kind of the transform type combination candidate, or a number of the transform type combination candidate can be different.
[0607] The lookup table for the current block can be selected based on at least one of a size, a shape, a prediction encoding mode, an intra prediction mode, whether a secondary transform is applied, or whether a transform skip is applied to a neighboring block of the current block.
[0608] As one example, in a case where the size of the current block is 4x4 or less or the current block is encoded with inter prediction, the lookup table of Table 7 can be utilized, and in a case where the size of the current block is greater than 4x4 or the current block is encoded with intra prediction, the lookup table of Table 8 can be utilized.
[0609] Alternatively, information indicating one of the plurality of lookup tables can be signaled through a bitstream. The decoder can select the lookup table for the current block based on the information.
[0610] As another example, an index assigned to the transform type combination candidate can be adaptively determined based on at least one of a size, a shape, a prediction encoding mode, an intra prediction mode, whether a secondary transform is applied, or whether a transform skip is applied to a neighboring block of the current block. As one example, if the size of the current block is 4x4, the index assigned to the transform skip can have a smaller value than the index assigned to the transform skip if the size of the current block is greater than 4x4. Specifically, if the size of the current block is 4x4, the index 0 can be assigned to the transform skip, and if the size of the current block is greater than 4x4 and 16x16 or less, an index greater than 0 (e.g., index 1) can be assigned to the transform skip. If the size of the current block is greater than 16x16, the index assigned to the transform skip can have a maximum value (e.g., 5).
[0611] Alternatively, if the current block is encoded with inter prediction, the index 0 can be assigned to the transform skip. If the current block is encoded with intra prediction, an index greater than 0 (e.g., index 1) can be assigned to the transform skip.
[0612] Alternatively, if the current block is a 4x4 block encoded with inter prediction, the index 0 can be assigned to the transform skip. In contrast, if the current block is not encoded with inter prediction or the size of the current block is greater than 4x4, an index having a value greater than 0 (e.g., index 1) can be assigned to the transform skip.
[0613] Different transform type combination candidates from those listed in Table 7 and Table 8 can also be defined and used. As an example, transform skip can be applied to one of the horizontal direction transform or the vertical direction transform, and for the other, transform type combination candidates with DCT7, DCT8 or DST2 applied transform kernel can be utilized. At this time, whether transform skip is used as transform type candidate for the horizontal direction or the vertical direction can be determined based on at least one of the size (e.g., width and / or height), shape, prediction encoding mode or intra prediction mode of the current block.
[0614] Alternatively, information indicating whether a particular transform type candidate can be utilized or not can be signaled through the bitstream. As an example, an identifier indicating whether transform skip can be used as transform type candidate for the horizontal direction and the vertical direction can be signaled. Based on the identifier, whether a particular transform type combination candidate among the plurality of transform type combination candidates is included or not can be determined.
[0615] Alternatively, information whether a particular transform type candidate is applied to the current block or not can be signaled through the bitstream. As an example, an identifier cu_mts_flag indicating whether DCT2 is applied to the horizontal direction and the vertical direction can be signaled. When the value of cu_mts_flag is 1, DCT2 can be set as the transform kernel for the vertical direction and the horizontal direction. When the value of cu_mts_flag is 0, DCT8 or DST7 can be set as the transform kernel for the vertical direction and the horizontal direction. Alternatively, when the value of cu_mts_flag is 0, information tu_mts_idx specifying one of the plurality of transform type combination candidates can be signaled.
[0616] If the current block is a non-square block with width greater than height or a non-square block with height greater than width, the encoding of cu_mts_flag can be skipped and regarded as cu_mts_flag with value 0.
[0617] The number of transform type combination candidates that can be utilized can be set differently according to the size, shape or intra prediction mode of the current block. As an example, 3 or more transform type combination candidates can be used in case of a square block, and 2 transform type combination candidates can be used in case of a non-square block. Alternatively, in case of a square block, only transform type combination candidates with different transform type for the horizontal direction and the transform type for the vertical direction can be utilized.
[0618] If the number of transform type combination candidates available for the current block is more than 3, index information tu_mts_idx indicating one of the transform type combination candidates can be transmitted. In contrast, if the number of transform type combination candidates available for the current block is 2, a flag mts_flag indicating one of the transform type combination candidates can be transmitted. Table 9 shows coding shapes of information required for specific transform type combination candidates according to the shape of the current block.
[0619] [Table 9]
[0620]
[0621] The index of the transform type combination candidate can be reordered according to the shape of the current block. As one example, the index assigned to the transform type combination candidate can be different if the current block is a square than if the current block is not a square. As one example, in the case of the current block being a square, the transform type combination can be selected based on Table 10 below, and in the case of the current block being not a square, the transform type combination can be selected based on Table 11 below.
[0622] [Table 10]
[0623]
[0624] [Table 11]
[0625]
[0626] The transform type can be determined based on the number of horizontal direction non-zero coefficients or the number of vertical direction non-zero coefficients of the current block. Here, the number of horizontal direction non-zero coefficients indicates the number of non-zero coefficients contained in 1xN (where N is the width of the current block), and the number of vertical direction non-zero coefficients indicates the number of non-zero coefficients contained in Nx1 (where N is the height of the current block). In the case where the maximum value of the horizontal direction non-zero coefficients is less than or equal to a threshold value, a primary transform type can be applied to the horizontal direction, and in the case where the maximum value of the horizontal direction non-zero coefficients is greater than the threshold value, a secondary transform type can be applied to the horizontal direction. In the case where the maximum value of the vertical direction non-zero coefficients is less than or equal to a threshold value, a primary transform type can be applied to the vertical direction, and in the case where the maximum value of the vertical direction non-zero coefficients is greater than the threshold value, a secondary transform type can be applied to the vertical direction.
[0627] Figure 25 is a diagram for explaining an example of determining a transform type of a current block.
[0628] As one example, if the current block is encoded with intra prediction, the maximum value of the horizontal direction non-zero coefficients of the current block is 2 or less (refer to Figure 25If the current block is coded with intra prediction, the maximum value of the vertical direction non-zero coefficients of the current block is greater than 2 (refer to (a) of FIG. 2), the horizontal direction transform type can be determined as DST7.
[0629] If the current block is coded with intra prediction, the maximum value of the vertical direction non-zero coefficients of the current block is greater than 2 (refer to (a) of FIG. 2), the horizontal direction transform type can be determined as DST7. Figure 25 If the current block is coded with inter prediction, the maximum value of the vertical direction non-zero coefficients of the current block is greater than 2 (refer to (b) of FIG. 2), DCT2 or DCT8 can be determined as the vertical direction transform type.
[0630] The information indicating whether the transform type of the current block is explicitly determined based on the information signaled from the bitstream can be signaled from the bitstream. As an example, in the sequence level, information sps_explicit_intra_mts_flag indicating whether the transform type is allowed to be explicitly determined for the blocks coded with intra prediction and / or information sps_explicit_inter_mts_flag indicating whether the transform type is allowed to be explicitly determined for the blocks coded with inter prediction can be signaled.
[0631] When the transform type is allowed to be determined, the transform type of the current block can be determined based on the index information tu_mts_idx signaled from the bitstream. In contrast, when the transform type is not allowed to be determined, the transform type can be determined based on at least one of the size, shape, whether the transform is allowed in the sub-block unit, or the position of the sub-block including the transform coefficient not being 0 of the current block. As an example, the horizontal direction transform type of the current block can be determined based on the width of the current block, and the vertical direction transform type of the current block can be determined based on the height of the current block. For example, if the width of the current block is less than 4 or greater than 16, the horizontal direction transform type can be determined as DCT2. Otherwise, the horizontal direction transform type can be determined as DST7. If the height of the current block is less than 4 or greater than 16, the vertical direction transform type can be determined as DCT2. Otherwise, the vertical direction transform type can be determined as DST7. Herein, to determine the horizontal direction transform type and the vertical direction transform type, the threshold values compared with the width and the height can be determined based on at least one of the size, shape, or intra prediction mode of the current block.
[0632] Alternatively, if the current block is a square with the same height and width, the horizontal direction transform type and the vertical direction transform type can be identically set, and on the other hand, if the current block is a non-square with different height and width, the horizontal direction transform type and the vertical direction transform type can be differently set. As an example, in the case where the width of the current block is greater than the height, the horizontal direction transform type can be determined as DST7, and the vertical direction transform type can be determined as DCT2. In the case where the height of the current block is greater than the width, the vertical direction transform type can be determined as DST7, and the horizontal direction transform type can be determined as DCT2.
[0633] The number and / or kind of transform type candidates or the number and / or kind of transform type combination candidates can be different depending on whether or not explicit determination of transform type is allowed. As one example, when explicit determination of transform type is allowed, DCT2, DST7, and DCT8 can be used as transform type candidates. Thus, the horizontal direction transform type and the vertical direction transform type can be set to DCT2, DST8, or DCT8, respectively. When explicit determination of transform type is not allowed, only DCT2 and DST7 can be used as transform type candidates. Thus, the horizontal direction transform type and the vertical direction transform type can be determined to be DCT2 or DST7, respectively.
[0634] The coding block or the transform block can be divided into a plurality of sub-blocks, and the transform can be performed for the plurality of sub-blocks, respectively. As one example, when the sub-partition intra prediction encoding method described above is applied to the coding block, the coding block can be divided into a plurality of sub-blocks, and the transform can be performed for the plurality of sub-blocks, respectively.
[0635] The transform type of each of the sub-blocks can be the same as each other. As one example, if the transform type of a first sub-block among the plurality of sub-blocks is determined, the transform type of the first sub-block can be applied to the remaining sub-blocks, too. Alternatively, the transform type for the coding block can be determined, and the transform type for the coding block can be determined as the transform type for the sub-blocks.
[0636] As another example, the transform type of the plurality of sub-blocks can be determined individually. The transform type of each of the sub-blocks can be determined based on information signaled for each of the sub-blocks. As one example, index information tu_mts_idx can be signaled for each of the sub-blocks. The index information tu_mts_idx can specify one of a plurality of combinations of the transform type in the horizontal direction and the transform type in the vertical direction. Depending on the value of the tu_mts_idx, the transform type in the horizontal direction and the transform type in the vertical direction can be determined to be DCT2, DST7, or DCT8. Whether or not the transform type in the horizontal direction and the transform type in the vertical direction are the same can be determined based on the index information tu_mts_idx.
[0637] Information indicating whether or not the transform type of a current sub-block uses the same transform type as a previous sub-block can be signaled. When the information indicates that the same transform type as the previous sub-block is used, the index information tu_mts_idx for the current sub-block can be skipped, and the transform type of the previous sub-block can be applied to the current sub-block. In contrast, when the information indicates that a different transform type from the previous sub-block is used, the index information tu_mts_idx for the current sub-block can be encoded. At this time, the index information for the current sub-block can indicate one of other transform type combinations than the transform type combination indicated by the index information for the previous sub-block.
[0638] Alternatively, in a case where the coding block is divided into a plurality of sub-blocks, it can be set not to allow the explicit determination of the transform type. In a case where the explicit transform type is allowed, the transform type can be determined based on the index information tu_mts_idx. In contrast, when the explicit determination of the transform type is not allowed, the transform type can be determined according to at least one of the included sub-block size, shape, or sub-block position of the non-zero coefficient.
[0639] Figure 26 is a schematic diagram of an example of determining a sub-block transform type.
[0640] In Figure 26 an example of a sub-block having a height-to-width ratio of 1:2 or 2:1 is shown.
[0641] The horizontal direction transform type and the vertical direction transform type can be determined based on the width and height of the respective sub-blocks. As one example, as shown in (a) and (b) of Figure 26 , in a case where the width of the sub-block is less than a threshold value, a primary transform type (e.g., DCT2) can be used as the horizontal direction transform type. In contrast, in a case where the width of the sub-block is a threshold value or more, a secondary transform type (e.g., DST7) can be used as the horizontal direction transform type.
[0642] In addition, in a case where the height of the sub-block is less than a threshold value, a primary transform type (e.g., DCT2) can be used as the vertical direction transform type. In contrast, in a case where the width of the sub-block is a threshold value or more, a secondary transform type (e.g., DST7) can be used as the vertical direction transform type.
[0643] where the threshold value can be a natural number such as 2, 4, or 8. The threshold value can be variably determined based on at least one of the size, shape, intra prediction mode, or prediction encoding mode of the coding block. Alternatively, information for determining the threshold value can be signaled through a bitstream.
[0644] In the above example, an example of comparing the width and height of the sub-block with one threshold value is cited, but the width and height of the sub-block can also be compared with two threshold values to determine the transform type. As one example, in a case where the width of the sub-block is less than a first threshold value or greater than a second threshold value, the transform type in the horizontal direction can be determined as DCT2. Otherwise, the transform type in the horizontal direction can be determined as DST7. In addition, in a case where the height of the sub-block is less than a first threshold value or greater than a second threshold value, the transform type in the vertical direction can be determined as DCT2. Otherwise, the transform type in the vertical direction can be determined as DST7. The second threshold value is a natural number greater than the first threshold value, the first threshold value can be a natural number such as 2, 4, or 8, and the second threshold value can be a natural number such as 8, 16, or 32.
[0645] As another example, when the sub-block is a square with the same height and width, the horizontal direction transform type and the vertical direction transform type can be set identically, and on the other hand, when the sub-block is a non-square with different height and width, the horizontal direction transform type and the vertical direction transform type can be set differently. As one example, in the case where the width of the sub-block is greater than the height, the transform type in the horizontal direction can be determined as DST7, and the transform type in the vertical direction can be determined as DCT2. In the case where the height of the sub-block is greater than the width, the transform type in the vertical direction can be determined as DST7, and the transform type in the horizontal direction can be determined as DCT2.
[0646] The value of the residual coefficient included in at least one of the plurality of sub-blocks can be set to 0. Here, the residual coefficient means a transform coefficient generated by transformation, a transform skip coefficient generated by transform skip, or a quantized coefficient generated by quantization of the transform coefficient or the transform skip coefficient. As one example, the value of the residual coefficient included in the sub-block spaced apart from the boundary of the coding block by a distance equal to or greater than a predetermined distance can be set to 0.
[0647] Figure 27 FIG. 1 is a diagram for explaining an example in which the residual coefficient of a sub-block is set to 0.
[0648] In Figure 27 In the example shown in FIG. 1, CBF (Coded Block Flag) indicates whether there is a residual coefficient that is not 0 within the sub-block. The value of the CBF is 0, indicating that there is no residual coefficient that is not 0 within the sub-block, and the value of the CBF is 1, indicating that there is a residual coefficient that is not 0 within the sub-block.
[0649] When the distance from the boundary of the coding block to the sub-block is equal to or greater than a threshold value, the residual coefficient included in the sub-block can be set to 0. At this time, the distance from the boundary of the coding block to the sub-block can be obtained based on a first sample located at the boundary of the coding block and a second sample included in the sub-block. As one example, the first sample can be a sample located at the upper left corner of the coding block, a sample located at the lower left corner, a sample located at the left middle, a sample located at the upper right corner, a sample located at the lower right corner, a sample located at the right middle, a sample located at the upper middle, or a sample located at the lower middle. The second sample can be a sample located at the upper left corner of the sub-block, a sample located at the lower left corner, a sample located at the left middle, a sample located at the upper right corner, a sample located at the lower right corner, a sample located at the right middle, a sample located at the upper middle, or a sample located at the lower middle.
[0650] The threshold value can be determined based on at least one of the size of the coding block, the shape of the coding block, the number of sub-blocks included in the coding block, or the size of the sub-block. Alternatively, information for determining the threshold value can be signaled through a bitstream.
[0651] As an example, when vertical direction partitioning is applied to the current block, the residual coefficients of the sub-blocks whose distance from the left side boundary of the coding block is above a threshold value can be set to 0. When the size of the coding block is 64 and the threshold value is 32, as shown in (a) of FIG. 10, the residual coefficients of the sub-blocks (sub-CU2 and sub-CU3) whose distance from the left side boundary of the coding block is 32 or more can be set to 0. Figure 27 As an example, when vertical direction partitioning is applied to the current block, the residual coefficients of the sub-blocks whose distance from the left side boundary of the coding block is above a threshold value can be set to 0. When the size of the coding block is 64 and the threshold value is 32, as shown in (a) of FIG. 10, the residual coefficients of the sub-blocks (sub-CU2 and sub-CU3) whose distance from the left side boundary of the coding block is 32 or more can be set to 0.
[0652] As an example, when vertical direction partitioning is applied to the current block, the residual coefficients of the sub-blocks whose distance from the left side boundary of the coding block is above a threshold value can be set to 0. When the size of the coding block is 64 and the threshold value is 32, as shown in (a) of FIG. 10, the residual coefficients of the sub-blocks (sub-CU2 and sub-CU3) whose distance from the left side boundary of the coding block is 32 or more can be set to 0. Figure 27 As an example, when vertical direction partitioning is applied to the current block, the residual coefficients of the sub-blocks whose distance from the left side boundary of the coding block is above a threshold value can be set to 0. When the size of the coding block is 64 and the threshold value is 32, as shown in (a) of FIG. 10, the residual coefficients of the sub-blocks (sub-CU2 and sub-CU3) whose distance from the left side boundary of the coding block is 32 or more can be set to 0.
[0653] As an example, when vertical direction partitioning is applied to the current block, the residual coefficients of the sub-blocks whose distance from the left side boundary of the coding block is above a threshold value can be set to 0. When the size of the coding block is 64 and the threshold value is 32, as shown in (a) of FIG. 10, the residual coefficients of the sub-blocks (sub-CU2 and sub-CU3) whose distance from the left side boundary of the coding block is 32 or more can be set to 0.
[0654] As an example, when vertical direction partitioning is applied to the current block, the residual coefficients of the sub-blocks whose distance from the left side boundary of the coding block is above a threshold value can be set to 0. When the size of the coding block is 64 and the threshold value is 32, as shown in (a) of FIG. 10, the residual coefficients of the sub-blocks (sub-CU2 and sub-CU3) whose distance from the left side boundary of the coding block is 32 or more can be set to 0.
[0655] As an example, when vertical direction partitioning is applied to the current block, the residual coefficients of the sub-blocks whose distance from the left side boundary of the coding block is above a threshold value can be set to 0. When the size of the coding block is 64 and the threshold value is 32, as shown in (a) of FIG. 10, the residual coefficients of the sub-blocks (sub-CU2 and sub-CU3) whose distance from the left side boundary of the coding block is 32 or more can be set to 0. Figure 27 As an example, when vertical direction partitioning is applied to the current block, the residual coefficients of the sub-blocks whose distance from the left side boundary of the coding block is above a threshold value can be set to 0. When the size of the coding block is 64 and the threshold value is 32, as shown in (a) of FIG. 10, the residual coefficients of the sub-blocks (sub-CU2 and sub-CU3) whose distance from the left side boundary of the coding block is 32 or more can be set to 0.
[0656] As an example, when vertical direction partitioning is applied to the current block, the residual coefficients of the sub-blocks whose distance from the left side boundary of the coding block is above a threshold value can be set to 0. When the size of the coding block is 64 and the threshold value is 32, as shown in (a) of FIG. 10, the residual coefficients of the sub-blocks (sub-CU2 and sub-CU3) whose distance from the left side boundary of the coding block is 32 or more can be set to 0.
[0657] As another example, information indicating that a transform is performed only on a partial region of a coding block or a transform block can be coded and signaled. The information can be a one-bit flag cu_sbt_flag. The flag is set to one to indicate that a transform is performed only on a portion of a plurality of sub-blocks generated by partitioning a coding block or a transform block, and the flag is set to zero to indicate that a transform is performed without partitioning the coding block or the transform block into the sub-blocks.
[0658] A method of performing a transform only on a partial region of a coding block can be allowed only in a case where a sub-partitioned intra coding method is applied to the coding block. Accordingly, the cu_sbt_flag can be coded and signaled only in a case where the sub-partitioned intra coding method is applied to the coding block. When the cu_sbt_flag is set to one, a transform can be performed on a portion of a plurality of sub-blocks generated by partitioning a coding block or a transform block, and residual coefficients of remaining sub-blocks can be set to zero. When the cu_sbt_flag is set to one, a transform can be performed on all of the sub-blocks.
[0659] Alternatively, when the sub-partitioned intra coding method is applied to the coding block, coding of the cu_sbt_flag can be skipped, and the cu_sbt_flag can be set to one.
[0660] As another example, a method of performing a transform only on a partial region of a coding block can be allowed only in a case where a prediction coding mode of the coding block is inter prediction or a current reference picture. When the coding block is coded with the inter prediction or the current reference picture, information indicating whether a transform is performed only on a partial region of the coding block can be coded and signaled. When the transform is performed only on the partial region of the coding block, information indicating a coding block partition shape can be coded and signaled. The information indicating the coding block partition shape can include at least one of information indicating whether the coding block is partitioned into four sub-blocks, information indicating a coding block partition direction, or information indicating a number of sub-blocks. As one example, when the cu_sbt_flag is one, a flag cu_sbt_quadtree_flag indicating whether the coding block is partitioned into four sub-blocks can be signaled. The cu_sbt_quadtree_flag is set to one to indicate that the coding block is partitioned into four sub-blocks. As one example, the coding block can be partitioned into four sub-blocks using three vertical lines or three horizontal lines, or the coding block can be partitioned into four sub-blocks using one vertical line and one horizontal line. The cu_sbt_quadtree_flag is set to zero to indicate that the coding block is partitioned into two sub-blocks. As one example, the coding block can be partitioned into two sub-blocks using one vertical line or one horizontal line.
[0661] In addition, an identifier indicating a coding block partition direction can be signaled through a bitstream. As an example, an identifier cu_sbt_horizontal_flag indicating whether a horizontal partition is applied to a coding block can be coded and signaled. A value of cu_sbt_horizontal_flag being 1 indicates that a horizontal partition is applied to the coding block, and a value of cu_sbt_horizontal_flag being 0 indicates that a vertical partition is applied to the coding block.
[0662] Information indicating a position of a sub-block in which no non-zero coefficient exists or a sub-block in which no transform is performed can be signaled through a bitstream. Based on the information, a sub-block in which a transform and / or quantization is performed and a sub-block in which a transform and / or quantization is skipped can be determined.
[0663] Figure 28 An example of an identifier indicating a position of a sub-block in which a transform and / or quantization is performed is information signaled through a bitstream.
[0664] An identifier sbt_upleft_flag indicating whether a non-zero coefficient exists in a specific position or a first sub-block can be signaled. A value of sbt_upleft_flag being 1 indicates that a transform and / or quantization is performed on a sub-block located at an upper end or a left side of a coding block, and indicates that a transform and / or quantization is not performed on a sub-block located at a right side or a lower end of the coding block. A value of sbt_upleft_flag being 0 indicates that a transform and / or quantization is performed on a sub-block located at an upper end or a left side of a coding block, and indicates that a transform and / or quantization is not performed on a sub-block located at a right side or a lower end of the coding block.
[0665] When a coding block is partitioned into 4 sub-blocks, sbt_upleft_flag can indicate that a transform and / or quantization is performed on N sub-blocks. As an example, a value of sbt_upleft_flag being 1 indicates that a transform and / or quantization is performed on 2 sub-blocks at an upper end or a left side, and a value of sbt_upleft_flag being 0 indicates that a transform and / or quantization is performed on 2 sub-blocks at a right side or a lower end.
[0666] Unlike the illustrated example, a value of N can be set to 1 or 3.
[0667] A residual coefficient of a sub-block in which no transform and / or quantization is performed can be set to 0.
[0668] The transform type of a sub-block can be determined according to the division direction of the coding block and the position of the sub-block. As an example, when the coding block is divided along the vertical direction and the transform is performed on the sub-block located at the left side, the horizontal direction transform type and the vertical direction transform type can be set differently. As an example, the horizontal direction transform type can be set as DCT8 and the vertical direction transform type can be set as DST7. In contrast, when the coding block is divided along the vertical direction and the transform is performed on the sub-block located at the right side, the horizontal direction transform type and the vertical direction transform type of the sub-block can be set identically. As an example, the horizontal direction transform type and the vertical direction transform type can be set as DST7.
[0669] Alternatively, when the coding block is divided along the horizontal direction and the transform is performed on the sub-block located at the top end, the horizontal direction transform type and the vertical direction transform type can be set differently. As an example, the horizontal direction transform type can be set as DST7 and the vertical direction transform type can be set as DCT8. In contrast, when the coding block is divided along the horizontal direction and the transform is performed on the sub-block located at the bottom end, the horizontal direction transform type and the vertical direction transform type of the sub-block can be set identically. As an example, the horizontal direction transform type and the vertical direction transform type can be set as DST7.
[0670] For a sub-block, the information indicating whether there is a non-zero coefficient can be skipped, for example, the encoding of the CBF can be skipped. When the encoding of the CBF is skipped, it can be determined whether the residual coefficient not equal to 0 is contained in each sub-block according to the position of the block on which the transform is performed. As an example, when the value of sbt_upleft_flag is 0, it can be obtained that the CBF value of the sub-block located at the left side or the top end is 0 and the CBF value of the sub-block located at the right side or the bottom end is 1. Alternatively, when the value of sbt_upleft_flag is 1, it can be obtained that the CBF value of the sub-block located at the left side or the top end is 1 and the CBF value of the sub-block located at the right side or the bottom end is 0.
[0671] The reconstructed sample of the sub-block on which the transform is performed can be obtained by the sum of the prediction sample and the residual sample. In contrast, in the sub-block on which the transform is skipped, the prediction sample can be set as the reconstructed sample. The quantization is to reduce the energy of the block, and the quantization process includes the process of dividing the transform coefficient by a certain constant value. The constant value can be obtained according to the quantization parameter, and the quantization parameter can be defined as a value between 1 and 63.
[0672] If the transform and the quantization are performed in the encoder, the decoder can obtain the residual block by inverse quantization and inverse transform. The decoder can add the prediction block and the residual block to obtain the reconstructed block of the current block.
[0673] If a reconstructed block of the current block is obtained, information loss occurring in a quantization and encoding process can be reduced by in-loop filtering. The in-loop filtering can include at least one of a deblocking filter, a sample adaptive offset filter (SAO), or an adaptive loop filter (ALF). Hereinafter, a reconstructed block before the in-loop filtering is referred to as a first reconstructed block, and a reconstructed block after the in-loop filtering is referred to as a second reconstructed block.
[0674] At least one of the deblocking filter, the SAO, or the ALF can be applied to the first reconstructed block to obtain the second reconstructed block. At this time, the SAO or the ALF can be applied after the deblocking filter is applied.
[0675] The deblocking filter is used to alleviate a blocking artifact of a block boundary occurring due to quantization performed in a block unit. In order to apply the deblocking filter, a blocking strength (BS) between the first reconstructed block and a neighboring reconstructed block can be determined.
[0676] Figure 29 is a flowchart of a process of determining the blocking strength.
[0677] In Figure 29 the example shown in FIG. 1, P denotes the first reconstructed block, and Q denotes the neighboring reconstructed block. The neighboring reconstructed block can be adjacent to a right side or an upper end of the current block.
[0678] In Figure 29 the example shown in FIG. 2, cases of determining the blocking strength according to a prediction encoding mode of P and Q, whether a transform coefficient other than 0 is included, whether inter prediction is performed using the same reference picture, or whether a difference value of a motion vector is above a threshold value are illustrated.
[0679] The deblocking filter can be determined to be applied or not applied based on the blocking strength. As one example, in a case where the blocking strength is 0, the filtering can not be performed.
[0680] The SAO is used to alleviate a ringing artifact occurring as quantization is performed in the frequency domain. The SAO can be performed by adding or subtracting an offset determined based on a pattern of the first reconstructed video. The determination method of the offset includes edge offset (EO) or band offset (BO). The EO indicates a method of determining a compensation value of a current sample according to a pattern of neighboring pixels. The BO indicates a method of applying a common compensation value to a set of pixels having similar luminance values within a region. Specifically, pixel luminance can be divided into 32 equal intervals, and pixels having similar luminance values can be set as one set. As an example, 4 adjacent bands among 32 bands can be set as a group, and the same compensation value can be applied to samples belonging to the 4 bands.
[0681] The ALF is a method of applying a filter of a predefined size or shape to the first reconstructed video or the reconstructed video to which a deblocking filter is applied to generate the second reconstructed video. Equation 32 below indicates an application example of the ALF.
[0682] [Equation 32]
[0683]
[0684] One of the predefined filter candidates can be selected in units of an image, a coding tree unit, a coding block, a prediction block, or a transform block. One of the sizes or shapes of the respective filter candidates can be different.
[0685] Figure 30 The predefined filter candidates are shown.
[0686] As shown in Figure 30 , at least one of a 5x5, 7x7, or 9x9 size diamond window can be selected.
[0687] For the chroma component, only a 5x5 size diamond window can be used.
[0688] The embodiments described with the decoding process or the encoding process as a center are applied to the encoding process or the decoding process, and this is also included in the scope of the present application. The embodiments described in a predetermined order are changed to an order different from the description, and this is also included in the scope of the present application.
[0689] The above-described embodiments are explained based on a series of steps or a sequence diagram, but this does not limit the time sequence order of the present application, and can be simultaneously performed or performed in a different order as needed. In addition, in the above-described embodiments, the constituent elements (for example, units, modules, etc.) constituting the block diagram can be implemented by a hardware device or software, respectively, or by a plurality of constituent elements in combination to be implemented by one hardware device or software. The above-described embodiments can be implemented in the form of a program command capable of being executed by various computing constituent elements, recorded on a computer-readable recording medium. The computer-readable recording medium can include program commands, data files, data structures, etc. alone or in combination. In examples of the computer-readable recording medium, there are included magnetic media such as a hard disk, a floppy disk, and a magnetic tape, optical recording media such as a CD-ROM, a DVD, and a floptical disk, and hardware devices specially configured to store and execute program commands, such as a ROM, a RAM, a flash memory, etc. The hardware devices can be configured to operate in one or more software modules in order to perform the processes of the present application, and vice versa.
[0690] Industrial applicability
[0691] The present application can be applied to an electronic device that encodes or decodes an image.
Claims
1. A video decoding method, characterized in that, include: Determine the reference sample line for the current block; Determine whether there exists a candidate intra-prediction mode that is the same as the intra-prediction mode of the current block; Based on the determined results, the intra-prediction mode of the current block is obtained; as well as Intra-frame prediction is performed on the current block based on the reference sample line and the intra-frame prediction mode; At least one of the candidate intra-prediction modes is: adding or subtracting an offset to the maximum value of the intra-prediction mode of the upper adjacent block and the intra-prediction mode of the left adjacent block of the current block; wherein, when the difference between the intra-prediction mode of the upper adjacent block and the intra-prediction mode of the left adjacent block is 64, at least one of the candidate intra-prediction modes is: adding or subtracting 2 to the maximum value. Determine whether to divide the current block into multiple sub-blocks. The horizontal transformation type of the sub-block is determined based on the width of the sub-block of the current block, and the vertical transformation type of the sub-block is determined based on the height of the sub-block of the current block.
2. The video decoding method according to claim 1, characterized in that, The number of candidate intra-frame prediction modes varies depending on the index of the reference sample line.
3. The video decoding method according to claim 1, characterized in that, When the current block is divided into the multiple sub-blocks, the multiple sub-blocks share an intra-prediction mode.
4. The video decoding method according to claim 3, characterized in that, For some of the sub-blocks, skip the inverse transformation.
5. The video decoding method according to claim 3, characterized in that, The horizontal and vertical transformation types of the sub-blocks are determined based on their shapes.
6. A video encoding method, characterized in that, include: Determine the reference sample line for the current block; Determine whether there exists a candidate intra-prediction mode that is the same as the intra-prediction mode of the current block; Based on the determined results, the intra-prediction mode of the current block is obtained; as well as Intra-prediction is performed on the current block based on the reference sample line and the intra-prediction mode. At least one of the candidate intra-prediction modes is: adding or subtracting an offset to the maximum value of the intra-prediction mode of the upper adjacent block and the intra-prediction mode of the left adjacent block of the current block; wherein, when the difference between the intra-prediction mode of the upper adjacent block and the intra-prediction mode of the left adjacent block is 64, at least one of the candidate intra-prediction modes is: adding or subtracting 2 to the maximum value. Determine whether to divide the current block into multiple sub-blocks. The horizontal transformation type of the sub-block is determined based on the width of the sub-block of the current block, and the vertical transformation type of the sub-block is determined based on the height of the sub-block of the current block.
7. The video encoding method according to claim 6, characterized in that, The number of candidate intra-frame prediction modes varies depending on the index of the reference sample line.
8. The video encoding method according to claim 6, characterized in that, When the current block is divided into the multiple sub-blocks, the multiple sub-blocks share an intra-prediction mode.
9. The video encoding method according to claim 8, characterized in that, For some of the sub-blocks among the plurality of sub-blocks, the transformation is skipped.
10. The video encoding method according to claim 8, characterized in that, The horizontal and vertical transformation types of the sub-blocks are determined based on their shapes.
11. A video decoding device, characterized in that, include: A device for determining the reference sample line of the current block; A means for determining whether there exists a candidate intra-prediction mode that is the same as the intra-prediction mode of the current block; An apparatus for obtaining the intra-prediction mode of the current block based on the determined result; as well as A means for performing intra-frame prediction of the current block based on the reference sample line and the intra-frame prediction mode; Wherein, at least one of the candidate intra-prediction modes is: adding or subtracting an offset to the maximum value of the intra-prediction mode of the upper adjacent block and the intra-prediction mode of the left adjacent block of the current block; wherein, when the difference between the intra-prediction mode of the upper adjacent block and the intra-prediction mode of the left adjacent block is 64, at least one of the candidate intra-prediction modes is: adding or subtracting 2 to the maximum value. A means for determining whether to divide the current block into multiple sub-blocks. The horizontal transformation type of the sub-block is determined based on its width, and the vertical transformation type of the sub-block is determined based on its height.
12. The video decoding apparatus according to claim 11, characterized in that, The number of candidate intra-frame prediction modes varies depending on the index of the reference sample line.
13. The video decoding apparatus according to claim 11, characterized in that, When the current block is divided into the multiple sub-blocks, the multiple sub-blocks share an intra-prediction mode.
14. The video decoding apparatus according to claim 13, characterized in that, For some of the sub-blocks, skip the inverse transformation.
15. The video decoding apparatus according to claim 13, characterized in that, The horizontal and vertical transformation types of the sub-blocks are determined based on their shapes.
16. A video encoding apparatus, characterized in that, include: A device for determining the reference sample line of the current block; A means for determining whether there exists a candidate intra-prediction mode that is the same as the intra-prediction mode of the current block; An apparatus for obtaining the intra-prediction mode of the current block based on the determined result; as well as An apparatus for performing intra-frame prediction of the current block based on the reference sample line and the intra-frame prediction mode. At least one of the candidate intra-prediction modes is: adding or subtracting an offset to the maximum value of the intra-prediction mode of the upper adjacent block and the intra-prediction mode of the left adjacent block of the current block; wherein, when the difference between the intra-prediction mode of the upper adjacent block and the intra-prediction mode of the left adjacent block is 64, at least one of the candidate intra-prediction modes is: adding or subtracting 2 to the maximum value. A means for determining whether to divide the current block into multiple sub-blocks. The horizontal transformation type of the sub-block is determined based on its width, and the vertical transformation type of the sub-block is determined based on its height.
17. The video encoding apparatus according to claim 16, characterized in that, The number of candidate intra-frame prediction modes varies depending on the index of the reference sample line.
18. The video encoding apparatus according to claim 16, characterized in that, When the current block is divided into the multiple sub-blocks, the multiple sub-blocks share an intra-prediction mode.
19. The video encoding apparatus according to claim 18, characterized in that, For some of the sub-blocks among the plurality of sub-blocks, the transformation is skipped.
20. The video encoding apparatus according to claim 18, characterized in that, The horizontal and vertical transformation types of the sub-blocks are determined based on their shapes.
21. A computer-readable recording medium includes program instructions that, when executed by a computer component, perform the video decoding method according to any one of claims 1 to 5.
22. A computer-readable recording medium includes program instructions that, when executed by a computer component, perform the video encoding method according to any one of claims 6 to 10.
23. A method for transmitting a code stream, characterized in that, The video encoding method according to any one of claims 6 to 10 is used to generate a bitstream; and the bitstream is transmitted.
Citation Information
Patent Citations
Apparatus for Cricket Rearing with Grid-Shape Arranged Foldable Rectangular Tubes and Manufacturing Method Thereof
KR1020180121713A
Organic light emitting display device and manufacturing method thereof
KR1020180121757A
Humanized non-human animals with restricted immunoglobulin heavy chain loci
KR1020190006611A
Method and apparatus for processing video signal
WO2017176030A1
Method and device for encoding / decoding image
WO2017188652A1