Image encoding / decoding method and apparatus for transmitting compressed video data
By integrating residual coefficients and selecting appropriate restoration modes, the method addresses the challenge of high data volumes in high-resolution images, reducing transmission and storage costs while minimizing errors in chrominance components.
Patent Information
- Application Number
- PCT/KR2025/099060
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-01-15
- Filing Date
- 2025-01-17
- Publication Date
- 2025-07-24
AI Technical Summary
The increasing demand for high-resolution and high-quality images leads to higher data volumes, resulting in increased transmission and storage costs, and existing image compression technologies struggle to efficiently handle stereoscopic image content.
A method and device for integrating residual coefficients of multiple chroma components and selecting one of a plurality of residual restoration modes during encoding/decoding, allowing for chrominance integrated coding and decoding only for a part of a current block.
This approach reduces the amount of data to be encoded/decoded and minimizes restoration errors for chrominance components by integrating residual coefficients and encoding/decoding only for a part of a current block.
Smart Images

Figure KR2025099060_24072025_PF_FP_ABST
Abstract
Description
Video encoding / decoding method and device for transmitting compressed video data
[0001] The present disclosure relates to a video signal processing method and device.
[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, is increasing across various application fields. As image data becomes higher in resolution and quality, the relative amount of data increases compared to conventional image data. Therefore, transmitting image data using existing media such as wired and wireless broadband lines or storing it using existing storage media leads to increased transmission and storage costs. To address these issues arising from the increasing resolution and quality of image data, high-efficiency image compression technologies can be utilized.
[0003] There are various technologies for image compression, such as inter-picture prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture, intra-picture prediction technology that predicts pixel values included in the current picture using pixel information in the current picture, and entropy encoding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance. Using these image compression technologies, image data can be effectively compressed and transmitted or stored.
[0004] Meanwhile, as demand for high-resolution video grows, so does the demand for stereoscopic video content as a new video service. Discussions are underway on video compression technologies to effectively deliver high-resolution and ultra-high-resolution stereoscopic video content.
[0005] The present disclosure aims to provide a method for encoding / decoding by integrating residual coefficients of multiple color difference components and a device therefor.
[0006] The present disclosure aims to provide a method and a device for selecting one of a plurality of residual restoration modes when encoding / decoding by integrating residual coefficients.
[0007] The present disclosure aims to provide a method and a device for encoding / decoding by integrating residual coefficients only for a portion of a current block.
[0008] The technical problems to be achieved in the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned can be clearly understood by a person having ordinary skill in the technical field to which the present disclosure belongs from the description below.
[0009] A video decoding method according to the present disclosure may include the steps of: determining whether a chrominance integrated coding mode is applied to a current block; deriving integrated residual coefficients of the current block when the chrominance integrated coding mode is applied to the current block; and deriving residual coefficients of each of a first chrominance component and a second chrominance component from the integrated residual coefficients based on a chrominance restoration mode of the current block. In this case, the chrominance restoration mode is determined based on an index indicating one of a plurality of chrominance restoration modes, and the index may be decoded from a bitstream.
[0010] In the image decoding method according to the present disclosure, when it is determined that the chrominance integrated coding mode is applied to the current block, decoding of the CBF (Coded Block Flag) of each of the first chrominance component and the second chrominance component may be omitted.
[0011] In the image decoding method according to the present disclosure, the residual coefficients of one of the first chrominance component and the second chrominance component can be derived by shifting the integrated residual coefficients.
[0012] In the image decoding method according to the present disclosure, the shifting size may be determined differently depending on the chrominance restoration mode of the current block.
[0013] In the video decoding method according to the present disclosure, the shifting is performed based on shifting information decoded from the bitstream, and the shifting information may include at least one of information on a shifting direction and information on a shifting size.
[0014] In the image decoding method according to the present disclosure, the number or types of color difference restoration modes applicable to the current block may differ depending on the encoding mode of the current block.
[0015] In the image decoding method according to the present disclosure, whether it is permissible to apply the chrominance integrated encoding mode to the current block can be determined based on the encoding mode of the current block.
[0016] In the image decoding method according to the present disclosure, the current block is divided into a first region and a second region, and the color difference integrated encoding mode can be applied only to the first region.
[0017] In the image decoding method according to the present disclosure, in the second area, information on residual coefficients of each of the first chrominance component and the second chrominance component can be explicitly signaled.
[0018] In the image decoding method according to the present disclosure, the position and size of each of the first region and the second region can be adaptively determined according to the shape of the current block.
[0019] In the image decoding method according to the present disclosure, it can be determined whether the chrominance integrated coding mode is applied only to the first area within the current block based on information decoded from the bitstream.
[0020] In the image decoding method according to the present disclosure, the chrominance integrated encoding mode may be applied only to the first area within the current block, only when the chrominance restoration mode of the current block is one of the predefined chrominance restoration modes among the plurality of chrominance restoration modes.
[0021] In the image decoding method according to the present disclosure, the current block is divided into a first region and a second region, and a color difference restoration mode may be different between the first region and the second region.
[0022] A video encoding method according to the present disclosure may include the steps of: determining whether a chrominance integrated encoding mode is applied to a current block; deriving integrated residual coefficients according to a chrominance restoration mode of the current block when the chrominance integrated encoding mode is applied to the current block; and encoding the integrated residual coefficients. In this case, the chrominance restoration mode is one of a plurality of chrominance restoration modes, and an index indicating the chrominance restoration mode among the plurality of chrominance restoration modes may be encoded in a bitstream.
[0023] A device for transmitting compressed video data according to the present disclosure may include a processor for generating compressed video data; and a transmitter for transmitting the compressed video data. In this case, the compressed video may be generated through the steps of: determining whether a chrominance integrated coding mode is applied to a current block; deriving integrated residual coefficients according to a chrominance restoration mode of the current block when the chrominance integrated coding mode is applied to the current block; and encoding the integrated residual coefficients. In this case, the chrominance restoration mode is one of a plurality of chrominance restoration modes, and an index indicating the chrominance restoration mode among the plurality of chrominance restoration modes may be encoded in a bitstream.
[0024] According to the present disclosure, a computer-readable recording medium having recorded thereon a command for storing / transmitting a bitstream generated by an image encoding method can be provided.
[0025] According to the present disclosure, a computer-readable recording medium having recorded thereon a command for performing an image decoding method or an image encoding method can be provided.
[0026] The features briefly summarized above regarding the present disclosure are merely exemplary aspects of the detailed description of the present disclosure that follows and do not limit the scope of the present disclosure.
[0027] According to the present disclosure, there is an effect of reducing the amount of data to be encoded / decoded by integrating residual coefficients of multiple color difference components.
[0028] According to the present disclosure, by defining a plurality of residual restoration modes and then deriving residual coefficients of chrominance components differently according to the residual restoration mode, there is an effect of minimizing restoration errors for chrominance components.
[0029] According to the present disclosure, there is an effect of minimizing restoration errors for chrominance components by integrating residual coefficients and encoding / decoding only for a portion of the current block.
[0030] The effects that can be obtained from the present disclosure are not limited to the effects mentioned above, and other effects that are not mentioned will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the description below.
[0031] FIG. 1 is a block diagram illustrating an image encoding device according to an embodiment of the present disclosure.
[0032] FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present disclosure.
[0033] Figure 3 is a flowchart of a method for encoding a residual block in an encoder.
[0034] Figure 4 is a flowchart of a method for restoring a residual block in a decoder.
[0035] Figures 5 and 6 are drawings showing examples in which the second transformation is applied.
[0036] Figures 7 and 8 illustrate a second transformation based on a second transformation kernel of an asymmetric shape.
[0037] Figure 9 illustrates an example in which whether to encode information indicating whether to apply the second transformation is determined based on the position of the last non-zero coefficient.
[0038] Figure 10 illustrates restricted area candidates for a 4x4 sized block.
[0039] Figure 11 shows an example in which the chrominance integration coding mode is applied only to some areas within the current block.
[0040] FIG. 12 and FIG. 13 are flowcharts of a method for encoding / decoding residual coefficients of color difference components according to the present disclosure.
[0041] The present disclosure may be modified in various ways and encompasses numerous embodiments. Specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present disclosure to specific embodiments, but rather to encompass all modifications, equivalents, and alternatives falling within the spirit and technical scope of the present disclosure. Throughout the description of each drawing, similar reference numerals have been used to designate similar components.
[0042] While terms such as "first" and "second" may be used to describe various components, these components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present disclosure, a first component could be referred to as a "second component," and similarly, a second component could also be referred to as a "first component." The term "and / or" includes a combination of multiple related items described herein or any of multiple related items described herein.
[0043] When a component is referred to as being "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that there may be other components intervening. Conversely, when a component is referred to as being "directly connected" or "connected" to another component, it should be understood that there are no other components intervening.
[0044] The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present disclosure. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms "comprise" or "have" indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not preclude the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0045] Hereinafter, preferred embodiments of the present disclosure will be described in more detail with reference to the attached drawings. Hereinafter, identical components in the drawings will be designated by the same reference numerals, and redundant descriptions of identical components will be omitted.
[0046] FIG. 1 is a block diagram illustrating an image encoding device according to an embodiment of the present disclosure.
[0047] Referring to FIG. 1, a video encoding device (100) may include a picture segmentation unit (110), a prediction unit (120, 125), a transformation unit (130), a quantization unit (135), a reordering unit (160), an entropy encoding unit (165), an inverse quantization unit (140), an inverse transformation unit (145), a filter unit (150), and a memory (155).
[0048] Each component shown in Fig. 1 is independently depicted to represent different characteristic functions in the video encoding device, and does not mean that each component is composed of separate hardware or a single software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or one component may be divided into multiple components to perform a function, and such integrated and separate embodiments of each component are also included in the scope of the present disclosure as long as they do not deviate from the essence of the present disclosure.
[0049] Additionally, some components may not be essential components that perform the essential functions of the present disclosure, but may be optional components merely used to enhance performance. The present disclosure may be implemented by including only components essential to implementing the essence of the present disclosure, excluding components used solely for performance enhancement. A structure that includes only essential components, excluding optional components used solely for performance enhancement, is also within the scope of the present disclosure.
[0050] The picture splitting unit (110) can split the input picture into at least one processing unit. At this time, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The picture splitting unit (110) can split one picture into a combination of multiple coding units, prediction units, and transform units, and select one combination of coding units, prediction units, and transform units based on a predetermined criterion (e.g., a cost function) to encode the picture.
[0051] For example, a picture can be split into multiple coding units. A recursive tree structure such as a quad tree, a ternary tree, or a binary tree can be used to split a coding unit in a picture. A coding unit that is split into other coding units starting from an image or the largest coding unit as the root can be split into as many child nodes as the number of split coding units. A coding unit that cannot be split any further according to a certain restriction becomes a leaf node. For example, assuming that a quad tree split is applied to a coding unit, a coding unit can be split into at most four different coding units.
[0052] Hereinafter, in the embodiments of the present disclosure, the encoding unit may be used to mean a unit that performs encoding or may be used to mean a unit that performs decoding.
[0053] A prediction unit may be divided into at least one square or rectangular shape of the same size within a single coding unit, or may be divided such that one prediction unit among the divided prediction units within a single coding unit has a different shape and / or size from another prediction unit.
[0054] When predicting within a screen, the transformation unit and the prediction unit can be set to be the same. In this case, the encoding unit can be divided into multiple transformation units, and then intra-screen prediction can be performed for each transformation unit. The encoding unit can be divided in the horizontal direction or the vertical direction. The number of transformation units generated by dividing the encoding unit can be 2 or 4, depending on the size of the encoding unit. Alternatively, when the size of the transformation unit is small, multiple transformation units can be set as a single prediction unit.
[0055] The prediction unit (120, 125) may include an inter-prediction unit (120) that performs inter-prediction and an intra-prediction unit (125) that performs intra-prediction. It may be determined whether to use inter-prediction or intra-prediction for an encoding unit, and specific information (e.g., reference sample line, intra-prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. At this time, the processing unit where prediction is performed and the processing unit where the prediction method and specific contents are determined may be different. For example, the prediction method and prediction mode, etc. are determined in the encoding unit, and the prediction may be performed in the prediction unit or the transformation unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transformation 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 decoding device. When using a specific encoding mode, it is also possible to encode the original block as is and transmit it to the decoding unit without generating a prediction block through the prediction unit (120, 125).
[0056] The inter-screen prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous or subsequent pictures of the current picture, and in some cases, may predict a prediction unit based on information of a portion of an encoded region within the current picture. The inter-screen prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
[0057] The reference picture interpolation unit can receive reference picture information from the memory (155) and generate pixel information less than an integer pixel 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 less than an integer pixel in units of 1 / 4 pixels. In the case of a chrominance signal, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information less than an integer pixel in units of 1 / 8 pixels.
[0058] The motion prediction unit can perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit. Various methods can be used to derive a motion vector, such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm). The motion vector can have a motion vector value of 1 / 2 or 1 / 4 pixel unit based on the interpolated pixel. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various methods can be used as motion prediction methods, such as the Skip method, the Merge method, the AMVP (Advanced Motion Vector Prediction) method, and the Intra Block Copy method.
[0059] The on-screen prediction unit (125) can generate a prediction block based on reference pixel information, which is pixel information within the current picture. The reference pixel information can be derived from one selected from among a plurality of reference pixel lines. The Nth reference pixel line among the plurality of reference pixel lines can include left pixels having an x-axis difference of N from the upper left pixel within the current block and upper pixels having a y-axis difference of N from the upper left pixel. The number of reference pixel lines that the current block can select can be 1, 2, 3, or 4.
[0060] If the neighboring blocks of the current prediction unit are blocks that have performed inter-screen prediction and the reference pixel is a pixel that has performed inter-screen prediction, the reference pixel included in the block that has performed inter-screen prediction can be replaced with the reference pixel information of the neighboring block that has performed intra-screen prediction. That is, if the reference pixel is unavailable, the unavailable reference pixel information can be replaced with information from at least one of the available reference pixels.
[0061] In intra-screen prediction, the prediction mode can have a directional prediction mode that uses reference pixel information according to the prediction direction, and a non-directional mode that does not use directional information when performing prediction. The mode for predicting luminance information and the mode for predicting chrominance information can be different, and the intra-screen prediction mode information used to predict luminance information or the predicted luminance signal information can be utilized to predict chrominance information.
[0062] When performing intra-screen prediction, if the size of the prediction unit and the size of the transformation unit are the same, intra-screen prediction for the prediction unit can be performed based on the pixels on the left side of the prediction unit, the pixels on the upper left side, and the pixels on the upper side.
[0063] The on-screen prediction method can generate prediction blocks by applying a smoothing filter to reference pixels according to the prediction mode. Depending on the selected reference pixel line, whether or not the smoothing filter is applied can be determined.
[0064] In order to perform an intra-screen prediction method, the intra-screen prediction mode of the current prediction unit can be predicted from the intra-screen prediction modes of prediction units existing around the current prediction unit. When the prediction mode of the current prediction unit is predicted using mode information predicted from the surrounding prediction units, if the intra-screen prediction modes of the current prediction unit and the surrounding prediction units are the same, information indicating that the prediction modes of the current prediction unit and the surrounding prediction units are the same can be transmitted using predetermined flag information, and if the prediction modes of the current prediction unit and the surrounding prediction units are different, entropy encoding can be performed to encode the prediction mode information of the current block.
[0065] Additionally, a residual block containing 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, can be generated. The generated residual block can be input to the transformation unit (130).
[0066] In the transformation unit (130), the residual block including the 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 at least one of the size of the transformation unit, the shape of the transformation unit, the prediction mode of the prediction unit, or the prediction mode information within the screen of the prediction unit. Meanwhile, the transformation can be performed by separating the horizontal direction and the vertical direction.
[0067] After performing transformations in the horizontal and vertical directions, a secondary transformation can be performed. The secondary transformation may be in a form in which the horizontal and vertical directions are not separated. The secondary transformation can be performed on the transformation coefficients obtained by the primary transformation to generate final transformation coefficients. Meanwhile, the number of final transformation coefficients output by the secondary transformation may be smaller than the number of transformation coefficients input for the secondary transformation. Specifically, the secondary transformation can be performed using a reduced transformation matrix having different numbers of columns and rows.
[0068] The quantization unit (135) can quantize values converted to the frequency domain by the transformation unit (130). The quantization coefficients may vary depending on the block or the importance of the image. The values produced by the quantization unit (135) can be provided to the dequantization unit (140) and the reordering unit (160).
[0069] The rearrangement unit (160) can perform rearrangement of coefficient values for quantized residual values.
[0070] The reordering unit (160) can change a two-dimensional block-shaped coefficient into a one-dimensional vector form through a coefficient scanning method. For example, the reordering unit (160) can change the two-dimensional block-shaped coefficient into a one-dimensional vector form by scanning from the DC coefficient to the coefficient of the high-frequency region using a zig-zag scan method. Depending on the size of the conversion unit and the intra-screen prediction mode, a vertical scan that scans the two-dimensional block-shaped coefficient in the column direction, a horizontal scan that scans the two-dimensional block-shaped coefficient in the row direction, or a diagonal scan that scans the two-dimensional block-shaped coefficient in the diagonal direction may be used instead of the zig-zag scan. That is, depending on the size of the conversion unit and the intra-screen prediction mode, it is possible to determine which scan method among the zig-zag scan, the vertical scan, the horizontal scan, or the diagonal scan is to be used.
[0071] The entropy encoding unit (165) can perform entropy encoding based on the values produced by the rearrangement unit (160). Entropy encoding can use various encoding methods such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
[0072] The entropy encoding unit (165) can encode various information such as residual value coefficient information of the encoding unit, 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 from the rearrangement unit (160) and the prediction unit (120, 125).
[0073] The entropy encoding unit (165) can entropy encode the coefficient values of the encoding unit input from the rearrangement unit (160).
[0074] The inverse quantization unit (140) and the inverse transformation unit (145) inversely quantize the values quantized in the quantization unit (135) and inversely transform the values transformed in the transformation unit (130). The residual values generated in the inverse quantization unit (140) and the inverse transformation unit (145) can be combined with the predicted prediction units predicted through the motion estimation unit, motion compensation unit, and intra-screen prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.
[0075] The filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter).
[0076] A deblocking filter can remove block distortion caused by boundaries between blocks in a reconstructed picture. To determine whether to perform deblocking, a deblocking filter can be applied to the current block based on the pixels contained in several columns or rows within the block. When applying a deblocking filter to a block, a strong filter or a weak filter can be applied depending on the required deblocking filtering strength. Furthermore, when applying a deblocking filter, horizontal and vertical filtering can be processed in parallel when performing vertical and horizontal filtering.
[0077] The offset correction unit can correct the offset from the original image on a pixel-by-pixel basis for an image that has undergone deblocking. To perform offset correction for a specific picture, the pixels contained in the image can be divided into a certain number of regions, the regions to be offset can be determined, and the offset can be applied to those regions. Alternatively, the offset can be applied by considering the edge information of each pixel.
[0078] Adaptive Loop Filtering (ALF) can be performed based on the comparison of the filtered restored image with the original image. After dividing the pixels included in the image into predetermined groups, a filter to be applied to each group can be determined, and filtering can be performed differentially for each group. Information regarding whether to apply ALF can be transmitted by luminance signal for each coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied can vary depending on each block. Furthermore, an ALF filter of the same form (fixed form) can be applied regardless of the characteristics of the target block.
[0079] The memory (155) can store a restoration block or picture produced through the filter unit (150), and the stored restoration block or picture can be provided to the prediction unit (120, 125) when performing inter-screen prediction.
[0080] FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present disclosure.
[0081] Referring to FIG. 2, the image decoding device (200) may include an entropy decoding unit (210), a rearrangement 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).
[0082] When a video bitstream is input to a video encoding device, the input bitstream can be decoded in the opposite procedure to that of the video encoding device.
[0083] The entropy decoding unit (210) can perform entropy decoding in a procedure opposite to that of the entropy encoding unit of the video encoding device. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) can be applied in response to the method performed in the video encoding device.
[0084] The entropy decoding unit (210) can decode information related to intra-screen prediction and inter-screen prediction performed in the encoding device.
[0085] The reordering unit (215) can perform reordering based on the method in which the bitstream entropy-decoded by the entropy decoding unit (210) is reordered by the encoding unit. The coefficients expressed in the form of a one-dimensional vector can be reordered by restoring them back to coefficients in the form of a two-dimensional block. The reordering unit (215) can perform reordering by receiving information related to the coefficient scanning performed by the encoding unit and performing reverse scanning based on the scanning order performed by the corresponding encoding unit.
[0086] The dequantization unit (220) can perform dequantization based on the quantization parameters provided from the encoding device and the coefficient values of the rearranged block.
[0087] The inverse transform unit (225) can perform an inverse transform of the transform performed by the transform unit on the quantization result performed by the image encoding device. That is, at least one of an inverse transform of a secondary transform (secondary inverse transform) or an inverse transform for DCT, DST, and KLT (i.e., first inverse transform) can be performed. The inverse transform can be performed based on a transmission unit determined by the image encoding device. The inverse transform unit (225) of the image decoding device can determine a transform matrix for the second inverse transform or a transform technique (e.g., DCT, DST, KLT) for the first inverse transform according to a plurality of pieces of information such as a prediction method, the size and shape of the current block, the prediction mode, and the prediction direction within the screen. Alternatively, information for determining the transform matrix or the transform technique may be explicitly encoded and signaled.
[0088] The prediction unit (230, 235) can generate a prediction block based on prediction block generation related information provided from the entropy decoding unit (210) and previously decoded block or picture information provided from the memory (245).
[0089] As described above, when performing intra-screen prediction in the same manner as the operation in the video encoding device, if the size of the prediction unit and the size of the transformation unit are the same, intra-screen prediction for the prediction unit is performed based on the pixels on the left side of the prediction unit, the pixels on the upper left side, and the pixels on the upper side. However, when performing intra-screen prediction, if the size of the prediction unit and the size of the transformation unit are different, intra-screen prediction can be performed using reference pixels based on the transformation unit. In addition, intra-screen prediction using NxN division only for the minimum coding unit can be used.
[0090] The prediction unit (230, 235) may include a prediction unit determination unit, an inter-screen prediction unit, and an intra-screen prediction unit. The prediction unit determination unit may receive various information such as prediction unit information input from the entropy decoding unit (210), prediction mode information of an intra-screen prediction method, and motion prediction-related information of an inter-screen prediction method, and may distinguish a prediction unit from a current encoding unit and determine whether the prediction unit performs inter-screen prediction or intra-screen prediction. The inter-screen prediction unit (230) may perform inter-screen prediction on the current prediction unit based on information included in at least one of a previous picture or a subsequent picture of the current picture including the current prediction unit, using information necessary for inter-screen prediction of the current prediction unit provided from the video encoding device. Alternatively, inter-screen prediction may be performed based on information on a pre-restored portion of the current picture including the current prediction unit.
[0091] In order to perform inter-screen prediction, it is possible to determine whether the motion prediction method of the prediction unit included in the encoding unit is Skip Mode, Merge Mode, AMVP Mode, or Intra-screen Block Copy Mode based on the encoding unit.
[0092] The intra-screen 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-screen prediction, intra-screen prediction can be performed based on intra-screen prediction mode information of the prediction unit provided by the video encoding device. The intra-screen prediction unit (235) can include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixels of the current block, and can determine and apply whether to apply the filter according to the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixels of the current block using the prediction mode and AIS filter information of the prediction unit provided by the video encoding device. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0093] The reference pixel interpolation unit can generate a reference pixel of a pixel unit less than an integer value by interpolating the reference pixel when the prediction mode of the prediction unit is a prediction unit that performs intra-screen 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 the DC mode.
[0094] 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.
[0095] Information regarding whether a deblocking filter has been applied to a corresponding block or picture may be received from a video encoding device, and if a deblocking filter has been applied, information regarding whether a strong or weak filter has been applied. The deblocking filter of the video decoding device may receive information related to the deblocking filter provided by the video encoding device, and the video decoding device may perform deblocking filtering on the corresponding block.
[0096] The offset correction unit can perform offset correction on the restored image based on the type of offset correction applied to the image during encoding and offset value information.
[0097] ALF can be applied to an encoding unit based on information such as whether ALF is applied and ALF coefficient information provided from an encoding device. This ALF information can be provided by being included in a specific parameter set.
[0098] The memory (245) can store a restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to an output unit.
[0099] As described above, in the following embodiments of the present disclosure, for convenience of explanation, the term coding unit is used as an encoding unit, but it may also be a unit that performs not only encoding but also decoding.
[0100] In addition, the current block represents a block to be encoded / decoded, and may represent a coding tree block (or coding tree unit), an encoding block (or encoding unit), a transform block (or transform unit), a prediction block (or prediction unit), or a block to which an in-loop filter is applied, depending on the encoding / decoding step. In this specification, a 'unit' represents a basic unit for performing a specific encoding / decoding process, and a 'block' may represent a pixel array of a predetermined size. Unless otherwise distinguished, 'block' and 'unit' may be used with the same meaning. For example, in the embodiment described below, an encoding block (coding block) and an encoding unit (coding unit) may be understood to have the same meaning.
[0101] Additionally, the encoding parameters for the current block may be commonly applied to multiple color components for the current block. For example, if the encoding mode of the current block is determined, prediction for the Y component block, the Cb component block, and the Cr component block may be performed based on the encoding mode.
[0102] Alternatively, depending on the color component to be encoded / decoded, the current block may mean a Y component block, a Cb component block, or a Cr component block.
[0103] Furthermore, we will refer to the picture that contains the current block as the current picture.
[0104] In an encoder, the current picture can be divided into multiple reference blocks. Here, the reference blocks can be called Coding Tree Units (CTUs) or Coding Tree Blocks (CTBs).
[0105] The size of the reference block may be predefined in the encoder and decoder. Alternatively, information related to the size of the reference block may be encoded and signaled to the decoder. The information may be encoded / decoded via an upper header. For example, the information may be encoded / decoded via a sequence parameter set or a picture header.
[0106] The reference block may be further divided into multiple blocks (i.e., multiple coding blocks) based on a tree structure partitioning. Here, the tree structure partitioning may include at least one of a quad tree partitioning, a binary tree partitioning, or a ternary tree partitioning.
[0107] A prediction block for the current block can be obtained by performing a prediction block on the current block generated by dividing the reference block. Specifically, a prediction block for the current block can be obtained through inter-prediction or intra-prediction.
[0108] Inter-prediction may be used to remove redundant data between pictures, and intra-prediction may be used to remove redundant data within a picture. For example, a prediction block of the current block may be generated from a reference picture using motion information of the current block, or an intra-prediction mode of the current block may be determined, and then a prediction block of the current block may be generated from reference samples of the current block. Here, the motion information may include at least one of a motion vector, a reference picture index, and a prediction direction.
[0109] After performing a prediction for the current block, the residual block can be obtained by differentiating the original block and the predicted block.
[0110] Figure 3 is a flowchart of a method for encoding a residual block in an encoder, and Figure 4 is a flowchart of a method for restoring a residual block in a decoder.
[0111] In the encoder, residual coefficients can be obtained by performing at least one of transformation or quantization on the residual block (S310, S320). If quantization is omitted for the residual block, the residual coefficients may refer to transform coefficients obtained by transformation. Alternatively, if quantization is performed on the residual block, the residual coefficients may refer to quantized transform coefficients obtained by quantizing the transform coefficients. Alternatively, if transformation is omitted for the residual block, the residual coefficients may be obtained by quantizing residual samples.
[0112] Additionally, in the encoder, the residual coefficients can be encoded (specifically, entropy encoded) and the encoded data can be transmitted to the decoder (S330).
[0113] The decoder decodes the encoded data to restore the residual coefficients (S410). Then, by performing inverse quantization on the residual coefficients, transform coefficients (i.e., inverse quantized residual coefficients) can be derived, and by performing inverse transformation on the transform coefficients, a residual block can be derived (S420, S430).
[0114] Information indicating whether a transformation is applied to the current block may be encoded and signaled. For example, transform_skip_flag may be encoded and signaled. When transform_skip_flag is 1, it indicates that no transformation is applied to the current block. Here, the transformation may include not only the first transformation described below, but also the second transformation. When transform_skip_flag is 0, it indicates that a transformation is applied to the current block. When transform_skip_flag is 0, the first transformation is necessarily applied to the current block, while the second transformation may be optionally applied.
[0115] The transformation for the current block may be performed based on at least one of a plurality of transformation kernel candidates. For example, the transformation kernel applicable to the current block may be a transformation kernel of the Discrete Cosine Transform (DCT) family or a transformation kernel of the Discrete Sine Transform (DST) family.
[0116] Mathematical expressions 1 to 3 represent the basis functions of the transform kernels applicable to the current block. Mathematical expression 1 represents the basis function for DCT-2, Mathematical expression 2 represents the basis function for DCT-8, and Mathematical expression 3 represents the basis function for DST-7.
[0117]
[0118]
[0119]
[0120] When multiple transform kernel candidates exist, information indicating a transform kernel applied to the current block among the multiple transform kernel candidates can be encoded and signaled. Here, the transform kernel candidate can include at least one of DCT-2, DST-7, or DCT-8. Additionally, the information can be an index indicating one of the multiple transform kernel candidates.
[0121] Meanwhile, the horizontal and vertical transformations of the current block can be separated. At this time, a common transformation kernel can be applied to both the horizontal and vertical directions. That is, when one of multiple transformation kernel candidates is selected, the selected transformation kernel can be applied to both the horizontal and vertical transformations of the current block.
[0122] Alternatively, the transform kernels for the horizontal and vertical directions can be determined independently. In this case, the encoder can encode and signal information indicating the transform kernel for the horizontal direction and information indicating the transform kernel for the vertical direction, respectively.
[0123] Alternatively, multiple transform kernel combination candidates indicating combinations of horizontal transform kernels and vertical transform kernels may be defined, and then information indicating one of the multiple transform kernel combination candidates may be encoded and signaled. Table 1 illustrates multiple transform kernel combination candidates.
[0124] Index 01234 Horizontal Conversion DCT-2DST-7DCT-8DST-7DCT-8 Vertical Conversion DCT-2DST-7DST-7DCT-8DCT-8
[0125] In the decoder, a transformation kernel for the horizontal direction and a transformation kernel for the vertical direction can be determined based on an index indicating one of a plurality of transformation kernel combination candidates.
[0126] Meanwhile, information indicating whether the transformation kernels for horizontal and vertical transformations are determined integrally may be encoded / decoded. The information may be a 1-bit flag.
[0127] For example, if the information indicates that the transform kernels for horizontal and vertical transformations are determined integrally, an index indicating one of the multiple transform kernel candidates may be encoded / decoded. The transform kernel indicated by the index may be applied to both the horizontal and vertical transformations of the current block.
[0128] On the other hand, if the above information indicates that the transformation kernels for the horizontal and vertical transformations are not determined integrally, an index indicating one of a plurality of transformation kernel combination candidates may be encoded / decoded. The combination of the horizontal and vertical transformation kernels indicated by the index may be applied to the current block.
[0129] After performing the above-described transformation, an additional transformation may be performed on the current block. For the convenience of explanation, the transformation performed by the DCT or DST-based transformation kernel will be referred to as the first transformation, and the transformation additionally applied to the result of the first transformation will be referred to as the second transformation. In addition, the transformation coefficients generated as a result of the first transformation will be referred to as the first transformation coefficients, and the transformation coefficients generated as a result of the second transformation will be referred to as the second transformation coefficients.
[0130] In the encoder, a second transform can be performed on the first transform coefficients generated as a result of performing the first transform, thereby generating second transform coefficients.
[0131] When both the first transform and the second transform are performed in the encoder, the decoder can perform a second inverse transform (i.e., an inverse transform of the second transform) on the inverse quantized residual coefficients (i.e., the second transform coefficients) to generate the first transform coefficients. Then, by performing a first inverse transform (i.e., an inverse transform for the first transform) on the first transform coefficients, the residual samples can be obtained.
[0132] The second transform may be applied to at least some of the first transform coefficients. For example, depending on the size of the second transform kernel, the second transform may be applied to 16, 48, or 64 first transform coefficients. The shape of the region containing the first transform coefficients to which the second transform is applied may be square, non-square, or polygonal.
[0133] Mathematical expression 4 shows the application aspect of the second transformation.
[0134]
[0135] When the second transformation is performed, the first transformation coefficients can be aligned in one dimension. For example, in the above mathematical expression 4, A Nx1 represents the first transformation coefficients consisting of N rows and 1 column. Also, B Rx1 represents the second transformation coefficients consisting of R rows and 1 column. T RXN represents the second transformation kernel consisting of R rows and N columns.
[0136] Figures 5 and 6 are drawings showing examples in which the second transformation is applied.
[0137] Fig. 5 illustrates an example in which the second transform kernel is 64x64 in size. The first transform coefficients generated as a result of the first transform within an 8x8 block can be arranged in one dimension. At this time, the first transform coefficients can be scanned using a predetermined scan method to generate the one-dimensional array. The predetermined scan method can include at least one of a diagonal scan, a horizontal scan, a vertical scan, or a raster scan.
[0138] When an input matrix of size 64x1 is generated through the above rearrangement, the second transformation coefficient can be derived through matrix multiplication between the second transformation kernel of size 64x64 and the input matrix of size 64x1.
[0139] As a result of performing the second transform, 64 second transform coefficients are generated, and the second transform coefficients within an 8x8 block can be rearranged. After quantizing the 8x8 block in which the second transform coefficients are rearranged, the quantized transform block can be encoded.
[0140] Fig. 6 illustrates an example in which the second transform kernel is 48x48 in size. Among the first transform coefficients generated as a result of the first transform within an 8x8 block, 48 first transform coefficients can be rearranged into one dimension. At this time, the 48 first transform coefficients may be included in a polygonal area excluding a 4x4 sized sub-block at the lower right within the 8x8 block.
[0141] When the 48 first transformation coefficients are rearranged into one dimension to generate an input matrix of size 48x1, the second transformation coefficients can be derived through matrix multiplication between the second transformation kernel of size 48x48 and the input matrix of size 48x1.
[0142] As a result of performing the second transformation, 48 second transformation coefficients are generated, and the second transformation coefficients can be rearranged within an 8x8 block. For example, the 48 second transformation coefficients can be rearranged within a polygonal region excluding a 4x4 sized sub-block at the lower right within an 8x8 block.
[0143] In areas where the second transform coefficients are not placed, the first transform coefficients can be maintained as is. After applying quantization to a block including the second transform coefficients and the first transform coefficients, the quantized transform block can be encoded.
[0144] Alternatively, the transform coefficients in the area where the second transform coefficients are not placed may be set to 0. That is, the values of the transform coefficients in the area where the second transform is not applied may be set to 0, and then quantization and encoding may be performed.
[0145] The size of the second transform kernel can be determined based on the size of the current block. For example, if at least one of the width or height of the current block is 4, the second transform can be applied to 16 first transform coefficients. Conversely, if the width and height of the current block are 8 or greater, the second transform can be applied to 48 or 64 first transform coefficients.
[0146] Alternatively, information indicating the size and type of the second transform kernel may be encoded and signaled. The information may be signaled at the block level. For example, information specifying at least one of the number of rows or the number of columns of the transform size may be encoded. Alternatively, a different index may be assigned to each combination of the number of rows and the number of columns, and then an index specifying one of the combinations may be encoded. Alternatively, a different index may be assigned to each of a plurality of second transform kernel candidates, and then an index specifying one of the second transform kernel candidates may be encoded. Here, each of the plurality of second transform kernel candidates may differ in at least one of the size or the coefficient.
[0147] Alternatively, based on the size of the current block, the size of the second transformation kernel may be determined, and then an index specifying one of a plurality of second transformation kernel candidates having the determined size may be encoded.
[0148] In the examples illustrated in Figures 5 and 6, a second transformation kernel is used, with the same number of rows and columns. To simplify the second transformation, the number of rows and the number of columns can also be set differently.
[0149] Figures 7 and 8 illustrate a second transformation based on a second transformation kernel of an asymmetric shape.
[0150] The number of rows R of the second transformation kernel can be set to a value smaller than the number of columns N. For example, the number of rows R can be set to 8, and the number of columns N can be set to 48.
[0151] As the number of rows of the second transformation kernel decreases, the number of second transformation coefficients output as a result of the second transformation also decreases. For example, when a matrix multiplication is performed between a second transformation kernel of size 8x48 and an input matrix of size 48x1, second transformation coefficients of size 8x1 are generated.
[0152] The eight second transform coefficients can be rearranged within an 8x8 block. At this time, in an area where the second transform coefficients are not allocated within the application area of the second transform (i.e., an area including the first transform coefficients to which the second transform is applied), the values of the transform coefficients can be set to 0. For example, if a polygonal area including 48 samples is the application area of the second transform, the values of the transform coefficients can be set to 0 in the remaining area excluding the area to which the eight second transform coefficients are allocated among the polygonal area.
[0153] In areas where the second transformation is not applied, the first transformation coefficients can be maintained as is.
[0154] Alternatively, encoding may be performed by converting at least some of the first transform coefficients in the area to which the second transform is not applied to 0. FIG. 8 illustrates an example in which at least some of the area to which the second transform is not applied is converted to 0.
[0155] As in the example illustrated in (a) of Fig. 8, the values of the first transform coefficients corresponding to the high-frequency region within the region where the second transform is not performed can be converted to 0. For example, the values of the first transform coefficients whose sum of the x-axis and y-axis coordinates is greater than or equal to a threshold value can be converted to 0.
[0156] Alternatively, depending on a specific form, the first transform coefficients that are converted to 0 may be selected. For example, as in the example illustrated in (b) of FIG. 8, the first transform coefficients included in the lower n rows within the area where the second transform is not performed may be converted to 0. Alternatively, as in the example illustrated in (c) of FIG. 8, the first transform coefficients included in the right n columns within the area where the second transform is not performed may be converted to 0.
[0157] Alternatively, as in the example shown in (d) of Fig. 8, all first transform coefficients within the region where the second transform is not performed may be transformed to 0.
[0158] The shape of the region containing the first transform coefficients that are transformed to 0 can be determined based on at least one of the size, shape, intra prediction mode, or transform kernel of the current block. Alternatively, an index specifying one of the plurality of candidate shapes that matches the region can be encoded and signaled.
[0159] Whether the second transform is allowed may be determined based on at least one of the encoding mode of the current block or the first transform kernel. Here, the encoding mode refers to intra prediction or inter prediction. For example, if the current block is encoded with intra prediction, the second transform may be allowed, whereas if the current block is encoded with inter prediction, the second transform may not be allowed.
[0160] Information indicating whether a second transformation has been applied may be encoded and signaled. The information may be a 1-bit flag. Depending on whether the flag is true or false, it may be determined whether the second transformation has been applied to the current block. Alternatively, the information may be index information. An index value of 0 indicates that the second transformation has not been applied to the current block. On the other hand, an index value greater than 0 indicates that the second transformation has been applied to the current block. If the index value is greater than 0, the second transformation kernel can be specified by the index.
[0161] Information indicating whether a second transformation has been performed on the current block can be individually encoded for each color component. For example, information indicating whether a second transformation has been performed can be encoded for each of the luma component (Y), the first chrominance component (Cb), and the second chrominance component (Cr).
[0162] Alternatively, information indicating whether a second transformation has been performed on the chrominance components may be integrated and encoded. For example, whether or not a second transformation has been applied to each of the chrominance components (Cb, Cr) may be jointly determined. That is, the first chrominance component (Cb) and the second chrominance component (Cr) may share information indicating whether or not a second transformation has been performed.
[0163] Alternatively, based on the tree structure, it can be determined whether the information is encoded for each color component. For example, if the luma component and the chroma component have the same tree structure, the three color components (i.e., Y, Cb, Cr) can share information indicating whether the second transformation is performed. On the other hand, if the luma component and the chroma component have different tree structures, information indicating whether the second transformation is performed can be signaled for each of the luma component and the chroma component.
[0164] A plurality of second transformation kernel candidates can be grouped into at least a plurality of groups. One of the groups can be identified based on at least one of the size, shape, or intra prediction modes of the current block. Once the group is identified, the index information can be used to identify at least one of the plurality of second transformation kernel candidates included in the identified group.
[0165] Based on the position of the last non-zero coefficient within the current block, it may be determined whether to encode information indicating whether a second transformation is applied.
[0166] Figure 9 illustrates an example in which whether to encode information indicating whether to apply the second transformation is determined based on the position of the last non-zero coefficient.
[0167] For convenience of explanation, it is assumed that when the second transformation is performed, the values of the transformation coefficients are set to 0 in the remaining areas other than the areas where the second transformation coefficients are rearranged.
[0168] As a result of performing the second transformation, a number of second transformation coefficients equal to the number R of rows of the second transformation kernel are generated. As in the example described above, the values of the remaining transformation coefficients excluding the second transformation coefficients are all set to 0, so that there are no non-zero coefficients in the remaining area excluding the area where the R second transformation coefficients are rearranged. According to the above principle, the area where the R second transformation coefficients are rearranged can be set as a restricted area.
[0169] In (a) to (c) of Fig. 9, it is exemplified that the upper left 4x4 block within the 8x8 block is set as a restricted area.
[0170] The presence of a non-zero coefficient outside the restricted area indicates that the second transformation has not been applied to the current block. Accordingly, if the last non-zero coefficient is outside the restricted area, the encoding of information indicating whether the second transformation has been applied to the current block can be omitted. For example, as in the example illustrated in (a) of FIG. 9, if the last non-zero coefficient is outside the restricted area, the encoding of information indicating whether the second transformation has been applied can be omitted.
[0171] The decryptor may also decide not to decrypt the information if the last non-zero coefficient is outside the restricted area and not to apply the second inverse transform to the current block.
[0172] As in the example illustrated in (b) of Fig. 9, when the second transform is applied to the current block, non-zero transform coefficients may exist only within the restricted region. Alternatively, as in the example illustrated in (c) of Fig. 9, even when the second transform is not applied to the current block, there may be cases where non-zero transform coefficients exist only within the restricted region. Accordingly, if the last non-zero coefficient exists within the restricted region, information indicating whether the second transform was applied can be encoded.
[0173] Based on the above information, the decoder can decide whether to apply a second inverse transform to the current block.
[0174] Alternatively, if the last non-zero coefficient exists within the restricted area, encoding of the above information may be omitted and the second transformation may be necessarily applied.
[0175] The size of the restriction region can be determined based on the size of the second transformation kernel. For example, if the second transformation kernel is a matrix of size RxN, a rectangular region whose width and height are each Log2R can be set as the restriction region.
[0176] Alternatively, the area to which the second transformation is applied can be set as a restricted area.
[0177] Alternatively, information indicating at least one of the size or shape of the restricted area may be encoded and signaled. The information may be signaled via a higher level, such as a sequence, picture header, or slice header.
[0178] Alternatively, at least one of the size or shape of the restricted area may be predefined for the encoder and decoder. For example, it may be predefined between the encoder and decoder to set the upper left 4x4 block within the current block as the restricted area.
[0179] Alternatively, at least one of the size or shape of the restriction region may be adaptively determined based on at least one of the size, shape, first transform kernel, or intra prediction mode of the current block.
[0180] Alternatively, multiple restriction area candidates can be defined and then an index specifying one of the multiple restriction area candidates can be encoded and signaled.
[0181] Figure 10 illustrates restricted area candidates for a 4x4 sized block.
[0182] If the current block is 4x4 in size, index information specifying one of the multiple restricted area candidates shown in FIG. 10 can be encoded.
[0183] At least one of the restriction region candidates illustrated in FIG. 10 may be applied not only to blocks of 4x4 size but also to blocks of a size larger than 4x4. For example, at least one of the restriction region candidates illustrated in FIG. 10 may be applied to a block of which at least one of the width or height is 4 and the other is larger than 4.
[0184] Alternatively, the size or number of restricted area candidates may be set differently depending on the size of the current block.
[0185] Instead of encoding an index that specifies one of the restriction area candidates, one of the restriction area candidates may be specified based on the size or shape of the current block.
[0186] When encoding / decoding residual coefficients of the current block, additional information may be encoded / decoded. For example, information indicating whether all residual coefficients within the current block have a value of 0 may be encoded / decoded. The above information may be referred to as a Coded Block Flag (CBF), and the CBF may be a 1-bit flag.
[0187] For example, a CBF value of 0 indicates that all residual coefficients in the current block have values of 0. In this case, information about the residual coefficients in the current block may not be encoded / decoded. On the other hand, a CBF value of 1 indicates that there is at least one residual coefficient with a non-zero value in the current block. In this case, information about the residual coefficients in the current block may be explicitly encoded / decoded. Meanwhile, the setting of the CBF value may be the opposite of the above example.
[0188] CBF can be encoded / decoded for each color component. That is, CBF can be encoded and signaled for each of the Y component, Cb component, and Cr component.
[0189] Meanwhile, it is also possible to omit CBF encoding / decoding for a specific component among the color components. Depending on the priority among the luma component and the chroma component, CBF encoding / decoding for one of the three components can be omitted.
[0190] For example, if the CBFs of both the Cb component and the Cr component are 0, encoding / decoding of the CBF for the Y component can be omitted.
[0191] Alternatively, if the CBFs of both the Cb component and the Cr component are 0, the encoding mode of the current block (or the Y component) may be additionally considered to determine whether to omit encoding / decoding of the CBF for the Y component. Here, the encoding mode may represent intra prediction, inter prediction, intra block copy, or palette mode.
[0192] For example, if the CBFs of both the Cb component and the Cr component are 0, encoding / decoding of the CBF for the Y component can be omitted only when the encoding mode of the current block is inter prediction. That is, even if the CBFs of both the Cb component and the Cr component are 0, the CBF for the Y component can be explicitly encoded / decoded when the encoding mode of the current block is not inter prediction (e.g., intra prediction).
[0193] Alternatively, encoding / decoding of CBF for the Y component may be omitted, provided that the encoding mode of the Y component is intra prediction. That is, if the CBFs of both the Cb component and the Cr component are 0, encoding / decoding of CBF for the Y component may be omitted only when the encoding mode of the Y component is intra prediction.
[0194] Meanwhile, if the encoding / decoding of CBF for the Y component is omitted, the value of CBF can be inferred as 0 or 1 according to predefined conditions. For example, if the CBF of the Cb component and the Cr component are both 0, the value of the CBF of the Y component can be inferred as 1.
[0195] Meanwhile, CBF can also be further encoded / decoded at the block level. For example, CBF can be encoded / decoded on a coding block-by-block basis or a transform block-by-block basis.
[0196] A CBF of 0 for the current block indicates that the residual coefficients for all of the Y, Cb, and Cr components have values of 0. On the other hand, a CBF of 1 for the current block may indicate that there is at least one non-zero residual coefficient for at least one of the Y, Cb, or Cr components.
[0197] If the CBF value of the current block is 1, the CBF can be additionally encoded / decoded for each color component. That is, after encoding / decoding the CBF at the block level, it can be determined whether to additionally encode / decode the CBF for each color component.
[0198] Meanwhile, the encoding / decoding order of CBFs for each color component may be in the order of chroma component and luma component. For example, CBFs may be encoded / decoded in the order of Cb component, Cr component, and Y component, or CBFs may be encoded / decoded in the order of Cr component, Cb component, or Y component. As described above, when the CBFs of the Cb component and Cr component are both 0, encoding / decoding of the CBF of the Y component may be omitted. In this case, the CBF of the Y component may be inferred to be 1, and accordingly, information on residual coefficients may be explicitly encoded / decoded for the Y component.
[0199] Unlike the above example, the CBF of the luma component can be encoded / decoded before the CBF of the chroma component. For example, the CBFs can be encoded / decoded in the order of the Y component, the Cb component, and the Cr component, or the CBFs can be encoded / decoded in the order of the Y component, the Cr component, and the Cb component.
[0200] Alternatively, the encoding / decoding order of the Y component can be set between the Cb component and the Cr component. For example, CBFs can be encoded / decoded in the order of the Cb component, the Y component, and the Cr component, or CBFs can be encoded / decoded in the order of the Cr component, the Y component, and the Cb component.
[0201] Meanwhile, as explained above, whether to encode / decode the CBF for the last component can be determined based on whether the CBFs of the preceding two components are both 0. For example, when the CBFs are encoded / decoded in the order of the Y component, the Cb component, and the Cr component, whether to encode / decode the CBF for the Cr component can be determined based on whether the CBFs of the Y component and the Cb component are both 0. If the encoding / decoding of the CBF for the last component is omitted, the decoder can infer the value of the CBF for the last component as 1.
[0202] Meanwhile, as in the embodiment described above, in determining whether to encode / decode the CBF for the last component, the encoding mode of the current block (or the last component) may be further considered.
[0203] When encoding / decoding residual coefficients of Cb and Cr components, the residual coefficients of Cb and Cr components may be integrated. Encoding / decoding Cb and Cr components by integrating residual coefficients may be referred to as a chrominance integration encoding mode, and information indicating whether the chrominance integration encoding mode is applied may be additionally encoded / decoded. For example, the information may be a 1-bit flag, and the flag may be referred to as a 'chrominance integration flag'.
[0204] A value of 0 for the chroma integration flag indicates that the residual coefficients for the Cb and Cr components are encoded / decoded individually. On the other hand, a value of 1 for the chroma integration flag indicates that the integrated residual coefficients, which are the residual coefficients for the Cb and Cr components, are encoded / decoded.
[0205] When the chrominance integrated encoding mode is applied, the decoder can decode the integrated residual coefficients and then restore the residual coefficients for each of the Cb component and Cr component according to the chrominance restoration mode.
[0206] The chrominance restoration mode can be determined by considering the CBFs of the Cb and Cr components. Table 2 shows an example of deriving the residual coefficients of the Cb and Cr components from the integrated residual coefficients for each chrominance restoration mode.
[0207] Cb component CBFCr component CBF color difference restoration mode index restoration method 110Cb[i] = CombinedC[i]Cr[i] = CombinedC[i] x S 101Cb[i] = CombinedC[i]Cr[i] = (CombinedC[i] x S) >> 1012Cb[i] = (CombinedC[i] x S) >> 1Cr[i] = CombinedC[i]
[0208] In Table 2, CombinedC[i] represents the combined residual coefficient of the ith (or index i) component. Cb[i] and Cr[i] represent the residual coefficients of the ith (or index i) component of Cb and Cr, respectively. S represents a sign. That is, S can be +1 or -1.
[0209] Meanwhile, information representing a sign can be explicitly encoded / decoded and signaled. For example, the sign information can be 1 bit and can be encoded / decoded on a block-by-block basis. Alternatively, the sign information can be encoded / decoded via an upper header. For example, the sign information can be signaled via a slice header, a picture header, or a sequence parameter set.
[0210] Meanwhile, when the sign information is encoded / decoded through the upper header, the sign information can be applied to multiple blocks referencing the upper header. For example, when the sign information is encoded / decoded through the slice header, the signs of all blocks within the slice will be set to the same value.
[0211] As in the example in Table 2, the chrominance restoration mode is determined based on the CBF of the Cb component and the CBF of the Cr component. That is, when the chrominance integration coding mode is applied (i.e., when the chrominance integration flag is 1), the CBFs of the Cb component and the Cr component can be used to select one of multiple chrominance restoration modes, unlike the original definition.
[0212] Meanwhile, the integrated residual coefficients can be encoded / decoded through either the Cb component channel or the Cr component channel. For example, if the CBF for the Cb component is 1 and the CBF for the Cr component is 0, the integrated residual coefficients can be encoded / decoded through the Cb channel. On the other hand, if the CBF for the Cb component is 0 and the CBF for the Cr component is 1, the integrated residual coefficients can be encoded / decoded through the Cr channel.
[0213] If the CBFs of both the Cb component and the Cr component are 1, the integrated residual coefficients can be encoded / decoded through the Cb channel.
[0214] Meanwhile, as in the examples shown in Table 2, depending on the chrominance restoration mode, the absolute values of the residual coefficients for the Cb and Cr components may be equal to or half of the integrated residual coefficients. In addition, depending on the explicitly encoded / decoded sign values, the signs of the residual coefficients for the Cb and Cr components may be the same or different from each other.
[0215] For example, when the first chrominance restoration mode with an index of 0 is applied, the absolute values of the residual coefficients of each of the Cb and Cr components are set to be the same as the integrated residual coefficients. At this time, the sign of the residual coefficient of the Cb component is set to be the same as the integrated residual coefficients. On the other hand, the sign of the residual coefficient of the Cr component may be the same as or different from the integrated residual coefficients, depending on the variable S.
[0216] When the second chrominance restoration mode with an index of 1 is applied, the absolute value of the residual coefficient of the Cb component is set to be the same as the integrated residual coefficient. The sign of the residual coefficient of the Cb component is set to be the same as the integrated residual coefficient. On the other hand, the absolute value of the residual coefficient of the Cr component is set to half of the integrated residual coefficient. The sign of the residual coefficient of the Cr component may be the same as or different from the integrated residual coefficient, depending on the variable S.
[0217] When the third chrominance restoration mode with an index of 2 is applied, the absolute value of the residual coefficient of the Cb component is set to half of the integrated residual coefficient. The sign of the residual coefficient of the Cb component may be the same as or different from the integrated residual coefficient, depending on the variable S. On the other hand, the absolute value of the residual coefficient of the Cr component is set to the same as the integrated residual coefficient. The sign of the residual coefficient of the Cr component is set to the same as the integrated residual coefficient.
[0218] When the color difference integrated encoding mode is applied, the transformation parameters and quantization parameters of the Cb component and Cr component can be set identically.
[0219] For example, residual samples of the Cb component can be derived by performing inverse quantization and inverse transformation on residual coefficients, and residual samples of the Cr component can be derived by performing inverse quantization and inverse transformation on residual coefficients. At this time, the quantization parameters of the Cb component and the Cr component and the transformation type for inverse transformation can be identical to each other.
[0220] Instead of deriving the residual coefficients of the Cb and Cr components based on the combined residual coefficients, the residual samples of the Cb and Cr components can also be derived based on the combined residual samples. That is, in Table 2, CombinedC[i] can represent the ith (or index i) combined residual sample, Cb[i] can represent the ith (or index i) residual sample of the Cb component, and Cr[i] can represent the ith (or index i) residual sample of the Cr component.
[0221] In other words, by performing inverse quantization and inverse transformation on the integrated residual coefficients, integrated residual samples can be derived. Then, depending on the chrominance restoration mode, residual samples for the Cb component and residual samples for the Cr component can be derived from the integrated residual samples.
[0222] As shown in the example in Table 2, the chrominance restoration mode is determined based on the CBF of the Cb component and the CBF of the Cr component. At this time, after encoding / decoding the CBFs of the Cb component and the Cr component, it can be determined whether to encode / decode the chrominance integration flag. For example, if at least one of the CBFs of the Cb component and the Cr component is 1, the chrominance integration flag can be encoded / decoded.
[0223] On the other hand, if the CBFs of the Cb component and the Cr component are both 0, encoding / decoding of the chrominance integration flag may be omitted. In this case, encoding / decoding of information on residual coefficients for the Cb component and the Cr component may be omitted, and the residual coefficients for the Cb component and the Cr component may be set to 0.
[0224] Meanwhile, if encoding / decoding of the color difference integration flag is omitted, the color difference integration encoding mode may not be applied to the current block.
[0225] Whether to encode / decode the chrominance integration flag may also be determined by further considering the encoding mode of the current block. For example, the chrominance integration flag may be encoded / decoded only when at least one of the CBFs of the Cb component and the Cr component is 1 and the encoding mode of the current block is intra prediction. That is, even if at least one of the CBFs of the Cb component and the Cr component is 1, if the encoding mode of the current block is not intra prediction (e.g., inter prediction), encoding / decoding of the chrominance integration flag may be omitted.
[0226] Meanwhile, depending on the encoding mode of the current block, the number and / or types of available chrominance restoration modes may vary. For example, if intra prediction is applied to the current block, one of the first to third chrominance restoration modes may be applied to the current block. Conversely, if inter prediction is applied to the current block, only the first chrominance restoration mode may be applied to the current block.
[0227] Accordingly, if the encoding mode of the current block is intra prediction, the chrominance integration flag can be encoded / decoded if at least one of the CBF of the Cb component and the CBF of the Cr component is 1. On the other hand, if the encoding mode of the current block is inter prediction, the chrominance integration flag can be encoded / decoded if both the CBF of the Cb component and the CBF of the Cr component are 1.
[0228] As another example, after encoding / decoding the chrominance integration flag, the CBFs of the Cb component and the Cr component may be encoded / decoded. At this time, as in the example of Table 2, when the chrominance integration encoding mode is applied, the CBF of at least one of the Cb component or the Cr component is set to a value of 1. Accordingly, when the chrominance integration flag indicates that the chrominance integration encoding mode is applied, when the value of the CBF of the Cb component or the CBF of the Cr component, whichever is encoded first, is 0, encoding / decoding of the CBF of the remaining component may be omitted. Meanwhile, the value of the CBF of the component whose CBF encoding / decoding is omitted may be inferred to be 1.
[0229] In the above example, it was explained that the chrominance restoration mode is determined based on the CBFs of the Cb and Cr components. Unlike the example described, an index indicating one of multiple chrominance restoration modes can also be encoded / decoded. For example, according to the example of Table 2, the index to be encoded / decoded can be set to one of 0, 1, and 2, and each of the above values can be binarized to 0, 10, and 11.
[0230] That is, when the chrominance integration flag indicates that the chrominance integration encoding mode is applied, encoding / decoding of CBFs of the Cb and Cr components can be omitted, and an index indicating one of a plurality of chrominance restoration modes can be encoded / decoded. On the other hand, when the chrominance integration flag indicates that the chrominance integration encoding mode is not applied, CBFs for each of the Cb and Cr components can be encoded / decoded.
[0231] As another example, whether to encode / decode the chrominance integration flag may be determined by considering the CBF of the Y component. For example, the chrominance integration flag may be encoded / decoded only when the CBF of the Y component is 1. On the other hand, when the CBF of the Y component is 0, the encoding / decoding of the chrominance integration flag may be omitted. In other words, the chrominance integration encoding mode may be applied to the current block only when the CBF of the Y component is 1.
[0232] In Table 2, when the second chrominance restoration mode is applied, the residual coefficient of the Cr component is exemplified as being derived by shifting the integrated residual coefficient by 1 to the right, and when the third chrominance restoration mode is applied, the residual coefficient of the Cb component is exemplified as being derived by shifting the integrated residual coefficient by 1 to the right. That is, the shifting direction is exemplified as being right, and the shifting size (i.e., the shifting parameter) is exemplified as being 1.
[0233] As another example, at least one of the shifting direction or shifting size may be set differently from Table 2.
[0234] Alternatively, information regarding at least one of the shifting direction and shifting size may be explicitly encoded / decoded. For example, shifting information including at least one of the shifting direction and shifting size information may be encoded / decoded on a block-by-block basis. Alternatively, the shifting information may be encoded / decoded via an upper header.
[0235] It is possible to define a larger number of color difference restoration methods than those illustrated in Table 2. Table 3 shows some examples.
[0236] Color Difference Restoration Mode Index Restoration Method 0Cb[i] = CombinedC[i]Cr[i] = CombinedC[i] x S1Cb[i] = CombinedC[i]Cr[i] = (CombinedC[i] x S) >> 12Cb[i] = (CombinedC[i] x S) >> 1Cr[i] = CombinedC[i]3Cb[i] = CombinedC[i]Cr[i] = (CombinedC[i] x S) >> 24Cb[i] = (CombinedC[i] x S) >> 2Cr[i] = CombinedC[i]
[0237] Comparing Table 3 with Table 2, it is shown that in addition to the existing first to third color difference restoration modes, a fourth color difference restoration mode with an index of 3 and a fifth color difference restoration mode with an index of 4 have been added.
[0238] Additionally, the fourth chromaticity restoration mode may be a mode in which the shift size of the second chromaticity restoration mode is changed to 2, and the fifth chromaticity restoration mode may be a mode in which the shift size of the third chromaticity restoration mode is changed to 2.
[0239] Meanwhile, when the number of color difference restoration modes is greater than 4, the number of possible combinations of CBFs of Cb and Cr components becomes smaller than the number of color difference restoration modes.
[0240] Accordingly, when the chrominance integration encoding mode is applied to the current block (i.e., the chrominance integration flag is 1) and the number of chrominance restoration modes is 4 or more, encoding / decoding of the CBF of each of the Cb component and Cr component can be omitted, and an index indicating one of the multiple chrominance restoration modes can be encoded / decoded.
[0241] Alternatively, the chrominance restoration mode may be determined based on the CBFs of the Cb and Cr components, but additionally considering shifting information to be encoded / decoded, as in the example described above.
[0242] For example, if the CBF of one of the Cb component and the Cr component is 1 and the CBF of the other is 0, one of the second chrominance restoration mode to the fifth chrominance restoration mode may be set as the chrominance restoration mode of the current block. At this time, if the shifting size is set to 1, the second chrominance restoration mode or the third chrominance restoration mode may be applied to the current block, and if the shifting size is set to 2, the fourth chrominance restoration mode or the fifth chrominance restoration mode may be applied to the current block.
[0243] Alternatively, if the combination of CBFs of Cb components and Cr components is a preset combination, the index can be additionally encoded / decoded.
[0244] For example, if one of the CBFs of the Cb component and the Cr component is 1 and the other is 0, the second chromaticity restoration mode or the third chromaticity restoration mode can be selected according to the example in Table 2.
[0245] On the other hand, if the CBFs of the Cb component and the Cr component are both 1, an index indicating one of the residual chrominance restoration modes can be additionally encoded / decoded. Depending on the index, one of the first chrominance restoration mode, the fourth chrominance restoration mode, and the fifth chrominance restoration mode can be applied to the current block.
[0246] The color-integrated encoding mode can also be applied only to some areas within the current block.
[0247] Figure 11 shows an example in which the chrominance integration coding mode is applied only to some areas within the current block.
[0248] As in the example illustrated in Fig. 11, the current block can be divided into two regions, namely, a first region and a second region. Here, a chrominance integrated coding mode may be applied to one of the first region and the second region, and the chrominance integrated coding mode may not be applied to the other of the first region and the second region. For convenience of explanation, it is assumed that the first region represents a region to which the chrominance integrated coding mode is applied, and the second region represents a region to which the chrominance integrated coding mode is not applied.
[0249] Meanwhile, the first region to which the chrominance integration encoding mode is applied may be a square region or a non-square region. Furthermore, the first region may be located adjacent to one side of the current block.
[0250] For example, as shown in (a) of Fig. 11, the first region may be the upper left region of the current block.
[0251] For example, as in the example shown in (b) or (e) of FIG. 11, the first region may be an region bordering the left border of the current block.
[0252] For example, as in the example shown in (c) or (d) of FIG. 11, the first region may be an region that touches the upper boundary of the current block.
[0253] Information indicating the size and / or position of the first region to which the chrominance integrated coding mode is applied may be encoded and signaled. For example, an index indicating the segmentation shape of the current block may be encoded / decoded.
[0254] Alternatively, depending on the shape of the current block, the location and / or size of the first region to which the chrominance integration coding mode is applied may be determined.
[0255] For example, if the current block is a square block, the first area can be set to the upper left area within the current block, as in the example shown in (a) of Fig. 11.
[0256] For example, if the current block is a non-square block whose width is greater than its height, the first region may be a non-square region that touches the left boundary of the current block, as in the example illustrated in (b) of Fig. 11. On the other hand, if the current block is a non-square block whose height is greater than its width, the first region may be a non-square region that touches the top boundary of the current block, as in the example illustrated in (d) of Fig. 11.
[0257] Alternatively, if the current block is a non-square block whose width is greater than its height, the first region may be a square region bordering the top boundary of the current block, as in the example illustrated in (c) of Fig. 11. On the other hand, if the current block is a non-square block whose height is greater than its width, the first region may be a square region bordering the left boundary of the current block, as in the example illustrated in (e) of Fig. 11.
[0258] Meanwhile, the positions / sizes of the first and second regions illustrated in Fig. 11 may be interchanged. For example, the first region may be set as the remaining region excluding the upper left region of the current block (i.e., the opposite of Fig. 11 (a), the region adjacent to the right or lower border of the current block may be set as the first region).
[0259]
[0260] As another example, the segmentation type of the current block (i.e., the size and / or location of the first region and the second region) may be adaptively determined based on at least one of the size of the current block, the encoding mode, the intra-picture prediction mode, or the transformation kernel.
[0261] Meanwhile, beyond the illustrated example, the first region may be a polygonal region rather than a square region. For example, the first region may be defined as a triangular or pentagonal region.
[0262] If the current block is divided into two regions, the residual coefficients of each of the Cb and Cr components in the first region can be derived from the integrated residual coefficients. That is, for the first region, instead of encoding / decoding the residual coefficients of each of the Cb and Cr components, the integrated residual coefficients can be encoded / decoded.
[0263] On the other hand, for the second region, the residual coefficients of each of the Cb and Cr components can be explicitly encoded / decoded. That is, for the second region, instead of the integrated residual coefficients, the residual coefficients of each of the Cb and Cr components can be encoded / decoded.
[0264] As another example, if the current block is divided into two regions, encoding / decoding of residual coefficients may be performed for the first region, and encoding / decoding of residual coefficients may be omitted for the second region. That is, residual coefficients of the Cb component and Cr component may exist only in the first region, and not in the second region.
[0265] Meanwhile, for the first region, the integrated residual coefficients can be encoded / decoded. In the second region, the values of the residual coefficients can be set to 0.
[0266] Meanwhile, the chrominance integrated coding mode may be applied only to some areas within the current block, only if a predefined chrominance restoration mode is applied to the current block. For example, the chrominance integrated coding mode may be applied only to some areas within the current block, only if the first chrominance restoration mode is applied to the current block.
[0267] Alternatively, information indicating whether the chrominance integration coding mode is applied only to some areas within the current block may be encoded / decoded.
[0268] After dividing the current block into multiple regions, the chroma restoration modes may be set differently between the regions. For example, as in the example illustrated in Fig. 11, if the current block is divided into a first region and a second region, one of the multiple chroma restoration modes may be applied to the first region, and one of the remaining chroma restoration modes excluding the chroma restoration mode applied to the first region may be applied to the second region.
[0269] For example, if the first chrominance restoration mode with an index of 0 is applied to the first area within the current block, one of the remaining chrominance restoration modes (the second chrominance restoration mode with an index of 1 and the third chrominance restoration mode with an index of 2 in Table 2) excluding the first chrominance restoration mode may be applied to the second area.
[0270] FIG. 12 and FIG. 13 are flowcharts of a method for encoding / decoding residual coefficients of color difference components according to the present disclosure.
[0271] Figure 12 shows the operation in the encoder, and Figure 13 shows the operation in the decoder.
[0272] First, in the encoder, when the chrominance integration encoding mode is applied to the current block (S1210), the integrated residual coefficients for the Cb component and the Cr component can be derived and encoded according to the chrominance restoration mode (S1220).
[0273] On the other hand, if the chrominance integrated encoding mode is not applied to the current block (S1210), residual coefficients may be encoded for each of the Cb component and the Cr component (S1230). Meanwhile, encoding the residual coefficients for the Cb component or the Cr component may be omitted depending on whether a non-zero residual coefficient exists.
[0274] Meanwhile, the encoder may encode information indicating whether the chrominance integration encoding mode is applied, for example, a chrominance integration flag (S1240). In addition, if the chrominance integration flag has a value indicating that the chrominance integration encoding mode is applied, information for specifying a chrominance restoration mode may be additionally encoded (S1240). Here, the information for specifying the chrominance restoration mode may be CBFs of the Cb component and the Cr component, or an index indicating one of a plurality of chrominance restoration modes.
[0275] In the decoder, based on information decoded from the bitstream, such as a chrominance integration flag, it is determined whether a chrominance integration encoding mode is applied to the current block (S1310).
[0276] When the chrominance integrated encoding mode is applied to the current block, the integrated residual coefficients can be decoded (S1320). Thereafter, based on the chrominance restoration mode of the current block, the residual coefficients of each of the Cb component and Cr component can be restored from the integrated residual coefficients (S1330).
[0277] Meanwhile, the chrominance restoration mode can be determined by a combination of CBFs of the Cb component and the Cr component. Alternatively, the chrominance restoration mode of the current block can be determined based on an index indicating one of multiple chrominance restoration modes.
[0278] Meanwhile, when the chrominance integrated encoding mode is not applied, the residual coefficients can be encoded / decoded for each of the Cb component and Cr component (S1340). Meanwhile, depending on the CBF of each of the Cb component and Cr component, decoding the residual coefficients for the Cb component or Cr component may be omitted.
[0279] In the encoder, residual coefficients for each of the Cb and Cr components can be derived in the same manner as in the decoder to derive restoration samples. That is, when the chrominance integrated coding mode is applied, residual coefficients for each of the Cb and Cr components can also be derived in the encoder from the integrated residual coefficients.
[0280] The embodiments of FIGS. 12 and 13 can be modified by the embodiments described above. For example, as described above, information for specifying a chrominance restoration mode, for example, after encoding / decoding CBFs of Cb components and Cr components, information indicating whether a chrominance integrated encoding mode is applied can be encoded.
[0281] Alternatively, instead of the integrated residual coefficients, integrated residual samples can be used. That is, after obtaining an integrated residual sample from the decoded integrated residual coefficients, residual samples for each of the Cb and Cr components can be derived from the integrated residual sample depending on the chrominance restoration mode. In this case, the integrated residual sample can be obtained by performing inverse quantization and inverse transformation on the integrated residual coefficients.
[0282] Alternatively, the chrominance integrated coding mode may be applied only to some areas within the current block. In this case, for areas where the chrominance integrated coding mode is not applied, the residual coefficients of each of the Cb and Cr components may be encoded / decoded.
[0283]
[0284] Applying the embodiments described above, focusing on the decoding or encoding process, to the encoding or decoding process is within the scope of the present disclosure. Changing the embodiments described above, in a given order, to a different order is also within the scope of the present disclosure.
[0285] Although the above-described disclosure is described based on a series of steps or a flowchart, this does not limit the chronological order of the invention, and may be performed simultaneously or in a different order as needed. In addition, each component (e.g., unit, module, etc.) constituting the block diagram in the above-described disclosure may be implemented as a hardware device or software, or multiple components may be combined to be implemented as a single hardware device or software. For example, the hardware device may include at least one of a processor for performing calculations, a memory for storing data, a transmitter for transmitting data, and a receiver for receiving data.
[0286] The above-described disclosure may be implemented in the form of program commands that can be executed by various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program commands, data files, data structures, etc., either singly or in combination.
[0287] In addition, according to the present disclosure, a computer-readable recording medium can be provided that stores a bitstream generated by the above-described encoding method. The bitstream can be transmitted by an encoding device, and a decoding device can receive the bitstream and decode an image.
[0288] Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program instructions, such as ROMs, RAMs, and flash memories. The hardware devices may be configured to operate as one or more software modules to perform processing according to the present disclosure, and vice versa.
[0289] The present disclosure may be applied to a computing or electronic device capable of encoding / decoding a video signal.
Claims
1. A step of determining whether a color difference integrated encoding mode is applied to the current block; When the chroma-integrated coding mode is applied to the current block, a step of deriving integrated residual coefficients of the current block; and A step of deriving residual coefficients of each of the first chrominance component and the second chrominance component from the integrated residual coefficients based on the chrominance restoration mode of the current block, The above color difference restoration mode is determined based on an index indicating one of a plurality of color difference restoration modes, A method for decoding an image, characterized in that the above index is decoded from a bitstream.
2. In paragraph 1, An image decoding method, characterized in that when it is determined that the chrominance integrated coding mode is applied to the current block, decoding of the CBF (Coded Block Flag) of each of the first chrominance component and the second chrominance component is omitted.
3. In paragraph 1, An image decoding method, characterized in that the residual coefficients of one of the first chrominance component and the second chrominance component are derived by shifting the integrated residual coefficients.
4. In paragraph 3, An image decoding method, characterized in that the shifting size is determined differently depending on the chrominance restoration mode of the current block.
5. In paragraph 4, The above shifting is performed based on shifting information decoded from the bitstream, An image decoding method, characterized in that the shifting information includes at least one of information on a shifting direction and information on a shifting size.
6. In paragraph 1, An image decoding method, characterized in that the number or types of color difference restoration modes applicable to the current block are different depending on the encoding mode of the current block.
7. In paragraph 1, An image decoding method, characterized in that whether or not it is allowed to apply the chrominance integrated coding mode to the current block is determined based on the coding mode of the current block.
8. In paragraph 1, The above current block is divided into a first area and a second area, An image decoding method, characterized in that the color difference integrated coding mode is applied only to the first region.
9. In paragraph 8, An image decoding method, characterized in that in the second region, information on residual coefficients of each of the first chrominance component and the second chrominance component is explicitly signaled.
10. In paragraph 8, An image decoding method, characterized in that the position and size of each of the first region and the second region are adaptively determined according to the shape of the current block.
11. In paragraph 8, An image decoding method, characterized in that it is determined whether the chrominance integrated coding mode is applied only to the first area within the current block based on information decoded from the bitstream.
12. In paragraph 8, An image decoding method, characterized in that the chrominance integration coding mode is applied only to the first area in the current block, only when the chrominance restoration mode of the current block is any one of the plurality of chrominance restoration modes defined in advance.
13. In paragraph 1, The above current block is divided into a first area and a second area, An image decoding method, characterized in that the color difference restoration modes are different between the first region and the second region.
14. A step for determining whether the color difference integrated coding mode is applied to the current block; When the chrominance integration encoding mode is applied to the current block, a step of deriving integrated residual coefficients according to the chrominance restoration mode of the current block; and Including a step of encoding the above integrated residual coefficients, The above color difference restoration mode is one of multiple color difference restoration modes, An image encoding method, characterized in that an index indicating a chrominance restoration mode among the plurality of chrominance restoration modes is encoded in a bitstream.
15. A processor for generating compressed video data; and In a device including a transmitter for transmitting the compressed video data, The process of generating the above compressed video is: A step for determining whether a chrominance integration coding mode is applied to the current block; When the chrominance integration encoding mode is applied to the current block, a step of deriving integrated residual coefficients according to the chrominance restoration mode of the current block; and Including a step of encoding the above integrated residual coefficients, The above color difference restoration mode is one of multiple color difference restoration modes, A device for transmitting compressed video data, characterized in that an index indicating a chrominance restoration mode among the plurality of chrominance restoration modes is encoded in a bitstream.
Citation Information
Patent Citations
Heat pad with heating control and heating temperature alarm system
KR1020220030371A
Methods of determination for chroma quantization parameter and apparatuses for using the same
KR102129352B1
Adjustment pipe manufacturing robot system
KR102242236B1
High voltage connector
KR102284391B1
KR20220066041A