Image coding / decoding method and apparatus using intra-prediction

The image encoding/decoding method improves prediction accuracy and efficiency by determining intra-prediction modes and adaptive block division, addressing inefficiencies in existing techniques for high-resolution images.

JP7868228B2Active Publication Date: 2026-06-01INST OF IMAGE TECH INC

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
INST OF IMAGE TECH INC
Filing Date
2025-05-30
Publication Date
2026-06-01

AI Technical Summary

Technical Problem

Existing image compression techniques struggle to efficiently handle high-resolution and high-quality images, particularly in determining intra-prediction modes and block divisions, leading to suboptimal compression efficiency.

Method used

An image encoding/decoding method that determines a reference region for intra-prediction, divides the MPM candidate group into two groups, and selectively uses these groups to induce intra-prediction modes based on pixel lines and flags, allowing for adaptive block division and inter-component referencing.

Benefits of technology

This approach enhances prediction accuracy and efficiency by deriving intra-prediction modes more accurately and improving inter-picture prediction, especially for luminance and chrominance blocks, thereby optimizing image compression.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007868228000003
    Figure 0007868228000003
  • Figure 0007868228000004
    Figure 0007868228000004
  • Figure 0007868228000005
    Figure 0007868228000005
Patent Text Reader

Abstract

To provide an intra-prediction mode guidance method and device that more accurately and efficiently perform prediction via guidance of an intra-prediction mode based on an MPM candidate group.SOLUTION: In an image coding / decoding device, an intra-prediction method determines a reference area for intra-prediction of a current block, guides an intra-prediction mode of the current block on the basis of a predetermined MPM candidate group, and performs intra-prediction on the current block on the basis of the reference area and the intra-prediction mode.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image encoding / decoding method and apparatus.

Background Art

[0002] Recently, the demand for high-resolution and high-quality images, such as HD (High Definition) images and UHD (Ultra High Definition) images, has been increasing in various application fields, and thus highly efficient image compression techniques have been discussed.

[0003] As image compression techniques, there are various techniques such as an inter-prediction technique that predicts pixel values included in a current picture from a previous or subsequent picture of the picture, an intra-prediction technique that predicts pixel values included in a current picture using pixel information within the current picture, and an entropy coding technique that assigns short codes to frequently occurring values and long codes to infrequently occurring values. Image data can be effectively compressed and transmitted or stored using these image compression techniques.

Summary of the Invention

Problems to be Solved by the Invention

[0004] An object of the present invention is to provide an intra-prediction mode induction method and apparatus.

[0005] An object of the present invention is to provide an intra-prediction method and apparatus according to a component type.

[0006] An object of the present invention is to provide a block division method and apparatus for intra-prediction.

Means for Solving the Problems

[0007] The image encoding / decoding method and apparatus of the present invention can determine a reference region for intra-prediction of the current block, induce an intra-prediction mode for the current block based on a predetermined MPM candidate group, and perform intra-prediction for the current block based on the reference region and the intra-prediction mode.

[0008] In the image coding / decoding method and apparatus of the present invention, the MPM candidate group is divided into a first group and a second group, the first group includes a default mode already defined in the decoding device, and the second group includes an intra-prediction mode for adjacent blocks adjacent to the current block.

[0009] In the image coding / decoding method and apparatus of the present invention, the intra-prediction mode of the current block can be induced by selectively using either the first group or the second group.

[0010] In the image encoding / decoding method and apparatus of the present invention, the step of determining the reference region may include the step of selecting one of a plurality of pixel lines already defined in the decoding device, and the step of determining the selected pixel line as the reference region.

[0011] In the image encoding / decoding method and apparatus of the present invention, the already defined plurality of pixel lines may include at least one of a first pixel line adjacent to the current block, a second pixel line adjacent to the first pixel line, a third pixel line adjacent to the second pixel line, or a fourth pixel line adjacent to the third pixel line.

[0012] In the image coding / decoding method and apparatus of the present invention, the default mode consists only of a non-directional mode, and the non-directional mode may include at least one of Planar mode or DC mode.

[0013] In the image coding / decoding method and apparatus of the present invention, the second group further includes modes induced by adding or subtracting an N value to the intra-prediction mode of the adjacent block, wherein the N value can be 1, 2, or 3.

[0014] The image encoding / decoding method and apparatus of the present invention can obtain a first flag from a bitstream, the first flag can indicate whether or not the intra-prediction mode of the current block is derived from the first group.

[0015] In the image coding / decoding method and apparatus of the present invention, when the value of the first flag is a first value, the intra-prediction mode of the current block is set to an MPM belonging to the first group, and when the value of the first flag is a second value, the intra-prediction mode of the current block may be induced based on the second group and the MPM index.

[0016] In the image encoding / decoding method and apparatus of the present invention, the first flag can be signaled only when the reference region of the current block is the first pixel line.

[0017] The image encoding / decoding method and apparatus of the present invention can determine the intra-prediction mode of the current block and perform intra-prediction on the current block based on the determined intra-prediction mode.

[0018] In the image encoding / decoding method and apparatus of the present invention, the intra-prediction mode of the current block can be induced for the luminance block and the chrominance block, respectively.

[0019] In the image encoding / decoding method and apparatus of the present invention, the intra-prediction mode of a luminance block is derived based on an MPM list and an MPM index, and the MPM list may include at least one of the intra-prediction modes of adjacent blocks (ModeA), (ModeA+n), (ModeA-n), or default mode.

[0020] The image encoding / decoding method and apparatus of the present invention can identify a luminance region for inter-component reference of a chrominance block, perform downsampling on the luminance region, derive parameters for inter-component reference of the chrominance block, and predict the chrominance block based on the downsampled luminance block and the parameters.

[0021] In the image encoding / decoding method and apparatus of the present invention, the current block is divided into a plurality of sub-blocks, and the division can be performed based on at least one of the size or shape of the current block.

Advantages of the Invention

[0022] According to the present invention, prediction can be performed more accurately and efficiently through the derivation of an intra prediction mode based on the MPM candidate group.

[0023] According to the present invention, the efficiency of inter-picture prediction can be improved based on inter-component reference.

[0024] The present invention can improve the efficiency of intra prediction encoding / decoding through adaptive block division.

Brief Description of the Drawings

[0025] [Figure 1] It is a block diagram showing an image encoding apparatus according to an embodiment of the present invention. [Figure 2] It is a block diagram showing an image decoding apparatus according to an embodiment of the present invention. [Figure 3] As an embodiment to which the present invention is applied, it is a diagram showing a block division type. [Figure 4] As an embodiment to which the present invention is applied, it is a diagram showing a block division method based on a tree structure. [Figure 5] It is an exemplary diagram showing an intra prediction mode already defined in an image encoding / decoding apparatus. [Figure 6]This figure shows an intra-prediction method as one embodiment to which the present invention is applied. [Figure 7] This figure shows an intra-prediction method at the sub-block level as one embodiment to which the present invention is applied. [Figure 8] This figure shows a prediction method based on inter-component referencing as one embodiment to which the present invention is applied. [Figure 9] This figure shows a method for determining a prediction method based on prediction method selection information, as one embodiment to which the present invention is applied. [Figure 10] This figure shows a method for determining a prediction method based on prediction method selection information, as one embodiment to which the present invention is applied. [Figure 11] This figure shows a method for determining a prediction method based on prediction method selection information, as one embodiment to which the present invention is applied. [Figure 12] This figure shows a method for determining a prediction method based on prediction method selection information, as one embodiment to which the present invention is applied. [Modes for carrying out the invention]

[0026] The image encoding / decoding method and apparatus of the present invention can determine a reference region for intra-prediction of the current block, induce an intra-prediction mode for the current block based on a predetermined MPM candidate group, and perform intra-prediction for the current block based on the reference region and the intra-prediction mode.

[0027] In the image coding / decoding method and apparatus of the present invention, the MPM candidate group is divided into a first group and a second group, the first group includes a default mode already defined in the decoding device, and the second group includes an intra-prediction mode for adjacent blocks adjacent to the current block.

[0028] In the image coding / decoding method and apparatus of the present invention, the intra-prediction mode of the current block can be induced by selectively using either the first group or the second group.

[0029] In the image encoding / decoding method and apparatus of the present invention, the step of determining the reference region may include the step of selecting one of a plurality of pixel lines already defined in the decoding device, and the step of determining the selected pixel line as the reference region.

[0030] In the image encoding / decoding method and apparatus of the present invention, the already defined plurality of pixel lines may include at least one of a first pixel line adjacent to the current block, a second pixel line adjacent to the first pixel line, a third pixel line adjacent to the second pixel line, or a fourth pixel line adjacent to the third pixel line.

[0031] In the image coding / decoding method and apparatus of the present invention, the default mode consists only of a non-directional mode, and the non-directional mode may include at least one of Planar mode or DC mode.

[0032] In the image coding / decoding method and apparatus of the present invention, the second group further includes modes induced by adding or subtracting an N value to the intra-prediction mode of the adjacent block, wherein the N value can be 1, 2, or 3.

[0033] The image coding / decoding method and apparatus of the present invention can obtain a first flag from a bitstream, the first flag can indicate whether or not the intra-prediction mode of the current block is derived from the first group.

[0034] In the image coding / decoding method and apparatus of the present invention, when the value of the first flag is a first value, the intra-prediction mode of the current block is set to an MPM belonging to the first group, and when the value of the first flag is a second value, the intra-prediction mode of the current block may be induced based on the second group and the MPM index.

[0035] In the image encoding / decoding method and apparatus of the present invention, the first flag can be signaled only when the reference region of the current block is the first pixel line.

[0036] The image encoding / decoding method and apparatus of the present invention can determine the intra-prediction mode of the current block and perform intra-prediction on the current block based on the determined intra-prediction mode.

[0037] In the image encoding / decoding method and apparatus of the present invention, the intra-prediction mode of the current block can be induced for the luminance block and the chrominance block, respectively.

[0038] In the image encoding / decoding method and apparatus of the present invention, the intra-prediction mode of a luminance block is derived based on an MPM list and an MPM index, and the MPM list may include at least one of the intra-prediction modes of adjacent blocks (ModeA), (ModeA+n), (ModeA-n), or default mode.

[0039] The image encoding / decoding method and apparatus of the present invention can identify luminance regions for intercomponent referencing of color difference blocks, perform downsampling on the luminance regions, derive parameters for intercomponent referencing of the color difference blocks, and predict the color difference blocks based on the downsampled luminance blocks and the parameters.

[0040] In the image encoding / decoding method and apparatus of the present invention, the current block is divided into a plurality of subblocks, and the division may be performed based on at least one of the size or shape of the current block.

[0041] [Modes for carrying out the invention] The present invention can be modified in various ways and may have various embodiments; therefore, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this should not be understood as limiting the present invention to specific embodiments, but rather as including all modifications, equivalents, or substitutes that fall within the spirit and technical scope of the present invention. In describing each drawing, similar reference numerals have been used for similar components.

[0042] The terms "first," "second," etc., can be used to describe various components, but these components should not be limited by the terms used above. These terms are used solely for the purpose of distinguishing one component from another. For example, without exceeding the scope of the rights 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 terms "and / or" include a combination of multiple related descriptions or any of multiple related descriptions.

[0043] When one component is described as being "linked" or "connected" to another component, it should be understood that it may be directly linked or connected to the other component, but there may also be other components intervening between them. Conversely, when one component is described as being "directly linked" or "directly connected" to another component, it should be understood that there are no other components intervening between them.

[0044] The terms used in this invention are used solely to describe specific embodiments and are not intended to limit the invention. A singular expression includes plural expressions unless the context clearly indicates otherwise. In this invention, terms such as "includes" or "has" specify the presence of features, figures, steps, actions, components, parts, or combinations thereof as described in the specification, and should be understood not to preclude the presence or possibility of adding one or more other features, figures, steps, actions, components, parts, or combinations thereof.

[0045] Preferred embodiments of the present invention will be described in detail below with reference to the attached drawings. The same reference numerals are used for identical components in the drawings, and redundant descriptions of identical components will be omitted.

[0046] Figure 1 is a block diagram showing an image encoding device according to one embodiment of the present invention.

[0047] Referring to Figure 1, the image coding device 100 may include a picture division unit 110, prediction units 120 and 125, a conversion unit 130, a quantization unit 135, a realignment unit 160, an entropy coding unit 165, an inverse quantization unit 140, an inverse conversion unit 145, a filter 150, and a memory 155.

[0048] Each component shown in Figure 1 is illustrated independently to illustrate distinct characteristic functions of the image encoding device, and does not mean that each component consists of separate hardware or a single software unit. That is, each component is listed and included for the sake of explanation, and at least two of these components can be combined to form a single component, or a single component can be divided into multiple components to perform functions. Such integrated and separated embodiments of each component are also included within the scope of the present invention, as long as they do not deviate from the essence of the present invention.

[0049] Furthermore, some components may not be essential components that perform the essential functions of the present invention, but rather optional components that merely improve performance. The present invention can be realized by including only components that are essential for realizing the essence of the present invention, excluding components used solely for performance improvement, and a structure including only essential components, excluding optional components used solely for performance improvement, is also included within the scope of the rights of the present invention.

[0050] The picture splitting unit 110 can split an input picture into at least one processing unit. In this case, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The picture splitting unit 110 can split a single picture into multiple combinations of coding units, prediction units, and transform units, and then encode the picture by selecting one combination of coding units, prediction units, and transform units as a predetermined criterion (e.g., a cost function).

[0051] For example, a single picture can be divided into multiple coding units. A recursive tree structure, such as a quad tree structure, can be used to divide a picture into coding units. A coding unit, which is divided into other coding units using a single image or the largest coding unit as the root, can have as many child nodes as there are coding units it has been divided into. Coding units that cannot be further divided according to certain limitations become leaf nodes. In other words, 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.

[0052] In the embodiments of the present invention, the term "encoding unit" may be used to mean a unit that performs encoding, or it may be used to mean a unit that performs decoding.

[0053] A prediction unit may be divided within a single coding unit into at least one square or rectangle of the same size, or one of the prediction units divided within a single coding unit may have a different shape and / or size from another prediction unit.

[0054] When generating prediction units for intra-prediction based on coding units, if the unit is not the smallest coding unit, intra-prediction can be performed without dividing it into multiple prediction units N×N.

[0055] The prediction units 120 and 125 may include an inter-prediction unit 120 that performs inter-prediction and an intra-prediction unit 125 that performs intra-prediction. It can determine whether to use inter-prediction or intra-prediction for a given prediction unit, and determine specific information for each prediction method (e.g., intra-prediction mode, motion vector, reference picture, etc.). In this case, the processing unit in which prediction is performed and the processing unit in which the prediction method and specific details are defined may differ from each other. For example, the prediction method and prediction mode may be determined at the prediction unit, while the prediction is performed at the transformation unit. The residual values ​​(residual blocks) between the generated prediction block and the original block can be input to the transformation unit 130. Furthermore, prediction mode information, motion vector information, etc., used for prediction can be encoded together with the residual values ​​by 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 directly and transmit it to the decoder without generating prediction blocks via the prediction units 120 and 125.

[0056] The interpretation unit 120 can also predict prediction units based on information from at least one picture among the previous or subsequent pictures of the current picture, and in some cases, it can also predict prediction units based on information from a portion of the current picture in which encoding has been completed. The interpretation unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

[0057] In the reference picture interpolation unit, reference picture information is received from memory 155, and pixel information of integer pixels or smaller can be generated in the reference picture. For luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or smaller in 1 / 4 pixel units. For color difference signals, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or smaller in 1 / 8 pixel units.

[0058] The motion prediction unit can perform motion prediction based on the reference picture interpolated by the reference picture interpolation unit. Various methods can be used to calculate the motion vector, such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm). The motion vector can have motion vector values ​​in units of 1 / 2 or 1 / 4 pixels based on the interpolated pixels. The motion prediction unit can predict the current prediction unit using different motion prediction methods. Various methods can be used as motion prediction methods, such as the Skip method, Merge method, AMVP (Advanced Motion Vector Prediction) method, and Intra Block Copy method.

[0059] The intra-prediction unit 125 can generate prediction units 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 undergone inter-prediction, and the reference pixel is a pixel that has undergone inter-prediction, the reference pixel included in the inter-predicted block can be substituted with the reference pixel information of the surrounding intra-predicted block. In other words, if a reference pixel is unavailable, the unavailable reference pixel information can be substituted with at least one of the available reference pixels.

[0060] In intra-prediction, the prediction mode can 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 prediction. The mode for predicting luminance information and the mode for predicting color difference information can be different from each other, and the intra-prediction mode information or predicted luminance signal information used for predicting luminance information can be utilized to predict color difference information.

[0061] When performing intraprediction, if the size of the prediction unit and the size of the transformation unit are the same, intraprediction for the prediction unit can be performed based on the pixels to the left, upper left, and upper of the prediction unit. However, when performing intraprediction, if the size of the prediction unit and the size of the transformation unit are different, intraprediction can be performed using reference pixels based on the transformation unit. In addition, intraprediction using N×N partitioning can be used only for the smallest coding unit.

[0062] The intra prediction method can generate prediction blocks after applying an AIS (Adaptive Intra Smoothing) filter to a reference pixel according to the prediction mode. The types of AIS filters applied to the reference pixels can be different from each other. 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 surrounding the current prediction unit. When predicting the prediction mode of the current prediction unit using mode information predicted from surrounding prediction units, if the intra prediction modes of the current prediction unit and the surrounding prediction units are the same, information indicating that the prediction modes of the current prediction unit and the surrounding prediction units are the same can be transmitted using predetermined flag information. If the prediction modes of the current prediction unit and the surrounding prediction units are different, entropy coding can be performed to encode the prediction mode information of the current block.

[0063] Furthermore, residual blocks containing residual value information, which is the difference between the prediction block and the original block of the prediction unit, can be generated based on the prediction units generated by the prediction units 120 and 125. The generated residual blocks can be input to the conversion unit 130.

[0064] The transformation unit 130 can transform the residual block, which contains residual value information of the prediction units generated via the original block and the prediction units 120 and 125, using transformation methods such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), and 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 units used to generate the residual block.

[0065] The quantization unit 135 can quantize the values ​​converted to the frequency domain by the conversion unit 130. The quantization coefficients may vary depending on the block or the importance of the image. The values ​​calculated by the quantization unit 135 can be provided to the inverse quantization unit 140 and the realignment unit 160.

[0066] The realignment unit 160 can realign coefficient values ​​with respect to the quantized residual values.

[0067] The realignment unit 160 can convert two-dimensional block shape coefficients into one-dimensional vector shapes using a coefficient scanning method. For example, the realignment unit 160 can use a zig-zag scan method to scan from DC coefficients to high-frequency coefficients and convert them into one-dimensional vector shapes. Depending on the size of the conversion unit and the intra-prediction mode, a vertical scan that scans the two-dimensional block shape coefficients in the column direction or a horizontal scan that scans the two-dimensional block shape coefficients in the row direction may be used instead of a zig-zag scan. In other words, depending on the size of the conversion unit and the intra-prediction mode, it is possible to determine which scanning method—zig-zag scan, vertical scan, or horizontal scan—is used.

[0068] The entropy coding unit 165 can perform entropy coding based on the value calculated by the re-sorting unit 160. Entropy coding can use various coding methods, such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding).

[0069] The entropy coding unit 165 can encode various information from the realignment unit 160 and prediction units 120 and 125, such as residual coefficient information and block type information for coding units, 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.

[0070] The entropy coding unit 165 can entropy code the coefficient values ​​of the coding units input from the re-sorting unit 160.

[0071] The inverse quantization unit 140 and the inverse transformation unit 145 inversely quantize the values ​​quantized in the quantization unit 135 and inversely transform the values ​​transformed in the transformation unit 130. The residual values ​​generated by the inverse quantization unit 140 and the inverse transformation unit 145 can be combined with the predicted units predicted via the motion estimation unit, motion compensation unit, and intra-prediction unit included in the prediction units 120 and 125 to generate a reconstructed block.

[0072] The filter section 150 may include at least one of a deblocking filter, an offset correction section, and an ALF (Adaptive Loop Filter).

[0073] A deblocking filter can remove block distortion caused by the boundaries between blocks in a restored picture. To determine whether or not to deblock, the filter can be applied to the block based on the pixels contained in some of the columns or rows within the block. When applying a deblocking filter to a block, a strong filter or a weak filter can be applied depending on the required deblocking filtering strength. Furthermore, when applying a deblocking filter, if vertical and horizontal filtering are performed, the horizontal and vertical filtering can be processed in parallel.

[0074] The offset correction unit can correct the offset from the original image on a pixel-by-pixel basis for the deblocked image. To perform offset correction on a specific picture, one can divide the pixels contained in the image into a certain number of regions, determine the region to be offset, and apply the offset to that region, or apply the offset while considering the edge information of each pixel.

[0075] Adaptive Loop Filtering (ALF) can be performed based on a comparison between the filtered reconstructed image and the original image. After dividing the pixels in the image into predetermined groups, a single filter can be determined to be applied to each group, allowing for differential filtering for each group. Information related to whether or not to apply ALF can be transmitted separately for each coding unit (CU) of the luminance signal, and the shape and filter coefficients of the ALF filter applied may vary depending on the block. Alternatively, the same (fixed) form of ALF filter may be applied regardless of the characteristics of the block to which it is applied.

[0076] Memory 155 can store the restored blocks or pictures calculated via the filter unit 150, and the stored restored blocks or pictures can be provided to the prediction units 120 and 125 when performing interpretation.

[0077] Figure 2 is a block diagram showing an image decoding apparatus according to one embodiment of the present invention.

[0078] Referring to Figure 2, the image decoder 200 may include an entropy decoding unit 210, a realignment unit 215, an inverse quantization unit 220, an inverse transform unit 225, prediction units 230 and 235, a filter unit 240, and a memory 245.

[0079] When an image bitstream is input from an image encoder, the input bitstream can be decoded using the reverse procedure of the image encoder.

[0080] The entropy decoding unit 210 can perform entropy decoding in the reverse order of the entropy coding performed by the entropy coding unit of the image encoder. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied, corresponding to the method used in the image encoder.

[0081] The entropy decoding unit 210 can decode information related to the intra-prediction and inter-prediction performed by the encoder.

[0082] The re-arrangement unit 215 can perform re-arrangement based on the method used to re-arrange the bitstream that has been entropically decoded by the entropy decoding unit 210 in the encoding unit. It can also re-arrange coefficients expressed in one-dimensional vector form by restoring them to two-dimensional block form. The re-arrangement unit 215 can receive information related to the coefficient scanning performed by the encoding unit and perform re-arrangement by scanning in reverse based on the scanning order performed by the encoding unit.

[0083] The inverse quantization unit 220 can perform inverse quantization based on the quantization parameters provided by the encoder and the coefficient values ​​of the rearranged blocks.

[0084] The inverse transform unit 225 can perform inverse transforms on the quantization results performed by the image encoder, namely DCT, DST, and KLT, that is, inverse DCT, inverse DST, and inverse KLT. The inverse transform may be performed based on the transmission units determined by the image encoder. In the inverse transform unit 225 of the image decoder, the transformation technique (e.g., DCT, DST, KLT) may be selectively performed depending on multiple pieces of information such as the prediction method, the size of the current block, and the prediction direction.

[0085] The prediction units 230 and 235 can generate predicted blocks based on the prediction block generation-related information provided by the entropy decoding unit 210 and the previously decoded block or picture information provided by the memory 245.

[0086] As mentioned above, when performing intraprediction, similar to the operation in image encoders, if the size of the prediction unit and the size of the transformation unit are the same, intraprediction for the prediction unit is performed based on the pixels to the left, upper left, and upper of the prediction unit. However, when performing intraprediction, if the size of the prediction unit and the size of the transformation unit are different, intraprediction can be performed using reference pixels based on the transformation unit. It is also possible to use intraprediction that uses N×N partitioning only for the smallest coding unit.

[0087] The prediction units 230 and 235 may include a prediction unit discrimination unit, an inter-prediction unit, and an intra-prediction unit. The prediction unit discrimination unit receives various information input from the entropy decoding unit 210, such as prediction unit information, prediction mode information of the intra-prediction method, and motion prediction-related information of the inter-prediction method, and can classify prediction units by current coding unit and determine whether a prediction unit performs inter-prediction or intra-prediction. The inter-prediction unit 230 can perform inter-prediction for the current prediction unit based on information contained in at least one of the previous or subsequent pictures of the current picture containing the current prediction unit, using the information necessary for inter-prediction of the current prediction unit provided by the image coding device. Alternatively, it can perform inter-prediction based on information from a portion of the current picture containing the current prediction unit that has already been restored.

[0088] To perform inter-prediction, it is possible to determine, based on the coding unit, which of the following methods is used to predict the movement of the prediction units contained within that coding unit: Skip Mode, Merge Mode, AMVP Mode, or Intra-Block Copy Mode.

[0089] The intra-prediction unit 235 can generate prediction blocks based on the pixel information in the current picture. If the prediction unit is a prediction unit that has undergone intra-prediction, intra-prediction can be performed based on the intra-prediction mode information of the prediction unit provided by the image encoder. The intra-prediction unit 235 may include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is the part that filters the reference pixels of the current block, and whether or not to apply the filter can be determined and applied according to the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixels of the current block using the prediction mode of the prediction unit and AIS filter information provided by the image encoding device. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter does not need to be applied.

[0090] The reference pixel interpolation unit can interpolate reference pixels to generate reference pixels of integer value or less if the prediction mode of the prediction unit is a prediction unit that performs intra-prediction based on the pixel value obtained by interpolating the reference pixels. If the prediction mode of the current prediction unit is a prediction mode that generates prediction blocks without interpolating reference pixels, the reference pixels do not need to be interpolated. The DC filter can generate prediction blocks via filtering if the prediction mode of the current block is DC mode.

[0091] The restored block or picture can be provided to the filter unit 240. The filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.

[0092] The image encoder can provide information on whether or not to apply a deblocking filter to the block or picture in question, and if so, whether a strong or weak filter was applied. The image decoder's deblocking filter can receive the deblocking filter-related information provided by the image encoder and perform deblocking filtering on the block in question.

[0093] The offset correction unit can perform offset correction on the restored image based on information such as the type of offset correction and the offset value applied to the image during encoding.

[0094] ALF can be applied to the coding unit based on ALF application status information, ALF coefficient information, etc., provided by the coding device. Such ALF information may be provided in a specific set of parameters.

[0095] Memory 245 can store the restored picture or block and make it available as a reference picture or reference block, and can also provide the restored picture to the output unit.

[0096] As mentioned above, in the embodiments of the present invention below, for the sake of explanation, the term "coding unit" will be used as an encoding unit, but it can also be a unit that performs decoding as well as encoding.

[0097] Figure 3 shows a block division type as one embodiment to which the present invention is applied.

[0098] A single block (hereinafter referred to as the "first block") can be divided into multiple subblocks (hereinafter referred to as the "second block") by at least one of a vertical line or a horizontal line. The vertical and horizontal lines may be one, two, or more. Here, the first block may be a coding block (CU), which is the basic unit of image coding / decoding; a prediction block (PU), which is the basic unit of prediction coding / decoding; or a transformation block (TU), which is the basic unit of transformation coding / decoding. The first block may be a square block or a non-square block.

[0099] The division of the first block can be performed based on a quad tree, binary tree, triple tree, etc. This will be discussed in detail below with reference to Figure 3.

[0100] Figure 3(a) shows a quadtree partition (QT). QT is a partitioning type that divides a first block into four second blocks. For example, if a 2N×2N first block is partitioned using QT, the first block can be divided into four second blocks of size N×N. QT can be restricted to be applied only to square blocks, but it can also be applied to non-square blocks.

[0101] Figure 3(b) shows a horizontal binary tree (hereinafter referred to as "Horizontal BT") partition. A Horizontal BT is a partitioning type in which a first block is divided into two second blocks by a single horizontal line. This bipartite division can be symmetrical or asymmetrical. For example, when a 2N × 2N first block is partitioned into a Horizontal BT, the first block can be divided into two second blocks with a height ratio of (a:b). Here, a and b may be the same value, and a may be greater than or less than b.

[0102] Figure 3(c) shows a vertical binary tree (hereinafter referred to as "Vertical BT") partition. A Vertical BT is a partitioning type in which a first block is divided into two second blocks by a single vertical line. This bipartite division can be symmetric or asymmetric. For example, when a 2N × 2N first block is partitioned into a Vertical BT, the first block can be divided into two second blocks with a width ratio of (a:b). Here, a and b may be the same value, and a may be greater than or less than b.

[0103] Figure 3(d) shows a horizontal ternary tree (hereinafter referred to as "Horizontal TT") partition. A Horizontal TT is a partitioning type in which the first block is divided into three second blocks by two horizontal lines. For example, when a 2N × 2N first block is partitioned into a Horizontal TT, the first block can be divided into three second blocks with height ratios of (a:b:c). Here, a, b, and c may be the same value. Alternatively, a and c may be the same, and b may be greater than or less than a.

[0104] Figure 3(e) shows a vertical ternary tree (hereinafter referred to as "Vertical TT") partition. A Vertical TT is a partitioning type in which the first block is divided into three second blocks by two vertical lines. For example, when a 2N × 2N first block is partitioned into a Vertical TT, the first block can be divided into three second blocks with width ratios of (a:b:c). Here, a, b, and c may be the same value or may be different values. Alternatively, a and c may be the same, and b may be greater than or less than a. Alternatively, a and b may be the same, and c may be greater than or less than a. Alternatively, b and c may be the same, and a may be greater than or less than b.

[0105] The aforementioned partitioning may be performed based on partitioning information signaled by an encoding device. The partitioning information may include at least one of partitioning type information, partitioning direction information, or partitioning ratio information.

[0106] The division type information can identify one of the division types already defined in the encoding / decoding device. The already defined division types may include at least one of QT, Horizontal BT, Vertical BT, Horizontal TT, Vertical TT, or No split mode. Alternatively, the division type information may mean information about whether QT, BT, or TT is applied. This can be encoded in the form of a flag or index. The division direction information may indicate whether the division is horizontal or vertical in the case of BT or TT. The division ratio information may indicate the ratio of the width and / or height of the second block in the case of BT or TT.

[0107] Figure 4 shows a block division method based on a tree structure as one embodiment to which the present invention is applied.

[0108] The block 40 shown in Figure 4 is assumed to be a square block (hereinafter referred to as "the first block") with a size of 8N × 8N and a partitioning depth of k. If the partitioning information of the first block indicates a QT partition, the first block can be divided into four subblocks (hereinafter referred to as "the second block"). The second block has a size of 4N × 4N and can have a partitioning depth of (k+1).

[0109] The four second blocks can be further divided based on one of the following modes: QT, BT, TT, or non-divided mode. For example, if the division information of the second block represents a horizontal binary tree (Horizontal BT), the second block can be divided into two subblocks (hereinafter referred to as "third blocks"), as shown in the second block 410 in Figure 4. In this case, the third block has a size of 4N × 2N and can have a division depth of (k+2).

[0110] The third block can also be divided again based on one of the following modes: QT, BT, TT, or non-divided mode. For example, if the division information of the third block represents a vertical binary tree (Vertical BT), the third block can be divided into two subblocks 411 and 412, as shown in Figure 4. In this case, the subblocks 411 and 412 are 2N × 2N in size and can have a division depth of (k+3). Alternatively, if the division information of the third block represents a horizontal binary tree (Horizontal BT), the third block can be divided into two subblocks 413 and 414, as shown in Figure 4. In this case, the subblocks 413 and 414 are 4N × N in size and can have a division depth of (k+3).

[0111] The division may be performed independently or in parallel with the surrounding blocks, or it may be performed sequentially based on a predetermined priority order.

[0112] The partitioning information of the current block to be partitioned may also be determined dependently based on at least one of the partitioning information of the block above the current block or the partitioning information of the surrounding blocks. For example, if the second block is partitioned into Horizontal BTs and the upper third block is partitioned into Vertical BTs, the lower third block does not need to be partitioned into Vertical BTs. This is because partitioning the lower third block into Vertical BTs would produce the same result as partitioning the second block into QTs. Therefore, the partitioning information of the lower third block (in particular, the partitioning direction information) can be omitted from encoding, and the decoder can be configured so that the lower third block is partitioned horizontally.

[0113] The aforementioned upper block can mean a block with a division depth smaller than the division depth of the current block. For example, if the division depth of the current block is (k+2), the division depth of the upper block may be (k+1). The aforementioned surrounding block can be a block adjacent to the upper or left side of the current block. The aforementioned surrounding block can be a block with the same division depth as the current block.

[0114] The aforementioned division can be repeated down to the smallest unit of encoding / decoding. When divided into the smallest unit, the division information for that block is not further signaled by the encoding device. The information for the smallest unit may include at least one of the size or shape of the smallest unit. The size of the smallest unit can be expressed as the width, height, minimum or maximum value of width and height, sum of width and height, number of pixels, division depth, etc. The information for the smallest unit can be signaled in at least one of the video sequence, picture, slice, or block unit. Alternatively, the information for the smallest unit may be a value already promised to the encoding / decoding device. The information for the smallest unit can be signaled to CU, PU, ​​and TU, respectively. Information for one smallest unit may be applied similarly to CU, PU, ​​and TU.

[0115] Figure 5 is an illustrative diagram showing an intra-prediction mode already defined in the image coding / decoding device.

[0116] Referring to Figure 5, the already defined intra-prediction modes can be defined as a group of candidate prediction modes consisting of 67 modes, specifically including 65 directional modes (numbers 2 through 66) and two non-directional modes (DC, Planar). In this case, the directional modes can be classified into inclination (e.g., dy / dx) or angular information (Degree). All or part of the intra-prediction modes described in the above example may be included in the group of candidate prediction modes for luminance components or chrominance components, and other additional modes may be included in the group of candidate prediction modes.

[0117] Furthermore, the reconstructed blocks of other color spaces, which have been encoded / decoded using inter-color space correlations, can be used to predict the current block, and a prediction mode to support this can be included. For example, in the case of chrominance components, the current block and the reconstructed blocks of the corresponding luminance components can be used to generate a predicted block for the current block. In other words, a predicted block can be generated based on the reconstructed block, taking inter-color space correlations into account.

[0118] The candidate set of prediction modes can be adaptively determined based on the encoding / decoding settings. The number of candidates can be increased to improve prediction accuracy, and the number of candidates can be decreased to reduce the amount of bits required for each prediction mode.

[0119] For example, one of the candidate groups can be selected, such as Group A (67 elements, 65 directional modes and 2 non-directional modes), Group B (35 elements, 33 directional modes and 2 non-directional modes), or Group C (18 elements, 17 directional modes and 1 non-directional mode). The candidate group can be adaptively selected or determined according to the size and shape of the block.

[0120] Furthermore, the composition of the predicted mode candidate group can be diverse based on the encoding / decoding settings. For example, the predicted mode candidate group can be composed of evenly distributed modes as shown in Figure 5, or the number of modes between mode 18 and mode 34 in Figure 5 can be greater than the number of modes between mode 2 and mode 18. Or, the reverse is possible. The candidate group can be configured adaptively depending on the shape of the block (i.e., square, non-square with width greater than height, non-square with height greater than width, etc.).

[0121] For example, if the current block width is greater than the height, all or part of the intra-prediction modes belonging to numbers 2 through 18 will not be used and can be replaced by all or part of the intra-prediction modes belonging to numbers 67 through 80. On the other hand, if the current block width is less than the height, all or part of the intra-prediction modes belonging to numbers 50 through 66 will not be used and can be replaced by all or part of the intra-prediction modes belonging to numbers -14 through -1.

[0122] Unless otherwise specified in the present invention, the description assumes that intra-prediction is performed using a predefined group of predictive mode candidates (Candidate Group A) having equal mode intervals. However, the main elements of the present invention can also be modified and applied to adaptive intra-prediction settings as described above.

[0123] Figure 6 shows an intra-prediction method as one embodiment to which the present invention is applied.

[0124] Referring to Figure 6, the reference region for intra-prediction of the current block can be determined (S600).

[0125] The encoding / decoding device can define multiple pixel lines available for intra-prediction. These multiple pixel lines may include at least one of the following: a first pixel line adjacent to the current block, a second pixel line adjacent to the first pixel line, a third pixel line adjacent to the second pixel line, or a fourth pixel line adjacent to the third pixel line.

[0126] For example, depending on the encoding / decoding settings, multiple pixel lines may include all of the first through fourth pixel lines, or only the remaining pixel lines excluding the third pixel line. Alternatively, multiple pixel lines may include only the first and fourth pixel lines.

[0127] The current block can select one or more pixel lines from the plurality of pixel lines and use them as a reference region. In this case, the selection may be made based on an index (refIdx) signaled by the encoding device. Alternatively, the selection may be made based on predetermined encoding information. Here, the encoding information may include at least one of the following: the size, shape, division type of the current block, whether the intra-prediction mode is non-directional, whether the intra-prediction mode is horizontal, and the angle or component type of the intra-prediction mode. For example, if the intra-prediction mode is Planar mode or DC mode, the use can be restricted to only the first pixel line. Alternatively, if the size of the current block is equal to or smaller than a predetermined threshold, the use can be restricted to only the first pixel line. Here, the size can be expressed as either the width or height of the current block (e.g., maximum value, minimum value, etc.), the sum of the width and height, or the number of samples belonging to the current block. Alternatively, if the intra-prediction mode is greater than (or less than) a predetermined threshold angle, the use can be restricted to only the first pixel line. The threshold angle may be the angle of the intra-prediction mode corresponding to mode 2 and mode 66 among the candidate group of prediction modes mentioned above.

[0128] Referring to Figure 6, the current intra-prediction mode of the block can be determined (S610).

[0129] Currently, a block is a concept that includes luminance blocks and chrominance blocks, and the intra-prediction mode can be determined for each of the luminance and chrominance blocks. Hereinafter, we assume that the intra-prediction mode already defined in the decoding device consists of non-directional modes (Planar mode, DC mode) and 65 directional modes.

[0130] The previously defined intra-prediction modes can be divided into MPM candidate groups and Non-MPM candidate groups. The intra-prediction mode of the current block can be induced using either the MPM candidate group or the Non-MPM candidate group selectively. For this purpose, a flag can be used to indicate whether the intra-prediction mode of the current block is induced from the MPM candidate group or not. For example, if the flag is valued as the first value, the MPM candidate group may be used, and if the flag is valued as the second value, the Non-MPM candidate group may be used. The flag can be encoded and signaled by the encoding device. Alternatively, the flag can be induced by the decoding device based on predetermined encoded information. The encoded information is as described above, and a redundant explanation is omitted.

[0131] If the flag is a first value, the intra-prediction mode of the current block can be derived based on the MPM candidate set and the MPM index. The MPM candidate set includes one or more MPMs, which can be determined based on the intra-prediction modes of the adjacent blocks of the current block. The number of MPMs is r, where r can be an integer of 1, 2, 3, 4, 5, 6, or more. The number of MPMs may be a fixed value already promised to the encoding / decoding device, or it may be determined variably based on the encoding information described above.

[0132] For example, the MPM candidate group may include at least one of the intra-prediction modes of the adjacent block, modeA, (modeA-n), (modeA+n), or default mode. The value of n may be an integer of 1, 2, 3, 4, or more. The adjacent block may mean a block adjacent to the left and / or above the current block, but is not limited to this; the adjacent block may also include at least one of the blocks adjacent to the upper left, lower left, or upper right. The default mode may be at least one of the Planar mode, DC mode, or a predetermined directional mode. The predetermined directional mode may include at least one of the horizontal mode (modeV), vertical mode (modeH), (modeV-k), (modeV+k), (modeH-k), or (modeH+k).

[0133] The aforementioned MPM index can identify the MPM from the MPM candidate group that matches the intra-prediction mode of the current block. In other words, the MPM identified by the MPM index can be set as the intra-prediction mode of the current block.

[0134] Alternatively, the MPM candidate group can be divided into multiple groups. For example, suppose the MPM candidate group is divided into a first group and a second group. The first group can consist of at least one of the default modes described above. For example, the first group may consist only of non-directional modes, or only of a predetermined directional mode. Alternatively, the first group may consist only of Planar mode or only of DC mode among the non-directional modes. The second group can include at least one of the intra-prediction modes of the adjacent block, modeA, (modeA-n), (modeA+n), or default mode. The value of n can be an integer of 1, 2, 3, 4, or more. The adjacent block can mean a block adjacent to the left and / or above the current block. However, it is not limited to this, and the adjacent block can also include at least one of the blocks adjacent to the upper left, lower left, or upper right. The default mode can be at least one of Planar mode, DC mode, or a predetermined directional mode. A predetermined directional mode may include at least one of the following: horizontal mode (modeV), vertical mode (modeH), (modeV-k), (modeV+k), (modeH-k), or (modeH+k). ​​However, the second group may be configured so as not to include any MPMs belonging to the first group.

[0135] The current block's intra-prediction mode can be induced by selectively using either the first or second group. For this purpose, a flag can be used to indicate whether the current block's intra-prediction mode is induced from the first group. For example, if the flag is valued as the first, the current block's intra-prediction mode can be set to an MPM belonging to the first group. Conversely, if the flag is valued as the second, the current block's intra-prediction mode can be induced based on the second group and the MPM index. Here, the MPM index is as described above, and a detailed explanation is omitted.

[0136] The aforementioned flag can be encoded and signaled by an encoding device. However, the flag can be signaled adaptively considering predetermined encoding information. Here, the encoding information may include at least one of the following: the size, shape, partitioning type, or reference area of ​​the current block. Here, the partitioning type may mean a quadtree, binary tree, ternary tree, or the presence or absence of intra prediction at the subblock level.

[0137] For example, the flag can be signaled only if the reference region of the current block is the first pixel line (Embodiment 1). If the reference region of the current block is not the first pixel line, the flag is not signaled and can be set to a second value by the decoder. This makes it possible to restrict the induction of an intra-prediction mode based on the first group when the current block does not refer to the first pixel line.

[0138] Furthermore, the flag can be signaled only when the current block does not perform intra-prediction at the sub-block level (Embodiment 2). Conversely, when the current block does perform intra-prediction at the sub-block level, the flag is not signaled and can be set to a second value by the decoding device.

[0139] The flag may be signaled if either of the conditions in Embodiment 1 or 2 described above is met, and the flag may be set to be signaled if both Embodiment 1 and 2 are met.

[0140] Referring to Figure 6, intra-prediction can be performed on the current block based on the reference region and intra-prediction mode for intra-prediction (S620).

[0141] The aforementioned intra-prediction can be performed at the sub-block level of the current block. For this purpose, the current block can be divided into multiple sub-blocks. The method of division will be discussed in detail with reference to Figure 7.

[0142] Figure 7 shows an intra-prediction method at the sub-block level as one embodiment to which the present invention is applied.

[0143] As mentioned above, the current block can be divided into multiple subblocks. In this case, the current block can correspond to a leaf node. A leaf node can represent a coding block that cannot be further divided into smaller coding blocks. In other words, a leaf node can represent a block that cannot be further divided through the aforementioned tree-based block division.

[0144] The division may be performed based on the current size of the block (Embodiment 1).

[0145] Referring to Figure 7, if the current size of block 700 is smaller than a predetermined threshold, the current block can be divided into two vertically or horizontally. Conversely, if the current size of block 710 is the same as or larger than the threshold, the current block can be divided into four vertically or horizontally.

[0146] The magnitude of the threshold may be signaled by the encoding device, or it may be a fixed value already defined in the decoding device. For example, the magnitude of the threshold may be expressed as N × M, where N and M may be 4, 8, 16 or more. N and M may be set to be the same, or they may be set to be different from each other.

[0147] Alternatively, if the current block size is smaller than a predetermined threshold size, the current block is not split; otherwise, the current block can be split into two or four parts.

[0148] The division may be performed based on the current shape of the block (Embodiment 2).

[0149] If the current block is square, it can be divided into four parts; otherwise, it can be divided into two parts. Conversely, if the current block is square, it can be divided into two parts; otherwise, it can be divided into four parts.

[0150] Alternatively, if the current block is square, it can be divided into two or four sections; otherwise, it may remain undivided. Conversely, if the current block is square, it may remain undivided; otherwise, it may be divided into two or four sections.

[0151] Either Embodiment 1 or 2 described above may be selectively applied and divided, or the division may be based on a combination of Embodiment 1 and 2.

[0152] The two divisions are made by dividing the body into two in either a vertical or horizontal direction, and the four divisions may include dividing the body into four in either a vertical or horizontal direction, or dividing it into four in both vertical and horizontal directions.

[0153] In the embodiments described above, two-part or four-part divisions are explained, but the present block may be divided into three parts vertically or horizontally. In this case, the ratio of width or height may be (1:1:2), (1:2:1), or (2:1:1).

[0154] Information regarding whether or not the data is divided into subblock units, whether or not it is divided into four sections, the division number "num", and the number of divisions may be signaled from the encoding device or variably determined by the decoding device based on predetermined encoding parameters. Here, the encoding parameters can mean the size / shape of the block, the division type (four sections, two sections, three sections), the intra-prediction mode, the range / position of adjacent pixels for intra-prediction, the component type (e.g., luminance, chrominance), the maximum / minimum size of the transformed block, the transformed type (e.g., transformed skip, DCT2, DST7, DCT8), and so on.

[0155] Figure 8 shows a prediction method based on inter-component referencing as one embodiment to which the present invention is applied.

[0156] Currently, blocks can be classified into luminance blocks and chrominance blocks depending on the type of component. Chrominance blocks can be predicted using pixels from already reconstructed luminance blocks, and this is called intercomponent referencing. In this embodiment, it is assumed that chrominance blocks have a size of (nTbW × nTbH), and the corresponding luminance blocks have a size of (2*nTbW × 2*nTbH). This assumes that the ratio of width to height of luminance and chrominance blocks is 2:1 in all cases, but it should be understood that the examples described later can be applied identically or similarly even if one of the widths and heights is 1:1 and the other is 2:1, or if both are 1:1.

[0157] Referring to Figure 8, the intra-prediction mode of the color difference block can be determined (S800).

[0158] Specifically, the predefined intra-prediction modes for chrominance blocks can be divided into a first group and a second group. Here, the first group may consist of prediction modes based on inter-component references, and the second group may consist of predefined intra-prediction modes for luminance blocks. The encoding / decoding device may define at least one of INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM as the prediction mode based on inter-component references.

[0159] The intra-prediction mode of the color difference block can be induced by selectively using either the first group or the second group. This selection may be based on a predetermined first flag, which may indicate whether the intra-prediction mode of the color difference block is induced based on the first group or the second group.

[0160] For example, if the first flag is the first value, the intra-prediction mode of the color difference block can be determined to be one of the prediction modes based on one or more inter-component references belonging to the first group. For this reason, an index can be used to identify one of the prediction modes based on inter-component references belonging to the first group. The prediction modes based on inter-component references belonging to the first group and the index assigned to each prediction mode are shown in Table 1 below. [Table 1]

[0161] Table 1 is merely an example of the indices that can be assigned to each prediction mode, and is not limited thereto. That is, as shown in Table 1, the indices may be assigned in the order of INTRA_LT_CCLM, INTRA_L_CCLM, INTRA_T_CCLM, or in the order of INTRA_LT_CCLM, INTRA_T_CCLM, INTRA_L_CCLM. Alternatively, INTRA_LT_CCLM may have a lower priority than INTRA_T_CCLM or INTRA_L_CCLM.

[0162] The first flag can be selectively signaled based on information indicating whether inter-component references are permitted. For example, if the value of the information is 1, the first flag is signaled; otherwise, the first flag does not need to be signaled. Here, the information can be determined to be 0 or 1 based on predetermined conditions described later.

[0163] (Condition 1) If a second flag indicating whether or not prediction based on inter-component references is permitted is 0, the information can be set to 0. The second flag can be signaled by at least one of the following: video parameter set (VPS), sequence parameter set (SPS), picture parameter set (PPS), or slice header.

[0164] (Condition 2) The above information can be set to 1 if at least one of the following subconditions is met. -When the value of qtbtt_dual_tree_intra_flag is 0 - If the slice type is not I-slice - If the size of the coding tree block is smaller than 64x64

[0165] In condition 2 above, qtbtt_dual_tree_intra_flag can indicate whether the coding tree block is implicitly divided into coding blocks of size 64x64, and whether the coding blocks of size 64x64 are divided into a dual tree. The dual tree can mean a method in which the luminance component and chrominance component are divided with a division structure independent of each other. The size of the coding tree block (CtbLog2Size) may be a size already defined in the encoding / decoding device (e.g., 64x64, 128x128, 256x256), or it may be encoded and signaled by the encoding device.

[0166] (Condition 3) The above information can be set to 1 if at least one of the following subconditions is met. - If the width and height of the first top block is 64 -When the depth of the first upper block is the same as (CtbLog2Size-6), the first upper block is divided into Horizontal BTs, and the second upper block is 64x32. - If the depth of the first upper block is greater than (CtbLog2Size-6) -When the depth of the first upper block is the same as (CtbLog2Size-6), and the first upper block is divided into Horizontal BTs and the second upper block is divided into Vertical BTs.

[0167] In condition 3 above, the first upper block may be a block that currently contains the color difference block as a subblock. For example, if the current color difference block has a depth of k, the depth of the first upper block is (kn), where n can be 1, 2, 3, 4 or more. The depth of the first upper block may mean only the depth obtained by a quadtree-based partition, or it may mean the depth obtained by a partition of at least one of quadtrees, binary trees, or ternary trees. The second upper block is a subblock belonging to the first upper block and may have a smaller depth than the current color difference block or a larger depth than the first upper block. For example, if the current color difference block has a depth of k, the depth of the second upper block is (km), where m can be a natural number smaller than n.

[0168] If none of the conditions 1-3 mentioned above are met, the above information can be set to 0.

[0169] However, even if at least one of conditions 1 to 3 is met, the above information can be reset to 0 if at least one of the following sub-conditions is met. -When the first upper block is 64x64 and predictions are made on a sub-block basis as described above - If at least one of the widths or heights of the first upper block is less than 64, and the depth of the first upper block is the same as (CtbLog2Size-6) In contrast, when the flag is a second value, the intra-prediction mode of the color difference block can be induced based on the information signaled by the encoding device (intra_chroma_pred_mode) as shown in Table 2 below. [Table 2]

[0170] According to Table 2, the intra-prediction mode of the chroma difference block can be determined based on the signaled information and the intra-prediction mode of the luminance block. In Table 2, mode 66 can mean the diagonal mode in the upper right direction, mode 50 can mean the vertical mode, mode 18 can mean the horizontal mode, and mode 1 can mean the DC mode. For example, if the value of the signaled information intra_chroma_pred_mode is 4, the intra-prediction mode of the chroma difference block can be set to be the same as the intra-prediction mode of the luminance block. If the intra-prediction mode of the chroma difference block is derived from the second group, the chroma difference block can be predicted by the intra-prediction method shown in Figure 6, and a detailed explanation is omitted. Referring to Figure 8, the luminance region for inter-component reference of the chroma difference block can be identified (S810).

[0171] The luminance region may include at least one of a luminance block or an adjacent region adjacent to a luminance block. Here, a luminance block can be defined as a region containing pixels pY[x][y](x=0..nTbW*2-1, y=0..nTbH*2-1). The pixels may represent the restored values ​​before the in-loop filter was applied.

[0172] The adjacent region may include at least one of the left adjacent region, the upper adjacent region, or the upper left adjacent region. The left adjacent region can be set to the region containing the pixel pY[x][y](x=-1..-3, y=0..2*numSampL-1). This setting can only be performed if the value of numSampL is greater than 0. The upper adjacent region can be set to the region containing the pixel pY[x][y](x=0..2*numSampT-1, y=-1..-3). This setting can only be performed if the value of numSampT is greater than 0. The upper left adjacent region can be set to the region containing the pixel pY[x][y](x=-1, y=-1, -2). This setting can only be performed if the upper left region of the luminance block is available.

[0173] The aforementioned numSampL and numSampT can be determined based on the intra-prediction mode of the current block. Here, the current block can mean the color difference block.

[0174] For example, if the current block's intra-prediction mode is INTRA_LT_CCLM, it can be derived as shown in Equation 1 below. Here, INTRA_LT_CCLM can mean a mode in which inter-component referencing is performed based on the regions adjacent to the left and above the current block.

[0175] [Formula 1] numSampT=availT?nTbW:0 numSampL=availL?nTbH:0

[0176] According to Equation 1, numSampT can be directed to nTbW if the upper adjacent region of the current block is available, and to 0 otherwise. Similarly, numSampL can be directed to nTbH if the left adjacent region of the current block is available, and to 0 otherwise.

[0177] In contrast, if the current block's intra prediction mode is not INTRA_LT_CCLM, it can be derived as shown in equation 2 below.

[0178] [Formula 2] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)?(nTbW+numTopRight):0 numSampL=(availL&&predModeIntra==INTRA_L_CCLM)?(nTbH+numLeftBelow):0

[0179] In Equation 2, INTRA_T_CCLM can mean a mode in which inter-component referencing is performed based on the region adjacent to the upper side of the current block, and INTRA_L_CCLM can mean a mode in which inter-component referencing is performed based on the region adjacent to the left side of the current block. numTopRight can mean the number of all or some pixels belonging to the region adjacent to the upper right side of the color difference block. Some pixels can mean available pixels among the pixels belonging to the lowest pixel line (row) of that region. The determination of availability is made sequentially from left to right, checking whether pixels are available or not, and this can continue until an unavailable pixel is found. numLeftBelow can mean the number of all or some pixels belonging to the region adjacent to the lower left side of the color difference block. Some pixels can mean available pixels among the pixels belonging to the rightmost pixel line (column) of that region. The determination of availability is made sequentially from top to bottom, checking whether pixels are available or not, and this can continue until an unavailable pixel is found.

[0180] Referring to Figure 8, downsampling may be performed on the luminance region identified in S810 (S820).

[0181] The downsampling described above may include at least one of the following: 1. downsampling of the luminance block, 2. downsampling of the region adjacent to the left of the luminance block, or 3. downsampling of the region adjacent to the upper side of the luminance block, which will be discussed in detail below.

[0182] 1. Downsampling of luminance blocks (Embodiment 1)

[0183] The pixels pDsY[x][y] (x=0..nTbW-1, y=0..nTbH-1) of the downsampled luminance block can be derived based on the corresponding pixels pY[2*x][2*y] of the luminance block and the surrounding pixels. Surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one direction: to the left, right, above, or below. For example, the pixels pDsY[x][y] can be derived as shown in equation 3 below.

[0184] [Formula 3] pDsY[x][y]=(pY[2*x][2*y-1]+pY[2*x-1][2*y]+4*pY[2*x][2*y]+pY[2*x+1][2*y]+pY[2*x][2*y+1]+4)>>3

[0185] However, there may be cases where the left / upper adjacent region of the current block is unavailable. If the left adjacent region of the current block is unavailable, the downsampled luminance block pixel pDsY[0][y](y=1..nTbH-1) can be derived based on the corresponding pixel pY[0][2*y] of the luminance block and the surrounding pixels. The surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one direction, either above or below. For example, the pixel pDsY[0][y](y=1..nTbH-1) can be derived as shown in equation 4 below.

[0186] [Equation 4] pDsY[0][y]=(pY[0][2*y-1]+2*pY[0][2*y]+pY[0][2*y+1]+2)>>2

[0187] If the upper adjacent region of a block is currently unavailable, the downsampled luminance block pixel pDsY[x][0](x=1..nTbW-1) can be derived based on the corresponding luminance block pixel pY[2*x][0] and surrounding pixels. Surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one direction, either to the left or to the right. For example, the pixel pDsY[x][0](x=1..nTbW-1) can be derived as shown in equation 5 below.

[0188] [Formula 5] pDsY[x][0]=(pY[2*x-1][0]+2*pY[2*x][0]+pY[2*x+1][0]+2)>>2

[0189] On the other hand, the downsampled luminance block pixel pDsY[0][0] can be derived based on the corresponding pixel pY[0][0] of the luminance block and / or the surrounding pixels. The position of the surrounding pixels can be determined differently depending on whether the left / upper adjacent region of the block is currently available.

[0190] For example, if the left adjacent region is available and the upper adjacent region is not, pDsY[0][0] can be derived as shown in equation 6 below.

[0191] [Formula 6] pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2

[0192] In contrast, if the left adjacent region is unavailable but the upper adjacent region is available, pDsY[0][0] can be derived as shown in equation 7 below.

[0193] [Equation 7] pDsY[0][0]=(pY[0][-1]+2*pY[0][0]+pY[0][1]+2)>>2

[0194] On the other hand, if neither the left nor the upper adjacent region is available, pDsY[0][0] can be set to the corresponding pixel pY[0][0] of the luminance block.

[0195] (Embodiment 2) The pixels pDsY[x][y] (x=0..nTbW-1, y=0..nTbH-1) of the downsampled luminance block can be derived based on the corresponding pixels pY[2*x][2*y] of the luminance block and the surrounding pixels. Surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one direction from below, to the left, to the right, to the lower left, or to the lower right. For example, the pixels pDsY[x][y] can be derived as shown in equation 8 below.

[0196] [Formula 8] pDsY[x][y]=(pY[2*x-1][2*y]+pY[2*x-1][2*y+1]+2*pY[2*x][2*y]+2*pY[2*x][2*y+1]+pY[2*x+1][2*y]+pY[2*x+1][2*y+1]+4)>>3

[0197] However, if the left adjacent region of the block is currently unavailable, the downsampled luminance block pixel pDsY[0][y](y=0..nTbH-1) can be derived based on the corresponding luminance block pixel pY[0][2*y] and the surrounding pixels below. For example, the pixel pDsY[0][y](y=0..nTbH-1) can be derived as shown in equation 9 below.

[0198] [Formula 9] pDsY[0][y]=(pY[0][2*y]+pY[0][2*y+1]+1)>>1

[0199] Downsampling of luminance blocks can be performed based on either Embodiment 1 or 2 described above. In this case, either Embodiment 1 or 2 can be selected based on a predetermined flag. The flag can indicate whether the downsampled luminance pixels have the same position as the original luminance pixels. For example, if the flag is a first value, the downsampled luminance pixels have the same position as the original luminance pixels. On the other hand, if the flag is a second value, the downsampled luminance pixels have the same position horizontally as the original luminance pixels, but are shifted vertically by half a pel.

[0200] 2. Downsampling of the left adjacent region of the luminance block. (Embodiment 1) The downsampled left-side neighbor pixel pLeftDsY[y] (y=0..numSampL-1) can be derived based on the corresponding left-side neighbor pixel pY[-2][2*y] and surrounding pixels. Surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one direction: left, right, above, or below. For example, the pixel pLeftDsY[y] can be derived as shown in equation 10 below.

[0201] [Formula 10] pLeftDsY[y]=(pY[-2][2*y-1]+pY[-3][2*y]+4*pY[-2][2*y]+pY[-1][2*y]+pY[-2][2*y+1]+4)>>3

[0202] However, if the upper-left adjacent region of the block is currently unavailable, the downsampled left adjacent region pixel pLeftDsY[0] can be derived based on the corresponding left adjacent region pixel pY[-2][0] and surrounding pixels. Surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one direction, either to the left or to the right. For example, the pixel pLeftDsY[0] can be derived as shown in equation 11 below.

[0203] [Formula 11] pLeftDsY[0]=(pY[-3][0]+2*pY[-2][0]+pY[-1][0]+2)>>2

[0204] (Embodiment 2) The downsampled left-side neighbor pixel pLeftDsY[y] (y=0..numSampL-1) can be derived based on the corresponding left-side neighbor pixel pY[-2][2*y] and surrounding pixels. Surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one direction: below, to the left, to the right, below left, or below right. For example, the pixel pLeftDsY[y] can be derived as shown in equation 12 below.

[0205] [Formula 12] pLeftDsY[y]=(pY[-1][2*y]+pY[-1][2*y+1]+2*pY[-2][2*y]+2*pY[-2][2*y+1]+pY[-3][2*y]+pY[-3][2*y+1]+4)>>3

[0206] Similarly, downsampling of the left adjacent region can be performed based on either Embodiment 1 or 2 described above. In this case, either Embodiment 1 or 2 can be selected based on a predetermined flag. The flag indicates whether the downsampled luminance pixel has the same position as the original luminance pixel, as described above.

[0207] On the other hand, downsampling of the left-side adjacent region can only be performed if the numSampL value is greater than 0. A numSampL value greater than 0 can mean that the left-side adjacent region of the current block is available and the intra-prediction mode of the current block is INTRA_LT_CCLM or INTRA_L_CCLM.

[0208] 3. Downsampling of the upper adjacent region of the luminance block (Embodiment 1) The downsampled pixels pTopDsY[x](x=0..numSampT-1) in the upper adjacent region can be derived by considering whether the upper adjacent region belongs to a different CTU than the luminance block.

[0209] If the upper adjacent region belongs to the same CTU as the luminance block, the downsampled pixel pTopDsY[x] of the upper adjacent region can be derived based on the corresponding pixel pY[2*x][-2] of the upper adjacent region and the surrounding pixels. Surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one direction: to the left, right, above, or below. For example, the pixel pTopDsY[x] can be derived as shown in equation 13 below. [Formula 13] pTopDsY[x]=(pY[2*x][-3]+pY[2*x--1][-2]+4*pY[2*x][-2]+pY[2*x+1][-2]+pY[2*x][-1]+4)>>3

[0210] In contrast, if the upper adjacent region belongs to a different CTU than the luminance block, the downsampled pixel pTopDsY[x] of the upper adjacent region can be derived based on the corresponding pixel pY[2*x][-1] of the upper adjacent region and the surrounding pixels. The surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one direction, either to the left or to the right. For example, the pixel pTopDsY[x] can be derived as shown in equation 14 below.

[0211] [Formula 14] pTopDsY[x]=(pY[2*x-1][-1]+2*pY[2*x][-1]+pY[2*x+1][-1]+2)>>2

[0212] Alternatively, if the upper left adjacent region of the block is currently unavailable, the surrounding pixel may mean a pixel adjacent to the corresponding pixel in at least one direction, either above or below. For example, the pixel pTopDsY[0] can be derived as shown in equation 15 below.

[0213] [Formula 15] pTopDsY[0]=(pY[0][-3]+2*pY[0][-2]+pY[0][-1]+2)>>2

[0214] Alternatively, if the upper left adjacent region of the block is currently unavailable and the upper adjacent region belongs to a different CTU than the luminance block, the pixel pTopDsY[0] can be set to the pixel pY[0][-1] of the upper adjacent region.

[0215] (Embodiment 2) The downsampled pixels pTopDsY[x](x=0..numSampT-1) in the upper adjacent region can be derived by considering whether the upper adjacent region belongs to a different CTU than the luminance block.

[0216] If the upper adjacent region belongs to the same CTU as the luminance block, the downsampled pixel pTopDsY[x] of the upper adjacent region can be derived based on the corresponding pixel pY[2*x][-2] of the upper adjacent region and the surrounding pixels. Surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one direction from below, to the left, to the right, to the lower left, or to the lower right. For example, the pixel pTopDsY[x] can be derived as shown in equation 16 below.

[0217] [Formula 16] pTopDsY[x]=(pY[2*x-1][-2]+pY[2*x-1][-1]+2*pY[2*x][-2]+2*pY[2*x][-1]+pY[2*x+1][-2]+pY[2*x+1][-1]+4)>>3

[0218] In contrast, if the upper adjacent region belongs to a different CTU than the luminance block, the downsampled pixel pTopDsY[x] of the upper adjacent region can be derived based on the corresponding pixel pY[2*x][-1] of the upper adjacent region and surrounding pixels. Surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one direction, either to the left or to the right. For example, the pixel pTopDsY[x] can be derived as shown in equation 17 below.

[0219] [Formula 17] pTopDsY[x]=(pY[2*x-1][-1]+2*pY[2*x][-1]+pY[2*x+1][-1]+2)>>2

[0220] Alternatively, if the upper left adjacent region of the block is currently unavailable, the surrounding pixel may mean a pixel adjacent to the corresponding pixel in at least one direction, either above or below. For example, the pixel pTopDsY[0] can be derived as shown in equation 18 below.

[0221] [Formula 18] pTopDsY[0]=(pY[0][-2]+pY[0][-1]+1)>>1

[0222] Alternatively, if the upper left adjacent region of the block is currently unavailable and the upper adjacent region belongs to a different CTU than the luminance block, the pixel pTopDsY[0] can be set to the pixel pY[0][-1] of the upper adjacent region.

[0223] Similarly, downsampling of the upper adjacent region can be performed based on either Embodiment 1 or 2 described above. In this case, either Embodiment 1 or 2 can be selected based on a predetermined flag. The flag indicates whether the downsampled luminance pixel has the same position as the original luminance pixel, as described above.

[0224] On the other hand, downsampling of the upper adjacent region can only be performed if the numSampT value is greater than 0. A numSampT value greater than 0 can mean that the upper adjacent region of the current block is available and the intra-prediction mode of the current block is INTRA_LT_CCLM or INTRA_T_CCLM.

[0225] Referring to Figure 8, parameters for intercomponent referencing of color difference blocks can be derived (S830).

[0226] The parameter may include at least one of a weight or an offset. The parameter can be determined by considering the intra-prediction mode of the current block. The parameter can be derived using at least one of pixels in the luminance region or pixels in the left / upper adjacent region of the chrominance block. Here, the luminance region may include the luminance block and the upper / left adjacent region of the luminance block. The luminance region may mean the region to which the downsampling described above has been applied.

[0227] The aforementioned parameters can be derived using all or some pixels belonging to the adjacent region of the luminance region and the color difference block.

[0228] By identifying some pixels in the luminance region, some pixels in the color difference block can be determined as pixels at positions corresponding to the identified pixels in the luminance region (Embodiment 1). Some pixels in the luminance region can be extracted from the upper and left adjacent regions of the luminance block, respectively. The number of pixels extracted from the upper adjacent region (numSampT) may be the same as the number of pixels extracted from the left adjacent region (numSampL), or it may differ depending on the size / shape of the luminance block. For example, in an N*M luminance block, if N is greater than M, numSampT can be set to be greater than numSampL, and if N is less than M, numSampT can be set to be less than numSampL. Alternatively, if the size of the luminance block is smaller than a predetermined threshold, at least one of numSampT or numSampL is determined to be i, and i can be a natural number of 2, 3, 4, or more. Conversely, if the size of the luminance block is larger than a predetermined threshold, then at least one of numSampT or numSampL is determined to be j pixels, where j can be a natural number greater than i (e.g., 3, 4, 5). Alternatively, some pixels may be restricted to being extracted only from the upper adjacent region of the luminance block, or only from the left adjacent region. In this case as well, as mentioned above, numSampT or numSampL can of course be determined according to the size / shape of the luminance block. The position of the aforementioned partial pixels can be a position already promised to the encoding / decoding device. For example, if the upper adjacent region of the luminance block consists of eight pixels, the partial pixels may be determined to be at least one of four pixels located in odd-numbered positions from left to right, or at least one of four pixels located in even-numbered positions. Alternatively, the partial pixels may include at least one of two pixels located in odd-numbered positions from left to right, and at least one of two pixels located in even-numbered positions from right to left. If the upper and left adjacent regions of a luminance block each consist of four pixels, some pixels can have one or two pixels extracted from the upper and left adjacent regions, respectively.In this case, the pixel may be determined to be at least one of two odd-numbered pixels in the upper adjacent region, or at least one of two even-numbered pixels. Alternatively, it may be determined to be at least one of the first and last pixels in the upper adjacent region. Some pixels can be extracted from the left adjacent region in a similar manner.

[0229] Alternatively, conversely, some pixels within the adjacent region of the color difference block can be identified, and some pixels in the luminance region can be determined to be pixels at positions corresponding to those pixels within the adjacent region of the color difference block (Embodiment 2). Here, some pixels within the adjacent region of the color difference block can be determined by the method for determining some pixels in the luminance region described above, and a redundant explanation is omitted.

[0230] The maximum and minimum values ​​can be calculated from the extracted subset of pixels for the luminance region and the chrominance region, respectively. The maximum and minimum values ​​can be determined from among a plurality of subset pixels. Alternatively, multiple pixels can be sorted in descending order by comparing their sizes. In this case, the average of the top t pixels may be set as the maximum value, and the average of the bottom t pixels may be set as the minimum value. t can be 1, 2, 3, or any other natural number.

[0231] Based on the calculated maximum and minimum values, the weights and / or offsets of the parameters can be derived.

[0232] Chroma difference blocks can be predicted based on downsampled luminance blocks and parameters (S840).

[0233] The color difference block can be predicted by applying at least one of the previously induced weights or offsets to the pixels of the downsampled luminance block.

[0234] While various methods of making predictions exist, one example is making predictions based on spatial or temporal correlations.

[0235] As an example based on spatial correlation, methods such as extrapolation, interpolation, averaging, and copying can be used for the target block using already encoded / decoded pixels from adjacent regions. Alternatively, methods such as block matching and template matching can be used for the target block using a reference region that has already been encoded / decoded. In this case, the reference region may be limited to the current picture.

[0236] As an example based on temporal correlation, a block matching method can be used on the target block using an already encoded / decoded reference region, or a template matching method can be used. In this case, the reference region may be limited to other pictures.

[0237] Generally, predictions can be made based on the correlation described above, but in the example above, the prediction can be categorized based on the reference area (current picture / other picture). Thus, predictions can be categorized not only by the reference area but also by various other factors. For example, the reference area, reference location, and prediction method can be examples of such categorized elements.

[0238] We will now consider the case where one or more prediction candidates are defined based on the various factors mentioned above, and a prediction is made based on these candidates.

[0239] The following describes a case where the reference area is limited (currently a picture in this example) and the prediction is divided into multiple candidates by other factors. Specifically, we assume that the prediction is made based on spatial correlation and is divided into two candidates depending on the prediction method. Of course, this is not the only example, and variations are possible in which additional candidates are supported or the factors that differentiate the predictions are configured differently.

[0240] 1) Predictions are made using extrapolation, interpolation, and averaging of data from adjacent regions. 2) Make predictions using block matching in already encoded / decoded regions. In case 1, a predetermined directional mode, non-directional mode, etc., can be configured as a group of prediction mode candidates, and at least one of them can be selected to represent the prediction mode information. In case 2, the prediction mode information can be represented using motion vector information, reference picture information, etc.

[0241] Each of the aforementioned prediction methods can be activated by information that explicitly indicates the presence or absence of support, or the presence or absence of support can be implicitly determined. In this example, we assume that method 1 is implicitly activated (supported), and method 2 is activated by information that explicitly indicates the presence or absence of support.

[0242] To predict the target block, one of the prediction methods described above can be used, and selection information related to this can be generated. Depending on the selected prediction method, subsequent prediction information (such as prediction mode information) may be generated, and various flags (syntax) can be constructed for this purpose. The method for determining the prediction method will be explained in detail below with reference to Figures 9 to 12. The unit to which the example described later applies (current block) can be any one of the coding unit, prediction unit, or transformation unit.

[0243] Referring to Figure 9, the prediction method selection information (pred_mode_flag) is checked, and if either method 1 or method 2 is selected accordingly, the prediction mode information (intra_mode_information or motion_information) is checked, and a prediction can be made based on the prediction method and prediction mode information.

[0244] `intra_mode_information` refers to the extrapolation, interpolation, and mean prediction modes. It can be configured such that the overall prediction mode is represented as a single candidate group, as in `intra_pred_mode`, and selected from among them. Alternatively, it can be configured such as `mpm_flag`, `mpm_idx`, and `remaining_mode`, where the overall prediction mode is represented as multiple candidate groups based on predetermined criteria, and selected from among the selected candidate groups. A detailed explanation of this can be derived from the examples mentioned above, so a detailed explanation will be omitted.

[0245] motion_information may include at least one of the following: motion prediction mode (Skip / Merge / AMVP), motion vector prediction information, motion difference value information, reference region selection information, motion model selection information, prediction direction information, and motion vector accuracy (or motion vector difference value accuracy) information.

[0246] The aforementioned motion vector prediction can be made from the motion vectors of the blocks closest to the current block in the left, top, upper left, upper right, and lower left directions within the current picture, but is not limited to these; motion vectors of blocks located at a predetermined distance (m, n) horizontally or vertically can also be predicted. Here, m and n are integers of 4, 8, 16 or greater, and may be greater than or equal to the width and height of the minimum prediction unit (or encoding unit, transformation unit, etc.). In other words, predictions can be made based on the motion vectors of blocks that have already been encoded / decoded prior to the current block. In the case of motion vectors of blocks that are not closest to the current block, they can be managed in a FIFO (First-In, First-Out) manner based on the encoding order relative to the current block.

[0247] Alternatively, the motion vector can be predicted from the motion vectors of blocks located to the left, right, up, down, upper left, upper right, lower left, lower right, and center of the block currently corresponding to the block in other pictures. Or, (c, d) with a default value can be used as the predicted value of the motion vector, and can have a value of (0, 0), but is not limited to these.

[0248] The motion model selection information can consist of candidate motion models (movement models or non-movement models) and can be categorized by the number of motion vectors (1, 2, 3, or more integers) that represent the current block's movement, but is not limited to these categories. The precision of the motion vectors can be a power of 2, such as 1 / 4, 1 / 2, 1, 2, or 4. In this case, the exponent can be an integer with a positive or negative sign (1, 2, or more integers) including 0.

[0249] Here, the prediction method selection information can be categorized by the prediction method. When the block matching method (number 2) is selected, general block matching information (motion_information) may be generated. Here, in order to determine what the reference region (reference picture) is, the reference picture list can be constructed by including the current picture. In other words, information such as ref_idx is generated as before, but the current picture can be included in the list of candidate ref_idx.

[0250] The above explanation can apply to P or B image types, and is similarly applicable to I image types, however, in I image types, information about the reference region can be implicitly determined and therefore omitted. This is because, since the reference region currently only consists of a picture, information such as ref_idx is omitted, and the remaining information may be the same as or similar to that of general block matching.

[0251] Regardless of the image type, prediction method selection information can be generated. In other words, prediction method selection information can be generated even for I-type images. That is, block matching (IBC, intra-block copy) can also be supported for I-type images.

[0252] Referring to Figure 10, the prediction method selection information (pred_mode_flag_A) can be checked, and accordingly, it can be decided whether to refer to the current picture or another picture. If it is decided to refer to another picture (pred_mode_flag_A is Y, i.e., 1), the prediction mode information (motion_information_A) can be checked. If it is decided to refer to the current picture (pred_mode_flag_A is N, i.e., 0), either method 1 or method 2 can be selected. Depending on the selected candidate, the prediction mode information (intra_mode_information or motion_information_B) can be checked. Predictions can be made based on the prediction method and prediction mode information.

[0253] Here, the prediction method selection information can consist of multiple (conditional) flags. In this example, one (pred_mode_flag_A) is used to demarcate the reference region, and another (pred_mode_flag_B) may be used to demarcate the prediction method (when the reference region is currently limited to pictures). Here, the prediction method selection information regarding the other (pred_mode_flag_B) can occur conditionally.

[0254] The above explanation may apply to P or B image types. In I image types, since the reference region is currently limited to the picture, the pred_mode_flag_A verification process can be omitted, and the process can begin with verifying pred_mode_flag_B.

[0255] Here, motion_information_A and motion_information_B may differ in their information structure regarding the reference area, while other aspects of their structure, aside from the information described later, may be identical or similar.

[0256] For example, in motion_information_A, a list of referenced pictures is constructed targeting a picture different from the current picture, and the referenced picture information is processed, while in motion_information_B, information about the referenced picture can be omitted.

[0257] Alternatively, in motion_information_A, the forward or backward direction can be configured as a candidate for the predicted direction information, and in motion_information_B, the predicted direction information can be omitted.

[0258] Alternatively, as a configuration for blocks referenced in motion vector prediction, motion_information_A can target spatially adjacent and temporally adjacent blocks, while motion_information_B can target spatially adjacent blocks, and the detailed configurations of spatially adjacent blocks can be identical or different. Furthermore, the default values ​​for motion vector prediction can be configured to be the same or different.

[0259] Alternatively, as a candidate configuration for motion model selection information, motion_information_A can include motion models that use 1 to 3 motion vectors in the candidate group, while motion_information_B can include motion models that use 1 motion vector in the candidate group.

[0260] Alternatively, as a candidate configuration for the precision information of the motion vector, the range of the exponent in motion_information_A can be an integer with positive and negative signs, including 0, and the range of the exponent in motion_information_B can be an integer with a positive sign greater than or equal to 0.

[0261] The above example illustrates the case where some prediction method selection information precedes the actual selection, but the order can also be changed. That is, after deciding which of methods 1 and 2 to use for prediction (pred_mode_flag_B), if method 2 is selected, it is possible to decide whether to use the current picture or another picture as the reference region (pred_mode_flag_A). Again, this order change is possible for P or B image types, and for I image types, the portion selected as the reference region can be omitted.

[0262] Referring to Figure 11, you can check the prediction method selection information (pred_mode_flag_A, pred_mode_flag_B), decide whether to use the current picture or another picture as the reference area (pred_mode_flag_A), and decide which of methods 1 or 2 to use for prediction (pred_mode_flag_B). In the previous example, the prediction method selection information was checked conditionally, whereas in this example, it may be necessary to check all of the prediction method selection information.

[0263] Based on the aforementioned prediction method selection information, if the reference area is currently a picture and option 1 is selected, the resulting prediction mode information (intra_mode_information) can be checked. If the reference area is currently a picture and option 2 is selected, the resulting prediction mode information (motion_information_B) can be checked. If the reference area is another picture and option 2 is selected, the resulting prediction mode information (motion_information_A) can be checked.

[0264] In this example, for motion_information_A and motion_information_B, the same settings as in the previous example are possible.

[0265] The above description can be an explanation applicable to the P or B picture type. For the I picture type, it is possible to check the prediction method selection information (pred_mode_flag_A) for the reference area, or an explanation can be given excluding the subsequent parts related thereto.

[0266] Referring to FIG. 12, the prediction method selection information (pred_mode_flag) can be checked. If the value of pred_mode_flag is 0, the first method is selected, and the prediction mode information (intra_mode_information) according to the first method can be checked. If the value of pred_mode_flag is 1, the second method of referring to the current picture is selected, and the prediction mode information (motion_information_B) according to the second method can be checked. If the value of pred_mode_flag is 2, the second method of referring to another picture is selected, and the prediction mode information (motion_information_A) according to the second method can be checked.

[0267] In this example, the prediction method selection information is processed by one flag, but the index for this can be defined as two or more.

[0268] The above description can be an explanation applicable to the P or B picture type. It may not be applicable to the I picture type. That is, for the I picture type, the prediction method selection information can have a value of 0 or 1, and for the P or B picture type, the prediction method selection information can have values of 0, 1, and 2. In this example, candidates for referring to the current picture are preferentially arranged as No. 0 and No. 1, and candidates for referring to other pictures are arranged as No. 2, so as not to perform rearrangement of indexes according to the picture type. However, it is not limited to this, and indexes can also be assigned in another order.

[0269] All or part of the aforementioned prediction method selection information can be selectively signaled in consideration of the block attributes. Here, the block attributes can include at least one of whether it is a skip mode, image type (slice type), block size, prediction type, or split type. Here, the prediction type can be classified into a first prediction type including intra prediction and / or block matching mode (ibc mode), a second prediction type including inter prediction, and a third prediction type including intra prediction, block matching mode, and inter prediction. The block matching mode predicts the current block based on the already encoded / decoded region, and the already encoded / decoded region can mean a region specified by a predetermined block vector. The already encoded / decoded region can be a region belonging to the current picture to which the current block belongs. Inter prediction is similar to the block matching mode in that it is performed based on a reference region specified by a motion vector, but inter prediction is different in that it refers to a picture located in a different time zone from the current block.

[0270] For example, pred_mode_flag_A, which is one of the prediction method selection information, can be signaled only when at least one of the following conditions is satisfied: when the current block is not encoded in skip mode (condition 1), when the image type of the slice to which the current block belongs is not an I slice (condition 2), when the size of the current block is not 4×4 (condition 3), or when the prediction type is the third prediction type (condition 4).

[0271] However, if the above conditions are not met, pred_mode_flag_A may not be signaled. In this case, pred_mode_flag_A can be induced in the decoder based on at least one of the block size, prediction type, or image type. For example, if the current block is 4x4, pred_mode_flag_A can be induced to 1. Or, if the prediction type for the current block is the first prediction type, pred_mode_flag_A can be induced to 1. Or, if the prediction type for the current block is the second prediction type, pred_mode_flag_A can be induced to 0. Or, if the image type of the slice to which the current block belongs is an I slice, pred_mode_flag_A is induced to 1, and otherwise, pred_mode_flag_A may be induced to 0.

[0272] On the other hand, pred_mode_flag_B, one of the prediction method selection pieces of information, can be signaled by considering at least one of the following: whether or not it is in skip mode, image type, block size, prediction mode, prediction type, or segmentation type.

[0273] For example, pred_mode_flag_B can signal if the image type of the slice to which the current block belongs is an I-slice and the current block is not encoded in skip mode. Alternatively, pred_mode_flag_B can signal if the image type of the slice to which the current block belongs is not an I-slice and the prediction mode of the current block is not intra-prediction. Alternatively, pred_mode_flag_B can signal if the image type of the slice to which the current block belongs is not an I-slice, the current block is 4x4 and the current block is not encoded in skip mode. Alternatively, pred_mode_flag_B can signal only if at least one of the width or height of the current block is less than 64. pred_mode_flag_B can signal only if the prediction type for the current block is not the second prediction type.

[0274] On the other hand, if the above conditions are not met, pred_mode_flag_B may not be signaled. In this case, pred_mode_flag_B can be induced in the decoder based on at least one of the block size, prediction type, or image type. For example, if the current block is 128×128, pred_mode_flag_B can be induced to 0. Alternatively, if the prediction type for the current block is the second prediction type, pred_mode_flag_B can be induced to 0. Alternatively, if the image type of the slice to which the current block belongs is an I-slice, pred_mode_flag_B can be induced to 0 or 1; otherwise, pred_mode_flag_B may be induced to 0. Here, if the image type of the slice to which the current block belongs is an I-slice, pred_mode_flag_B can be induced based on a flag indicating whether block matching is permitted or not. For example, pred_mode_flag_B can be induced to the same value as the flag. The aforementioned flag can be signaled in at least one of the following: a video parameter set, a sequence parameter set, a picture parameter set, or a slice header.

[0275] A prediction method for the current block can be selected based on at least one of the embodiments shown in Figures 9 to 12. If the selected prediction method is intraprediction, intraprediction according to Figure 6 or Figure 8 can be performed.

[0276] The exemplary methods in this disclosure are expressed as a series of actions for clarity of explanation, but this is not intended to restrict the order in which the steps are performed, and each step may be performed simultaneously or in a different order, if necessary. To implement the methods of this disclosure, other steps may be included in addition to the exemplary steps, or the remaining steps may be included with some of them, or additional other steps may be included with some of them.

[0277] The various embodiments of this disclosure are intended to illustrate representative aspects of this disclosure, rather than listing all possible combinations. The matters described in the various embodiments may be applied independently or in combination of two or more.

[0278] Furthermore, various embodiments of this disclosure can be implemented by hardware, firmware, software, or a combination thereof. In the case of hardware implementation, it can be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.

[0279] The scope of this disclosure includes software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that enable operation by various embodiments to be performed on a device or computer, and non-transitory computer-readable medium on which such software or instructions are stored and executable on a device or computer. [Industrial applicability]

[0280] This invention can be used to encode / decode video signals.

Claims

1. Steps include obtaining the first flag from the bitstream, The steps include: inducing the current intra-prediction mode for the color difference block based on a predetermined group of intra-prediction mode candidates; The step includes performing an intra-prediction for the current color difference block based on the intra-prediction mode, The predetermined group of intra-prediction mode candidates is divided into a first group and a second group. The first group includes at least one inter-component prediction mode, and the second group includes at least one intra-prediction mode defined for the luminance component. The intra-prediction mode of the current color difference block is induced by selectively using either the first group or the second group. The intra-prediction mode of the current color difference block is derived from either the first group or the second group selected based on the first flag. If the value of the first flag is a first value, the intra prediction mode of the current color difference block is derived from the first group based on the first index information obtained from the bitstream. If the value of the first flag is the second value, the intra prediction mode of the current color difference block is derived from the second group based on the second index information obtained from the bitstream. The second group further includes an image decoding method comprising multiple default modes.

2. The image decoding method according to claim 1, wherein, when the current color difference block is predicted by an intercomponent prediction mode within the first group, the reference region for deriving the parameters of the intercomponent prediction is determined by the availability of adjacent samples of the current color difference block.

3. If the current intra-prediction mode of the color difference block is an inter-component prediction mode, the steps include inducing a correlation between the color difference component and the luminance component, The image decoding method according to claim 1, further comprising the step of performing intercomponent prediction for the current color difference block based on the correlation.

4. The image decoding method according to claim 3, wherein the step of inducing the correlation between the color difference component and the luminance component includes the step of inducing a downsampled luminance sample using a plurality of luminance samples.

5. The current step is to determine the intra-prediction mode of a color difference block, wherein the intra-prediction mode is encoded based on a predetermined group of intra-prediction mode candidates. The steps include performing an intra-prediction for the current color difference block based on the intra-prediction mode, The step of determining the first flag includes, The predetermined group of intra-prediction mode candidates is divided into a first group and a second group. The first group includes at least one inter-component prediction mode, and the second group includes at least one intra-prediction mode defined for the luminance component. The intra-prediction mode of the current color difference block is induced by selectively using either the first group or the second group. The first flag is determined based on whether the intra prediction mode of the current color difference block is selected from the first group or the second group. When the intra-prediction mode for the current color difference block is selected from the first group, the value of the first flag is determined to a first value, and first index information indicating which intra-prediction mode in the first group was selected as the intra-prediction mode for the current color difference block is determined. When the intra-prediction mode for the current color difference block is selected from the second group, the value of the first flag is determined to the second value, and a second index information is determined indicating which intra-prediction mode in the second group was selected as the intra-prediction mode for the current color difference block. The second group further includes an image coding method comprising multiple default modes.

6. A transmission method for transmitting a bitstream containing encoded image data, A step of generating a bitstream by encoding an image based on an image encoding method, The step of transmitting the bitstream includes, The aforementioned image encoding method is The current step is to determine the intra-prediction mode of a color difference block, wherein the intra-prediction mode is encoded based on a predetermined group of intra-prediction mode candidates. The steps include performing an intra-prediction for the current color difference block based on the intra-prediction mode, The step of determining the first flag includes, The predetermined group of intra-prediction mode candidates is divided into a first group and a second group. The first group includes at least one inter-component prediction mode, and the second group includes at least one intra-prediction mode defined for the luminance component. The intra-prediction mode of the current color difference block is induced by selectively using either the first group or the second group. The first flag is determined based on whether the intra prediction mode of the current color difference block is selected from the first group or the second group. When the intra-prediction mode for the current color difference block is selected from the first group, the value of the first flag is determined to a first value, and first index information indicating which intra-prediction mode in the first group was selected as the intra-prediction mode for the current color difference block is determined. When the intra-prediction mode for the current color difference block is selected from the second group, the value of the first flag is determined to the second value, and a second index information is determined indicating which intra-prediction mode in the second group was selected as the intra-prediction mode for the current color difference block. The second group further includes multiple default modes, Sending method.