WO2024091094A1 - Video encoding/decoding method and recording medium for storing bitstream - Google Patents

Video encoding/decoding method and recording medium for storing bitstream Download PDF

Info

Publication number
WO2024091094A1
WO2024091094A1 PCT/KR2023/017031 KR2023017031W WO2024091094A1 WO 2024091094 A1 WO2024091094 A1 WO 2024091094A1 KR 2023017031 W KR2023017031 W KR 2023017031W WO 2024091094 A1 WO2024091094 A1 WO 2024091094A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
intra prediction
chroma
luma
prediction
Prior art date
Application number
PCT/KR2023/017031
Other languages
French (fr)
Korean (ko)
Inventor
임성원
Original Assignee
주식회사 케이티
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020230145632A external-priority patent/KR20240062999A/en
Application filed by 주식회사 케이티 filed Critical 주식회사 케이티
Publication of WO2024091094A1 publication Critical patent/WO2024091094A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • This disclosure relates to a video signal processing method and device.
  • High-resolution, high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images
  • UHD Ultra High Definition
  • Video data becomes higher resolution and higher quality
  • the amount of data increases relative to existing video data. Therefore, when video data is transmitted using media such as existing wired or wireless broadband lines or stored using existing storage media, transmission costs and Storage costs increase.
  • High-efficiency video compression technologies can be used to solve these problems that arise as video data becomes higher resolution and higher quality.
  • Inter-screen prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture using video compression technology
  • intra-screen prediction technology that predicts pixel values included in the current picture using pixel information in the current picture
  • entropy coding technology which assigns short codes to values with a high frequency of occurrence and long codes to values with a low frequency of occurrence.
  • the purpose of the present disclosure is to provide a method and device for predicting a chroma block using a restored luma block when encoding/decoding a video signal.
  • the purpose of the present disclosure is to provide a method and device for predicting a chroma block based on the linearity of the luma component and the chroma component when encoding/decoding a video signal.
  • the purpose of the present disclosure is to provide a method and device for deriving encoding/decoding information for a chroma block from a co-located luma block when encoding/decoding a video signal.
  • An image encoding/decoding method includes dividing a chroma block into a plurality of partitions; And it may include performing intra prediction on each of the partitions in the chroma block.
  • the partition type of the chroma block may be determined based on at least one of the partition type or directionality of the luma block at the same location as the chroma block.
  • the partition type of the chroma block may be set to be the same as the partition type of the co-located luma block.
  • the plurality of partitions are generated by dividing the chroma block in a horizontal or vertical direction, and the division direction of the chroma block is the directionality of the co-located luma block. It can be decided based on .
  • the decoding order of the plurality of partitions in the chroma block may be determined based on the directionality of the co-located luma block.
  • the image decoding/encoding method according to the present disclosure may further include the step of determining whether to perform flipping on the chroma block. At this time, the flipping of the chroma block may be performed in at least one of the horizontal or vertical directions.
  • whether to perform the flipping and the direction in which the flipping is performed may be determined based on the directionality of the co-located luma block.
  • the flipping may be allowed only when the co-located luma block is encoded by intra prediction.
  • the intra prediction mode of each of the plurality of partitions in the chroma block may be set to be the same as the intra prediction mode of each of the plurality of partitions included in the co-located luma block. You can.
  • a predefined intra prediction mode is applied to a partition corresponding to an area with a large prediction error in the co-located luma block among the plurality of partitions in the chroma block, and otherwise, For partitions that do not exist, the intra prediction mode of the co-located luma block may be applied.
  • whether the sub-region in the co-located luma block is an area with a large prediction error can be determined by comparing the average value of the absolute value of residual samples in the sub-region with a threshold value.
  • the threshold value may be derived based on the average value of absolute values of residual samples within the co-located luma block.
  • the directionality of the co-located luma block is determined according to a result of intra prediction performed based on predefined intra prediction modes and reference samples around the co-located luma block. It can be determined based on the derived optimal intra prediction mode.
  • the directionality of the co-located luma block may be set to be the same as the directionality of the reference block including the co-located luma block.
  • a computer-readable recording medium that stores a bitstream encoded by the video encoding method according to the present disclosure may be provided.
  • encoding/decoding efficiency can be improved by predicting a chroma block using a restored luma block.
  • the accuracy of intra prediction can be improved by predicting a chroma block based on the linearity of the luma component and the chroma component.
  • compression efficiency for the chroma block can be improved by deriving the encoding/decoding information of the chroma block with reference to the co-located luma block.
  • FIG. 1 is a block diagram showing a video encoding device according to an embodiment of the present disclosure.
  • Figure 2 is a block diagram showing a video decoding device according to an embodiment of the present disclosure.
  • FIG. 3 illustrates an image encoding/decoding method performed by the image encoding/decoding device according to the present disclosure.
  • Figures 4 and 5 show an example of a plurality of intra prediction modes according to the present disclosure.
  • Figure 6 illustrates a planar mode-based intra prediction method according to the present disclosure.
  • Figure 7 shows a DC mode-based intra prediction method according to the present disclosure.
  • Figure 8 illustrates a directional mode-based intra prediction method according to the present disclosure.
  • Figure 9 shows a method for deriving samples of fractional positions.
  • Figures 10 and 11 show that the tangent value for the angle is scaled by 32 times for each intra prediction mode.
  • Figure 12 is a diagram illustrating an intra prediction aspect when the directional mode is one of modes 34 to 49.
  • Figure 13 is a diagram for explaining an example of generating an upper reference sample by interpolating left reference samples.
  • Figure 14 shows an example in which intra prediction is performed using reference samples arranged in a 1D array.
  • Figure 15 is a diagram for explaining the encoding/decoding order when a single tree structure is used.
  • Figure 16 is a diagram for explaining the encoding/decoding order when a dual tree structure is used.
  • Figure 17 is a flowchart showing a method of predicting a chroma block using a restored luma block.
  • Figures 18 to 20 show examples of down-sampling a luma block.
  • FIG. 21 is a diagram for explaining an example of a location where down sampling is applied.
  • Figures 22 and 23 are diagrams for explaining an example of determining the division structure of a chroma block with reference to a co-located luma block in a dual tree structure.
  • Figure 24 shows an example in which encoding/decoding information for a chroma block is determined based on the directionality of luma samples.
  • Figure 25 shows an example of using restored samples in the same location luma block as reference samples.
  • Figure 26 shows an example in which intra prediction modes are classified into a plurality of groups.
  • Figures 27 and 28 show the scan order for each sub-block in the chroma block according to the direction of the co-located luma block.
  • Figure 29 shows an example in which flipping is performed on samples within a chroma block.
  • Figure 30 shows an example of determining whether or not an area has a large prediction error on a sub-block basis within the same location luma block.
  • first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another.
  • a first component may be named a second component without departing from the scope of the present invention, and similarly, the second component may also be named a first component.
  • the term and/or includes any of a plurality of related stated items or a combination of a plurality of related stated items.
  • Figure 1 is a block diagram showing a video encoding device according to an embodiment of the present invention.
  • the image encoding device 100 includes a picture segmentation unit 110, prediction units 120 and 125, a transformation unit 130, a quantization unit 135, a rearrangement unit 160, and an entropy encoding unit ( 165), an inverse quantization unit 140, an inverse transform unit 145, a filter unit 150, and a memory 155.
  • each component shown in FIG. 1 is shown independently to represent different characteristic functions in the video encoding device, and does not mean that each component is comprised of separate hardware or one software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two of each component can be combined to form one component, or one component can be divided into a plurality of components to perform a function, and each of these components can perform a function. Integrated embodiments and separate embodiments of the constituent parts are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.
  • some components may not be essential components that perform essential functions in the present invention, but may simply be optional components to improve performance.
  • the present invention can be implemented by including only essential components for implementing the essence of the present invention excluding components used only to improve performance, and a structure including only essential components excluding optional components used only to improve performance. is also included in the scope of rights of the present invention.
  • the picture division unit 110 may divide the input picture into at least one processing unit.
  • the processing unit may be a prediction unit (PU), a transformation unit (TU), or a coding unit (CU).
  • the picture division unit 110 divides one picture into a combination of a plurality of coding units, prediction units, and transformation units, and combines one coding unit, prediction unit, and transformation unit based on a predetermined standard (for example, a cost function). You can encode the picture by selecting .
  • one picture may be divided into a plurality of coding units.
  • a recursive tree structure such as the Quad Tree Structure can be used. Coding is split into other coding units with one image or the largest coding unit as the root.
  • a unit can be divided into child nodes equal to the number of divided coding units.
  • a coding unit that is no longer divided according to certain restrictions becomes a leaf node. That is, assuming that only square division is possible for one coding unit, one coding unit can be divided into up to four different coding units.
  • the coding unit may be used to mean a unit that performs encoding, or may be used to mean a unit that performs decoding.
  • a prediction unit may be divided into at least one square or rectangular shape of the same size within one coding unit, and any one of the prediction units divided within one coding unit may be a prediction unit of another prediction unit. It may be divided to have a different shape and/or size than the unit.
  • intra prediction can be performed without dividing the prediction unit into a plurality of prediction units NxN.
  • the prediction units 120 and 125 may include an inter prediction unit 120 that performs inter prediction and an intra prediction unit 125 that performs intra prediction. It is possible to determine whether to use inter prediction or intra prediction for a prediction unit, and determine specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. At this time, the processing unit in which the prediction is performed and the processing unit in which the prediction method and specific contents are determined may be different. For example, the prediction method and prediction mode are determined in prediction units, and prediction may be performed in transformation units. The residual value (residual block) between the generated prediction block and the original block may be input to the conversion unit 130. Additionally, prediction mode information, motion vector information, etc.
  • the entropy encoder 165 may be encoded in the entropy encoder 165 together with the residual value and transmitted to the decoding device.
  • the inter prediction unit 120 may predict a prediction unit based on information on at least one picture among the pictures before or after the current picture, and in some cases, prediction based on information on a partially encoded region within the current picture. Units can also be predicted.
  • the inter prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
  • the reference picture interpolation unit may receive reference picture information from the memory 155 and generate pixel information of an integer number of pixels or less from the reference picture.
  • a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of an integer pixel or less in 1/4 pixel units.
  • a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information of an integer pixel or less in 1/8 pixel units.
  • the motion prediction unit may perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit.
  • Various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm), can be used to calculate the motion vector.
  • the motion vector may have a motion vector value in units of 1/2 or 1/4 pixels based on the interpolated pixels.
  • the motion prediction unit can predict the current prediction unit by using a different motion prediction method.
  • various methods such as the skip method, the merge method, the Advanced Motion Vector Prediction (AMVP) method, and the intra block copy method can be used.
  • AMVP Advanced Motion Vector Prediction
  • the intra prediction unit 125 may generate a prediction unit based on reference pixel information around the current block, which is pixel information in the current picture. If the neighboring block of the current prediction unit is a block on which inter prediction has been performed and the reference pixel is a pixel on which inter prediction has been performed, the reference pixel included in the block on which inter prediction has been performed is the reference pixel of the block on which intra prediction has been performed. It can be used in place of information. That is, when a reference pixel is not available, the unavailable reference pixel information can be replaced with at least one reference pixel among available reference pixels.
  • the prediction mode can include a directional prediction mode that uses reference pixel information according to the prediction direction and a non-directional mode that does not use directional information when performing prediction.
  • the mode for predicting luminance information and the mode for predicting chrominance information may be different, and intra prediction mode information used to predict luminance information or predicted luminance signal information may be used to predict chrominance information.
  • intra prediction when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit is made based on the pixel on the left, the pixel on the top left, and the pixel on the top of the prediction unit. can be performed. However, when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are different, intra prediction can be performed using a reference pixel based on the transformation unit. Additionally, intra prediction using NxN partitioning can be used only for the minimum coding unit.
  • the intra prediction method can generate a prediction block after applying an Adaptive Intra Smoothing (AIS) filter to the reference pixel according to the prediction mode.
  • AIS Adaptive Intra Smoothing
  • the type of AIS filter applied to the reference pixel may be different.
  • the intra prediction mode of the current prediction unit can be predicted from the intra prediction mode of prediction units existing around the current prediction unit.
  • predetermined flag information is used to predict the current prediction unit and neighboring prediction units.
  • Information that the prediction modes of are the same can be transmitted, and if the prediction modes of the current prediction unit and neighboring prediction units are different, entropy encoding can be performed to encode the prediction mode information of the current block.
  • a residual block may be generated that includes residual information that is the difference between the prediction unit on which prediction was performed based on the prediction unit generated by the prediction units 120 and 125 and the original block of the prediction unit.
  • the generated residual block may be input to the conversion unit 130.
  • the transform unit 130 transforms the residual block, including the original block and the residual value information of the prediction unit generated through the prediction units 120 and 125, into DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT and It can be converted using the same conversion method. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on intra prediction mode information of the prediction unit used to generate the residual block.
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • KLT Discrete Sine Transform
  • the quantization unit 135 may quantize the values converted to the frequency domain by the conversion unit 130.
  • the quantization coefficient may change depending on the block or the importance of the image.
  • the value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the realignment unit 160.
  • the rearrangement unit 160 may rearrange coefficient values for the quantized residual values.
  • the rearrangement unit 160 can change the coefficients in a two-dimensional block form into a one-dimensional vector form through a coefficient scanning method.
  • the realignment unit 160 can scan from DC coefficients to coefficients in the high frequency region using a zig-zag scan method and change it into a one-dimensional vector form.
  • a vertical scan that scans the two-dimensional block-type coefficients in the column direction or a horizontal scan that scans the two-dimensional block-type coefficients in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, it can be determined which scan method among zig-zag scan, vertical scan, and horizontal scan will be used.
  • the entropy encoding unit 165 may perform entropy encoding based on the values calculated by the reordering unit 160.
  • Entropy coding can use various coding methods, such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
  • the entropy encoding unit 165 receives coding unit residual value coefficient information, block type information, prediction mode information, division unit information, prediction unit information and transmission unit information, and motion information from the reordering unit 160 and prediction units 120 and 125.
  • Various information such as vector information, reference frame information, block interpolation information, and filtering information can be encoded.
  • the entropy encoding unit 165 may entropy encode the coefficient value of the coding unit input from the reordering unit 160.
  • the inverse quantization unit 140 and the inverse transformation unit 145 inversely quantize the values quantized in the quantization unit 135 and inversely transform the values transformed in the transformation unit 130.
  • the residual value generated in the inverse quantization unit 140 and the inverse transform unit 145 is restored by combining prediction units predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction units 120 and 125. You can create a block (Reconstructed Block).
  • the filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • a deblocking filter may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • ALF adaptive loop filter
  • the deblocking filter can remove block distortion caused by boundaries between blocks in the restored picture. To determine whether to perform deblocking, it is possible to determine whether to apply a deblocking filter to the current block based on the pixels included in several columns or rows included in the block. When applying a deblocking filter to a block, a strong filter or a weak filter can be applied depending on the required deblocking filtering strength. Additionally, when applying a deblocking filter, horizontal filtering and vertical filtering can be processed in parallel when vertical filtering and horizontal filtering are performed.
  • the offset correction unit may correct the offset of the deblocked image from the original image in pixel units.
  • the pixels included in the image are divided into a certain number of areas, then the area to perform offset is determined and the offset is applied to that area, or the offset is performed by considering the edge information of each pixel. You can use the method of applying .
  • Adaptive Loop Filtering can be performed based on a comparison between the filtered restored image and the original image. After dividing the pixels included in the image into predetermined groups, filtering can be performed differentially for each group by determining one filter to be applied to that group. Information related to whether to apply ALF may be transmitted for each coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied may vary for each block. Additionally, an ALF filter of the same type (fixed type) may be applied regardless of the characteristics of the block to which it is applied.
  • ALF Adaptive Loop Filtering
  • the memory 155 may store a reconstructed block or picture calculated through the filter unit 150, and the stored reconstructed block or picture may be provided to the prediction units 120 and 125 when inter prediction is performed.
  • FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present invention.
  • the image decoding device 200 includes an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, 235, and a filter unit ( 240) and memory 245 may be included.
  • the input bitstream can be decoded in a procedure opposite to that of the video encoding device.
  • the entropy decoding unit 210 may perform entropy decoding in a procedure opposite to that of performing entropy encoding in the entropy encoding unit of the video encoding device. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) may be applied in response to the method performed in the image encoding device.
  • various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) may be applied in response to the method performed in the image encoding device.
  • the entropy decoder 210 can decode information related to intra prediction and inter prediction performed by the encoding device.
  • the rearrangement unit 215 may rearrange the bitstream entropy-decoded by the entropy decoder 210 based on the method in which the encoder rearranges the bitstream. Coefficients expressed in the form of a one-dimensional vector can be restored and rearranged as coefficients in the form of a two-dimensional block.
  • the reordering unit 215 may receive information related to coefficient scanning performed by the encoder and perform reordering by reverse scanning based on the scanning order performed by the encoder.
  • the inverse quantization unit 220 may perform inverse quantization based on the quantization parameters provided by the encoding device and the coefficient values of the rearranged blocks.
  • the inverse transform unit 225 may perform inverse transform, that is, inverse DCT, inverse DST, and inverse KLT, on the transform performed by the transformer, that is, DCT, DST, and KLT, on the quantization result performed by the image encoding device. Inverse transformation may be performed based on the transmission unit determined by the video encoding device.
  • the inverse transform unit 225 of the video decoding device may selectively perform a transformation technique (eg, DCT, DST, KLT) according to a plurality of information such as a prediction method, the size of the current block, and the prediction direction.
  • a transformation technique eg, DCT, DST, KLT
  • the prediction units 230 and 235 may generate a prediction block based on prediction block generation-related information provided by the entropy decoder 210 and previously decoded block or picture information provided by the memory 245.
  • Intra prediction of the prediction unit is performed based on existing pixels, but when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are different, intra prediction is performed using a reference pixel based on the transformation unit. can do. Additionally, intra prediction using NxN partitioning only for the minimum coding unit can be used.
  • the prediction units 230 and 235 may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit.
  • the prediction unit discriminator receives various information such as prediction unit information input from the entropy decoder 210, prediction mode information of the intra prediction method, and motion prediction-related information of the inter prediction method, distinguishes the prediction unit from the current coding unit, and makes predictions. It is possible to determine whether a unit performs inter-prediction or intra-prediction.
  • the inter prediction unit 230 uses the information required for inter prediction of the current prediction unit provided by the video encoding device to determine the current prediction unit based on the information included in at least one of the pictures before or after the current picture including the current prediction unit. Inter prediction can be performed on prediction units. Alternatively, inter prediction may be performed based on information on a pre-restored partial region within the current picture including the current prediction unit.
  • the motion prediction method of the prediction unit included in the coding unit is Skip Mode, Merge Mode, AMVP Mode, and Intra Block Copy Mode. You can judge whether it is a certain method or not.
  • the intra prediction unit 235 may generate a prediction block based on pixel information in the current picture. If the prediction unit is a prediction unit that has performed intra prediction, intra prediction may be performed based on intra prediction mode information of the prediction unit provided by the video encoding device.
  • the intra prediction unit 235 may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter.
  • AIS filter is a part that performs filtering on the reference pixels of the current block, and can be applied by determining whether or not to apply the filter according to the prediction mode of the current prediction unit.
  • AIS filtering can be performed on the reference pixel of the current block using the prediction mode and AIS filter information of the prediction unit provided by the video encoding device. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
  • the reference pixel interpolator may interpolate the reference pixel to generate a reference pixel in pixel units of an integer value or less. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated.
  • the DC filter can generate a prediction block through filtering when the prediction mode of the current block is DC mode.
  • the restored block or picture may be provided to the filter unit 240.
  • the filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
  • the deblocking filter of the video decoding device receives information related to the deblocking filter provided by the video encoding device, and the video decoding device can perform deblocking filtering on the corresponding block.
  • the offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding and offset value information.
  • ALF can be applied to the coding unit based on ALF application availability information, ALF coefficient information, etc. provided from the coding device. This ALF information may be included and provided in a specific parameter set.
  • 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 an output unit.
  • the term coding unit is used as a coding unit for convenience of explanation, but it may also be a unit that performs not only encoding but also decoding.
  • the current block represents an encoding/decoding target block and, depending on the encoding/decoding stage, is a coding tree block (or coding tree unit), a coding block (or coding unit), a transform block (or transform unit), or a prediction block. (or prediction unit), etc.
  • 'unit' may represent a basic unit for performing a specific encoding/decoding process
  • 'block' may represent a pixel array of a predetermined size.
  • ‘block’ and ‘unit’ can be used with the same meaning.
  • a coding block (coding block) and a coding unit (coding unit) may be understood to have equivalent meanings.
  • FIG. 3 illustrates an image encoding/decoding method performed by the image encoding/decoding device according to the present disclosure.
  • a reference line for intra prediction of the current block can be determined (S300).
  • the current block may use one or more of a plurality of reference line candidates pre-defined in the video encoding/decoding device as a reference line for intra prediction.
  • the plurality of pre-defined reference line candidates may include a neighboring reference line adjacent to the current block to be decoded and N non-neighboring reference lines that are 1-sample to N-sample away from the boundary of the current block.
  • N may be an integer of 1, 2, 3, or more.
  • the plurality of reference line candidates available for the current block consists of a neighboring reference line candidate and three non-neighboring reference line candidates, but is not limited thereto. That is, of course, the plurality of reference line candidates available for the current block may include four or more non-neighboring reference line candidates.
  • the video encoding device can determine an optimal reference line candidate among a plurality of reference line candidates and encode an index for specifying it.
  • the video decoding device can determine the reference line of the current block based on the index signaled through the bitstream.
  • the index may specify one of a plurality of reference line candidates.
  • the reference line candidate specified by the index can be used as the reference line of the current block.
  • the number of indices signaled to determine the reference line of the current block may be 1, 2, or more.
  • the current block may perform intra prediction using only a single reference line candidate specified by the signaled index among a plurality of reference line candidates.
  • the current block may perform intra prediction using a plurality of reference line candidates specified by a plurality of indices among a plurality of reference line candidates.
  • the intra prediction mode of the current block can be determined (S310).
  • the intra prediction mode of the current block may be determined from a plurality of intra prediction modes predefined in the video encoding/decoding device.
  • the plurality of pre-defined intra prediction modes will be examined with reference to FIGS. 4 and 5.
  • Figure 4 shows an example of a plurality of intra prediction modes according to the present disclosure.
  • a plurality of intra prediction modes pre-defined in the video encoding/decoding device may be comprised of a non-directional mode and a directional mode.
  • the non-directional mode may include at least one of planar mode or DC mode.
  • the directional mode may include directional modes numbered 2 to 66.
  • the directional mode may be expanded further than shown in FIG. 4.
  • Figure 5 shows an example in which the directional mode is expanded.
  • modes -1 to -14 and modes 67 to 80 are illustrated as being added. These directional modes may be referred to as wide angle intra prediction modes. Whether to use the wide angle intra prediction mode can be determined depending on the type of the current block. For example, if the current block is a non-square block with a width greater than the height, some directional modes (eg, 2 to 15) may be converted to wide angle intra prediction modes 67 to 80. On the other hand, if the current block is a non-square block with a height greater than the width, some directional modes (e.g., numbers 53 to 66) may be converted to wide angle intra prediction modes between -1 and -14. there is.
  • some directional modes e.g., numbers 53 to 66
  • the range of available wide-angle intra prediction modes can be adaptively determined depending on the width-to-height ratio of the current block.
  • Table 1 shows the range of available wide-angle intra prediction modes according to the width and height ratio of the current block.
  • K candidate modes (most probable mode, MPM) can be selected.
  • a candidate list including the selected candidate mode may be created.
  • An index indicating one of the candidate modes belonging to the candidate list may be signaled.
  • the intra prediction mode of the current block may be determined based on the candidate mode indicated by the index.
  • the candidate mode indicated by the index may be set as the intra prediction mode of the current block.
  • the intra prediction mode of the current block may be determined based on the value of the candidate mode indicated by the index and a predetermined difference value.
  • the difference value may be defined as the difference between the value of the intra prediction mode of the current block and the value of the candidate mode indicated by the index.
  • the difference value may be signaled through a bitstream.
  • the difference value may be a value pre-defined in the video encoding/decoding device.
  • the intra prediction mode of the current block may be a flag indicating whether a mode identical to the intra prediction mode of the current block exists in the candidate list. It can be decided based on . For example, when the flag is the first value, the intra prediction mode of the current block may be determined from the candidate list. In this case, an index indicating one of a plurality of candidate modes belonging to the candidate list may be signaled. The candidate mode indicated by the index may be set as the intra prediction mode of the current block. On the other hand, when the flag is the second value, one of the remaining intra prediction modes may be set as the intra prediction mode of the current block.
  • the remaining intra prediction modes may refer to modes excluding candidate modes belonging to the candidate list among a plurality of pre-defined intra prediction modes.
  • an index indicating one of the remaining intra prediction modes may be signaled.
  • the intra prediction mode indicated by the signaled index may be set as the intra prediction mode of the current block.
  • the intra prediction mode of the chroma block may be selected from among the intra prediction mode candidates of a plurality of chroma blocks. To this end, index information indicating one of the intra prediction mode candidates of the chroma block can be explicitly encoded and signaled through a bitstream. Table 2 illustrates intra prediction mode candidates for chroma block.
  • Luma Mode 0 Luma mode: 50 Luma Mode: 18 Luma Mode: 1 etc 0 66 0 0 0 0 One 50 66 50 50 50 2 18 18 66 18 18 3 One One One 66 One 4 DM
  • Direct Mode means setting the intra prediction mode of the luma block existing at the same location as the chroma block to the intra prediction mode of the chroma block.
  • a luma block that exists at the same location as a chroma block may be determined based on the location of the upper left sample or the center sample of the chroma block. For example, if the intra prediction mode (luma mode) of the luma block is number 0 (flat mode) and the index points to number 2, the intra prediction mode of the chroma block may be determined to be the horizontal mode (number 18). For example, if the intra prediction mode (luma mode) of the luma block is number 1 (DC mode) and the index indicates number 0, the intra prediction mode of the chroma block may be determined as planar mode (number 0).
  • the intra prediction mode of the chroma block can also be set to one of the intra prediction modes shown in FIG. 4 or FIG. 5.
  • the intra prediction mode of the current block may be used to determine the reference line of the current block, in which case step S310 may be performed before step S300.
  • intra prediction may be performed on the current block based on the reference line and intra prediction mode of the current block (S320).
  • Figure 6 illustrates a planar mode-based intra prediction method according to the present disclosure.
  • T represents a reference sample located at the upper right corner of the current block
  • L represents a reference sample located at the lower left corner of the current block.
  • P1 can be generated through horizontal interpolation.
  • P1 can be generated by interpolating T with a reference sample located on the same horizontal line as P1.
  • P2 can be generated through interpolation in the vertical direction.
  • P2 can be generated by interpolating L with a reference sample located on the same vertical line as P2.
  • the current sample in the current block can be predicted through the weighted sum of P1 and P2, as shown in Equation 1 below.
  • the weights ⁇ and ⁇ can be determined considering the width and height of the current block. Depending on the width and height of the current block, weights ⁇ and ⁇ may have the same value or different values. If the width and height of the current block are the same, the weights ⁇ and ⁇ can be set to be the same, and the prediction sample of the current sample can be set to the average value of P1 and P2. If the width and height of the current block are not the same, the weights ⁇ and ⁇ may have different values. For example, if the width is greater than the height, a smaller value can be set to the weight corresponding to the width of the current block, and a larger value can be set to the weight corresponding to the height of the current block.
  • the weight corresponding to the width of the current block may mean ⁇
  • the weight corresponding to the height of the current block may mean ⁇ .
  • Figure 7 shows a DC mode-based intra prediction method according to the present disclosure.
  • the average value of neighboring samples adjacent to the current block can be calculated, and the calculated average value can be set as the predicted value of all samples in the current block.
  • the surrounding samples may include the top reference sample and the left reference sample of the current block.
  • the average value may be calculated using only the top reference sample or the left reference sample. For example, if the width of the current block is greater than the height, the average value can be calculated using only the top reference sample of the current block. Alternatively, if the ratio of the width and height of the current block is greater than or equal to a predetermined threshold, the average value can be calculated using only the top reference sample of the current block.
  • the average value can be calculated using only the upper reference sample of the current block.
  • the width of the current block is smaller than the height, the average value can be calculated using only the left reference sample of the current block.
  • the ratio of the width and height of the current block is less than or equal to a predetermined threshold, the average value can be calculated using only the left reference sample of the current block.
  • the ratio of the width and height of the current block is greater than or equal to a predetermined threshold, the average value can be calculated using only the left reference sample of the current block.
  • Figure 8 illustrates a directional mode-based intra prediction method according to the present disclosure.
  • the intra prediction mode of the current block is a directional mode
  • projection can be performed to a reference line according to the angle of the directional mode.
  • the reference sample can be set as the prediction sample of the current sample.
  • a sample corresponding to the projected position may be generated using one or more surrounding samples adjacent to the projected position. As an example, interpolation may be performed based on two or more neighboring samples in both directions based on the projected position, thereby generating a sample corresponding to the projected position.
  • one surrounding sample adjacent to the projected position can be set as the sample corresponding to the projected position. At this time, among a plurality of neighboring samples adjacent to the projected position, the neighboring sample closest to the projected position may be used.
  • the sample corresponding to the projected position can be set as the predicted sample of the current sample.
  • a reference sample exists at the projected position (i.e., a reference sample at an integer position, R3 ).
  • the reference sample of the projected position can be set as the predicted sample of the current sample B.
  • the reference sample A when projection is performed from that position to the reference line according to the angle of the intra prediction mode, there is no reference sample (i.e., reference sample at the integer position) at the projected position.
  • interpolation may be performed based on surrounding samples (e.g., R2 and R3) neighboring the projected position to generate a sample (r) of the fractional position.
  • the sample (r) at the generated fractional position can be set as the predicted sample of the current sample A.
  • Figure 9 shows a method for deriving samples of fractional positions.
  • variable h refers to the vertical distance (i.e., vertical distance) from the position of the predicted sample A to the reference sample line
  • variable w refers to the horizontal distance from the position of the predicted sample A to the fractional position sample. (i.e., horizontal distance).
  • variable ⁇ refers to an angle predefined according to the directionality of the intra prediction mode
  • variable x refers to the fractional position.
  • variable w can be derived as in Equation 2 below.
  • Fractional position samples can be generated by interpolating adjacent integer position reference samples.
  • the integer position reference sample R2 and the integer position reference sample R3 may be interpolated to generate a fractional position reference sample at the x position.
  • a scaling factor can be used to avoid real numbers.
  • the scaling factor f is set to 32
  • the distance between neighboring integer reference samples may be set to 32 instead of 1, as in the example shown in (b) of FIG. 8.
  • the tangent value for the angle ⁇ determined according to the directionality of the intra prediction mode can also be scaled up using the same scaling factor (eg, 32).
  • Figures 10 and 11 show that the tangent value for the angle is scaled by 32 times for each intra prediction mode.
  • FIG. 10 shows the scaled results of tangent values for the non-wide angle intra prediction mode
  • FIG. 11 shows the scaled results of the tangent values for the wide angle intra prediction mode.
  • tangent value (tan ⁇ ) to the angle value in intra prediction mode is positive, reference samples belonging to the top line of the current block (i.e., top reference samples) or reference samples belonging to the left line of the current block (i.e., left Intra prediction can be performed using only one of the reference samples. Meanwhile, when the tangent value for the angle value of the intra prediction mode is negative, both the reference samples located at the top and the reference samples located on the left are used.
  • the left reference samples are projected upward, or the upper reference samples are projected to the left, the reference samples are arranged in a 1D array, and intra prediction is performed using the reference samples in the 1D array. You may.
  • Figure 12 is a diagram illustrating an intra prediction aspect when the directional mode is one of modes 34 to 49.
  • intra prediction mode of the current block is one of modes 34 to 49
  • intra prediction is performed using not only the top reference samples of the current block but also the left reference samples.
  • the reference sample located on the left of the current block can be copied to the position of the top line, or the reference samples located on the left can be interpolated to generate the reference sample of the top line.
  • projection can be performed from the A position on the top line to the left line of the current block.
  • the projected position is called a
  • the value corresponding to the position a can be copied, or a fractional position value corresponding to a can be created and set as the value of the A position.
  • the position a is an integer position
  • the value of the position A can be generated by copying the integer position reference sample.
  • the reference sample located above the a position and the reference sample located below the a position can be interpolated, and the interpolated value can be set as the value of the A position.
  • the direction projected to the left line of the current block may be parallel to and opposite to the direction of the intra prediction mode of the current block.
  • Figure 13 is a diagram for explaining an example of generating an upper reference sample by interpolating left reference samples.
  • variable h represents the horizontal distance between the position A on the top line and the position A on the left line.
  • variable w represents the vertical distance between the position A on the top line and the position A on the left line.
  • variable ⁇ refers to an angle predefined according to the directionality of the intra prediction mode, and the variable x refers to the fractional position.
  • variable h can be derived as in Equation 3 below.
  • a scaling factor can be used to avoid real numbers.
  • the tangent value for variable ⁇ can be scaled using the scaling factor f1.
  • the scaled tangent value shown in FIGS. 10 and 11 may be used.
  • Equation 3 When the scaling factor f1 is applied, Equation 3 can be modified and used as shown in Equation 4 below.
  • a 1D reference sample array can be constructed only with reference samples belonging to the top line.
  • intra prediction for the current block can be performed using only the upper reference samples composed of a 1D array.
  • Figure 14 shows an example in which intra prediction is performed using reference samples arranged in a 1D array.
  • prediction samples of the current block can be obtained using only reference samples belonging to the top line.
  • the top reference sample may be projected onto the left line to form a 1D reference sample array using only reference samples belonging to the left line.
  • reference samples belonging to the top line are projected to the left line to generate a left reference sample.
  • pictures can be encoded/decoded in block units.
  • a picture may be divided into blocks of a predetermined size.
  • a block of a predetermined size may be called a coding tree block (Coding Tree Block, or coding tree unit) or a reference block.
  • Information indicating the size of the reference block may be signaled through a bitstream.
  • information indicating the size of a coding tree block may be encoded through a sequence parameter set or a picture header.
  • blocks of various sizes may be added to the standard block based on at least one of the tree structures predefined within the standard block. Then, encoding/decoding processing such as prediction, transformation, quantization, and/or entropy coding may be performed on each divided block. Each of the divided blocks may be a coding block, prediction block, or transform block.
  • the luma picture and the chroma picture are encoded/decoded respectively.
  • chroma pictures generally have similar characteristics to luma pictures. That is, the characteristics of chroma samples within a chroma picture tend to be similar to the characteristics of luma samples at the same location within a luma picture.
  • the division structure for the standard block can be independently determined for only one standard component among the color components, and the tree structure determined in the existing component can be applied in the same way to other components. In this way, a division structure in which the tree division structure of the standard component is directly applied to other components may be called a single tree structure.
  • the reference component is a luma component. That is, it is assumed that the tree division structure is independently applied to the luma component, while the tree division structure of the luma component is applied as is to the chroma component.
  • Information about the tree division structure in the reference component may be explicitly encoded and signaled.
  • tree partition structure information about the luma reference block may be encoded and signaled.
  • the encoding/decoding of the tree division structure information is omitted, and the tree division structure information in the luma reference block can be used in the same way.
  • Figure 15 is a diagram for explaining the encoding/decoding order when a single tree structure is used.
  • the tree division structure for the luma reference block can be directly applied to the chroma reference block. Accordingly, the division form for the chroma reference block is the same as the division form for the luma reference block.
  • encoding/decoding may be performed in an alternate order of luma components and chroma components.
  • numbers written in each leaf node block indicate the encoding/decoding order.
  • a division structure in which the tree structure for each color component is independently determined can be called a dual tree structure.
  • tree partition structure information for the luma component and tree partition structure information for the chroma component may be independently encoded and signaled.
  • Figure 16 is a diagram for explaining the encoding/decoding order when a dual tree structure is used.
  • encoding/decoding of the chroma component picture may be performed.
  • the encoding/decoding order between components can be set on a reference block basis.
  • encoding/decoding for the luma component reference block is completed, encoding/decoding for the chroma component reference block is performed. can be performed.
  • the numbers written within the block indicate the encoding/decoding order.
  • the reference block of the luma component is encoded/decoded before the reference block of the chroma component.
  • Prediction of the chroma block can be performed using the restored luma block.
  • the above prediction model using different color components may be called a Cross Component Linear Model (CCLM).
  • CCLM Cross Component Linear Model
  • the process of deriving the intra prediction mode of the chroma block based on the intra prediction mode of the luma block can be omitted.
  • Figure 17 is a flowchart showing a method of predicting a chroma block using a restored luma block.
  • prediction parameters can be derived (S1710).
  • prediction parameters may be derived in different ways depending on the video format of the picture.
  • the video format indicates the chroma subsampling rate and can be determined as one of 4:4:4, 4:2:2, or 4:2:0.
  • the luma block is downsampled and adjusted to match the size of the chroma block.
  • Figures 18 to 20 show examples of down-sampling a luma block.
  • the size of the chroma block corresponding to the 4x4 luma block is 2x2.
  • a 4x4 luma block can be reduced to a 2x2 size by applying a down-sampling filter to the luma block.
  • the following equation 5 shows the application aspect of the down-sampling filter.
  • Downsampled_Luma refers to the sample value within the down-sampled luma block
  • Luma refers to the value of the luma sample before down-sampling.
  • Luma[0][0] may indicate the location of the upper left sample in the luma block before downsampling. Since the size of the down-sampled luma block is 2x2, the variables w and h representing the coordinates of the sample can each have values in the range from 0 to 1.
  • the value of the down-sampled luma sample can be obtained by applying a cross-shaped down-sampling filter to the luma samples.
  • the value of the down-sampled luma sample at the (0, 0) position is the luma sample at the (0, 0) position, the top luma sample at the (0, 0) position, and the left luma sample at the (0, 0) position. It can be obtained by applying a down-sampling filter to the luma sample, the bottom luma sample at the (0, 0) position, and the right luma sample at the (0, 0) position.
  • a down-sampling filter of a different type from that shown in FIG. 19 may be applied.
  • a down-sampled luma sample can be obtained by applying a 1D filter, a rectangular or square filter.
  • 1D filters can be 1x3 or 3x1 in size
  • rectangular filters can be 2x3 or 3x2 in size
  • square filters can be 2x2 or 3x2 in size.
  • the type of filter may be predefined in the encoder and decoder.
  • the shape of the filter may be adaptively determined based on at least one of the size/shape of the current block, the intra prediction mode applied to the luma block, whether the position of the chroma sample matches the position of the luma sample, or the image format. .
  • information indicating one of a plurality of filter candidates may be encoded and signaled.
  • the filter type may be different depending on the down sampling location. For example, a 1D filter or a rectangular filter may be applied to luma samples located at the border of a luma block, while a cross-shaped filter may be applied to luma samples not located at the border of the luma block.
  • a down-sampling filter can be applied to a location where both the x-axis coordinate and the y-axis coordinate are even numbers.
  • the application position of the down-sampling filter may be set differently from that shown in FIG. 19.
  • Figure 20 shows various examples of application positions of the down-sampling filter.
  • one of the plurality of candidates may be selected.
  • the examples in (a) to (d) of FIG. 20 may be defined as a plurality of candidates, and then index information indicating one of the plurality of examples may be encoded and signaled.
  • one of a plurality of candidates may be selected based on whether the location of the chroma sample matches the location of the luma sample.
  • a down-sampling filter can also be applied to reference samples around the luma block.
  • the reference sample may represent a previously restored sample.
  • a down-sampling filter may be applied to at least one of the top reference area adjacent to the top of the luma block or the left reference area adjacent to the left, to obtain a down-sampled luma reference sample.
  • the same number of down-sampled luma reference samples as the number of reference samples included in the reference area of the chroma block can be obtained.
  • the reference area of the luma block may be referred to as a luma reference area
  • the reference area of the chroma block may be referred to as a chroma reference area
  • the inter-component prediction mode can be divided into a top inter-component prediction mode, a left inter-component prediction mode, and a top and left inter-component prediction mode, depending on the configuration of the reference area.
  • the top inter-component prediction mode is selected, the reference area of each luma block and chroma block consists of only the top reference area.
  • the left inter-component prediction mode is selected, the reference area of each luma block and chroma block consists of only the left reference area.
  • the reference areas of each luma block and chroma block may be composed of a top reference area and a left reference area.
  • Information indicating which of the top inter-component prediction mode, left inter-component prediction mode, and top and left component prediction mode has been applied to the current block may be explicitly encoded and signaled.
  • index information indicating the type of inter-component prediction mode may be encoded and signaled.
  • a top inter-component prediction mode based on at least one of the size/shape of the current block, whether the current block borders a CTU or picture boundary, or an intra prediction mode applied to the luma block, a top inter-component prediction mode, a left inter-component prediction mode, and a top and left One of the inter-component prediction modes may be selected.
  • each luma block and chroma block include an upper reference area and a left reference area.
  • the type of down-sampling filter applied to the reference area of the luma block may be the same as the down-sampling filter applied to the luma block.
  • the type of down-sampling filter applied to the reference area of the luma block may be different from the down-sampling filter applied to the luma block.
  • the form of the down-sampling filter applied to the upper reference area of the luma block may be different from the form of the down-sampling filter applied to the left reference area of the luma block.
  • the location where down sampling is applied within the reference area may be predefined in the encoder and decoder.
  • the decoder may independently determine the location in the reference region where down sampling is applied in the same way as the encoder.
  • FIG. 21 is a diagram for explaining an example of a location where down sampling is applied.
  • a 1x1 chroma block corresponds to a 2x2 luma block. Accordingly, a down-sampling filter can be applied to one position among the four luma reference samples to derive a down-sampled luma reference sample corresponding to the chroma reference sample.
  • the cost for a specific location is the sum of the difference between the down-sampled luma reference sample obtained by applying a down-sampling filter centered on that location and the chroma reference sample corresponding to that location, or the sum of the absolute value of the difference. It can be derived based on In this way, the cost derived based on the sum of the absolute values of the differences may be called SAD (Sum of Difference).
  • the location with the lowest cost is determined as the optimal location, and a prediction parameter derivation process, which will be described later, can be performed using the down-sampled luma samples from the optimal location.
  • information indicating one of multiple positions to which a down-sampling filter can be applied may be encoded and signaled.
  • an index indicating one of positions A to D may be encoded and signaled.
  • the encoder obtains a prediction parameter for each of a plurality of positions to which a down-sampling filter can be applied, and encodes and signals an index indicating the position used to derive the optimal prediction parameter among the plurality of prediction parameters.
  • the optimal prediction parameters can be derived by the cost of each prediction parameter or RDO (Rate Distortion Optimization).
  • determining the optimal down-sampling application location within the upper reference area may be independent of determining the optimal down-sampling application location within the left reference area.
  • the optimal down sampling application location within the upper reference area and the optimal down sampling application location within the left reference area may be different.
  • prediction parameters for the chroma block can be derived.
  • Prediction parameters may include weight ⁇ and offset ⁇ .
  • Prediction parameters can be derived using the least square method or the like.
  • the weight ⁇ offset ⁇ can be derived based on the linearity of the maximum and minimum values of the down-sampled luma reference samples and the maximum and minimum values of the chroma reference samples.
  • prediction parameters may be derived using only chroma reference samples at predefined positions and down-sampled luma reference samples corresponding thereto.
  • the process of deriving prediction parameters is simplified, and complexity in the encoder and decoder can be reduced.
  • a prediction parameter can be derived using chroma reference samples at the positions illustrated in Equation 6 below.
  • W and H represent the width and height of the chroma block, respectively.
  • a prediction parameter can be derived using four chroma reference samples and four down-sampled luma reference samples corresponding thereto.
  • Prediction parameters can also be obtained using reference samples in positions different from the above example.
  • the positions of reference samples may be determined as shown in Equation 7 and Equation 8 below.
  • one of the plurality of candidates can be selected.
  • each of the examples of Equation 6 to Equation 8 listed above may be set as a location candidate, and then reference samples may be selected according to one of the plurality of location candidates.
  • Information for selecting one of a plurality of location candidates may be encoded and signaled.
  • an index indicating one of a plurality of location candidates can be encoded and signaled.
  • one of a plurality of location candidates may be adaptively selected based on at least one of the size/shape of the current block, color format, or whether the location of the chroma sample matches the location of the luma sample.
  • the prediction parameter can be derived using the position candidate in Equation 6.
  • the prediction parameter can be derived using the position candidate of Equation 7 or Equation 8.
  • the position candidate of Equation 7 can be used, and if the current block is in a non-square form with a height greater than the width, the position candidate of Equation 8 can be used. there is.
  • a prediction sample of the chroma block can be obtained based on the down-sampled luma sample (S1720).
  • a prediction sample of a chroma block can be obtained according to Equation 9 below.
  • PredChroma represents a prediction sample of a chroma block
  • Downsampled_Luma represents a down-sampled luma sample at a position corresponding to the chroma prediction sample.
  • the above-described down-sampling process can be omitted. That is, when the video format is 4:4:4, the process of performing down-sampling on restored samples within the luma block and the process of performing down-sampling on reference samples of the luma block can be omitted.
  • a down-sampling filter may not be applied to the reference area of the luma block. That is, when deriving a prediction parameter, instead of using the minimum and maximum values among the down-sampled luma reference samples, the minimum and maximum values among the luma reference samples may be used.
  • pictures can be encoded/decoded on a block basis.
  • a picture may be divided into blocks of a predetermined size.
  • a block of a predetermined size may be called a coding tree block (Coding Tree Block, or coding tree unit) or a reference block.
  • Information indicating the size of the reference block may be signaled through a bitstream.
  • information indicating the size of a coding tree block may be encoded through a sequence parameter set or a picture header.
  • blocks of various sizes may be added to the standard block based on at least one of the tree structures predefined within the standard block. Then, encoding/decoding processing such as prediction, transformation, quantization, and/or entropy coding may be performed on each divided block. Each of the divided blocks may be a coding block, prediction block, or transform block.
  • the luma picture and the chroma picture are encoded/decoded respectively.
  • chroma pictures generally have similar characteristics to luma pictures. That is, the characteristics of chroma samples within a chroma picture tend to be similar to the characteristics of luma samples at the same location within a luma picture.
  • the division structure for the standard block can be independently determined for only one standard component among the color components, and the tree structure determined in the existing component can be applied in the same way to other components. In this way, a division structure in which the tree division structure of the standard component is directly applied to other components may be called a single tree structure.
  • the reference component is a luma component. That is, it is assumed that the tree division structure is independently applied to the luma component, while the tree division structure of the luma component is applied as is to the chroma component.
  • encoding/decoding information for the chroma block may be derived with reference to the co-located luma block, and then encoding/decoding for the chroma block may be performed based on the derived encoding/decoding information.
  • the division structure of the luma reference block and the division structure of the chroma reference block are the same, so the luma block at the same location as the chroma block can be clearly specified.
  • the division structure of the luma reference block and the division structure of the chroma reference block are independent.
  • the area within the luma picture corresponding to the area occupied by the chroma block, or the upper node luma block including the area within the luma picture can be treated as a luma block at the same location as the chroma block.
  • a luma block including an area within the luma picture corresponding to the area occupied by the chroma block can be set as a co-located luma block.
  • a representative block among the plurality of luma blocks may be determined as the co-located luma block.
  • the representative block may be a luma block occupying the largest portion of the area, a block with the largest size among luma blocks, or a luma block including a reference position sample in an area within the luma picture.
  • the reference position may be the upper left position, the central position, the upper right position, the lower left position, or the lower right position within the area.
  • a representative block among the plurality of luma blocks may be determined as the co-located luma block.
  • the representative block may be a luma block occupying the largest portion of the area, a block with the largest size among luma blocks, or a luma block including a reference position sample in an area within the luma picture.
  • the upper node luma block including the plurality of luma blocks may be determined as the co-located luma block.
  • a reference position for determining a chroma reference block and a co-located luma block may be defined, and the co-located luma block may be determined based on the reference position.
  • the reference position may be the upper left position, center position, upper right position, lower left position, or lower right position of the chroma block.
  • a luma block including a luma sample corresponding to the central position of the chroma block may be determined as the luma block at the same position as the chroma block.
  • the dual tree structure when determining the division structure of the chroma block, information can be referenced to the division structure of the co-located luma block. Whether to divide the chroma block into a plurality of partitions may be determined based on whether the co-located luma block is divided into a plurality of partitions.
  • Figures 22 and 23 are diagrams for explaining an example of determining the division structure of a chroma block with reference to a co-located luma block in a dual tree structure.
  • encoding/decoding information for the chroma block can be derived by referring to encoding/decoding information of the co-located luma block.
  • the division information of the luma block can be directly applied to the chroma block.
  • the partition information may include at least one of whether the block is partitioned or the partition type of the block.
  • the partition type may relate to at least one of the number of partitions created by dividing the block, whether or not it is asymmetrically divided, or the direction in which the block is divided.
  • the partition type of the first chroma block may be set to be the same as the partition type of the luma block existing at the same location.
  • the co-located luma block for the first chroma block is the upper node luma block divided into luma block B and luma block C.
  • the co-located luma block is shown to be divided into two in the horizontal direction. Accordingly, the first chroma block can also be divided into two horizontally, like the luma block.
  • prediction information of the luma block can be referred to when encoding/decoding the chroma block. That is, prediction information for each partition created by dividing the chroma block may be set to be the same as the co-located luma block for each partition.
  • the prediction mode of each of the two partitions (i.e., b and c) created by dividing the chroma block is the prediction mode of the two partitions (i.e., B and C) each prediction mode may be set identically.
  • the prediction mode may refer to at least one of an encoding mode, an intra prediction mode, or an inter prediction mode.
  • the encoding mode indicates whether intra prediction or inter prediction was applied to the block.
  • the intra prediction mode may be information indicating one of non-directional intra prediction modes and directional prediction modes used when performing intra prediction.
  • the inter prediction mode may be information indicating at least one of a motion information merging mode, a motion vector prediction mode, and a template matching mode.
  • the partition type for the second chroma block may be set to be the same as the partition type of the luma block existing at the same location.
  • quad type division is applied to the co-located luma block of the second chroma block. Accordingly, quad type division will be applied to the second chroma block as well.
  • the prediction mode used in the partitions created by dividing the chroma block i.e., e, f, g, and h
  • the prediction mode used in the partitions created by dividing the luma block i.e., E, F, G, and H. It can be set the same as the prediction mode of .
  • information indicating whether the encoding/decoding information of the chroma block is set to be the same as that of the co-located luma block may be encoded and signaled.
  • the information may be a 1-bit flag.
  • a first flag indicating whether to set the partition type of the chroma block to be the same as that of the co-located luma block may be encoded and signaled. If the first flag is true, encoding/decoding of partition information for the chroma block is omitted, and the partition type of the chroma block may be set to be the same as that of the co-located luma block.
  • a second flag indicating whether to set the prediction mode of the chroma block to be the same as that of the co-located luma block may be encoded and signaled. If the second flag is true, encoding/decoding of the prediction mode for the chroma block may be omitted, and the prediction mode of the chroma block may be set to be the same as that of the co-located luma block.
  • the chroma block and the co-located luma block are illustrated as having the same shape and corresponding sizes.
  • having sizes that correspond to each other indicates that the size of the chroma block and the size of the co-located luma block correspond to each other when considering the chroma format.
  • the size of the co-located luma block corresponding to the size of the chroma block may be the same size as the chroma block.
  • the size of the co-located luma block corresponding to the size of the chroma block may be twice the width and height of the chroma block, respectively.
  • a chroma block it may be adaptively determined whether prediction and transformation are performed sequentially.
  • prediction for the next partition is performed. and conversion may be performed.
  • the encoding/decoding order for each of the four partitions included in the second chroma block may be as follows.
  • prediction may be performed on each of the sub-blocks first, and then, after prediction on the sub-blocks is completed, transformation on the hub blocks may be performed.
  • the prediction information of the chroma block can be set to be the same as the prediction information of the co-located luma block.
  • the partition type of the chroma block can be determined by referring to the partition type of the co-located luma block.
  • the prediction mode of each partition may be set to be the same as the prediction mode of the partition in the luma block corresponding to each of the partitions.
  • the luma block corresponding to the first chroma block is luma block B.
  • the intra-screen prediction mode of luma block B may be applied as is to the first chroma block.
  • the second chroma block has a size corresponding to the sum of a plurality of luma blocks (ie, E, F, G, H, and J).
  • chroma block 2 can be divided into a plurality of luma blocks in the same form. That is, after dividing the chroma block into two horizontally, quad division can be applied to the upper chroma block created by the two divisions. Then, the prediction mode of each of the partitions (i.e., e, f, g, h, j) created by dividing the chroma block is changed to the prediction mode of each of the corresponding luma blocks (i.e., E, F, G, H, J). It can be set the same as prediction mode.
  • the encoding/decoding information of the luma block is You can set it so that it does not refer to decryption information.
  • the size of the luma block at the same location as the first chroma block corresponds to the size of the first chroma block.
  • it may be allowed to set the encoding/decoding information of the luma block to the encoding/decoding information of the chroma block.
  • the size of the luma block at the same location as the first chroma block does not correspond to the size of the first chroma block.
  • setting the encoding/decoding information of the luma block to the encoding/decoding information of the chroma block may not be permitted.
  • whether to divide the chroma block and/or the encoding/decoding order may be determined based on the directionality of luma samples.
  • Figure 24 shows an example in which encoding/decoding information for a chroma block is determined based on the directionality of luma samples.
  • the direction for the co-located luma block is determined based on luma samples included in the co-located luma block. Specifically, after applying a plurality of intra prediction modes to the co-located luma block, the intra prediction mode with the lowest cost among the plurality of intra prediction modes may be selected. At this time, intra prediction can be performed by assuming that neighboring samples adjacent to the co-located luma block (i.e., block A) are reference samples.
  • the cost for each of the intra prediction modes is calculated by subtracting the predicted value generated through intra prediction from the restored (or original) sample included in the co-located luma block (i.e., block A), and then calculating the cost for each of the intra-prediction modes at all locations within the co-located luma block. It can be derived by summing the absolute difference values of . Afterwards, the intra prediction mode with the lowest cost is set to the directionality of the co-located luma block (i.e., block A).
  • the directionality of block A may be set to the left.
  • the directionality of block A may be determined to be upper.
  • a co-located luma block i.e., block A
  • previously restored samples may exist not only in the top and left areas, but also in the right and bottom areas.
  • extended directional intra prediction modes using the right and bottom reference samples i.e., the directional intra prediction modes shown in FIG. 4
  • the directionality of the co-located luma block may be determined by additionally checking prediction modes and intra prediction modes in the opposite direction.
  • block A and surrounding samples adjacent to block A can be rotated clockwise by 180 degrees, and then the cost for each of the predefined intra prediction modes can be calculated.
  • block A and surrounding samples are rotated 180 degrees clockwise, lower reference samples may be set as upper reference samples, and right reference samples may be set as left reference samples.
  • the selected intra prediction mode is rotated 180 degrees in the opposite direction (i.e. counterclockwise) to determine the optimal intra prediction mode for the right/bottom direction. You can decide.
  • block A direction can be determined.
  • the optimal intra prediction mode for block A is derived when block A is rotated 180 degrees, and if the optimal intra prediction mode is one of modes 2 to 33 in FIG. 4, block A The direction of can be determined to the right.
  • the optimal intra prediction mode for block A is derived when block A is rotated 180 degrees, and the optimal intra prediction mode is one of modes 34 to 66 of FIG. 4, the The direction can be determined to be downward.
  • Figure 25 shows an example of using restored samples in the same location luma block as reference samples.
  • w0, w1, h0, and h1 respectively represent areas containing restored samples used as reference samples in the co-located luma block.
  • the optimal intra prediction mode for the co-located luma block can be derived.
  • the optimal intra prediction mode for the co-location luma block can be determined by calculating the cost for each of the predefined intra prediction modes and/or the extended direction intra prediction modes.
  • the intra prediction mode of the co-located luma block may be used. That is, the directionality of the co-located luma block can be determined based on the intra prediction mode used to encode/decode the co-located luma block.
  • the directionality of the co-location luma block may be determined by classifying intra prediction modes into a plurality of groups and calculating a cost for each group.
  • Figure 26 shows an example in which intra prediction modes are classified into a plurality of groups.
  • predefined intra prediction modes and extended intra prediction modes in the opposite direction to the directional intra prediction modes among the predefined intra prediction modes can be divided into a plurality of groups. there is.
  • the cost of each intra prediction mode belonging to the group can be calculated and the calculated costs can be added to derive the cost of the group.
  • the cost for the left direction can be calculated by adding the costs of the groups corresponding to the left direction among the plurality of groups.
  • the cost for the left direction can be calculated by adding the costs of group a and group h.
  • the cost for the upper direction can be derived by combining the costs of group b and group c
  • the cost for the right direction can be derived by combining the costs of group d and group e.
  • the cost for the bottom direction can be derived by combining the costs of group f and group g.
  • the direction with the lowest cost can be selected as the direction of the co-located luma block.
  • the sum of the costs of group a and group b can be set as the cost for the left direction, and the sum of the costs of group c and group d can be set as the cost for the top direction. Additionally, the sum of the costs of group e and group f can be set as the cost for the right direction, and the sum of the costs of group g and group h can be set as the cost for the bottom direction.
  • the directionality may be determined for each block of a predefined unit, and the directionality for the luma block at the same location may be set to be the same as the directionality of the block of the predefined unit to which the luma block at the same location belongs.
  • the directionality of the coding tree unit to which the co-located luma block belongs can be determined as the directionality of the co-located luma block.
  • the method of deriving the optimal directionality for the coding tree unit may follow the above-described embodiments.
  • the chroma block may not be divided into a plurality of partitions.
  • the optimal intra prediction mode for the co-located luma block is the directional prediction mode, it may be decided to divide the chroma block into a plurality of partitions.
  • the encoding/decoding order of the plurality of sub-blocks in the chroma block can be determined based on the directionality of the co-located luma block. For example, when a chroma block is divided into four and encoded/decoded, the encoding/decoding start point and scan order for the four sub-blocks may be determined depending on the direction of the co-located luma block.
  • Figures 27 and 28 show the scan order for each sub-block in the chroma block according to the direction of the co-located luma block.
  • each partition may be at least one of a coding unit (ie, CU), prediction unit (ie, PU), or transformation unit (TU).
  • coding unit ie, CU
  • prediction unit ie, PU
  • transformation unit TU
  • this embodiment can be applied even when the chroma block is divided into a larger number of partitions or the chroma block is divided into a smaller number of partitions.
  • the chroma block is illustrated as being divided into 4 partitions whose height and width are each 1/2 that of the chroma block.
  • Figure 27 (a) shows the encoding/decoding order of sub-blocks in the chroma block when the directionality of the co-located luma block is upper (i.e., when the optimal intra prediction mode is one of boards 34 to 66). It represents. Arrows indicate the encoding/decoding order of divided blocks. The starting point of the arrow indicates that it is encoded/decoded first, and the ending point of the arrow indicates that it is encoded/decoded later.
  • Figure 27(b) shows the encoding/decoding order of sub-blocks in the chroma block when the directionality of the co-located luma block is left (i.e., when the optimal intra prediction mode is one of modes 2 to 33). It represents.
  • Figure 27(c) shows the sub-blocks in the chroma block when the directionality of the co-located luma block is right (i.e., when the optimal intra prediction mode is 180 degrees opposite to one of modes 2 to 33). This shows the encoding/decoding order.
  • FIG. 27 shows, when the directionality of the co-located luma block is at the bottom (i.e., when the optimal intra prediction mode is 180 degrees opposite to one of modes 34 to 66), the sub-block within the chroma block This shows the encoding/decoding order.
  • the chroma block may be divided into partitions whose height or width is 1/4 of that of the chroma block.
  • the division direction of the chroma block may be determined according to the direction of the co-located luma block. For example, when the direction of the co-located luma block is top or bottom, the chroma block may be divided in the horizontal direction, as in the example shown in (a) and (b) of FIG. 28. On the other hand, when the direction of the co-located luma block is left or right, the chroma block may be divided in the vertical direction, as in the examples shown in (c) and (d) of Figures 28.
  • Figure 28 (c) shows the encoding/decoding order of sub-blocks in the chroma block when the directionality of the co-located luma block is left (i.e., when the optimal intra prediction mode is one of modes 2 to 33). It represents.
  • Figure 28 (d) shows the sub-blocks in the chroma block when the directionality of the co-located luma block is right (i.e., when the optimal intra prediction mode is 180 degrees opposite to one of modes 2 to 33). This shows the encoding/decoding order.
  • the directionality of a luma block existing at the same location may be determined, and rotation and/or flipping of the chroma block may be performed depending on the directionality of the luma block.
  • rotation and/or flipping may be performed in units of reference blocks, coding blocks, prediction blocks, or transform blocks.
  • encoding/decoding may be performed on the rotated and/or flipped chroma block.
  • Figure 29 shows an example in which flipping is performed on samples within a chroma block.
  • p1 to p16 refer to samples in the chroma block.
  • Figure 29(a) shows a chroma block in a state where flipping has not been performed.
  • Figure 29(b) shows a chroma block on which flipping was performed in the horizontal direction
  • Figure 29(c) shows a chroma block on which flipping was performed on the vertical direction.
  • Figure 29(d) shows a chroma block on which 180 degree flipping (i.e., horizontal flipping and vertical flipping) was performed.
  • flipping may not be applied, as in the example shown in (a) of FIG. 29.
  • horizontal flipping may be applied, as in the example shown in (b) of FIG. 29.
  • vertical flipping can be applied simultaneously, as in the example shown in (d) of FIG. 29.
  • vertical flipping may be applied, as in the example shown in (c) of FIG. 29.
  • At least one of information indicating whether flipping is applied to the chroma block or information indicating the flipping direction may be encoded and signaled, rather than based on the direction of the co-located luma block.
  • flipping for a chroma block may be set to be applied only when the co-located luma block is encoded with intra-screen prediction.
  • the co-located luma block is encoded with inter-screen prediction rather than intra-screen prediction, encoding/decoding of flipping-related information for the chroma block is omitted, and flipping will not be performed for the chroma block. You can.
  • the intra prediction mode of the chroma block may be determined based on the method for determining the optimal intra prediction mode for the co-located luma block described above. That is, the optimal intra prediction mode for the co-located luma block can be set to the intra prediction mode of the chroma block.
  • intra prediction may be performed on the chroma block based on the predetermined intra prediction mode of the chroma block and the intra prediction mode of the co-located luma block.
  • the intra prediction mode of the predetermined chroma block may be at least one of DM (Direct Mode), Horizontal Mode, Vertical Mode, DC Mode, Planar Mode, or Inter-Component Cross Prediction Mode.
  • the DM mode may set the intra prediction mode used to encode/decode the co-located luma block to the intra prediction mode of the chroma block.
  • a first prediction block for the chroma block is obtained based on a predetermined intra prediction mode of the chroma block
  • a second prediction block is obtained for the chroma block based on the optimal intra prediction mode of the co-located luma block. It can be obtained.
  • the final prediction block for the chroma block can be obtained based on the average or weighted sum operation of the first prediction block and the second prediction block.
  • the final prediction block for the chroma block may be obtained by combining the inter prediction mode and the intra prediction mode.
  • the chroma block is calculated through an average or weighted sum operation between an intra prediction block (or first prediction block) obtained by intra prediction and an inter prediction block (or second prediction block) obtained by inter prediction.
  • the final prediction block can be generated.
  • intra prediction may be performed based on the optimal intra prediction mode of the co-location luma block or may be performed based on CCLM mode.
  • inter prediction may be performed by at least one of a motion information merging mode, a motion vector prediction mode, or a template matching mode.
  • the weights applied to each of the first prediction block and the second prediction block may always be set to the same value.
  • the weight applied to each of the first prediction block and the second prediction block may be determined using one of a plurality of weight candidates in a preset weight table. In this case, an index indicating one of a plurality of weight candidates may be encoded and signaled.
  • the weight applied to each of the first prediction block and the second prediction block may be determined by referring to the encoding mode of at least one neighboring block. For example, when the number of blocks encoded/decoded through intra prediction is greater than the number encoded/decoded by inter prediction, the weight applied to the first prediction block is greater than the weight applied to the second prediction block. You can have it. On the other hand, if the number of the plurality of neighboring blocks encoded/decoded through inter prediction is greater than the number encoded/decoded by intra prediction, the weight applied to the second prediction block will have a larger value than the weight applied to the first prediction block. You can.
  • the weight applied to the first prediction block and the weight applied to the second prediction block may be set to the same value. there is.
  • post-processing can be performed on prediction samples derived by performing intra prediction on the chroma block.
  • the post-processing may be to correct prediction samples.
  • the intra-prediction mode of the chroma block is DM mode
  • the intra-prediction mode of the co-located luma block is set to the intra-prediction mode of the chroma block.
  • the co-located luma block can be restored by combining a prediction sample obtained through intra prediction and a residual sample representing the difference between the original sample and the prediction sample.
  • the DM mode can be set not to be used in the area within the chroma block corresponding to the area with a large prediction error within the co-located luma block.
  • whether a region has a large prediction error can be determined by comparing the values of residual samples with a threshold value. Additionally, determination of an area with a large prediction error may be performed on a sample basis or a sub-block unit of a predefined size. As an example, the determination may be performed in units of subblocks of 2x2 or 4x4 size.
  • Figure 30 shows an example of determining whether or not an area has a large prediction error on a sub-block basis within the same location luma block.
  • the chroma block and the luma block existing at the same location as the chroma block may be divided into sub-blocks of a preset size.
  • the size and/or shape of the subblock may be predefined in the encoder and decoder.
  • the size and/or shape of the sub-block may be adaptively determined depending on the size and/or shape of the chroma block to be encoded/decoded.
  • each sub-block in the co-located luma block it is determined whether it is an area with a large prediction error.
  • the determination may be performed by comparing the average of the absolute values of residual samples within the sub-block with a threshold value. For example, if the average value is greater than the threshold, the corresponding sub-block may be determined to be an area with a large prediction error. Otherwise, the sub-block may be determined to be an area with a small prediction error.
  • the minimum, maximum, or median value among absolute values of residual samples within a subblock may be compared with a threshold value to determine whether the corresponding subblock is an area with a large prediction error.
  • the threshold value may be a value predefined in the encoder and decoder.
  • information representing the threshold may be explicitly encoded and signaled.
  • the threshold value can be derived based on the average of the absolute values of residual samples within the same location luma block.
  • the threshold value may be an average of the absolute values of residual samples in the luma block, or may be a value obtained by adding or subtracting an offset to the average value.
  • the threshold value may be derived based on the minimum, maximum, or median value among the absolute values of residual samples in the same location luma block.
  • the threshold value may be set equal to the minimum, maximum, or median value among the absolute values of residual samples in the luma block, or may be a value obtained by adding or subtracting an offset to the minimum, maximum, or median value.
  • subblock A and subblock B within the co-located luma block are determined to be areas with large prediction errors.
  • the DM mode may not be used in subblock a and subblock b in the chroma block corresponding to subblock A and subblock B.
  • intra prediction may be performed using a predefined intra prediction mode.
  • the predefined intra prediction mode may be planar mode or DC mode.
  • the decoder may derive an intra prediction mode for an area where DM mode is not used.
  • the optimal intra prediction mode for the area with large prediction error can be derived using restored samples that exist around the area with large prediction error in the luma block.
  • the optimal intra prediction mode can be derived for each of subblock A and subblock B within the co-located luma block.
  • the optimal intra prediction mode derived for subblock A is set to the intra prediction mode of subblock a in the chroma block, and subblock B
  • the optimal intra prediction mode derived for can be set as the intra prediction mode of subblock b in the chroma block.
  • information indicating whether application of DM mode is restricted may be explicitly encoded and signaled.
  • the information may be a 1-bit flag.
  • each of the components (e.g., units, modules, etc.) constituting the block diagram in the above-described disclosure may be implemented as a hardware device or software, and a plurality of components may be combined to form a single hardware device or software. It could be.
  • the hardware device may include at least one of a processor for performing operations, a memory for storing data, a transmitter for transmitting data, and a receiver for receiving data.
  • the above-described disclosure may be implemented in the form of program instructions that can be executed through various computer components and recorded on a computer-readable recording medium.
  • the computer-readable recording medium may include program instructions, data files, data structures, etc., singly or in combination.
  • a computer-readable recording medium that stores a bitstream generated by the above-described encoding method.
  • the bitstream may be transmitted by an encoding device, and the decoding device may receive the bitstream and decode the image.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, and magneto-optical media such as floptical disks. media), and hardware devices specifically configured to store and perform program instructions, such as ROM, RAM, flash memory, etc.
  • the hardware devices may be configured to operate as one or more software modules to perform processing according to the present disclosure, and vice versa.
  • Embodiments through this disclosure can be applied to electronic devices that encode or decode images.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A video encoding/decoding method according to the present invention comprise the steps of: dividing a chroma block into a plurality of partitions; and performing intra-prediction for each of the partitions in the chroma block.

Description

영상 부호화/복호화 방법 및 비트스트림을 저장하는 기록 매체Video encoding/decoding method and recording medium for storing bitstream
본 개시는 영상 신호 처리 방법 및 장치에 관한 것이다.This disclosure relates to a video signal processing method and device.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 고효율의 영상 압축 기술들이 활용될 수 있다.Recently, demand for high-resolution, high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images is increasing in various application fields. As video data becomes higher resolution and higher quality, the amount of data increases relative to existing video data. Therefore, when video data is transmitted using media such as existing wired or wireless broadband lines or stored using existing storage media, transmission costs and Storage costs increase. High-efficiency video compression technologies can be used to solve these problems that arise as video data becomes higher resolution and higher quality.
영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 화면 간 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 화면 내 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.Inter-screen prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture using video compression technology, intra-screen prediction technology that predicts pixel values included in the current picture using pixel information in the current picture, There are various technologies, such as entropy coding technology, which assigns short codes to values with a high frequency of occurrence and long codes to values with a low frequency of occurrence. Using these video compression technologies, video data can be effectively compressed and transmitted or stored.
한편, 고해상도 영상에 대한 수요가 증가함과 함께, 새로운 영상 서비스로서 입체 영상 컨텐츠에 대한 수요도 함께 증가하고 있다. 고해상도 및 초고해상도의 입체 영상 콘텐츠를 효과적으로 제공하기 위한 비디오 압축 기술에 대하여 논의가 진행되고 있다.Meanwhile, as the demand for high-resolution video increases, the demand for three-dimensional video content as a new video service is also increasing. Discussions are underway regarding video compression technology to effectively provide high-resolution and ultra-high-resolution stereoscopic video content.
본 개시는 영상 신호를 부호화/복호화함에 있어서, 복원된 루마 블록을 이용하여 크로마 블록을 예측하는 방법 및 장치를 제공하는 것을 목적으로 한다.The purpose of the present disclosure is to provide a method and device for predicting a chroma block using a restored luma block when encoding/decoding a video signal.
본 개시는 영상 신호를 부호화/복호화함에 있어서, 루마 성분과 크로마 성분의 선형성을 기반으로 크로마 블록을 예측하는 방법 및 장치를 제공하는 것을 목적으로 한다.The purpose of the present disclosure is to provide a method and device for predicting a chroma block based on the linearity of the luma component and the chroma component when encoding/decoding a video signal.
본 개시는 영상 신호를 부호화/복호화함에 있어서, 크로마 블록에 대한 부/복호화 정보를, 동일 위치 루마 블록으로부터 유도하는 방법 및 장치를 제공하는 것을 목적으로 한다. The purpose of the present disclosure is to provide a method and device for deriving encoding/decoding information for a chroma block from a co-located luma block when encoding/decoding a video signal.
본 개시에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The technical problems to be achieved in the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art from the description below. You will be able to.
본 개시에 따른 영상 부호화/복호화 방법은, 크로마 블록을 복수의 파티션들로 분할하는 단계; 및 상기 크로마 블록 내 상기 파티션들 각각에 대해 인트라 예측을 수행하는 단계를 포함할 수 있다. 이때, 상기 크로마 블록의 파티션 타입은, 상기 크로마 블록의 동일 위치 루마 블록의 파티션 타입 또는 방향성 중 적어도 하나를 기반으로 결정될 수 있다. An image encoding/decoding method according to the present disclosure includes dividing a chroma block into a plurality of partitions; And it may include performing intra prediction on each of the partitions in the chroma block. At this time, the partition type of the chroma block may be determined based on at least one of the partition type or directionality of the luma block at the same location as the chroma block.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 크로마 블록의 상기 파티션 타입은, 상기 동일 위치 루마 블록의 상기 파티션 타입과 동일하게 설정될 수 있다.In the video decoding/encoding method according to the present disclosure, the partition type of the chroma block may be set to be the same as the partition type of the co-located luma block.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 복수의 파티션들은, 상기 크로마 블록을, 수평 방향 또는 수직 방향으로 분할하여 생성되고, 상기 크로마 블록의 분할 방향은, 상기 동일 위치 루마 블록의 상기 방향성을 기초로 결정될 수 있다.In the video decoding/encoding method according to the present disclosure, the plurality of partitions are generated by dividing the chroma block in a horizontal or vertical direction, and the division direction of the chroma block is the directionality of the co-located luma block. It can be decided based on .
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 크로마 블록 내 복수의 파티션들에 대한 복호화 순서는, 상기 동일 위치 루마 블록의 상기 방향성을 기초로 결정될 수 있다.In the image decoding/encoding method according to the present disclosure, the decoding order of the plurality of partitions in the chroma block may be determined based on the directionality of the co-located luma block.
본 개시에 따른 영상 복호화/부호화 방법은, 상기 크로마 블록에 대해 플리핑을 수행할 것인지 여부를 결정하는 단계를 더 포함할 수 있다. 이때, 상기 크로마 블록에 대한 상기 플리핑은, 가로 방향 또는 세로 방향 중 적어도 하나에 대해 수행될 수 있다.The image decoding/encoding method according to the present disclosure may further include the step of determining whether to perform flipping on the chroma block. At this time, the flipping of the chroma block may be performed in at least one of the horizontal or vertical directions.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 동일 위치 루마 블록의 상기 방향성에 기초하여, 상기 플리핑의 수행 여부 및 상기 플리핑의 수행 방향이 결정될 수 있다.In the image decoding/encoding method according to the present disclosure, whether to perform the flipping and the direction in which the flipping is performed may be determined based on the directionality of the co-located luma block.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 플리핑은, 상기 동일 위치 루마 블록이 인트라 예측으로 부호화된 경우에 한하여 허용될 수 있다.In the video decoding/coding method according to the present disclosure, the flipping may be allowed only when the co-located luma block is encoded by intra prediction.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 크로마 블록 내 상기 복수의 파티션들 각각의 인트라 예측 모드는, 상기 동일 위치 루마 블록에 포함된 복수의 파티션들 각각의 인트라 예측 모드와 동일하게 설정될 수 있다.In the image decoding/encoding method according to the present disclosure, the intra prediction mode of each of the plurality of partitions in the chroma block may be set to be the same as the intra prediction mode of each of the plurality of partitions included in the co-located luma block. You can.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 크로마 블록 내 상기 복수의 파티션들 중 상기 동일 위치 루마 블록 내 예측 오차가 큰 영역에 대응되는 파티션에는, 기 정의된 인트라 예측 모드가 적용되고, 그렇지 않는 파티션에는, 상기 동일 위치 루마 블록의 인트라 예측 모드가 적용될 수 있다.In the image decoding/encoding method according to the present disclosure, a predefined intra prediction mode is applied to a partition corresponding to an area with a large prediction error in the co-located luma block among the plurality of partitions in the chroma block, and otherwise, For partitions that do not exist, the intra prediction mode of the co-located luma block may be applied.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 동일 위치 루마 블록 내 서브 영역이 예측 오차가 큰 영역인지 여부는, 상기 서브 영역 내 잔차 샘플들 절대값의 평균값을 문턱값과 비교하여 결정될 수 있다.In the image decoding/encoding method according to the present disclosure, whether the sub-region in the co-located luma block is an area with a large prediction error can be determined by comparing the average value of the absolute value of residual samples in the sub-region with a threshold value. .
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 문턱값은, 상기 동일 위치 루마 블록 내 잔차 샘플들 절대값의 평균값을 기반으로 유도될 수 있다.In the image decoding/encoding method according to the present disclosure, the threshold value may be derived based on the average value of absolute values of residual samples within the co-located luma block.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 동일 위치 루마 블록의 상기 방향성은, 기 정의된 인트라 예측 모드들 및 상기 동일 위치 루마 블록 주변의 참조 샘플들을 기반으로 수행된 인트라 예측 수행 결과에 따라 도출된 최적의 인트라 예측 모드를 기초로 결정될 수 있다.In the image decoding/encoding method according to the present disclosure, the directionality of the co-located luma block is determined according to a result of intra prediction performed based on predefined intra prediction modes and reference samples around the co-located luma block. It can be determined based on the derived optimal intra prediction mode.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 동일 위치 루마 블록의 상기 방향성은, 상기 동일 위치 루마 블록이 포함된 기준 블록의 방향성과 동일하게 설정될 수 있다.In the image decoding/encoding method according to the present disclosure, the directionality of the co-located luma block may be set to be the same as the directionality of the reference block including the co-located luma block.
본 개시에 따른 영상 부호화 방법에 의해 부호화된 비트스트림을 저장하는 컴퓨터로 판독가능한 기록 매체가 제공될 수 있다.A computer-readable recording medium that stores a bitstream encoded by the video encoding method according to the present disclosure may be provided.
본 개시에 의하면, 복원된 루마 블록을 이용하여 크로마 블록을 예측함으로써, 부호화/복호화 효율을 향상시킬 수 있다. According to the present disclosure, encoding/decoding efficiency can be improved by predicting a chroma block using a restored luma block.
본 개시에 의하면, 루마 성분과 크로마 성분의 선형성을 기반으로 크로마 블록을 예측함으로써, 인트라 예측의 정확도를 향상시킬 수 있다. According to the present disclosure, the accuracy of intra prediction can be improved by predicting a chroma block based on the linearity of the luma component and the chroma component.
본 개시에 의하면, 동일 위치 루마 블록을 참조하여 크로마 블록의 부/복호화 정보를 유도함으로써, 크로마 블록에 대한 압축 효율을 향상시킬 수 있다. According to the present disclosure, compression efficiency for the chroma block can be improved by deriving the encoding/decoding information of the chroma block with reference to the co-located luma block.
본 개시에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The effects that can be obtained from the present disclosure are not limited to the effects mentioned above, and other effects not mentioned can be clearly understood by those skilled in the art from the description below. will be.
도 1은 본 개시의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다. 1 is a block diagram showing a video encoding device according to an embodiment of the present disclosure.
도 2는 본 개시의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.Figure 2 is a block diagram showing a video decoding device according to an embodiment of the present disclosure.
도 3은 본 개시에 따른 영상 부호화/복호화 장치에 의해 수행되는 영상 부호화/복호화 방법을 도시한 것이다.FIG. 3 illustrates an image encoding/decoding method performed by the image encoding/decoding device according to the present disclosure.
도 4 및 도 5는 본 개시에 따른 복수의 인트라 예측 모드의 일예를 도시한 것이다.Figures 4 and 5 show an example of a plurality of intra prediction modes according to the present disclosure.
도 6은 본 개시에 따른 플래너 모드 기반의 인트라 예측 방법을 도시한 것이다.Figure 6 illustrates a planar mode-based intra prediction method according to the present disclosure.
도 7은 본 개시에 따른 DC 모드 기반의 인트라 예측 방법을 도시한 것이다.Figure 7 shows a DC mode-based intra prediction method according to the present disclosure.
도 8은 본 개시에 따른 방향성 모드 기반의 인트라 예측 방법을 도시한 것이다.Figure 8 illustrates a directional mode-based intra prediction method according to the present disclosure.
도 9는 분수 위치의 샘플을 유도하는 방법을 도시한 것이다.Figure 9 shows a method for deriving samples of fractional positions.
도 10 및 도 11은 인트라 예측 모드별, 각도에 대한 탄젠트 값이 32배 스케일링된 것을 도시한 것이다.Figures 10 and 11 show that the tangent value for the angle is scaled by 32 times for each intra prediction mode.
도 12는 방향성 모드가 34번 내지 49번 모드 중 하나인 경우, 인트라 예측 양상을 예시한 도면이다.Figure 12 is a diagram illustrating an intra prediction aspect when the directional mode is one of modes 34 to 49.
도 13은 좌측 참조 샘플들을 보간하여 상단 참조 샘플을 생성하는 예를 설명하기 위한 도면이다.Figure 13 is a diagram for explaining an example of generating an upper reference sample by interpolating left reference samples.
도 14는 1D 어레이로 배열된 참조 샘플들을 이용하여, 인트라 예측이 수행되는 예를 나타낸 것이다.Figure 14 shows an example in which intra prediction is performed using reference samples arranged in a 1D array.
도 15는 싱글 트리 구조가 사용되는 경우, 부/복호화 순서를 설명하기 위한 도면이다.Figure 15 is a diagram for explaining the encoding/decoding order when a single tree structure is used.
도 16은 듀얼 트리 구조가 사용되는 경우, 부/복호화 순서를 설명하기 위한 도면이다.Figure 16 is a diagram for explaining the encoding/decoding order when a dual tree structure is used.
도 17은 복원된 루마 블록을 이용하여 크로마 블록을 예측하는 방법을 나타낸 흐름도이다.Figure 17 is a flowchart showing a method of predicting a chroma block using a restored luma block.
도 18 내지 도 20은 루마 블록을 다운 샘플링하는 예를 나타낸 것이다.Figures 18 to 20 show examples of down-sampling a luma block.
도 21은 다운 샘플링이 적용되는 위치와 관련한 예를 설명하기 위한 도면이다.FIG. 21 is a diagram for explaining an example of a location where down sampling is applied.
도 22 및 도 23은 듀얼 트리 구조에서, 크로마 블록의 분할 구조를 동일 위치 루마 블록을 참조하여 결정하는 예를 설명하기 위한 도면이다.Figures 22 and 23 are diagrams for explaining an example of determining the division structure of a chroma block with reference to a co-located luma block in a dual tree structure.
도 24는 루마 샘플들에 대한 방향성을 기반으로, 크로마 블록에 대한 부/복호화 정보가 결정되는 예를 도시한 것이다.Figure 24 shows an example in which encoding/decoding information for a chroma block is determined based on the directionality of luma samples.
도 25는 동일 위치 루마 블록 내 복원 샘플들을 참조 샘플들로서 이용하는 예를 나타낸 것이다.Figure 25 shows an example of using restored samples in the same location luma block as reference samples.
도 26은 인트라 예측 모드들이 복수의 그룹들로 분류된 예를 나타낸다.Figure 26 shows an example in which intra prediction modes are classified into a plurality of groups.
도 27 및 도 28은 동일 위치 루마 블록의 방향성에 따라, 크로마 블록 내 각 서브 블록들에 대한 스캔 순서를 나타낸 것이다.Figures 27 and 28 show the scan order for each sub-block in the chroma block according to the direction of the co-located luma block.
도 29는 크로마 블록 내 샘플들에 대해 플리핑이 수행된 예를 나타낸 것이다.Figure 29 shows an example in which flipping is performed on samples within a chroma block.
도 30은 동일 위치 루마 블록 내 서브 블록 단위로 예측 오차가 큰 영역인지 여부가 판정되는 예를 나타낸다.Figure 30 shows an example of determining whether or not an area has a large prediction error on a sub-block basis within the same location luma block.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.Since the present invention can make various changes and have various embodiments, specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and should be understood to include all changes, equivalents, and substitutes included in the spirit and technical scope of the present invention. While describing each drawing, similar reference numerals are used for similar components.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, a first component may be named a second component without departing from the scope of the present invention, and similarly, the second component may also be named a first component. The term and/or includes any of a plurality of related stated items or a combination of a plurality of related stated items.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is said to be "connected" or "connected" to another component, it is understood that it may be directly connected or connected to the other component, but that other components may exist in between. It should be. On the other hand, when it is mentioned that a component is “directly connected” or “directly connected” to another component, it should be understood that there are no other components in between.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in this application are only used to describe specific embodiments and are not intended to limit the invention. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this application, terms such as “comprise” or “have” are intended to designate the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, but are not intended to indicate the presence of one or more other features. It should be understood that this does not exclude in advance the possibility of the existence or addition of elements, numbers, steps, operations, components, parts, or combinations thereof.
이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the attached drawings. Hereinafter, the same reference numerals will be used for the same components in the drawings, and duplicate descriptions of the same components will be omitted.
도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다. Figure 1 is a block diagram showing a video encoding device according to an embodiment of the present invention.
도 1을 참조하면, 영상 부호화 장치(100)는 픽쳐 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.Referring to FIG. 1, the image encoding device 100 includes a picture segmentation unit 110, prediction units 120 and 125, a transformation unit 130, a quantization unit 135, a rearrangement unit 160, and an entropy encoding unit ( 165), an inverse quantization unit 140, an inverse transform unit 145, a filter unit 150, and a memory 155.
도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.Each component shown in FIG. 1 is shown independently to represent different characteristic functions in the video encoding device, and does not mean that each component is comprised of separate hardware or one software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two of each component can be combined to form one component, or one component can be divided into a plurality of components to perform a function, and each of these components can perform a function. Integrated embodiments and separate embodiments of the constituent parts are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.
또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.Additionally, some components may not be essential components that perform essential functions in the present invention, but may simply be optional components to improve performance. The present invention can be implemented by including only essential components for implementing the essence of the present invention excluding components used only to improve performance, and a structure including only essential components excluding optional components used only to improve performance. is also included in the scope of rights of the present invention.
픽쳐 분할부(110)는 입력된 픽쳐를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 픽쳐 분할부(110)에서는 하나의 픽쳐에 대해 복수의 부호화 단위, 예측 단위 및 변환 단위의 조합으로 분할하고 소정의 기준(예를 들어, 비용 함수)으로 하나의 부호화 단위, 예측 단위 및 변환 단위 조합을 선택하여 픽쳐를 부호화 할 수 있다.The picture division unit 110 may divide the input picture into at least one processing unit. At this time, the processing unit may be a prediction unit (PU), a transformation unit (TU), or a coding unit (CU). The picture division unit 110 divides one picture into a combination of a plurality of coding units, prediction units, and transformation units, and combines one coding unit, prediction unit, and transformation unit based on a predetermined standard (for example, a cost function). You can encode the picture by selecting .
예를 들어, 하나의 픽쳐는 복수개의 부호화 단위로 분할될 수 있다. 픽쳐에서 부호화 단위를 분할하기 위해서는 쿼드 트리 구조(Quad Tree Structure)와 같은 재귀적인 트리 구조를 사용할 수 있는데 하나의 영상 또는 최대 크기 부호화 단위(largest coding unit)를 루트로 하여 다른 부호화 단위로 분할되는 부호화 유닛은 분할된 부호화 단위의 개수만큼의 자식 노드를 가지고 분할될 수 있다. 일정한 제한에 따라 더 이상 분할되지 않는 부호화 단위는 리프 노드가 된다. 즉, 하나의 코딩 유닛에 대하여 정방형 분할만이 가능하다고 가정하는 경우, 하나의 부호화 단위는 최대 4개의 다른 부호화 단위로 분할될 수 있다.For example, one picture may be divided into a plurality of coding units. To split the coding unit in a picture, a recursive tree structure such as the Quad Tree Structure can be used. Coding is split into other coding units with one image or the largest coding unit as the root. A unit can be divided into child nodes equal to the number of divided coding units. A coding unit that is no longer divided according to certain restrictions becomes a leaf node. That is, assuming that only square division is possible for one coding unit, one coding unit can be divided into up to four different coding units.
이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.Hereinafter, in the embodiments of the present invention, the coding unit may be used to mean a unit that performs encoding, or may be used to mean a unit that performs decoding.
예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수도 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태 및/또는 크기를 가지도록 분할된 것일 수도 있다.A prediction unit may be divided into at least one square or rectangular shape of the same size within one coding unit, and any one of the prediction units divided within one coding unit may be a prediction unit of another prediction unit. It may be divided to have a different shape and/or size than the unit.
부호화 단위를 기초로 인트라 예측을 수행하는 예측 단위를 생성시 최소 부호화 단위가 아닌 경우, 복수의 예측 단위 NxN으로 분할하지 않고 인트라 예측을 수행할 수 있다.If the prediction unit for which intra prediction is performed based on the coding unit is not the minimum coding unit when generated, intra prediction can be performed without dividing the prediction unit into a plurality of prediction units NxN.
예측부(120, 125)는 인터 예측을 수행하는 인터 예측부(120)와 인트라 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화 장치에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(120, 125)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.The prediction units 120 and 125 may include an inter prediction unit 120 that performs inter prediction and an intra prediction unit 125 that performs intra prediction. It is possible to determine whether to use inter prediction or intra prediction for a prediction unit, and determine specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. At this time, the processing unit in which the prediction is performed and the processing unit in which the prediction method and specific contents are determined may be different. For example, the prediction method and prediction mode are determined in prediction units, and prediction may be performed in transformation units. The residual value (residual block) between the generated prediction block and the original block may be input to the conversion unit 130. Additionally, prediction mode information, motion vector information, etc. used for prediction may be encoded in the entropy encoder 165 together with the residual value and transmitted to the decoding device. When using a specific encoding mode, it is possible to encode the original block as is and transmit it to the decoder without generating a prediction block through the prediction units 120 and 125.
인터 예측부(120)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 인터 예측부(120)는 참조 픽쳐 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다. The inter prediction unit 120 may predict a prediction unit based on information on at least one picture among the pictures before or after the current picture, and in some cases, prediction based on information on a partially encoded region within the current picture. Units can also be predicted. The inter prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
참조 픽쳐 보간부에서는 메모리(155)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.The reference picture interpolation unit may receive reference picture information from the memory 155 and generate pixel information of an integer number of pixels or less from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of an integer pixel or less in 1/4 pixel units. 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 of an integer pixel or less in 1/8 pixel units.
모션 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 모션 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 모션 벡터값을 가질 수 있다. 모션 예측부에서는 모션 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 모션 예측 방법으로 스킵(Skip) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법, 인트라 블록 카피(Intra Block Copy) 방법 등 다양한 방법이 사용될 수 있다.The motion prediction unit may perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit. Various methods, such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm), can be used to calculate the motion vector. The motion vector may have a motion vector value in units of 1/2 or 1/4 pixels based on the interpolated pixels. The motion prediction unit can predict the current prediction unit by using a different motion prediction method. As a motion prediction method, various methods such as the skip method, the merge method, the Advanced Motion Vector Prediction (AMVP) method, and the intra block copy method can be used.
인트라 예측부(125)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 인터 예측을 수행한 블록이어서, 참조 픽셀이 인터 예측을 수행한 픽셀일 경우, 인터 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 인트라 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra prediction unit 125 may generate a prediction unit based on reference pixel information around the current block, which is pixel information in the current picture. If the neighboring block of the current prediction unit is a block on which inter prediction has been performed and the reference pixel is a pixel on which inter prediction has been performed, the reference pixel included in the block on which inter prediction has been performed is the reference pixel of the block on which intra prediction has been performed. It can be used in place of information. That is, when a reference pixel is not available, the unavailable reference pixel information can be replaced with at least one reference pixel among available reference pixels.
인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra prediction, the prediction mode can include a directional prediction mode that uses reference pixel information according to the prediction direction and a non-directional mode that does not use directional information when performing prediction. The mode for predicting luminance information and the mode for predicting chrominance information may be different, and intra prediction mode information used to predict luminance information or predicted luminance signal information may be used to predict chrominance information.
인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행할 수 있다. 그러나 인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수 있다.When performing intra prediction, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit is made based on the pixel on the left, the pixel on the top left, and the pixel on the top of the prediction unit. can be performed. However, when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are different, intra prediction can be performed using a reference pixel based on the transformation unit. Additionally, intra prediction using NxN partitioning can be used only for the minimum coding unit.
인트라 예측 방법은 예측 모드에 따라 참조 화소에 AIS(Adaptive Intra Smoothing) 필터를 적용한 후 예측 블록을 생성할 수 있다. 참조 화소에 적용되는 AIS 필터의 종류는 상이할 수 있다. 인트라 예측 방법을 수행하기 위해 현재 예측 단위의 인트라 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 인트라 예측 모드로부터 예측할 수 있다. 주변 예측 단위로부터 예측된 모드 정보를 이용하여 현재 예측 단위의 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 인트라 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이하면 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다.The intra prediction method can generate a prediction block after applying an Adaptive Intra Smoothing (AIS) filter to the reference pixel according to the prediction mode. The type of AIS filter applied to the reference pixel may be different. To perform the intra prediction method, the intra prediction mode of the current prediction unit can be predicted from the intra prediction mode of prediction units existing around the current prediction unit. When predicting the prediction mode of the current prediction unit using predicted mode information from neighboring prediction units, if the intra prediction mode of the current prediction unit and neighboring prediction units are the same, predetermined flag information is used to predict the current prediction unit and neighboring prediction units. Information that the prediction modes of are the same can be transmitted, and if the prediction modes of the current prediction unit and neighboring prediction units are different, entropy encoding can be performed to encode the prediction mode information of the current block.
또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다. In addition, a residual block may be generated that includes residual information that is the difference between the prediction unit on which prediction was performed based on the prediction unit generated by the prediction units 120 and 125 and the original block of the prediction unit. The generated residual block may be input to the conversion unit 130.
변환부(130)에서는 원본 블록과 예측부(120, 125)를 통해 생성된 예측 단위의 잔차값(residual)정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT와 같은 변환 방법을 사용하여 변환시킬 수 있다. 잔차 블록을 변환하기 위해 DCT를 적용할지, DST를 적용할지 또는 KLT를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드 정보를 기초로 결정할 수 있다. The transform unit 130 transforms the residual block, including the original block and the residual value information of the prediction unit generated through the prediction units 120 and 125, into DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT and It can be converted using the same conversion method. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on intra prediction mode information of the prediction unit used to generate the residual block.
양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.The quantization unit 135 may quantize the values converted to the frequency domain by the conversion unit 130. The quantization coefficient may change depending on the block or the importance of the image. The value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the realignment unit 160.
재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.The rearrangement unit 160 may rearrange coefficient values for the quantized residual values.
재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 지그-재그 스캔(Zig-Zag Scan)방법을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.The rearrangement unit 160 can change the coefficients in a two-dimensional block form into a one-dimensional vector form through a coefficient scanning method. For example, the realignment unit 160 can scan from DC coefficients to coefficients in the high frequency region using a zig-zag scan method and change it into a one-dimensional vector form. Depending on the size of the transformation unit and the intra prediction mode, a vertical scan that scans the two-dimensional block-type coefficients in the column direction or a horizontal scan that scans the two-dimensional block-type coefficients in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, it can be determined which scan method among zig-zag scan, vertical scan, and horizontal scan will be used.
엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다. The entropy encoding unit 165 may perform entropy encoding based on the values calculated by the reordering unit 160. Entropy coding can use various coding methods, such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. The entropy encoding unit 165 receives coding unit residual value coefficient information, block type information, prediction mode information, division unit information, prediction unit information and transmission unit information, and motion information from the reordering unit 160 and prediction units 120 and 125. Various information such as vector information, reference frame information, block interpolation information, and filtering information can be encoded.
엔트로피 부호화부(165)에서는 재정렬부(160)에서 입력된 부호화 단위의 계수값을 엔트로피 부호화할 수 있다.The entropy encoding unit 165 may entropy encode the coefficient value of the coding unit input from the reordering unit 160.
역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부(120, 125)에 포함된 움직임 추정부, 움직임 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. The inverse quantization unit 140 and the inverse transformation unit 145 inversely quantize the values quantized in the quantization unit 135 and inversely transform the values transformed in the transformation unit 130. The residual value generated in the inverse quantization unit 140 and the inverse transform unit 145 is restored by combining prediction units predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction units 120 and 125. You can create a block (Reconstructed Block).
필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.The filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
디블록킹 필터는 복원된 픽쳐에서 블록 간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.The deblocking filter can remove block distortion caused by boundaries between blocks in the restored picture. To determine whether to perform deblocking, it is possible to determine whether to apply a deblocking filter to the current block based on the pixels included in several columns or rows included in the block. When applying a deblocking filter to a block, a strong filter or a weak filter can be applied depending on the required deblocking filtering strength. Additionally, when applying a deblocking filter, horizontal filtering and vertical filtering can be processed in parallel when vertical filtering and horizontal filtering are performed.
오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The offset correction unit may correct the offset of the deblocked image from the original image in pixel units. In order to perform offset correction for a specific picture, the pixels included in the image are divided into a certain number of areas, then the area to perform offset is determined and the offset is applied to that area, or the offset is performed by considering the edge information of each pixel. You can use the method of applying .
ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다. Adaptive Loop Filtering (ALF) can be performed based on a comparison between the filtered restored image and the original image. After dividing the pixels included in the image into predetermined groups, filtering can be performed differentially for each group by determining one filter to be applied to that group. Information related to whether to apply ALF may be transmitted for each coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied may vary for each block. Additionally, an ALF filter of the same type (fixed type) may be applied regardless of the characteristics of the block to which it is applied.
메모리(155)는 필터부(150)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 인터 예측을 수행 시 예측부(120, 125)에 제공될 수 있다.The memory 155 may store a reconstructed block or picture calculated through the filter unit 150, and the stored reconstructed block or picture may be provided to the prediction units 120 and 125 when inter prediction is performed.
도 2는 본 발명의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.Figure 2 is a block diagram showing an image decoding device according to an embodiment of the present invention.
도 2를 참조하면, 영상 복호화 장치(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230, 235), 필터부(240), 메모리(245)가 포함될 수 있다.Referring to FIG. 2, the image decoding device 200 includes an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, 235, and a filter unit ( 240) and memory 245 may be included.
영상 부호화 장치에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 부호화 장치와 반대의 절차로 복호화될 수 있다.When a video bitstream is input from a video encoding device, the input bitstream can be decoded in a procedure opposite to that of the video encoding device.
엔트로피 복호화부(210)는 영상 부호화 장치의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화 장치에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. The entropy decoding unit 210 may perform entropy decoding in a procedure opposite to that of performing entropy encoding in the entropy encoding unit of the video encoding device. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) may be applied in response to the method performed in the image encoding device.
엔트로피 복호화부(210)에서는 부호화 장치에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.The entropy decoder 210 can decode information related to intra prediction and inter prediction performed by the encoding device.
재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)에서는 부호화부에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 해당 부호화부에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통해 재정렬을 수행할 수 있다.The rearrangement unit 215 may rearrange the bitstream entropy-decoded by the entropy decoder 210 based on the method in which the encoder rearranges the bitstream. Coefficients expressed in the form of a one-dimensional vector can be restored and rearranged as coefficients in the form of a two-dimensional block. The reordering unit 215 may receive information related to coefficient scanning performed by the encoder and perform reordering by reverse scanning based on the scanning order performed by the encoder.
역양자화부(220)는 부호화 장치에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다. The inverse quantization unit 220 may perform inverse quantization based on the quantization parameters provided by the encoding device and the coefficient values of the rearranged blocks.
역변환부(225)는 영상 부호화 장치에서 수행한 양자화 결과에 대해 변환부에서 수행한 변환 즉, DCT, DST, 및 KLT에 대해 역변환 즉, 역 DCT, 역 DST 및 역 KLT를 수행할 수 있다. 역변환은 영상 부호화 장치에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 복호화 장치의 역변환부(225)에서는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT, DST, KLT)이 선택적으로 수행될 수 있다.The inverse transform unit 225 may perform inverse transform, that is, inverse DCT, inverse DST, and inverse KLT, on the transform performed by the transformer, that is, DCT, DST, and KLT, on the quantization result performed by the image encoding device. Inverse transformation may be performed based on the transmission unit determined by the video encoding device. The inverse transform unit 225 of the video decoding device may selectively perform a transformation technique (eg, DCT, DST, KLT) according to a plurality of information such as a prediction method, the size of the current block, and the prediction direction.
예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다. The prediction units 230 and 235 may generate a prediction block based on prediction block generation-related information provided by the entropy decoder 210 and previously decoded block or picture information provided by the memory 245.
전술한 바와 같이 영상 부호화 장치에서의 동작과 동일하게 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수도 있다.As described above, when performing intra prediction in the same manner as the operation in the video encoding device, when the size of the prediction unit and the size of the transformation unit are the same, the pixel existing on the left of the prediction unit, the pixel existing on the upper left, and the size of the transformation unit are the same. Intra prediction of the prediction unit is performed based on existing pixels, but when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are different, intra prediction is performed using a reference pixel based on the transformation unit. can do. Additionally, intra prediction using NxN partitioning only for the minimum coding unit can be used.
예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 인터 예측부(230)는 영상 부호화 장치에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽쳐 내에서 기-복원된 일부 영역의 정보를 기초로 인터 예측을 수행할 수도 있다.The prediction units 230 and 235 may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit discriminator receives various information such as prediction unit information input from the entropy decoder 210, prediction mode information of the intra prediction method, and motion prediction-related information of the inter prediction method, distinguishes the prediction unit from the current coding unit, and makes predictions. It is possible to determine whether a unit performs inter-prediction or intra-prediction. The inter prediction unit 230 uses the information required for inter prediction of the current prediction unit provided by the video encoding device to determine the current prediction unit based on the information included in at least one of the pictures before or after the current picture including the current prediction unit. Inter prediction can be performed on prediction units. Alternatively, inter prediction may be performed based on information on a pre-restored partial region within the current picture including the current prediction unit.
인터 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode), 인트라 블록 카피 모드 중 어떠한 방법인지 여부를 판단할 수 있다.To perform inter prediction, based on the coding unit, the motion prediction method of the prediction unit included in the coding unit is Skip Mode, Merge Mode, AMVP Mode, and Intra Block Copy Mode. You can judge whether it is a certain method or not.
인트라 예측부(235)는 현재 픽쳐 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 인트라 예측을 수행한 예측 단위인 경우, 영상 부호화 장치에서 제공된 예측 단위의 인트라 예측 모드 정보를 기초로 인트라 예측을 수행할 수 있다. 인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화 장치에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit 235 may generate a prediction block based on pixel information in the current picture. If the prediction unit is a prediction unit that has performed intra prediction, intra prediction may be performed based on intra prediction mode information of the prediction unit provided by the video encoding device. The intra prediction unit 235 may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixels of the current block, and can be applied by determining whether or not to apply the filter according to the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixel of the current block using the prediction mode and AIS filter information of the prediction unit provided by the video encoding device. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.If the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on pixel values obtained by interpolating the reference pixel, the reference pixel interpolator may interpolate the reference pixel to generate a reference pixel in pixel units of an integer value or less. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is DC mode.
복원된 블록 또는 픽쳐는 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The restored block or picture may be provided to the filter unit 240. The filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
영상 부호화 장치로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화 장치의 디블록킹 필터에서는 영상 부호화 장치에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화 장치에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. Information on whether a deblocking filter has been applied to the corresponding block or picture can be provided from the video encoding device, and when a deblocking filter has been applied, information on whether a strong filter or a weak filter has been applied. The deblocking filter of the video decoding device receives information related to the deblocking filter provided by the video encoding device, and the video decoding device can perform deblocking filtering on the corresponding block.
오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.The offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding and offset value information.
ALF는 부호화 장치로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.ALF can be applied to the coding unit based on ALF application availability information, ALF coefficient information, etc. provided from the coding device. This ALF information may be included and provided in a specific parameter set.
메모리(245)는 복원된 픽쳐 또는 블록을 저장하여 참조 픽쳐 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽쳐를 출력부로 제공할 수 있다. 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 an output unit.
전술한 바와 같이 이하, 본 발명의 실시예에서는 설명의 편의상 코딩 유닛(Coding Unit)을 부호화 단위라는 용어로 사용하지만, 부호화 뿐만 아니라 복호화를 수행하는 단위가 될 수도 있다.As described above, hereinafter, in the embodiments of the present invention, the term coding unit is used as a coding unit for convenience of explanation, but it may also be a unit that performs not only encoding but also decoding.
또한, 현재 블록은, 부호화/복호화 대상 블록을 나타내는 것으로, 부호화/복호화 단계에 따라, 코딩 트리 블록(또는 코딩 트리 유닛), 부호화 블록(또는 부호화 유닛), 변환 블록(또는 변환 유닛) 또는 예측 블록(또는 예측 유닛) 등을 나타내는 것일 수 있다. 본 명세서에서, '유닛'은 특정 부호화/복호화 프로세스를 수행하기 위한 기본 단위를 나타내고, '블록'은 소정 크기의 화소 어레이를 나타낼 수 있다. 별도의 구분이 없는 한, '블록'과 '유닛'은 동등한 의미로 사용될 수 있다. 예컨대, 후술되는 실시예에서, 부호화 블록(코딩 블록) 및 부호화 유닛(코딩 유닛)은 상호 동등한 의미인 것으로 이해될 수 있다. In addition, the current block represents an encoding/decoding target block and, depending on the encoding/decoding stage, is a coding tree block (or coding tree unit), a coding block (or coding unit), a transform block (or transform unit), or a prediction block. (or prediction unit), etc. In this specification, 'unit' may represent a basic unit for performing a specific encoding/decoding process, and 'block' may represent a pixel array of a predetermined size. Unless otherwise specified, ‘block’ and ‘unit’ can be used with the same meaning. For example, in embodiments described later, a coding block (coding block) and a coding unit (coding unit) may be understood to have equivalent meanings.
도 3은 본 개시에 따른 영상 부호화/복호화 장치에 의해 수행되는 영상 부호화/복호화 방법을 도시한 것이다.FIG. 3 illustrates an image encoding/decoding method performed by the image encoding/decoding device according to the present disclosure.
도 3을 참조하면, 현재 블록의 인트라 예측을 위한 참조 라인을 결정할 수 있다(S300).Referring to FIG. 3, a reference line for intra prediction of the current block can be determined (S300).
현재 블록은 영상 부호화/복호화 장치에 기-정의된 복수의 참조 라인 후보 중 하나 또는 그 이상을 인트라 예측을 위한 참조 라인으로 이용할 수 있다. 여기서, 기-정의된 복수의 참조 라인 후보는, 복호화 대상인 현재 블록에 인접한 이웃 참조 라인과 현재 블록의 경계로부터 1-샘플 내지 N-샘플만큼 떨어진 N개의 비-이웃 참조 라인을 포함할 수 있다. N은 1, 2, 3, 또는 그 이상의 정수일 수 있다. 이하, 설명의 편의를 위해, 현재 블록이 이용 가능한 복수의 참조 라인 후보는, 이웃 참조 라인 후보과 3개의 비-이웃 참조 라인 후보로 구성됨을 가정하나, 이에 한정되지 아니한다. 즉, 현재 블록이 이용 가능한 복수의 참조 라인 후보는 4개 또는 그 이상의 비-이웃 참조 라인 후보를 포함할 수 있음은 물론이다.The current block may use one or more of a plurality of reference line candidates pre-defined in the video encoding/decoding device as a reference line for intra prediction. Here, the plurality of pre-defined reference line candidates may include a neighboring reference line adjacent to the current block to be decoded and N non-neighboring reference lines that are 1-sample to N-sample away from the boundary of the current block. N may be an integer of 1, 2, 3, or more. Hereinafter, for convenience of explanation, it is assumed that the plurality of reference line candidates available for the current block consists of a neighboring reference line candidate and three non-neighboring reference line candidates, but is not limited thereto. That is, of course, the plurality of reference line candidates available for the current block may include four or more non-neighboring reference line candidates.
영상 부호화 장치는, 복수의 참조 라인 후보 중 최적의 참조 라인 후보를 결정하고, 이를 특정하기 위한 인덱스를 부호화할 수 있다. 영상 복호화 장치는, 비트스트림을 통해 시그날링되는 인덱스에 기초하여, 현재 블록의 참조 라인을 결정할 수 있다. 상기 인덱스는, 복수의 참조 라인 후보 중 어느 하나를 특정할 수 있다. 상기 인덱스에 의해 특정된 참조 라인 후보가 현재 블록의 참조 라인으로 이용될 수 있다. The video encoding device can determine an optimal reference line candidate among a plurality of reference line candidates and encode an index for specifying it. The video decoding device can determine the reference line of the current block based on the index signaled through the bitstream. The index may specify one of a plurality of reference line candidates. The reference line candidate specified by the index can be used as the reference line of the current block.
현재 블록의 참조 라인을 결정하기 위해 시그날링되는 인덱스의 개수는 1개일 수도 있고, 2개 또는 그 이상일 수도 있다. 일 예로, 상기 시그날링되는 인덱스의 개수가 1개인 경우, 현재 블록은 복수의 참조 라인 후보 중에서 상기 시그날링된 인덱스에 의해 특정되는 단일의 참조 라인 후보만을 이용하여 인트라 예측을 수행할 수 있다. 또는, 상기 시그날링되는 인덱스의 개수가 2개 이상인 경우, 현재 블록은 복수의 참조 라인 후보 중에서 복수개의 인덱스에 의해 특정되는 복수의 참조 라인 후보를 이용하여 인트라 예측을 수행할 수 있다.The number of indices signaled to determine the reference line of the current block may be 1, 2, or more. For example, when the number of signaled indices is 1, the current block may perform intra prediction using only a single reference line candidate specified by the signaled index among a plurality of reference line candidates. Alternatively, when the number of signaled indices is two or more, the current block may perform intra prediction using a plurality of reference line candidates specified by a plurality of indices among a plurality of reference line candidates.
도 3을 참조하면, 현재 블록의 인트라 예측 모드를 결정할 수 있다(S310).Referring to FIG. 3, the intra prediction mode of the current block can be determined (S310).
현재 블록의 인트라 예측 모드는 영상 부호화/복호화 장치에 기-정의된 복수의 인트라 예측 모드 중에서 결정될 수 있다. 상기 기-정의된 복수의 인트라 예측 모드는 도 4 및 도 5를 참조하여 살펴보기로 한다.The intra prediction mode of the current block may be determined from a plurality of intra prediction modes predefined in the video encoding/decoding device. The plurality of pre-defined intra prediction modes will be examined with reference to FIGS. 4 and 5.
도 4는 본 개시에 따른 복수의 인트라 예측 모드의 일예를 도시한 것이다.Figure 4 shows an example of a plurality of intra prediction modes according to the present disclosure.
도 4를 참조하면, 영상 부호화/복호화 장치에 기-정의된 복수의 인트라 예측 모드는, 비방향성 모드와 방향성 모드로 구성될 수 있다. 비방향성 모드는, 플래너 모드 또는 DC 모드 중 적어도 하나를 포함할 수 있다. 방향성 모드는, 2번 내지 66번의 방향성 모드를 포함할 수 있다.Referring to FIG. 4, a plurality of intra prediction modes pre-defined in the video encoding/decoding device may be comprised of a non-directional mode and a directional mode. The non-directional mode may include at least one of planar mode or DC mode. The directional mode may include directional modes numbered 2 to 66.
도 4에 도시된 것보다, 방향성 모드를 더 확장할 수도 있다. 도 5는 방향성 모드가 확장된 예를 나타낸다. The directional mode may be expanded further than shown in FIG. 4. Figure 5 shows an example in which the directional mode is expanded.
도 5에서는, -1번부터 -14번 모드와 67번부터 80번 모드가 추가된 것으로 예시되었다. 이들 방향성 모드는 와이드 앵글 인트라 예측 모드라 호칭될 수 있다. 와이드 앵글 인트라 예측 모드를 이용할 것인지 여부는, 현재 블록의 형태에 따라, 결정될 수 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방 형태의 블록인 경우, 일부 방향성 모드(예컨대, 2번부터 15번)가 67번부터 80번 사이의 와이드 앵글 인트라 예측 모드로 전환될 수 있다. 반면, 현재 블록이 높이가 너비보다 큰 비정방 형태의 블록인 경우, 일부 방향성 모드(예컨대, 53번부터 66번)가, -1번부터 -14번 사이의 와이드 앵글 인트라 예측 모드로 전환될 수 있다. In Figure 5, modes -1 to -14 and modes 67 to 80 are illustrated as being added. These directional modes may be referred to as wide angle intra prediction modes. Whether to use the wide angle intra prediction mode can be determined depending on the type of the current block. For example, if the current block is a non-square block with a width greater than the height, some directional modes (eg, 2 to 15) may be converted to wide angle intra prediction modes 67 to 80. On the other hand, if the current block is a non-square block with a height greater than the width, some directional modes (e.g., numbers 53 to 66) may be converted to wide angle intra prediction modes between -1 and -14. there is.
이용 가능한 와이드 앵글 인트라 예측 모드들의 범위는, 현재 블록의 너비와 높이 비율에 따라, 적응적으로 결정될 수 있다. 표 1은 현재 블록의 너비 및 높이 비율에 따른, 이용 가능한 와이드 앵글 인트라 예측 모드들의 범위를 나타낸 것이다.The range of available wide-angle intra prediction modes can be adaptively determined depending on the width-to-height ratio of the current block. Table 1 shows the range of available wide-angle intra prediction modes according to the width and height ratio of the current block.
너비/높이width/height 이용 가능한 와이드 앵글 인트라 예측 모드 범위Wide angle intra prediction mode range available
W/H = 16W/H = 16 67~8067~80
W/H = 8W/H = 8 67~7867~78
W/H = 4W/H = 4 67~7667~76
W/H = 2W/H = 2 67~7467~74
W/H = 1W/H = 1 없음doesn't exist
W/H = 1/2W/H = 1/2 -1~-8-1~-8
W/H = 1/4W/H = 1/4 -1~-10-1~-10
W/H = 1/8W/H = 1/8 -1~-12-1~-12
W/H = 1/16W/H = 1/16 -1~-14-1~-14
상기 복수의 인트라 예측 모드 중에서 K개의 후보 모드(most probable mode, MPM)를 선택할 수 있다. 선택된 후보 모드를 포함한 후보 리스트가 생성될 수 있다. 후보 리스트에 속한 후보 모드 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 상기 인덱스에 의해 지시된 후보 모드에 기초하여 현재 블록의 인트라 예측 모드가 결정될 수 있다. 일 예로, 상기 인덱스에 의해 지시된 후보 모드가 현재 블록의 인트라 예측 모드로 설정될 수 있다. 또는, 현재 블록의 인트라 예측 모드는, 상기 인덱스에 의해 지시된 후보 모드의 값과 소정의 차분값에 기초하여 결정될 수도 있다. 상기 차분값은, 상기 현재 블록의 인트라 예측 모드의 값과 상기 인덱스에 의해 지시된 후보 모드의 값 간의 차이로 정의될 수 있다. 상기 차분값은 비트스트림을 통해 시그날링될 수 있다. 또는, 상기 차분값은 영상 부호화/복호화 장치에 기-정의된 값일 수도 있다.또는, 현재 블록의 인트라 예측 모드는, 상기 후보 리스트에 현재 블록의 인트라 예측 모드와 동일한 모드가 존재하는지 여부를 나타내는 플래그에 기초하여 결정될 수 있다. 일 예로, 상기 플래그가 제1 값인 경우, 현재 블록의 인트라 예측 모드는 상기 후보 리스트로부터 결정될 수 있다. 이 경우, 후보 리스트에 속한 복수의 후보 모드 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 상기 인덱스에 의해 지시된 후보 모드가 현재 블록의 인트라 예측 모드로 설정될 수 있다. 반면, 상기 플래그가 제2 값인 경우, 나머지 인트라 예측 모드 중 어느 하나가 현재 블록의 인트라 예측 모드로 설정될 수 있다. 상기 나머지 인트라 예측 모드는, 기-정의된 복수의 인트라 예측 모드 중 상기 후보 리스트에 속한 후보 모드를 제외한 모드를 의미할 수 있다. 상기 플래그가 제2 값인 경우, 상기 나머지 인트라 예측 모드 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 시그날링된 인덱스에 의해 지시된 인트라 예측 모드가 현재 블록의 인트라 예측 모드로 설정될 수 있다.크로마 블록의 인트라 예측 모드는, 복수의 크로마 블록의 인트라 예측 모드 후보들 중에서 선택될 수 있다. 이를 위해, 크로마 블록의 인트라 예측 모드 후보들 중 하나를 지시하는 인덱스 정보가 명시적으로 부호화되어 비트스트림을 통해 시그날링될 수 있다. 표 2는 크로마 블록의 인트라 예측 모드 후보들을 예시한 것이다.Among the plurality of intra prediction modes, K candidate modes (most probable mode, MPM) can be selected. A candidate list including the selected candidate mode may be created. An index indicating one of the candidate modes belonging to the candidate list may be signaled. The intra prediction mode of the current block may be determined based on the candidate mode indicated by the index. As an example, the candidate mode indicated by the index may be set as the intra prediction mode of the current block. Alternatively, the intra prediction mode of the current block may be determined based on the value of the candidate mode indicated by the index and a predetermined difference value. The difference value may be defined as the difference between the value of the intra prediction mode of the current block and the value of the candidate mode indicated by the index. The difference value may be signaled through a bitstream. Alternatively, the difference value may be a value pre-defined in the video encoding/decoding device. Alternatively, the intra prediction mode of the current block may be a flag indicating whether a mode identical to the intra prediction mode of the current block exists in the candidate list. It can be decided based on . For example, when the flag is the first value, the intra prediction mode of the current block may be determined from the candidate list. In this case, an index indicating one of a plurality of candidate modes belonging to the candidate list may be signaled. The candidate mode indicated by the index may be set as the intra prediction mode of the current block. On the other hand, when the flag is the second value, one of the remaining intra prediction modes may be set as the intra prediction mode of the current block. The remaining intra prediction modes may refer to modes excluding candidate modes belonging to the candidate list among a plurality of pre-defined intra prediction modes. When the flag is the second value, an index indicating one of the remaining intra prediction modes may be signaled. The intra prediction mode indicated by the signaled index may be set as the intra prediction mode of the current block. The intra prediction mode of the chroma block may be selected from among the intra prediction mode candidates of a plurality of chroma blocks. To this end, index information indicating one of the intra prediction mode candidates of the chroma block can be explicitly encoded and signaled through a bitstream. Table 2 illustrates intra prediction mode candidates for chroma block.
인덱스index 크로마 블록을 위한 인트라 예측 모드 후보Intra prediction mode candidates for chroma blocks
루마모드:0Luma Mode: 0 루마모드:50Luma mode: 50 루마모드:18Luma Mode: 18 루마모드:1Luma Mode: 1 그외 etc
00 6666 00 00 00 00
1One 5050 6666 5050 5050 5050
22 1818 1818 6666 1818 1818
33 1One 1One 1One 6666 1One
44 DMDM
표 2의 예에서, DM(Direct Mode)는, 크로마 블록과 동일 위치에 존재하는 루마 블록의 인트라 예측 모드를, 크로마 블록의 인트라 예측 모드로 설정하는 것을 의미한다. 한편, 크로마 블록과 동일 위치에 존재하는 루마 블록은, 크로마 블록의 좌상단 샘플의 위치 또는 중앙 샘플의 위치를 기준으로 결정될 수 있다. 일 예로, 루마 블록의 인트라 예측 모드(루마 모드)가 0번(평면모드)이고, 인덱스가 2번을 가리킨다면, 크로마 블록의 인트라 예측 모드는, 수평 모드(18번)로 결정될 수 있다.일 예로, 루마 블록의 인트라 예측 모드(루마 모드)가 1번(DC모드)이고, 인덱스가 0번을 가리킨다면, 크로마 블록의 인트라 예측 모드는 플래너 모드(0번)로 결정될 수 있다. In the example of Table 2, Direct Mode (DM) means setting the intra prediction mode of the luma block existing at the same location as the chroma block to the intra prediction mode of the chroma block. Meanwhile, a luma block that exists at the same location as a chroma block may be determined based on the location of the upper left sample or the center sample of the chroma block. For example, if the intra prediction mode (luma mode) of the luma block is number 0 (flat mode) and the index points to number 2, the intra prediction mode of the chroma block may be determined to be the horizontal mode (number 18). For example, if the intra prediction mode (luma mode) of the luma block is number 1 (DC mode) and the index indicates number 0, the intra prediction mode of the chroma block may be determined as planar mode (number 0).
결과적으로, 크로마 블록의 인트라 예측 모드도 도 4 또는 도 5에 도시된 인트라 예측 모드들 중 하나로 설정될 수 있다. 현재 블록의 인트라 예측 모드는 현재 블록의 참조 라인을 결정하기 위해 이용될 수도 있으며, 이 경우 S310 단계는 S300 단계 전에 수행될 수도 있다.As a result, the intra prediction mode of the chroma block can also be set to one of the intra prediction modes shown in FIG. 4 or FIG. 5. The intra prediction mode of the current block may be used to determine the reference line of the current block, in which case step S310 may be performed before step S300.
도 3을 참조하면, 현재 블록의 참조 라인과 인트라 예측 모드에 기초하여 현재 블록에 대해 인트라 예측을 수행할 수 있다(S320).Referring to FIG. 3, intra prediction may be performed on the current block based on the reference line and intra prediction mode of the current block (S320).
이하, 도 6 내지 도 8을 참조하여 인트라 예측 모드 별 인트라 예측 방법에 대해서 자세히 살펴보기로 한다. 다만, 설명의 편의를 위해, 현재 블록의 인트라 예측을 위해 단일 참조 라인이 이용됨을 가정하나, 복수의 참조 라인이 이용되는 경우에도 후술하는 인트라 예측 방법이 동일/유사하게 적용될 수 있다.Hereinafter, we will look at the intra prediction method for each intra prediction mode in detail with reference to FIGS. 6 to 8. However, for convenience of explanation, it is assumed that a single reference line is used for intra prediction of the current block. However, even when multiple reference lines are used, the intra prediction method described later may be applied in the same/similar manner.
도 6은 본 개시에 따른 플래너 모드 기반의 인트라 예측 방법을 도시한 것이다.Figure 6 illustrates a planar mode-based intra prediction method according to the present disclosure.
도 6을 참조하면, T는 현재 블록의 우상단 코너에 위치하는 참조 샘플을, L은 현재 블록의 좌하단 코너에 위치하는 참조 샘플을 나타낸다. P1은 수평 방향의 보간을 통해 생성될 수 있다. 일 예로, P1은 P1과 동일한 수평 라인에 위치한 참조 샘플과 T를 보간하여 생성될 수 있다. P2는 수직 방향의 보간을 통해 생성될 수 있다. 일 예로, P2는 P2와 동일한 수직 라인에 위치한 참조 샘플과 L을 보간하여 생성될 수 있다. 현재 블록 내 현재 샘플은, 다음 수학식 1과 같이, P1과 P2의 가중합을 통해 예측될 수 있다.Referring to FIG. 6, T represents a reference sample located at the upper right corner of the current block, and L represents a reference sample located at the lower left corner of the current block. P1 can be generated through horizontal interpolation. As an example, P1 can be generated by interpolating T with a reference sample located on the same horizontal line as P1. P2 can be generated through interpolation in the vertical direction. As an example, P2 can be generated by interpolating L with a reference sample located on the same vertical line as P2. The current sample in the current block can be predicted through the weighted sum of P1 and P2, as shown in Equation 1 below.
Figure PCTKR2023017031-appb-img-000001
Figure PCTKR2023017031-appb-img-000001
수학식 1에서, 가중치 α와 β는, 현재 블록의 너비와 높이를 고려하여 결정될 수 있다. 현재 블록의 너비와 높이에 따라, 가중치 α와 β는 동일한 값을 가질 수도 있고, 서로 상이한 값을 가질 수도 있다. 만약 현재 블록의 너비와 높이가 같다면, 가중치 α와 β를 동일하게 설정할 수 있고, 현재 샘플의 예측 샘플은 P1과 P2의 평균값으로 설정될 수 있다. 현재 블록의 너비와 높이가 같지 않은 경우, 가중치 α와 β는 서로 상이한 값을 가질 수 있다. 일 예로, 너비가 높이보다 큰 경우, 현재 블록의 너비에 대응하는 가중치에 더 작은 값을 설정하고, 현재 블록의 높이에 대응하는 가중치에 더 큰 값을 설정할 수 있다. 역으로, 너비가 높이보다 큰 경우, 현재 블록의 너비에 대응하는 가중치에 더 큰 값을 설정하고, 현재 블록의 높이에 대응하는 가중치에 더 작은 값을 설정할 수 있다. 여기서, 현재 블록의 너비에 대응하는 가중치는 β를 의미하고, 현재 블록의 높이에 대응하는 가중치는 α를 의미할 수 있다.In Equation 1, the weights α and β can be determined considering the width and height of the current block. Depending on the width and height of the current block, weights α and β may have the same value or different values. If the width and height of the current block are the same, the weights α and β can be set to be the same, and the prediction sample of the current sample can be set to the average value of P1 and P2. If the width and height of the current block are not the same, the weights α and β may have different values. For example, if the width is greater than the height, a smaller value can be set to the weight corresponding to the width of the current block, and a larger value can be set to the weight corresponding to the height of the current block. Conversely, if the width is greater than the height, a larger value can be set to the weight corresponding to the width of the current block, and a smaller value can be set to the weight corresponding to the height of the current block. Here, the weight corresponding to the width of the current block may mean β, and the weight corresponding to the height of the current block may mean α.
도 7은 본 개시에 따른 DC 모드 기반의 인트라 예측 방법을 도시한 것이다.Figure 7 shows a DC mode-based intra prediction method according to the present disclosure.
도 7을 참조하면, 현재 블록에 인접한 주변 샘플의 평균값을 산출하고, 산출된 평균값을 현재 블록 내 모든 샘플의 예측값으로 설정할 수 있다. 여기서, 주변 샘플은, 현재 블록의 상단 참조 샘플과 좌측 참조 샘플을 포함할 수 있다. 다만, 현재 블록의 형태에 따라, 상단 참조 샘플 또는 좌측 참조 샘플만을 이용하여 평균값을 산출할 수도 있다. 일 예로, 현재 블록의 너비가 높이보다 큰 경우, 현재 블록의 상단 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 크거나 같은 경우, 현재 블록의 상단 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 작거나 같은 경우, 현재 블록의 상단 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 반면, 현재 블록의 너비가 높이보다 작은 경우, 현재 블록의 좌측 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 작거나 같은 경우, 현재 블록의 좌측 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 크거나 같은 경우, 현재 블록의 좌측 참조 샘플만을 이용하여 평균값을 산출할 수 있다.Referring to FIG. 7, the average value of neighboring samples adjacent to the current block can be calculated, and the calculated average value can be set as the predicted value of all samples in the current block. Here, the surrounding samples may include the top reference sample and the left reference sample of the current block. However, depending on the type of the current block, the average value may be calculated using only the top reference sample or the left reference sample. For example, if the width of the current block is greater than the height, the average value can be calculated using only the top reference sample of the current block. Alternatively, if the ratio of the width and height of the current block is greater than or equal to a predetermined threshold, the average value can be calculated using only the top reference sample of the current block. Alternatively, if the ratio of the width and height of the current block is less than or equal to a predetermined threshold, the average value can be calculated using only the upper reference sample of the current block. On the other hand, if the width of the current block is smaller than the height, the average value can be calculated using only the left reference sample of the current block. Alternatively, if the ratio of the width and height of the current block is less than or equal to a predetermined threshold, the average value can be calculated using only the left reference sample of the current block. Alternatively, if the ratio of the width and height of the current block is greater than or equal to a predetermined threshold, the average value can be calculated using only the left reference sample of the current block.
도 8은 본 개시에 따른 방향성 모드 기반의 인트라 예측 방법을 도시한 것이다.Figure 8 illustrates a directional mode-based intra prediction method according to the present disclosure.
현재 블록의 인트라 예측 모드가 방향성 모드인 경우, 해당 방향성 모드의 각도에 따라 참조 라인으로 프로젝션(projection)을 수행할 수 있다. 프로젝션된 위치에 참조 샘플이 존재하면, 해당 참조 샘플을 현재 샘플의 예측 샘플로 설정할 수 있다. 만약 프로젝션된 위치에 참조 샘플이 존재하지 않으면, 프로젝션된 위치에 이웃한 하나 또는 그 이상의 주변 샘플을 이용하여 프로젝션된 위치에 대응하는 샘플을 생성할 수 있다. 일 예로, 프로젝션된 위치를 기준으로 양방향으로 이웃한 2개 또는 그 이상의 주변 샘플을 기반으로 보간을 수행하여, 프로젝션된 위치에 대응하는 샘플을 생성할 수 있다. 또는, 프로젝션된 위치에 이웃한 하나의 주변 샘플을 프로젝션된 위치에 대응하는 샘플로 설정할 수 있다. 이때, 프로젝션된 위치에 이웃한 복수의 주변 샘플 중 프로젝션된 위치에 가장 가까운 주변 샘플이 이용될 수 있다. 프로젝션된 위치에 대응하는 샘플을 현재 샘플의 예측 샘플로 설정할 수 있다.If the intra prediction mode of the current block is a directional mode, projection can be performed to a reference line according to the angle of the directional mode. If a reference sample exists at the projected position, the reference sample can be set as the prediction sample of the current sample. If a reference sample does not exist at the projected position, a sample corresponding to the projected position may be generated using one or more surrounding samples adjacent to the projected position. As an example, interpolation may be performed based on two or more neighboring samples in both directions based on the projected position, thereby generating a sample corresponding to the projected position. Alternatively, one surrounding sample adjacent to the projected position can be set as the sample corresponding to the projected position. At this time, among a plurality of neighboring samples adjacent to the projected position, the neighboring sample closest to the projected position may be used. The sample corresponding to the projected position can be set as the predicted sample of the current sample.
도 8을 참조하면, 현재 샘플 B의 경우, 해당 위치에서 인트라 예측 모드의 각도에 따라 참조 라인으로 프로젝션을 수행할 경우, 프로젝션된 위치에 참조 샘플이 존재한다(즉, 정수 위치의 참조 샘플, R3). 이 경우, 프로젝션된 위치의 참조 샘플을 현재 샘플 B의 예측 샘플로 설정할 수 있다. 현재 샘플 A의 경우, 해당 위치에서 인트라 예측 모드의 각도에 따라 참조 라인으로 프로젝션을 수행할 경우, 프로젝션된 위치에 참조 샘플(즉, 정수 위치의 참조 샘플)이 존재하지 않는다. 이 경우, 프로젝션된 위치에 이웃한 주변 샘플(예를 들어, R2와 R3)을 기반으로 보간을 수행하여 분수 위치의 샘플(r)을 생성할 수 있다. 생성된 분수 위치의 샘플(r)을 현재 샘플 A의 예측 샘플로 설정할 수 있다.Referring to FIG. 8, in the case of the current sample B, when projection is performed from that position to the reference line according to the angle of the intra prediction mode, a reference sample exists at the projected position (i.e., a reference sample at an integer position, R3 ). In this case, the reference sample of the projected position can be set as the predicted sample of the current sample B. In the case of the current sample A, when projection is performed from that position to the reference line according to the angle of the intra prediction mode, there is no reference sample (i.e., reference sample at the integer position) at the projected position. In this case, interpolation may be performed based on surrounding samples (e.g., R2 and R3) neighboring the projected position to generate a sample (r) of the fractional position. The sample (r) at the generated fractional position can be set as the predicted sample of the current sample A.
도 9는 분수 위치의 샘플을 유도하는 방법을 도시한 것이다. Figure 9 shows a method for deriving samples of fractional positions.
도 9의 예에서, 변수 h는 예측 샘플 A의 위치와 참조 샘플 라인 까지의 수직 방향거리(즉, 세로 거리)를 의미하고, 변수 w는 예측 샘플 A의 위치와 분수 위치 샘플 까지의 수평 방향 거리(즉, 가로 거리)를 의미한다. 또한, 변수 θ는, 인트라 예측 모드의 방향성에 따라 미리 정의된 각도를 의미하고, 변수 x는, 분수 위치를 의미한다.In the example of Figure 9, the variable h refers to the vertical distance (i.e., vertical distance) from the position of the predicted sample A to the reference sample line, and the variable w refers to the horizontal distance from the position of the predicted sample A to the fractional position sample. (i.e., horizontal distance). Additionally, the variable θ refers to an angle predefined according to the directionality of the intra prediction mode, and the variable x refers to the fractional position.
변수 w는 다음의 수학식 2와 같이 유도될 수 있다. The variable w can be derived as in Equation 2 below.
Figure PCTKR2023017031-appb-img-000002
Figure PCTKR2023017031-appb-img-000002
이후, 변수 w에서, 정수 위치를 제거하면, 최종적으로, 분수 위치가 유도될 수 있다. Then, by removing the integer positions from the variable w, finally, the fractional positions can be derived.
분수 위치 샘플은 인접하는 정수 위치 참조 샘플들을 보간하여 생성될 수 있다. 일 예로, 정수 위치 참조 샘플 R2 및 정수 위치 참조 샘플 R3를 보간하여, x 위치의 분수 위치 참조 샘플을 생성할 수 있다. Fractional position samples can be generated by interpolating adjacent integer position reference samples. As an example, the integer position reference sample R2 and the integer position reference sample R3 may be interpolated to generate a fractional position reference sample at the x position.
분수 위치 샘플을 유도함에 있어서, 실수 연산을 피하기 위해, 스케일링 팩터를 사용할 수 있다. 일 예로, 스케일링 팩터 f가 32로 설정된 경우, 도 8의 (b)에 도시된 예에서와 같이, 이웃하는 정수 참조 샘플들 사이의 거리가 1이 아닌 32로 설정될 수 있다. In deriving fractional position samples, a scaling factor can be used to avoid real numbers. For example, when the scaling factor f is set to 32, the distance between neighboring integer reference samples may be set to 32 instead of 1, as in the example shown in (b) of FIG. 8.
또한, 인트라 예측 모드의 방향성에 따라 결정되는 각도 θ에 대한 탄젠트 값도 동일한 스케일링 팩터(예컨대, 32)를 이용하여 스케일업할 수 있다. Additionally, the tangent value for the angle θ determined according to the directionality of the intra prediction mode can also be scaled up using the same scaling factor (eg, 32).
도 10 및 도 11은 인트라 예측 모드별, 각도에 대한 탄젠트 값이 32배 스케일링된 것을 도시한 것이다.Figures 10 and 11 show that the tangent value for the angle is scaled by 32 times for each intra prediction mode.
도 10은, 비-와이드 앵글 인트라 예측 모드에 대한, 탄젠트 값의 스케일링된 결과를 나타낸 것이고, 도 11은 와이드 앵글 인트라 예측 모드에 대한, 탄젠트 값의 스케일링된 결과를 나타낸 것이다.FIG. 10 shows the scaled results of tangent values for the non-wide angle intra prediction mode, and FIG. 11 shows the scaled results of the tangent values for the wide angle intra prediction mode.
인트라 예측 모드의 각도 값에 대한 탄젠트 값(tanθ)이 양수인 경우, 현재 블록의 상단 라인에 속하는 참조 샘플들(즉, 상단 참조 샘플들) 또는 현재 블록의 좌측 라인에 속하는 참조 샘플들(즉, 좌측 참조 샘플들) 중 한쪽만을 사용하여 인트라 예측이 수행될 수 있다. 한편, 인트라 예측 모드의 각도 값에 대한 탄젠트값이 음수인 경우, 상단에 위치하는 참조 샘플들과 좌측에 위치하는 참조 샘플들이 모두 이용된다. If the tangent value (tanθ) to the angle value in intra prediction mode is positive, reference samples belonging to the top line of the current block (i.e., top reference samples) or reference samples belonging to the left line of the current block (i.e., left Intra prediction can be performed using only one of the reference samples. Meanwhile, when the tangent value for the angle value of the intra prediction mode is negative, both the reference samples located at the top and the reference samples located on the left are used.
이때, 구현의 간소화를 위해, 좌측 참조 샘플들을 위쪽으로 프로젝션 하거나, 상단 참조 샘플들을 좌측으로 프로젝션 하여, 참조 샘플들을 1D 어레이 형태로 배열하고, 1D 어레이 형태의 참조 샘플들을 이용하여 인트라 예측을 수행하도록 할 수도 있다. At this time, to simplify implementation, the left reference samples are projected upward, or the upper reference samples are projected to the left, the reference samples are arranged in a 1D array, and intra prediction is performed using the reference samples in the 1D array. You may.
도 12는 방향성 모드가 34번 내지 49번 모드 중 하나인 경우, 인트라 예측 양상을 예시한 도면이다.Figure 12 is a diagram illustrating an intra prediction aspect when the directional mode is one of modes 34 to 49.
현재 블록의 인트라 예측 모드가 34번 내지 49번 모드 중 하나인 경우, 현재 블록의상단 참조 샘플들 뿐만 아니라, 좌측 참조 샘플들을 이용하여 인트라 예측이 수행된다. 이때, 도 12에 도시된 예에서와 같이, 현재 블록의 좌측에 위치하는 참조 샘플을 상단 라인의 위치로 복사하거나, 좌측에 위치하는 참조 샘플들을 보간하여 상단 라인의 참조 샘플을 생성할 수 있다. When the intra prediction mode of the current block is one of modes 34 to 49, intra prediction is performed using not only the top reference samples of the current block but also the left reference samples. At this time, as in the example shown in FIG. 12, the reference sample located on the left of the current block can be copied to the position of the top line, or the reference samples located on the left can be interpolated to generate the reference sample of the top line.
일 예로, 현재 블록 상단의 A 위치에 대한 참조 샘플을 획득하고자 하는 경우, 현재 블록의 인트라 예측 모드의 방향성을 고려하여, 상단 라인의 A 위치에서, 현재 블록의 좌측 라인에 프로젝션을 수행할 수 있다. 프로젝션된 위치를 a라 할 경우, a 위치에 대응하는 값을 복사하거나, a에 대응하는 분수 위치 값을 생성하여, A 위치의 값으로 설정할 수 있다. 일 예로, a 위치가 정수 위치인 경우, 정수 위치 참조 샘플을 복사하여 A 위치의 값을 생성할 수 있다. 반면, a 위치가 분수 위치인 경우, a 위치의 상측에 위치하는 참조 샘플 및 a 위치의 하측에 위치하는 참조 샘플을 보간하고, 보간된 값을 A 위치의 값으로 설정할 수 있다. 한편, 현재 블록 상단의 A 위치에서, 현재 블록의 좌측 라인으로 프로젝션되는 방향은, 현재 블록의 인트라 예측 모드의 방향과 평행이면서, 반대 방향일 수 있다. For example, if you want to obtain a reference sample for the A position at the top of the current block, considering the directionality of the intra prediction mode of the current block, projection can be performed from the A position on the top line to the left line of the current block. . If the projected position is called a, the value corresponding to the position a can be copied, or a fractional position value corresponding to a can be created and set as the value of the A position. For example, if the position a is an integer position, the value of the position A can be generated by copying the integer position reference sample. On the other hand, when the a position is a fractional position, the reference sample located above the a position and the reference sample located below the a position can be interpolated, and the interpolated value can be set as the value of the A position. Meanwhile, at position A at the top of the current block, the direction projected to the left line of the current block may be parallel to and opposite to the direction of the intra prediction mode of the current block.
도 13은 좌측 참조 샘플들을 보간하여 상단 참조 샘플을 생성하는 예를 설명하기 위한 도면이다.Figure 13 is a diagram for explaining an example of generating an upper reference sample by interpolating left reference samples.
도 13에서, 변수 h는, 상단 라인의 A 위치와 좌측 라인의 a 위치 사이의 수평 방향 거리를 나타낸다. 변수 w는, 상단 라인의 A 위치와 좌측 라인의 a 위치 사이의 수직 방향 거리를 나타낸다. 또한, 변수 θ는, 인트라 예측 모드의 방향성에 따라 미리 정의된 각도를 의미하고, 변수 x는, 분수 위치를 의미한다.In Figure 13, the variable h represents the horizontal distance between the position A on the top line and the position A on the left line. The variable w represents the vertical distance between the position A on the top line and the position A on the left line. Additionally, the variable θ refers to an angle predefined according to the directionality of the intra prediction mode, and the variable x refers to the fractional position.
변수 h는 다음의 수학식 3과 같이 유도될 수 있다. The variable h can be derived as in Equation 3 below.
Figure PCTKR2023017031-appb-img-000003
Figure PCTKR2023017031-appb-img-000003
이후, 변수 h에서, 정수 위치를 제거하면, 최종적으로, 분수 위치가 유도될 수 있다. Then, by removing the integer positions from the variable h, finally, the fractional positions can be derived.
분수 위치 샘플을 유도함에 있어서, 실수 연산을 피하기 위해, 스케일링 팩터를 사용할 수 있다. 일 예로, 변수 θ에 대한 탄젠트 값을 스케일링 팩터 f1을 이용하여 스케일링할 수 있다. 여기서, 좌측 라인으로 프로젝션되는 방향은, 방향성 예측 모와 평행이면서 반대이므로, 도 10 및 도 11에 도시된 스케일된 탄젠트 값을 사용할 수도 있다. In deriving fractional position samples, a scaling factor can be used to avoid real numbers. As an example, the tangent value for variable θ can be scaled using the scaling factor f1. Here, since the direction projected to the left line is parallel and opposite to the directional prediction model, the scaled tangent value shown in FIGS. 10 and 11 may be used.
스케일링 팩터 f1이 적용된 경우, 수학식 3은, 다음의 수학식 4와 같이, 변형 사용될 수 있다. When the scaling factor f1 is applied, Equation 3 can be modified and used as shown in Equation 4 below.
Figure PCTKR2023017031-appb-img-000004
Figure PCTKR2023017031-appb-img-000004
위와 같은 방식으로, 상단 라인에 속하는 참조 샘플들만으로 1D 참조 샘플 어레이를 구성할 수 있다. 이 결과, 1D 어레이로 구성된 상단 참조 샘플들만을 이용하여, 현재 블록에 대한 인트라 예측을 수행할 수 있다. In the same way as above, a 1D reference sample array can be constructed only with reference samples belonging to the top line. As a result, intra prediction for the current block can be performed using only the upper reference samples composed of a 1D array.
도 14는 1D 어레이로 배열된 참조 샘플들을 이용하여, 인트라 예측이 수행되는 예를 나타낸 것이다.Figure 14 shows an example in which intra prediction is performed using reference samples arranged in a 1D array.
도 14에 도시된 예에서와 같이, 좌측 참조 샘플들을 프로젝션하여, 상단 참조 샘플들을 생성함으로써, 상단 라인에 속하는 참조 샘플들만을 이용하여 현재 블록의 예측 샘플들이 획득될 수 있다. As in the example shown in FIG. 14, by projecting left reference samples to generate top reference samples, prediction samples of the current block can be obtained using only reference samples belonging to the top line.
도 12 및 도 14에 도시된 것과 반대로, 상단 참조 샘플을 좌측 라인에 프로젝션하여, 좌측 라인에 속하는 참조 샘플들만으로 1D 참조 샘플 어레이를 구성할 수도 있다. 구체적으로, 방향성 모드의 각도에 대한 탄젠트 값(tanθ)이 음수인 방향성 모드들 중 19번 내지 33번 모드들에 대해서는, 상단 라인에 속한 참조 샘플들을 좌측 라인으로 프로젝션 하여, 좌측 참조 샘플을 생성할 수 있다. Contrary to what is shown in FIGS. 12 and 14, the top reference sample may be projected onto the left line to form a 1D reference sample array using only reference samples belonging to the left line. Specifically, for modes 19 to 33 among the directional modes in which the tangent value (tanθ) for the angle of the directional mode is negative, reference samples belonging to the top line are projected to the left line to generate a left reference sample. You can.
상술한 바와 같이, 픽처는, 블록 단위로 부/복호화될 수 있다. 일 예로, 픽처를, 기 결정된 크기의 블록들로 분할할 수 있다. 기 결정된 크기의 블록을, 코딩 트리 블록(Coding Tree Block, 또는 코딩 트리 유닛) 또는 기준 블록이라 호칭할 수 있다. 기준 블록의 크기를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 시퀀스 파라미터 세트, 또는 픽처 헤더를 통해 코딩 트리 블록의 크기를 나타내는 정보가 부호화될 수 있다.As described above, pictures can be encoded/decoded in block units. As an example, a picture may be divided into blocks of a predetermined size. A block of a predetermined size may be called a coding tree block (Coding Tree Block, or coding tree unit) or a reference block. Information indicating the size of the reference block may be signaled through a bitstream. As an example, information indicating the size of a coding tree block may be encoded through a sequence parameter set or a picture header.
이후, 기준 블록 내에서 기 정의된 트리 구조들 중 적어도 하나에 기반하여, 기준 블록을 다양한 크기의 블록들로 추가할 수 있다. 그리고 나서, 분할된 블록들마다 예측, 변환, 양자화 및/또는 엔트로피 부호화 등의 부/복호화 처리가 수행될 수 있다. 분할된 블록들 각각은, 코딩 블록, 예측 블록 또는 변환 블록일 수 있다. Thereafter, blocks of various sizes may be added to the standard block based on at least one of the tree structures predefined within the standard block. Then, encoding/decoding processing such as prediction, transformation, quantization, and/or entropy coding may be performed on each divided block. Each of the divided blocks may be a coding block, prediction block, or transform block.
한편, 컬러 픽처의 경우, 루마 픽처와 크로마 픽처를 각각 부/복호화하게 된다. 이때, 크로마 픽처의 경우, 루마 픽처와 유사한 특성을 갖는 경우가 일반적이다. 즉, 크로마 픽처 내 크로마 샘플들의 특성이, 루마 픽처 내 동일 위치 루마 샘플들의 특성과 유사한 경향이 존재한다. 이와 같은 성질을 이용하여, 컬러 콤포넌트들 중 하나의 기준 콤포넌트 대해서만, 기준 블록에 대한 분할 구조를 독자적으로 결정하고, 다른 콤포넌트에서는, 기존 콤포넌트에서 결정된 트리 구조를 동일하게 적용할 수 있다. 이와 같이, 기준 콤포넌트의 트리 분할 구조가 타 콤포넌트에 그대로 적용되는 분할 구조를, 싱글 트리 구조라 호칭할 수 있다. Meanwhile, in the case of a color picture, the luma picture and the chroma picture are encoded/decoded respectively. At this time, chroma pictures generally have similar characteristics to luma pictures. That is, the characteristics of chroma samples within a chroma picture tend to be similar to the characteristics of luma samples at the same location within a luma picture. Using this property, the division structure for the standard block can be independently determined for only one standard component among the color components, and the tree structure determined in the existing component can be applied in the same way to other components. In this way, a division structure in which the tree division structure of the standard component is directly applied to other components may be called a single tree structure.
한편, 후술되는 실시예들에서는, 기준 콤포넌트가 루마 성분인 것으로 가정한다. 즉, 루마 성분에 대해서는 독립적으로 트리 분할 구조가 적용되는 한편, 크로마 성분에는, 루마 성분의 트리 분할 구조가 그대로 적용되는 것으로 가정한다.Meanwhile, in embodiments described later, it is assumed that the reference component is a luma component. That is, it is assumed that the tree division structure is independently applied to the luma component, while the tree division structure of the luma component is applied as is to the chroma component.
기준 콤포넌트에서의 트리 분할 구조에 대한 정보가 명시적으로 부호화되어 시그날링될 수 있다. 일 예로, 루마 기준 블록에 대한 트리 분할 구조 정보가 부호화되어 시그날링될 수 있다. 반면, 크로마 기준 블록에 대해서는, 트리 분할 구조 정보의 부/복호화가 생략되고, 루마 기준 블록에서의 트리 분할 구조 정보가 동일하게 사용될 수 있다. Information about the tree division structure in the reference component may be explicitly encoded and signaled. As an example, tree partition structure information about the luma reference block may be encoded and signaled. On the other hand, for the chroma reference block, the encoding/decoding of the tree division structure information is omitted, and the tree division structure information in the luma reference block can be used in the same way.
도 15는 싱글 트리 구조가 사용되는 경우, 부/복호화 순서를 설명하기 위한 도면이다. Figure 15 is a diagram for explaining the encoding/decoding order when a single tree structure is used.
도 15에 도시된 예에서와 같이, 싱글 트리 구조가 적용되는 경우, 루마 기준 블록에 대한 트리 분할 구조는 크로마 기준 블록에 그대로 적용될 수 있다. 이에 따라, 크로마 기준 블록에 대한 분할 형태는 루마 기준 블록에 대한 분할 형태와 동일하다. As in the example shown in FIG. 15, when a single tree structure is applied, the tree division structure for the luma reference block can be directly applied to the chroma reference block. Accordingly, the division form for the chroma reference block is the same as the division form for the luma reference block.
한편, 부/복호화는, 루마 성분 및 크로마 성분을 번갈아가는 순서로 수행될 수 있다. 일 예로, 도 15에서, 각 리프 노드 블록에 기입된 숫자는, 부/복호화 순서를 나타낸다. Meanwhile, encoding/decoding may be performed in an alternate order of luma components and chroma components. As an example, in Figure 15, numbers written in each leaf node block indicate the encoding/decoding order.
한편, 컬러 콤포넌트들 각각에 대한 트리 구조가 독립 적으로 결정되는 분할 구조를 듀얼 트리 구조라 호칭할 수 있다. 듀얼 트리 구조가 적용되는 경우, 루마 성분에 대한 트리 분할 구조의 정보 및 크로마 성분에 대한 트리 분할 구조 정보가 독립적으로 부호화되어 시그날링될 수 있다. Meanwhile, a division structure in which the tree structure for each color component is independently determined can be called a dual tree structure. When a dual tree structure is applied, tree partition structure information for the luma component and tree partition structure information for the chroma component may be independently encoded and signaled.
도 16은 듀얼 트리 구조가 사용되는 경우, 부/복호화 순서를 설명하기 위한 도면이다. Figure 16 is a diagram for explaining the encoding/decoding order when a dual tree structure is used.
듀얼 트리 구조가 적용되는 경우, 어느 한 콤포넌트에 대한 부/복호화가 종료된 후, 다음 콤포넌트에 대한 부/복호화가 시작될 수 있다. When a dual tree structure is applied, after encoding/decoding for one component is completed, encoding/decoding for the next component may begin.
일 예로, 루마 성분 픽처에 대한 부/복호화가 종료된 이후, 크로마 성분 픽처에 대한 부/복호화가 수행될 수 있다. As an example, after encoding/decoding of the luma component picture is completed, encoding/decoding of the chroma component picture may be performed.
또는, 기준 블록 단위로 성분간 부/복호화 순서를, 기준 블록 단위로 설정할 수 있다.일 예로, 루마 성분 기준 블록에 대한 부/복호화가 종료된 이후, 되, 크로마 성분 기준 블록에 대한 부/복호화가 수행될 수 있다. Alternatively, the encoding/decoding order between components can be set on a reference block basis. As an example, after encoding/decoding for the luma component reference block is completed, encoding/decoding for the chroma component reference block is performed. can be performed.
도 16에 도시된 예에서, 블록 내 기입된 숫자는 부/복호화 순서를 나타낸다. 도 16의 예에서는, 루마 성분의 기준 블록이, 크로마 성분의 기준 블록보다 먼저 부/복호화되는 것으로 예시되었다. In the example shown in FIG. 16, the numbers written within the block indicate the encoding/decoding order. In the example of FIG. 16, it is illustrated that the reference block of the luma component is encoded/decoded before the reference block of the chroma component.
복원된 루마 블록을 이용하여, 크로마 블록에 대한 예측을 수행할 수 있다. 위와 같은, 상이한 컬러 성분을 이용한 예측 모델을, 콤포넌트간 선형 모델(Cross Component Linear Model, CCLM)이라 호칭할 수 있다. CCLM이 적용되는 경우, 루마 블록의 인트라 예측 모드를 기반으로, 크로마 블록의 인트라 예측 모드를 유도하는 과정이 생략될 수 있다.Prediction of the chroma block can be performed using the restored luma block. The above prediction model using different color components may be called a Cross Component Linear Model (CCLM). When CCLM is applied, the process of deriving the intra prediction mode of the chroma block based on the intra prediction mode of the luma block can be omitted.
도 17은 복원된 루마 블록을 이용하여 크로마 블록을 예측하는 방법을 나타낸 흐름도이다. Figure 17 is a flowchart showing a method of predicting a chroma block using a restored luma block.
도 17을 참조하면, 먼저, 크로마 블록에 대한 예측을 위해, 예측 파라미터를 유도할 수 있다(S1710). 이때, 예측 파라미터는, 픽처의 영상 포맷에 따라 상이한 방법으로 유도될 수 있다. 영상 포맷은, 크로마 서브 샘플링 레이트를 나타내는 것으로, 4:4:4, 4:2:2 또는 4:2:0 중 하나로 결정될 수 있다.Referring to FIG. 17, first, for prediction of a chroma block, prediction parameters can be derived (S1710). At this time, prediction parameters may be derived in different ways depending on the video format of the picture. The video format indicates the chroma subsampling rate and can be determined as one of 4:4:4, 4:2:2, or 4:2:0.
영상 포맷이 4:4:4가 아닌 경우, 루마 블록을 다운 샘플링하여 크로마 블록의 크기와 동일하게 조절한다. If the video format is not 4:4:4, the luma block is downsampled and adjusted to match the size of the chroma block.
도 18 내지 도 20은 루마 블록을 다운 샘플링하는 예를 나타낸 것이다.Figures 18 to 20 show examples of down-sampling a luma block.
설명의 편의를 위해, 영상 포맷은 4:2:0인 것으로 가정한다. For convenience of explanation, it is assumed that the video format is 4:2:0.
영상 포맷이 4:2:0인 경우, 도 18에 도시된 예에서와 같이, 4x4 크기의 루마 블록에 대응되는 크로마 블록의 크기는 2x2 이다. 이 경우, 루마 블록에 다운 샘플링 필터를 적용하여, 4x4 크기의 루마 블록을 2x2 크기로 축소시킬 수 있다. 다음 수학식 5는 다운 샘플링 필터의 적용 양상을 나타낸 것이다.When the video format is 4:2:0, as in the example shown in FIG. 18, the size of the chroma block corresponding to the 4x4 luma block is 2x2. In this case, a 4x4 luma block can be reduced to a 2x2 size by applying a down-sampling filter to the luma block. The following equation 5 shows the application aspect of the down-sampling filter.
Figure PCTKR2023017031-appb-img-000005
Figure PCTKR2023017031-appb-img-000005
수학식 5에서, Downsampled_Luma는, 다운 샘플링된 루마 블록 내 샘플 값을 의미하고, Luma는 다운 샘플링 이전 루마 샘플의 값을 의미한다. 예컨대, Luma[0][0]은 다운 샘플링 이전 루마 블록 내 좌상단 샘플의 위치를 나타낼 수 있다. 다운 샘플링된 루마 블록의 크기는 2x2 이므로, 샘플의 좌표를 나타내는 변수 w 및 h는 각각 0 부터 1 범위의 값을 가질 수 있다.In Equation 5, Downsampled_Luma refers to the sample value within the down-sampled luma block, and Luma refers to the value of the luma sample before down-sampling. For example, Luma[0][0] may indicate the location of the upper left sample in the luma block before downsampling. Since the size of the down-sampled luma block is 2x2, the variables w and h representing the coordinates of the sample can each have values in the range from 0 to 1.
수학식 5에 따른 다운 샘플링 필터를 적용하는 경우, 다운 샘플링된 루마 샘플의 값은, 루마 샘플들에 십자 모양의 다운 샘플링 필터를 적용하여 획득될 수 있다. 일 예로, (0, 0) 위치의 다운 샘플링된 루마 샘플의 값은, (0, 0) 위치의 루마 샘플, 상기 (0, 0) 위치의 상단 루마 샘플, 상기 (0, 0) 위치의 좌측 루마 샘플, 상기 (0, 0) 위치의 하단 루마 샘플 및 상기 (0, 0) 위치의 우측 루마 샘플에 다운 샘플링 필터를 적용하여 획득될 수 있다.When applying the down-sampling filter according to Equation 5, the value of the down-sampled luma sample can be obtained by applying a cross-shaped down-sampling filter to the luma samples. As an example, the value of the down-sampled luma sample at the (0, 0) position is the luma sample at the (0, 0) position, the top luma sample at the (0, 0) position, and the left luma sample at the (0, 0) position. It can be obtained by applying a down-sampling filter to the luma sample, the bottom luma sample at the (0, 0) position, and the right luma sample at the (0, 0) position.
도 19에 도시된 것과 상이한 형태의 다운 샘플링 필터를 적용할 수도 있다. 일 예로, 1D 필터, 직사각형 또는 정사각형 필터를 적용하여, 다운 샘플링된 루마 샘플을 획득할 수 있다. 1D 필터는, 1x3 또는 3x1 크기일 수 있고, 직사각형 필터는, 2x3 또는 3x2 크기일 수 있고, 정사각형 필터는, 2x2 또는 3x2 크기일 수 있다. A down-sampling filter of a different type from that shown in FIG. 19 may be applied. For example, a down-sampled luma sample can be obtained by applying a 1D filter, a rectangular or square filter. 1D filters can be 1x3 or 3x1 in size, rectangular filters can be 2x3 or 3x2 in size, and square filters can be 2x2 or 3x2 in size.
필터의 형태가 부호화기 및 복호화기에서 기 정의되어 있을 수 있다. The type of filter may be predefined in the encoder and decoder.
또는, 현재 블록의 크기/형태, 루마 블록에 적용된 인트라 예측 모드, 크로마 샘플의 위치가 루마 샘플의 위치와 일치하는지 여부 또는 영상 포맷 중 적어도 하나에 기초하여, 필터의 형태가 적응적으로 결정될 수 있다. Alternatively, the shape of the filter may be adaptively determined based on at least one of the size/shape of the current block, the intra prediction mode applied to the luma block, whether the position of the chroma sample matches the position of the luma sample, or the image format. .
또는, 복수의 필터 후보들 중 하나를 지시하는 정보가 부호화되어 시그날링될 수 있다. Alternatively, information indicating one of a plurality of filter candidates may be encoded and signaled.
또는, 다운 샘플링 위치에 따라, 필터 타입이 상이할 수 있다. 일 예로, 루마 블록의 경계에 위치하는 루마 샘플에 대해서는, 1D 필터 또는 직사각형 필터를 적용하는 반면, 루마 블록의 경계에 위치하지 않는 루마 샘플에 대해서는, 십자 형태 필터를 적용할 수 있다.Alternatively, depending on the down sampling location, the filter type may be different. For example, a 1D filter or a rectangular filter may be applied to luma samples located at the border of a luma block, while a cross-shaped filter may be applied to luma samples not located at the border of the luma block.
도 19에 도시된 것과 같이, x축 좌표 및 y축 좌표가 모두 짝수인 위치에 다운 샘플링 필터가 적용될 수 있다. As shown in FIG. 19, a down-sampling filter can be applied to a location where both the x-axis coordinate and the y-axis coordinate are even numbers.
도 19에 도시된 것과 상이하게 다운 샘플링 필터의 적용 위치를 설정할 수도 있다. 도 20은 다운 샘플링 필터의 적용 위치에 대한 다양한 예시를 나타낸다.The application position of the down-sampling filter may be set differently from that shown in FIG. 19. Figure 20 shows various examples of application positions of the down-sampling filter.
다운 샘플링 적용 위치와 관련한 복수개의 후보들을 기 정의한 뒤, 복수개의 후보들 중 하나를 선택할 수도 있다. 일 예로, 도 20의 (a) 내지 (d)의 예시들을 복수의 후보들로 정의한 뒤, 복수의 예시들 중 하나를 가리키는 인덱스 정보를 부호화하여 시그날링할 수 있다. After pre-defining a plurality of candidates related to the down sampling application location, one of the plurality of candidates may be selected. As an example, the examples in (a) to (d) of FIG. 20 may be defined as a plurality of candidates, and then index information indicating one of the plurality of examples may be encoded and signaled.
또는, 크로마 샘플의 위치가 루마 샘플의 위치와 일치하는지 여부에 기초하여, 복수의 후보들 중 하나가 선택될 수도 있다.Alternatively, one of a plurality of candidates may be selected based on whether the location of the chroma sample matches the location of the luma sample.
루마 블록 주변의 참조 샘플들에 대해서도 다운 샘플링 필터를 적용할 수 있다. 여기서, 참조 샘플은, 기 복원된 샘플을 나타낼 수 있다. 구체적으로, 루마 블록의 상단에 인접하는 상단 참조 영역 또는 좌측에 인접하는 좌측 참조 영역 중 적어도 하나에 대해 다운 샘플링 필터를 적용하여, 다운 샘플링된 루마 참조 샘플을 획득할 수 있다. A down-sampling filter can also be applied to reference samples around the luma block. Here, the reference sample may represent a previously restored sample. Specifically, a down-sampling filter may be applied to at least one of the top reference area adjacent to the top of the luma block or the left reference area adjacent to the left, to obtain a down-sampled luma reference sample.
크로마 블록의 참조 영역에 포함된 참조 샘플들의 개수와 동일한 수의 다운 샘플링된 루마 참조 샘플들을 획득할 수 있다. The same number of down-sampled luma reference samples as the number of reference samples included in the reference area of the chroma block can be obtained.
한편, 루마 블록의 참조 영역을, 루마 참조 영역이라 호칭하고, 크로마 블록의 참조 영역을 크로마 참조 영역이라 호칭할 수 있다.Meanwhile, the reference area of the luma block may be referred to as a luma reference area, and the reference area of the chroma block may be referred to as a chroma reference area.
콤포넌트간 예측 모드는, 참조 영역의 구성에 따라, 상단 콤포넌트간 예측 모드, 좌측 콤포넌트간 예측 모드 및 상단 및 좌측 콤포넌트간 예측 모드로 구분될 수 있다. 상단 콤포넌트간 예측 모드가 선택된 경우, 루마 블록 및 크로마 블록 각각의 참조 영역은 상단 참조 영역만으로 구성된다. 좌측 콤포넌트간 예측 모드가 선택된 경우, 루마 블록 및 크로마 블록 각각의 참조 영역은 좌측 참조 영역만으로 구성된다. 상단 및 좌측 콤포넌트간 예측 모드가 선택된 경우, 루마 블록 및 크로마 블록 각각의 참조 영역은, 상단 참조 영역 및 좌측 참조 영역으로 구성될 수 있다.The inter-component prediction mode can be divided into a top inter-component prediction mode, a left inter-component prediction mode, and a top and left inter-component prediction mode, depending on the configuration of the reference area. When the top inter-component prediction mode is selected, the reference area of each luma block and chroma block consists of only the top reference area. When the left inter-component prediction mode is selected, the reference area of each luma block and chroma block consists of only the left reference area. When the top and left inter-component prediction mode is selected, the reference areas of each luma block and chroma block may be composed of a top reference area and a left reference area.
상단 콤포넌트간 예측 모드, 좌측 콤포넌트간 예측 모드 및 상단 및 좌측 콤포넌트간 예측 모드 중 어느 것이 현재 블록에 적용되었는지 여부를 가리키는 정보가 명시적으로 부호화되어 시그날링될 수 있다. 일 예로, 콤포넌트간 예측 모드의 종류를 가리키는 인덱스 정보가 부호화되어 시그날링될 수 있다. Information indicating which of the top inter-component prediction mode, left inter-component prediction mode, and top and left component prediction mode has been applied to the current block may be explicitly encoded and signaled. As an example, index information indicating the type of inter-component prediction mode may be encoded and signaled.
또는, 현재 블록의 크기/형태, 현재 블록이 CTU 또는 픽처 경계에 접하는지 여부 또는 루마 블록에 적용된 인트라 예측 모드 중 적어도 하나에 기초하여, 상단 콤포넌트간 예측 모드, 좌측 콤포넌트간 예측 모드 및 상단 및 좌측 콤포넌트간 예측 모드 중 하나가 선택될 수 있다.Alternatively, based on at least one of the size/shape of the current block, whether the current block borders a CTU or picture boundary, or an intra prediction mode applied to the luma block, a top inter-component prediction mode, a left inter-component prediction mode, and a top and left One of the inter-component prediction modes may be selected.
설명의 편의를 위해, 후술되는 실시예에서는, 루마 블록 및 크로마 블록 각각의 참조 영역이 상단 참조 영역 및 좌측 참조 영역을 포함하는 것으로 가정한다.For convenience of explanation, in the embodiment described later, it is assumed that the reference areas of each luma block and chroma block include an upper reference area and a left reference area.
루마 블록의 참조 영역에 적용되는 다운 샘플링 필터의 형태는, 루마 블록에 적용되는 다운 샘플링 필터와 동일할 수 있다. 또는, 루마 블록의 참조 영역에 적용되는 다운 샘플링 필터의 형태는, 루마 블록에 적용되는 다운 샘플링 필터와 상이할 수 있다. 또는, 루마 블록의 상단 참조 영역에 적용되는 다운 샘플링 필터의 형태와 루마 블록의 좌측 참조 영역에 적용되는 다운 샘플링 필터의 형태가 상이할 수 있다.The type of down-sampling filter applied to the reference area of the luma block may be the same as the down-sampling filter applied to the luma block. Alternatively, the type of down-sampling filter applied to the reference area of the luma block may be different from the down-sampling filter applied to the luma block. Alternatively, the form of the down-sampling filter applied to the upper reference area of the luma block may be different from the form of the down-sampling filter applied to the left reference area of the luma block.
한편, 참조 영역 내 다운 샘플링이 적용되는 위치는, 부호화기 및 복호화기에서 기 정의되어 있을 수 있다.Meanwhile, the location where down sampling is applied within the reference area may be predefined in the encoder and decoder.
다른 에로, 복호화기에서, 부호화기와 동일한 방법으로, 참조 영역 내 다운 샘플링이 적용되는 위치를 스스로 결정할 수도 있다. In other cases, the decoder may independently determine the location in the reference region where down sampling is applied in the same way as the encoder.
도 21은 다운 샘플링이 적용되는 위치와 관련한 예를 설명하기 위한 도면이다. FIG. 21 is a diagram for explaining an example of a location where down sampling is applied.
영상 포맷이 4:2:0인 경우, 1x1 크기의 크로마 블록은, 2x2 크기의 루마 블록에 대응한다. 이에 따라, 4개의 루마 참조 샘플들 중 하나의 위치에 다운 샘플링 필터를 적용하여, 크로마 참조 샘플에 대응하는 다운 샘플링된 루마 참조 샘플을 유도할 수 있다. When the video format is 4:2:0, a 1x1 chroma block corresponds to a 2x2 luma block. Accordingly, a down-sampling filter can be applied to one position among the four luma reference samples to derive a down-sampled luma reference sample corresponding to the chroma reference sample.
1개의 크로마 참조 샘플에 대응하는 4개의 루마 참조 샘플들을 A 내지 D라 할 경우, 참조 영역 내 A 내지 D 위치들 각각에 다운 샘플링을 수행한 뒤, 각 위치에 대한 비용을 산출할 수 있다. 여기서, 특정 위치에 대한 비용은, 해당 위치를 중심으로 다운 샘플링 필터를 적용하여 획득된 다운 샘플링된 루마 참조 샘플 및 해당 위치에 대응하는 크로마 참조 샘플 간의 차분의 합 또는 상기 차분의 절대값의 합을 기초로 유도될 수 있다. 이와 같이, 차분의 절대값의 합을 기초로 유도된 비용을 SAD (Sum of Difference)라 호칭할 수도 있다.When four luma reference samples corresponding to one chroma reference sample are referred to as A to D, down sampling can be performed on each of the positions A to D in the reference area, and then the cost for each position can be calculated. Here, the cost for a specific location is the sum of the difference between the down-sampled luma reference sample obtained by applying a down-sampling filter centered on that location and the chroma reference sample corresponding to that location, or the sum of the absolute value of the difference. It can be derived based on In this way, the cost derived based on the sum of the absolute values of the differences may be called SAD (Sum of Difference).
이후, 비용이 가장 낮은 위치를 최적의 위치로 결정하고, 최적 위치에서의 다운 샘플링된 루마 샘플들을 이용하여, 후술될 예측 파라미터 유도 과정이 수행될 수 있다. Thereafter, the location with the lowest cost is determined as the optimal location, and a prediction parameter derivation process, which will be described later, can be performed using the down-sampled luma samples from the optimal location.
또는, 다운 샘플링 필터가 적용될 수 있는 복수 위치들 중 하나를 지시하는 정보가 부호화되어 시그날링될 수 있다. 일 예로, 도 21에 도시된 예에서, A 내지 D 위치 중 하나를 가리키는 인덱스가 부호화되어 시그날링될 수 있다. 이를 위해, 부호화기에서는, 다운 샘플링 필터가 적용될 수 있는 복수 위치들 각각에 대해 예측 파라미터를 획득하고, 복수의 예측 파라미터들 중 최적의 예측 파라미터를 유도하는데 이용된 위치를 가리키는 인덱스를 부호화하여 시그날링할 수 있다. 여기서, 최적의 예측 파라미터는, 예측 파라미터들 각각의 비용 또는 RDO (Rate Distortion Optimization)에 의해 유도될 수 있다.Alternatively, information indicating one of multiple positions to which a down-sampling filter can be applied may be encoded and signaled. For example, in the example shown in FIG. 21, an index indicating one of positions A to D may be encoded and signaled. To this end, the encoder obtains a prediction parameter for each of a plurality of positions to which a down-sampling filter can be applied, and encodes and signals an index indicating the position used to derive the optimal prediction parameter among the plurality of prediction parameters. You can. Here, the optimal prediction parameters can be derived by the cost of each prediction parameter or RDO (Rate Distortion Optimization).
한편, 상단 참조 영역 내 최적의 다운 샘플링 적용 위치를 결정하는 것이 좌측 참조 영역 내 최적의 다운 샘플링 적용 위치를 결정하는 것과 독립적일 수 있다. 이 경우, 상단 참조 영역 내 최적의 다운 샘플링 적용 위치와 좌측 참조 영역 내 최적의 다운 샘플링 적용 위치가 상이할 수 있다.Meanwhile, determining the optimal down-sampling application location within the upper reference area may be independent of determining the optimal down-sampling application location within the left reference area. In this case, the optimal down sampling application location within the upper reference area and the optimal down sampling application location within the left reference area may be different.
다운 샘플링된 루마 참조 샘플들과 크로마 블록의 참조 샘플들을 이용하여, 크로마 블록에 대한 예측 파라미터를 유도할 수 있다. 예측 파라미터는 가중치 α 및 오프셋 β를 포함할 수 있다. 예측 파라미터는 최소 자승법(Least Square Method) 등을 이용하여 유도될 수 있다.Using down-sampled luma reference samples and reference samples of the chroma block, prediction parameters for the chroma block can be derived. Prediction parameters may include weight α and offset β. Prediction parameters can be derived using the least square method or the like.
혹은, 다운 샘플링된 루마 참조 샘플들의 최대값과 최소값, 및 크로마 참조 샘플들의 최대값과 최소값의 선형성(Linearlity)에 기반하여, 가중치 α 오프셋 β를 유도할 수 있다. Alternatively, the weight α offset β can be derived based on the linearity of the maximum and minimum values of the down-sampled luma reference samples and the maximum and minimum values of the chroma reference samples.
이때, 기 정의된 위치의 크로마 참조샘플들 및 이에 대응하는 다운 샘플링된 루마 참조 샘플들만을 이용하여, 예측 파라미터를 유도할 수도 있다. 이 경우, 예측 파라미터의 유도 과정이 간소화되어, 부호화기 및 복호화기에서의 복잡도가 감소할 수 있다. 일 예로, 다음 수학식 6에 예시된 위치의 크로마 참조 샘플들을 이용하여, 예측 파라미터를 유도할 수 있다. At this time, prediction parameters may be derived using only chroma reference samples at predefined positions and down-sampled luma reference samples corresponding thereto. In this case, the process of deriving prediction parameters is simplified, and complexity in the encoder and decoder can be reduced. As an example, a prediction parameter can be derived using chroma reference samples at the positions illustrated in Equation 6 below.
Figure PCTKR2023017031-appb-img-000006
Figure PCTKR2023017031-appb-img-000006
위 예에서, W 및 H는 각각 크로마 블록의 너비 및 높이를 나타낸다. 위 예시에 따른, 4개의 크로마 참조 샘플들 및 이에 대응하는 4개의 다운 샘플링된 루마 참조 샘플들을 이용하여 예측 파라미터를 유도할 수 있다.In the above example, W and H represent the width and height of the chroma block, respectively. According to the above example, a prediction parameter can be derived using four chroma reference samples and four down-sampled luma reference samples corresponding thereto.
위 예시와 상이한 위치의 참조 샘플들을 이용하여 예측 파라미터를 획득할 수도 있다. 일 예로, 다음의 수학식 7 및 수학식 8과 같이, 참조 샘플들의 위치를 결정할 수도 있다. Prediction parameters can also be obtained using reference samples in positions different from the above example. As an example, the positions of reference samples may be determined as shown in Equation 7 and Equation 8 below.
Figure PCTKR2023017031-appb-img-000007
Figure PCTKR2023017031-appb-img-000007
Figure PCTKR2023017031-appb-img-000008
Figure PCTKR2023017031-appb-img-000008
참조 샘플들의 위치에 대해 복수의 후보들을 기 정의한 뒤, 복수의 후보들 중 하나를 선택할 수 있다. 일 예로, 위에 열거된 수학식 6 내지 수학식 8의 예시들 각각을 위치 후보로 설정한 뒤, 복수의 위치 후보들 중 하나에 따라, 참조 샘플들을 선택할 수 있다. After pre-defining a plurality of candidates for the positions of reference samples, one of the plurality of candidates can be selected. As an example, each of the examples of Equation 6 to Equation 8 listed above may be set as a location candidate, and then reference samples may be selected according to one of the plurality of location candidates.
복수의 위치 후보들 중 하나를 선택하기 위한 정보가 부호화되어 시그날링될 수 있다. 일 예로, 복수의 위치 후보들 중 하나를 가리키는 인덱스를 부호화하여 시그날링할 수 있다.Information for selecting one of a plurality of location candidates may be encoded and signaled. As an example, an index indicating one of a plurality of location candidates can be encoded and signaled.
또는, 현재 블록의 크기/형태, 컬러 포맷 또는 크로마 샘플의 위치가 루마 샘플의 위치와 일치하는지 여부 중 적어도 하나에 기초하여, 복수의 위치 후보들 중 하나가 적응적으로 선택될 수 있다.Alternatively, one of a plurality of location candidates may be adaptively selected based on at least one of the size/shape of the current block, color format, or whether the location of the chroma sample matches the location of the luma sample.
일 예로, 현재 블록이 정방 형태인 경우, 수학식 6의 위치 후보를 이용하여, 예측 파라미터를 유도할 수 있다. 반면, 현재 블록이 비정방 형태인 경우, 수학식 7 또는 수학식 8의 위치 후보를 이용하여 예측 파라미터를 유도할 수 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방 형태인 경우, 수학식 7의 위치 후보를 사용하고, 현재 블록이 높이가 너비보다 큰 비정방 형태인 경우, 수학식 8의 위치 후보를 사용할 수 있다. For example, if the current block is in a square shape, the prediction parameter can be derived using the position candidate in Equation 6. On the other hand, if the current block is non-square, the prediction parameter can be derived using the position candidate of Equation 7 or Equation 8. As an example, if the current block is in a non-square form with a width greater than the height, the position candidate of Equation 7 can be used, and if the current block is in a non-square form with a height greater than the width, the position candidate of Equation 8 can be used. there is.
예측 파라미터가 유도되면, 다운 샘플링된 루마 샘플을 기초로, 크로마 블록의 예측 샘플을 획득할 수 있다(S1720). 일 예로, 다음의 수학식 9에 따라, 크로마 블록의 예측 샘플을 획득할 수 있다.Once the prediction parameter is derived, a prediction sample of the chroma block can be obtained based on the down-sampled luma sample (S1720). As an example, a prediction sample of a chroma block can be obtained according to Equation 9 below.
Figure PCTKR2023017031-appb-img-000009
Figure PCTKR2023017031-appb-img-000009
수학식 9에서, PredChroma는, 크로마 블록의 예측 샘플을 나타내고, Downsampled_Luma는, 크로마 예측 샘플에 대응되는 위치의 다운 샘플링된 루마 샘플을 나타낸다.In Equation 9, PredChroma represents a prediction sample of a chroma block, and Downsampled_Luma represents a down-sampled luma sample at a position corresponding to the chroma prediction sample.
한편, 영상 포맷이 4:4:4인 경우, 상술한 다운 샘플링 과정은 생략될 수 있다. 즉, 영상 포맷이 4:4:4인 경우, 루마 블록 내 복원 샘플들에 대해 다운 샘플링을 수행하는 과정 및 루마 블록의 참조 샘플들에 대해 다운 샘플링을 수행하는 과정이 생략될 수 있다.Meanwhile, if the video format is 4:4:4, the above-described down-sampling process can be omitted. That is, when the video format is 4:4:4, the process of performing down-sampling on restored samples within the luma block and the process of performing down-sampling on reference samples of the luma block can be omitted.
다른 예로, 영상 포맷과 무관하게, 루마 블록의 참조 영역에는 다운 샘플링 필터를 적용하지 않을 수도 있다. 즉, 예측 파라미터 유도시, 다운 샘플링된 루마 참조 샘플들 중 최소값 및 최대값을 이용하는 대신, 루마 참조 샘플들 중 최소값 및 최대값을 이용할 수도 있다.As another example, regardless of the video format, a down-sampling filter may not be applied to the reference area of the luma block. That is, when deriving a prediction parameter, instead of using the minimum and maximum values among the down-sampled luma reference samples, the minimum and maximum values among the luma reference samples may be used.
한편, 픽처는, 블록 단위로 부/복호화될 수 있다. 일 예로, 픽처를, 기 결정된 크기의 블록들로 분할할 수 있다. 기 결정된 크기의 블록을, 코딩 트리 블록(Coding Tree Block, 또는 코딩 트리 유닛) 또는 기준 블록이라 호칭할 수 있다. 기준 블록의 크기를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 시퀀스 파라미터 세트, 또는 픽처 헤더를 통해 코딩 트리 블록의 크기를 나타내는 정보가 부호화될 수 있다.Meanwhile, pictures can be encoded/decoded on a block basis. As an example, a picture may be divided into blocks of a predetermined size. A block of a predetermined size may be called a coding tree block (Coding Tree Block, or coding tree unit) or a reference block. Information indicating the size of the reference block may be signaled through a bitstream. As an example, information indicating the size of a coding tree block may be encoded through a sequence parameter set or a picture header.
이후, 기준 블록 내에서 기 정의된 트리 구조들 중 적어도 하나에 기반하여, 기준 블록을 다양한 크기의 블록들로 추가할 수 있다. 그리고 나서, 분할된 블록들마다 예측, 변환, 양자화 및/또는 엔트로피 부호화 등의 부/복호화 처리가 수행될 수 있다. 분할된 블록들 각각은, 코딩 블록, 예측 블록 또는 변환 블록일 수 있다. Thereafter, blocks of various sizes may be added to the standard block based on at least one of the tree structures predefined within the standard block. Then, encoding/decoding processing such as prediction, transformation, quantization, and/or entropy coding may be performed on each divided block. Each of the divided blocks may be a coding block, prediction block, or transform block.
한편, 컬러 픽처의 경우, 루마 픽처와 크로마 픽처를 각각 부/복호화하게 된다. 이때, 크로마 픽처의 경우, 루마 픽처와 유사한 특성을 갖는 경우가 일반적이다. 즉, 크로마 픽처 내 크로마 샘플들의 특성이, 루마 픽처 내 동일 위치 루마 샘플들의 특성과 유사한 경향이 존재한다. 이와 같은 성질을 이용하여, 컬러 콤포넌트들 중 하나의 기준 콤포넌트 대해서만, 기준 블록에 대한 분할 구조를 독자적으로 결정하고, 다른 콤포넌트에서는, 기존 콤포넌트에서 결정된 트리 구조를 동일하게 적용할 수 있다. 이와 같이, 기준 콤포넌트의 트리 분할 구조가 타 콤포넌트에 그대로 적용되는 분할 구조를, 싱글 트리 구조라 호칭할 수 있다. Meanwhile, in the case of a color picture, the luma picture and the chroma picture are encoded/decoded respectively. At this time, chroma pictures generally have similar characteristics to luma pictures. That is, the characteristics of chroma samples within a chroma picture tend to be similar to the characteristics of luma samples at the same location within a luma picture. Using this property, the division structure for the standard block can be independently determined for only one standard component among the color components, and the tree structure determined in the existing component can be applied in the same way to other components. In this way, a division structure in which the tree division structure of the standard component is directly applied to other components may be called a single tree structure.
한편, 후술되는 실시예들에서는, 기준 콤포넌트가 루마 성분인 것으로 가정한다. 즉, 루마 성분에 대해서는 독립적으로 트리 분할 구조가 적용되는 한편, 크로마 성분에는, 루마 성분의 트리 분할 구조가 그대로 적용되는 것으로 가정한다.Meanwhile, in embodiments described later, it is assumed that the reference component is a luma component. That is, it is assumed that the tree division structure is independently applied to the luma component, while the tree division structure of the luma component is applied as is to the chroma component.
다른 예로, 동일 위치 루마 블록을 참조하여, 크로마 블록에 대한 부/복호화 정보를 유도한 뒤, 유도된 부/복호화 정보를 기반으로, 크로마 블록에 대한 부/복호화를 수행할 수도 있다. 이때, 싱글 트리 구조에서는, 루마 기준 블록의 분할 구조와 크로마 기준 블록의 분할 구조가 동일하므로, 크로마 블록과 동일 위치인 루마 블록이 명료하게 특정될 수 있다.As another example, encoding/decoding information for the chroma block may be derived with reference to the co-located luma block, and then encoding/decoding for the chroma block may be performed based on the derived encoding/decoding information. At this time, in the single tree structure, the division structure of the luma reference block and the division structure of the chroma reference block are the same, so the luma block at the same location as the chroma block can be clearly specified.
반면, 듀얼 트리 구조에서는, 루마 기준 블록의 분할 구조와 크로마 기준 블록의 분할 구조가 독립적이다. 듀얼 트리 구조 하에서는, 크로마 블록이 점유하는 영역과 상응하는 루마 픽처 내 영역 또는, 상기 루마 픽처 내 영역을 포함하는 상위 노드 루마 블록을, 크로마 블록과 동일 위치 루마 블록으로 취급할 수 있다. On the other hand, in the dual tree structure, the division structure of the luma reference block and the division structure of the chroma reference block are independent. Under the dual tree structure, the area within the luma picture corresponding to the area occupied by the chroma block, or the upper node luma block including the area within the luma picture, can be treated as a luma block at the same location as the chroma block.
또는, 크로마 블록이 점유하는 영역과 상응하는 루마 픽처 내 영역을 포함하는 루마 블록을 동일 위치 루마 블록으로 설정할 수 있다. 이때, 상기 루마 픽처 내 영역이 복수의 루마 블록들에 포함된 상태라면, 복수의 루마 블록들 중 대표 블록을, 동일 위치 루마 블록으로 결정할 수 있다. 여기서, 대표 블록은, 상기 영역을 가장 많이 점유하는 루마 블록, 루마 블록들 중 크기가 가장 큰 블록, 또는 상기 루마 픽처 내 영역 중 기준 위치 샘플을 포함하는 루마 블록일 수 있다. 기준 위치는, 영역 내 좌상단 위치, 중앙 위치, 우상단 위치, 좌하단 위치 또는 우하단 위치일 수 있다.Alternatively, a luma block including an area within the luma picture corresponding to the area occupied by the chroma block can be set as a co-located luma block. At this time, if the area within the luma picture is included in a plurality of luma blocks, a representative block among the plurality of luma blocks may be determined as the co-located luma block. Here, the representative block may be a luma block occupying the largest portion of the area, a block with the largest size among luma blocks, or a luma block including a reference position sample in an area within the luma picture. The reference position may be the upper left position, the central position, the upper right position, the lower left position, or the lower right position within the area.
또는, 크로마 블록이 점유하는 영역과 상응하는 루마 픽처 내 영역에 복수의 루마 블록들이 포함되어 있는 경우, 복수의 루마 블록들 중 대표 블록을, 동일 위치 루마 블록으로 결정할 수 있다. 여기서, 대표 블록은, 상기 영역을 가장 많이 점유하는 루마 블록, 루마 블록들 중 크기가 가장 큰 블록, 또는 상기 루마 픽처 내 영역 중 기준 위치 샘플을 포함하는 루마 블록일 수 있다. Alternatively, if a plurality of luma blocks are included in an area within the luma picture corresponding to the area occupied by the chroma block, a representative block among the plurality of luma blocks may be determined as the co-located luma block. Here, the representative block may be a luma block occupying the largest portion of the area, a block with the largest size among luma blocks, or a luma block including a reference position sample in an area within the luma picture.
또는, 크로마 블록이 점유하는 영역과 상응하는 루마 픽처 내 영역에 복수의 루마 블록들이 포함되어 있는 경우, 상기 복수의 루마 블록들을 포함하는 상위 노드 루마 블록을, 동일 위치 루마 블록으로 결정할 수 있다.Alternatively, if a plurality of luma blocks are included in an area within the luma picture corresponding to the area occupied by the chroma block, the upper node luma block including the plurality of luma blocks may be determined as the co-located luma block.
또는, 크로마 기준 블록과 동일 위치 루마 블록을 결정하기 위한 기준 위치를 정의하고, 기준 위치를 기반으로, 동일 위치 루마 블록을 결정할 수 있다. 기준 위치는, 크로마 블록의 좌상단 위치, 중앙 위치, 우상단 위치, 좌하단 위치 또는 우하단 위치일 수 있다.Alternatively, a reference position for determining a chroma reference block and a co-located luma block may be defined, and the co-located luma block may be determined based on the reference position. The reference position may be the upper left position, center position, upper right position, lower left position, or lower right position of the chroma block.
일 예로, 기준 위치가 크로마 블록의 중앙 위치인 경우, 크로마 블록의 중앙 위치에 대응되는 루마 샘플을 포함하는 루마 블록을, 크로마 블록과 동일 위치인 루마 블록으로 결정할 수 있다.For example, when the reference position is the central position of the chroma block, a luma block including a luma sample corresponding to the central position of the chroma block may be determined as the luma block at the same position as the chroma block.
듀얼 트리 구조에서, 크로마 블록의 분할 구조를, 결정할 때, 정보를, 동일 위치 루마 블록의 분할 구조를 참조할 수 있다. 크로마 블록을 복수의 파티션들로 분할할 것인지 여부는, 동일 위치 루마 블록이 복수의 파티션들로 분할되었는지 여부를 기초로 결정될 수 있다. In the dual tree structure, when determining the division structure of the chroma block, information can be referenced to the division structure of the co-located luma block. Whether to divide the chroma block into a plurality of partitions may be determined based on whether the co-located luma block is divided into a plurality of partitions.
도 22 및 도 23은 듀얼 트리 구조에서, 크로마 블록의 분할 구조를 동일 위치 루마 블록을 참조하여 결정하는 예를 설명하기 위한 도면이다. Figures 22 and 23 are diagrams for explaining an example of determining the division structure of a chroma block with reference to a co-located luma block in a dual tree structure.
도 16을 통해 설명한 바와 같이, 듀얼 트리 구조가 적용되는 경우, 루마 성분에 대한 부/복호화가 완료된 이후, 크로마 성분에 대한 부/복호화가 수행된다. 이에 따라, 크로마 블록에 대한 부/복호화가 시작될 때, 동일 위치 루마 블록에 대한 부/복호화는 완료된 상태이다. As explained with reference to FIG. 16, when the dual tree structure is applied, after encoding/decoding of the luma component is completed, encoding/decoding of the chroma component is performed. Accordingly, when encoding/decoding for the chroma block starts, encoding/decoding for the luma block at the same location is completed.
이에, 동일 위치 루마 블록의 부/복호화 정보를 참조하여, 크로마 블록에 대한 부/복호화 정보를 유도할 수 있다. 구체적 예로, 크로마 블록에 대한 부/복호화시, 루마 블록의 분할 정보를 크로마 블록에 그대로 적용할 수 있다. 여기서, 분할 정보는, 블록의 분할 여부 또는 블록의 파티션 타입 중 적어도 하나를 포함할 수 있다. 여기서, 파티션 타입은, 블록을 분할하여 생성되는 파티션의 개수, 비대칭 분할 여부 또는 블록의 분할 방향 중 적어도 하나에 관한 것일 수 있다.Accordingly, encoding/decoding information for the chroma block can be derived by referring to encoding/decoding information of the co-located luma block. As a specific example, when encoding/decoding a chroma block, the division information of the luma block can be directly applied to the chroma block. Here, the partition information may include at least one of whether the block is partitioned or the partition type of the block. Here, the partition type may relate to at least one of the number of partitions created by dividing the block, whether or not it is asymmetrically divided, or the direction in which the block is divided.
일 예로, 도 22에 도시된 예시에서, 제1 크로마 블록에서의 파티션 타입은 동일위치에 존재하는 루마 블록의 파티션 타입과 동일하게 설정될 수 있다. 구체적으로, 도 22에 도시된 예에서, 제1 크로마 블록에 대한 동일 위치 루마 블록은, 루마 블록 B 및 루마 블록 C로 분할된 상위 노드 루마 블록이다. 도시된 예에서와 같이, 동일 위치 루마 블록은, 수평 방향으로 2분할된 것으로 도시되었다. 이에 따라, 제1 크로마 블록도, 루마 블록과 동일하게, 수평 방향으로 2분할될 수 있다. For example, in the example shown in FIG. 22, the partition type of the first chroma block may be set to be the same as the partition type of the luma block existing at the same location. Specifically, in the example shown in FIG. 22, the co-located luma block for the first chroma block is the upper node luma block divided into luma block B and luma block C. As in the illustrated example, the co-located luma block is shown to be divided into two in the horizontal direction. Accordingly, the first chroma block can also be divided into two horizontally, like the luma block.
루마 블록의 분할 정보 뿐만 아니라, 루마 블록의 예측 정보도, 크로마 블록의 부/복호화시 참조될 수 있다. 즉, 크로마 블록을 분할하여 생성된 파티션들 각각의 예측 정보는, 각 파티션에 대한 동일 위치 루마 블록과 동일하게 설정될 수 있다. Not only the division information of the luma block, but also the prediction information of the luma block can be referred to when encoding/decoding the chroma block. That is, prediction information for each partition created by dividing the chroma block may be set to be the same as the co-located luma block for each partition.
일 예로, 도 22에 도시된 예에서, 크로마 블록을 분할하여 생성된 2개의 파티션들(즉, b 및 c) 각각의 예측 모드는, 루마 블록을 분할하여 생성된 2개의 파티션들(즉, B 및 C) 각각의 예측 모드가 동일하게 설정될 수 있다. 여기서, 예측 모드는, 부호화 모드, 인트라 예측 모드 또는 인터 예측 모드 중 적어도 하나를 가리킬 수 있다. 부호화 모드는, 블록에 인트라 예측 또는 인터 예측이 적용되었는지 여부를 나타낸다. 인트라 예측 모드는, 인트라 예측 수행시 이용되는 비방향성 인트라 예측 모드들 및 방향성 예측 모드들 중 하나를 가리키는 정보일 수 있다. 인터 예측 모드는, 움직임 정보 병합 모드, 움직임 벡터 예측 모드, 템플릿 매칭 모드 중 적어도 하나를 가리키는 정보일 수 있다. As an example, in the example shown in FIG. 22, the prediction mode of each of the two partitions (i.e., b and c) created by dividing the chroma block is the prediction mode of the two partitions (i.e., B and C) each prediction mode may be set identically. Here, the prediction mode may refer to at least one of an encoding mode, an intra prediction mode, or an inter prediction mode. The encoding mode indicates whether intra prediction or inter prediction was applied to the block. The intra prediction mode may be information indicating one of non-directional intra prediction modes and directional prediction modes used when performing intra prediction. The inter prediction mode may be information indicating at least one of a motion information merging mode, a motion vector prediction mode, and a template matching mode.
마찬가지로, 제2 크로마 블록에 대한, 파티션 타입은, 동일 위치에 존재하는 루마 블록의 파티션 타입과 동일하게 설정될 수 있다. 도 22에 도시된 예에서는, 제2 크로마 블록의 동일 위치 루마 블록에, 쿼드 타입 분할이 적용되는 것으로 예시되었다. 이에 따라, 제2 크로마 블록에도, 쿼드 타입 분할이 적용될 것이다. Likewise, the partition type for the second chroma block may be set to be the same as the partition type of the luma block existing at the same location. In the example shown in FIG. 22, quad type division is applied to the co-located luma block of the second chroma block. Accordingly, quad type division will be applied to the second chroma block as well.
또한, 크로마 블록을 분할하여 생성된 파티션들(즉, e, f, g, h)에서 사용되는 예측모드는 각각 루마 블록을 분할하여 생성된 파티션들(즉, E, F, G, H) 각각의 예측 모드와 동일하게 설정될 수 있다. In addition, the prediction mode used in the partitions created by dividing the chroma block (i.e., e, f, g, and h) is the prediction mode used in the partitions created by dividing the luma block (i.e., E, F, G, and H). It can be set the same as the prediction mode of .
한편, 크로마 블록의 부/복호화 정보를, 동일 위치 루마 블록과 동일하게 설정할 것인지 여부를 나타내는 정보가 부호화되어 시그날링될 수 있다. 상기 정보는 1비트의 플래그일 수 있다. Meanwhile, information indicating whether the encoding/decoding information of the chroma block is set to be the same as that of the co-located luma block may be encoded and signaled. The information may be a 1-bit flag.
일 예로, 크로마 블록의 파티션 타입을 동일 위치 루마 블록과 동일하게 설정할 것인지 여부를 나타내는 제1 플래그가 부호화되어 시그날링될 수 있다. 상기 제1 플래그가 참인 경우, 크로마 블록에 대한 분할 정보의 부/복호화가 생략되고, 크로마 블록의 파티션 타입이 동일 위치 루마 블록과 동일하게 설정될 수 있다. As an example, a first flag indicating whether to set the partition type of the chroma block to be the same as that of the co-located luma block may be encoded and signaled. If the first flag is true, encoding/decoding of partition information for the chroma block is omitted, and the partition type of the chroma block may be set to be the same as that of the co-located luma block.
일 예로, 크로마 블록의 예측 모드를 동일 위치 루마 블록과 동일하게 설정할 것인지 여부를 나타내는 제2 플래그가 부호화되어 시그날링될 수 있다. 상기 제2 플래그가 참인 경우, 크로마 블록에 대한 예측 모드의 부/복호화가 생략되고, 크로마 블록의 예측 모드가 동일 위치 루마 블록과 동일하게 설정될 수 있다.As an example, a second flag indicating whether to set the prediction mode of the chroma block to be the same as that of the co-located luma block may be encoded and signaled. If the second flag is true, encoding/decoding of the prediction mode for the chroma block may be omitted, and the prediction mode of the chroma block may be set to be the same as that of the co-located luma block.
한편, 도 22에 도시된 예에서는, 크로마 블록 및 동일 위치 루마 블록이, 동일한 형태 및 상호 대응되는 크기를 갖는 것으로 예시되었다. 여기서, 상호 대응되는 크기를 갖는다는 것은, 크로마 블록의 크기 및 동일 위치 루마 블록의 크기가, 크로마 포맷을 고려하였을 때, 상호 대응됨을 나타낸다. 일 예로, 크로마 포맷이 4:4:4인 경우, 크로마 블록의 크기에 대응되는 동일 위치 루마 블록의 크기는, 크로마 블록과 동일한 크기일 수 있다. 반면, 크로마 포맷이 4:2:0인 경우, 크로마 블록의 크기에 대응되는 동일 위치 루마 블록의 크기는, 크로마 블록의 너비 및 높이를 각각 2배 확장한 것일 수 있다. Meanwhile, in the example shown in FIG. 22, the chroma block and the co-located luma block are illustrated as having the same shape and corresponding sizes. Here, having sizes that correspond to each other indicates that the size of the chroma block and the size of the co-located luma block correspond to each other when considering the chroma format. For example, when the chroma format is 4:4:4, the size of the co-located luma block corresponding to the size of the chroma block may be the same size as the chroma block. On the other hand, when the chroma format is 4:2:0, the size of the co-located luma block corresponding to the size of the chroma block may be twice the width and height of the chroma block, respectively.
한편, 크로마 블록에 대해, 예측 및 변환이 순차적으로 수행되는지 여부가 적응적으로 결정될 수 있다. 일 예로, 동일 위치 루마블록의 파티션정보 및/또는 예측 정보 중 적어도 하나가 크로마 블록에 적용되는 경우, 크로마 블록 내 부/복호화 순서가 앞서는 파티션에 대한 예측 및 변환이 완료된 이후, 다음 파티션에 대한 예측 및 변환이 수행될 수 있다. 일 예로, 도 22에 도시된 예에서, 제2 크로마 블록에 포함된 4개의 파티션들 각각에 대한, 부/복호화 순서는 다음과 같을 수 있다. Meanwhile, for a chroma block, it may be adaptively determined whether prediction and transformation are performed sequentially. As an example, when at least one of the partition information and/or prediction information of the co-located luma block is applied to the chroma block, after prediction and conversion for the partition that precedes the encoding/decoding order within the chroma block is completed, prediction for the next partition is performed. and conversion may be performed. For example, in the example shown in FIG. 22, the encoding/decoding order for each of the four partitions included in the second chroma block may be as follows.
서브 블록 E에 대한 예측 수행 → 서브 블록 E에 대한 변환 및 양자화 (및 복원 또는 엔트로피 부호화) 수행 → 서브 블록 F에 대한 예측 수행 → 서브 블록 F에 대한 변환 및 양자화 (및 복원 또는 엔트로피 부호화) 수행 → 서브 블록 G에 대한 예측 수행 → 서브 블록 G에 대한 변환 및 양자화 (및 복원 또는 엔트로피 부호화) 수행 → 서브 블록 H에 대한 예측 수행 → 서브 블록 H에 대한 변환 및 양자화 (및 복원 또는 엔트로피 부호화) 수행Perform prediction on subblock E → Perform transformation and quantization (and restoration or entropy coding) on subblock E → Perform prediction on subblock F → Perform transformation and quantization (and restoration or entropy coding) on subblock F → Perform prediction on subblock G → Perform transformation and quantization (and restoration or entropy coding) on subblock G → Perform prediction on subblock H → Perform transformation and quantization (and restoration or entropy coding) on subblock H
또는, 서브 블록들 각각에 대한 예측을 먼저 수행한 뒤, 서브 블록들에 대한 예측이 완료된 이후, 허브 블록들에 대한 변환을 수행할 수도 있다. Alternatively, prediction may be performed on each of the sub-blocks first, and then, after prediction on the sub-blocks is completed, transformation on the hub blocks may be performed.
도 22에 도시된 예에서와 달리, 크로마 블록과 동일 위치에 존재하는 루마 블록 간의 형태가 동일하지 않거나, 크로마 블록의 크기와 동일 위치 루마 블록의 크기가 상응하지 않는 경우가 발생할 수 있다. 이 경우에도, 크로마 블록의 예측 정보를, 동일 위치 루마 블록의 예측 정보와 동일하게 설정할 수 있다. Unlike the example shown in FIG. 22, there may be cases where the shape of the chroma block and the luma block existing at the same location are not the same, or the size of the chroma block does not correspond to the size of the luma block at the same location. Even in this case, the prediction information of the chroma block can be set to be the same as the prediction information of the co-located luma block.
일 예로, 동일 위치 루마 블록의 파티션 타입을 참조하여, 크로마 블록의 파티션 타입을 결정할 수 있다. 크로마 블록이 복수의 파티션들로 분할된 경우, 파티션들 각각의 예측 모드는, 파티션들 각각에 대응하는 루마 블록 내 파티션의 예측 모드와 동일하게 설정될 수 있다. As an example, the partition type of the chroma block can be determined by referring to the partition type of the co-located luma block. When the chroma block is divided into a plurality of partitions, the prediction mode of each partition may be set to be the same as the prediction mode of the partition in the luma block corresponding to each of the partitions.
일 예로, 도 23에서, 제1 크로마 블록에 대응하는 루마 블록은, 루마 블록 B이다. 이 경우, 루마 블록 B이 화면 내 예측 모드가, 제1 크로마 블록에 그대로 적용될 수 있다. For example, in FIG. 23, the luma block corresponding to the first chroma block is luma block B. In this case, the intra-screen prediction mode of luma block B may be applied as is to the first chroma block.
제2 크로마 블록은, 복수의 루마 블록들(즉, E, F, G, H, J)를 합한 것에 대응하는 크기를 갖는다. 이런 경우, 크로마 블록 2를 복수의 루마 블록들과 동일한 형태로 분할할 수 있다. 즉, 크로마 블록을 수평 방향으로 2분할한 뒤, 2분할에 의해 생성된 상단 크로마 블록에 쿼드 분할을 적용할 수 있다. 그리고, 크로마 블록을 분할함으로써 생성된 파티션들(즉, e, f, g, h, j) 각각의 예측 모드를, 대응하는 루마 블록들(즉, E, F, G, H, J) 각각의 예측모드와 동일하게 설정할 수 있다. The second chroma block has a size corresponding to the sum of a plurality of luma blocks (ie, E, F, G, H, and J). In this case, chroma block 2 can be divided into a plurality of luma blocks in the same form. That is, after dividing the chroma block into two horizontally, quad division can be applied to the upper chroma block created by the two divisions. Then, the prediction mode of each of the partitions (i.e., e, f, g, h, j) created by dividing the chroma block is changed to the prediction mode of each of the corresponding luma blocks (i.e., E, F, G, H, J). It can be set the same as prediction mode.
한편, 크로마 블록과 동일 위치 루마 블록의 크기를 비교하여, 루마 블록의 부/복호화 정보를, 크로마 블록에 적용할 것인지 여부를 적응적으로 결정할 수도 있다. 일 예로, 크로마 블록의 크기가 동일 위치의 루마 블록의 크기와 대응되지 않는 경우, 크로마 블록의 부/복호화 정보(예컨대, 파티션 타입 또는 예측 모드 중 적어도 하나)를 유도하는데 있어서, 루마 블록의 부/복호화 정보를 참조하지 않도록 설정할 수 있다. Meanwhile, it is possible to adaptively determine whether to apply the encoding/decoding information of the luma block to the chroma block by comparing the sizes of the chroma block and the co-located luma block. As an example, when the size of the chroma block does not correspond to the size of the luma block at the same location, in deriving the encoding/decoding information (e.g., at least one of the partition type or prediction mode) of the chroma block, the encoding/decoding information of the luma block is You can set it so that it does not refer to decryption information.
일 예로, 도 22에 도시된 예에서는, 제1 크로마 블록의 동일 위치 루마 블록의 크기가, 제1 크로마 블록의 크기와 상응한다. 이 경우, 루마 블록의 부/복호화 정보를, 크로마 블록의 부/복호화 정보로 설정하는 것이 허용될 수 있다.For example, in the example shown in FIG. 22, the size of the luma block at the same location as the first chroma block corresponds to the size of the first chroma block. In this case, it may be allowed to set the encoding/decoding information of the luma block to the encoding/decoding information of the chroma block.
반면, 도 23에 도시된 예에서는, 제1 크로마 블록의 동일 위치 루마 블록의 크기가, 제1 크로마 블록의 크기와 상응하지 않는다. 이 경우, 루마 블록의 부/복호화 정보를, 크로마 블록의 부/복호화 정보로 설정하는 것이 허용되지 않을 수 있다.On the other hand, in the example shown in FIG. 23, the size of the luma block at the same location as the first chroma block does not correspond to the size of the first chroma block. In this case, setting the encoding/decoding information of the luma block to the encoding/decoding information of the chroma block may not be permitted.
다른 예로, 크로마 블록의 부/복호화 시, 루마 샘플들에 대한 방향성을 기반으로, 크로마 블록의 분할 여부 및/또는 부/복호화 순서를 결정할 수 있다. As another example, when encoding/decoding a chroma block, whether to divide the chroma block and/or the encoding/decoding order may be determined based on the directionality of luma samples.
도 24는 루마 샘플들에 대한 방향성을 기반으로, 크로마 블록에 대한 부/복호화 정보가 결정되는 예를 도시한 것이다. Figure 24 shows an example in which encoding/decoding information for a chroma block is determined based on the directionality of luma samples.
도 24에서는, 크로마 블록의 동일 위치 루마 블록을, 블록 A 로 표시하였다.In Figure 24, the luma block at the same location as the chroma block is indicated as block A.
동일 위치 루마 블록이 결정되면, 동일 위치 루마 블록에 포함된 루마 샘플들을 기반으로, 동일 위치 루마 블록에 대한 방향성을 결정한다. 구체적으로, 동일 위치 루마 블록에, 복수의 인트라 예측 모드들을 적용한 뒤, 복수의 인트라 예측 모드들 중 가장 적은 비용을 갖는 인트라 예측 모드를 선택할 수 있다. 이떄, 인트라 예측은, 동일 위치 루마 블록(즉, 블록 A)에 인접하는 주변 샘플들을 참조 샘플들로 가정하여 수행될 수 있다. 인트라 예측 모드들 각각에 대한 비용은, 동일 위치 루마 블록(즉, 블록 A)에 포함된 복원(또는, 원본) 샘플에서 인트라 예측을 통해 생성된 예측값을 차분한 뒤, 동일 위치 루마 블록 내 모든 위치에서의 차분 절대값들을 합하여 유도될 수 있다. 그 후, 비용이 가장 적은 인트라 예측 모드를 동일 위치 루마 블록(즉, 블록 A)의 방향성으로 설정한다. Once the co-located luma block is determined, the direction for the co-located luma block is determined based on luma samples included in the co-located luma block. Specifically, after applying a plurality of intra prediction modes to the co-located luma block, the intra prediction mode with the lowest cost among the plurality of intra prediction modes may be selected. At this time, intra prediction can be performed by assuming that neighboring samples adjacent to the co-located luma block (i.e., block A) are reference samples. The cost for each of the intra prediction modes is calculated by subtracting the predicted value generated through intra prediction from the restored (or original) sample included in the co-located luma block (i.e., block A), and then calculating the cost for each of the intra-prediction modes at all locations within the co-located luma block. It can be derived by summing the absolute difference values of . Afterwards, the intra prediction mode with the lowest cost is set to the directionality of the co-located luma block (i.e., block A).
구체적으로, 블록 A에 대해, 최적의 비용을 갖는 인트라 예측 모드가 도 4의 2번 내지 33번 모드들 중 하나 인 경우, 블록 A의 방향성은 좌측으로 설정될 수 있다. 또는, 블록 A에 대해, 최적의 비용을 갖는 인트라 예측 모드가 도 4의 34번 내지 66번 모드들 중 하나인 경우, 블록 A의 방향성은 상단으로 결정될 수 있다. Specifically, for block A, if the intra prediction mode with the optimal cost is one of modes 2 to 33 in FIG. 4, the directionality of block A may be set to the left. Alternatively, for block A, if the intra prediction mode with the optimal cost is one of modes 34 to 66 of FIG. 4, the directionality of block A may be determined to be upper.
한편, 크로마 블록에 대한 부/복호화시, 동일 위치 루마 블록(즉, 블록 A)의 경우, 상단 및 좌측 영역뿐만 아니라, 우측 및 하단 영역에도, 기 복원된 샘플들이 존재할 수 있다. 이에 따라, 기 정의된 인트라 예측 모드들(즉, 도 4에 도시된 인트라 예측 모드들) 이외에, 우측 및 하단 참조 샘플들을 이용하는 확장된 방향의 인트라 예측 모드들(즉, 도 4에 도시된 방향성 인트라 예측 모드들과 반대 방향의 인트라 예측 모드들)을 추가 확인하여, 동일 위치 루마 블록의 방향성을 판단할 수도 있다. Meanwhile, when encoding/decoding a chroma block, in the case of a co-located luma block (i.e., block A), previously restored samples may exist not only in the top and left areas, but also in the right and bottom areas. Accordingly, in addition to the predefined intra prediction modes (i.e., the intra prediction modes shown in FIG. 4), extended directional intra prediction modes using the right and bottom reference samples (i.e., the directional intra prediction modes shown in FIG. 4) The directionality of the co-located luma block may be determined by additionally checking prediction modes and intra prediction modes in the opposite direction.
한편, 구현의 간소화를 위해 블록 A 및 블록 A와 인접한 주변 샘플들을 시계 방향으로 180도 회전한 뒤, 기 정의된 인트라 예측 모드들 각각에 대한 비용을 산출할 수 있다. 블록 A 및 주변 샘플들을 시계 방향으로 180도 회전하는 경우, 하단 참조 샘플들이 상단 참조 샘플들로 설정되고, 우측 참조 샘플들이 좌측 참조 샘플들로 설정될 수 있다. 기 정의된 인트라 예측 모드들 중 가장 작은 비용을 갖는 모드를 선택한 뒤, 선택된 인트라 예측 모드를 반대 방향(즉, 반시계 방향)으로 180도 회전하여, 우/하단 방향에 대한 최적의 인트라 예측 모드를 결정할 수 있다. Meanwhile, to simplify implementation, block A and surrounding samples adjacent to block A can be rotated clockwise by 180 degrees, and then the cost for each of the predefined intra prediction modes can be calculated. When block A and surrounding samples are rotated 180 degrees clockwise, lower reference samples may be set as upper reference samples, and right reference samples may be set as left reference samples. After selecting the mode with the lowest cost among the predefined intra prediction modes, the selected intra prediction mode is rotated 180 degrees in the opposite direction (i.e. counterclockwise) to determine the optimal intra prediction mode for the right/bottom direction. You can decide.
이후, 블록 A를 회전하지 않았을 때 선택된 좌/상단 방향에 대한 최적의 인트라 예측 모드와, 블록 A를 회전하였을 때 선택된 우/하단 방향에 대한 최적의 인트라 예측 모드 사이의 비용을 비교하여, 블록 A에 대한 방향성을 결정할 수 있다. Then, by comparing the cost between the optimal intra prediction mode for the left/top direction selected when block A is not rotated and the optimal intra prediction mode for the right/bottom direction selected when block A is rotated, block A direction can be determined.
일 예로, 블록 A에 대한 최적의 인트라 예측 모드가, 블록 A를 180도 회전하였을 때 유도된 것이고, 상기 최적의 인트라 예측 모드가 도 4의 2번 내지 33번 모드들 중 하나인 경우, 블록 A의 방향성은 우측으로 결정될 수 있다. 또는, 블록 A에 대한 최적의 인트라 예측 모드가, 블록 A를 180도 회전하였을 때 유도된 것이고, 상기 최적의 인트라 예측 모드가 도 4의 34번 내지 66번 모드들 중 하나인 경우, 블록 A의 방향성은 하단으로 결정될 수 있다. As an example, the optimal intra prediction mode for block A is derived when block A is rotated 180 degrees, and if the optimal intra prediction mode is one of modes 2 to 33 in FIG. 4, block A The direction of can be determined to the right. Alternatively, if the optimal intra prediction mode for block A is derived when block A is rotated 180 degrees, and the optimal intra prediction mode is one of modes 34 to 66 of FIG. 4, the The direction can be determined to be downward.
동일 위치 루마 블록 내 경계에 위치하는 복원 샘플들을 참조 샘플로 설정하여, 동일 위치 루마 블록에 대한 최적의 인트라 예측 모드를 결정하는 것도 가능하다.It is also possible to determine the optimal intra prediction mode for the co-located luma block by setting restored samples located at the boundary within the co-located luma block as reference samples.
도 25는 동일 위치 루마 블록 내 복원 샘플들을 참조 샘플들로서 이용하는 예를 나타낸 것이다.Figure 25 shows an example of using restored samples in the same location luma block as reference samples.
도 25에 도시된 예에서, w0, w1, h0 및 h1는 각각 동일 위치 루마 블록 내 참조 샘플들로 이용되는 복원 샘플들이 포함된 영역을 나타낸다. 상기 참조 샘플들이 포함되는 영역을 제외한 잔여 영역에 인트라 예측을 수행함으로써, 동일 위치 루마 블록에 대한 최적의 인트라 예측 모드가 유도될 수 있다. In the example shown in FIG. 25, w0, w1, h0, and h1 respectively represent areas containing restored samples used as reference samples in the co-located luma block. By performing intra prediction on the remaining area excluding the area containing the reference samples, the optimal intra prediction mode for the co-located luma block can be derived.
상술한 예에서와 같이, 기 정의된 인트라 예측 모드들 및/또는 확장된 방향의 인트라 예측 모드들 각각에 대한 비용을 산출하여, 동일 위치 루마 블록에 대한 최적의 인트라 예측 모드를 결정할 수 있다. As in the above example, the optimal intra prediction mode for the co-location luma block can be determined by calculating the cost for each of the predefined intra prediction modes and/or the extended direction intra prediction modes.
또는, 간소화를 위해, 동일 위치 루마 블록의 방향성 판단시, 동일 위치 루마 블록의 인트라 예측 모드를 이용할 수도 있다. 즉, 동일 위치 루마 블록을 부/복호화하는데 이용된 인트라 예측 모드를 기반으로, 동일 위치 루마 블록의 방향성이 결정될 수 있다.Alternatively, for simplicity, when determining the directionality of the co-located luma block, the intra prediction mode of the co-located luma block may be used. That is, the directionality of the co-located luma block can be determined based on the intra prediction mode used to encode/decode the co-located luma block.
또는, 인트라 예측 모드들을 복수의 그룹들로 분류하고, 그룹들 각각에 대한 비용을 산출하여, 동일 위치 루마 블록의 방향성을 판단할 수도 있다. Alternatively, the directionality of the co-location luma block may be determined by classifying intra prediction modes into a plurality of groups and calculating a cost for each group.
도 26은 인트라 예측 모드들이 복수의 그룹들로 분류된 예를 나타낸다. Figure 26 shows an example in which intra prediction modes are classified into a plurality of groups.
도 26에 도시된 예에서와 같이, 기 정의된 인트라 예측 모드들 및 기 정의된 인트라 예측 모드들 중 방향성 인트라 예측 모드들과 반대 방향인 확장된 인트라 예측 모드들을, 복수의 그룹들로 구획할 수 있다. As in the example shown in FIG. 26, predefined intra prediction modes and extended intra prediction modes in the opposite direction to the directional intra prediction modes among the predefined intra prediction modes can be divided into a plurality of groups. there is.
이후, 각 그룹 별로, 그룹에 속하는 인트라 예측 모드들 각각의 비용을 산출하고, 산출된 비용을 합하여, 그룹의 비용을 도출할 수 있다. Thereafter, for each group, the cost of each intra prediction mode belonging to the group can be calculated and the calculated costs can be added to derive the cost of the group.
이후, 복수 그룹들 중 좌측 방향에 해당하는 그룹들의 비용을 합하여, 좌측 방향에 대한 비용을 산출할 수 있다. Thereafter, the cost for the left direction can be calculated by adding the costs of the groups corresponding to the left direction among the plurality of groups.
일 예로, 도 26에 도시된 예에서, 그룹 a 및 그룹 h의 비용을 합하여, 좌측 방향에 대한 비용을 산출할 수 있다. 또한, 그룹 b 및 그룹 c의 비용을 합하여, 상단 방향에 대한 비용을 도출하고, 그룹 d 및 그룹 e의 비용을 합하여 우측 방향에 대한 비용을 도출할 수 있다. 또한, 그룹 f 및 그룹 g의 비용을 합하여, 하단 방향에 대한 비용을 도출할 수 있다. For example, in the example shown in FIG. 26, the cost for the left direction can be calculated by adding the costs of group a and group h. Additionally, the cost for the upper direction can be derived by combining the costs of group b and group c, and the cost for the right direction can be derived by combining the costs of group d and group e. Additionally, the cost for the bottom direction can be derived by combining the costs of group f and group g.
상단, 우측, 하단 및 좌측 방향 각각의 비용을 비교하여, 가장 낮은 비용을 갖는 방향을, 동일 위치 루마 블록의 방향으로 선택할 수 있다. By comparing the costs of each of the top, right, bottom, and left directions, the direction with the lowest cost can be selected as the direction of the co-located luma block.
또는, 도 26에 도시된 예에서, 그룹 a 및 그룹 b의 비용을 합한 것을, 좌측 방향에 대한 비용으로 설정하고, 그룹 c 및 그룹 d의 비용을 합한 것을 상단 방향에 대한 비용으로 설정할 수 있다. 또한, 그룹 e 및 그룹 f의 비용을 합한 것을 우측 방향에 대한 비용으로 설정하고, 그룹 g 및 그룹 h의 비용을 합한 것을 하단 방향에 대한 비용으로 설정할 수 있다. Alternatively, in the example shown in FIG. 26, the sum of the costs of group a and group b can be set as the cost for the left direction, and the sum of the costs of group c and group d can be set as the cost for the top direction. Additionally, the sum of the costs of group e and group f can be set as the cost for the right direction, and the sum of the costs of group g and group h can be set as the cost for the bottom direction.
한편, 루마 성분에 대해, 기 정의된 단위의 블록 마다 방향성을 판단하고, 동일 위치 루마 블록에 대한 방향성을, 동일 위치 루마 블록이 속하는 기 정의된 단위의 블록의 방향성과 동일하게 설정할 수도 있다. Meanwhile, for the luma component, the directionality may be determined for each block of a predefined unit, and the directionality for the luma block at the same location may be set to be the same as the directionality of the block of the predefined unit to which the luma block at the same location belongs.
일 예로, 코딩 트리 유닛 단위로, 방향성을 판단한 뒤, 동일 위치 루마 블록이 속하는 코딩 트리 유닛의 방향성을, 동일 위치 루마 블록의 방향성으로 판단할 수 있다. 이때, 코딩 트리 유닛에 대해 최적의 방향성을 유도하는 방법은, 상술한 실시예들을 따를 수 있다.For example, after determining the directionality in units of coding tree units, the directionality of the coding tree unit to which the co-located luma block belongs can be determined as the directionality of the co-located luma block. At this time, the method of deriving the optimal directionality for the coding tree unit may follow the above-described embodiments.
한편, 동일 위치 루마 블록의 방향성에 따라, 크로마 블록을 복수의 파티션들로 분할할 것인지 여부를 결정할 수도 있다. 일 예로, 동일 위치 루마 블록에 대한 최적의 인트라 예측 모드가 비방향성 예측 모드인 경우, 크로마 블록을 복수의 파티션들로 분할하지 않을 수 있다. 반면, 동일 위치 루마 블록에 대한 최적의 인트라 예측 모드가 방향성 예측 모드인 경우, 크로마 블록을 복수의 파티션들로 분할하는 것으로 결정할 수도 있다.Meanwhile, depending on the directionality of the co-located luma block, it may be determined whether to divide the chroma block into a plurality of partitions. For example, if the optimal intra prediction mode for a co-located luma block is a non-directional prediction mode, the chroma block may not be divided into a plurality of partitions. On the other hand, if the optimal intra prediction mode for the co-located luma block is the directional prediction mode, it may be decided to divide the chroma block into a plurality of partitions.
또는, 동일 위치 루마 블록을 고려함이 없이, 크로마 블록의 분할 여부를 독립적으로 결정할 수도 있다. Alternatively, it may be independently determined whether to split the chroma block without considering the co-located luma block.
동일 위치 루마 블록(즉, 블록 A)의 방향성이 결정되면, 동일 위치 루마 블록의 방향성에 기반하여, 크로마 블록 내 복수 서브 블록들의 부/복호화 순서를 결정할 수 있다. 일 예로, 크로마 블록을 4분할하여 부/복호화하는 경우, 동일 위치 루마 블록의 방향성에 따라, 4개 서브 블록들에 대한 부/복호화 시작점과 스캔 순서가 결정될 수 있다.Once the directionality of the co-located luma block (i.e., block A) is determined, the encoding/decoding order of the plurality of sub-blocks in the chroma block can be determined based on the directionality of the co-located luma block. For example, when a chroma block is divided into four and encoded/decoded, the encoding/decoding start point and scan order for the four sub-blocks may be determined depending on the direction of the co-located luma block.
도 27 및 도 28은 동일 위치 루마 블록의 방향성에 따라, 크로마 블록 내 각 서브 블록들에 대한 스캔 순서를 나타낸 것이다.Figures 27 and 28 show the scan order for each sub-block in the chroma block according to the direction of the co-located luma block.
도 27 및 도 28에서는, 크로마 블록이 4개의 파티션들로 분할되어 부/복호화된 것으로 가정하였다. 여기서, 각 파티션은, 부호화 단위(즉, CU), 예측 단위(즉, PU) 또는 변환 단위(TU) 중 적어도 하나일 수 있다.In Figures 27 and 28, it is assumed that the chroma block is divided into four partitions and encoded/decoded. Here, each partition may be at least one of a coding unit (ie, CU), prediction unit (ie, PU), or transformation unit (TU).
도시된 예에서와 달리, 크로마 블록을 더 많은 수의 파티션들로 분할하거나, 크로마 블록을 더 적은 수의 파티션들로 분할하는 경우에도, 본 실시예가 적용될 수 있다.Unlike the illustrated example, this embodiment can be applied even when the chroma block is divided into a larger number of partitions or the chroma block is divided into a smaller number of partitions.
도 27에서는, 크로마 블록이, 크로마 블록 대비 높이 및 너비가 각각 1/2인 4개의 파티션들로 분할된 것으로 예시되었다. In Figure 27, the chroma block is illustrated as being divided into 4 partitions whose height and width are each 1/2 that of the chroma block.
도 27의 (a)는, 동일 위치 루마 블록의 방향성이 상단(즉, 최적의 인트라 예측 모드가 34번 내지 66번 보드들 중 하나인 경우)인 경우, 크로마 블록 내 서브 블록들의 부/복호화 순서를 나타낸 것이다. 화살표는 분할된 블록들의 부/복호화 순서를 의미한다. 화살표의 시작점이 먼저 부/복호화됨을 나타내고, 화살표의 종료점이 나중에 부/복호화 됨을 나타낸다.Figure 27 (a) shows the encoding/decoding order of sub-blocks in the chroma block when the directionality of the co-located luma block is upper (i.e., when the optimal intra prediction mode is one of boards 34 to 66). It represents. Arrows indicate the encoding/decoding order of divided blocks. The starting point of the arrow indicates that it is encoded/decoded first, and the ending point of the arrow indicates that it is encoded/decoded later.
도 27의 (b)는, 동일 위치 루마 블록의 방향성이 좌측(즉, 최적의 인트라 예측 모드가 2번 내지 33번 모드들 중 하나인 경우)인 경우, 크로마 블록 내 서브 블록들의 부/복호화 순서를 나타낸 것이다.Figure 27(b) shows the encoding/decoding order of sub-blocks in the chroma block when the directionality of the co-located luma block is left (i.e., when the optimal intra prediction mode is one of modes 2 to 33). It represents.
도 27의 (c)는 동일 위치 루마 블록의 방향성이 우측(즉, 최적의 인트라 예측 모드가 2번 내지 33번 모드들 중 하나와 180도 반대방향인 경우)인 경우, 크로마 블록 내 서브 블록들의 부/복호화 순서를 나타낸 것이다. Figure 27(c) shows the sub-blocks in the chroma block when the directionality of the co-located luma block is right (i.e., when the optimal intra prediction mode is 180 degrees opposite to one of modes 2 to 33). This shows the encoding/decoding order.
도 27의 (d)는, 동일 위치 루마 블록의 방향성이 하단(즉, 최적의 인트라 예측 모드가 34번 내지 66번 모드들 중 하나와 180도 반대 방향인 경우)인 경우, 크로마 블록 내 서브 블록들의 부/복호화 순서를 나타낸 것이다. (d) of FIG. 27 shows, when the directionality of the co-located luma block is at the bottom (i.e., when the optimal intra prediction mode is 180 degrees opposite to one of modes 34 to 66), the sub-block within the chroma block This shows the encoding/decoding order.
도 27에 도시된 예에서와 달리, 크로마 블록을, 크로마 블록 대비 높이 또는 너비 중 하나가 1/4인 파티션들로 분할할 수도 있다. Unlike the example shown in FIG. 27, the chroma block may be divided into partitions whose height or width is 1/4 of that of the chroma block.
이때, 동일 위치 루마 블록의 방향성에 따라, 크로마 블록의 분할 방향이 결정될 수 있다. 일 예로, 동일 위치 루마 블록의 방향성이 상단 또는 하단인 경우, 크로마 블록은 도 28의 (a) 및 (b)에 도시된 예에서와 같이, 수평 방향으로 분할될 수 있다. 반면, 동일 위치 루마 블록의 방향성이 좌측 또는 우측인 경우, 크로마 블록은 도 28의 (c) 및 (d)에 도시된 예에서와 같이, 수직 방향으로 분할될 수 있다.At this time, the division direction of the chroma block may be determined according to the direction of the co-located luma block. For example, when the direction of the co-located luma block is top or bottom, the chroma block may be divided in the horizontal direction, as in the example shown in (a) and (b) of FIG. 28. On the other hand, when the direction of the co-located luma block is left or right, the chroma block may be divided in the vertical direction, as in the examples shown in (c) and (d) of Figures 28.
한편, 도 28의 (a)는, 동일 위치 루마 블록의 방향성이 상단(즉, 최적의 인트라 예측 모드가 34번 내지 66번 보드들 중 하나인 경우)인 경우, 크로마 블록 내 서브 블록들의 부/복호화 순서를 나타낸 것이다. Meanwhile, in (a) of FIG. 28, when the directionality of the co-located luma block is upper (i.e., when the optimal intra prediction mode is one of boards 34 to 66), the sub-blocks in the chroma block are shown in (a). This shows the decoding order.
도 28의 (b)는, 동일 위치 루마 블록의 방향성이 하단(즉, 최적의 인트라 예측 모드가 34번 내지 66번 모드들 중 하나와 180도 반대 방향인 경우)인 경우, 크로마 블록 내 서브 블록들의 부/복호화 순서를 나타낸 것이다. In (b) of Figure 28, when the direction of the co-located luma block is at the bottom (i.e., when the optimal intra prediction mode is 180 degrees opposite to one of modes 34 to 66), the sub-block within the chroma block This shows the encoding/decoding order.
도 28의 (c)는, 동일 위치 루마 블록의 방향성이 좌측(즉, 최적의 인트라 예측 모드가 2번 내지 33번 모드들 중 하나인 경우)인 경우, 크로마 블록 내 서브 블록들의 부/복호화 순서를 나타낸 것이다.Figure 28 (c) shows the encoding/decoding order of sub-blocks in the chroma block when the directionality of the co-located luma block is left (i.e., when the optimal intra prediction mode is one of modes 2 to 33). It represents.
도 28의 (d)는 동일 위치 루마 블록의 방향성이 우측(즉, 최적의 인트라 예측 모드가 2번 내지 33번 모드들 중 하나와 180도 반대방향인 경우)인 경우, 크로마 블록 내 서브 블록들의 부/복호화 순서를 나타낸 것이다. Figure 28 (d) shows the sub-blocks in the chroma block when the directionality of the co-located luma block is right (i.e., when the optimal intra prediction mode is 180 degrees opposite to one of modes 2 to 33). This shows the encoding/decoding order.
한편, 크로마 블록을 부/복호화 할 때, 동일 위치에 존재하는 루마 블록의 방향성을 판단하고, 루마 블록의 방향성에 따라, 크로마 블록에 회전 및/또는 플리핑을 수행할 수도 있다. 여기서, 회전 및/또는 플리핑은, 기준 블록, 부호화 블록, 예측 블록 또는 변환 블록 단위로 수행될 수 있다.Meanwhile, when encoding/decoding a chroma block, the directionality of a luma block existing at the same location may be determined, and rotation and/or flipping of the chroma block may be performed depending on the directionality of the luma block. Here, rotation and/or flipping may be performed in units of reference blocks, coding blocks, prediction blocks, or transform blocks.
회전 및/또는 플리핑이 수행된 경우, 회전 및/또는 플리핑된 크로마 블록에 대해, 부/복호화가 수행될 수 있다.When rotation and/or flipping are performed, encoding/decoding may be performed on the rotated and/or flipped chroma block.
도 29는 크로마 블록 내 샘플들에 대해 플리핑이 수행된 예를 나타낸 것이다. Figure 29 shows an example in which flipping is performed on samples within a chroma block.
도 29에서는, 크로마 블록의 크기가 4x4인 것으로 도시되었다. In Figure 29, the size of the chroma block is shown to be 4x4.
도 29에 도시된 예에서, p1 내지 p16은 크로마 블록 내 샘플들을 의미한다. In the example shown in FIG. 29, p1 to p16 refer to samples in the chroma block.
도 29의 (a)는, 플리핑을 수행되지 않은 상태의 크로마 블록을 나타낸다. Figure 29(a) shows a chroma block in a state where flipping has not been performed.
도 29의 (b)는 가로 방향으로 플리핑이 수행된 크로마 블록을 나타내고, 도 29의 (c)는, 세로 방향으로 플리핑이 수행된 크로마 블록을 나타낸다. Figure 29(b) shows a chroma block on which flipping was performed in the horizontal direction, and Figure 29(c) shows a chroma block on which flipping was performed on the vertical direction.
도 29의 (d)는 180도 플리핑(즉, 가로방향 플리핑 및 세로방향 플리핑)이 수행된 크로마 블록을 나타낸다. Figure 29(d) shows a chroma block on which 180 degree flipping (i.e., horizontal flipping and vertical flipping) was performed.
동일 위치 루마 블록에 대한 방향성이 좌측인 경우, 도 29의 (a)에 도시된 예에서와 같이, 플리핑이 적용되지 않을 수 있다. 반면, 동일 위치 루마 블록에 대한 방향성이 상단인 경우, 도 29의 (b)에 도시된 예에서와 같이, 가로 방향 플리핑이 적용될 수 있다. 또한, 동일 위치 루마 블록에 대한 방향성이 우측인 경우, 도 29의 (d)에 도시된 예에서와 같이, 가로 및 세로 방향 플리핑이 동시 적용될 수 있다. 반면, 동일 위치 루마 블록에 대한 방향성이 하단인 경우, 도 29의 (c)에 도시된 예에서와 같이, 세로 방향 플리핑이 적용될 수 있다. If the direction for the co-located luma block is left, flipping may not be applied, as in the example shown in (a) of FIG. 29. On the other hand, when the direction for the same location luma block is upper, horizontal flipping may be applied, as in the example shown in (b) of FIG. 29. Additionally, when the direction for the co-located luma block is right, horizontal and vertical flipping can be applied simultaneously, as in the example shown in (d) of FIG. 29. On the other hand, when the direction for the same location luma block is lower, vertical flipping may be applied, as in the example shown in (c) of FIG. 29.
또는, 동일 위치 루마 블록의 방향성에 기초하지 않고, 크로마 블록에 플리핑이 적용되는지 여부를 가리키는 정보 또는 플리핑 방향을 가리키는 정보 중 적어도 하나를 부호화하여 시그날링할 수도 있다. Alternatively, at least one of information indicating whether flipping is applied to the chroma block or information indicating the flipping direction may be encoded and signaled, rather than based on the direction of the co-located luma block.
한편, 크로마 블록에 대한 플리핑은, 동일 위치 루마 블록이 화면 내 예측으로 부호화된 경우에만 적용되도록 설정될 수도 있다. 일 예로, 동일 위치 루마 블록이 화면 내 예측이 아닌 화면 간 예측으로 부호화된 경우, 크로마 블록에 대해, 플리핑 관련 정보를 부/복호화하는 것이 생략되고, 크로마 블록에 대해, 플리핑이 수행되지 않을 수 있다. Meanwhile, flipping for a chroma block may be set to be applied only when the co-located luma block is encoded with intra-screen prediction. As an example, if the co-located luma block is encoded with inter-screen prediction rather than intra-screen prediction, encoding/decoding of flipping-related information for the chroma block is omitted, and flipping will not be performed for the chroma block. You can.
다른 예로, 상술한 동일 위치 루마 블록에 대한 최적의 인트라 예측 모드 결정 방법에 기반하여, 크로마 블록의 인트라 예측 모드를 결정할 수도 있다. 즉, 동일 위치 루마 블록에 대한 최적의 인트라 예측 모드를, 크로마 블록의 인트라 예측 모드로 설정할 수 있다.As another example, the intra prediction mode of the chroma block may be determined based on the method for determining the optimal intra prediction mode for the co-located luma block described above. That is, the optimal intra prediction mode for the co-located luma block can be set to the intra prediction mode of the chroma block.
또는, 크로마 블록의 기 결정된 크로마 블록의 인트라 예측 모드 및 동일 위치 루마 블록의 인트라 예측 모드를 기반으로, 크로마 블록에 대한 인트라 예측을 수행할 수도 있다. 여기서, 기 결정된 크로마 블록의 인트라 예측 모드는, DM (Direct Mode), 수평 방향 모드(Horizontal Mode), 수직 방향 모드 (Vertical Mode), DC 모드, 플래너 모드 또는 성분간 교차 예측 모드 중 적어도 하나일 수 있다. 여기서, DM 모드는, 동일 위치 루마 블록을 부/복호화는데 이용된 인트라 예측 모드를, 크로마 블록의 인트라 예측 모드로 설정하는 것일 수 있다.Alternatively, intra prediction may be performed on the chroma block based on the predetermined intra prediction mode of the chroma block and the intra prediction mode of the co-located luma block. Here, the intra prediction mode of the predetermined chroma block may be at least one of DM (Direct Mode), Horizontal Mode, Vertical Mode, DC Mode, Planar Mode, or Inter-Component Cross Prediction Mode. there is. Here, the DM mode may set the intra prediction mode used to encode/decode the co-located luma block to the intra prediction mode of the chroma block.
일 예로, 기 결정된 크로마 블록의 인트라 예측 모드를 기반으로, 크로마 블록에 대한 제1 예측 블록을 획득하고, 동일 위치 루마 블록의 최적의 인트라 예측 모드를 기반으로, 크로마 블록에 대한 제2 예측 블록을 획득할 수 있다. 이후, 제1 예측 블록 및 제2 예측 블록의 평균 또는 가중합 연산을 기반으로, 크로마 블록에 대한 최종 예측 블록을 획득할 수 있다. As an example, a first prediction block for the chroma block is obtained based on a predetermined intra prediction mode of the chroma block, and a second prediction block is obtained for the chroma block based on the optimal intra prediction mode of the co-located luma block. It can be obtained. Afterwards, the final prediction block for the chroma block can be obtained based on the average or weighted sum operation of the first prediction block and the second prediction block.
다른 예로, 인터 예측 모드와 인트라 예측 모드를 조합하여, 크로마 블록에 대한 최종 에측 블록을 획득할 수도 있다. 일 예로, 인트라 예측에 의해 획득된 인트라 예측 블록(또는, 제1 예측 블록)과 인터 예측에 의해 획득된 인터 예측 블록(또는, 제2 예측 블록)간의 평균 또는 가중합 연산을 통해 크로마 블록에 대한 최종 예측 블록을 생성할 수 있다. As another example, the final prediction block for the chroma block may be obtained by combining the inter prediction mode and the intra prediction mode. As an example, the chroma block is calculated through an average or weighted sum operation between an intra prediction block (or first prediction block) obtained by intra prediction and an inter prediction block (or second prediction block) obtained by inter prediction. The final prediction block can be generated.
이때, 인트라 예측은, 동일 위치 루마 블록의 최적의 인트라 예측 모드를 기반으로 수행되거나, CCLM 모드를 기반으로 수행될 수 있다.At this time, intra prediction may be performed based on the optimal intra prediction mode of the co-location luma block or may be performed based on CCLM mode.
또한, 인터 예측은, 움직임 정보 병합 모드, 움직임 벡터 예측 모드 또는 템플릿 매칭 모드 중 적어도 하나에 의해 수행될 수 있다. Additionally, inter prediction may be performed by at least one of a motion information merging mode, a motion vector prediction mode, or a template matching mode.
한편, 제1 예측 블록과 제2 예측 블록 간의 가중합 연산을 기초로, 최종 예측 블록을 획득하는 경우, 제1 예측 블록 및 제2 예측 블록 각각에 적용되는 가중치는 항상 동일한 값으로 설정될 수 있다. 또는, 기설정된 가중치 테이블 내 복수의 가중치 후보들 중 하나를 이용하여 제1 예측 블록 및 제2 예측 블록 각각에 적용되는 가중치를 결정할 수도 있다. 이 경우, 복수의 가중치 후보들 중 하나를 지시하는 인덱스가 부호화되어 시그날링될 수 있다. Meanwhile, when obtaining the final prediction block based on a weighted sum operation between the first prediction block and the second prediction block, the weights applied to each of the first prediction block and the second prediction block may always be set to the same value. . Alternatively, the weight applied to each of the first prediction block and the second prediction block may be determined using one of a plurality of weight candidates in a preset weight table. In this case, an index indicating one of a plurality of weight candidates may be encoded and signaled.
또는, 적어도 하나의 주변 블록의 부호화 모드를 참조하여 제1 예측 블록 및 제2 예측 블록 각각에 적용되는 가중치를 결정할 수도 있다. 일 예로, 복수의 주변 블록들 중 인트라 예측으로 부/복호화된 수가 인터 예측으로 부/복호화된 수보다 많은 경우, 제1 예측 블록에 적용되는 가중치가 제2 예측 블록에 적용되는 가중치보다 큰 값을 가질 수 있다. 반면, 복수의 주변 블록들 중 인터 예측으로 부/복호화된 수가 인트라 예측으로 부/복호화된 수보다 많은 경우, 제2 예측 블록에 적용되는 가중치가 제1 예측 블록에 적용되는 가중치보다 큰 값을 가질 수 있다. 복수의 주변 블록들 중 인트라 예측으로 부/복호화된 수와 인터 예측으로 부/복호화된 수가 같은 경우, 제1 예측 블록에 적용되는 가중치 및 제2 예측 블록에 적용되는 가중치는 동일한 값으로 설정될 수 있다. Alternatively, the weight applied to each of the first prediction block and the second prediction block may be determined by referring to the encoding mode of at least one neighboring block. For example, when the number of blocks encoded/decoded through intra prediction is greater than the number encoded/decoded by inter prediction, the weight applied to the first prediction block is greater than the weight applied to the second prediction block. You can have it. On the other hand, if the number of the plurality of neighboring blocks encoded/decoded through inter prediction is greater than the number encoded/decoded by intra prediction, the weight applied to the second prediction block will have a larger value than the weight applied to the first prediction block. You can. If the number encoded/decoded by intra prediction and the number encoded/decoded by inter prediction among a plurality of neighboring blocks are the same, the weight applied to the first prediction block and the weight applied to the second prediction block may be set to the same value. there is.
다른 예로, 크로마 블록의 인트라 예측 모드를 유도하는데 있어서, DM 모드가 이용되는 경우, 크로마 블록에 대해 인트라 예측을 수행하여 유도된 예측 샘플들에 대한 후처리를 수행할 수 있다. 상기 후처리는, 예측 샘플들을 보정하는 것일 수 있다. As another example, when deriving the intra prediction mode of a chroma block, when the DM mode is used, post-processing can be performed on prediction samples derived by performing intra prediction on the chroma block. The post-processing may be to correct prediction samples.
일 예로, 크로마 블록의 화면 내 예측 모드가 DM모드인 경우, 동일 위치 루마 블록의 인트라 예측 모드가, 크로마 블록의 인트라 예측 모드로 설정된다. For example, when the intra-prediction mode of the chroma block is DM mode, the intra-prediction mode of the co-located luma block is set to the intra-prediction mode of the chroma block.
한편, 동일 위치 루마 블록은, 인트라 예측을 통해 획득된 예측 샘플과, 원본 샘플 및 예측 샘플 간의 차분을 나타내는 잔차 샘플을 합하여 복원될 수 있다. 이때, 동일 위치 루마 블록 내 예측 오차가 큰 영역에 대응하는 크로마 블록 내 영역에서는, DM 모드를 사용하지 않도록 설정할 수 있다. Meanwhile, the co-located luma block can be restored by combining a prediction sample obtained through intra prediction and a residual sample representing the difference between the original sample and the prediction sample. At this time, the DM mode can be set not to be used in the area within the chroma block corresponding to the area with a large prediction error within the co-located luma block.
여기서, 예측 오차가 큰 영역인지 여부는, 잔차 샘플들의 값을 문턱값과 비교함으로써 결정될 수 있다. 또한, 예측 오차가 큰 영역에 대한 판단은, 샘플 단위 또는 기 정의된 크기의 서브 블록 단위로 수행될 수 있다. 일 예로, 상기 판단은, 2x2 또는 4x4 크기의 서브 블록 단위로 수행될 수 있다.Here, whether a region has a large prediction error can be determined by comparing the values of residual samples with a threshold value. Additionally, determination of an area with a large prediction error may be performed on a sample basis or a sub-block unit of a predefined size. As an example, the determination may be performed in units of subblocks of 2x2 or 4x4 size.
도 30은 동일 위치 루마 블록 내 서브 블록 단위로 예측 오차가 큰 영역인지 여부가 판정되는 예를 나타낸다. Figure 30 shows an example of determining whether or not an area has a large prediction error on a sub-block basis within the same location luma block.
도 30에 도시된 예에서와 같이, 크로마 블록 및 상기 크로마 블록과 동일 위치에 존재하는 루마 블록을 기 설정된 크기의 서브 블록들로 분할할 수 있다. 이때, 서브 블록의 크기 및/또는 형태는, 부호화기 및 복호화기에서 기 정의되어 있을 수 있다. 또는, 부/복호화하고자 하는 크로마 블록의 크기 및/또는 형태에 따라, 서브 블록의 크기 및/또는 형태가 적응적으로 결정될 수 있다. As in the example shown in FIG. 30, the chroma block and the luma block existing at the same location as the chroma block may be divided into sub-blocks of a preset size. At this time, the size and/or shape of the subblock may be predefined in the encoder and decoder. Alternatively, the size and/or shape of the sub-block may be adaptively determined depending on the size and/or shape of the chroma block to be encoded/decoded.
이후, 동일 위치 루마 블록 내 서브 블록들 각각에 대해, 예측 오차가 큰 영역인지 여부를 판단한다. 상기 판단은, 서브 블록 내 잔차 샘플들의 절대값을 평균한 값을 문턱값과 비교하여 수행될 수 있다. 일 예로, 평균값이 문턱값보다 큰 경우, 해당 서브 블록은, 예측 오차가 큰 영역으로 판정되고, 그렇지 않은 경우, 해당 서브 블록은, 예측 오차가 작은 영역으로 판정될 수 있다.Afterwards, for each sub-block in the co-located luma block, it is determined whether it is an area with a large prediction error. The determination may be performed by comparing the average of the absolute values of residual samples within the sub-block with a threshold value. For example, if the average value is greater than the threshold, the corresponding sub-block may be determined to be an area with a large prediction error. Otherwise, the sub-block may be determined to be an area with a small prediction error.
또는, 서브 블록 내 잔차 샘플들 절대값 중 최소값, 최대값 또는 중간값을 문턱값과 비교하여, 해당 서브 블록이 예측 오차가 큰 영역인지 여부를 판정할 수도 있다.Alternatively, the minimum, maximum, or median value among absolute values of residual samples within a subblock may be compared with a threshold value to determine whether the corresponding subblock is an area with a large prediction error.
여기서, 문턱값은, 부호화기 및 복호화기서 기 정의된 값일 수 있다. 또는, 문턱값을 나타내는 정보가 명시적으로 부호화되어 시그날링될 수 있다. Here, the threshold value may be a value predefined in the encoder and decoder. Alternatively, information representing the threshold may be explicitly encoded and signaled.
또는, 동일 위치 루마 블록 내 잔차 샘플들의 절대값을 평균한 값을 기반으로 문턱값을 유도할 수 있다. 일 예로, 상기 문턱값은, 루마 블록 내 잔차 샘플들의 절대값을 평균한 값이거나, 상기 평균값에 오프셋을 가산 또는 감산한 값일 수 있다.Alternatively, the threshold value can be derived based on the average of the absolute values of residual samples within the same location luma block. As an example, the threshold value may be an average of the absolute values of residual samples in the luma block, or may be a value obtained by adding or subtracting an offset to the average value.
또는, 동일 위치 루마 블록 내 잔차 샘플들의 절대값 중 최소값, 최대값 또는 중간값을 기반으로 문턱값을 유도할 수 있다. 일 예로, 상기 문턱값은, 루마 블록 내 잔차 샘플들의 절대값 중 최소값, 최대값 또는 중간값과 동일하게 설정되거나, 최소값, 최대값 또는 중간값에 오프셋을 가산 또는 감산한 값일 수 있다. Alternatively, the threshold value may be derived based on the minimum, maximum, or median value among the absolute values of residual samples in the same location luma block. As an example, the threshold value may be set equal to the minimum, maximum, or median value among the absolute values of residual samples in the luma block, or may be a value obtained by adding or subtracting an offset to the minimum, maximum, or median value.
도 30에 도시된 예에서는, 동일 위치 루마 블록 내 서브블록 A 및 서브 블록 B가 예측 오차가 큰 영역으로 판정된 것으로 예시되었다. 이 경우, 서브 블록 A 및 서브 블록 B에 대응하는 크로마 블록 내 서브 블록 a 및 서브 블록 b에서는 DM모드를 사용하지 않을 수 있다. In the example shown in FIG. 30, subblock A and subblock B within the co-located luma block are determined to be areas with large prediction errors. In this case, the DM mode may not be used in subblock a and subblock b in the chroma block corresponding to subblock A and subblock B.
DM 모드가 사용되지 않는 영역에서는, 기 정의된 인트라 예측 모드를 사용하여 인트라 예측이 수행될 수 있다. 일 예로, 기 정의된 인트라 예측 모드는, 평면(Planar) 모드 또는 DC 모드일 수 있다. In areas where DM mode is not used, intra prediction may be performed using a predefined intra prediction mode. As an example, the predefined intra prediction mode may be planar mode or DC mode.
또는, 디코더 측에서 DM 모드가 사용되지 않는 영역을 위한 인트라 예측 모드를 유도할 수도 있다. 일 예로, 루마 블록 내 예측 오차가 큰 영역 주변에 존재하는 복원 샘플들을 이용하여, 예측 오차가 큰 영역에 대한 최적의 인트라 예측 모드를 유도할 수 있다. 일 예로, 도 30에 도시된 예에서, 동일 위치 루마 블록 내 서브 블록 A 및 서브 블록 B 각각에 대해 최적의 인트라 예측 모드를 유도할 수 있다. 서브 블록 A 및 서브 블록 B 각각에 대해 최적의 인트라 예측 모드가 유도되면, 서브 블록 A에 대해 유도된 최적의 인트라 예측 모드를, 크로마 블록 내 서브 블록 a의 인트라 예측 모드로 설정하고, 서브 블록 B에 대해 유도된 최적의 인트라 예측 모드를, 크로마 블록 내 서브 블록 b의 인트라 예측 모드로 설정할 수 있다. Alternatively, the decoder may derive an intra prediction mode for an area where DM mode is not used. As an example, the optimal intra prediction mode for the area with large prediction error can be derived using restored samples that exist around the area with large prediction error in the luma block. For example, in the example shown in FIG. 30, the optimal intra prediction mode can be derived for each of subblock A and subblock B within the co-located luma block. When the optimal intra prediction mode is derived for each of subblock A and subblock B, the optimal intra prediction mode derived for subblock A is set to the intra prediction mode of subblock a in the chroma block, and subblock B The optimal intra prediction mode derived for can be set as the intra prediction mode of subblock b in the chroma block.
한편, 동일 위치 루마 블록 내 예측 오차가 큰 영역에 대해서는, DM 모드의 적용이 제한되는지 여부를 나타내는 정보가 명시적으로 부호화되어 시그날링될 수 있다. 상기 정보는 1비트의 플래그일 수 있다. Meanwhile, for areas with large prediction errors within the co-located luma block, information indicating whether application of DM mode is restricted may be explicitly encoded and signaled. The information may be a 1-bit flag.
상술한 실시예들에서 사용된 신택스들의 명칭은, 설명의 편의를 위해 명명된 것에 불과하다.The names of syntaxes used in the above-described embodiments are merely named for convenience of explanation.
복호화 과정 또는 부호화 과정을 중심으로 설명된 실시예들을, 부호화 과정 또는 복호화 과정에 적용하는 것은, 본 개시의 범주에 포함되는 것이다. 소정의 순서로 설명된 실시예들을, 설명된 것과 상이한 순서로 변경하는 것 역시, 본 개시의 범주에 포함되는 것이다.Applying the embodiments described focusing on the decoding process or encoding process to the encoding process or decoding process is included in the scope of the present disclosure. Modification of the embodiments described in the given order to an order different from that described is also included within the scope of the present disclosure.
상술한 개시는 일련의 단계 또는 순서도를 기초로 설명되고 있으나, 이는 발명의 시계열적 순서를 한정한 것은 아니며, 필요에 따라 동시에 수행되거나 다른 순서로 수행될 수 있다. 또한, 상술한 개시에서 블록도를 구성하는 구성요소(예를 들어, 유닛, 모듈 등) 각각은 하드웨어 장치 또는 소프트웨어로 구현될 수도 있고, 복수의 구성요소가 결합하여 하나의 하드웨어 장치 또는 소프트웨어로 구현될 수도 있다. 일 예로, 상기 하드웨어 장치는, 연산을 수행하기 위한 프로세서, 데이터를 저장하는 메모리, 데이터를 전송하는 송신기 및 데이터를 수신하는 수신기 중 적어도 하나를 포함할 수 있다.Although the above-described disclosure is explained based on a series of steps or a flowchart, this does not limit the chronological order of the invention, and may be performed simultaneously or in a different order as needed. In addition, each of the components (e.g., units, modules, etc.) constituting the block diagram in the above-described disclosure may be implemented as a hardware device or software, and a plurality of components may be combined to form a single hardware device or software. It could be. As an example, the hardware device may include at least one of a processor for performing operations, a memory for storing data, a transmitter for transmitting data, and a receiver for receiving data.
상술한 개시는 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. The above-described disclosure may be implemented in the form of program instructions that can be executed through various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc., singly or in combination.
또한, 본 개시에 의하면, 상술한 부호화 방법에 의해 생성된 비트스트림을 저장하는 컴퓨터로 판독 가능한 기록 매체가 제공될 수 있다. 상기 비트스트림은, 부호화 장치에 의해 전송될 수 있고, 복호화 장치는, 상기 비트스트림을 수신하여, 영상을 복호화할 수 있다. Additionally, according to the present disclosure, a computer-readable recording medium that stores a bitstream generated by the above-described encoding method can be provided. The bitstream may be transmitted by an encoding device, and the decoding device may receive the bitstream and decode the image.
컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 상기 하드웨어 장치는 본 개시에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, and magneto-optical media such as floptical disks. media), and hardware devices specifically configured to store and perform program instructions, such as ROM, RAM, flash memory, etc. The hardware devices may be configured to operate as one or more software modules to perform processing according to the present disclosure, and vice versa.
본 개시를 통한 실시예들은 영상을 부호화 또는 복호화하는 전자기기에 적용될 수 있다. Embodiments through this disclosure can be applied to electronic devices that encode or decode images.

Claims (15)

  1. 크로마 블록을 복수의 파티션들로 분할하는 단계; 및dividing the chroma block into a plurality of partitions; and
    상기 크로마 블록 내 상기 파티션들 각각에 대해 인트라 예측을 수행하는 단계를 포함하되,Including performing intra prediction on each of the partitions in the chroma block,
    상기 크로마 블록의 파티션 타입은, 상기 크로마 블록의 동일 위치 루마 블록의 파티션 타입 또는 방향성 중 적어도 하나를 기반으로 결정되는 것을 특징으로 하는, 영상 복호화 방법.An image decoding method, wherein the partition type of the chroma block is determined based on at least one of the partition type or the directionality of the co-located luma block of the chroma block.
  2. 제1 항에 있어서,According to claim 1,
    상기 크로마 블록의 상기 파티션 타입은, 상기 동일 위치 루마 블록의 상기 파티션 타입과 동일하게 설정되는 것을 특징으로 하는, 영상 복호화 방법.The partition type of the chroma block is set to be the same as the partition type of the co-located luma block.
  3. 제1 항에 있어서,According to claim 1,
    상기 복수의 파티션들은, 상기 크로마 블록을, 수평 방향 또는 수직 방향으로 분할하여 생성되고,The plurality of partitions are created by dividing the chroma block in a horizontal or vertical direction,
    상기 크로마 블록의 분할 방향은, 상기 동일 위치 루마 블록의 상기 방향성을 기초로 결정되는 것을 특징으로 하는, 영상 복호화 방법.An image decoding method, wherein the division direction of the chroma block is determined based on the directionality of the co-located luma block.
  4. 제1 항에 있어서,According to claim 1,
    상기 크로마 블록 내 복수의 파티션들에 대한 복호화 순서는, 상기 동일 위치 루마 블록의 상기 방향성을 기초로 결정되는 것을 특징으로 하는, 영상 복호화 방법.An image decoding method, wherein the decoding order of the plurality of partitions in the chroma block is determined based on the directionality of the co-located luma block.
  5. 제1 항에 있어서,According to claim 1,
    상기 크로마 블록에 대해 플리핑을 수행할 것인지 여부를 결정하는 단계를 더 포함하고,Further comprising determining whether to perform flipping on the chroma block,
    상기 크로마 블록에 대한 상기 플리핑은, 가로 방향 또는 세로 방향 중 적어도 하나에 대해 수행되는 것을 특징으로 하는, 영상 복호화 방법.An image decoding method, wherein the flipping of the chroma block is performed in at least one of the horizontal direction and the vertical direction.
  6. 제5 항에 있어서,According to clause 5,
    상기 동일 위치 루마 블록의 상기 방향성에 기초하여, 상기 플리핑의 수행 여부 및 상기 플리핑의 수행 방향이 결정되는 것을 특징으로 하는, 영상 복호화 방법.An image decoding method, wherein whether to perform the flipping and a direction to perform the flipping are determined based on the directionality of the co-located luma block.
  7. 제5 항에 있어서,According to clause 5,
    상기 플리핑은, 상기 동일 위치 루마 블록이 인트라 예측으로 부호화된 경우에 한하여 허용되는 것을 특징으로 하는, 영상 복호화 방법.The flipping is allowed only when the co-located luma block is encoded by intra prediction.
  8. 제1 항에 있어서,According to claim 1,
    상기 크로마 블록 내 상기 복수의 파티션들 각각의 인트라 예측 모드는, 상기 동일 위치 루마 블록에 포함된 복수의 파티션들 각각의 인트라 예측 모드와 동일하게 설정되는 것을 특징으로 하는, 영상 복호화 방법.An image decoding method, wherein the intra prediction mode of each of the plurality of partitions in the chroma block is set to be the same as the intra prediction mode of each of the plurality of partitions included in the co-located luma block.
  9. 제1 항에 있어서,According to claim 1,
    상기 크로마 블록 내 상기 복수의 파티션들 중 상기 동일 위치 루마 블록 내 예측 오차가 큰 영역에 대응되는 파티션에는, 기 정의된 인트라 예측 모드가 적용되고, A predefined intra prediction mode is applied to a partition corresponding to an area with a large prediction error in the co-located luma block among the plurality of partitions in the chroma block,
    그렇지 않는 파티션에는, 상기 동일 위치 루마 블록의 인트라 예측 모드가 적용되는 것을 특징으로 하는, 영상 복호화 방법.An image decoding method, characterized in that the intra prediction mode of the co-located luma block is applied to the partition otherwise.
  10. 제9 항에 있어서,According to clause 9,
    상기 동일 위치 루마 블록 내 서브 영역이 예측 오차가 큰 영역인지 여부는, 상기 서브 영역 내 잔차 샘플들 절대값의 평균값을 문턱값과 비교하여 결정되는 것을 특징으로 하는, 영상 복호화 방법.An image decoding method, characterized in that whether the sub-region in the co-located luma block is an area with a large prediction error is determined by comparing the average value of absolute values of residual samples in the sub-region with a threshold value.
  11. 제10 항에 있어서,According to claim 10,
    상기 문턱값은, 상기 동일 위치 루마 블록 내 잔차 샘플들 절대값의 평균값을 기반으로 유도되는 것을 특징으로 하는, 영상 복호화 방법.The threshold value is derived based on the average value of absolute values of residual samples within the co-located luma block.
  12. 제1 항에 있어서,According to claim 1,
    상기 동일 위치 루마 블록의 상기 방향성은, 기 정의된 인트라 예측 모드들 및 상기 동일 위치 루마 블록 주변의 참조 샘플들을 기반으로 수행된 인트라 예측 수행 결과에 따라 도출된 최적의 인트라 예측 모드를 기초로 결정되는 것을 특징으로 하는, 영상 복호화 방법.The directionality of the co-located luma block is determined based on predefined intra prediction modes and an optimal intra prediction mode derived according to an intra prediction result performed based on reference samples around the co-located luma block. A video decoding method, characterized in that.
  13. 제12 항에 있어서,According to claim 12,
    상기 동일 위치 루마 블록의 상기 방향성은,The directionality of the co-located luma block is:
    상기 동일 위치 루마 블록이 포함된 기준 블록의 방향성과 동일하게 설정되는 것을 특징으로 하는, 영상 복호화 방법.An image decoding method, characterized in that the direction of the reference block including the co-located luma block is set to be the same.
  14. 크로마 블록을 복수의 파티션들로 분할하는 단계; 및dividing the chroma block into a plurality of partitions; and
    상기 크로마 블록 내 상기 파티션들 각각에 대해 인트라 예측을 수행하는 단계를 포함하되,Including performing intra prediction on each of the partitions in the chroma block,
    상기 크로마 블록의 파티션 타입은, 상기 크로마 블록의 동일 위치 루마 블록의 파티션 타입 또는 방향성 중 적어도 하나를 기반으로 결정되는 것을 특징으로 하는, 영상 부호화 방법.An image encoding method, wherein the partition type of the chroma block is determined based on at least one of the partition type or the directionality of the co-located luma block of the chroma block.
  15. 크로마 블록을 복수의 파티션들로 분할하는 단계; 및dividing the chroma block into a plurality of partitions; and
    상기 크로마 블록 내 상기 파티션들 각각에 대해 인트라 예측을 수행하는 단계를 포함하되,Including performing intra prediction on each of the partitions in the chroma block,
    상기 크로마 블록의 파티션 타입은, 상기 크로마 블록의 동일 위치 루마 블록의 파티션 타입 또는 방향성 중 적어도 하나를 기반으로 결정되는 것을 특징으로 하는, 영상 부호화 방법에 의해 생성된 비트스트림을 저장하는 컴퓨터로 판독 가능한 기록 매체. The partition type of the chroma block is determined based on at least one of the partition type or directionality of the co-located luma block of the chroma block. A computer-readable device for storing a bitstream generated by an image encoding method. Recording media.
PCT/KR2023/017031 2022-10-28 2023-10-30 Video encoding/decoding method and recording medium for storing bitstream WO2024091094A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR20220141783 2022-10-28
KR10-2022-0141783 2022-10-28
KR10-2023-0145632 2023-10-27
KR1020230145632A KR20240062999A (en) 2022-10-28 2023-10-27 A method of encoding/decoding a video and recording medium storing bitstream

Publications (1)

Publication Number Publication Date
WO2024091094A1 true WO2024091094A1 (en) 2024-05-02

Family

ID=90831495

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2023/017031 WO2024091094A1 (en) 2022-10-28 2023-10-30 Video encoding/decoding method and recording medium for storing bitstream

Country Status (1)

Country Link
WO (1) WO2024091094A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180009318A (en) * 2016-07-18 2018-01-26 한국전자통신연구원 Method and apparatus for encoding/decoding image, recording medium for stroing bitstream
KR20200110220A (en) * 2019-03-12 2020-09-23 현대자동차주식회사 Method and apparatus for efficiently coding residual block
US20210400266A1 (en) * 2020-06-18 2021-12-23 Tencent America LLC Separate constrained directional enhancement filter
KR20210156826A (en) * 2016-10-04 2021-12-27 한국전자통신연구원 Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20220106216A (en) * 2020-12-16 2022-07-28 텐센트 아메리카 엘엘씨 Method and apparatus for video filtering

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180009318A (en) * 2016-07-18 2018-01-26 한국전자통신연구원 Method and apparatus for encoding/decoding image, recording medium for stroing bitstream
KR20210156826A (en) * 2016-10-04 2021-12-27 한국전자통신연구원 Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20200110220A (en) * 2019-03-12 2020-09-23 현대자동차주식회사 Method and apparatus for efficiently coding residual block
US20210400266A1 (en) * 2020-06-18 2021-12-23 Tencent America LLC Separate constrained directional enhancement filter
KR20220106216A (en) * 2020-12-16 2022-07-28 텐센트 아메리카 엘엘씨 Method and apparatus for video filtering

Similar Documents

Publication Publication Date Title
WO2017171370A1 (en) Method and apparatus for processing video signal
WO2018026219A1 (en) Video signal processing method and device
WO2017176030A1 (en) Method and apparatus for processing video signal
WO2017222326A1 (en) Video signal processing method and device
WO2020111785A1 (en) Method for encoding/decoding video signal and apparatus therefor
WO2018030599A1 (en) Intra-prediction mode-based image processing method and device therefor
WO2020096389A1 (en) Image signal encoding/decoding method and apparatus therefor
WO2018097626A1 (en) Video signal processing method and apparatus
WO2020076116A1 (en) Image encoding/decoding methods and apparatuses
WO2018047995A1 (en) Intra-prediction mode-based image processing method and apparatus therefor
WO2019182292A1 (en) Method and apparatus for video signal processing
WO2019050292A1 (en) Method and device for processing video signal
WO2020096428A1 (en) Method for encoding/decoding image signal and device therefor
WO2019190201A1 (en) Video signal processing method and device
WO2018212579A1 (en) Method and device for video signal processing
WO2018056701A1 (en) Method and apparatus for processing video signal
WO2018066958A1 (en) Method and apparatus for processing video signal
WO2019050291A1 (en) Method and device for processing video signal
WO2019221465A1 (en) Image decoding method/device, image encoding method/device, and recording medium in which bitstream is stored
WO2020213963A1 (en) Method for encoding/decoding image signal, and device for same
WO2020096427A1 (en) Image signal encoding/decoding method and apparatus therefor
WO2020060327A1 (en) Image signal encoding/decoding method and device therefor
WO2020004978A1 (en) Method and apparatus for processing video signal
WO2018155985A1 (en) Video signal processing method and device
WO2020159199A1 (en) Image signal encoding/decoding method and device therefor