Method and apparatus for video encoding and decoding for predicting chroma component
By predicting the chroma component in video encoding and decoding, determining the weight of the residual samples, and using the chroma joint residual samples for reconstruction, the problem of image quality degradation and low compression rate in video decoding is solved, and efficient Video data transmission.
Patent Information
- Application Number
- CN202411712372.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-04-29
- Filing Date
- 2020-02-28
- Publication Date
- 2025-01-21
AI Technical Summary
When decoding videos with high image quality, a method is needed to minimize degradation of image quality while increasing compression rates, especially in case of limited bandwidth.
By using the method of predicting chroma components in video coding and decoding, including determining the weight of the residual samples of CR components and CB components, and using the color contrast combined residual sample point to reintermine to achieve efficient color component coding and decoding.
This method can effectively reduce the size of encoded information while maintaining image quality and improving compression rate, and is suitable for video data transmission with limited bandwidth.
Smart Images

Figure CN119342218A_ABST
Abstract
Description
[0001] This application is a divisional application of a patent application with an application date of February 28, 2020, application number 202080017377.1, and invention name “A method and device for video encoding and decoding for predicting chrominance components”. Technical Field
[0002] The present disclosure relates to the field of image encoding and decoding. More specifically, the present invention relates to a method and apparatus for video encoding and decoding for predicting chrominance components. Background Art
[0003] A large amount of data can be used when decoding a video with high image quality. However, because the bandwidth allowing the transmission of video data is limited, the data rate applicable to the transmission of video data may be limited. Therefore, in order to effectively transmit video data, a video data encoding and decoding method is needed that is used to minimize the degradation of image quality while improving the compression rate.
[0004] The video data is compressed by removing spatial and temporal redundancy between pixels. Since adjacent pixels generally have common characteristics, the encoding information is transmitted in a data unit configured with pixels to remove the redundancy between adjacent pixels.
[0005] A method for obtaining a pixel value is transmitted instead of directly transmitting the pixel value of the pixel included in the data unit. A prediction method for predicting a pixel value to be a value similar to its original value is determined for each data unit, and encoding information about the prediction method is transmitted from the encoder to the decoder. In addition, because the predicted value is not exactly the same as the original value, residual data about the difference between the original value and the predicted value is transmitted from the encoder to the decoder.
[0006] Accurate prediction increases the coding information required for specifying the prediction method, but reduces the size of the residual data. Therefore, the prediction method is determined in consideration of the size of the coding information and the residual data. In particular, the data units divided from the picture have various sizes, and the larger size of the data unit makes the accuracy of the prediction have a higher probability to be reduced, but reduces the coding information more. Therefore, the size of the block is determined according to the characteristics of the picture.
[0007] In addition, prediction methods include intra prediction and inter prediction. Intra prediction is a method of predicting pixels of a block from pixels adjacent to the block. Inter prediction is a method of predicting pixels by referring to pixels of another picture referenced by a picture including the block. Therefore, spatial redundancy is removed by intra prediction, and temporal redundancy is removed by inter prediction.
[0008] As the number of prediction methods increases, the amount of encoding information used to represent the prediction method increases. Therefore, by predicting encoding information applied to one block from another block, the size of the encoding information can be reduced.
[0009] Since loss of video data is allowed within a range that cannot be recognized by human eyes, lossy compression is performed according to a process of converting and quantizing residual data, thereby reducing the amount of residual data. Summary of the invention
[0010] According to an embodiment, a video encoding method, a video decoding method, a video encoding device, and a video decoding device for predicting chrominance components are provided, which can efficiently encode and decode chrominance components (eg, Cr components and Cb components of a picture).
[0011] Additional aspects will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the presented embodiments.
[0012] According to one aspect of the present disclosure, a video decoding method includes: obtaining information indicating a prediction type of a coding unit including a current block from a bitstream; obtaining coding block flag CBF information of a Cr component of the current block and CBF information of a Cb component of the current block from the bitstream; determining a weight of a residual sample of the Cr component and a weight of a residual sample of the Cb component based on the prediction type of the coding unit, the CBF information of the Cr component and the CBF information of the Cb component; obtaining a chroma joint residual sample of the current block from the bitstream; and 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.
[0013] The step of determining the weight of the residual samples of the Cr component and the weight of the residual samples of the Cb component may include: obtaining, based on the prediction type of the coding unit, the CBF information of the Cr component, and the CBF information of the Cb component, chrominance joint information indicating whether to encode chrominance samples in the current block to represent the residual samples of the Cb component and the residual samples of the Cr component corresponding to the residual samples of the Cb component; and determining, based on the prediction type of the coding unit, the CBF information of the Cr component, and the CBF information of the Cb component, the weight of the residual samples of the Cr component and the weight of the residual samples of the Cb component according to the chrominance joint information indicating that the chrominance samples are encoded in the current block.
[0014] The weight of the residual sample of the Cr component may be -1 / 2, and the weight of the residual sample of the Cb component may be 1.
[0015] The weight of the residual sample of the Cr component may be -1, and the weight of the residual sample of the Cb component may be 1.
[0016] The weight of the residual sample of the Cr component may be 1, and the weight of the residual sample of the Cb component may be -1 / 2.
[0017] The step of determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component may include: setting the number of joint modes corresponding to the combination of the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component based on whether the prediction type of the coding unit is an intra-frame prediction mode or an inter-frame prediction mode.
[0018] The step of determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component may also include: selecting a selected joint mode from the joint modes based on the CBF information of the Cr component and the CBF information of the Cb component according to the prediction type of the coding unit being the intra-frame prediction mode, and determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to the selected joint mode.
[0019] The step of determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component may also include: based on the prediction type of the coding unit being the inter-frame prediction mode, determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to the allowed joint mode.
[0020] The video decoding method may also include: determining a joint mode including weights of residual samples of the Cr component and weights of residual samples of the Cb component based on chrominance joint information, CBF information of the Cr component and CBF information of the Cb component; and determining a quantization parameter for the current block based on the determined joint mode.
[0021] According to one aspect of the present disclosure, a video decoding device includes: an obtainer, configured to obtain information indicating a prediction type of a coding unit including a current block from a bitstream, obtain coding flag CBF information of a Cr component of the current block and CBF information of a Cb component of the current block from the bitstream, and obtain chroma joint residual samples of the current block from the bitstream; and a decoder, configured to determine weights of residual samples of the Cr component and weights of residual samples of the Cb component based on the prediction type of the coding unit, the CBF information of the Cr component and the CBF information of the Cb component, reconstruct the residual samples of the Cr component by using the weights of the chroma joint residual samples of the current block and the residual samples of the Cr component, and reconstruct the residual samples of the Cb component by using the weights of the chroma joint residual samples of the current block and the residual samples of the Cb component.
[0022] The obtainer may be further configured to: obtain, from the bitstream, chroma joint information indicating whether chroma samples are encoded in the current block to represent residual samples of the Cb component and residual samples of the Cr component corresponding to the residual samples of the Cb component, based on the prediction type of the coding unit, the CBF information of the Cr component, and the CBF information of the Cb component, and the decoder may be further configured to: when the chroma joint information indicates that the chroma samples are encoded, determine the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component based on the prediction type of the coding unit, the CBF information of the Cr component, and the CBF information of the Cb component, and set the number of joint modes corresponding to the combination of the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component based on whether the prediction type of the coding unit is an intra-frame prediction mode or an inter-frame prediction mode.
[0023] The decoder may be further configured to: select a selected joint mode from the joint modes based on the CBF information of the Cr component and the CBF information of the Cb component according to the prediction type of the coding unit being the intra-frame prediction mode, and determine the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to the selected joint mode, and the decoder may be further configured to: determine the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to the allowed joint modes based on the prediction type of the coding unit being the inter-frame prediction mode.
[0024] According to one aspect of the present disclosure, a video encoding method includes: determining a prediction type of a coding unit including a current block; determining coding block flag CBF information of a Cr component of the current block and CBF information of a Cb component of the current block; determining weights of residual samples of the Cr component and weights of residual samples of the Cb component based on the prediction type of the coding unit, the CBF information of the Cr component and the CBF information of the Cb component; and generating chroma joint residual samples of the current block, wherein the residual samples of the Cr component are reconstructed by using the weights of the chroma joint residual samples of the current block and the residual samples of the Cr component, and the residual samples of the Cb component are reconstructed by using the weights of the chroma joint residual samples of the current block and the residual samples of the Cb component.
[0025] The video encoding method may further include generating chrominance joint information indicating whether chrominance samples are encoded in the current block to represent residual samples of the Cb component and residual samples of the Cr component corresponding to the residual samples of the Cb component, wherein, according to encoding the chrominance samples in the current block, weights of the residual samples of the Cr component and weights of the residual samples of the Cb component are determined based on a prediction type of the coding unit, CBF information of the Cr component and CBF information of the Cb component, and wherein, according to whether the prediction type of the coding unit is an intra-frame prediction mode or an inter-frame prediction mode, the number of joint modes corresponding to a combination of the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component is set.
[0026] The step of determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component may include: selecting a selected joint mode from the joint modes based on the CBF information of the Cr component and the CBF information of the Cb component according to the prediction type of the coding unit being the intra-frame prediction mode, and determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to the selected joint mode; and determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to the allowed joint mode based on the prediction type of the coding unit being the inter-frame prediction mode.
[0027] According to one aspect of the present disclosure, a video decoding method includes: obtaining chroma joint residual samples of a current block from a bitstream; obtaining first information of a first residual sample of a first component among a Cr component of the current block and a Cb component of the current block from the bitstream; reconstructing the first residual sample based on the chroma joint residual sample and the first information; and reconstructing a second residual sample of a second component among the Cr component of the current block and the Cb component of the current block based on the chroma joint residual sample and the reconstructed first residual sample.
[0028] The first information may include difference joint chroma residual samples.
[0029] The first residual sample may be equal to the chrominance joint residual sample.
[0030] Therefore, according to an embodiment, a video encoding method, a video decoding method, a video encoding device, and a video decoding device for predicting a chroma component provide a method for efficiently encoding and decoding a chroma component by using similarity between a Cb component and a Cr component for predicting the chroma component.
[0031] However, the effects that can be achieved by the video encoding method, video decoding method, video encoding device and video decoding device for predicting chrominance components according to the embodiments are not limited to those described above, and other effects not described above will be clearly understood from the following description by ordinary technicians in the technical field to which the present disclosure belongs. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The above and other aspects, features and advantages of certain embodiments of the present disclosure will become more apparent from the following description in conjunction with the accompanying drawings, in which:
[0033] Figure 1 is a schematic block diagram of an image decoding apparatus according to an embodiment.
[0034] Figure 2 is a flowchart of an image decoding method according to an embodiment.
[0035] Figure 3 A process of determining at least one coding unit by splitting a current coding unit, performed by an image decoding device according to an embodiment, is illustrated.
[0036] Figure 4 A process of determining at least one coding unit by splitting a non-square coding unit, performed by an image decoding device according to an embodiment, is illustrated.
[0037] Figure 5 A process of splitting a coding unit based on at least one of block shape information and division shape pattern information, performed by an image decoding device according to an embodiment, is illustrated.
[0038] Figure 6 A method of determining a predetermined coding unit from among an odd number of coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0039] Figure 7 An order in which a plurality of coding units are processed when an image decoding device determines a plurality of coding units by splitting a current coding unit according to an embodiment is illustrated.
[0040] Figure 8 A process of determining that a current coding unit is to be split into an odd number of coding units, performed by an image decoding device when coding units cannot be processed in a predetermined order, according to an embodiment is illustrated.
[0041] Fig. 9 A process of determining at least one coding unit by splitting a first coding unit, performed by an image decoding device according to an embodiment, is illustrated.
[0042] Fig.10 It is shown that according to an embodiment, when a non-square-shaped second coding unit determined by an image decoding apparatus splitting a first coding unit satisfies a predetermined condition, shapes into which the second coding unit may be split are restricted.
[0043] Fig.11A process of splitting a square coding unit performed by an image decoding device when division shape pattern information indicates that the square coding unit is not to be split into four square coding units according to an embodiment is illustrated.
[0044] Fig.12 It is shown that a processing order among a plurality of coding units according to an embodiment may be changed according to a process of dividing a coding unit.
[0045] Fig.13 A process of determining a depth of a coding unit when a shape and a size of a coding unit are changed when a coding unit is recursively split to determine a plurality of coding units according to an embodiment is illustrated.
[0046] Fig.14 Depth that may be determined based on the shape and size of a coding unit and a partial index (PID) for distinguishing coding units according to an embodiment are illustrated.
[0047] Fig.15 It is shown that a plurality of coding units are determined based on a plurality of predetermined data units included in a picture according to an embodiment.
[0048] Fig.16 It is a block diagram of an image encoding and decoding system.
[0049] Fig.17 is a detailed block diagram of a video decoding apparatus according to an embodiment.
[0050] Fig.18 is a flowchart of a video decoding method according to an embodiment.
[0051] Fig.19 is a block diagram of a video encoding apparatus according to an embodiment.
[0052] Fig. 20 is a flowchart of a video encoding method according to an embodiment.
[0053] Fig.21 A graph showing the relationship between a Cb component, a Cr component, and a chroma encoding component according to an embodiment is shown.
[0054] Fig. 22 denoted the relationship among the Cb component, the Cr component, and the chroma encoding component according to an embodiment.
[0055] Fig.23 A transform unit syntax according to an embodiment is shown.
[0056] Fig.24 denoted the relationship among the Cb component, the Cr component, and the chroma coding component with respect to a combination of the Cb CBF value and the Cr CBF according to an embodiment. DETAILED DESCRIPTION
[0057] The video decoding method according to the embodiment provided in the present disclosure includes: obtaining information indicating a prediction type of a coding unit including a current block from a bitstream; obtaining cbf information of a Cr component of the current block and cbf information of a Cb component of the current block from the bitstream; determining a weight of a residual sample of the Cr component and a weight of a residual sample of the Cb component based on the prediction type of the coding unit, the cbf information of the Cr component and the cbf information of the Cb component; obtaining a chroma joint residual sample of the current block from the bitstream; and 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.
[0058] According to an embodiment, determining the weight of the residual samples of the Cr component and the weight of the residual samples of the Cb component may include: obtaining, based on the prediction type of the coding unit, the cbf information of the Cr component, and the cbf information of the Cb component, chrominance joint information indicating whether chrominance samples are encoded in the current block to represent the residual samples of the Cb component and the residual samples of the Cr component corresponding to the residual samples of the Cb component in the current block; and when the chrominance joint information indicates that the chrominance samples are encoded in the current block, determining the weight of the residual samples of the Cr component and the weight of the residual samples of the Cb component based on the prediction type of the coding unit, the cbf information of the Cr component, and the cbf information of the Cb component.
[0059] According to an embodiment, the weight of the residual sample of the Cr component may be -1 / 2, and the weight of the residual sample of the Cb component may be 1.
[0060] According to an embodiment, the weight of the residual sample of the Cr component may be -1, and the weight of the residual sample of the Cb component may be 1.
[0061] According to an embodiment, the weight of the residual sample of the Cr component may be 1, and the weight of the residual sample of the Cb component may be -1 / 2.
[0062] According to an embodiment, determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component may include differently setting the number of joint modes corresponding to a combination of the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to whether the prediction type of the coding unit is an intra-frame prediction mode or an inter-frame prediction mode.
[0063] According to an embodiment, determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component may include: when the prediction type of the coding unit is the intra prediction mode, selecting a joint mode from a plurality of joint modes based on cbf information of the Cr component and cbf information of the Cb component, and determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to the selected joint mode.
[0064] According to an embodiment, determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component may include: when the prediction type of the coding unit is the inter-frame prediction mode, determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to the allowed joint mode.
[0065] According to an embodiment, a video decoding method may include: determining a joint mode including weights of residual samples of the Cr component and weights of residual samples of the Cb component based on chrominance joint information, cbf information of the Cr component, and cbf information of the Cb component; and determining a quantization parameter of the current block based on the joint mode.
[0066] A video decoding apparatus according to an embodiment proposed in the present disclosure includes: an obtainer configured to obtain information indicating a prediction type of a coding unit including a current block from a bitstream, obtain cbf information of a Cr component of the current block and cbf information of a Cb component of the current block from the bitstream, and obtain chroma joint residual samples of the current block from the bitstream; and a decoder configured to determine weights of residual samples of the Cr component and weights of residual samples of the Cb component based on the prediction type of the coding unit, the cbf information of the Cr component and the cbf information of the Cb component, reconstruct the residual samples of the Cr component by using the chroma joint residual samples of the current block and the weights of the residual samples of the Cr component, and reconstruct the residual samples of the Cb component by using the chroma joint residual samples of the current block and the weights of the residual samples of the Cb component.
[0067] The obtainer according to the embodiment may be configured to obtain, from the bitstream, chroma joint information indicating whether chroma samples are encoded in the current block to indicate residual samples of the Cb component and residual samples of the Cr component corresponding to the residual samples of the Cb component, based on the prediction type of the coding unit, the cbf information of the Cr component, and the cbf information of the Cb component, and the decoder may be configured to determine, when the chroma joint information indicates that the chroma samples are encoded, the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component based on the prediction type of the coding unit, the cbf information of the Cr component, and the cbf information of the Cb component, and to differently set the number of joint modes corresponding to a combination of the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to whether the prediction type of the coding unit is an intra-prediction mode or an inter-prediction mode.
[0068] The decoder according to an embodiment may be configured to determine the weight of the residual samples of the Cr component and the weight of the residual samples of the Cb component according to an allowed joint mode when the prediction type of the coding unit is the inter prediction mode.
[0069] The video encoding method according to the embodiment proposed in the present disclosure includes: determining a prediction type of a coding unit including a current block; determining cbf information of a Cr component of the current block and cbf information of a Cb component of the current block; determining a weight of a residual sample of the Cr component and a weight of a residual sample of the Cb component based on the prediction type of the coding unit, the cbf information of the Cr component and the cbf information of the Cb component; and generating chroma joint residual samples of the current block, wherein the residual samples of the Cr component are reconstructed by using the chroma joint residual samples of the current block and the weight of the residual samples of the Cr component, and the residual samples of the Cb component are reconstructed by using the chroma joint residual samples of the current block and the weight of the residual samples of the Cb component.
[0070] The video encoding method according to an embodiment may further include: generating chroma joint information indicating whether chroma samples are encoded in the current block to represent residual samples of the Cb component and residual samples of the Cr component corresponding to the residual samples of the Cb component in the current block, wherein when the chroma samples are encoded in the current block, the weight of the residual samples of the Cr component and the weight of the residual samples of the Cb component may be determined based on the prediction type of the coding unit, the cbf information of the Cr component, and the cbf information of the Cb component; and the number of joint modes corresponding to the combination of the weight of the residual samples of the Cr component and the weight of the residual samples of the Cb component may be set differently according to whether the prediction type of the coding unit is an intra-frame prediction mode or an inter-frame prediction mode.
[0071] According to an embodiment, determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component may include: when the prediction type of the coding unit is an intra-frame prediction mode, selecting a joint mode from a plurality of joint modes based on cbf information of the Cr component and cbf information of the Cb component, and determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to the selected joint mode; and when the prediction type of the coding unit is an inter-frame prediction mode, determining the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to an allowed joint mode.
[0072] According to an embodiment of the present disclosure, there is provided a computer-readable recording medium having recorded thereon a program for implementing a video decoding method on a computer.
[0073] According to an embodiment of the present disclosure, there is provided a computer-readable recording medium having recorded thereon a program for implementing a video encoding method on a computer.
[0074] The present disclosure may have various modifications and various embodiments, and specific embodiments are shown in the drawings and described in detail in the specific embodiments, although the present disclosure is not limited to these embodiments. However, it should be understood that the present disclosure includes all modifications, equivalents and substitutes included in the concept and technical scope of the various embodiments.
[0075] In the following description of the embodiments, if it is determined that the detailed description of the related art unnecessarily obscures the subject matter of the present disclosure, the detailed description will be omitted. In addition, the numbers (e.g., first, second, etc.) used in the description of the specification are merely identification codes for distinguishing one component from another.
[0076] Furthermore, in this specification, it should be understood that when one component is “connected” or “coupled” to another component, the one component may be directly connected or coupled to the other component, or the one component may be connected or coupled to the other component with an intermediate component therebetween, unless otherwise specified.
[0077] In this specification, with respect to components represented as "units", "modules", etc., two or more components may be combined into one component, or one component may be divided into two or more components according to subdivided functions. In addition, each component described below may additionally perform some or all of the functions performed by another component in addition to its own main functions, and some main functions of each component may be completely performed by another component.
[0078] Furthermore, in this specification, an “image” or a “screen” may refer to a still image or a moving image of a video, that is, the video itself.
[0079] In addition, in this specification, "sample" means data assigned to a sample position of an image, that is, data to be processed. For example, a pixel value of an image in a spatial domain and a transform coefficient on a transform domain may be a sample. A unit including at least one such sample may be defined as a block.
[0080] Also, in the specification, a 'current block' may mean a block of a maximum coding unit, a coding unit, a prediction unit, or a transformation unit of a current image to be encoded or decoded.
[0081] In the present specification, a motion vector in a direction of list 0 may mean a motion vector used to indicate a block in a reference picture included in list 0, and a motion vector in a direction of list 1 may mean a motion vector used to indicate a block in a reference picture included in list 1. In addition, a unidirectional motion vector may mean a motion vector used to indicate a block in a reference picture included in list 0 or list 1, and a bidirectional motion vector may mean that a motion vector includes a motion vector in a direction of list 0 and a motion vector in a direction of list 1.
[0082] In the following, reference will be made to Figures 1 to 16 An image encoding device and an image decoding device, and an image encoding method and an image decoding method according to an embodiment are described. Figures 3 to 16 A method for determining a data unit of an image according to an embodiment is described, and reference will be made to Figures 17 to 24 A video encoding / decoding method using tiles and tile groups is described.
[0083] In the following, reference is made to Figure 1 and Figure 2 , a method and apparatus for adaptive selection of coding units based on various shapes according to an embodiment of the present disclosure will be described.
[0084] Figure 1 is a schematic block diagram of an image decoding apparatus according to an embodiment.
[0085] The image decoding device 100 may include a receiver 110 and a decoder 120. The receiver 110 and the decoder 120 may include at least one processor. In addition, the receiver 110 and the decoder 120 may include a memory storing instructions to be executed by the at least one processor.
[0086] The receiver 110 may receive a bitstream. The bitstream includes information of an image encoded by the image encoding device 2200 to be described below. In addition, the bitstream may be transmitted from the image encoding device 2200. The image encoding device 2200 and the image decoding device 100 may be connected by wire or wirelessly, and the receiver 110 may receive the bitstream by wire or wirelessly. The receiver 110 may receive the bitstream from a storage medium such as an optical medium or a hard disk. The decoder 120 may reconstruct the image based on information obtained from the received bitstream. The decoder 120 may obtain syntax elements for reconstructing the image from the bitstream. The decoder 120 may reconstruct the image based on the syntax elements.
[0087] Will refer to Figure 2 An example operation of the image decoding device 100 is described in detail.
[0088] Figure 2 is a flowchart of an image decoding method according to an embodiment.
[0089] According to an embodiment of the present disclosure, the receiver 110 receives a bit stream.
[0090] In operation 210, the image decoding device 100 obtains a binary bit string corresponding to a division shape pattern of a coding unit from a bitstream. In operation 220, the image decoding device 100 determines a division rule of the coding unit. In addition, in operation 230, the image decoding device 100 divides the coding unit into a plurality of coding units based on at least one of the binary bit string corresponding to the division shape pattern and the division rule. In order to determine the division rule, the image decoding device 100 may determine an allowable first range of the size of the coding unit according to the aspect ratio of the coding unit. In order to determine the division rule, the image decoding device 100 may determine an allowable second range of the size of the coding unit according to the division shape pattern of the coding unit.
[0091] Hereinafter, an example of splitting a coding unit will be described in detail according to an embodiment of the present disclosure.
[0092] First, a picture may be divided into one or more slices or one or more tiles. A slice or a tile may be a sequence of one or more maximum coding units (e.g., coding tree units (CTUs)). There is a maximum coding block (e.g., coding tree block (CTB)) conceptually comparable to a maximum coding unit (CTU).
[0093] A maximum coding block (CTB) represents an N×N block including N×N samples (where N is an integer). Each color component may be divided into one or more maximum coding blocks.
[0094] When a picture has three sample arrays (e.g., sample arrays for Y, Cr, and Cb components), the maximum coding unit (CTU) includes a maximum coding block of luma samples, two corresponding maximum coding blocks of chroma samples, and a syntax structure for encoding luma samples and chroma samples. When the picture is a monochrome picture, the maximum coding unit includes a maximum coding block of monochrome samples and a syntax structure for encoding monochrome samples. When the picture is a picture encoded in a color plane separated according to color components, the maximum coding unit includes a syntax structure for encoding the picture and samples of the picture.
[0095] One largest coding tree block (CTB) may be divided into M×N coding blocks including M×N samples (M and N are integers).
[0096] When a picture has sample arrays for Y, Cr, and Cb components, a coding unit (CU) includes a coding block of luma samples, two corresponding coding blocks of chroma samples, and a syntax structure for encoding luma samples and chroma samples. When the picture is a monochrome picture, the coding unit includes a coding block of monochrome samples and a syntax structure for encoding monochrome samples. When the picture is a picture coded in a color plane separated according to color components, the coding unit includes a syntax structure for encoding the picture and the samples of the picture.
[0097] As described above, the maximum coding block and the maximum coding unit are conceptually distinguished from each other, and the coding block and the coding unit are conceptually distinguished from each other. That is, a coding unit (or a maximum coding unit) refers to a data structure including a coding block (or a maximum coding block) including corresponding samples and a syntax element corresponding to the coding block (or a maximum coding block). However, because a person of ordinary skill in the art understands that a coding unit (or a maximum coding unit) or a coding block (or a maximum coding block) refers to a block of a predetermined size including a predetermined number of samples, unless otherwise described, the maximum coding block and the maximum coding unit or the coding block and the coding unit are referred to in the following specification without distinction.
[0098] The image may be divided into maximum coding units (eg, CTUs). The size of each maximum coding unit may be determined based on information obtained from the bitstream. The shape of each maximum coding unit may be a square shape of the same size. However, the embodiment is not limited thereto.
[0099] For example, information about the maximum size of the luma coding block may be obtained from the bitstream. For example, the maximum size of the luma coding block indicated by the information about the maximum size of the luma coding block may be one of 4×4, 8×8, 16×16, 32×32, 64×64, 128×128, and 256×256.
[0100] For example, information about the luminance block size difference and the maximum size of the luminance coding block that can be divided into two may be obtained from the bitstream. The information about the luminance block size difference may refer to the size difference between the luminance maximum coding unit and the maximum luminance coding block that can be divided into two. Therefore, when the information about the maximum size of the luminance coding block that can be divided into two obtained from the bitstream and the information about the luminance block size difference are combined with each other, the size of the luminance maximum coding unit may be determined. The size of the chrominance maximum coding unit may be determined by using the size of the luminance maximum coding unit. For example, when the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chrominance block may be half the size of the luminance block, and the size of the chrominance maximum coding unit may be half the size of the luminance maximum coding unit.
[0101] According to an embodiment, since information about the maximum size of a brightness coding block that can be divided into two is obtained from a bitstream, the maximum size of a brightness coding block that can be divided into two can be variably determined. In contrast, the maximum size of a brightness coding block that can be divided into three can be fixed. For example, the maximum size of a brightness coding block that can be divided into three in an I picture can be 32×32, and the maximum size of a brightness coding block that can be divided into three in a P picture or a B picture can be 64×64.
[0102] In addition, the maximum coding unit may be hierarchically split into coding units based on the split shape pattern information obtained from the bitstream. At least one of information indicating whether to perform four-partitioning, information indicating whether to perform multi-partitioning, split direction information, and split type information may be obtained from the bitstream as the split shape pattern information.
[0103] For example, the information indicating whether to perform four-division may indicate whether the current coding unit is to be four-divided (QUAD_SPLIT) or not to be four-divided.
[0104] When the current coding unit is not divided into four parts, the information indicating whether multi-split is performed may indicate whether the current coding unit is no longer split (NO_SPLIT) or is divided into two parts / three parts.
[0105] When the current coding unit is two-partitioned or three-partitioned, the split direction information indicates that the current coding unit is split in one direction of a horizontal direction and a vertical direction.
[0106] When the current coding unit is split in the horizontal direction or the vertical direction, the split type information indicates whether the current coding unit is split into two or three.
[0107] The split mode of the current coding unit may be determined according to the split direction information and the split type information. The split mode when the current coding unit is split into two in the horizontal direction may be determined as a horizontal two-split mode (SPLIT_BT_HOR), the split mode when the current coding unit is split into three in the horizontal direction may be determined as a horizontal three-split mode (SPLIT_TT_HOR), the split mode when the current coding unit is split into two in the vertical direction may be determined as a vertical two-split mode (SPLIT_BT_VER), and the split mode when the current coding unit is split into three in the vertical direction may be determined as a vertical three-split mode (SPLIT_TT_VER).
[0108] The image decoding device 100 may obtain the division shape pattern information from a binary bit string from the bit stream. The form of the bit stream received by the image decoding device 100 may include a fixed-length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. The binary bit string is information of a binary number. The binary bit string may include at least one bit. The image decoding device 100 may obtain the division shape pattern information corresponding to the binary bit string based on the division rule. The image decoding device 100 may determine whether to divide the coding unit into four, whether to not divide the coding unit, the division direction, and the division type based on a binary bit string.
[0109] The coding unit may be smaller than or equal to the maximum coding unit. For example, since the maximum coding unit is a coding unit having the maximum size, the maximum coding unit is one of the coding units. When the division shape pattern information about the maximum coding unit indicates that division is not performed, the coding unit determined in the maximum coding unit has the same size as the maximum coding unit. When the division shape pattern information about the maximum coding unit indicates that division is performed, the maximum coding unit may be divided into coding units. In addition, when the division shape pattern information about the coding unit indicates that division is performed, the coding unit may be divided into smaller coding units. However, the division of the image is not limited thereto, and the maximum coding unit and the coding unit may not be distinguished. Reference will be made to Figures 3 to 16 An example of division of coding units is described in detail.
[0110] In addition, one or more prediction blocks for prediction may be determined from the coding unit. The prediction block may be equal to or smaller than the coding unit. In addition, one or more transform blocks for transformation may be determined from the coding unit. The transform block may be equal to or smaller than the coding unit.
[0111] The shapes and sizes of the transform block and the prediction block may be unrelated to each other.
[0112] In another embodiment, prediction may be performed by using a coding unit as a prediction unit. In addition, transformation may be performed by using a coding unit as a transformation block.
[0113] Will refer to Figures 3 to 16 An example of the division of the coding unit is described in detail. The current block and the neighboring block of the present disclosure may indicate one of the maximum coding unit, the coding unit, the prediction block, and the transformation block. In addition, the current block of the current coding unit is a block currently being decoded or encoded or a block currently being divided. The neighboring block may be a block reconstructed before the current block. The neighboring block may be adjacent to the current block in space or time. The neighboring block may be located at one of the lower left, left side, upper left, above, upper right, right side, and lower right side of the current block.
[0114] Figure 3A process of determining at least one coding unit by splitting a current coding unit, performed by an image decoding device according to an embodiment, is illustrated.
[0115] The block shape may include 4N×4N, 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N. Here, N may be a positive integer. The block shape information is information indicating at least one of a shape, a direction, an aspect ratio, or a size of a coding unit.
[0116] The shape of the coding unit may include a square and a non-square. When the width length and height length of the coding unit are the same (for example, when the block shape of the coding unit is 4N×4N), the image decoding device 100 may determine the block shape information of the coding unit as a square. The image decoding device 100 may determine the shape of the coding unit as a non-square.
[0117] When the width and height of the coding unit are different from each other (that is, when the block shape of the coding unit is 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N), the image decoding device 100 may determine the block shape information of the coding unit as a non-square shape. When the shape of the coding unit is non-square, the image decoding device 100 may determine the aspect ratio in the block shape information of the coding unit as 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. In addition, the image decoding device 100 may determine whether the coding unit is in the horizontal direction or in the vertical direction based on the width length and height length of the coding unit. In addition, the image decoding device 100 may determine the size of the coding unit based on at least one of the width length, height length, or area of the coding unit.
[0118] According to an embodiment, the image decoding device 100 may determine the shape of the coding unit by using the block shape information, and may determine the division method of the coding unit by using the division shape pattern information. That is, the coding unit division method indicated by the division shape pattern information may be determined based on the block shape indicated by the block shape information used by the image decoding device 100.
[0119] The image decoding device 100 may obtain the division shape pattern information from the bitstream. However, the embodiment is not limited thereto, and the image decoding device 100 and the image encoding device 2200 may determine the pre-agreed division shape pattern information based on the block shape information. The image decoding device 100 may determine the pre-agreed division shape pattern information for the maximum coding unit or the minimum coding unit. For example, the image decoding device 100 may determine the division shape pattern information for the maximum coding unit as four divisions. In addition, the image decoding device 100 may determine the division shape pattern information about the minimum coding unit as "no division is performed", or no division. Specifically, the image decoding device 100 may determine the size of the maximum coding unit to be 256×256. The image decoding device 100 may determine the pre-agreed division shape pattern information as four divisions. Four divisions are division shape patterns in which the width and height of the coding unit are both divided into two equal parts. The image decoding device 100 may obtain a coding unit of 128×128 size from a maximum coding unit of 256×256 size based on the division shape pattern information. Also, the image decoding device 100 may determine that the size of the minimum coding unit is 4 × 4. The image decoding device 100 may obtain division shape pattern information indicating “do not perform division” with respect to the minimum coding unit.
[0120] According to an embodiment, the image decoding device 100 may use block shape information indicating that the current coding unit has a square shape. For example, the image decoding device 100 may determine whether to not split the square coding unit, whether to vertically split the square coding unit, whether to horizontally split the square coding unit, or whether to split the square coding unit into four coding units based on the split shape mode information. Figure 3 , when the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 may not divide the coding unit 310a having the same size as the current coding unit 300 based on the division shape pattern information indicating that division is not performed, or may determine the coding unit 310b, 310c, 310d, 310e or 310f divided based on the division method indicated by the division shape pattern information.
[0121] Reference Figure 3According to an embodiment, the image decoding device 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the division shape pattern information indicating that division is performed in the vertical direction. The image decoding device 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the division shape pattern information indicating that division is performed in the horizontal direction. The image 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 division shape pattern information indicating that division is performed in the vertical and horizontal directions. According to an embodiment, the image decoding device 100 may determine three coding units 310e obtained by dividing the current coding unit 300 in the vertical direction based on the division shape pattern information indicating that three divisions are performed in the vertical direction. The image decoding device 100 may determine three coding units 310f obtained by dividing the current coding unit 300 in the horizontal direction based on the division shape pattern information indicating that three divisions are performed in the horizontal direction. However, the division method of the square coding unit is not limited to the above method, and the division shape pattern information may indicate various methods. An example of a predetermined division method for dividing a square coding unit will be described in detail below with respect to various embodiments.
[0122] Figure 4 A process of determining at least one coding unit by splitting a non-square coding unit, performed by an image decoding device according to an embodiment, is illustrated.
[0123] According to an embodiment, the image decoding device 100 may use block shape information indicating that the current coding unit has a non-square shape. The image decoding device 100 may determine whether to not split the non-square current coding unit or whether to split the non-square current coding unit by using a predetermined splitting method based on the splitting shape mode information. Figure 4 , when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the image decoding device 100 may determine a coding unit 410 having the same size as the current coding unit 400 or a coding unit 460 having the same size as the current coding unit 450 based on the division shape pattern information indicating that division is not performed, or may determine coding units 420a and 420b, 430a to 430c, 470a and 470b, or 480a to 480c divided by the division method indicated by the division shape pattern information. An example of a predetermined division method for dividing a non-square coding unit will be described in detail below with respect to various embodiments.
[0124] According to an embodiment, the image decoding device 100 may determine a division method of a coding unit by using division shape pattern information, and in this case, the division shape pattern information may indicate the number of one or more coding units generated by dividing the coding unit. Figure 4 When the division shape pattern information indicates that the current coding unit 400 or 450 is divided into two coding units, the image decoding device 100 can determine the two coding units 420a and 420b included in the current coding unit 400 or 470a and 470b included in the current coding unit 450 by dividing the current coding unit 400 or 450 based on the division shape pattern information.
[0125] According to an embodiment, when the image decoding device 100 splits the non-square current coding unit 400 or 450 based on the split shape pattern information, the image decoding device 100 may split the current coding unit in consideration of the position of the long side of the non-square current coding unit 400 or 450. For example, the image decoding device 100 may determine a plurality of coding units by splitting the current coding unit 400 or 450 in a direction in which the long side of the current coding unit 400 or 450 is split in consideration of the shape of the current coding unit 400 or 450.
[0126] According to an embodiment, when the division shape pattern information indicates that the coding unit is divided into an odd number of blocks (for example, in three divisions), the image decoding device 100 may determine the odd number of coding units included in the current coding unit 400 or 450. For example, when the division shape pattern information indicates that the current coding unit 400 or 450 is divided into three coding units, the image decoding device 100 may divide the current coding unit 400 into three coding units 430a, 430b, and 430c or divide the current coding unit 450 into three coding units 480a, 480b, and 480c.
[0127] According to an embodiment, the aspect ratio of the current coding unit 400 or 450 may be 4:1 or 1:4. When the aspect ratio is 4:1, since the width length is longer than the height length, the block shape information may indicate the horizontal direction. When the aspect ratio is 1:4, since the width length is shorter than the height length, the block shape information may indicate the vertical direction. The image decoding device 100 may determine the current coding unit to be divided into an odd number of blocks based on the division shape mode information. In addition, the image decoding device 100 may determine the division 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 in the vertical direction, the image decoding device 100 may determine the coding units 430a, 430b, and 430c by dividing the current coding unit 400 in the horizontal direction. In addition, when the current coding unit 450 is in the horizontal direction, the image decoding device 100 may determine the coding units 480a, 480b, and 480c by dividing the current coding unit 450 in the vertical direction.
[0128] According to an embodiment, the image decoding device 100 may determine the odd-numbered coding units included in the current coding unit 400 or 450, and not all determined coding units may have the same size. For example, a predetermined coding unit 430b among the determined odd-numbered coding units 430a, 430b, and 430c may have a size different from that of the other coding units 430a and 430c or a predetermined coding unit 480b among the determined odd-numbered coding units 480a, 480b, and 480c may have a size different from that of the other coding units 480a and 480c. That is, the coding units determined by dividing the current coding unit 400 or 450 may have a plurality of sizes, and in some cases, all odd-numbered coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes.
[0129] According to an embodiment, when the division shape pattern information indicates that the coding unit is divided into an odd number of blocks, the image decoding device 100 may determine the odd number of coding units included in the current coding unit 400 or 450, and further, may apply a predetermined restriction to at least one of the odd number of coding units generated by dividing the current coding unit 400 or 450. Figure 4, the image decoding device 100 may set the decoding process of the coding unit 430b to be different from the decoding process of the other coding units 430a and 430c, wherein the coding unit 430b is located at the center of the three coding units 430a, 430b, and 430c generated by dividing the current coding unit 400, or may set the decoding process of the coding unit 480b to be different from the decoding process of the other coding units 480a and 480c, wherein the coding unit 480b is located at the center of the three coding units 480a, 480b, and 480c generated by dividing the current coding unit 450. For example, unlike the other coding units 430a and 430c or 480a and 480c, the image decoding device 100 may limit the coding unit 430b or 480b at the center position to be no longer divided or to be divided only a predetermined number of times.
[0130] Figure 5 A process of splitting a coding unit based on at least one of block shape information and division shape pattern information, performed by a video decoding apparatus according to an embodiment, is illustrated.
[0131] According to an embodiment, the image decoding device 100 may determine whether to divide the square first coding unit 500 into coding units or not to divide the square first coding unit 500 based on at least one of the block shape information and the division shape mode information. According to an embodiment, when the division shape mode information indicates that the first coding unit 500 is divided in the horizontal direction, the image decoding device 100 may determine the second coding unit 510 by dividing the first coding unit 500 in the horizontal direction. The first coding unit, the second coding unit, and the third coding unit used according to the embodiment are terms for understanding the relationship before and after the coding unit is divided. For example, the second coding unit may be determined by dividing the first coding unit, and the third coding unit may be determined by dividing the second coding unit. It will be understood that the relationship between the first coding unit, the second coding unit, and the third coding unit follows the above description.
[0132] According to an embodiment, the image decoding device 100 may determine whether to split the determined second coding unit 510 into coding units or not to split the determined second coding unit 510 based on the division shape pattern information. Figure 5, the image decoding device 100 may split the non-square second coding unit 510 determined by splitting the first coding unit 500 into one or more third coding units 520a, 520b, 520c, and 520d based on at least one of the split shape pattern information and the block shape information, or may not split the non-square second coding unit 510. The image decoding device 100 may obtain the split shape pattern information, and may obtain a plurality of second coding units (for example, the second coding unit 510) of various shapes by splitting the first coding unit 500 based on the obtained split shape pattern information, and may split the second coding unit 510 by using the split method of the first coding unit 500 based on the split shape pattern information. According to an embodiment, when the first coding unit 500 is split into the second coding unit 510 based on the split shape pattern information of the first coding unit 500, the second coding unit 510 may also be split into the third coding units (for example, 520a, or 520b, 520c, and 520d) based on the split shape pattern information of the second coding unit 510. That is, the coding unit may be recursively split based on the split shape pattern information of each coding unit. Thus, a square coding unit may be determined by splitting a non-square coding unit, and a non-square coding unit may be determined by recursively splitting a square coding unit.
[0133] Reference Figure 5 , a predetermined coding unit (e.g., a coding unit at a center position or a square coding unit) among the odd-numbered third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510 may be recursively divided. According to an embodiment, a square third coding unit 520c among the odd-numbered third coding units 520b, 520c, and 520d may be divided into a plurality of fourth coding units in the horizontal direction. A non-square fourth coding unit 530b or 530d among the plurality of fourth coding units 530a, 530b, 530c, and 530d may be divided into a plurality of coding units again. For example, a non-square fourth coding unit 530b or 530d may be divided into an odd-numbered coding unit again. A method that can be used to recursively divide coding units will be described below with respect to various embodiments.
[0134] According to an embodiment, the image decoding device 100 may divide each of the third coding unit 520a, or 520b, 520c, and 520d into coding units based on the division shape pattern information. In addition, the image decoding device 100 may determine not to divide the second coding unit 510 based on the division shape pattern information. According to an embodiment, the image decoding device 100 may divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The image decoding device 100 may impose a predetermined restriction on a predetermined third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding device 100 may limit the third coding unit 520c at the center position among the odd number of third coding units 520b, 520c, and 520d to no longer be divided or divided a set number of times.
[0135] Reference Figure 5 , the image decoding device 100 may limit the third coding unit 520c at the center position among the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to no longer be divided, to be divided by using a predetermined division method (for example, only divided into four coding units or divided by using the division method of the second coding unit 510), or to be divided only a predetermined number of times (for example, only divided n times (where n>0)). However, the limitation on the third coding unit 520c at the center position is not limited to the above example, and may include various limitations for decoding the third coding unit 520c at the center position differently from the other third coding units 520b and 520d.
[0136] According to an embodiment, the image decoding device 100 may obtain split shape pattern information for splitting the current coding unit from a predetermined position in the current coding unit.
[0137] Figure 6 A method of determining a predetermined coding unit from among an odd number of coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0138] Reference Figure 6 , the division shape mode information of the current coding unit 600 or 650 may be obtained from a sample at a predetermined position (e.g., a sample 640 or 690 at a center position) among a plurality of samples included in the current coding unit 600 or 650. However, the predetermined position in the current coding unit 600 where the division shape mode information may be obtained is not limited to Figure 6, and may include various positions (e.g., top, bottom, left, right, top left, bottom left, top right, bottom right, etc.) included in the current coding unit 600. The image decoding device 100 may obtain the division shape pattern information from a predetermined position, and may determine whether to divide the current coding unit into coding units of various shapes and sizes or not to divide the current coding unit.
[0139] According to an embodiment, when the current coding unit is divided into a predetermined number of coding units, the image decoding apparatus 100 may select one of the coding units. Various methods may be used to select one of the coding units, examples of which will be described below with respect to various embodiments.
[0140] According to an embodiment, the image decoding device 100 may split a current coding unit into a plurality of coding units, and may determine a coding unit at a predetermined position.
[0141] According to an embodiment, the image decoding device 100 may determine a coding unit at a center position among the odd-numbered coding units using information indicating the positions of the odd-numbered coding units. Figure 6 , the image decoding device 100 may determine the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c by dividing the current coding unit 600 or the current coding unit 650. The image decoding device 100 may determine the intermediate coding unit 620b or the intermediate coding unit 660b by using information about the positions of the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c. For example, the image decoding device 100 may determine the coding unit 620b of the center position by determining the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of predetermined samples included in the coding units 620a, 620b, and 620c. In detail, the image decoding device 100 may determine the coding unit 620b at the center position by determining the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c.
[0142] According to an embodiment, the information indicating the positions of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c may include information about the positions or coordinates of the coding units 620a, 620b, and 620c in the picture. According to an embodiment, the information indicating the positions of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c may include information indicating the width or height of the coding units 620a, 620b, and 620c included in the current coding unit 600, and the width or height may correspond to the information indicating the difference between the coordinates of the coding units 620a, 620b, and 620c in the picture. That is, the image decoding device 100 can determine the coding unit 620b at the center position by directly using the information about the positions or coordinates of the coding units 620a, 620b, and 620c in the picture or by using the information about the width or height of the coding unit corresponding to the difference between the coordinates.
[0143] According to an embodiment, information indicating the position of the upper left sample point 630a of the upper coding unit 620a may include coordinates (xa, ya), information indicating the position of the upper left sample point 630b of the center coding unit 620b may include coordinates (xb, yb), and information indicating the position of the upper left sample point 630c of the lower coding unit 620c may include coordinates (xc, yc). The image decoding device 100 may determine the intermediate coding unit 620b by using the coordinates of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c. For example, when the coordinates of the upper left sample points 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the sample point 630b at the center position may be determined as the coding unit at the center position among the coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. However, the coordinates indicating the positions of the upper left sample points 630a, 630b, and 630c may include coordinates indicating absolute positions in the picture, or coordinates (dxb, dyb) indicating the relative position of the upper left sample point 630b of the middle coding unit 620b relative to the position of the upper left sample point 630a of the upper coding unit 620a and coordinates (dxc, dyc) indicating the relative position of the upper left sample point 630c of the lower coding unit 620c relative to the position of the upper left sample point 630a of the upper coding unit 620a may be used. The method of determining the coding unit at a predetermined position by using the coordinates of the sample points included in the coding unit as information indicating the positions of the sample points is not limited to the above method, and may include various arithmetic methods capable of using the coordinates of the sample points.
[0144] According to an embodiment, the image decoding device 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c, and may select one of the coding units 620a, 620b, and 620c based on a predetermined criterion. For example, the image decoding device 100 may select a coding unit 620b having a size different from that of other coding units from among the coding units 620a, 620b, and 620c.
[0145] According to an embodiment, the image decoding device 100 may determine the width or height of each of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya) as information indicating the position of the upper left sample point 630a of the upper coding unit 620a, the coordinates (xb, yb) as information indicating the position of the upper left sample point 630b of the middle coding unit 620b, and the coordinates (xc, yc) as information indicating the position of the upper left sample point 630c of the lower coding unit 620c. The image decoding device 100 may determine the size of each of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the image decoding device 100 may determine the width of the upper coding unit 620a as the width of the current coding unit 600. The image decoding device 100 may determine the height of the upper coding unit 620a as yb-ya. According to an embodiment, the image decoding device 100 may determine the width of the intermediate coding unit 620b as the width of the current coding unit 600. The image decoding device 100 may determine the height of the intermediate coding unit 620b as yc-yb. According to an embodiment, the image decoding device 100 may determine the width or height of the lower coding unit 620c by using the width or height of the current coding unit 600 or the width or height of the upper coding unit 620a and the intermediate coding unit 620b. The image decoding device 100 may determine a coding unit having a size different from that of other coding units based on the determined width and height of the coding units 620a, 620b, and 620c. Referring to Figure 6 , the image decoding device 100 may determine the middle coding unit 620b having a size different from the sizes of the upper coding unit 620a and the lower coding unit 620c as the coding unit at the predetermined position. However, the above-mentioned method of determining the coding unit having a size different from the sizes of other coding units performed by the image decoding device 100 corresponds only to an example of determining the coding unit at the predetermined position by using the size of the coding unit determined based on the coordinates of the sample points, and therefore, various methods of determining the coding unit at the predetermined position by comparing the size of the coding unit determined based on the coordinates of the predetermined sample points may be used.
[0146] The image decoding device 100 may determine the width or height of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd) as information indicating the position of the upper left sample point 670a of the left coding unit 660a, the coordinates (xe, ye) as information indicating the position of the upper left sample point 670b of the middle coding unit 660b, and the coordinates (xf, yf) as information indicating the position of the upper left sample point 670c of the right coding unit 660c. The image decoding device 100 may determine the size of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the coding units 660a, 660b, and 660c.
[0147] According to an embodiment, the image decoding device 100 may determine the width of the left coding unit 660a as xe-xd. The image decoding device 100 may determine the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 may determine the width of the middle coding unit 660b as xf-xe. The image decoding device 100 may determine the height of the middle coding unit 660b as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 may determine the width or height of the right coding unit 660c by using the width or height of the current coding unit 650 or the width or height of the left coding unit 660a and the middle coding unit 660b. The image decoding device 100 may determine a coding unit whose size is different from that of other coding units based on the determined width and height of the coding units 660a, 660b, and 660c. Refer to Figure 6 , the image decoding device 100 may determine the middle coding unit 660b having a size different from the sizes of the left coding unit 660a and the right coding unit 660c as the coding unit at the predetermined position. However, the above-mentioned method of determining the coding unit having a size different from the sizes of other coding units, performed by the image decoding device 100, corresponds only to an example of determining the coding unit at the predetermined position by using the size of the coding unit determined based on the coordinates of the sample points, and therefore, various methods of determining the coding unit at the predetermined position by comparing the size of the coding unit determined based on the coordinates of the predetermined sample points may be used.
[0148] However, the position of the sample considered in determining the position of the coding unit is not limited to the above-mentioned upper left position, and information on arbitrary positions of the samples included in the coding unit may be used.
[0149] According to an embodiment, the image decoding device 100 may select a coding unit at a predetermined position from an odd number of coding units determined by dividing the current coding unit by considering the shape of the current coding unit. For example, when the current coding unit has a non-square shape with a width greater than a height, the image decoding device 100 may determine a coding unit at a predetermined position along the horizontal direction. That is, the image decoding device 100 may determine one of the coding units at different positions along the horizontal direction and may impose restrictions on the coding unit. When the current coding unit has a non-square shape with a height greater than a width, the image decoding device 100 may determine a coding unit at a predetermined position along the vertical direction. That is, the image decoding device 100 may determine one of the coding units at different positions along the vertical direction and may impose restrictions on the coding unit.
[0150] According to an embodiment, the image decoding device 100 may use information indicating respective positions of even-numbered coding units to determine a coding unit at a predetermined position among the even-numbered coding units. The image decoding device 100 may determine the even-numbered coding units by dividing (e.g., dividing into two) the current coding unit, and may determine the coding unit at the predetermined position by using information about the positions of the even-numbered coding units. The operations related thereto may be the same as those already described above with respect to Figure 6 The operation of determining a coding unit at a predetermined position (eg, a center position) among odd-numbered coding units corresponds to the operation described in detail, and thus a detailed description thereof is not provided here.
[0151] According to an embodiment, when a non-square current coding unit is split into a plurality of coding units, a coding unit at a predetermined position among the plurality of coding units may be determined using predetermined information about the coding unit at a predetermined position in a split operation. For example, the image decoding device 100 may determine a coding unit at a center position among the plurality of coding units determined by splitting the current coding unit using at least one of block shape information and split shape pattern information stored in samples included in an intermediate coding unit in a split operation.
[0152] Reference Figure 6, the image decoding device 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on the division shape pattern information, and may determine the coding unit 620b at the center position among the plurality of coding units 620a, 620b, and 620c. In addition, the image decoding device 100 may determine the coding unit 620b at the center position in consideration of the position where the division shape pattern information is obtained. That is, the division shape pattern information of the current coding unit 600 may be obtained from the sample point 640 at the center position 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 division shape pattern information, the coding unit 620b including the sample point 640 may be determined as the coding unit at the center position. However, information for determining the coding unit at the center position is not limited to the division shape pattern information, and the coding unit at the center position may be determined using various types of information.
[0153] According to an embodiment, predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample point included in a coding unit to be determined. Figure 6 , the image decoding device 100 may use the division shape pattern information obtained from the sample at the predetermined position in the current coding unit 600 (for example, the sample at the center position of the current coding unit 600) to determine the coding unit at the predetermined position (for example, the coding unit at the center position of the divided multiple coding units) among the multiple coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. That is, the image decoding device 100 may determine the sample at the predetermined position by considering the block shape of the current coding unit 600, may determine the coding unit 620b including the sample for which the predetermined information (for example, the division shape pattern information) may be obtained from the multiple coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and may impose a predetermined restriction on the coding unit 620b. Referring to Figure 6 According to an embodiment, in a decoding operation, the image decoding device 100 may determine a sample 640 at a center position of a current coding unit 600 as a sample from which predetermined information may be obtained, and may impose a predetermined restriction on a coding unit 620b including the sample 640. However, the position of the sample from which the predetermined information may be obtained is not limited to the above-mentioned position, and may include any position included in the coding unit 620b to be determined as a sample for restriction.
[0154] According to an embodiment, the position of the sample at which the predetermined information can be obtained may be determined based on the shape of the current coding unit 600. According to an embodiment, the block shape information may indicate whether the current coding unit has a square shape or a non-square shape, and the position of the sample at which the predetermined specific information can be determined based on the shape. For example, the image decoding device 100 may determine a sample located on a boundary for dividing at least one of the width and the height of the current coding unit in half as a sample at which the predetermined specific information can be obtained by using at least one of the information about the width of the current coding unit and the information about the height of the current coding unit. As another example, when the block shape information of the current coding unit indicates a non-square shape, the image decoding device 100 may determine one of the samples including the boundary dividing the long side of the current coding unit in half as a sample at which the predetermined information can be obtained.
[0155] According to an embodiment, when a current coding unit is divided into a plurality of coding units, the image decoding device 100 may use division shape pattern information to determine a coding unit at a predetermined position in the plurality of coding units. According to an embodiment, the image decoding device 100 may obtain division shape pattern information from a sample at a predetermined position in the coding unit, and may divide a plurality of coding units generated by dividing the current coding unit by using the division shape pattern information, wherein the division shape pattern information is obtained from a sample at a predetermined position in each of the plurality of coding units. That is, the coding unit may be recursively divided based on the division shape pattern information, wherein the division shape pattern information is obtained from a sample at a predetermined position in each coding unit. As has been described above, Figure 5 An operation of recursively splitting the coding unit is described, and thus a detailed description thereof will not be provided here.
[0156] According to an embodiment, the image decoding device 100 may determine one or more coding units by splitting a current coding unit, and may determine an order in which to decode the one or more coding units based on a predetermined block (for example, the current coding unit).
[0157] Figure 7 An order in which a plurality of coding units are processed when an image decoding device determines a plurality of coding units by splitting a current coding unit according to an embodiment is illustrated.
[0158] According to an embodiment, based on the division shape pattern information, the image decoding device 100 may determine the second coding units 710a and 710b by dividing the first coding unit 700 in a vertical direction, may determine the second coding units 730a and 730b by dividing the first coding unit 700 in a horizontal direction, or may determine the second coding units 750a, 750b, 750c and 750d by dividing the first coding unit 700 in vertical and horizontal directions.
[0159] Reference Figure 7 , the image decoding device 100 may determine to process the second coding units 710a and 710b determined by dividing the first coding unit 700 in the vertical direction in a horizontal direction order 710c. The image decoding device 100 may determine to process the second coding units 730a and 730b determined by dividing the first coding unit 700 in the horizontal direction in a vertical direction order 730c. The image decoding device 100 may determine the second coding units 750a, 750b, 750c, and 750d determined by dividing the first coding unit 700 in the vertical direction and the horizontal direction according to a predetermined order (for example, in a raster scan order or a zigzag scan order 750e), wherein the coding units in one row are processed and then the coding units in the next row are processed.
[0160] According to an embodiment, the image decoding apparatus 100 may recursively divide the coding unit. Figure 7 , the image decoding device 100 may determine a plurality of coding units 710a and 710b, 730a and 730b, or 750a, 750b, 750c, and 750d by dividing the first coding unit 700, and may recursively divide each of the determined plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. A division method of the plurality of coding units 710a and 710b, 730a and 730b, or 750a, 750b, 750c, and 750d may correspond to a division method of the first coding unit 700. Therefore, each of the plurality of coding units 710a and 710b, 730a and 730b, or 750a, 750b, 750c, and 750d may be independently divided into a plurality of coding units. Referring to Figure 7 , the image decoding device 100 may determine the second coding units 710a and 710b by splitting the first coding unit 700 in a vertical direction, and may determine whether to independently split or not split each of the second coding units 710a and 710b.
[0161] According to an embodiment, the image decoding device 100 may determine the third coding units 720a and 720b by splitting the left second coding unit 710a in a horizontal direction, and may not split the right second coding unit 710b.
[0162] According to an embodiment, the processing order of the coding units may be determined based on the operation of dividing the coding units. In other words, the processing order of the coding units after the division may be determined based on the processing order of the coding units immediately before the division. The image decoding device 100 may determine the processing order of the third coding units 720a and 720b determined by dividing the left second coding unit 710a independently of the right second coding unit 710b. Since the third coding units 720a and 720b are determined by dividing the left second coding unit 710a in the horizontal direction, the third coding units 720a and 720b may be processed in a vertical direction order 720c. In addition, since the left second coding unit 710a and the right second coding unit 710b are processed in a horizontal direction order 710c, the right second coding unit 710b may be processed after the third coding units 720a and 720b included in the left second coding unit 710a are processed in a vertical direction order 720c. The operation of determining the processing order of coding units based on the coding units before splitting is not limited to the above example, and coding units split and determined to be various shapes may be independently processed in a predetermined order using various methods.
[0163] Figure 8 A process of determining that a current coding unit is to be split into an odd number of coding units, performed by an image decoding apparatus, is illustrated when coding units cannot be processed in a predetermined order according to an embodiment.
[0164] According to an embodiment, the image decoding device 100 may determine that the current coding unit is to be split into an odd number of coding units based on the obtained division shape pattern information. Figure 8 , the square first coding unit 800 may be 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 and 820b and 820c, 820d, and 820e. According to an embodiment, the image decoding device 100 may determine a plurality of third coding units 820a and 820b by dividing the left second coding unit 810a in the horizontal direction, and may divide the right second coding unit 810b into an odd number of third coding units 820c, 820d, and 820e.
[0165] According to an embodiment, the image decoding device 100 may determine whether any coding unit is split into an odd number of coding units by determining whether the third coding units 820a and 820b and 820c, 820d, and 820e can be processed in a predetermined order. Figure 8 , the image decoding device 100 may determine the third coding units 820a and 820b and 820c, 820d, and 820e by recursively dividing the first coding unit 800. The image decoding device 100 may determine whether any one of the following coding units is divided into an odd number of coding units based on at least one of the block shape information and the division shape mode information: the first coding unit 800, the second coding units 810a and 810b, the third coding units 820a and 820b, and 820c, 820d, and 820e. For example, the coding unit located on the right side of the second coding units 810a and 810b may be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of the multiple coding units included in the first coding unit 800 can be a predetermined order (for example, a zigzag scanning order 830), and the image decoding device 100 can 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 meet the conditions for processing in the predetermined order.
[0166] According to an embodiment, the image decoding device 100 may determine whether the third coding units 820a and 820b and 820c, 820d, and 820e included in the first coding unit 800 satisfy a condition for processing in a predetermined order, and the condition is related to whether at least one of the width and height of the second coding units 810a and 810b will be divided in half along the boundary of the third coding units 820a and 820b and 820c, 820d, and 820e. For example, the third coding units 820a and 820b determined when the height of the left second coding unit 810a of a non-square shape is divided in half may satisfy the condition. Because the boundaries of the third coding units 820c, 820d, and 820e determined when the right second coding unit 810b is divided into three coding units fail to divide the width or height of the right second coding unit 810b in half, it can be determined that the third coding units 820c, 820d, and 820e do not satisfy the condition. When the condition is not satisfied as described above, the image decoding device 100 may determine that the scanning order is discontinuous, and may determine 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, when the coding unit is divided into an odd number of coding units, the image decoding device 100 may impose a predetermined restriction on the coding unit at a predetermined position in the divided coding unit. The restriction or the predetermined position has been described above with respect to various embodiments, and therefore a detailed description thereof will not be provided here.
[0167] Fig. 9 A process of determining at least one coding unit by splitting a first coding unit, performed by an image decoding device according to an embodiment, is illustrated.
[0168] According to an embodiment, the image decoding device 100 may divide the first coding unit 900 based on the division shape pattern information obtained by the receiver 110. The square first coding unit 900 may be divided into four square coding units, or may be divided into a plurality of non-square coding units. Fig. 9 , when the first coding unit has a square shape and the division shape pattern information indicates that the first coding unit 900 is divided into non-square coding units, the image decoding device 100 may divide the first coding unit 900 into a plurality of non-square coding units. In detail, when the division shape pattern information indicates that an odd number of coding units is determined by dividing the first coding unit 900 in a horizontal direction or a vertical direction, the image decoding device 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 the square first coding unit 900 in a vertical direction, or second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in a horizontal direction).
[0169] According to an embodiment, the image decoding device 100 may determine whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition for processing in a predetermined order, and the condition may be related to whether at least one of the width and height of the first coding unit 900 will be divided in half along the boundary of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Fig. 9, because the boundaries of the second coding units 910a, 910b, and 910c determined by dividing the first coding unit 900 in the vertical direction do not divide the width of the first coding unit 900 in half, it can be determined that the first coding unit 900 does not satisfy the condition for processing in a predetermined order. In addition, because the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the first coding unit 900 in the horizontal direction do not divide the height of the first coding unit 900 in half, it can be determined that the first coding unit 900 does not satisfy the condition for processing in a predetermined order. When the condition is not satisfied as described above, the image decoding device 100 may determine that the scanning order is not continuous, and may determine that the first coding unit 900 will be divided into an odd number of coding units based on the determination result. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding device 100 may impose a predetermined restriction on the coding unit at a predetermined position in the divided coding unit. The restriction or the predetermined position has been described above with respect to various embodiments, so a detailed description thereof will not be provided here.
[0170] According to an embodiment, the image decoding device 100 may determine coding units of various shapes by splitting the first coding unit.
[0171] Reference Fig. 9 , the image decoding device 100 may divide the square first coding unit 900 or the non-square first coding unit 930 or 950 into coding units of various shapes.
[0172] Fig.10 It is shown that according to an embodiment, when a second coding unit having a non-square shape determined by splitting a first coding unit by an image decoding apparatus satisfies a predetermined condition, shapes into which the second coding unit may be split are restricted.
[0173] According to an embodiment, the image decoding device 100 may determine to divide the square first coding unit 1000 into non-square second coding units 1010a and 1010b, or 1020a and 1020b, based on the division shape pattern information obtained by the ratio receiver 110. The second coding units 1010a and 1010b, or 1020a and 1020b may be independently divided. In this way, the image decoding device 100 may determine to divide each of the second coding units 1010a and 1010b, or 1020a and 1020b into a plurality of coding units or not to divide each of the second coding units 1010a and 1010b, or 1020a and 1020b, based on the division shape pattern information of each of the second coding units 1010a and 1010b, or 1020a and 1020b. According to an embodiment, the image decoding device 100 may determine the third coding units 1012a and 1012b by splitting the non-square left second coding unit 1010a determined by splitting the first coding unit 1000 in the vertical direction in the horizontal direction. However, when the left second coding unit 1010a is split in the horizontal direction, the image decoding device 100 may limit the right second coding unit 1010b to not be split in the horizontal direction in which the left second coding unit 1010a is split. When the third coding units 1014a and 1014b are determined by splitting the right second coding unit 1010b in the same direction, since the left second coding unit 1010a and the right second coding unit 1010b are independently split in the horizontal direction, the third coding units 1012a and 1012b, or 1014a and 1014b may be determined. However, this case has the same effect as the case where the image decoding device 100 divides the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c and 1030d based on the division shape pattern information, and may be inefficient in image decoding.
[0174] According to an embodiment, the image decoding device 100 may determine the third coding units 1022a and 1022b, or 1024a and 1024b, by vertically splitting the non-square second coding unit 1020a or 1020b determined by horizontally splitting the first coding unit 1000. However, when the second coding unit (e.g., the upper second coding unit 1020a) is split in the vertical direction, the image decoding device 100 may limit another second coding unit (e.g., the lower second coding unit 1020b) to not be split in the vertical direction in which the upper second coding unit 1020a is split for the above-mentioned reason.
[0175] Fig.11A process of splitting a square coding unit performed by an image decoding device when division shape pattern information indicates that the square coding unit is not to be split into four square coding units according to an embodiment is illustrated.
[0176] According to an embodiment, the image decoding device 100 may determine the second coding units 1110a and 1110b, or 1120a and 1120b, etc. by dividing the first coding unit 1100 based on the division shape pattern information. The division shape pattern information may include information about various methods of dividing the coding unit, but the information about the various division methods may not include information for dividing the coding unit into four square coding units. According to such division shape pattern information, the image decoding device 100 may not divide the square first coding unit 1100 into four square coding units 1130a, 1130b, 1130c, and 1130d. The image decoding device 100 may determine the non-square second coding units 1110a and 1110b, or 1120a and 1120b, etc. based on the division shape pattern information.
[0177] According to an embodiment, the image decoding device 100 may independently divide the non-square second coding units 1110a and 1110b, or 1120a and 1120b, etc. Each of the second coding units 1110a and 1110b, or 1120a and 1120b, etc. may be recursively divided in a predetermined order, and the division method may correspond to the method of dividing the first coding unit 1100 based on the division shape pattern information.
[0178] For example, the image decoding device 100 may determine the square third coding units 1112a and 1112b by dividing the left second coding unit 1110a in the horizontal direction, and may determine the square third coding units 1114a and 1114b by dividing the right second coding unit 1110b in the horizontal direction. In addition, the image decoding device 100 may determine the square third coding units 1116a, 1116b, 1116c, and 1116d by dividing both the left second coding unit 1110a and the right second coding unit 1110b in the horizontal direction. In this case, a coding unit having the same shape (which the division shape pattern information may not directly indicate) as the four square second coding units 1130a, 1130b, 1130c, and 1130d divided from the first coding unit 1100 may be determined.
[0179] As another example, the image decoding device 100 may determine the third coding units 1122a and 1122b of the square shape by dividing the upper second coding unit 1120a in the vertical direction, and may determine the third coding units 1124a and 1124b of the square shape by dividing the lower second coding unit 1120b in the vertical direction. In addition, the image decoding device 100 may determine the third coding units 1126a, 1126b, 1126c, and 1126d of the square shape by dividing both the upper second coding unit 1120a and the lower second coding unit 1120b in the vertical direction. In this case, a coding unit having the same shape (which the division shape pattern information may not directly indicate) as the four square second coding units 1130a, 1130b, 1130c, and 1130d divided from the first coding unit 1100 may be determined.
[0180] Fig.12 It is shown that a processing order among a plurality of coding units according to an embodiment may be changed according to a process of dividing a coding unit.
[0181] According to an embodiment, the image decoding device 100 may divide the first coding unit 1200 based on the division shape mode information. When the block shape indicates a square shape and the division shape mode information indicates that the first coding unit 1200 is divided in at least one of the horizontal direction and the vertical direction, the image decoding device 100 may determine the second coding units 1210a and 1210b, or 1220a and 1220b, etc. by dividing the first coding unit 1200. Fig.12 , the non-square second coding units 1210a and 1210b determined by dividing the first coding unit 1200 in the vertical direction, or the non-square second coding units 1220a and 1220b determined by dividing the first coding unit 1200 in the horizontal direction may be independently divided based on the division shape pattern information of each coding unit. For example, the image decoding device 100 may determine the third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b in the horizontal direction, and may determine the third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b in the vertical direction. As has been described above, Fig.11 An operation of dividing the second coding units 1210a and 1210b, or 1220a and 1220b is described, and thus a detailed description thereof will not be provided here.
[0182] According to an embodiment, the image decoding apparatus 100 may process the coding units in a predetermined order. Figure 7The operation of processing the encoding units in a predetermined order is described, and thus a detailed description thereof will not be provided here. Fig.12 , the image decoding device 100 may determine four square third coding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d by dividing the square first coding unit 1200. According to an embodiment, the image decoding device 100 may determine the processing order of the third coding units 1216a, 1216b, 1216c, and 1216d or 1226a, 1226b, 1226c, and 1226d based on the division shape of the first coding unit 1200.
[0183] According to an embodiment, the image decoding device 100 may determine third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and may process the third coding units 1216a, 1216b, 1216c, and 1216d in the following processing order 1217: first, the third coding units 1216a and 1216c included in the left second coding unit 1210a are processed in the vertical direction, and then the third coding units 1216b and 1216d included in the right second coding unit 1210b are processed in the vertical direction.
[0184] According to an embodiment, the image decoding device 100 may determine third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction, and may process the third coding units 1226a, 1226b, 1226c, and 1226d in the following processing order 1227: first, the third coding units 1226a and 1226b included in the upper second coding unit 1220a are processed in the horizontal direction, and then the third coding units 1226c and 1226d included in the lower second coding unit 1220b are processed in the horizontal direction.
[0185] Reference Fig.12, square third coding units 1216a, 1216b, 1216c and 1216d and 1226a, 1226b, 1226c and 1226d may be determined by dividing the second coding units 1210a and 1210b, and 1220a and 1220b, respectively. Although the second coding units 1210a and 1210b determined by splitting the first coding unit 1200 in the vertical direction are different from the second coding units 1220a and 1220b determined by splitting the first coding unit 1200 in the horizontal direction, the third coding units 1216a, 1216b, 1216c, and 1216d and the third coding units 1226a, 1226b, 1226c, and 1226d split from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b ultimately show the same shape of coding units split from the first coding unit 1200. In this way, by recursively splitting the coding units in different ways based on the split shape pattern information, even if the coding units are ultimately determined to be the same shape, the image decoding apparatus 100 may process a plurality of coding units in different orders.
[0186] Fig.13 A process of determining a depth of a coding unit as a shape and a size of a coding unit change when a coding unit is recursively split to determine a plurality of coding units according to an embodiment is illustrated.
[0187] According to an embodiment, the image decoding device 100 may determine the depth of the coding unit based on a predetermined criterion. For example, the predetermined criterion may be the length of the long side of the coding unit. When the length of the long side of the coding unit before being divided is 2n (n>0) times the length of the long side of the current coding unit after being divided, the image decoding device 100 may determine that the depth of the current coding unit is increased by n compared to the depth of the coding unit before being divided. In the following description, a coding unit with an increased depth is represented as a coding unit of a lower depth.
[0188] Reference Fig.13According to an embodiment, the image decoding device 100 may determine a second coding unit 1302 and a third coding unit 1304 of a lower depth by dividing a square first coding unit 1300 based on block shape information indicating a square shape (for example, the block shape information may be represented as "0: SQUARE"). Assuming that the size of the square first coding unit 1300 is 2N×2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 into 1 / 2 may have a size of N×N. In addition, the third coding unit 1304 determined by dividing the width and height of the second coding unit 1302 into 1 / 2 may have a size of N / 2×N / 2. In this case, the width and height of the third coding unit 1304 are 1 / 4 of the width and height of the first coding unit 1300. When the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302 whose width and height are 1 / 2 of the width and height of the first coding unit 1300 may be D+1, and the depth of the third coding unit 1304 whose width and height are 1 / 4 of the width and height of the first coding unit 1300 may be D+2.
[0189] According to an embodiment, the image decoding device 100 can determine the second coding unit 1312 or 1322 of a lower depth, and the third coding unit 1314 or 1324 by dividing the non-square first coding unit 1310 or 1320 based on block shape information indicating a non-square shape (for example, the block shape information may be represented as "1: NS_VER" indicating a non-square shape in which the height is longer than the width, or may be represented as "2: NS_HOR" indicating a non-square shape in which the width is longer than the height).
[0190] The image decoding device 100 may determine the second coding unit 1302, 1312, or 1322 by dividing at least one of the width and the height of the first coding unit 1310 having a size of N×2N. That is, the image decoding device 100 may determine the second coding unit 1302 having a size of N×N or the second coding unit 1322 having a size of N×N / 2 by dividing the first coding unit 1310 in the horizontal direction, or may determine the second coding unit 1312 having a size of N / 2×N by dividing the first coding unit 1310 in the horizontal and vertical directions.
[0191] According to an embodiment, the image decoding device 100 may determine the second coding unit 1302, 1312, or 1322 by dividing at least one of the width and the height of the first coding unit 1320 having a size of 2N×N. That is, the image decoding device 100 may determine the second coding unit 1302 having a size of N×N or the second coding unit 1312 having a size of N / 2×N by dividing the first coding unit 1320 in a vertical direction, or may determine the second coding unit 1322 having a size of N×N / 2 by dividing the first coding unit 1320 in horizontal and vertical directions.
[0192] According to an embodiment, the image decoding device 100 may determine the third coding unit 1304, 1314, or 1324 by dividing at least one of the width and the height of the second coding unit 1302 having a size of N×N. That is, the image decoding device 100 may determine the third coding unit 1304 having a size of N / 2×N / 2, the third coding unit 1314 having a size of N / 4×N / 2, or the third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1302 in the vertical direction and the horizontal direction.
[0193] According to an embodiment, the image decoding device 100 may determine the third coding unit 1304, 1314, or 1324 by dividing at least one of the width and the height of the second coding unit 1312 having a size of N / 2×N. That is, the image decoding device 100 may determine the third coding unit 1304 having a size of N / 2×N / 2 or the third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1312 in the horizontal direction, or may determine the third coding unit 1314 having a size of N / 4×N / 2 by dividing the second coding unit 1312 in the vertical and horizontal directions.
[0194] According to an embodiment, the image decoding device 100 may determine the third coding unit 1304, 1314, or 1324 by dividing at least one of the width and the height of the second coding unit 1322 having a size of N×N / 2. That is, the image decoding device 100 may determine the third coding unit 1304 having a size of N / 2×N / 2 or the third coding unit 1314 having a size of N / 4×N / 2 by dividing the second coding unit 1322 in the vertical direction, or may determine the third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1322 in the vertical direction and the horizontal direction.
[0195] According to an embodiment, the image decoding device 100 may split the square coding unit 1300, 1302, or 1304 in the horizontal direction or the vertical direction. For example, the image decoding device 100 may determine the first coding unit 1310 having a size of N×2N by splitting the first coding unit 1300 having a size of 2N×2N in the vertical direction, or may determine the first coding unit 1320 having a size of 2N×N by splitting the first coding unit 1300 in the horizontal direction. 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 splitting the first coding unit 1300 having a size of 2N×2N in the horizontal direction or the vertical direction may be the same as the depth of the first coding unit 1300.
[0196] According to an embodiment, the width and height of the third coding unit 1314 or 1324 may be 1 / 4 of the width and height 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 whose width and height are 1 / 2 of the width and height of the first coding unit 1310 or 1320 may be D+1, and the depth of the third coding unit 1314 or 1324 whose width and height are 1 / 4 of the width and height of the first coding unit 1310 or 1320 may be D+2.
[0197] Fig.14 Depth that may be determined based on the shape and size of a coding unit and a partial index (PID) for distinguishing coding units according to an embodiment are illustrated.
[0198] According to an embodiment, the image decoding apparatus 100 may determine second coding units of various shapes by dividing the square first coding unit 1400. Fig.14 , the image decoding device 100 may determine the second coding units 1402a and 1402b, the second coding units 1404a and 1404b, and the second coding units 1406a, 1406b, 1406c, and 1406d by dividing the first coding unit 1400 in at least one of the vertical direction and the horizontal direction based on the division shape pattern information. That is, the image decoding device 100 may determine the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d based on the division shape pattern information of the first coding unit 1400.
[0199] According to an embodiment, the depths of the second coding units 1402a and 1402b, the second coding units 1404a and 1404b, and the second coding units 1406a, 1406b, 1406c, and 1406d determined based on the division shape pattern information of the square first coding unit 1400 may be determined based on the lengths of their long sides. For example, since the length of the side of the square first coding unit 1400 is equal to the length of the long side of the non-square second coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and 1404a and 1404b may have the same depth, for example, D. However, when the image decoding device 100 divides the first coding unit 1400 into four square second coding units 1406a, 1406b, 1406c and 1406d based on the division shape pattern information, because the length of the side of the square second coding units 1406a, 1406b, 1406c and 1406d is 1 / 2 of the length of the side of the first coding unit 1400, the depth of the second coding units 1406a, 1406b, 1406c and 1406d can be D+1 which is 1 deeper than the depth D of the first coding unit 1400.
[0200] According to an embodiment, the image decoding device 100 may determine a plurality of second coding units 1412a and 1412b and 1414a, 1414b and 1414c by dividing the first coding unit 1410 whose height is longer than the width in the horizontal direction based on the division shape pattern information. According to an embodiment, the image decoding device 100 may determine a plurality of second coding units 1422a and 1422b and 1424a, 1424b and 1424c by dividing the first coding unit 1420 whose width is longer than the height in the vertical direction based on the division shape pattern information.
[0201] According to an embodiment, the depth of the second coding units 1412a and 1412b and 1414a, 1414b and 1414c, or 1422a and 1422b and 1424a, 1424b and 1424c determined based on the division shape pattern information of the non-square first coding unit 1410 or 1420 may be determined based on the length of their long sides. For example, since the length of the side of the square second coding units 1412a and 1412b is 1 / 2 of the length of the long side of the first coding unit 1410 having a non-square shape whose height is longer than the width, the depth of the square second coding units 1412a and 1412b is D+1 which is 1 deeper than the depth D of the non-square first coding unit 1410.
[0202] In addition, the image 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 shape 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, since the length of the long side of the non-square second coding units 1414a and 1414c and the length of the side of the square second coding unit 1414b are 1 / 2 of the length of the long side of the first coding unit 1410, the depth of the second coding units 1414a, 1414b, and 1414c may be D+1 which is 1 deeper than the depth D of the non-square first coding unit 1410. The image decoding device 100 may determine the depths of the coding units split from the first coding unit 1420 having a non-square shape whose width is longer than the height by using the above-described method of determining the depths of the coding units split from the first coding unit 1410 .
[0203] According to an embodiment, when the odd-numbered divided coding units do not have equal sizes, the image decoding apparatus 100 may determine a PID for identifying the divided coding units based on a size ratio between the coding units. Fig.14 , the width of the coding unit 1414b at the center position among the odd-numbered divided coding units 1414a, 1414b, and 1414c may be equal to the width of the other coding units 1414a and 1414c and its height may be twice the height of the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b at the center position may include two other coding units 1414a or 1414c. Therefore, when the PID of the coding unit 1414b at the center position is 1 based on the scanning order, the PID of the coding unit 1414c located at a position adjacent to the coding unit 1414b may increase by 2 and may thus be 3. That is, there may be discontinuity in the PID value. According to an embodiment, the image decoding device 100 may determine whether the odd-numbered divided coding units do not have equal sizes based on whether there is discontinuity in the PID for identifying the divided coding units.
[0204] According to an embodiment, the image decoding device 100 may determine whether to use a specific splitting method based on a PID value for identifying a plurality of coding units determined by splitting the current coding unit. Fig.14, the image decoding device 100 may determine even-numbered coding units 1412a and 1412b or odd-numbered coding units 1414a, 1414b, and 1414c by dividing the first coding unit 1410 having a rectangular shape whose height is longer than its width. In order to identify the corresponding coding unit, the image decoding device 100 may use a PID indicating the corresponding coding unit. According to an embodiment, the PID may be obtained from a sample at a predetermined position of each coding unit (e.g., an upper left sample).
[0205] According to an embodiment, the image decoding device 100 may determine a coding unit at a predetermined position among the divided coding units by using a PID for distinguishing coding units. According to an embodiment, when the division shape pattern information of the first coding unit 1410 having a rectangular shape having a height longer than a width indicates that the coding unit is divided into three coding units, the image decoding device 100 may divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding device 100 may assign a PID to each of the three coding units 1414a, 1414b, and 1414c. The image decoding device 100 may compare the PIDs of the odd-numbered divided coding units to determine a coding unit at a center position among the coding units. The image decoding device 100 may determine the coding unit 1414b corresponding to the PID and the intermediate value among the PIDs of the coding units as the coding unit at the center position among the coding units determined by dividing the first coding unit 1410. According to an embodiment, when the divided coding units do not have equal sizes, the image decoding apparatus 100 may determine a PID for distinguishing the divided coding units based on a size ratio between the coding units. Fig.14, the width of the coding unit 1414b generated by dividing the first coding unit 1410 may be equal to the width of the other coding units 1414a and 1414c, and the height thereof may be twice the height of the other coding units 1414a and 1414c. In this case, when the PID of the coding unit 1414b at the center position is 1, the PID of the coding unit 1414c located at the adjacent position to the coding unit 1414b may increase by 2 and thus may be 3. When the PID is not uniformly increased as described above, the image decoding device 100 may determine that the coding unit is divided into a plurality of coding units, wherein the plurality of coding units include coding units having sizes different from those of the other coding units. According to an embodiment, when the division shape pattern information indicates that the coding unit is divided into an odd number of coding units, the image decoding device 100 may divide the current coding unit in such a manner that the coding unit at a predetermined position (e.g., the coding unit at the center position) among the odd number of coding units has a size different from that of the other coding units. In this case, the image decoding device 100 may determine the coding units at the center position having different sizes by using the PIDs of the coding units. However, the PID of the coding unit at the predetermined position and the size or position are not limited to the above-mentioned examples, and various PIDs and various positions and sizes of the coding unit may be used.
[0206] According to an embodiment, the image decoding apparatus 100 may use a predetermined data unit in which the coding unit is recursively split.
[0207] Fig.15 It is illustrated that a plurality of coding units are determined based on a plurality of predetermined data units included in a picture according to an embodiment.
[0208] According to an embodiment, a predetermined data unit may be defined as a data unit for recursively dividing a coding unit starting by using division shape pattern information. That is, the predetermined data unit may correspond to a coding unit for determining a highest depth of a plurality of coding units divided from a current picture. In the following description, for ease of explanation, a predetermined data unit is referred to as a reference data unit.
[0209] According to an embodiment, the reference data unit may have a predetermined size and a predetermined shape. According to an embodiment, the reference coding unit may include M×N samples. Here, M and N may be equal to each other and may be an integer represented as a power of 2. That is, the reference data unit may have a square shape or a non-square shape and may be divided into an integer number of coding units.
[0210] According to an embodiment, the image decoding device 100 may divide the current picture into a plurality of reference data units. According to an embodiment, the image decoding device 100 may divide the plurality of reference data units divided from the current picture by using the division shape pattern information of each reference data unit. The operation of dividing the reference data unit may correspond to the division operation using a quadtree structure.
[0211] According to an embodiment, the image decoding device 100 may predetermine the minimum size allowed for the reference data unit included in the current picture. Therefore, the image decoding device 100 may determine various reference data units having a size equal to or larger than the minimum size, and may determine one or more coding units by using the division shape pattern information with reference to the determined reference data unit.
[0212] Reference Fig.15 , the image 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 based on various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) that can include one or more reference coding units.
[0213] According to an embodiment, the receiver 110 of the image decoding device 100 may obtain at least one of reference coding unit shape information and reference coding unit size information for each of various data units from a bitstream. Figure 3 The operation of dividing the current coding unit 300 describes the operation of dividing the square reference coding unit 1500 into one or more coding units, and the above has been combined with Figure 4 The operation of splitting the current coding unit 400 or 450 describes an operation of splitting the non-square reference coding unit 1502 into one or more coding units. Therefore, a detailed description thereof will not be provided here.
[0214] According to an embodiment, the image decoding device 100 may determine the size and shape of the reference coding unit using a PID for identifying the size and shape of the reference coding unit according to some data units predetermined based on a specific condition. That is, the receiver 110 may obtain only the PID for identifying the size and shape of the reference coding unit for each slice, slice segment, tile, tile group, or maximum coding unit from the bitstream, wherein the slice, slice segment, tile, tile group, or maximum coding unit is a data unit (e.g., a data unit having a size equal to or smaller than a slice) among various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) that satisfies a predetermined condition. The image decoding device 100 may determine the size and shape of the reference coding unit for each data unit that satisfies the predetermined condition by using the PID. When the reference coding unit shape information and the reference coding unit size information are obtained and used from the bitstream according to each data unit having a relatively small size, the efficiency of using the bitstream may not be high, and therefore, only the PID may be obtained and used instead of directly obtaining the reference coding unit shape information and the reference coding unit size information. In this case, at least one of the size and shape of the reference coding unit corresponding to the PID for identifying the size and shape of the reference coding unit may be predetermined. That is, the image decoding device 100 may determine at least one of the size and shape of the reference coding unit included in the data unit serving as the unit for obtaining the PID by selecting at least one of the size and shape of the reference coding unit predetermined based on the PID.
[0215] According to an embodiment, the image decoding device 100 may use one or more reference coding units included in the maximum coding unit. That is, the maximum coding unit divided from the picture may include one or more reference coding units, and the coding unit may be determined by recursively dividing each reference coding unit. According to an embodiment, at least one of the width and height of the maximum coding unit may be an integer multiple of at least one of the width and height of the reference coding unit. According to an embodiment, the size of the reference coding unit may be obtained by dividing the maximum coding unit n times based on a quadtree structure. That is, according to various embodiments, the image decoding device 100 may determine the reference coding unit by dividing the maximum coding unit n times based on a quadtree structure, and the reference coding unit may be divided based on at least one of the block shape information and the division shape mode information.
[0216] According to an embodiment, the image decoding device 100 may obtain block shape information indicating the shape of the current coding unit or division shape pattern information indicating the division method of the current coding unit from the bitstream, and may use the obtained information. The division shape pattern information may be included in the bitstream associated with various data units. For example, the image decoding device 100 may use the division shape pattern information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a parallel block header, or a parallel block group header. In addition, the image decoding device 100 may obtain a syntax element corresponding to the block shape information or the division shape pattern information from the bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and may use the obtained syntax element.
[0217] Hereinafter, a method for determining a division rule according to an embodiment of the present disclosure will be described in detail.
[0218] The image decoding device 100 may determine a division rule of an image. The division rule may be predetermined between the image decoding device 100 and the image encoding device 2200. The image decoding device 100 may determine a division rule of an image based on information obtained from a bitstream. The image decoding device 100 may determine a division rule based on information obtained 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 parallel block header, and a parallel block group header. The image decoding device 100 may determine a division rule differently according to a frame, a slice, a parallel block, a temporal layer, a maximum coding unit, or a coding unit.
[0219] The image decoding device 100 may determine the division rule based on the block shape of the coding unit. The block shape may include the size, shape, aspect ratio, and direction of the coding unit. The image decoding device 100 may predetermine the division rule based on the block shape of the coding unit. However, the embodiment is not limited thereto. The image decoding device 100 may determine the division rule based on information obtained from the received bit stream.
[0220] The shape of the coding unit may include a square and a non-square. When the width length and height length of the coding unit are the same, the image decoding device 100 may determine that the shape of the coding unit is a square. In addition, when the width length and height length of the coding unit are different, the image decoding device 100 may determine that the shape of the coding unit is a non-square.
[0221] The size of the coding unit may include various sizes, such as 4×4, 8×4, 4×8, 8×8, 16×4, 16×8, ... and up to 256×256. The size of the coding unit may be classified or determined based on the length of the long side, the length of the short side, or the area of the coding unit. The image decoding device 100 may apply the same division rule to the coding units classified into the same group. For example, the image decoding device 100 may classify the coding units having the same long side length as having the same size. In addition, the image decoding device 100 may apply the same division rule to the coding units having the same long side length.
[0222] The aspect ratio 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. In addition, the direction of the coding unit may include a horizontal direction and a vertical direction. The horizontal direction may indicate a case where the width length of the coding unit is longer than the height length of the coding unit. The vertical direction may indicate a case where the width length of the coding unit is shorter than the height length of the coding unit.
[0223] The image decoding device 100 may adaptively determine the division rule based on the size of the coding unit. The image decoding device 100 may determine the allowable division shape mode differently based on the size of the coding unit. For example, the image decoding device 100 may determine whether to allow division based on the size of the coding unit. The image decoding device 100 may determine the division direction according to the size of the coding unit. The image decoding device 100 may determine the allowable division type according to the size of the coding unit.
[0224] The division rule determined based on the size of the coding unit may be a division rule determined in advance in the image decoding device 100. In addition, the image decoding device 100 may determine the division rule based on information obtained from a bitstream.
[0225] The image decoding device 100 may adaptively determine a split rule based on a location of a coding unit. The image decoding device 100 may adaptively determine a split rule based on a location of a coding unit in an image.
[0226] In addition, the image decoding device 100 may determine the division rule so that the coding units generated via different division paths do not have the same block shape. However, the embodiment is not limited thereto, and the coding units generated via different division paths have the same block shape. The coding units generated via different division paths may have different decoding processing orders. Fig.12 The decoding process order is described, so its details are not provided again.
[0227] Fig.16 It is a block diagram of an image encoding and decoding system.
[0228] The encoding end 1610 of the image encoding and decoding system 1600 transmits an encoded bit stream of an image, and the decoding end 1650 outputs a reconstructed image by receiving and decoding the bit stream. Here, the decoding end 1650 may have a similar configuration to the image decoding device 100.
[0229] At the encoding end 1610, the prediction encoder 1615 outputs a reference image via inter-frame prediction and intra-frame prediction, and the transformer and quantizer 1620 quantizes the residual data between the reference picture and the current input image into quantized transform coefficients and outputs the quantized transform coefficients. The entropy encoder 1625 transforms the quantized transform coefficients by encoding the quantized transform coefficients, and outputs the transformed quantized transform coefficients as a bit stream. The quantized transform coefficients are reconstructed into data in the spatial domain via the inverse quantizer and inverse transformer 1630, and the data in the spatial domain is output as a reconstructed image via the deblocking filter 1635 and the loop filter 1640. The reconstructed image can be used as a reference image for the next input image via the prediction encoder 1615.
[0230] The encoded image data in the bit stream received by the decoding end 1650 is reconstructed as residual data in the spatial domain via the entropy decoder 1655 and the inverse quantizer and inverse transformer 1660. When the residual data and the reference image output from the prediction decoder 1675 are combined, the image data in the spatial domain is configured, and the deblocking filter 1665 and the loop filter 1670 can output a reconstructed image about the current original image by performing filtering on the image data in the spatial domain. The reconstructed image can be used by the prediction decoder 1675 as a reference image for the next original image.
[0231] The loop filter 1640 of the encoding end 1610 performs loop filtering by using filter information input according to user input or system setting. The filter information used by the loop filter 1640 is output to the entropy encoder 1625 and is sent to the decoding end 1650 together with the encoded image data. The loop filter 1670 of the decoding end 1650 may perform loop filtering based on the filter information input from the decoding end 1650.
[0232] In the following, reference Figures 17 to 20 A method and apparatus for encoding or decoding a chrominance component of a picture according to an embodiment disclosed in this specification will be described.
[0233] Fig.17 is a block diagram of a video decoding apparatus according to an embodiment.
[0234] Reference Fig.17 , the video decoding device 1700 according to an embodiment may include an obtainer 1710 and a decoder 1720.
[0235] The video decoding device 1700 according to an embodiment may include a central processor for controlling the obtainer 1710 and the decoder 1720. In an embodiment, the obtainer 1710 and the decoder 1720 may be operated by their own processors, and the processors may systematically operate with each other to operate the video decoding device 1700. In an embodiment, the obtainer 1710 and the decoder 1720 may be controlled according to the control of an external processor of the video decoding device 1700.
[0236] The video decoding apparatus 1700 may include one or more data memories storing input / output data of the obtainer 1710 and the decoder 1720. The video decoding apparatus 1700 may include a memory controller for controlling data input and output to and from the data memory.
[0237] In order to reconstruct an image via image decoding, the video decoding device 1700 may perform an image decoding operation including prediction by operating in association with an internal video decoding processor or an external video decoding processor. The internal video decoding processor of the video decoding device 1700 according to an embodiment may perform basic image decoding operations in a manner that not only a separate processor but also an image decoding processing module included in a central processing device or a graphics processing device also performs basic image decoding operations.
[0238] The video decoding device 1700 may be included in the above-mentioned image decoding device 100. For example, the obtainer 1710 may be included in Figure 1 The decoder 1720 may be included in the receiver 110 of the image decoding device 100 , and the decoder 1720 may be included in the decoder 120 of the image decoding device 100 .
[0239] The video decoding device 1700 may obtain a bitstream generated as a result of encoding an image, and decode information about a prediction type of a coding unit based on information included in the bitstream. For example, the information about the prediction type may indicate one of an intra prediction type and an inter prediction type. The coding unit may correspond to a block divided and generated from an image according to a tree structure.
[0240] The obtainer 1710 may determine the current block based on the block shape information and / or the information about the partition shape mode included in at least one of the sequence parameter set, the picture parameter set, the video parameter set, the slice header, and the slice segment header. In addition, the obtainer 1710 may obtain a syntax element corresponding to the block type information or the information about the partition type mode from the bitstream for each maximum coding unit, each reference coding unit, or each processing block, and determine the current block using the syntax element.
[0241] The obtainer 1710 according to an embodiment may obtain coded block flag (CBF) information of the Cr component of the current block and CBF information of the Cb component of the current block from a bitstream. The current block may be a block generated from a coding unit and may be a transform unit for inverse quantization and inverse transform.
[0242] The CBF information of the Cr component (for example, it may be referred to as "Cr CBF information") may indicate whether the current block includes a Cr component whose transform coefficient level is not 0. For example, when the Cr CBF information is 0, it may indicate that the current block does not include a Cr component whose transform coefficient level is not 0, and when the Cr CBF information is 1, it may indicate that the current block includes a Cr component whose transform coefficient level is not 0. Similarly, the CBF information of the Cb component (for example, it may be referred to as "Cb CBF information") may indicate whether the current block includes a Cb component whose transform coefficient level is not 0. For example, when the Cb CBF information is 0, it may indicate that the current block does not include a Cb component whose transform coefficient level is not 0, and when the Cb CBF information is 1, it may indicate that the current block includes a Cb component whose transform coefficient level is not 0.
[0243] Generally, when the CBF information of the current transform block is 1, the transform coefficient level may be obtained from the bitstream, and the decoder 1720 may reconstruct the residual samples of the luminance component by using the obtained transform coefficient level.
[0244] The video decoding apparatus 1700 according to an embodiment may obtain transform coefficient levels of the Cb component and transform coefficient levels of the Cr component from a bitstream, respectively, or obtain one chrominance transform coefficient level from a bitstream to reconstruct residual samples of the Cb component and residual samples of the Cr component.
[0245] Hereinafter, an embodiment using chroma joint residual samples as a type of chroma transform coefficient level will be described.
[0246] The obtainer 1710 according to an embodiment may obtain the chroma joint residual sample of the current block from the bitstream. The chroma joint residual sample of the current block may be a sample value determined by using the residual sample value of the Cb component of the current block and the residual sample value of the Cr component of the current block. Therefore, only one chroma sample value may be obtained from the bitstream to represent the residual sample value of the Cb component and the residual sample value of the Cr component corresponding to the residual sample value of the Cb component. When the size of the current block is a luma 8×8 block and a chroma block 4×4, a total of 16 chroma joint residual samples may be obtained from the bitstream.
[0247] The decoder 1720 according to an embodiment may determine the weight of the residual sample of the Cr component and the weight 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. The decoder 1720 may reconstruct the residual sample of the Cr component by using the chrominance joint residual sample of the current block and the weight of the residual sample of the Cr component. Similarly, the decoder 1720 may reconstruct the residual sample of the Cb component by using the chrominance joint residual sample of the current block and the weight of the residual sample of the Cb component.
[0248] First, the obtainer 1710 according to an embodiment may obtain chroma joint information indicating whether only one chroma sample value is encoded to represent a residual sample value of a Cb component and a residual sample value of a Cr component corresponding to the residual sample value of the Cb component from a bitstream.
[0249] For example, when the chroma joint information indicates 1, it can be interpreted as encoding one chroma sample in the current block. In this case, the obtainer 1710 can obtain the chroma sample value from the bitstream, and the decoder 1720 can reconstruct the residual sample value of the Cb component and the residual sample value of the Cr component corresponding to the residual sample value of the Cb component by using the obtained chroma sample value. In this case, the decoder 1720 can determine the weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component based on the prediction type of the coding unit, the CBF information of the Cr component, and the CBF information of the Cb component. More specifically, when the chroma joint information indicates that the chroma sample is encoded, the decoder 1720 according to an embodiment can determine the weight of the residual sample of the Cr component and the weight 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.
[0250] According to an embodiment, when the prediction type of the coding unit is the intra prediction mode, the decoder 1720 may select a joint mode from a plurality of joint modes based on the CrCBF information and the CbCBF information, and determine the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to the selected joint mode.
[0251] According to an embodiment, when the prediction type of the coding unit is the inter prediction mode, the decoder 1720 may determine the weight of the residual samples of the Cr component and the weight of the residual samples of the Cb component included in the allowed joint mode.
[0252] According to a combination of the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component determined according to the prediction type, the Cr CBF information, and the Cb CBF information, the decoder 1720 may reconstruct the residual samples of the Cr component by using the chrominance joint residual samples of the current block and the weights of the residual samples of the Cr component, and may reconstruct the residual samples of the Cb component by using the chrominance joint residual samples of the current block and the weights of the residual samples of the Cb component.
[0253] According to an embodiment, when the chrominance joint information indicates 0, the obtainer 1710 may obtain the transform coefficient level of the Cb component and the transform coefficient level of the Cr component from the bitstream, respectively. The obtainer 1710 may obtain the transform coefficient level of the transform block of the Cb component from the bitstream, and the decoder 1720 may reconstruct the residual sample of the Cb component by using the obtained transform coefficient level. Similarly, the obtainer 1710 may obtain the transform coefficient level of the transform block of the Cr component from the bitstream, and the decoder 1720 may reconstruct the residual sample of the Cr component by using the obtained transform coefficient level.
[0254] According to an embodiment, the number of joint modes corresponding to the combination of the weight of the residual sample of the Cr component and the weight 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. When the prediction type of the coding unit is an intra prediction mode, the decoder 1720 according to the embodiment may select one joint mode from a plurality of joint modes based on the CBF information of the Cr component and the CBF information of the Cb component, and determine the weight of the residual sample of the Cr component and the weight of 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 decoder 1720 according to the embodiment may determine the weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component according to the allowed joint modes.
[0255] The decoder 1720 according to an embodiment may determine a joint mode including weights of residual samples of the Cr component and weights of residual samples of the Cb component based on chrominance joint information, CBF information of the Cr component, and CBF information of the Cb component, and determine a quantization parameter of the current block based on the joint mode.
[0256] The decoder 1720 according to an embodiment may determine a reference block in a reference picture by using a motion vector of the current block, and determine a prediction sample corresponding to the current block from among reference samples included in the reference block.
[0257] When the prediction mode of the current block is not the skip mode, the video decoding device 1700 may perform inverse quantization and inverse transformation on the transform coefficients of the current block obtained from the bitstream to obtain residual samples. The decoder 1720 may combine the prediction samples of the current block with the residual samples of the current block to determine the reconstructed samples of the current block.
[0258] In the following, reference will be made to Fig.18 A video decoding method for decoding residual samples of chroma components is described.
[0259] Fig.18 A flowchart of a video decoding method according to an embodiment is shown.
[0260] In operation 1810 , the obtainer 1710 may obtain information representing a prediction type of a coding unit including a current block from a bitstream.
[0261] In operation 1820, the obtainer 1710 may obtain Cr CBF information and Cb CBF information of the current block from a bitstream.
[0262] In operation 1830, the decoder 1720 may determine a weight of a residual sample of a Cr component and a weight of a residual sample of a Cb component based on the prediction type of the coding unit, the Cr CBF information, and the Cb CBF information.
[0263] The obtainer 1710 according to an embodiment may obtain chrominance joint information from a bitstream, the chrominance joint information indicating whether to encode chrominance samples to represent residual samples of a Cb component and residual samples of a Cr component corresponding to the residual samples of the Cb component in a current block. When the chrominance joint information indicates that the chrominance samples are encoded in the current block, the decoder 1720 may determine the weight of the residual samples of the Cr component and the weight 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.
[0264] For example, one of the combinations of the weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component may be selected based on the prediction type of the coding unit, the Cr CBF information, and the Cb CBF information.
[0265] More specifically, when the prediction type of the coding unit is an intra-frame prediction mode, the decoder 1720 may select a joint mode from a plurality of joint modes based on the Cr CBF information and the Cb CBF information, and determine the weight of the residual sample of the Cr component and the weight of 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-frame prediction mode, the decoder 1720 may determine the weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component corresponding to the allowed joint mode.
[0266] According to an embodiment, the weight of the residual samples of the Cr component may be -1 / 2, and the weight of the residual samples of the Cb component may be 1. According to another embodiment, the weight of the residual samples of the Cr component may be -1, and the weight of the residual samples of the Cb component may be 1. According to yet another embodiment, the weight of the residual samples of the Cr component may be 1, and the weight of the residual samples of the Cb component may be -1 / 2.
[0267] As another example, a combination of the weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component may be changed according to the joint mode. For example, three combinations of the weight of the residual sample of the Cr component and the weight 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 weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component may be determined according to a mode selected from among the three joint modes.
[0268] In operation 1840, the obtainer 1710 may obtain a chroma joint residual sample of the current block from a bitstream.
[0269] In operation 1850, the decoder 1720 may reconstruct the residual samples of the Cr component by using the chroma joint residual samples of the current block and the weights of the residual samples of the Cr component. The decoder 1720 may reconstruct the residual samples of the Cb component by using the chroma joint residual samples of the current block and the weights of the residual samples of the Cb component.
[0270] More specifically, the weighted sum result value obtained by applying the weight of the residual sample of the Cr component to the chrominance joint residual sample of the current block can be determined as the residual sample of the Cr component. Similarly, the weighted sum result value obtained by applying the weight of the residual sample of the Cb component to the chrominance joint residual sample of the current block can be determined as the residual sample of the Cb component.
[0271] The decoder 1720 according to an embodiment may reconstruct the current block by using the motion vector of the current block. The decoder 1720 may determine the reference block in the reference picture by using the motion vector of the current block, and may determine the prediction sample corresponding to the current block from the reference samples included in the reference block. In order to determine the reconstructed sample of the current block in a prediction mode other than the skip mode, the decoder 1720 may add the prediction sample of the current block to the residual sample of the current block. When the residual sample is not available, as in the skip mode, the reconstructed sample of the current block may be determined only from the prediction sample of the current block. By reconstructing the current block, the current picture including the current block may be reconstructed.
[0272] The decoder 1720 according to an embodiment may determine a joint mode using the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component based on the chrominance joint information, the Cr CBF information, and the Cb CBF information, and determine the quantization mode of the current block based on the determined joint mode. For example, when a specific joint mode is determined, the quantization parameters of the chrominance components may be determined separately. The decoder 1720 may perform inverse quantization on the transform coefficients of the chrominance joint residual samples of the current block by using the quantization parameters of the chrominance components. The decoder 1720 may reconstruct the chrominance joint residual samples by performing inverse quantization and inverse transformation on the transform coefficients, and reconstruct the residual samples of the Cr component and the residual samples of the Cb component by applying the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component to the chrominance joint residual samples.
[0273] In the following, reference will be made to Fig.19 A video encoding apparatus for dividing a picture into tiles and performing encoding on each tile is described.
[0274] Fig.19 A block diagram of a video encoding apparatus according to an embodiment is shown.
[0275] The video encoding device 1900 according to an embodiment may include a predictor 1910 and a residual encoder 1920 .
[0276] The video encoding apparatus 1900 may encode motion information determined by performing inter-frame prediction and output the encoded result in the form of a bitstream.
[0277] The video encoding device 1900 according to an embodiment may include a central processor for controlling the predictor 1910 and the residual encoder 1920. Alternatively, the predictor 1910 and the residual encoder 1920 may be operated by their own processors, and the processors may operate in an organized manner with each other so that the video encoding device 1900 operates as a whole. Alternatively, the predictor 1910 and the residual encoder 1920 may be controlled according to the control of an external processor of the video encoding device 1900.
[0278] The video encoding device 1900 may include one or more data storage devices storing input / output data of the predictor 1910 and the residual encoder 1920. The video encoding device 1900 may include a memory controller for controlling data input / output of the data storage device.
[0279] In order to encode an image, the video encoding device 1900 may perform an image encoding operation including prediction by operating in association with an internal video encoding processor or an external video encoding processor. The internal video encoding processor of the video encoding device 1900 according to an embodiment may perform basic image encoding operations in a manner that not only a separate processor but also an image encoding processing module included in a central processing device or a graphics processing device may perform basic image encoding operations.
[0280] The predictor 1910 according to an embodiment may determine a prediction type of a coding unit including a current block.
[0281] The predictor 1910 may determine the samples of the reference block indicated by the motion vector of the current block as the prediction samples of the current block. The residual encoder 1920 may determine the residual samples as the difference between the original samples and the prediction samples of the current block. The residual encoder 1920 may perform transformation and quantization on the residual samples of the current block to generate transformation coefficients, and encode the transformation coefficients.
[0282] However, the video encoding device 1900 according to an embodiment may determine the residual samples of the Cb component and the residual samples of the Cr component differently from the actual residual samples as the difference between the original samples and the predicted samples, and encode the residual samples of the Cb component and the residual samples of the Cr component. The residual encoder 1920 may encode the chrominance joint residual samples instead of the actual values of the residual samples of the Cb component and the actual values of the residual samples of the Cr component.
[0283] The residual encoder 1920 according to an embodiment may determine the Cr CBF information and the Cb CBF information of the current block. The residual encoder 1920 according to an embodiment may determine the weight of the residual samples of the Cr component and the weight 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.
[0284] The residual encoder 1920 according to an embodiment may generate chroma joint residual samples of the current block. Although the video encoding device 1900 knows the actual residual samples of the Cb component and the actual residual samples of the Cr component, for encoding efficiency, the video encoding device 1900 may determine the chroma joint residual samples to be encoded. Considering that the video decoding device 1700 will reconstruct the residual samples of the Cr component by using the chroma joint residual samples of the current block and the weights of the residual samples of the Cr component, and reconstruct the residual samples of the Cb component by using the chroma joint residual samples of the current block and the weights of the residual samples of the Cb component, the residual encoder 1920 may determine the chroma joint residual samples by using the actual values of the residual samples of the Cb component and the actual values of the residual samples of the Cr component.
[0285] In addition, the residual encoder 1920 according to an embodiment may determine the weight of the residual samples of the Cr component and the weight 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.
[0286] The residual encoder 1920 according to an embodiment may differently set the number of joint modes corresponding to a combination of the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component according to whether the prediction type of the coding unit is an intra prediction mode or an inter prediction mode.
[0287] When the prediction type of the coding unit is an intra-frame prediction mode, the residual encoder 1920 may select a joint mode from a plurality of joint modes based on the CBF information of the Cr component and the CBF information of the Cb component, and determine the weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component according to the selected joint mode. When the prediction type of the coding unit is an inter-frame prediction mode, the weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component may be determined according to the allowed joint mode.
[0288] In addition, the video encoding apparatus 1900 may generate chroma joint information indicating whether to encode chroma samples to represent residual samples of the Cb component and residual samples of the Cr component corresponding to the residual samples of the Cb component in the current block.
[0289] In the following, reference will be made to Fig. 20 A process of performing video encoding on residual samples of chrominance components in the video encoding apparatus 1900 is described.
[0290] Fig. 20 A flowchart of a video encoding method according to an embodiment is shown.
[0291] In operation 2010, the predictor 1910 may determine a prediction type of a coding unit including a current block. The video encoding device 1900 may encode prediction type information indicating whether a prediction type of a coding unit including a current block is an inter prediction mode or an intra prediction mode.
[0292] In operation 2020, the residual encoder 1920 may determine the Cr cbf information and the Cb cbf information of the current block. For example, the residual encoder 1920 may encode the Cr CBF information so as to indicate whether the current block includes a Cr component whose transform coefficient level is not 0. For example, when the current block does not include a Cr component whose transform coefficient level is not 0, the residual encoder 1920 may encode the Cr CBF information so that the Cr CBF information indicates 0. When the current block includes a Cr component whose transform coefficient level is not 0, the residual encoder 1920 may encode the Cr CBF information so that the Cr CBF information indicates 1. Similarly, the residual encoder 1920 may encode the Cb CBF information so as to indicate whether the current block includes a Cb component whose transform coefficient level is not 0. For example, when the current block does not include a Cb component whose transform coefficient level is not 0, the residual encoder 1920 may encode the CbCBF information so that the Cb CBF information indicates 0. When the current block includes a Cb component whose transform coefficient level is not 0, the residual encoder 1920 may encode the Cb CBF information so that the Cb CBF information indicates 1.
[0293] In operation 2030, the residual encoder 1920 may determine a weight of residual samples of the Cr component and a weight of residual samples of the Cb component based on the prediction type of the coding unit, the Cr CBF information, and the Cb CBF information.
[0294] According to an embodiment, the weight of the residual samples of the Cr component may be -1 / 2, and the weight of the residual samples of the Cb component may be 1. According to another embodiment, the weight of the residual samples of the Cr component may be -1, and the weight of the residual samples of the Cb component may be 1. According to yet another embodiment, the weight of the residual samples of the Cr component may be 1, and the weight of the residual samples of the Cb component may be -1 / 2.
[0295] When the prediction type of the coding unit is an intra-frame prediction mode, the residual encoder 1920 may select a joint mode from a plurality of joint modes based on the CBF information of the Cr component and the CBF information of the Cb component, and determine the weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component according to the selected joint mode. When the prediction type of the coding unit is an inter-frame prediction mode, the weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component may be determined according to the allowed joint mode.
[0296] As another example, a plurality of combinations of weights of residual samples of the Cr component and weights of residual samples of the Cb component may be provided, and a combination of the weight combinations may be selected for each of a plurality of joint modes. For example, as a combination of weights of residual samples of the Cr component and weights of residual samples of the Cb component, a combination of {-1 / 2, 1}, {-1, 1}, and {1, -1 / 2} may be selected for each of the joint modes. The weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component may be determined according to the mode selected from the three joint modes.
[0297] In addition, as a detailed example, when the prediction type of the coding unit is an intra-frame prediction mode, the residual encoder 1920 may select a joint mode from a plurality of joint modes based on the Cr CBF information and the Cb CBF information, and determine the weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component according to the selected joint mode. In addition, when the prediction type of the coding unit is an inter-frame prediction mode, the residual encoder 1920 may determine the weight of the residual sample of the Cr component and the weight of the residual sample of the Cb component according to the allowed joint mode.
[0298] In operation 2040, the residual encoder 1920 may generate a chroma joint residual sample of the current block. The residual encoder 1920 according to an embodiment may encode the 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. When the size of the current block is a luma 8×8 block and a chroma block 4×4, a total of 16 chroma joint residual samples may be obtained from the bitstream.
[0299] Considering that the video decoding device 1700 will reconstruct the residual samples of the Cr component by using the chroma joint residual samples of the current block and the weights of the residual samples of the Cr component, and will reconstruct the residual samples of the Cb component by using the chroma joint residual samples of the current block and the weights of the residual samples of the Cb component, the residual encoder 1920 can determine the chroma joint residual samples by using the actual values of the residual samples of the Cb component and the actual values of the residual samples of the Cr component.
[0300] The video encoding apparatus 1900 may generate chroma joint information indicating whether the chroma samples are encoded to represent the residual samples of the Cb component in the current block and the residual samples of the Cr component corresponding to the residual samples of the Cb component. When the chroma samples are encoded to represent the residual samples of the Cb component in the current block and the residual samples of the Cr component corresponding to the residual samples of the Cb component, operations 2030 and 2040 may be performed.
[0301] The residual encoder 1920 according to an embodiment may determine a joint mode using the weights of the residual samples of the Cr component and the weights of the residual samples of the Cb component based on the chrominance joint information, the Cr CBF information, and the Cb CBF information, and determine the quantization parameter of the current block based on the determined joint mode. For example, when a specific joint mode is determined, the quantization parameters of the chrominance components may be determined separately. The residual encoder 1920 may perform quantization on the transform coefficients of the chrominance joint residual samples by using the quantization parameters. The quantized transform coefficients may be encoded as syntax elements referred to as transform coefficient levels.
[0302] In the following, reference will be made to Fig.21 and Fig. 22 Described is a process of determining chrominance joint residual samples by using residual samples of Cr components and residual samples of Cb components and reconstructing residual samples of Cr components and residual samples of Cb components by using the chrominance joint residual samples.
[0303] Fig.21 A graph showing the relationship between a Cb component, a Cr component, and a chroma encoding component according to an embodiment is shown.
[0304] The graph 2100 shows 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 an embodiment may determine the average value of the actual value 2110 of the residual sample of the Cb component and the value 2130 obtained by multiplying the actual value 2120 of the residual sample of the Cr component by -1 as the chroma joint residual sample 2140.
[0305] The curve graph 2100 shows 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 decoding apparatus 1700 .
[0306] The video decoding apparatus 1700 may determine the weight of the residual sample of the Cb component to be 1, and determine the weight of the residual sample of the Cr component to be −1.
[0307] Therefore, when the obtainer 1710 obtains the chroma joint residual sample 2140, the decoder 1720 can determine the same value as the chroma joint residual sample 2140 as the reconstructed value of the residual sample 2160 of the Cb component, and determine the value generated by multiplying the chroma joint residual sample 2140 by -1 as the reconstructed value of the residual sample 2170 of the Cr component.
[0308] Fig. 22 denoted the relationship among the Cb component, the Cr component, and the chroma encoding component according to an embodiment.
[0309] exist Fig. 22 In the relationship shown, Cb represents the reconstructed value of the residual sample of the Cb component, Cr represents the reconstructed value of the residual sample of the Cr component, jointCb represents the chrominance joint residual sample, and weightTable(CorrIdx) represents the weight of the residual sample of the Cr component.
[0310] According to the first relationship 2201, since the weight of the residual sample of the Cb component is 1, the same value as the chrominance joint residual sample jointCb can be determined as the reconstructed value Cb of the residual sample of the Cb component.
[0311] According to the second relationship 2202, since the weight of the residual sample of the Cr component is weightTable(CorrIdx), the weighted sum generated by applying the weight to the chrominance joint residual sample jointCb can be determined as the reconstructed value Cr of the residual sample of the Cr component. weightTable(CorrIdx) can be a table including a plurality of weights, and the weight determined from the plurality of weights according to the index corrldx can be determined as the weight of the residual sample of the Cr component. In this case, the weight of the residual sample of the Cb component can be considered to be fixed to 1.
[0312] Fig.21 and Fig. 22 The weights illustrated in are embodiments, and the joint modes allowed in the embodiments are not limited thereto. For example, weightTable may be {-1, 1, -2, -1 / 2, -4, 1 / 4, ...}. In this case, the weight of the residual sample of the Cb component may be fixed to 1, and the weight of the residual sample of the Cr component may be determined to be one of {-1, 1, -2, -1 / 2, -4, 1 / 4, ...}. As another example, the joint mode of the Cb and Cr residual samples may be set to {(1, ±1 / 2), (1, ±1), (±1 / 2, 1)}, and one of the joint modes may be determined according to the prediction type, Cb CBF, and Cr CBF.
[0313] Fig.23 A transform unit syntax according to an embodiment is shown.
[0314] The video decoding device 1700 may obtain the syntax elements tu_cbf_cb, tu_cbf_cr, and tu_joint_cbcr_residual_flag from the transform unit syntax 2300 .
[0315] tu_cbf_cb may be a syntax element corresponding to Cb CBF information, and indicates whether the current transform block includes a Cb component whose transform coefficient level is not 0. tu_cbf_cr may be a syntax element corresponding to Cr CBF information, and indicates whether the current transform block includes a Cr component whose transform coefficient level is not 0. tu_joint_cbcr_residual_flag may be a syntax element corresponding to chroma joint information, and indicates whether chroma samples are encoded to represent residual samples of the Cb component in the current transform block and residual samples of the Cr component corresponding to the residual samples of the Cb component.
[0316] The video decoding apparatus 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 is 1, this indicates that a chroma joint method is allowed in a block included in the current sequence, in which chroma samples are encoded to represent a residual sample of a Cb component and a residual sample of a Cr component corresponding to the residual sample of the Cb component.
[0317] Therefore, when the chroma joint method is enabled in the current sequence by sps_joint_cbcr_enabled_flag (sps_joint_cbcr_enabled_flag&&), the prediction type of the coding unit including the current transform block is the intra prediction type ((CuPredMode[chType][x0][y0]==MODE_INTRA)&&), and the Cr CBF information or the Cb CBF information is 1 (tu_cbf_cb[xC][yC]||tu_cbf_cr[xC][yC]), the video decoding device 1700 can first obtain tu_joint_cbcr_residual_flag (ie, chroma joint information). In addition, when the prediction type of the coding unit including the current transform block is an inter prediction type, the video decoding device 1700 can obtain tu_joint_cbcr_residual_flag, that is, chroma joint information (tu_cbf_cb[xC][yC]&&tu_cbf_cr[xC][yC]) only when both Cr CBF information and Cb CBF information are 1.
[0318] Therefore, when the prediction type of the coding unit is an intra-frame prediction type, a Cr component with a transform coefficient level of 1 exists in the current block, or a Cb component with a transform coefficient level of 1 exists in the current block, it can be determined by the chrominance joint information whether to encode the chrominance samples to represent the residual samples of the Cb component and the residual samples of the Cr component corresponding to the residual samples of the Cb component. Therefore, when the prediction type of the coding unit is an inter-frame prediction type, a Cr component with a transform coefficient level of 1 exists in the current block, and a Cb component with a transform coefficient level of 1 exists in the current block, it can be determined by the chrominance joint information whether to encode the chrominance samples to represent the residual samples of the Cb component and the residual samples of the Cr component corresponding to the residual samples of the Cb component. When the obtained chrominance joint information indicates 0, this means that the residual samples of the Cb component and the residual samples of the Cr component corresponding to the residual samples of the Cb component need to be obtained from the bit stream, respectively. In addition, when the chroma joint information indicates 1, this means that chroma samples are obtained from a bitstream, and residual samples of a Cb component and residual samples of a Cr component corresponding to the residual samples of the Cb component are reconstructed from the chroma samples.
[0319] Fig.24 denoted the relationship among the Cb component, the Cr component, and the chroma coding component with respect to the Cb CBF value and the Cr CBF according to an embodiment.
[0320] As above Fig.23 As described above, after obtaining the Cb CBF information tu_cbf_cb and the Cr CBF information tu_cbf_cr, weights for determining the reconstructed values resCb of the residual samples of the Cb component and the reconstructed values resCr of the residual samples of the Cr component may be determined according to the Cb CBF information and the Cr CBF information.
[0321] For example, when tu_cbf_cb is 1 and tu_cbf_cr is 0, the reconstructed value resCb of the residual sample of the Cb component may be determined as the same value as the chroma joint residual sample resJointC, and the reconstructed value resCr of the residual sample of the Cr component may be determined as a value obtained by multiplying the chroma joint residual sample resJointC by ±1 / 2. The sign of the reconstructed value resCr of the residual sample of the Cr component may be determined based on the value of CSign, where CSign may be a sign value signaled in the bitstream. In this case, since the weight of the Cb component is 1 and the weight of the Cr component is ±1 / 2, the joint mode index may be 0.
[0322] For example, when tu_cbf_cb is 1 and tu_cbf_cr is 1, the reconstructed value resCb of the residual sample of the Cb component may be determined as the same value as the chroma joint residual sample resJointC, and the reconstructed value resCr of the residual sample of the Cr component may be determined as a value obtained by multiplying the chroma joint residual sample resJointC by ± 1. In this case, since the weight of the Cb component is 1 and the weight of the Cr component is ± 1, the joint mode index may be 2.
[0323] For example, when tu_cbf_cb is 0 and tu_cbf_cr is 1, the reconstructed value resCb of the residual sample of the Cb component may be determined as a value obtained by multiplying the chroma joint residual sample resJointC by ±1 / 2, and the reconstructed value resCr of the residual sample of the Cr component may be determined as the same value as the chroma joint residual sample resJointC. In this case, since the weight of the Cb component is ±1 / 2 and the weight of the Cr component is 1, the joint mode index may be 3.
[0324] When the prediction type of the coding unit is an intra prediction mode, all joint mode indexes 1, 2, and 3 are possible. That is, when the prediction type of the coding unit is an intra prediction mode, the weight of the Cb component and the weight of the Cr component may be determined separately according to the joint mode index.
[0325] However, when the prediction type of the coding unit is the inter prediction mode, only the joint mode index 2 may be allowed. Therefore, when the prediction type of the coding unit is the inter prediction mode, the chroma joint method may be allowed only when the joint mode index is 2 (i.e., when tu_cbf_cb is 1 and tu_cbf_cr is 1, where 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).
[0326] The embodiments discussed above may relate to a method in which the video encoding device 1900 encodes chroma joint residual samples instead of actual values of residual samples of the Cb component and actual values of residual samples of the Cr component, and the video decoding device 1700 obtains the chroma joint residual samples from a bitstream to determine reconstructed values of residual samples of the Cb component and reconstructed values of residual samples of the Cr component from the chroma joint residual samples.
[0327] By encoding the residual samples of the Cb component and the residual samples of the Cr component as joint residual samples, bit rate can be saved compared to separately encoding the residual samples of the Cb component and the residual samples of the Cr component. According to the relationship used by the video encoding device 1900 to determine the chrominance joint residual samples by combining the actual values of the residual samples of the Cb component and the actual values of the residual samples of the Cr component and whether the video decoding device 1700 reconstructs the residual samples of the Cb component and the residual samples of the Cr component by using the joint residual samples, the encoding efficiency can be further improved.
[0328] Hereinafter, as modifications of the embodiments discussed above, various embodiments will be proposed in which the video encoding device 1900 encodes chroma joint sample values instead of actual values of residual samples of the Cb component and actual values of residual samples of the Cr component, and the video decoding device 1700 determines reconstructed values of residual samples of the Cb component and reconstructed values of residual samples of the Cr component by using the chroma joint sample values obtained from a bitstream.
[0329] First, the location where the chrominance joint information is obtained may be changed variously.
[0330] In accordance with Fig.23 In the embodiment, the luminance CBF information, the Cb CBF information and the Cr CBF information may be obtained from the bitstream, and then, the chrominance joint information may be obtained from the bitstream according to the Cb CBF information and the Cr CBF information.
[0331] According to another embodiment, the luminance CBF information and the Cb CBF information may be first obtained. Then, when the Cb CBF information is 1, the chrominance joint information may be obtained, and when the Cb CBF information is 0 and the chrominance joint information is 0, the Cr CBF information may be obtained. In this case, the Cb CBF information may be decoded into a binary bit string configured with one binary bit, the chrominance joint information may be decoded into a binary bit string configured with two binary bits, and the Cr CBF information may be decoded into a binary bit string configured with two or three binary bits.
[0332] According to another embodiment, in order to reduce the number of times the joint chrominance information is encoded, the joint chrominance information may be decoded earlier than the Cb CBF information. More specifically, the luminance CBF and the chrominance joint information may be obtained, and when the chrominance 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, when the chrominance joint information is 0, the Cb CBF information and the Cr CBF information may be obtained separately from the bit stream. In this case, the chrominance joint information may be decoded as a binary bit string configured with one binary bit, the Cb CBF information may be decoded as a binary bit string configured with one or two binary bits, and the Cr CBF information may be decoded as a binary bit string configured with one or two binary bits.
[0333] In the following, a context modeling method for chromaticity joint information will be described.
[0334] According to an embodiment, in order to obtain chrominance joint information, entropy decoding may be performed based on a CABAC decoding method. In this case, a context index may be determined to decode the chrominance joint information.
[0335] For example, a context index for decoding chroma joint information may be determined based on whether a prediction type of a coding unit including a block is an intra prediction mode or an inter prediction mode.
[0336] As another example, the context index for decoding the chrominance joint information may be determined based on the size of the block. As a detailed example, when the width of the block is W and the height of the block is H, log2W may be a value obtained by applying log2 to W, and log2H may be a value obtained by applying log2 to H. The context index may be determined based on the smaller of log2W and log2H. As another example, the context index may be determined based on the larger of log2W and log2H. As another example, the context index may be determined based on the average of log2W and log2H. As another example, the context index may be determined based on the sum of log2W and log2H.
[0337] As another example, a context index for decoding chroma joint information may be determined based on a ratio of a height and a width of a block.
[0338] 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.
[0339] 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.
[0340] As another example, the context index for decoding the chrominance joint information of the current block may be determined based on the encoding information of the neighboring block. As a detailed example, the context index for decoding the chrominance joint information of the current block may be determined based on the CBF information of the neighboring block. As another example, the context index for decoding the chrominance joint information of the current block may be determined based on whether the prediction type of the neighboring block is an intra-frame prediction mode or an inter-frame prediction mode. As another example, the context index for decoding the chrominance joint information of the current block may be determined based on the transform type of the neighboring block.
[0341] As another example, the context index for decoding the chrominance joint information of the current block may be determined based on the transform type of the current block. For example, the context index 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 transform type according to a block shape.
[0342] As another example, a context index for decoding chrominance joint information of a current block may be determined based on a predefined coding mode. As a detailed example, a context index may be determined based on whether the coding mode of the current block is an MHintra mode, a TriangleIntra mode, an affine mode, an intra BC (IBC) mode, a symmetric motion vector difference (SMVD) mode, a merged motion vector difference (MMVD) mode, a decoder-side Motion Vector Refinement (DMVD) mode, a cross-component linear model (CCLM) mode, a position dependent (intra) prediction combination (PDPC) mode, a multi-reference line intra prediction (MultiRefIntra) mode, an intraSubPartition mode, an inloop reshaper mode, an overlapped block motion compensation (OBMC) mode, a transformSkip mode, and a sub-block transform (SBT) mode.
[0343] As another example, a context index for decoding chroma joint information of the current block may be determined based on a multiple transform selection (MTS) index of the current block.
[0344] As another example, a context index for decoding chroma joint information of the current block may be determined based on a combination of two or more conditions among the various conditions proposed above.
[0345] Hereinafter, various embodiments will be described regarding a condition under which a chroma joint method of encoding chroma samples to represent residual samples of a Cb component and residual samples of a Cr component corresponding to the residual samples of the Cb component in a block is applicable.
[0346] When the prediction type of the coding unit is the intra prediction mode or the inter prediction mode, the video decoding device 1700 according to an embodiment may determine whether to apply the chroma joint method without any restriction on the block size.
[0347] As another example, whether to apply the chromaticity joint method may be determined based on the size of the block. As a detailed example, when the width of the block is W and the height of the block is H, log2W may be a value obtained by applying log2 to W, and log2H may be a value obtained by applying log2 to H. Whether to apply the chromaticity joint method may be determined based on the smaller of log2W and log2H. As another example, whether to apply the chromaticity joint method may be determined based on the larger of log2W and log2H. As another example, whether to apply the chromaticity joint method may be determined based on the average of log2W and log2H. As another example, whether to apply the chromaticity joint method may be determined based on the sum of log2W and log2H.
[0348] As another example, whether to apply the chrominance joint method may be determined based on the shape of the block.
[0349] As another example, in the case of a block in an inter prediction mode, whether to apply the chroma joint method may be determined based on whether the prediction direction is a unidirectional prediction type or a bidirectional prediction type.
[0350] As another example, whether to apply the chroma joint method may be determined based on a ratio of a height and a width of a block.
[0351] As another example, whether to apply the chroma joint method may be determined based on the transform type of the current block. For example, whether to apply the chroma joint method 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 transform type according to a block shape.
[0352] As another example, whether to apply the chroma joint method may be determined based on the number of transform coefficients of the Cb component or the number of transform coefficients of the Cr component.
[0353] As another example, whether to apply the chroma joint method can be determined based on a predefined coding mode. As a detailed example, whether to apply the chroma joint method can be determined based on which coding mode of the current block is 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 improvement (DMVD) mode, cross component linear model (CCLM) mode, position non-independent (intra) prediction combination (PDPC) mode, multi-reference line intra prediction (MultiRefIntra) mode, intraSubPartition mode, in-loop shaper mode, overlapped block motion compensation (OBMC) mode, transformSkip mode and sub-block transform (SBT) mode.
[0354] As another example, whether to apply the chroma joint method may be determined at a slice level. According to a flag obtained from a slice header, the chroma joint method may be allowed to be applied to blocks included in the current slice.
[0355] As another example, whether to apply the chroma joint method may be determined in a temporal level.
[0356] As another example, whether to apply the chroma joint method may be determined based on whether the current slice is a reference slice or a non-reference slice.
[0357] As another example, information indicating whether the chroma joint method is applied may be obtained for each subblock of the current block. Therefore, it may be determined whether the chroma joint method is applied for each subblock of the transform block.
[0358] As another example, whether to apply the chrominance joint method may be determined based on a combination of two or more of the above conditions.
[0359] Detailed conditional statements for expressing the above-mentioned various conditions for determining whether to apply the chromaticity joint method may be as follows.
[0360] - If only intraTU
[0361] -if only interTU||only inter_slice
[0362] - if intraTU&&size>threshold||interTU&&size>threshold
[0363] -if intraTU&&size<threshold||interTU&&size<threshold
[0364] - If tu_width != tu_height
[0365] - if tu_width == tu_height
[0366] -If ratio(tu_width,tu_height)>threshold
[0367] -if interTU&&predType==UniPred
[0368] -if! (interTU&&predType==BiPred)
[0369] - If TU is not in transform skip mode
[0370] - If the TU is in transform skip mode
[0371] - If no secondary transformation is applied
[0372] - If SBT is not applied
[0373] - If SBT is applied
[0374] - If the number of coefficients of Cb < threshold
[0375] - If the number of coefficients of Cb > threshold
[0376] - If the number of coefficients of Y < threshold
[0377] - If the number of coefficients of Y > threshold
[0378] -If CBF(cb)==0&CBF(cr)==1||CBF(cb)==1&CBF(cr)==0
[0379] Hereinafter, a method of determining chroma joint residual samples in the video encoding device 1900 according to another embodiment and a process of reconstructing residual samples of a Cb component and residual samples of a Cr component by using the chroma joint residual samples in the video decoding device 1700 will be described.
[0380] According to another embodiment, the video encoding apparatus 1900 may determine the chroma joint residual sample resJoint by 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, as follows:
[0381] resJoint=(resCb*3-resCr) / 4
[0382] resJoint=(resCb-resCr*3) / 4
[0383] The video encoding apparatus 1900 may encode a value having a lower RD cost of the two values resJoint as a chroma joint residual sample.
[0384] According to another embodiment, the video decoding apparatus 1700 may determine a method of reconstructing residual samples of the Cr component based on reconstructed values of samples of the luma component or reconstructed values of samples of the Cb component.
[0385] As another example, the video decoding apparatus 1700 may determine a method of reconstructing the residual samples of the Cr component based on the reconstructed values of the residual samples of the luma component or the reconstructed values of the residual samples of the Cb component.
[0386] As another example, the video decoding device 1700 may determine a method of reconstructing residual samples of the Cr component based on detail information of the luminance component or detail information of the Cb component. For example, the detail information may include at least one of the amplitude, average value, discreteness, gradient, high frequency component, and low frequency component of the luminance component or the Cb component.
[0387] As another example, the video decoding device 1700 may determine a method for reconstructing residual samples of the Cr component based on the content characteristics of each sub-block for each sub-block of the current block. For example, the content of each sub-block may be a reconstructed value of a sample of a luminance component or a Cb component of the corresponding sub-block, or a reconstructed value of a residual sample of a luminance component or a Cb component. The content characteristics of each sub-block may include at least one of an amplitude, an average value, a discreteness, a gradient, a high-frequency component, and a low-frequency component of the corresponding sub-block.
[0388] As another example, the video encoding device 1900 may encode the chroma joint residual sample and the difference of the chroma joint residual sample. The difference of the chroma joint residual sample may represent the difference between the chroma joint residual sample and the residual sample of the Cr component. The video encoding device 1900 may encode a flag indicating whether the residual sample of the Cr component is encoded. In this case, the video decoding device 1700 may obtain the flag from the bitstream, and when it is determined by the flag that the residual sample of the Cr component is not encoded, the video decoding device 1700 may obtain the chroma joint residual sample jointCb and the difference diff_jointCb_Cr of the chroma joint residual sample jointCb from the bitstream. The video decoding device 1700 may determine the reconstructed value Cb of the residual sample of the Cb component and the reconstructed value Cr of the residual sample of the Cr component according to the following equation (Cb=2*jointCb+Cr, Cr=jointCb-diff_jointCb_Cr).
[0389] As another example, the video encoding device 1900 may encode the average value of the residual samples of the Cb component and the residual samples of the Cr component, and encode the 1 / 2 value of the difference between the residual samples of the Cb component and the residual samples of the Cr component. In addition, the video encoding device 1900 may encode a flag indicating whether the residual samples of the Cr component are encoded. In this case, the video decoding device 1700 may obtain the flag from the bitstream, and when it is determined by the flag that the residual samples of the Cr component are not encoded, the video decoding device 1700 may obtain the 1 / 2 value diff_CbCr of the average value ave_CbCr and the difference diff_jointCb_Cr from the bitstream. The video decoding device 1700 may determine the reconstructed value Cb of the residual sample of the Cb component and the reconstructed value Cr of the residual sample of the Cr component according to the following equation (Cb=ave_CbCr+diff_CbCr, Cr=ave_CbCr-diff_CbCr). In this case, the value ave_CbCr may be the same as Cb and -Cr, and the combination of the weight of the Cb component and the weight of the Cr component is not limited to (1, 1), (1, -1).
[0390] As another example, the video encoding device 1900 may encode the chroma joint residual sample having the same value as the residual sample of the Cb component. In addition, the video encoding device 1900 may encode the chroma joint weight index. In this case, the video decoding device 1700 may obtain the chroma joint residual sample from the bitstream and reconstruct the residual sample of the Cb component having the same value as the chroma joint residual sample. In addition, the video decoding device 1700 may obtain the chroma joint weight index from the bitstream and obtain the chroma joint weight indicated by the weight index from the weight table. The video decoding device 1700 may determine the value generated by multiplying the chroma joint weight by the chroma joint residual sample as the reconstructed value of the residual sample of the Cr component. In this case, the weight table may include {-1, 1, -2, -1 / 2, -4, 1 / 4...}, and each chroma joint weight index increasing from 0 may indicate the weight in the weight table. That is, when the chroma joint weight index obtained from the bitstream is 0, a value obtained by multiplying the chroma joint residual sample by -1 may be determined as a reconstructed value of the residual sample of the Cr component.
[0391] As another example, the video encoding device 1900 may encode a chroma joint residual sample having the same value as the residual sample of the Cr component. In addition, the video encoding device 1900 may encode a chroma joint weight index. In this case, the video decoding device 1700 may obtain the chroma joint residual sample from the bitstream and reconstruct the residual sample of the Cr component having the same value as the chroma joint residual sample. In addition, the video decoding device 1700 may obtain the chroma joint weight index from the bitstream and obtain the chroma joint weight indicated by the weight index from the weight table. The video decoding device 1700 may determine the value generated by multiplying the chroma joint weight by the chroma joint residual sample as the reconstructed value of the residual sample of the Cb component. In this case, the weight table may include {-1, 1, -2, -4...}, and each chroma joint weight index increasing from 0 may indicate a weight in the weight table. That is, when the chroma joint weight index obtained from the bitstream is 0, a value obtained by multiplying the chroma joint residual sample by -1 may be determined as a reconstructed value of the residual sample of the Cb component. In general, since the sample of the Cr component may be smaller than the sample of the Cb component, the absolute value of the chroma joint weight included in the weight table may be greater than or equal to 1.
[0392] In the above-mentioned embodiments, a method for encoding and decoding chroma residual samples in the spatial domain has been described. Hereinafter, a method for encoding and decoding chroma transform coefficients in the transform domain will be described. The transform coefficients of the Cr component may be encoded and decoded by using some of the transform coefficients of the Cb component.
[0393] The video encoding device 1900 according to an embodiment may encode the transform coefficient of the Cb component without encoding the transform coefficient of the Cr component. The video decoding device 1700 may decode the transform coefficient of the Cb component obtained from the bitstream to determine the reconstructed value of the transform coefficient of the Cb component. The video decoding device 1700 may reconstruct the transform coefficient of the Cr component by using the low-frequency component of the transform coefficient of the Cb component. As another example, a value obtained by multiplying the transform coefficient of the Cb component by a preset weight may be determined as the reconstructed value of the transform coefficient of the Cr component.
[0394] The video encoding device 1900 according to another embodiment may encode the transform coefficient of the Cb component and the residual component of the Cb component, but not encode the transform coefficient and the residual component of the Cr component and the Cr CBF information. The video decoding device 1700 may decode the transform coefficient of the Cb component obtained from the bitstream to determine the reconstructed value of the transform coefficient of the Cb component. The video decoding device 1700 may reconstruct the transform coefficient of the Cr component by using the low-frequency component of the transform coefficient of the Cb component. As another example, a value obtained by multiplying the transform coefficient of the Cb component by a preset weight may be determined as the reconstructed value of the transform coefficient of the Cr component.
[0395] Hereinafter, various embodiments of determining a quantization parameter for a chroma component by using a delta quantization parameter dQP for a Cb component when a chroma joint method for a preset joint mode may be performed will be described.
[0396] According to an embodiment, when dQP is 2, the video decoding device 1700 may determine a value obtained by subtracting dQP from the chroma joint quantization parameter QPcb for the Cb component as the chroma joint quantization parameter QPjoint. For example, when the joint mode index is 1, the video decoding device 1700 may perform inverse quantization on the transform coefficient of the Cb component and the transform coefficient of the Cr component by using the chroma joint quantization parameter QPjoint.
[0397] As another example, the dQP of the chroma component may be obtained through the transform block syntax. Therefore, the video decoding apparatus 1700 may determine the dQP of the Cb component and the Cr component included in the current transform unit by obtaining the dQP of the chroma component of each transform unit.
[0398] As another example, the dQP of the chroma component may be obtained through the prediction block syntax. Therefore, the video decoding apparatus 1700 may determine the dQPs of the Cb component and the Cr component included in the current prediction unit by obtaining the dQP of the chroma component of each prediction unit.
[0399] As another example, the dQP of the chroma component may be obtained through the coding block syntax. Therefore, the video decoding apparatus 1700 may determine the dQPs of the Cb and Cr components included in the current coding unit by obtaining the dQP of the chroma component of each coding unit.
[0400] As another example, the dQP of the chroma component may be obtained through the maximum coding block syntax. Therefore, the video decoding apparatus 1700 may determine the dQPs of the Cb and Cr components included in the current maximum coding unit by obtaining the dQP of the chroma component of each maximum coding unit.
[0401] As another example, the dQP of the chroma component may be obtained through the slice header syntax. Therefore, the video decoding apparatus 1700 may determine the dQPs of the Cb component and the Cr component included in the current slice by obtaining the dQP of the chroma component of each slice.
[0402] As another example, the dQP of the chroma component may be obtained for each temporal layer.Therefore, the video decoding apparatus 1700 may determine the dQPs of the Cb component and the Cr component included in the current temporal layer.
[0403] For example, the dQP of the chroma component may be the difference between the QP of the Cb component and the QP of the luma component. As another example, the QP of the chroma component may be the difference between the QP of the chroma component and a default QP.
[0404] As another example, the video decoding device 1700 may determine the dQP of the chroma component based on the prediction type of the coding unit. For example, when the prediction type of the coding unit is an intra-frame prediction mode, the dQP of the chroma component may be determined to be 2, and when the prediction type of the coding unit is not an intra-frame prediction mode, the dQP of the chroma component may be determined to be 1.
[0405] As another example, the video decoding device 1700 may determine the dQP of the chroma component based on the block size. For example, when the block size is greater than or equal to 16×16, the dQP of the chroma component may be determined to be 1, and when the block size is less than 16×16, the dQP of the chroma component may be determined to be 2.
[0406] As another example, the video decoding device 1700 may determine the dQP of the chroma component based on a preset coding mode of the block. As a detailed example, the coding mode of the current block may be at least one of the following: 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 improvement (DMVD) mode, cross component linear model (CCLM) mode, position non-independent (intra) prediction combination (PDPC) mode, multi-reference line intra prediction (MultiRefIntra) mode, intraSubPartition mode, in-loop shaper mode, overlapped block motion compensation (OBMC) mode, transformSkip mode, and sub-block transform (SBT) mode. For example, when the index of the preset coding mode of the current block is 1, the dQP of the chroma component may be determined to be 1, and when the index is not 1, the dQP of the chroma component may be determined to be 2.
[0407] As another example, the video decoding device 1700 may determine the dQP of the chroma component based on the identification information of the current temporal layer. For example, when the identification information of the temporal layer including the current block is greater than 2, the dQP of the chroma component may be determined to be 0, and when the identification information is less than or equal to 2, the dQP of the chroma component may be determined to be 2. As another example, when the identification information of the temporal layer including the current block is 0, the dQP of the chroma component may be determined to be 2, and when the identification information is not 0 and less than 3, the dQP of the chroma component may be determined to be 1. When the identification information is greater than or equal to 3, the dQP of the chroma component may be determined to be 0.
[0408] As another example, the video decoding apparatus 1700 may determine the dQP of the chroma component of the current block based on the quantization parameter of the neighboring block or the quantization parameter difference value of the neighboring block.
[0409] Hereinafter, an embodiment of a method for selecting a case of using a plurality of joint modes and a case of using a joint mode in a chroma joint method according to a preset condition will be described.
[0410] The video encoding device 1900 may encode the chroma joint residual sample C according to the chroma joint mode, or encode the first chroma joint residual sample C1 and the second chroma joint residual sample C2. In the first mode and the third mode, the chroma joint residual sample C may be determined and the chroma joint residual sample C may be encoded. The video encoding device 1900 may assume that a value obtained by multiplying the actual value of the residual sample of the Cb component by -1 is a residual sample of the Cr component, determine the same value as the residual sample of the Cb component as the chroma joint residual sample C, and encode the chroma joint residual sample C. In the second mode, the first chroma joint residual sample C1 may be determined as 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 as an average 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 (ie, c2=(cb-cr) / 2).
[0411] For example, the video decoding device 1700 may enable two chroma joint modes. In the first mode, the residual sample of the Cb component may be reconstructed as the same value as the chroma joint residual sample, and the residual sample of the Cr component may be reconstructed as 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 reconstructed as a value obtained by summing the first chroma joint residual sample and the second chroma joint residual sample, and the residual sample of the Cr component may be reconstructed as a value obtained by subtracting the second chroma joint residual sample from the first chroma joint residual sample (cb=c1+c2, cr=c1-c2). When the prediction type of the coding unit is the intra prediction mode, the video decoding device 1700 may obtain the chroma joint mode index from the bitstream, and reconstruct the residual samples of the Cb component and the residual samples of the Cr component according to the method indicated by the mode index in the first mode and the second mode as the chroma joint method. When the prediction type of the coding unit is the inter prediction mode, the video decoding apparatus 1700 may reconstruct the residual samples of the Cb component and the residual samples of the Cr component according to the second mode without a mode index.
[0412] As another example, the video decoding device 1700 may enable three chroma joint modes. In the first mode, the residual sample of the Cb component may be reconstructed as the same value as the chroma joint residual sample, and the residual sample of the Cr component may be reconstructed as a value obtained by multiplying the chroma joint residual sample by -1 (e.g., cb=c, cr=-c). In the second mode, the residual sample of the Cb component may be reconstructed as a value obtained by summing the first chroma joint residual sample and the second chroma joint residual sample, and the residual sample of the Cr component may be reconstructed as a value obtained by subtracting the second chroma joint residual sample from the first chroma joint residual sample (e.g., cb=c1+c2, cr=c1-c2). In the third mode, the residual sample of the Cb component may be reconstructed as the same value as the chroma joint residual sample, and the residual sample of the Cr component may be reconstructed as a value obtained by multiplying the chroma joint residual sample by -1 / 2 (e.g., cb=c, cr=-1 / 2c). When the prediction type of the coding unit is the intra-frame prediction mode and the intra-frame prediction direction is the planar mode or the 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 obtaining the mode index. When the prediction type of the coding unit is the intra-frame prediction mode and the intra-frame prediction direction is the directional mode, the video decoding device 1700 may obtain the chroma joint mode index from the bitstream, and reconstruct the residual sample of the Cb component and the residual sample of the Cr component according to the method indicated by the mode index in the first mode and the third mode. When the prediction type of the coding unit is the inter prediction mode, the video decoding apparatus 1700 may reconstruct the residual samples of the Cb component and the residual samples of the Cr component according to the second mode without obtaining the mode index.
[0413] Hereinafter, an embodiment of a case where a plurality of joint modes are used according to preset conditions in a chrominance joint method will be described.
[0414] The above-mentioned embodiment in which the video encoding device 1900 can 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 first mode, the second mode and the third mode can be applied to the current embodiment in the same manner. The above-mentioned embodiment in which the video decoding device 1700 reconstructs the residual samples of the Cb component and the residual samples of the Cr component by 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 can also be applied to the current embodiment in the same manner.
[0415] When the prediction type of the coding unit is the intra prediction mode, the video decoding apparatus 1700 may obtain the chroma joint mode index from the bitstream, and reconstruct the residual samples of the Cb component and the residual samples of the Cr component according to the method indicated by the mode index in the first mode and the second mode. When the prediction type of the coding unit is the inter prediction mode, the video decoding apparatus 1700 may obtain the chroma joint mode index from the bitstream, and reconstruct the residual samples of the Cb component and the residual samples of the Cr component according to the method indicated by the mode index in the first mode and the third mode.
[0416] Hereinafter, an embodiment of a case where a plurality of joint modes are used under a preset condition without a chroma joint mode index in a chroma joint method will be described.
[0417] The above-mentioned embodiment in which the video encoding device 1900 encodes the chroma joint residual sample C1 or encodes the first chroma joint residual sample C1 and the second chroma joint residual sample C2 according to the first mode, the second mode and the third mode can be applied to the current embodiment in the same manner. The above-mentioned embodiment in which the video decoding device 1700 reconstructs the residual samples of the Cb component and the residual samples of the Cr component by 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 can also be applied to the current embodiment in the same manner. When the prediction type of the coding unit is the intra-frame prediction mode and the intra-frame prediction direction is the planar mode or the DC mode, the video decoding device 1700 can reconstruct the residual samples of the Cb component and the residual samples of the Cr component according to the first mode without obtaining the mode index. When the prediction type of the coding unit is the intra prediction mode and the intra prediction direction is the directional mode, the video decoding device 1700 can reconstruct the residual samples of the Cb component and the residual samples of the Cr component according to the second mode without obtaining the mode index. When the prediction type of the coding unit is the inter prediction mode, the video decoding device 1700 can reconstruct the residual samples of the Cb component and the residual samples of the Cr component according to the third mode without obtaining the mode index.
[0418] The relationship for reconstructing the residual samples of the Cb component and the residual samples of the Cr component by using at least one of the first chrominance joint residual sample C1 and the second chrominance joint residual sample C2 is not limited to the above-mentioned embodiment, and various relationships may be applied. For example, various relationships (such as cb=w1*c1+w2*c2 and cr=w3*c1+w4*c2) may be used by modifying the weights w1, w2, w3, and w4.
[0419] Furthermore, various embodiments related to the condition for selecting one joint mode from a plurality of joint modes without a chroma joint mode index in the above-described embodiment will be described below.
[0420] For example, one of a plurality of joint modes may be determined based on whether a prediction type of a coding unit including a block is an intra prediction mode or an inter prediction mode.
[0421] As another example, one of the plurality of joint modes may be determined based on the size of the block. As a detailed example, when the width of the block is W and the height of the block is H, log2W may be a value obtained by applying log2 to W, and log2H may be a value obtained by applying log2 to H. One of the plurality of joint modes may be determined based on the smaller of log2W and log2H. As another example, one of the plurality of joint modes may be determined based on the larger of log2W and log2H. As another example, one of the plurality of joint modes may be determined based on the average of log2W and log2H. As another example, one of the plurality of joint modes may be determined based on the sum of log2W and log2H.
[0422] As another example, one of the plurality of joint modes may be determined based on a ratio of a height to a width of a block.
[0423] As another example, one of the plurality of joint modes may be determined based on whether the inter prediction direction of the block is a unidirectional prediction type or a bidirectional prediction type.
[0424] As another example, one of a plurality of joint modes for the current block may be determined based on chrominance joint information of neighboring blocks.
[0425] As another example, one of the multiple joint modes of the current block may be determined based on the encoding information of the neighboring blocks. As a detailed example, one of the multiple joint modes of the current block may be determined based on the CBF information of the neighboring blocks. As another example, the mode of the current block in the multiple joint modes may be determined based on whether the prediction type of the neighboring blocks is an intra-frame prediction mode or an inter-frame prediction mode. As another example, one of the multiple joint modes of the current block may be determined based on the transform type of the neighboring blocks. As another example, one of the multiple joint modes may be determined based on the transform type of the current block. For example, one of the multiple 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 transform type according to a block shape.
[0426] As another example, one of the multiple joint modes may be determined based on a predefined coding mode. As a detailed example, one of the multiple joint modes may be determined based on whether the coding mode of the current block is a MHintra mode, a TriangleIntra mode, an affine mode, an intra BC (IBC) mode, a symmetric motion vector difference (SMVD) mode, a merge with motion vector difference (MMVD) mode, a decoder-side motion vector improvement (DMVD) mode, a cross-component linear model (CCLM) mode, a position-dependent (intra) prediction combination (PDPC) mode, a multi-reference line intra prediction (MultiRefIntra) mode, an intraSubPartition mode, an intra-loop shaper mode, an overlapped block motion compensation (OBMC) mode, a transformSkip mode, and a sub-block transform (SBT) mode.
[0427] As another example, one mode of the current block among the plurality of joint modes may be determined based on a multiple transform select (MTS) index of the current block.
[0428] As another example, one mode among a plurality of joint modes to be used in blocks included in the current slice may be determined for each slice.
[0429] As another example, one of a plurality of joint modes to be used in a block included in a current temporal layer may be determined in a temporal level.
[0430] As another example, one of the plurality of joint modes may be determined based on whether the current slice is a reference slice or a non-reference slice.
[0431] As another example, one of a plurality of joint modes may be determined based on the number of transform coefficients of the Cb component and the number of transform coefficients of the Cr component.
[0432] As another example, in case of a block in an inter prediction mode, one of a plurality of joint modes may be determined based on whether a prediction direction is a unidirectional prediction type or a bidirectional prediction type.
[0433] As another example, one of a plurality of joint modes may be determined based on the Cb CBF information and the Cr CBF information of the current block.
[0434] As another example, one of the plurality of joint modes may be determined based on a combination of two or more of the various conditions set forth above.
[0435] The embodiments of the present disclosure as described above may be written as a program executable on a computer, and the written program may be stored in a medium.
[0436] The medium can store the computer executable program continuously, or temporarily store the computer executable program for running or downloading. In addition, the medium can be any of various recording media or storage media combined with single or multiple pieces of hardware, and the medium is not limited to the medium directly connected to the computer system, but can be distributed on the network. Examples of media include magnetic media (such as hard disks, floppy disks and tapes) configured to store program instructions, optical recording media (such as CD-ROMs and DVDs), magneto-optical media (such as optical floppy disks), and ROM, RAM and flash memory. Other examples of media include recording media and storage media managed by application stores that distribute applications or by websites, servers, etc. that provide or distribute various other types of software.
[0437] Various embodiments of the present disclosure have been described in detail above with reference to the preferred embodiments. However, the technical idea of the present disclosure is not limited to these embodiments, and within the scope of the technical idea of the present disclosure, a person skilled in the art can make various modifications and changes.
Claims
1. A video decoding method, comprising: If the prediction type of the current block is the intra prediction mode, extracting chrominance joint information based on at least one of the coded block flag CBF of the Cr component and the CBF of the Cb component, wherein the chrominance joint information indicates whether the chrominance residual samples of a single block are encoded to represent the residual samples of the Cb component and the residual samples of the Cr component in the current block; If the prediction type of the current block is an inter-frame prediction mode, extracting the chrominance joint information based on both the CBF of the Cr component and the CBF of the Cb component; When the chroma joint information indicates that the chroma residual samples of a single block are encoded to represent the residual samples of the Cb component and the residual samples of the Cr component in the current block, determining the weight of the residual samples of the Cr component, Obtaining chroma residual samples of the current block from a bitstream; and The residual samples of the Cr component are reconstructed by using the chrominance residual samples of the current block and the weights of the residual samples of the Cr component.
2. A video decoding device, comprising: Getter, configured as: If the prediction type of the current block is an intra prediction mode, extracting chrominance joint information based on at least one of the coded block flag CBF of the Cr component and the CBF of the Cb component, wherein the chrominance joint information indicates whether the chrominance residual samples of a single block are encoded to represent the residual samples of the Cb component and the residual samples of the Cr component in the current block, If the prediction type of the current block is an inter-frame prediction mode, extracting the chrominance joint information based on both the CBF of the Cr component and the CBF of the Cb component, and When the chroma joint information indicates that the chroma residual samples of a single block are encoded to represent the residual samples of the Cb component and the residual samples of the Cr component in the current block, obtaining the chroma residual samples of the current block from a bitstream; and The decoder is configured as: When the chroma joint information indicates that the chroma residual samples of a single block are encoded to represent the residual samples of the Cb component and the residual samples of the Cr component in the current block, determining the weight of the residual samples of the Cr component, and The residual samples of the Cr component are reconstructed by using the chrominance residual samples of the current block and the weights of the residual samples of the Cr component.
3. A video encoding method, comprising: If the prediction type of the current block is the intra prediction mode, determining whether the chrominance residual samples of a single block are encoded to represent the residual samples of the Cb component and the residual samples of the Cr component in the current block based on at least one of the coded block flag CBF of the Cr component and the CBF of the Cb component; If the prediction type of the current block is an inter-frame prediction mode, determining chrominance joint information based on both the CBF of the Cr component and the CBF of the Cb component; When the chroma residual samples of a single block are encoded to represent the residual samples of the Cb component and the residual samples of the Cr component in the current block, determining the weight of the residual samples of the Cr component; Obtaining a chrominance residual sample of the current block by using the residual sample of the Cr component and a weight of the residual sample of the Cr component; as well as Encoding the chroma residual samples of the current block into a bitstream; Chroma joint information indicating whether chroma residual samples of a single block are encoded to represent the residual samples of the Cb component and the residual samples of the Cr component in the current block is encoded.
4. A method for sending a bit stream, wherein: The bit stream is generated by the video encoding method according to claim 3.