Video encoding and decoding method for predicting chroma component, and video encoding and decoding device for predicting chroma component

JP2025031938AInactive Publication Date: 2025-03-07SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024229570
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-04-29
Filing Date
2024-12-26
Publication Date
2025-03-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Benefits of technology

【0011】 一実施例によるクロマ成分を予測するビデオ符号化方法、復号方法、符号化装置及び復号装置は、クロマ成分を予測するCb成分及びCr成分間の類似性を用いて効果的にクロマ成分を符号化及び復号する方法を提供する。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025031938000001_ABST
    Figure 2025031938000001_ABST
Patent Text Reader

Abstract

To provide a video encoding and decoding method for predicting a chroma component, and a video encoding and decoding device for predicting a chroma component.SOLUTION: A video decoding method is proposed, including: determining a weight of a residual sample of a Cr component and a weight of a residual sample of a Cb component, on the basis of a prediction type of a coding unit, cbf information for the Cr component, and cbf information for the Cb component; obtaining a chroma joint residual sample of a current block from a bitstream; reconstructing the residual sample of the Cr component by using the chroma joint residual sample of the current block and the weight of the residual sample of the Cr component; and reconstructing the residual sample of the Cb component by using the chroma joint residual sample of the current block and the weight of the residual sample of the Cb component.SELECTED DRAWING: Figure 17
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the field of video encoding and decoding, and more particularly to a method and apparatus for encoding and decoding video with chroma component prediction. [Background technology]

[0002] High quality video requires a large amount of data when it is encoded. However, the bandwidth allowed for transmitting video data is limited, and the data rate applied when transmitting the video data may be restricted. Therefore, for efficient transmission of video data, a method for encoding and decoding video data that increases the compression rate while minimizing degradation of image quality is required.

[0003] Video data can be compressed by removing spatial and temporal redundancy between pixels. Since adjacent pixels generally have common characteristics, coding information is transmitted in data units consisting of pixels to remove the redundancy between adjacent pixels.

[0004] The pixel values ​​of pixels included in the data unit are not directly transmitted, but a method required to obtain the pixel values ​​is transmitted. A prediction method for predicting pixel values ​​similar to original values ​​is determined for each data unit, and coding information on the prediction method is transmitted from the encoder to the decoder. In addition, since the predicted value is not completely the same as the original value, residual data related to the difference between the original value and the predicted value is transmitted from the encoder to the decoder.

[0005] As prediction becomes more accurate, the coding information required to determine the prediction method increases, but the size of the residual data decreases. Therefore, the prediction method is determined in consideration of the coding information and the size of the residual data. In particular, data units divided from a picture have various sizes, and the larger the data unit, the more likely it is that the prediction accuracy will decrease, but on the other hand, the coding information will decrease. Therefore, the size of the block is determined according to the characteristics of the picture.

[0006] In addition, there are two types of prediction methods: intra prediction and inter prediction. Intra prediction is a method in which a block predicts pixels of a block from surrounding pixels. Inter prediction is a method in which pixels are predicted by referring to pixels of other pictures referenced by the picture containing the block. Thus, spatial redundancy is eliminated by intra prediction, and temporal redundancy is eliminated by inter prediction.

[0007] As the number of prediction methods increases, the amount of coding information for indicating the prediction methods increases. Therefore, the coding information applied to a block can also be predicted from other blocks to reduce the size of the coding information.

[0008] While video data loss is permitted to an extent that cannot be perceived by human vision, the amount of residual data can be reduced by lossy compression of the residual data through conversion and quantization processes. Summary of the Invention [Problem to be solved by the invention]

[0009] A technical problem to be solved is to efficiently encode and decode chroma components, i.e., Cr and Cb components, of a picture according to an embodiment. [Means for solving the problem]

[0010] A video decoding method according to an embodiment of the present invention includes the steps of: obtaining information indicating a prediction type of a coding unit including a current block from a bitstream; obtaining cbf information for a Cr component and cbf information for a Cb component of the current block from the bitstream; determining a weighted value of a residual sample of the Cr component and a weighted value of a residual sample of the Cb component based on the prediction type of the coding unit, the cbf information for the Cr component, and the cbf information for the Cb component; obtaining a chroma joint residual sample of the current block from the bitstream; and restoring a residual sample of the Cr component using the chroma joint residual sample and the weighted value of the residual sample of the Cr component of the current block, and restoring a residual sample of the Cb component using the chroma joint residual sample and the weighted value of the residual sample of the Cb component of the current block. Effect of the Invention

[0011] A video encoding method, a video decoding method, an encoding device, and a video decoding device that predict chroma components according to one embodiment provide a method for effectively encoding and decoding chroma components using similarity between Cb and Cr components that predict chroma components.

[0012] However, the effects that can be achieved by the video encoding method, decoding method, encoding device, and decoding device for predicting chroma components according to one embodiment are not limited to those mentioned above, and other effects not mentioned will be clearly understood by those having ordinary skill in the art to which the present invention pertains from the description below. [Brief description of the drawings]

[0013] In order to more fully understand the drawings referred to herein, a brief description of each drawing is provided. [Figure 1] 1 is a schematic block diagram of a video decoding device according to an embodiment of the present invention; [Diagram 2] 1 is a flowchart of a video decoding method according to an embodiment. [Diagram 3] 1 is a diagram illustrating a process in which a video decoding apparatus divides a current coding unit to determine at least one coding unit according to an embodiment. [Figure 4] 11 is a diagram illustrating a process in which a video decoding apparatus divides a non-square coding unit to determine at least one coding unit according to an embodiment. [Diagram 5] 11 is a diagram illustrating a process in which a video decoding apparatus divides a coding unit based on at least one of block shape information and partition shape mode information, according to an embodiment. [Figure 6] 1 is a diagram illustrating a method for a video decoding apparatus to determine a predetermined coding unit from an odd number of coding units, according to an embodiment. [Figure 7] 13 is a diagram illustrating an order in which a plurality of coding units are processed when a video decoding apparatus determines a plurality of coding units by dividing a current coding unit, according to an embodiment. [Figure 8] 11 is a diagram illustrating a process in which a video decoder determines that a current coding unit is to be divided into an odd number of coding units when it is not possible to process coding units in a predetermined order, according to one embodiment. [Figure 9] 11 is a diagram illustrating a process in which a video decoding apparatus divides a first coding unit to determine at least one coding unit according to an embodiment. [Figure 10] 11 is a diagram illustrating that, according to one embodiment, a video decoding device restricts the possible division forms of a second coding unit when a non-square second coding unit determined by dividing a first coding unit satisfies a certain condition. [Figure 11] 13 is a diagram illustrating a process in which a video decoding apparatus divides a square coding unit when division mode information does not indicate division into four square coding units, according to one embodiment. [Figure 12] 11 is a diagram illustrating that a processing order among a plurality of coding units differs depending on a division process of the coding units, according to an embodiment. [Figure 13]11 is a diagram illustrating a process of determining a depth of a coding unit according to different types and sizes of the coding units when a coding unit is recursively divided to determine a plurality of coding units according to an embodiment. [Figure 14] 1 is a diagram illustrating a depth determined according to a type and size of a coding unit and an index for a part of the coding unit (hereinafter, a part index, PID) according to an embodiment. [Figure 15] 1 is a diagram illustrating a plurality of coding units being determined according to a plurality of predetermined data units included in a picture according to an embodiment; [Figure 16] FIG. 1 is a block diagram showing a video encoding and decoding system. [Figure 17] 1 is a block diagram showing a video decoding device according to one embodiment; [Figure 18] 4 is a flowchart illustrating a video decoding method according to one embodiment. [Figure 19] 1 is a block diagram showing a video encoding device according to an embodiment; [Figure 20] 2 is a flowchart illustrating a video encoding method according to an embodiment. [Figure 21] 1 is a graph illustrating a relationship between the Cb component, the Cr component, and the chroma coding component according to one embodiment. [Figure 22] 13 is a diagram illustrating a relationship between a Cb component, a Cr component, and a chroma coding component according to an embodiment. [Figure 23] 1 is a diagram showing a transform unit syntax according to an embodiment. [Figure 24] 13 is a diagram illustrating a relationship between a Cb component, a Cr component, and a chroma coding component in relation to a combination of a Cb cbf value and a Cr cbf value according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] A method for decoding motion information according to an embodiment of the present invention may include the steps of: obtaining information indicating a prediction type of a coding unit including a current block from a bitstream; obtaining cbf information for a Cr component and cbf information for a Cb component of the current block from the bitstream; determining a weighted value of a residual sample of the Cr component and a weighted value of a residual sample of the Cb component based on the prediction type of the coding unit, the cbf information for the Cr component, and the cbf information for the Cb component; obtaining a chroma joint residual sample of the current block from the bitstream; and restoring a residual sample of the Cr component using the chroma joint residual sample and the weighted value of the residual sample of the Cr component of the current block, and restoring a residual sample of the Cb component using the chroma joint residual sample and the weighted value of the residual sample of the Cb component of the current block.

[0015] According to an embodiment, the step of determining a weighted value of the residual sample of the Cr component and a weighted value of the residual sample of the Cb component may include: obtaining chroma joint information indicating whether one chroma sample is encoded to indicate a residual sample of the Cb component and a corresponding residual sample of the Cr component in the current block based on a prediction type of the coding unit, cbf information for the Cr component, and cbf information for the Cb component; and when the chroma joint information indicates that one chroma sample is encoded in the current block, determining a weighted value of the residual sample of the Cr component and a weighted value of the residual sample of the Cb component based on a prediction type of the coding unit, cbf information for the Cr component, and cbf information for the Cb component.

[0016] According to one embodiment, the weight of the residual sample of the Cr component is −½, and the weight of the residual sample of the Cb component is 1.

[0017] According to one embodiment, the weight of the residual sample of the Cr component is −1, and the weight of the residual sample of the Cb component is 1.

[0018] According to one embodiment, the weight of the residual sample of the Cr component is 1, and the weight of the residual sample of the Cb component is −1 / 2.

[0019] According to one embodiment, the step of determining the weighting value of the residual sample of the Cr component and the weighting value of the residual sample of the Cb component may include a step of setting the number of joint modes corresponding to a combination of the weighting value of the residual sample of the Cr component and the weighting value of the residual sample of the Cb component differently depending on whether the prediction type of the coding unit is an intra prediction mode or an inter prediction mode.

[0020] According to one embodiment, the step of determining a weighting value of the residual sample of the Cr component and a weighting value of the residual sample of the Cb component includes, when a prediction type of the coding unit is an intra prediction mode, selecting one of a number of joint modes based on cbf information for the Cr component and cbf information for the Cb component, and determining a weighting value of the residual sample of the Cr component and a weighting value of the residual sample of the Cb component according to the selected joint mode.

[0021] According to one embodiment, the step of determining a weighting value of the residual sample of the Cr component and a weighting value of the residual sample of the Cb component includes a step of determining a weighting value of the residual sample of the Cr component and a weighting value of the residual sample of the Cb component according to one allowed joint mode when the prediction type of the coding unit is an inter prediction mode.

[0022] According to one embodiment, the video decoding method includes: determining a joint mode including a weighted value of a residual sample of the Cr component and a weighted value of a residual sample of the Cb component based on the chroma joint information, cbf information for the Cr component, and cbf information for the Cb component; and determining a quantization parameter for the current block based on the joint mode.

[0023] A video decoding device according to an embodiment of the present invention includes an acquisition unit that acquires information indicating a prediction type of a coding unit including a current block from a bitstream, acquires cbf information for a Cr component and cbf information for a Cb component of the current block from the bitstream, and acquires a chroma joint residual sample of the current block from the bitstream; and a decoding unit that determines a weighted value of the residual sample of the Cr component and a weighted value of the residual sample of the Cb component based on the prediction type of the coding unit, the cbf information for the Cr component, and the cbf information for the Cb component, restores the residual sample of the Cr component using the chroma joint residual sample of the current block and the weighted value of the residual sample of the Cr component, and restores the residual sample of the Cb component using the chroma joint residual sample of the current block and the weighted value of the residual sample of the Cb component.

[0024] According to one embodiment, the acquisition unit acquires chroma joint information indicating whether one chroma sample is encoded to indicate a residual sample of the Cb component and a corresponding residual sample of the Cr component in the current block based on a prediction type of the coding unit, cbf information for the Cr component, and cbf information for the Cb component from the bitstream. When the chroma joint information indicates that one chroma sample is encoded, the decoding unit determines a weighting value of the residual sample of the Cr component and a weighting value of the residual sample of the Cb component based on a prediction type of the coding unit, cbf information for the Cr component, and cbf information for the Cb component. The number of joint modes corresponding to a combination of the weighting value of the residual sample of the Cr component and the weighting value of the residual sample of the Cb component may be set differently depending on whether the prediction type of the coding unit is an intra prediction mode or an inter prediction mode.

[0025] According to an embodiment, when a prediction type of the coding unit is an inter prediction mode, the decoder determines a weighted value of the residual sample of the Cr component and a weighted value of the residual sample of the Cb component according to one allowed joint mode.

[0026] A video encoding method according to an embodiment proposed in the present invention includes a step of determining a prediction type of a coding unit including a current block; a step of determining cbf information for a Cr component and cbf information for a Cb component of the current block; a step of determining a weighted value of a residual sample of the Cr component and a weighted value of a residual sample of the Cb component based on the prediction type of the coding unit, the cbf information for the Cr component, and the cbf information for the Cb component; and a step of generating a chroma joint residual sample of the current block; wherein the residual sample of the Cr component may be reconstructed using the chroma joint residual sample of the current block and the weighted value of the residual sample of the Cr component, and the residual sample of the Cb component may be reconstructed using the chroma joint residual sample of the current block and the weighted value of the residual sample of the Cb component of the current block.

[0027] According to one embodiment, the video encoding method further includes a step of generating chroma joint information indicating whether one chroma sample is encoded to indicate a residual sample of the Cb component and a corresponding residual sample of the Cr component in the current block, and when one chroma sample is encoded in the current block, a weighted value of the residual sample of the Cr component and a weighted value of the residual sample of the Cb component are determined based on a prediction type of the coding unit, cbf information for the Cr component and cbf information for the Cb component, and the number of joint modes corresponding to a combination of the weighted value of the residual sample of the Cr component and the weighted value of the residual sample of the Cb component may be set differently depending on whether the prediction type of the coding unit is an intra prediction mode or an inter prediction mode.

[0028] According to one embodiment, the step of determining a weighting value of the residual sample of the Cr component and a weighting value of the residual sample of the Cb component includes the steps of: when a prediction type of the coding unit is an intra prediction mode, selecting one of a number of joint modes based on cbf information for the Cr component and cbf information for the Cb component, and determining a weighting value of the residual sample of the Cr component and a weighting value of the residual sample of the Cb component according to the selected joint mode; and when a prediction type of the coding unit is an inter prediction mode, determining a weighting value of the residual sample of the Cr component and a weighting value of the residual sample of the Cb component according to one allowed joint mode.

[0029] A computer-readable recording medium having a program recorded thereon for implementing a video decoding method in a computer according to an embodiment of the present invention is disclosed.

[0030] A computer-readable recording medium having a program recorded thereon for implementing a video encoding method in a computer according to an embodiment of the present invention is disclosed.

[0031] The present invention can be modified in various ways and have various embodiments, and specific embodiments are illustrated in the drawings and will be described in detail through detailed descriptions. However, this is not intended to limit the embodiments of the present disclosure, and the present disclosure should be understood to include all modifications, equivalents, or alternatives included in the spirit and technical scope of the various embodiments.

[0032] In describing the embodiments, if a detailed description of related prior art is deemed to unnecessarily obscure the gist of the present disclosure, the detailed description will be omitted. In addition, numbers (e.g., 1, 2, etc.) used in the description of the specification are merely identification symbols for distinguishing one component from another.

[0033] Furthermore, in this specification, when a component is referred to as being "coupled" or "connected" to another component, it should be understood that the component is directly coupled or connected to the other component, but unless otherwise specified to the contrary, it is coupled or connected via another component in between.

[0034] In addition, in this specification, components expressed as "units", "modules", etc. may be two or more components combined into one component, or one component may be divided into two or more components based on a further divided function. In addition, each component described below may perform a part or all of the functions of other components in addition to its main function, and some of the main functions of each component may be exclusively performed by other components.

[0035] Also, in this specification, an "image" or "picture" refers to either a still image from a video or a moving image, i.e., the video itself.

[0036] In this specification, a "sample" refers to data assigned to a sampling position of an image and to be processed. For example, a pixel value in a spatial domain image and a transform coefficient in a transform domain are also samples. A unit including at least one such sample is defined as a block.

[0037] In addition, in this specification, the term "current block" refers to a block of the maximum coding unit, coding unit, prediction unit, or transform unit of a current image to be coded or decoded.

[0038] In addition, in this specification, a motion vector in the list 0 direction means that the motion vector is used to indicate a block in a reference picture included in list 0, and a motion vector in the list 1 direction means that the motion vector is used to indicate a block in a reference picture included in list 1. In addition, a motion vector being unidirectional means that the motion vector is used to indicate a block in a reference picture included in list 0 or list 1, and a motion vector being bidirectional means that the motion vector includes a motion vector in the list 0 direction and a motion vector in the list 1 direction.

[0039] Hereinafter, a video encoding apparatus, a video decoding apparatus, a video encoding method, and a video decoding method according to an embodiment will be described with reference to Figures 1 to 16. A method for determining a data unit of an image according to an embodiment will be described with reference to Figures 3 to 16, and a video encoding / decoding method using tiles and tile groups according to an embodiment will be described later with reference to Figures 17 to 28.

[0040] Hereinafter, a method and apparatus for adaptively selecting based on various types of coding units according to an embodiment of the present disclosure will be described with reference to FIGS.

[0041] FIG. 1 is a block diagram illustrating a video decoding device according to an embodiment.

[0042] The video decoding device 100 includes a receiving unit 110 and a decoding unit 120. The receiving unit 110 and the decoding unit 120 may each include at least one processor. Also, the receiving unit 110 and the decoding unit 120 may each include a memory that stores instructions executed by the at least one processor.

[0043] The receiving unit 110 may receive a bitstream. The bitstream includes information obtained by encoding an image by a video encoding device 2200, which will be described later. The bitstream may be transmitted from the video encoding device 2200. The video encoding device 2200 and the video decoding device 100 may be connected to each other via a wired or wireless connection, and the receiving unit 110 may receive the bitstream via a wired or wireless connection. The receiving unit 110 may receive the bitstream from a recording medium such as an optical medium or a hard disk. The decoding unit 120 may restore an image based on information acquired from the received bitstream. The decoding unit 120 may acquire syntax elements for restoring an image from the bitstream. The decoding unit 120 may restore an image based on the syntax elements.

[0044] The operation of the video decoding device 100 will be described in further detail in conjunction with FIG.

[0045] FIG. 2 is a flow chart illustrating a video decoding method according to an embodiment.

[0046] According to one embodiment of the present invention, the receiver 110 receives a bitstream.

[0047] The video decoding apparatus 100 performs a step of acquiring (210) a bin string corresponding to a partition mode of a coding unit from a bitstream. The video decoding apparatus 100 performs a step of determining (220) a partition rule of the coding unit. The video decoding apparatus 100 also performs a step of dividing (230) the coding unit into a plurality of coding units based on at least one of the bin string corresponding to the partition mode and the partition rule. To determine the partition rule, the video decoding apparatus 100 may determine a first allowable range of the coding unit size according to a ratio of a width and a height of the coding unit. To determine the partition rule, the video decoding apparatus 100 may determine a second allowable range of the coding unit size according to a partition mode of the coding unit.

[0048] Hereinafter, the division of coding units will be described in detail according to an embodiment of the present disclosure.

[0049] First, one picture can be divided into one or more slices or one or more tiles. One slice or one tile is also a sequence of one or more maximal coding units (Coding Tree Units (CTUs)). A concept that contrasts with the maximal coding unit (CTU) is the maximal coding block (Coding Tree Block (CTB)).

[0050] A maximal coding block (CTB) means an NxN block containing NxN samples, where N is an integer. Each color component may be divided into one or more maximal coding blocks.

[0051] When a picture has three sample arrays (sample arrays for Y, Cr, and Cb components), the largest coding unit (CTU) is a unit that includes the largest coded block of luma samples, the two largest coded blocks of corresponding chroma samples, and a syntax structure used to code the luma samples and chroma samples. When a picture is a monochrome picture, the largest coding unit is a unit that includes the largest coded block of monochrome samples and a syntax structure used to code the monochrome samples. When a picture is a picture that is coded into color planes separated by color components, the largest coding unit is a unit that includes the picture and a syntax structure used to code the samples of the picture.

[0052] One maximal coding block (CTB) may be divided into MxN coding blocks containing MxN samples (M, N are integers).

[0053] When a picture has sample arrays for Y, Cr, and Cb components, a coding unit (CU) is a unit including a coding block of luma samples, two coding blocks of corresponding chroma samples, and a syntax structure used to code the luma samples and chroma samples. When a picture is a monochrome picture, a coding unit is a unit including a coding block of monochrome samples and a syntax structure used to code the monochrome samples. When a picture is a picture coded into color planes separated by color components, a coding unit is a unit including the picture and a syntax structure used to code the samples of the picture.

[0054] As described above, the largest coding block and the largest coding unit are distinct concepts, and the coding block and the coding unit are distinct concepts. That is, the (largest) coding unit refers to a data structure including a (largest) coding block including a corresponding sample and a syntax structure corresponding thereto. However, since a person skilled in the art can understand that the (largest) coding unit or the (largest) coding block refers to a block of a predetermined size including a predetermined number of samples, in the following description, the largest coding block and the largest coding unit, or the coding block and the coding unit, will be referred to without distinction unless there is a special reason.

[0055] An image may be divided into maximum coding units (CTUs). The size of the maximum coding units may be determined based on information obtained from a bitstream. The shape of the maximum coding units may have a square shape of the same size, but is not limited thereto.

[0056] For example, information regarding a maximum size of a luma coding block may be obtained from a bitstream, where the maximum size of the luma coding block indicated by the information regarding the maximum size of the luma coding block may be any one of 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, and 256x256.

[0057] For example, information on the maximum size of a luma coding block that can be divided into two and information on the luma block size difference may be obtained from a bitstream. The information on the luma block size difference may indicate a size difference between the luma maximum coding unit and the maximum luma coding block that can be divided into two. Therefore, the size of the luma maximum coding unit may be determined by combining the information on the maximum size of a luma coding block that can be divided into two and the information on the luma block size difference obtained from the bitstream. The size of the chroma maximum coding unit may also be determined by using the size of the luma maximum coding unit. For example, if the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chroma block is half the size of the luma block, and similarly, the size of the chroma maximum coding unit is half the size of the luma maximum coding unit.

[0058] According to an embodiment, information on the maximum size of a luma coding block that can be binary split is obtained from a bitstream, so that the maximum size of a luma coding block that can be binary split is variably determined. Alternatively, the maximum size of a luma coding block that can be ternary split may be fixed. For example, the maximum size of a luma coding block that can be ternary split in an I picture is 32x32, and the maximum size of a luma coding block that can be ternary split in a P picture or a B picture is 64x64.

[0059] Also, the maximum coding unit may be hierarchically divided into coding units based on the partition mode information acquired from the bitstream. As the partition mode information, at least one of information indicating whether or not a quad split is performed, information indicating whether or not a multi-partition is performed, partition direction information, and partition type information may be acquired from the bitstream.

[0060] For example, the information indicating whether or not a quad split is performed indicates whether or not the current coding unit is to be quad split (QUAD_SPLIT).

[0061] If the current coding unit is not split into quads, the information indicating whether the current coding unit is to be split further indicates whether the current coding unit is not to be split any further (NO_SPLIT) or is to be split into binary / ternary.

[0062] If the current coding unit is binary- or ternary-divided, the division direction information indicates that the current coding unit is divided in one of the horizontal and vertical directions.

[0063] If the current coding unit is split in the horizontal or vertical direction, the partition type information indicates that the current coding unit is to be split into a binary partition or a ternary partition.

[0064] The partition mode of the current coding unit may be determined according to the partition direction information and the partition type information. If the current coding unit is binary partitioned horizontally, the partition mode may be binary horizontal partition (SPLIT_BT_HOR), if the current coding unit is ternary partitioned horizontally, the partition mode may be ternary horizontal partition (SPLIT_TT_HOR), if the current coding unit is binary partitioned vertically, the partition mode may be binary vertical partition (SPLIT_BT_VER), and if the current coding unit is ternary partitioned vertically, the partition mode may be ternary vertical partition (SPLIT_BT_VER).

[0065] The video decoding apparatus 100 acquires partition mode information from a bin string from a bitstream. The format of the bitstream received by the video decoding apparatus 100 may include a fixed length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. The bin string indicates information as a sequence of binary numbers. The bin string may be composed of at least one bit. The video decoding apparatus 100 may acquire partition mode information corresponding to the bin string based on a partition rule. The video decoding apparatus 100 may determine whether to partition a coding unit into quads, or a partition direction and a partition type, based on the bin string.

[0066] The coding unit is smaller than or equal to the maximum coding unit. For example, the maximum coding unit is also a coding unit having a maximum size, and is therefore one of the coding units. If the partition mode information related to the maximum coding unit indicates that it is not partitioned, the coding unit determined by the maximum coding unit has the same size as the maximum coding unit. If the partition mode information related to the maximum coding unit indicates that it is partitioned, the maximum coding unit may be partitioned into coding units. Also, if the partition mode information related to the coding unit indicates that it is partitioned, the coding unit may be partitioned into coding units of smaller sizes. However, the partitioning of the image is not limited thereto, and the maximum coding unit and the coding units may not be distinguished. The partitioning of the coding units will be described in more detail with reference to FIG. 3 to FIG. 16.

[0067] Also, one or more prediction blocks for prediction may be determined from the coding unit, where the prediction blocks may be the same as or smaller than the coding unit, and one or more transform blocks for transformation may be determined from the coding unit, where the transform blocks may be the same as or smaller than the coding unit.

[0068] The shapes and sizes of the transform and prediction blocks are independent of each other.

[0069] In other embodiments, prediction may be performed using the coding unit as a prediction block, and transformation may be performed using the coding unit as a transform block.

[0070] The division of the coding unit will be described in more detail with reference to FIG. 3 to FIG. 16. In the present disclosure, the current block and the neighboring blocks refer to one of the largest coding unit, the coding unit, the prediction block, and the transformation block. In addition, the current block or the current coding unit is a block currently being decoded or encoded, or a block currently being divided. The neighboring blocks are also blocks that are restored before the current block. The neighboring blocks may be spatially or temporally adjacent to the current block. The neighboring blocks may be located at one of the lower left side, the left side, the upper left side, the upper side, the upper right side, the right side, and the lower right side of the current block.

[0071] FIG. 3 illustrates a process in which a video decoding apparatus divides a current coding unit to determine at least one coding unit according to an embodiment.

[0072] The block shape may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N, where N is a positive integer. The block shape information is information indicating at least one of the shape, direction, width and height ratio, or size of a coding unit.

[0073] The shape of the coding unit may include a square and a non-square. If the width and height of the coding unit are the same (i.e., the block shape of the coding unit is 4Nx4N), the video decoding device 100 determines the block shape information of the coding unit to be a square. The video decoding device 100 determines the shape of the coding unit to be a non-square.

[0074] When the width and height of the coding unit are different (i.e., when the block shape of the coding unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the video decoding device 100 determines the block shape information of the coding unit to be non-square. When the shape of the coding unit is non-square, the video decoding device 100 determines the ratio of the width and height of the block shape information of the coding unit to at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, and 32:1. Based on the width and height of the coding unit, the video decoding device 100 determines whether the coding unit is horizontal or vertical. Based on at least one of the width, height, or width of the coding unit, the video decoding device 100 may determine the size of the coding unit.

[0075] According to an embodiment, the video decoding device 100 determines the type of the coding unit using the block type information, and determines the type of the coding unit to be partitioned using the partition type mode information. That is, depending on the block type indicated by the block type information used by the video decoding device 100, a partitioning method of the coding unit indicated by the partition type mode information may be determined.

[0076] The video decoding apparatus 100 may acquire the partition mode information from a bitstream. However, the present invention is not limited thereto, and the video decoding apparatus 100 and the video encoding apparatus 2200 may determine the partition mode information pre-committed based on the block format information. The video decoding apparatus 100 may determine the partition mode information pre-committed for the maximum coding unit or the minimum coding unit. For example, the video decoding apparatus 100 may determine the partition mode information for the maximum coding unit to be quad split. Also, the video decoding apparatus 100 may determine the partition mode information for the minimum coding unit to be "not split". Specifically, the video decoding apparatus 100 may determine the size of the maximum coding unit to be 256x256. The video decoding apparatus 100 may determine the pre-committed partition mode information to be quad split. Quad split is a partition mode in which both the width and height of the coding unit are divided into two equal parts. The video decoding device 100 may obtain a coding unit of 128x128 size from a maximum coding unit of 256x256 size based on the partition mode information. Also, the video decoding device 100 may determine the size of the minimum coding unit to be 4x4. The video decoding device 100 may obtain partition mode information indicating "no partition" for the minimum coding unit.

[0077] According to an embodiment, the video decoding device 100 may use block shape information indicating that the current coding unit is a square. For example, the video decoding device 100 may determine whether to not split the square coding unit, to split it vertically, to split it horizontally, or to split it into four coding units, depending on the partition shape mode information. Referring to FIG. 3, when the block shape information of the current coding unit 300 indicates a square, the decoder 120 may not split the coding unit 310a having the same size as the current coding unit 300 depending on the partition shape mode information indicating no partition, or may determine the divided coding units 310b, 310c, 310d, 310e, 310f, etc., depending on the partition shape mode information indicating a predetermined partition method.

[0078] 3, the video decoding device 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the partition mode information indicating that the current coding unit 300 is divided in the vertical direction according to an embodiment. The video decoding device 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the partition mode information indicating that the current coding unit 300 is divided in the horizontal direction. The video decoding device 100 may determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical and horizontal directions based on the partition mode information indicating that the current coding unit 300 is divided in the vertical and horizontal directions according to an embodiment. The video decoding device 100 may determine three coding units 310e obtained by dividing the current coding unit 300 in the vertical direction based on the partition mode information indicating that the current coding unit 300 is divided in a ternary manner in the vertical direction. The video decoding device 100 may determine three coding units 310f obtained by dividing the current coding unit 300 in the horizontal direction based on the partition mode information indicating that the current coding unit 300 is divided in a ternary manner in the horizontal direction. However, the division pattern in which the square coding unit is divided should not be construed as being limited to the above-mentioned pattern, and includes various patterns that can be indicated by the division pattern mode information. The predetermined division pattern in which the square coding unit is divided will be described in detail below through various examples.

[0079] FIG. 4 illustrates a process in which a video decoding apparatus divides a non-square coding unit to determine at least one coding unit, according to an embodiment.

[0080] According to an embodiment, the video decoding apparatus 100 can use block shape information indicating that the current coding unit is non-square. The video decoding apparatus 100 determines whether to not split the non-square current coding unit or to split it in a predetermined manner according to the partition shape mode information. Referring to FIG. 4, when the block shape information of the current coding unit 400 or 450 indicates a non-square, the video decoding apparatus 100 determines coding units 410 or 460 having the same size as the current coding unit 400 or 450 according to partition shape mode information indicating no partition, or determines partitioned coding units 420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, 480c according to partition shape mode information indicating a predetermined partition method. The predetermined partition method for splitting the non-square coding unit will be described in detail below through various embodiments.

[0081] According to an embodiment, the video decoding device 100 determines a manner in which a coding unit is divided using the partition mode information, where the partition mode information indicates the number of at least one coding unit to be generated by dividing the coding unit. Referring to Fig. 4, when the partition mode information indicates that the current coding unit 400 or 450 is divided into two coding units, the video decoding device 100 divides the current coding unit 400 or 450 based on the partition mode information to determine two coding units 420a, 420b, or 470a, 470b included in the current coding unit.

[0082] According to an embodiment, when the video decoding device 100 divides the non-square current coding unit 400 or 450 based on the division shape mode information, the video decoding device 100 may divide the current coding unit by considering the position of a long side of the non-square current coding unit 400 or 450. For example, the video decoding device 100 may determine a plurality of coding units by dividing the current coding unit 400 or 450 in a direction that divides the long side of the current coding unit 400 or 450 by considering the shape of the current coding unit 400 or 450.

[0083] According to one embodiment, when the partition mode information indicates that the coding unit is to be partitioned into an odd number of blocks (ternary partitioning), the video decoding device 100 determines an odd number of coding units included in the current coding unit 400 or 450. For example, when the partition mode information indicates that the current coding unit 400 or 450 is to be partitioned into three coding units, the video decoding device 100 may partition the current coding unit 400 or 450 into three coding units 430a, 430b, 430c, 480a, 480b, and 480c.

[0084] According to an embodiment, the width-to-height ratio of the current coding unit 400 or 450 may be 4:1 or 1:4. When the width-to-height ratio is 4:1, the width is longer than the height, so the block shape information is also horizontal. When the width-to-height ratio is 1:4, the width is shorter than the height, so the block shape information is also vertical. The video decoding apparatus 100 determines to divide the current coding unit into an odd number of blocks based on the partition shape mode information. In addition, the video decoding apparatus 100 determines a partition direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current coding unit 400 is vertical, the video decoding apparatus 100 may divide the current coding unit 400 in the horizontal direction to determine coding units 430a, 430b, and 430c. Also, if the current coding unit 450 is horizontal, the video decoding apparatus 100 may determine coding units 480a, 480b, and 480c by dividing the current coding unit 450 vertically.

[0085] According to an embodiment, the video decoding apparatus 100 determines an odd number of coding units included in the current coding unit 400 or 450, and the determined coding units are not all the same in size. For example, the size of a certain coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c is different from the other coding units 430a, 430c, 480a, and 480c. That is, the coding units that may be determined by dividing the current coding unit 400 or 450 have a plurality of sizes, and in some cases, the odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c have different sizes.

[0086] According to an embodiment, when the partition mode information indicates that a coding unit is partitioned into an odd number of blocks, the video decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and may place a certain restriction on at least one of the odd number of coding units generated by the partition. Referring to Fig. 4, the video decoding device 100 may perform a decoding process for the central coding unit 430b, 480b among three coding units 430a, 430b, 430c, 480a, 480b, 480c generated by partitioning the current coding unit 400 or 450 differently from the other coding units 430a, 430c, 480a, 480c. For example, the video decoding device 100 may limit the coding units 430b and 480b located in the center from being further divided, or may limit them to being divided only a certain number of times, unlike the other coding units 430a, 430c, 480a, and 480c.

[0087] FIG. 5 illustrates a process in which a video decoding apparatus divides a coding unit based on at least one of block configuration information and partition configuration mode information, according to an embodiment.

[0088] According to an embodiment, the video decoding device 100 determines whether to divide the square first coding unit 500 into coding units or not based on at least one of the block shape information and the partition shape mode information. According to an embodiment, if the partition shape mode information indicates that the first coding unit 500 is to be partitioned horizontally, the video decoding device 100 determines the second coding unit 510 by partitioning the first coding unit 500 horizontally. The first coding unit, the second coding unit, and the third coding unit used according to an embodiment are terms used to understand the partitioning context between the coding units. For example, if the first coding unit is partitioned, the second coding unit may be determined, and if the second coding unit is partitioned, the third coding unit may be determined. In the following, the relationship between the first coding unit, the second coding unit, and the third coding unit used may be understood to be according to the above-mentioned characteristics.

[0089] According to an embodiment, the video decoding device 100 determines whether to divide the determined second coding unit 510 into coding units based on the partition mode information. Referring to FIG. 5, the video decoding device 100 divides the determined non-square second coding unit 510 by dividing the first coding unit 500 into at least one third coding unit 520a, 520b, 520c, 520d, etc. based on the partition mode information, or does not divide the second coding unit 510. The video decoding device 100 acquires the partition mode information, and divides the first coding unit 500 into a plurality of second coding units (e.g., 510) of various types based on the acquired partition mode information, and the second coding unit 510 may be divided according to the manner in which the first coding unit 500 was divided based on the partition mode information. According to one embodiment, if the first coding unit 500 is split into the second coding unit 510 based on the split mode information related to the first coding unit 500, the second coding unit 510 is also split into the third coding units (e.g., 520a, 520b, 520c, 520d, etc.) based on the split mode information related to the second coding unit 510. That is, the coding units may be split recursively based on the split mode information related to each coding unit. Thus, a square coding unit may be determined from a non-square coding unit, and the square coding unit may be recursively split to determine a non-square coding unit.

[0090] 5, a certain coding unit (e.g., a coding unit located in the center or a square coding unit) among the odd number of third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510 may be divided recursively. According to an embodiment, the non-square third coding unit 520b among the odd number of third coding units 520b, 520c, and 520d may be divided horizontally into a plurality of fourth coding units. The non-square fourth coding unit 530b or 530d among the plurality of fourth coding units 530a, 530b, 530c, and 530d may be divided again into a plurality of coding units. For example, the non-square fourth coding unit 530b or 530d may be divided again into an odd number of coding units. A method used for recursive division of coding units will be described below through various embodiments.

[0091] According to an embodiment, the video decoding device 100 divides each of the third coding units 520a, 520b, 520c, 520d, etc. into coding units based on the partition mode information. Also, the video decoding device 100 determines not to divide the second coding unit 510 based on the partition mode information. According to an embodiment, the video decoding device 100 divides the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, 520d. The video decoding device 100 places a certain restriction on a certain third coding unit among the odd number of third coding units 520b, 520c, 520d. For example, the video decoding device 100 may restrict the coding unit 520c located in the center of the odd number of third coding units 520b, 520c, 520d so that it is not further divided or that it must be divided a settable number of times.

[0092] 5, the video decoding apparatus 100 may limit the centrally located coding unit 520c among the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to not be further divided, to be divided into a predetermined division form (e.g., into only four coding units, or into a form corresponding to the division form of the second coding unit 510), or to be divided only a predetermined number of times (e.g., divided only n times, n>0). However, the above restrictions on the centrally located coding unit 520c are merely examples, and should not be interpreted as being limited by the above-mentioned embodiment, but should be interpreted as including various restrictions in which the centrally located coding unit 520c is decoded differently from the other coding units 520b and 520d.

[0093] According to an embodiment, the video decoding apparatus 100 may obtain partition mode information used to partition the current coding unit at a predetermined position within the current coding unit.

[0094] FIG. 6 illustrates a method for a video decoding apparatus to determine a predetermined coding unit from among an odd number of coding units according to an embodiment.

[0095] 6, the partition mode information of the current coding unit 600, 650 may be obtained from a sample at a predetermined position (e.g., samples 640, 690 located at the center) among a plurality of samples included in the current coding unit 600, 650. However, the predetermined position in the current coding unit 600 from which at least one of the partition mode information is obtained should not be interpreted as being limited to the center position shown in FIG. 6, but should be interpreted as including various positions (e.g., top end, bottom end, left end, right end, top left end, bottom left end, top right end, bottom right end, etc.) included in the current coding unit 600. The video decoding device 100 may obtain the partition mode information obtained from the predetermined position and determine whether to divide the current coding unit into coding units of various types and sizes or not to divide the current coding unit.

[0096] According to an embodiment, when a current coding unit is divided into a predetermined number of coding units, the video decoding apparatus 100 may select one of the coding units. There are various methods for selecting one of the multiple coding units, and the methods will be described later through various embodiments.

[0097] According to an embodiment, the video decoding device 100 may divide a current coding unit into a plurality of coding units and determine a coding unit at a predetermined position. According to an embodiment, the video decoding device 100 may use information indicating the positions of each odd coding unit to determine a coding unit located at a center among the odd coding units. Referring to FIG. 6, the video decoding device 100 may divide a current coding unit 600 or a current coding unit 650 to determine odd coding units 620a, 620b, and 620c or odd coding units 660a, 660b, and 660c. The video decoding device 100 may determine a center coding unit 620b or a center coding unit 660b using information regarding the positions of the odd coding units 620a, 620b, and 620c or the odd coding units 660a, 660b, and 660c. For example, the video decoding device 100 may determine the positions of the coding units 620a, 620b, and 620c based on information indicating positions of predetermined samples included in the coding units 620a, 620b, and 620c, thereby determining the coding unit 620b located at the center. Specifically, the video decoding device 100 may determine the positions of the coding units 620a, 620b, and 620c based on information indicating positions of upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c, thereby determining the coding unit 620b located at the center.

[0098] According to an embodiment, the information indicating the positions of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, may include information related to the positions or coordinates of the coding units 620a, 620b, and 620c in a picture. According to an embodiment, the information indicating the positions of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, may include information indicating a width or height of the coding units 620a, 620b, and 620c included in the current coding unit 600, and such width or height may correspond to information indicating a difference between the coordinates of the coding units 620a, 620b, and 620c in a picture. That is, the video decoding device 100 can determine the coding unit 620b located in the center by directly using information related to the positions or coordinates of the coding units 620a, 620b, and 620c within the picture, or by using information related to the width or height of the coding unit corresponding to the difference between the coordinates.

[0099] According to an embodiment, information indicating a position of the top left sample 630a of the top coding unit 620a may indicate (xa, ya) coordinates, information indicating a position of the top left sample 630b of the central coding unit 620b may indicate (xb, yb) coordinates, and information indicating a position of the top left sample 630c of the bottom coding unit 620c may indicate (xc, yc) coordinates. The video decoding device 100 may determine the central coding unit 620b using the coordinates of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the top left samples 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the centrally located sample 630b is determined as the centrally located coding unit among the coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. However, the coordinates indicating the positions of the top left samples 630a, 630b, and 630c indicate absolute positions within a picture, and further, the (dxb, dyb) coordinates indicating the relative position of the top left sample 630b of the central coding unit 620b and the (dxc, dyc) coordinates indicating the relative position of the top left sample 630c of the bottom coding unit 620c may be used. In addition, by using the coordinates of a sample as information indicating the position of the sample included in the coding unit, the method of determining a coding unit at a predetermined position should not be interpreted as being limited to the above-mentioned method, but should be interpreted as various arithmetic methods that can use the coordinates of the sample.

[0100] According to an embodiment, the video decoder 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c, and may select a coding unit from among the coding units 620a, 620b, and 620c according to a predetermined criterion. For example, the video decoder 100 may select a coding unit 620b having a different size from among the coding units 620a, 620b, and 620c.

[0101] According to an embodiment, the video decoding device 100 may determine the width or height of each of the coding units 620a, 620b, and 620c using (xa, ya) coordinates indicating the position of the top left sample 630a of the top coding unit 620a, (xb, yb) coordinates indicating the position of the top left sample 630b of the middle coding unit 620b, and (xc, yc) coordinates indicating the position of the top left sample 630c of the bottom coding unit 620c. The video decoding device 100 may determine the size of each of the coding units 620a, 620b, and 620c using (xa, ya), (xb, yb), and (xc, yc) coordinates indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the video decoding device 100 determines the width of the top coding unit 620a as the width of the current coding unit 600. The video decoding device 100 determines the height of the top coding unit 620a as yb-ya. According to an embodiment, the video decoding device 100 determines the width of the center coding unit 620b as the width of the current coding unit 600. The video decoding device 100 determines the height of the center coding unit 620b as yc-yb. According to an embodiment, the video decoding device 100 determines the width or height of the bottom coding unit using the width or height of the current coding unit and the widths and heights of the top coding unit 620a and the center coding unit 620b. The video decoding device 100 may determine a coding unit having a different size from other coding units based on the determined widths and heights of the coding units 620a, 620b, and 620c. Referring to FIG. 6, the video decoding device 100 determines the center coding unit 620b having a different size from the top coding unit 620a and the bottom coding unit 620c as a coding unit at a predetermined position. However, the above-mentioned process in which the video decoding device 100 determines a coding unit having a different size from other coding units is merely one embodiment of determining a coding unit at a predetermined position using the size of the coding unit determined based on sample coordinates, and various other processes may be used to determine a coding unit at a predetermined position by comparing the size of the coding unit determined based on predetermined sample coordinates.

[0102] The video decoding device 100 may determine the width or height of each of the coding units 660a, 660b, and 660c using the (xd, yd) coordinates indicating the position of the upper left sample 670a of the left coding unit 660a, the (xe, ye) coordinates indicating the position of the upper left sample 670b of the center coding unit 660b, and the (xf, yf) coordinates indicating the position of the upper left sample 670c of the right coding unit 660c. The video decoding device 100 determines the size of each of the coding units 660a, 660b, and 660c using the coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the coding units 660a, 660b, and 660c.

[0103] According to an embodiment, the video decoding device 100 determines the width of the left coding unit 660a as xe-xd. The video decoding device 100 determines the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the video decoding device 100 determines the width of the center coding unit 660b as xf-xe. The video decoding device 100 determines the height of the center coding unit 660b as the height of the current coding unit 600. According to an embodiment, the video decoding device 100 may determine the width or height of the right coding unit 660c using the width or height of the current coding unit 650 and the widths and heights of the left coding unit 660a and the center coding unit 660b. The video decoding device 100 determines a coding unit having a size different from other coding units based on the determined widths and heights of the coding units 660a, 660b, and 660c. 6, the video decoding device 100 determines a center coding unit 660b having a size different from the sizes of the left coding unit 660a and the right coding unit 660c as a coding unit at a predetermined position. However, the above-mentioned process in which the video decoding device 100 determines a coding unit having a size different from other coding units is merely one embodiment in which a coding unit at a predetermined position is determined using a coding unit size determined based on sample coordinates, and various processes for determining a coding unit at a predetermined position by comparing the coding unit size determined based on predetermined sample coordinates may be used.

[0104] However, the position of the sample considered to determine the position of the coding unit should not be interpreted as being limited to the upper left corner as described above, but may be interpreted as information related to the position of any sample included in the coding unit being used.

[0105] According to an embodiment, the video decoding apparatus 100 may select a coding unit at a predetermined position from among an odd number of coding units determined by dividing the current coding unit, taking into consideration the shape of the current coding unit. For example, if the current coding unit is a non-square shape in which the width is longer than the height, the video decoding apparatus 100 may determine a coding unit at a predetermined position along the horizontal direction. That is, the video decoding apparatus 100 may determine one of the coding units whose position varies in the horizontal direction and set a restriction on the coding unit. If the current coding unit is a non-square shape in which the height is longer than the width, the video decoding apparatus 100 may determine a coding unit at a predetermined position along the vertical direction. That is, the video decoding apparatus 100 may determine one of the coding units whose position varies in the vertical direction and set a restriction on the coding unit.

[0106] According to an embodiment, the video decoding device 100 may use information indicating the positions of each of the even number of coding units to determine a coding unit at a predetermined position among the even number of coding units. The video decoding device 100 may determine the even number of coding units by dividing (binary dividing) the current coding unit, and may determine the coding unit at a predetermined position using information regarding the positions of the even number of coding units. A detailed process related to this is omitted since it corresponds to the process of determining a coding unit at a predetermined position (e.g., a central position) among the odd number of coding units described above in FIG. 6.

[0107] According to an embodiment, when a non-square current coding unit is divided into a plurality of coding units, in order to determine a coding unit at a predetermined position among the plurality of coding units, predetermined information related to the coding unit at a predetermined position may be used during the division process. For example, in order to determine a coding unit at a center among the plurality of coding units into which the current coding unit is divided, the video decoding apparatus 100 may use at least one of block shape information and partition shape mode information stored in a sample included in a central coding unit during the division process.

[0108] 6, the video decoding apparatus 100 divides a current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, and determines a centrally located coding unit 620b among the plurality of coding units 620a, 620b, and 620c. The video decoding apparatus 100 also determines the centrally located coding unit 620b in consideration of a position where the partition mode information is acquired. That is, the partition mode information of the current coding unit 600 is acquired from a sample 640 located at the center of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, the coding unit 620b including the sample 640 is determined as the centrally located coding unit. However, information used to determine the centrally located coding unit should not be interpreted as being limited to the partition mode information, and various types of information may be used in the process of determining the centrally located coding unit.

[0109] According to an embodiment, the predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample included in a coding unit to be determined. Referring to FIG. 6, the video decoding device 100 may use partition mode information obtained from a sample at a predetermined position in the current coding unit 600 (e.g., a sample at the center of the current coding unit 600) to determine a coding unit at a predetermined position (e.g., a coding unit at a center of the multiple coding units 620a, 620b, and 620c) determined by dividing the current coding unit 600. That is, the video decoding device 100 may determine the sample at the predetermined position in consideration of the block format of the current coding unit 600, and may determine a coding unit 620b including a sample from which predetermined information (e.g., partition mode information) is obtained, from among the multiple coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and set a predetermined restriction. 6, according to an embodiment, the video decoding device 100 may determine a sample 640 located at the center of a current coding unit 600 as a sample from which certain information is obtained, and may set a certain restriction in a process of decoding a coding unit 620b including such sample 640. However, the position of the sample from which certain information is obtained should not be interpreted as being limited to the above-mentioned position, but may be interpreted as a sample at any position included in the coding unit 620b to be determined for setting the restriction.

[0110] According to an embodiment, the position of the sample from which the predetermined information is obtained is determined according to the shape of the current coding unit 600. According to an embodiment, the block shape information determines whether the shape of the current coding unit is square or non-square, and determines the position of the sample from which the predetermined information is obtained according to the shape. For example, the video decoding apparatus 100 determines a sample located on a boundary that divides at least one of the width and height of the current coding unit in half as the sample from which the predetermined information is obtained, using at least one of information related to the width and height of the current coding unit. As another example, when the block shape information related to the current coding unit indicates that the current coding unit is non-square, the video decoding apparatus 100 determines one of the samples including a boundary that divides the long side of the current coding unit in half as the sample from which the predetermined information is obtained.

[0111] According to an embodiment, when the video decoding device 100 divides a current coding unit into a plurality of coding units, the video decoding device 100 uses partition mode information to determine a coding unit at a predetermined position among the plurality of coding units. According to an embodiment, the video decoding device 100 acquires partition mode information at a sample at a predetermined position included in the coding unit, and the video decoding device 100 may divide a plurality of coding units generated by dividing the current coding unit using partition mode information acquired from a sample at a predetermined position included in each of the plurality of coding units. That is, the coding units may be recursively divided using partition mode information acquired from a sample at a predetermined position included in each of the coding units. The recursive division process of the coding unit has been described above with reference to FIG. 5, and therefore a detailed description thereof will not be repeated.

[0112] According to one embodiment, the video decoding device 100 may divide a current coding unit to determine at least one coding unit, and may determine an order in which the at least one coding unit is decoded based on a predetermined block (e.g., the current coding unit).

[0113] FIG. 7 illustrates an order in which a plurality of coding units are processed when a video decoding apparatus divides a current coding unit to determine the plurality of coding units, according to an embodiment.

[0114] According to one embodiment, the video decoding device 100 may vertically divide the first coding unit 700 according to the partition mode information to determine the second coding units 710a and 710b, or may horizontally divide the first coding unit 700 to determine the second coding units 730a and 730b, or may vertically and horizontally divide the first coding unit 700 to determine the second coding units 750a, 750b, 750c, and 750d.

[0115] 7, the video decoding device 100 determines the order of second coding units 710a and 710b determined by dividing the first coding unit 700 in the vertical direction to be processed in a horizontal direction 710c. The video decoding device 100 may determine the processing order of second coding units 730a and 730b determined by dividing the first coding unit 700 in the horizontal direction to be the vertical direction 730c. The video decoding device 100 may also determine the processing order of second coding units 750a, 750b, 750c, and 750d determined by dividing the first coding unit 700 in the vertical and horizontal directions according to a predetermined order (e.g., raster scan order or z scan order 750e, etc.) in which coding units located in one row are processed and then coding units located in the next row are processed.

[0116] According to an embodiment, the video decoder 100 may recursively divide the coding units. Referring to FIG 7, the video decoder 100 divides the first coding unit 700 to determine a plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d, and recursively divides each of the determined coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. A method of dividing the plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d corresponds to a method of dividing the first coding unit 700. 7, the video decoding apparatus 100 may determine the second coding units 710a and 710b by vertically dividing the first coding unit 700, and may determine whether or not to divide each of the second coding units 710a and 710b.

[0117] According to an embodiment, the video decoding apparatus 100 divides the second coding unit 710a on the left side into third coding units 720a and 720b in the horizontal direction, and does not divide the second coding unit 710b on the right side.

[0118] According to an embodiment, the processing order of the coding units may be determined based on the division process of the coding units. That is, the processing order of the divided coding units may be determined based on the processing order of the coding units immediately before the division. The video decoding apparatus 100 may determine the processing order of the third coding units 720a and 720b determined by dividing the second coding unit 710a on the left side, independently of the second coding unit 710b on the right side. Since the third coding units 720a and 720b are determined by dividing the second coding unit 710a on the left side in the horizontal direction, the third coding units 720a and 720b may be processed in the vertical direction 720c. In addition, since the processing order of the second coding unit 710a on the left side and the second coding unit 710b on the right side corresponds to the horizontal direction 710c, the third coding units 720a and 720b included in the second coding unit 710a on the left side may be processed in the vertical direction 720c before the right coding unit 710b is processed. The above content is intended to explain the process in which the processing order of each coding unit is determined based on the coding units before they are divided, and therefore should not be interpreted as being limited to the above-mentioned embodiment, but should be interpreted as being used as various methods in which coding units determined by being divided into various forms can be processed independently in a predetermined order.

[0119] FIG. 8 illustrates a process in which a video decoder determines that a current coding unit is to be divided into an odd number of coding units when it is not possible to process the coding units in a predetermined order, according to an embodiment of the present invention.

[0120] According to an embodiment, the video decoding device 100 determines that the current coding unit is divided into an odd number of coding units based on the acquired division mode information. Referring to FIG. 8, a square first coding unit 800 is divided into non-square second coding units 810a and 810b, and the second coding units 810a and 810b may be independently divided into third coding units 820a, 820b, 820c, 820d, and 820e. According to an embodiment, the video decoding device 100 may divide the left coding unit 810a of the second coding unit in the horizontal direction to determine a plurality of third coding units 820a and 820b, and divide the right coding unit 810b into an odd number of third coding units 820c, 820d, and 820e.

[0121] According to an embodiment, the video decoding device 100 determines whether the third coding units 820a, 820b, 820c, 820d, and 820e are processed in a predetermined order, and determines whether there is an odd number of coding units. Referring to FIG. 8, the video decoding device 100 recursively divides the first coding unit 800 to determine the third coding units 820a, 820b, 820c, 820d, and 820e. The video decoding device 100 determines whether the first coding unit 800, the second coding unit 810a, 810b, or the third coding units 820a, 820b, 820c, 820d, and 820e are divided into an odd number of coding units according to at least one of block configuration information and partition configuration mode information. For example, the coding unit located on the right side of the second coding units 810a and 810b is divided into an odd number of third coding units 820c, 820d, and 820e. The order in which the coding units included in the first coding unit 800 are processed is a predetermined order (e.g., z-scan order 830), and the video decoding device 100 may determine whether the third coding units 820c, 820d, and 820e determined by dividing the right second coding unit 810b into an odd number of coding units satisfy a condition for processing in the predetermined order.

[0122] According to an embodiment, the video decoding apparatus 100 determines whether the third coding units 820a, 820b, 820c, 820d, and 820e included in the first coding unit 800 satisfy a condition to be processed in a predetermined order, the condition being related to whether at least one of the width and height of the second coding units 810a and 810b is divided in half by the boundary of the third coding units 820a, 820b, 820c, 820d, and 820e. For example, the third coding units 820a and 820b determined by dividing the height of the left non-square second coding unit 810a in half satisfy the condition. The third coding units 820c, 820d, and 820e, which are determined by dividing the right second coding unit 810b into three coding units, do not satisfy the condition because the boundaries of the third coding units 820c, 820d, and 820e do not divide the width or height of the right second coding unit 810b in half. If such a condition is not satisfied, the video decoding device 100 determines that there is a disconnection in the scanning order, and determines that the right second coding unit 810b is to be divided into an odd number of coding units based on the determination result. According to an embodiment, the video decoding device 100 may set a predetermined restriction on a coding unit at a predetermined position among the divided coding units when the coding units are divided into an odd number of coding units, and detailed description of such a restriction or a predetermined position has been described above through various embodiments, and will not be repeated.

[0123] FIG. 9 illustrates a process in which a video decoding apparatus divides a first coding unit to determine at least one coding unit according to an embodiment.

[0124] According to an embodiment, the video decoding apparatus 100 may divide the first coding unit 900 based on the division mode information acquired through the receiving unit 110. The square first coding unit 900 may be divided into a coding unit having four squares or into a plurality of non-square coding units. For example, referring to FIG. 9, when the first coding unit 900 is a square and the division mode information indicates that the first coding unit 900 is to be divided into non-square coding units, the video decoding apparatus 100 may divide the first coding unit 900 into a plurality of non-square coding units. Specifically, when the division mode information indicates that an odd number of coding units are determined by dividing the first coding unit 900 in a horizontal or vertical direction, the video decoding apparatus 100 may divide the square first coding unit 900 into an odd number of coding units, for example, second coding units 910a, 910b, and 910c determined by dividing in a vertical direction or second coding units 920a, 920b, and 920c determined by dividing in a horizontal direction.

[0125] According to an embodiment, the video decoding apparatus 100 determines whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition to be processed in a predetermined order, the condition being related to whether at least one of the width and height of the first coding unit 900 is divided in half by the boundaries of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Referring to FIG 9, the boundaries of the second coding units 910a, 910b, and 910c determined by dividing the square first coding unit 900 in the vertical direction do not divide the width of the first coding unit 900 in half, so the video decoding apparatus 100 determines that the first coding unit 900 does not satisfy the condition to be processed in a predetermined order. Also, since the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction do not divide the width of the first coding unit 900 in half, the first coding unit 900 is determined not to satisfy the condition to be processed in a predetermined order. If such a condition is not satisfied, the video decoding device 100 may determine that there is a disconnection in the scanning order, and may determine that the first coding unit 900 is to be divided into an odd number of coding units based on the determination result. According to an embodiment, the video decoding device 100 may impose a predetermined restriction on a coding unit at a predetermined position among the divided coding units when the coding unit is divided into an odd number of coding units, and the content of such a restriction or the predetermined position has been described above through various embodiments, and detailed description thereof will be omitted.

[0126] According to an embodiment, the video decoding apparatus 100 may determine various types of coding units by dividing a first coding unit.

[0127] 9, the video decoding apparatus 100 may divide a square first coding unit 900, a non-square first coding unit 930, or a non-square first coding unit 950 into various types of coding units.

[0128] FIG. 10 illustrates that, according to one embodiment, when a non-square second coding unit determined by dividing a first coding unit satisfies a certain condition, the possible division forms of the second coding unit are restricted.

[0129] According to an embodiment, the video decoding device 100 determines to divide the square first coding unit 1000 into non-square second coding units 1010a, 1010b, 1020a, and 1020b based on the division mode information acquired through the receiving unit 110. The second coding units 1010a, 1010b, 1020a, and 1020b may be divided independently. Thus, the video decoding device 100 determines whether to divide the first coding unit 1000 into a plurality of coding units or not based on the division mode information related to each of the second coding units 1010a, 1010b, 1020a, and 1020b. According to an embodiment, the video decoding device 100 may determine the third coding units 1012a and 1012b by horizontally dividing the left second coding unit 1010a, which is a non-square determined by dividing the first coding unit 1000 vertically. However, when the left second coding unit 1010a is divided in the horizontal direction, the video decoding device 100 may restrict the right second coding unit 1010b so that it is not divided in the horizontal direction in the same direction as the left second coding unit 1010a is divided. If the right second coding unit 1010b is divided in the same direction to determine the third coding units 1014a and 1014b, the left second coding unit 1010a and the right second coding unit 1010b may be divided independently in the horizontal direction to determine the third coding units 1012a, 1012b, 1014a, and 1014b. However, this is the same result as when the video decoding device 100 divides the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c, and 1030d based on the division mode information, which is inefficient in terms of video decoding.

[0130] According to an embodiment, the video decoding device 100 vertically divides the non-square second coding unit 1020a or 1020b, which is determined by horizontally dividing the first coding unit 1000, to determine the third coding units 1022a, 1022b, 1024a, and 1024b. However, when the video decoding device 100 divides one of the second coding units (e.g., the upper second coding unit 1020a) vertically, the video decoding device 100 may restrict the other second coding units (e.g., the lower coding unit 1020b) from being divided vertically in the same direction as the upper second coding unit 1020a, for the above-mentioned reasons.

[0131] FIG. 11 illustrates a process in which a video decoding apparatus divides a square coding unit when the division mode information does not indicate division into four square coding units, according to one embodiment.

[0132] According to an embodiment, the video decoding device 100 divides the first coding unit 1100 into second coding units 1110a, 1110b, 1120a, and 1120b based on the division mode information. The division mode information may include information related to various types of division of the coding unit, but the information related to various types may not include information for dividing into four square coding units. According to such division mode information, the video decoding device 100 cannot divide the square first coding unit 1100 into four square second coding units 1130a, 1130b, 1130c, and 1130d. Based on the division mode information, the video decoding device 100 may determine the non-square second coding units 1110a, 1110b, 1120a, and 1120b.

[0133] According to an embodiment, the video decoding apparatus 100 divides the non-square second coding units 1110a, 1110b, 1120a, and 1120b independently. The second coding units 1110a, 1110b, 1120a, and 1120b are divided in a predetermined order through a recursive method, which corresponds to the method of dividing the first coding unit 1100 based on the division mode information.

[0134] For example, the video decoding device 100 divides the left second coding unit 1110a in the horizontal direction to determine square third coding units 1112a and 1112b, and divides the right second coding unit 1110b in the horizontal direction to determine square third coding units 1114a and 1114b. Also, the video decoding device 100 divides both the left second coding unit 1110a and the right second coding unit 1110b in the horizontal direction to determine square third coding units 1116a, 1116b, 1116c, and 1116d. In this case, the coding units are determined in the same form as when the first coding unit 1100 is divided into four square second coding units 1130a, 1130b, 1130c, and 1130d.

[0135] As another example, the video decoding device 100 may vertically divide the top second coding unit 1120a to determine square third coding units 1122a and 1122b, and vertically divide the bottom second coding unit 1120b to determine square third coding units 1124a and 1124b. Alternatively, the video decoding device 100 may vertically divide both the top second coding unit 1120a and the bottom second coding unit 1120 to determine square third coding units 1126a, 1126b, 1126a, and 1126b. In this case, the coding units are determined in the same form as when the first coding unit 1100 is divided into four square second coding units 1130a, 1130b, 1130c, and 1130d.

[0136] FIG. 12 illustrates that a processing order among a plurality of coding units may differ depending on a division process of the coding units, according to an embodiment.

[0137] According to an embodiment, the video decoding apparatus 100 divides the first coding unit 1200 based on the partition mode information. When the block shape is a square and the partition mode information indicates that the first coding unit 1200 is divided in at least one of the horizontal and vertical directions, the video decoding apparatus 100 may divide the first coding unit 1200 to determine the second coding units (e.g., 1210a, 1210b, 1220a, 1220b, etc.). Referring to FIG. 12, the non-square second coding units 1210a, 1210b, 1220a, 1220b determined by dividing the first coding unit 1200 only in the horizontal or vertical direction may be divided independently based on the partition mode information associated therewith. For example, the video decoding apparatus 100 may determine third coding units 1216a, 1216b, 1216c, and 1216d by horizontally dividing the second coding units 1210a and 1210b generated by vertically dividing the first coding unit 1200, and determine third coding units 1226a, 1226b, 1226c, and 1226d by horizontally dividing the second coding units 1220a and 1220b generated by horizontally dividing the first coding unit 1200. The division process of the second coding units 1210a, 1210b, 1220a, and 1220b has been described above with reference to FIG. 11, and therefore will not be described in detail.

[0138] According to an embodiment, the video decoding device 100 may process the coding units in a predetermined order. The characteristics related to the processing of the coding units in a predetermined order have been described above in relation to FIG. 7, and therefore detailed description thereof will be omitted. Referring to FIG. 12, the video decoding device 100 divides the square first coding unit 1200 to determine four square third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. According to an embodiment, the video decoding device 100 determines the processing order of the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d according to the manner in which the first coding unit 1200 is divided.

[0139] According to one embodiment, the video decoding device 100 horizontally divides the second coding units 1210a and 1210b, which are generated by dividing them vertically, to determine the third coding units 1216a, 1216b, 1216c, and 1216d. The video decoding device 100 processes the third coding units 1216a and 1216c included in the left second coding unit 1210a vertically first, and then processes the third coding units 1216a, 1216b, 1216c, and 1216d according to an order 1217 of vertically processing the third coding units 1216b and 1216d included in the right second coding unit 1210b.

[0140] In one embodiment, the video decoding device 100 vertically divides the second coding units 1220a and 1220b, which are generated by dividing them horizontally, to determine the third coding units 1226a, 1226b, 1226c, and 1226d. The video decoding device 100 first processes the third coding units 1226a and 1226b included in the upper second coding unit 1220a horizontally, and then processes the third coding units 1226a, 1226b, 1226c, and 1226d according to an order 1227 in which the third coding units 1226a and 1226b included in the upper second coding unit 1220b are processed horizontally.

[0141] 12, the second coding units 1210a, 1210b, 1220a, and 1220b may be divided into square third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. The second coding units 1210a and 1210b divided vertically and the second coding units 1220a and 1220b divided horizontally are divided in different shapes, but the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d determined later ultimately result in the first coding unit 1200 being divided into coding units of the same shape. As a result, the video decoding device 100 recursively divides the coding units through different processes based on the division type mode information, so that even if the coding units ultimately have the same type, the video decoding device 100 can process multiple coding units determined to have the same type in different orders.

[0142] FIG. 13 illustrates a process of determining the depth of a coding unit according to different types and sizes of the coding units when a coding unit is recursively divided to determine a plurality of coding units according to an embodiment.

[0143] According to an embodiment, the video decoding apparatus 100 may determine the depth of the coding unit according to a predetermined criterion. For example, the predetermined criterion may be the length of a long side of the coding unit. The video decoding apparatus 100 may determine the depth of the coding unit according to a predetermined criterion. For example, the predetermined criterion may be the length of a long side of the current coding unit that is twice as long as the length of a long side of the coding unit before the division. n When the coding unit is divided by (n>0), it is determined that the depth of the current coding unit is increased by n from the depth of the coding unit before the division. Hereinafter, the coding unit with the increased depth is referred to as a coding unit of a lower depth.

[0144] 13, according to an embodiment, the video decoding apparatus 100 divides a square first coding unit 1300 based on block shape information indicating a square shape (for example, the block shape information indicates "0:SQUARE") to determine a second coding unit 1302, a third coding unit 1304, etc., of a lower depth. If the size of the square first coding unit 1300 is 2Nx2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 by 1 / 2 has a size of NxN. Also, the third coding unit 1304 determined by dividing the width and height of the second coding unit 1302 by 1 / 2 has a size of N / 2xN / 2. In this case, the width and height of the third coding unit 1304 correspond to 1 / 4 times that of the first coding unit 1300. If the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302, which is 1 / 2 the width and height of the first coding unit 1300, is also D+1, and the depth of the third coding unit 1304, which is 1 / 4 the width and height of the first coding unit 1300, is also D+2.

[0145] In one embodiment, based on block shape information indicating a non-square shape (for example, the block shape information indicates "1:NS_VER' indicating a non-square shape in which the height is longer than the width, or "2:NS_HOR" indicating a non-square shape in which the width is longer than the height), the video decoding device 100 divides the first coding unit 1310 or 1320, which is non-square, to determine the second coding unit 1312 or 1322, the third coding unit 1314 or 1324, etc. of a lower depth.

[0146] The video decoding device 100 determines second coding units (e.g., 1302, 1312, 1322) by dividing at least one of the width and height of the first coding unit 1310 of Nx2N size. That is, the video decoding device 100 divides the first coding unit 1310 in the horizontal direction to determine the second coding unit 1302 of NxN size or the second coding unit 1322 of NxN / 2 size, and divides it in the horizontal and vertical directions to determine the second coding unit 1312 of N / 2xN size.

[0147] According to an embodiment, the video decoding device 100 may determine second coding units (e.g., 1302, 1312, 1322) by dividing at least one of the width and height of a first coding unit 1320 having a size of 2NxN. That is, the video decoding device 100 may vertically divide the first coding unit 1320 to determine the second coding unit 1302 having a size of NxN or the second coding unit 1312 having a size of N / 2xN, and may horizontally and vertically divide the first coding unit 1320 to determine the second coding unit 1322 having a size of NxN / 2.

[0148] According to an embodiment, the video decoding device 100 determines a third coding unit (e.g., 1304, 1314, 1324) by dividing at least one of the width and height of the second coding unit 1302 of NxN size. That is, the video decoding device 100 may divide the second coding unit 1302 vertically and horizontally to determine the third coding unit 1304 of N / 2xN / 2 size, the third coding unit 1314 of N / 4xN / 2 size, or the third coding unit 1324 of N / 2xN / 4 size.

[0149] According to an embodiment, the video decoding device 100 may determine the third coding unit (e.g., 1304, 1314, 1324) by dividing at least one of the width and height of the second coding unit 1312 having a size of N / 2xN. That is, the video decoding device 100 may divide the second coding unit 1312 in the horizontal direction to determine the third coding unit 1304 having a size of N / 2xN / 2 or the third coding unit 1324 having a size of N / 2xN / 4, or may divide the second coding unit 1312 in the vertical and horizontal directions to determine the third coding unit 1314 having a size of N / 4xN / 2.

[0150] According to an embodiment, the video decoding device 100 may determine the third coding units (e.g., 1304, 1314, 1324) by dividing at least one of the width and height of the second coding unit 1322 having a size of NxN / 2. That is, the video decoding device 100 may divide the second coding unit 1322 vertically to determine the third coding unit 1304 having a size of N / 2xN / 2 or the third coding unit 1314 having a size of N / 4xN / 2, or may divide the second coding unit 1322 vertically and horizontally to determine the third coding unit 1324 having a size of N / 2xN / 4.

[0151] According to an embodiment, the video decoding apparatus 100 divides a square coding unit (e.g., 1300, 1302, 1304) in the horizontal or vertical direction. For example, the first coding unit 1300 having a size of 2Nx2N is divided vertically to determine the first coding unit 1310 having a size of Nx2N, or divided horizontally to determine the first coding unit 1320 having a size of 2NxN. According to an embodiment, when the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by dividing the first coding unit 1300 having a size of 2Nx2N in the horizontal or vertical direction may be the same as the depth of the first coding unit 1300.

[0152] According to one embodiment, the width and height of the third coding unit 1314 or 1324 corresponds to 1 / 4 times that of the first coding unit 1310 or 1320. When the depth of the first coding unit 1310 or 1320 is D, the depth of the second coding unit 1312 or 1322, which is 1 / 2 times the width and height of the first coding unit 1310 or 1320, is also D+1, and the depth of the third coding unit 1314 or 1324, which is 1 / 4 times the width and height of the first coding unit 1310 or 1320, is also D+2.

[0153] FIG. 14 illustrates a depth determined according to the type and size of a coding unit and a part index (hereinafter, PID) for a coding unit according to an embodiment.

[0154] According to an embodiment, the video decoding device 100 divides the square first coding unit 1400 to determine various types of second coding units. Referring to Fig. 14, the video decoding device 100 divides the first coding unit 1400 in at least one of the vertical and horizontal directions according to the partition mode information to determine the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d. That is, the video decoding device 100 determines the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d based on the partition mode information related to the first coding unit 1400.

[0155] According to an embodiment, the depths of the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d determined according to the partition mode information related to the square first coding unit 1400 may be determined based on the length of the long side. For example, since the length of one side of the square first coding unit 1400 is the same as the length of the long side of the non-square second coding units 1402a, 1402b, 1404a, and 1404b, the depths of the first coding unit 1400 and the non-square second coding units 1402a, 1402b, 1404a, and 1404b may be considered to be the same, that is, D. On the other hand, when the video decoding device 100 divides the first coding unit 1400 into four square second coding units 1406a, 1406b, 1406c, and 1406d based on the division mode information, the length of one side of the square second coding units 1406a, 1406b, 1406c, and 1406d is 1 / 2 times the length of one side of the first coding unit 1400, so the depth of the second coding units 1406a, 1406b, 1406c, and 1406d is also a depth of D+1, which is one depth lower than the depth D of the first coding unit 1400.

[0156] According to an embodiment, the video decoding device 100 divides a first coding unit 1410 having a height greater than its width in the horizontal direction according to the partition mode information, and divides the first coding unit 1410 into a plurality of second coding units 1412a, 1412b, 1414a, 1414b, and 1414c. According to an embodiment, the video decoding device 100 divides a first coding unit 1420 having a width greater than its height in the vertical direction according to the partition mode information, and divides the first coding unit 1420 into a plurality of second coding units 1422a, 1422b, 1424a, 1424b, and 1424c.

[0157] According to an embodiment, the depths of the second coding units 1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, 1424c determined by the partition mode information related to the non-square first coding unit 1410 or 1420 may be determined based on the length of the long side. For example, the length of one side of the square second coding units 1412a and 1412b is ½ times the length of one side of the non-square first coding unit 1410 whose height is longer than its width, so the depths of the square second coding units 1412a and 1412b are D+1, which is one depth lower than the depth D of the non-square first coding unit 1410.

[0158] Furthermore, the video decoding device 100 may divide the non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the division mode information. The odd number of second coding units 1414a, 1414b, and 1414c may include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, the length of the long side of the non-square second coding units 1414a and 1414c and the length of one side of the square second coding unit 1414b are 1 / 2 times the length of one side of the first coding unit 1410, so that the depths of the second coding units 1414a, 1414b, and 1414c are also a depth of D+1, which is one depth lower than D, which is the depth of the first coding unit 1410. The video decoding device 100 may determine the depth of a coding unit associated with a non-square first coding unit 1420 whose width is greater than its height in a manner corresponding to the above-mentioned manner for determining the depth of a coding unit associated with the first coding unit 1410.

[0159] According to an embodiment, the video decoding apparatus 100 may determine an index (PID) for partitioning the divided coding units, based on a size ratio between the coding units when the coding units divided into an odd number of coding units are not the same size. Referring to FIG. 14, the coding unit 1414b located in the center among the coding units 1414a, 1414b, and 1414c divided into an odd number of coding units has the same width as the other coding units 1414a and 1414c, but has a height twice as high as the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b located in the center includes the other coding units 1414a and 1414c. Therefore, if the index (PID) of the coding unit 1414b located in the center according to the scanning order is 1, the coding unit 1414c located next in the order is 3, which is an index increased by 2. That is, there is a discontinuity in the index value. According to one embodiment, the video decoding device 100 determines whether coding units divided into an odd number of parts are the same size based on whether there is a discontinuity in the index for partitioning between such divided coding units.

[0160] According to an embodiment, the video decoding apparatus 100 determines whether the current coding unit is divided into a specific division type based on the value of an index for distinguishing a plurality of coding units determined by dividing the current coding unit. Referring to FIG. 14, the video decoding apparatus 100 divides a rectangular first coding unit 1410 having a height greater than its width to determine even coding units 1412a, 1412b or odd coding units 1414a, 1414b, 1414c. The video decoding apparatus 100 may use an index (PID) indicating each coding unit to distinguish each of the plurality of coding units. According to an embodiment, the PID may be obtained from a sample at a predetermined position (e.g., the upper left sample) of each coding unit.

[0161] According to an embodiment, the video decoding device 100 may determine a coding unit at a predetermined position among the coding units determined by dividing the coding units using an index for dividing the coding units. According to an embodiment, when the division mode information on the rectangular first coding unit 1410 having a height greater than its width indicates that the first coding unit 1410 is divided into three coding units, the video decoding device 100 divides the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The video decoding device 100 may assign an index to each of the three coding units 1414a, 1414b, and 1414c. The video decoding device 100 may compare the indexes for each coding unit to determine a central coding unit among the odd number of coding units. The video decoding device 100 may determine the coding unit 1414b having an index corresponding to a median value among the indexes based on the coding unit indexes as a central coding unit among the coding units determined by dividing the first coding unit 1410. According to an embodiment, when determining an index for partitioning the divided coding units, the video decoder 100 determines the index based on the ratio of the sizes of the coding units when the coding units are not the same size. Referring to FIG. 14, a coding unit 1414b generated by dividing a first coding unit 1410 has the same width as other coding units 1414a and 1414c, but is twice as high as other coding units 1414a and 1414c having different heights. In this case, if the index (PID) of the coding unit 1414b located in the center is 1, the next coding unit 1414c is 3, which is an index increased by 2. In this case, when the indexes are increased uniformly but the increase widths are different, the video decoder 100 determines that the coding unit has been divided into a plurality of coding units including a coding unit having a different size from other coding units. According to one embodiment, when the partition mode information indicates that the current coding unit is to be partitioned into an odd number of coding units, the video decoding device 100 partitions the current coding unit into a form in which a coding unit at a predetermined position among the odd number of coding units (e.g., a central coding unit) has a different size from the other coding units.In this case, the video decoding apparatus 100 determines central coding units having different sizes using indexes (PIDs) for the coding units. However, the above-mentioned indexes and the sizes or positions of the coding units at the predetermined positions to be determined are specific for explaining one embodiment, and should not be construed as being limited thereto, and various indexes, positions and sizes of the coding units may be used.

[0162] According to an embodiment, the video decoding device 100 may use a predetermined data unit from which recursive division of a coding unit begins.

[0163] FIG. 15 illustrates a plurality of coding units being determined according to a plurality of predetermined data units included in a picture according to one embodiment.

[0164] According to one embodiment, the predetermined data unit may be defined as a data unit from which the coding unit starts to be recursively divided using the division mode information. That is, the predetermined data unit corresponds to a coding unit of the highest depth used in the process of determining a plurality of coding units for dividing the current picture. Hereinafter, for convenience of explanation, such a predetermined data unit is referred to as a reference data unit.

[0165] According to one embodiment, the reference data unit has a predetermined size and shape. According to one embodiment, the reference coding unit may include MxN samples, where M and N may be the same as each other or may be integers expressed as a power of 2. That is, the reference data unit may be square or non-square, and may then be divided into an integer number of coding units.

[0166] According to an embodiment, the video decoder 100 divides the current picture into a plurality of reference data units. According to an embodiment, the video decoder 100 divides the current picture into a plurality of reference data units using partitioning mode information associated with each of the reference data units. The division process of the reference data units may correspond to a division process using a quad-tree structure.

[0167] According to an embodiment, the video decoding apparatus 100 predetermines a minimum size of a reference data unit included in a current picture, and then determines various sizes of reference data units having a size equal to or larger than the minimum size, and determines at least one coding unit using partition mode information based on the determined reference data unit.

[0168] 15, the video decoding apparatus 100 may use a square reference coding unit 1500 or a non-square reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined according to various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) including at least one reference coding unit.

[0169] According to an embodiment, the receiving unit 110 of the video decoding device 100 may obtain at least one of information regarding the type of the base coding unit and information regarding the size of the base coding unit from the bitstream for each of the various data units. The process of determining at least one coding unit included in the square base coding unit 1500 has been described above through the process of dividing the current coding unit 300 in Fig. 3, and the process of determining at least one coding unit included in the non-square base coding unit 1502 has been described above through the process of dividing the current coding unit 400 or 450 in Fig. 4, so detailed description thereof will be omitted.

[0170] According to an embodiment, the video decoding apparatus 100 uses an index for identifying the size and type of the reference coding unit in order to determine the size and type of the reference coding unit according to a certain data unit that is predetermined based on a predetermined condition. That is, the receiving unit 110 may acquire only an index for identifying the size and type of the reference coding unit for each slice, slice segment, tile, tile group, maximum coding unit, etc. as a data unit that satisfies a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) among the various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) from the bitstream. The video decoding apparatus 100 may determine the size and type of the reference data unit for each data unit that satisfies the predetermined condition by using the index. If information related to the type of the reference coding unit and information related to the size of the reference coding unit are acquired from the bitstream for each data unit of a relatively small size and used, the bitstream may not be used efficiently. Therefore, instead of directly acquiring information related to the type of the reference coding unit and information related to the size of the reference coding unit, only the index may be acquired and used. In this case, at least one of the sizes and forms of the base coding units corresponding to the index indicating the size and form of the base coding units may be predetermined. That is, the video decoding device 100 may determine at least one of the sizes and forms of the base coding units included in the data unit serving as a reference for obtaining the index by selecting at least one of the sizes and forms of the base coding units that have been previously determined, using the index.

[0171] According to an embodiment, the video decoding apparatus 100 may use at least one base coding unit included in one maximum coding unit. That is, the maximum coding unit for dividing an image includes at least one base coding unit, and coding units may be determined through a recursive division process of each base coding unit. According to an embodiment, at least one of the width and height of the maximum coding unit corresponds to at least one integer multiple of the width and height of the base coding unit. According to an embodiment, the size of the base coding unit is a size obtained by dividing the maximum coding unit n times according to a quad tree structure. That is, the video decoding apparatus 100 determines the base coding unit by dividing the maximum coding unit n times according to a quad tree structure, and divides the base coding unit based on at least one of block shape information and partition shape mode information according to various embodiments.

[0172] According to an embodiment, the video decoding apparatus 100 acquires and uses block type information indicating a type of a current coding unit or partition type mode information indicating a method of dividing the current coding unit from a bitstream. The partition type mode information may be included in a bitstream related to various data units. For example, the video decoding apparatus 100 may use partition type mode information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, or a tile group header. Furthermore, the video decoding apparatus 100 may acquire and use a syntax element corresponding to the block type information or the partition type mode information from the bitstream for each of a maximum coding unit, a reference coding unit, and a processing block.

[0173] A method for determining a division rule according to an embodiment of the present invention will now be described in detail.

[0174] The video decoding device 100 determines a video partitioning rule. The partitioning rule may be determined in advance between the video decoding device 100 and the video encoding device 2200. The video decoding device 100 determines the video partitioning rule based on information acquired from a bitstream. The video decoding device 100 determines the partitioning rule based on information acquired from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, and a tile group header. The video decoding device 100 may determine different partitioning rules depending on a frame, a slice, a tile, a temporal layer, a maximum coding unit, or a coding unit.

[0175] The video decoding apparatus 100 may determine the partition rule based on a block type of the coding unit. The block type may include a size, a shape, a ratio of width and height, and a direction of the coding unit. The video decoding apparatus 100 may pre-determine to determine the partition rule based on the block type of the coding unit. However, the present invention is not limited thereto. The video decoding apparatus 100 may determine the partition rule based on information acquired from a received bitstream.

[0176] The shape of the coding unit may include a square and a non-square. If the width and height of the coding unit are the same, the video decoding device 100 may determine the shape of the coding unit to be a square. If the width and height of the coding unit are not the same, the video decoding device 100 may determine the shape of the coding unit to be a non-square.

[0177] The sizes of the coding units may include various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, ..., 256x256. The sizes of the coding units may be classified according to the length of a long side, the length of a short side, or the width of the coding units. The video decoding apparatus 100 may apply the same division rule to the coding units classified into the same group. For example, the video decoding apparatus 100 may classify the coding units having the same long side length into the same size. In addition, the video decoding apparatus 100 may apply the same division rule to the coding units having the same long side length.

[0178] The ratio of the width and height of the coding unit may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, 1:32, etc. The direction of the coding unit may include a horizontal direction and a vertical direction. The horizontal direction indicates that the width of the coding unit is longer than the height. The vertical direction indicates that the width of the coding unit is shorter than the height.

[0179] The video decoding device 100 adaptively determines a partitioning rule based on the size of the coding unit. The video decoding device 100 may determine different allowable partitioning modes based on the size of the coding unit. For example, the video decoding device 100 determines whether partitioning is allowed based on the size of the coding unit. The video decoding device 100 determines the partitioning direction according to the size of the coding unit. The video decoding device 100 may determine allowable partitioning types according to the size of the coding unit.

[0180] Determining the partitioning rule based on the size of the coding unit is also a partitioning rule pre-determined during the video decoding device 100. In addition, the video decoding device 100 may determine the partitioning rule based on information obtained from the bitstream.

[0181] The video decoding device 100 can adaptively determine the partitioning rule based on the position of the coding unit. The video decoding device 100 can adaptively determine the partitioning rule based on the position that the coding unit occupies in the video.

[0182] In addition, the video decoding apparatus 100 may determine a partition rule such that coding units generated in different partition paths do not have the same block type. However, the present invention is not limited thereto, and coding units generated in different partition paths may have the same block type. Coding units generated in different partition paths may have different decoding process orders. The decoding process order has been described with reference to FIG. 12, and therefore will not be described in detail.

[0183] FIG. 16 is a block diagram showing a video encoding and decoding system.

[0184] An encoding terminal 1610 of the video encoding and decoding system 1600 transmits an encoded bitstream of video, and a decoding terminal 1650 receives and decodes the bitstream to output a restored video. Here, the decoding terminal 1650 has a similar configuration to the video decoding device 100.

[0185] In the encoding end 1610, a predictive coding unit 1615 outputs a reference image through inter prediction and intra prediction, and a transform and quantization unit 1616 quantizes residual data between the reference image and a current input image into a quantized transform coefficient and outputs the quantized transform coefficient. The entropy coding unit 1625 encodes and transforms the quantized transform coefficient and outputs the bitstream. The quantized transform coefficient is restored to spatial domain data through an inverse quantization and inverse transform unit 1630, and the restored spatial domain data is output to a restored image through a deblocking filtering unit 1635 and a loop filtering unit 1640. The restored image is used as a reference image for a next input image through a predictive coding unit 1615.

[0186] Of the bitstream received by the decoding terminal 1650, the coded image data is restored to spatial domain residual data through the entropy decoding unit 1655 and the inverse quantization and inverse transform unit 1660. The reference image and the residual data output from the predictive decoding unit 1675 are combined to form spatial domain image data, and the deblocking filtering unit 1665 and the loop filtering unit 1670 perform filtering on the spatial domain image data to output a restored image for the current original image. The restored image is used as a reference image for the next original image by the predictive decoding unit 1675.

[0187] The loop filtering unit 1640 of the encoding terminal 1610 performs loop filtering using filter information input by a user or a system setting. The filter information used by the loop filtering unit 1640 is output to the entropy encoding unit 1610 and transmitted to the decoding terminal 1650 together with the encoded image data. The loop filtering unit 1670 of the decoding terminal 1650 can perform loop filtering based on the filter information input from the decoding terminal 1650.

[0188] Hereinafter, with reference to FIGS. 17 to 20, a method and apparatus for encoding or decoding chroma components of a picture according to one embodiment disclosed herein will be described above.

[0189] FIG. 17 is a block diagram illustrating a video decoding device according to one embodiment.

[0190] Referring to FIG. 17, a video decoding device 1700 according to an embodiment may include an acquisition unit 1710 and a decoding unit 1720.

[0191] The video decoding device 1700 according to an embodiment may include a central processor (not shown) that controls the acquiring unit 1710 and the decoding unit 1720. Alternatively, the acquiring unit 1710 and the decoding unit 1720 may be operated by their own processors (not shown), and the video decoding device 1700 may operate as a whole by the processors (not shown) operating in an organic manner. Alternatively, the acquiring unit 1710 and the decoding unit 1720 may be controlled by a processor (not shown) external to the video decoding device 1700.

[0192] The video decoding device 1700 may include one or more data storage units (not shown) in which input / output data of the acquiring unit 1710 and the decoding unit 1720 is stored. The video decoding device 1700 may include a memory control unit (not shown) that controls data input / output of the data storage units (not shown).

[0193] The video decoding device 1700 performs video decoding operations including prediction by operating in cooperation with an internal video decoding processor or an external video decoding processor to restore images through video decoding. The internal video decoding processor of the video decoding device 1700 according to an embodiment may be implemented by implementing basic video decoding operations by including a video decoding processing module in a central processing unit or a graphic processing unit, rather than a separate processor.

[0194] The video decoding device 1700 may be included in the above-described video decoding device 100. For example, the acquiring unit 1710 may be included in the bitstream acquiring unit 110 of the video decoding device 100 illustrated in FIG.

[0195] The video decoding apparatus 1700 may obtain a bitstream generated as a result of encoding an image, and may decode information related to a prediction type of a coding unit based on information included in the bitstream. For example, the information related to the prediction type may indicate one of an intra prediction type and an inter prediction type. The coding unit corresponds to a block generated by dividing an image according to a tree structure.

[0196] The acquisition unit 1710 determines the current block based on block type information and / or partition mode information included in at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, and a slice segment header. Furthermore, the block position determination unit 1710 can acquire a syntax element corresponding to block type information or partition mode information from the bitstream for each maximum coding unit, reference coding unit, and processing block, and use it to determine the current block.

[0197] According to an embodiment, the acquiring unit 1710 may acquire cbf information for a Cr component and cbf information for a Cb component of a current block from a bitstream. The current block is a block generated from a coding unit and is also a transform unit for inverse quantization and inverse transform.

[0198] The cbf information for the Cr component (hereinafter referred to as "Cr cbf information") indicates whether or not the current block includes a Cr component whose transform coefficient level is non-zero. For example, if the Cr cbf information is 0, it indicates that the current block does not include a Cr component whose transform coefficient level is non-zero, and if the Cr cbf information is 1, it indicates that the current block includes a Cr component whose transform coefficient level is non-zero. Similarly, the cbf information for the Cb component (hereinafter referred to as "Cb cbf information") indicates whether or not the current block includes a Cb component whose transform coefficient level is non-zero. For example, if the Cb cbf information is 0, it indicates that the current block does not include a Cb component whose transform coefficient level is non-zero, and if the Cb cbf information is 1, it indicates that the current block includes a Cb component whose transform coefficient level is non-zero.

[0199] Generally, if the cbf information for the current transform block is 1, the transform coefficient level is obtained from the bitstream, and the decoder 1720 can reconstruct the residual sample of the luma component using the obtained transform coefficient level.

[0200] In one embodiment, the video decoding device 1700 can obtain the transform coefficient levels of the Cb component and the transform coefficient levels of the Cr component individually from the bitstream in order to reconstruct the residual samples of the Cb component and the residual samples of the Cr component, or can obtain only one type of chroma transform coefficient level from the bitstream.

[0201] An embodiment in which a chroma joint residual sample is used as a kind of chroma transform coefficient level will be detailed below.

[0202] According to an embodiment, the acquiring unit 1710 may acquire a chroma joint residual sample of the current block from the bitstream. The chroma joint residual sample of the current block is also a sample value determined using a residual sample value of the Cb component and a residual sample value of the Cr component of the current block. Therefore, only one chroma sample value may be acquired from the bitstream to indicate a residual sample value of the Cb component and a residual sample value of the corresponding Cr component. If the size of the current block is a luma 8x8 block and a chroma block 4x4, a total of 16 chroma joint residual samples may be acquired from the bitstream.

[0203] According to an embodiment, the decoder 1720 may determine a weighted value of a residual sample of a Cr component and a weighted value of a residual sample of a Cb component based on a prediction type of a coding unit, Cr cbf information, and Cb cbf information. The decoder 1720 may reconstruct a residual sample of a Cr component using a chroma joint residual sample of a current block and a weighted value of a residual sample of a Cr component. Similarly, the decoder 1720 may reconstruct a residual sample of a Cb component using a chroma joint residual sample of a current block and a weighted value of a residual sample of a Cb component.

[0204] First, according to one embodiment, the acquisition unit 1710 can acquire chroma joint information indicating whether only one chroma sample value is encoded to indicate a residual sample value of a Cb component and a corresponding residual sample value of a Cr component from a bitstream.

[0205] For example, if the chroma joint information indicates 1, it may be interpreted as indicating that one chroma sample is encoded in the current block. In this case, the acquisition unit 1710 may acquire one chroma sample value from the bitstream, and the decoding unit 1720 may restore the residual sample value of the Cb component and the residual sample value of the Cr component corresponding thereto using the acquired one chroma sample value. In this case, the decoding unit 1720 may determine the weighted value of the residual sample of the Cr component and the weighted value of the residual sample of the Cb component based on the prediction type of the coding unit, the cbf information for the Cr component, and the cbf information for the Cb component. Specifically, the decoding unit 1720 according to an embodiment may determine the weighted value of the residual sample of the Cr component and the weighted value of the residual sample of the Cb component based on the prediction type of the coding unit, the Cr cbf information, and the Cb cbf information when the chroma joint information indicates that one chroma sample is encoded.

[0206] According to one embodiment, when the prediction type of the coding unit is an intra prediction mode, the decoder 1720 may select one joint mode from among a number of joint modes based on the Cr cbf information and the Cb cbf information, and determine weighted values ​​of the residual sample of the Cr component and the residual sample of the Cb component according to the selected joint mode.

[0207] According to one embodiment, when the prediction type of the coding unit is an inter prediction mode, the decoder 1720 can determine the weighted value of the residual sample of the Cr component and the weighted value of the residual sample of the Cb component included in one allowed joint mode.

[0208] In this manner, by combining the weighted value of the residual sample of the Cr component and the residual sample of the Cb component determined by the prediction type, Cr cbf, and Cb cbf, the decoder 1720 can reconstruct the residual sample of the Cr component using the weighted value of the residual sample of the Cr component and the chroma joint residual sample of the current block, and reconstruct the residual sample of the Cb component using the weighted value of the residual sample of the chroma joint residual sample and the Cb component of the current block.

[0209] According to an embodiment, if the chroma joint information indicates 0, the acquisition unit 1710 may acquire the transform coefficient levels of the Cb component and the transform coefficient levels of the Cr component individually from the bitstream. The acquisition unit 1710 may acquire the transform coefficient levels for the transform block of the Cb component from the bitstream, and the decoding unit 1720 may reconstruct the residual sample of the Cb component using the acquired transform coefficient levels. Similarly, the acquisition unit 1710 may acquire the transform coefficient levels for the transform block of the Cr component from the bitstream, and the decoding unit 1720 may reconstruct the residual sample of the Cr component using the acquired transform coefficient levels.

[0210] According to an embodiment, the number of joint modes corresponding to a combination of weighted values ​​of residual samples of Cr component and weighted values ​​of residual samples of Cb component may be set depending on whether the prediction type of the coding unit is an intra prediction mode or an inter prediction mode. When the prediction type of the coding unit is an intra prediction mode, the decoder 1720 according to an embodiment may select one of a number of joint modes based on cbf information for the Cr component and cbf information for the Cb component, and determine weighted values ​​of residual samples of Cr component and weighted values ​​of residual samples of Cb component according to the selected one joint mode. When the prediction type of the coding unit is an inter prediction mode, the decoder 1720 according to an embodiment may determine weighted values ​​of residual samples of Cr component and weighted values ​​of residual samples of Cb component according to one allowed joint mode.

[0211] According to one embodiment, the decoding unit 1720 can determine a joint mode including a weighted value of the residual sample of the Cr component and a residual sample of the Cb component based on chroma joint information, cbf information for the Cr component, and cbf information for the Cb component, and can determine a quantization parameter for the current block based on the joint mode.

[0212] According to an embodiment, the decoder 1720 may determine a reference block in a reference picture using a motion vector of a current block, and may determine a prediction sample corresponding to the current block from a reference sample included in the reference block.

[0213] If the prediction mode of the current block is not the skip mode, the video decoding apparatus 1700 may obtain residual samples by performing inverse quantization and inverse transform on the transform coefficients of the current block obtained from the bitstream. The decoding unit 1720 may determine reconstructed samples of the current block by combining the residual samples of the current block with the prediction samples of the current block.

[0214] A video decoding method for decoding residual samples of chroma components will be described below with reference to FIG.

[0215] FIG. 18 is a flow chart illustrating a video decoding method according to one embodiment.

[0216] In step 1810, the acquiring unit 1710 may acquire information indicating a prediction type of a coding unit including a current block from a bitstream.

[0217] In operation 1820, the acquisition unit 1710 may acquire Cr cbf information and Cb cbf information of the current block from the bitstream.

[0218] In step 1830, the decoder 1720 determines weights of the residual samples of the Cr component and weights of the residual samples of the Cb component based on the prediction type of the coding unit, the Cr cbf information, and the Cb cbf information.

[0219] According to an embodiment, the acquiring unit 1710 may acquire chroma joint information indicating whether one chroma sample is encoded to indicate a residual sample of a Cb component and a corresponding residual sample of a Cr component in a current block from a bitstream. When the chroma joint information indicates that one chroma sample is encoded in a current block, the decoding unit 1720 may determine a weighted value of the residual sample of the Cr component and a weighted value of the residual sample of the Cb component based on a prediction type of a coding unit, the Cr cbf information, and the Cb cbf information.

[0220] For example, one of a combination of weighted values ​​of residual samples of the Cr component and weighted values ​​of residual samples of the Cb component may be selected based on a prediction type of a coding unit, Cr cbf information, and Cb cbf information.

[0221] Specifically, when the prediction type of the coding unit is an intra prediction mode, the decoder 1720 may select one joint mode from among a number of joint modes based on the Cr cbf information and the Cb cbf information, and determine weighted values ​​of the residual sample of the Cr component and the residual sample of the Cb component according to the selected joint mode. Meanwhile, when the prediction type of the coding unit is an inter prediction mode, the decoder 1720 may determine weighted values ​​of the residual sample of the Cr component and the residual sample of the Cb component corresponding to one allowed joint mode.

[0222] In one embodiment, the weighted value of the residual sample of the Cr component is −½, and the weighted value of the residual sample of the Cb component is 1. In another embodiment, the weighted value of the residual sample of the Cr component is −1, and the weighted value of the residual sample of the Cb component is 1. In yet another embodiment, the weighted value of the residual sample of the Cr component is 1, and the weighted value of the residual sample of the Cb component is −½.

[0223] In another example, the combination of the weighted value of the residual sample of the Cr component and the weighted value of the residual sample of the Cb component may be different depending on the joint mode. For example, three combinations of the weighted value of the residual sample of the Cr component and the weighted value of the residual sample of the Cb component may be set to {-1 / 2, 1}, {-1, 1}, and {1, -1 / 2} according to three joint modes. The weighted value of the residual sample of the Cr component and the weighted value of the residual sample of the Cb component may be determined according to one selected from the three joint modes.

[0224] In step 1840, the acquisition unit 1710 may acquire a chroma joint residual sample of the current block from the bitstream.

[0225] In operation 1850, the decoder 1720 reconstructs a residual sample of the Cr component using a weighted value of the chroma joint residual sample of the current block and the residual sample of the Cr component. The decoder 1720 reconstructs a residual sample of the Cb component using a weighted value of the chroma joint residual sample of the current block and the residual sample of the Cb component.

[0226] Specifically, a weighted sum result obtained by applying a weighted value of a residual sample of the Cr component to a chroma joint residual sample of the current block may be determined as a residual sample of the Cr component. Similarly, a weighted sum result obtained by applying a weighted value of a residual sample of the Cb component to a chroma joint residual sample of the current block may be determined as a residual sample of the Cb component.

[0227] According to an embodiment, the decoder 1720 may reconstruct the current block using the motion vector of the current block. The decoder 1720 determines a reference block in a reference picture using the motion vector of the current block, and determines a prediction sample corresponding to the current block from a reference sample included in the reference block. The decoder 1720 determines a reconstructed sample of the current block by adding a prediction sample of the current block and a residual sample of the current block in a prediction mode other than the skip mode. When there is no residual sample, such as in the skip mode, a reconstructed sample of the current block is determined only by the prediction sample of the current block. The current picture including the current block may be reconstructed by reconstructing the current block.

[0228] According to an embodiment, the decoder 1720 determines a joint mode using a weighted value of a residual sample of a Cr component and a weighted value of a residual sample of a Cb component based on the chroma joint information, the Cr cbf information, and the Cb cbf information, and determines a quantization parameter for the current block based on the determined joint mode. For example, when a specific joint mode is determined, a quantization parameter for a chroma component may be determined individually. The decoder 1720 may perform inverse quantization on a transform coefficient of a chroma joint residual sample of the current block using a quantization parameter for a chroma component. The decoder 1720 may perform inverse quantization and inverse transform on the transform coefficient to restore a chroma joint residual sample, and may restore a residual sample of a Cr component and a residual sample of a Cb component by applying a weighted value of a residual sample of a Cr component and a weighted value of a residual sample of a Cb component to the chroma joint residual sample.

[0229] A video encoding apparatus for dividing a picture into tiles and encoding the tiles will be described below with reference to FIG.

[0230] FIG. 19 is a block diagram illustrating a video encoding device according to an embodiment.

[0231] The video encoding device 1900 according to an embodiment may include a prediction unit 1910 and a residual encoding unit 1920 .

[0232] The video encoding device 1900 performs inter prediction, encodes the determined motion information, and outputs the encoded information in the form of a bitstream.

[0233] The video encoding device 1900 according to an embodiment may include a central processor (not shown) that controls the block position determination unit 1910 and the inter prediction performer 1920. Alternatively, the prediction unit 1910 and the residual encoding unit 1920 may be operated by their own processors (not shown), and the video encoding device 1900 may be operated as a whole by the processors (not shown) operating in an organic manner. Alternatively, the prediction unit 1910 and the residual encoding unit 1920 may be controlled by a processor (not shown) external to the video encoding device 1900.

[0234] The video encoding device 1900 may include one or more data storage units (not shown) that store input / output data of the prediction unit 1910 and the residual encoding unit 1920. The video encoding device 1900 may include a memory control unit (not shown) that controls data input / output of the data storage units (not shown).

[0235] The video encoding device 1900 may perform video encoding operations including prediction by operating in cooperation with an internal video encoding processor or an external video encoding processor for video encoding. The internal video encoding processor of the video encoding device 1900 according to an embodiment may be implemented by including a video encoding processing module in a central processing unit or a graphic processing unit, rather than a separate processor, to implement basic video encoding operations.

[0236] According to one embodiment, the predictor 1910 determines a prediction type for the coding unit that contains the current block.

[0237] The prediction unit 1910 determines samples of a reference block indicated by a motion vector of a current block as predicted samples of the current block. The residual encoding unit 1920 may determine residual samples that are differences between original samples and predicted samples of the current block. The residual encoding unit 1920 may encode transform coefficients generated by performing transform and quantization on the residual samples of the current block.

[0238] However, the video encoding apparatus 1900 according to an embodiment may determine and encode the residual sample of the Cb component and the residual sample of the Cr component differently from the actual residual sample, which is a difference between the original sample and the predicted sample. The residual encoding unit 1920 may encode one chroma joint residual sample instead of the actual value of the residual sample of the Cb component and the actual value of the residual sample of the Cr component.

[0239] According to an embodiment, the residual encoder 1920 may determine Cr cbf information and Cb cbf information of the current block. According to an embodiment, the residual encoder 1920 may determine weighted values ​​of residual samples of Cr components and weighted values ​​of residual samples of Cb components based on a prediction type of a coding unit, Cr cbf information, and Cb cbf information.

[0240] According to an embodiment, the residual encoder 1920 may generate a chroma joint residual sample of the current block. The video encoder 1900 may determine the chroma joint residual sample to be encoded for encoding efficiency, although it knows the actual Cb component residual sample and the Cr component residual sample. In the video decoder 1700, the Cr component residual sample is restored using the weighted value of the chroma joint residual sample and the Cr component residual sample of the current block, and the Cb component residual sample is restored using the weighted value of the chroma joint residual sample and the Cb component residual sample of the current block. Considering this, the residual encoder 1920 may determine the chroma joint residual sample using the actual value of the Cb component residual sample and the actual value of the Cr component residual sample.

[0241] Also, the residual encoder 1920 according to an embodiment may determine weights of residual samples of the Cr component and residual samples of the Cb component based on a prediction type of a coding unit, Cr cbf information, and Cb cbf information.

[0242] According to one embodiment, the residual encoding unit 1920 may set the number of joint modes corresponding to combinations of weighted values ​​of residual samples of the Cr component and weighted values ​​of residual samples of the Cb component differently depending on whether the prediction type of the encoding unit is an intra prediction mode or an inter prediction mode.

[0243] The residual encoder 1920 may select one of a number of joint modes based on the cbf information for the Cr component and the cbf information for the Cb component when the prediction type of the coding unit is an intra prediction mode, and may determine weights of the residual sample of the Cr component and the residual sample of the Cb component according to the selected joint mode. When the prediction type of the coding unit is an inter prediction mode, the residual encoder 1920 may determine weights of the residual sample of the Cr component and the residual sample of the Cb component according to one allowed joint mode.

[0244] In addition, the video encoding device 1900 may generate chroma joint information indicating whether one chroma sample is encoded to indicate a residual sample of a Cb component and a corresponding residual sample of a Cr component in the current block.

[0245] A process in which the video encoding device 1900 performs video encoding including residual samples of chrominance components will be described below with reference to FIG.

[0246] FIG. 20 is a flow chart illustrating a video encoding method according to one embodiment.

[0247] In operation 2010, the prediction unit 1910 may determine a prediction type of a coding unit including a current block. The video encoding apparatus 1900 may encode prediction type information indicating whether the prediction type of the coding unit including the current block is an inter prediction mode or an intra prediction mode.

[0248] In operation 2020, the residual encoder 1920 may determine Cr cbf information and Cb cbf information of the current block. For example, the residual encoder 1920 may encode the Cr cbf information to indicate whether the current block includes a Cr component having a non-zero transform coefficient level. For example, if the current block does not include a Cr component having a non-zero transform coefficient level, the residual encoder 1920 may encode the Cr cbf information to indicate 0. If the current block includes a Cr component having a non-zero transform coefficient level, the residual encoder 1920 may encode the Cr cbf information to indicate 1. Similarly, the residual encoder 1920 may encode the Cb cbf information to indicate whether the current block includes a Cb component having a non-zero transform coefficient level. For example, if the current block does not include a Cb component having a non-zero transform coefficient level, the residual encoder 1920 may encode the Cb cbf information to indicate 0. If the current block includes a Cb component whose transform coefficient level is not 0, the residual encoder 1920 may encode the Cb cbf information to indicate 1.

[0249] In operation 2030, the residual encoder 1920 may determine weights of the residual samples of the Cr component and the residual samples of the Cb component based on the prediction type of the coding unit, the Cr cbf information, and the Cb cbf information.

[0250] In one embodiment, the weighted value of the residual sample of the Cr component is −½, and the weighted value of the residual sample of the Cb component is 1. In another embodiment, the weighted value of the residual sample of the Cr component is −1, and the weighted value of the residual sample of the Cb component is 1. In yet another embodiment, the weighted value of the residual sample of the Cr component is 1, and the weighted value of the residual sample of the Cb component is −½.

[0251] The residual encoder 1920 may select one of a number of joint modes based on the cbf information for the Cr component and the cbf information for the Cb component when the prediction type of the coding unit is an intra prediction mode, and may determine weights of the residual sample of the Cr component and the residual sample of the Cb component according to the selected joint mode. When the prediction type of the coding unit is an inter prediction mode, the residual encoder 1920 may determine weights of the residual sample of the Cr component and the residual sample of the Cb component according to one allowed joint mode.

[0252] In another example, a number of combinations of weights of residual samples of Cr component and weights of residual samples of Cb component may be provided, and one of the weight combinations may be selected for each joint mode. For example, one of the combinations of weights of residual samples of Cr component and weights of residual samples of Cb component, {-1 / 2, 1}, {-1, 1}, {1, -1 / 2}, may be selected for each joint mode. The weights of residual samples of Cr component and weights of residual samples of Cb component may be determined according to one of the three joint modes selected.

[0253] In a more specific example, when the prediction type of the coding unit is an intra prediction mode, the residual encoder 1920 selects one joint mode from among a plurality of joint modes based on the Cr cbf information and the Cb cbf information, and determines weights of the residual sample of the Cr component and the residual sample of the Cb component according to the selected joint mode. On the other hand, when the prediction type of the coding unit is an inter prediction mode, the residual encoder 1920 may determine weights of the residual sample of the Cr component and the residual sample of the Cb component according to one allowed joint mode.

[0254] In operation 2040, the residual encoder 1920 generates a chroma joint residual sample of the current block. In one embodiment, the residual encoder 1920 may encode one chroma joint residual sample instead of the actual value of the residual sample of the Cb component and the actual value of the residual sample of the Cr component. If the size of the current block is a luma 8x8 block and a chroma block 4x4, a total of 16 chroma joint residual samples may be obtained from the bitstream.

[0255] Considering that in the video decoding device 1700, the residual sample of the Cr component is restored using the chroma joint residual sample of the current block and the weighted value of the residual sample of the Cr component, and the residual sample of the Cb component is restored using the chroma joint residual sample of the current block and the weighted value of the residual sample of the Cb component, the residual encoding unit 1920 determines the chroma joint residual sample using the actual value of the residual sample of the Cb component and the actual value of the residual sample of the Cr component.

[0256] The video encoding device 1900 generates chroma joint information indicating whether one chroma sample is encoded to indicate a residual sample of a Cb component and a corresponding residual sample of a Cr component in the current block. If one chroma sample is encoded to indicate a residual sample of a Cb component and a corresponding residual sample of a Cr component in the current block, steps 2030 and 2040 may be performed.

[0257] According to an embodiment, the residual encoder 1920 may determine a joint mode using a weighted value of a residual sample of a Cr component and a weighted value of a residual sample of a Cb component based on the chroma joint information, the Cr cbf information, and the Cb cbf information, and may determine a quantization parameter for a current block based on the determined joint mode. For example, when a specific joint mode is determined, a quantization parameter for a chroma component may be determined individually. The residual encoder 1920 may perform quantization on transform coefficients of the chroma joint residual samples using the quantization parameter. The quantized transform coefficients may be coded into a syntax element called a transform coefficient level.

[0258] Hereinafter, a process of determining a chroma joint residual sample using a residual sample of a Cb component and a residual sample of a Cb component, and restoring a residual sample of a Cb component and a residual sample of a Cb component using the chroma joint residual sample will be described with reference to Figures 21 and 22.

[0259] FIG. 21 illustrates a graph of the relationship between the Cb, Cr and chroma coding components according to one embodiment.

[0260] The graph 2100 illustrates the relationship between the actual value 2120 of the residual sample of the Cr component, the actual value 2110 of the residual sample of the Cb component, and the chroma joint residual sample 2140 in the video encoding device 1900. The video encoding device 1900 according to one embodiment may determine the average value of the actual value 2120 of the residual sample of the Cr component multiplied by −1 2130 and the actual value 2110 of the residual sample of the Cb component as the chroma joint residual sample 2140.

[0261] The graph 2200 shows the relationship between the actual value 2120 of the Cr component residual sample, the actual value 2110 of the Cb component residual sample, and the chroma joint residual sample 2140 in the video decoding device 1700 .

[0262] In the video decoding device 1700, the residual sample weighting value of the Cb component may be determined to be 1, and the residual sample weighting value of the Cr component may be determined to be −1.

[0263] Therefore, when the acquisition unit 1710 acquires the chroma joint residual sample 2140, the decoding unit 1720 may determine the same value as the chroma joint residual sample 2140 as the restored value of the residual sample 2160 of the Cb component, and may determine the value generated by multiplying the chroma joint residual sample 2140 by -1 as the restored value of the residual sample 2170 of the Cr component.

[0264] FIG. 22 is a diagram illustrating a relationship between a Cb component, a Cr component, and a chroma coding component according to an embodiment.

[0265] 22, Cb represents a restored value of a residual sample of the Cb component, Cr represents a restored value of a residual sample of the Cr component, jointCb represents a chroma joint residual sample, and weightTable(corrIdx) represents a residual sample weight value of the Cr component.

[0266] According to the first relational expression, the residual sample weighting value of the Cb component is 1, so that the same value as the chroma joint residual sample jointCb can be determined as the restored value Cb of the residual sample of the Cb component.

[0267] According to the second relation, the residual sample weight value of the Cr component is weightTable(corrIdx), so the weighted sum of the chroma joint residual sample jointCb can be determined as the restored value Cr of the residual sample of the Cr component. weightTable(corrIdx) is a table including a number of weight values, and one weight value determined by the index corrIdx among the multiple weight values ​​can be determined as the residual sample weight value of the Cr component. In this case, the residual sample weight value of the Cb component is considered to be fixed to 1.

[0268] The weight values ​​illustrated in Fig. 21 and Fig. 22 are merely examples, and the joint modes possible in the concept of the present disclosure are not limited thereto. For example, weightTable can be {-1, 1, -2, -1 / 2, -4, 1 / 4...}. In this case, the residual sample weight value of the Cb component is fixed to 1, and the residual sample weight value of the Cr component can be determined to one of {-1, 1, -2, -1 / 2, -4, 1 / 4...}. As another example, the joint modes for Cb and Cr residual samples can be set to {(1, ±1 / 2), (1, ±1), (±1 / 2, 1)}, and one of the joint modes can be determined according to the prediction type, Cb cbf, and Cr cbf.

[0269] FIG. 23 illustrates a transform unit syntax according to one embodiment.

[0270] The video decoding device 1700 can obtain the syntax elements tu_cbf_cb, tu_cbf_cr, and tu_joint_cbcr_residual_flag from the transform unit syntax 2300.

[0271] tu_cbf_cb is a syntax element corresponding to Cb cbf information and may indicate whether the current transform block includes a Cb component whose transform coefficient level is not 0. tu_cbf_cr is a syntax element corresponding to Cr cbf information and may indicate whether the current transform block includes a Cr component whose transform coefficient level is not 0. tu_joint_cbcr_residual_flag is a syntax element corresponding to chroma joint information and may indicate whether one chroma sample is coded to indicate a residual sample of a Cb component and a corresponding residual sample of a Cr component in the current transform block.

[0272] The video decoding device 1700 may obtain sps_joint_cbcr_enabled_flag from a sequence parameter set before decoding the transform unit syntax 2300. When sps_joint_cbcr_enabled_flag indicates 1, it means that a chroma joint scheme in which one chroma sample is coded to indicate a residual sample of a Cb component and a corresponding residual sample of a Cr component in a block included in the current sequence is allowed.

[0273] Therefore, the video decoding device 1700 may first obtain tu_joint_cbcr_residual_flag, i.e., chroma joint information, if the chroma joint method is enabled in the current sequence through sps_joint_cbcr_enabled_flag (sps_joint_cbcr_enabled_flag&&), and the prediction type of the coding unit including the current transform block is intra prediction type ((CuPredMode[chType][x0][y0] == MODE_INTRA)&&, and Cr cbf information or Cb cbf information is 1 (tu_cbf_cb[xC][yC]||tu_cbf_cr[xC][yC]). In addition, if the prediction type of the coding unit including the current transform block is inter prediction type, and both Cr cbf information and Cb cbf information are 1 (tu_cbf_cb[xC][yC] && tu_cbf_cr[xC][yC] ) can obtain tu_joint_cbcr_residual_flag, i.e., chroma joint information, only in the

[0274] Therefore, when the prediction type of the coding unit is an intra prediction type and a transform coefficient having a Cr component level of 1 exists in the current block or a transform coefficient having a Cb component level of 1 exists in the current block, it may be determined whether one chroma sample is encoded to indicate a residual sample of the Cb component and a residual sample of the corresponding Cr component through the chroma joint information. When the prediction type of the coding unit is an inter prediction type and a transform coefficient having a Cr component level of 1 exists in the current block and a transform coefficient having a Cb component level of 1 exists in the current block, it may be determined whether one chroma sample is encoded to indicate a residual sample of the Cb component and a residual sample of the corresponding Cr component through the chroma joint information. Here, if the acquired chroma joint information indicates 0, it means that the residual sample of the Cb component and the residual sample of the corresponding Cr component should be acquired from the bitstream, respectively. On the other hand, if the chroma joint information indicates 1, it means that one chroma sample is acquired from the bitstream, and thus the residual sample of the Cb component and the residual sample of the corresponding Cr component are restored.

[0275] FIG. 24 is a diagram showing a relationship between the Cb component, the Cr component, and the chroma coding component for a combination of the Cb cbf value and the Cr cbf value according to an embodiment.

[0276] As described with reference to FIG. 23, once the Cb cbf information tu_cbf_cb and the Cr cbf information tu_cbf_cr are acquired, weights for determining the reconstructed values ​​resCb and resCr of the residual samples of the Cb component and the residual samples of the Cr component can be determined based on the Cb cbf information and the Cr cbf information.

[0277] For example, when tu_cbf_cb is 1 and tu_cbf_cr is 0, the restored value resCb of the residual sample of the Cb component may be determined to be the same as the chroma joint residual sample resJointC, and the restored value resCr of the residual sample of the Cr component may be determined to be the chroma joint residual sample resJointC multiplied by ±1 / 2. In this case, the weighted value of the Cb component is 1, the weighted value of the Cr component is ±1 / 2, and the joint mode index is 1.

[0278] For example, when tu_cbf_cb is 1 and tu_cbf_cr is 1, the restored value resCb of the residual sample of the Cb component may be determined to be the same as the chroma joint residual sample resJointC, and the restored value resCr of the residual sample of the Cr component may be determined to be the chroma joint residual sample resJointC multiplied by ±1. In this case, the weighted value of the Cb component is 1, the weighted value of the Cr component is ±1, and the joint mode index is 2.

[0279] For example, when tu_cbf_cb is 0 and tu_cbf_cr is 1, the restored value resCb of the residual sample of the Cb component may be determined to be a value obtained by multiplying the chroma joint residual sample resJointC by ±1 / 2, and the restored value resCr of the residual sample of the Cr component may be determined to be the same value as the chroma joint residual sample resJointC. In this case, the weighted value of the Cb component is ±1 / 2, the weighted value of the Cr component is 1, and the joint mode index is 3.

[0280] When the prediction type of the coding unit is an intra prediction mode, the joint mode index can be any of 1, 2, and 3. That is, when the prediction type of the coding unit is an intra prediction mode, the weighting value of the Cb component and the weighting value of the Cr component can be determined according to the joint mode index.

[0281] However, when the prediction type of the coding unit is an inter prediction mode, only the joint mode index 2 is allowed. Therefore, when the prediction type of the coding unit is an inter prediction mode, the chroma joint scheme is allowed only when the joint mode index is 2, i.e., when tu_cbf_cb is 1 and tu_cbf_cr is 1, and the weight of the Cb component may be determined to be 1 and the weight of the Cr component may be determined to be ±1.

[0282] In the above, a method has been proposed in which the video encoding device 1900 encodes one chroma joint residual sample instead of the actual value of the residual sample of the Cb component and the actual value of the residual sample of the Cr component, and the video decoding device 1700 obtains one chroma joint residual sample from the bitstream, and determines the reconstructed value of the residual sample of the Cb component and the reconstructed value of the residual sample of the Cr component from the one chroma joint residual sample.

[0283] The residual sample of the Cb component and the residual sample of the Cr component are encoded into one joint residual sample, so that the bit rate can be saved compared to encoding them individually. The video encoding device 1900 determines the chroma joint residual sample by combining the actual value of the residual sample of the Cb component and the actual value of the residual sample of the Cr component according to a certain relational equation, or the video decoding device 1700 restores the residual sample of the Cb component and the residual sample of the Cr component using the joint residual sample, so that the encoding efficiency can be further improved.

[0284] Hereinafter, the above embodiment may be modified so that the video encoding device 1900 encodes chroma joint sample values ​​instead of actual values ​​of the residual samples of the Cb component and the Cr component, and the video decoding device 1700 proposes various methods for determining the reconstructed values ​​of the residual samples of the Cb component and the Cr component using the chroma joint sample values ​​obtained from the bitstream.

[0285] First, the position where the chroma joint information is obtained can be changed in various ways.

[0286] In the embodiment according to FIG. 23, after the luma cbf information, the Cb cbf information and the Cr cbf information are obtained from the bitstream, the chroma joint information can be obtained from the bitstream according to the Cb cbf information and the Cr cbf information.

[0287] According to another embodiment, after luma cbf information and Cb cbf information are first obtained, chroma joint information may be obtained if Cb cbf information is 1, and Cr cbf information may be obtained if Cb cbf information is 0 and chroma joint information is 0. In this case, Cb cbf information may be decoded into a binary string consisting of one bin, chroma joint information may be decoded into a binary string consisting of two bins, and Cr cbf information may be decoded into a binary string consisting of 2 / 3 bins.

[0288] According to another embodiment, in order to reduce the number of times of encoding the joint chroma information, the joint chroma information may be decoded before the Cb cbf information. Specifically, the luma cbf and chroma joint information may be acquired, and if the chroma joint information is 1, the Cb cbf information value may be determined to be 1, and the Cr cbf information value may be determined to be 0. However, if the chroma joint information is 0, the Cb cbf information and the Cr cbf information may be acquired from the bitstream, respectively. In this case, the chroma joint information may be decoded into a binary string consisting of one bin, the Cb cbf information may be decoded into a binary string consisting of 1 / 2 bins, and the Cr cbf information may be decoded into a binary string consisting of 1 / 2 bins.

[0289] The context modeling method for chroma joint information will now be described.

[0290] According to an embodiment, in order to obtain the chroma joint information, entropy decoding may be performed based on the CABAC decoding method, in which case a context index may be determined to decode the chroma joint information.

[0291] For example, a context index for decoding the chroma joint information may be determined based on whether the prediction type of the coding unit that includes the block is an intra prediction mode or an inter prediction mode.

[0292] As another example, the context index for decoding the chroma joint information may be determined based on the size of the block. As a specific example, when the width of the block is W and the height of the block is H, log2W is a value obtained by applying log2 to W, and log2H is a value obtained by applying log2 to H. The context index may be determined based on the smaller value of log2W and log2H. As another example, the context index may be determined based on the larger value of log2W and log2H. As another example, the context index may be determined based on the average value of log2W and log2H. As another example, the context index may be determined based on the sum of log2W and log2H.

[0293] As another example, a context index for decoding chroma joint information may be determined based on a ratio of a block's height to its width.

[0294] As another example, a context index for decoding chroma joint information may be determined based on whether the inter prediction direction of a block is a unidirectional prediction type or a bidirectional prediction type.

[0295] As another example, a context index for decoding chroma joint information of a current block may be determined based on chroma joint information of a neighboring block.

[0296] As another example, a context index for decoding chroma joint information of the current block may be determined based on the coding information of the neighboring block. As a specific example, a context index for decoding chroma joint information of the current block may be determined based on the cbf information of the neighboring block. As another example, a context index for decoding chroma joint information of the current block may be determined based on whether the prediction type of the neighboring block is an intra prediction mode or an inter prediction mode. As another example, a context index for decoding chroma joint information of the current block may be determined based on the transformation type of the neighboring block.

[0297] As another example, a context index for decoding chroma joint information of a current block may be determined based on a transform type of the current block, for example, based on whether the transform type of the current block is a transform skip type, a sub-block transform type, a secondary transform type, or a block-based transform type.

[0298] As another example, a context index for decoding chroma joint information of the current block may be determined based on a default encoding mode. As a specific example, the context index may be determined based on whether the encoding mode of the current block is one of MHintra mode, TriangleIntra mode, Affine mode, Intra BC (IBC) mode, Symmetric motion vector difference (SMVD) mode, Merge with motion vector difference (MMVD) mode, Decoder-side Motion Vector Refinement (DMVR) mode, Cross-component Linear Model (CCLM) mode, Position dependent (intra) prediction combination (PDPC) mode, MultiRefIntra (Multi Reference Line intra prediction) mode, intraSubPartition mode, inloop reshaper mode, Overlapped Block Motion Compensation (OBMC) mode, transformSkip mode, and Sub-block transform (SBT) mode.

[0299] As another example, a context index for decoding chroma joint information of a current block may be determined based on a multiple transform selection (MTS) index of the current block.

[0300] As another example, a context index for decoding chroma joint information of a current block may be determined based on a combination of two or more of the various conditions proposed above.

[0301] Hereinafter, various embodiments will be described regarding conditions under which a chroma joint scheme in which one chroma sample is coded to indicate a residual sample of a Cb component and a corresponding residual sample of a Cr component in a block can be applied.

[0302] In the video decoding device 1700 according to an embodiment, when the prediction type of the coding unit is an intra prediction mode or an inter prediction mode, it may be determined whether or not a chroma joint scheme is applied, without any restriction on the block size.

[0303] As another example, whether or not the chroma joint method is applied may be determined based on the size of the block. As a specific example, when the width of the block is W and the height of the block is H, log2W is a value obtained by applying log2 to W, and log2H is a value obtained by applying log2 to H. Whether or not the chroma joint method is applied may be determined based on the smaller value of log2W and log2H. As another example, whether or not the chroma joint method is applied may be determined based on the larger value of log2W and log2H. As another example, whether or not the chroma joint method is applied may be determined based on the average value of log2W and log2H. As another example, whether or not the chroma joint method is applied may be determined based on the sum of log2W and log2H.

[0304] As another example, whether or not a chroma joint scheme is applied may be determined based on the shape of the block.

[0305] As another example, in the case of an inter-prediction mode block, whether or not a chroma joint scheme is applied may be determined based on whether the prediction direction is a unidirectional prediction type or a bidirectional prediction type.

[0306] As another example, whether or not a chroma joint scheme is applied may be determined based on the ratio of the height and width of a block.

[0307] As another example, whether or not the chroma joint scheme is applied may be determined based on the transform type of the current block. For example, whether or not the chroma joint scheme is applied may be determined based on whether the transform type of the current block is a transform skip type, a sub-block transform type, a secondary transform type, or a block-based transform type.

[0308] As another example, whether or not the chroma joint scheme is applied may be determined based on the number of transform coefficients of the Cb component or the number of transform coefficients of the Cr component.

[0309] As another example, whether or not the chroma joint method is applied may be determined based on a default encoding mode. As a specific example, whether or not the chroma joint method is applied may be determined based on whether or not the encoding mode of the current block is one of MHintra mode, TriangleIntra mode, Affine mode, Intra BC (IBC) mode, Symmetric motion vector difference (SMVD) mode, Merge with motion vector difference (MMVD) mode, Decoder-side Motion Vector Refinement (DMVR) mode, Cross-component Linear Model (CCLM) mode, Position dependent (intra) prediction combination (PDPC) mode, MultiRefIntra (Multi Reference Line intra prediction) mode, intraSubPartition mode, inloop reshaper mode, Overlapped Block Motion Compensation (OBMC) mode, transformSkip mode, and Sub-block transform (SBT) mode.

[0310] As another example, it may be determined whether or not the chroma joint scheme is applied at a slice level, and the application of the chroma joint scheme may be allowed for a block included in the current slice according to a flag obtained in the slice header.

[0311] As another example, it may be determined whether or not a chroma joint scheme is applied at the temporal layer level.

[0312] As another example, whether or not the chroma joint scheme is applied may be determined based on whether the current slice is a referenceable slice or a non-referenceable slice.

[0313] As another example, information indicating whether the chroma joint scheme is applied to each sub-block of the current block may be obtained, and therefore, it may be determined whether the chroma joint scheme is applied to each sub-block of the transform block.

[0314] As another example, whether or not the chroma joint method is applied may be determined based on a combination of two or more of the above conditions.

[0315] Specific conditional statements for expressing the above-mentioned various conditions for determining whether the chroma joint method is applied are as follows:

[0316] - If intraTU only - If interTU only || inter_slice only - If intraTU && size > threshold || interTU && size > threshold - If intraTU && size < threshold || interTU && size < threshold - If tu_width != tu_height - If tu_width == tu_height - If ratio(tu_width, tu_height) > threshold - If interTU && predType==UniPred - If !(interTU && predType==BiPred) - If TU is not transform skip mode - If TU is transform skip mode - If no secondary transform is applied - If no SBT is applied - If SBT is applied - If number of coeff. of Cb < threshold - If number of coeff. of Cb > threshold - If number of coeff. of Y < threshold - If number of coeff. of Y > threshold - If cbfCb==0 & cbf(cr)==1 || cbfCb==1 & cbf(cr)==0 Hereinafter, a method in which the video encoding device 1900 determines a chroma joint residual sample according to another embodiment, and a process in which the video decoding device 1700 restores a residual sample of a Cb component and a residual sample of a Cr component using the chroma joint residual sample will be described in detail.

[0317] The video encoding device 1900 according to another embodiment may determine a chroma joint residual sample resJoint as follows, using the actual value resCb of the residual sample of the Cb component and the actual value resCr of the residual sample of the Cr component.

[0318] resJoint=(resCb*3-resCr) / 4 resJoint=(resCb-resCr*3) / 4 The video encoding device 1900 can encode the value with the lower RD cost of the two resJoints as a chroma joint residual sample.

[0319] The video decoding device 1700 according to another embodiment may determine a method for reconstructing a residual sample of the Cr component based on a reconstructed value of a sample of the luma component or a reconstructed value of a sample of the Cb component.

[0320] As another example, the video decoding device 1700 may determine a method for reconstructing a residual sample of the Cr component based on a reconstructed value of a residual sample of the luma component or a reconstructed value of a residual sample of the Cb component.

[0321] As another example, the video decoding device 1700 may determine a method for restoring a residual sample of a Cr component based on detailed information of a luma component or detailed information of a Cb component. For example, the detailed information may include at least one of a magnitude, a mean, a variance, a gradient, a high frequency component, and a low frequency component of a luma component or a Cb component.

[0322] As another example, the video decoding apparatus 1700 may determine a method of restoring a residual sample of a Cr component for each sub-block of the current block based on a content characteristic of each sub-block. For example, the content of each sub-block may be a restored value of a sample of a luma component or a Cb component of the sub-block or a restored value of a residual sample of a luma component or a Cb component of the sub-block. The content characteristic of each sub-block may include at least one of a magnitude, a mean, a variance, a gradient, a high frequency component, and a low frequency component of the sub-block.

[0323] As another example, the video encoding apparatus 1900 may encode a chroma joint residual sample and a chroma joint residual sample difference. The chroma joint residual sample difference indicates a difference value between a chroma joint residual sample and a residual sample of a Cr component. The video encoding apparatus 1900 may encode a flag indicating whether the residual sample of the Cr component has been encoded. In this case, the video decoding apparatus 1700 may obtain the flag from a bitstream, and if it is determined through the flag that the residual sample of the Cr component has not been encoded, the video decoding apparatus 1700 may obtain a chroma joint residual sample jointCb and a chroma joint residual sample difference diff_jointCb_Cr from the bitstream. The video decoding apparatus 1700 may determine a restored value Cb of the residual sample of the Cb component and a restored value Cr of the residual sample of the Cr component according to the following formulas: (Cb=2*jointCb+Cr, Cr=jointCb-diff_jointCb_Cr) As another example, the video encoding apparatus 1900 may encode an average value of the residual sample of the Cb component and the residual sample of the Cr component, and may encode a half value of the difference between the residual sample of the Cb component and the residual sample of the Cr component. Also, the video encoding apparatus 1900 may encode a flag indicating whether the residual sample of the Cr component has been encoded. In this case, the video decoding apparatus 1700 may obtain the flag from a bitstream, and if it is determined through the flag that the residual sample of the Cr component is not encoded, may obtain the average value ave_CbCr and a half value of the difference diff_CbCr from the bitstream. The video decoding apparatus 1700 may determine the restored value Cb of the residual sample of the Cb component and the restored value Cr of the residual sample of the Cr component according to the following equations (Cb=ave_CbCr+diff_CbCr, Cr=ave_CbCr-diff_CbCr). In that case, the ave_CbCr value is also the same as Cb and Cr, and the combinations of weighted values ​​of the Cb and Cr components are not restricted to (1, 1) (1, -1).

[0324] As another example, the video encoding apparatus 1900 may encode a chroma joint residual sample having the same value as the residual sample of the Cb component. The video encoding apparatus 1900 may also encode a chroma joint weight index. In this case, the video decoding apparatus 1700 may obtain a chroma joint residual sample from a bitstream and restore a residual sample of the Cb component having the same value as the chroma joint residual sample. The video decoding apparatus 1700 may also obtain a chroma joint weight index from a bitstream and obtain a chroma joint weight indicated by the weight index in the weight table. The video decoding apparatus 1700 may determine a value generated by multiplying the chroma joint weight value and the chroma joint residual sample as a restored value of the residual sample of the Cr component. In this case, the weight table includes {-1, 1, -2, -1 / 2, -4, 1 / 4 ..}, and each chroma joint weight index increasing from 0 may indicate each weight in the weight table. That is, if the chroma joint weight index acquired from the bitstream is 0, a value generated by multiplying the chroma joint residual sample by −1 may be determined as the restored value of the residual sample of the Cr component.

[0325] As another example, the video encoding apparatus 1900 may encode a chroma joint residual sample having the same value as the residual sample of the Cr component. The video encoding apparatus 1900 may also encode a chroma joint weight index. In this case, the video decoding apparatus 1700 may obtain a chroma joint residual sample from a bitstream and restore a residual sample of the Cr component having the same value as the chroma joint residual sample. The video decoding apparatus 1700 may also obtain a chroma joint weight index from a bitstream and obtain a chroma joint weight value indicated by the weight index in the weight table. The video decoding apparatus 1700 may determine a value generated by multiplying the chroma joint weight value and the chroma joint residual sample as a restored value of the residual sample of the Cb component. In this case, the weight table includes {-1, 1, -2, -4 ..}, and each chroma joint weight index increasing from 0 may indicate each weight value in the weight table. That is, if the chroma joint weight index obtained from the bitstream is 0, the value generated by multiplying the chroma joint residual sample by -1 may be determined as the restored value of the residual sample of the Cb component. In general, since the sample of the Cr component is smaller than the sample of the Cb component, the absolute value of the chroma joint weight included in the weight table is equal to or greater than 1.

[0326] In the above embodiment, a method for encoding and decoding chroma residual samples in the spatial domain is described. Hereinafter, a method for encoding and decoding chroma transform coefficients in the transform domain will be described. Transform coefficients of the Cr component can be encoded / decoded using some of the transform coefficients of the Cb component.

[0327] According to an embodiment, the video encoding device 1900 encodes the transform coefficients of the Cb component, and does not encode the transform coefficients of the Cr component. The video decoding device 1700 may determine a restored value of the transform coefficients of the Cb component by decoding the transform coefficients of the Cb component acquired from a bitstream. The video decoding device 1700 may restore the transform coefficients of the Cr component by using low frequency components of the transform coefficients of the Cb component. As another example, a value obtained by multiplying the transform coefficients of the Cb component by a predetermined weighting value may be determined as the restored value of the transform coefficients of the Cr component.

[0328] According to another embodiment, the video encoding apparatus 1900 encodes the transform coefficients of the Cb component and the residual component of the Cb component, and does not encode the transform coefficients of the Cr component, the residual component, and Cr cbf information. The video decoding apparatus 1700 may determine a restored value of the transform coefficients of the Cb component by decoding the transform coefficients of the Cb component acquired from a bitstream. The video decoding apparatus 1700 may restore the transform coefficients of the Cr component by using low frequency components of the transform coefficients of the Cb component. As another example, a value obtained by multiplying the transform coefficients of the Cb component by a predetermined weighting value may be determined as the restored value of the transform coefficients of the Cr component.

[0329] Hereinafter, various embodiments will be described for determining a quantization parameter for a chroma component using a delta quantization parameter for a Cb component when a chroma joint scheme of a certain joint mode is feasible.

[0330] According to an embodiment, the video decoding device 1900 may determine a chroma joint quantization parameter QPjoint by subtracting delQP from the chroma joint quantization parameter QPcb for the Cb component when dQP is 2. For example, when the joint mode index is 1, the video decoding device 1900 may perform inverse quantization on the transform coefficients of the Cb component and the transform coefficients of the Cr component using the chroma joint quantization parameter QPjoint.

[0331] As another example, the dQP for the chroma component may be obtained through a transform block syntax. Thus, the video decoding device 1900 may obtain the dQP for the chroma component for each transform unit and determine the dQP of the Cb component and the Cr component included in the current transform unit.

[0332] As another example, the dQP for the chroma component may be obtained through a prediction block syntax. Thus, the video decoding device 1900 may obtain the dQP for the chroma component for each prediction unit and determine the dQP of the Cb component and the Cr component included in the current prediction unit.

[0333] As another example, the dQP for the chroma component may be obtained through a coding block syntax. Thus, the video decoding device 1900 may obtain the dQP for the chroma component for each coding unit and determine the dQP of the Cb component and the Cr component included in the current coding unit.

[0334] As another example, the dQP for the chroma components may be obtained through a maximum coding block syntax. Thus, the video decoding device 1900 may obtain the dQP for the chroma components for each maximum coding unit and determine the dQP for the Cb component and the Cr component included in the current maximum coding unit.

[0335] As another example, the dQP for the chroma component may be obtained through a slice header syntax. Thus, the video decoding device 1900 may obtain the dQP for the chroma component for each slice and determine the dQP of the Cb component and the Cr component included in the current slice.

[0336] As another example, the dQP for the chroma components may be obtained for each temporal layer. Thus, the video decoding device 1900 may determine the dQP of the Cb and Cr components included in the current temporal layer.

[0337] For example, the dQP for the chroma component may be a difference between the QP for the Cb component and the QP for the luma component. As another example, the QP for the chroma component may be a difference between the QP for the chroma component and a default QP.

[0338] As another example, the video decoding apparatus 1700 may determine the dQP for the chroma components based on the prediction type of the coding unit. For example, if the prediction type of the coding unit is an intra prediction mode, the dQP for the chroma components may be determined to be 2, and if the prediction type is not an intra prediction mode, the dQP for the chroma components may be determined to be 1.

[0339] As another example, the video decoding device 1700 may determine the dQP for the chroma components based on the block size. For example, if the block size is greater than or equal to 16x16, the dQP for the chroma components may be determined to be 1, and if the block size is less than 16x16, the dQP for the chroma components may be determined to be 2.

[0340] As another example, the video decoding device 1700 may determine the dQP for the chroma components based on a predetermined encoding mode of the block. As a specific example, the encoding mode of the current block is at least one of MHintra mode, TriangleIntra mode, Affine mode, Intra BC (IBC) mode, Symmetric motion vector difference (SMVD) mode, Merge with motion vector difference (MMVD) mode, Decoder-side Motion Vector Refinement (DMVR) mode, Cross-component Linear Model (CCLM) mode, Position dependent (intra) prediction combination (PDPC) mode, Multi Reference Line intra prediction (MultiRefIntra) mode, intraSubPartition mode, inloop reshaper mode, Overlapped Block Motion Compensation (OBMC) mode, transformSkip mode, and Sub-block transform (SBT) mode. For example, if the index of a given coding mode of the current block is 1, the dQP for the chroma component may be determined to be 1, and if the index is not 1, the dQP for the chroma component may be determined to be 2.

[0341] As another example, the video decoding apparatus 1700 may determine the dQP for the chroma component based on the identification information of the current temporal layer. For example, if the identification information of the temporal layer including the current block is greater than 2, the dQP for the chroma component may be determined to be 0, and if the identification information is less than 2 or the same, the dQP for the chroma component may be determined to be 2. As another example, if the identification information of the temporal layer including the current block is 0, the dQP for the chroma component may be determined to be 2, and if the identification information is not 0 and is less than 3, the dQP for the chroma component may be determined to be 1. If the identification information is greater than 3 or the same, the dQP for the chroma component may be determined to be 0.

[0342] As another example, the video decoding device 1700 may determine the dQP for the chroma components of the current block based on the quantization parameters or quantization parameter difference values ​​of the neighboring blocks.

[0343] Hereinafter, an embodiment of a method for selecting a case where multiple joint modes are used or a case where one joint mode is used in the chroma joint method according to a predetermined condition will be described in detail.

[0344] The video encoding apparatus 1900 may encode the chroma joint residual sample C or encode the first chroma joint residual sample C1 and the second chroma joint residual sample C2 according to the chroma joint mode. In the first and third modes, the chroma joint residual sample C may be determined and encoded. The video encoding apparatus 1900 may assume that the actual value of the residual sample of the Cb component is multiplied by -1 to be the residual sample of the Cr component, and may determine the same value as the residual sample of the Cb component as the chroma joint residual sample C and encode it. In the second mode, the first chroma joint residual sample C1 may be determined to be the average value of the actual value of the residual sample of the Cb component and the actual value of the residual sample of the Cr component (i.e., c1=(cb+cr) / 2). The second chroma joint residual sample C2 may be determined to be the average value of the actual value of the residual sample of the Cb component and the negative value of the actual value of the residual sample of the Cr component (i.e., c2=(cb-cr) / 2).

[0345] As an example, two kinds of chroma joint modes are possible in the video decoding device 1700. In the first mode, the residual sample of the Cb component is restored to the same value as the chroma joint residual sample, and the residual sample of the Cr component may be restored to a value obtained by multiplying the chroma joint residual sample by -1 (cb=c, cr=-c). In the second mode, the residual sample of the Cb component may be restored to a value obtained by adding the first chroma joint residual sample and the second chroma joint residual sample, and the residual sample of the Cr component may be restored to a value obtained by subtracting the second chroma joint residual sample from the first chroma joint residual sample (cb=c1+c2, cr=c1-c2). If the prediction type of the coding unit is an intra prediction mode, the video decoding apparatus 1700 may obtain a chroma joint mode index from the bitstream, and may reconstruct the residual sample of the Cb component and the residual sample of the Cr component according to a chroma joint manner indicated by the mode index, among a first mode and a second mode. If the prediction type of the coding unit is an inter prediction mode, the video decoding apparatus 1700 may reconstruct the residual sample of the Cb component and the residual sample of the Cr component according to the second mode without a mode index.

[0346] As another example, three kinds of chroma joint modes are possible in the video decoding device 1700. In the first mode, the residual sample of the Cb component may be restored to the same value as the chroma joint residual sample, and the residual sample of the Cr component may be restored to a value obtained by multiplying the chroma joint residual sample by -1 (cb=c, cr=-c). In the second mode, the residual sample of the Cb component may be restored to a value obtained by adding the first chroma joint residual sample and the second chroma joint residual sample, and the residual sample of the Cr component may be restored to a value obtained by subtracting the second chroma joint residual sample from the first chroma joint residual sample (cb=c1+c2, cr=c1-c2). In the third mode, the residual sample of the Cb component may be restored to the same value as the chroma joint residual sample, and the residual sample of the Cr component may be restored to a value obtained by multiplying the chroma joint residual sample by -1 / 2 (cb=c, cr=-1 / 2c). When the prediction type of the coding unit is an intra prediction mode and the intra prediction direction is a planar mode or a DC mode, the video decoding apparatus 1700 may restore the residual sample of the Cb component and the residual sample of the Cr component according to the first mode without acquiring a mode index. When the prediction type of the coding unit is an intra prediction mode and the intra prediction direction is a directional mode, the video decoding apparatus 1700 may acquire a chroma joint mode index from the bitstream and restore the residual sample of the Cb component and the residual sample of the Cr component according to a method indicated by the mode index among the first mode and the third mode. When the prediction type of the coding unit is an inter prediction mode, the video decoding apparatus 1700 may restore the residual sample of the Cb component and the residual sample of the Cr component according to the second mode without acquiring a mode index.

[0347] Hereinafter, an embodiment in which multiple joint modes are used according to a predetermined condition in the chroma joint method will be described in detail.

[0348] In the above embodiment, the video encoding device 1900 can encode the chroma joint residual sample C according to the first, second, and third modes, or encode the first chroma joint residual sample C1 and the second chroma joint residual sample C2, which is also applicable to this embodiment. In the video decoding device 1700 of the above embodiment, the method of restoring the residual sample of the Cb component and the residual sample of the Cr component using at least one of the chroma joint residual sample C, the first chroma joint residual sample C1, and the second chroma joint residual sample C2 in three types of chroma joint modes is also applicable to this embodiment.

[0349] When the prediction type of the coding unit is an intra prediction mode, the video decoding apparatus 1700 may obtain a chroma joint mode index from the bitstream and restore a residual sample of the Cb component and a residual sample of the Cr component according to a method indicated by the mode index from among the first mode and the second mode. When the prediction type of the coding unit is an inter prediction mode, the video decoding apparatus 1700 may obtain a chroma joint mode index from the bitstream and restore a residual sample of the Cb component and a residual sample of the Cr component according to a method indicated by the mode index from among the first mode and the third mode.

[0350] Hereinafter, an embodiment will be described in detail regarding a case where multiple joint modes are used under a predetermined condition without a chroma joint mode index in the chroma joint method.

[0351] In the above embodiment, the video encoding device 1900 may encode the chroma joint residual sample C according to the first, second, and third modes, or may encode the first chroma joint residual sample C1 and the second chroma joint residual sample C2, which is also applicable to this embodiment. In the above embodiment, the video decoding device 1700 may reconstruct the residual sample of the Cb component and the residual sample of the Cr component using at least one of the chroma joint residual sample C, the first chroma joint residual sample C1, and the second chroma joint residual sample C2 in three chroma joint modes, which is also applicable to this embodiment. When the prediction type of the coding unit is an intra prediction mode and the intra prediction direction is a planar mode or a DC mode, the video decoding device 1700 may reconstruct the residual sample of the Cb component and the residual sample of the Cr component according to the first mode without acquiring a mode index. When the prediction type of the coding unit is an intra prediction mode and the intra prediction direction is a directional mode, the video decoding device 1700 may reconstruct the residual sample of the Cb component and the residual sample of the Cr component in the second mode without acquiring a mode index. When the prediction type of the coding unit is an inter prediction mode, the video decoding device 1700 may reconstruct the residual sample of the Cb component and the residual sample of the Cr component in the third mode without acquiring a mode index.

[0352] The relational equation for restoring the residual sample of the Cb component and the residual sample of the Cr component using at least one of the first chroma joint residual sample C1 and the second chroma joint residual sample C2 is not limited to the above-described embodiment, and various relational equations can be applied. For example, various relational equations can be used by modifying the weights w1, w2, w3, and w4, such as cb=w1*c1+w2*c2 and cr=w3*c1+w4*c2.

[0353] In addition, various embodiments of the conditions for selecting only one mode from among multiple joint modes without a chroma joint mode index in the above-described embodiment will be described below.

[0354] For example, one of a number of joint modes may be determined based on whether the prediction type of the coding unit that includes the block is an intra-prediction mode or an inter-prediction mode.

[0355] As another example, one of the multiple joint modes may be determined based on the size of the block. As a specific example, when the width of the block is W and the height of the block is H, log2W is a value obtained by applying log2 to W, and log2H is a value obtained by applying log2 to H. Based on a smaller value of log2W and log2H, one of the multiple joint modes may be determined. Based on a larger value of log2W and log2H, one of the multiple joint modes may be determined. Based on an average value of log2W and log2H, one of the multiple joint modes may be determined. Based on a sum of log2W and log2H, one of the multiple joint modes may be determined.

[0356] As another example, one of many joint modes may be determined based on the ratio of the height and width of the blocks.

[0357] As another example, one of a number of joint modes may be determined based on whether the inter prediction direction of a block is a uni-directional prediction type or a bi-directional prediction type.

[0358] As another example, one of multiple joint modes for the current block may be determined based on chroma joint information of neighboring blocks.

[0359] As another example, one of a number of joint modes for the current block may be determined based on the coding information of the neighboring block. As a specific example, one of a number of joint modes for the current block may be determined based on the cbf information of the neighboring block. As another example, one of a number of joint modes for the current block may be determined based on whether the prediction type of the neighboring block is an intra prediction mode or an inter prediction mode. As another example, one of a number of joint modes for the current block may be determined based on the transform type of the neighboring block. As another example, one of a number of joint modes may be determined based on the transform type of the current block. For example, one of a number of joint modes may be determined based on whether the transform type of the current block is a transform skip type, a sub-block transform type, a secondary transform type, or a block-based transform type.

[0360] As another example, one of a number of joint modes may be determined based on a default encoding mode. As a specific example, one of a number of joint modes may be determined based on whether the encoding mode of the current block is used among MHintra mode, TriangleIntra mode, Affine mode, Intra BC (IBC) mode, Symmetric motion vector difference (SMVD) mode, Merge with motion vector difference (MMVD) mode, Decoder-side Motion Vector Refinement (DMVR) mode, Cross-component Linear Model (CCLM) mode, Position dependent (intra) prediction combination (PDPC) mode, MultiRefIntra (Multi Reference Line intra prediction) mode, intraSubPartition mode, inloop reshaper mode, Overlapped Block Motion Compensation (OBMC) mode, transformSkip mode, and Sub-block transform (SBT) mode.

[0361] As another example, one mode among multiple joint modes may be determined for the current block based on a multiple transform selection (MTS) index of the current block.

[0362] As another example, for each slice, one mode to be used for blocks included in the current slice may be determined from among multiple joint modes.

[0363] As another example, one mode to be used for a block currently included in the temporal layer may be determined among multiple joint modes at the temporal layer level.

[0364] As another example, one of a number of joint modes may be determined based on whether the current slice is a referential slice or a non-referential slice.

[0365] As another example, one of multiple joint modes may be determined based on the number of transform coefficients of the Cb component or the number of transform coefficients of the Cr component.

[0366] As another example, for an inter-prediction mode block, one of a number of joint modes may be determined based on whether the prediction direction is a unidirectional prediction type or a bidirectional prediction type.

[0367] As another example, one of multiple joint modes may be determined based on the Cb cbf information and the Cr cbf information of the current block.

[0368] As another example, one of a number of joint modes may be determined based on a combination of two or more of the proposed various conditions.

[0369] Meanwhile, the above-described embodiments of the present disclosure may be created as a computer-executable program, and the created program may be stored in a medium.

[0370] A medium may be a medium that continues to store a computer-executable program or a medium that temporarily stores the program for execution or download. A medium may also be a variety of recording or storage means in the form of a single or multiple pieces of hardware combined, and may not be limited to a medium directly connected to a computer system, but may be distributed over a network. Examples of 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 ROMs, RAMs, flash memories, etc., which are configured to store program instructions. Other examples of media include recording media or storage media managed by app stores that distribute applications, or sites or servers that supply or distribute various other software.

[0371] Although the technical idea of ​​the present disclosure has been described in detail above with reference to preferred embodiments, the technical idea of ​​the present disclosure is not limited to the above embodiments, and various modifications and changes may be made by a person having ordinary skill in the art within the scope of the technical idea of ​​the present disclosure. [Explanation of symbols]

[0372] 1710 Acquisition Department 1720 Decoding section

Claims

1. obtaining chroma joint information indicating whether a chroma residual sample of a block is coded to express a residual sample of a Cb component and a residual sample of a Cr component in the current block, from the bitstream based on one of a value of cbf information for the Cr component and a value of cbf information for the Cb component, when a prediction type of a coding unit including a current block is an intra prediction mode; When a prediction type of a coding unit including the current block is an inter prediction mode, a value of the cbf information for the Cr component is 1, and a value of the cbf information for the Cb component is 1. determining a weight of the residual sample of the Cr component when the chroma joint information indicates that the chroma residual sample of the one block is to be coded to represent the residual sample of the Cb component and the residual sample of the Cr component in the current block; obtaining a chroma residual sample of the current block from the bitstream; and restoring the residual sample of the Cr component using weighted values ​​of the chroma residual sample of the current block and the residual sample of the Cr component.

2. encoding chroma joint information indicating whether a chroma residual sample of a block is encoded to express a residual sample of a Cb component and a residual sample of a Cr component in the current block, based on one of a value of cbf information for the Cr component and a value of cbf information for the Cb component, when a prediction type of a coding unit including a current block is an intra prediction mode; encoding the chroma joint information based on the cbf information for the Cr component being 1 and the cbf information for the Cb component being 1 when a prediction type of a coding unit including the current block is an inter prediction mode; determining a weight of the residual sample of the Cr component based on cbf information for the Cr component when the chroma residual sample of the one block is encoded to represent the residual sample of the Cb component and the residual sample of the Cr component in the current block; encoding the chroma residual sample of the current block using weighted values ​​of the chroma joint residual sample of the current block and the residual sample of the Cr component.

3. 1. A method for transmitting a bitstream generated by a video encoding method, comprising: The video encoding method includes, when a prediction type of a coding unit including a current block is an intra mode, encoding chroma joint information indicating whether a chroma residual sample of a block is encoded to express a residual sample of a Cb component and a residual sample of a Cr component in the current block based on one of a value of cbf information for the Cr component and a value of cbf information for the Cb component; encoding the chroma joint information based on the cbf information for the Cr component being 1 and the cbf information for the Cb component being 1 when a prediction type of a coding unit including the current block is an inter prediction mode; determining a weight of the residual sample of the Cr component based on cbf information for the Cr component when the chroma residual sample of the one block is encoded to represent the residual sample of the Cb component and the residual sample of the Cr component in the current block; encoding a chroma residual sample of the current block using weighted values ​​of the chroma joint residual sample of the current block and the residual sample of the Cr component; and outputting a bitstream including the chroma joint information and the chroma residual samples.