Image encoding / decoding method and device using intra prediction

By determining reference regions and dividing MPM candidate groups for intra prediction, the method enhances intra-prediction accuracy and efficiency in high-resolution image encoding/decoding, addressing the limitations of existing techniques.

JP2026041997APending Publication Date: 2026-03-10INST OF IMAGE TECH INC
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing image compression techniques struggle to efficiently derive intra-prediction modes for high-resolution and high-quality images, particularly in determining reference regions and modes for intra prediction.

Method used

The method and apparatus determine a reference region for intra prediction of a current block, divide the MPM candidate group into first and second groups, and derive the intra prediction mode based on these groups, using predefined pixel lines and flags to indicate the mode derivation.

Benefits of technology

This approach allows for more accurate and efficient intra prediction by utilizing predefined pixel lines and adaptive block division, improving inter-frame prediction and intra-prediction encoding/decoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026041997000001_ABST
    Figure 2026041997000001_ABST
Patent Text Reader

Abstract

A method and apparatus for deriving intra-prediction modes based on a set of predetermined MPM candidates is provided. The intra prediction method determines a reference region for intra prediction of a current block, derives an intra prediction mode of the current block based on a predetermined MPM candidate group, and performs intra prediction on the current block based on the reference region and the intra prediction mode. The MPM candidate group is divided into a first group and a second group, where the first group includes a default mode predefined in a decoding device, and the second group includes intra prediction modes of neighboring blocks adjacent to the current block.
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 technology]

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

[0003] There are various image compression techniques, such as inter-prediction techniques that predict pixel values ​​contained in a current picture from pictures before or after the current picture, intra-prediction techniques that predict pixel values ​​contained in a current picture using pixel information within the current picture, and entropy coding techniques that assign short codes to values ​​that occur frequently and long codes to values ​​that occur less frequently. These image compression techniques can be used to effectively compress image data for transmission or storage. Summary of the Invention [Problem to be solved by the invention]

[0004] SUMMARY OF THE INVENTION An object of the present invention is to provide a method and apparatus for deriving an intra-prediction mode.

[0005] The present invention aims to provide a method and apparatus for intra prediction based on component type.

[0006] SUMMARY OF THE INVENTION An object of the present invention is to provide a block division method and apparatus for intra prediction. [Means for solving the problem]

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

[0008] In the image encoding / decoding method and apparatus of the present invention, the MPM candidate group may be divided into a first group and a second group, the first group including default modes already defined in the decoding device, and the second group including intra prediction modes of neighboring blocks adjacent to the current block.

[0009] In the image encoding / decoding method and apparatus of the present invention, the intra prediction mode of the current block can be derived 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 area may include the steps of selecting one of a plurality of pixel lines already defined in the decoding device, and determining the selected pixel line as the reference area.

[0011] In the image encoding / decoding method and apparatus of the present invention, the predefined 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 encoding / decoding method and apparatus of the present invention, the default mode may consist of only a non-directional mode, and the non-directional mode may include at least one of a planar mode or a DC mode.

[0013] In the image encoding / decoding method and apparatus of the present invention, the second group further includes a mode derived by adding or subtracting an N value to the intra prediction mode of the neighboring block, and the N value may be 1, 2, or 3.

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

[0015] In the image encoding / 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 can be induced based on the second group and 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 area of ​​the current block is the first pixel line.

[0017] The image encoding / decoding method and apparatus of the present invention can determine an intra prediction mode of a 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 each of the luminance block and the chrominance block.

[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 neighboring blocks (ModeA), (ModeA+n), (ModeA-n) or a default mode.

[0020] The image encoding / decoding method and apparatus of the present invention can identify a luminance domain for inter-component reference of a chrominance block, perform downsampling on the luminance domain, 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 may be divided into a plurality of sub-blocks, and the division may be performed based on at least one of the size and shape of the current block. [Effects of the Invention]

[0022] According to the present invention, prediction can be performed more accurately and efficiently by deriving an intra prediction mode based on a group of MPM candidates.

[0023] According to the present invention, it is possible to improve the efficiency of inter-frame prediction based on inter-component reference.

[0024] The present invention can improve the efficiency of intra-prediction encoding / decoding by adaptive block division. [Brief explanation of the drawings]

[0025] [Figure 1] 1 is a block diagram illustrating an image encoding device according to an embodiment of the present invention. [Figure 2] 1 is a block diagram showing an image decoding apparatus according to an embodiment of the present invention; [Figure 3] FIG. 10 is a diagram showing block division types as an embodiment to which the present invention is applied. [Figure 4] FIG. 1 is a diagram showing a block division method based on a tree structure as an embodiment to which the present invention is applied. [Figure 5] 1 is an exemplary diagram illustrating intra-prediction modes already defined in an image encoding / decoding device. [Figure 6]FIG. 1 is a diagram illustrating an intra prediction method as an embodiment to which the present invention is applied. [Figure 7] FIG. 1 is a diagram illustrating a sub-block-based intra prediction method as an embodiment to which the present invention is applied. [Figure 8] FIG. 1 is a diagram illustrating a prediction method based on inter-component reference as an embodiment to which the present invention is applied. [Figure 9] FIG. 10 is a diagram showing a method for determining a prediction method based on prediction method selection information, as an embodiment to which the present invention is applied. [Figure 10] FIG. 10 is a diagram showing a method for determining a prediction method based on prediction method selection information, as an embodiment to which the present invention is applied. [Figure 11] FIG. 10 is a diagram showing a method for determining a prediction method based on prediction method selection information, as an embodiment to which the present invention is applied. [Figure 12] FIG. 10 is a diagram showing a method for determining a prediction method based on prediction method selection information, as an embodiment to which the present invention is applied. DETAILED DESCRIPTION OF THE INVENTION

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

[0027] In the image encoding / decoding method and apparatus of the present invention, the MPM candidate group may be divided into a first group and a second group, the first group including default modes already defined in the decoding device, and the second group including intra prediction modes of neighboring blocks adjacent to the current block.

[0028] In the image encoding / decoding method and apparatus of the present invention, the intra prediction mode of the current block can be derived 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 area may include the steps of selecting one of a plurality of pixel lines already defined in the decoding device, and determining the selected pixel line as the reference area.

[0030] In the image encoding / decoding method and apparatus of the present invention, the predefined 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 encoding / decoding method and apparatus of the present invention, the default mode may consist of only a non-directional mode, and the non-directional mode may include at least one of a planar mode or a DC mode.

[0032] In the image encoding / decoding method and apparatus of the present invention, the second group further includes a mode derived by adding or subtracting an N value to the intra prediction mode of the neighboring block, and the N value may be 1, 2, or 3.

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

[0034] In the image encoding / 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 can be induced based on the second group and 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 area of ​​the current block is the first pixel line.

[0036] The image encoding / decoding method and apparatus of the present invention can determine an intra prediction mode of a 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 each of the luminance block and the chrominance block.

[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 neighboring blocks (ModeA), (ModeA+n), (ModeA-n) or a default mode.

[0039] The image encoding / decoding method and apparatus of the present invention can identify a luminance domain for inter-component reference of a chrominance block, perform downsampling on the luminance domain, derive parameters for inter-component reference of the chrominance block, and predict the chrominance block based on the downsampled luminance block 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 sub-blocks, and the division may be performed based on at least one of the size and shape of the current block.

[0041] [Mode for carrying out the invention] Since the present invention can be modified in various ways and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, it should be understood that the present invention is not limited to the specific embodiments, but includes all modifications, equivalents, and alternatives within the spirit and technical scope of the present invention. In describing each drawing, like reference numerals are used to refer to like components.

[0042] The terms "first," "second," etc. may be used to describe various elements, but these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, a first element can be termed a second element, and similarly, a second element can be termed a first element, without departing from the scope of the present invention. The term "and / or" includes a combination of two or more related listed items or any of two or more related listed items.

[0043] When a component is said to be "coupled" or "connected" to another component, it should be understood that the component may be directly coupled or connected to the other component, but there may be other components between them. Conversely, when a component is said to be "directly coupled" or "directly connected" to another component, it should be understood that there are no other components between them.

[0044] The terms used in the present invention are merely used to describe specific embodiments and do not limit the present invention. A singular expression includes a plural expression unless the context clearly indicates otherwise. In the present invention, the terms "comprise" or "have" and the like specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or possibility of addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0045] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings. The same reference numerals are used to designate the same components in the drawings, and redundant description of the same components will be omitted.

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

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

[0048] 1 are illustrated independently to illustrate different characteristic functions of the image encoding device, and do not mean that each component is composed of separate hardware or a single software component. That is, each component is included as a separate component for the sake of convenience of explanation, and at least two of the components may be combined to form a single component, or one component may be divided into multiple components to perform its function. Such integrated and separated embodiments of each component are also 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 essential functions in the present invention, but may be optional components simply for improving 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 simply for improving performance, and a structure including only essential components excluding optional components used simply for improving performance is also included in the scope of the present invention.

[0050] The picture division unit 110 can divide an input picture into at least one processing unit. At this time, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The picture division unit 110 can divide one picture into a plurality of combinations of coding units, prediction units, and transform units, and select one combination of coding units, prediction units, and transform units based on a predetermined criterion (e.g., a cost function) to code the picture.

[0051] For example, a 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 that is divided into other coding units with one image or the largest coding unit as the root can be divided into child nodes equal to the number of divided coding units. A coding unit that is not further divided within a certain limit becomes a leaf node. In other words, assuming that only square division is possible for a coding unit, one coding unit can be divided into a maximum of four different coding units.

[0052] Hereinafter, in the embodiments of the present invention, the coding unit may be used to mean a unit for performing coding, or may be used to mean a unit for performing decoding.

[0053] The prediction units may be divided into at least one shape, such as a square or rectangle, of the same size within one coding unit, or may be divided so that one of the prediction units divided within one coding unit has a different shape and / or size from another prediction unit.

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

[0055] The prediction units 120 and 125 may include an inter prediction unit 120 for performing inter prediction and an intra prediction unit 125 for performing intra prediction. It is possible to determine whether to use inter prediction or intra prediction for a prediction unit, and to determine specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. Here, the processing unit in which prediction is performed may differ from the processing unit in which the prediction method and its specific contents are determined. For example, the prediction method and prediction mode may be determined in a prediction unit, and the prediction may be performed in a transform unit. Residual values ​​(residual blocks) between the generated prediction block and the original block may be input to the transform unit 130. In addition, prediction mode information, motion vector information, etc. used for prediction may be coded by the entropy coding unit 165 together with the residual values ​​and transmitted to the decoder. When a specific coding mode is used, it is also possible to directly code the original block and transmit it to the decoder without generating a prediction block via the prediction units 120 and 125.

[0056] The inter prediction unit 120 may predict a prediction unit based on information of at least one of a picture preceding or following the current picture, and in some cases, may predict a prediction unit based on information of a partial region in the current picture for which encoding has been completed. The inter prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

[0057] The reference picture interpolation unit receives reference picture information from memory 155 and can generate sub-integer pixel information from the reference picture. For luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate sub-integer pixel information 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 sub-integer pixel information in 1 / 8 pixel units.

[0058] The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolation unit. Various methods, such as a full search-based block matching algorithm (FBMA), a three-step search algorithm (TSS), and a new three-step search algorithm (NTS), may be used to calculate a motion vector. The motion vector may have a motion vector value in half or quarter pixel units based on the interpolated pixels. The motion prediction unit may predict the current prediction unit using different motion prediction methods. Various methods, such as a skip method, a merge method, an advanced motion vector prediction method (AMVP), and an intra block copy method, may be used as the motion prediction method.

[0059] The intra prediction unit 125 may generate a prediction unit based on reference pixel information surrounding a current block, which is pixel information within a current picture. When a neighboring block of the current prediction unit is an inter-predicted block and the reference pixel is an inter-predicted pixel, the reference pixel included in the inter-predicted block may be replaced with reference pixel information of a neighboring intra-predicted block. In other words, when reference pixels are unavailable, the unavailable reference pixel information may be replaced with at least one of the available reference pixels.

[0060] Prediction modes in intra prediction may include a directional prediction mode that uses reference pixel information according to a prediction direction, and a non-directional mode that does not use directional information when performing prediction. A mode for predicting luma information and a mode for predicting chroma information may be different from each other, and intra prediction mode information used for predicting luma information or predicted luma signal information may be used to predict chroma information.

[0061] When performing intra prediction, if the size of the prediction unit and the size of the transform unit are the same, intra prediction for the prediction unit can be performed based on the pixel located to the left, the pixel located to the upper left, and the pixel located above the prediction unit. However, when performing intra prediction, if the size of the prediction unit and the size of the transform unit are different, intra prediction can be performed using reference pixels based on the transform unit. In addition, intra prediction using NxN division can be used only for the minimum coding unit.

[0062] The intra prediction method may generate a predicted block after applying an adaptive intra smoothing (AIS) filter to reference pixels according to a prediction mode. The types of AIS filters applied to the reference pixels may differ. To perform the intra prediction method, the intra prediction mode of a current prediction unit may be predicted from the intra prediction mode of a prediction unit existing in the vicinity of the current prediction unit. When predicting the prediction mode of the current prediction unit using mode information predicted from the 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 may be transmitted using predetermined flag information. If the prediction modes of the current prediction unit and the surrounding prediction units are different from each other, entropy coding may be performed to encode the prediction mode information of the current block.

[0063] In addition, a residual block including residual value information, which is a difference value between a prediction block predicted based on the prediction unit generated by the prediction units 120 and 125 and an original block of the prediction unit, can be generated. The generated residual block can be input to the conversion unit 130.

[0064] The transform unit 130 may transform a residual block including residual value information of the original block and the prediction unit generated through the prediction units 120 and 125 using a transform method such as a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), or a KLT. Whether to apply the DCT, the DST, or the KLT to transform the residual block may be determined based on intra prediction mode information of the prediction unit used to generate the residual block.

[0065] The quantization unit 135 quantizes the values ​​transformed into the frequency domain by the transformation 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 may be provided to the inverse quantization unit 140 and the reordering unit 160.

[0066] The reordering unit 160 may reorder coefficient values ​​for the quantized residual values.

[0067] The reordering unit 160 may convert two-dimensional block configuration coefficients into one-dimensional vector form using a coefficient scanning method. For example, the reordering unit 160 may convert two-dimensional block configuration coefficients into one-dimensional vector form by scanning from DC coefficients to coefficients in a high-frequency region using a zig-zag scan method. Depending on the size of the transform unit and the intra prediction mode, vertical scanning, which scans two-dimensional block configuration coefficients in a column direction, or horizontal scanning, which scans two-dimensional block configuration coefficients in a row direction, may be used instead of zig-zag scanning. That is, depending on the size of the transform unit and the intra prediction mode, it may be determined which scanning method to use among zig-zag scanning, vertical scanning, and horizontal scanning.

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

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

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

[0072] The filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).

[0073] A deblocking filter can remove block artifacts caused by boundaries between blocks in a reconstructed picture. To determine whether to perform deblocking, it can be determined whether to apply a deblocking filter to a current block based on pixels included in several columns or rows included in 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. In addition, when vertical filtering and horizontal filtering are performed when applying a deblocking filter, horizontal filtering and vertical filtering can be processed in parallel.

[0074] The offset correction unit can correct the offset between the deblocked image and the original image on a pixel-by-pixel basis. To perform offset correction on a specific picture, the offset correction unit can divide the pixels included in the image into a certain number of regions, determine the regions to be offset, and apply the offset to the corresponding regions, or apply the offset by taking into account edge information of each pixel.

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

[0076] The memory 155 can store the reconstructed blocks or pictures calculated through the filter unit 150, and the stored reconstructed blocks or pictures can be provided to the prediction units 120 and 125 when performing inter prediction.

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

[0078] Referring to FIG. 2, the image decoder 200 may include an entropy decoding unit 210, a reordering 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 in the reverse order of the image encoder.

[0080] The entropy decoding unit 210 can perform entropy decoding in the reverse order of the entropy encoding performed by the entropy encoding 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 in accordance with 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 in the encoder.

[0082] The reordering unit 215 may reorder the bitstream entropy decoded by the entropy decoding unit 210 based on the reordering method used by the encoder. The reordering unit 215 may reconstruct coefficients expressed in a one-dimensional vector format into coefficients in a two-dimensional block format to perform the reordering. The reordering unit 215 may receive information related to coefficient scanning performed by the encoder and perform the reordering by scanning in the reverse order based on the scanning order performed by the encoder.

[0083] The inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoder and the coefficient values ​​of the reordered blocks.

[0084] The inverse transform unit 225 may perform inverse transforms, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms, i.e., DCT, DST, and KLT, performed by the transform unit on the quantization result performed by the image encoder. The inverse transform may be performed based on a transmission unit determined by the image encoder. The inverse transform unit 225 of the image decoder may selectively perform a transform technique (e.g., DCT, DST, or KLT) depending on a plurality of pieces of information, such as a prediction method, a size of a current block, and a prediction direction.

[0085] The prediction units 230, 235 can generate a prediction block based on information related to prediction block generation provided from the entropy decoding unit 210 and previously decoded block or picture information provided from the memory 245.

[0086] As described above, when performing intra prediction, similar to the operation of an image encoder, if the size of the prediction unit and the size of the transform unit are the same, intra prediction for the prediction unit is performed based on the pixels located to the left, the upper left, and the upper side of the prediction unit. However, when performing intra prediction, if the size of the prediction unit and the size of the transform unit are different, intra prediction can be performed using reference pixels based on the transform unit. In addition, intra prediction using NxN division can be used only for the minimum coding unit.

[0087] The prediction units 230 and 235 may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit receives various information, such as prediction unit information input from the entropy decoding unit 210, prediction mode information for the intra prediction method, and motion prediction-related information for the inter prediction method, to classify prediction units by the current coding unit and determine whether the prediction unit performs inter prediction or intra prediction. The inter prediction unit 230 may perform inter prediction on the current prediction unit based on information included in at least one picture, either a previous picture or a subsequent picture of the current picture including the current prediction unit, using information necessary for inter prediction of the current prediction unit provided from the image encoding device. Alternatively, the inter prediction may be performed based on information of a partial region already restored within the current picture including the current prediction unit.

[0088] In order to perform inter prediction, it is possible to determine, based on the coding unit, whether the motion prediction method of the prediction unit included in the corresponding coding unit is skip mode, merge mode, AMVP mode, or intra block copy mode.

[0089] The intra prediction unit 235 may generate a prediction block based on pixel information within the current picture. If the prediction unit is a prediction unit for which intra prediction has been performed, the intra prediction may be performed based on intra prediction mode information of the prediction unit provided from the image encoder. The intra prediction unit 235 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolator, and a DC filter. The AIS filter is a part that performs filtering on reference pixels of the current block, and may determine whether or not to apply a filter depending on the prediction mode of the current prediction unit and apply the filter. The AIS filtering may be performed on reference pixels of the current block using the prediction mode of the prediction unit and AIS filter information provided from the image encoder. If the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.

[0090] The reference pixel interpolation unit may generate reference pixels in units of pixels less than an integer value by interpolating reference pixels when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on pixel values ​​obtained by interpolating reference pixels. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating reference pixels, the reference pixels may not be interpolated. When the prediction mode of the current block is a DC mode, the DC filter may generate a prediction block through filtering.

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

[0092] The image encoder can provide information on whether a deblocking filter is applied to the block or picture, and information on whether a strong filter or a weak filter is applied if a deblocking filter is applied. The deblocking filter of the image decoder can receive deblocking filter-related information provided by the image encoder and perform deblocking filtering on the block.

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

[0094] The ALF can be applied to a coding unit based on ALF application information, ALF coefficient information, etc. provided from the encoding device. Such ALF information may be provided by being included in a specific parameter set.

[0095] The memory 245 can store the reconstructed pictures or blocks for use as reference pictures or blocks, and can provide the reconstructed pictures to an output.

[0096] As mentioned above, in the following embodiments of the present invention, for convenience of explanation, a coding unit is used as a coding unit, but it can also be a unit for performing not only encoding but also decoding.

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

[0098] One block (hereinafter referred to as a "first block") can be divided into a plurality of sub-blocks (hereinafter referred to as a "second block") by at least one of vertical lines or horizontal lines. The number of vertical lines and horizontal lines can be one, two, or more. Here, the first block can be a coding block (CU), which is a basic unit of image encoding / decoding, a predictive block (PU), which is a basic unit of predictive encoding / decoding, or a transform block (TU), which is a basic unit of transform encoding / decoding. The first block can be a square block or a non-square block.

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

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

[0101] FIG. 3(b) shows a horizontal binary tree (hereinafter referred to as "Horizontal BT") division. Horizontal BT is a division type in which a first block is divided into two second blocks by a horizontal line. The division into two can be performed symmetrically or asymmetrically. For example, when a 2N x 2N first block is divided into Horizontal BT, the first block can be divided into two second blocks with a height ratio of (a:b). Here, a and b can be the same value, or a can be larger or smaller than b.

[0102] FIG. 3(c) shows a vertical binary tree (hereinafter referred to as "Vertical BT") division. Vertical BT is a division type in which a first block is divided into two second blocks by a vertical line. The division can be performed symmetrically or asymmetrically. For example, when a 2N x 2N first block is divided into 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, or a may be larger or smaller than b.

[0103] FIG. 3(d) shows a horizontal ternary tree (hereinafter referred to as "Horizontal TT") division. Horizontal TT is a division type in which a first block is divided into three second blocks by two horizontal lines. For example, when a 2N x 2N first block is divided into Horizontal TT, the first block can be divided into three second blocks with a height ratio 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 larger or smaller than a.

[0104] FIG. 3(e) shows a vertical ternary tree (hereinafter referred to as "Vertical TT") division. Vertical TT is a division type in which a first block is divided into three second blocks by two vertical lines. For example, when a 2N x 2N first block is divided into Vertical TT, the first block can be divided into three second blocks with a width ratio of (a:b:c). Here, a, b, and c may be the same value or different values. Alternatively, a and c may be the same, and b may be larger or smaller than a. Alternatively, a and b may be the same, and c may be larger or smaller than a. Alternatively, b and c may be the same, and a may be larger or smaller than b.

[0105] The division may be performed based on division information signaled from the encoding device, which may include at least one of division type information, division direction information, and division ratio information.

[0106] The partition type information may specify any of the partition types already defined in the encoding / decoding device. The already defined partition types may include at least one of QT, Horizontal BT, Vertical BT, Horizontal TT, Vertical TT, or no split mode. Alternatively, the partition type information may indicate whether QT, BT, or TT is applied, which may be coded in the form of a flag or index. In the case of BT or TT, the partition direction information may indicate whether the partition is horizontal or vertical. In the case of BT or TT, the split ratio information may indicate the ratio of the width and / or height of the second block.

[0107] FIG. 4 shows a block division method based on a tree structure as an 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 x 8N and a partition depth of k. If the partition information of the first block indicates QT partitioning, the first block can be partitioned into four sub-blocks (hereinafter referred to as the "second block"). The second block can have a size of 4N x 4N and a partition depth of (k+1).

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

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

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

[0112] The partition information of the current block to be divided may be determined dependently based on at least one of the partition information of the upper block of the current block or the partition information of the neighboring block. For example, if the second block is divided into horizontal BT and the upper third block is divided into vertical BT, the lower third block does not need to be divided into vertical BT. This is because dividing the lower third block into vertical BT produces the same result as dividing the second block into QT. Therefore, coding of the partition information (especially, the partition direction information) of the lower third block can be omitted, and the decoding device can set the lower third block to be divided horizontally.

[0113] The upper block may refer to a block having a partition depth smaller than that of the current block. For example, if the partition depth of the current block is (k+2), the partition depth of the upper block may be (k+1). The neighboring block may be a block adjacent to the upper or left side of the current block. The neighboring block may be a block having the same partition depth as the current block.

[0114] The above-described division may be repeated up to the minimum unit of encoding / decoding. Once divided into minimum units, the encoding device does not further signal division information for the corresponding block. The information for the minimum unit may include at least one of the size or shape of the minimum unit. The size of the minimum unit may be expressed as the block width, height, minimum or maximum value of the width and height, the sum of the width and height, the number of pixels, division depth, etc. The information for the minimum unit may be signaled in units of at least one of a video sequence, a picture, a slice, or a block. Alternatively, the information for the minimum unit may be a value already assigned to the encoding / decoding device. The information for the minimum unit may be signaled for each CU, PU, ​​and TU. Information for one minimum unit may be equally applied to a CU, a PU, and a TU.

[0115] FIG. 5 is an example diagram showing intra-prediction modes already defined in an image encoding / decoding apparatus.

[0116] 5, the previously defined intra prediction modes may be defined as a prediction mode candidate group consisting of 67 modes, specifically including 65 directional modes (Nos. 2 to 66) and two non-directional modes (DC, Planar). In this case, the directional modes may be classified into gradients (e.g., dy / dx) or angle information (Degree). All or some of the intra prediction modes described in the above example may be included in the prediction mode candidate group for the luma component or chroma component, and other additional modes may be included in the prediction mode candidate group.

[0117] In addition, a reconstructed block of another color space that has been encoded / decoded using the correlation between color spaces can be used to predict the current block, and a prediction mode that supports this can be included. For example, in the case of a chrominance component, a predicted block of the current block can be generated using a reconstructed block of a luminance component corresponding to the current block. That is, a predicted block can be generated based on a reconstructed block taking into account the correlation between color spaces.

[0118] The prediction mode candidates can be adaptively determined based on the encoding / decoding settings. The number of candidates can be increased to improve prediction accuracy, or decreased to reduce the bit amount according to the prediction mode.

[0119] For example, one of candidate groups such as candidate group A (67 candidates, including 65 directional modes and two non-directional modes), candidate group B (35 candidates, including 33 directional modes and two non-directional modes), and candidate group C (18 candidates, including 17 directional modes and one non-directional mode) can be selected, and the candidate group can be adaptively selected or determined depending on the size and shape of the block.

[0120] In addition, the prediction mode candidate group may be configured in various ways depending on the encoding / decoding settings. For example, as shown in Figure 5, the prediction mode candidate group may be configured with equal distribution between modes, or the number of modes between mode 18 and mode 34 in Figure 5 may be greater than the number of modes between mode 2 and mode 18. Or, the opposite is also possible. The candidate group may be configured adaptively depending on the shape of the block (i.e., square, non-square where the width is greater than the height, non-square where the height is greater than the width, etc.).

[0121] For example, if the width of the current block is greater than its height, some or all of the intra prediction modes belonging to Nos. 2 to 18 are not used and may be replaced with some or all of the intra prediction modes belonging to Nos. 67 to 80. On the other hand, if the width of the current block is smaller than its height, some or all of the intra prediction modes belonging to Nos. 50 to 66 are not used and may be replaced with some or all of the intra prediction modes belonging to Nos. -14 to -1.

[0122] Unless otherwise specified, the present invention will be described assuming that intra prediction is performed using a single predefined prediction mode candidate group (candidate group A) having uniform mode spacing. However, the main elements of the present invention can also be modified and applied to adaptive intra prediction settings as described above.

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

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

[0125] The encoding / decoding device may define a plurality of pixel lines available for intra prediction, the plurality of pixel lines including 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.

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

[0127] The current block may select one or more pixel lines from the plurality of pixel lines and use the selected pixel lines as a reference region. The selection may be based on an index (refIdx) signaled by the encoding device. Alternatively, the selection may be based on predetermined encoding information. The encoding information may include at least one of the size, shape, and partition type of the current block, whether the intra prediction mode is a non-directional mode, whether the intra prediction mode is a horizontal mode, and the angle or component type of the intra prediction mode. For example, if the intra prediction mode is a planar mode or a DC mode, only the first pixel line may be used. Alternatively, if the size of the current block is equal to or smaller than a predetermined threshold, only the first pixel line may be used. Here, the size may be expressed as either the width or height of the current block (e.g., a maximum value, a 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 a predetermined threshold angle (or less than a predetermined threshold angle), only the first pixel line may be used. The threshold angle may be the angle of an intra prediction mode corresponding to mode 2 or mode 66 from the above-mentioned group of candidate prediction modes.

[0128] Referring to FIG. 6, an intra prediction mode of a current block may be determined (S610).

[0129] The current block is a concept including a luminance block and a chrominance block, and the intra prediction mode can be determined for each of the luminance block and the chrominance block. Hereinafter, it is assumed that the intra prediction modes already defined in the decoding device are composed of a non-directional mode (Planar mode, DC mode) and 65 directional modes.

[0130] The previously defined intra prediction modes can be divided into an MPM candidate group and a non-MPM candidate group. The intra prediction mode of a current block can be derived by selectively using either an MPM candidate group or a non-MPM candidate group. To this end, a flag indicating whether the intra prediction mode of the current block is derived from an MPM candidate group can be used. For example, if the flag is a first value, an MPM candidate group can be used, and if the flag is a second value, a non-MPM candidate group can be used. The flag can be coded and signaled by the coding device. Alternatively, the flag can be derived by the decoding device based on predetermined coding information. The coding information is as described above, and a redundant description will be omitted.

[0131] If the flag is a first value, the intra prediction mode of the current block can be derived based on an MPM candidate group and an MPM index. The MPM candidate group includes one or more MPMs, and the MPM can be determined based on the intra prediction modes of blocks neighboring 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 can be a fixed value already assigned to the encoding / decoding device, or can be variably determined based on the encoding information described above.

[0132] For example, the MPM candidate group may include at least one of intra prediction modes modeA, (modeA-n), (modeA+n) of neighboring blocks, or a default mode. The value of n may be an integer of 1, 2, 3, 4, or greater. The neighboring blocks may refer to blocks adjacent to the left and / or above the current block. However, without being limited thereto, the neighboring blocks may also include at least one of blocks adjacent to the upper left, lower left, or upper right. The default mode may be at least one of a planar mode, a DC mode, or a predetermined directional mode. The predetermined directional mode may include at least one of a horizontal mode (modeV), a vertical mode (modeH), (modeV-k), (modeV+k), (modeH-k), or (modeH+k).

[0133] The MPM index may identify the same MPM as the intra prediction mode of the current block among the MPM candidates, that is, the MPM identified by the MPM index may be set as the intra prediction mode of the current block.

[0134] Alternatively, the MPM candidates may be divided into a plurality of groups. For example, it is assumed that the MPM candidates are divided into a first group and a second group. The first group may be configured with at least one of the default modes described above. For example, the first group may be configured with only non-directional modes or only predetermined directional modes. Alternatively, the first group may be configured with only planar modes or only DC modes among the non-directional modes. The second group may include at least one of intra prediction modes modeA, (modeA-n), (modeA+n) of neighboring blocks, or the default mode. The value n may be an integer of 1, 2, 3, 4, or more. The neighboring blocks may refer to blocks adjacent to the left and / or above the current block. However, without being limited thereto, the neighboring blocks may include at least one of blocks adjacent to the upper left, lower left, or upper right. The default mode may be at least one of planar mode, DC mode, or a predetermined directional mode. The predetermined directional modes may include at least one of a horizontal mode (mode V), a vertical mode (mode H), (mode V-k), (mode V+k), (mode H-k), or (mode H+k), where the second group may be set not to include any MPM belonging to the first group.

[0135] The intra prediction mode of the current block can be derived selectively using either the first group or the second group. To this end, a flag indicating whether the intra prediction mode of the current block is derived from the first group can be used. For example, if the flag is a first value, the intra prediction mode of the current block can be set to an MPM belonging to the first group. On the other hand, if the flag is a second value, the intra prediction mode of the current block can be derived based on the second group and the MPM index. Here, the MPM index has been described above, and a detailed description thereof will be omitted.

[0136] The flag may be coded and signaled by a coding device. However, the flag may be adaptively signaled taking into account predetermined coding information. Here, the coding information may include at least one of the size, shape, partition type, or reference region of the current block. Here, the partition type may indicate whether or not intra prediction is performed in units of a quadtree, a binary tree, a ternary tree, or a sub-block.

[0137] For example, the flag may be signaled only if the reference region of the current block is the first pixel line (see embodiment 1). If the reference region of the current block is not the first pixel line, the flag may not be signaled and may be set to a second value in the decoding device. This may restrict the intra prediction mode from being determined based on the first group when the current block does not reference the first pixel line.

[0138] Also, the flag can be signaled only if the current block does not perform sub-block-based intra prediction (Embodiment 2). Conversely, if the current block performs sub-block-based intra prediction, the flag can be set to a second value in the decoding device without being signaled.

[0139] If the conditions of either embodiment 1 or 2 described above are met, the flag may be signaled, and if both embodiments 1 and 2 are met, the flag may be set to be signaled.

[0140] Referring to FIG. 6, intra prediction may be performed on a current block based on a reference region for intra prediction and an intra prediction mode (S620).

[0141] The intra prediction may be performed on a sub-block basis of the current block. To this end, the current block may be divided into a plurality of sub-blocks. The division method will be described in detail with reference to FIG.

[0142] FIG. 7 shows a sub-block unit intra prediction method as an embodiment to which the present invention is applied.

[0143] As described above, the current block may be divided into a plurality of sub-blocks. In this case, the current block may correspond to a leaf node. A leaf node may refer to a coding block that is not further divided into smaller coding blocks. In other words, a leaf node may refer to a block that is not further divided through the above-described tree-based block division.

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

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

[0146] The threshold value may be signaled by the encoding device or may be a fixed value already defined in the decoding device. For example, the threshold value 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 different from each other.

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

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

[0149] If the shape of the current block is square, the current block is divided into four, otherwise the current block may be divided into two. Conversely, if the shape of the current block is square, the current block is divided into two, otherwise the current block may be divided into four.

[0150] Alternatively, if the shape of the current block is square, the current block may be divided into halves or quarters, otherwise the current block may be left undivided. Conversely, if the shape of the current block is square, the current block may be left undivided, otherwise the current block may be divided into halves or quarters.

[0151] The division may be performed by selectively applying either the first or second embodiment described above, or may be performed by combining the first and second embodiments.

[0152] The bisection may be bisection in either the vertical or horizontal direction, and the quadrant may include bisection in either the vertical or horizontal direction, or bisection in both the vertical and horizontal directions.

[0153] In the above embodiment, the current block is divided into two or four parts, but is not limited thereto, and the current block may be divided into three parts vertically or horizontally, in which case the width or height ratio may be (1:1:2), (1:2:1), or (2:1:1).

[0154] Information regarding whether to divide into sub-block units, whether to divide into four, the division 'num', the number of divisions, etc. may be signaled from the encoding device or variably determined by the decoding device based on predetermined encoding parameters. Here, the encoding parameters may refer to the size / shape of the block, the division type (quarters, two, three), the intra prediction mode, the range / position of neighboring pixels for intra prediction, the component type (e.g., luma, chroma), the maximum / minimum size of the transform block, the transform type (e.g., transform skip, DCT2, DST7, DCT8), etc.

[0155] FIG. 8 shows a prediction method based on inter-component reference as an embodiment to which the present invention is applied.

[0156] A current block can be classified into a luma block and a chroma block according to the type of its components. A chroma block can be predicted using pixels of an already reconstructed luma block, which is called inter-component reference. In this embodiment, it is assumed that a chroma block has a size of (nTbW×nTbH) and that a luma block corresponding to the chroma block has a size of (2*nTbW×2*nTbH). This assumes that the width-to-height ratio of the luma and chroma blocks is 2:1. However, it should be understood that the following example can be applied in the same or similar manner even if one of the widths and heights is 1:1 and the other is 2:1, or both are 1:1.

[0157] Referring to FIG. 8, an intra prediction mode for a chrominance block may be determined (S800).

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

[0159] The intra prediction mode of the chrominance block may be derived selectively using either the first group or the second group, and the selection may be made based on a predetermined first flag. The first flag may indicate whether the intra prediction mode of the chrominance block is derived based on the first group or the second group.

[0160] For example, if the first flag is a first value, the intra prediction mode of the chrominance block may be determined to be one of one or more inter-component reference-based prediction modes belonging to a first group. For this purpose, an index identifying one of the inter-component reference-based prediction modes belonging to the first group may be used. The inter-component reference-based prediction modes belonging to the first group and the indexes assigned to each prediction mode are as shown in Table 1 below. [Table 1]

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

[0162] The first flag may be selectively signaled based on information indicating whether inter-component reference is permitted. For example, if the value of the information is 1, the first flag may be signaled, and if not, the first flag may not be signaled. Here, the information may be determined to be 0 or 1 based on a predetermined condition, which will be described later.

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

[0164] (Condition 2) If at least one of the following sub-conditions is met, the information can be set to 1: If the value of -qtbtt_dual_tree_intra_flag is 0 -If the slice type is not I-slice -If the coding tree block size is smaller than 64x64

[0165] In condition 2, qtbtt_dual_tree_intra_flag may indicate whether a coding tree block is implicitly divided into coding blocks of size 64x64 and whether a coding block of size 64x64 is divided into a dual tree. The dual tree may refer to a scheme in which a luminance component and a chrominance component are divided using independent division structures. The size of the coding tree block (CtbLog2Size) may be a size (e.g., 64x64, 128x128, 256x256) predefined in the encoding / decoding device, or may be coded and signaled by the encoding device.

[0166] (Condition 3) If at least one of the following sub-conditions is met, the information can be set to 1: -If the width and height of the first upper block are 64 -When the depth of the first upper block is equal to (CtbLog2Size-6), the first upper block is divided into Horizontal BT, 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 equal to (CtbLog2Size-6), the first upper block is divided into Horizontal BT and the second upper block is divided into Vertical BT

[0167] In Condition 3, the first upper block may be a block that includes the current chrominance block as a subordinate block. For example, if the depth of the current chrominance block is k, the depth of the first upper block may be (kn), where n may be 1, 2, 3, 4, or greater. The depth of the first upper block may refer only to a depth based on quadtree-based division, or may refer to a depth based on at least one of quadtree, binary tree, and ternary tree division. The second upper block is a subordinate block belonging to the first upper block and may have a depth smaller than that of the current chrominance block but a depth larger than that of the first upper block. For example, if the depth of the current chrominance block is k, the depth of the second upper block may be (kn), where m may be a natural number smaller than n.

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

[0169] However, even if at least one of the conditions 1 to 3 is met, the 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 the above-mentioned sub-block unit prediction is performed - If at least one of the width or height of the first upper block is smaller than 64 and the depth of the first upper block is equal to (CtbLog2Size-6) On the other hand, if the flag is a second value, the intra prediction mode of the chrominance block can be derived as shown in Table 2 below based on information (intra_chroma_pred_mode) signaled by the encoding device. [Table 2]

[0170] According to Table 2, the intra prediction mode of the chrominance block may be determined based on the signaled information and the intra prediction mode of the luma block. In Table 2, mode66 may represent a diagonal mode from the upper right, mode50 may represent a vertical mode, mode18 may represent a horizontal mode, and mode1 may represent a DC mode. For example, if the signaled information intra_chroma_pred_mode has a value of 4, the intra prediction mode of the chrominance block may be set to be the same as the intra prediction mode of the luma block. If the intra prediction mode of the chrominance block is derived from the second group, the chrominance block may be predicted using the intra prediction method of FIG. 6, and detailed description thereof will be omitted. Referring to FIG. 8, a luma domain for inter-component reference of the chrominance block may be identified (S810).

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

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

[0173] The above-mentioned numSampL and numSampT may be determined based on the intra prediction mode of the current block, where the current block may refer to a chrominance block.

[0174] For example, if the intra prediction mode of the current block is INTRA_LT_CCLM, it can be derived as in Equation 1. Here, INTRA_LT_CCLM may refer to a mode in which inter-component reference is performed based on adjacent regions to the left and above of the current block.

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

[0176] According to Equation 1, numSampT may be induced to nTbW if the upper neighboring region of the current block is available, or induced to 0 if not. Similarly, numSampL may be induced to nTbH if the left neighboring region of the current block is available, or induced to 0 if not.

[0177] On the other hand, if the intra prediction mode of the current block 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 may refer to a mode in which inter-component reference is performed based on the region adjacent to the top of the current block, and INTRA_L_CCLM may refer to a mode in which inter-component reference is performed based on the region adjacent to the left of the current block. numTopRight may refer to the number of full or partial pixels belonging to the region adjacent to the top right of the chrominance block. The partial pixels may refer to usable pixels among the pixels belonging to the bottommost pixel row of the region. The usability determination is performed by sequentially determining whether pixels are usable from left to right, and this may be repeated until an unusable pixel is found. numLeftBelow may refer to the number of full or partial pixels belonging to the region adjacent to the bottom left of the chrominance block. The partial pixels may refer to usable pixels among the pixels belonging to the rightmost pixel column of the region. The usability determination is performed by sequentially determining whether pixels are usable from top to bottom, and this may be repeated until an unusable pixel is found.

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

[0181] The downsampling may include at least one of: 1. downsampling for the luminance block; 2. downsampling for the left-neighboring region of the luminance block; or 3. downsampling for the upper-neighboring region of the luminance block, which will be discussed in detail below.

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

[0183] A pixel pDsY[x][y] (x=0..nTbW-1, y=0..nTbH-1) of the downsampled luminance block can be derived based on a corresponding pixel pY[2*x][2*y] of the luminance block and neighboring pixels. The neighboring pixels may refer to pixels adjacent to at least one of the left, right, upper, and lower sides of the corresponding pixel. For example, the pixel 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 neighboring region of the current block is unavailable. If the left neighboring region of the current block is unavailable, the pixel pDsY[0][y] (y=1..nTbH-1) of the downsampled luminance block can be derived based on the corresponding pixel pY[0][2*y] of the luminance block and neighboring pixels. The neighboring pixels may refer to pixels neighboring in at least one direction above or below the corresponding pixel. For example, the pixel pDsY[0][y] (y=1..nTbH-1) can be derived as shown in Equation 4 below.

[0186] [Formula 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 neighboring region of the current block is unavailable, pixel pDsY[x][0] (x=1..nTbW-1) of the downsampled luminance block can be derived based on corresponding pixel pY[2*x][0] of the luminance block and neighboring pixels. The neighboring pixels may refer to pixels adjacent to at least one of the left and right sides of the corresponding pixel. For example, 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] Meanwhile, the pixel pDsY[0][0] of the downsampled luminance block can be derived based on the corresponding pixel pY[0][0] of the luminance block and / or the surrounding pixels. The location of the surrounding pixels can be determined differently depending on the availability of the left / upper neighboring regions of the current block.

[0190] For example, if the left adjacent region is available and the upper adjacent region is not available, 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] On the other hand, if the left adjacent region is unavailable and the upper adjacent region is available, pDsY[0][0] can be derived as shown in Equation 7 below.

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

[0194] On the other hand, if both the left and top neighboring regions are unavailable, pDsY[0][0] can be set to the corresponding pixel pY[0][0] of the luminance block.

[0195] (Embodiment 2) A pixel pDsY[x][y] (x=0..nTbW-1, y=0..nTbH-1) of the downsampled luminance block can be derived based on a corresponding pixel pY[2*x][2*y] of the luminance block and neighboring pixels. The neighboring pixels may refer to pixels adjacent to the corresponding pixel in at least one of the directions below, left, right, lower left, and lower right. For example, the pixel 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 neighboring region of the current block is unavailable, the pixel pDsY[0][y] (y=0..nTbH-1) of the downsampled luminance block can be derived based on the corresponding pixel pY[0][2*y] of the luminance block and the neighboring 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] The downsampling of the luminance block may be performed according to either the first or second embodiment described above. In this case, either the first or second embodiment may be selected based on a predetermined flag. The flag may indicate whether the downsampled luminance pixels have the same positions as the original luminance pixels. For example, if the flag is a first value, the downsampled luminance pixels have the same positions as the original luminance pixels. On the other hand, if the flag is a second value, the downsampled luminance pixels have the same positions as the original luminance pixels in the horizontal direction but are shifted by half a pel in the vertical direction.

[0200] 2. Downsampling of the left adjacent region of the luminance block (Embodiment 1) The downsampled pixel pLeftDsY[y] (y=0..numSampL-1) of the left-neighboring region can be derived based on the corresponding pixel pY[-2][2*y] of the left-neighboring region and surrounding pixels. The surrounding pixels may refer to pixels adjacent to the corresponding pixel in at least one of the left, right, upper, and lower directions. 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 neighboring region of the current block is unavailable, the pixel pLeftDsY[0] of the downsampled left neighboring region can be derived based on the corresponding pixel pY[-2][0] of the left neighboring region and surrounding pixels. The surrounding pixels may refer to pixels adjacent to at least one of the left and right sides of the corresponding pixel. 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 pixel pLeftDsY[y] (y=0..numSampL-1) of the left-neighboring region can be derived based on the corresponding pixel pY[-2][2*y] of the left-neighboring region and surrounding pixels. The surrounding pixels may refer to pixels adjacent to the corresponding pixel in at least one of the directions below, to the left, to the right, to the lower left, or to the lower 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-side adjacent region can be performed based on either of the above-described embodiments 1 and 2. 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] Meanwhile, downsampling for the left neighboring region can be performed only when the numSampL value is greater than 0. A case where the numSampL value is greater than 0 may mean that the left neighboring 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) of the upper neighboring region can be derived by considering whether the upper neighboring region belongs to a different CTU from the luminance block.

[0209] If the upper neighboring region belongs to the same CTU as the luminance block, the downsampled pixel pTopDsY[x] of the upper neighboring region can be derived based on the corresponding pixel pY[2*x][-2] of the upper neighboring region and surrounding pixels. The surrounding pixels may refer to pixels adjacent to at least one of the left, right, upper, and lower sides of the corresponding pixel. 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] On the other hand, if the upper neighboring region belongs to a CTU different from the luminance block, the downsampled pixel pTopDsY[x] of the upper neighboring region can be derived based on the corresponding pixel pY[2*x][-1] of the upper neighboring region and surrounding pixels. The surrounding pixels may refer to pixels adjacent to at least one of the left and right sides of the corresponding pixel. 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 neighboring region of the current block is unavailable, the neighboring pixels may refer to pixels adjacent to the corresponding pixel in at least one of the upper and lower directions. For example, 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 top-left neighboring region of the current block is unavailable and the upper neighboring region belongs to a different CTU than the luminance block, pixel pTopDsY[0] can be set to pixel pY[0][-1] of the upper neighboring region.

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

[0216] If the upper neighboring region belongs to the same CTU as the luminance block, the downsampled pixel pTopDsY[x] of the upper neighboring region can be derived based on the corresponding pixel pY[2*x][-2] of the upper neighboring region and surrounding pixels. The surrounding pixels may refer to 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.

[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] On the other hand, if the upper neighboring region belongs to a CTU different from the luminance block, the downsampled pixel pTopDsY[x] of the upper neighboring region can be derived based on the corresponding pixel pY[2*x][-1] of the upper neighboring region and neighboring pixels. The neighboring pixels may refer to pixels adjacent to at least one of the left and right sides of the corresponding pixel. 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 neighboring region of the current block is unavailable, the neighboring pixels may refer to pixels adjacent to the corresponding pixel in at least one of the upper and lower directions. For example, 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 top-left neighboring region of the current block is unavailable and the upper neighboring region belongs to a different CTU than the luminance block, pixel pTopDsY[0] can be set to pixel pY[0][-1] of the upper neighboring region.

[0223] Similarly, downsampling of the upper adjacent region may be performed based on either of the above-described embodiments 1 and 2. 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] Meanwhile, downsampling for the upper neighboring region can be performed only when the numSampT value is greater than 0. A case where the numSampT value is greater than 0 may mean that the upper neighboring 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 FIG. 8, parameters for inter-component reference of the chrominance block can be derived (S830).

[0226] The parameter may include at least one of a weight or an offset. The parameter may be determined taking into account the intra prediction mode of the current block. The parameter may be derived using at least one of pixels in a luma region or pixels in a left / upper neighboring region of a chroma block. Here, the luma region may include a luma block and upper / left neighboring regions of the luma block. The luma region may refer to a region to which the above-mentioned downsampling is applied.

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

[0228] A portion of pixels in the luminance region is identified, and the portion of pixels in the chrominance block can be determined as pixels at positions corresponding to the identified portion of pixels in the luminance region (Embodiment 1). The portion of pixels in the luminance region can be extracted from the upper and left adjacent regions of the luminance block. 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 may vary 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 can be set to i, where i can be a natural number of 2, 3, 4, or greater. Conversely, if the size of the luminance block is larger than a predetermined threshold, at least one of numSampT or numSampL is determined to be j, where j is a natural number greater than i (e.g., 3, 4, or 5). Alternatively, the partial pixels may be limited to be extracted only from the upper neighboring region of the luminance block or only from the left neighboring region. In this case, as described above, numSampT or numSampL can be determined according to the size / shape of the luminance block. The positions of the partial pixels may be positions previously determined for the encoding / decoding device. For example, if the upper neighboring region of the luminance block is composed of eight pixels, the partial pixels may be determined to be at least one of four odd-numbered pixels from left to right, or at least one of four even-numbered pixels. Alternatively, the partial pixels may include at least one of two odd-numbered pixels from left to right and at least one of two even-numbered pixels from right to left. If the upper and left adjacent regions of a luminance block are each composed of four pixels, one or two pixels can be extracted from each of the upper and left adjacent regions.In this case, at least one of two odd-numbered pixels or at least one of two even-numbered pixels in the upper adjacent region may be determined as the pixel to be extracted, or at least one of two first and last pixels in the upper adjacent region may be determined as the pixel to be extracted. A portion of pixels may also be extracted from the left adjacent region in a similar manner.

[0229] Alternatively, conversely, some pixels in the adjacent region of the chrominance block may be identified, and the pixels in the luminance region may be determined to be pixels at positions corresponding to the some pixels in the adjacent region of the chrominance block (Embodiment 2). Here, the some pixels in the adjacent region of the chrominance block may be determined by the method for determining some pixels in the luminance region described above, and a redundant description will be omitted.

[0230] From the extracted partial pixels, maximum and minimum values ​​may be calculated for the luminance and chrominance regions, respectively. The maximum and minimum values ​​may be determined as the maximum and minimum values, respectively, among the plurality of partial pixels. Alternatively, the plurality of pixels may be sorted in descending order by comparing the magnitudes of the plurality of pixels. 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 may be a natural number of 1, 2, 3, or more.

[0231] Weights and / or offsets for the parameters may be derived based on the calculated maximum and minimum values.

[0232] The chrominance block can be predicted based on the downsampled luma block and the parameters (S840).

[0233] The chrominance block can be predicted by applying at least one of the weights or offsets previously derived to the pixels of the downsampled luma block.

[0234] There may be various methods for making predictions, examples of which include methods for 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 a target block using pixels that have already been coded / decoded in neighboring areas. Alternatively, methods such as block matching and template matching can be used for a reference area that has already been coded / decoded for the target block. In this case, the reference area may be limited to the current picture.

[0236] As an example based on temporal correlation, a block matching method can be used for a current block in a reference region that has already been coded / decoded, or a template matching method can be used, where the reference region may be limited to another picture.

[0237] Generally, prediction may be performed based on the correlation, but the above example may belong to a case where prediction is classified based on a reference area (current picture / other picture). Thus, prediction may be classified based on various factors other than the reference area. For example, a reference area, a reference position, a prediction method, etc. may be used.

[0238] Consider the case where one or more prediction candidates are defined based on the various factors and a prediction is made based on them.

[0239] Hereinafter, a case where prediction is divided into multiple candidates according to other factors when the reference region is limited (current picture in this example) will be described. In particular, it is assumed that prediction is performed based on spatial correlation and divided into the following two candidates according to the prediction method. Of course, this is not limited to this, and modified examples in which additional candidates are supported or the factors dividing the prediction are different are also possible.

[0240] 1) Predictions are made by extrapolating, interpolating, or averaging data from adjacent regions. 2) Prediction is performed by block matching in areas that have already been coded / decoded. In the first case, a predetermined directional mode, a non-directional mode, etc., are configured as a prediction mode candidate group, and at least one of them can be selected to represent the prediction mode information. In the second case, the prediction mode information can be represented by motion vector information, reference picture information, etc.

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

[0242] For predicting a current block, prediction may be performed using any of the prediction methods, and selection information related thereto may be generated. Subsequent prediction information (e.g., prediction mode information) may be generated according to the selected prediction method, and various flag (syntax) configurations for this purpose may be used. Hereinafter, a method for determining a prediction method will be described in detail with reference to FIGS. 9 to 12. A unit (current block) to which the following examples are applied may be any one of a coding unit, a prediction unit, and a transform unit.

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

[0244] The intra_mode_information means a prediction mode of extrapolation, interpolation, or average, and may be configured such that the overall prediction mode is configured as one candidate group such as intra_pred_mode and a selection is made from the candidate group, or such that the overall prediction mode is configured as a plurality of candidate groups according to classification based on a predetermined criterion such as mpm_flag, mpm_idx, remaining_mode, etc., and a selection is made from the candidate group and the selected candidate group. A detailed description of this will be omitted as it can be guided by the above-mentioned examples.

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

[0246] The motion vector prediction can be based on the motion vectors of the blocks closest to the current block in the left, top, top-left, top-right, or bottom-left directions in the current picture, but is not limited thereto. The motion vector of a block a predetermined distance (m, n) away from the current block in the horizontal or vertical direction can also be used as a predicted value. Here, m and n are integers of 4, 8, 16, or more, and may be greater than or equal to the width and height of the smallest prediction unit (or coding unit, transform unit, etc.). That is, the prediction can be based on the motion vector of a block that has already been coded / decoded before the current block. In this case, the motion vectors of blocks that are not closest to the current block can be managed in a FIFO manner based on the coding order of the current block.

[0247] Also, the motion vectors of blocks located in the left, right, upper, lower, upper left, upper right, lower left, lower right, and center directions from the block corresponding to the current block in another picture can be predicted. Alternatively, default values ​​(c, d) can be used as predicted values ​​of the motion vector, and can have values ​​of (0, 0), but are not limited thereto.

[0248] The motion model selection information may be configured as a candidate for a motion model or a non-motion model, and may be divided into the number of motion vectors (an integer of 1, 2, 3 or more) that represent the motion of the current block, but is not limited thereto. Also, the precision of the motion vector may be a power of 2, such as 1 / 4, 1 / 2, 1, 2, 4, etc. In this case, the exponent may be an integer (an integer of 1, 2 or more) with a positive or negative sign, including 0.

[0249] Here, the prediction method selection information can be classified according to the prediction method. When block matching method (2) is selected, general block matching information (motion_information) can be generated. Here, to identify the reference area (reference picture), the current picture can be included in the reference picture list. That is, information such as ref_idx is generated as in the past, but the current picture can be included in the list of ref_idx candidates.

[0250] The above description may be applicable to P or B image types, and may also be applicable to I image types, but in I image types, information regarding the reference area can be implicitly determined and therefore can be omitted. This is because the reference area is only the current picture, so information such as ref_idx is omitted, and the remaining information may be the same or similar to that of general block matching.

[0251] Prediction method selection information can be generated for any image type, i.e., prediction method selection information can be generated even for an I-image type, i.e., block matching (ibc, intra block copy) can be supported even for an I-image type.

[0252] Referring to FIG. 10, prediction method selection information (pred_mode_flag_A) is checked, and it can be determined whether to refer to the current picture or another picture accordingly. If it is determined to refer to another picture (pred_mode_flag_A is Y, i.e., 1), corresponding prediction mode information (motion_information_A) is checked. If it is determined 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, corresponding prediction mode information (intra_mode_information or motion_information_B) can be checked. Prediction can be performed based on the prediction method and prediction mode information.

[0253] Here, the prediction method selection information may be configured with multiple (conditional) flags. In this example, one (pred_mode_flag_A) may be used to distinguish the reference region, and the other (pred_mode_flag_B) may be used to distinguish the prediction method (when the reference region is limited to the current picture). Here, the prediction method selection information for the other (pred_mode_flag_B) may be generated conditionally.

[0254] The above description may be applicable to P or B picture types. In I picture types, the reference area is limited to the current picture, so the pred_mode_flag_A checking process is omitted and the process of checking pred_mode_flag_B can be started.

[0255] Here, motion_information_A and motion_information_B may have differences in the information configuration regarding the reference region, etc., but may have the same or similar configurations other than the information described below.

[0256] For example, in motion_information_A, a reference picture list is constructed for a picture different from the current picture and reference picture information is processed, while in motion_information_B, information related to reference pictures can be omitted.

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

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

[0259] Alternatively, as a candidate configuration for motion model selection information, motion_information_A can place motion models using 1 to 3 motion vectors in the candidate group, and motion_information_B can place motion models using one motion vector in the candidate group.

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

[0261] Although the above example describes a case where some prediction method selection information precedes, the order can be changed. That is, after determining which of the prediction methods 1 and 2 to use (pred_mode_flag_B) is selected, if 2 is selected, it can be determined whether the reference region is the current picture or another picture (pred_mode_flag_A). Again, the order can be changed for P or B picture types, and the part selected as the reference region can be omitted for I picture types.

[0262] 11, prediction method selection information (pred_mode_flag_A, pred_mode_flag_B) can be checked to determine whether the reference region is the current picture or another picture (pred_mode_flag_A), and to determine which of method 1 or 2 to predict (pred_mode_flag_B) to use. In the previous example, prediction method selection information was checked conditionally, but this example differs in that all prediction method selection information is checked.

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

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

[0265] The above description may be applicable to P or B image types. For I image types, the prediction method selection information (pred_mode_flag_A) for the reference region may be checked or the following related information may be omitted.

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

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

[0268] The above description may be applicable to P or B picture types. It may not be applicable to I picture types. That is, for I picture types, the prediction method selection information has a value of 0 or 1, and for P or B picture types, the prediction method selection information may have a value of 0, 1, or 2. In this example, candidates that refer to the current picture are preferentially arranged in numbers 0 and 1, and candidates that refer to other pictures are arranged in number 2, so that index rearrangement according to picture type is not performed. However, the present invention is not limited to this, and indexes may be assigned in a different order.

[0269] All or part of the prediction method selection information may be selectively signaled taking into account block attributes. Here, the block attributes may include at least one of skip mode, slice type, block size, prediction type, or partition type. Here, prediction types may 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. Block matching mode predicts a current block based on an already coded / decoded region, and the already coded / decoded region may refer to a region identified by a predetermined block vector. The already coded / decoded region may be a region belonging to the current picture to which the current block belongs. Inter prediction is similar to block matching mode in that it is performed based on a reference region identified by a motion vector, but differs in that inter prediction refers to a picture located in a different time period 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 is satisfied: the current block is not coded in skip mode (condition 1), the image type of the slice to which the current block belongs is not an I-slice (condition 2), the size of the current block is not 4x4 (condition 3), or the prediction type is the third prediction type (condition 4).

[0271] However, if the above condition is not satisfied, pred_mode_flag_A may not be signaled. In this case, pred_mode_flag_A may be induced in the decoding device 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 may be induced to 1. Or, if the prediction type for the current block is the first prediction type, pred_mode_flag_A may be induced to 1. Or, if the prediction type for the current block is the second prediction type, pred_mode_flag_A may 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 may be induced to 1, or otherwise, pred_mode_flag_A may be induced to 0.

[0272] Meanwhile, pred_mode_flag_B, which is one of the prediction method selection information, can be signaled taking into consideration at least one of whether or not it is a skip mode, the image type, the block size, the prediction mode, the prediction type, or the partition type.

[0273] For example, the pred_mode_flag_B may be signaled if the image type of the slice to which the current block belongs is an I-slice and the current block is not coded in skip mode. Alternatively, the pred_mode_flag_B may be signaled 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, the pred_mode_flag_B may be signaled if the image type of the slice to which the current block belongs is not an I-slice, the current block is a 4x4 block, and the current block is not coded in skip mode. Alternatively, the pred_mode_flag_B may be signaled only if at least one of the width or height of the current block is smaller than 64. Alternatively, the pred_mode_flag_B may be signaled 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 satisfied, pred_mode_flag_B may not be signaled. In this case, pred_mode_flag_B may be induced in a decoding device based on at least one of a block size, a prediction type, or an image type. For example, if the current block is 128x128, pred_mode_flag_B may be induced to 0. Alternatively, if the prediction type for the current block is the second prediction type, pred_mode_flag_B may be induced to 0 or 1 if the image type of the slice to which the current block belongs is an I slice, and 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 may be induced based on a flag indicating whether block matching is allowed. For example, pred_mode_flag_B may be induced to the same value as the flag. The flag can be signaled in at least one of a video parameter set, a sequence parameter set, a picture parameter set, or a slice header.

[0275] A prediction method for a current block may be selected based on at least one of the embodiments shown in FIGS. 9 to 12. If the selected prediction method is intra prediction, intra prediction according to FIG. 6 or FIG. 8 may be performed.

[0276] Although the exemplary methods of the present disclosure are expressed as a series of operations for clarity of explanation, this is not intended to limit the order in which the steps are performed, and the steps may be performed simultaneously or in a different order if necessary. To achieve a method according to the present disclosure, other steps may be included in addition to the steps illustrated, or some steps may be omitted and the remaining steps may be included, or some steps may be omitted and additional other steps may be included.

[0277] The various embodiments of the present disclosure are not intended to enumerate all possible combinations but to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.

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

[0279] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of the various embodiments to be performed on a device or computer, as well as non-transitory computer-readable media on which such software or instructions are stored and executable on a device or computer. [Industrial Applicability]

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

Claims

1. determining a reference region for intra prediction of the current block; deriving an intra prediction mode of the current block based on a set of predetermined MPM candidates; performing intra prediction on the current block based on the reference region and the intra prediction mode; The MPM candidate group is divided into a first group and a second group, The first group includes default modes already defined in the decoding device, and the second group includes intra prediction modes of neighboring blocks neighboring the current block, An image decoding method, wherein the intra prediction mode of the current block is derived by selectively using either the first group or the second group.

2. The step of determining the reference region includes: selecting one of a plurality of pixel lines already defined in the decoder; determining the selected pixel line as the reference area; 2. The image decoding method of claim 1, wherein the predefined pixel lines 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.

3. the default mode consists solely of non-directional modes; The image decoding method according to claim 1 , wherein the non-directional mode includes at least one of a planar mode and a DC mode.

4. The second group further includes a mode derived by adding or subtracting an N value to the intra prediction mode of the neighboring block, The image decoding method according to claim 3 , wherein the value of N is 1, 2, or 3.

5. further comprising obtaining a first flag from the bitstream; The first flag indicates whether the intra prediction mode of the current block is derived from the first group; If 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; The image decoding method of claim 2 , wherein if the value of the first flag is a second value, the intra prediction mode of the current block is derived based on the second group and an MPM index.

6. The image decoding method of claim 5 , wherein the first flag is signaled only if a reference area of ​​the current block is the first pixel line.

7. further comprising dividing the current block into a plurality of sub-blocks; the intra prediction is performed in units of the sub-blocks, The image decoding method of claim 1 , wherein the number of the sub-blocks is variably determined based on a size or a shape of the current block.

Citation Information

Patent Citations

  • Method and apparatus for processing video signal

    WO2017176030A1

  • Image encoding / decoding method and device, and recording medium in which bitstream is stored

    WO2018016823A1

  • Linear model chroma intra prediction for video coding

    WO2018053293A1

  • Variable number of intra modes for video coding

    WO2018067714A1

  • Method and device for image decoding according to intra-prediction in image coding system

    WO2018131838A1