Image encoding / decoding method and device
The method addresses inefficiencies in encoding and decoding high-resolution and stereoscopic video by employing component-to-component prediction and downsampling filters, enhancing coding efficiency for color difference blocks.
Patent Information
- Application Number
- PCT/KR2026/006237
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-21
- Filing Date
- 2026-05-21
- Publication Date
- 2026-11-26
AI Technical Summary
Existing video compression technologies struggle to efficiently encode and decode high-resolution and stereoscopic video content, particularly in handling color difference blocks, leading to suboptimal coding efficiency.
A method and apparatus for determining and performing component-to-component prediction in color difference blocks, using flags and index information to select prediction modes based on block coding modes and sizes, and applying downsampling filters to improve coding efficiency.
Enhances coding efficiency of color difference signals by selectively using prediction modes and filters, improving the overall compression and decoding of high-resolution and stereoscopic video content.
Smart Images

Figure KR2026006237_26112026_PF_FP_ABST
Abstract
Description
Video encoding / decoding method and device
[0001] The present invention relates to an image encoding / decoding method and apparatus.
[0002] Market demand for high-resolution video is increasing, and consequently, there is a need for technology that can efficiently compress high-resolution video. In response to these market demands, the Moving Picture Expert Group (MPEG) of ISO / IEC and the Video Coding Expert Group (VCEG) of ITU-T jointly formed the Joint Collaborative Team on Video Coding (JCT-VC), completed the development of the High Efficiency Video Coding (HEVC) video compression standard in January 2013, and have been actively conducting research and development on next-generation compression standards.
[0003] Video compression is broadly composed of intra-frame prediction (or intra prediction), inter-frame prediction (or inter prediction), transformation, quantization, entropy coding, and in-loop filters. Meanwhile, along with the increasing demand for high-resolution video, the demand for stereoscopic video content as a new video service is also increasing. Discussions are underway regarding video compression technologies to effectively provide high-resolution and ultra-high-resolution stereoscopic video content.
[0004] The present disclosure provides a method and apparatus for determining a prediction mode between components of a color difference block.
[0005] The present disclosure provides a method and apparatus for predicting the components of a color difference block.
[0006] The image decoding method and apparatus according to the present disclosure may obtain a flag indicating whether component-to-component prediction is performed for a current chrominance block from a bitstream, determine a component-to-component prediction mode for the current chrominance block based on the flag indicating that component-to-component prediction is performed for the current chrominance block, and perform component-to-component prediction for the current chrominance block based on the component-to-component prediction mode for the current chrominance block. The flag may be signaled based on at least one of whether the current chrominance block is a block coded in a lossless mode, whether the current chrominance block is a block coded in a Differential Pulse Code Modulation (DPCM) mode, or the size of the current chrominance block.
[0007] In the image decoding method and apparatus according to the present disclosure, when the current color difference block is a block coded in the lossless mode, the flag may be signaled based on whether the current color difference block is a block coded in the DPCM mode.
[0008] In the image decoding method and apparatus according to the present disclosure, when the current color difference block is a block coded in the lossless mode, the flag may be signaled based on the size of the current color difference block.
[0009] In the image decoding method and apparatus according to the present disclosure, if the current color difference block is a block not coded in the lossless mode, the flag may be signaled based on the size of the current color difference block.
[0010] In the image decoding method and apparatus according to the present disclosure, the prediction mode between components of the current color difference block may be determined based on first index information specifying any one of a plurality of prediction modes between components.
[0011] In the image decoding method and apparatus according to the present disclosure, the plurality of inter-component prediction modes may include at least one of a first mode that performs inter-component prediction based on explicitly signaled parameters, a second mode that performs inter-component prediction based on implicitly derived parameters, or a third mode that performs inter-component prediction based on an N-tap filter.
[0012] In the image decoding method and apparatus according to the present disclosure, based on the fact that the component-to-component prediction mode of the current chrominance block is the third mode, the component-to-component prediction for the current chrominance block may be performed based on second index information for specifying the position of a luminance sample used for the component-to-component prediction.
[0013] In the image decoding method and apparatus according to the present disclosure, the second index information may specify any one of a plurality of modes. The plurality of modes may include a base mode that performs component-to-component prediction using a first luminance sample, an above mode that performs component-to-component prediction using an upper luminance sample of the first luminance sample, and a left mode that performs component-to-component prediction using a left luminance sample of the first luminance sample.
[0014] In the image decoding method and apparatus according to the present disclosure, the first luminance sample may be a sample having coordinates corresponding to the coordinates of the current sample within the current chrominance block.
[0015] In the image decoding method and apparatus according to the present disclosure, the parameter for prediction between the components may be derived based on a pre-restored sample within an upper region adjacent to the corresponding luminance block of the current chrominance block.
[0016] In the image decoding method and apparatus according to the present disclosure, the range of the upper region may be determined based on whether the corresponding luminance block is located at the upper boundary of the super block.
[0017] In the image decoding method and apparatus according to the present disclosure, based on the fact that the corresponding luminance block is located at the upper boundary of the super block, the range of the upper region may be limited to one sample line adjacent to the upper boundary of the corresponding luminance block.
[0018] The image encoding method and apparatus according to the present disclosure may encode a flag indicating whether component-to-component prediction is performed for a current chrominance block, and generate a bitstream including said flag. The flag may be encoded based on at least one of whether the current chrominance block is a block coded in a lossless mode, whether the current chrominance block is a block coded in a Differential Pulse Code Modulation (DPCM) mode, or the size of the current chrominance block.
[0019] The present disclosure may provide a non-transient computer-readable storage medium for storing a bitstream generated by an image encoding method.
[0020] The present disclosure may provide a transmission method and an apparatus for transmitting a bitstream generated by an image encoding method.
[0021] According to the present disclosure, information for predicting between components can be efficiently signaled.
[0022] According to the present disclosure, the coding efficiency of a color difference signal can be improved by selectively using a prediction mode between components of a color difference block.
[0023] According to the present disclosure, parameters for predicting the components of color difference components can be efficiently obtained or derived.
[0024] According to the present disclosure, the coding efficiency of a color difference signal can be improved through component-to-component prediction of the color difference component.
[0025] FIG. 1 is a block diagram showing an image encoding device according to the present disclosure.
[0026] FIG. 2 is a block diagram showing an image decoding device according to the present disclosure.
[0027] FIG. 3 illustrates an image decoding method performed in a decoding device according to the present disclosure.
[0028] FIGS. 4 and FIGS. 5 illustrate an example of a downsampling filter according to the present disclosure.
[0029] FIG. 6 illustrates a method for downsampling a corresponding luminance block as an embodiment according to the present disclosure.
[0030] FIG. 7 illustrates a filter for inducing a peripheral sample of a corresponding luminance block as an embodiment according to the present disclosure.
[0031] FIG. 8 illustrates a method for downsampling a corresponding luminance block as an embodiment according to the present disclosure.
[0032] FIG. 9 illustrates a filter for inducing a peripheral sample of a corresponding luminance block as an embodiment according to the present disclosure.
[0033] FIG. 10 illustrates a method for downsampling a corresponding luminance block as an embodiment according to the present disclosure.
[0034] FIG. 11 illustrates a peripheral area for inducing the DC value of a color difference block as an embodiment according to the present disclosure.
[0035] FIG. 12 illustrates a method for downsampling a peripheral area of a corresponding luminance block as an embodiment according to the present disclosure.
[0036] FIG. 13 illustrates a peripheral area for deriving parameters according to the present disclosure.
[0037] FIG. 14 illustrates the locations of luminance samples available for deriving parameters according to the present disclosure.
[0038] Embodiments of the present invention are described in detail with reference to the drawings attached to this specification so that those skilled in the art can easily implement the invention. However, the present invention may be embodied in various different forms and is not limited to the embodiments described herein. Furthermore, in order to clearly explain the invention in the drawings, parts unrelated to the explanation have been omitted, and similar parts throughout the specification are denoted by similar reference numerals.
[0039] Throughout this specification, when a part is described as being 'connected' to another part, this includes not only cases where they are directly connected, but also cases where they are electrically connected with other elements in between.
[0040] Furthermore, throughout this specification, when a part is described as 'comprising' a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but may include additional components.
[0041] Additionally, 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.
[0042] Additionally, in the embodiments relating to the device and method described herein, some components of the device or some steps of the method may be omitted. Also, the order of some components of the device or some steps of the method may be changed. Additionally, other components or other steps may be inserted into some components of the device or some steps of the method.
[0043] In addition, some components or steps of the first embodiment of the present invention may be added to or replace some components or steps of the second embodiment of the present invention.
[0044] Furthermore, the components shown in the embodiments of the present invention are depicted independently to represent different characteristic functions and do not imply that each component consists of separate hardware or a single software unit. That is, for convenience of explanation, each component is described by listing it as a separate component, and at least two of the components may be combined to form a single component, or a single component may be divided into multiple components to perform a function. Such integrated and separated embodiments of each component are also included within the scope of the present invention as long as they do not deviate from the essence of the invention.
[0045] First, the terms used in this application are briefly explained as follows.
[0046] The video decoding apparatus described below may be a device included in a civilian security camera, civilian security system, military security camera, military security system, personal computer (PC), notebook computer, portable multimedia player (PMP), wireless communication terminal, smartphone, and server terminal such as a TV application server and service server; it may also refer to various devices equipped with a user terminal such as various devices, a communication device such as a communication modem for performing communication with a wired or wireless communication network, a memory for storing various programs and data for decoding video or predicting between or within a screen for decoding, and a microprocessor for executing programs to perform calculations and control.
[0047] In addition, the video encoded into a bitstream by the encoder can be transmitted to a video decoding device in real-time or non-real-time via wired or wireless communication networks such as the Internet, local area wireless communication networks, wireless LAN networks, WiBro networks, and mobile communication networks, or through various communication interfaces such as cables and Universal Serial Bus (USB), to be decoded, restored as a video, and played back. Alternatively, the bitstream generated by the encoder may be stored in memory. The memory may include both volatile and non-volatile memory. In this specification, memory may be described as a recording medium that stores the bitstream.
[0048] Typically, a video can be composed of a series of pictures, and each picture can be divided into coding units, such as blocks. Furthermore, those skilled in the art to which this embodiment belongs will understand that the term "picture" described below may be replaced with other terms having equivalent meanings, such as "image" or "frame." Additionally, those skilled in the art to which this embodiment belongs will understand that the term "coding unit" may be replaced with other terms having equivalent meanings, such as "unit block" or "block."
[0049] Hereinafter, embodiments of the present invention will be described in more detail with reference to the attached drawings. In describing the present invention, redundant descriptions of identical components are omitted.
[0050] FIG. 1 is a block diagram showing an image encoding device according to the present invention.
[0051] Referring to FIG. 1, the image encoding device (100) may include a picture splitting unit (110), a prediction unit (120, 125), a conversion unit (130), a quantization unit (135), a reordering unit (160), an entropy encoding unit (165), an inverse quantization unit (140), an inverse conversion unit (145), a filter unit (150), and a memory (155).
[0052] The picture splitting unit (110) can split the input picture into at least one processing unit. At this time, the processing unit may be a Prediction Unit (PU), a Transform Unit (TU), or a Coding Unit (CU). In the following embodiments of the present invention, the term "coding unit" may be used to mean a unit that performs coding, or a unit that performs decoding.
[0053] A prediction unit may be divided into at least one square or rectangle of the same size within a single coding unit, or it may be divided such that one of the prediction units within a single coding unit has a different shape and / or size from another prediction unit. When generating a prediction unit that performs intra prediction based on a coding unit, if it is not the minimum coding unit, intra prediction can be performed without dividing into multiple prediction units NxN.
[0054] The prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction or inter-frame prediction, and an intra prediction unit (125) that performs intra prediction or intra-frame prediction. It may determine whether to use inter prediction or perform intra prediction for a prediction unit, and determine specific information according to each prediction method (e.g., intra prediction mode, motion vector, reference picture, etc.). The residual value (residual block) between the generated prediction block and the original block may be input to the conversion unit (130). In addition, the prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value in the entropy encoding unit (165) and transmitted to the decoder.
[0055] When applying the block merge technology of the present invention described above, a method of using a merge estimation region (MER) considering parallel processing when merging and using movement information of spatially or temporally adjacent blocks of the current block can be applied to the prediction unit (120, 125). That is, the present invention can utilize a parallel estimation region (PER) to configure spatially or temporally adjacent blocks of the current block by considering parallel processing in prediction technologies such as inter-frame prediction, intra-frame prediction, and inter-component prediction among video coding technologies.
[0056] The inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous picture or the subsequent picture of the current picture, and in some cases, may predict a prediction unit based on information of a partially encoded area within the current picture. The inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
[0057] In the reference picture interpolation unit, reference picture information is received from memory (155), and pixel information of integer pixels or less can be generated from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 4 pixel units. In the case of chrominance signals, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 8 pixel units.
[0058] The motion prediction unit can perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit. Various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm) can be used to calculate motion vectors. Based on the interpolated pixels, the motion vector can have motion vector values in units of 1 / 2 or 1 / 4 pixels. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various motion prediction methods such as the Skip method, Merge method, AMVP (Advanced Motion Vector Prediction) method, and Intra Block Copy method can be used.
[0059] The intra prediction unit (125) can generate a prediction unit based on reference pixel information around the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block that has performed inter prediction, and the reference pixel is a pixel that has performed inter prediction, the reference pixel included in the block that has performed inter prediction can be replaced with the reference pixel information of the surrounding intra prediction block. That is, if the reference pixel is not available, the unavailable reference pixel information can be replaced with at least one of the available reference pixels.
[0060] Additionally, a residual block can be generated that includes residual value information, which is the difference between the prediction unit that performed the prediction based on the prediction unit generated in the prediction unit (120, 125) and the original block of the prediction unit. The generated residual block can be input to the conversion unit (130).
[0061] In the transformation unit (130), the residual block containing residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra-prediction mode information of the prediction unit used to generate the residual block.
[0062] The quantization unit (135) can quantize the values converted into the frequency domain in the conversion unit (130). The quantization coefficient may vary depending on the block or the importance of the image. The values produced by the quantization unit (135) may be provided to the inverse quantization unit (140) and the reordering unit (160).
[0063] The reordering unit (160) can perform reordering of coefficient values for quantized residual values.
[0064] The reordering unit (160) can convert two-dimensional block-shaped coefficients into one-dimensional vector forms through a coefficient scanning method. For example, the reordering unit (160) can convert the coefficients from DC to high-frequency range coefficients into one-dimensional vector forms by scanning using a Zig-Zag Scan method. Depending on the size of the conversion unit and the intra-prediction mode, a vertical scan that scans two-dimensional block-shaped coefficients in the column direction or a horizontal scan that scans two-dimensional block-shaped coefficients in the row direction may be used instead of the Zig-Zag Scan. That is, depending on the size of the conversion unit and the intra-prediction mode, it can be determined whether to use a Zig-Zag Scan, a vertical scan, or a horizontal scan.
[0065] The entropy encoding unit (165) can perform entropy encoding based on the values calculated by the reordering unit (160). Entropy encoding can use various encoding methods, such as, for example, Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding). In this regard, the entropy encoding unit (165) can encode residual value coefficient information of the encoding unit from the reordering unit (160) and the prediction unit (120, 125). Additionally, according to the present invention, it is possible to signal and transmit information indicating that motion information is derived and used in the decoder side, and information regarding the technique used for deriving motion information.
[0066] In the inverse quantization unit (140) and inverse transformation unit (145), the values quantized in the quantization unit (135) are inverse quantized, and the values transformed in the transformation unit (130) are inverse transformed. The residual value generated in the inverse quantization unit (140) and inverse transformation unit (145) can be combined with the prediction unit predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.
[0067] The filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an Adaptive Loop Filter (ALF). The deblocking filter can remove block distortion caused by boundaries between blocks in the restored picture. The offset correction unit can correct the offset from the original image on a pixel-by-pixel basis for the image that has undergone deblocking. To perform offset correction for a specific picture, a method may be used in which pixels included in the image are divided into a certain number of regions, the region to be offset is determined, and the offset is applied to that region, or a method may be used in which the offset is applied by considering the edge information of each pixel. Adaptive Loop Filtering (ALF) may be performed based on a value obtained by comparing the filtered restored image with the original image. After dividing the pixels included in the image into a predetermined group, a filter to be applied to that group is determined, and filtering may be performed differentially for each group.
[0068] The memory (155) can store a restored block or picture produced through the filter unit (150), and the stored restored block or picture can be provided to the prediction unit (120, 125) when performing inter-prediction.
[0069] FIG. 2 is a block diagram showing an image decoding device according to the present invention.
[0070] Referring to FIG. 2, the image decoder (200) may include an entropy decoder (210), a reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).
[0071] When a video bitstream is input to a video encoder, the input bitstream can be decoded using the reverse procedure of the video encoder.
[0072] The entropy decoding unit (210) can perform entropy decoding in the opposite procedure to that which the entropy encoding unit of the image encoder performed. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in correspondence with the method performed in the image encoder.
[0073] The entropy decoding unit (210) can decode information related to intra-prediction and inter-prediction performed in the encoder.
[0074] The reordering unit (215) can perform reordering based on the method of reordering the entropy-decoded bitstream in the encoding unit in the entropy decoding unit (210). The coefficients expressed in the form of a one-dimensional vector can be reordered by restoring them to the form of two-dimensional block coefficients.
[0075] The inverse quantization unit (220) can perform inverse quantization based on the coefficient values of the rearranged block and the quantization parameters provided by the encoder.
[0076] The inverse transform unit (225) can perform inverse transforms, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms, i.e., DCT, DST, and KLT, performed by the transform unit on the quantization result performed by the image encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit (225) of the image decoder, a transformation technique (e.g., DCT, DST, KLT) can be selectively performed according to multiple pieces of information such as a prediction method, the size of the current block, and the prediction direction.
[0077] The prediction unit (230, 235) can generate a prediction block based on the prediction block generation information provided by the entropy decoding unit (210) and the previously decoded block or picture information provided by the memory (245).
[0078] As described above, when performing intra prediction or intra-frame prediction identical to the operation in the video encoder, if the size of the prediction unit and the size of the transform unit are the same, intra prediction for the prediction unit is performed based on the pixels to the left of the prediction unit, the pixels to the top left, and the pixels to the top; however, if the size of the prediction unit and the size of the transform unit are different when performing intra prediction, intra prediction can be performed using reference pixels based on the transform unit. Additionally, intra prediction using NxN partitioning only for the minimum encoding unit may also be used.
[0079] The prediction unit (230, 235) may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit receives various information, such as prediction unit information input from the entropy decoding unit (210), prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, distinguishes the prediction unit in the current encoding unit, and determines whether the prediction unit performs inter prediction or intra prediction.
[0080] In addition, when applying the block merge technology of the present invention described above, a method of using a merge estimation region (MER) considering parallel processing when merging and using movement information of spatially or temporally adjacent blocks of the current block can be applied to the prediction unit (230, 235). That is, the present invention can utilize a parallel estimation region (PER) to configure spatially or temporally adjacent blocks of the current block by considering parallel processing in prediction technologies such as inter-frame prediction, intra-frame prediction, and inter-component prediction among video coding technologies.
[0081] The inter prediction unit (230) can perform inter prediction for the current prediction unit based on information included in at least one picture, either a previous picture or a subsequent picture, of the current picture containing the current prediction unit, using information required for inter prediction of the current prediction unit provided by the video encoder. To perform inter prediction, it can determine whether the motion prediction method of the prediction unit included in the corresponding encoding unit is a Skip Mode, Merge Mode, AMVP Mode, or Intra Block Copy Mode based on the encoding unit.
[0082] The intra prediction unit (235) can generate a prediction block based on pixel information within the current picture. If the prediction unit is a prediction unit that has performed intra prediction, it can perform intra prediction based on the intra prediction mode information of the prediction unit provided by the image encoder. The intra prediction unit (235) may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixel of the current block, and can determine whether to apply the filter based on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixel of the current block using the prediction mode of the prediction unit and the AIS filter information provided by the image encoder. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0083] The reference pixel interpolation unit can generate a reference pixel of an integer value or less by interpolating the reference pixel when the prediction mode of the prediction unit is a prediction unit that performs intra-prediction based on the pixel value interpolated from the reference pixel. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is DC mode.
[0084] The restored block or picture may be provided to a filter unit (240). The filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.
[0085] Information regarding whether a deblocking filter has been applied to the corresponding block or picture can be received from the video encoder, and if a deblocking filter has been applied, information regarding whether a strong filter or a weak filter has been applied. The deblocking filter of the video decoder receives information related to the deblocking filter provided by the video encoder and can perform deblocking filtering on the corresponding block.
[0086] The offset correction unit can perform offset correction on the restored image based on the type of offset correction and offset value information applied to the image during encoding. ALF can be applied to the encoding unit based on information on whether ALF is applied and ALF coefficient information provided by the encoder. This ALF information can be provided included in a specific parameter set.
[0087] The memory (245) can store the restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to the output unit.
[0088] FIG. 3 illustrates an image decoding method performed in a decoding device according to the present disclosure.
[0089] Referring to FIG. 3, a cross-component prediction mode of the current color difference block can be determined (S300).
[0090] The component-to-component prediction mode of the current chrominance block can be determined as any one of a plurality of component-to-component prediction modes. Here, the plurality of component-to-component prediction modes may include at least one of a first mode (cfl_explicit) that performs component-to-component prediction based on explicitly signaled parameters, a second mode (cfl_implicit) that performs component-to-component prediction by implicitly deriving parameters based on the surrounding reference samples of the current chrominance block and the corresponding luminance block, or a third mode (cfl_mh(multi hypothesis)) that performs component-to-component prediction based on an N-tap filter. The filter coefficients of the N-tap filter may be derived based on the surrounding reference samples of the current chrominance block and the corresponding luminance block. The parameters of the first and second modes may be linear parameters, and the filter coefficients of the third mode may be non-linear parameters.
[0091] Let's take a specific look at the method for determining the prediction mode between the components of the current color difference block.
[0092] Based on the flag (cfl_flag) signaled from the bitstream, it is possible to determine whether component-to-component prediction is performed on the current color difference block.
[0093] cfl_flag can indicate whether component-to-component prediction is performed on the current chrominance block. For example, if the value of cfl_flag is 1, component-to-component prediction may be performed on the current chrominance block, and if not, component-to-component prediction may not be performed on the current chrominance block.
[0094] cfl_flag may be signaled based on at least one of whether the current chrominance block is a block coded in lossless mode, whether the current chrominance block is a block coded in Differential Pulse Code Modulation (DPCM) mode, the size of the current chrominance block, or the color space.
[0095] For example, if the current chrominance block is a block coded in lossless mode, cfl_flag may be signaled based on whether the current chrominance block is a block not coded in DPCM mode. Specifically, if the current chrominance block is a block coded in DPCM mode, cfl_flag may not be signaled. Otherwise, cfl_flag may be signaled.
[0096] For example, if the current chrominance block is a block coded in lossless mode, cfl_flag may be signaled based on the size of the current chrominance block. Specifically, if the current chrominance block is a 4x4 block, cfl_flag may be signaled. Otherwise, cfl_flag may not be signaled.
[0097] For example, if the current chrominance block is not a block coded in lossless mode, cfl_flag may be signaled based on the size of the current chrominance block. Specifically, if the width and height of the current chrominance block are less than or equal to 64, cfl_flag may be signaled. Otherwise, cfl_flag may not be signaled.
[0098] When the value of cfl_flag is 1, index information (cfl_idx) specifying one of the aforementioned multiple inter-component prediction modes may be signaled, and based on this, the inter-component prediction mode of the current chrominance block may be determined. When the value of cfl_flag is 0, information regarding an intra prediction mode other than inter-component prediction may be signaled, and based on this, the intra prediction mode of the current chrominance block may be determined.
[0099] cfl_idx may be signaled based on the distance between at least one of the current chrominance block or the corresponding luminance block and the boundary of a specific unit. Here, the specific unit may be at least one of a super block (or coding tree unit (CTU)), a tile, a slice, or a frame.
[0100] For the sake of convenience of explanation, let A and B be the distances from the current color difference block (specifically, the top-left sample position of the current color difference block) to the top and left boundaries of a specific unit, respectively. Let C and D be the distances from the corresponding luminance block (specifically, the top-left sample position of the corresponding luminance block) to the top and left boundaries of a specific unit, respectively.
[0101] At this time, A and B can be determined based on the current color space, C and D. For example, if the current color space is in a 4:2:0 format, A can be determined as C / 2 and B can be determined as D / 2. If the current color space is in a 4:2:2 format, A can be determined as C and B can be determined as D / 2.
[0102] Let E be the distance from the top boundary of the corresponding luminance block to the top boundary of the superblock to which the current block belongs. In this case, C can be determined as E or (E+N). N can be an integer greater than or equal to 1.
[0103] If C is smaller than the first threshold and D is smaller than the second threshold, the signaling of cfl_idx may be omitted, and the prediction mode between components of the current chrominance block may be induced to cfl_explicit.
[0104] If C is less than the third threshold and D is less than the fourth threshold, the prediction mode between components of the current color difference block can be determined as either cfl_implicit or cfl_explicit. To this end, instead of signaling cfl_idx, a 1-bit flag specifying either cfl_implicit or cfl_explicit can be signaled.
[0105] Referring to FIG. 3, a prediction between components for the current color difference block can be performed based on the prediction between components of the current color difference block (S310).
[0106] The component-to-component prediction process according to the present disclosure may include at least one of a downsampling process of a corresponding luminance block, a DC calculation process for a current color difference block, an AC calculation process for a corresponding luminance block, or a parameter acquisition process for component-to-component prediction.
[0107] 1. Downsampling process of corresponding luminance blocks
[0108] Downsampling of the corresponding luminance block of the current color difference block can be performed according to the color space. If the current color space is a 4:2:2 format or a 4:2:0 format, downsampling can be performed based on a predetermined downsampling filter. If the current color space is a 4:4:4 format, step S320 may be omitted. The downsampling filter may be determined based on information signaled at a high level. The high level may include at least one of a sequence level, a picture (or frame) level, or a slice level.
[0109] Downsampling for 4:2:0 format
[0110] The downsampling filter for the 4:2:0 format may be any one of the first to third filters shown in FIG. 4. Alternatively, the downsampling filter for the 4:2:0 format may be selected as any one of a plurality of predefined filters. Here, the plurality of predefined filters may include at least one of the first to third filters shown in FIG. 4.
[0111] In the case of the 4:2:0 format, the width and height of the current color difference block may be half the width and height of the corresponding luminance block, respectively. A downsampling filter can be applied to the corresponding luminance block to create a downsampled corresponding luminance block having the same size as the current color difference block.
[0112] When the downsampling filter is determined to be the first filter, one downsampled sample can be generated by performing filtering on four samples within the corresponding luminance block as input.
[0113] When the downsampling filter is determined to be the second filter, downsampling can be performed based on samples of the corresponding luminance block, as shown in FIG. 6.
[0114] At this time, when downsampling is performed on a sample located at the left boundary of the corresponding luminance block (hereinafter referred to as the reference sample), the left peripheral sample of the reference sample, which is the input of the downsampling filter, may not belong to the corresponding luminance block. In this case, the value of the left peripheral sample may be padded with the value of the reference sample. Alternatively, the value of the left peripheral sample may be derived by applying a 4-tap filter to samples belonging to the corresponding luminance block. The input samples of the 4-tap filter may include the reference sample and three samples adjacent to the reference sample. The 4-tap filter may have the filter coefficients of FIG. 7. Alternatively, if a pre-restored left peripheral sample exists in the left peripheral region of the corresponding luminance block, the said left peripheral sample may be used as the input of the downsampling filter.
[0115] When the downsampling filter is determined to be the third filter, downsampling can be performed based on samples of the corresponding luminance block, as shown in FIG. 8.
[0116] At this time, when downsampling is performed on a sample located at the left and top boundaries of the corresponding luminance block (hereinafter referred to as the reference sample), the left and top surrounding samples of the reference sample, which are the inputs of the downsampling filter, may not belong to the corresponding luminance block. In this case, the values of the surrounding samples may be padded with the values of the reference sample. Alternatively, the values of the surrounding samples may be derived by applying a 3-tap filter to the samples belonging to the corresponding luminance block. The input samples of the 3-tap filter may include the reference sample and two samples adjacent to the reference sample. The 3-tap filter may have the filter coefficients of FIG. 9. Alternatively, if there are pre-restored left and top surrounding samples in the surrounding area of the corresponding luminance block, those surrounding samples may be used as inputs to the downsampling filter.
[0117] Downsampling for 4:2:2 format
[0118] The downsampling filter for the 4:2:2 format may be any one of the first to third filters shown in FIG. 5. Alternatively, the downsampling filter for the 4:2:2 format may be selected as any one of a plurality of predefined filters. Here, the plurality of predefined filters may include at least one of the first to third filters shown in FIG. 5. In the case of the third filter, downsampling may be performed using one sample at a predefined position (e.g., left or right) among two samples corresponding to the color difference sample as input.
[0119] In the case of the 4:2:0 format, the width of the current color difference block is half the width of the corresponding luminance block, and the height of the current color difference block may be equal to the height of the corresponding luminance block. A downsampled corresponding luminance block can be created by applying a downsampling filter to the corresponding luminance block.
[0120] When the downsampling filter is determined to be the second filter, downsampling can be performed based on samples of the corresponding luminance block, as shown in FIG. 10.
[0121] At this time, when downsampling is performed on a sample located at the left boundary of the corresponding luminance block (hereinafter referred to as the reference sample), the left peripheral sample of the reference sample, which is the input of the downsampling filter, may not belong to the corresponding luminance block. In this case, the value of the left peripheral sample may be padded with the value of the reference sample. Alternatively, the value of the left peripheral sample may be derived by applying a 2-tap filter to samples belonging to the corresponding luminance block. The input samples of the 2-tap filter may include the reference sample and one sample adjacent to the reference sample. The 2-tap filter may have filter coefficients of {6, 2}. Alternatively, if a pre-restored left peripheral sample exists in the left peripheral region of the corresponding luminance block, that left peripheral sample may be used as the input of the downsampling filter.
[0122] 2. DC Calculation Process for the Current Color Difference Block
[0123] The DC value (or average value) for the current color difference block can be calculated. The execution order of the DC calculation process may be determined according to an agreement between the encoding device and the decoder, and it may also be performed in parallel with other processes.
[0124] Based on the component-to-component prediction mode of the current color difference block, it may be determined whether to perform the DC calculation process. For example, the DC calculation process may be performed only when the component-to-component prediction mode of the current color difference block is cfl_explicit. The DC calculation process may be performed only when the component-to-component prediction mode of the current color difference block is cfl_explicit or cfl_implicit.
[0125] The DC value of the current color difference block can be derived as the average value of pre-restored samples belonging to the surrounding area of the current color difference block. In this case, the range of the surrounding area for calculating the DC value is A as shown in FIG. 11. c , B c , C c , D c It can be determined according to length parameters such as. The surrounding area may include at least one of the left area, top area, top-left area, bottom-left area, or top-right area of the current color difference block.
[0126] The length parameter may be determined based on at least one of the prediction mode between components of the current chrominance block, whether there are pre-restored samples within the surrounding area, whether the current block is located at the left and / or top boundary of a specific unit (e.g., superblock, tile, frame), the size of the current block, or the aspect ratio of the current block. Here, the current block may include at least one of the current chrominance block or the corresponding luminance block.
[0127] For example, if there are no previously reconstructed left peripheral samples, D c can be determined to be 0. If no pre-recovered top surrounding samples exist, C c can be determined to be 0.
[0128] For example, if the current block is located at the left boundary of a super block, tile, or frame, C ccan be determined to 0. If the current block is located at the top boundary of a superblock, tile, or frame, D c can be determined to be 0. If the current block is located at the upper boundary of the super block (CTU), C c can be determined to be 1.
[0129] For example, if the aspect ratio of the current block is greater than a specific threshold, the DC value can be calculated based on pre-restored top peripheral samples. If the aspect ratio of the current block is smaller than a specific threshold, the DC value can be calculated based on pre-restored left peripheral samples.
[0130] For example, if previously restored left and top surrounding samples do not exist or are not available (e.g., if the surrounding samples belong to a different tile than the current block), the DC value of the current color difference block can be determined based on the bit depth. For example, the DC value can be determined as the median of the bit depth, (median + 1), or (median - 1).
[0131] To calculate the DC value without division operations, the DC value can be calculated as in the following example.
[0132] A c , C c The average of the upper surrounding samples determined by the length parameter (DC A ) and B c , D c The average of the left-sided peripheral samples determined by the length parameter (DC L The final DC value can be calculated based on ). At this time, A c *C c and B c *D c are 2 each Ka and 2 Kl It can be expressed as (Ka, Kl are integers greater than 1). The final DC value can be calculated as shown in the following mathematical formula 1.
[0133]
[0134] N samples can be derived by subsampling the upper surrounding samples belonging to the upper region, and the DC value can be calculated based on these N samples. M samples can be derived by subsampling the left surrounding samples belonging to the left region, and the DC value can be calculated based on these M samples. The value of (N+M) is 2 K It can be expressed as (K is an integer greater than 1). The values of N and M can be determined based on the size and / or aspect ratio of the current block.
[0135] The prediction samples of the current color difference block may also be generated based on DC mode. In this case, for the prediction samples located at the top and left boundaries of the current color difference block, ORIP (offset-based refinement of intra prediction) may be performed on a sub-block basis to correct the prediction samples through filtering using the previously reconstructed surrounding samples and the prediction samples as inputs.
[0136] If a component-to-component prediction mode is applied to the current color difference block, the above ORIP may be restricted from being performed. Alternatively, if component-to-component prediction is performed for the current color difference block, ORIP may be applied to prediction samples located at the top and left boundaries of the current color difference block.
[0137] 3. AC Calculation Process for Corresponding Luminance Blocks
[0138] This process may be a process of calculating the AC value of a corresponding luminance block used for prediction between components.
[0139] The AC calculation process can be performed adaptively based on the component-to-component prediction mode of the current chrominance block. For example, the AC calculation process may be performed only when the component-to-component prediction mode of the current chrominance block is cfl_explicit. Alternatively, the AC calculation process may be performed only when the component-to-component prediction mode of the current chrominance block is cfl_explicit or cfl_implicit.
[0140] The AC calculation process may consist of a process of calculating the DC value (or DC block) of a corresponding luminance block based on samples to which downsampling has been applied or not applied according to the color space, and a process of calculating the AC value by subtracting the DC value from the reconstructed sample value of the corresponding luminance block. In this case, the DC value of the corresponding luminance block may be calculated based on pre-reconstructed surrounding samples of the corresponding luminance block, in the same way as the method for calculating the DC value of the current chrominance block.
[0141] 4. Parameter Acquisition Process
[0142] A reference sample used to derive the parameter may be prepared. Here, the reference sample may be a pre-recovered sample belonging to the surrounding area of the corresponding luminance block. The surrounding area may include at least one of the left area, top area, top-left area, bottom-left area, or top-right area of the corresponding luminance block.
[0143] Based on the inter-component prediction mode of the current chrominance block, whether a reference sample preparation process is performed and / or the method of preparing the reference sample can be determined. For example, the reference sample preparation process may be performed when the inter-component prediction mode of the current chrominance block is cfl_implicit or cfl_mh.
[0144] Depending on the current color space, downsampling may be performed based on reference samples belonging to the surrounding area of the corresponding luminance block. If the current color space is in a 4:2:0 format, the downsampling filter of FIG. 4 may be used. If the current color space is in a 4:2:2 format, the downsampling filter of FIG. 5 may be used. If the corresponding luminance block is located at the boundary of the super block, downsampling may be performed using only the upper L-sample line.
[0145] Downsampling of the upper reference sample of a corresponding luminance block can be performed as shown in FIG. 12. FIG. 12(a) relates to the case where the corresponding luminance block is not located at the upper boundary of the super block. In this case, downsampling can be performed based on the third filter of FIG. 4 using a 3-sample line. FIG. 12(b) relates to the case where the corresponding luminance block is located at the upper boundary of the super block. In this case, downsampling can be performed based on a filter using only a 1-sample line. Here, the 1-sample line may be a sample line adjacent to the corresponding luminance block. The value of the reference sample on the 1-sample line may be padded based on the sample located at the upper boundary of the corresponding luminance block.
[0146] The range of the surrounding area for deriving the parameter is A as shown in FIG. 13 L , B L , C L , D L It can be determined according to length parameters such as. The length parameter may be determined based on at least one of the prediction mode between components of the current chrominance block, the distance between the boundary of a specific unit (e.g., superblock, tile, frame) and the top and left boundaries of the corresponding luminance block, the size of the current block, or the aspect ratio of the current block. Here, the current block may include at least one of the current chrominance block or the corresponding luminance block.
[0147] For example, when the corresponding luminance block is located at the top boundary of the super block, C L can be derived to 1. That is, when the corresponding luminance block is located at the top boundary of the super block, the range of the top area used to derive the parameter can be limited to one sample line adjacent to the top boundary of the corresponding luminance block.
[0148] For example, if the distances between the top and left boundaries of a corresponding luminance block and the boundary of a specific unit (e.g., a tile, an independent slice, or a frame) are E and F, respectively, A L can be derived from E, and B L It can be derived from F.
[0149] Below, we will examine the method for determining parameters for each prediction mode among the components.
[0150] 1st mode (cfl_explicit)
[0151] If the between-component prediction mode of the current color difference block is cfl_implicit, the parameter (α) for between-component prediction can be explicitly signaled.
[0152] At this time, index information (joint_sign_idx) representing the sign of the color difference component can be signaled.
[0153] For example, among combinations of no sign (N / A), positive (+), and negative (-), eight combinations can be defined, excluding the case where both the Cb component and the Cr component are unsigned. The decoding device can determine the signs for the Cb component and the Cr component, respectively, by specifying one of the eight combinations based on joint_sign_idx. The signs for the Cb component and the Cr component according to joint_sign_idx can be defined as shown in Table 1 below.
[0154] joint_sign_idxSign_cbSign_cr0N / A-1N / A+2-N / A3--4-+5+N / A6+-7++
[0155] For the color difference component determined to be signed according to joint_sign_idx, index information representing the absolute value of the parameter may be additionally signaled. The absolute value of the parameter may be determined based on the signaled index information.
[0156] In the example of Table 1, if the following condition 1 is satisfied, the signaling of index information for the Cb component may be omitted and the parameter for the Cb component may be derived to 0. Condition 1 corresponds to the case where the quotient of (joint_sign_idx+1) divided by 3 is 0.
[0157] [Condition 1]
[0158] (joint_sign_idx+1) / 3==0
[0159] In the example of Table 1, if condition 2 is satisfied, the signaling of index information for the Cr component can be omitted and the parameter for the Cr component can be derived to 0. Condition 2 corresponds to the case where the remainder when (joint_sign_idx+1) is divided by 3 is 0.
[0160] [Condition 2]
[0161] (joint_sign_idx+1)%3==0
[0162] Parameters for prediction between components can be determined based on the sign and absolute value of the previously determined parameters.
[0163] Mode 2 (cfl_implicit)
[0164] Parameters in cfl_implicit may include at least one of a scale factor or an offset. Parameters in cfl_implicit can be derived through the following process.
[0165] The location of the surrounding area for deriving the parameter can be determined. The location of the surrounding area can be determined based on at least one of whether the surrounding area of the current block is available, the size of the current block, or the aspect ratio of the current block. Here, the current block may include at least one of the current chrominance block or the corresponding luminance block.
[0166] For example, if both the top and left regions are available, the location of the surrounding region to which the reference sample belongs can be determined based on the aspect ratio (width / height) of the current block. Specifically, if the aspect ratio of the current block is greater than a specific threshold, only samples within the top region can be used as reference samples. If the aspect ratio of the current block is smaller than a specific threshold, only samples within the left region can be used as reference samples. Otherwise, samples within both the top and left regions can be used as reference samples.
[0167] For example, if only one of the top or left regions is available, the parameter can be derived by using a sample from that region as a reference sample.
[0168] For example, if both the top and left regions are unavailable, the parameter can be determined to a specific value defined according to the agreement between the encoder and decoder.
[0169] The number of reference sample pairs used in deriving the parameters may be determined according to an agreement between the encoder and decoder, or based on the size of the current block. A reference sample pair may be defined as a set of reference samples from a chrominance block and corresponding reference samples from a luminance block.
[0170] For example, the total number of reference sample pairs used in the derivation of parameters is 2 P It can be (P is an integer greater than 1). If the top and left regions are used, 2 in each region P-1Reference sample pairs can be used for parameter derivation. If the top or left region is used, 2 in that region P A number of reference sample pairs can be used for parameter derivation.
[0171] If the size of the current block is larger than the number of reference sample pairs used for parameter derivation, the reference sample pairs can be determined by subsampling samples belonging to the surrounding region of the current block.
[0172] For example, max(width / 2 P-1 , 1) or max(width / 2 P Reference sample pairs can be determined by performing subsampling in units of 1) samples.
[0173] For example, when the position of the top-left sample of the current block is (0, 0), the starting position of subsampling in the top region can be determined as (0, -1), and the starting position of subsampling in the left region can be determined as (-1, 0).
[0174] The starting position of subsampling in the top and left regions can be determined based on at least one of the subsampling interval, the size of the current block, or the aspect ratio of the current block.
[0175] For example, when the subsampling interval (n_sub) is 1, the starting positions of subsampling in the top and left regions may be (0, -1) and (-1, 0), respectively. Otherwise, the starting positions of subsampling in the top and left regions may be (n_sub / 2, -1) and (-1, n_sub / 2), respectively. Here, n_sub / 2 may be a position corresponding to half of the subsampling interval.
[0176] The scale factor (α) can be calculated based on linear regression according to the following Equation 2. In Equation 2, N may represent the number of reference sample pairs. For example, division operations can be performed through scaling and / or shift operations.
[0177]
[0178] The offset (β) can be derived based on a reference sample. For example, the offset can be derived through the following Equation 3.
[0179]
[0180] 3rd mode (cfl_mh)
[0181] The parameters in cfl_mh may include filter coefficients that minimize the difference between the values of surrounding samples of the corresponding luminance block and the values of surrounding samples of the current chrominance block.
[0182] The filter used in cfl_mh can be defined as shown in the following mathematical formula 4.
[0183]
[0184] In Equation 4, f can represent filter coefficients, and A, B, and C can represent sample positions within corresponding (downsampled) luminance blocks. M can represent an intermediate value according to bit depth, and P can be calculated as shown in Equation 5 below.
[0185]
[0186] Alternatively, P can be calculated as shown in the following mathematical formula 6.
[0187]
[0188] In Equation 6, C may represent a sample among the samples within the (downsampled) corresponding luminance block that corresponds to the current sample of the current chrominance block. X may be a sample belonging to the (downsampled) corresponding luminance block that is adjacent to C. For example, X may be any one of the top sample (A), left sample (L), left sample (R), or bottom sample (B) of C.
[0189] Figure 14 illustrates the locations of luminance samples available to derive parameters according to cfl_mh.
[0190] Referring to FIG. 14, among the samples belonging to the (downsampled) surrounding area of the corresponding luminance block, a parameter can be derived based on a sample (C) corresponding to a sample belonging to the surrounding area of the current chrominance block. Here, the sample (C) may be a sample having coordinates corresponding to the coordinates of a sample belonging to the surrounding area of the current chrominance block.
[0191] Alternatively, among the samples belonging to the (downsampled) surrounding region of the corresponding luminance block, a parameter may be derived based on a sample other than sample (C). Here, the sample other than sample (C) may be adaptively determined as any one of the surrounding samples adjacent to sample (C). The surrounding samples may include at least one of the top sample (A), left sample (L), left sample (R), or bottom sample (B). The sample other than sample (C) may be a surrounding sample at a specific location adjacent to sample (C). The specific location may be a fixed location pre-defined in the encoder / decoder. For example, the specific location may be any one of C, A, L, R, or B shown in FIG. 14.
[0192] In the case of cfl_mh, one of two modes can be determined based on a 1-bit flag signaled through the bitstream.
[0193] Here, the two modes may be for specifying the location of the (downsampled) luminance sample used to derive the parameter. For convenience of explanation, the two modes will be referred to as the top mode and the left mode, respectively. The top mode may be a mode for deriving the parameter using the sample (C) and the top sample (A) shown in FIG. 14. The left mode may be a mode for deriving the parameter using the sample (C) and the left sample (L) shown in FIG. 14.
[0194] In this case, the mode-specific parameters (i.e., filter coefficients) can be derived based on the following mathematical formulas. Equation 7 relates to a method for deriving filter coefficients according to the upper mode, where sample (C) and upper sample (A) can be used as inputs to the filter. Equation 8 relates to a method for deriving filter coefficients according to the left mode, where sample (C) and left sample (L) can be used as inputs to the filter.
[0195]
[0196]
[0197] In the case of cfl_mh, one of the three modes may be determined based on index information signaled through the bitstream.
[0198] Here, the three modes may be for specifying the location of the (downsampled) luminance sample used to derive the parameter. For convenience of explanation, the three modes will be referred to as the reference mode, the top mode, and the left mode, respectively. The reference mode may be a mode for deriving the parameter using the sample (C) shown in FIG. 14. The top mode may be a mode for deriving the parameter using the top sample (A) shown in FIG. 14. The left mode may be a mode for deriving the parameter using the left sample (L) shown in FIG. 14.
[0199] In this case, the mode-specific parameters (i.e., filter coefficients) can be derived based on the following mathematical formulas. Equation 9 relates to a method for deriving filter coefficients according to a reference mode, where a sample (C) can be used as the input to the filter. Equation 10 relates to a method for deriving filter coefficients according to an upper mode, where an upper sample (A) can be used as the input to the filter. Equation 11 relates to a method for deriving filter coefficients according to a left mode, where a left sample (L) can be used as the input to the filter.
[0200]
[0201]
[0202]
[0203] Filter coefficients can be derived through integerized Gaussian elimination or LDL decomposition. In this case, if no surrounding samples exist, pre-defined filter coefficients may be used according to an agreement between the encoder and decoder.
[0204] Based on the parameters obtained through the aforementioned method, component-to-component prediction for the current color difference block can be performed. In other words, based on the obtained parameters, prediction samples of the current color difference block can be generated from samples of the (downsampled) corresponding luminance block.
[0205] If the prediction mode between components of the current color difference block is cfl_implicit or cfl_explicit, a prediction sample of the current color difference block can be generated through linear prediction as in the following Equation 12.
[0206]
[0207] In mathematical formula 12, C pred can represent the predicted sample of the current color difference block. L AC can represent the AC value calculated for the corresponding luminance block. C DCcan represent the DC value calculated for the current color difference block.
[0208] If the prediction mode between components of the current chrominance block is cfl_mh, prediction samples of the current chrominance block can be generated based on pre-derived parameters (i.e., filter coefficients).
[0209] For example, one of two modes can be determined based on a 1-bit flag signaled through the bitstream.
[0210] Here, the two modes may be used to specify the location of (downsampled) luminance samples used for inter-component prediction. For convenience of explanation, the two modes will be referred to as the vertical mode and the horizontal mode, respectively.
[0211] The vertical mode may be a mode that performs prediction between components using sample (C) and samples (A, B) adjacent to sample (C) in a vertical direction. Sample (C) may be a sample corresponding to the current sample in the current chrominance block among the samples belonging to the (downsampled) corresponding luminance block. For example, sample (C) may be a sample having coordinates within the (downsampled) corresponding luminance block that correspond to the coordinates of the current sample within the current chrominance block. Sample (A) may be a sample adjacent to the top of sample (C). Sample (B) may be a sample adjacent to the bottom of sample (C).
[0212] The horizontal mode may be a mode that performs prediction between components using sample (C) and samples (L, R) that are horizontally adjacent to sample (C). Sample (C) is as previously described. Sample (L) may be a sample adjacent to the left of sample (C). Sample (R) may be a sample adjacent to the right of sample (C).
[0213] The aforementioned prediction between components by mode can be performed based on the following mathematical formula.
[0214]
[0215]
[0216] Equation 13 relates to the prediction between components based on the vertical mode. According to Equation 13, the predicted sample (C) of the current color difference block is based on a filter that takes sample (C) and samples (A, B) adjacent to sample (C) in the vertical direction as input. pred It can generate ). Equation 14 relates to prediction between components according to the horizontal mode. According to Equation 14, a predicted sample (C) of the current color difference block is obtained based on a filter that takes sample (C) and samples (L, R) horizontally adjacent to sample (C) as input. pred Can generate ).
[0217] For example, one of two modes can be determined based on a 1-bit flag signaled through the bitstream.
[0218] Here, the two modes may be used to specify the location of (downsampled) luminance samples used for inter-component prediction. For convenience of explanation, the two modes will be referred to as the top mode and the left mode, respectively.
[0219] The top mode may be a mode that performs prediction between components using sample (C) and sample (A). Sample (C) may be a sample corresponding to the current sample in the current chrominance block among the samples belonging to the (downsampled) corresponding luminance block. For example, sample (C) may be a sample having coordinates corresponding to the coordinates of the current sample in the current chrominance block within the (downsampled) corresponding luminance block. Sample (A) may be a sample adjacent to the top of sample (C).
[0220] The left mode may be a mode that performs prediction between components using samples (C) and samples (L). Sample (C) is as previously described, and sample (L) may be a sample adjacent to the left of sample (C).
[0221] The aforementioned prediction between components by mode can be performed based on the following mathematical formula.
[0222]
[0223]
[0224] Equation 15 relates to the prediction between components according to the upper mode. According to Equation 15, the predicted sample (C) of the current color difference block is based on a filter that takes sample (C) and sample (A) adjacent to sample (C) in a vertical direction as input. pred It can generate ). Equation 16 relates to prediction between components according to the left mode. According to Equation 16, a predicted sample (C) of the current color difference block is obtained based on a filter that takes sample (C) and a sample (L) horizontally adjacent to sample (C) as input. pred Can generate ).
[0225] For example, one of the three modes can be determined based on index information signaled through the bitstream.
[0226] Here, the three modes may be used to specify the location of (downsampled) luminance samples used for prediction between components. For convenience of explanation, the three modes will be referred to as the reference mode, the top mode, and the left mode, respectively.
[0227] The reference mode may be a mode that performs prediction between components using sample (C). Sample (C) may be a sample corresponding to the current sample of the current chrominance block among the samples belonging to the (downsampled) corresponding luminance block. For example, sample (C) may be a sample having coordinates corresponding to the coordinates of the current sample in the current chrominance block within the (downsampled) corresponding luminance block. In the reference mode, the samples (A) and (L) described below may not be used for prediction between components of the current sample in the current chrominance block.
[0228] The top mode may be a mode that performs component-to-component prediction using sample (A). Sample (A) may be a sample adjacent to the top of the aforementioned sample (C). In the top mode, sample (C) and the sample (L) described below may not be used for component-to-component prediction of the current sample within the current color difference block.
[0229] The left mode may be a mode that performs component-to-component prediction using sample (L). Sample (L) may be a sample adjacent to the left of sample (C). In the left mode, the aforementioned sample (C) and sample (A) may not be used for component-to-component prediction of the current sample within the current color difference block.
[0230] The aforementioned prediction between components by mode can be performed based on the following mathematical formula.
[0231]
[0232]
[0233]
[0234] Equation 17 relates to the prediction between components based on the reference mode. According to Equation 17, the predicted sample (C) of the current color difference block is based on a filter that takes sample (C) as input. pred It can generate ). Equation 18 relates to prediction between components according to the upper mode. According to Equation 18, based on a filter with sample (A) as input, a prediction sample (C) of the current color difference block pred It can generate ). Equation 19 relates to prediction between components according to the left mode. According to Equation 19, based on a filter with the sample (L) as input, the predicted sample (C) of the current color difference block pred Can generate ).
[0235] In predicting a sample located at the upper boundary and / or left boundary of the current color difference block, if the aforementioned sample (A) or sample (L) does not exist within the (downsampled) corresponding luminance block, the value of sample (A) or sample (L) may be padded and used with the value of a sample within the (downsampled) corresponding luminance block. In this case, the sample within the (downsampled) corresponding luminance block used for padding may be a sample located at the boundary of the (downsampled) corresponding luminance block.
[0236] An encoding device according to the present disclosure can perform inter-component prediction for a current color difference block based on any one of a plurality of inter-component prediction modes. A method for signaling the inter-component prediction mode of a current color difference block and a method for performing inter-component prediction for a current color difference block are as described with reference to FIG. 3.
[0237] 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.
[0238] In addition, 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.
[0239] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating system, application, firmware, program, etc.) that enable an operation according to a method of various embodiments to be executed on a device or computer, and a non-transitory computer-readable medium on which such software or instructions, etc. are stored and executable on a device or computer.
Claims
1. A step of obtaining a flag from a bitstream indicating whether inter-component prediction is performed for the current color difference block; A step of determining an inter-component prediction mode of the current color difference block based on the flag indicating that the inter-component prediction is performed for the current color difference block; and The method includes the step of performing a component-to-component prediction for the current color difference block based on a component-to-component prediction mode of the current color difference block, wherein A video decoding method in which the above flag is signaled based on at least one of whether the current color difference block is a block coded in lossless mode, whether the current color difference block is a block coded in DPCM (Differential Pulse Code Modulation) mode, or the size of the current color difference block.
2. In Paragraph 1, A video decoding method in which, if the current color difference block is a block coded in the lossless mode, the flag is signaled based on whether the current color difference block is a block coded in the DPCM mode.
3. In Paragraph 1, A video decoding method in which, if the current color difference block is a block coded in the lossless mode, the flag is signaled based on the size of the current color difference block.
4. In Paragraph 1, A video decoding method in which, if the current color difference block is a block not coded in the lossless mode, the flag is signaled based on the size of the current color difference block.
5. In Paragraph 1, The component-to-component prediction mode of the above-mentioned current color difference block is determined based on first index information that specifies one of a plurality of component-to-component prediction modes, and A video decoding method comprising at least one of the plurality of inter-component prediction modes, wherein the above-mentioned multiple inter-component prediction modes include a first mode that performs inter-component prediction based on explicitly signaled parameters, a second mode that performs inter-component prediction based on implicitly derived parameters, or a third mode that performs inter-component prediction based on an N-tap filter.
6. In Paragraph 5, A video decoding method based on the fact that the component-to-component prediction mode of the current color difference block is the third mode, wherein the component-to-component prediction for the current color difference block is performed based on second index information for specifying the position of the luminance sample used for the component-to-component prediction.
7. In Paragraph 6, The above second index information specifies one of a plurality of modes, and A video decoding method comprising the above plurality of modes, wherein the above modes include a base mode that performs component-to-component prediction using a first luminance sample, an above mode that performs component-to-component prediction using an upper luminance sample of the first luminance sample, and a left mode that performs component-to-component prediction using a left luminance sample of the first luminance sample.
8. In Paragraph 7, An image decoding method in which the first luminance sample is a sample having coordinates corresponding to the coordinates of the current sample within the current color difference block.
9. In Paragraph 1, An image decoding method in which parameters for prediction between the above components are derived based on pre-restored samples within an upper region adjacent to the corresponding luminance block of the current color difference block.
10. In Paragraph 9, An image decoding method in which the range of the upper region is determined based on whether the corresponding luminance block is located at the upper boundary of the super block.
11. In Paragraph 10, An image decoding method in which, based on the fact that the corresponding luminance block is located at the upper boundary of the super block, the range of the upper region is limited to one sample line adjacent to the upper boundary of the corresponding luminance block.
12. A step of encoding a flag indicating whether inter-component prediction is performed for the current color difference block; and The method includes the step of generating a bitstream including the above flag, A video encoding method wherein the above flag is encoded based on at least one of whether the current color difference block is a block coded in lossless mode, whether the current color difference block is a block coded in DPCM (Differential Pulse Code Modulation) mode, or the size of the current color difference block.
13. A non-transient computer-readable storage medium for storing a bitstream generated by the image encoding method of claim 12.
14. A transmission method for transmitting a bitstream generated by the image encoding method of claim 12.
