Image Encoding / Decoding Method and Apparatus Using Intra Prediction
By determining a reference region and inducing intra prediction modes from MPM candidate groups, the method addresses challenges in predicting pixel values for high-resolution images, achieving improved prediction accuracy and efficiency in image encoding/decoding.
Patent Information
- Application Number
- JP2024010892
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-09-19
- Filing Date
- 2024-01-29
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2039-09-06
AI Technical Summary
Existing image compression technologies face challenges in efficiently predicting pixel values for high-resolution images, particularly in determining optimal intra prediction modes and block divisions for accurate and efficient encoding/decoding.
The method involves determining a reference region for intra prediction of a current block, inducing an intra prediction mode based on a predetermined MPM candidate group, and performing intra prediction using the reference region and the induced mode. The MPM candidate group is divided into a first group with default modes and a second group including intra prediction modes of adjacent blocks, allowing selective induction of the intra prediction mode.
This approach enhances prediction accuracy and efficiency by deriving intra prediction modes based on MPM candidate groups, improving inter-picture prediction through inter-component reference, and optimizing intra prediction encoding/decoding through adaptive block division.
Smart Images

Figure 0007696463000003 
Figure 0007696463000004 
Figure 0007696463000005
Abstract
Description
Technical Field
[0001] The present invention relates to an image encoding / decoding method and apparatus.
Background Art
[0002] Recently, the demand for high-resolution and high-quality images, such as HD (High Definition) images and UHD (Ultra High Definition) images, has been increasing in various application fields, and thus highly efficient image compression technologies have been discussed.
[0003] As image compression technologies, there are various technologies such as an inter prediction technology that predicts pixel values included in a current picture from a previous or subsequent picture of the picture, an intra prediction technology that predicts pixel values included in a current picture using pixel information within the current picture, and an entropy encoding technology that assigns short codes to frequently occurring values and long codes to infrequently occurring values. Using these image compression technologies, image data can be effectively compressed for transmission or storage.
Summary of the Invention
Problems to be Solved by the Invention
[0004] An object of the present invention is to provide an intra prediction mode induction method and apparatus.
[0005] An object of the present invention is to provide an intra prediction method and apparatus according to a component type.
[0006] An object of the present invention is to provide a block division method and apparatus for intra prediction.
Means for Solving the Problems
[0007] The image encoding / decoding method and apparatus of the present invention can determine a reference region for intra prediction of a current block, induce 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 is divided into a first group and a second group. The first group includes default modes already defined in the decoding apparatus, and the second group can include intra prediction modes of adjacent 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 selectively induced using either the first group or the second group.
[0010] In the image encoding / decoding method and apparatus of the present invention, the step of determining the reference region can include a step of selecting any one of a plurality of pixel lines already defined in the decoding apparatus, and a step of determining the selected pixel line as the reference region.
[0011] In the image encoding / decoding method and apparatus of the present invention, the plurality of already defined pixel lines can 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 is composed of only non-directional modes, and the non-directional mode can 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 / from the intra prediction mode of the adjacent block, and the N value can be 1, 2, or 3.
[0014] The image encoding / decoding method and apparatus of the present invention can obtain a first flag from a bitstream, 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 the 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 derived based on the second group and the MPM index.
[0016] In the image encoding / decoding method and apparatus of the present invention, the first flag can be signaled only when the reference region of the current block is the first pixel line.
[0017] The image encoding / decoding method and apparatus of the present invention can determine the intra prediction mode of the current block and perform intra prediction on the current block based on the determined intra prediction mode.
[0018] In the image encoding / decoding method and apparatus of the present invention, the intra prediction mode of the current block can be derived for the luminance block and the chrominance block respectively.
[0019] In the image encoding / decoding method and apparatus of the present invention, the intra prediction mode of the luminance block is derived based on the MPM list and the MPM index, and the MPM list can include at least one of the intra prediction modes (ModeA), (ModeA + n), (ModeA - n) of the adjacent block or the default mode.
[0020] The image encoding / decoding method and apparatus of the present invention can identify a luminance region for inter-component reference of a chrominance block, perform downsampling on the luminance region, derive a parameter for inter-component reference of the chrominance block, and predict the chrominance block based on the downsampled luminance block and the parameter.
[0021] In the image encoding / decoding method and apparatus of the present invention, the current block is divided into a plurality of sub-blocks, and the division can be performed based on at least one of the size or shape of the current block.
Advantages of the Invention
[0022] According to the present invention, prediction can be performed more accurately and efficiently through the derivation of an intra prediction mode based on an MPM candidate group.
[0023] According to the present invention, the efficiency of inter-picture prediction can be improved based on inter-component reference.
[0024] The present invention can improve the efficiency of intra prediction encoding / decoding through adaptive block division.
Brief Description of the Drawings
[0025]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Embodiments for Carrying Out the Invention
[0026] The image encoding / decoding method and apparatus of the present invention can determine a reference region for intra prediction of a current block, induce 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 is divided into a first group and a second group. The first group includes default modes already defined in the decoding apparatus, and the second group can include intra prediction modes of adjacent 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 selectively induced using either the first group or the second group.
[0029] In the image encoding / decoding method and apparatus of the present invention, the step of determining the reference region may include a step of selecting any one of a plurality of pixel lines already defined in the decoding apparatus, and a step of determining the selected pixel line as the reference region.
[0030] In the image encoding / decoding method and apparatus of the present invention, the plurality of already defined 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 is composed 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 induced by adding or subtracting an N value to the intra prediction mode of the adjacent block, and the N value can be 1, 2, or 3.
[0033] The image encoding / decoding method and apparatus of the present invention can obtain 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 the 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 derived based on the second group and the MPM index.
[0035] In the image encoding / decoding method and apparatus of the present invention, the first flag can be signaled only when the reference area of the current block is the first pixel line.
[0036] The image encoding / decoding method and apparatus of the present invention can determine the intra prediction mode of the current block and perform intra prediction on the current block based on the determined intra prediction mode.
[0037] In the image encoding / decoding method and apparatus of the present invention, the intra prediction mode of the current block can be derived for the luminance block and the chrominance block, respectively.
[0038] In the image encoding / decoding method and apparatus of the present invention, the intra prediction mode of the luminance block is derived based on the MPM list and the MPM index, and the MPM list can include at least one of the intra prediction modes (ModeA), (ModeA + n), (ModeA - n) of adjacent blocks or the default mode.
[0039] The image encoding / decoding method and apparatus of the present invention can specify a luminance area for inter-component reference of the chrominance block, perform downsampling on the luminance area, derive a parameter for inter-component reference of the chrominance block, and predict the chrominance block based on the downsampled luminance block and the parameter.
[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 can be performed based on at least one of the size or shape of the current block.
[0041] [Embodiments 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 will be described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and it should be understood that it includes all modifications, equivalents, and alternatives included in the spirit and technical scope of the present invention. While explaining each drawing, the same reference numerals are used for the same components.
[0042] The terms "first", "second", etc. can be used to describe various components, but these components should not be limited by the above terms. These terms are only used for the purpose of distinguishing one component from another. For example, without departing from the scope of the rights of the present invention, the first component can be named the second component, and similarly, the second component can also be named the first component. The term "and / or" includes a combination of a plurality of related described items or any one of a plurality of related described items.
[0043] When a certain component is "connected to" or "attached to" another component, it should be understood that it may be directly connected to or attached to the other component, but there may also be another component intervening between them. On the contrary, when a certain component is "directly connected to" or "directly attached to" another component, it should be understood that there is no other component intervening between them.
[0044] The terms used in the present invention are only used to explain specific embodiments and do not limit the present invention. Singular expressions include plural expressions unless the context clearly indicates a different meaning. In the present invention, terms such as "including" or "having" are used to specify the existence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and it should be understood that the existence or addition possibility of one or more other features, numbers, steps, operations, components, parts, or combinations thereof is not precluded in advance.
[0045] Hereinafter, with reference to the accompanying drawings, preferred embodiments of the present invention will be described in detail. For the same components in the drawings, the same reference numerals are used, and duplicate descriptions of the same components are omitted.
[0046] FIG. 1 is a block diagram showing an image encoding apparatus according to an embodiment of the present invention.
[0047] Referring to FIG. 1, the image encoding apparatus 100 may include a picture splitting unit 110, prediction units 120 and 125, a conversion unit 130, a quantization unit 135, a reordering unit 160, an entropy encoding unit 165, an inverse quantization unit 140, an inverse conversion unit 145, a filter 150, and a memory 155.
[0048] Each component shown in FIG. 1 is independently illustrated to show different characteristic functions in the image encoding apparatus, and does not mean that each component consists of separate hardware or a single software configuration unit. That is, for convenience of explanation, each component is listed as each component, and at least two of the components may be combined to form one component, or one component may be divided into a plurality of components to perform functions. Such integrated embodiments and separated embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.
[0049] In addition, some components may not be essential components for performing essential functions in the present invention, but may be optional components for simply improving performance. The present invention can be implemented by including only the essential components necessary for realizing the essence of the present invention, excluding the components used only for performance improvement, and a structure including only the essential components excluding the optional components used only for performance improvement is also included in the scope of the present invention.
[0050] The picture splitting unit 110 can split the 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). In the picture splitting unit 110, a picture can be split into a combination of a plurality of coding units, prediction units, and transform units, and a combination of one coding unit, prediction unit, and transform unit can be selected as a predetermined criterion (for example, a cost function) to encode the picture.
[0051] For example, one picture can be split into a plurality of coding units. To split a coding unit from a picture, a recursive tree structure such as a quad tree structure can be used. However, the coding unit with one image or the largest coding unit as the root and split into other coding units can be split with the number of child nodes equal to the number of split coding units. The coding unit that is not split any further according to certain restrictions becomes a leaf node. That is, assuming that only square splitting is possible for one coding unit, one coding unit can be split into at most four different coding units.
[0052] Hereinafter, in the embodiments of the present invention, the coding unit may be used in the sense of a unit for performing encoding or in the sense of a unit for performing decoding.
[0053] The prediction unit may be split with at least one shape such as a square or a rectangle of the same size within one coding unit, or may be split such that any one of the prediction units split 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 symbolization unit and the minimum coding unit is not used, intra prediction can be performed without dividing into a plurality of prediction units N×N.
[0055] The prediction units 120 and 125 can 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 perform intra prediction for a prediction unit, and determine specific information (for example, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. At this time, the processing unit for which prediction is performed and the processing unit for which the prediction method and specific content are determined can be different from each other. For example, the prediction method and prediction mode, etc. may be determined in the prediction unit, and the execution of prediction may be performed in the conversion unit. The residual value (residual block) between the generated prediction block and the original block can be input to the conversion unit 130. Also, prediction mode information, motion vector information, etc. used for prediction can be encoded by the entropy encoding unit 165 together with the residual value and transmitted to the decoder. When using a specific encoding mode, it is also possible to directly encode the original block and transmit it to the decoding unit without generating a prediction block via the prediction units 120 and 125.
[0056] The inter prediction unit 120 can also predict a prediction unit based on information of at least one picture among the previous picture or the subsequent picture of the current picture, and in some cases, can also predict a prediction unit based on information of a partially encoded area within the current picture. The inter prediction unit 120 can include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
[0057] In the reference picture interpolation section, it can receive the provision of reference picture information from the memory 155 and generate pixel information below integer pixels in the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information below integer pixels in units of 1 / 4 pixels. In the case of color difference signals, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information below integer pixels in units of 1 / 8 pixels.
[0058] The motion prediction section can perform motion prediction based on the reference picture interpolated by the reference picture interpolation section. As methods for calculating motion vectors, various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm) can be used. The motion vector can have a motion vector value in units of 1 / 2 or 1 / 4 pixels based on the interpolated pixels. In the motion prediction section, the current prediction unit can be predicted with different motion prediction methods. As motion prediction methods, various methods such as the Skip method, the Merge method, the AMVP (Advanced Motion Vector Prediction) method, and the Intra Block Copy method can be used.
[0059] The intra prediction unit 125 can generate a prediction unit based on the reference pixel information around the current block, which is pixel information within the current picture. When the surrounding block of the current prediction unit is a block that has performed inter prediction and the reference pixel is a pixel that has performed inter prediction, the reference pixel included in the block that has performed inter prediction can be used instead by the reference pixel information of the surrounding block that has performed intra prediction. That is, when the reference pixel is not available, the unavailable reference pixel information can be used instead by at least one of the available reference pixels.
[0060] The prediction mode in intra prediction can have a directional prediction mode that uses reference pixel information according to the prediction direction and a non-directional mode that does not use direction information during the execution of prediction. The mode for predicting luminance information and the mode for predicting chrominance information can be different from each other, and in order to predict chrominance information, the intra prediction mode information used to predict luminance information or the predicted luminance signal information can be utilized.
[0061] When the size of the prediction unit is the same as the size of the conversion unit when performing intra prediction, intra prediction for the prediction unit can be performed based on the pixels existing on the left side, upper left side, and upper side of the prediction unit. However, when the size of the prediction unit is different from the size of the conversion unit when performing intra prediction, intra prediction can be performed using the reference pixels based on the conversion unit. Also, intra prediction using N×N division can be used only for the minimum coding unit.
[0062] The intra prediction method can generate a prediction block after applying an AIS (Adaptive Intra Smoothing) filter to reference pixels according to a prediction mode. The types of AIS filters applied to the reference pixels can be different from each other. To perform the intra prediction method, the intra prediction mode of the current prediction unit can be predicted from the intra prediction modes of the prediction units existing around the current prediction unit. When predicting the prediction mode of the current prediction unit using the 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 can 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 can be performed to encode the prediction mode information of the current block.
[0063] In addition, a residual block including residual value (Residual) information, which is a difference value between the prediction block predicted based on the prediction units generated by the prediction units 120 and 125 and the original block of the prediction unit, can be generated. The generated residual block can be input to the conversion unit 130.
[0064] In the conversion unit 130, a residual block including residual value information of the prediction unit generated via the original block and the prediction units 120 and 125 can be converted using a conversion method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to convert the residual block can be determined based on the intra prediction mode information of the prediction unit used to generate the residual block.
[0065] The quantization unit 135 can quantize the values converted into the frequency domain by the conversion unit 130. The quantization coefficient can vary according to the block or the importance of the image. The values calculated by the quantization unit 135 can be provided to the inverse quantization unit 140 and the reordering unit 160.
[0066] The rearrangement unit 160 can rearrange coefficient values for the quantized residual values.
[0067] The rearrangement unit 160 can change two-dimensional block-form coefficients into a one-dimensional vector form by a coefficient scanning method. For example, in the rearrangement unit 160, it is possible to scan from the DC coefficient to the coefficients in the high-frequency region using the Zig-Zag Scan method and change them into a one-dimensional vector form. Depending on the size of the conversion unit and the intra prediction mode, instead of the Zig-Zag scan, a vertical scan that scans two-dimensional block-form coefficients in the column direction or a horizontal scan that scans two-dimensional block-form coefficients in the row direction may be used. That is, depending on the size of the conversion unit and the intra prediction mode, it is possible to determine which of the Zig-Zag scan, vertical scan, and horizontal scan methods is used.
[0068] The entropy coding unit 165 can perform entropy coding based on the values calculated by the rearrangement unit 160. For entropy coding, various coding methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be used.
[0069] The entropy coding unit 165 can code various information such as residual value coefficient information, block type information, prediction mode information, division unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, filtering information, etc. of the coding unit from the rearrangement unit 160 and the prediction units 120 and 125.
[0070] The entropy encoding unit 165 can perform entropy encoding on the coefficient values of the encoding units input from the rearrangement unit 160.
[0071] The inverse quantization unit 140 and the inverse transform unit 145 perform inverse quantization on the values quantized by the quantization unit 135 and inverse transform the values transformed by the transform unit 130. The residual values generated by the inverse quantization unit 140 and the inverse transform unit 145 can be combined with the prediction units predicted through the motion estimation unit, the motion compensation unit, and the intra prediction unit included in the prediction units 120 and 125 to generate a reconstructed block.
[0072] The filter unit 150 can include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter).
[0073] The deblocking filter can remove the block distortion caused by the boundaries between blocks in the restored picture. To determine whether to perform deblocking, it is possible to determine whether to apply the deblocking filter to the current block based on the pixels included in some columns or rows included in the block. When applying the deblocking filter to the block, a strong filter or a weak filter can be applied according to the required deblocking filter strength. Also, when performing vertical filtering and horizontal filtering in applying the deblocking filter, the horizontal filtering and the vertical filtering can be made to be processed in parallel.
[0074] The offset correction unit can correct the offset from the original image for each pixel in the deblocked image. To perform offset correction for a specific picture, after dividing the pixels included in the image into a certain number of regions, a region for which to perform offset is determined, and a method of applying the offset to the corresponding region, or a method of applying the offset in consideration of the edge information of each pixel can be used.
[0075] ALF (Adaptive Loop Filtering) can be performed based on the value obtained by comparing the filtered restored image and the original image. After dividing the pixels included in the image into predetermined groups, one filter to be applied to the corresponding group is determined, and filtering can be performed differentially 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 according to each block can vary. Also, an ALF filter of the same form (fixed form) may be applied regardless of the characteristics of the block to be applied.
[0076] The memory 155 can store the restored block or picture calculated via the filter unit 150, and the stored restored block or picture 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 can 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 the image encoder, the input bitstream can be decoded in a procedure reverse to that of the image encoder.
[0080] The entropy decoding unit 210 can perform entropy decoding in the reverse procedure 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 corresponding to the method performed by the image encoder.
[0081] The entropy decoding unit 210 can decode information related to the intra prediction and inter prediction performed by the encoder.
[0082] The rearrangement unit 215 can perform rearrangement based on the method of rearranging the bit stream entropy decoded by the entropy decoding unit 210 in the encoder. The coefficients expressed in the form of a one-dimensional vector can be restored to the coefficients in the form of a two-dimensional block for rearrangement. The rearrangement unit 215 can receive the provision of information related to the coefficient scanning performed by the encoder and perform rearrangement by scanning in the reverse order based on the scanning order performed by the encoder.
[0083] The inverse quantization unit 220 can perform inverse quantization based on the quantization parameter provided from the encoder and the coefficient values of the rearranged block.
[0084] The inverse transformation unit 225 can perform inverse transformation, that is, inverse DCT, inverse DST, and inverse KLT, on the transformation performed by the transformation unit, that is, DCT, DST, and KLT, for the quantization result performed by the image encoder. The inverse transformation can be performed based on the transmission unit determined by the image encoder. In the inverse transformation unit 225 of the image decoder, the transformation technique (for example, DCT, DST, KLT) can be selectively performed according to a plurality of information such as the prediction method, the size of the current block, and the prediction direction.
[0085] The prediction units 230 and 235 can generate prediction blocks based on the prediction block generation related information provided by the entropy decoding unit 210 and the previously decoded block or picture information provided by the memory 245.
[0086] As described above, when performing intra prediction in the same manner as the operation in the image encoder, if the size of the prediction unit is the same as the size of the transform unit, intra prediction for the prediction unit is performed based on the pixels existing on the left side, upper left side, and upper side of the prediction unit. However, when performing intra prediction, if the size of the prediction unit is different from the size of the transform unit, intra prediction can be performed using the reference pixels based on the transform unit. Also, intra prediction using N×N division only for the minimum coding unit can be used.
[0087] The prediction units 230 and 235 can include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit receives inputs of various information such as the prediction unit information input from the entropy decoding unit 210, the prediction mode information of the intra prediction method, and the motion prediction related information of the inter prediction method, classifies the prediction unit in the current coding unit, and can determine whether the prediction unit performs inter prediction or intra prediction. The inter prediction unit 230 can perform inter prediction for the current prediction unit based on the information included in at least one of the previous picture or the subsequent picture of the current picture in which the current prediction unit is included, using the information necessary for inter prediction of the current prediction unit provided from the image encoding device. Or, inter prediction can also be performed based on the information of a partially restored area within the current picture in which the current prediction unit is included.
[0088] To perform inter prediction, it can be determined which method among the skip mode, merge mode, AMVP mode, and intra block copy mode the motion prediction method of the prediction unit included in the corresponding coding unit is based on the coding unit.
[0089] The intra prediction unit 235 can generate a prediction block based on the pixel information within the current picture. When the prediction unit for which the prediction unit is performing intra prediction, intra prediction can be performed based on the intra prediction mode information of the prediction unit provided from the image encoder. The intra prediction unit 235 can include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that filters the reference pixels of the current block, and can determine whether to apply the filter according to the prediction mode of the current prediction unit and then apply it. AIS filtering can be performed on the reference pixels of the current block using the prediction mode of the prediction unit and the AIS filter information provided from the image encoding device. When the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0090] The reference pixel interpolation unit can generate reference pixels in pixel units less than or equal to 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 the pixel value 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. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.
[0091] The restored block or picture can be provided to the filter unit 240. The filter unit 240 can include a deblocking filter, an offset correction unit, and an ALF.
[0092] Information can be received regarding whether to apply a deblocking filter to the block or picture from the picture encoder, and regarding whether a strong filter or a weak filter is applied when the deblocking filter is applied. In the deblocking filter of the picture decoder, it can receive the provision of deblocking filter-related information provided from the picture encoder and perform deblocking filtering on the block in the picture decoder.
[0093] The offset correction unit can perform offset correction on the restored image based on information such as the type of offset correction applied to the image during encoding and the offset value.
[0094] ALF can be applied to the encoding unit based on the ALF application presence / absence information, ALF coefficient information, etc. provided from the encoding device. Such ALF information may be provided included in a specific parameter set.
[0095] The memory 245 can store the restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to the output unit.
[0096] As described above, hereinafter, in the embodiments of the present invention, for convenience of explanation, a coding unit is used as the term for the encoding unit, but it may 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 the "first block") can be divided into a plurality of sub - blocks (hereinafter referred to as the "second blocks") by at least one of a vertical line or a horizontal line. The vertical line and the horizontal line 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 prediction block (PU) which is a basic unit of prediction encoding / decoding, or a transform block (TU) which is a basic unit of transform encoding / decoding. The first block may be a square block or a non - square block.
[0099] The division of the first block can be performed based on a quad tree, a binary tree, a triple tree, etc. Hereinafter, it will be discussed in detail with reference to FIG. 3.
[0100] FIG. 3(a) shows a quad - tree (QT) split. QT is a split type that divides the first block into four second blocks. For example, when a first block of 2N×2N is split by QT, the first block can be divided into four second blocks of size N×N. QT can be restricted to be applied only to square blocks, but it is also possible to apply it to non - square blocks.
[0101] FIG. 3(b) shows a horizontal binary - tree (hereinafter referred to as "Horizontal BT") split. Horizontal BT is a split type in which the first block is divided into two second blocks by one horizontal line. The two - split can be performed symmetrically or asymmetrically. For example, when a first block of 2N×2N is split by Horizontal BT, the first block can be divided into two second blocks with a height ratio of (a:b). Here, a and b may be the same value, or a may be larger or smaller than b.
[0102] Figure 3(c) shows a vertical binary tree (hereinafter referred to as "Vertical BT") split. Vertical BT is a split type in which a first block is split into two second blocks by a single vertical line. The split can be performed symmetrically or asymmetrically. For example, when a 2N×2N first block is split by Vertical BT, the first block can be split 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] Figure 3(d) shows a horizontal ternary tree (hereinafter referred to as "Horizontal TT") split. Horizontal TT is a split type in which a first block is split into three second blocks by two horizontal lines. For example, when a 2N×2N first block is split by Horizontal TT, the first block can be split into three second blocks with a height ratio of (a:b:c). Here, a, b, and c may be the same value. Or, a and c are the same, and b may be larger or smaller than a.
[0104] Figure 3(e) shows a vertical ternary tree (hereinafter referred to as "Vertical TT") split. Vertical TT is a split type in which a first block is split into three second blocks by two vertical lines. For example, when a 2N×2N first block is split by Vertical TT, the first block can be split into three second blocks with a width ratio of (a:b:c). Here, a, b, and c may be the same value, or they may be different from each other. Or, a and c are the same, and b may be larger or smaller than a. Or, a and b are the same, and c may be larger or smaller than a. Or, b and c are the same, and a may be larger or smaller than b.
[0105] The above-described split can be performed based on split information signaled from an encoding device. The split information can include at least one of split type information, split direction information, or split ratio information.
[0106] The split type information can identify any of the split types already defined in the encoding / decoding device. The already defined split types can include at least one of QT, Horizontal BT, Vertical BT, Horizontal TT, Vertical TT, or non-split mode (No split). Alternatively, the split type information may mean information about whether QT, BT, or TT is applied. This can be encoded in the form of a flag or an index. The split direction information can indicate whether it is split horizontally or vertically in the case of BT or TT. The split ratio information can indicate the ratio of the width and / or height of the second block in the case of BT or TT.
[0107] FIG. 4 shows a block splitting method based on a tree structure as an embodiment to which the present invention is applied.
[0108] Assume that the block 40 shown in FIG. 4 is a square block with a size of 8N×8N and a split depth of k (hereinafter referred to as the "first block"). When the split information of the first block indicates QT split, the first block can be quartered into four sub-blocks (hereinafter referred to as the "second block"). The second block has a size of 4N×4N and can have a split depth of (k + 1).
[0109] The four second blocks can be split again based on any of QT, BT, TT, or non-split mode. For example, when the split information of the second block represents a binary tree in the horizontal direction (Horizontal BT), the second block can be split into two sub-blocks (hereinafter referred to as the "third block") as shown in the second block 410 of FIG. 4. At this time, the third block has a size of 4N×2N and can have a split depth of (k + 2).
[0110] The third block can also be re-divided based on any one of QT, BT, TT, or the non-separable mode. For example, when the division information of the third block represents a vertical binary tree (Vertical BT), the third block can be divided into two sub-blocks 411 and 412 as shown in FIG. 4. At this time, the sub-blocks 411 and 412 are of size 2N×2N and can have a division depth of (k + 3). Or, when the division information of the third block represents a horizontal binary tree (Horizontal BT), the third block can be divided into two sub-blocks 413 and 414 as shown in FIG. 4. At this time, the sub-blocks 413 and 414 are of size 4N×N and can have a division depth of (k + 3).
[0111] The division may be performed independently or in parallel with the surrounding blocks, or may be performed sequentially based on a predetermined priority order.
[0112] The division information of the current block to be divided may be determined dependently based on at least one of the division information of the upper block of the current block or the division information of the surrounding blocks. For example, when 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 if the lower third block is divided into Vertical BT, the same result as when the second block is divided into QT will occur. Therefore, the division information of the lower third block (especially the division direction information) can be omitted during encoding, and the decoder can be set such that the lower third block is divided horizontally.
[0113] The upper block can be meant to be a block having a splitting depth smaller than that of the current block. For example, when the splitting depth of the current block is (k + 2), the splitting depth of the upper block can be (k + 1). The peripheral block can be a block adjacent to the upper side or the left side of the current block. The peripheral block can be a block having the same splitting depth as the current block.
[0114] The above-described splitting can be repeatedly performed until the minimum unit of encoding / decoding. When split into the minimum unit, the splitting information for the block is not further signaled from the encoding device. The information for the minimum unit can include at least one of the size or form of the minimum unit. The size of the minimum unit can be expressed by the width of the block, the height, the minimum or maximum value of the width and height, the sum of the width and height, the number of pixels, the splitting depth, etc. The information for the minimum unit can be signaled in at least one of the video sequence, picture, slice, or block unit. Or, the information for the minimum unit may be a value already agreed upon by the encoding / decoding device. The information for the minimum unit can be signaled for CU, PU, and TU respectively. The information for one minimum unit may be similarly applied to CU, PU, and TU.
[0115] FIG. 5 is an exemplary diagram showing an intra prediction mode already defined in the image encoding / decoding device.
[0116] Referring to FIG. 5, the already defined intra prediction mode can be defined as a prediction mode candidate group composed of 67 modes. Specifically, it can include 65 directional modes (from the 2nd to the 66th) and two non-directional modes (DC, Planar). At this time, the directional mode can be classified into slope (e.g., dy / dx) or angle information (Degree). All or part of the intra prediction mode described in the above example may be included in the prediction mode candidate group of the luminance component or the chrominance component, and other additional modes may be included in the prediction mode candidate group.
[0117] In addition, restoration blocks of other color spaces for which encoding / decoding has been completed can be used for prediction of the current block by using the correlation between color spaces, and a prediction mode for assisting this can be included. For example, in the case of color difference components, a predicted block of the current block can be generated using the restored block of the corresponding luminance component of the current block. That is, considering the correlation between color spaces, a predicted block can be generated based on the restored block.
[0118] A candidate group of prediction modes can be adaptively determined based on the encoding / decoding settings. The number of the candidate group can be increased for the purpose of improving the prediction accuracy, and the number of the candidate group can be decreased for the purpose of reducing the amount of bits according to the prediction mode.
[0119] For example, any one of candidate groups such as candidate group A (67, including 65 directional modes and two non-directional modes), candidate group B (35, including 33 directional modes and two non-directional modes), candidate group C (18, including 17 directional modes and one non-directional mode) can be selected, and the candidate group can be adaptively selected or determined according to the size and shape of the block.
[0120] In addition, the configuration of the candidate group of prediction modes can be diversified based on the encoding / decoding settings. For example, as shown in FIG. 5, the candidate group of prediction modes can be evenly configured among the modes, or the number of modes between mode 18 and mode 34 in FIG. 5 can be configured to have more candidate groups than the number of modes between mode 2 and mode 18. Or, the reverse case is possible. The candidate group can be adaptively configured according to the shape of the block (that is, square, non-square with width larger than height, non-square with height larger than width, etc.).
[0121] For example, when the width of the current block is larger than the height, all or part of the intra prediction modes belonging to numbers 2 to 18 are not used, and can be replaced by all or part of the intra prediction modes belonging to numbers 67 to 80. On the other hand, when the width of the current block is smaller than the height, all or part of the intra prediction modes belonging to numbers 50 to 66 are not used, and can be replaced by all or part of the intra prediction modes belonging to numbers -14 to -1.
[0122] When there is no special mention in the present invention, it is assumed that intra prediction is performed using one already defined prediction mode candidate group (A candidate group) having an equal mode interval for explanation, but the main elements of the present invention can also be changed and applied to the adaptive intra prediction setting 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 the current block can be determined (S600).
[0125] The encoding / decoding device can define a plurality of pixel lines available for intra prediction. The plurality of pixel lines can include at least one of the first pixel line adjacent to the current block, the second pixel line adjacent to the first pixel line, the third pixel line adjacent to the second pixel line, or the fourth pixel line adjacent to the third pixel line.
[0126] For example, based on the encoding / decoding settings, the plurality of pixel lines can include all of the first to fourth pixel lines, or can include only the remaining pixel lines excluding the third pixel line. Alternatively, the plurality of pixel lines can include only the first pixel line and the fourth pixel line.
[0127] The current block can select one or more of the plurality of pixel lines and use it / them as a reference region. At this time, the selection can be performed based on an index (refIdx) signaled by an encoding device. Or, the selection can be performed based on predetermined encoding information. Here, the encoding information can include at least one of the size, shape, split type of the current block, whether the intra prediction mode is a non-directional mode, whether the intra prediction mode is a horizontal directional mode, the angle of the intra prediction mode, or the component type. For example, when the intra prediction mode is the Planar mode or the DC mode, it can be restricted so that only the first pixel line is used. Or, when the size of the current block is the same as or smaller than a predetermined threshold, it can be restricted so that only the first pixel line is used. Here, the size can be represented by either the width or the height of the current block (e.g., the maximum value, the minimum value, etc.), the sum of the width and the height, or the number of samples belonging to the current block. Or, when the intra prediction mode is larger than a predetermined threshold angle (or smaller than a predetermined threshold angle), it can be restricted so that only the first pixel line is used. The threshold angle can be the angle of the intra prediction mode corresponding to mode 2 and mode 66 among the aforementioned prediction mode candidate groups.
[0128] Referring to FIG. 6, the intra prediction mode of the current block can 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 above-mentioned already defined intra prediction mode can be classified into an MPM candidate group and a Non-MPM candidate group. The intra prediction mode of the current block can be selectively induced using either the MPM candidate group or the Non-MPM candidate group. For this purpose, a flag indicating whether the intra prediction mode of the current block is induced from the MPM candidate group can be used. For example, when the flag is a first value, the MPM candidate group is used, and when the flag is a second value, the Non-MPM candidate group can be used. The flag can be encoded and signaled by an encoding device. Alternatively, the flag can be induced by a decoding device based on predetermined encoding information. The encoding information is as described above, and repeated explanations are omitted.
[0131] When the flag is a first value, the intra prediction mode of the current block can be induced based on the MPM candidate group and the MPM index. The MPM candidate group includes one or more MPMs, and the MPM can be determined based on the intra prediction mode of an adjacent block of the current block. The number of MPMs is r, and r can be an integer of 1, 2, 3, 4, 5, 6, or more. The number of MPMs may be a fixed value already agreed upon by the encoding / decoding device, or may be variably determined based on the above-mentioned encoding information.
[0132] For example, the MPM candidate group can include at least one of the intra prediction modes modeA, (modeA-n), (modeA+n) of adjacent blocks, or the default mode. The n value can be an integer of 1, 2, 3, 4, or more. The adjacent block can mean a block adjacent to the left side and / or the upper side of the current block. However, it is not limited thereto, and the adjacent block can also include at least one of the blocks adjacent to the upper left side, the lower left side, or the upper right side. The default mode can be at least one of the Planar mode, the DC mode, or a predetermined directional mode. The predetermined directional mode can include at least one of the horizontal mode (modeV), the vertical mode (modeH), (modeV-k), (modeV+k), (modeH-k), or (modeH+k).
[0133] The MPM index can identify the MPM that is the same as the intra prediction mode of the current block among the MPMs of the MPM candidate group. That is, the MPM specified by the MPM index can be set as the intra prediction mode of the current block.
[0134] Alternatively, the MPM candidate group can be divided into a plurality of groups. For example, assume that the MPM candidate group is divided into a first group and a second group. The first group can be composed of at least one of the aforementioned default modes. For example, the first group may be composed of only the non-directional mode, or may be composed of only a predetermined directional mode. Alternatively, the first group may be composed of only the Planar mode or only the DC mode among the non-directional modes. The second group can include at least one of the intra prediction modes modeA, (modeA-n), (modeA+n) of adjacent blocks or the default mode. The n value can be an integer of 1, 2, 3, 4 or more. The adjacent blocks can mean the blocks adjacent to the left side and / or the upper side of the current block. However, it is not limited thereto, and the adjacent blocks can also include at least one of the blocks adjacent to the upper left side, the lower left side, or the upper right side. The default mode can be at least one of the Planar mode, the DC mode, or a predetermined directional mode. The predetermined directional mode can include at least one of the horizontal mode (modeV), the vertical mode (modeH), (modeV-k), (modeV+k), (modeH-k) or (modeH+k). However, the second group can be set not to include the MPM belonging to the first group.
[0135] The intra prediction mode of the current block can be selectively induced using either the first group or the second group. For this purpose, a flag indicating whether the intra prediction mode of the current block is induced from the first group can be used. For example, when the flag is the first value, the intra prediction mode of the current block can be set to the MPM belonging to the first group. On the contrary, when the flag is the second value, the intra prediction mode of the current block can be induced based on the second group and the MPM index. Here, the MPM index is as described above, and detailed description is omitted.
[0136] The flag can be encoded by an encoding device and signaled. However, the flag can be signaled adaptively in consideration of predetermined encoding information. Here, the encoding information can include at least one of the size, shape, split type, or reference region of the current block. Here, the split type can mean, for example, a quadtree, a binary tree, a ternary tree, or the presence or absence of intra prediction in units of sub-blocks.
[0137] For example, the flag can be signaled only when the reference region of the current block is the first pixel line (Embodiment 1). When the reference region of the current block is not the first pixel line, the flag is not signaled and can be set to a second value by a decoding device. Thereby, when the current block does not refer to the first pixel line, it is possible to limit inducing an intra prediction mode based on the first group.
[0138] Also, the flag can be signaled only when the current block does not perform intra prediction in units of sub-blocks (Embodiment 2). Conversely, when the current block performs intra prediction in units of sub-blocks, the flag is not signaled and can be set to a second value by a decoding device.
[0139] When any of the conditions of Embodiment 1 or 2 described above is satisfied, the flag may be signaled. When both Embodiment 1 and 2 are satisfied, the flag may be set to be signaled.
[0140] Referring to FIG. 6, intra prediction can be performed on the current block based on a reference region for intra prediction and an intra prediction mode (S620).
[0141] The intra prediction can be performed in units of sub-blocks of the current block. For this purpose, the current block can be divided into a plurality of sub-blocks. The division method will be discussed in detail with reference to FIG. 7.
[0142] FIG. 7 shows an intra prediction method in sub-block units as an embodiment to which the present invention is applied.
[0143] As described above, the current block can be divided into a plurality of sub-blocks. At this time, the current block can correspond to a leaf node. A leaf node can mean a coding block that is not further divided into smaller coding blocks. That is, a leaf node can mean a block that is not further divided through the above-described tree-based block division.
[0144] The division can be performed based on the size of the current block (Embodiment 1).
[0145] Referring to FIG. 7, when the size of the current block 700 is smaller than the size of a predetermined threshold, the current block can be divided into two in the vertical or horizontal direction. Conversely, when the size of the current block 710 is the same as or larger than the size of the threshold, the current block can be divided into four in the vertical or horizontal direction.
[0146] The size of the threshold may be signaled by an encoding device or may be a fixed value already defined in a decoding device. For example, the size of the threshold is expressed as N×M, and N and M may be 4, 8, 16 or more. N and M may be set to be the same or may be set to be different from each other.
[0147] Alternatively, when the size of the current block is smaller than the size of a predetermined threshold, the current block is non-split, and otherwise, the current block can be divided 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 can be divided into four parts; otherwise, the current block can be divided into two parts. Conversely, if the shape of the current block is square, the current block can be divided into two parts; otherwise, the current block can be divided into four parts.
[0150] Or, if the shape of the current block is square, the current block can be divided into two or four parts; otherwise, the current block can remain undivided. Conversely, if the shape of the current block is square, the current block can remain undivided; otherwise, the current block can be divided into two or four parts.
[0151] Any one of the above-described Embodiment 1 or 2 may be selectively applied for division, or division may be performed based on a combination of Embodiment 1 and 2.
[0152] The two-way division is a division in either the vertical or horizontal direction, and the four-way division can include a division in either the vertical or horizontal direction or a division in both the vertical and horizontal directions.
[0153] In the above embodiment, two-way or four-way division is described, but it is not limited thereto. The current block may be divided into three parts in the vertical or horizontal direction. In this case, the ratio of width or height may be (1:1:2), (1:2:1), or (2:1:1).
[0154] Information regarding whether to divide into sub-block units, whether to perform four-way division, the division "num", the number of divisions, etc. may be signaled from the encoding device or may be variably determined by the decoding device based on predetermined encoding parameters. Here, the encoding parameters can mean the size / shape of the block, the division type (four-way division, two-way division, three-way division), the intra prediction mode, the range / position of adjacent pixels for intra prediction, the component type (e.g., luminance, chrominance difference), 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] The current block can be classified into a luminance block and a chrominance difference block according to the type of the component. The chrominance difference block can be predicted using the pixels of the already restored luminance block, which is called inter-component reference. In the present embodiment, it is assumed that the chrominance difference block has a size of (nTbW×nTbH), and the luminance block corresponding to the chrominance difference block has a size of (2*nTbW×2*nTbH). This assumes the case where the ratio of the width and height of the luminance and chrominance difference blocks is all 2:1, but it should be understood that the examples described later can be equally or similarly applied when either one of the width and height is 1:1, the other is 2:1, or both are 1:1.
[0157] Referring to FIG. 8, the intra prediction mode of the chrominance difference block can be determined (S800).
[0158] Specifically, the already defined intra prediction modes for the chrominance difference block can be classified into a first group and a second group. Here, the first group is composed of prediction modes based on inter-component reference, and the second group can be composed of the already defined intra prediction modes for the luminance block. The encoding / decoding device can define at least one of INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM as a prediction mode based on inter-component reference.
[0159] The intra prediction mode of the chrominance difference block can be selectively induced using either the first group or the second group. The selection can be made based on a predetermined first flag. The first flag can indicate whether the intra prediction mode of the chrominance difference block is induced based on the first group or the second group.
[0160] For example, when the first flag is the first value, the intra prediction mode of the color difference block can be determined to be any one of the prediction modes based on one or more component - to - component references belonging to the first group. Therefore, an index for specifying any one of the prediction modes based on the component - to - component reference belonging to the first group can be used. The prediction modes based on the component - to - component reference 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 only an example of the indexes assigned to each prediction mode and is not limited thereto. That is, as shown in Table 1, the indexes may be assigned in the priority order of INTRA_LT_CCLM, INTRA_L_CCLM, INTRA_T_CCLM, or may be assigned in the priority order of INTRA_LT_CCLM, INTRA_T_CCLM, INTRA_L_CCLM. Alternatively, INTRA_LT_CCLM may have a lower priority than INTRA_T_CCLM or INTRA_L_CCLM.
[0162] The first flag can be selectively signaled based on information indicating whether component - to - component reference is allowed. For example, when the value of the information is 1, the first flag is signaled, and otherwise, the first flag may not be signaled. Here, the information can be determined to be 0 or 1 based on a predetermined condition described later.
[0163] (Condition 1) When a second flag indicating whether prediction based on component - to - 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] If at least one of the following sub - conditions is satisfied in (Condition 2), the said information can be set to 1. - When the value of qtbtt_dual_tree_intra_flag is 0 - When the slice type is not an I - slice - When the size of the coding tree block is smaller than 64×64
[0165] In the said Condition 2, qtbtt_dual_tree_intra_flag can indicate whether the coding tree block is implicitly divided into coding blocks of size 64×64 and whether the coding block of size 64×64 is divided into a dual - tree. The said dual - tree can mean a method in which the luminance component and the chrominance component are divided with an independent division structure from each other. The size (CtbLog2Size) of the coding tree block may be a size already defined in the encoding / decoding device (for example, 64×64, 128×128, 256×256), or may be encoded and signaled by the encoding device.
[0166] (Condition 3) If at least one of the following sub - conditions is satisfied, the said information can be set to 1. - When the width and height of the first upper - level block are 64 - When the depth of the first upper - level block is the same as (CtbLog2Size - 6), the first upper - level block is divided by Horizontal BT, and the second upper - level block is 64×32 - When the depth of the first upper - level block is greater than (CtbLog2Size - 6) - When the depth of the first upper - level block is the same as (CtbLog2Size - 6), the first upper - level block is divided by Horizontal BT, and the second upper - level block is divided by Vertical BT
[0167] Under the above-mentioned condition 3, the first upper block may be a block that includes the current color difference block as a lower block. For example, when the depth of the current color difference block is k, the depth of the first upper block is (kn), where n can be 1, 2, 3, 4, or more. The depth of the first upper block may mean only the depth by quadtree-based splitting, or may mean the depth by splitting of at least one of quadtree, binary tree, or ternary tree. The second upper block is a lower block belonging to the first upper block, and can have a depth smaller than that of the current color difference block and a depth larger than that of the first upper block. For example, when the depth of the current color difference block is k, the depth of the second upper block is (k - m), where m can be a natural number smaller than n.
[0168] If none of the above-mentioned conditions 1 to 3 are satisfied, the information can be set to 0.
[0169] However, even if at least one of conditions 1 to 3 is satisfied, if at least one of the following sub-conditions is satisfied, the information can be reset to 0. - When the first upper block is 64×64 and prediction in the above-mentioned sub-block unit is performed - When 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 the same as (CtbLog2Size - 6) On the contrary, when the flag is the second value, the intra prediction mode of the color difference block can be derived as shown in Table 2 below based on the 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 can be determined based on the signaled information and the intra prediction mode of the luminance block. In Table 2, mode66 can mean the diagonal mode in the upper right direction, mode50 can mean the vertical mode, mode18 can mean the horizontal mode, and mode1 can mean the DC mode. For example, when the value of the signaled information intra_chroma_pred_mode is 4, the intra prediction mode of the chrominance block can be set the same as the intra prediction mode of the luminance block. When the intra prediction mode of the chrominance block is derived from the second group, the chrominance block can be predicted by the intra prediction method according to FIG. 6, and detailed description is omitted. Referring to FIG. 8, the luminance region for the inter-component reference of the chrominance block can be specified (S810).
[0171] The luminance region can include at least one of a luminance block or an adjacent region adjacent to the luminance block. Here, the luminance block can be defined as a region including pixels pY[x][y] (x = 0..nTbW*2 - 1, y = 0..nTbH*2 - 1). The pixels can mean the restored values before the in-loop filter is applied.
[0172] The adjacent region can include at least one of a left adjacent region, an upper adjacent region, or an upper left adjacent region. The left adjacent region can be set as a region including pixels pY[x][y] (x = -1..-3, y = 0..2*numSampL - 1). The setting can be performed only when the value of numSampL is greater than 0. The upper adjacent region can be set as a region including pixels pY[x][y] (x = 0..2*numSampT - 1, y = -1..-3). The setting can be performed only when the value of numSampT is greater than 0. The upper left adjacent region can be set as a region including pixels pY[x][y] (x = -1, y = -1, -2). The above setting can be performed only when the upper left region of the luminance block is available.
[0173] The aforementioned numSampL and numSampT can be determined based on the intra prediction mode of the current block. Here, the current block can mean a chrominance difference block.
[0174] For example, when the intra prediction mode of the current block is INTRA_LT_CCLM, it can be derived as in the following Equation 1. Here, INTRA_LT_CCLM can mean a mode in which inter-component reference is performed based on regions adjacent to the left and upper sides of the current block.
[0175] [Equation 1] numSampT = availT? nTbW : 0 numSampL = availL? nTbH : 0
[0176] According to Equation 1, numSampT can be derived to nTbW when the upper adjacent region of the current block is available, and can be derived to 0 otherwise. Similarly, numSampL can be derived to nTbH when the left adjacent region of the current block is available, and can be derived to 0 otherwise.
[0177] On the other hand, when the intra prediction mode of the current block is not INTRA_LT_CCLM, it can be derived as in the following Equation 2.
[0178] [Equation 2] numSampT = (availT && predModeIntra == INTRA_T_CCLM)? (nTbW + numTopRight) : 0 numSampL = (availL && predModeIntra == INTRA_L_CCLM)? (nTbH + numLeftBelow) : 0
[0179] In Equation 2, INTRA_T_CCLM can mean a mode in which the inter-component reference is performed based on the area adjacent to the upper side of the current block, and INTRA_L_CCLM can mean a mode in which the inter-component reference is performed based on the area adjacent to the left side of the current block. numTopRight can mean the number of all or some of the pixels belonging to the area adjacent to the upper right side of the color difference block. Some of the pixels can mean the available pixels among the pixels belonging to the bottommost pixel line (row) of the area. The determination of availability can sequentially determine whether the pixels are available in the left-to-right direction, and this can be done until an unavailable pixel is found. numLeftBelow can mean the number of all or some of the pixels belonging to the area adjacent to the lower left side of the color difference block. Some of the pixels can mean the available pixels among the pixels belonging to the rightmost pixel line (column) of the area. The determination of availability can sequentially determine whether the pixels are available in the top-to-bottom direction, and this can be done until an unavailable pixel is found.
[0180] Referring to FIG. 8, downsampling can be performed on the luminance region specified in S810 (S820).
[0181] The downsampling can include at least one of 1. downsampling for a luminance block, 2. downsampling for the area adjacent to the left side of the luminance block, or 3. downsampling for the area adjacent to the upper side of the luminance block, which will be considered in detail below.
[0182] 1. Downsampling for Luminance Block (Embodiment 1)
[0183] The pixel pDsY[x][y] (x = 0..nTbW-1, y = 0..nTbH-1) of the downsampled luminance block can be derived based on the corresponding pixel pY[2*x][2*y] of the luminance block and the surrounding pixels. The surrounding pixels can mean the pixels adjacent to the corresponding pixel in at least one of the left, right, upper, or lower directions. For example, the pixel pDsY[x][y] can be derived as shown in Equation 3 below.
[0184] [Equation 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 can be cases where the left / upper adjacent area of the current block is not available. If the left adjacent area of the current block is not available, 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 the surrounding pixels. The surrounding pixels can mean the pixels adjacent to the corresponding pixel in at least one of the upper or lower directions. For example, the pixel pDsY[0][y] (y = 1..nTbH-1) can be derived as shown in Equation 4 below.
[0186] [Equation 4] pDsY[0][y]=(pY[0][2*y-1]+2*pY[0][2*y]+pY[0][2*y+1]+2)>>2
[0187] If the upper adjacent area of the current block is not available, the pixel pDsY[x][0] (x = 1..nTbW-1) of the downsampled luminance block can be derived based on the corresponding pixel pY[2*x][0] of the luminance block and the surrounding pixels. The surrounding pixels can mean the pixels adjacent to the corresponding pixel in at least one of the left or right directions. For example, the pixel pDsY[x][0] (x = 1..nTbW-1) can be derived as shown in Equation 5 below.
[0188] [Equation 5] pDsY[x][0]=(pY[2*x - 1][0]+2*pY[2*x][0]+pY[2*x + 1][0]+2)>>2
[0189] On the other hand, the pixel pDsY[0][0] of the downsampled luminance block can be derived based on the corresponding pixel pY[0][0] and / or the surrounding pixels of the luminance block. The position of the surrounding pixels can be determined to vary depending on whether the left / upper adjacent region of the current block is available or not.
[0190] For example, when 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] [Equation 6] pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2
[0192] On the contrary, when the left adjacent region is not available and the upper adjacent region is available, pDsY[0][0] can be derived as shown in Equation 7 below.
[0193] [Equation 7] pDsY[0][0]=(pY[0][-1]+2*pY[0][0]+pY[0][1]+2)>>2
[0194] On the other hand, when neither the left nor the upper adjacent region is available, pDsY[0][0] can be set to the corresponding pixel pY[0][0] of the luminance block.
[0195] (Embodiment 2) The pixel pDsY[x][y] (x = 0..nTbW-1, y = 0..nTbH-1) of the downsampled luminance block can be derived based on the corresponding pixel pY[2*x][2*y] of the luminance block and the surrounding pixels. The surrounding pixels can be meant as the pixels adjacent in at least one of the directions of the lower side, left side, right side, lower left side or lower right side of the corresponding pixel. For example, the pixel pDsY[x][y] can be derived as shown in Equation 8 below.
[0196] [Equation 8] pDsY[x][y]=(pY[2*x-1][2*y]+pY[2*x-1][2*y+1]+2*pY[2*x][2*y]+2*pY[2*x][2*y+1]+pY[2*x+1][2*y]+pY[2*x+1][2*y+1]+4)>>3
[0197] However, if the left adjacent region of the 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 surrounding pixels on the lower side. For example, the pixel pDsY[0][y] (y = 0..nTbH-1) can be derived as shown in Equation 9 below.
[0198] [Equation 9] pDsY[0][y]=(pY[0][2*y]+pY[0][2*y+1]+1)>>1
[0199] The downsampling of the luminance block can be performed based on any one of the above-described Embodiments 1 and 2. At this time, any one of Embodiment 1 or 2 can be selected based on a predetermined flag. The flag can indicate whether the downsampled luminance pixel has the same position as the original luminance pixel. For example, when the flag is the first value, the downsampled luminance pixel has the same position as the original luminance pixel. On the contrary, when the flag is the second value, the downsampled luminance pixel has the same position as the original luminance pixel in the horizontal direction, but has a position shifted by half pel in the vertical direction.
[0200] 2. Downsampling for the Left Adjacent Region of the Luminance Block (Embodiment 1) The pixel pLeftDsY[y] (y = 0..numSampL-1) of the downsampled left adjacent region can be derived based on the corresponding pixel pY[-2][2*y] of the left adjacent region and the surrounding pixels. The surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one of the left, right, upper, or lower directions. For example, the pixel pLeftDsY[y] can be derived as shown in Equation 10 below.
[0201] [Equation 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, when the upper left adjacent region of the current block is unavailable, the pixel pLeftDsY[0] of the downsampled left adjacent region can be derived based on the corresponding pixel pY[-2][0] of the left adjacent region and the surrounding pixels. The surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one of the left or right directions. For example, the pixel pLeftDsY[0] can be derived as shown in Equation 11 below.
[0203] [Equation 11] pLeftDsY[0]=(pY[-3][0]+2*pY[-2][0]+pY[-1][0]+2)>>2
[0204] (Embodiment 2) The pixel pLeftDsY[y] (y = 0..numSampL-1) of the downsampled left adjacent region can be derived based on the corresponding pixel pY[-2][2*y] of the left adjacent region and the surrounding pixels. The surrounding pixels can mean pixels adjacent to the corresponding pixel in at least one of the lower, left, right, lower left, or lower right directions. For example, the pixel pLeftDsY[y] can be derived as shown in Equation 12 below.
[0205] [Equation 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, the downsampling of the left adjacent region can be performed based on any one of the aforementioned Embodiments 1 and 2. At this time, either Embodiment 1 or 2 can be selected based on a predetermined flag. The flag indicates whether the downsampled luminance pixel has the same position as the original luminance pixel, as described above.
[0207] On the other hand, the downsampling for the left adjacent region can be performed only when the numSampL value is greater than 0. When the numSampL value is greater than 0, it can mean that the left adjacent region of the current block is available and the intra prediction mode of the current block is INTRA_LT_CCLM or INTRA_L_CCLM.
[0208] 3. Downsampling for the Upper Adjacent Region of the Luminance Block (Embodiment 1) The pixels pTopDsY[x] (x = 0..numSampT - 1) of the downsampled upper adjacent region can be derived considering whether the upper adjacent region belongs to a CTU different from the luminance block.
[0209] When the upper adjacent region belongs to the same CTU as the luminance block, the pixels pTopDsY[x] of the downsampled upper adjacent region can be derived based on the corresponding pixels pY[2*x][-2] of the upper adjacent region and the surrounding pixels. The surrounding pixels can mean the pixels adjacent to the corresponding pixel in at least one direction among the left, right, upper, or lower sides. For example, the pixel pTopDsY[x] can be derived as shown in Equation 13 below. [Equation 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, when the upper adjacent region belongs to a CTU different from the luminance block, the pixel pTopDsY[x] of the downsampled upper adjacent region can be derived based on the corresponding pixel pY[2*x][-1] of the upper adjacent region and the surrounding pixels. The surrounding pixels can mean pixels adjacent in at least one of the left or right directions of the corresponding pixel. For example, the pixel pTopDsY[x] can be derived as shown in Equation 14 below.
[0211] [Equation 14] pTopDsY[x]=(pY[2*x-1][-1]+2*pY[2*x][-1]+pY[2*x+1][-1]+2)>>2
[0212] Alternatively, when the upper left adjacent region of the current block is unavailable, the surrounding pixels can mean pixels adjacent in at least one of the upper or lower directions of the corresponding pixel. For example, the pixel pTopDsY[0] can be derived as shown in Equation 15 below.
[0213] [Equation 15] pTopDsY[0]=(pY[0][-3]+2*pY[0][-2]+pY[0][-1]+2)>>2
[0214] Alternatively, when the upper left adjacent region of the current block is unavailable and the upper adjacent region belongs to a CTU different from the luminance block, the pixel pTopDsY[0] can be set to the pixel pY[0][-1] of the upper adjacent region.
[0215] (Embodiment 2) The pixel pTopDsY[x] (x = 0..numSampT-1) of the downsampled upper adjacent region can be derived considering whether the upper adjacent region belongs to a CTU different from the luminance block.
[0216] When the upper adjacent region belongs to the same CTU as the luminance block, the pixel pTopDsY[x] of the downsampled upper adjacent region can be derived based on the corresponding pixel pY[2*x][-2] of the upper adjacent region and the surrounding pixels. The surrounding pixels can mean the pixels adjacent to the corresponding pixel in at least one of the directions of the lower side, the left side, the right side, the lower left side, or the lower right side. For example, the pixel pTopDsY[x] can be derived as shown in Equation 16 below.
[0217] [Equation 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, when the upper adjacent region belongs to a CTU different from the luminance block, the pixel pTopDsY[x] of the downsampled upper adjacent region can be derived based on the corresponding pixel pY[2*x][-1] of the upper adjacent region and the surrounding pixels. The surrounding pixels can mean the pixels adjacent to the corresponding pixel in at least one of the directions of the left side or the right side. For example, the pixel pTopDsY[x] can be derived as shown in Equation 17 below.
[0219] [Equation 17] pTopDsY[x]=(pY[2*x-1][-1]+2*pY[2*x][-1]+pY[2*x+1][-1]+2)>>2
[0220] Or, when the upper left adjacent region of the current block is unavailable, the surrounding pixels can mean the pixels adjacent to the corresponding pixel in at least one of the directions of the upper side or the lower side. For example, the pixel pTopDsY[0] can be derived as shown in Equation 18 below.
[0221] [Equation 18] pTopDsY[0]=(pY[0][-2]+pY[0][-1]+1)>>1
[0222] Alternatively, if the upper-left adjacent region of the current block is unavailable and the upper adjacent region belongs to a CTU different from the luminance block, the pixel pTopDsY[0] can be set to the pixel pY[0][-1] of the upper adjacent region.
[0223] Similarly, the downsampling of the upper adjacent region can be performed based on any one of the aforementioned Embodiments 1 and 2. At this time, either Embodiment 1 or 2 can be selected based on a predetermined flag. The flag indicates whether the downsampled luminance pixel has the same position as the original luminance pixel, as described above.
[0224] On the other hand, the downsampling for the upper adjacent region can be performed only when the numSampT value is greater than 0. The case where the numSampT value is greater than 0 can mean that the upper adjacent region of the current block is available and the intra prediction mode of the current block is INTRA_LT_CCLM or INTRA_T_CCLM.
[0225] Referring to FIG. 8, parameters for component - to - component reference of the chrominance block can be derived (S830).
[0226] The parameter can include at least one of a weight or an offset. The parameter can be determined in consideration of the intra prediction mode of the current block. The parameter can be derived using at least one of the pixels in the luminance region or the pixels in the left / upper adjacent region of the chrominance block. Here, the luminance region can include the luminance block, the upper / left adjacent regions of the luminance block. The luminance region can mean the region to which the aforementioned downsampling is applied.
[0227] The parameter can be derived using all or some of the pixels belonging to the adjacent regions of the luminance region and the chrominance block.
[0228] Some pixels in the luminance area can be specified, and some pixels in the color difference block can be determined as the pixels at the positions corresponding to some pixels in the specified luminance area (Embodiment 1). Some pixels in the luminance area can be extracted from the upper and left adjacent areas of the luminance block respectively. The number of some pixels (numSampT) extracted from the upper adjacent area may be the same as the number of some pixels (numSampL) extracted from the left adjacent area, or may vary depending on the size / shape of the luminance block. For example, in an N*M luminance block, when N is larger than M, numSampT can be set to be larger than numSampL, and when N is smaller than M, numSampT can be set to be smaller than numSampL. Or, when the size of the luminance block is smaller than the size of a predetermined threshold, at least one of numSampT or numSampL can be determined to be i, where i can be a natural number such as 2, 3, 4, or more. Conversely, when the size of the luminance block is larger than the size of a predetermined threshold, at least one of numSampT or numSampL can be determined to be j, where j can be a natural number larger than i (for example, 3, 4, 5). Or, some pixels may be restricted to be extracted only from the upper adjacent area of the luminance block, or only from the left adjacent area. In this case as well, of course, numSampT or numSampL can be determined according to the size / shape of the luminance block as described above. The positions of the some pixels can be the positions already agreed upon in the encoding / decoding device. For example, when the upper adjacent area of the luminance block is composed of 8 pixels, some pixels can be determined as at least one of the 4 pixels located at odd positions in the left-to-right direction, or as at least one of the 4 pixels located at even positions. Or, the some pixels can include at least one of the two pixels located at odd positions in the left-to-right direction and at least one of the two pixels located at even positions in the right-to-left direction. When the upper / left adjacent areas of the luminance block are each composed of 4 pixels, some pixels can extract one or two pixels from the upper / left adjacent areas respectively.At this time, in the upper adjacent region, it can be determined to at least one of the two pixels located at odd positions, or can be determined to at least one of the two pixels located at even positions. Alternatively, in the upper adjacent region, it may be determined to at least one of the two pixels located at the first and the last positions. A part of pixels can be extracted from the left adjacent region in the same manner.
[0229] Alternatively, conversely, a part of pixels in the adjacent region of the color difference block is specified, and a part of pixels in the luminance region can be determined to the pixels at the positions corresponding to the part of pixels in the adjacent region of the color difference block (Embodiment 2). Here, a part of pixels in the adjacent region of the color difference block can be determined by the method of determining a part of pixels in the luminance region described above, and repeated explanations are omitted.
[0230] The maximum value and the minimum value can be calculated for the luminance region and the color difference region respectively from the extracted part of pixels. The maximum value and the minimum value can be determined to the maximum value and the minimum value respectively among a plurality of part of pixels. Alternatively, a plurality of pixels can be sorted in descending order by comparing the magnitudes between the plurality of pixels. At this time, the average among the top t pixels can be set to the maximum value, and the average among the bottom t pixels can be set to the minimum value. t can be a natural number of 1, 2, 3 or more.
[0231] Based on the calculated maximum value and minimum value, the weight and / or offset of the parameter can be derived.
[0232] The color difference block can be predicted based on the downsampled luminance block and the parameter (S840).
[0233] The color difference block can be predicted by applying at least one of the already derived weight or offset to the pixels of the downsampled luminance block.
[0234] There can be various methods for making predictions, and a method of making predictions based on spatial or temporal correlations can be an example thereof.
[0235] As an example based on spatial correlation, for a target block, methods such as extrapolation, interpolation, averaging, and copying can be used with the already encoded / decoded pixels in the adjacent regions. Alternatively, for the target block, methods such as block matching and template matching can be used in a reference region where encoding / decoding has already been completed. At this time, the reference region may be limited to the current picture.
[0236] As an example based on temporal correlation, for a target block, the block matching method can be used in a reference region that has already been encoded / decoded, or the template matching method can be used. At this time, the reference region may be limited to other pictures.
[0237] Generally, prediction can be performed based on the above-mentioned correlation. In the case of the above examples, it can belong to the case where prediction is classified based on the reference region (current picture / other pictures). In this way, prediction can be classified not only by the above-mentioned reference region but also by various elements. For example, the reference region, reference position, prediction method, etc. can be examples thereof.
[0238] Consider the case where prediction is defined as one or more candidates based on the above various elements and prediction is performed based thereon.
[0239] Hereinafter, the case where prediction is classified into a plurality of candidates by other elements when the reference region is restricted (in this example, the current picture) will be described. Specifically, assume that prediction is performed based on spatial correlation and is classified into the following two candidates by the prediction method. Of course, it is not limited to this, and modified examples in which additional candidates are supported or the elements for classifying prediction are different are also possible.
[0240] 1) Perform prediction by extrapolation, interpolation, and averaging on the data in the adjacent regions 2) Perform prediction by block matching in the already encoded / decoded region Here, in the first case, a predetermined directional mode, non-directional mode, etc. can be configured as a prediction mode candidate group, and at least one of them can be selected to represent prediction mode information. In the second case, prediction mode information can be represented by motion vector information, reference picture information, etc.
[0241] Each of the above prediction methods can be activated by information explicitly indicating the presence or absence of support, or the presence or absence of support can be implicitly determined. In this example, it is assumed that the first one is implicitly activated (supported), and the second one is activated by information explicitly indicating the presence or absence of support.
[0242] For the prediction of the target block, any of the above prediction methods can be used for prediction, and selection information regarding this can be generated. Then, subsequent prediction information (such as prediction mode information) can be generated according to the selected prediction method, and various flag (syntax) configurations for this are possible. Hereinafter, with reference to FIGS. 9 to 12, a method for determining a prediction method will be described in detail. The unit (current block) to which the example described later is applied can be any one of an encoding unit, a prediction unit, and a conversion unit.
[0243] Referring to FIG. 9, when prediction method selection information (pred_mode_flag) is confirmed and one of the first method or the second method is selected accordingly, the prediction mode information (intra_mode_information or motion_information) thereby obtained is confirmed, and prediction can be performed based on the prediction method and the prediction mode information.
[0244] The intra_mode_information means an extrapolation, interpolation, or average prediction mode, and can be configured such that the overall prediction mode is formed as a single candidate group like intra_pred_mode and one is selected from among them, or such that the overall prediction mode is formed as a plurality of candidate groups by a classification based on a predetermined criterion like mpm_flag, mpm_idx, remaining_mode, etc., and the candidate group is selected and one is selected from among the selected candidate groups. Since the explanation thereof can be induced from the examples described above, the detailed explanation is omitted.
[0245] The motion_information can include at least one of a motion prediction mode (Skip / Merge / AMVP), motion vector prediction information, motion difference value information, reference region selection information, motion model selection information, prediction direction information, and motion vector accuracy (or motion vector difference value accuracy) information.
[0246] The motion vector prediction can be performed from among the motion vectors of the blocks that are closest adjacent in the left, up, upper left, upper right, and lower left directions in the current picture with the current block as the center, but is not limited thereto, and the motion vectors of blocks that are separated by a predetermined distance (m, n) in the horizontal or vertical direction can also be used as prediction values. Here, m and n are integers of 4, 8, 16, or more, and can be greater than or equal to the width and height of the minimum prediction unit (or coding unit, conversion unit, etc.). That is, it can be predicted based on the motion vectors of blocks that have already been encoded / decoded before the current block. At this time, in the case of the motion vectors of blocks that are not closest adjacent, they can be managed in a FIFO manner based on the encoding order with the current block as the reference.
[0247] Also, it can be predicted from among the motion vectors of blocks located in the left, right, up, down, upper left, upper right, lower left, lower right, and center directions with the block corresponding to the current block in another picture as the center. Or, (c, d) having default values can be used as the prediction value of the motion vector, and can have a value of (0, 0), but is not limited thereto.
[0248] The motion model selection information can be configured with candidates from a motion model during movement or a motion model other than movement, and can be classified into the number of motion vectors (1, 2, 3, or an integer greater than or equal to 1) representing the motion of the current block, but is not limited thereto. Also, the accuracy of the motion vector can be a power of 2, such as 1 / 4, 1 / 2, 1, 2, 4. At this time, the exponent can be an integer (1, 2, or an integer greater than or equal to 1) with a positive or negative sign including 0.
[0249] Here, the prediction method selection information can be classified according to the prediction method. When the block matching method (No. 2) is selected, information (motion_information) regarding general block matching can be generated. Here, in order to confirm what the reference area (reference picture) is, the current picture can be included in the reference picture list. That is, information such as ref_idx is generated as in the prior art, but the current picture can be included in the list of candidate groups of ref_idx.
[0250] The above description can be an explanation applicable to the P or B picture type, and is similarly applicable to the I picture type. However, in the I picture type, since information regarding the reference area can be implicitly defined, it can be omitted. The reason is that since the reference area is only the current picture, information such as ref_idx is omitted, and the remaining information can be the same as or similar to that of general block matching.
[0251] Regardless of the picture type, prediction method selection information can be generated. That is, prediction method selection information can also be generated in the I picture type. That is, block matching (ibc, intra block copy) can also be supported in the I picture type.
[0252] Referring to FIG. 10, by checking the prediction method selection information (pred_mode_flag_A), it is possible to determine 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, that is, 1), the prediction mode information (motion_information_A) thereby is checked. If it is determined to refer to the current picture (pred_mode_flag_A is N, that is, 0), either the first method or the second method can be selected. According to the selected candidate, the prediction mode information (intra_mode_information or motion_information_B) thereby can be checked. Prediction can be performed based on the above prediction method and prediction mode information.
[0253] Here, the prediction method selection information can be composed of a plurality of (conditional) flags. In this example, one (pred_mode_flag_A) is used to divide the reference area, and the other one (pred_mode_flag_B) can be used to divide the prediction method (when the reference area is limited to the current picture). Here, the prediction method selection information regarding the other one (pred_mode_flag_B) can occur conditionally.
[0254] The above description can be an explanation applicable to the P or B picture type. In the I picture type, since the reference area is limited to the current picture, the process of checking pred_mode_flag_A is omitted, and the process can start from the process of checking pred_mode_flag_B.
[0255] Here, there can be differences in motion_information_A and motion_information_B in terms of information composition regarding the reference area, etc., and the compositions other than the information described later can be the same or similar.
[0256] For example, in motion_information_A, a reference picture list is constructed for a picture different from the current picture to process reference picture information, and in motion_information_B, information regarding the reference picture can be omitted.
[0257] Or, in motion_information_A, the forward or backward direction can be configured as a candidate regarding the prediction direction information, and in motion_information_B, the prediction direction information can be omitted.
[0258] Or, as the configuration of the block referred to for motion vector prediction, in motion_information_A, spatially adjacent blocks and temporally adjacent blocks can be targeted, and in motion_information_B, spatially adjacent blocks can be targeted, and the detailed configuration of the spatially adjacent blocks can be the same or not the same. Also, it can be configured such that the default values for motion vector prediction are the same or not the same.
[0259] Or, as the candidate configuration regarding the motion model selection information, in motion_information_A, a motion model using 1 to 3 motion vectors can be placed in the candidate group, and in motion_information_B, a motion model using one motion vector can be placed in the candidate group.
[0260] Or, as the candidate configuration regarding the accuracy information of the motion vector, the range of the exponent in motion_information_A can be an integer with positive and negative signs including 0, and the range of the exponent in motion_information_B can be an integer with a positive sign of 0 or more.
[0261] The above example explains the case where some prediction method selection information precedes, but the order can also be changed. That is, after determining which of the first and second methods to use for prediction (pred_mode_flag_B), if the second one is selected from them, it is possible to determine whether to use the current picture as the reference area or another picture (pred_mode_flag_A). This is also possible for the order change in the P or B picture type, and in the I picture type, the part selected as the reference area can be omitted.
[0262] Referring to FIG. 11, it is possible to check the prediction method selection information (pred_mode_flag_A, pred_mode_flag_B), determine whether to use the current picture as the reference area or another picture (pred_mode_flag_A), and determine which of the first or second methods to use for prediction (pred_mode_flag_B). In the case of the previous example, if the prediction method selection information is checked conditionally, this example may differ in that all of the prediction method selection information is checked.
[0263] Based on the above prediction method selection information, if the reference area is the current picture and the first one is selected, the prediction mode information (intra_mode_information) accordingly can be checked. If the reference area is the current picture and the second one is selected, the prediction mode information (motion_information_B) accordingly can be checked. If the reference area is another picture and the second one is selected, the prediction mode information (motion_information_A) accordingly can be checked.
[0264] For 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 can be the description applicable to the P or B picture type. For the I picture type, it is possible to check the prediction method selection information (pred_mode_flag_A) for the reference area, or the description can be made except for the subsequent parts related thereto.
[0266] Referring to FIG. 12, the prediction method selection information (pred_mode_flag) can be checked. If the value of pred_mode_flag is 0, the first method is selected, and the prediction mode information (intra_mode_information) by the first method can be checked. If the value of pred_mode_flag is 1, the second method of referring to the current picture is selected, and the prediction mode information (motion_information_B) by the second method can be checked. If the value of pred_mode_flag is 2, the second method of referring to another picture is selected, and the prediction mode information (motion_information_A) by the second method can be checked.
[0267] In this example, the prediction method selection information is processed by one flag, but the index for this can be defined as two or more.
[0268] The above description can be the description applicable to the P or B picture type. It may not be applicable to the I picture type. That is, for the I picture type, the prediction method selection information can have a value of 0 or 1, and for the P or B picture type, the prediction method selection information can have values of 0, 1, and 2. In this example, the candidates for referring to the current picture are preferentially arranged as No. 0 and No. 1, and the candidate for referring to another picture is arranged as No. 2, so as not to perform rearrangement of the index according to the picture type. However, the present invention is not limited to this, and the index can also be assigned in another order.
[0269] All or part of the above-described prediction method selection information can be selectively signaled in consideration of the block attributes. Here, the block attributes can include at least one of whether it is a skip mode, image type (slice type), block size, prediction type, or split type. Here, the prediction type can be classified into a first prediction type including intra prediction and / or block matching mode (ibc mode), a second prediction type including inter prediction, and a third prediction type including intra prediction, block matching mode, and inter prediction. The block matching mode predicts the current block based on the already encoded / decoded region, and the already encoded / decoded region can mean a region specified by a predetermined block vector. The already encoded / decoded region can be a region belonging to the current picture to which the current block belongs. Inter prediction is similar to the block matching mode in that it is performed based on a reference region specified by a motion vector, but inter prediction is different in that it refers to a picture located in a different time zone from the current block.
[0270] For example, pred_mode_flag_A, which is one of the prediction method selection information, can be signaled only when at least one of the following conditions is satisfied: when the current block is not encoded in skip mode (condition 1), when the image type of the slice to which the current block belongs is not an I slice (condition 2), when the size of the current block is not 4×4 (condition 3), or when the prediction type is the third prediction type (condition 4).
[0271] However, when the above conditions are not met, pred_mode_flag_A may not be signaled. In this case, the pred_mode_flag_A can be derived in the decoder based on at least one of the block size, prediction type, or picture type. For example, when the current block is 4×4, the pred_mode_flag_A can be derived as 1. Or, when the prediction type for the current block is the first prediction type, the pred_mode_flag_A can be derived as 1. Or, when the prediction type for the current block is the second prediction type, the pred_mode_flag_A can be derived as 0. Or, when the picture type of the slice to which the current block belongs is an I slice, the pred_mode_flag_A can be derived as 1, and otherwise, the pred_mode_flag_A can be derived as 0.
[0272] On the other hand, pred_mode_flag_B, which is one of the prediction method selection information, can be signaled considering at least one of whether it is in skip mode, picture type, block size, prediction mode, prediction type, or split type.
[0273] For example, when the picture type of the slice to which the current block belongs is an I slice and the current block is not encoded in skip mode, the pred_mode_flag_B can be signaled. Or, when the picture 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, the pred_mode_flag_B can be signaled. Or, when the picture type of the slice to which the current block belongs is not an I slice, the current block is 4×4, and the current block is not encoded in skip mode, the pred_mode_flag_B can be signaled. Or, the pred_mode_flag_B can be signaled only when at least one of the width or height of the current block is smaller than 64. The pred_mode_flag_B can be signaled only when the prediction type for the current block is not the second prediction type.
[0274] On the other hand, when the above conditions are not satisfied, the pred_mode_flag_B may not be signaled. In this case, the pred_mode_flag_B can be derived in the decoding apparatus based on at least one of the block size, prediction type, or picture type. For example, when the current block is 128×128, the pred_mode_flag_B can be derived as 0. Or, when the prediction type for the current block is the second prediction type, the pred_mode_flag_B can be derived as 0. Or, when the picture type of the slice to which the current block belongs is an I slice, the pred_mode_flag_B can be derived as 0 or 1, and otherwise, the pred_mode_flag_B can be derived as 0. Here, when the picture type of the slice to which the current block belongs is an I slice, the pred_mode_flag_B can be derived based on a flag indicating whether block matching is allowed. For example, the pred_mode_flag_B can be derived as the same value as the flag. The flag can be signaled in at least one of the video parameter set, sequence parameter set, picture parameter set, or slice header.
[0275] A prediction method for the current block can be selected based on at least one of the embodiments according to FIGS. 9 to 12. When the selected prediction method is intra prediction, the intra prediction according to FIG. 6 or FIG. 8 can be performed.
[0276] The exemplary method of the present disclosure is represented as a series of operations for the sake of clarity of explanation, but this is not for limiting the order in which the steps are performed, and each step may be performed simultaneously or in a different order if necessary. To implement the method according to the present disclosure, it may include other steps in addition to the illustrated steps, or include the remaining steps excluding some steps, or include additional other steps excluding some steps.
[0277] The various embodiments of the present disclosure are not intended to list all possible combinations, but rather to illustrate representative aspects of the present disclosure. The matters described in the various embodiments may be applied independently or in combination of two or more.
[0278] Also, the various embodiments of the present disclosure can be implemented by hardware, firmware, software, or a combination thereof. In the case of implementation by hardware, it can be implemented by 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 enable the operations of the various embodiments to be executed on a device or computer, and a non-transitory computer-readable medium on which such software or instructions are stored and executable on a device or computer.
Industrial Applicability
[0280] The present invention can be used for encoding / decoding video signals.
Claims
1. A step of obtaining a first flag from a bitstream; deriving an intra prediction mode for a current chrominance block based on a set of predetermined intra prediction mode candidates; performing intra prediction on a current block based on the intra prediction mode; The predetermined intra prediction mode candidate group is divided into a first group and a second group, the first group includes at least one inter-component prediction mode, and the second group includes at least one intra-prediction mode defined for a luminance component; an intra prediction mode of the current chrominance block is derived by selectively using one of the first group or the second group; an intra prediction mode of the current chrominance block is derived from one of the first group or the second group selected based on the first flag; If the value of the first flag is a first value, an intra prediction mode of the current chrominance block is derived from the first group based on first index information obtained from the bitstream; When the value of the first flag is a second value, an intra prediction mode of the current chrominance block is derived from the second group based on second index information obtained from the bitstream.
2. 2. The image decoding method of claim 1, wherein when the current block is predicted by an inter-component prediction mode in the first group, a reference region for deriving parameters of the inter-component prediction is determined by the availability of neighboring samples of the current block.
3. inducing a correlation between a chrominance component and a luminance component when an intra prediction mode of the current chrominance block is an inter-component prediction mode; The image decoding method of claim 1 , further comprising: performing inter-component prediction on the current chrominance block based on the correlation.
4. The image decoding method of claim 3 , wherein the step of deriving correlation comprises the step of deriving a downsampled luma sample using a plurality of luma samples.
5. determining an intra prediction mode of a current chrominance block, the intra prediction mode being coded based on a set of predetermined intra prediction mode candidates; performing intra prediction on a current block based on the intra prediction mode; determining a first flag; The predetermined intra prediction mode candidate group is divided into a first group and a second group, the first group includes at least one inter-component prediction mode, and the second group includes at least one intra-prediction mode defined for a luminance component; an intra prediction mode of the current chrominance block is derived by selectively using one of the first group or the second group; The first flag is determined based on whether an intra prediction mode of the current chrominance block is selected from the first group or the second group; When an intra prediction mode of the current chrominance block is selected from the first group, a value of the first flag is determined to be a first value, and first index information indicating which intra prediction mode in the first group is selected as the intra prediction mode of the current chrominance block is determined; An image encoding method, wherein when the intra prediction mode of the current chrominance block is selected from the second group, the value of the first flag is determined to a second value, and second index information indicating which intra prediction mode in the second group is selected as the intra prediction mode of the current chrominance block is determined.
6. 1. A method of transmitting a bitstream containing encoded image data, comprising: generating a bitstream by encoding an image according to an image encoding method; transmitting the bitstream; The image encoding method comprises: determining an intra prediction mode of a current chrominance block, the intra prediction mode being coded based on a set of predetermined intra prediction mode candidates; performing intra prediction on a current block based on the intra prediction mode; determining a first flag; The predetermined intra prediction mode candidate group is divided into a first group and a second group, the first group includes at least one inter-component prediction mode, and the second group includes at least one intra-prediction mode defined for a luminance component; an intra prediction mode of the current chrominance block is derived by selectively using one of the first group or the second group; The first flag is determined based on whether an intra prediction mode of the current chrominance block is selected from the first group or the second group; When an intra prediction mode of the current chrominance block is selected from the first group, a value of the first flag is determined to be a first value, and first index information indicating which intra prediction mode in the first group is selected as the intra prediction mode of the current chrominance block is determined; A transmission method in which, when the intra prediction mode of the current chrominance block is selected from the second group, the value of the first flag is determined to a second value, and second index information indicating which intra prediction mode in the second group is selected as the intra prediction mode of the current chrominance block is determined.
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
Variable number of intra modes for video coding
WO2018067714A1