Image encoding / decoding method and apparatus

WO2026197781A1PCT designated stage Publication Date: 2026-09-24UNIVERSITY INDUSTRY COOPERATION GROUP OF KYUNG HEE UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2026/004335
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2026-03-17
Filing Date
2026-03-17
Publication Date
2026-09-24

Smart Images

  • Figure KR2026004335_24092026_PF_FP_ABST
    Figure KR2026004335_24092026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to an image encoding / decoding method and apparatus. The image decoding method according to an embodiment of the present invention may comprise the steps of: setting a chrominance template region adjacent to a current chrominance block; setting a corresponding luminance block corresponding to the current chrominance block and a luminance template region adjacent to the corresponding luminance block; deriving a down-sampled luminance sample on the basis of the corresponding luminance block and the luminance template region; and generating a prediction block for the current chrominance block by applying a convolution filter to the down-sampled luminance sample, wherein size information of the chrominance template region includes a height of an upper chrominance template region and a width of a left chrominance template region, and the size information of the chrominance template region is determined on the basis of a coding parameter of the current chrominance block.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding / decoding method and device

[0001] The present invention relates to an image encoding / decoding method and apparatus, and more specifically, to an image encoding / decoding method and apparatus for improving the efficiency of intra-prediction of chrominance components using intra-prediction information of luminance components.

[0002] Recently, the demand for multimedia data, such as video, has been increasing rapidly. In particular, the demand for high-resolution, high-quality video, such as HD (High Definition) and UHD (Ultra High Definition), is growing across various application fields. High-resolution, high-quality video data involves a much larger volume compared to conventional video data. Consequently, the transmission and storage costs for storing and / or transmitting such high-resolution, high-quality video data increase compared to conventional video data.

[0003] To solve these problems, high-efficiency video encoding / decoding technology for videos with higher resolution and quality is required.

[0004] To encode images, various techniques are used, including intra-prediction techniques that predict pixel values ​​within the current picture using pixel information within the current picture, intra-prediction techniques that predict pixel values ​​from previous or subsequent pictures, transformation and quantization techniques to compress the energy of residual signals—the difference between the predicted signal and the original signal—and entropy coding techniques that assign short codes to values ​​with high frequency and long codes to values ​​with low frequency. Furthermore, to improve image encoding efficiency, various tools are being developed to implement each of these techniques. Additionally, to decode the encoded image, the image can be restored and reproduced through image decoding techniques that utilize technologies and tools corresponding to the image encoding techniques.

[0005] By utilizing these video encoding and video decoding technologies, video data can be effectively compressed, transmitted, stored, and played back.

[0006] The present disclosure aims to provide an image encoding / decoding method and apparatus that improve the inefficiency of an intra-prediction method for a chrominance block based on intra-prediction information of a corresponding luminance block and improve the compression efficiency of image data.

[0007] The technical problems to be solved by the present disclosure are not limited to those mentioned above. In addition, other technical problems not mentioned in the present disclosure will be clearly understood by those skilled in the art from the present disclosure.

[0008] An image decoding method according to one embodiment of the present invention comprises the steps of: setting a color difference template region adjacent to a current color difference block; setting a corresponding luminance block corresponding to the current color difference block and a luminance template region adjacent to the corresponding luminance block; deriving downsampled luminance samples based on the corresponding luminance block and the luminance template region; and applying a convolutional filter to the downsampled luminance samples to generate a prediction block for the current color difference block. The size information of the color difference template region includes the height of the upper color difference template region and the width of the left color difference template region, and the size information of the color difference template region may be determined based on the coding parameters of the current color difference block.

[0009] In the above image decoding method, the coding parameter of the current color difference block may be at least one of the size of the current color difference block, the shape of the current color difference block, the type of slice containing the current color difference block, and the QP (Quantization Parameter) value of the current color difference block.

[0010] In the above image decoding method, the size information of the color difference template area is determined based on the coding parameters of blocks adjacent to the current color difference block, and the coding parameters of blocks adjacent to the current color difference block may be at least one of the QP (Quantization Parameter) value, mode type, prediction information, BS value, and segmentation information of blocks adjacent to the current color difference block.

[0011] In the above image decoding method, the size information of the color difference template region may be the size information of one color difference template region determined from among a plurality of predefined size informations of color difference template regions.

[0012] In the above image decoding method, the size information of a determined color difference template area can be determined based on information indicating the size information of a color difference template area.

[0013] In the above image decoding method, the size information of a determined single color difference template region can be determined based on the RDO (Rate-Distortion Optimization) value of each of the size information of a plurality of color difference template regions.

[0014] In the above image decoding method, the color difference template area includes an upper color difference template area and a left color difference template area, the upper color difference template area includes an upper color difference extension area, and the left color difference template area may include a left color difference extension area.

[0015] In the above image decoding method, the width of the upper color difference expansion area and the height of the left color difference expansion area can each be determined based on at least one of the size of the current color difference block, the shape of the current color difference block, the type of slice containing the current color difference block, and the QP (Quantization Parameter) value of the current color difference block.

[0016] In the above image decoding method, the width of the upper color difference expansion area and the height of the left color difference expansion area are each determined based on the coding parameters of the blocks adjacent to the current color difference block, and the coding parameters of the blocks adjacent to the current color difference block may be at least one of the QP (Quantization Parameter) value, mode type, prediction information, BS value, and segmentation information of the blocks adjacent to the current color difference block.

[0017] In the above image decoding method, the size information of the color difference expansion area includes the width of the upper color difference expansion area and the height of the left color difference expansion area, and may be the size information of one color difference expansion area determined among a plurality of predetermined size informations of color difference expansion areas.

[0018] In the above image decoding method, the size information of a determined color difference expansion area can be determined based on information indicating the size information of a color difference expansion area.

[0019] A video encoding method according to one embodiment of the present invention comprises the steps of: setting a color difference template region adjacent to a current color difference block; setting a corresponding luminance block corresponding to the current color difference block and a luminance template region adjacent to the corresponding luminance block; deriving downsampled luminance samples based on the corresponding luminance block and the luminance template region; and applying a convolutional filter to the downsampled luminance samples to generate a prediction block for the current color difference block. The size information of the color difference template region includes the height of the upper color difference template region and the width of the left color difference template region, and the size information of the color difference template region may be determined based on the coding parameters of the current color difference block.

[0020] A non-transient computer-readable recording medium storing a bitstream generated by an image encoding method according to an embodiment of the present invention may store a bitstream generated by an image encoding method comprising the steps of: setting a color difference template area adjacent to a current color difference block; determining a downsampling filter based on a corresponding luminance block and a luminance template area; determining a convolutional filter applied to a downsampled luminance sample; and applying the convolutional filter to a downsampled luminance sample to generate a prediction block for the current color difference block, wherein the size information of the color difference template area includes the height of an upper color difference template area and the width of a left color difference template area, and the size information of the color difference template area is determined based on the coding parameters of the current color difference block.

[0021] A method for transmitting a bitstream generated by an image encoding method according to an embodiment of the present invention includes the step of transmitting the bitstream, and the image encoding method includes the step of setting a color difference template area adjacent to a current color difference block, the step of setting a corresponding luminance block corresponding to the current color difference block and a luminance template area adjacent to the corresponding luminance block, the step of deriving downsampled luminance samples based on the corresponding luminance block and the luminance template area, and the step of applying a convolutional filter to the downsampled luminance samples to generate a prediction block for the current color difference block, wherein the size information of the color difference template area includes the height of the upper color difference template area and the width of the left color difference template area, and the size information of the color difference template area may be determined based on the coding parameters of the current color difference block.

[0022] The present disclosure aims to provide an image encoding / decoding method and apparatus that improve the inefficiency of an intra-prediction method for a chrominance block based on intra-prediction information of a corresponding luminance block and improve the compression efficiency of image data.

[0023] Additionally, according to the present disclosure, a recording medium storing a bitstream generated by the image encoding method or device of the present invention may be provided.

[0024] The effects obtainable from the present disclosure are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art from the description below.

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

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

[0027] FIG. 3 is a schematic diagram showing a video coding system to which the present invention can be applied.

[0028] FIG. 4 is a diagram illustrating an exemplary content streaming system to which an embodiment according to the present invention can be applied.

[0029] FIG. 5 is a diagram illustrating a luminance component-based color difference component prediction according to one embodiment of the present disclosure.

[0030] FIG. 6 is a diagram illustrating a method for predicting color difference components based on luminance components according to one embodiment of the present disclosure.

[0031] FIG. 7 is a drawing for illustrating a template area according to one embodiment of the present disclosure.

[0032] FIG. 8 is a drawing for illustrating a template area according to one embodiment of the present disclosure.

[0033] Figure 9 is a diagram illustrating a downsampling method for applying a luminance component-based color difference component prediction method.

[0034] Figure 10 is a diagram illustrating a downsampling method for applying a luminance component-based color difference component prediction method.

[0035] Figure 11 is a diagram illustrating a downsampling method for applying a luminance component-based color difference component prediction method.

[0036] FIG. 12 is a flowchart illustrating a method for predicting color difference components based on luminance components according to one embodiment of the present disclosure.

[0037] The present invention is susceptible to various modifications and may have various embodiments; specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the invention to specific embodiments, and it should be understood that the invention includes all modifications, equivalents, and substitutions that fall within the spirit and scope of the invention. Similar reference numerals have been used for similar components in the description of each drawing.

[0038] Terms such as "first," "second," etc., may be used to describe various components, but said components should not be limited by said terms. These terms are used solely for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be named the second component, and similarly, the second component may be named the first component. The term "and / or" includes a combination of a plurality of related described items or any of a plurality of related described items.

[0039] When it is stated that one component is "connected" or "connected" to another component, it should be understood that while it may be directly connected or connected to that other component, there may also be other components in between. On the other hand, when it is stated that one component is "directly connected" or "directly connected" to another component, it should be understood that there are no other components in between.

[0040] The terms used in this application are used merely to describe specific embodiments and are not intended to limit the invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, terms such as "comprising" or "having" are intended to specify the presence of the features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.

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

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

[0043] Referring to FIG. 1, the image encoding device (100) may include an image segmentation unit (101), an intra prediction unit (102), an inter prediction unit (103), a subtraction unit (104), a conversion unit (105), a quantization unit (106), an entropy encoding unit (107), an inverse quantization unit (108), an inverse conversion unit (109), an addition unit (110), a filter unit (111), and a memory (112).

[0044] Each component shown in FIG. 1 is depicted independently to represent different characteristic functions of the image encoding device and does not imply that each component consists of separate hardware or a single software unit. That is, each component is listed and included as a separate component for convenience of explanation, but at least two components may be combined to form a single component, or a single component may be divided into multiple components to perform functions, and such integrated and separated embodiments of each component are included within the scope of the present invention as long as they do not deviate from the essence of the present invention.

[0045] Furthermore, some components may not be essential components performing an essential function in the present invention, but may be optional components merely for enhancing performance. The present invention may be implemented by including only the components essential for realizing the essence of the present invention, excluding components used solely for performance enhancement, and a structure including only the essential components, excluding optional components used solely for performance enhancement, is also included within the scope of the rights of the present invention.

[0046] The image segmentation unit (101) can divide the input image into at least one block. At this time, the input image may have various shapes and sizes, such as a sequence, picture, slice, tile, segment, tile group, coding tree unit, etc. According to another embodiment, the image segmentation unit (101) may divide an input picture into a plurality of sub-pictures defined as a group of rectangular slices, divide each sub-picture into the tile / slice, and divide the tile / slice into coding tree units.

[0047] Additionally, the image segmentation unit (101) can recursively segment the segmented coding tree unit. The terminal node segmented from the coding tree unit may be referred to as a coding unit (CU). A block may refer to a coding unit (CU), or a prediction unit (PU) or a transformation unit (TU) segmented from the coding unit (CU). The segmentation may be performed based on at least one of a quadtree, a binary tree, and a ternary tree. A quadtree is a method of dividing an upper block into lower blocks, each having a width and height that are half that of the upper block. A binary tree is a method of dividing an upper block into lower blocks, each having either a width or a height that is half that of the upper block. A ternary tree is a method of dividing an upper block into three lower blocks. For example, the three lower blocks may be obtained by dividing the width or height of the upper block in a ratio of 1:2:1. Through the aforementioned binary tree-based partitioning, blocks can have shapes that are not only square but also non-square. Blocks can first be partitioned into a quad tree. Blocks corresponding to the leaf nodes of the quad tree may not be partitioned, or may be partitioned into a binary tree or a terminal tree. The leaf nodes of the binary tree or terminal tree may be units of encoding, prediction, and / or transformation.

[0048] The image segmentation unit (101) can recursively segment the CTU into a quad tree (QT) as well as a multi-type tree (MTT). Here, the MTT can be composed of a binary tree (BT) and a triple tree (TT). For example, the MTT structure can be divided into a vertical binary tree segmentation mode (SPLIT_BT_VER), a horizontal binary tree segmentation mode (SPLIT_BT_HOR), a vertical binary tree segmentation mode (SPLIT_TT_VER), and a horizontal binary tree segmentation mode (SPLIT_TT_HOR).

[0049] Additionally, the image segmentation unit (101) can segment the CTU by applying a dual tree in which the CTU segmentation structures of the luminance and color difference components are used differently, or by applying a single tree in which the luminance and color difference CTBs (Coding Tree Blocks) within the CTU share a coding tree structure.

[0050] The prediction unit (102, 103) may include an intra prediction unit (102) that performs intra prediction and an inter prediction unit (103) that performs inter prediction. The prediction unit (102, 103) may determine whether to use intra prediction or perform inter prediction for a prediction unit. Additionally, the prediction unit (102, 103) may determine specific information (e.g., intra prediction mode, inter prediction mode, motion vector, reference picture, etc.) according to the determined prediction method. At this time, the processing unit in which the prediction is performed and the processing unit in which the prediction method and specific details are determined may be different. For example, the prediction unit (102, 103) may determine the prediction method and prediction mode, etc. for each prediction unit and perform prediction according to the transformation unit.

[0051] According to another embodiment, the prediction unit may encode an input image using a third mode (e.g., IBC mode, Palette mode, etc.) that is a mode other than the intra mode and the inter mode. However, if the third mode has functional characteristics similar to the intra mode or the inter mode, the third mode may be classified as the intra mode or the inter mode. In this disclosure, the third mode will be described only when a specific description of the third mode is required.

[0052] The intra prediction unit (102) can generate a prediction block of the current block based on the intra prediction mode of the current block and reference pixel information around the current block, which is pixel information within the current picture. If the surrounding blocks of the current block are predicted by inter prediction, the reference pixels included in the inter-predicted surrounding blocks can be replaced with reference pixels in other surrounding blocks that are intra-predicted. That is, if a reference pixel is not available, the intra prediction unit (102) can perform intra prediction of the current block by replacing the unavailable reference pixel with at least one of the available reference pixels.

[0053] The intra prediction unit (102) may use multiple reference pixel lines for intra prediction of the current block. When multiple reference pixel lines are available, information indicating the reference pixel line used for intra prediction among the multiple reference pixel lines may be signaled.

[0054] The intra prediction mode used for intra prediction may include a directional prediction mode that uses reference pixel information according to the prediction direction and a non-directional mode that does not use directional information. Here, the intra prediction mode may be derived using a list of most probable modes (MPM), and in particular, may be derived using a first MPM and / or second MPM list. Additionally, the mode for predicting luminance information and the mode for predicting chrominance information may be different, and the intra prediction mode information of the luminance component block or the predicted luminance signal information may be utilized to predict chrominance information.

[0055] Alternatively, the intra prediction unit (102) may perform intra prediction for the current block by applying at least one of the following modes: DIMD (decoder-side intra mode derivation), BVG-DIMD (block-vector guided DIMD), OBIC (Occurrence-based intra coding), EIP (extrapolation filter based intra prediction mode), BVG-DIMD (block-vector guided EIP), MM-EIP (multi-model EIP), TIMD (template based intra mode derivation), TIMD merge mode, SGPM (spatial geometric partitioning mode) mode, intra template matching prediction (IntraTMP), and intra block copy. When the intra prediction mode of the block is a predetermined mode, the intra prediction unit (102) may perform intra prediction for the current block using a block vector indicating a block other than the current block.

[0056] In particular, when the current block is a block of chroma components, the intra prediction unit (102) can perform intra prediction for the current block by applying at least one of the following modes: DM (direct mode), DBV (direct block-vector), DIMD chroma mode, CCLM (cross-component linear model), CCCM (convolutional cross-component model), BVG-CCCM (block-vector guided CCCM), and GL-CCCM (gradient and location based CCCM).

[0057] The intra prediction unit (102) may include a reference sample filter, an interpolation filter, and a DC filter. The reference sample filter is a filter that performs filtering on the reference pixel of the current block and may be adaptively applied depending on the prediction mode, size, shape, and / or whether the reference pixel is included in the reference pixel line immediately adjacent to the current block. If the prediction mode of the current block is a mode that does not perform reference sample filtering, the reference sample filter may not be applied.

[0058] The interpolation filter is a filter that interpolates and filters the prediction samples of the current block, and can be applied adaptively depending on the prediction mode, size, shape, and / or whether the reference pixel is included in the reference pixel line immediately adjacent to the current block.

[0059] If the prediction mode of the current block is DC mode, a prediction block can be generated by applying a DC filter.

[0060] According to one embodiment, the intra prediction unit (102) can perform intra prediction using a pre-trained neural network (NN) model. For example, the intra prediction unit (102) can induce an intra prediction mode of a block to which a DIMD mode is applied and use a pre-trained neural network model to perform intra prediction.

[0061] The inter prediction unit (103) generates a prediction block using a previously restored reference image stored in memory (112), an inter prediction mode, and motion information. Here, inter prediction may mean motion prediction or motion compensation.

[0062] The inter prediction unit (103) can set the inter mode of the prediction unit included in the encoding unit to one of Skip Mode, Merge Mode, or Advanced Motion Vector Prediction (AMVP) Mode in order to perform motion prediction and / or motion compensation. In addition, the inter prediction unit (103) can perform motion prediction and / or motion compensation for the prediction unit according to the set mode.

[0063] Additionally, the inter prediction unit (103) can perform motion prediction and / or motion compensation for the prediction unit by applying the AFFINE mode of sub-PU-based prediction, the SbTMVP (Subblock-based Temporal Motion Vector Prediction) mode, and the MMVD (Merge with MVD) mode and GPM (Geometric Partitioning Mode) mode of PU-based prediction based on the inter prediction mode. In addition, the inter prediction unit (103) can perform motion prediction and / or motion compensation for the prediction unit by applying HMVP (History based MVP), PAMVP (Pairwise Average MVP), CIIP (Combined Intra / Inter Prediction), AMVR (Adaptive Motion Vector Resolution), DMVR (Decoder side Motion Vector Refinement), BDOF (Bi-Directional Optical-Flow), PROF (Prediction Refinement With Optical Flow), BCW (Bi-predictive with CU Weights), LIC (Local Illumination Compensation), TM (Template Matching), OBMC (Overlapped Block Motion Compensation), etc., to improve the performance of each mode.

[0064] Here, AFFINE mode can be used in both AMVP and MERGE modes. It is a technique with high encoding efficiency. AFFINE mode can be a prediction mode using a 4-parameter affine motion model using two control point motion vectors (CPMV) and a 6-parameter affine motion model using three control point motion vectors. Here, CPMV can be a vector representing any one of the top-left, top-right, or bottom-left affine motion models of the current block.

[0065]

[0066] Motion information may include, for example, motion vectors, reference picture indices, List 1 prediction flags, List 0 prediction flags, half-sample interpolation filter indices, bidirectional prediction weight indices, etc.

[0067] According to one embodiment, the inter prediction unit (103) can perform inter prediction using a pre-trained neural network model. For example, the inter prediction unit (103) can synthesize a reference frame using a pre-trained neural network model and perform inter prediction based on the synthesized reference frame.

[0068] A residual block containing residual value information, which is the difference between the prediction unit generated in the prediction unit (102, 103) and the original block of the prediction unit, can be generated. The generated residual block can be input to the conversion unit (105) and converted.

[0069] The subtraction unit (104) subtracts the prediction block generated by the intra prediction unit (102) or the inter prediction unit (103) from the block currently to be encoded to generate a residual block of the current block. The residual value (residual block) between the generated prediction block and the original block can be input to the conversion unit (105).

[0070] In addition, the prediction mode information and motion vector information used for prediction can be encoded in the entropy encoding unit (107) along with the residual value and transmitted to the decoder. When a specific encoding mode is used, it is also possible to encode the original block as is and transmit it to the decoder without generating a prediction block through the prediction unit (102, 103).

[0071] The transformation unit (105) can perform a transformation on a residual block containing residual data to generate and output a transformation coefficient. Here, the transformation coefficient may be a coefficient value generated by performing a transformation on the residual block. When a transform skip mode is applied, the transformation unit (105) may skip the transformation on the residual block.

[0072] The conversion unit (105) can determine a conversion type and a conversion kernel based on at least one of encoding parameters such as the size of the conversion block, color component, and prediction mode, and can perform a conversion on the residual block using the determined conversion type and conversion kernel.

[0073] According to one embodiment, the transformation unit (105) can perform a transformation on the 4x4 luminance residual block generated from the intra prediction result using a transformation type and transformation kernel according to the Discrete Sine Transform (DST), and for the remaining residual block, perform a transformation using a transformation type and transformation kernel according to the Discrete Cosine Transform (DCT).

[0074] According to another embodiment, the transformation unit (105) may apply MTS (Multiple Transform Selection) technology, which performs transformations by selectively using various transformation types and transformation kernels. That is, the transformation unit (105) may perform transformations on a sub-block basis through SBT (Sub-block Transform) technology. Specifically, SBT may be applied only to inter-predicted blocks, and the current block may be divided into ½ or ¼ sizes in the vertical or horizontal direction, and transformation may be performed on only one of the blocks. For example, the transformation unit (105) may perform transformation on the leftmost or rightmost block among the current blocks divided vertically, and perform transformation on the topmost or bottommost block among the current blocks divided horizontally.

[0075] According to another embodiment, the transformation unit (105) may apply a non-separable primary transform (NSPT) technique that performs transformations by selectively using multiple transformation kernels based on an intra-prediction mode or the size and / or shape of the block.

[0076] According to another embodiment, the conversion unit (105) may apply a Low Frequency Non-Separable Transform (LFNST), which is a technique for applying a secondary transform to a residual signal converted into the frequency domain through a DCT or DST. LFNST can additionally perform a transformation on a 4x4 or 8x8 low-frequency region in the upper left to concentrate the residual coefficients to the upper left.

[0077] The quantization unit (106) can quantize the conversion coefficient or residual signal converted into the frequency domain by the conversion unit (105) according to a quantization parameter (QP). The quantization parameter may vary depending on the block or the importance of the image. The value calculated by the quantization unit (106) may be provided to the inverse quantization unit (108) and the entropy encoding unit (107).

[0078] The above-mentioned conversion unit (105) and / or quantization unit (106) may be optionally included in the image encoding device (100). That is, the image encoding device (100) may perform at least one of conversion or quantization on the residual data of the residual block, or may encode the residual block by skipping both conversion and quantization. Even if neither conversion nor quantization is performed in the image encoding device (100), or if neither conversion nor quantization is performed, the block that enters as input to the entropy encoding unit (107) is typically referred to as a conversion block.

[0079] The entropy encoding unit (107) can generate and output a bitstream by performing entropy encoding according to a probability distribution on values ​​output by the quantization unit (106), coding parameter values ​​output during the encoding process, information for decoding an image, etc. Here, the information for decoding an image may include syntax elements, etc.

[0080] Coding parameters may include information (flags, indexes, etc.) that is encoded in the encoding device (100) and signaled to the decoding device (200), such as syntax elements, as well as information derived during the encoding process or decoding process, and may refer to information required when encoding or decoding images.

[0081] The entropy encoding unit (107) can encode various information such as coefficient information of a conversion block, block type information, prediction mode information, division unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information. The coefficients of the conversion block can be encoded in units of sub-blocks within the conversion block.

[0082] For encoding the coefficients of a transform block, various syntax elements may be encoded, such as Last_sig, a syntax element indicating the location of the first non-zero coefficient in backscan order; Coded_sub_blk_flag, a flag indicating whether there is at least one non-zero coefficient in the subblock; Sig_coeff_flag, a flag indicating whether it is a non-zero coefficient; Abs_greater1_flag, a flag indicating whether the absolute value of the coefficient is greater than 1; Abs_greater2_flag, a flag indicating whether the absolute value of the coefficient is greater than 2; and Sign_flag, a flag indicating the sign of the coefficient. The remaining values ​​of the coefficients that are not encoded by the above syntax elements alone may be encoded through the syntax element remaining_coeff.

[0083] When entropy encoding is applied, the size of the bit sequence for the symbols to be encoded can be reduced by allocating a small number of bits to symbols with a high probability of occurrence and a large number of bits to symbols with a low probability of occurrence when representing symbols. Input data is entropied. For example, entropy encoding can utilize various encoding methods such as Exponential Golomb and CABAC (Context-Adaptive Binary Arithmetic Coding).

[0084] The inverse quantization unit (108) and the inverse transformation unit (109) can inverse quantize the values ​​quantized in the quantization unit (106) and inverse transform the values ​​transformed in the transformation unit (105). The residual value generated in the inverse quantization unit (108) and the inverse transformation unit (109) can be combined with the prediction unit predicted through the motion estimation unit, motion compensation unit, and intra prediction unit (102) included in the prediction unit (102, 103) to generate a reconstructed block. The addition unit (110) generates a reconstructed block by adding the prediction block generated in the prediction unit (102, 103) and the residual block generated through the inverse transformation unit (109).

[0085] The filter section (111) can apply deblocking filter, Sample Adaptive Offset (SAO), Adaptive Loop Filter (ALF), Bilateral filter (BIF), LMCS (Luma Mapping with Chroma Scaling), etc., to the reconstructed sample, reconstructed block, or reconstructed image as a whole or part of the filtering technique.

[0086] The deblocking filter can remove block distortion caused by boundaries between blocks in the restored picture. To determine whether to perform deblocking, the decision to apply the deblocking filter to the current block can be made based on the pixels contained in a certain number of columns or rows within the block. When applying the deblocking filter to a block, a Strong Filter or a Weak Filter can be applied depending on the required deblocking filtering strength. Additionally, when applying the deblocking filter, horizontal and vertical filtering can be processed in parallel.

[0087] Sample adaptive offset may be a method of correcting the offset from the original image on a sample-by-sample basis for an image that has undergone deblocking. The filter unit (111) may use a method of dividing the samples included in the image into a certain number of regions, determining the region to perform the offset on, and applying the offset to that region, or a method of applying the offset by considering the edge information of each sample. Here, the sample adaptive offset may be at least one of a general sample adaptive offset, a bilateral filter, and a cross-component sample adaptive offset (CCSAO).

[0088] Adaptive Loop Filtering (ALF) can be performed based on a comparison between the filtered restored image and the original image. After dividing the pixels included in the image into predetermined groups, a single filter to be applied to each group can be determined, allowing for differential filtering for each group. Information regarding whether to apply ALF can be transmitted per coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied may vary depending on each block. Additionally, an ALF filter of the same form (fixed form) may be applied regardless of the characteristics of the block to be applied.

[0089] An adaptive loop filter can perform filtering based on a comparison of the reconstructed image and the original image. After dividing the samples included in the image into predetermined groups, a filter to be applied to each group can be determined, thereby performing filtering differently for each group. Information regarding whether to apply an adaptive loop filter can be signaled per coding unit (CU), and the shape and filter coefficients of the adaptive loop filter to be applied may vary depending on each block.

[0090] According to one embodiment, the filter unit (111) can filter all or part of a restored sample, restored block, or restored image using a pre-trained neural network model. Specifically, the filter unit (111) can apply an adaptive loop filter to all or part of a restored sample, restored block, or restored image using a pre-trained neural network model.

[0091] The memory (112) can store a restored block or picture calculated through the filter unit (111). The memory (112) may include a reference picture buffer. Additionally, the stored restored block or picture in the memory (112) may be provided to the prediction unit (102, 103) when performing inter-prediction.

[0092] Next, an image decoding device according to one embodiment of the present invention will be described with reference to the drawings.

[0093] FIG. 2 is a block diagram showing an image decoding device (200) according to one embodiment of the present invention.

[0094] Referring to FIG. 2, the image decoding device (200) may include an entropy decoding unit (201), an inverse quantization unit (202), an inverse transformation unit (203), a prediction unit (204, 205), an adder unit (206), a filter unit (207), and a memory (208).

[0095] The video decoding device (200) can receive a bitstream output by the video encoding device (100). The video decoding device (200) can receive a bitstream stored in a computer-readable recording medium or receive a bitstream stream streamed through a wired / wireless transmission medium. The video decoding device (200) can decode the bitstream to generate a restored video or a decoded video, and can output the restored video or the decoded video.

[0096] The entropy decoding unit (201) can generate symbols by performing entropy decoding according to the probability distribution of the bitstream. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be the inverse process of the entropy encoding method described above.

[0097] The entropy decoding unit (201) can convert a one-dimensional vector-shaped coefficient into a two-dimensional block-shaped coefficient through a conversion coefficient scanning method to decode a conversion coefficient level (quantized level).

[0098] The entropy decoding unit (201) can perform entropy decoding in the opposite procedure to that which the entropy encoding unit (107) of the image encoding device (100) performed. For example, various methods such as Exponential Golomb and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in correspondence with the method performed in the image encoder.

[0099] The entropy decoding unit (201) can obtain various information such as coefficient information of a conversion block as described above, block type information, prediction mode information, division unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information by decoding.

[0100] The inverse quantization unit (202) generates a conversion block by performing inverse quantization on the quantized conversion block. It operates substantially the same as the inverse quantization unit (108) of FIG. 1.

[0101] The inverse transformation unit (203) performs an inverse transformation on the transformation block to generate a residual block. At this time, the transformation method may be determined based on information regarding the prediction method (inter or intra prediction), the size and / or shape of the block, the intra prediction mode, etc. It operates substantially the same as the inverse transformation unit (109) of FIG. 1.

[0102] According to one embodiment, the inverse transformation unit (203) can perform an inverse transformation using a transformation type and a transformation kernel according to the Discrete Sine Transform (DST) on the transformation coefficient level of the 4x4 luminance component generated from the intra prediction result, and perform an inverse transformation using a transformation type and a transformation kernel according to the Discrete Cosine Transform (DCT) on the remaining transformation coefficient level.

[0103] According to another embodiment, the inverse transformation unit (203) may apply MTS (Multiple Transform Selection) technology, which performs transformations by selectively using multiple transformation kernels.

[0104] According to another embodiment, the inverse transform unit (203) may apply LFNST (Low Frequency Non-Separable Transform), which is a technique for applying a secondary inverse transform to the inverse transform coefficient level through a DCT or DST-based transform type and a transform kernel.

[0105] According to another embodiment, the inverse transform unit (203) may apply a non-separable primary transform (NSPT) technique that performs the inverse transform by selectively using a transform kernel based on an intra-prediction mode or the size and / or shape of the block.

[0106] The prediction unit (204, 205) can generate a prediction block based on the prediction block generation information provided by the entropy decoding unit (201) and the previously decoded block or picture information provided by the memory (208).

[0107] The prediction unit (204, 205) may include an intra prediction unit (204) and an inter prediction unit (205). The prediction unit (204, 205) receives various information, such as prediction unit information input from the entropy decoding unit (201), prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, distinguishes the prediction unit from the current encoding unit, and determines the prediction mode of the prediction unit.

[0108] The intra prediction unit (204) can generate a prediction block of the current block based on the intra prediction mode of the current block and reference pixel information around the current block, which is pixel information within the current picture.

[0109] The intra prediction unit (204) can generate a prediction block based on reference pixel information around the current block, which is pixel information within the current picture. The intra prediction unit (204) can use multiple reference pixel lines for intra prediction. If multiple reference pixel lines are available, the intra prediction unit (204) can obtain information indicating a reference pixel line used for intra prediction among the multiple reference pixel lines.

[0110] The intra prediction mode used for intra prediction may be a directional prediction mode or a non-directional mode. Additionally, the mode for predicting luminance information and the mode for predicting chrominance information may be different, and the intra prediction mode information of the luminance component block or the predicted luminance signal information may be utilized to predict chrominance information.

[0111] According to one embodiment, the intra prediction unit (204) can perform intra prediction using a pre-trained neural network model. The intra prediction unit (204) can perform intra prediction using the same neural network model as the intra prediction unit (102) of FIG. 1.

[0112] The intra prediction unit (204) operates substantially the same as the intra prediction unit (102) of FIG. 1.

[0113] The inter prediction unit (205) can perform an inter prediction for the current prediction unit based on information included in at least one of the previous or subsequent pictures of the current picture containing the current prediction unit, using information necessary for inter prediction of the current prediction unit provided by the video encoding device (100). Alternatively, the inter prediction may be performed based on information of a partially restored area within the current picture containing the current prediction unit.

[0114] The inter prediction unit (205) can set the inter mode of the prediction unit included in the encoding unit to one of Skip Mode, Merge Mode, or Advanced Motion Vector Prediction (AMVP) Mode in order to perform motion prediction and / or motion compensation. Additionally, the inter prediction unit (205) can perform motion compensation for the prediction unit according to the set mode.

[0115] Additionally, the inter prediction unit (205) can perform motion compensation for the prediction unit by applying the AFFINE mode of sub-PU-based prediction, the SbTMVP (Subblock-based Temporal Motion Vector Prediction) mode, and the MMVD (Merge with MVD) mode and GPM (Geometric Partitioning Mode) mode of PU-based prediction based on the inter prediction mode. Additionally, the inter prediction unit (205) can perform motion compensation for the prediction unit by applying HMVP (History based MVP), PAMVP (Pairwise Average MVP), CIIP (Combined Intra / Inter Prediction), AMVR (Adaptive Motion Vector Resolution), BDOF (Bi-Directional Optical-Flow), BCW (Bi-predictive with CU Weights), LIC (Local Illumination Compensation), TM (Template Matching), OBMC (Overlapped Block Motion Compensation), etc., to improve the performance of each mode.

[0116] Motion information may include, for example, motion vectors, reference picture indices, List 1 prediction flags, List 0 prediction flags, half-sample interpolation filter indices, bidirectional prediction weight indices, etc.

[0117] According to one embodiment, the inter prediction unit (205) can perform inter prediction using a pre-trained neural network model. The inter prediction unit (205) can perform inter prediction using the same neural network model as the inter prediction unit (103) of FIG. 1.

[0118] The inter prediction unit (205) can operate substantially the same as the inter prediction unit (103) of FIG. 1.

[0119] The adder (206) generates a restoration block by adding the prediction block generated in the intra prediction unit (204) or the inter prediction unit (205) and the residual block generated through the inverse transformation unit (203). It operates substantially the same as the adder (110) of FIG. 1.

[0120] The filter section (207) can reduce various types of noise occurring in the restored blocks. The filter section (207) may include a deblocking filter, a sample adaptive offset, an adaptive loop filter, a bidirectional filter, and an LMCS.

[0121] The filter unit (207) may receive information regarding whether each filter is applied, information regarding the filter strength, etc. from the image encoding device (100). The filter unit (207) of the image decoding device (200) may receive filter-related information provided by the image encoding device (100) and perform filtering on the corresponding block in the image decoding device (200).

[0122] According to one embodiment, the filter unit (207) can filter all or part of a restored sample, restored block, or restored image using a pre-trained neural network model. Specifically, the filter unit (207) can apply an adaptive loop filter to all or part of a restored sample, restored block, or restored image using a pre-trained neural network model.

[0123] The filter section (207) can operate substantially the same as the filter section (111) of FIG. 1.

[0124] The memory (208) can store a restoration block generated by the adder (206). For example, the memory (208) may include a reference picture buffer. The memory (208) can operate substantially the same as the memory (112) of FIG. 1.

[0125] FIG. 3 is a schematic diagram showing a video coding system to which the present invention can be applied.

[0126] A video coding system according to one embodiment may include an encoding device (10) and a decoding device (20). The encoding device (10) may transmit encoded video and / or image information or data to the decoding device (20) via a digital storage medium or network in the form of a file or streaming.

[0127] An encoding device (10) according to one embodiment may include an image generation unit (11), an encoding unit (12), and a transmission unit (13). A decoding device (20) according to one embodiment may include a receiving unit (21), a decoding unit (22), and an image playback unit (23). The encoding unit (12) may be called a video / image encoding unit, and the decoding unit (22) may be called a video / image decoding unit. The transmission unit (13) may be included in the encoding unit (12). The receiving unit (21) may be included in the decoding unit (22). The image playback unit (23) may include a display unit, and the display unit may be composed of a separate device or an external component.

[0128] The image generation unit (11) can acquire video / image through a process of capturing, synthesizing, or generating video / image. The image generation unit (11) may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / image, etc. The video / image generation device may include, for example, a computer, a tablet, and a smartphone, etc., and can generate video / image (electronically). For example, a virtual video / image may be generated through a computer, etc., in which case the video / image capture process may be replaced by a process of generating related data.

[0129] The encoding unit (12) can encode the input video / image. The encoding unit (12) can perform a series of procedures such as prediction, conversion, and quantization for compression and encoding efficiency. The encoding unit (12) can output the encoded data (encoded video / image information) in the form of a bitstream. The detailed configuration of the encoding unit (12) can be configured in the same way as the encoding device (100) of FIG. 1 described above.

[0130] The transmission unit (13) can transmit encoded video / image information or data output in the form of a bitstream to the receiving unit (21) of the decoding device (20) via a digital storage medium or network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit (13) may include elements for creating a media file through a predetermined file format and elements for transmission via a broadcasting / communication network. The receiving unit (21) can extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit (22).

[0131] The decoding unit (22) can decode a video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding unit (12). The detailed configuration of the decoding unit (22) can be configured in the same way as the decoding device (200) of FIG. 2 described above.

[0132] The image playback unit (23) can render the decoded video / image. The rendered video / image can be displayed through the display unit.

[0133] FIG. 4 is a diagram illustrating an exemplary content streaming system to which an embodiment according to the present invention can be applied.

[0134] As illustrated in FIG. 4, a content streaming system to which an embodiment of the present invention is applied may largely include a multimedia input device, a media storage, an encoding server, a streaming server, a web server, and a user device.

[0135] The above encoding server plays the role of compressing content input from multimedia input devices, such as smartphones, cameras, and CCTVs, into digital data to generate a bitstream and transmitting it to the above streaming server. Alternatively, the encoding server plays the role of compressing content previously stored in a media storage into digital data to generate a bitstream and transmitting it to the above streaming server.

[0136] As another example, when multimedia input devices such as smartphones, cameras, and CCTVs directly generate bitstreams, the encoding server may be omitted.

[0137] The bitstream above may be generated by a video encoding method and / or video encoding device to which an embodiment of the present invention is applied, and the streaming server may temporarily or non-temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0138] The streaming server transmits multimedia data to a user device based on a user request through a web server, and the web server can act as a medium to inform the user of available services. When a user device requests a desired service from the web server, the web server transmits it to the streaming server, and the streaming server can transmit multimedia data to the user device. At this time, the content streaming system may include a separate control server, and in this case, the control server can perform the role of controlling commands and responses between each device within the content streaming system.

[0139] The streaming server can receive content from a media storage and / or an encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, to provide a seamless streaming service, the streaming server can store the bitstream for a certain period of time.

[0140] Examples of the above user devices may include mobile phones, smartphones, laptop computers, digital broadcasting terminals, PDAs (personal digital assistants), PMPs (portable multimedia players), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, HMDs (head-mounted displays)), digital TVs, desktop computers, digital signage, etc.

[0141] Each server within the above-mentioned content streaming system can be operated as a distributed server, and in this case, data received from each server can be processed in a distributed manner.

[0142]

[0143] According to existing video coding methods, color difference components were predicted using simple prediction techniques. However, with the establishment of subsequent standard specifications, more precise color difference prediction technologies have been adopted. For example, the CCLM (Cross-Component Linear Model) method is one of the color difference prediction techniques that predicts color difference components based on luminance components.

[0144] CCLM has significantly improved the precision of color difference component predictions. However, there may be room for technical improvement as it performs predictions linearly by utilizing only the predicted values ​​of the reconstructed luminance components. For example, the precision of color difference predictions can be enhanced by utilizing both the reconstructed luminance values ​​and surrounding context to predict the color difference components.

[0145] Accordingly, the present disclosure proposes a more precise luminance component-based color difference component prediction method and apparatus by utilizing the value of the restored luminance component and the surrounding context.

[0146]

[0147] FIG. 5 is a diagram illustrating a luminance component-based color difference component prediction according to one embodiment of the present disclosure.

[0148] Referring to FIG. 5, a current color difference block and a restored luminance block corresponding to the current color difference block can be set. Additionally, a current color difference template including samples adjacent to the current color difference block and a luminance template including samples adjacent to the restored luminance block can be set.

[0149] A correlation between the color difference template and the luminance template is derived, and filter coefficients can be generated based on the derived correlation. Then, by applying the filter coefficients to the predicted value of the restored luminance block, a predicted value for the current color difference block can be generated.

[0150]

[0151] And, below, a method for predicting color difference components based on luminance components is explained.

[0152]

[0153] FIG. 6 is a diagram illustrating a luminance component-based chrominance component prediction method according to one embodiment of the present disclosure. The luminance component-based chrominance component prediction method can be performed by an image decoder or an image encoding device.

[0154] Referring to FIG. 6, in step S610, the image decoder can set the current color difference block.

[0155] And, in step S620, the image decoder may set a color difference template region and a padding region adjacent to the current color difference block. Here, the color difference template region may include at least one sample adjacent to the color difference block. And, the padding region may be a region including samples adjacent to the color difference template region.

[0156] In step S630, the image decoder may apply downsampling to the previously restored values ​​of the corresponding luminance block corresponding to the current chrominance block and the region adjacent to the corresponding luminance block. Here, the region adjacent to the corresponding luminance block may be referred to as the luminance template region. The luminance template region may include at least one sample adjacent to the corresponding luminance block. That is, downsampling may be applied to the previously restored luminance sample values ​​corresponding to the current chrominance block and the chrominance template region.

[0157] In step S640, the image decoder may derive a convolutional filter based on a chrominance template region and a downsampled luminance template region. Here, the image decoder may derive the type of the filter, the elements of the filter, and the coefficients of the filter. According to one embodiment, the filter may be a convolutional filter. Alternatively, the image decoder may derive a scaling parameter based on the correlation between the chrominance template region and the downsampled luminance template region.

[0158] In addition, at step S650, the image decoder can generate a predicted value of the current chrominance block by applying a convolutional filter to the downsampled corresponding luminance block. According to one embodiment, the image decoder can subtract the average value of the downsampled luminance sample values ​​from the sample values ​​of the downsampled corresponding luminance block. The image decoder can derive an initial predicted value by applying a convolutional filter to the luminance value derived from the result of the subtraction operation. Alternatively, the image decoder can derive an initial predicted value by applying a scaling factor to the luminance value derived from the result of the subtraction operation. Furthermore, the image decoder can generate a predicted value of the current chrominance block based on a value obtained by adding a predicted value according to the non-directional mode for the current chrominance block to the initial predicted value.

[0159]

[0160] To improve the accuracy of the luminance component-based chroma component prediction method, the chroma template region and the luminance template region corresponding to the chroma template can be adaptively set. Below, a method for predicting the sample value of the current chroma block based on the restored sample value of the corresponding luminance block (corresponding luma block) is described.

[0161]

[0162] FIG. 7 is a drawing for illustrating a template area according to one embodiment of the present disclosure.

[0163] Referring to FIG. 7, the Template Area (TA) can be adaptively set via an implicit method. Hereinafter, the Current Block (CB) may be, for example, the current chrominance block. The Template Area (TA) may include a chrominance template area adjacent to the current chrominance block. Alternatively, the current Block (CB) may be a restored luminance block corresponding to the current chrominance block. And, the Template Area (TA) may be a luminance template area adjacent to the restored luminance block.

[0164] A template region (TA) adjacent to the current block (CB) can be adaptively set. The template region (TA) may include a left template region (LT) and an upper template region (UT). The template region (TA) of the current block (CB) can be implicitly determined using the same method in the video encoding device and the video decoding device.

[0165] In one embodiment, the left template area (LT) and the upper template area (UT) may each be composed of a plurality of lines. For example, the left template area (LT) may include 2 lines of samples adjacent to the left of the current block (CB) and 2 lines of samples adjacent to the upper side. Alternatively, the left template area (LT) may include 3 lines of samples adjacent to the left of the current block (CB) and 3 lines of samples adjacent to the upper side. Alternatively, the left template area (LT) may include 6 lines of samples adjacent to the left of the current block (CB) and 6 lines of samples adjacent to the upper side. However, the embodiments of the present disclosure are not limited thereto, and the left template area (LT) and the upper template area (UT) may include any number of lines among the samples adjacent to the current block (CB).

[0166] The template area (TA) can be adaptively configured based on the conditions of the current block (CB).

[0167] In one embodiment, the template area (TA) may be implicitly determined based on the size of the current block (CB). Specifically, the number of lines in the template area (TA) may be implicitly determined based on the size of the current block (CB). For example, if the size of the current block (CB) is large, a relatively large number of lines may be set as the template area (TA). Alternatively, if the size of the current block (CB) is small, a relatively small number of lines may be set as the template area (TA).

[0168] In another embodiment, the template area (TA) may be implicitly determined based on the shape of the current block (CB). Specifically, if the current block (CB) is a non-square block, the template area (TA) may be set to match the shape of the current block (CB). For example, if the width of the current block (CB) is greater than its height, the number of lines in the left template area (LT) may be set to be relatively larger than the number of lines in the upper template area (UT). Alternatively, the template area (TA) may be implicitly determined based on the ratio between the width and height of the current block. For example, if the width of the current block (CB) exceeds a certain real multiple of the height of the current block, the template area (TA) may include a sample at the top of the current block. Conversely, if the height of the current block (CB) exceeds a certain real multiple of the width of the current block, the template area (TA) may include a sample at the left of the current block.

[0169] In another embodiment, the template region (TA) may be implicitly determined based on the slice type in which the current block (CB) is contained. Specifically, the characteristics of the reconstructed pixel may vary depending on whether the slice type in which the current block (CB) is contained is an intra slice or an inter slice. Accordingly, the number of lines in the template region (TA) may be adaptively determined.

[0170] In another embodiment, the template region (TA) may be implicitly determined based on the Quantization Parameter (QP) value of the current block (CB). As the QP value is lower, the quality of the restored pixel is similar to the original, whereas as the QP value is higher, the quality may degrade. Therefore, by adaptively setting the number of lines of the template region (TA) according to the QP value, the prediction accuracy can be improved.

[0171] According to another embodiment, the template area (TA) may be implicitly determined based on information of blocks adjacent to the left and upper sides of the current block (CB). Specifically, the line of the template area (TA) may be determined based on information of the left and upper blocks. For example, information of blocks adjacent to the left and upper sides of the current block (CB) may be adaptively determined using coding parameters such as QP value, mode type, prediction information, BS value, and partitioning information.

[0172] Meanwhile, the template area may include an extension area. An example of a template area including an extension area is described below.

[0173]

[0174] FIG. 8 is a drawing for illustrating a template area according to one embodiment of the present disclosure.

[0175] Referring to FIG. 8, to improve the accuracy of the luminance component-based color difference component prediction method, the template area (TA) can be adaptedly set. For example, the template area (TA) can be adaptively expanded.

[0176] The left template area (Left Template, LT) and the upper template area (Upper Template, UT) may each include an extended area (Extended Left Template, ELT and Extended Upper Template, EUT). For example, the width of the left extended area (ELT) may be A_w and the height may be C_h. The width of the left template area (LT) may be A_w and the height may be A_h + B_h + C_h. And, the width of the upper extended area (EUT) may be C_w and the height may be A_h. The width of the upper template area (UT) may be A_w + B_w + C_w and the height may be A_h.

[0177] Alternatively, for example, the width of the left template area (LT) can be A_w and the height can be A_h + B_h + C_h. And, the width of the upper template area (UT) can be B_w + C_w and the height can be A_h. Through this, overlap between the left template area (LT) and the upper template area (UT) can be prevented.

[0178] Alternatively, for example, the width of the left template area (LT) can be A_w and the height can be B_h + C_h. And, the width of the upper template area (UT) can be A_w + B_w + C_w and the height can be A_h. Through this, overlap between the left template area (LT) and the upper template area (UT) can be prevented.

[0179] In one embodiment, the height of the left extension area (ELT) and the width of the upper extension area (EUT) may be adaptively set based on the size of the current block (CB). For example, the height of the left template area (LT) may be equal to the height of the current block (CB). Or, the width of the upper template area (UT) may be equal to the width of the current block (CB). As another example, the height of the left template area (LT) may be twice the height of the current block (CB). Or, the width of the upper template area (UT) may be twice the width of the current block (CB). As yet another example, the height of the left template area (LT) may be k times the height of the current block (CB) (where k is a real number greater than or equal to 2). Or, the width of the upper template area (UT) may be k times the width of the current block (CB). As the height of the left template area (LT) and the width of the upper template area (UT) are determined, the height (C_h) of the left extension area (ELT) and the width (C_w) of the upper extension area (EUT) can be determined based on the size of the current block (CB).

[0180] In another embodiment, the height (C_h) of the left extension area (ELT) and the width (C_w) of the upper extension area (EUT) can be adaptively set based on the shape of the current block (CB).

[0181] For example, if the current block (CB) is a non-square block and the width of the current block (CB) is greater than its height, the height (C_h) of the left extension area (ELT) may be smaller than the width (C_w) of the upper extension area (EUT). For example, if B_w is greater than B_h, C_w may be greater than C_h.

[0182] In another embodiment, the height (C_h) of the left extension area (ELT) and the width (C_w) of the upper extension area (EUT) can be adaptively set based on the slice type containing the current block (CB). Specifically, the characteristics of the restored pixels of the current block (CB) may vary depending on whether the slice type containing the current block (CB) is an intra slice or an inter slice. Accordingly, the height (C_h) of the left extension area (ELT) and the width (C_w) of the upper extension area (EUT) can be adaptively set.

[0183] In another embodiment, the height (C_h) of the left extension region (ELT) and the width (C_w) of the upper extension region (EUT) can be adaptively set based on the QP value of the current block (CB). As the QP value decreases, the quality of the reconstructed pixels is similar to the original, whereas as the QP value increases, the quality may degrade. Therefore, by adaptively setting the height (C_h) of the left extension region (ELT) and the width (C_w) of the upper extension region (EUT) to the QP value, the prediction accuracy can be improved.

[0184] In another embodiment, the height (C_h) of the left extension area (ELT) and the width (C_w) of the upper extension area (EUT) can be adaptively set based on information of blocks adjacent to the left and upper sides of the current block (CB). Specifically, the height (C_h) of the left extension area (ELT) and the width (C_w) of the upper extension area (EUT) can be adaptively set using coding parameters such as QP values, mode types, prediction information, BS values, and partition information of blocks adjacent to the left and upper sides of the current block (CB).

[0185] To improve the accuracy of the luminance component-based color difference prediction method, the template area (TA) can be adaptively configured. Specifically, the template area (TA) of the current block (CB) can be configured based on the width of the left template area (LT) and the height of the upper template area (UT). The width of the left template area can be A_w, and the height of the upper template area can be A_h.

[0186] In one embodiment, the template area (TA) of the current block (CB) can be set in a fixed manner. For example, it can be set to a specific size, such as the size of A_w being 3 and the size of A_h being 3.

[0187] In another embodiment, the template region (TA) of the current block (CB) can be implicitly determined using the same method in the video encoding device and the video decoding device. Specifically, the optimal template region (TA) can be selected by comparing the cost values ​​of a plurality of template regions (TA) having a specific size. For example, the template region (TA) of the current block (CB) can be implicitly determined by comparing the case where the size of A_w is 2 and the size of A_h is 2 with the case where the size of A_w is 6 and the size of A_h is 6.

[0188] Specifically, when the size of A_w is 2 and the size of A_h is 2, filter coefficients for predicting the current color difference template area can be derived based on samples of the template area (TA). Based on the derived filter coefficients and samples of the luminance template area adjacent to the corresponding luminance block, a predicted value for the current color difference template area can be generated. Then, by comparing the generated predicted value with the restored value of the color difference template area, cost values ​​such as SATD (sum of absolute transformed difference), SAD, MR-SAD, and MR-SATD can be calculated.

[0189] Next, when the size of A_w is 6 and the size of A_h is 6, filter coefficients for predicting the current chrominance template region can be derived based on samples of the template region (TA). Based on the derived filter coefficients and samples of the luminance template region adjacent to the corresponding luminance block, a predicted value for the current chrominance template region can be generated. Then, by comparing the generated predicted value with the restored value of the chrominance template region, cost values ​​such as SATD (sum of absolute transformed difference), SAD (sum of absolute differences), MR-SAD (multi-reference sum of absolute differences), and MR-SATD (multi-reference sum of absolute transformed differences) can be calculated. Finally, the size of the template region with the lowest cost can be implicitly selected and determined as the optimal value.

[0190]

[0191] The template region (TA) set for luminance component-based color difference component prediction can be determined through an explicit method. The template region (TA) set for luminance component-based color difference component prediction can be determined through explicit signaling as follows.

[0192] In one embodiment, the image encoding device may determine size information (e.g., number of lines) of a template area (TA) and transmit it to an image decoding device. The size information of the template area (TA) may include the width (A_w) of the left template area (TA) and the height (A_h) of the upper template area (TA). The size information of the template area (TA) may be transmitted as any one of units such as a sequence, a group of picture (GOP), a frame, a picture, a slice, a CTU, a CU, a TU, etc.

[0193] In another embodiment, the image encoding device may determine information regarding the configuration method of the template area (TA) and transmit it to the image decoding device. The information regarding the configuration method of the template area (TA) may be transmitted as any one of units such as a sequence, a group of picture (GOP), a frame, a picture, a slice, a CTU, a CU, a TU, etc.

[0194] Information regarding the configuration method of the template area (TA) may include the width and height of the left template area (LT) and the width and height of the upper template area (UT). For example, the width of the left template area (LT) may be A_w, and the height may be A_h + B_h + C_h. And, the width of the upper template area (UT) may be A_w + B_w + C_w, and the height may be A_h.

[0195] Alternatively, the width of the left template area (LT) can be A_w, and the height can be A_h + B_h + C_h. And, the width of the upper template area (UT) can be B_w + C_w, and the height can be A_h.

[0196] Alternatively, the width of the left template area (LT) can be A_w and the height can be B_h + C_h. And, the width of the upper template area (UT) can be A_w + B_w + C_w and the height can be A_h.

[0197] In another embodiment, the video encoding device may determine size information of the extended area (ELT, EUT) and transmit it to the video decoding device. The size information of the extended area (ELT, EUT) may include the height (C_h) of the left extended area (ELT) and the width (C_w) of the upper extended area (EUT). The size information of the extended area (ELT, EUT) may be transmitted as any one of units such as a sequence, a group of picture (GOP), a frame, a picture, a slice, a CTU, a CU, a TU, etc.

[0198] In another embodiment, the video encoding device may determine information regarding a left template area (LT) including a left extension area (ELT) and an upper template area (UT) including an upper extension area (EUT), and transmit this information to a video decoding device. The information regarding the left template area (LT) including a left extension area (ELT) and the upper template area (UT) including an upper extension area (EUT) may be transmitted as any one of units such as a sequence, a group of picture (GOP), a frame, a picture, a slice, a CTU, a CU, a TU, etc.

[0199] Information regarding the left template area (LT) including the left extension area (ELT) and the upper template area (UT) including the upper extension area (EUT) may include the width and height of the left template area (LT) and the width and height of the upper template area (UT). By determining the width and height of the left template area (LT) including the left extension area (ELT) and the width and height of the upper template area (UT) including the upper extension area (EUT), the width and height of the left extension area (ELT) included in the left template area (LT) and the width and height of the upper extension area (EUT) included in the upper template area (UT) may also be implicitly set.

[0200] In another embodiment, the image encoding device may determine one of a plurality of predefined size information for a template area (TA) including an extended area (EUT, ELT) and transmit information indicating the determined size information to an image decoding device. The size information of the template area (TA) may be transmitted as any one of units such as a sequence, a group of picture (GOP), a frame, a picture, a slice, a CTU, a CU, or a TU. The size information of the template area (TA) may include the width of the left template area (LT) and the height of the upper template area (UT).

[0201] Or in another embodiment, the width (A_w) of the left template region (LT) and the height (A_h) of the upper template region (UT) may be determined within a specific group of candidates. Specifically, the width (A_w) of the left template region (LT) and the height (A_h) of the upper template region (UT) may each be a, and a may be 1, 2, 3, 5, 6, etc. For example, the size information of the template region (TA) may include candidates such as (A_w, A_h) = {(1,1), (2,2), (3,3), (4,4), (5,5), (6,6)}. The video encoding device may set only (2,2) and (6,6) among the candidates of the template region (TA) as options. The video encoding device may determine which candidate among the options to select through evaluation such as RDO (Rate–Distortion Optimization) and transmit information indicating the determined size information to the video decoder.

[0202] Meanwhile, to apply the luminance component-based color difference component prediction method, it is necessary to set the number of pixels for the luminance component and the number of pixels for the color difference component to be the same. Below, a downsampling method is described for the values ​​of samples from the luminance block at the same location as the current color difference block and samples from the template adjacent to the luminance block.

[0203]

[0204] Figures 9 to 11 are diagrams illustrating a downsampling method for applying a luminance component-based color difference component prediction method.

[0205] Downsampling can be applied to the values ​​of samples in the luminance block at the same location as the current color difference block and samples in the template adjacent to the luminance block. Here, the downsampling ratio may vary depending on the color format.

[0206] For example, if the color format is 4:4:4, downsampling may not be applied to the luminance component pixels. Meanwhile, if the color format is 4:2:2, the downsampling ratio applied to the luminance component pixels may be 2:1. Also, if the color format is 4:2:0 or 4:1:1, the downsampling ratio applied to the luminance component pixels may be 4:1.

[0207] Below, we explain the downsampling methods applied to pixels of the luminance component according to each color format.

[0208] Referring to Fig. 9, a [m, n] filter can be applied to the values ​​of two luminance samples. For example, a [1, 1] filter can be applied to the values ​​of two luminance samples. Thus, the luminance sample can be downsampled to the average value of the two luminance sample values.

[0209] Alternatively, a [m, n, k] filter may be applied to the values ​​of three luminance samples. For example, a [1, 2, 1] filter may be applied to the values ​​of three luminance samples. Thus, the luminance sample may be downsampled to the average value of the three luminance sample values.

[0210] Alternatively, a [m, n, k, p] filter may be applied to the values ​​of four luminance samples. For example, a [1, 1, 1, 1] filter may be applied to the values ​​of four luminance samples. Thus, the luminance sample may be downsampled to the average value of the four luminance sample values.

[0211] Referring to FIG. 10, a [[m, n, k], [p, q, r]] filter can be applied to the values ​​of six luminance samples. For example, a [[1, 2, 1], [1, 2, 1]] filter can be applied to the values ​​of six luminance samples. Or, a [[1, 4, 1], [1, 4, 1]] filter can be applied to the values ​​of six luminance samples. Or, a [[1, 0, -1], [1, 0, -1]] filter can be applied to the values ​​of six luminance samples. Or, a [[1, 2, 1], [-1, -2, -1]] filter can be applied to the values ​​of six luminance samples. Or, a [[-1, 1, 2], [-2, -1, 1]] filter can be applied to the values ​​of six luminance samples. Therefore, the luminance sample can be downsampled to the average or weighted average value of the six luminance sample values.

[0212] Alternatively, a [[m, n, k, p], [q, r, x, y]] filter may be applied to the values ​​of 8 luminance samples. For example, a [[1, 1, 1, 1], [1, 1, 1, 1]] filter may be applied to the values ​​of 8 luminance samples. Thus, the luminance samples may be downsampled to the average or weighted average of the 8 luminance sample values.

[0213] Alternatively, a [[m, n, k], [p, q, r], [x, y, z]] filter may be applied to the values ​​of 9 luminance samples. For example, a [[1, 1, 1], [1, 8, 1], [1, 1, 1]] filter may be applied to the values ​​of 9 luminance samples. Alternatively, a [[0, 1, 0], [1, 4, 1], [0, 1, 0]] filter may be applied to the values ​​of 9 luminance samples. Thus, the luminance samples may be downsampled to the average value of the 9 luminance sample values.

[0214] In addition, downsampled luminance samples can be derived using downsampling filters that use different samples depending on the color format. For example, if the color format is 4:2:0, one downsampling filter among [[0, 0, 0], [0, 2, 2], [0, 2, 2]], [[0, 0, 0], [1, 2, 1], [1, 2, 1]], [[0, 1, 0], [1, 4, 1], [0, 1, 0]] may be used. Or, if the color format is 4:2:2, one downsampling filter among [0, 4, 4], [2, 4, 2], [0, 8, 0] may be used.

[0215]

[0216] The following describes the downsampling method applied to luminance component pixels when the color format is 4:2:0 or 4:1:1.

[0217] Referring to Fig. 11, a [m, n, k, p] filter can be applied to the values ​​of four luminance samples. For example, a [1, 1, 1, 1] filter can be applied to the values ​​of four luminance samples to downsample them to the average value of the four luminance samples.

[0218] Alternatively, a [[m, n, k], [p, q, r]] filter may be applied to the values ​​of six luminance samples. For example, a [[1, 2, 1], [1, 2, 1]] filter may be applied to the values ​​of six luminance samples to downsample them to the average value of the six luminance samples.

[0219] Alternatively, a [[m, n, k, p], [q, r, x, y]] filter may be applied to the values ​​of 8 luminance samples. For example, a [[1, 1, 1, 1], [1, 1, 1, 1]] filter may be applied to the values ​​of 8 luminance samples to downsample them to the average value of the 8 luminance samples.

[0220] Alternatively, a [[m, n, k], [p, q, r], [x, y, z]] filter may be applied to the values ​​of 9 luminance samples. For example, a [[1, 1, 1], [1, 8, 1], [1, 1, 1]] filter may be applied to the values ​​of 9 luminance samples to downsample them to the average value of the 9 luminance samples.

[0221] The method of downsampling the luminance component can significantly affect the prediction performance of the chrominance component. Therefore, the filter used for downsampling can be adaptively determined through implicit methods.

[0222]

[0223] According to one embodiment, the downsampling method may be determined implicitly based on the current block size. For example, as the block size increases, the downsampling method applied to the luminance component may be set to use a filter tap of a large value. On the other hand, as the block size decreases, the downsampling method applied to the luminance component may be set to use a filter tap of a small value.

[0224] According to another embodiment, the downsampling method may be implicitly determined based on the shape of the current block. For example, if the current block is a non-square block, the downsampling method may be configured to use a filter having a shape corresponding to the shape of the current block. For example, if the width of the block is greater than its height, the shape of the filter used for downsampling may be wide to the left.

[0225] According to another embodiment, the downsampling method may be configured according to the slice type containing the current block. Depending on whether the slice type is an intra-slice or an inter-slice, the characteristics of the reconstructed pixel may differ. For example, an intra-slice may include an I-slice. An inter-slice may include a P-slice and a B-slice. The downsampling method may be adaptedly configured according to the slice type.

[0226] According to another embodiment, the downsampling method may be determined based on the coding parameters of the current block. For example, the coding parameters of the current block may include the mode type of the current block, prediction information, BS value, segmentation information, information related to chrominance components, etc. Here, the information related to the chrominance components of the current block may include a Sequence Parameter Set (SPS) flag. For example, the SPS flag may include video color format information of the picture of the current block, information related to the positional assignment between the samples of the chrominance components of the current block and the luminance block corresponding to the current block.

[0227] According to another embodiment, the downsampling method can be set based on the quantization parameter (QP) value of the current block. As the QP value decreases, the quality of the reconstructed pixels is similar to the original, while as the QP value increases, the quality of the reconstructed pixels may degrade. Therefore, prediction accuracy can be improved by adaptively setting the downsampling method according to the QP value. For example, when the QP is low, the downsampling method applied to the luminance component can be set to use a filter tab with a large value. On the other hand, when the QP is high, the downsampling method applied to the luminance component can be set to use a filter tab with a small value.

[0228] According to another embodiment, the downsampling method may be set based on information of blocks adjacent to the left and upper sides of the current block. For example, the downsampling method applied to the current block may be adaptively determined by utilizing coding parameters such as QP values, mode types, prediction information, BS values, and partitioning information of blocks adjacent to the left and upper sides of the current block.

[0229] The effect of downsampling can be maximized if the downsampling of the luminance component is performed using the same sampling method as the chrominance component. Therefore, if the sampling method for the chrominance component is pre-configured, the number of filter taps and the number of reference pixels used for downsampling the luminance component can be explicitly set. In this case, the optimal effect can be expected as the location of the downsampled luminance component pixel matches the location of the chrominance component pixel.

[0230]

[0231] Alternatively, the filter used for downsampling the luminance component may be adaptively determined through an explicit method. According to one embodiment, a group of candidates for downsampling filters may be defined according to the color format of the current picture. Then, based on index information indicating one downsampling filter, the filter used for downsampling may be determined from the group of candidates for downsampling filters.

[0232] For example, if the color format is 4:2:2, the downsampling filter applied to the luminance component pixel can be determined from a specific group of candidates. The video encoding device can determine one candidate from the group of downsampling filters and transmit information indicating the determined filter candidate to the video decoder. At this time, the information indicating the determined filter candidate can be transmitted in units such as sequence, group of picture (GOP), frame, picture, slice, CTU, CU, TU, etc. For example, the video encoding device can set the method of applying a [1, 1] filter to two luminance sample values ​​and the method of applying a [1, 2, 1] filter to three luminance sample values ​​as the filter candidate group. Alternatively, the group of downsampling filters may include [0, 4, 4], [2, 4, 2], and [0, 8, 0] downsampling filters. And, the explicitly signaled information may indicate one downsampling filter among the downsampling filters in the candidate group.

[0233] The video encoding device can determine the optimal method by considering the RD performance and transmit information indicating the determined filter candidate to the video decoding device. The information indicating the determined filter candidate can be transmitted to the video decoding device in the specified unit.

[0234] As another example, when the color format is 4:2:0 or 4:1:1, the downsampling filter applied to the luminance component pixels can be determined from a specific group of candidates. The video encoding device can determine one candidate from the group of downsampling filters and transmit information indicating the determined filter candidate to the video decoder. At this time, the information indicating the determined filter candidate can be transmitted in units such as sequence, group of picture (GOP), frame, picture, slice, CTU, CU, TU, etc. For example, the video encoding device can set the method of applying a [1, 1, 1, 1] filter to 4 luminance sample values ​​and the method of applying [[1, 2, 1], [1, 2, 1]] filters to 6 luminance sample values ​​as filter candidate groups. Alternatively, the candidate group of downsampling filters may include [[0, 0, 0], [0, 2, 2], [0, 2, 2]], [[0, 0, 0], [1, 2, 1], [1, 2, 1]], [[0, 1, 0], [1, 4, 1], [0, 1, 0]] downsampling filters. And, the explicitly signaled information may indicate one downsampling filter among the candidate group of downsampling filters.

[0235] The video encoding device can determine an optimal downsampling filter by considering RD performance and transmit information indicating the determined filter candidate to the video decoder. The information indicating the determined filter candidate can be transmitted to the video decoder in the specified unit.

[0236] If downsampling of the luminance component is performed in the same way as the sampling method for the chrominance component, the effect of downsampling can be maximized. Therefore, when the sampling method for the chrominance component is pre-set, the number of taps of the filter used for downsampling of the luminance component and the number of reference pixels can be explicitly set. In one embodiment, the image encoding device may form a group of candidates for a plurality of sampling methods for the chrominance component and select the optimal sampling method. The image encoding device may then transmit information indicating the selected sampling method to the image decoder in units such as sequence, group of picture (GOP), frame, picture, slice, CTU, CU, TU, etc.

[0237]

[0238] FIG. 12 is a flowchart illustrating a luminance component-based chrominance component prediction method according to one embodiment of the present disclosure. The luminance component-based chrominance component prediction method can be performed by an image decoding device.

[0239] Referring to FIG. 12, in step S1210, the image decoder can set a current color difference template area including a current color difference block that is the prediction target and samples adjacent to the current color difference block.

[0240] The size information of the current color difference template area may include the height of the upper color difference template area adjacent to the current color difference block and the width of the left color difference template area.

[0241] In one embodiment, the size information of the current color difference template area may be determined based on the coding parameters of the current color difference block. For example, the coding parameters of the current color difference block may be at least one of the size of the current color difference block, the shape of the current color difference block, the type of slice containing the current color difference block, and the QP (Quantization Parameter) value of the current color difference block.

[0242] In another embodiment, the size information of the current color difference template area may be determined based on the coding parameters of the blocks adjacent to the left and upper sides of the current color difference block. The coding parameters of the blocks adjacent to the current color difference block may be at least one of the QP (Quantization Parameter) value, mode type, prediction information, BS value, and segmentation information of the blocks adjacent to the current color difference block.

[0243] The size information of the color difference template area may be the size information of one color difference template area determined from among the size information of a plurality of predefined color difference template areas.

[0244] In one embodiment, the size information of a determined color difference template area can be determined based on information indicating the size information of a color difference template area.

[0245] In another embodiment, the size information of a determined single color difference template area may be determined based on the Rate-Distortion Optimization (RDO) value of each of the size information of a plurality of color difference template areas.

[0246] The color difference template area may include an upper color difference template area and a left color difference template area. The upper color difference template area may include an upper color difference extension area, and the left color difference template area may include a left color difference extension area.

[0247] In one embodiment, the width of the upper color difference expansion area and the height of the left color difference expansion area can each be determined based on at least one of the size of the current color difference block, the shape of the current color difference block, the type of slice containing the current color difference block, and the QP (Quantization Parameter) value of the current color difference block.

[0248] In another embodiment, the width of the upper color difference extension area and the height of the left color difference extension area may each be determined based on the coding parameters of the blocks adjacent to the left and upper sides of the current color difference block. The coding parameters of the blocks adjacent to the current color difference block may be at least one of the QP (Quantization Parameter) value, mode type, prediction information, BS value, and segmentation information of the blocks adjacent to the current color difference block.

[0249] The size information of the color difference expansion area may include the width of the upper color difference expansion area and the height of the left color difference expansion area. The size information of the color difference expansion area may be the size information of a single color difference expansion area determined from among a plurality of predefined size informations of color difference expansion areas.

[0250] In one embodiment, the size information of a determined color difference expansion area can be determined based on information indicating the size information of a color difference expansion area.

[0251] In step S1220, the image decoder may set a restored luminance block corresponding to the current color difference block and a luminance template region including samples adjacent to the restored luminance block.

[0252] In step S1230, the image decoder can derive downsampled luminance samples based on a restored luminance block and a luminance template region corresponding to the current color difference block.

[0253] In one embodiment, different downsampling filters may be applied to samples in the restored luminance block and the luminance template region to induce downsampled luminance samples.

[0254] In step S1240, the image decoder can apply a convolutional filter to the downsampled luminance samples to generate a prediction block for the current chrominance block.

[0255]

[0256] Meanwhile, the steps described in FIG. 12 can be performed in the same way in a video encoding method. Additionally, a bitstream can be generated by a video encoding method including the steps described in FIG. 12. The bitstream can be stored on a non-transient computer-readable recording medium and can also be transmitted (or streamed).

[0257]

[0258] The exemplary methods of the present disclosure are described as a series of operations for clarity of description, but this is not intended to limit the order in which the steps are performed, and if necessary, each step may be performed simultaneously or in a different order. To implement the method according to the present disclosure, additional steps may be included in addition to the steps exemplified, steps excluding some steps and including the remaining steps, or steps excluding some steps and including additional steps.

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

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

[0261] Alternatively, various embodiments of the present 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. And, a bitstream generated by the encoding method according to the embodiment may be stored on a non-transient computer-readable recording medium.

[0262] The above-mentioned computer-readable recording medium may include program instructions, data files, data structures, etc., either alone or in combination. The program instructions recorded on the above-mentioned computer-readable recording medium may be those specifically designed and configured for the present disclosure, or they may be those known and available to those skilled in the art of computer software.

[0263] In the foregoing, the present disclosure is described based on specific details, such as specific components, limited embodiments, and drawings. However, the embodiments of the present disclosure are provided merely to aid in the overall understanding of the present disclosure and are not intended to limit the present disclosure to the above embodiments. Accordingly, a person skilled in the art can make various modifications and variations from this description.

[0264] Accordingly, the scope of the present invention should not be limited to the embodiments described above, and all modifications equivalent to or equivalent to the claims set forth below, as well as the claims described below, shall be considered to fall within the scope of the concept of the present invention.

[0265]

[0266] The present invention can be used in a device for encoding / decoding images and a recording medium storing a bitstream.

Claims

1. In a video decoding method, Step of setting a color difference template area adjacent to the current color difference block; A step of setting a corresponding luminance block corresponding to the current color difference block and a luminance template area adjacent to the corresponding luminance block; A step of deriving a downsampled luminance sample based on the corresponding luminance block and the luminance template region; The method includes the step of applying a convolutional filter to the downsampled luminance sample to generate a prediction block for the current color difference block, The size information of the above color difference template area includes the height of the upper color difference template area and the width of the left color difference template area, An image decoding method characterized in that the size information of the color difference template area is determined based on the coding parameters of the current color difference block.

2. In Paragraph 1, An image decoding method characterized in that the coding parameter of the current color difference block is at least one of the size of the current color difference block, the shape of the current color difference block, the type of slice including the current color difference block, and the QP (Quantization Parameter) value of the current color difference block.

3. In Paragraph 1, The size information of the above color difference template area is, It is determined based on the coding parameters of blocks adjacent to the above current color difference block, and An image decoding method characterized in that the coding parameters of blocks adjacent to the current color difference block are at least one of the QP (Quantization Parameter) value, mode type, prediction information, BS value, and segmentation information of the blocks adjacent to the current color difference block.

4. In Paragraph 1, The size information of the above color difference template area is, An image decoding method characterized by having size information of one color difference template area determined from among size information of a plurality of predefined color difference template areas.

5. In Paragraph 4, The size information of the one color difference template area determined above is, An image decoding method characterized by being determined based on information indicating the size information of a single color difference template area.

6. In Paragraph 4, The size information of the one color difference template area determined above is, An image decoding method characterized by being determined based on the RDO (Rate-Distortion Optimization) value of each of the size information of the plurality of color difference template regions.

7. In Paragraph 1, The above color difference template area includes an upper color difference template area and a left color difference template area, and The above upper color difference template area includes an upper color difference extension area, and An image decoding method characterized in that the above-mentioned left color difference template region includes a left color difference extension region.

8. In Paragraph 7, An image decoding method characterized in that the width of the upper color difference expansion region and the height of the left color difference expansion region are each determined based on at least one of the size of the current color difference block, the shape of the current color difference block, the type of slice including the current color difference block, and the QP (Quantization Parameter) value of the current color difference block.

9. In Paragraph 7, The width of the upper color difference expansion area and the height of the left color difference expansion area are, respectively, It is determined based on the coding parameters of blocks adjacent to the above current color difference block, and An image decoding method characterized in that the coding parameters of blocks adjacent to the current color difference block are at least one of the QP (Quantization Parameter) value, mode type, prediction information, BS value, and segmentation information of the blocks adjacent to the current color difference block.

10. In Paragraph 7, The size information of the color difference expansion area includes the width of the upper color difference expansion area and the height of the left color difference expansion area, and An image decoding method characterized by having one size information of a color difference expansion area determined from among a plurality of predetermined size informations of color difference expansion areas.

11. In Paragraph 10, The size information of the one color difference expansion area determined above is, An image decoding method characterized by being determined based on information indicating the size information of the one color difference expansion area.

12. In a video encoding method, Step of setting a color difference template area adjacent to the current color difference block; A step of setting a corresponding luminance block corresponding to the current color difference block and a luminance template area adjacent to the corresponding luminance block; A step of deriving a downsampled luminance sample based on the corresponding luminance block and the luminance template region; The method includes the step of applying a convolutional filter to the downsampled luminance sample to generate a prediction block for the current color difference block, The size information of the above color difference template area includes the height of the upper color difference template area and the width of the left color difference template area, An image encoding method characterized in that the size information of the color difference template area is determined based on the coding parameters of the current color difference block.

13. A non-transient computer-readable recording medium storing a bitstream generated by a video encoding method, The above image encoding method is, Step of setting a color difference template area adjacent to the current color difference block; A step of setting a corresponding luminance block corresponding to the current color difference block and a luminance template area adjacent to the corresponding luminance block; A step of deriving a downsampled luminance sample based on the corresponding luminance block and the luminance template region; The method includes the step of applying a convolutional filter to the downsampled luminance sample to generate a prediction block for the current color difference block, The size information of the above color difference template area includes the height of the upper color difference template area and the width of the left color difference template area, A non-transient computer-readable recording medium characterized in that the size information of the color difference template area is determined based on the coding parameters of the current color difference block.

14. A method for transmitting a bitstream generated by a video encoding method, The above transmission method includes the step of transmitting the bitstream, and The above image encoding method is, Step of setting a color difference template area adjacent to the current color difference block; A step of setting a corresponding luminance block corresponding to the current color difference block and a luminance template area adjacent to the corresponding luminance block; A step of deriving a downsampled luminance sample based on the corresponding luminance block and the luminance template region; The method includes the step of applying a convolutional filter to the downsampled luminance sample to generate a prediction block for the current color difference block, The size information of the above color difference template area includes the height of the upper color difference template area and the width of the left color difference template area, A transmission method characterized in that the size information of the color difference template area is determined based on the coding parameters of the current color difference block.