Method and apparatus for reconstructing residual block of chroma block

KR103015295B1Active Publication Date: 2026-09-04SK TELECOM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
KR1020200040118
Authority / Receiving Office
KR · KR
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-09-27
Filing Date
2020-04-02
Publication Date
2026-09-04
Estimated Expiration
2040-04-02

Smart Images

  • Figure 112020034341900-PAT00020_ABST
    Figure 112020034341900-PAT00020_ABST
Patent Text Reader

Abstract

A method for restoring residual blocks of a chroma block and an image decoding device are disclosed. According to one embodiment of the present invention, a method for restoring residual blocks of a chroma block based on a JCCR (joint coding of chroma residuals) model is provided, comprising: a step of determining a mode of the JCCR model based on a Cb chroma component syntax element and a Cr chroma component syntax element; a step of deriving residual samples of corresponding chroma components from transformation coefficients of chroma components corresponding to the determined mode among the Cb chroma component and the Cr chroma component; and a step of deriving residual blocks of the chroma block using the derived residual samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present invention relates to the encoding and decoding of images, and more specifically, to a method for restoring residual blocks of a chroma block and an image decoding device for restoring residual blocks of a chroma block more efficiently. Background Technology

[0002] Since video data contains a large amount of data compared to audio or still image data, storing or transmitting it as is without compression processing requires significant hardware resources, including memory.

[0003] Therefore, typically, when storing or transmitting video data, an encoder is used to compress the video data for storage or transmission, and a decoder receives the compressed video data, decompresses it, and plays it. Such video compression technologies include H.264 / AVC, as well as HEVC (High Efficiency Video Coding), which improves coding efficiency by about 40% compared to H.264 / AVC.

[0004] However, as video size, resolution, and frame rates are gradually increasing, and the amount of data that needs to be encoded is also growing accordingly, a new compression technology is required that offers better encoding efficiency and higher image quality improvement effects than existing compression technologies. The problem to be solved

[0005] To meet these requirements, the present invention aims to provide improved image encoding and decoding technology. In particular, one aspect of the present invention relates to a technology that improves the efficiency of encoding and decoding by deriving residual samples of chroma components corresponding to the modes of the JCCR model. means of solving the problem

[0006] One aspect of the present invention provides a method for restoring residual blocks of a chroma block based on a joint coding of chroma residuals (JCCR) model, comprising: determining a mode of the JCCR model based on a Cb chroma component syntax element and a Cr chroma component syntax element; deriving residual samples of corresponding chroma components from transformation coefficients of chroma components corresponding to the determined mode among the Cb chroma component and the Cr chroma component; and deriving residual blocks of the chroma block using the derived residual samples.

[0007] Another aspect of the present invention provides an image decoding device for restoring residual blocks of a chroma block based on a JCCR (joint coding of chroma residuals) model, comprising: a determination unit that determines a mode of the JCCR model based on a Cb chroma component syntax element and a Cr chroma component syntax element; a derivation unit that derives residual samples of a corresponding chroma component from transformation coefficients of a chroma component corresponding to the determined mode among the Cb chroma component and the Cr chroma component; and a derivation unit that derives residual blocks of the chroma block using the derived residual samples. Effects of the invention

[0008] As described above, according to one embodiment of the present invention, residual coding is performed using the correlation between the Cb chroma block and the Cr chroma block, so that only the residual value for one of the blocks, the Cb chroma block and the Cr chroma block, is signaled, thereby improving compression performance. Brief explanation of the drawing

[0009] FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the technologies of the present disclosure. Figure 2 is a diagram illustrating a method for dividing blocks using a QTBTTT structure. Figure 3 is a diagram illustrating multiple intra-prediction modes. FIG. 4 is an exemplary block diagram of an image decoding device capable of implementing the technologies of the present disclosure. Figure 5 is a diagram illustrating an example in which a CTU is divided into CU, PU, ​​and TU. Figure 6 is a diagram illustrating the structure of a coded block flag syntax element and a method for signaling a coded block flag syntax element. FIG. 7 is an exemplary block diagram of an image decoder capable of implementing a residual block recovery method of a chroma block based on JCCR mode. Figure 8 is a flowchart illustrating a method for restoring residual blocks of chroma blocks based on the JCCR model. Figure 9 is a flowchart illustrating the high-level syntax of the JCCR model. Figures 10 and 11 are flowcharts illustrating a method for obtaining Cb chroma component synth elements and Cr chroma component synth elements. Figures 12 and 13 are flowcharts for explaining a method for deriving residual blocks of chroma blocks based on the JCCR model. Specific details for implementing the invention

[0010] Hereinafter, some embodiments of the present invention will be described in detail with reference to exemplary drawings. It should be noted that in assigning identification symbols to the components of each drawing, the same components are assigned the same symbol whenever possible, even if they are shown in different drawings. Furthermore, in describing the present invention, if it is determined that a detailed description of related known components or functions could obscure the essence of the invention, such detailed description is omitted.

[0012] FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the technologies of the present disclosure. Hereinafter, the image encoding device and its sub-components will be described with reference to FIG. 1.

[0013] The video encoding device may be configured to include a block division unit (110), a prediction unit (120), a subtractor (130), a conversion unit (140), a quantization unit (145), an encoding unit (150), an inverse quantization unit (160), an inverse conversion unit (165), an adder (170), a filter unit (180), and a memory (190).

[0014] Each component of the video encoding device may be implemented in hardware or software, or as a combination of hardware and software. Additionally, the function of each component may be implemented in software, and a microprocessor may be implemented to execute the software function corresponding to each component.

[0015] A single image (video) consists of multiple pictures. Each picture is divided into multiple regions, and encoding is performed for each region. For example, a single picture is divided into one or more tiles and / or slices. Here, one or more tiles can be defined as a tile group. Each tile or slice is divided into one or more Coding Tree Units (CTUs). And each CTU is divided into one or more Coding Units (CUs) by a tree structure. Information applicable to each CU is encoded as the syntax of the CU, and information applicable to all CUs included in a single CTU is encoded as the syntax of the CTU. Additionally, information applicable to all blocks within a single tile is encoded as the syntax of the tile or as the syntax of the tile group, which is a collection of multiple tiles, and information applicable to all blocks constituting a single picture is encoded in the Picture Parameter Set (PPS) or the picture header. Furthermore, information that is commonly referenced by multiple pictures is encoded in a Sequence Parameter Set (SPS). And, information that is commonly referenced by one or more SPSs is encoded in a Video Parameter Set (VPS).

[0016] The block division unit (110) determines the size of the Coding Tree Unit (CTU). Information regarding the size of the CTU (CTU size) is encoded as a syntax of SPS or PPS and transmitted to an image decoder.

[0017] The block division unit (110) divides each picture constituting the image into multiple Coding Tree Units (CTUs) having a predetermined size, and then recursively divides the CTUs using a tree structure. The leaf nodes in the tree structure become the coding units (CUs) which are the basic units of coding.

[0018] The tree structure may be a QuadTree (QT) in which an upper node (or parent node) is divided into four lower nodes (or child nodes) of equal size, a BinaryTree (BT) in which an upper node is divided into two lower nodes, a TernaryTree (TT) in which an upper node is divided into three lower nodes in a 1:2:1 ratio, or a structure that combines two or more of these QT, BT, and TT structures. For example, a QTBT (QuadTree plus BinaryTree) structure may be used, or a QTBTTT (QuadTree plus BinaryTree TernaryTree) structure may be used. Here, BTTT combined can be referred to as an MTT (Multiple-Type Tree).

[0019] FIG. 2 shows a QTBTTT splitting tree structure. As seen in FIG. 2, the CTU can first be split into a QT structure. Quadtree splitting can be repeated until the size of the splitting block reaches the minimum block size of the leaf node allowed in QT (MinQTSize). A first flag (QT_split_flag) indicating whether each node of the QT structure is split into four nodes of the lower layer is encoded by the encoding unit (150) and signaled to the image decoder. If the leaf node of the QT is not larger than the maximum block size of the root node allowed in BT (MaxBTSize), it can be further split into one or more of the BT structure or TT structure. In the BT structure and / or TT structure, multiple splitting directions may exist. For example, there may be two directions in which the block of the corresponding node is split horizontally and vertically. As shown in FIG. 2, when MTT splitting begins, a second flag (mtt_split_flag) indicating whether the nodes have been split, and if splitting has occurred, a flag indicating the splitting direction (vertical or horizontal) and / or a flag indicating the splitting type (Binary or Ternary) are encoded by the encoding unit (150) and signaled to the image decoding device.

[0020] As another example of a tree structure, when splitting a block using a QTBTTT structure, information such as a CU split flag (split_cu_flag) indicating that it has been split and a QT split flag (split_qt_flag) indicating whether the split type is QT split is encoded by the encoding unit (150) and signaled to the video decoder. If the CU split flag (split_cu_flag) value indicates that it has not been split, the block of the corresponding node becomes a leaf node in the split tree structure and becomes a CU (coding unit), which is the basic unit of coding. If the CU split flag (split_cu_flag) value indicates that it has been split, the split type is distinguished as QT or MTT through the QT split flag (split_qt_flag) value. When the split type is QT, there is no further additional information, and when the split type is MTT, a flag (mtt_split_cu_vertical_flag) indicating the MTT split direction (vertical or horizontal) and / or a flag (mtt_split_cu_binary_flag) indicating the MTT split type (binary or ternary) is additionally encoded by the encoding unit (150) and signaled to the image decoder.

[0021] When QTBT is used as another example of a tree structure, there may be two types: a type that divides the block of the corresponding node horizontally into two blocks of the same size (i.e., symmetric horizontal splitting) and a type that divides it vertically (i.e., symmetric vertical splitting). A splitting flag (split_flag) indicating whether each node of the BT structure is divided into a block of a lower layer and splitting type information indicating the type of splitting are encoded by the encoding unit (150) and transmitted to the image decoding device. Meanwhile, there may also be an additional type that divides the block of the corresponding node into two blocks of an asymmetric shape. The asymmetric shape may include a shape that divides the block of the corresponding node into two rectangular blocks with a size ratio of 1:3, or a shape that divides the block of the corresponding node diagonally.

[0022] A CU can have various sizes depending on the QTBT or QTBTTT partition from the CTU. Hereinafter, the block corresponding to the CU to be encoded or decoded (i.e., the leaf node of QTBTTT) is referred to as the 'current block'.

[0023] The prediction unit (120) predicts the current block and generates a prediction block. The prediction unit (120) includes an intra prediction unit (122) and an inter prediction unit (124).

[0024] Generally, current blocks within a picture can each be predictively coded. Typically, the prediction of a current block can be performed using an intra-prediction technique (using data from the picture containing the current block) or an inter-prediction technique (using data from a picture coded prior to the picture containing the current block). Inter-prediction includes both unidirectional and bidirectional prediction.

[0025] The intra prediction unit (122) predicts pixels within the current block using pixels (reference pixels) located around the current block within the current picture containing the current block. Multiple intra prediction modes exist depending on the prediction direction. For example, as shown in FIG. 3, multiple intra prediction modes may include non-directional modes including planar mode and DC mode, and 65 directional modes. The surrounding pixels to be used and the calculation formula are defined differently for each prediction mode.

[0026] The intra prediction unit (122) can determine the intra prediction mode to use for encoding the current block. In some examples, the intra prediction unit (122) may encode the current block using several intra prediction modes and select an appropriate intra prediction mode to use from the tested modes. For example, the intra prediction unit (122) may calculate rate-distortion values ​​using rate-distortion analysis of several tested intra prediction modes and select an intra prediction mode that has the best rate-distortion features among the tested modes.

[0027] The intra prediction unit (122) selects one intra prediction mode among a plurality of intra prediction modes and predicts the current block using a calculation formula and surrounding pixels (reference pixels) determined according to the selected intra prediction mode. Information regarding the selected intra prediction mode is encoded by the encoding unit (150) and transmitted to the image decoding device.

[0028] The inter-prediction unit (124) generates a prediction block for the current block through a motion compensation process. It searches for the block most similar to the current block within a reference picture that is encoded and decoded before the current picture, and uses the searched block to generate a prediction block for the current block. Then, it generates a motion vector corresponding to the displacement between the current block in the current picture and the prediction block in the reference picture. Generally, motion estimation is performed on the luminance component, and the motion vector calculated based on the luminance component is used for both the luminance component and the chroma component. Motion information, including information about the reference picture used to predict the current block and information about the motion vector, is encoded by the encoding unit (150) and transmitted to the image decoding device.

[0029] The subtractor (130) generates a residual block by subtracting the prediction block generated by the intra prediction unit (122) or the inter prediction unit (124) from the current block.

[0030] The conversion unit (140) converts residual signals within a residual block having pixel values ​​in a spatial domain into conversion coefficients in the frequency domain. The conversion unit (140) can convert residual signals within the residual block using the entire size of the residual block as the conversion unit, or it can divide the residual block into two sub-blocks, a conversion area and a non-conversion area, and convert residual signals using only the conversion area sub-block as the conversion unit. Here, the conversion area sub-block may be one of two rectangular blocks having a size ratio of 1:1 with respect to the horizontal axis (or vertical axis). In this case, a flag (cu_sbt_flag) indicating that only the sub-block has been converted, directionality (vertical / horizontal) information (cu_sbt_horizontal_flag), and / or position information (cu_sbt_pos_flag) are encoded by the encoding unit (150) and signaled to an image decoder. In addition, the size of the conversion area subblock may have a size ratio of 1:3 based on the horizontal axis (or vertical axis), and in this case, a flag (cu_sbt_quad_flag) distinguishing the division is additionally encoded by the encoding unit (150) and signaled to the image decoding device.

[0031] The quantization unit (145) quantizes the conversion coefficients output from the conversion unit (140) and outputs the quantized conversion coefficients to the encoding unit (150).

[0032] The encoding unit (150) generates a bitstream by encoding quantized transform coefficients using an encoding method such as CABAC (Context-based Adaptive Binary Arithmetic Code). The encoding unit (150) encodes information related to block division, such as CTU size, CU division flag, QT division flag, MTT division direction, and MTT division type, so that the video decoder can divide blocks in the same way as the video encoding device.

[0033] Additionally, the encoding unit (150) encodes information about a prediction type indicating whether the current block is encoded by intra prediction or by inter prediction, and encodes intra prediction information (i.e., information about the intra prediction mode) or inter prediction information (information about the reference picture and motion vector) according to the prediction type.

[0034] The inverse quantization unit (160) inversely quantizes the quantized transformation coefficients output from the quantization unit (145) to generate transformation coefficients. The inverse transformation unit (165) converts the transformation coefficients output from the inverse quantization unit (160) from the frequency domain to the spatial domain to restore the residual block.

[0035] The adder (170) restores the current block by adding the restored residual block and the prediction block generated by the prediction unit (120). The pixels within the restored current block are used as reference pixels when intra-predicting the next block in sequence.

[0036] The filter unit (180) performs filtering on the restored pixels to reduce blocking artifacts, ringing artifacts, blurring artifacts, etc. caused by block-based prediction and transformation / quantization. The filter unit (180) may include a deblocking filter (182) and a SAO (Sample Adaptive Offset) filter (184).

[0037] The deblocking filter (180) filters the boundaries between restored blocks to remove blocking artifacts caused by block-unit encoding / decoding, and the SAO filter (184) performs additional filtering on the deblocking filtered image. The SAO filter (184) is a filter used to compensate for the difference between the restored pixel and the original pixel caused by lossy coding.

[0038] The restored blocks filtered through the deblocking filter (182) and the SAO filter (184) are stored in memory (190). When all blocks within a picture are restored, the restored picture is used as a reference picture for inter-predicting blocks within a picture to be encoded later.

[0040] FIG. 4 is an exemplary block diagram of an image decoding device capable of implementing the technologies of the present disclosure. Hereinafter, the image decoding device and its sub-components will be described with reference to FIG. 4.

[0041] The image decoding device may be configured to include a decoding unit (410), an inverse quantization unit (420), an inverse transformation unit (430), a prediction unit (440), an adder (450), a filter unit (460), and a memory (470).

[0042] Similar to the image encoding device of FIG. 1, each component of the image decoding device may be implemented in hardware or software, or in combination of hardware and software. Additionally, the function of each component may be implemented in software, and a microprocessor may be implemented to execute the function of the software corresponding to each component.

[0043] The decoding unit (410) decodes the bitstream received from the video encoding device to extract information related to block division, thereby determining the current block to be decoded, and extracts prediction information and information regarding residual signals necessary to restore the current block.

[0044] The decoding unit (410) extracts information about the CTU size from the SPS (Sequence Parameter Set) or PPS (Picture Parameter Set) to determine the size of the CTU and divides the picture into CTUs of the determined size. Then, the CTU is determined as the top layer of the tree structure, i.e., the root node, and divides the CTU using the tree structure by extracting division information for the CTU.

[0045] For example, when splitting a CTU using a QTBTTT structure, first, a first flag (QT_split_flag) related to QT splitting is extracted to split each node into four nodes of the lower layer. Then, for the nodes corresponding to the leaf nodes of QT, a second flag (MTT_split_flag) related to MTT splitting and splitting direction (vertical / horizontal) and / or splitting type (binary / ternary) information are extracted to split the corresponding leaf nodes into an MTT structure. Through this, each node below the leaf nodes of QT is recursively split into a BT or TT structure.

[0046] As another example, when splitting a CTU using the QTBTTT structure, a CU split flag (split_cu_flag) indicating whether the CU is split is first extracted, and if the block is split, a QT split flag (split_qt_flag) is extracted. If the split type is not QT but MTT, a flag (mtt_split_cu_vertical_flag) indicating the MTT split direction (vertical or horizontal) and / or a flag (mtt_split_cu_binary_flag) indicating the MTT split type (Binary or Ternary) are additionally extracted. During the splitting process, each node may undergo zero or more iterative MTT splits following zero or more iterative QT splits. For example, a CTU may undergo MTT splitting immediately, or conversely, only multiple QT splits.

[0047] As another example, when splitting a CTU using a QTBT structure, a first flag (QT_split_flag) related to the splitting of QT is extracted to split each node into four nodes of the lower layer. Then, for the nodes corresponding to the leaf nodes of QT, a split flag (split_flag) indicating whether to further split into BTs and split direction information are extracted.

[0048] Meanwhile, when the decoding unit (410) determines the current block to be decoded through the division of the tree structure, it extracts information regarding the prediction type indicating whether the current block is intra-predicted or inter-predicted. If the prediction type information indicates intra-predicted, the decoding unit (410) extracts syntax elements for the intra-predicted information (intra-predicted mode) of the current block. If the prediction type information indicates inter-predicted, the decoding unit (410) extracts syntax elements for the inter-predicted information, namely information indicating the motion vector and the reference picture that the motion vector refers to.

[0049] Meanwhile, the decoding unit (410) extracts information about the quantized transformation coefficients of the current block as information about the residual signal.

[0050] The inverse quantization unit (420) inversely quantizes the quantized transformation coefficients, and the inverse transformation unit (430) inversely transforms the inversely quantized transformation coefficients from the frequency domain to the spatial domain to restore the residual signals, thereby generating a residual block for the current block.

[0051] Additionally, when the inverse transformation unit (430) inversely transforms only a part of the transformation block (sub-block), it extracts a flag (cu_sbt_flag) indicating that only the sub-block of the transformation block has been transformed, information on the directionality (vertical / horizontal) of the sub-block (cu_sbt_horizontal_flag) and / or information on the position of the sub-block (cu_sbt_pos_flag), restores residual signals by inversely transforming the transformation coefficients of the corresponding sub-block from the frequency domain to the spatial domain, and creates a final residual block for the current block by filling the area that has not been inversely transformed with a "0" value as the residual signal.

[0052] The prediction unit (440) may include an intra prediction unit (442) and an inter prediction unit (444). The intra prediction unit (442) is activated when the prediction type of the current block is an intra prediction, and the inter prediction unit (444) is activated when the prediction type of the current block is an inter prediction.

[0053] The intra prediction unit (442) determines the intra prediction mode of the current block among a plurality of intra prediction modes from the syntax elements for the intra prediction mode extracted from the decoding unit (410), and predicts the current block using reference pixels around the current block according to the intra prediction mode.

[0054] The inter prediction unit (444) determines the motion vector of the current block and the reference picture that the motion vector refers to using the syntax elements for the intra prediction mode extracted from the decoding unit (410), and predicts the current block using the motion vector and the reference picture.

[0055] The adder (450) restores the current block by adding the residual block output from the inverse transformation unit and the prediction block output from the inter prediction unit or the intra prediction unit. The pixels within the restored current block are used as reference pixels when intra-predicting the block to be decoded later.

[0056] The filter unit (460) may include a deblocking filter (462) and an SAO filter (464). The deblocking filter (462) deblocks the boundaries between restored blocks to remove blocking artifacts caused by block-unit decoding. The SAO filter (464) performs additional filtering on the restored blocks after deblocking filtering to compensate for the difference between the restored pixels and the original pixels caused by lossy coding. The restored blocks filtered through the deblocking filter (462) and the SAO filter (464) are stored in memory (470). When all blocks within a picture are restored, the restored picture is used as a reference picture to inter-predict blocks within the picture to be encoded later.

[0058] In HEVC (High Efficiency Video Coding), as shown in Fig. 5, a fixed-size CTU (coding tree unit) is used as the root node of the tree structure, and the CTU is divided into square-shaped CU (coding unit), PU (prediction unit), and TU (transform unit).

[0059] The CTU uses a block with a maximum size of 64x64 as its basic unit and is repeatedly divided into four equal parts using a quadtree method to form the CU with the best encoding efficiency. The size of the CU is 32x32 (CU 32*32 ), 16x16(CU 16*16 ), can be at least 8x8 (CU). Once the CU is determined, the PU, which is the basic block for prediction, and the TU, which is the optimal basic block for transformation, are set within the corresponding CU.

[0060] A single CU is divided into multiple TUs, and each TU contains residual blocks for the Y component, Cb component, and Cr component, respectively. Here, the Y component represents the luminance component, and the Cb and Cr components represent the chroma components (Cb chroma component and Cr chroma component).

[0061] A syntax element indicating whether one or more non-zero coefficients are included in the residual block (transform block) of the luminance component and the residual block (transform block) of the chroma component is signaled from the image encoding device to the image decoder.

[0062] rqt_root_cbf is a coded block flag for one or more TUs included within a specific CU and for the transform blocks of the components (Y, Cb, Cr) included in one or more TUs. Here, the coded block flag indicates whether all coefficient values ​​of the transform blocks are all zero. rqt_root_cbf=0 indicates that the coefficients of all transform blocks for all TUs are all zero (no transform_tree syntax structure for the CU exists), and rqt_root_cbf=1 indicates that there is one or more transform blocks with one or more non-zero coefficient values ​​(a transform_tree syntax structure for the CU exists).

[0063] An example of the syntax structure of rqt_root_cbf is shown in Table 1.

[0064]

[0065] When rqt_root_cbf=1 (when a transform_tree syntax structure for the CU exists), syntax elements such as cbf_luma, cbf_cb, and cbf_cr are signaled from the image encoder to the image decoder.

[0066] cbf_luma is a syntax element indicating whether one or more non-zero transformation coefficients exist within the luma transformation block; cbf_luma=1 indicates that one or more non-zero transformation coefficients exist within the luma transformation block. cbf_cb is a syntax element indicating whether one or more non-zero transformation coefficients exist within the Cb transformation block; cbf_cb=1 indicates that one or more non-zero transformation coefficients exist within the Cb transformation block. cbf_cr is a syntax element indicating whether one or more non-zero transformation coefficients exist within the Cr transformation block; cbf_cr=1 indicates that one or more non-zero transformation coefficients exist within the Cr transformation block.

[0067] An example of the syntax structure of cbf_luma, cbf_cb, and cbf_cr (transform_tree syntax structure) is shown in Table 2.

[0068]

[0069] The image decoder can decode rqt_root_cbf or derive the value of rqt_root_cbf according to the encoding / decoding mode (skip, merge, amvp(inter), intra) of the CU, and then determine whether to decode cbf_luma, cbf_cb, and cbf_cr for each component (Y, Cb, Cr) according to the value of rqt_root_cbf.

[0070] For example, when the encoding / decoding mode of the CU is skip, the value of rqt_root_cbf is induced to be 0 (S610), and since rqt_root_cbf=0 (S660), cbf_luma, cbf_cb, and cbf_cr are not decoded. When the encoding / decoding mode of the CU is merge, it can be divided into two cases depending on the block structure of the CU. First, when the block structure of the CU is 2Nx2N, the value of rqt_root_cbf is induced to be 1 (S620), and since rqt_root_cbf=1 (S660), cbf_luma, cbf_cb, and cbf_cr are decoded from the bitstream (S670). In contrast, if the block structure of CU is not 2Nx2N, rqt_root_cbf is decrypted (S630), and depending on the value of rqt_root_cbf (S660), whether cbf_luma, cbf_cb, and cbf_cr are decrypted can be determined.

[0071] If the encoding / decoding mode of CU is amvp or intra, rqt_root_cbf is decoded (S640, S650), and depending on the value of rqt_root_cbf (S660), whether cbf_luma, cbf_cb, and cbf_cr are decoded may be determined.

[0073] This specification proposes the definition and structure of syntax elements for residual coding of chroma blocks, as well as the semantics for said syntax elements. Furthermore, this specification proposes a method for efficiently designing cbf for two blocks by utilizing the correlation between the Cb chroma block and the Cr chroma block. Moreover, this specification also proposes an encoding / decoding method utilizing the correlation between the Cb residual block (residual block of the Cb chroma block) and the Cr residual block (residual block of the Cr chroma block).

[0074] An exemplary block diagram of an image decoding device for implementing the above methods is shown in FIG. 7. As shown in FIG. 7, the image decoding device may be configured to include an acquisition unit (710), a determination unit (720), an extraction unit (730), and an induction unit (740). The acquisition unit (710) may be configured to include a decoding unit (410) and a setting unit (750).

[0075] The video encoding device can derive a residual block for the chroma block of the current block (residual block of the chroma block) by subtracting the prediction block of the current block from the current block. The residual block of the chroma block may include a residual block for the Cb chroma component (Cb residual block) and a residual block for the Cr chroma component (Cr residual block).

[0076] The video encoding device can determine one of the following models for a chroma block: a model that codes all Cb residual samples (residual samples for Cb chroma components included in the Cb residual block) and Cr residual samples (residual samples for Cr chroma components included in the Cr residual block) (general model), and a JCCR (joint coding of chroma residuals or joint coding of chrominance residuals) model.

[0077] For example, a video encoding device can calculate rate-distortion values ​​through rate-distortion analysis of a general model and a JCCR model, and select or determine the model with the best rate-distortion features as the model for the chroma block. The JCCR model will be described later.

[0078] When the JCCR model is determined as the model for the chroma block, the video encoding device can determine the mode of the JCCR model by using the correlation between the Cb residual samples and the Cr residual samples.

[0079] Here, the correlation between Cb residual samples and Cr residual samples can be divided into three cases: 1) the first is when the value of the Cb residual samples scaled by 1 / 2 is equal to the value of the Cr residual samples, 2) the second is when the value of the Cb residual samples scaled by 1 is equal to the value of the Cr residual samples, and 3) the third is when the value of the Cr residual samples scaled by 1 / 2 is equal to the value of the Cb residual samples.

[0080] The video encoding device can determine the mode having the best rate distortion feature among the three correlations (modes of the JCCR model) above as the mode for the chroma block. The video encoding device can integrally perform the previously described 'process of determining one of the general model and the JCCR model' and the 'process of determining one of the modes of the JCCR model'. For example, the video encoding device can determine the mode or model having the best rate distortion feature among the modes of the JCCR model and the general model as the mode or model for the chroma block.

[0081] The video encoding device can encode one of the transform coefficients among the Cb chroma component and the Cr chroma component and signal it to the video decoder.

[0082] The acquisition unit (710) can acquire Cb chroma component syntax elements (tu_cbf_cb) and Cr chroma component syntax elements (tu_cbf_cr) (S810).

[0083] tu_cbf_cb and tu_cbf_cr can be acquired by being signaled to an image decoder or by being derived internally by the image decoder. Additionally, either tu_cbf_cb or tu_cbf_cr can be acquired by being signaled to an image decoder, while the other can be acquired by being derived from the acquired syntax element (either one of tu_cbf_cb or tu_cbf_cr).

[0084] The process of obtaining tu_cbf_cb and tu_cbf_cr can be controlled by the new syntax elements proposed in this specification. A detailed description of the process of obtaining tu_cbf_cb and tu_cbf_cr and the new syntax elements will be provided later.

[0085] The determination unit (720) can determine the mode of the JCCR model based on the acquired tu_cbf_cb and tu_cbf_cr (S820).

[0086] A JCCR model refers to a method or model in which one of the residual samples of the Cb residual block (Cb residual samples) and the residual samples of the Cr residual block (Cr residual samples) is signaled, and the other is derived using the correlation with the signaled residual samples.

[0087] The JCCR model can be classified into three modes as follows.

[0088] 1) JCCR Mode 1 (Mode 1) - Signal (decode) the values ​​of the Cb residual samples, and derive the values ​​of the Cr residual samples by scaling the values ​​of the Cb residual samples by half.

[0089] 2) JCCR Mode 2 (Mode 2) - Signal (decode) the values ​​of the Cb residual samples, and derive the values ​​of the Cr residual samples by scaling the values ​​of the Cb residual samples by 1x.

[0090] 3) JCCR Mode 3 (Third Mode) - Signal (decode) the values ​​of Cr residual samples, and derive the values ​​of Cb residual samples by scaling the values ​​of Cr residual samples by half.

[0091] The first mode can be performed through mathematical formula 1, the second mode can be performed through mathematical formula 2, and the third mode can be performed through mathematical formula 3.

[0092]

[0093]

[0094]

[0095] In Equations 1 through 3, resCb represents the restored Cb residual samples (Cb residual block), and resCr represents the restored Cr residual samples (Cr residual block). resJointC[x][y] represents the values ​​of the signaled and inversely transformed residual samples, and CSign represents the sign when deriving the residual samples. The value of CSign can be determined by a separately signaled sign syntax element (joint_cbcr_sign_flag).

[0096] The distinction between the three JCCR modes can be determined by the values ​​of tu_cbf_cb and tu_cbf_cr. When a JCCR model is applied, tu_cbf_cb and tu_cbf_cr may have a meaning different from the general meaning (whether one or more non-zero transformation coefficients are included), and this different meaning may be the distinction between JCCR modes. An example of distinguishing the three JCCR modes based on the values ​​of tu_cbf_cb and tu_cbf_cr is shown in Table 3.

[0097]

[0098] When the values ​​of tu_cbf_cb and tu_cbf_cr are both 0, it means that both the Cb residual block and the Cr residual block have all-zero coefficients (meaning of the general case), so the JCCR mode can be distinguished based on the remaining cases excluding this. The case where tu_cbf_cb=1 and tu_cbf_cr=0 corresponds to the first mode and can be executed via Equation 1. The case where tu_cbf_cb=1 and tu_cbf_cr=1 corresponds to the second mode and can be executed via Equation 2. The case where tu_cbf_cb=0 and tu_cbf_cr=1 corresponds to the third mode and can be executed via Equation 3.

[0099] The induction unit (740) can restore the residual block of the chroma block by deriving the residual block of the chroma block from the signaled transformation coefficients based on the determined mode (S830).

[0100] In the first mode, the values ​​of the signaled residual samples are derived into the values ​​of the Cb residual samples, and the Cb residual block and the Cr residual block can be derived from the derived values ​​of the Cb residual samples (Equation 1). In the second mode, the values ​​of the signaled residual samples are derived into the values ​​of the Cb residual samples, and the Cb residual block and the Cr residual block can be derived from the derived values ​​of the Cb residual samples (Equation 2). In the third mode, the values ​​of the signaled residual samples are derived into the values ​​of the Cr residual samples, and the Cb residual block and the Cr residual block can be derived from the derived values ​​of the Cr residual samples (Equation 3).

[0101] Specific details regarding the process of restoring the residual block will be described later.

[0103] Example 1 - High-level syntax elements for the JCCR model

[0104] In Example 1, high-level syntax elements for the JCCR model are proposed.

[0105] High-level syntax elements for the JCCR model may include an enable flag (joint_cbcr_enabled_flag) and a sign syntax element (joint_cbcr_sign_flag).

[0106] joint_cbcr_enabled_flag is a syntax element that controls whether the JCCR model is enabled, and it can be signaled by being defined in one or more locations among the SPS (sequence parameter set), PPS (picture parameter set), and slice header.

[0107] Table 4 shows an example of joint_cbcr_enabled_flag being defined in SPS (sps_joint_cbcr_enabled_flag) and signaled.

[0108]

[0109] The joint_cbcr_sign_flag can be defined and signaled at one or more locations among the picture header, slice header, and CTU header. If the JCCR model is applied to CUs included in a specific slice, the joint_cbcr_sign_flag can be defined in the corresponding slice header. All CUs included in that slice to which the JCCR model is applied can be derived into the residual block of the chroma block using the same sign value. If the JCCR model is applied to CUs included in a specific CTU, the joint_cbcr_sign_flag can be defined in the corresponding CTU header. All CUs included in that CTU to which the JCCR model is applied can be derived into the residual block of the chroma block using the same sign value.

[0110] Table 5 shows an example where joint_cbcr_sign_flag is defined (slice_joint_cbcr_sign_flag) in the slice header and signaled.

[0111]

[0112] According to an embodiment, joint_cbcr_sign_flag may be signaled in TU units rather than high-level syntax. When joint_cbcr_sign_flag is signaled in TU units in this way, the residual block of the chroma block can be derived more accurately.

[0113] Table 6 shows an example of joint_cbcr_sign_flag being signaled in TU units (tu_joint_cbcr_sign_flag).

[0114]

[0115] In Table 6, tu_joint_cbcr_residual is an application syntax element indicating whether the JCCR model is applied (on / off) to the corresponding TU, and tu_joint_cbcr_sign_flag can be signaled when tu_joint_cbcr_residual=1. In the present invention, tu_joint_cbcr_residual may be tu_joint_cbcr_residual_flag.

[0116] The video decoding device (decoding unit) decodes joint_cbcr_enabled_flag from the bitstream (S910) and can determine whether to decode joint_cbcr_sign_flag based on the value of joint_cbcr_enabled_flag (S920). When joint_cbcr_enabled_flag=0, the JCCR model is not enabled, so joint_cbcr_sign_flag is not decoded. On the other hand, when joint_cbcr_enabled_flag=1, the JCCR model is enabled, so joint_cbcr_sign_flag can be decoded from the bitstream (S930).

[0117] According to an embodiment, in an embodiment where joint_cbcr_sign_flag is signaled in TU units, when joint_cbcr_enabled_flag=1, the process of decoding tu_joint_cbcr_residual from the bitstream may be further performed. In this case, tu_joint_cbcr_sign_flag may be decoded from the bitstream when tu_joint_cbcr_residual=1.

[0119] Example 2 - TU Unit Syntax Elements Distinguishing Modes of the JCCR Model

[0120] Example 2 is a method for obtaining tu_cbf_cb and tu_cbf_cr.

[0121] As previously explained, tu_cbf_cb and tu_cbf_cr can have two different meanings depending on whether the JCCR model is applied. When the JCCR model is applied (tu_joint_cbcr_residual=1), tu_cbf_cb and tu_cbf_cr may have a meaning indicating the mode of the JCCR model (Table 3), and when the JCCR model is not applied (tu_joint_cbcr_residual=0), they may have a general meaning. That is, in the latter case, if tu_cbf_cb=0 or tu_cbf_cr=0, it may mean that the corresponding residual block has all-zero coefficients.

[0122] In summary, there are a total of 7 residual block coding types depending on the values ​​of tu_joint_cbcr_residual, tu_cbf_cb, and tu_cbf_cr. The 7 residual block coding types are shown in Table 7.

[0123]

[0124] Case 7 represents the case where both the Cb residual block and the Cr residual block have all-zero coefficients. Cases 1, 3, and 5 represent the cases where tu_cbf_cb and tu_cbf_cr have general meanings. Cases 2, 4, and 6 represent the cases where tu_cbf_cb and tu_cbf_cr distinguish JCCR modes.

[0125] In Example 2, two embodiments are proposed for efficiently signaling tu_joint_cbcr_residual, tu_cbf_cb, and tu_cbf_cr. These two embodiments are designed taking into account the frequency of occurrence of the values ​​of tu_cbf_cb and tu_cbf_cr. For example, in the case of TUs encoded / decoded by inter-prediction, the frequency of occurrence of residual blocks (transform blocks) with all-zero coefficients may be relatively high due to the accuracy of the prediction. That is, cases where tu_cbf_cb=0 and tu_cbf_cr=0 may occur most frequently. Therefore, in the embodiments below, bit efficiency can be improved by first checking the cases where tu_cbf_cb=0 and tu_cbf_cr=0 by primarily determining the OR values ​​of tu_cbf_cb and tu_cbf_cr.

[0126] Example 2-1

[0127] In Example 2-1, two new syntax elements are proposed for obtaining (representing) the values ​​of tu_cbf_cb and tu_cbf_cr. The new syntax elements are tu_cbf_cb_or_cr and tu_cbf_cb_and_cr.

[0128] tu_cbf_cb_or_cr is a syntax element indicating the OR value of tu_cbf_cb and tu_cbf_cr (tu_cbf_cb∥tu_cbf_cr). That is, tu_cbf_cb_or_cr can indicate whether one or more of the values ​​of tu_cbf_cb and tu_cbf_cr are 1. tu_cbf_cb_or_cr=0 indicates that both the value of tu_cbf_cb and the value of tu_cbf_cr are 0, and tu_cbf_cb_or_cr=1 indicates that one or more of the values ​​of tu_cbf_cb and tu_cbf_cr are 1.

[0129] tu_cbf_cb_and_cr ​​is a syntax element that indicates the AND value of tu_cbf_cb and tu_cbf_cr (tu_cbf_cb && tu_cbf_cr). That is, tu_cbf_cb_and_cr ​​can indicate whether both the value of tu_cbf_cb and the value of tu_cbf_cr are 1. tu_cbf_cb_and_cr=0 indicates that at least one of the values ​​of tu_cbf_cb and tu_cbf_cr is 0, and tu_cbf_cb_and_cr=1 indicates that both the value of tu_cbf_cb and the value of tu_cbf_cr are 1.

[0130] First, tu_cbf_cb_or_cr can be signaled from an image encoding device to an image decoder and decoded (S1010).

[0131] In the case where tu_cbf_cb_or_cr=0 (tu_cbf_cb=0 and tu_cbf_cr=0) (S1020), tu_cbf_cb and tu_cbf_cr are not signaled, and the image decoding device (setting unit) can be set to tu_cbf_cb=0 and tu_cbf_cr=0 (S1030). Alternatively, in the case where tu_cbf_cb_or_cr=1 (at least one of tu_cbf_cb and tu_cbf_cr is 1) (S1030), tu_cbf_cb_and_cr ​​can be signaled and decoded (S1040).

[0132] In the case where tu_cbf_cb_and_cr=1 (S1050), since both tu_cbf_cb and tu_cbf_cr are 1, tu_cbf_cb and tu_cbf_cr are not signaled, and tu_cbf_cb=1 and tu_cbf_cr=1 can be set (S1060). In contrast, in the case where tu_cbf_cb_and_cr=0 (S1050), since only one of tu_cbf_cb and tu_cbf_cr is 1, either one of tu_cbf_cb and tu_cbf_cr (target syntax element) can be signaled and decoded (S1070). The value of the target syntax element can be obtained by setting it to the decoded value in the S1070 process. The value of a syntax element other than the target syntax element (the other one among tu_cbf_cb and tu_cbf_cr) can be obtained by setting it to the opposite value of the target syntax element (tu_cbf_cb!=tu_cbf_cr) (S1080).

[0133] tu_joint_cbcr_residual can be signaled from the video encoding device to the video decoder when either of the following two conditions is satisfied while the JCCR model is enabled.

[0134] 1) Condition 1 - If the encoding / decoding mode of the corresponding TU is intra and tu_cbf_cb_or_cr=1 (at least one of tu_cbf_cb and tu_cbf_cr is 1).

[0135] 2) Condition 2 - If the encoding / decoding mode of the corresponding TU is not intra and tu_cbf_cb_and_cr=1 (if both tu_cbf_cb and tu_cbf_cr are 1).

[0136] To explain the above conditions in detail, if the TU is encoded / decoded in intra mode, the JCCR model can be turned on / off if at least one of tu_cbf_cb and tu_cbf_cr is 1 (Condition 1). If the TU is encoded / decoded in inter mode, the JCCR model can be turned on / off if both tu_cbf_cb and tu_cbf_cr are 1 (Condition 2). For example, for a TU encoded / decoded in intra mode, all of the first to third modes of Table 3 are applicable, and for a TU encoded / decoded in inter mode, only the third mode of Table 3 may be applicable.

[0137] The syntax structure for Example 2-1 described above is shown in Table 8.

[0138]

[0139] Example 2-2

[0140] In Example 2-2, a new syntax element is proposed for obtaining (representing) the values ​​of tu_cbf_cb and tu_cbf_cr. The new syntax element is tu_cbf_chroma.

[0141] tu_cbf_chroma is a syntax element that indicates the OR value of tu_cbf_cb and tu_cbf_cr (tu_cbf_cb∥tu_cbf_cr). That is, tu_cbf_chroma can indicate whether one or more of the values ​​of tu_cbf_cb and tu_cbf_cr are 1. tu_cbf_chroma=0 indicates that both the values ​​of tu_cbf_cb and tu_cbf_cr are 0, and tu_cbf_chroma=1 indicates that one or more of the values ​​of tu_cbf_cb and tu_cbf_cr are 1.

[0142] First, tu_cbf_chroma can be signaled from an image encoding device to an image decoder and decoded (S1110).

[0143] In the case where tu_cbf_chroma=0 (tu_cbf_cb=0 and tu_cbf_cr=0) (S1120), tu_cbf_cb and tu_cbf_cr are not signaled, and can be set to tu_cbf_cb=0 and tu_cbf_cr=0 in the image decoding device (setting unit) (S1130). In contrast, in the case where tu_cbf_chroma=1 (at least one of tu_cbf_cb and tu_cbf_cr is 1) (S1030), either one of tu_cbf_cb and tu_cbf_cr (target syntax element) can be signaled and decoded (S1140). The value of the target syntax element can be set and obtained as the decoded value in the S1140 process.

[0144] When the target syntax element is 1, a syntax element other than the target syntax element (one other among tu_cbf_cb and tu_cbf_cr) can be signaled and decoded (S1170). The value of the other syntax element can be obtained by setting it to the value decoded during the S1170 process. In contrast, when the target syntax element is 0, the value of the other syntax element can be obtained by setting it to a value opposite to the value of the target syntax element (tu_cbf_cr=1) (S1160).

[0145] tu_joint_cbcr_residual can be signaled from an image encoding device to an image decoder when either of the two conditions identical to those in Example 2-1 are satisfied while the JCCR model is enabled.

[0146] The syntax structure for Example 2-2 described above is shown in Table 9.

[0147]

[0149] Example 3 - Decoding process based on the JCCR model

[0150] Example 3 is a method for restoring residual blocks of chroma blocks based on JCCR mode.

[0151] As previously described, the image encoding device can encode transform coefficients of either the Cb chroma component or the Cr chroma component and signal them to the image decoder. Here, the transform coefficients signaled to the image decoder may be transform coefficients of the chroma component corresponding to the JCCR mode among the Cb chroma component and the Cr chroma component. For example, if the JCCR mode is the first mode or the second mode, the transform coefficients of the corresponding Cb chroma component may be signaled, and if the JCCR mode is the third mode, the transform coefficients of the corresponding Cr chroma component may be signaled.

[0152] When the video decoder (derivation unit) determines the JCCR mode based on tu_cbf_cb and tu_cbf_cr (S1210), it can determine or set the chroma component corresponding to the determined JCCR mode (S1220).

[0153] The chroma component corresponding to the JCCR mode can be expressed using a separate variable. This separate variable may be compIdx or codedCIdx (hereinafter expressed as compIdx). The Cb chroma component corresponding to the first and second modes can be expressed as compIdx=1, and the Cr chroma component corresponding to the third mode can be expressed as compIdx=2.

[0154] The image decoding device (derivation unit) can derive residual samples of corresponding chroma components from the transformation coefficients of corresponding chroma components (S1230).

[0155] For example, when compIdx=1 (Mode 1 and Mode 2), residual samples of the Cb chroma component (Cb residual samples) can be derived from the transformation coefficients of the Cb chroma component. When compIdx=2 (Mode 3), residual samples of the Cr chroma component (Cr residual samples) can be derived from the transformation coefficients of the Cr chroma component. The process of deriving the residual samples of the chroma components can be achieved by inversely transforming the transformation coefficients of the signaled chroma components.

[0156] The image decoding device (induction unit) can restore the residual block of the chroma block using the derived residual samples (S1240).

[0157] The process of restoring the residual block of the chroma block (S1240) may include the process of restoring the Cb residual block and the process of restoring the Cr residual block. That is, the process of restoring the residual block of the chroma block (S1240) may be performed repeatedly. For example, when a Cb residual sample is derived (compIdx=1, cIdx=1), both the process of deriving the Cb residual block using the derived Cb residual sample and the process of deriving the Cr residual block using the derived Cb residual sample may be performed. As another example, when a Cr residual sample is derived (compIdx=2, cIdx=2), both the process of deriving the Cb residual block using the derived Cr residual sample and the process of deriving the Cr residual block using the derived Cr residual sample may be performed.

[0158] If we consider the above explanation based on chroma components, the image decoder can vary the processing order of Cb chroma components and Cr chroma components depending on the value of compIdx (JCCR mode).

[0159] For example, when compIdx=1 (Mode 1 or Mode 2), residual samples of the Cb chroma component can be derived first (Cb chroma component processing), and then residual samples of the Cr chroma component (Cr residual block) can be derived (Cr chroma component processing). As another example, when compIdx=2 (Mode 3), residual samples of the Cr chroma component can be derived first (Cr chroma component processing), and then residual samples of the Cb chroma component (Cb residual block) can be derived (Cb chroma component processing).

[0160] The reason the present invention varies the processing order of Cb chroma components and Cr chroma components according to the value of compIdx (JCCR mode) is to solve the problem of the conventional method, which performs the processing of Cb chroma components first and the processing of Cr chroma components later, regardless of the value of compIdx (JCCR mode).

[0161] Specifically, conventional methods have a problem in that the process of deriving Cb residual blocks cannot be processed normally because, even in the third mode (compIdx=2), processing of Cb chroma components is performed first, resulting in a lack of information regarding Cr residual samples. The present invention can solve this problem by being configured to process Cr chroma components first (deriving residual samples of Cr chroma components) in the third mode (compIdx=2).

[0162] According to an embodiment, values ​​derived from the transformation coefficients of the chroma components (residual samples of the chroma components) may be stored in advance in memory (470) or any storage space (res). In this case, the 'pre-stored residual samples' may be used in the process of restoring the residual blocks of the chroma blocks. For example, in the case of the third mode (compIdx=2), when restoring the Cb residual block, the Cb residual block may be derived using the pre-stored Cr residual samples, and when restoring the Cr residual block, the Cr residual block may be restored by assigning the pre-stored Cr residual samples directly to the Cr residual block.

[0163] An example of a specific method for restoring the residual block of a chroma block is shown in Fig. 13.

[0164] The image decoder can determine whether the JCCR model is applied based on the value of joint_cbcr_residual (S1310). If joint_cbcr_residual=0, the JCCR model is not applied, so the residual block recovery method based on the JCCR model is terminated, but if joint_cbcr_residual=1, the process of determining the JCCR mode (S1320 to S1360) can be performed.

[0165] The image decoder determines whether tu_cbf_cb=1 and tu_cbf_cr=0 (S1320), and if tu_cbf_cb=0 or tu_cbf_cr=1, determines whether tu_cbf_cb=1 (S1340), and can determine the JCCR mode according to the results of the determinations of each process (S1320 and S1340) (S1330, S1350 and S1360). If tu_cbf_cb=1 and tu_cbf_cr=0, it is determined as the first mode (S1330), if tu_cbf_cb=1 (and tu_cbf_cr=1), it is determined as the second mode (S1350), and if tu_cbf_cb=0 and tu_cbf_cr=1, it can be determined as the third mode (S1360).

[0166] The video decoder can derive the value of Csign (S1370). This process can be performed by applying the decoded code syntax element (joint_cbcr_sign_flag) from the bitstream to Equation 4.

[0167]

[0168] The image decoder can determine the chroma component (compIdx) corresponding to the determined JCCR mode (S1380 to S1384).

[0169] When it is determined to be the first mode or the second mode (JCCR mode ≤ 2) (S1380), compIdx is determined to be cb (1) (S1382), and when it is determined to be the third mode (S1380), compIdx is determined to be cr (2) (S1384).

[0170] The image decoder can recover the residual block by deriving the 'residual samples of the corresponding chroma component' from the 'transform coefficients of the corresponding chroma component' and then deriving the residual block of the chroma block using the derived residual samples (S1386 to S1394).

[0171] The process of deriving residual samples of corresponding chroma components can be performed by inversely transforming the transformation coefficients of corresponding chroma components. Additionally, the process of restoring the residual block may include a process of determining whether cIdx and compIdx are the same (S1386), a process of determining whether the JCCR mode is the second mode when cIdx and compIdx are not the same (S1390), and processes of deriving the residual block using mathematical formulas 1 to 3 (S1388, S1392, S1394).

[0172] For example, when tu_cbf_cb=1 and tu_cbf_cr=0 (JCCR mode=first mode, compIdx=1), residual samples (res(compIdx=1)) of the Cb chroma component can be derived from the transformation coefficients of the Cb chroma component (cIdx=1). For the Cb chroma component (cIdx=1), since cIdx=compIdx=1 (S1386), res(compIdx=1) is assigned to the Cb residual block (resSam(cIdx=1)), and the Cb residual block can be restored (S1388). In the case of the Cr chroma component (cIdx=2), cIdx≠compIdx (S1386) and since the JCCR mode≠second mode (S1390), the Cr residual block (resSam(cIdx=2)) can be derived using the residual samples (res(compIdx)) of the Cb chroma component (S1394).

[0173] As another example, when tu_cbf_cb=1 and tu_cbf_cr=1 (JCCR mode=second mode, compIdx=1), residual samples (res(compIdx=1)) of the Cb chroma component can be derived from the transformation coefficients of the Cb chroma component (cIdx=1). For the Cb chroma component (cIdx=1), since cIdx=compIdx=1 (S1386), res(compIdx=1) is assigned to the Cb residual block (resSam(cIdx=1)), and the Cb residual block can be restored (S1388). In the case of the Cr chroma component (cIdx=2), cIdx≠compIdx (S1386) and since the JCCR mode is the second mode (S1390), the Cr residual block (resSam(cIdx=2)) can be derived using the residual samples (res(compIdx)) of the Cb chroma component (S1392).

[0174] As another example, when tu_cbf_cb=0 and tu_cbf_cr=1 (JCCR mode=3rd mode, compIdx=2), residual samples (res(compIdx=2)) of the Cr chroma component can be derived from the transformation coefficients of the Cr chroma component (cIdx=2). For the Cr chroma component (cIdx=2), since cIdx=compIdx=2 (S1386), res(compIdx=2) is assigned to the Cr residual block (resSam(cIdx=2)), and the Cr residual block can be restored (S1388). In the case of the Cb chroma component (cIdx=1), cIdx≠compIdx (S1386) and since the JCCR mode≠second mode (S1390), the Cb residual block (resSam(cIdx=2)) can be derived using the residual samples (res(compIdx)) of the Cr chroma component (S1392).

[0176] The above description is merely an illustrative explanation of the technical concept of the present embodiment, and a person skilled in the art to which the present embodiment belongs would be able to make various modifications and variations within the scope of the essential characteristics of the present embodiment. Accordingly, the present embodiments are intended to explain, not limit, the technical concept of the present embodiment, and the scope of the technical concept of the present embodiment is not limited by these embodiments. The scope of protection of the present embodiment shall be interpreted by the claims below, and all technical concepts within an equivalent scope shall be interpreted as being included within the scope of rights of the present embodiment. Explanation of the symbols

[0177] 120, 440: Prediction unit 130: Subtractor 170, 450: Adder 180, 460: Filter section

Claims

Claim 1 A method for recovering residual blocks of a chroma block based on a JCCR (joint coding of chroma residuals) model, comprising: a step of determining the value of a first coded block flag and the value of a second coded block flag for a chroma block, wherein the first coded block flag indicates whether there is one or more non-zero transform coefficients in a Cb transform block and the second coded block flag indicates whether there is one or more non-zero transform coefficients in a Cr transform block; a step of determining a mode of the JCCR model among available modes based on the value of the first coded block flag and the value of the second coded block flag; and a step of determining a first chroma component having transform coefficients to be decoded from a bitstream among a Cb chroma component and a Cr chroma component based on the mode of the JCCR model. The method comprises: a step of decoding transform coefficients of the first chroma component from the bitstream; a step of deriving residual samples of the first chroma component by performing an inverse transform on the transform coefficients; and a step of deriving residual samples of the second chroma component among the Cb chroma component and the Cr chroma component based on the derived residual samples of the first chroma component, wherein the step of determining the value of the first encoding block flag and the value of the second encoding block flag comprises: a step of decoding a first syntax element from the bitstream that indicates whether one or more of the first encoding block flag and the second encoding block flag are 1; and a step of decoding a target encoding block flag from the bitstream that is either the first encoding block flag or the second encoding block flag when the first syntax element is 1.A method for recovering residual blocks of a chroma block, comprising the step of decoding a different encoding block flag from the bitstream when the target encoding block flag is 1, wherein when the target encoding block flag is 0, the decoding of the other encoding block flag is omitted and the other encoding block flag is set to 1, and when the first syntax element is 0, the decoding of the target encoding block flag and the other encoding block flag is omitted and the target encoding block flag and the other encoding block flag are set to 0. Claim 2 delete Claim 3 delete Claim 4 A method for recovering residual blocks of a chroma block according to claim 1, further comprising the step of decoding an application syntax element indicating whether the JCCR model is applied from a bitstream, wherein the step of determining the mode of the JCCR model is performed when the application syntax element indicates that the JCCR model is applied, and the application syntax element is decoded when at least one of the first encoding block flag and the second encoding block flag is 1 and the prediction mode of the chroma block is an intra mode, or when both the first encoding block flag and the second encoding block flag are 1. Claim 5 delete Claim 6 delete Claim 7 delete Claim 8 delete Claim 9 delete Claim 10 delete Claim 11 delete Claim 12 delete Claim 13 A method for encoding residual blocks of a chroma block based on a JCCR (joint coding of chroma residuals) model, comprising the step of deriving residual samples of Cb chroma components and residual samples of Cr chroma components; A step of determining a mode of a JCCR model among available modes for a chroma block; a step of encoding one or more syntax elements into a bitstream to signal the mode of the JCCR model, wherein each of the available modes is specified based on the value of the first encoding block flag and the value of the second encoding block flag, the first encoding block flag indicates whether there is one or more non-zero conversion coefficients in a Cb conversion block and the second encoding block flag indicates whether there is one or more non-zero conversion coefficients in a Cr conversion block; a step of determining, based on the mode of the JCCR model, a first chroma component having conversion coefficients to be encoded into the bitstream and a second chroma component having conversion coefficients not to be encoded into the bitstream among a Cb chroma component and a Cr chroma component. The method comprises: a step of deriving transformation coefficients of the first chroma component by performing a transformation on residual samples of the first chroma component; and a step of encoding the transformation coefficients of the first chroma component into the bitstream, wherein the step of encoding one or more syntax elements into the bitstream comprises: a step of encoding a first syntax element into the bitstream that indicates whether one or more of the first encoding block flag and the second encoding block flag are 1; and a step of encoding a target encoding block flag, which is either the first encoding block flag or the second encoding block flag, into the bitstream when the first syntax element is 1.A residual block encoding method of a chroma block, comprising the step of encoding a different encoding block flag other than the target encoding block flag into the bitstream when the target encoding block flag is 1, wherein when the target encoding block flag is 0, the encoding of the other encoding block flag is omitted and the other encoding block flag is set to 1, and when the first syntax element is 0, the encoding of the target encoding block flag and the other encoding block flag is omitted and the target encoding block flag and the other encoding block flag are set to 0. Claim 14 A method for providing image data to an image decoder, comprising: a step of encoding the image data into a bitstream; and a step of transmitting the bitstream to the image decoder, wherein the step of encoding the image data comprises: a step of deriving residual samples of a Cb chroma component and residual samples of a Cr chroma component for a chroma block; A step of determining a mode of a JCCR model among available modes for a chroma block; a step of encoding one or more syntax elements into a bitstream to signal the mode of the JCCR model, wherein each of the available modes is specified based on the value of the first encoding block flag and the value of the second encoding block flag, the first encoding block flag indicates whether there is one or more non-zero conversion coefficients in a Cb conversion block and the second encoding block flag indicates whether there is one or more non-zero conversion coefficients in a Cr conversion block; a step of determining, based on the mode of the JCCR model, a first chroma component having conversion coefficients to be encoded into the bitstream and a second chroma component having conversion coefficients not to be encoded into the bitstream among a Cb chroma component and a Cr chroma component. The method comprises: a step of deriving transformation coefficients of the first chroma component by performing a transformation on residual samples of the first chroma component; and a step of encoding the transformation coefficients of the first chroma component into the bitstream, wherein the step of encoding one or more syntax elements into the bitstream comprises: a step of encoding a first syntax element into the bitstream that indicates whether one or more of the first encoding block flag and the second encoding block flag is 1;A method for providing image data to an image decoding device, comprising: a step of encoding a target encoding block flag, which is either the first encoding block flag or the second encoding block flag, into the bitstream when the first syntax element is 1; and a step of encoding a different encoding block flag, other than the target encoding block flag, into the bitstream when the target encoding block flag is 1, wherein when the target encoding block flag is 0, the encoding of the other encoding block flag is omitted and the other encoding block flag is set to 1, and when the first syntax element is 0, the encoding of the target encoding block flag and the other encoding block flag is omitted and the target encoding block flag and the other encoding block flag are set to 0.