Method and apparatus for processing video signal
Patent Information
- Application Number
- KR1020190035290
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-03-27
- Filing Date
- 2019-03-27
- Publication Date
- 2026-09-02
- Estimated Expiration
- 2039-03-27
Smart Images

Figure 112019031560953-PAT00023_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to a video signal processing method and apparatus. Background Technology
[0002] Recently, the demand for high-resolution, high-quality video, such as HD (High Definition) and UHD (Ultra High Definition) video, has been increasing across various application fields. As video data becomes higher in resolution and quality, the relative volume of data increases compared to conventional video data; consequently, transmission and storage costs increase when video data is transmitted using existing wired or wireless broadband lines or stored using conventional storage media. To address these issues arising from the increase in video data resolution and quality, high-efficiency video compression technologies can be utilized.
[0003] Various video compression technologies exist, such as inter-frame prediction technology that predicts pixel values in the current picture from previous or subsequent pictures, intra-frame prediction technology that predicts pixel values in the current picture using pixel information within the current picture, and entropy coding technology that assigns short codes to values with high frequency and long codes to values with low frequency; by utilizing these video compression technologies, video data can be effectively compressed for transmission or storage.
[0004] Meanwhile, along with the increasing demand for high-resolution video, the demand for stereoscopic video content as a new video service is also rising. Discussions are underway regarding video compression technologies to effectively provide high-resolution and ultra-high-resolution stereoscopic video content. The problem to be solved
[0005] The present invention aims to provide a method and apparatus capable of efficiently performing intra prediction on a block to be encoded / decoded when encoding / decoding a video signal.
[0006] The present invention aims to provide a method and apparatus for performing intra prediction in sub-block units when encoding / decoding a video signal.
[0007] The present invention aims to provide a method and apparatus for deriving reference samples for sub-blocks in encoding / decoding a video signal.
[0008] The technical problems to be solved by the present invention are not limited to those mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art to which the present invention belongs from the description below. means of solving the problem
[0009] The video signal decoding method and apparatus according to the present invention can divide a current block into a plurality of sub-blocks, perform intra prediction for a first sub-block among the plurality of sub-blocks using a first sub-reference sample line, and perform intra prediction for a second sub-block among the plurality of sub-blocks using a second sub-reference sample line. At this time, the intra prediction modes for the first sub-block and the second sub-block may be the same.
[0010] A video signal encoding method and apparatus according to the present invention may divide a current block into a plurality of sub-blocks, perform intra prediction for a first sub-block among the plurality of sub-blocks using a first sub-reference sample line, and perform intra prediction for a second sub-block among the plurality of sub-blocks using a second sub-reference sample line. At this time, the intra prediction modes for the first sub-block and the second sub-block may be the same.
[0011] In the video signal encoding / decoding method and apparatus according to the present invention, the partitioning type of the current block may be determined based on at least one of the size, shape, or intra-prediction mode of the current block.
[0012] In the video signal encoding / decoding method and apparatus according to the present invention, the second sub-reference sample line may include a reference sample included in a line that is not adjacent to the second sub-block.
[0013] In the video signal encoding / decoding method and apparatus according to the present invention, the reference sample may be included in a line adjacent to the top or left of the current block.
[0014] In the video signal encoding / decoding method and apparatus according to the present invention, the second sub-reference sample line may include a first reference sample included in the first sub-block and a second reference sample derived by adding an offset to the first reference sample.
[0015] In the video signal encoding / decoding method and apparatus according to the present invention, the offset can be obtained based on the offset between the first reference sample and a neighboring reference sample adjacent to the first reference sample.
[0016] In the video signal encoding / decoding method and apparatus according to the present invention, the second sub-reference sample line may include a first reference sample included in the first sub-block and a third reference sample derived by adding an offset to the second reference sample included in a line adjacent to the first sub-block.
[0017] The features briefly summarized above regarding the present invention are merely exemplary aspects of the detailed description of the present invention that follows and do not limit the scope of the present invention. Effects of the invention
[0018] According to the present invention, intra prediction can be efficiently performed on a block to be encoded / decoded.
[0019] According to the present invention, by performing intra prediction in sub-block units, there is an advantage in that the efficiency of intra prediction can be increased.
[0020] According to the present invention, by deriving a reference sample for a subblock from a restoration sample that is not adjacent to the subblock, there is an advantage in that the efficiency of intra-prediction can be increased.
[0021] The effects obtainable from the present invention are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art from the description below. Brief explanation of the drawing
[0022] FIG. 1 is a block diagram showing an image encoding device according to an embodiment of the present invention. FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present invention. FIG. 3 illustrates an example of hierarchically dividing coding blocks based on a tree structure as an embodiment to which the present invention is applied. FIG. 4 is a diagram showing a partition shape that allows binary tree-based partitioning as an embodiment to which the present invention is applied. FIG. 5 is a diagram illustrating an example in which the present invention is applied, wherein only a specific type of binary tree-based partitioning is allowed. FIG. 6 is a diagram illustrating an example in which information related to the number of times a binary tree is allowed is encoded / decoded as an embodiment to which the present invention is applied. FIG. 7 is a diagram illustrating a partition mode that can be applied to a coding block as an embodiment to which the present invention is applied. FIG. 8 illustrates a type of intra-prediction mode pre-defined in an image encoder / decoder as an embodiment to which the present invention is applied. FIG. 9 illustrates a type of extended intra-prediction mode as an embodiment to which the present invention is applied. FIG. 10 is a flowchart schematically illustrating an intra-prediction method as an embodiment to which the present invention is applied. FIG. 11 is a drawing illustrating multiple reference sample lines. FIG. 12 illustrates a method for correcting a prediction sample of a current block based on difference information of surrounding samples as an embodiment to which the present invention is applied. Figures 13 and 14 are diagrams showing a one-dimensional reference sample group in which reference samples are rearranged in a row. FIG. 15 is a diagram showing an example in which the partitioning shape of the current block is determined based on the intra prediction mode of the current block. Figure 16 is a diagram illustrating an example in which intra-prediction is performed in sub-block units. Figure 17 is a diagram showing an example of the configuration of a sub-reference sample line. Figure 18 is a diagram showing an example of replacing an unavailable sample with a restored sample included in a neighboring sub-block. Figure 19 is a diagram illustrating an example of determining the value of a reference sample. FIG. 20 is a flowchart illustrating the process of obtaining a residual sample as an embodiment to which the present invention is applied. Specific details for implementing the invention
[0023] The present invention is susceptible to various modifications and may have various embodiments; specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the invention to specific embodiments, and it should be understood that the invention includes all modifications, equivalents, and substitutions that fall within the spirit and scope of the invention. Similar reference numerals have been used for similar components in the description of each drawing.
[0024] Terms such as "first," "second," etc., may be used to describe various components, but said components should not be limited by said terms. These terms are used solely for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be named the second component, and similarly, the second component may be named the first component. The term "and / or" includes a combination of a plurality of related described items or any of a plurality of related described items.
[0025] When it is stated that one component is "connected" or "connected" to another component, it should be understood that while it may be directly connected or connected to that other component, there may also be other components in between. On the other hand, when it is stated that one component is "directly connected" or "directly connected" to another component, it should be understood that there are no other components in between.
[0026] The terms used in this application are used merely to describe specific embodiments and are not intended to limit the invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, terms such as "comprising" or "having" are intended to specify the presence of the features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
[0027] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the attached drawings. Hereinafter, the same reference numerals are used for identical components in the drawings, and redundant descriptions of identical components are omitted.
[0029] FIG. 1 is a block diagram showing an image encoding device according to an embodiment of the present invention.
[0030] Referring to FIG. 1, the image encoding device (100) may include a picture splitting unit (110), a prediction unit (120, 125), a conversion unit (130), a quantization unit (135), a reordering unit (160), an entropy encoding unit (165), an inverse quantization unit (140), an inverse conversion unit (145), a filter unit (150), and a memory (155).
[0031] Each component shown in FIG. 1 is depicted independently to represent different characteristic functions of the image encoding device and does not imply that each component consists of separate hardware or a single software unit. That is, each component is listed and included as a separate component for the convenience of explanation, but at least two of the components may be combined to form a single component, or a single component may be divided into multiple components to perform functions, and such integrated and separated embodiments of each component are included within the scope of the present invention as long as they do not deviate from the essence of the present invention.
[0032] Furthermore, some components may not be essential components performing an essential function in the present invention, but merely optional components for enhancing performance. The present invention may be implemented by including only the components essential for realizing the essence of the present invention, excluding components used solely for performance enhancement, and a structure including only the essential components, excluding optional components used solely for performance enhancement, is also included within the scope of the rights of the present invention.
[0033] The picture segmentation unit (110) can divide an input picture into at least one processing unit. At this time, the processing unit may be a Prediction Unit (PU), a Transform Unit (TU), or a Coding Unit (CU). The picture segmentation unit (110) can divide a picture into a combination of multiple coding units, prediction units, and transformation units, and can encode the picture by selecting one combination of coding units, prediction units, and transformation units based on a predetermined criterion (e.g., a cost function).
[0034] For example, a single picture can be divided into multiple coding units. To divide coding units within a picture, a recursive tree structure such as a Quad Tree Structure can be used. A coding unit divided into other coding units, with a single image or the largest coding unit as the root, can have as many child nodes as there are divided coding units. A coding unit that can no longer be divided according to certain limits becomes a leaf node. That is, assuming that only square division is possible for a single coding unit, a single coding unit can be divided into up to four different coding units.
[0035] In the following embodiments of the present invention, the encoding unit may be used to mean a unit that performs encoding, or a unit that performs decoding.
[0036] A prediction unit may be divided into at least one shape, such as a square or rectangle, of the same size within a single encoding unit, or one of the prediction units divided within a single encoding unit may be divided such that any one prediction unit has a different shape and / or size from another prediction unit.
[0037] When generating a prediction unit that performs intra prediction based on a coding unit, if it is not the minimum coding unit, intra prediction can be performed without dividing it into multiple prediction units NxN.
[0038] The prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction and an intra prediction unit (125) that performs intra prediction. It may determine whether to use inter prediction or perform intra prediction for a prediction unit, and determine specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. At this time, the processing unit in which the prediction is performed and the processing unit in which the prediction method and specific details are determined may be different. For example, the prediction method and prediction mode, etc. may be determined in the prediction unit, and the prediction may be performed in the transformation unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transformation unit (130). In addition, the prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value in the entropy encoding unit (165) and transmitted to the decoder. When using a specific encoding mode, it is also possible to encode the original block as is and transmit it to the decoding unit without generating a prediction block through the prediction unit (120, 125).
[0039] The inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous picture or the subsequent picture of the current picture, and in some cases, may predict a prediction unit based on information of a partially encoded area within the current picture. The inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
[0040] In the reference picture interpolation unit, reference picture information is received from memory (155), and pixel information of integer pixels or less can be generated from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 4 pixel units. In the case of chrominance signals, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 8 pixel units.
[0041] The motion prediction unit can perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit. Various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm) can be used to calculate motion vectors. Based on the interpolated pixels, the motion vector can have motion vector values in units of 1 / 2 or 1 / 4 pixels. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various motion prediction methods such as the Skip method, Merge method, AMVP (Advanced Motion Vector Prediction) method, and Intra Block Copy method can be used.
[0042] The intra prediction unit (125) can generate a prediction unit based on reference pixel information around the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block that has performed inter prediction, and the reference pixel is a pixel that has performed inter prediction, the reference pixel included in the block that has performed inter prediction can be replaced with the reference pixel information of the surrounding intra prediction block. That is, if the reference pixel is not available, the unavailable reference pixel information can be replaced with at least one of the available reference pixels.
[0043] In intra-prediction, the prediction mode may include a directional prediction mode that uses reference pixel information according to the prediction direction, and a non-directional mode that does not use directional information when performing the prediction. The mode for predicting luminance information and the mode for predicting chrominance information may be different, and the intra-prediction mode information used to predict luminance information or the predicted luminance signal information may be utilized to predict chrominance information.
[0044] When performing intra prediction, if the size of the prediction unit and the size of the transform unit are the same, intra prediction for the prediction unit can be performed based on the pixels to the left, the pixels at the top left, and the pixels at the top of the prediction unit. However, when performing intra prediction, if the size of the prediction unit and the size of the transform unit are different, intra prediction can be performed using reference pixels based on the transform unit. Additionally, intra prediction using NxN partitioning can be used only for the minimum encoding unit.
[0045] The intra prediction method can generate a prediction block after applying an Adaptive Intra Smoothing (AIS) filter to a reference pixel according to the prediction mode. The type of AIS filter applied to the reference pixel may vary. To perform the intra prediction method, the intra prediction mode of the current prediction unit can be predicted from the intra prediction modes of prediction units existing in the vicinity of the current prediction unit. When predicting the prediction mode of the current prediction unit using mode information predicted from neighboring prediction units, if the intra prediction modes of the current prediction unit and the neighboring prediction units are the same, information indicating that the prediction modes of the current prediction unit and the neighboring prediction units are the same can be transmitted using predetermined flag information; if the prediction modes of the current prediction unit and the neighboring prediction units are different, entropy coding can be performed to encode the prediction mode information of the current block.
[0046] Additionally, a residual block can be generated that includes residual value information, which is the difference between the prediction unit that performed the prediction based on the prediction unit generated in the prediction unit (120, 125) and the original block of the prediction unit. The generated residual block can be input to the conversion unit (130).
[0047] In the transformation unit (130), the residual block containing residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra-prediction mode information of the prediction unit used to generate the residual block.
[0048] The quantization unit (135) can quantize the values converted into the frequency domain in the conversion unit (130). The quantization coefficient may vary depending on the block or the importance of the image. The values produced by the quantization unit (135) may be provided to the inverse quantization unit (140) and the reordering unit (160).
[0049] The reordering unit (160) can perform reordering of coefficient values for quantized residual values.
[0050] The reordering unit (160) can convert two-dimensional block-shaped coefficients into one-dimensional vector forms through a coefficient scanning method. For example, the reordering unit (160) can convert the coefficients from DC to high-frequency range coefficients into one-dimensional vector forms by scanning using a Zig-Zag Scan method. Depending on the size of the conversion unit and the intra-prediction mode, a vertical scan that scans two-dimensional block-shaped coefficients in the column direction or a horizontal scan that scans two-dimensional block-shaped coefficients in the row direction may be used instead of the Zig-Zag Scan. That is, depending on the size of the conversion unit and the intra-prediction mode, it can be determined whether to use a Zig-Zag Scan, a vertical scan, or a horizontal scan.
[0051] The entropy encoding unit (165) can perform entropy encoding based on the values calculated by the reordering unit (160). Entropy encoding can use various encoding methods, such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
[0052] The entropy encoding unit (165) can encode various information from the reordering unit (160) and the prediction unit (120, 125), such as residual value coefficient information of the encoding unit, block type information, prediction mode information, division unit information, prediction unit information and transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information.
[0053] In the entropy encoding unit (165), the coefficient value of the encoding unit input from the reordering unit (160) can be entropy encoded.
[0054] In the inverse quantization unit (140) and inverse transformation unit (145), the values quantized in the quantization unit (135) are inverse quantized, and the values transformed in the transformation unit (130) are inverse transformed. The residual value generated in the inverse quantization unit (140) and inverse transformation unit (145) can be combined with the prediction unit predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.
[0055] The filter section (150) may include at least one of a deblocking filter, an offset correction section, and an ALF (Adaptive Loop Filter).
[0056] The deblocking filter can remove block distortion caused by boundaries between blocks in the restored picture. To determine whether to perform deblocking, the decision to apply the deblocking filter to the current block can be made based on the pixels contained in a certain number of columns or rows within the block. When applying the deblocking filter to a block, a Strong Filter or a Weak Filter can be applied depending on the required deblocking filtering strength. Additionally, when applying the deblocking filter, horizontal and vertical filtering can be processed in parallel.
[0057] The offset correction unit can correct the offset from the original image on a pixel-by-pixel basis for the image that has undergone deblocking. To perform offset correction for a specific picture, a method can be used in which pixels included in the image are divided into a certain number of regions, the region to be offset is determined, and the offset is applied to that region, or a method can be used in which the offset is applied by considering the edge information of each pixel.
[0058] Adaptive Loop Filtering (ALF) can be performed based on a comparison between the filtered restored image and the original image. After dividing the pixels included in the image into predetermined groups, a single filter to be applied to each group can be determined, allowing for differential filtering for each group. Information regarding whether to apply ALF can be transmitted per coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied may vary depending on each block. Additionally, an ALF filter of the same form (fixed form) may be applied regardless of the characteristics of the block to be applied.
[0059] The memory (155) can store a restored block or picture produced through the filter unit (150), and the stored restored block or picture can be provided to the prediction unit (120, 125) when performing inter-prediction.
[0061] FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present invention.
[0062] Referring to FIG. 2, the image decoder (200) may include an entropy decoder (210), a reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).
[0063] When a video bitstream is input to a video encoder, the input bitstream can be decoded using the reverse procedure of the video encoder.
[0064] The entropy decoding unit (210) can perform entropy decoding in the opposite procedure to that which the entropy encoding unit of the image encoder performed. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in correspondence with the method performed in the image encoder.
[0065] The entropy decoding unit (210) can decode information related to intra-prediction and inter-prediction performed in the encoder.
[0066] The reordering unit (215) can perform reordering based on the method of reordering the entropy-decoded bitstream in the encoding unit in the entropy decoding unit (210). It can reorder by restoring the coefficients expressed in the form of a one-dimensional vector back into coefficients in the form of a two-dimensional block. The reordering unit (215) can perform reordering by receiving information related to the coefficient scanning performed in the encoding unit and scanning in reverse based on the scanning order performed in the encoding unit.
[0067] The inverse quantization unit (220) can perform inverse quantization based on the coefficient values of the rearranged block and the quantization parameters provided by the encoder.
[0068] The inverse transform unit (225) can perform inverse transforms, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms, i.e., DCT, DST, and KLT, performed by the transform unit on the quantization result performed by the image encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit (225) of the image decoder, a transformation technique (e.g., DCT, DST, KLT) can be selectively performed according to multiple pieces of information such as a prediction method, the size of the current block, and the prediction direction.
[0069] The prediction unit (230, 235) can generate a prediction block based on the prediction block generation information provided by the entropy decoding unit (210) and the previously decoded block or picture information provided by the memory (245).
[0070] As described above, when performing intra prediction identical to the operation in the video encoder, if the size of the prediction unit and the size of the transform unit are the same, intra prediction for the prediction unit is performed based on the pixels to the left, the pixels to the top left, and the pixels to the top of the prediction unit; however, if the size of the prediction unit and the size of the transform unit are different when performing intra prediction, intra prediction can be performed using reference pixels based on the transform unit. Additionally, intra prediction using NxN partitioning only for the minimum encoding unit may also be used.
[0071] The prediction unit (230, 235) may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit receives various information, such as prediction unit information input from the entropy decoding unit (210), prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, distinguishes the prediction unit from the current encoding unit, and determines whether the prediction unit performs inter prediction or intra prediction. The inter prediction unit (230) may perform inter prediction for the current prediction unit based on information included in at least one picture, either the previous picture or the subsequent picture, of the current picture containing the current prediction unit, using information required for inter prediction of the current prediction unit provided by the video encoder. Alternatively, it may perform inter prediction based on information of a partially restored area within the current picture containing the current prediction unit.
[0072] To perform inter-prediction, based on the encoding unit, it is possible to determine whether the motion prediction method of the prediction unit included in the corresponding encoding unit is Skip Mode, Merge Mode, AMVP Mode, or Intra-Block Copy Mode.
[0073] The intra prediction unit (235) can generate a prediction block based on pixel information within the current picture. If the prediction unit is a prediction unit that has performed intra prediction, it can perform intra prediction based on the intra prediction mode information of the prediction unit provided by the image encoder. The intra prediction unit (235) may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixel of the current block, and can determine whether to apply the filter based on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixel of the current block using the prediction mode of the prediction unit and the AIS filter information provided by the image encoder. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0074] The reference pixel interpolation unit can generate a reference pixel of an integer value or less by interpolating the reference pixel when the prediction mode of the prediction unit is a prediction unit that performs intra-prediction based on the pixel value interpolated from the reference pixel. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is DC mode.
[0075] The restored block or picture may be provided to a filter unit (240). The filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.
[0076] Information regarding whether a deblocking filter has been applied to the corresponding block or picture can be received from the video encoder, and if a deblocking filter has been applied, information regarding whether a strong filter or a weak filter has been applied. The deblocking filter of the video decoder receives information related to the deblocking filter provided by the video encoder and can perform deblocking filtering on the corresponding block.
[0077] The offset correction unit can perform offset correction on the restored image based on the type of offset correction and offset value information applied to the image during encoding.
[0078] ALF can be applied to the encoding unit based on information on whether to apply ALF, ALF coefficient information, etc., provided by the encoder. This ALF information can be provided included in a specific parameter set.
[0079] The memory (245) can store the restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to the output unit.
[0080] As described above, in the embodiments of the present invention below, for convenience of explanation, the term "Coding Unit" is used as "encoding unit," but it may be a unit that performs not only encoding but also decoding.
[0081] Additionally, the current block represents a block to be encoded / decoded, and depending on the encoding / decoding stage, it may represent a coding tree block (or coding tree unit), an encoding block (or encoding unit), a conversion block (or conversion unit), or a prediction block (or prediction unit), etc.
[0083] A picture can be divided into square or non-square base blocks for encoding / decoding. In this case, the base block may be referred to as a Coding Tree Unit. A Coding Tree Unit may be defined as the largest encoding unit allowed in a sequence or slice. Information regarding whether a Coding Tree Unit is square or non-square, or the size of the Coding Tree Unit, may be signaled through a sequence parameter set, a picture parameter set, or a slice header. A Coding Tree Unit may be divided into smaller partitions. In this case, if the partition created by dividing a Coding Tree Unit is denoted as depth 1, the partition created by dividing a depth 1 partition may be defined as depth 2. That is, the partition created by dividing a depth k partition within a Coding Tree Unit may be defined as having depth k+1.
[0084] A partition of arbitrary size generated as a coding tree unit is divided can be defined as a coding unit. A coding unit may be recursively divided or divided into basic units for performing prediction, quantization, transformation, or in-loop filtering. For example, a partition of arbitrary size generated as a coding unit is divided can be defined as a coding unit, or as a transformation unit or a prediction unit, which is a basic unit for performing prediction, quantization, transformation, or in-loop filtering.
[0085] Partitioning of a coding tree unit or a coding unit may be performed based on at least one of a vertical line or a horizontal line. Additionally, the number of vertical lines or horizontal lines partitioning the coding tree unit or a coding unit may be at least one. For example, a coding tree unit or a coding unit may be divided into two partitions using one vertical line or one horizontal line, or a coding tree unit or a coding unit may be divided into three partitions using two vertical lines or two horizontal lines. Alternatively, a coding tree unit or a coding unit may be divided into four partitions with a length and width of 1 / 2 using one vertical line and one horizontal line.
[0086] When a coding tree unit or a coding unit is divided into multiple partitions using at least one vertical line or at least one horizontal line, the partitions may have a uniform size or different sizes. Alternatively, one partition may have a different size from the remaining partitions.
[0087] In the embodiments described below, it is assumed that the coding tree unit or coding unit is divided into a quad tree, triple tree, or binary tree structure. However, division of the coding tree unit or coding unit using a greater number of vertical lines or a greater number of horizontal lines is also possible.
[0088] FIG. 3 illustrates an example of hierarchically dividing coding blocks based on a tree structure as an embodiment to which the present invention is applied.
[0089] The input video signal is decoded in predetermined block units, and the basic unit for decoding the input video signal in this way is called a coding block. A coding block can be a unit that performs intra / inter prediction, transformation, and quantization. In addition, a prediction mode (e.g., intra-frame prediction mode or inter-frame prediction mode) is determined in units of coding blocks, and prediction blocks included in the coding block can share the determined prediction mode. A coding block may be a square or non-square block of any size within the range of 8x8 to 64x64, or a square or non-square block of 128x128, 256x256, or larger.
[0090] Specifically, coding blocks may be hierarchically partitioned based on at least one of a quad tree, a triple tree, and a binary tree. Here, quad tree-based partitioning may mean a method in which a 2Nx2N coding block is partitioned into 4 NxN coding blocks, triple tree-based partitioning may mean a method in which a single coding block is partitioned into 3 coding blocks, and binary tree-based partitioning may mean a method in which a single coding block is partitioned into 2 coding blocks. Even if triple tree partitioning or binary tree-based partitioning is performed, square coding blocks may exist in lower depths. Alternatively, after triple tree partitioning or binary tree-based partitioning is performed, the generation of square coding blocks in lower depths may be restricted.
[0091] Binary tree-based partitioning may be performed symmetrically or asymmetrically. Coding blocks partitioned based on a binary tree may be square blocks or non-square blocks such as rectangles. For example, partition types that allow binary tree-based partitioning may include at least one of symmetric 2NxN (horizontal non-square coding units) or Nx2N (vertical non-square coding units), and asymmetric nLx2N, nRx2N, 2NxnU, or 2NxnD, as shown in the example in FIG. 4.
[0092] Binary tree-based partitioning may restrictively allow only one of symmetric or asymmetric partitions. In this case, configuring the coding tree units into square blocks corresponds to quad tree CU partitioning, and configuring the coding tree units into symmetric non-square blocks corresponds to binary tree partitioning. configuring the coding tree units into square blocks and symmetric non-square blocks corresponds to quad and binary tree CU partitioning.
[0093] Binary tree-based splitting can be performed on coding blocks where quad tree-based splitting is no longer performed. For coding blocks split based on binary trees, at least one of quad tree-based splitting, triple tree-based splitting, or binary tree-based splitting can be configured so that it is no longer performed.
[0094] Alternatively, for coding blocks partitioned based on a binary tree, triple tree-based partitioning or binary tree-based partitioning may be allowed, but only one of horizontal or vertical partitioning may be allowed restrictively.
[0095] For example, depending on the location, index, shape, and additional partitioning shape of neighboring partitions of the coding blocks partitioned based on a binary tree, additional partitioning or additional partitioning directions may be restricted for the coding blocks partitioned based on a binary tree. For example, when the index of the coding block with the earlier coding order among two coding blocks created by binary tree-based partitioning is 0 (hereinafter, coding block index 0) and the index of the coding block with the later coding order is 1 (hereinafter, coding block index 1), if binary tree-based partitioning is applied to both the coding blocks with coding block index 0 and coding block index 1, the binary tree-based partitioning direction of the coding block with coding block index 1 may be determined according to the binary tree-based partitioning direction of the coding block with coding block index 0. Specifically, if the binary tree-based partitioning direction of a coding block with a coding block index of 0 is to partition the coding block with a coding block index of 0 into square partitions, the binary tree-based partitioning of a coding block with a coding block index of 1 may be restricted to have a different direction from the binary tree-based partitioning of the coding block with a coding block index of 1. That is, it may be restricted for both coding blocks with a coding block index of 0 and coding block index of 1 to be partitioned into square partitions. In this case, the encoding / decoding of information indicating the binary tree partitioning direction of the coding block with a coding block index of 1 may be omitted. This is because partitioning both coding blocks with a coding block index of 0 and coding block index of 1 into square partitions has the same effect as partitioning the upper depth block based on a quad tree, and allowing both coding block index of 0 and coding block index of 1 to be partitioned into square partitions is not desirable in terms of encoding efficiency.
[0096] Triple tree-based partitioning refers to dividing a coding block into three partitions in a horizontal or vertical direction. All three partitions created by triple tree-based partitioning may have different sizes. Alternatively, two of the partitions created by triple tree-based partitioning may have the same size, while the remaining one has a different size. For example, the width or height ratio of the partitions created as the coding block is divided may be set to 1:n:1, 1:1:n, n:1:1, or m:n:1 depending on the direction of division. Here, m and n can be real numbers greater than 1 or integers such as 2.
[0097] Triple tree-based splitting can be performed on coding blocks where quad tree-based splitting is no longer performed. For coding blocks split based on triple trees, at least one of quad tree-based splitting, triple tree-based splitting, or binary tree-based splitting can be configured so that it is no longer performed.
[0098] Alternatively, for coding blocks partitioned based on a triple tree, triple tree-based partitioning or binary tree-based partitioning may be allowed, but only one of horizontal or vertical partitioning may be allowed restrictively.
[0099] For example, depending on the location, index, shape, size, and additional splitting form of neighboring partitions of the coding blocks partitioned based on a triple tree, additional splitting or additional splitting directions for the coding blocks partitioned based on a triple tree may be restricted. For example, for the largest partition among the coding blocks generated by the triple tree-based partitioning, either horizontal splitting or vertical splitting may be restricted. Specifically, for the largest partition among the coding blocks generated by the triple tree-based partitioning, binary tree splitting in the same direction as the triple tree splitting direction of the upper depth partition or triple tree splitting in the same direction may not be allowed. In this case, for the largest partition among the coding blocks partitioned based on a triple tree, the encoding / decoding of information indicating the binary tree splitting direction or the triple tree splitting direction may be omitted.
[0100] Binary tree or triple tree-based partitioning may be restricted depending on the size or shape of the current block. Here, the size of the current block may be expressed based on at least one of the current block's width, height, minimum / maximum value of width / height, the sum of the width and height, the product of the width and height, or the number of samples included in the current block. For example, if at least one of the current block's width or height is greater than a predefined value, binary tree or triple tree-based partitioning may not be allowed. Here, the predefined value may be an integer such as 16, 32, 64, or 128. For another example, if the ratio of the current block's width to height is greater than a predefined value or smaller than a predefined value, binary tree or triple tree-based partitioning may not be allowed. If the predefined value is 1, binary tree or triple tree-based partitioning may be allowed only if the current block is a square block with equal width and height.
[0101] The partitioning of lower depths may be determined dependently on the partitioning form of upper depths. For example, if binary tree-based partitioning is allowed in two or more depths, only binary tree-based partitioning of the same form as the binary tree partitioning form of upper depths may be allowed in lower depths. For instance, if binary tree-based partitioning of a 2NxN form is performed in upper depths, binary tree-based partitioning of a 2NxN form may also be performed in lower depths. Alternatively, if binary tree-based partitioning of an Nx2N form is performed in upper depths, binary tree-based partitioning of an Nx2N form may also be allowed in lower depths.
[0102] Conversely, at lower depths, it is also possible to allow only binary tree-based partitions that are different from the binary tree partitioning form at higher depths.
[0103] For a sequence, slice, coding tree unit, or coding unit, it may be restricted so that only specific forms of binary tree-based partitioning or specific forms of triple tree-based partitioning are used. For example, for a coding tree unit, it may be restricted so that only 2NxN or Nx2N forms of binary tree-based partitioning are allowed. The allowed partition forms may be predefined in the encoder or decoder, or information regarding the allowed or disallowed partition forms may be encoded and signaled through the bitstream.
[0104] FIG. 5 is a diagram showing an example where only specific forms of binary tree-based partitioning are allowed. FIG. 5(a) shows an example where only Nx2N forms of binary tree-based partitioning are allowed, and FIG. 5(b) shows an example where only 2NxN forms of binary tree-based partitioning are allowed. To implement the quad tree or binary tree-based adaptive partitioning, information indicating quad tree-based partitioning, information regarding the size / depth of coding blocks where quad tree-based partitioning is allowed, information indicating binary tree-based partitioning, information regarding the size / depth of coding blocks where binary tree-based partitioning is allowed, information regarding the size / depth of coding blocks where binary tree-based partitioning is not allowed, or information regarding whether the binary tree-based partitioning is vertical or horizontal may be used.
[0105] In addition, for a coding tree unit or a predetermined coding unit, the number of times binary tree splitting / triple tree splitting is allowed, the depth at which binary tree splitting / triple tree splitting is allowed, or the number of depths at which binary tree splitting / triple tree splitting is allowed can be obtained. The above information can be encoded in units of coding tree units or coding units and transmitted to a decoder via a bitstream.
[0106] For example, the syntax 'max_binary_depth_idx_minus1', which indicates the maximum depth at which binary tree splitting is allowed, can be encoded / decoded through the bitstream. In this case, max_binary_depth_idx_minus1+1 may indicate the maximum depth at which binary tree splitting is allowed.
[0107] Looking at the example illustrated in FIG. 6, it is shown that binary tree splitting is performed for a coding unit of depth 2 and a coding unit of depth 3. Accordingly, at least one of information indicating the number of times binary tree splitting is performed within a coding tree unit (2 times), information indicating the maximum depth (depth 3) at which binary tree splitting is allowed within a coding tree unit, or information indicating the number of depths (2, depth 2 and depth 3) at which binary tree splitting is allowed within a coding tree unit can be encoded / decoded through a bitstream.
[0108] As another example, at least one of the number of times binary tree splitting / triple tree splitting is allowed, the depth at which binary tree splitting / triple tree splitting is allowed, or the number of depths at which binary tree splitting / triple tree splitting is allowed may be obtained per sequence, picture, or slice. For example, the information may be encoded per sequence, picture, or slice and transmitted via a bitstream. Alternatively, the depth at which binary tree splitting / triple tree splitting is allowed or the number of depths at which binary tree splitting / triple tree splitting is allowed may be predefined per sequence, picture, or slice. Accordingly, at least one of the number of binary tree / triple tree splitting, the maximum depth at which binary tree / triple tree splitting is allowed, or the number of depths at which binary tree / triple tree splitting is allowed may differ between the first slice and the second slice. For example, in the first slice, binary tree splitting is allowed at only one depth, whereas in the second slice, binary tree splitting may be allowed at two depths.
[0109] As another example, at least one of the number of times binary tree / triple tree splitting is allowed, the depth at which binary tree / triple tree splitting is allowed, or the number of depths at which binary tree / triple tree splitting is allowed may be set differently depending on the Temporal ID of the slice or picture. Here, the Temporal ID is intended to identify each of multiple layers of an image having at least one scalability among view, spatial, temporal, or quality.
[0110] As illustrated in FIG. 3, a first coding block 300 with a split depth of k can be divided into a plurality of second coding blocks based on a quad tree. For example, the second coding blocks 310 to 340 are square blocks with a size half the width and height of the first coding block, and the split depth of the second coding blocks can be increased to k+1.
[0111] A second coding block 310 with a division depth of k+1 can be divided into a plurality of third coding blocks with a division depth of k+2. The division of the second coding block 310 can be performed by selectively using either a quad tree or a binary tree depending on the division method. Here, the division method can be determined based on at least one of information indicating division based on a quad tree or information indicating division based on a binary tree.
[0112] When the second coding block 310 is divided based on a quotate tree, the second coding block 310 is divided into four third coding blocks 310a, each having half the width and height of the second coding block, and the division depth of the third coding blocks 310a can be increased to k+2. On the other hand, when the second coding block 310 is divided based on a binary tree, the second coding block 310 can be divided into two third coding blocks. In this case, each of the two third coding blocks is a non-square block having half the width or height of the second coding block, and the division depth can be increased to k+2. The second coding block can be determined as a horizontal or vertical non-square block depending on the division direction, and the division direction can be determined based on information regarding whether the binary tree-based division is vertical or horizontal.
[0113] Meanwhile, the second coding block 310 may be determined as a terminal coding block that is no longer divided based on a quad tree or a binary tree, and in this case, the coding block may be used as a prediction block or a transformation block.
[0114] The third coding block 310a may be determined as a terminal coding block, similar to the division of the second coding block 310, or may be further divided based on a quad tree or a binary tree.
[0115] Meanwhile, the third coding block 310b, which is divided based on a binary tree, may be further divided into a vertical coding block (310b-2) or a horizontal coding block (310b-3) based on a binary tree, and the division depth of the coding block may be increased to k+3. Alternatively, the third coding block 310b may be determined as a terminal coding block (310b-1) that is no longer divided based on a binary tree, in which case the coding block (310b-1) may be used as a prediction block or a transformation block. However, the above-described division process may be performed restrictively based on at least one of information regarding the size / depth of a coding block that allows quad tree-based division, information regarding the size / depth of a coding block that allows binary tree-based division, or information regarding the size / depth of a coding block that does not allow binary tree-based division.
[0116] The size that a coding block may have may be limited to a predetermined number, or the size of a coding block within a predetermined unit may have a fixed value. For example, the size of a coding block within a sequence or the size of a coding block within a picture may be limited to 256x256, 128x128, or 32x32. Information indicating the size of a coding block within a sequence or picture may be signaled through a sequence header or a picture header.
[0117] As a result of partitioning based on quad trees, binary trees, and triple trees, the coding unit can take the form of a square or a rectangle of arbitrary size.
[0119] A coding block can be encoded / decoded using at least one of a skip mode, intra-frame prediction, inter-frame prediction, or skip method.
[0120] As another example, intra-prediction or inter-prediction can be performed in units of the same size as or smaller than the coding block through the partitioning of the coding block. To this end, once the coding block is determined, the prediction block can be determined through the prediction partitioning of the coding block. The prediction partitioning of the coding block can be performed by a Part_mode that indicates the form of the coding block's partitioning. The size or shape of the prediction block can be determined according to the coding block's Part_mode. For example, the size of the prediction block determined by the Part_mode can have a value equal to or smaller than the size of the coding block.
[0121] Figure 7 is a diagram illustrating a partition mode that can be applied to a coding block when the coding block is encoded by cross-frame prediction.
[0122] When a coding block is encoded by cross-frame prediction, any one of the eight partition modes may be applied to the coding block, as in the example shown in FIG. 7.
[0123] If a coding block is encoded by in-screen prediction, the coding block may have a partition mode PART_2Nx2N or PART_NxN applied.
[0124] PART_NxN may be applied when the coding block has a minimum size. Here, the minimum size of the coding block may be predefined in the encoder and decoder. Alternatively, information regarding the minimum size of the coding block may be signaled via a bitstream. For example, the minimum size of the coding block may be signaled via a slice header, and accordingly, the minimum size of the coding block may be defined per slice.
[0125] Generally, the size of the prediction block can range from 64x64 to 4x4. However, if the coding block is encoded as an inter-frame prediction, the prediction block may not have a size of 4x4 in order to reduce memory bandwidth when performing motion compensation.
[0127] FIG. 8 illustrates a type of intra-prediction mode pre-defined in an image encoder / decoder as an embodiment to which the present invention is applied.
[0128] The video encoder / decoder can perform intra prediction using any one of the predefined intra prediction modes. The predefined intra prediction modes for intra prediction may consist of non-directional prediction modes (e.g., Planar mode, DC mode) and 33 directional prediction modes.
[0129] Alternatively, to increase the accuracy of intra prediction, a greater number of directional prediction modes than 33 may be used. That is, M extended directional prediction modes may be defined by further subdividing the angle of the directional prediction mode (M>33), or a directional prediction mode with a predetermined angle may be derived and used by utilizing at least one of the 33 predefined directional prediction modes.
[0130] Specifically, a larger number of intra prediction modes than the 35 intra prediction modes shown in FIG. 8 may be used. Using a larger number of intra prediction modes than the 35 intra prediction modes shown in FIG. 8 may be referred to as an extended intra prediction mode.
[0131] FIG. 9 is an example of an extended intra prediction mode, which may consist of two non-directional prediction modes and 65 extended directional prediction modes. The extended intra prediction mode may be used equally for the luminance component and the chrominance component, or a different number of intra prediction modes may be used for each component. For example, 67 extended intra prediction modes may be used for the luminance component and 35 intra prediction modes for the chrominance component.
[0132] Alternatively, intra prediction may be performed using a different number of intra prediction modes depending on the color difference format. For example, in the case of a 4:2:0 format, 67 intra prediction modes may be used for the luminance component and 35 intra prediction modes may be used for the color difference component, and in the case of a 4:4:4 format, 67 intra prediction modes may be used for both the luminance and color difference components.
[0133] Alternatively, intra prediction may be performed using a different number of intra prediction modes depending on the size and / or shape of the block. That is, depending on the size and / or shape of the PU or CU, intra prediction may be performed using 35 intra prediction modes or 67 intra prediction modes. For example, if the size of the CU or PU is smaller than 64x64 or is an asymmetric partition, intra prediction may be performed using 35 intra prediction modes, and if the size of the CU or PU is equal to or greater than 64x64, intra prediction may be performed using 67 intra prediction modes. Intra_2Nx2N, 65 directional intra prediction modes may be allowed, and in Intra_NxN, only 35 directional intra prediction modes may be allowed.
[0134] The size of the block to which the extended intra prediction mode is applied may be set differently for each sequence, picture, or slice. For example, in the first slice, the extended intra prediction mode may be set to be applied to blocks larger than 64x64 (e.g., CU or PU), and in the second slice, the extended intra prediction mode may be set to be applied to blocks larger than 32x32. Information indicating the size of the block to which the extended intra prediction mode is applied may be signaled on a sequence, picture, or slice basis. For example, information indicating the size of the block to which the extended intra prediction mode is applied may be defined as 'log2_extended_intra_mode_size_minus4', which is obtained by taking the logarithm of the block size and subtracting the integer 4. For example, a value of log2_extended_intra_mode_size_minus4 of 0 indicates that the extended intra prediction mode can be applied to blocks with a size of 16x16 or larger, or blocks with a size larger than 16x16, and a value of log2_extended_intra_mode_size_minus4 of 1 indicates that the extended intra prediction mode can be applied to blocks with a size of 32x32 or larger, or blocks with a size larger than 32x32.
[0135] As described above, the number of intra-prediction modes can be determined by considering at least one of the chrominance component, the chrominance format, and the size or shape of the block. Not limited to the examples described, the intra-prediction mode candidates (e.g., the number of MPMs) used to determine the intra-prediction mode of the block to be encoded / decoded may also be determined according to at least one of the chrominance component, the chrominance format, and the size or shape of the block. Furthermore, it is possible to use a greater number of intra-prediction modes than those shown in FIG. 8. For example, it is possible to further subdivide the directional prediction mode shown in FIG. 8 to use 129 directional prediction modes and 2 non-directional prediction modes. Whether to use a greater number of intra-prediction modes than those shown in FIG. 8 can be determined by considering at least one of the chrominance component, the chrominance component, and the size or shape of the block, as in the example described above.
[0136] Referring to the drawings described below, we will examine a method for determining an intra prediction mode of a block to be encoded / decoded and a method for performing intra prediction using the determined intra prediction mode.
[0137] FIG. 10 is a flowchart schematically illustrating an intra-prediction method as an embodiment to which the present invention is applied.
[0138] First, a reference sample line index of the current block can be determined (S1010). The reference sample line index can be used to determine a reference sample line used to perform intra prediction of the current block. Among a plurality of reference sample lines, at least one reference sample line indicated by the reference sample line index can be used to perform intra prediction of the current block.
[0139] FIG. 11 is a drawing illustrating multiple reference sample lines.
[0140] The Nth reference sample line may include a top reference sample whose y-coordinate is N smaller than the top row of the current block and a left reference sample whose x-coordinate is N smaller than the leftmost column of the current block. Here, the Nth reference sample line represents the reference sample line with index N-1 in the example illustrated in FIG. 11. The Nth reference sample line may include top reference samples from P(-N, -N) to P(2W+N-1, -N) and left reference samples from P(-N, -N) to P(-N, 2H+N-1). As an example, reference sample line 1 may include top reference samples from P(-2, _2) to P(2W+1, -2) and left reference samples from P(-2, -2) to P(-2, 2H+1).
[0141] The number of reference sample lines that can be used as reference sample line candidates may be two, three, four, or more. For example, in the example illustrated in FIG. 11, reference sample line 0, reference sample line 1, and reference sample line 3 may be used as reference sample line candidates.
[0142] The number of reference sample lines or the location of reference sample lines that can be used as reference sample line candidates may be determined based on at least one of the size, shape, intra-prediction mode, or location of the current block. For example, if the current block is located adjacent to the boundary of a CTU or the boundary of a tile, the number of reference sample line candidates may be determined to be one (e.g., reference sample line 0). If the current block is not located adjacent to the boundary of a CTU or the boundary of a tile, the number of reference sample line candidates may be determined to be three (e.g., reference sample line 0, reference sample line 1, and reference sample line 3). For example, if the intra-prediction mode of the current block falls within a first range, reference sample line 0, reference sample line 1, and reference sample line 3 may be used as reference sample line candidates. If the intra-prediction mode of the current block falls within a second range, reference sample line 0, reference sample line 2, and reference sample line 2 may be used as reference sample line candidates.
[0143] Information for selecting at least one of a plurality of reference sample lines can be signaled through a bitstream. If the index information is not encoded, reference sample line 0 adjacent to the current block may be considered as selected.
[0144] Alternatively, at least one of a plurality of reference sample lines may be selected based on the size, shape, location, or intra-prediction mode of the current block. For example, if at least one of the width, height, or size of the current block is smaller than a predefined value, reference sample line 0 may be selected. For example, if the current block touches the top boundary of a CTU or tile, reference sample line 0 may be selected.
[0145] Alternatively, a reference sample line can be selected based on whether the current block is divided into sub-blocks. For example, if the current block is divided into sub-blocks, reference sample line 0 can be selected.
[0146] Alternatively, if the current block is divided into multiple sub-blocks, a reference sample line can be determined for each sub-block. Or, it can be defined so that all sub-blocks have the same reference sample line index.
[0147] If the current block is divided into multiple sub-blocks, intra prediction can be performed on a sub-block basis.
[0148] Multiple reference sample lines may be selected for the current block. Whether to perform intra prediction using multiple reference sample lines may be adaptively determined based on the size, shape, or intra prediction mode of the current block. For example, if the intra prediction mode of the current block is a non-directional prediction mode or a predefined directional intra prediction mode, multiple reference sample lines may not be used. The predefined directional intra prediction mode may include at least one of a vertical intra prediction mode, a horizontal intra prediction mode, or a diagonal intra prediction mode.
[0149] Multiple reference sample lines may include a reference sample line selected by index information and a reference sample line obtained by adding or subtracting a value previously defined at the index of the reference sample line. Here, the previously defined value may be 1 or 2.
[0150] Alternatively, multiple index information may be signaled through a BIS stream. Each of the multiple index information points to a different reference sample line.
[0151] Predicted samples may be obtained based on at least one of a weighted sum operation, an average operation, a minimum operation, or a maximum operation of multiple reference samples. Here, the index of a reference sample line containing at least one of the multiple reference samples may be different from the index of a reference sample line containing the remainder.
[0152] Next, the intra prediction mode of the current block can be determined (S1020).
[0153] To determine the intra-predicted mode of the current block, a Most Probable Mode (MPM) candidate can be derived based on the intra-predicted mode of a neighbor block adjacent to the current block. Here, the neighbor block may include at least one of the blocks adjacent to the top, bottom, left, right, or corner of the current block. For example, an MPM candidate can be derived based on the intra-predicted mode of the top neighbor block and the intra-predicted mode of the left neighbor block. The top neighbor block may include a top neighbor sample at a predefined location whose y-coordinate value is smaller than the top row of the current block. The predefined location may be (0, -1), (W / 2, -1), (W-1, -1), or (W, -1). (0, 0) represents the location of the top-left sample included in the current block, and W represents the width of the current block. The left neighbor block may include a left neighbor sample at a predefined location whose x-coordinate value is smaller than the leftmost column of the current block. The predefined location can be (-1, 0), (-1, H / 2), (-1, H-1), or (-1, H). H represents the height of the current block. If neighboring blocks are encoded in inter-prediction mode, MPM candidates may be included using the intra-prediction mode of the neighboring block or the collocated block of the current block.
[0154] The number of MPM (Most Probable Mode) candidates included in the candidate list may be 3, 4, 5, 6, or more. The maximum number of MPM candidates may be a fixed value pre-set in the video encoder / decoder. Alternatively, the maximum number of MPM candidates may be determined based on the attributes of the current block. The attributes may include at least one of the position / size / shape of the current block, the number / type of intra-prediction modes available to the current block, the color type (luma / chroma) of the current block, the color difference format of the current block, and whether the current block is divided into multiple sub-blocks. Alternatively, information indicating the maximum number of MPM candidates may be signaled via a bitstream. The information indicating the maximum number may be signaled at at least one of the sequence level, picture level, slice level, or block level.
[0155] The intra prediction mode of a neighboring block, a directional intra prediction mode similar to a neighboring block, or a default mode may be set as MPM candidates. A directional intra prediction mode similar to a neighboring block may be derived by adding or subtracting a predefined value from the intra prediction mode of a neighboring block. The predefined value may be an integer of 1, 2, or more. The predefined value may be adaptively determined based on the number of available intra prediction modes. For example, if the number of available intra prediction modes is 35, the predefined value may be set to 1, and if the number of available intra prediction modes is 67, the predefined value may be set to 2. Furthermore, if the number of available intra prediction modes is 131, the predefined value may be set to 4. If both the intra prediction mode of the first neighbor block and the intra prediction mode of the second neighbor block are directional prediction modes, a similar directional intra prediction mode can be derived based on the maximum value among the intra prediction mode of the first neighbor block and the intra prediction mode of the second neighbor block. The default mode may include at least one of DC mode, planner mode, horizontal direction prediction mode, vertical direction prediction mode, upper right diagonal direction mode, lower left diagonal direction mode, or upper left diagonal direction mode. If the number of MPM candidates included in the MPM candidate list is less than the maximum number, a default mode different from the MPM candidate already inserted in the MPM candidate list may be inserted into the MPM candidate list. The number, type, or priority of the default mode may vary depending on at least one of the reference sample line index of the current block, whether a sub-block unit intra prediction technique is applied to the current block, or the partition type of the current block.
[0156] MPM candidate indices can be determined according to a predefined order. For example, if the intra prediction mode of the left neighbor block and the intra prediction mode of the top neighbor block are different, the intra prediction mode of the left neighbor block may have a smaller index value than the intra prediction mode of the top neighbor block.
[0157] Alternatively, MPM candidate indices can be determined based on the size / shape of the current block. For example, if the current block is non-rectangular where the height is greater than the width, the intra-prediction mode of the top neighbor block may have a smaller index value than the intra-prediction mode of the left neighbor block.
[0158] When the extended intra prediction mode and the predefined 35 intra prediction modes are optionally used, MPM candidates can be derived by converting the intra prediction mode of a neighboring block into an index corresponding to the extended intra prediction mode or into an index corresponding to the 35 intra prediction modes. For the conversion of the index, a predefined table may be used, or a scaling operation based on a predetermined value may be used. Here, the predefined table may define the mapping relationship between different intra prediction mode groups (e.g., the extended intra prediction mode and the 35 intra prediction modes).
[0159] For example, if the left peripheral block uses 35 intra prediction modes and the left peripheral block's intra prediction mode is 10 (horizontal mode), this can be converted to index 18, which corresponds to the horizontal mode in the extended intra prediction mode.
[0160] Alternatively, if the upper surrounding block uses an extended intra prediction mode and the intra prediction mode index of the upper surrounding block is 50 (vertical mode), this can be converted to an index of 26 corresponding to the vertical mode in 35 intra prediction modes.
[0161] If the index of the reference sample line selected through step S1010 is greater than or equal to a predefined value, the candidate list may be configured not to include DC mode and / or planner mode. The predefined value may be an integer greater than or equal to 1.
[0162] When the current block is divided into multiple sub-blocks, the current candidate list can be configured not to include a DC mode. Additionally, the candidate list may include a default mode. In this case, the number or types of default modes may vary depending on the division form of the current block.
[0163] Information indicating whether an MPM candidate identical to the current block's intra prediction mode is included in the candidate list can be signaled via a bitstream. If the information indicates the existence of an MPM candidate identical to the current block's intra prediction mode, index information specifying one of the MPM candidates included in the candidate list can be signaled via a bitstream. The MPM candidate specified by the index information can be set as the current block's intra prediction mode. If the encoding / signaling of the information is omitted, it can be determined that an MPM candidate identical to the current block's intra prediction mode is included in the candidate list.
[0164] On the other hand, if the above information indicates that there is no MPM candidate identical to the intra prediction mode of the current block, residual mode information may be signaled via a bitstream. The residual mode information is used to specify one of the remaining intra prediction modes, excluding the MPM candidates included in the candidate list. Using the above residual mode information, the intra prediction mode of the current block can be determined. If the above information indicates that there is no MPM candidate identical to the intra prediction mode of the current block, the MPM candidates may be reordered in ascending order. Subsequently, the mode value indicated by the residual mode information may be sequentially compared with the reordered MPM candidates to derive the intra prediction mode of the current block. For example, if the mode value indicated by the residual mode information is less than or equal to that of a reordered MPM candidate, 1 may be added to the mode value. If there is no MPM candidate less than or equal to the updated mode value, the updated mode value may be determined as the intra prediction mode of the current block.
[0165] If the index of the reference sample line selected through step S1010 is greater than or equal to a predefined value, the encoding of the information may be omitted. Accordingly, if the index of the reference sample line is greater than or equal to a predefined value, the intra prediction mode of the current block may be set to an MPM candidate indicated by the index information.
[0166] As previously discussed, if the index of the reference sample line is greater than or equal to a predefined value, the candidate list can be configured not to include DC mode and / or planner mode. Accordingly, if the index of the reference sample line is greater than or equal to a predefined value, DC mode and / or planner mode may not be available for the current block.
[0167] If the current block is divided into multiple sub-blocks, the multiple sub-blocks may share the intra prediction mode of the current block. Alternatively, the intra prediction mode may be determined for each sub-block. For example, the information and / or residual mode may be encoded / decoded for each sub-block. Alternatively, information indicating whether the intra prediction mode of a sub-block is the same as that of a sub-block for which encoding / decoding was completed may be signaled via a bitstream. Alternatively, the intra prediction mode of the current sub-block may be derived by adding / subtracting an offset from the intra prediction mode of a sub-block for which encoding / decoding was completed.
[0168] If the current block is divided into multiple sub-blocks, the encoding of the above information may be omitted. Accordingly, if the current blocks are divided into multiple sub-blocks, the intra prediction mode of the current block may be set to an MPM candidate indicated by the index information.
[0169] Multiple sub-blocks can share the intra-prediction mode of the current block.
[0170] The intra-prediction modes of the luminance component and the chrominance component, respectively, can be determined independently of each other. Alternatively, the intra-prediction mode of the chrominance component can be determined dependently on the intra-prediction mode of the luminance component.
[0171] Specifically, the intra-prediction mode of the color difference component can be determined based on the intra-prediction mode of the luminance component as shown in Table 1 below.
[0172] Intra_chroma_pred_mode [xCb][yCb] IntraPredModeY[xCb][yCb] 0 26 10 1 X(0<=X<=34) 0 34 0 0 0 0 1 26 34 26 26 26 2 10 10 34 10 10 3 1 1 1 34 1 4 0 26 10 1 X
[0173] In Table 1, intra_chroma_pred_mode refers to information signaled to specify the intra-prediction mode of the chroma difference component, and IntraPredModeY represents the intra-prediction mode of the luminance component.
[0174] Next, reference samples for the current block can be derived (S1030). For example, if the Nth reference sample line is selected through step S1010, upper reference samples from P(-N, -N) to P(2W+N-1, -N) and left reference samples from P(-N, -N) to P(-N, 2H+N-1) can be derived.
[0175] The reference sample may be derived from a reconstructed sample that was encoded / decoded before the current block. The reconstructed sample may refer to a state before the in-loop filter is applied or a state after the in-loop filter is applied.
[0176] A predetermined intra-filter may be applied to reference samples. Filtering reference samples using an intra-filter may be referred to as reference sample smoothing. The intra-filter may include at least one of a first intra-filter applied in a horizontal direction or a second intra-filter applied in a vertical direction. Depending on the position of the reference sample, either the first intra-filter or the second intra-filter may be selectively applied. Alternatively, two intra-filters may be applied redundantly to a single reference sample. The filter coefficients of at least one of the first intra-filter or the second intra-filter may be (1, 2, 1), but are not limited thereto.
[0177] The filtering described above may be performed adaptively based on at least one of the intra-prediction mode of the current block or the size of the transformation block related to the current block. For example, if the intra-prediction mode of the current block is DC mode, vertical mode, or horizontal mode, filtering may not be performed. If the size of the transformation block is NxM, filtering may not be performed. Here, N and M may be the same or different values, and may be any one of 4, 8, 16, or greater. For example, if the size of the transformation block is 4x4, filtering may not be performed. Alternatively, whether to perform filtering may be determined based on the result of a comparison between the difference between the intra-prediction mode of the current block and the vertical mode (or horizontal mode) and a pre-defined threshold. For example, filtering may be performed only if the difference between the intra-prediction mode of the current block and the vertical mode is greater than the threshold. The threshold may be defined for each size of the transformation block as shown in Table 2.
[0178] 8x8 transform 16x16 transform 32x32 transform Threshold 7 1 0
[0179] The above intra-filter may be determined as any one of a plurality of pre-defined intra-filter candidates in the image encoder / decoder. To this end, a separate index specifying the intra-filter of the current block among the plurality of intra-filter candidates may be signaled. Alternatively, the intra-filter may be determined based on at least one of the size / shape of the current block, the size / shape of the transform block, information regarding filter strength, or the variation of surrounding samples.
[0180] Next, intra prediction can be performed using the intra prediction mode of the current block and a reference sample (S1040).
[0181] Predicted samples can be obtained using the intra-prediction mode of the current block and reference samples. If multiple reference sample lines are selected, predicted samples can be obtained based on a weighted sum or average operation of reference samples belonging to different reference sample lines. For example, predicted samples can be derived based on a weighted sum operation of a first reference sample belonging to a first reference sample line and a second reference sample belonging to a second reference sample line. In this case, the weights applied to the first reference sample and the second reference sample may have the same value. Alternatively, the weights applied to each reference sample can be determined based on the distance between the target sample and the reference samples. For example, among the first and second reference samples, the weight applied to the reference sample that is closer to the target sample may have a greater value than the weight applied to the other reference sample.
[0182] However, in the case of intra prediction, since boundary samples of surrounding blocks are used, a problem may arise where the quality of the predicted image deteriorates. Therefore, a correction process for the prediction samples generated through the prediction process described above may be further included, and this will be examined in detail below with reference to FIG. 12. However, the correction process described below is not limited to being applied only to intra prediction samples, and it is of course possible to apply it to inter prediction samples or reconstructed samples as well.
[0184] FIG. 12 illustrates a method for correcting a prediction sample of a current block based on difference information of surrounding samples as an embodiment to which the present invention is applied.
[0185] Predicted samples of the current block can be corrected based on differential information of multiple surrounding samples for the current block. The correction may be performed on all predicted samples belonging to the current block, or only on predicted samples belonging to a predetermined partial region. The partial region may be a single row / column or multiple rows / columns, and may be a pre-configured region for correction in the image encoder / decoder. For example, correction may be performed on a single row / column located at the boundary of the current block or on multiple rows / columns from the boundary of the current block. Alternatively, the partial region may be variably determined based on at least one of the size / shape of the current block or an intra-prediction mode.
[0186] Neighboring samples may belong to at least one of the neighboring blocks located at the top, left, or top-left corners of the current block. The number of neighboring samples used for correction may be 2, 3, 4, or more. The positions of the neighboring samples may be variably determined based on the position of the prediction sample to be corrected within the current block. Alternatively, some of the neighboring samples may have fixed positions regardless of the position of the prediction sample to be corrected, while the remainder may have variable positions based on the position of the prediction sample to be corrected.
[0187] The difference information of surrounding samples may refer to a difference sample between surrounding samples, or it may refer to a value obtained by scaling the difference sample by a predetermined constant value (e.g., 1, 2, 3, etc.). Here, the predetermined constant value may be determined by considering the position of the prediction sample to be corrected, the position of the column or row to which the prediction sample to be corrected belongs, the position of the prediction sample within the column or row, etc.
[0188] For example, if the intra prediction mode of the current block is vertical mode, the final prediction sample can be obtained using the difference sample between the neighboring sample p(-1,y) adjacent to the left boundary of the current block and the upper-left neighboring sample p(-1,-1) as shown in the following Equation 1.
[0189]
[0190] For example, if the intra prediction mode of the current block is horizontal mode, the final prediction sample can be obtained using the difference sample between the neighboring sample p(x,-1) adjacent to the top boundary of the current block and the top-left neighboring sample p(-1,-1) as shown in the following Equation 2.
[0191]
[0192] For example, if the intra prediction mode of the current block is vertical mode, the final prediction sample can be obtained using a difference sample between the neighboring sample p(-1,y) adjacent to the left boundary of the current block and the top-left neighboring sample p(-1,-1). At this time, the difference sample may be added to the prediction sample, or the difference sample may be scaled by a predetermined constant value and then added to the prediction sample. The predetermined constant value used for scaling may be determined differently depending on the column and / or row. For example, the prediction sample can be corrected as shown in the following Equations 3 and 4.
[0193]
[0194]
[0195] For example, if the intra prediction mode of the current block is horizontal mode, the final prediction sample can be obtained using the difference sample between the neighboring sample p(x,-1) adjacent to the top boundary of the current block and the top-left neighboring sample p(-1,-1), as described above in vertical mode. For example, the prediction sample can be corrected as shown in the following Equations 5 and 6.
[0196]
[0197]
[0198] When the intra-prediction mode of the current block is a directional prediction mode, the intra-prediction of the current block can be performed based on the directionality of the directional prediction mode. For example, Table 3 shows the intra-directional parameters (intraPredAng) for Mode 2 to Mode 34, which are directional intra-prediction modes illustrated in FIG. 8.
[0199] predModeIntra 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 intraPredAng - 32 26 21 17 13 9 5 2 0 -2 -5 -9 -13 -17 -21 predModeIntra 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 intraPredAng -32 -26 -21 -17 -13 -9 -5 -2 0 2 5 9 13 17 21 26
[0200] In Table 3, 33 directional intra-prediction modes were described as examples, but it is possible to define a larger or smaller number of directional intra-prediction modes.
[0201] Based on a lookup table that defines the mapping relationship between the directional intra prediction mode and the intra direction parameter, the intra direction parameter for the current block can be determined. Alternatively, the intra direction parameter for the current block can be determined based on information signaled through a bitstream.
[0202] Intra prediction of the current block may be performed using at least one of left reference samples or top reference samples, depending on the directionality of the directional intra prediction mode. Here, top reference samples refer to reference samples having y-axis coordinates smaller than the prediction target sample (x, 0) included in the top row of the current block (e.g., (-1, -1) to (2W-1, -1)), and left reference samples refer to reference samples having x-axis coordinates smaller than the prediction target sample (0, y) included in the leftmost column of the current block (e.g., (-1, -1) to (-1, 2H-1)).
[0203] Depending on the directionality of the intra prediction mode, the reference samples of the current block may be arranged in a one-dimensional manner. Specifically, when both the top reference sample and the left reference sample must be used for intra prediction of the current block, the reference samples for each prediction target sample can be selected by assuming that they are arranged in a line along a vertical or horizontal direction.
[0204] For example, when the intra-direction parameter is negative (e.g., for the intra-prediction modes corresponding to Mode 11 to Mode 25 in Table 3), the top reference samples and left reference samples can be rearranged along the horizontal or vertical direction to form a one-dimensional reference sample group (P_ref_1D).
[0205] Figures 13 and 14 are diagrams showing a one-dimensional reference sample group in which reference samples are rearranged in a row.
[0206] Whether the reference samples are rearranged vertically or horizontally can be determined by the directionality of the intra prediction mode. For example, when the intra prediction mode is oriented to the left (e.g., the index of the intra prediction mode is between 11 and 18 in the example shown in FIG. 8), the top reference samples of the current block can be rotated counterclockwise, as in the example shown in FIG. 13, to create a one-dimensional reference sample group in which the left reference samples and the top reference samples are arranged vertically.
[0207] On the other hand, when the intra prediction mode is facing upward (e.g., between 19 and 25 of the example shown in FIG. 8), the left reference samples of the current block can be rotated clockwise, as in the example shown in FIG. 14, to create a one-dimensional reference sample group in which the left reference samples and the top reference samples are arranged horizontally.
[0208] If the intra-direction parameter of the current block is non-negative, intra prediction for the current block can be performed using only left reference samples or top reference samples. Accordingly, for intra prediction modes where the intra-direction parameter is non-negative, a one-dimensional reference sample group may be constructed using only left reference samples or top reference samples.
[0209] Based on intra-directional parameters, a reference sample determination index iIdx can be derived to specify at least one reference sample used to predict a target sample. Additionally, a weight-related parameter i used to determine the weight applied to each reference sample based on intra-directional parameters can be derived. fact It is possible to derive [the following]. For example, the following mathematical formulas 7 and 8 represent examples of deriving reference sample decision index and weight-related parameters.
[0210]
[0211]
[0212] As shown in Equation 7, iIdx and i fact is determined variably depending on the gradient of the directional intra prediction mode. In this case, the reference sample specified by iIdx may correspond to an integer pel.
[0213] Based on a reference sample determination index, at least one reference sample can be specified for each target sample to be predicted. For example, based on the reference sample determination index, the location of a reference sample within a one-dimensional reference sample group for predicting a target sample within the current block can be specified. Based on the reference sample at the specified location, a prediction image (i.e., a prediction sample) for the target sample to be predicted can be generated.
[0215] Depending on the intra-prediction mode of the current block, a prediction image for a target sample can be generated based on one or more reference samples.
[0216] For example, if a virtual angular line extending from a sample to be predicted passes through an integer pel location (i.e., a reference sample at an integer location) within a one-dimensional reference sample group, a prediction image for the sample to be predicted can be generated by copying the reference sample at the integer pel location or by scaling the reference sample considering the position between the reference sample at the integer pel location and the sample to be predicted. The virtual angular line may refer to a line extended unidirectionally or bidirectionally along the angle of the intra prediction mode of the current block or the slope of the intra prediction mode. For example, Equation 8 below illustrates an example of generating a prediction image P(x, y) for a sample to be predicted at location (x, y) by copying a reference sample P_ref_1D(x+iIdx+1) specified by the intra prediction mode of the current block.
[0217]
[0218] On the other hand, if a virtual angle line extending from a sample to be predicted does not pass through an integer Pell position, a prediction image for the sample to be predicted can be obtained using multiple reference samples. The prediction image for the sample to be predicted can be generated by linearly interpolating a reference sample adjacent to the position where the virtual angle line passes and at least one neighboring reference sample adjacent to the reference sample. Alternatively, the prediction image for the sample to be predicted can be obtained by performing tap filter-based interpolation on the reference sample and the at least one neighboring reference sample. The number of taps in the interpolation filter may be a natural number of 2 or more. Specifically, depending on the number of reference samples to be interpolated, the number of taps in the tap filter may be an integer of 2, 3, 4, 5, 6, or more.
[0219] For example, when a virtual angle line extending from a sample to be predicted passes between two integer Pell positions, a prediction image for the sample to be predicted can be generated using at least one of the reference samples on both sides of the position where the virtual angle line passes, or at least one neighbor reference sample and the reference samples of the two integer Pell positions. Here, the neighbor reference sample may include at least one of the reference samples adjacent to the left / right or above / below of the reference sample. For example, Equation 9 below represents an example of generating a prediction sample P(x, y) for a sample to be predicted by interpolating two or more reference samples.
[0220]
[0221] The coefficients of the interpolation filter are the weight-related parameter i fact It can be determined based on. For example, the coefficients of an interpolation filter can be determined based on the distance between fractional pels and integer pels (i.e., integer positions of each reference sample) located on an angular line.
[0222] The following mathematical formula 10 is an example of the case where the number of taps in the tab filter is 4.
[0223]
[0224] As shown in the example in Equation 10 above, a prediction image for a target sample can be obtained by interpolating a plurality of consecutive reference samples. In this case, if at least one of the N consecutive reference samples is not included in the one-dimensional reference sample group, the value of the corresponding reference sample can be replaced with a predefined value or the value of an adjacent reference sample. For example, if the sample at position (x+iIdx-1) is not included in the one-dimensional reference sample group, the value of the reference sample at said position can be replaced with a predefined value or the value of an adjacent reference sample (e.g., P_ref_1D(x+iIdx)). Alternatively, if the sample at position (x+iIdx+2) is not included in the one-dimensional reference sample group, the value of the reference sample at said position can be replaced with a predefined value, a pre-calculated value, or the value of an adjacent reference sample (e.g., P_ref(x+iIdx+1)). Here, the predefined value may be an integer including 0. The calculated value may be a value determined by the bit depth. Alternatively, a predefined value may be calculated based on the average, minimum, or maximum value of at least one reference sample.
[0225] The multi-tap filter may be in the form of a straight line. For example, a linear multi-tap filter utilizing multiple reference samples consecutive in a horizontal or vertical direction may be applied. Alternatively, the multi-tap filter may be in the form of a polygon, such as a square or a cross. For example, a cross-shaped multi-tap filter utilizing a reference sample and reference samples adjacent to all four sides of the reference sample may be used. The shape of the multi-tap filter may be variably determined based on the size, shape, or intra-prediction mode of the current block.
[0226] As shown in mathematical formulas 8 to 10, generating prediction samples by interpolating reference samples using the directionality of intra-prediction can be called an intra-prediction sample interpolation technique.
[0227] When using the intra-predicted sample interpolation technique, a large number of taps in the tap filter does not necessarily guarantee an improvement in prediction accuracy. For example, if the current block is an asymmetric coding unit with a height or width significantly larger than the other, such as 2x16, or a small block, such as 4x4, using a tap filter with 4 or more taps may result in excessive smoothing of the predicted image. Accordingly, the type of tap filter can be adaptively determined based on the size, shape, or intra-predicted mode of the current block. Here, the type of tap filter can be defined by at least one of the number of taps, filter coefficients, filter strength (strong / weak), filtering direction, and filter shape. The number of filter taps or filter coefficients, etc., may be determined variably based on the filter strength. Additionally, depending on the type of tap filter, the application direction of the tap filter may be determined, such as horizontal interpolation, vertical interpolation, or both horizontal and vertical interpolation. The application direction of the tap filter may also be variably set on a line-by-line (row or column) or sample-by-sample basis within the current block.
[0228] Specifically, the type of tap filter to be used can be determined based on the width or height of the current block. For example, if at least one of the width or height of the current block is smaller than a predefined value, an intra-predicted sample interpolation technique can be performed using a 2-tap filter instead of a 4-tap filter. On the other hand, if both the width and height of the current block are greater than or equal to a predefined value, an intra-predicted sample interpolation technique can be performed using a 4-tap filter. Here, the predefined value may represent values such as 4, 8, or 16.
[0229] Alternatively, the type of tap filter to use can be determined based on whether the width and height of the current block are the same value. For example, if the width and height of the current block are different values, an intra-predicted sample interpolation technique can be performed using a 2-tap filter instead of a 4-tap filter. On the other hand, if the width and height of the current block are the same value, an intra-predicted sample interpolation technique can be performed using a 4-tap filter.
[0230] Alternatively, the type of tap filter to be used can be determined based on the ratio of the width and height of the current block. For example, if the ratio of the width (w) and height (h) of the current block (i.e., w / h or h / w) is smaller than a predefined threshold, an intra-predicted sample interpolation technique can be performed using a 2-tap filter instead of a 4-tap filter. On the other hand, if the ratio of the width and height of the current block is greater than or equal to a predefined threshold, an intra-predicted sample interpolation technique can be performed using a 4-tap filter.
[0231] Alternatively, the type of tap filter may be determined based on the intra prediction mode, shape, or size of the current block. For example, if the current block is a 2x16 coding unit and the intra prediction mode of the current block is an intra prediction mode that falls within the horizontal range, an intra prediction sample interpolation technique can be performed using a tap filter with n taps. On the other hand, if the current block is a 2x16 coding unit and the intra prediction mode of the current block is an intra prediction mode that falls within the vertical range, an intra prediction sample interpolation technique can be performed using a tap filter with m taps.
[0232] On the other hand, if the current block is a 16x2 coding unit and the intra prediction mode of the current block is an intra prediction mode that falls within the horizontal range, an intra prediction sample interpolation technique can be performed using a tap filter with n taps. On the other hand, if the current block is a 16x2 coding unit and the intra prediction mode of the current block is an intra prediction mode that falls within the vertical range, an intra prediction sample interpolation technique can be performed using a tap filter with m taps.
[0233] Here, the horizontal range may represent a predetermined range including a horizontal intra-prediction mode, and the vertical range may represent a predetermined range including a vertical intra-prediction mode. For example, based on 35 intra-prediction modes, the horizontal range may represent an intra-prediction mode between mode 11 and mode 18, and the vertical range may represent an intra-prediction mode between mode 19 and mode 27.
[0234] In addition, n and m are constants greater than 0, and n and m may have different values. Alternatively, n and m may be set to have the same value, but at least one of the filter coefficients or filter strengths of the n-tap filter and the m-tap filter may be set differently.
[0236] The current block can be divided into multiple sub-blocks, and intra prediction can be performed on a sub-block basis. The current block may be a coding block or a prediction block. Alternatively, the current block may be an area that shares an intra prediction mode, a reference sample line index, or an MPM candidate list. Alternatively, the current block may be included in the said area.
[0237] At least one of the size or shape of the region where intra-prediction at the sub-block level is allowed in the encoder and decoder may be predefined. Alternatively, at least one of the size or shape of the region may be determined based on encoding parameters transmitted from the encoder. The encoding parameters may include at least one of information related to the size of the region or information related to the shape of the region. The region may be square or non-square.
[0238] The intra prediction modes of multiple sub-blocks may be set identically. For example, multiple sub-blocks may share the intra prediction mode of the current block. Alternatively, the intra prediction mode of any one of the multiple sub-blocks may be set differently from that of another. For example, the intra prediction mode of a sub-block with index k may be obtained by adding or subtracting an offset from the intra prediction mode of a sub-block with index k-1. Alternatively, an MPM candidate index may be signaled for each of the multiple sub-blocks.
[0239] The reference sample line indices of multiple sub-blocks may be identical. For example, multiple sub-blocks may share the reference sample line index of the current block. Alternatively, the reference sample line index of any one of the multiple sub-blocks may be determined differently from the reference sample line index of another. For example, information for determining the reference sample line index for each of the multiple sub-blocks may be signaled. Alternatively, the reference sample line index of each sub-block may be determined as a default value. The default value may be an index value corresponding to a reference sample line adjacent to the intra-predicted target block (e.g., reference sample line 0).
[0240] Information indicating whether to use a sub-block unit intra prediction technique can be signaled via a bitstream. Based on the above information, it may be selectively determined whether to apply a sub-block unit intra prediction technique to the current block. The above information may be a 1-bit flag. A flag value of 1 indicates that a sub-block unit intra prediction technique is applied to the current block, and a flag value of 0 indicates that a sub-block unit intra prediction technique is not applied to the current block.
[0241] Alternatively, at least one of the block size, shape, or intra prediction mode to which the sub-block unit intra prediction technique is applied may be predefined in the encoder and decoder. If at least one of the current block size, shape, or intra prediction mode satisfies a predefined condition, the sub-block unit intra prediction technique may be applied to the current block. For example, if the intra prediction mode of the current block is a non-directional prediction mode, the sub-block unit intra prediction technique may not be used. The non-directional prediction mode may include at least one of a DC mode or a planner mode.
[0242] Alternatively, if the intra prediction mode of the current block is a predefined prediction mode, information indicating whether the intra prediction technique at the sub-block level is allowed can be encoded / decoded.
[0243] The current block can be divided into multiple sub-blocks using at least one vertical line or at least one horizontal line. A single line within the current block can be set as a single sub-block. Here, a line represents a row or a column. Alternatively, multiple lines can be set as a single sub-block. For example, if the current block has a size of 8x8, the current block can be divided into two sub-blocks of size 8x4 or two sub-blocks of size 4x8.
[0244] Alternatively, the current block can be divided into multiple sub-blocks using at least one vertical line and at least one horizontal line. The sub-blocks may be square or non-square. For example, if the current block has a size of 8x8, the current block can be divided into four sub-blocks of size of 4x4.
[0245] At least one of the size, shape, or number of sub-blocks may be predefined in the encoder and decoder. For example, the size / shape of the sub-block may be fixed as a 4x4 or 8x8 square block. Alternatively, the size / shape of the sub-block may be fixed as a 4x8 or 8x4 non-square block. Based on the predefined size / shape, the number of sub-blocks included in the current block may be determined. Alternatively, the number of sub-blocks may be fixed as 4 or 8. Based on the predefined number, the size or shape of the sub-block may be determined.
[0246] Alternatively, the size, shape, or number of sub-blocks may be determined based on at least one of the current block's size, shape, or intra-prediction mode. For example, if the height of the current block is greater than the width of the current block, or if the height of the current block is greater than the size of the maximum transformation block, the division type of the current block may be determined as a horizontal division type. The size of the transformation block may be the width and height of the transformation block, or a value obtained by taking a logarithm of the product of the width and height of the transformation block. A horizontal division type indicates that the current block is divided using at least one horizontal line. If the width of the current block is greater than the height of the current block, or if the width of the current block is greater than the size of the maximum transformation block, the division type of the current block may be determined as a vertical division type. A vertical division type indicates that the current block is divided using at least one vertical line. Depending on the division type, the current block may be divided into a plurality of sub-blocks having a predefined width or height. Alternatively, the number of sub-blocks included in the current block may be determined based on at least one of the current block's size, shape, or intra-prediction mode. The size or shape of the sub-block can be determined based on the number determined above.
[0247] Alternatively, information regarding at least one of the size or shape of a sub-block may be explicitly signaled via a bitstream. For example, information indicating the partition type of the current block may be signaled via a bitstream. The partition type may indicate a vertical partition type or a horizontal partition type. Depending on the partition type, the current block may be divided into a plurality of sub-blocks having a predefined width or height. Alternatively, information indicating the number of sub-blocks included in the current block may be explicitly signaled via a bitstream. The size or shape of the sub-block may be determined based on the information regarding the number.
[0248] FIG. 15 is a diagram showing an example in which the partitioning shape of the current block is determined based on the intra prediction mode of the current block.
[0249] If the intra prediction mode of the current block has an upper-right diagonal direction, the division type of the current block can be determined as a horizontal division type. If the division type of the current block is determined as a horizontal division type, sub-blocks can be arranged vertically around a horizontal line penetrating the current block.
[0250] If the intra prediction mode of the current block has a top-left diagonal direction, the division type of the current block can be determined as a vertical division type. If the division type of the current block is determined as a vertical division type, sub-blocks can be arranged to the left and right of the vertical line penetrating the current block.
[0251] That is, if the intra prediction mode of the current block falls within a predefined first range, the splitting type of the current block can be determined as a horizontal splitting type. On the other hand, if the intra prediction mode of the current block falls within a predefined second range, the splitting type of the current block can be determined as a vertical splitting type.
[0252] In the illustrated example, the first range includes an intra-prediction mode in the upper-right diagonal direction, and the second range includes an intra-prediction direction in the upper-left diagonal direction. The illustrated first and second ranges are intended only to explain one embodiment of the present invention and do not limit the present invention. In another embodiment of the present invention, the first range may include an intra-prediction mode in the vertical direction, and the second range may include an intra-prediction mode in the horizontal direction.
[0253] Intra prediction of sub-blocks can be performed sequentially. The execution order of intra prediction may follow a raster scan, zigzag scan, Z scan, horizontal scan, or vertical scan. The execution order of intra prediction may be determined based on at least one of the current block's size, shape, intra prediction mode, or segmentation type.
[0254] Intra prediction of a subblock can be performed using reference samples included in at least one of the adjacent columns or adjacent rows of the subblock. For example, at least one of the top reference samples adjacent to the top boundary of the subblock or the left reference samples adjacent to the left boundary of the subblock may be used. If another subblock is located adjacent to the top boundary or the left boundary of the subblock, intra prediction for the subblock can be performed using reference samples derived from the reconstructed samples of the other subblock.
[0255] Figure 16 is a diagram illustrating an example in which intra-prediction is performed in sub-block units.
[0256] Multiple sub-blocks may have the same intra-prediction mode. That is, the intra-prediction modes of the first sub-block and the second sub-block may be identical to each other.
[0257] Intra predictions for sub-blocks can be performed sequentially. For example, in the example illustrated in FIG. 16, after performing an intra prediction for the first sub-block, an intra prediction for the second sub-block can be performed.
[0258] Intra-prediction for a sub-block may be performed based on at least one of reference samples adjacent to the top of the sub-block or reference samples adjacent to the left of the sub-block. A first sub-reference sample line represents reference samples for performing intra-prediction of the first sub-block, and a second sub-reference sample line represents reference samples for performing intra-prediction of the second sub-block.
[0259] The sub-reference sample line may include a top-left reference sample adjacent to the top-left corner of the sub-block, 2W top reference samples adjacent to the top of the sub-block, and 2H left reference samples adjacent to the left of the sub-block. Here, W and H represent the width and height of the current block, respectively. Alternatively, the sub-reference sample line may consist of a top-left reference sample, 2w top reference samples, and 2h left reference samples. Here, w and h represent the width and height of the sub-block, respectively. The reference samples included in the sub-reference sample line may be derived from the restoration samples at the corresponding locations. The restoration samples may be those after the in-loop filter is applied or those before the in-loop filter is applied.
[0260] A prediction block for the first sub-block can be generated using reference samples included in the first sub-reference sample line. In the illustrated example, the first sub-block is adjacent to the top boundary of the current block and the left boundary of the current block. Accordingly, the first sub-reference sample line may include reference samples adjacent to the top of the current block and reference samples adjacent to the left of the current block.
[0261] A prediction block for the second sub-block can be generated using reference samples included in the second sub-reference sample line. In the illustrated example, the left boundary of the second sub-block is adjacent to the left boundary of the current block, and the top boundary of the second sub-block is adjacent to the bottom boundary of the first sub-block. Accordingly, the second sub-reference sample line may include reference samples adjacent to the left of the current block and reference samples derived from the restoration samples included in the first sub-block.
[0262] By merging the prediction block of the first sub-block and the prediction block of the second sub-block, a single prediction block or restoration block can be generated.
[0263] In the example illustrated in FIG. 16, the second sub-reference sample line includes reference samples derived from the restored samples included in the first sub-block, and reference samples that are not included in the first sub-block but belong to the same row or the same column as the restored samples. However, the encoding / decoding order of the block adjacent to the right of the current block or the block adjacent to the bottom of the current block is later than that of the current block. Accordingly, a problem may arise in which reference samples included in the block adjacent to the right of the current block or the block adjacent to the bottom of the current block, which are not included in the first sub-block, cannot be derived from the corresponding position restored samples. For example, in the example illustrated in FIG. 16, among the reference samples adjacent to the top of the second sub-block, the reference samples not included in the first sub-block cannot be derived from the corresponding position restored samples.
[0264] To resolve the above problem, a reference sample can be derived based on at least one of reference restoration samples included in a line adjacent to a sub-block or restoration samples included in a line not adjacent to a sub-block. A line not adjacent to a sub-block may include at least one of multiple lines included in a neighboring sub-block or at least one of lines adjacent to the current block. As a result, a sub-reference sample line can be constructed using at least one of reference samples derived from a restoration sample included in a neighboring sub-block or reference samples derived from a restoration sample adjacent to the top or left of the current block.
[0265] Figure 17 is a diagram showing an example of the configuration of a sub-reference sample line.
[0266] Figure 17 (a) is a drawing illustrating the case where the current block's division type is horizontal, and Figure 17 (b) is a drawing illustrating the case where the current block's division type is vertical.
[0267] A first sub-reference sample line for a first sub-block adjacent to the left boundary and top boundary of the current block may include left reference samples adjacent to the left of the current block and top reference samples adjacent to the top of the current block.
[0268] A second reference sample line for a second sub-block, where the top boundary or left boundary abuts the first prediction block, may be configured based on a setting in which reference samples included in the restored area have a higher priority than reference samples included in the unrestored area. Alternatively, the second reference sample line may be composed solely of reference samples included in the restored area.
[0269] For example, the second sub-reference sample line may include at least one of a reference sample included in a neighboring sub-block adjacent to the second sub-block, or a reference sample that is not adjacent to the second sub-block but is adjacent to the neighboring sub-block. Here, the neighboring sub-block may include a first sub-block located above or to the left of the second sub-block.
[0270] For example, in the example illustrated in FIG. 17(a), the second sub-reference sample line may include reference samples derived from the restoration samples included in the bottom row of the first sub-block and the restoration samples included in the same column as the restoration sample located at the far right among said restoration samples. Additionally, the second sub-reference sample line may include reference samples that are not adjacent to the second sub-block but are adjacent to the top of the first sub-block (or current block). Specifically, at least one reference sample among the reference samples adjacent to the top of the first sub-block, wherein the x-coordinate value is greater than or equal to the x-coordinate value of the far right column of the first sub-block, may be included in the second sub-reference sample line. In other words, reference samples with an x-coordinate value greater than that of the far right column of the second sub-block illustrated in FIG. 16 may be replaced with reference samples derived from the restoration samples included in the first sub-block and / or reference samples adjacent to the top of the first sub-block.
[0271] For example, in the example illustrated in FIG. 17(b), the second sub-reference sample line may include reference samples derived from the restoration samples included in the rightmost column of the first sub-block and the restoration samples included in the same row as the restoration sample located at the bottom among said restoration samples. Additionally, the second sub-reference sample line may include reference samples that are not adjacent to the second sub-block but are adjacent to the left side of the first sub-block (or current block). Specifically, among the reference samples adjacent to the left side of the first sub-block, at least one reference sample whose y-coordinate value is greater than or equal to the y-coordinate value of the bottom row of the first sub-block may be included in the second sub-reference sample line.
[0272] Alternatively, if the second sub-reference sample line contains an unavailable sample, the unavailable sample may be replaced with at least one sample contained in the first sub-block or a block adjacent to the first sub-block. For example, a sample contained in a block that has not yet been encoded / decoded may be set as unavailable as a reference sample.
[0273] FIG. 18 is a diagram illustrating an example of replacing an unavailable sample with a restored sample included in a neighboring sub-block. FIG. 18 (a) is a diagram illustrating the case where the current block's partition type is horizontal, and FIG. 18 (b) is a diagram illustrating the case where the current block's partition type is vertical.
[0274] The second sub-reference sample line may include upper reference samples adjacent to the top of the second sub-block and left reference samples adjacent to the left of the second sub-block.
[0275] In the example illustrated in FIG. 18(a), among the top reference samples of the second sub-block, the sample included in the block adjacent to the right of the current block may be determined as an unavailable sample. The unavailable sample may be replaced with a restored sample included in the first sub-block. For example, reference samples whose x-axis coordinate value is greater than the rightmost column of the second sub-block may be obtained by copying the reference sample located at the rightmost among the reference samples included in the bottom row of the first sub-block.
[0276] Alternatively, reference samples whose x-axis coordinate value is greater than the rightmost column of the second sub-block can be obtained by adding an offset to the rightmost reference sample among the reference samples included in the bottom row of the first sub-block. The offset can be derived based on the difference between the rightmost reference sample among the reference samples included in the bottom row of the first sub-block and its neighboring reference samples.
[0277] In the example illustrated in FIG. 18(b), among the left reference samples of the second sub-block, the sample included in the block adjacent to the bottom of the current block may be determined as an unavailable sample. The unavailable sample may be replaced with a restored sample included in the first sub-block. For example, reference samples whose y-axis coordinate value is greater than the bottom row of the second sub-block may be obtained by copying the reference sample located at the bottom among the reference samples included in the rightmost column of the first sub-block.
[0278] Alternatively, reference samples whose y-axis coordinate value is greater than the bottom row of the second sub-block may be obtained by adding an offset to the reference sample located at the bottom among the reference samples included in the rightmost column of the first sub-block. The offset may be derived based on the difference value between the reference sample located at the bottom among the reference samples included in the rightmost column of the first sub-block and the neighboring reference samples of said reference sample. A reference sample with a distance of n from the reference sample located at the bottom among the reference samples included in the rightmost column of the first sub-block may be obtained by adding an offset of n times to the value of said bottom reference sample.
[0279] The value of a reference sample included in a sub-reference sample line may be derived from a reference sample for a neighboring sub-block or a reconstructed sample of a neighboring sub-block. Here, the reconstructed sample may refer to one prior to the application of the in-loop filter or one after the application of the in-loop filter. For example, the value of a reference sample included in a second sub-reference sample line may be determined by adding or subtracting an offset from the value of a reference sample included in a first sub-reference sample line. A reference sample with a distance of n from the reference sample located furthest to the right among the reference samples included in the bottom row of the first sub-block may be obtained by adding an offset of n to the value of the furthest to the right reference sample.
[0280] Figure 19 is a diagram illustrating an example of determining the value of a reference sample.
[0281] FIG. 19 (a) is a drawing illustrating the case where the current block's division type is horizontal, and FIG. 19 (b) is a drawing illustrating the case where the current block's division type is vertical.
[0282] In the example illustrated in FIG. 19(a), among the left reference samples of the second sub-block, the sample included in the block adjacent to the bottom of the current block may be determined as an unavailable sample. The unavailable sample may be replaced with a reference sample adjacent to the left of the first sub-block (or current block). For example, a reference sample whose y-coordinate value is greater than the bottom row of the second sub-block may be generated by copying a reference sample at a position corresponding to said reference sample among the reference samples adjacent to the left of the first sub-block. The reference sample at the corresponding position may represent a reference sample among the reference samples adjacent to the first sub-block that has the same y-coordinate value as the reference sample adjacent to the second sub-block. Alternatively, a reference sample whose y-coordinate value is greater than the bottom row of the second sub-block may be obtained by adding an offset to a reference sample at a position corresponding to said reference sample among the reference samples adjacent to the left of the first sub-block.
[0283] In the example illustrated in FIG. 19(b), among the top reference samples of the second sub-block, the sample included in the block adjacent to the right of the current block may be determined as an unavailable sample. The unavailable sample may be replaced with a reference sample adjacent to the top of the first sub-block (or current block). For example, a reference sample whose x-axis coordinate value is greater than the far right column of the second sub-block may be generated by copying a reference sample at a position corresponding to said reference sample among the reference samples adjacent to the top of the first sub-block. The reference sample at the corresponding position may represent a reference sample among the reference samples adjacent to the first sub-block that has the same x-axis coordinate value as the reference sample adjacent to the second sub-block. Alternatively, a reference sample whose x-axis coordinate value is greater than the far right column of the second sub-block may be obtained by adding an offset to a reference sample at a position corresponding to said reference sample among the reference samples adjacent to the top of the first sub-block.
[0284] Mathematical formula 11 shows an example in which a reference sample adjacent to the second sub-block is obtained by adding an offset to a reference sample corresponding to the reference sample.
[0285]
[0286] P(n, j) represents a reference sample adjacent to the left of the second sub-block. P(-1, j) represents a reference sample adjacent to the left of the first sub-block. f represents an offset.
[0287] The offset may be obtained based on at least one of the average value of the restored samples included in the first sub-block, the value obtained by scaling the average value, or the difference value between reference samples. For example, the offset may be obtained based on the difference value between a reference sample at a corresponding position adjacent to the first sub-block and a neighboring reference sample adjacent to the reference sample at the corresponding position. Alternatively, the offset may be obtained based on the difference value between a reference sample located at the top-left corner of the second sub-block and a reference sample located at the top-left corner of the current block. Equation 12 illustrates an example in which the offset is obtained based on the difference value between a reference sample adjacent to the top-left corner of the second sub-block and a reference sample located at the top-left corner of the current block.
[0288]
[0289] P(n, -1) represents a reference sample adjacent to the top-left corner of the second sub-block. P(-1, -1) represents a reference sample adjacent to the top-left corner of the current block.
[0290] Alternatively, an offset can be derived based on at least one of a sample included in the second sub-block, a sample adjacent to the second sub-block, a sample included in the first sub-block (or current block), or a sample adjacent to the first sub-block (or current block).
[0291] The offset value may be set differently for each reference sample. For example, a reference sample with an x-coordinate difference of n with a sample included in the far right column of the second sub-block, or a reference sample with a y-coordinate difference of n with a sample included in the bottom row of the second sub-block, can be obtained by applying an offset of n.
[0292] When an intra-prediction technique at the sub-block level is applied, transformation or inverse transformation may be performed at the sub-block level. Alternatively, a first transformation may be performed at the coding block (or transformation block) level, and a second transformation may be performed at the sub-block level. Reference samples included in the second reference sample line may be obtained based on the second transformed samples.
[0294] FIG. 20 is a flowchart illustrating the process of obtaining a residual sample as an embodiment to which the present invention is applied.
[0295] First, the residual coefficient of the current block can be obtained (S2010). The decoder can obtain the residual coefficient through a coefficient scanning method. For example, the decoder can perform coefficient scanning using a diagonal scan, a zigzag scan, an upright scan, a vertical scan, or a horizontal scan, and as a result, obtain the residual coefficient in the form of a two-dimensional block.
[0296] Inverse quantization can be performed on the residual coefficients of the current block (S2020).
[0297] It can be determined whether to skip the inverse transform on the inverse quantized residual coefficients of the current block (S2030). Specifically, the decoder can determine whether to skip the inverse transform in at least one of the horizontal or vertical directions of the current block. If it is decided to apply the inverse transform to at least one of the vertical or horizontal directions of the current block, residual samples of the current block can be obtained by inverse transforming the inverse quantized residual coefficients of the current block (S2040). Here, the inverse transform can be performed using at least one of DCT, DST, or KLT.
[0298] If the inverse transformation is skipped in both the horizontal and vertical directions of the current block, the inverse transformation is not performed in the horizontal and vertical directions of the current block. In this case, the inverse quantized residual coefficients can be scaled to a preset value to obtain a residual sample of the current block (S2050).
[0299] Omitting the inverse transformation in the horizontal direction means that the inverse transformation is not performed in the horizontal direction, but is performed in the vertical direction. In this case, scaling may be performed in the horizontal direction.
[0300] Omitting the inverse transformation in the vertical direction means that the inverse transformation is not performed in the vertical direction, but is performed in the horizontal direction. In this case, scaling may be performed in the vertical direction.
[0301] Depending on the partitioning form of the current block, it may be determined whether the inverse transform skip technique can be used for the current block. For example, if the current block is generated through binary tree-based partitioning, the inverse transform skip technique may be restricted from being used for the current block. Accordingly, if the current block is generated through binary tree-based partitioning, residual samples of the current block can be obtained by inverse transforming the current block. In addition, if the current block is generated through binary tree-based partitioning, the encoding / decoding of information indicating whether the inverse transform is skipped (e.g., transform_skip_flag) may be omitted.
[0302] Alternatively, if the current block is generated through binary tree-based partitioning, the inverse skip technique may be restricted to be allowed only in at least one of the horizontal or vertical directions. Here, the direction in which the inverse skip technique is restricted may be determined based on information decoded from the bitstream, or may be adaptively determined based on at least one of the size of the current block, the shape of the current block, or the intra-prediction mode of the current block.
[0303] For example, if the current block is a non-square block where the width is greater than the height, the inverse transformation skip technique may be allowed only for the vertical direction and restricted for the horizontal direction. That is, if the current block is 2NxN, the inverse transformation may be performed in the horizontal direction of the current block, and the inverse transformation may be performed optionally in the vertical direction.
[0304] On the other hand, if the current block is a non-square block where the height is greater than the width, the inverse transformation skip technique may be allowed only for the horizontal direction and restricted for the vertical direction. That is, if the current block is Nx2N, the inverse transformation is performed in the vertical direction of the current block, and the inverse transformation may be performed optionally in the horizontal direction.
[0305] Conversely to the above example, if the current block is a non-square block where the width is greater than the height, the inverse transformation skip technique may be allowed only for the horizontal direction, and if the current block is a non-square block where the height is greater than the width, the inverse transformation skip technique may be allowed only for the vertical direction.
[0306] Information regarding whether to skip the inverse transformation in the horizontal direction or information indicating whether to skip the inverse transformation in the vertical direction can be signaled through a bitstream. For example, information indicating whether to skip the inverse transformation in the horizontal direction may be a 1-bit flag, such as 'hor_transform_skip_flag', and information indicating whether to skip the inverse transformation in the vertical direction may be a 1-bit flag, such as 'ver_transform_skip_flag'. The encoder may encode at least one of 'hor_transform_skip_flag' or 'ver_transform_skip_flag' depending on the form of the current block. Additionally, the decoder may use at least one of 'hor_transform_skip_flag' or 'ver_transform_skip_flag' to determine whether the inverse transformation in the horizontal or vertical direction is skipped.
[0307] Depending on the partitioning form of the current block, the inverse transformation may be set to be omitted for one of the directions. For example, if the current block is generated through binary tree-based partitioning, the inverse transformation in the horizontal or vertical direction may be omitted. That is, if the current block is generated through binary tree-based partitioning, it may be determined to skip the inverse transformation for at least one of the horizontal or vertical directions for the current block without encoding / decoding information indicating whether the inverse transformation of the current block is skipped (e.g., transform_skip_flag, hor_transform_skip_flag, ver_transform_skip_flag).
[0309] Applying the embodiments described with reference to the decoding process or the encoding process to the encoding process or the decoding process is included within the scope of the present invention. Changing the embodiments described in a predetermined order to a different order from that described is also included within the scope of the present invention.
[0310] The above-described embodiments are described based on a series of steps or flowcharts, but this does not limit the chronological order of the invention and may be performed simultaneously or in a different order as necessary. Additionally, each component constituting the block diagram in the above-described embodiments (e.g., units, modules, etc.) may be implemented as a hardware device or software, or a plurality of components may be combined to be implemented as a single hardware device or software. The above-described embodiments may be implemented in the form of program instructions that can be executed through various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc., either individually or in combination. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floptical disks; and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, and flash memory. The above hardware device may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa.
Claims
Claim 1 A step of receiving a bitstream; a step of determining a reference line index of a current block based on index information decoded from the bitstream, wherein the reference line index points to one of a plurality of reference line candidates, and the plurality of reference line candidates include neighbor reference lines and non-neighbor reference lines, wherein the non-neighbor reference lines include at least one of a first non-neighbor reference line adjacent to the neighbor reference line or a second non-neighbor reference line adjacent to the first non-neighbor reference line; a step of determining an intra prediction mode of the current block among predefined intra prediction modes; A method for decoding images, comprising the step of performing an intra prediction of the current block based on the reference line index and the intra prediction mode, wherein the step of determining the intra prediction mode of the current block includes determining whether, based on an MPM (Most Probable Mode) flag, an MPM candidate identical to the intra prediction mode of the current block exists in an MPM candidate list containing one or more MPM candidates, and wherein the MPM flag is decoded from the bitstream only when the index information indicates the neighboring reference line among the plurality of reference line candidates. Claim 2 An image decoding method according to claim 1, wherein when the current block is adjacent to the upper boundary of a coding tree block, the neighbor reference line is selected for the current block, and the coding tree block represents the largest coding block. Claim 3 An image decoding method according to claim 2, characterized in that when the reference line index of the current block is greater than a predefined value, the planner mode cannot be used for intra prediction of the current block. Claim 4 In claim 3, the image decoding method further comprises the step of determining whether to divide the current block into a plurality of sub-blocks, and when it is determined to divide the current block, the current block is divided into a plurality of sub-blocks along a horizontal or vertical direction, and the intra prediction of the current block is performed on a sub-block basis. Claim 5 A video decoding method according to claim 4, characterized in that the number of sub-blocks included in the current block is determined based on the size of the current block. Claim 6 An image decoding method according to claim 5, wherein dividing the current block into a plurality of sub-blocks is permitted only when the index information points to the neighboring reference line among the plurality of reference line candidates. Claim 7 delete Claim 8 An image decoding method according to claim 1, wherein if the index information points to a non-neighboring reference line among the plurality of reference line candidates, decoding the MPM flag is omitted, and the intra prediction mode of the current block is determined to be identical to the MPM candidate included in the MPM candidate list. Claim 9 The method includes the step of performing intra prediction on a current block and encoding the current block, wherein the intra prediction is performed based on a reference line index and an intra prediction mode of the current block, wherein the reference line index indicates one of a plurality of reference line candidates, and the plurality of reference line candidates include neighbor reference lines and non-neighbor reference lines, and the non-neighbor reference lines include at least one of a first non-neighbor reference line adjacent to the neighbor reference line or a second non-neighbor reference line adjacent to the first non-neighbor reference line, wherein index information indicating the reference line index of the current block is encoded in a bitstream, wherein the intra prediction mode of the current block is determined as one of a predefined intra prediction mode, and wherein an MPM flag determining whether an MPM candidate identical to the intra prediction mode of the current block exists in an MPM candidate list including one or more MPM (Most Probable Mode) candidates is encoded in the bitstream, and wherein the MPM flag is encoded in the bitstream only when the index information indicates the neighbor reference line among the plurality of reference line candidates. A video encoding method characterized by the following. Claim 10 An apparatus for transmitting compressed video data, wherein the apparatus comprises: a processor for acquiring compressed video data including index information indicating a reference line index for intra prediction of a current block; and a transmission unit for transmitting the compressed video data, wherein the reference line index indicates one of a plurality of reference line candidates, and the plurality of reference line candidates include neighbor reference lines and non-neighbor reference lines, and the non-neighbor reference lines include at least one of a first non-neighbor reference line adjacent to the neighbor reference line or a second non-neighbor reference line adjacent to the first non-neighbor reference line, and the intra prediction mode of the current block is determined as one of a predefined intra prediction mode, and the compressed video data further comprises an MPM flag that determines whether an MPM candidate identical to the intra prediction mode of the current block exists in an MPM candidate list including one or more MPM (Most Probable Mode) candidates, and the MPM flag is included in the compressed video data only when the index information indicates the neighbor reference line among the plurality of reference line candidates. Claim 11 delete Claim 12 delete Claim 13 delete Claim 14 delete Claim 15 delete
Citation Information
Patent Citations
Method and apparartus for encoding / decoding for intra prediction mode
KR1020160143588A
Method and apparatus for processing a video signal
KR1020180015598A