Image encoding method and apparatus, and image decoding method and apparatus
By layering the image and optimizing differential quantization parameters, the problem of data unit size optimization in high-resolution image encoding and decoding is solved, and the encoding and decoding efficiency is improved.
Patent Information
- Application Number
- CN202510858742.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-09-23
- Filing Date
- 2020-06-26
- Publication Date
- 2025-08-01
AI Technical Summary
When existing image encoding and decoding technologies work with high resolution or high definition images, it is difficult to effectively optimize the size and encoding efficiency of data units, resulting in inefficiency in the encoding and decoding process.
By dividing the images layered based on the division shape mode of the current image, the encoding unit is obtained, and the differential quantization parameters are obtained from the bitstream based on the area of the predefined differential quantization parameter signaling unit, and the predicted quantization and inverse quantization are combined to optimize the reconstruction process of the encoding unit.
The efficiency of image encoding and decoding is improved, the size processing of data units is optimized, and the performance of encoding and decoding is improved.
Smart Images

Figure CN120416477A_ABST
Abstract
Description
[0001] This application is a divisional application of a patent application with an application date of June 26, 2020, an application number of 202080047055.1, and an invention title of "Image Encoding Method and Apparatus and Image Decoding Method and Apparatus". Technical Field
[0002] The method and apparatus according to an embodiment can encode or decode an image by using various types of coding units included in the image. The method and apparatus according to an embodiment can efficiently signal differential quantization parameters of the coding unit according to the size of the coding unit. Background Art
[0003] With the development and supply of hardware capable of reproducing and storing high-resolution or high-definition image content, there is an increasing need for codecs for efficiently encoding or decoding high-resolution or high-definition image content. Encoded image content is reproduced by being decoded. Recently, methods for efficiently compressing such high-resolution or high-definition image content are being implemented. For example, methods for efficiently achieving image compression by partitioning or rendering data of an image encoded by any method have been proposed.
[0004] Various data units can be used to compress an image, and there can be an inclusion relationship between such data units. To determine the size of the data unit to be used for image compression, the data unit can be partitioned by using various methods, and the image can be encoded or decoded by determining a data unit optimized based on the characteristics of the image. , Summary of the Invention
[0005] Solution to the Problem
[0006] An image decoding method according to an embodiment of the present disclosure includes: obtaining at least one coding unit including a current coding unit by hierarchically partitioning a current image based on a partitioning shape mode of the current image; obtaining a differential quantization parameter for the current coding unit from a bitstream based on an area of a predefined differential quantization parameter signaling unit; obtaining a quantization parameter for the current coding unit by using a prediction quantization parameter for the current coding unit and the differential quantization parameter for the current coding unit; based on the quantization parameter for the current coding unit and whether at least one non-zero coefficient exists in a transform unit included in the current coding unit, obtaining at least one inverse-quantized coefficient by inverse-quantizing at least one non-zero coefficient obtained based on residual information of the current coding unit included in the bitstream, and obtaining a residual block of the current coding unit based on the at least one inverse-quantized coefficient; and obtaining a reconstructed block of the current coding unit based on the obtained residual block of the current coding unit, wherein the step of obtaining the differential quantization parameter for the current coding unit from the bitstream based on the area of the predefined differential quantization parameter signaling unit includes: when an area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and a size of the current coding unit is greater than a maximum size of a transform unit, determining the differential quantization parameter for the current coding unit from information related to a first decoded transform unit among a plurality of transform units partitioned from the current coding unit; and when the area of the current coding unit is less than the area of the predefined differential quantization parameter signaling unit, obtaining the differential quantization parameter for a predefined coding unit including the current coding unit from information related to a first decoded transform unit among first decoded coding units among a plurality of coding units included in the predefined coding unit including the current coding unit, wherein the partitioning shape mode is a mode based on a partitioning type including one of a binary partitioning type and a ternary partitioning type, and an area of the predefined coding unit is equal to the area of the predefined differential quantization parameter signaling unit or twice the area of the predefined differential quantization parameter signaling unit, and when the area of the predefined coding unit is twice the area of the predefined differential quantization parameter signaling unit, a partitioning type of the predefined coding unit is a ternary partitioning type.
[0007] When obtaining a differential quantization parameter for the current coding unit from information related to the first decoded transform unit among the plurality of transform units divided from the current coding unit, the differential quantization parameter for the current coding unit can be obtained regardless of the value of the coding block flag indicating whether at least one transform coefficient representing non-zero is included in at least one transform unit included in the current coding unit. When the area of the current coding unit is smaller than the area of the predefined differential quantization parameter signaling unit, and when obtaining the differential quantization parameter for the predefined coding unit including the current coding unit from information related to the first decoded transform unit among the plurality of coding units included in the predefined coding unit including the current coding unit, the differential quantization parameter for the predefined coding unit including the current coding unit can be obtained regardless of the value of the coding block flag indicating whether at least one transform coefficient representing non-zero is included in the first decoded transform unit.
[0008] The step of obtaining the differential quantization parameter for the current coding unit from the bitstream based on the area of the predefined differential quantization parameter signaling unit may further include: when the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and the size of the current coding unit is less than or equal to the maximum size of the transform unit, obtaining the differential quantization parameter for the current coding unit based on the value of the coding block flag indicating whether at least one transform coefficient representing non-zero is included in the transform unit having the same size as the current coding unit.
[0009] The step of obtaining the differential quantization parameter for the current coding unit based on the value of the coding block flag may include: when the current coding unit corresponds to a coding unit of at least one luminance component and chrominance components Cb and Cr, obtaining the differential quantization parameter for the current coding unit based on at least one of a first coding block flag value, a second coding block flag value, and a third coding block flag value, where the first coding block flag value indicates whether at least one transform coefficient representing non-zero is included in the transform unit having the same size as the coding unit of the luminance component corresponding to the current coding unit, the second coding block flag value indicates whether at least one transform coefficient representing non-zero is included in the transform unit having the same size as the coding unit of the chrominance component Cb corresponding to the current coding unit, and the third coding block flag value indicates whether at least one transform coefficient representing non-zero is included in the transform unit having the same size as the coding unit of the chrominance component Cr corresponding to the current coding unit.
[0010] The step of obtaining the differential quantization parameter for the current coding unit from the bitstream based on the area of the predefined differential quantization parameter signaling unit may include:
[0011] When the flag indicating whether the signaling for the differential quantization parameter will be enabled indicates enabled and the flag indicating whether the signaling scheme for the predefined differential quantization parameter will be used indicates that the signaling scheme for the predefined differential quantization parameter is used, when the partitioning flag indicating whether to partition the current coding unit indicates that the current coding unit will not be partitioned, and when the sum of the value obtained by applying log2 to the width of the current coding unit and the value obtained by applying log2 to the height of the current coding unit is greater than or equal to the value obtained by applying log2 to the area of the predefined differential quantization parameter signaling unit, when the value obtained by applying log2 to the height or width of the current coding unit is greater than the value obtained by applying log2 to the maximum size of the transform unit, the cuQPDeltaCode value of the current coding unit is determined to be a predefined first value; when the value obtained by applying log2 to the height or width of the current coding unit is less than or equal to the value obtained by applying log2 to the maximum size of the transform unit, the cuQPDeltaCode value of the current coding unit is determined to be a predefined second value; and the cuQPDeltaCode value and the coding block flag value of the transform unit included in the coding unit are identified to obtain the differential quantization parameter for the current coding unit.
[0012] The step of obtaining a differential quantization parameter for the current coding unit from a bitstream based on an area of the predefined differential quantization parameter signaling unit may include: when a flag indicating whether signaling for the differential quantization parameter will be enabled indicates enabled and a flag indicating whether a signaling scheme for the predefined differential quantization parameter will be used indicates that the signaling scheme for the predefined differential quantization parameter is used, when a partitioning flag indicating whether to partition a predefined coding unit including the current coding unit indicates that the predefined coding unit will be partitioned, when a partitioning type of the predefined coding unit is a ternary partitioning type and a sum of a value obtained by applying log2 to a width of the predefined coding unit and a value obtained by applying log2 to a height of the predefined coding unit is equal to a value obtained by adding 1 to a value obtained by applying log2 to an area of the predefined differential quantization parameter signaling unit, or when a sum of a value obtained by applying log2 to a width of the predefined coding unit and a value obtained by applying log2 to a height of the predefined coding unit is equal to a value obtained by applying log2 to an area of the predefined differential quantization parameter signaling unit, determining a cuQpDeltaCode value of the predefined coding unit as a predefined first value; identifying cuQpDeltaCode values of the plurality of coding units that are partitioned from the predefined coding unit and include the current coding unit as the predefined first value; and obtaining a differential quantization parameter for the current coding unit by identifying the cuQpDeltaCode value of the current coding unit.
[0013] The area of the predefined differential quantization parameter signaling unit may be determined based on information about a difference between a predefined value and a value obtained by applying log2 to an area of the predefined coding unit, where the difference is obtained from a picture parameter set (PPS) of the bitstream.
[0014] An image decoding device according to an embodiment of the present disclosure includes: at least one processor configured to obtain at least one coding unit including a current coding unit by hierarchically dividing the current image based on a partitioning shape mode of the current image, obtain a differential quantization parameter for the current coding unit from a bitstream based on an area of a predefined differential quantization parameter signaling unit, obtain a quantization parameter for the current coding unit by using a predicted quantization parameter for the current coding unit and the differential quantization parameter for the current coding unit, based on the quantization parameter for the current coding unit and whether at least one non-zero coefficient exists in a transform unit included in the current coding unit, obtain at least one dequantized coefficient by dequantizing at least one non-zero coefficient obtained based on residual information of the current coding unit included in the bitstream, and obtain a residual block of the current coding unit based on the dequantized coefficient, and obtain a reconstructed block of the current coding unit based on the obtained residual block of the current coding unit, wherein, when the at least one processor obtains the differential quantization parameter for the current coding unit from the bitstream based on the area of the predefined differential quantization parameter signaling unit, the at least one processor is further configured to: when the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and the size of the current coding unit is greater than the maximum size of the transform unit, obtain the differential quantization parameter for the current coding unit from information related to a first decoded transform unit among a plurality of transform units divided from the current coding unit, and when the area of the current coding unit is less than the area of the predefined differential quantization parameter signaling unit, obtain the differential quantization parameter for the predefined coding unit including the current coding unit from information related to a first decoded transform unit among a plurality of coding units included in the predefined coding unit including the current coding unit and first decoded among the plurality of coding units included in the predefined coding unit including the current coding unit, wherein the partitioning shape mode is a mode based on a partitioning type including one of a binary partitioning type and a ternary partitioning type, and the area of the predefined coding unit is equal to the area of the predefined differential quantization parameter signaling unit or twice the area of the predefined differential quantization parameter signaling unit, wherein, when the area of the predefined coding unit is twice the area of the predefined differential quantization parameter signaling unit, the partitioning type of the predefined coding unit is a ternary partitioning type.
[0015] When obtaining the differential quantization parameter for the current coding unit from information related to the transform unit that is first decoded among the multiple transform units divided from the current coding unit, the differential quantization parameter for the current coding unit can be obtained regardless of the value of the flag indicating whether at least one non-zero transform coefficient is included in at least one of the transform units included in the current coding unit. And when obtaining the differential quantization parameter for the current coding unit from information related to the transform unit that is first decoded among the multiple coding units included in the predefined coding unit including the current coding unit, the differential quantization parameter for the predefined coding unit including the current coding unit can be obtained regardless of the value of the flag indicating whether at least one non-zero transform coefficient is included in the first decoded transform unit.
[0016] The at least one processor may also be configured to: when the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and the size of the current coding unit is less than or equal to the maximum size of the transform unit, obtain the differential quantization parameter for the current coding unit based on the value of the coding block flag indicating whether at least one non-zero transform coefficient is included in the transform unit having the same size as the current coding unit.
[0017] The area of the predefined differential quantization parameter signaling unit may be determined based on information about the difference between a predefined value and the value obtained by applying log2 to the area of the predefined differential quantization parameter signaling unit, where the difference is obtained from the picture parameter set (PPS) of the bitstream.
[0018] When obtaining the differential quantization parameter for the predefined coding unit including the current coding unit from information related to the transform unit that is first decoded among the multiple coding units included in the predefined coding unit including the current coding unit, the at least one processor may also be configured to: identify whether the area of the predefined coding unit is equal to the area of the predefined differential quantization parameter signaling unit, or whether the area of the predefined coding unit is twice the area of the predefined differential quantization parameter signaling unit and whether the partitioning type of the predefined coding unit is a ternary partitioning type, and in response to the identified result, obtain the differential quantization parameter for the predefined coding unit including the current coding unit from information related to the transform unit that is first decoded among the multiple coding units included in the predefined coding unit including the current coding unit.
[0019] An image coding method according to an embodiment of the present disclosure includes: obtaining at least one coding unit including a current coding unit by hierarchically dividing the current image based on a partitioning shape pattern of the current image; obtaining at least one coefficient included in the current coding unit; obtaining at least one transform coefficient by performing a transform on the at least one coefficient included in the current coding unit; obtaining at least one quantized transform coefficient and a quantization parameter for the current coding unit by performing quantization on the obtained at least one transform coefficient; obtaining a differential quantization parameter for the current coding unit based on a predicted quantization parameter for the current coding unit and the quantization parameter; generating a syntax element representing the differential quantization parameter for the current coding unit based on an area of a predefined differential quantization parameter signaling unit; generating residual information of the current coding unit, where the residual information includes information about the at least one quantized transform coefficient; and generating a bitstream including the residual information of the current coding unit and the syntax element, where the partitioning shape pattern is a pattern based on a partitioning type including one of a binary partitioning type and a ternary partitioning type, and the step of generating the syntax element includes: when an area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and a size of the current coding unit is greater than a maximum size of a transform unit, generating a syntax element representing the differential quantization parameter for the current coding unit, where the differential quantization parameter for the current coding unit will be included in information related to a first encoded transform unit among a plurality of transform units partitioned from the current coding unit; and when the area of the current coding unit is less than the area of the predefined differential quantization parameter signaling unit, generating a syntax element representing the differential quantization parameter for a predefined coding unit including the current coding unit, where the differential quantization parameter for the predefined coding unit including the current coding unit will be included in information related to a first encoded transform unit among a plurality of coding units included in the predefined coding unit including the current coding unit and first encoded in the first encoded coding unit, where an area of the predefined coding unit is equal to the area of the predefined differential quantization parameter signaling unit or twice the area of the predefined differential quantization parameter signaling unit, and when the area of the predefined coding unit is twice the area of the predefined differential quantization parameter signaling unit, a partitioning type of the predefined coding unit is a ternary partitioning type.
[0020] The image coding method may further include: generating a syntax element representing the area of the predefined differential quantization parameter signaling unit, where the bitstream further includes a syntax element representing the area of the predefined differential quantization parameter signaling unit, and
[0021] The syntax element representing the area of the predefined differential quantization parameter signaling unit is information on the difference between a predefined value and the value obtained by applying log2 to the area of the predefined differential quantization parameter signaling unit.
[0022] A computer program for an image decoding method according to an embodiment of the present disclosure can be recorded on a computer-readable recording medium. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1a is a block diagram of an image decoding device according to various embodiments.
[0024] Figure 1b is a flowchart showing an image decoding method according to various embodiments.
[0025] Figure 1c is a block diagram of an image decoder according to various embodiments.
[0026] Figure 2a is a block diagram of an image encoding device according to various embodiments.
[0027] Figure 2b is a flowchart showing an image encoding method according to various embodiments.
[0028] Figure 2c is a block diagram of an image encoder according to various embodiments.
[0029] Figure 3a shows the syntax structure of a partitioning unit for signaling a differential quantization parameter according to an embodiment.
[0030] Figure 3b and Figure 3c shows the syntax structure of a partitioning unit and a transform unit for signaling a differential quantization parameter according to an embodiment.
[0031] Figures 4a to 4c shows the syntax structure of a partitioning unit, a coding unit, and a transform unit for signaling a differential quantization parameter according to an embodiment.
[0032] Figure 4d is for describing a method of signaling a differential quantization parameter for the syntax structure of a partitioning unit, a coding unit, and a transform unit for signaling a differential quantization parameter as shown in Figures 4a to 4c is a diagram for describing a method of signaling a differential quantization parameter for the syntax structure of a partitioning unit, a coding unit, and a transform unit for signaling a differential quantization parameter.
[0033] Figure 5 is a diagram for describing a partitioning unit coding unit (SUCO) scheme for determining the coding (decoding) order between coding units as forward or backward based on a coding order flag and for describing the availability of right neighboring blocks according to the coding (decoding) order based on the SUCO scheme.
[0034] Figure 6 Shows the process of determining at least one coding unit by dividing a current coding unit, which is performed by an image decoding device according to an embodiment.
[0035] Figure 7 Shows the process of determining at least one coding unit by dividing a non-square coding unit, which is performed by an image decoding device according to an embodiment.
[0036] Figure 8 Shows the process of dividing a coding unit based on at least one of block shape information and division shape mode information, which is performed by an image decoding device according to an embodiment.
[0037] Figure 9 Shows a method of determining a predefined coding unit from an odd number of coding units, which is performed by an image decoding device according to an embodiment.
[0038] Figure 10 Shows the order of processing the multiple coding units when an image decoding device determines multiple coding units by dividing a current coding unit according to an embodiment.
[0039] Figure 11 Shows the process of determining that a current coding unit will be divided into an odd number of coding units when the coding unit cannot be processed in a predefined order, which is performed by an image decoding device according to an embodiment.
[0040] Figure 12 Shows the process of determining at least one coding unit by dividing a first coding unit, which is performed by an image decoding device according to an embodiment.
[0041] Figure 13 Shows that when a second coding unit with a non-square shape determined by dividing a first coding unit by an image decoding device satisfies a predefined condition, the shape into which the second coding unit can be divided is restricted.
[0042] Figure 14 Shows the process of dividing a square coding unit when division shape mode information indicates that the square coding unit will not be divided into four square coding units, which is performed by an image decoding device according to an embodiment.
[0043] Figure 15 Shows that the processing order between multiple coding units can be changed according to the process of dividing coding units according to an embodiment.
[0044] Figure 16Shows the process of determining the depth of a coding unit when the shape and size of the coding unit change when the coding unit is recursively divided such that multiple coding units are determined, according to an embodiment.
[0045] Figure 17 Shows the depth that can 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.
[0046] Figure 18 Shows determining multiple coding units based on multiple predetermined data units included in a picture, according to an embodiment.
[0047] Figure 19 Shows a processing block that serves as a criterion for determining the determination order of reference coding units included in a picture, according to an embodiment.
[0048] Best mode
[0049] An image decoding method according to an embodiment of the present disclosure includes: obtaining at least one coding unit including a current coding unit by hierarchically partitioning a current image based on a partitioning shape mode of the current image; obtaining a differential quantization parameter for the current coding unit from a bitstream based on an area of a predefined differential quantization parameter signaling unit; obtaining a quantization parameter for the current coding unit by using a predicted quantization parameter for the current coding unit and the differential quantization parameter for the current coding unit; based on the quantization parameter for the current coding unit and whether at least one non-zero coefficient exists in a transform unit included in the current coding unit, obtaining at least one inverse quantized coefficient by inverse quantizing at least one non-zero coefficient obtained based on residual information of the current coding unit included in the bitstream, and obtaining a residual block of the current coding unit based on the at least one inverse quantized coefficient; and obtaining a reconstructed block of the current coding unit based on the obtained residual block of the current coding unit, wherein the step of obtaining the differential quantization parameter for the current coding unit from the bitstream based on the area of the predefined differential quantization parameter signaling unit includes: when an area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and a size of the current coding unit is greater than a maximum size of a transform unit, determining the differential quantization parameter for the current coding unit from information related to a first decoded transform unit among a plurality of transform units partitioned from the current coding unit; and when the area of the current coding unit is less than the area of the predefined differential quantization parameter signaling unit, obtaining the differential quantization parameter for a predefined coding unit including the current coding unit from information related to a first decoded transform unit among first decoded coding units among a plurality of coding units included in the predefined coding unit including the current coding unit, wherein the partitioning shape mode is a mode based on a partitioning type including one of a binary partitioning type and a ternary partitioning type, and an area of the predefined coding unit is equal to the area of the predefined differential quantization parameter signaling unit or twice the area of the predefined differential quantization parameter signaling unit, and when the area of the predefined coding unit is twice the area of the predefined differential quantization parameter signaling unit, a partitioning type of the predefined coding unit is a ternary partitioning type.
[0050] An image decoding device according to an embodiment of the present disclosure includes: at least one processor configured to obtain at least one coding unit including a current coding unit by hierarchically partitioning the current image based on a partitioning shape mode of the current image, obtain a differential quantization parameter for the current coding unit from a bitstream based on an area of a predefined differential quantization parameter signaling unit, obtain a quantization parameter for the current coding unit by using a predicted quantization parameter for the current coding unit and the differential quantization parameter for the current coding unit, based on the quantization parameter for the current coding unit and whether at least one non-zero coefficient exists in a transform unit included in the current coding unit, obtain at least one inverse-quantized coefficient by inverse-quantizing at least one non-zero coefficient obtained based on residual information of the current coding unit included in the bitstream, and obtain a residual block of the current coding unit based on the inverse-quantized coefficient, and obtain a reconstructed block of the current coding unit based on the obtained residual block of the current coding unit, wherein, when the at least one processor obtains the differential quantization parameter for the current coding unit from the bitstream based on the area of the predefined differential quantization parameter signaling unit, the at least one processor is further configured to: when the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and the size of the current coding unit is greater than the maximum size of the transform unit, obtain the differential quantization parameter for the current coding unit from information related to a first decoded transform unit among a plurality of transform units partitioned from the current coding unit, and when the area of the current coding unit is less than the area of the predefined differential quantization parameter signaling unit, obtain the differential quantization parameter for the predefined coding unit including the current coding unit from information related to a first decoded transform unit among a plurality of coding units included in the predefined coding unit including the current coding unit and first decoded among the plurality of coding units included in the predefined coding unit including the current coding unit, wherein the partitioning shape mode is a mode based on a partitioning type including one of a binary partitioning type and a ternary partitioning type, and the area of the predefined coding unit is equal to the area of the predefined differential quantization parameter signaling unit or twice the area of the predefined differential quantization parameter signaling unit, and when the area of the predefined coding unit is twice the area of the predefined differential quantization parameter signaling unit, the partitioning type of the predefined coding unit is the ternary partitioning type.
[0051] An image encoding method according to an embodiment of the present disclosure includes: obtaining at least one coding unit including a current coding unit by hierarchically dividing the current image based on a partitioning shape mode of the current image; obtaining at least one coefficient included in the current coding unit; obtaining at least one transformed coefficient by performing a transform on the at least one coefficient included in the current coding unit; obtaining at least one quantized transformed coefficient and a quantization parameter for the current coding unit by performing quantization on the obtained at least one transformed coefficient; obtaining a differential quantization parameter for the current coding unit based on a predicted quantization parameter for the current coding unit and the quantization parameter; generating a syntax element representing the differential quantization parameter for the current coding unit based on an area of a predefined differential quantization parameter signaling unit; generating residual information of the current coding unit, where the residual information includes information about the at least one quantized transformed coefficient; and generating a bitstream including the residual information of the current coding unit and the syntax element, where the partitioning shape mode is a mode based on a partitioning type including one of a binary partitioning type and a ternary partitioning type, and the step of generating the syntax element includes: when an area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and a size of the current coding unit is greater than a maximum size of a transform unit, generating a syntax element representing the differential quantization parameter for the current coding unit, where the differential quantization parameter for the current coding unit will be included in information related to a first-coded transform unit among a plurality of transform units partitioned from the current coding unit; and when the area of the current coding unit is less than the area of the predefined differential quantization parameter signaling unit, generating a syntax element representing the differential quantization parameter for a predefined coding unit including the current coding unit, where the differential quantization parameter for the predefined coding unit including the current coding unit will be included in information related to a first-coded transform unit among a plurality of coding units included in the predefined coding unit including the current coding unit and first-coded in the first-coded coding unit, where an area of the predefined coding unit is equal to the area of the predefined quantization parameter signaling unit or twice the area of the predefined differential quantization parameter signaling unit, and when the area of the predefined coding unit is twice the area of the predefined differential quantization parameter signaling unit, a partitioning type of the predefined coding unit is a ternary partitioning type.
[0052] A computer program for an image decoding method according to an embodiment of the present disclosure can be recorded on a computer-readable recording medium. Detailed implementation manners
[0053] The advantages and features of the disclosed embodiments, as well as the methods for achieving these advantages and features, will be apparent by referring to the embodiments described below in conjunction with the accompanying drawings. However, the present disclosure is not limited to these embodiments, but can be implemented in many different forms, and these embodiments are provided to complete the present disclosure and enable those of ordinary skill in the art to understand the scope of the present disclosure.
[0054] The terms used in this specification will be briefly described, and the disclosed embodiments will be described in detail.
[0055] Although general terms widely used in this specification when considering the functions of the present disclosure are selected as the terms used in the present disclosure, they may vary according to the intentions of those of ordinary skill in the art, judicial precedents, the emergence of new technologies, etc. Terms arbitrarily selected by the applicant of the present disclosure may also be used in specific cases. In such cases, their meanings will be described in detail in the detailed description of the present disclosure. Therefore, the terms must be defined based on the meanings of the terms and the content of the entire specification, rather than simply stating the terms themselves.
[0056] It should be understood that, unless the context clearly dictates otherwise, the singular forms "a", "an", and "the" include plural referents.
[0057] It will be understood that when a particular component "comprises" a particular component, the component does not exclude another component, but may further include another component, unless the context clearly dictates otherwise.
[0058] As used herein, the terms "portion", "module", or "unit" refer to a software component or a hardware component that performs a predefined function. However, the terms "portion", "module", or "unit" are not limited to software or hardware. A "portion", "module", or "unit" may be configured in an addressable storage medium or may be configured to run on at least one processor. Thus, by way of example, a "portion", "module", or "unit" includes: components (such as software components, object-oriented software components, class components, and task components), processes, functions, attributes, procedures, subroutines, program code segments, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables. The functions provided in a component as well as a "portion", "module", or "unit" may be combined into a smaller number of components as well as "portions", "modules", and "units", or may be subdivided into additional components as well as "portions", "modules", or "units".
[0059] In embodiments of the present disclosure, a "portion", "module", or "unit" may be implemented as a processor and a memory. The term "processor" should be construed broadly to include a general-purpose processor, a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a controller, a microcontroller, a state machine, etc. In some embodiments, the "processor" may refer to an application specific integrated circuit (ASIC), a programmable logic device (PLD), a field programmable gate array (FPGA), etc. The term "processor" may refer to a combination of processing devices, such as, for example, a combination of a DSP and a microprocessor, a combination of multiple microprocessors, a combination of one or more microprocessors coupled to a DSP core, or a combination of any other similar components.
[0060] The term "memory" should be construed broadly to include any electronic component capable of storing electronic information. The term "memory" may refer to various types of processor-readable media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable PROM (EEPROM), flash memory, magnetic or optical data storage devices, registers, etc. When a processor is capable of reading information from and / or writing information to the memory, the memory may be considered to be in electronic communication with the processor. Memory integrated into a process is in electronic communication with the processor.
[0061] Hereinafter, an "image" may represent a still image (such as a still image of a video) or a moving image (i.e., a dynamic image such as a video itself).
[0062] Hereinafter, a "sample point", which is data of a sampling position assigned to an image, represents data to be processed. For example, a pixel value in a spatial domain image and a transform coefficient on a transform region may be sample points. A unit including at least one of these sample points may be defined as a block. Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings, so that those of ordinary skill in the art to which the present disclosure pertains can easily implement the embodiments. In addition, in the drawings, parts irrelevant to the description will be omitted for simplicity of illustration.
[0063] Hereinafter, "coding block flag (CBF) information" may be flag information indicating whether at least one (transform) coefficient other than 0 is included in a corresponding data unit. The coding block flag information may be generated according to whether a specific condition is satisfied for each coding unit. However, the coding block flag information may be generated for each sub-block unit smaller than the coding unit. In addition, one coding block flag information may be generated for both the luminance component and the chrominance component. However, one coding block flag information may be generated for each component. In this case, one coding block flag information for both the luminance component and the chrominance component may be generated together with the coding block flag information for each component. That is, when the value of one coding block flag information for both the luminance component and the chrominance component is 1, the coding block flag information may be generated for each component. In addition, when the value of one coding block flag information for both the luminance component and the chrominance component is 0, the coding block flag information may not be generated for each component. Hereinafter, with reference to FIGS. 1 to Figure 19 describe an image coding device, an image decoding device, an image coding method, and an image decoding method according to an embodiment. With reference to Figures 6 to 19 describe a method for determining a data unit of an image according to an embodiment, and with reference to Figures 1a to 5 describe an encoding or decoding method and apparatus for signaling differential quantization parameters of a coding unit according to the size of the coding unit according to an embodiment.
[0064] Hereinafter, with reference to Figures 1a to 5 describe an encoding / decoding method and apparatus for signaling differential quantization parameters of a coding unit according to the size of the coding unit according to an embodiment of the present disclosure.
[0065] Figure 1a is a block diagram of an image decoding device according to various embodiments.
[0066] An image decoding device 100 according to various embodiments may include an acquirer 105 and an image decoder 110. The acquirer 105 and the image decoder 110 may include at least one processor. In addition, the acquirer 105 and the image decoder 110 may include a memory storing instructions to be executed by the at least one processor. The image decoder 110 may be implemented as hardware separate from the acquirer 105, or may include the acquirer 105.
[0067] The image decoder 110 may include an inverse quantizer 115. In this case, the inverse quantizer 115 may be implemented as hardware separate from the image decoder 110.
[0068] The image decoder 110 may hierarchically partition a current image based on a partition shape mode of the current image, and thus may obtain a plurality of coding units including the current coding unit. Here, the partition shape mode may represent at least one of whether to partition, a partition direction, and a partition type. The partition type may represent one of a binary partition type, a ternary partition type (three-way partition type), and a quaternary partition type. Additionally, when a binary partition is performed in the vertical direction (or horizontal direction) and then a binary partition is performed in the horizontal direction (or vertical direction), the same effect as when a quaternary partition is performed may be obtained. Therefore, the partition type may represent one of the binary partition type and the ternary type. Hereinafter, a method of partitioning a coding unit of a higher depth into two or three coding units of a lower depth according to a partition direction in the vertical or horizontal direction and a partition type of the binary partition type or the ternary partition type is referred to as a binary and ternary tree (BTT) scheme. When the BTT scheme is not used, a quadtree (QT) scheme may be used. The QT scheme may be a scheme of partitioning a coding unit of a higher depth into four coding units of a lower depth by only using the partition type of the quaternary partition.
[0069] The acquirer 105 may obtain a differential quantization parameter for the current coding unit from the bitstream based on the area of a predefined differential quantization parameter signaling unit. The information about the differential quantization parameter obtained from the bitstream may include sign information of the differential quantization parameter and absolute value information of the differential quantization parameter. The area of the predefined differential quantization parameter signaling unit may be equal to the area of a predefined coding unit.
[0070] According to an embodiment, in a case where the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit, when the size of the current coding unit is greater than the maximum size of the transform unit, the acquirer 105 may obtain the differential quantization parameter for the current coding unit from information related to the first decoded transform unit among a plurality of transform units partitioned from the current coding unit. At this time, the current coding unit may be a coding unit that is no longer partitioned into coding units of a lower depth. At this time, the acquirer 105 may obtain the differential quantization parameter for the current coding unit from the bitstream regardless of the value of the coding block flag, where the coding block flag indicates whether at least one transform coefficient other than 0 is included in at least one transform unit (specifically, the first decoded transform unit) included in the current coding unit.
[0071] Hereinafter, the coded block flag (CBF) information may be flag information indicating whether there is at least one transform coefficient other than 0 in the current block in the transform / quantization of the residual signal representing the difference between the signal representing the original image and the predicted signal. For example, when the coded block flag information indicates that there is at least one transform coefficient other than 0 in the current block (for example, when the value of the coded block flag is 1, but not limited thereto), the coded block flag information may indicate that the transform coefficients of the current block have undergone entropy coding (including transform / quantization). When the coded block flag information indicates that all transform coefficients of the current block are 0 (for example, when the value of the coded block flag is 0, but not limited thereto), the coded block flag information may indicate that the current block has not undergone entropy coding (including transform / quantization). That is, the image coding device may include the coded block flag information in the bitstream and output the bitstream, and the image decoding device may obtain the coded block flag information from the bitstream and determine whether to perform entropy decoding (inverse transform / inverse quantization) on the current block based on the coded block flag information.
[0072] The acquirer 105 may obtain the coded block flag for each transform unit from the information about a plurality of transform units divided from the current coding unit included in the bitstream, and obtain the coded block flag for each luminance / chrominance component. The image decoder 110 may determine whether to perform entropy decoding (including inverse quantization and inverse transform) on the current block. Therefore, since the image decoder 110 does not perform inverse quantization on the transform unit with a CBF value of 0, the acquirer 105 may not obtain the quantization parameter-related information for the inverse quantization of the corresponding transform unit. However, when the acquirer 105 obtains the differential quantization parameter for the current coding unit from the bitstream according to the CBF value, it may be necessary to perform the operations for obtaining the CBF value and for identifying whether the CBF value is 1 in advance, which may cause parsing delay and increase the complexity of identifying whether the condition is satisfied. However, the acquirer 105 may obtain the differential quantization parameter for the current coding unit from the information about the first transform unit in the decoding order without identifying the coded block flag value indicating whether at least one transform coefficient other than 0 is included in at least one transform unit included in the current coding unit. At this time, the acquirer 105 may not obtain any differential quantization parameter from the information about the remaining transform units (the second transform unit and subsequent transform units) other than the first transform unit in the decoding order. In this case, the differential quantization parameter for each transform unit may be determined as the differential quantization parameter obtained from the information about the first transform unit. Therefore, the parsing delay and the complexity of identifying whether the condition is satisfied can be reduced.
[0073] When the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit, when the size of the current coding unit is less than or equal to the maximum size of the transform unit, the acquirer 105 may obtain the differential quantization parameter for the current coding unit from the bitstream based on the coding block flag indicating whether at least one transform coefficient that is not 0 is included in the transform unit having the same size as the current coding unit. That is, the acquirer 105 may obtain the differential quantization parameter for the current coding unit based on the coding block flag value. When the coding block flag value is 0, the values of the transform coefficients included in the transform unit having the same size as the current coding unit are 0. Therefore, it may not be necessary to perform inverse quantization, and thus, the acquirer 105 may not obtain any differential quantization parameters for inverse quantization. When the coding block flag value is 1, the acquirer 105 may obtain the differential quantization parameter for inverse quantization for the current coding unit.
[0074] When the current coding unit corresponds to the coding units of at least one luminance component and the chrominance components Cb and Cr, the acquirer 105 may obtain the differential quantization parameter for the current coding unit based on at least one value among the first coding block flag value, the second coding block flag value, and the third coding block flag value, where the first coding block flag value indicates whether at least one transform coefficient that is not 0 is included in the transform unit having the same size as the coding unit of the luminance component corresponding to the current coding unit, the second coding block flag value indicates whether at least one transform coefficient that is not 0 is included in the transform unit having the same size as the coding unit of the chrominance component Cb corresponding to the current coding unit, and the third coding block flag value indicates whether at least one transform coefficient that is not 0 is included in the transform unit having the same size as the coding unit of the chrominance component Cr corresponding to the current coding unit.
[0075] When the tree type is the single tree type, the image decoder 110 may obtain at least one coding unit based on the information about the partitioning shape mode of the current image that is commonly used among the components. That is, when the tree type is the single tree type, the current coding unit may correspond to the coding units of the luminance component and the chrominance components Cb and Cr. In this case, when at least one of the first coding block flag value of the transform unit having the same size as the coding unit of the luminance component corresponding to the current coding unit, the second coding block flag value of the transform unit having the same size as the coding unit of the chrominance component Cb corresponding to the current coding unit, and the third coding block flag value of the transform unit having the same size as the coding unit of the chrominance component Cr corresponding to the current coding unit is 1, the acquirer 105 may obtain the differential quantization parameter for the current coding unit.
[0076] When the tree type is a dual-tree type, the image decoder 110 may obtain at least one coding unit for each of the luminance component and the chrominance components Cr and Cb based on information about the partitioning shape mode of the image for each of the luminance component and the chrominance components Cr and Cb. In this case, the dual-tree type may include a dual-luminance type and a dual-chrominance type. When the dual-tree type is the dual-luminance type, the image decoder 110 may obtain at least one coding unit of the luminance component based on information about the partitioning shape mode of the image of the luminance component. When the dual-tree type is the dual-chrominance type, the image decoder 110 may obtain at least one coding unit of the chrominance component based on information about the partitioning shape mode of the image of the chrominance component.
[0077] In this case, the coding unit corresponding to the current coding unit may be a coding unit of the luminance component. Alternatively, the coding unit corresponding to the current coding unit may be a coding unit of a chrominance component (Cb or Cr). When the coding block flag value of the transform unit having the same size as the coding unit of the luminance component or the chrominance component corresponding to the current coding unit is 1, the image decoder 110 may obtain a differential quantization parameter for the coding unit of the corresponding component from the bitstream.
[0078] When the size of the current coding unit is less than the maximum size of the transform unit, the size of the current coding unit may be equal to the size of the transform unit. In this case, the acquirer 105 may obtain the coding block flag value of the transform unit having the same size as the current coding unit and obtain a differential quantization parameter based on the coding block flag value, thereby preventing unnecessary differential quantization parameters from being signaled. That is, when the coding block flag value is 0, the acquirer 105 may not obtain a differential quantization parameter from the bitstream, thereby preventing unnecessary differential quantization parameters from being signaled.
[0079] When the area of the current coding unit is smaller than the area of a predefined differential quantization parameter signaling unit, the acquirer 105 may obtain a differential quantization parameter for a predefined coding unit including the current coding unit from information related to the transform unit that is first decoded among the multiple coding units included in the predefined coding unit including the current coding unit. The predefined coding unit may have the same area as the predefined differential quantization parameter signaling unit and may be divided into multiple coding units including the current coding unit. When the area of the predefined coding unit is twice the area of the predefined differential quantization parameter signaling unit, the division type of the predefined coding unit may be a ternary division type. In this case, a coding unit having the same area as the predefined differential quantization parameter signaling unit may be obtained from the coding units divided from the predefined coding unit. In this case, the obtained corresponding coding unit may not become the predefined coding unit, and the coding unit having an area twice the area of the predefined differential quantization parameter signaling unit may become the predefined coding unit.
[0080] Since the image decoder 110 does not perform inverse quantization on coding units with a CBF value of 0, the acquirer 105 may not obtain information related to the quantization parameter for inverse quantization of the corresponding coding unit. However, when the acquirer 105 obtains a differential quantization parameter for the current coding unit from the bitstream based on the CBF value, operations for obtaining the CBF value and for determining whether the CBF value is 1 may need to be performed in advance, which may cause parsing delay and increase the complexity of identifying whether the conditions are met. However, the acquirer 105 may obtain a differential quantization parameter for the current coding unit from information related to the first transform unit of the first coding unit in the decoding order without identifying the coding block flag value, where the coding block flag value indicates whether at least one non-zero transform coefficient is included in the transform units included in at least one of the multiple coding units included in the predefined coding unit including the current coding unit. At this time, the acquirer 105 may not obtain any differential quantization parameters from information of the remaining transform units (the second transform unit and subsequent transform units) other than the first transform unit of the first coding unit in the decoding order. In this case, the differential quantization parameter for each coding unit may be determined as the differential quantization parameter obtained from the information about the first coding unit. Therefore, the parsing delay and the complexity of identifying whether the conditions are met can be reduced.
[0081] The inverse quantizer 115 can obtain the quantization parameter for the current coding unit by using the predicted quantization parameter for the current coding unit and the differential quantization parameter for the current coding unit. At this time, the inverse quantizer 115 can obtain the quantization parameter decoded earlier in decoding order in the current parallel block or strip as the predicted quantization parameter for the current coding unit. When the current coding unit is the first coding unit of the parallel block or strip, the inverse quantizer 115 can obtain the quantization parameter at the strip level as the predicted quantization parameter for the current coding unit. At this time, the quantization parameter can be obtained for each component. For example, the inverse quantizer 115 can determine the offset value of the quantization parameter range of the luminance component or the chrominance component based on the bit depth of the luminance component or the chrominance component, and add the value of each component obtained based on the sum of the predicted quantization parameter for the current coding unit and the differential quantization parameter for the current coding unit to the offset value of the quantization parameter range of each component, so as to obtain the quantization parameter for each component.
[0082] In addition, the quantization parameter Qp of the luminance component Y and the quantization parameter Qp of the chrominance component cb(cr) The relationship between them can be represented by the following Equation 1.
[0083] [Equation 1]
[0084] Qp cb ( cr ) = Qp Y + slice_cb(cr)_qp_offset
[0085] Here, slice_cb(cr)qp_offset can represent the offset between the quantization parameter of the luminance component obtained at the strip level and the quantization parameter of the chrominance component Cb or Cr, and slice_cb(cr)qp_offset can be obtained for each chrominance component Cb or Cr.
[0086] Hereinafter, a method for signaling the differential quantization parameter in consideration of the split unit coding unit (SUCO) scheme will be described. The SUCO scheme can improve the coding performance by changing the coding / decoding order of the coding unit. That is, according to the SUCO scheme, when the splitting direction of the first coding unit is the vertical direction, the coding / decoding order of the split second coding unit can be determined as the order of the coding units from left to right or the order of the coding units from right to left. Details of the SUCO scheme will be described below with reference to Figure 5 Describe the details of the SUCO scheme.
[0087] According to the SUCO scheme, neighboring blocks (e.g., neighboring coding units or neighboring quantization groups) that are referred to obtain prediction quantization parameters may depend on the decoding order. Here, a quantization group represents a data unit for determining quantization parameters and may include at least one coding unit. A quantization group may be a coding unit that is greater than or equal to a coding unit having a specific depth, a specific area, or a specific size. For example, all the left blocks, upper blocks, and right blocks of the current coding unit may be used for reference. In this case, the quantization parameter QP of the current coding unit may be derived according to Equation 2 below.
[0088] [Equation 2]
[0089] QP = pred QP + delta QP
[0090] Here, pred QP is the prediction quantization parameter of the current coding unit, and delta QP is the differential quantization parameter of the current coding unit. pred QP may be predicted by using at least one QP of the left quantization group, the upper quantization group, or the right quantization group. When the QP of the left quantization group, the upper quantization group, or the right quantization group is not available, pred QP may be predicted by using prev QP. prev QP may be the quantization parameter of the last coding unit of the previous quantization group in the coding (decoding) order. When prev QP does not exist, pred QP may be obtained by using the quantization parameter in the slice level (slice QP). pred QP may be obtained according to various embodiments as follows.
[0091] According to an embodiment, when the SUCO index value is 1 (on) (i.e., when the decoding order is recognized as the order from the right coding unit to the left coding unit), the prediction quantization parameter pred QP may be obtained according to Equation 3 below.
[0092] [Equation 3]
[0093] pred QP = (QP_above + QP_right + 1) / 2
[0094] Here, QP_above may be the quantization parameter of the upper coding unit of the current coding unit, and QP_right may be the quantization parameter of the right coding unit of the current coding unit. Additionally, when the SUCO index value is 0 (off) (i.e., when the decoding order is recognized as the order from the left coding unit to the right coding unit), the prediction quantization parameter pred QP may be obtained according to Equation 4 below.
[0095] [Equation 4]
[0096] pred QP = (QP_above + QP_left + 1) / 2
[0097] According to another embodiment, when the SUCO enable flag indicates on (when it is determined that SUCO will be used), the predicted quantization parameter pred QP can be obtained according to Equation 5 below.
[0098] [Equation 5]
[0099] pred QP = (QP_above + QP_right + QP_left + QP_prev + 2) / 4
[0100] In addition, when the SUCO enable flag indicates on (when it is determined that SUCO will be used), the predicted quantization parameter pred QP can be obtained according to Equation 6 below.
[0101] [Equation 6]
[0102] pred QP = (QP_above + QP_right + QP_left + 1) / 3
[0103] According to another embodiment, when the left block is available (i.e., when there is a left quantization group and the left quantization group is encoded (decoded) first), the predicted quantization parameter pred QP can be obtained according to Equation 7 below. "
[0104] [Equation 7]
[0105] pred QP = (QP_above + QP_left + 1) / 2
[0106] In addition, when the left block is not available (i.e., when there is no left quantization group and the left quantization group is not encoded (decoded) first), the predicted quantization parameter pred QP can be obtained according to Equation 8 below.
[0107] [Equation 8]
[0108] pred QP = (QP_above + QP_right + 1) / 2
[0109] According to another embodiment, when the right block is available (i.e., when there is a right quantization group and the right quantization group is encoded (decoded) first), the predicted quantization parameter pred QP can be obtained according to Equation 9 below.
[0110] [Equation 9]
[0111] pred QP = (QP_above + QP_right + 1) / 2
[0112] When the right block is not available (i.e., when there is no right quantization group and the right quantization group is not encoded (decoded) first), the predicted quantization parameter pred QP can be obtained according to Equation 10 below.
[0113] [Equation 10]
[0114] pred QP = (QP_abOve + QP_left + 1) / 2
[0115] According to another embodiment, by searching for blocks in the order of the left block → the upper block → the right block, the predicted quantization parameter pred QP can be obtained by using the quantization parameters of available quantization groups.
[0116] For example, the predicted quantization parameter pred QP can be obtained according to the following Equation 11.
[0117] [Equation 11]
[0118] pred QP = (Avail_1_QP + Avail_2_QP + 1) / 2
[0119] When the number of available quantization groups is equal to or less than 1, the predicted quantization parameter predQP can be obtained by using prevQP. In this case, the search order of the blocks can be one of the orders of up → left → right, left → up → right, right → up → left, left → right → up, and right → left → up.
[0120] According to another embodiment, the predicted quantization parameter pred QP can be obtained based on the reliability of the left block and the upper block according to a weighted sum. For example, the predicted quantization parameter pred QP can be obtained according to the following Equation 12.
[0121] [Equation 12]
[0122] pred QP = (N * QP_above + M * QP_left + L * QP_right + (N + M + L) / 2) / (N + M + L)
[0123] (where N, M, and L are natural numbers)
[0124] Here, N, M, and L can be determined according to the reliability. For example, the predicted quantization parameter pred QP can be obtained according to the following Equation 13.
[0125] [Equation 13]
[0126] pred QP = (2 * QP_above + QP_left + QP_right + 2) / 4
[0127] As an example of determining the reliability, the reliability can be determined based on the similarity between the area of the current coding unit and the areas of neighboring blocks.
[0128] As an example of determining reliability, reliability may be determined according to a prediction mode (intra mode or inter mode) of a current coding unit and neighboring blocks.
[0129] As an example of determining reliability, when a current coding unit has been encoded (decoded) using a predefined encoding (decoding) tool and neighboring blocks have also been encoded (decoded) using the predefined encoding (decoding) tool, the neighboring blocks may be set to have high reliability.
[0130] For example, when a current coding unit is encoded (decoded) according to a skip mode, a merge mode, an affine mode, or a merge mode with motion vector difference (MMVD) in an inter mode, and there is a neighboring block encoded (decoded) according to a skip mode, a merge mode, an affine mode, or an MMVD mode among a plurality of neighboring blocks, the neighboring block may be set to have high reliability or the QP of the neighboring block may be preferentially used over QPs of other blocks. The affine mode refers to a mode in which motion compensation based on an affine model is used for inter prediction. The MMVD mode refers to a mode in which a new motion vector candidate is generated by setting an index for a motion vector of a neighboring block and a predefined motion vector difference (MVD), and then motion information of a current coding unit is derived based on the motion vector candidate.
[0131] In addition, according to various embodiments, the acquirer 105 may obtain information about a differential quantization parameter from a bitstream. Various embodiments will be described below with reference to description of various embodiments.
[0132] Hereinafter, a method of signaling a predefined area unit will be described, in which a differential quantization parameter of a coding unit is signaled in the predefined area unit.
[0133] The acquirer 105 may obtain information about the predefined area unit in units of a sequence parameter set (SPS), a picture parameter set (PPS), a slice, a parallel block, or a parallel block group. The information about the predefined area unit may represent a predefined area value, a value obtained by representing the predefined area value as a power of 2 (or a value obtained by applying log2 to the predefined area value), an index value of a table having area values, or a difference from a specific value.
[0134] According to an embodiment, information delta_QP_area regarding a predefined area value may be represented as an area value that is a multiplier of 2. For example, the information delta_QP_area regarding the predefined area value may correspond to 7. In this case, the predefined area may be 2^7 = 128, and the coding unit for signaling the differential quantization parameter determined according to the predefined area unit may be 8×16, 16×8, etc. Further, the information delta_QP_area regarding the predefined area value may correspond to 8. In this case, the predefined area may be 2^8 = 256, and the coding unit for signaling the differential quantization parameter determined according to the predefined area unit may be 16×16, 8×32, 32×8, etc. Further, the information delta_QP_area regarding the predefined area value may correspond to 9. In this case, the predefined area may be 2^9 = 512, and the coding unit for signaling the differential quantization parameter determined according to the predefined area unit may be 32×16, 16×32, 64×8, 8×64, etc. Further, the information delta_QP_area regarding the predefined area value may correspond to 10. In this case, the predefined area may be 2^10 = 1024, and the coding unit for signaling the differential quantization parameter determined according to the predefined area unit may be 32×32, 16×64, 64×16, 128×8, 8×128, etc.
[0135] According to an embodiment, the information delta_QP_area regarding the predefined area value may correspond to an index value representing one of the area values shown in Table 1 and Table 2.
[0136] [Table 1]
[0137] Figures 3a to 4c 0 1 2 3 ... Index 128 256 512 ... ...
[0138] [Table 2]
[0139] Area value 0 1 2 3 ... Index 256 512 1024 ... ...
[0140] However, the correspondence between the index value and the area value is not limited to Table 1 and Table 2 and may be defined differently.
[0141] According to an embodiment, information delta_QP_area regarding a predefined area value may represent a difference from a value related to the size of a minimum coding unit. For example, when the size of the minimum coding unit is 4×4, the value log2_min_cu_area represented by this area may be log2(16) = 4, and when the predefined area value is 256 (e.g., when the size is 16×16), the value log2_delta_qp_area represented by this area may be log2(256) = 8. Thus, information delta_QP_area regarding the predefined area value may correspond to log2_delta_qp_area - log2_min_cu_area. For example, information delta_QP_area regarding the predefined area value may correspond to 8 - 4 = 4.
[0142] According to an embodiment, information delta_QP_area regarding a predefined area value may represent a difference from a value related to the minimum differential quantization parameter area. The minimum differential quantization parameter area may indicate the area of the smallest block that signals a differential quantization parameter. When the minimum differential quantization parameter area (size) is 16×16 (256), the value represented by this area may be log2(256) = 8, and when the predefined area value is 256 (e.g., when the size is 16×16), the value represented by this area may be log2(256) = 8. Thus, information delta_QP_area regarding the predefined area value may correspond to log2_delta_qp_area - log2_min_delta_qp_area. For example, information delta_QP_area regarding the predefined area value may indicate 8 - 8 = 0.
[0143] According to an embodiment, information delta_QP_area regarding a predefined area value may represent a difference from a value related to the size of a maximum coding unit (or coding tree unit). For example, when the size of the maximum coding unit is 128×128, the value represented by this area may be log2(16384) = 14, and when the predefined area value is 256 (e.g., when the size is 16×16), the value represented by this area may be log2(256) = 8. Thus, information delta_QP_area regarding the predefined area value may correspond to log2_max_cu_area - log2_delta_qp_area. For example, information delta_QP_area regarding the predefined area value may correspond to 14 - 8 = 6.
[0144] According to an embodiment, information delta_QP_area regarding a predefined area value may represent a difference from a value associated with a maximum differential quantization parameter area Maximum delta QP area. In this case, the maximum differential quantization parameter area may represent an area of a largest block that signals a differential quantization parameter. For example, when the maximum differential quantization parameter area (size) is 64×64 (4096), the value represented by this area may be log2(4096) = 12, and when the predefined area value is 256 (e.g., when the size is 16×16), the value represented by this area may be log2(256) = 8. Thus, the information delta_QP_area regarding the predefined area value may be log2_max_delta_qp_area - log2_delta_qp_area. For example, the information delta_QP_area regarding the predefined area value may be 12 - 8 = 4.
[0145] Hereinafter, a method for signaling a differential quantization parameter at the frame level will be described.
[0146] When a differential quantization parameter delta QP is signaled, a QP for each coding unit may not be changed while a QP for a specific frame is used. In this case, the following processes may be performed at each frame level.
[0147] An acquirer 105 may acquire a first bit among bits representing information regarding a differential quantization parameter delta QP at the frame level. At this time, the first bit may represent whether the differential quantization parameter delta QP is 0. For example, the acquirer 105 may perform binary arithmetic decoding on the first bit of the information regarding the differential quantization parameter delta QP at the frame level based on a context model to acquire a first arithmetically decoded bit. At this time, when the first arithmetically decoded bit is 0, the acquirer 105 may not acquire information regarding a non-zero differential quantization parameter delta QP, and an inverse quantizer 115 may acquire a quantization parameter of a current frame that is the same as a quantization parameter of a previous frame.
[0148] When the first arithmetically decoded bit is not 0, the acquirer 105 may acquire information regarding a non-zero differential quantization parameter from a bitstream (remaining bits after the first bit among bits representing information regarding the differential quantization parameter delta QP).
[0149] The acquirer 105 may acquire the default_zero_dqp_signal at the frame level and update or maintain the probability information regarding the differential quantization parameter delta QP for the frame level based on the value of the default_zero_dqp_signal. For example, when the value of the default_zero_dqp_signal is 1, the acquirer 105 may update the probability that the binary bit included in the information regarding the differential quantization parameter delta QP will be 0 to a value close to 1. At this time, a context index ctxIdx different from the context index of the previous frame may be used.
[0150] When the value of the default_zero_dqp_signal is 0, the same probability as that of the previous frame may be used. That is, the same context index ctxIdx may be used.
[0151] At this time, two probability tables may be used. That is, the probability table when the default_zero_dqp_signal is 1 and the probability table when the default_zero_dqp_signal is 0 may be distinguished and used.
[0152] In addition, the acquirer 105 may acquire the residual information (information regarding at least one coefficient) of the current coding unit from the bitstream and acquire at least one coefficient of the current coding unit based on the residual information of the current coding unit. The inverse quantizer 115 may inverse-quantize at least one non-zero coefficient acquired by the acquirer 105 for the current coding unit to obtain at least one inverse-quantized coefficient based on whether at least one non-zero coefficient exists in the quantization parameter for the current coding unit and the transform unit included in the current coding unit.
[0153] The image decoder 110 may acquire the residual block of the current coding unit based on the at least one inverse-quantized coefficient. At this time, the at least one inverse-quantized coefficient may be at least one transform coefficient, and the image decoder 110 may perform an inverse transform on the block including the at least one transform coefficient to obtain a residual block including at least one coefficient. At this time, the coefficient may be a coefficient in the spatial domain. In addition, in some cases, the inverse transform may be omitted, and in these cases, the inverse-quantized coefficient may be a coefficient in the spatial domain. The image decoder 110 may acquire the residual block of the current coding unit including the at least one inverse-quantized coefficient (i.e., a coefficient in the spatial domain) without performing an inverse transform.
[0154] The image decoder 110 may obtain a reconstructed block of the current coding unit based on the residual block of the current coding unit. For example, the image decoder 110 may sum the sample values of the samples included in the residual block of the current coding unit and the sample values of the samples included in the prediction block of the current coding unit to obtain the sample values of the samples included in the reconstructed block of the current coding unit, and obtain the reconstructed block of the current coding unit based on the sample values of the samples included in the reconstructed block. At this time, the prediction block of the current coding unit may be a block predicted according to various prediction schemes of the inter-frame mode or the intra-frame mode.
[0155] Area value is a flowchart showing an image decoding method according to various embodiments.
[0156] In operation S105, the image decoding device 100 may obtain at least one coding unit including the current coding unit by hierarchically partitioning the current image based on the partitioning shape mode of the current image.
[0157] In operation S110, the image decoding device 100 may obtain a differential quantization parameter for the current coding unit from the bitstream based on the area of the predefined differential quantization parameter signaling unit.
[0158] When the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and the size of the current coding unit is greater than the maximum size of the transform unit, the image decoding device 100 may obtain the differential quantization parameter for the current coding unit from the information related to the first decoded transform unit among the plurality of transform units divided from the current coding unit. That is, the image decoding device 100 may obtain the differential quantization parameter for the current coding unit from the syntax structure of the first decoded transform unit among the plurality of transform units divided from the current coding unit. At this time, the image decoding device 100 may obtain the differential quantization parameter for the current coding unit regardless of the value of the flag indicating whether at least one transform coefficient representing non-zero is included in at least one transform unit (specifically, the first decoded transform unit) included in the current coding unit. That is, the image decoding device 100 may obtain the differential quantization parameter for the current coding unit without identifying the value of the flag indicating whether at least one transform coefficient representing non-zero is included in at least one transform unit included in the current coding unit.
[0159] When the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and the size of the current coding unit is less than or equal to the maximum size of the transform unit, the image decoding device 100 may obtain the differential quantization parameter for the current coding unit based on the value of the coding block flag indicating whether at least one transform coefficient that is not 0 is included in the transform unit having the same size as the current coding unit. When the current coding unit corresponds to the coding units of at least one luminance component and the chrominance components Cb and Cr, the image decoding device 100 may obtain the differential quantization parameter for the current coding unit based on at least one value among the first coding block flag value, the second coding block flag value, and the third coding block flag value, where the first coding block flag value indicates whether at least one transform coefficient that is not 0 is included in the transform unit having the same size as the coding unit of the luminance component corresponding to the current coding unit, the second coding block flag value indicates whether at least one transform coefficient that is not 0 is included in the transform unit having the same size as the coding unit of the chrominance component Cb corresponding to the current coding unit, and the third coding block flag value indicates whether at least one transform coefficient that is not 0 is included in the transform unit having the same size as the coding unit of the chrominance component Cr corresponding to the current coding unit. In this case, the area of the predefined differential quantization parameter signaling unit may be determined based on the information obtained from the picture parameter set (PPS) of the bitstream regarding the difference between the predefined value and the value obtained by applying log2 to the area of the predefined differential quantization parameter signaling unit.
[0160] According to an embodiment, in the case where the differential quantization parameter enable flag indicating whether signaling for the differential quantization parameter will be enabled indicates enabled and the flag indicating whether the signaling scheme for the predefined differential quantization parameter will be used indicates that the signaling scheme for the predefined differential quantization parameter is used, in the case where the partition flag indicating whether the current coding unit will be partitioned indicates that the current coding unit will not be partitioned, and in the case where the sum of the value obtained by applying log2 to the width of the current coding unit and the value obtained by applying log2 to the height of the current coding unit is greater than or equal to the value obtained by applying log2 to the area of the predefined differential quantization parameter signaling unit, when the height or width of the current coding unit is greater than the maximum size of the transform unit, the image decoding device 100 may determine the value of cuQPDeltaCode of the current coding unit as a predefined first value. For example, the predefined first value may be 2, but is not limited thereto. When the height and width of the current coding unit are less than or equal to the maximum size of the transform unit, the image decoding device 100 may determine the value of cuQPDeltaCode of the current coding unit as a predefined second value. The predefined second value may be 1, but is not limited thereto.
[0161] The image decoding device 100 can identify the value of cuQPDeltaCode to obtain the differential quantization parameter for the current coding unit. For example, the image decoding device 100 can identify the value of cuQPDeltaCode for the current coding unit as a predefined first value and obtain the differential quantization parameter of the current coding unit regardless of the value of CBF of the current coding unit. The image decoding device 100 can identify the value of cuQPDeltaCode as a predefined second value and obtain the differential quantization parameter of the corresponding coding unit based on the value of CBF of the corresponding coding unit (or the transform unit included in the corresponding coding unit) (e.g., when at least one of the CBF values for each component is 1).
[0162] In addition, when the area of the current coding unit is smaller than the area of the predefined differential quantization parameter signaling unit, the image decoding device 100 can obtain the differential quantization parameter for the current coding unit from the information related to the transform unit that is first decoded among the multiple coding units included in the predefined coding unit including the current coding unit and is first decoded. At this time, the image decoding device 100 can obtain the differential quantization parameter for the current coding unit regardless of the value of the coding block flag, where the coding block flag indicates whether at least one coefficient not equal to 0 is included in the transform unit included in the first decoded coding unit among the multiple coding units.
[0163] According to an embodiment, in the case where the area of the current coding unit is smaller than the area of the predefined differential quantization parameter signaling unit, the division flag indicating whether the predefined coding unit including the current coding unit will be divided indicates that the predefined coding unit including the current coding unit is divided, the division type of the predefined coding unit including the current coding unit is a ternary division type and the sum of the value obtained by applying log2 to the width of the predefined coding unit including the current coding unit and the value obtained by applying log2 to the height of the predefined coding unit including the current coding unit is equal to the value obtained by adding 1 to the value obtained by applying log2 to the area of the predefined differential quantization parameter signaling unit, or the sum of the value obtained by applying log2 to the width of the predefined coding unit including the current coding unit and the value obtained by applying log2 to the height of the predefined coding unit including the current coding unit is equal to the value obtained by applying log2 to the area of the predefined differential quantization parameter signaling unit, the image decoding device 100 can determine the value of cuQPDeltaCode of the predefined coding unit including the current coding unit as a predefined first value.
[0164] The image decoding device 100 may recognize the value of cuQPDeltaCode as a predefined first value, and obtain a differential quantization parameter for the current coding unit from information related to the transform unit that is first decoded among the first decoded coding units included in a plurality of coding units included in a predefined coding unit including the current coding unit, regardless of the value of CBF of the transform unit included in the corresponding coding unit.
[0165] In operation S115, the image decoding device 100 may obtain a quantization parameter for the current coding unit by using the predicted quantization parameter for the current coding unit and the differential quantization parameter for the current coding unit.
[0166] In operation S120, the image decoding device 100 may, based on the quantization parameter for the current coding unit and whether there is at least one non-zero coefficient in the transform units included in the current coding unit, obtain at least one inverse-quantized coefficient by inverse-quantizing at least one non-zero coefficient obtained from the residual information of the current coding unit in the bitstream, and obtain a residual block of the current coding unit based on the inverse-quantized coefficients.
[0167] In operation S125, the image decoding device 100 may obtain a reconstructed block of the current coding unit based on the obtained residual block of the current coding unit.
[0168] Figure 1b is a block diagram of an image decoder 6000 according to various embodiments.
[0169] The image decoder 6000 according to various embodiments may perform the tasks executed by the acquirer 105 of the image decoding device 100 and the image decoder 110 to decode image data.
[0170] Referring to Figure 1c , the entropy decoder 6150 may parse the encoded image data to be decoded from the bitstream 6050 and the coding information required for decoding. The encoded image data may be quantized transform coefficients, and the inverse quantizer 6200 and the inverse transformator 6250 may recover the residual data from the quantized transform coefficients.
[0171] The intra predictor 6400 may perform intra prediction for each block. The inter predictor 6350 may perform inter prediction for each block by using reference images obtained from the reconstructed picture buffer 6300. By adding the residual data for each block and the prediction data generated by the intra predictor 6400 or the inter predictor 6350 to restore the spatial domain data of the blocks for the current image, the deblocking unit 6450 and the SAO executor 6500 may perform roof filtering on the reconstructed spatial domain data and output the filtered reconstructed image 6600. In addition, the reconstructed image stored in the reconstructed picture buffer 6300 may be output as a reference image.
[0172] In order for the image decoder 110 of the image decoding device 100 to decode image data, the image decoder 6000 according to various embodiments may perform phased tasks for each block. For example, the task of the dequantizer 6200 may correspond to the task of the dequantizer 115.
[0173] Figure 1c is a block diagram of an image encoding device according to various embodiments.
[0174] The image encoding device 150 according to various embodiments may include an image encoder 155 and a bitstream generator 170.
[0175] The image encoder 155 and the bitstream generator 170 may include at least one processor. In addition, the image encoder 155 and the bitstream generator 170 may include a memory storing instructions to be executed by the at least one processor. The image encoder 155 and the bitstream generator 170 may be implemented as different hardware, or the image encoder 155 may include the bitstream generator 170. The image encoder 155 may include a quantizer 160. In this case, the quantizer 160 may be implemented as hardware different from the image encoder 155.
[0176] The image encoder 155 may hierarchically divide the current image based on the partitioning shape mode of the current image to obtain a plurality of coding units including the current coding unit. At this time, the partitioning shape mode may represent at least one of whether to partition, the partitioning direction, or the partitioning type. The partitioning type may represent one partitioning type among a binary partitioning type, a ternary partitioning type, and a quaternary partitioning type. In addition, when binary partitioning is performed in the vertical direction (or horizontal direction) and then binary partitioning is performed in the horizontal direction (or vertical direction), substantially the same effect as when quaternary partitioning is performed may be obtained. Therefore, the partitioning type may represent only one partitioning type among the binary partitioning type and the ternary partitioning type.
[0177] The image encoder 155 may obtain at least one coefficient included in a current coding unit. For example, the image encoder 155 may obtain residual sample values of a residual block of the current coding unit based on a difference between original sample values in an original block of the current coding unit and predicted sample values in a predicted block of the current coding unit. The residual sample values in the residual block may correspond to at least one coefficient. At this time, the predicted block may be obtained based on prediction according to an intra mode or an inter mode.
[0178] The image encoder 155 may perform a transform on at least one coefficient included in the current coding unit to obtain at least one transformed coefficient.
[0179] The quantizer 160 may perform quantization on at least one transformed coefficient to obtain at least one quantized transformed coefficient and quantization parameters for the current coding unit.
[0180] The image encoder 155 may obtain differential quantization parameters for the current coding unit based on the quantization parameters for the current coding unit and predicted quantization parameters.
[0181] The image encoder 155 may generate residual information of the current coding unit, where the residual information includes information about at least one quantized transformed coefficient. In addition, the image encoder 155 may generate a syntax element representing the differential quantization parameters for the current coding unit based on an area of a predefined differential quantization parameter signaling unit. At this time, the syntax element representing the differential quantization parameters may include a syntax element representing a sign of the differential quantization parameters and a syntax element representing an absolute value of the differential quantization parameters.
[0182] According to an embodiment, in a case where an area of the current coding unit is greater than or equal to an area of the predefined differential quantization parameter signaling unit, when a size of the current coding unit is greater than a maximum size of a transform unit, the image encoder 155 may generate a syntax element related to the differential quantization parameters for the current coding unit, where the differential quantization parameters for the current coding unit are included in information related to a first decoded transform unit among a plurality of transform units divided from the current coding unit. Here, the current coding unit may be a coding unit that is no longer divided into coding units of a lower depth.
[0183] At this time, the image encoder 155 may generate a syntax element related to the differential quantization parameters for the current coding unit regardless of whether at least one non-zero transformed coefficient is included in at least one transform unit (specifically, the first encoded transform unit) included in the current coding unit.
[0184] The bitstream generator 170 may generate a bitstream, where the bitstream includes a syntax element representing the differential quantization parameters for the current coding unit and the residual information of the current coding unit.
[0185] When the area of the current coding unit is greater than or equal to the area of a predefined differential quantization parameter signaling unit, and when the size of the current coding unit is less than or equal to the maximum size of a transform unit, the image encoder 155 may generate a syntax element representing the differential quantization parameter for the current coding unit based on whether at least one non-zero transform coefficient is included in a transform unit having the same size as the current coding unit. When at least one non-zero transform coefficient is not included in a transform unit having the same size as the current coding unit, the image encoder 155 may not generate a syntax element representing the differential quantization parameter for the current coding unit. When at least one non-zero transform coefficient is included in a transform unit having the same size as the current coding unit, the image encoder 155 may generate a syntax element representing the differential quantization parameter for the current coding unit.
[0186] When the current coding unit corresponds to coding units of at least one luminance component and chrominance components Cb and Cr, the image encoder 155 may generate a syntax element representing the differential quantization parameter for the current coding unit based on whether at least one non-zero transform coefficient is included in a transform unit having the same size as the coding unit of the luminance component corresponding to the current coding unit, whether at least one non-zero transform coefficient is included in a transform unit having the same size as the coding unit of the chrominance component Cb corresponding to the current coding unit, and whether at least one non-zero transform coefficient is included in a transform unit having the same size as the coding unit of the chrominance component Cr corresponding to the current coding unit. When the tree type is a single tree type, the image encoder 155 may obtain at least one coding unit based on information about the partitioning shape mode of the current image that is commonly used among the components. That is, when the tree type is a single tree type, the current coding unit may correspond to the coding unit of the luminance component and the coding units of the chrominance components Cb and Cr. In this case, the image encoder 155 may obtain a syntax element representing the differential quantization parameter for the current coding unit based on at least one of the following: whether at least one non-zero transform coefficient is included in a transform unit having the same size as the coding unit of the luminance component corresponding to the current coding unit, whether at least one non-zero transform coefficient is included in a transform unit having the same size as the coding unit of the chrominance component Cb corresponding to the current coding unit, and whether at least one non-zero transform coefficient is included in a transform unit having the same size as the coding unit of the chrominance component Cb corresponding to the current coding unit.
[0187] When the tree type is a dual-tree type, the image encoder 155 may obtain at least one coding unit for each of the luminance component and the chrominance components Cb and Cr based on the partitioning shape mode of the image for each of them. The dual-tree type may include a dual-luminance type and a dual-chrominance type. In the case of the dual-luminance type, the image encoder 155 may obtain at least one coding unit for the luminance component based on the partitioning shape mode of the image of the luminance component. In the case of the dual-chrominance type, the image encoder 155 may obtain at least one coding unit for the chrominance component based on the partitioning shape mode of the image of the chrominance component.
[0188] In this case, the coding unit corresponding to the current coding unit may be a coding unit of the luminance component. Optionally, the coding unit corresponding to the current coding unit may be a coding unit of the chrominance component Cb or Cr. The image encoder 155 may generate a syntax element representing the differential quantization parameter for the coding unit of the corresponding component based on whether at least one non-zero transform coefficient is included in a transform unit having the same size as the coding unit of the luminance component or chrominance component corresponding to the current coding unit. When the area of the current coding unit is smaller than the area of a predefined differential quantization parameter signaling unit, the image encoder 155 may generate a syntax element representing the differential quantization parameter for the current coding unit, where the differential quantization parameter for the current coding unit is included in the information related to the transform unit that is first coded among the multiple coding units included in the predefined coding unit including the current coding unit and is first coded among the coding units included in the predefined coding unit.
[0189] The quantizer 160 may obtain the quantization parameter that was coded earlier in the coding order in the current parallel block or strip as the prediction parameter for the current coding unit. When the current coding unit is the first coding unit of the parallel block or strip, the quantizer 160 may obtain the quantization parameter at the strip level as the prediction parameter for the current coding unit. The quantization parameter may be obtained for each component. For example, the quantizer 160 may determine an offset value of the quantization parameter range for the luminance component or chrominance component based on the bit depth of the luminance component or chrominance component, and sum the offset value of the quantization parameter range for each component and the value for each component obtained based on the sum of the predicted quantization parameter for the current coding unit and the differential quantization parameter for the current coding unit, thereby obtaining the quantization parameter for each component.
[0190] In addition, the quantization parameter Qp for the luminance component may be represented by using the following Equation 14 Y and the quantization parameter Qp for the chrominance component cb(cr) The relationship between them. At this time, slice_cb(cr)_qp_offset may be the quantization parameter Qp for the luminance component obtained at the strip levelY The offset between the quantization parameter Qp of the chrominance component Cb or Cr cb(cr) and the information of slice_cb(cr)_qp_offset can be obtained for each chrominance component Cb or Cr.
[0191] [Equation 14]
[0192] Qp cb(cr) = Qp Y + slice_cb(cr)_qp_offset
[0193] Hereinafter, a method for signaling differential quantization parameters considering the SUCO scheme will be described. The SUCO scheme may be a scheme for improving coding performance by changing the coding / decoding order of coding units. That is, according to the SUCO scheme, when the partitioning direction of the first coding unit is the vertical direction, the coding / decoding order of the partitioned second coding unit can be determined as the order from left to right or the order from right to left of the coding units. Details of the SUCO scheme will be described below with reference to Figure 2a Describe the details of the SUCO scheme.
[0194] According to the SUCO scheme, neighboring blocks (e.g., neighboring coding units or neighboring quantization groups) referred to for obtaining predicted quantization parameters may change according to the coding order. Here, a quantization group represents a data unit for determining quantization parameters and may include at least one coding unit. The quantization group may be a coding unit greater than or equal to a coding unit having a specific depth, a specific area, or a specific size. For example, all left blocks, upper blocks, and right blocks of the current coding unit may be used for reference. In this case, the quantization parameter QP of the current coding unit can be derived according to Equation 15 below.
[0195] [Equation 15]
[0196] QP = pred QP + delta QP
[0197] pred QP may be the predicted quantization parameter of the current coding unit, and delta QP may be the differential quantization parameter of the current coding unit. pred QP can be predicted by using the QP of at least one of the left quantization group, the upper quantization group, or the right quantization group. When the QP of the left quantization group, the upper quantization group, or the right quantization group is not available, pred QP can be predicted by using prev QP. prev QP may be the quantization parameter of the last coding unit of the previous quantization group in the coding (decoding) order. When prev QP does not exist, the predicted quantization parameter can be obtained by using the quantization parameter at the slice level (slice QP). At this time, pred QP can be obtained according to the following various embodiments.
[0198] According to an embodiment, when the coding order is recognized as the order from the right coding unit to the left coding unit, the predicted quantization parameter pred QP can be obtained according to Equation 16 below.
[0199] [Equation 16]
[0200] pred QP = (QP_above + QP_right + 1) / 2
[0201] Here, QP_above may be the quantization parameter of the coding unit above the current coding unit, and QP_right may be the quantization parameter of the coding unit on the right side of the current coding unit. Additionally, when the coding order is recognized as the order from the left coding unit to the right coding unit, the predicted quantization parameter pred QP can be obtained according to Equation 17 below.
[0202] [Equation 17]
[0203] pred QP = (QP_above + QP_left + 1) / 2
[0204] According to another embodiment, when it is recognized that the SUCO scheme will be used, the predicted quantization parameter pred QP can be obtained according to Equation 18 below.
[0205] [Equation 18]
[0206] pred QP = (QP_above + QP_right + QP_left + QP_prev + 2) / 4
[0207] Optionally, when it is recognized that the SUCO scheme will be used, the predicted quantization parameter pred QP can be obtained according to Equation 19 below.
[0208] [Equation 19]
[0209] pred QP = (QP_above + QP_right + QP_left + 1) / 3
[0210] According to another embodiment, when the left block is available (i.e., when there is a left quantization group and the left quantization group is encoded first), the predicted quantization parameter pred QP can be obtained according to Equation 20 below.
[0211] [Equation 20]
[0212] pred QP = (QP_above + QP_left + 1) / 2
[0213] In addition, when the left block is not available (when there is no left quantization group and the left quantization group is not encoded first), the predicted quantization parameter pred QP can be obtained according to Equation 21 below.
[0214] [Equation 21]
[0215] pred QP = (QP_abOve + QP_right + 1) / 2
[0216] According to another embodiment, when the right block is available (i.e., when there is a right quantization group and the right quantization group is encoded first), the predicted quantization parameter pred QP can be obtained according to Equation 22 below.
[0217] [Equation 22]
[0218] pred QP = (QP_above + QP_right + 1) / 2
[0219] When the right block is not available (when there is no right quantization group and the right quantization group is not encoded first), the predicted quantization parameter pred QP can be obtained according to Equation 23 below.
[0220] [Equation 23]
[0221] pred QP = (QP_above + QP_left + 1) / 2
[0222] According to another embodiment, the blocks can be searched in the order of left block → above block → right block to obtain the predicted quantization parameter pred QP by using the quantization parameters of the available quantization groups.
[0223] For example, the predicted quantization parameter pred QP can be obtained according to Equation 24 below.
[0224] [Equation 24]
[0225] pred QP = (Avail_1_QP + Avail_2_QP + 1) / 2
[0226] When the number of available quantization groups is equal to or less than 1, the predicted quantization parameter pred QP can be obtained by using prev QP. In this case, the order in which the blocks are searched can be one of the orders of up → left → right, left → up → right, right → up → left, left → right → up, and right → left → up.
[0227] According to another embodiment, the predicted quantization parameter pred QP can be obtained based on the reliability of the left block and the above block according to a weighted sum. For example, the predicted quantization parameter pred QP can be obtained according to Equation 25 below.
[0228] [Equation 25]
[0229] pred QP = (N * QP_above + M * QP_left + L * QP_right + (N + M + L) / 2) / (N + M + L)
[0230] (where N, M, and L are natural numbers)
[0231] In this case, N, M, and L can be determined according to reliability. For example, the predicted quantization parameter pred QP can be obtained according to Equation 26 below.
[0232] [Equation 26]
[0233] pred QP = (2 * QP_above + QP_left + QP_right + 2) / 4
[0234] As an example of determining reliability, reliability can be determined based on the similarity between the area of the current coding unit and the areas of neighboring blocks.
[0235] As an example of determining reliability, reliability can be determined according to the prediction modes (intra mode or inter mode) of the current coding unit and neighboring blocks.
[0236] As an example of determining reliability, when the current coding unit has been encoded (decoded) using a predefined coding (decoding) tool and the neighboring blocks have also been encoded (decoded) using the predefined coding (decoding) tool, the neighboring blocks can be set to have high reliability.
[0237] For example, when the current coding unit is encoded (decoded) according to the skip mode, merge mode, affine mode, or MMVD mode in the inter mode, and there is a neighboring block among the multiple neighboring blocks that is encoded (decoded) according to the skip mode, merge mode, affine mode, or MMVD mode, this neighboring block can be set to have high reliability or the QP of this neighboring block can be preferentially used compared to the QPs of other blocks. The affine mode refers to a mode in which motion compensation based on an affine model is used for inter prediction. The MMVD mode refers to a mode in which new motion vector candidates are generated by setting indices for the motion vectors of neighboring blocks and a predefined motion vector difference (MVD), and then the motion information of the current coding unit is derived based on the motion vector candidates.
[0238] In addition, according to various embodiments, the image encoder 155 can generate a syntax element representing a differential quantization parameter. Various embodiments will be described below with reference to FIGS. 3A to Figure 5 Describe various embodiments.
[0239] Hereinafter, a method of signaling a predefined area unit will be described, where the differential quantization parameter of the coding unit is signaled in the predefined area unit.
[0240] The image encoder 155 may generate information on a predefined area unit included in an SPS unit, a PPS unit, a slice unit, a parallel block unit, or a parallel block group unit. In this case, the information on the predefined area unit may represent a predefined area value, a value obtained by representing the predefined area value as a multiplier of 2 (or a value obtained by applying log2 to the predefined area value), an index value of a table having area values, or a difference from a specific value.
[0241] According to an embodiment, the information delta_QP_area on the predefined area value may be represented as a multiplier of 2. For example, the information delta_QP_area on the predefined area value may correspond to 7. In this case, the predefined area may be 2^7 = 128, and the coding unit for signaling the differential quantization parameter determined according to the predefined area unit may be 8×16, 16×8, etc. Further, the information delta_QP_area on the predefined area value corresponds to 8. In this case, the predefined area may be 2^8 = 256, and the coding unit for signaling the differential quantization parameter determined according to the predefined area unit may be 16×16, 8×32, 32×8, etc. Further, the information delta_QP_area on the predefined area value may correspond to 9. In this case, the predefined area may be 2^9 = 512, and the coding unit for signaling the differential quantization parameter determined according to the predefined area unit may be 32×16, 16×32, 64×8, 8×64, etc. Further, the information delta_QP_area on the predefined area value may correspond to 10. In this case, the predefined area may be 2^10 = 1024, and the coding unit for signaling the differential quantization parameter determined according to the predefined area unit may be 32×32, 16×64, 64×16, 128×8, 8×128, etc.
[0242] According to an embodiment, the information delta_QP_area on the predefined area value may correspond to an index value representing one of the area values shown in Tables 3 and 4.
[0243] [Table 3]
[0244] Figure 4c 0 1 2 3 ... Index 128 256 512 ... ...
[0245] [Table 4]
[0246] [[ID= 0 1 2 3 ... 256 512 1024 ... ...
[0247] However, the correspondence between the index value and the area value is not limited to Tables 3 and 4 and may be defined differently.
[0248] According to an embodiment, the information delta_QP_area regarding a predefined area value may represent a difference from a value related to the size of a minimum coding unit. For example, when the size of the minimum coding unit is 4×4, the value log2_min_cu_area represented by this area may be log2(16) = 4, and when the predefined area value is 256 (e.g., when the size is 16×16), the value log2_delta_qp_area represented by this area may be log2(256) = 8. Thus, the information delta_QP_area regarding the predefined area value may correspond to log2_delta_qp_area - log2_min_cu_area. For example, the information delta_QP_area regarding the predefined area value may correspond to 8 - 4 = 4.
[0249] According to an embodiment, the information delta_QP_area regarding a predefined area value may represent a difference from a value related to the minimum differential quantization parameter area (Minimum delta QP area). The minimum differential quantization parameter area may indicate the area of the smallest block for signaling a differential quantization parameter. When the minimum differential quantization parameter area (size) is 16×16 (256), the value represented by this area may be log2(256) = 8, and when the predefined area value is 256 (e.g., when the size is 16×16), the value represented by this area may be log2(256) = 8. Thus, the information delta_QP_area regarding the predefined area value may correspond to log2_delta_qp_area - log2_min_delta_qp_area. For example, the information delta_QP_area regarding the predefined area value may indicate 8 - 8 = 0.
[0250] According to an embodiment, the information delta_QP_area regarding a predefined area value may represent a difference from a value related to the size of a maximum coding unit (or coding tree unit). For example, when the size of the maximum coding unit is 128×128, the value represented by this area may be log2(16384) = 14, and when the predefined area value is 256 (e.g., when the size is 16×16), the value represented by this area may be log2(256) = 8. Thus, the information delta_QP_area regarding the predefined area value may correspond to log2_max_cu_area - log2_delta_qp_area. For example, the information delta_QP_area regarding the predefined area value may correspond to 14 - 8 = 6.
[0251] According to an embodiment, information delta_QP_area regarding a predefined area value may represent a difference from a value related to a maximum differential quantization parameter area Maximum delta QP area. In this case, the maximum differential quantization parameter area may indicate an area of a largest block that signals a differential quantization parameter. For example, when the maximum differential quantization parameter area (size) is 64×64 (4096), the value represented by this area may be 12, log2(4096) = 12, and when the predefined area value is 256 (e.g., when the size is 16×16), the value represented by this area may be log2(256) = 8. Thus, information delta_QP_area regarding the predefined area value may correspond to log2_max_delta_qp_area - log2_delta_qp_area. For example, information delta_QP_area regarding the predefined area value may correspond to 12 - 8 = 4.
[0252] Hereinafter, a method of signaling a differential quantization parameter at the frame level will now be described.
[0253] Hereinafter, when a differential quantization parameter delta QP is signaled, a QP may be used in a specific frame without changing the QP for each coding unit. In this case, the following processing may be performed at each frame level.
[0254] The image encoder 155 may perform binary arithmetic coding on a first binary bit among binary bits representing information regarding a differential quantization parameter delta QP at the frame level based on a context model, thereby obtaining binary bits after binary arithmetic coding. At this time, the first binary bit may represent whether the differential quantization parameter delta QP is 0.
[0255] When a quantization parameter of a current frame that is the same as a quantization parameter of a previous frame is obtained, the image encoder 155 may perform binary arithmetic coding on the first binary bit representing that the differential quantization parameter is 0 based on the context model to obtain binary bits after binary arithmetic coding. When there is a differential quantization parameter, the image encoder 155 may perform binary arithmetic coding on the first binary bit representing that the differential quantization parameter is not 0 based on the context model to obtain binary bits after binary arithmetic coding. At this time, the image encoder 155 may perform binary arithmetic coding on a syntax element representing a value of the differential quantization parameter that is not 0 based on the context model.
[0256] The image encoder 155 may update or maintain the probability information regarding the differential quantization parameter delta QP at the frame level (where the first binary bit indicates whether the differential quantization parameter is 0, and the remaining binary bits indicate the value of the differential quantization parameter), and generate the value of default_zero_dqp_signal at the frame level based on the probability information. For example, when the value of default_zero_dqp_signal is 1, the image encoder 155 may update the probability that the bit included in the information regarding the differential quantization parameter delta QP will be 0 to a value close to 1. When the value of default_zero_dqp_signal is 0, the probability used in the previous frame may be used. At this time, two probability tables may be used. That is, the probability table when the value of default_zero_dqp_signal is 1 and the probability table when the value of default_zero_dqp_signal is 0 may be distinguished and used.
[0257] In addition, in some cases, the transformation operation may be omitted, and in these cases, the quantized coefficients may be coefficients in the spatial domain. The image encoder 155 may generate information of the residual block of the current coding unit without performing the transformation operation, where the information includes at least one quantized coefficient (i.e., a coefficient in the spatial domain).
[0258] The bitstream generator 170 may generate a bitstream, where the bitstream includes a syntax element representing the differential quantization parameter for the current coding unit and the residual information of the current coding unit.
[0259] is a flowchart showing an image coding method according to various embodiments.
[0260] In operation S155, the image coding device 150 may obtain at least one coding unit including the current coding unit by hierarchically partitioning the current image based on the partitioning shape mode of the current image.
[0261] In operation S160, the image coding device 150 may obtain at least one coefficient included in the current coding unit.
[0262] In operation S165, the image coding device 150 may obtain at least one transform coefficient by performing a transform on at least one coefficient included in the current coding unit.
[0263] In operation S170, the image coding device 150 may obtain at least one quantized transform coefficient and the quantization parameter for the current coding unit by performing quantization on the at least one transform coefficient.
[0264] In operation S175, the image encoding device 150 may obtain a differential quantization parameter for the current coding unit based on the predicted quantization parameter and the quantization parameter for the current coding unit.
[0265] In operation S180, the image encoding device 150 may generate a syntax element representing the differential quantization parameter for the current coding unit based on the area of a predefined differential quantization parameter signaling unit. The syntax element may refer to information about the image quantization parameter or coefficient included in the image and included in the bitstream. That is, the syntax element may indicate an element of the data represented in the bitstream.
[0266] When the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and the size of the current coding unit is greater than the maximum size of the transform unit, the image encoding device 150 may generate a syntax element representing the differential quantization parameter, where the differential quantization parameter will be included in the information related to the first encoded transform unit among the multiple transform units divided from the current coding unit. When the area of the current coding unit is less than the area of the predefined differential quantization parameter signaling unit, the image encoding device 150 may generate a syntax element representing the differential quantization parameter, where the differential quantization parameter will be included in the information related to the first transform unit of the first coding unit among the multiple coding units included in the predefined coding unit including the current coding unit. When the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and the size of the current coding unit is less than or equal to the maximum size of the transform unit, the image encoding device 150 may generate a syntax element representing the differential quantization parameter for the current coding unit based on whether at least one non-zero transform coefficient is included in the transform unit having the same size as the current coding unit.
[0267] In operation S185, the image encoding device 150 may generate residual information for the current coding unit, where the residual information includes information about at least one quantized transform coefficient.
[0268] In operation S190, the image encoding device 150 may generate a bitstream including the residual information of the current coding unit and the syntax element.
[0269] is a block diagram of an image encoder according to various embodiments.
[0270] The image encoder 7000 according to various embodiments may perform the tasks executed by the image encoder 155 and the bitstream generator 170 of the image encoding device 150 to encode image data.
[0271] That is, the intra predictor 7200 may perform intra prediction on each block of the current image 7050, and the inter predictor 7150 may perform inter prediction on each block by using the current image 7050 and the reference images obtained from the reconstructed picture buffer 7100.
[0272] By subtracting the prediction data for each block output from the intra predictor 7200 or the inter predictor 7150 from the data of the coded block for the current image 7050, residual data may be generated, and the transformer 7250 and the quantizer 7300 may perform transformation and quantization on the residual data and output the quantized transform coefficients for each block. The inverse quantizer 7450 and the inverse transformer 7500 may perform inverse quantization and inverse transformation on the quantized transform coefficients to recover the residual data in the spatial domain. The reconstructed residual data in the spatial domain may be added to the prediction data for each block output from the intra predictor 7200 or the inter predictor 7150, and thus may be reconstructed into the spatial domain data for each block of the current image 7050. The deblocking unit 7550 and the SAO executor 7600 may perform in-roof filtering on the reconstructed spatial domain data to generate a filtered reconstructed image. The generated reconstructed image may be stored in the reconstructed picture buffer 7100. The reconstructed image stored in the reconstructed picture buffer 7100 may be used as a reference image for inter prediction of other images. The entropy encoder 7350 may perform entropy coding on the quantized transform coefficients, and the entropy-coded coefficients may be output to the bitstream 7400.
[0273] To apply the image encoder 7000 according to various embodiments to the image coding device 150, the phased tasks of the image encoder 7000 according to various embodiments may be performed for each block. For example, the task of the quantizer 7300 may correspond to the task of the quantizer 160. The syntax structure of a partitioning unit for signaling differential quantization parameters according to an embodiment is shown. Here, the syntax structure may refer to one or more syntax elements represented together in a bitstream according to a predefined order. Here, the partitioning unit refers to a coded unit that is partitioned, and after obtaining a partitioning flag indicating whether partitioning is performed from the partitioning unit, it may be determined whether to continue partitioning. At this time, the partitioning unit may be recursively (hierarchically) partitioned based on partitioning information such as the partitioning flag.
[0274] Refer to , the image decoding device 100 may obtain the syntax element cu_qp_delta for the differential quantization parameter from the syntax structure 200 at the partition unit level. After the image decoding device 100 obtains the partition flag btt_split_flag from the bitstream, the image decoding device 100 may obtain the syntax element cu_qp_delta from the bitstream. At this time, the image decoding device 100 may obtain the syntax element cu_qp_delta for each specific area unit cuQpDeltaArea. At this time, information about the specific area unit cuQpDeltaArea may be obtained in units of SPS, PPS, slice, parallel block, or parallel block group. The information about the specific area unit cuQpDeltaArea may represent an area value, a value obtained by expressing the area value as a multiplier of 2, or an index value of a table having a correspondence between various area values and indexes. Optionally, the specific area may be determined as a value predetermined between the image decoding device 100 and the image encoding device 150. When a block extends across the picture boundary, the area for obtaining the syntax element cu_qp_delta may be the area of the block, and the area includes the external area of the picture. However, the area for obtaining the syntax element cu_qp_delta may be limited to the internal area of the picture. In the case where the image decoding device 100 obtains the partition flag btt_split_flag for the current coding unit (x0, y0) and the partition flag btt_split_flag indicates that the current coding unit (x0, y0) is no longer partitioned (btt_split_flag[x0][y0] == 0), when the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is greater than or equal to the specific area cuQpDeltaArea for signaling the differential quantization parameter, the image decoding device 100 may obtain the syntax element cu_qp_delta from the bitstream.
[0275] In addition, in the case where the image decoding device 100 obtains a partitioning flag btt_split_flag for the current coding unit (x0, y0) and the partitioning flag btt_split_flag indicates that the current coding unit (x0, y0) is to be partitioned (elseif), when the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is twice (+1) the specific area cuQpDeltaArea for signaling the differential quantization parameter and the partitioning type of the current coding unit (x0, y0) is a ternary partitioning type (btt_split_type[x0][y0] == 1), or when the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is equal to the specific area cuQpDeltaArea for signaling the differential quantization parameter, the image decoding device 100 may obtain the syntax element cu_qp_delta from the bitstream.
[0276] and shows the syntax structure of transform units and partitioning units for signaling differential quantization parameters according to an embodiment.
[0277] Referring and , the image decoding device 100 may determine the value of cuQpDeltaCode according to predefined conditions in the syntax structure 210 at the partitioning unit level. The image decoding device 100 may obtain CBF from the syntax structure 220 at the transform unit level, identify the value of cuQpDeltaCode (and the value of CBF), and obtain the syntax element cu_qp_delta from the bitstream according to conditions based on the identified value of cuQpDeltaCode.
[0278] Referring , when the value of cu_qp_delta_enabled_flag is 1 and the value of sps_dquant_flag is 1 (cu_qp_delta_enabled_flag && sps_dquant_flag), the partitioning flag btt_split_flag indicates that the current coding unit (x0, y0) is no longer partitioned, and the area of the current coding unit (x0, y0), log2CbWidth + log2CbHeight, is greater than or equal to a specific area cuQpDeltaArea for signaling differential quantization parameters, the image decoding device 100 may determine the value of cuQpdeltaCode to be 1. Here, cu_qp_delta_enabled_flag may be a flag for signaling whether differential quantization parameters at the coding unit level are enabled, and sps_dquant_flag may be a flag for signaling whether to signal differential quantization parameters according to a predefined differential quantization parameter signaling scheme obtained at the SPS level. Here, in some cases, the predefined differential quantization parameter signaling scheme refers to a scheme for signaling differential quantization parameters regardless of the CBF value of the transform unit.
[0279] In the case where the partitioning flag indicates that the current coding unit (x0, y0) is partitioned (else if), when the area of the current coding unit (x0, y0), log2CbWidth + log2CbHeight, is twice (+1) the specific area cuQpDeltaArea for signaling differential quantization parameters and the partitioning type of the current coding unit (x0, y0) is a ternary partitioning type (btt_split_type[x0][y0] == 1), or when the area of the current coding unit (x0, y0), log2CbWidth + log2CbHeight, is equal to the specific area cuQpDeltaArea for signaling differential quantization parameters, the image decoding device 100 may determine the value of cuQpdeltaCode to be 2.
[0280] Refer to , when the value of cuQpdeltaCode is 1, when one of the values of CBF(Y,U,V) cbf_luma, cbf_cb, and cbf_cr for the current transform unit is 1, the image decoding device 100 may obtain the syntax element cu_qp_delta from the bitstream. When the values of CBF(Y,U,V) cbf_luma, cbf_cb, and cbf_cr are all 0, the image decoding device 100 may not obtain the syntax element cu_qp_delta from the bitstream.
[0281] When the value of cuQPDeltaCode is 2, the image decoding device 100 may obtain the CBF of the transform unit having the same size as the first coding unit among the multiple coding units divided from the current coding unit, and then obtain the syntax element cu_qp_delta from the bitstream, regardless of the values of the CBFs cbf_luma, cbf_cb, and cbf_cr of the current transform unit. At this time, after obtaining the syntax element cu_qp_delta from the first coding unit, the image decoding device 100 may determine the value of cuQpdeltaCode as 0, and thus, the image decoding device 100 may not obtain the syntax element cu_qp_delta from the bitstream for the remaining coding units among the multiple coding units divided from the current coding unit except for the first coding unit. In this case, the differential quantization parameter of the remaining coding units may be the syntax element cu_qp_delta obtained first.
[0282] However, the present disclosure is not limited thereto, and in the case where the value of cuQPDeltaCode is 2, when at least one of the values of the CBFs cbf_luma, cbf_cb, and cbf_cr of the current coding unit is 1, the image decoding device 100 may obtain the syntax element cu_qp_delta from the bitstream. For example, when the values of the CBFs cbf_luma, cbf_cb, and cbf_cr of the first coding unit among the multiple coding units divided from the current coding unit are all 0, the image decoding device 100 may obtain the syntax element cu_qp_delta from the second coding unit. Since the value of the CBF of the first coding unit is 0, the first coding unit does not require a quantization parameter, and thus, when at least one of the CBF values of the coding units is 1, the syntax element cu_qp_delta may be obtained from the corresponding coding unit.
[0283] Shows the syntax structure of the partitioning unit, coding unit, and transform unit for signaling the differential quantization parameter according to an embodiment.
[0284] Refer to , the image decoding device 100 can determine the value of cuQpDeltaCode according to predefined conditions in the syntax structure 230 at the partition unit level. The image decoding device 100 can obtain a transform unit having the same size as the coding unit according to the maximum size of the transform unit or multiple transform units from the coding unit in the coding unit syntax structure 240 (at this time, the syntax elements included in the transform unit syntax structure are obtained), and then obtain CBF cbf_luma, cbf_cb, and cbf_cr from the transform unit syntax structure 250, identify the value of cuQpDeltaCode (and the value of CBF), and obtain the syntax element cu_qp_delta from the bitstream according to the condition based on the identified value of cuQpDeltaCode.
[0285] Refer to , when the value of cu_qp_delta_enabled_flag in the syntax structure 230 at the partition unit level is 1 and the value of sps_dquant_flag is 1 (cu_qp_delta_enabled_flag && sps_dquant_flag), the splitting flag btt_split_flag value of the current coding unit (x0, y0) indicates that the current coding unit (x0, y0) is no longer split (btt_split_flag[x0][y0] == 0) and the value of cuQpDeltaCode is not 2, the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is greater than or equal to the area cuQPDeltaArea of the predefined differential quantization parameter signaling unit (log2CbWidth + log2CbHeight >= cuQpDeltaArea), and the width log2CbWidth or height log2CbHeight of the current coding unit (x0, y0) is greater than 6 which is the maximum size of the transform unit (log2CbWidth > 6 || log2CbHeight > 6), the image decoding device 100 can set the value of cuQpdeltaCode of the current coding unit (x0, y0) to 2.
[0286] In the syntax structure 230 at the partition unit level, when the value of cu_qp_delta_enabled_flag is 1 and the value of sps_dquant_flag is 1 (cu_qp_delta_enabled_flag && sps_dquant_flag), and the value of the partition flag btt_split_flag of the current coding unit (x0, y0) indicates that the current coding unit (x0, y0) is no longer partitioned (btt_split_flag[x0][y0] == 0), and the value of cuQpDeltaCode is not 2, and the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is greater than or equal to the area cuQPDeltaArea of the predefined differential quantization parameter signaling unit (log2CbWidth + log2CbHeight >= cuQpDeltaArea), and the width log2CbWidth and height log2CbHeight of the current coding unit (x0, y0) are less than 6 which is the maximum size of the transform unit (else), the image decoding device 100 may set the value of cuQPDeltaCode to 1.
[0287] At this time, the reason for identifying whether the value of cuQPDeltaCode is not 2 may be that there is a coding unit with an area equal to the area of the predefined differential quantization parameter signaling unit among the coding units partitioned and obtained from the coding unit corresponding to twice the predefined differential quantization parameter signaling unit according to the ternary partition type. And when it is not identified whether the value of cuQPDeltaCode for the coding unit is 2, the value of cuQPDeltaCode may be set to 1 again.
[0288] When the value of cuQPDeltaCode is 1, information about the differential quantization parameter can be signaled only when the value of the coding block flag of the transform unit is 1. And when the value of cuQPDeltaCode is 2, information about the differential quantization parameter can be signaled through the information related to the first decoded transform unit included in the coding unit of the differential quantization parameter signaling unit, regardless of the value of the coding block flag of the transform unit.
[0289] In addition, the image decoding device 100 may set the value of isCuQPDeltaCoded to 0. Only when the value of isCuQPDeltaCoded is 0, the differential quantization parameter can be obtained from the information about the corresponding transform unit. By setting the value of the differential quantization parameter to 1 after obtaining the differential quantization parameter, the differential quantization parameter for the differential quantization parameter signaling unit can be obtained once, and the differential quantization parameter may no longer be obtained from the information about the subsequent transform units.
[0290] In the syntax structure 230 at the partition unit level, when the value of cu_qp_delta_enabled_flag is 1 and the value of sps_dquant_flag is 1 (cu_qp_delta_enabled_flag && sps_dquant_flag), when the value of the partition flag btt_split_flag of the current coding unit (x0, y0) indicates that the current coding unit (x0, y0) is to be partitioned (else if) and the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is twice (+1) the area cuQpDeltaArea of the predefined differential quantization parameter signaling unit, the partition type of the current coding unit (x0, y0) is the ternary partition type (btt_split_type[x0][y0] == 1), or when the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is equal to the area cuQpDeltaArea of the predefined differential quantization parameter signaling unit and the value of cuQpdeltaCode is not 2, the image decoding device 100 may set the value of cuQpdeltaCode to 2. Additionally, the image decoding device 100 may set the value of isCuQPDeltaCoded to 0.
[0291] When the value of the partition flag btt_split_flag of the current coding unit (x0, y0) is 1, the image decoding device 100 may obtain the coding units with a lower depth included in the current coding unit (x0, y0) according to the partition shape mode SplitMode[x0][y0] determined based on the partition type and the partition direction. At this time, the syntax elements of the coding unit syntax structure 240 at the coding unit level related to the coding units with a lower depth can be obtained. That is to say, the syntax elements of the syntax structure 230 at the partition unit level can be obtained recursively.
[0292] For example, when the value of the partitioning flag btt_split_flag of the current coding unit (x0, y0) is 1, and when the partitioning shape mode SplitMode[x0][y0] determined according to the partitioning type and partitioning direction is the mode of horizontal ternary partitioning (SplitMode[x0][y0] == SPLIT_TT_HOR), the image decoding device 100 can obtain the syntax elements of the syntax structure 230 at the partitioning unit level for the three coding units [x0, y0], [x0, y1], and [x0, y2] with a lower depth included in the current coding unit (x0, y0). At this time, the value of cuQpDeltaCode set in the current coding unit (x0, y0) can be transmitted to the syntax structure 230 at the partitioning unit level.
[0293] In addition, when the value of the partitioning flag btt_split_flag of the current coding unit (x0, y0) is 0 (else), the image decoding device 100 can obtain the syntax elements of the syntax structure 240 at the coding unit level of the current coding unit (x0, y0) that is no longer partitioned.
[0294] Referring to , the image decoding device 100 can obtain from the bitstream a flag cbf_all indicating whether the current coding unit includes at least one non-zero transform coefficient of a component, and when the current coding unit includes at least one non-zero transform coefficient of a component (if (cbf_all)), the image decoding device 100 can set the value of isSplit indicating whether the current coding unit will be partitioned into multiple sub-blocks (transform units) according to 6 which is the maximum size of the transform unit. That is, when the width log2CbWidth of the current coding unit is greater than 6 which is the maximum size of the transform unit, or when the height log2CbHeight of the current coding unit is greater than 6 which is the maximum size of the transform unit, the image decoding device 100 can set the value of isSplit to 1, otherwise, the image decoding device 100 can set the value of isSplit to 0.
[0295] In addition, the image decoding device 100 can determine the sizes log2TbWidth and log2TbHeight of the transform unit based on 6 which is the maximum size of the transform unit and the sizes log2CbWidth and log2CbHeight of the current coding unit. For example, when the width Log2CbWidth of the current coding unit is greater than 6 which is the maximum size of the transform unit, the image decoding device 100 can determine the width of the transform unit to be 6 which is the maximum size of the transform unit, otherwise, the image decoding device 100 can determine the width of the transform unit to be the width of the current coding unit. Similarly, the image decoding device 100 can determine the height of the transform unit.
[0296] The image decoding device 100 may obtain a transform unit based on a reference coordinate (x0, y0) and the sizes log2TbWidth and log2TbHeight of the transform unit. That is, the image decoding device 100 may obtain the syntax elements of the syntax structure 250 at the transform unit level. At this time, the value of cuQpDeltaCode of the current coding unit may be transmitted.
[0297] The image decoding device 100 may additionally obtain a transform unit based on the conditions of the sizes log2CbWidth and log2CbHeight of the current coding unit and 6 which is the maximum size of the transform unit. That is, when the width or size of the current coding unit is greater than 6 which is the maximum size of the transform unit, the image decoding device 100 may obtain additional transform units included in the current coding unit. At this time, the value of cuQpDeltaCode of the current coding unit may be transmitted.
[0298] Refer to , the image decoding device 100 may obtain CBF cbf_luma, cbf_cb_, and cbf_cr for each component of the transform unit in the syntax structure 250 at the transform unit level. In the case where the value of cu_qp_delta_enabled_flag is 1, and the value of sps_dquant_flag is 0 (!sps_dquant_flag) or the value of cuQpDeltaCode is 1 and the value of isdeltaCoded is 0, when at least one of the values of CBF cbf_luma, cbf_cb_, and cbf_cr for each component is 1 (cbf_luma||cbf_cb||cbf_cr), the image decoding device 100 may obtain the syntax element information for cu_qp_delta from the bitstream.
[0299] In the case where the value of cu_qp_delta_enabled_flag is 1, the value of cuQpDeltaCode is 2, and the value of isdeltaCoded is 0, the image decoding device 100 may obtain the syntax element information for cu_qp_delta from the bitstream. At this time, the image decoding device 100 may obtain the syntax element information for cu_qp_delta from the bitstream regardless of the values of CBF cbf_luma, cbf_cb_, and cbf_cr for each component.
[0300] According to In the syntax structure shown in the figure, the image decoding device 100 can obtain syntax element information for differential quantization parameters at the level of coding units. At this time, the image decoding device 100 can obtain syntax element information for differential quantization parameters based on the size of a predefined differential quantization parameter signaling unit. For example, when the size of the current coding unit that is no longer divided is larger than the size of the predefined differential quantization parameter signaling unit, when the current coding unit is divided into multiple sub-blocks (transformation units) including coefficients, the image decoding device 100 can obtain the syntax element information for cu_qp_delta in the syntax structure 250 of the first transformation unit. At this time, the image decoding device 100 can obtain the syntax element information for cu_qp_delta regardless of the value of CBF of the corresponding transformation unit. The image decoding device 100 does not obtain the syntax element information for cu_qp_delta for the remaining transformation units other than the first transformation unit among the multiple transformation units, and in this case, can obtain the differential quantization parameters for the remaining transformation units based on the cu_qp_delta obtained in the first transformation unit.
[0301] In addition, for a coding unit with a size smaller than the size of the predefined differential quantization parameter signaling unit, when the size of the predefined coding unit including the corresponding coding unit is equal to the size of the predefined differential quantization parameter signaling unit, or when the size of at least one sub-block (multiple coding units including the current coding unit) generated by division is smaller than the size of the corresponding coding unit (divided according to the ternary division type) and the size of the predefined coding unit is twice the size of the predefined differential quantization parameter signaling unit, the image decoding device 100 can obtain the syntax element information for cu_qp_delta from the bitstream in the syntax structure 250 at the transformation unit level of the first transformation unit of the first coding unit among the multiple sub-blocks. At this time, the image decoding device 100 can obtain the syntax element information for cu_qp_delta regardless of the value of CBF of the corresponding transformation unit. The image decoding device 100 does not obtain the syntax element information for cu_qp_delta for the remaining transformation units other than the first transformation unit of the first coding unit among the multiple coding units and for the remaining coding units other than the first coding unit, and in this case, can obtain the differential quantization parameters for the remaining coding units based on the cu_qp_delta obtained in the first transformation unit of the first coding unit.
[0302] In addition, when referring to and In the above description given, it is assumed that the maximum size of the transform unit is 64 (the value obtained by applying log2 to 64 is 6). However, those of ordinary skill in the art will understand that the maximum size of the transform unit can be one of the multipliers of 2.
[0303] is a diagram for describing a method of signaling differential quantization parameters according to the syntax structure of a partitioning unit, an encoding unit, and a transform unit for signaling differential quantization parameters as shown in in which the differential quantization parameters are signaled.
[0304] Referring to , the image decoding device 100 can signal differential quantization parameters for the encoding unit based on the area of a predefined differential quantization parameter signaling unit.
[0305] For example, in the case where the area of the non-partitioned encoding unit 260 is greater than or equal to the area of the predefined differential quantization parameter signaling unit, when the size of the encoding unit 260 is less than or equal to the maximum size of the transform unit, the image decoding device 100 can obtain the syntax element of the differential quantization parameter for the encoding unit 260 from the information about the transform unit having the same size as the encoding unit 260. At this time, the image decoding device 100 can obtain the coding block flag from the information about the transform unit, and the image decoding device 100 can obtain the syntax element for the differential quantization parameter only when the value of the coding block flag indicates 1, and when the value of the coding block flag indicates 0, the image decoding device 100 may not obtain the syntax element for the differential quantization parameter.
[0306] In the case where the area of the non-partitioned encoding unit 270 is greater than or equal to the area of the predefined differential quantization parameter signaling unit, when the size of the encoding unit 270 is greater than the maximum size of the transform unit, the image decoding device 100 can partition the encoding unit 270 to obtain a plurality of transform units including a transform unit 275 having the maximum size of the transform unit, and obtain the syntax element of the differential quantization parameter for the encoding unit 270 from the information about the first decoded transform unit 275 among the plurality of transform units.
[0307] In addition, in a case where the area of a lower-depth coding unit 285 divided from a higher-depth coding unit 280 according to various division types (e.g., a ternary division type or a binary division type) is smaller than the area of a predefined differential quantization parameter signaling unit, when the area of the coding unit 280 is equal to the area of the predefined differential quantization parameter signaling unit, the image decoding device 100 may obtain a syntax element of a differential quantization parameter for the coding unit 280 from information related to the first decoded transform unit among the transform units included in the first decoded coding unit 285 among the two or three coding units included in the coding unit 280. At this time, the image decoding device 100 may obtain the syntax element of the differential quantization parameter for the coding unit 280 regardless of the value of the coding block flag of the corresponding transform unit. At this time, the coding unit 285 may be further divided into lower-depth coding units, or may no longer be divided. The transform unit may be obtained from the coding unit that is no longer divided. In this case, the transform unit may have the same size as the coding unit that is no longer divided, but the present disclosure is not limited thereto.
[0308] In a case where the area of a lower-depth coding unit 295 having a small size among the lower-depth coding units divided from a higher-depth coding unit 290 according to the ternary division type is smaller than the area of a predefined differential quantization parameter signaling unit, when the area of the coding unit 290 is twice the area of the predefined differential quantization parameter signaling unit, the image decoding device 100 may obtain a syntax element of a differential quantization parameter for the coding unit 290 from information related to the first decoded transform unit among the transform units included in the first decoded coding unit 295 among the three coding units included in the coding unit 290. At this time, the image decoding device 100 may obtain the syntax element of the differential quantization parameter for the coding unit 290 regardless of the value of the coding block flag of the corresponding transform unit.
[0309] At this time, the coding unit 295 may be further divided into lower-depth coding units, or may no longer be divided. The transform unit may be obtained from the coding unit that is no longer divided. In this case, the transform unit may have the same size as the coding unit that is no longer divided, but is not limited thereto.
[0310] In a case where it is assumed that decoding is performed without enabling the SUCO scheme, the above description has been referred to given above. However, those of ordinary skill in the art will understand that, unlike when the SUCO scheme is enabled, the first decoded coding unit may be located on the right side of the higher-depth coding units.
[0311] It is a SUCO scheme for describing the encoding (decoding) order between coding units as forward or backward based on the coding order flag according to an embodiment of the present disclosure, and a view available for the right adjacent block according to the encoding (decoding) order based on the SUCO scheme is described.
[0312] Referring to , the largest coding unit 1950 can be divided into a plurality of coding units 1956, 1958, 1960, 1962, 1968, 1970, 1972, 1974, 1980, 1982, 1984 and 1986. The largest coding unit 1950 can correspond to the uppermost node 1900 having a tree structure. In addition, the plurality of coding units 1956, 1958, 1960, 1962, 1968, 1970, 1972, 1974, 1980, 1982, 1984 and 1986 can respectively correspond to a plurality of nodes 1906, 1908, 1910, 1912, 1918, 1920, 1922, 1924, 1930, 1932, 1934 and 1936. The upper coding order flags 1902, 1914 and 1926 representing the coding order in the tree structure can correspond to the arrows 1952, 1964 and 1976, and the lower coding order flags 1904, 1916 and 1928 can correspond to the arrows 1954, 1966 and 1978.
[0313] The upper coding order flag can represent the coding order of the two coding units in the upper position among the four coding units having the same depth. When the upper coding order flag indicates 0, encoding can be performed in the forward direction. Conversely, when the upper coding order flag indicates 1, encoding can be performed in the backward direction.
[0314] Similarly, the lower coding order flag can represent the coding order of the two coding units in the lower position among the four coding units having the same depth. When the lower coding order flag indicates 0, encoding can be performed in the forward direction. Conversely, when the lower coding order flag indicates 1, encoding can be performed in the backward direction.
[0315] For example, since the upper coding order flag 1914 is 0, the coding order between the coding units 1968 and 1970 can be determined to be forward from left to right. In addition, since the lower coding order flag 1916 is 1, the coding order between the coding units 1972 and 1974 can be determined to be backward from right to left.
[0316] According to some embodiments, the upper coding order flag and the lower coding order flag may be set to have the same value. For example, when the upper coding order flag 1902 is determined to be 1, the corresponding lower coding order flag 1904 of the upper coding order flag 1902 may also be determined to be 1. Since the values of the upper coding order flag and the lower coding order flag are determined by 1 bit, the amount of information of the coding order information can be reduced.
[0317] According to some embodiments of the present disclosure, the upper coding order flag and the lower coding order flag of the current coding unit may be determined by referring to at least one of the upper coding order flag or the lower coding order flag of the coding unit applied to a depth lower than the current coding unit. For example, the upper coding order flag 1926 and the lower coding order flag 1928 applied to the coding units 1980, 1982, 1984, and 1986 may be determined based on the lower coding order flag 1916 applied to the coding units 1971 and 1974. Therefore, the upper coding order flag 1926 and the lower coding order flag 1928 may be determined to have the same value as the value of the coding order flag 1916. Since the values of the upper coding order flag and the lower coding order flag are determined from the upper coding unit of the current coding unit, the coding order information may not be obtained from the bitstream. Therefore, the amount of information of the coding order information can be reduced.
[0318] At this time, since the data of the samples included in the neighboring coding unit 1958 that is decoded earlier than the current coding unit 1986 and is located on the right side of the current coding unit 1986 is available, the image decoding device 100 may obtain the prediction parameters of the current coding unit 1986 according to the embodiments of the present disclosure by using the data (preferably, quantization parameters) of the neighboring coding unit 1958 located on the right side of the current coding unit 1986.
[0319] The above refers to FIGS. 1 to The image decoding device 100 and the image encoding device 150 according to various embodiments described above may efficiently signal information about the differential quantization parameter for the current coding unit explicitly through the bitstream according to the size of the coding unit.
[0320] is a flowchart showing an image encoding method according to various embodiments.
[0321] In operation S115, the image encoding device 150 may obtain at least one coding unit including the current coding unit by hierarchically dividing the current image based on the partitioning shape mode of the current image.
[0322] In operation S160, the image encoding device 150 may obtain at least one coefficient included in the current coding unit.
[0323] In operation S165, the image encoding device 150 may obtain at least one transformed coefficient by performing a transform on at least one coefficient included in the current coding unit.
[0324] In operation S170, the image encoding device 150 may obtain at least one quantized transformed coefficient and a quantization parameter for the current coding unit by performing quantization on at least one transformed coefficient.
[0325] In operation S175, the image encoding device 150 may obtain a differential quantization parameter for the current coding unit based on a predicted quantization parameter and the quantization parameter for the current coding unit.
[0326] In operation S180, the image encoding device 150 may generate a syntax element representing the differential quantization parameter for the current coding unit based on the area of a predefined differential quantization parameter signaling unit. The syntax element may refer to information about an image quantization parameter or coefficient included in the bitstream. That is, the syntax element may indicate an element of the data represented in the bitstream.
[0327] When the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and the size of the current coding unit is greater than the maximum size of the transform unit, the image encoding device 150 may generate a syntax element representing the differential quantization parameter, where the differential quantization parameter will be included in information related to the first transform unit to be coded among the multiple transform units divided from the current coding unit. When the area of the current coding unit is less than the area of the predefined differential quantization parameter signaling unit, the image encoding device 150 may generate a syntax element representing the differential quantization parameter, where the differential quantization parameter will be included in information related to the first transform unit of the first coding unit among the multiple coding units included in a predefined coding unit including the current coding unit. When the area of the current coding unit is greater than or equal to the area of the predefined differential quantization parameter signaling unit and the size of the current coding unit is less than or equal to the maximum size of the transform unit, the image encoding device 150 may generate a syntax element representing the differential quantization parameter for the current coding unit based on whether at least one non-zero transformed coefficient is included in a transform unit having the same size as the current coding unit.
[0328] In operation S185, the image encoding device 150 may generate residual information for the current coding unit, where the residual information includes information about the at least one quantized transformed coefficient.
[0329] In operation S190, the image encoding device 150 may generate a bitstream including the residual information of the current coding unit and the syntax element.
[0330] It is a block diagram of an image encoder according to various embodiments.
[0331] The image encoder 7000 according to various embodiments may perform the tasks executed by the image encoder 155 and the bitstream generator 170 of the image encoding device 150 to encode image data.
[0332] That is, the intra predictor 7200 may perform intra prediction on each block of the current image 7050, and the inter predictor 7150 may perform inter prediction on each block by using the current image 7050 and the reference image obtained from the reconstructed picture buffer 7100.
[0333] By subtracting the prediction data for each block output from the intra predictor 7200 or the inter predictor 7150 from the data of the encoded block of the current image 7050, residual data may be generated, and the transformer 7250 and the quantizer 7300 may perform transformation and quantization on the residual data and output the quantized transform coefficients for each block. The inverse quantizer 7450 and the inverse transformer 7500 may perform inverse quantization and inverse transformation on the quantized transform coefficients to recover the residual data in the spatial domain. The reconstructed residual data in the spatial domain may be added to the prediction data for each block output from the intra predictor 7200 or the inter predictor 7150, and thus may be reconstructed into the spatial domain data for each block of the current image 7050. The deblocking unit 7550 and the SAO executor 7600 may perform in-roof filtering on the reconstructed spatial domain data to generate a filtered reconstructed image. The generated reconstructed image may be stored in the reconstructed picture buffer 7100. The reconstructed image stored in the reconstructed picture buffer 7100 may be used as a reference image for inter prediction of other images. The entropy encoder 7350 may perform entropy encoding on the quantized transform coefficients, and the entropy-encoded coefficients may be output to the bitstream 7400.
[0334] To apply the image encoder 7000 according to various embodiments to the image encoding device 150, the phased tasks of the image encoder 7000 according to various embodiments may be performed for each block. For example, the task of the quantizer 7300 may correspond to the task of the quantizer 160. Shows the syntax structure of a partitioning unit for signaling differential quantization parameters according to an embodiment. Here, the syntax structure may refer to one or more syntax elements represented together in a bitstream according to a predefined order. Here, the partitioning unit refers to a partitioned coding unit, and after obtaining a partitioning flag indicating whether to partition from the partitioning unit, it may be determined whether to continue partitioning. At this time, the partitioning unit may be recursively (hierarchically) partitioned based on partitioning information such as the partitioning flag.
[0335] Refer to , the image decoding device 100 may obtain the syntax element cu_qp_delta for the differential quantization parameter from the syntax structure 200 at the partition unit level. After the image decoding device 100 obtains the partition flag btt_split_flag from the bitstream, the image decoding device 100 may obtain the syntax element cu_qp_delta from the bitstream. At this time, the image decoding device 100 may obtain the syntax element cu_qp_delta for each specific area unit cuQpDeltaArea. At this time, information about the specific area unit cuQpDeltaArea may be obtained in units of SPS, PPS, slice, parallel block, or parallel block group. The information about the specific area unit cuQpDeltaArea may represent an area value, a value obtained by representing the area value as a multiplier of 2, or an index value of a table having a correspondence between various area values and indices. Optionally, the specific area may be determined as a value predetermined between the image decoding device 100 and the image encoding device 150. When a block extends across the picture boundary, the area for obtaining the syntax element cu_qp_delta may be the area of the block, and the area includes the external area of the picture. However, the area for obtaining the syntax element cu_qp_delta may be limited to the internal area of the picture. In the case where the image decoding device 100 obtains the partition flag btt_split_flag for the current coding unit (x0, y0) and the partition flag btt_split_flag indicates that the current coding unit (x0, y0) is no longer partitioned (btt_split_flag[x0][y0] == 0), when the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is greater than or equal to the specific area cuQpDeltaArea for signaling the differential quantization parameter, the image decoding device 100 may obtain the syntax element cu_qp_delta from the bitstream.
[0336] In addition, in the case where the image decoding device 100 obtains the partition flag btt_split_flag for the current coding unit (x0, y0) and the partition flag btt_split_flag indicates that the current coding unit (x0, y0) is to be partitioned (elseif), when the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is twice (+1) the specific area cuQpDeltaArea for signaling the differential quantization parameter and the partition type of the current coding unit (x0, y0) is a ternary partition type (btt_split_type[x0][y0] == 1), or when the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is equal to the specific area cuQpDeltaArea for signaling the differential quantization parameter, the image decoding device 100 may obtain the syntax element cu_qp_delta from the bitstream.
[0337] and shows the syntax structure of transform units and partition units for signaling differential quantization parameters according to an embodiment.
[0338] Referring to and , the image decoding device 100 may determine the value of cuQpDeltaCode according to a predefined condition in the syntax structure 210 at the partition unit level. The image decoding device 100 may obtain the CBF from the syntax structure 220 at the transform unit level, identify the value of cuQpDeltaCode (and the value of CBF), and obtain the syntax element cu_qp_delta from the bitstream according to a condition based on the identified value of cuQpDeltaCode.
[0339] Referring to When the value of cu_qp_delta_enabled_flag is 1 and the value of sps_dquant_flag is 1 (cu_qp_delta_enabled_flag && sps_dquant_flag), the partitioning flag btt_split_flag indicates that the current coding unit (x0, y0) is no longer partitioned, and the area of the current coding unit (x0, y0), log2CbWidth + log2CbHeight, is greater than or equal to a specific area cuQpDeltaArea for signaling differential quantization parameters, the image decoding device 100 may determine the value of cuQpdeltaCode to be 1. Here, cu_qp_delta_enabled_flag may be a flag for signaling whether differential quantization parameters at the coding unit level are enabled, and sps_dquant_flag may be a flag for signaling whether to signal differential quantization parameters according to a predefined differential quantization parameter signaling scheme obtained at the SPS level. Here, in some cases, the predefined differential quantization parameter signaling scheme refers to a scheme for signaling differential quantization parameters regardless of the CBF value of the transform unit.
[0340] In the case where the partitioning flag indicates that the current coding unit (x0, y0) is partitioned (else if), when the area of the current coding unit (x0, y0), log2CbWidth + log2CbHeight, is twice (+1) the specific area cuQpDeltaArea for signaling differential quantization parameters and the partitioning type of the current coding unit (x0, y0) is a ternary partitioning type (btt_split_type[x0][y0] == 1), or when the area of the current coding unit (x0, y0), log2CbWidth + log2CbHeight, is equal to the specific area cuQpDeltaArea for signaling differential quantization parameters, the image decoding device 100 may determine the value of cuQpdeltaCode to be 2.
[0341] Refer to When the value of cuQpdeltaCode is 1, when one of the values of CBF(Y,U,V) cbf_luma, cbf_cb, and cbf_cr for the current transform unit is 1, the image decoding device 100 may obtain the syntax element cu_qp_delta from the bitstream. When the values of CBF(Y,U,V) cbf_luma, cbf_cb, and cbf_cr are all 0, the image decoding device 100 may not obtain the syntax element cu_qp_delta from the bitstream.
[0342] When the value of cuQPDeltaCode is 2, the image decoding device 100 may obtain the CBF of the transform unit having the same size as the first coding unit among the multiple coding units divided from the current coding unit, and then obtain the syntax element cu_qp_delta from the bitstream, regardless of the values of the CBFs cbf_luma, cbf_cb, and cbf_cr of the current transform unit. At this time, after obtaining the syntax element cu_qp_delta from the first coding unit, the image decoding device 100 may determine the value of cuQpdeltaCode as 0, and thus, the image decoding device 100 may not obtain the syntax element cu_qp_delta from the bitstream for the remaining coding units among the multiple coding units divided from the current coding unit except for the first coding unit. In this case, the differential quantization parameter of the remaining coding units may be the syntax element cu_qp_delta obtained first.
[0343] However, the present disclosure is not limited thereto, and in the case where the value of cuQPDeltaCode is 2, when at least one of the CBFs cbf_luma, cbf_cb, and cbf_cr of the current coding unit has a value of 1, the image decoding device 100 may obtain the syntax element cu_qp_delta from the bitstream. For example, when the values of the CBFs cbf_luma, cbf_cb, and cbf_cr of the first coding unit among the multiple coding units divided from the current coding unit are all 0, the image decoding device 100 may obtain the syntax element cu_qp_delta from the second coding unit. Since the value of the CBF of the first coding unit is 0, the first coding unit does not require a quantization parameter, and thus, when at least one of the CBF values of the coding units has a value of 1, the syntax element cu_qp_delta may be obtained from the corresponding coding unit.
[0344] Shows the syntax structures of the partitioning unit, coding unit, and transform unit for signaling a differential quantization parameter according to an embodiment.
[0345] Refer to , the image decoding device 100 can determine the value of cuQpDeltaCode according to the predefined conditions in the syntax structure 230 at the partition unit level. The image decoding device 100 can obtain a transform unit having the same size as the coding unit according to the maximum size of the transform unit or multiple transform units from the coding unit in the coding unit syntax structure 240 (at this time, the syntax elements included in the transform unit syntax structure are obtained), and then obtain CBF cbf_luma, cbf_cb, and cbf_cr from the transform unit syntax structure 250, identify the value of cuQpDeltaCode (and the value of CBF), and obtain the syntax element cu_qp_delta from the bitstream according to the conditions based on the identified value of cuQpDeltaCode.
[0346] Refer to , when the value of cu_qp_delta_enabled_flag in the syntax structure 230 at the partition unit level is 1 and the value of sps_dquant_flag is 1 (cu_qp_delta_enabled_flag && sps_dquant_flag), the splitting flag btt_split_flag value of the current coding unit (x0, y0) indicates that the current coding unit (x0, y0) is no longer split (btt_split_flag[x0][y0] == 0) and the value of cuQpDeltaCode is not 2, the area of the current coding unit (x0, y0) log2CbWidth + log2CbHeight is greater than or equal to the area cuQPDeltaArea of the predefined differential quantization parameter signaling unit (log2CbWidth + log2CbHeight >= cuQpDeltaArea), and the width log2CbWidth or height log2CbHeight of the current coding unit (x0, y0) is greater than 6 which is the maximum size of the transform unit (log2CbWidth > 6 || log2CbHeight > 6), the image decoding device 100 can set the value of cuQpdeltaCode of the current coding unit (x0, y0) to 2.
[0347] In the syntax structure 230 at the partitioning unit level, when the value of cu_qp_delta_enabled_flag is 1 and the value of sps_dquant_flag is 1 (cu_qp_delta_enabled_flag && sps_dquant_flag), the value of the partitioning flag btt_split_flag of the current coding unit (x0, y0) indicates that the current coding unit (x0, y0) is no longer partitioned (btt_split_flag[x0][y0] == 0) and the value of cuQpDeltaCode is not 2, the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is greater than or equal to the area cuQPDeltaArea of the predefined differential quantization parameter signaling unit (log2CbWidth + log2CbHeight >= cuQpDeltaArea), and the width log2CbWidth and height log2CbHeight of the current coding unit (x0, y0) are less than 6 which is the maximum size as the transform unit (else), the image decoding device 100 may set the value of cuQPDeltaCode to 1. At this time, the reason for identifying whether the value of cuQPDeltaCode is not 2 may be that there is a coding unit with the same area as the area of the predefined differential quantization parameter signaling unit among the coding units partitioned and obtained from the coding unit corresponding to twice the predefined differential quantization parameter signaling unit according to the ternary partitioning type, and when it is not identified whether the value of cuQPDeltaCode for the coding unit is 2, the value of cuQPDeltaCode may be set to 1 again.
[0348] When the value of cuQPDeltaCode is 1, information about the differential quantization parameter can be signaled only when the value of the coding block flag of the transform unit is 1, and when the value of cuQPDeltaCode is 2, information about the differential quantization parameter can be signaled through the information related to the first decoded transform unit included in the coding unit of the differential quantization parameter signaling unit, regardless of the value of the coding block flag of the transform unit.
[0349] In addition, the image decoding device 100 may set the value of isCuQPDeltaCoded to 0. Only when the value of isCuQPDeltaCoded is 0, the differential quantization parameter can be obtained from the information about the corresponding transform unit. By setting the value of the differential quantization parameter to 1 after obtaining the differential quantization parameter, the differential quantization parameter for the differential quantization parameter signaling unit can be obtained once, and the differential quantization parameter may no longer be obtained from the information about the subsequent transform units.
[0350] In the syntax structure 230 at the partition unit level, when the value of cu_qp_delta_enabled_flag is 1 and the value of sps_dquant_flag is 1 (cu_qp_delta_enabled_flag && sps_dquant_flag), when the value of the partition flag btt_split_flag of the current coding unit (x0, y0) indicates that the current coding unit (x0, y0) is to be partitioned (else if) and the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is twice (+1) the area cuQpDeltaArea of the predefined differential quantization parameter signaling unit, the partition type of the current coding unit (x0, y0) is a ternary partition type (btt_split_type[x0][y0] == 1), or when the area log2CbWidth + log2CbHeight of the current coding unit (x0, y0) is equal to the area cuQpDeltaArea of the predefined differential quantization parameter signaling unit and the value of cuQpdeltaCode is not 2, the image decoding device 100 may set the value of cuQpdeltaCode to 2. Additionally, the image decoding device 100 may set the value of isCuQPDeltaCoded to 0.
[0351] When the value of the partition flag btt_split_flag of the current coding unit (x0, y0) is 1, the image decoding device 100 may obtain the coding units at a lower depth included in the current coding unit (x0, y0) according to the partition shape mode SplitMode[x0][y0] determined based on the partition type and partition direction. At this time, the syntax elements of the coding unit syntax structure 240 at the coding unit level related to the coding units at a lower depth may be obtained. That is, the syntax elements of the syntax structure 230 at the partition unit level may be obtained recursively.
[0352] For example, when the value of the partition flag btt_split_flag of the current coding unit (x0, y0) is 1, when the partition shape mode SplitMode[x0][y0] determined according to the partition type and partition direction is the mode according to horizontal ternary partition (SplitMode[x0][y0] == SPLIT_TT_HOR), the image decoding device 100 may obtain the syntax elements of the syntax structure 230 at the partition unit level for the three coding units [x0, y0], [x0, y1], and [x0, y2] at a lower depth included in the current coding unit (x0, y0). At this time, the value of cuQpDeltaCode set in the current coding unit (x0, y0) may be transmitted to the syntax structure 230 at the partition unit level.
[0353] In addition, when the partitioning flag btt_split_flag of the current coding unit (x0, y0) has a value of 0 (else), the image decoding device 100 can obtain the syntax elements of the coding unit-level syntax structure 240 of the current coding unit (x0, y0) that is no longer partitioned.
[0354] Refer to , the image decoding device 100 can obtain from the bitstream a flag cbf_all indicating whether the current coding unit includes at least one non-zero transform coefficient of a component, and when the current coding unit includes at least one non-zero transform coefficient of a component (if (cbf_all)), the image decoding device 100 can set the value of isSplit indicating whether the current coding unit will be partitioned into multiple sub-blocks (transform units) according to 6 which is the maximum size of the transform unit. That is, when the width log2CbWidth of the current coding unit is greater than 6 which is the maximum size of the transform unit, or when the height log2CbHeight of the current coding unit is greater than 6 which is the maximum size of the transform unit, the image decoding device 100 can set the value of isSplit to 1, otherwise, the image decoding device 100 can set the value of isSplit to 0.
[0355] In addition, the image decoding device 100 can determine the sizes log2TbWidth and log2TbHeight of the transform unit based on 6 which is the maximum size of the transform unit and the sizes log2CbWidth and log2CbHeight of the current coding unit. For example, when the width Log2CbWidth of the current coding unit is greater than 6 which is the maximum size of the transform unit, the image decoding device 100 can determine the width of the transform unit to be 6 which is the maximum size of the transform unit, otherwise, the image decoding device 100 can determine the width of the transform unit to be the width of the current coding unit. Similarly, the image decoding device 100 can determine the height of the transform unit.
[0356] The image decoding device 100 can obtain the transform unit based on the reference coordinates (x0, y0) and the sizes log2TbWidth and log2TbHeight of the transform unit. That is, the image decoding device 100 can obtain the syntax elements of the transform unit-level syntax structure 250. At this time, the value of cuQpDeltaCode of the current coding unit can be transmitted.
[0357] The image decoding device 100 may additionally obtain transform units based on conditions according to the size log2CbWidth and log2CbHeight of the current coding unit and 6 which is the maximum size of the transform unit. That is, when the width or size of the current coding unit is greater than 6 which is the maximum size of the transform unit, the image decoding device 100 may obtain additional transform units included in the current coding unit. At this time, the value of cuQpDeltaCode of the current coding unit may be transmitted.
[0358] Referring to , the image decoding device 100 may obtain CBF cbf_luma, cbf_cb_, and cbf_cr for each component of the transform unit in the syntax structure 250 at the transform unit level. When the value of cu_qp_delta_enabled_flag is 1, and the value of sps_dquant_flag is 0 (!sps_dquant_flag), or the value of cuQpDeltaCode is 1 and the value of isdeltaCoded is 0, when at least one of the values of CBF cbf_luma, cbf_cb_, and cbf_cr for each component is 1 (cbf_luma||cbf_cb||cbf_cr), the image decoding device 100 may obtain the syntax element information for cu_qp_delta from the bitstream.
[0359] When the value of cu_qp_delta_enabled_flag is 1, the value of cuQpDeltaCode is 2, and the value of isdeltaCoded is 0, the image decoding device 100 may obtain the syntax element information for cu_qp_delta from the bitstream. At this time, the image decoding device 100 may obtain the syntax element information for cu_qp_delta from the bitstream regardless of the values of CBF cbf_luma, cbf_cb_, and cbf_cr for each component.
[0360] According to In the syntax structure shown in the figure, the image decoding device 100 can obtain the syntax element information for the differential quantization parameter at the level of the coding unit. At this time, the image decoding device 100 can obtain the syntax element information for the differential quantization parameter based on the size of the predefined differential quantization parameter signaling unit. For example, when the size of the current coding unit that is no longer divided is larger than the size of the predefined differential quantization parameter signaling unit, when the current coding unit is divided into multiple sub-blocks (transformation units) including coefficients, the image decoding device 100 can obtain the syntax element information for cu_qp_delta in the syntax structure 250 of the first transformation unit. At this time, the image decoding device 100 can obtain the syntax element information for cu_qp_delta regardless of the value of the CBF of the corresponding transformation unit. The image decoding device 100 does not obtain the syntax element information for cu_qp_delta for the remaining transformation units other than the first transformation unit among the multiple transformation units, and in this case, can obtain the differential quantization parameter for the remaining transformation units based on the cu_qp_delta obtained in the first transformation unit.
[0361] In addition, for a coding unit with a size smaller than the size of the predefined differential quantization parameter signaling unit, when the size of the predefined coding unit including the corresponding coding unit is equal to the size of the predefined differential quantization parameter signaling unit, or when the size of at least one sub-block (multiple coding units including the current coding unit) generated by division is smaller than the size of the corresponding coding unit (divided according to the ternary division type) and the size of the predefined coding unit is twice the size of the predefined differential quantization parameter signaling unit, the image decoding device 100 can obtain the syntax element information for cu_qp_delta from the bitstream in the syntax structure 250 at the transformation unit level of the first transformation unit of the first coding unit among the multiple sub-blocks. At this time, the image decoding device 100 can obtain the syntax element information for cu_qp_delta regardless of the value of the CBF of the corresponding transformation unit. The image decoding device 100 does not obtain the syntax element information for cu_qp_delta for the remaining transformation units other than the first transformation unit of the first coding unit among the multiple coding units and for the remaining coding units other than the first coding unit, and in this case, can obtain the differential quantization parameter for the remaining coding units based on the cu_qp_delta obtained in the first transformation unit of the first coding unit.
[0362] In addition, when referring to and In the above description given, it is assumed that the maximum size of the transform unit is 64 (the value obtained by applying log2 to 64 is 6). However, those of ordinary skill in the art will understand that the maximum size of the transform unit can be one of the multipliers of 2.
[0363] is a diagram for describing a method of signaling differential quantization parameters according to the syntax structure of a partitioning unit, an encoding unit, and a transform unit for signaling differential quantization parameters as shown in wherein.
[0364] Referring to , the image decoding device 100 can signal the differential quantization parameters for the encoding unit based on the area of a predefined differential quantization parameter signaling unit.
[0365] For example, in the case where the area of the non-partitioned encoding unit 260 is greater than or equal to the area of the predefined differential quantization parameter signaling unit, when the size of the encoding unit 260 is less than or equal to the maximum size of the transform unit, the image decoding device 100 can obtain the syntax element of the differential quantization parameter for the encoding unit 260 from the information about the transform unit having the same size as the encoding unit 260. At this time, the image decoding device 100 can obtain the coding block flag from the information about the transform unit, and the image decoding device 100 can obtain the syntax element for the differential quantization parameter only when the value of the coding block flag indicates 1, and the image decoding device 100 may not obtain the syntax element for the differential quantization parameter when the value of the coding block flag indicates 0.
[0366] In the case where the area of the non-partitioned encoding unit 270 is greater than or equal to the area of the predefined differential quantization parameter signaling unit, when the size of the encoding unit 270 is greater than the maximum size of the transform unit, the image decoding device 100 can partition the encoding unit 270 to obtain a plurality of transform units including a transform unit 275 having the maximum size of the transform unit, and obtain the syntax element of the differential quantization parameter for the encoding unit 270 from the information about the first decoded transform unit 275 among the plurality of transform units.
[0367] In addition, in a case where the area of a lower-depth coding unit 285 divided from a higher-depth coding unit 280 according to various division types (e.g., a ternary division type or a binary division type) is smaller than the area of a predefined differential quantization parameter signaling unit, when the area of the coding unit 280 is equal to the area of the predefined differential quantization parameter signaling unit, the image decoding device 100 may obtain a syntax element of a differential quantization parameter for the coding unit 280 from information related to a first decoded transform unit among transform units included in the first decoded coding unit 285 among two or three coding units included in the coding unit 280. At this time, the image decoding device 100 may obtain the syntax element of the differential quantization parameter for the coding unit 280 regardless of the value of the coding block flag of the corresponding transform unit. At this time, the coding unit 285 may be further divided into lower-depth coding units, or may no longer be divided. The transform unit may be obtained from the coding unit that is no longer divided. In this case, the transform unit may have the same size as the coding unit that is no longer divided, but is not limited thereto.
[0368] In a case where the area of a lower-depth coding unit 295 having a small size among lower-depth coding units divided from a higher-depth coding unit 290 according to the ternary division type is smaller than the area of a predefined differential quantization parameter signaling unit, when the area of the coding unit 290 is twice the area of the predefined differential quantization parameter signaling unit, the image decoding device 100 may obtain a syntax element of a differential quantization parameter for the coding unit 290 from information related to a first decoded transform unit among transform units included in the first decoded coding unit 295 among three coding units included in the coding unit 290. At this time, the image decoding device 100 may obtain the syntax element of the differential quantization parameter for the coding unit 290 regardless of the value of the coding block flag of the corresponding transform unit.
[0369] At this time, the coding unit 295 may be further divided into lower-depth coding units, or may no longer be divided. The transform unit may be obtained from the coding unit that is no longer divided. In this case, the transform unit may have the same size as the coding unit that is no longer divided, but is not limited thereto.
[0370] In a case where it is assumed that decoding is performed without enabling the SUCO scheme, the above description has been made with reference to However, those of ordinary skill in the art will understand that, different from when the SUCO scheme is enabled, the first decoded coding unit may be located on the right side of higher-depth coding units.
[0371] It is a SUCO scheme for describing the encoding (decoding) order between coding units as forward or backward based on the coding order flag according to an embodiment of the present disclosure, and a view available for neighboring blocks on the right side of the encoding (decoding) order according to the SUCO scheme is described.
[0372] Referring to , the largest coding unit 1950 can be divided into a plurality of coding units 1956, 1958, 1960, 1962, 1968, 1970, 1972, 1974, 1980, 1982, 1984, and 1986. The largest coding unit 1950 can correspond to the uppermost node 1900 having a tree structure. In addition, the plurality of coding units 1956, 1958, 1960, 1962, 1968, 1970, 1972, 1974, 1980, 1982, 1984, and 1986 can respectively correspond to a plurality of nodes 1906, 1908, 1910, 1912, 1918, 1920, 1922, 1924, 1930, 1932, 1934, and 1936. The upper coding order flags 1902, 1914, and 1926 representing the coding order in the tree structure can correspond to arrows 1952, 1964, and 1976, and the lower coding order flags 1904, 1916, and 1928 can correspond to arrows 1954, 1966, and 1978.
[0373] The upper coding order flag can represent the coding order of two coding units in the upper position among four coding units having the same depth. When the upper coding order flag indicates 0, encoding can be performed forward. Conversely, when the upper coding order flag indicates 1, encoding can be performed backward.
[0374] Similarly, the lower coding order flag can represent the coding order of two coding units in the lower position among four coding units having the same depth. When the lower coding order flag indicates 0, encoding can be performed forward. Conversely, when the lower coding order flag indicates 1, encoding can be performed backward.
[0375] For example, since the upper coding order flag 1914 is 0, the coding order between coding units 1968 and 1970 can be determined to be forward from left to right. In addition, since the lower coding order flag 1916 is 1, the coding order between coding units 1972 and 1974 can be determined to be backward from right to left.
[0376] According to some embodiments, the upper coding order flag and the lower coding order flag may be set to have the same value. For example, when the upper coding order flag 1902 is determined to be 1, the lower coding order flag 1904 corresponding to the upper coding order flag 1902 may also be determined to be 1. Since the values of the upper coding order flag and the lower coding order flag are determined by 1 bit, the amount of information of the coding order information can be reduced.
[0377] According to some embodiments of the present disclosure, the upper coding order flag and the lower coding order flag of the current coding unit may be determined by referring to at least one of the upper coding order flag or the lower coding order flag of the coding unit applied to a depth lower than the current coding unit. For example, the upper coding order flag 1926 and the lower coding order flag 1928 applied to the coding units 1980, 1982, 1984, and 1986 may be determined based on the lower coding order flag 1916 applied to the coding units 1971 and 1974. Therefore, the upper coding order flag 1926 and the lower coding order flag 1928 may be determined to have the same value as the value of the coding order flag 1916. Since the values of the upper coding order flag and the lower coding order flag are determined from the upper coding unit of the current coding unit, the coding order information may not be obtained from the bitstream. Therefore, the amount of information of the coding order information can be reduced.
[0378] At this time, since the data of the samples included in the neighboring coding unit 1958 that is decoded earlier than the current coding unit 1986 and is located on the right side of the current coding unit 1986 is available, the image decoding device 100 may obtain the prediction parameters of the current coding unit 1986 according to the embodiments of the present disclosure by using the data (preferably, quantization parameters) of the neighboring coding unit 1958 located on the right side of the current coding unit 1986.
[0379] The above refers to FIGS. 1 to The image decoding device 100 and the image encoding device 150 according to various embodiments described above may efficiently signal information about the differential quantization parameter for the current coding unit explicitly through the bitstream according to the size of the coding unit. Hereinafter, the division of the coding unit will be described in detail according to the embodiments of the present disclosure.
[0380] An image can be divided into maximum coding units. The size of the maximum coding unit can be determined based on information obtained from the bitstream. The maximum coding unit can be in the shape of a square with the same size, but is not limited thereto. In addition, the maximum coding unit can be hierarchically divided into coding units based on information about the partitioning shape pattern obtained from the bitstream. The information about the partitioning shape pattern can include at least one of information indicating whether to partition, partitioning direction information, and partitioning type information. The information indicating whether to partition can indicate whether to partition the coding unit. The partitioning direction information can indicate one of the horizontal direction or the vertical direction in which the coding unit is partitioned. The partitioning type information can indicate one of binary partitioning, ternary partitioning (or tri-partitioning), or quaternary partitioning for partitioning the coding unit.
[0381] In the present disclosure, for ease of description, the information about the partitioning shape pattern has been described as being classified into information indicating whether to partition, partitioning direction information, and partitioning type information. However, the information about the partitioning shape pattern is not limited to these. The image decoding device 100 can obtain, from the bitstream, information about the partitioning shape pattern that is an empty string. The image decoding device 100 can determine whether to partition the coding unit, the partitioning direction, and the partitioning type based on the empty string.
[0382] The coding unit can be less than or equal to the maximum coding unit. For example, when the information about the partitioning shape pattern indicates that the coding unit will not be partitioned, the coding unit and the maximum coding unit can have the same size. When the information about the partitioning shape pattern is that the coding unit will be partitioned, the maximum coding unit can be divided into coding units of a lower depth. In addition, when the information about the partitioning shape pattern for each coding unit of the lower depth indicates that the coding unit will be partitioned, the coding units of the lower depth can be divided into coding units with smaller sizes. However, the partitioning of the image is not limited thereto, and the maximum coding unit and the coding unit may not be distinguished from each other. A more detailed description of the partitioning of the coding unit will be made with reference to Describe the partitioning of the coding unit in more detail.
[0383] In addition, the coding unit can be divided into prediction units for image prediction. Each prediction unit can be equal to or smaller than the coding unit. In addition, the coding unit can be divided into transform units for image transformation. Each transform unit can be equal to or smaller than the coding unit. The shape and size of the transform unit can be independent of the shape and size of the prediction unit. The coding unit can be distinguished from the prediction unit or the transform unit, or the coding unit, the prediction unit, and the transform unit can be the same. The prediction unit and the transform unit can be divided by the same method as that for dividing the coding unit. A more detailed description will be made with reference to The division of coding units is described in more detail. The current block and neighboring blocks of the present disclosure may represent one of a maximum coding unit, a coding unit, a prediction unit, and a transform unit. In addition, the current block or the current coding unit may be the block that is currently being decoded or encoded or the block that is currently being divided. The neighboring blocks may be blocks that have been reconstructed earlier than the current block. The neighboring blocks may be adjacent to the current block spatially or temporally. The neighboring blocks may be located at any one of the lower left side, upper left side, upper side, upper right side, right side, and lower right side of the current block.
[0384] Fig. 4 shows a process of determining at least one coding unit by dividing a current coding unit, which is performed by the image decoding device 100 according to an embodiment.
[0385] The block shape may include 4N×4N, 4N×2N, 2N×4N, 4N×N, or N×4N. 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.
[0386] 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 equal (i.e., 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.
[0387] When the width and height of the coding unit are different from each other (i.e., when the block shape of the coding unit is 4N×2N, 2N×4N, 4N×N, or N×4N), 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 at least one of the aspect ratios in the block shape information of the coding unit as 1:2, 2:1, 1:4, 4:1, 1:8, or 8:1. In addition, the image decoding device 100 may determine whether the coding unit is in the horizontal direction or 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.
[0388] 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.
[0389] The image decoding device 100 may obtain partitioning shape mode information from a bitstream. However, the embodiment is not limited thereto, and the image decoding device 100 and the image encoding device 150 may obtain pre-agreed partitioning shape mode information based on block shape information. The image decoding device 100 may obtain pre-agreed partitioning shape mode information for a largest coding unit or a smallest coding unit. For example, the image decoding device 100 may determine the partitioning shape mode information for the largest coding unit as a quadtree partitioning. In addition, the image decoding device 100 may determine the partitioning shape mode information for the smallest coding unit as "no partitioning is performed". Specifically, the image decoding device 100 may determine the size of the largest coding unit as 256×256. The image decoding device 100 may determine the pre-agreed partitioning shape mode information as a quadtree partitioning. A quadtree partitioning is a partitioning shape mode in which both the width and height of a coding unit are bisected. The image decoding device 100 may obtain a 128×128-sized coding unit from the 256×256-sized largest coding unit based on the partitioning shape mode information. In addition, the image decoding device 100 may determine the size of the smallest coding unit as 4×4. The image decoding device 100 may obtain partitioning shape mode information indicating "no partitioning is performed" for the smallest coding unit.
[0390] According to an embodiment, the image decoding device 100 may use block shape information indicating that a current coding unit has a square shape. For example, the image decoding device 100 may determine, based on the partitioning shape mode information, whether to perform no partitioning on a square coding unit, whether to perform vertical partitioning on a square coding unit, whether to perform horizontal partitioning on a square coding unit, or whether to divide a square coding unit into four coding units. Referring to , when the block shape information of the current coding unit 300 indicates a square shape, the image decoder 110 may not perform partitioning on a coding unit 310a having the same size as the current coding unit 300 based on the partitioning shape mode information indicating no partitioning is performed, or may determine coding units 310b, 310c, 310d, etc. that are partitioned based on the partitioning shape mode information indicating a predefined partitioning method.
[0391] Referring to , according to an embodiment, the image decoding device 100 may determine two coding units 310b obtained by dividing a current coding unit 300 in the vertical direction based on division shape mode information indicating division 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 division shape mode information indicating division 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 division shape mode information indicating division in the vertical and horizontal directions. However, the division method of the square coding unit is not limited to the foregoing method and may include various methods that can be indicated by the division shape mode information. A predefined division method for dividing a square coding unit will be described in detail with respect to various embodiments below.
[0392] FIG. 4 shows a process of determining at least one coding unit by dividing a non-square coding unit performed by the image decoding device 100 according to an embodiment.
[0393] , 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 divide the non-square current coding unit or not or whether to divide the non-square current coding unit by using a predefined division method based on the division shape mode information. Referring to FIG. 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 coding units 410 or 460 having the same size as the current coding unit 400 or 450 based on the division shape mode information indicating no division, or may determine coding units 420a and 420b, 430a, 430b, and 430c, 470a and 470b, or 480a, 480b, and 480c divided based on the division shape mode information indicating a predefined division method. A predefined division method for dividing a non-square coding unit will be described in detail with respect to various embodiments below.
[0394] , according to an embodiment, the image decoding device 100 may determine a division method of a coding unit by using the division shape mode information, and in this case, the division shape mode information may indicate the number of one or more coding units generated by dividing the coding unit. Referring to FIG. 4, when the division shape mode information indicates that the current coding unit 400 or 450 is divided into two coding units, the image decoding device 100 may determine two coding units 420a and 420b or 470a and 470b included in the current coding unit 400 or 450 by dividing the current coding unit 400 or 450 based on the division shape mode information.
[0395] According to an embodiment, when the image decoding device 100 divides a non-square current coding unit 400 or 450 based on the partition shape mode information, the image decoding device 100 may consider the position of the long side of the non-square current coding unit 400 or 450 to divide the current coding unit. For example, the image decoding device 100 may divide the current coding unit 400 or 450 by dividing the long side of the current coding unit 400 or 450 in consideration of the shape of the current coding unit 400 or 450, so as to determine a plurality of coding units.
[0396] According to an embodiment, when the partition shape mode information indicates that a coding unit is divided (ternary partition) 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. For example, when the partition shape mode 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 or 450 into three coding units 430a, 430b, and 430c or 480a, 480b, and 480c.
[0397] According to an embodiment, the ratio of the width to the height of the current coding unit 400 or 450 may be 4:1 or 1:4. When the ratio of the width to the height is 4:1, since the width length is longer than the height length, the block shape information may indicate the horizontal direction. When the ratio of the width to the height 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 to divide the current coding unit into an odd number of blocks based on the partition 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.
[0398] According to an embodiment, the image decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and not all of the determined coding units may have the same size. For example, a predefined coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have a size different from that of the other coding units 430a and 430c or 480a and 480c. That is, the coding units that can be determined by dividing the current coding unit 400 or 450 may have multiple sizes, and in some cases, all of the odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes.
[0399] According to an embodiment, when the partitioning shape mode information indicates that the coding unit is partitioned into an odd number of blocks, the image decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and in addition, may impose a predefined restriction on at least one coding unit among the odd number of coding units generated by partitioning the current coding unit 400 or 450. Referring to FIG. 4, the image decoding device 100 may make the decoding process of the coding unit 430b or 480b different from the decoding process of the other coding units 430a and 430c or 480a or 480c, where the coding unit 430b or 480b is located at the center position among the three coding units 430a, 430b, and 430c or 480a, 480b, and 480c generated by partitioning the current coding unit 400 or 450. For example, different from the other coding units 430a and 430c or 480a and 480c, the image decoding device 100 may restrict the coding unit 430b or 480b at the center position from being further partitioned or only being partitioned a predefined number of times.
[0400] FIG. shows a process of partitioning a coding unit based on at least one of block shape information and partitioning shape mode information performed by the image decoding device 100 according to an embodiment.
[0401] According to an embodiment, the image decoding device 100 may determine to divide the first coding unit 500 of a square into a plurality of coding units or not to divide the first coding unit 500 of the square, based on at least one of the block shape information and the partitioning shape mode information. According to an embodiment, when the partitioning shape mode information indicates dividing the first coding unit 500 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 an embodiment are terms for understanding the relationship before and after dividing the coding unit. 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 structures of the first coding unit, the second coding unit, and the third coding unit follow the above description.
[0402] According to an embodiment, the image decoding device 100 may determine whether to divide the determined second coding unit 510 into a plurality of coding units or may determine not to divide the determined second coding unit 510, based on at least one of the block shape information and the partitioning shape mode information. Referring to , the image decoding device 100 may divide the non-square second coding unit 510 determined by dividing the first coding unit 500 into one or more third coding units 520a or 520b, 520c, and 520d, or may not divide the non-square second coding unit 510, based on at least one of the block shape information and the partitioning shape mode information. The image decoding device 100 may obtain at least one of the block shape information and the partitioning shape mode information, and may divide a plurality of second coding units (e.g., 510) of various shapes by dividing the first coding unit 500, based on at least one of the obtained block shape information and the obtained partitioning shape mode information, and may divide the second coding unit 510 by using the partitioning method of the first coding unit 500, based on at least one of the block shape information and the partitioning shape mode information. According to an embodiment, when the first coding unit 500 is divided into the second coding unit 510 based on at least one of the block shape information and the partitioning shape mode information regarding the first coding unit 500, the second coding unit 510 may also be divided into the third coding units 520a, or 520b, 520c, and 520d, based on at least one of the block shape information and the partitioning shape mode information regarding the second coding unit 510. That is, the coding unit may be recursively divided based on at least one of the block shape information and the partitioning shape mode information regarding each coding unit. Therefore, a square coding unit may be determined by dividing a non-square coding unit, and a non-square coding unit may be determined by recursively dividing a square coding unit.
[0403] Reference , a predefined coding unit (e.g., a coding unit located at a central position or a square coding unit) among an odd number of third coding units 520b, 520c, and 520d determined by recursively dividing a second coding unit 510 that is not square can be divided. According to an embodiment, a non-square third coding unit 520b among the odd number of third coding units 520b, 520c, and 520d can be divided into a plurality of fourth coding units in a horizontal direction. A non-square fourth coding unit 530b or 530d among the plurality of fourth coding units 530a, 530b, 530c, and 530d can be divided into a plurality of coding units again. For example, a non-square fourth coding unit 530b or 530d can be divided into an odd number of coding units. Methods for recursively dividing coding units that can be used will be described below with respect to various embodiments.
[0404] According to an embodiment, the image decoding device 100 can divide each of the third coding units 520a, or 520b, 520c, and 520d into coding units based on at least one of block shape information and division shape mode information. In addition, the image decoding device 100 can determine not to divide the second coding unit 510 based on at least one of block shape information and division shape mode information. According to an embodiment, the image decoding device 100 can divide a non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The image decoding device 100 can impose a predefined restriction on a predefined third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding device 100 can restrict the coding unit 520c at the central position among the odd number of third coding units 520b, 520c, and 520d from being divided any further or from being divided a set number of times.
[0405] Reference , the image decoding device 100 can restrict the third coding unit 520c at the central position among the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 from being divided any further, restrict it from being divided by using a predefined division method (e.g., only divided into four coding units or divided by using the division method of the second coding unit 510), or restrict it from being divided only a predefined number of times (e.g., only divided n times (where n > 0)). However, the restriction on the coding unit 520c at the central position is not limited to the foregoing examples and should be interpreted such that the restriction can include various restrictions for decoding the coding unit 520c at the central position differently from the other third coding units 520b and 520d.
[0406] According to an embodiment, the image decoding device 100 may obtain at least one of block shape information and partition shape mode information for partitioning a current coding unit from a predefined position in the current coding unit.
[0407] A method for determining a predefined coding unit from an odd number of coding units performed by the image decoding device 100 according to an embodiment is shown.
[0408] Referring to , at least one of block shape information and partition shape mode information about the current coding unit 600 or 650 may be obtained from a sample at a predefined position among a plurality of samples included in the current coding unit 600 or 650 (e.g., a sample 640 or 690 at the center position). However, the predefined position from which at least one of block shape information and partition shape mode information can be obtained in the current coding unit 600 is not limited to the center position in, and may include various positions (e.g., upper, lower, left, right, upper left, lower left, upper right, and lower right positions) included in the current coding unit 600. The image decoding device 100 may obtain at least one of block shape information and partition shape mode information from the predefined position, and may determine to partition the current coding unit into coding units of various shapes and various sizes or not to partition the current coding unit.
[0409] According to an embodiment, when the current coding unit is partitioned into a predefined number of coding units, the image decoding device 100 may select one coding unit among the coding units. As will be described with respect to various embodiments below, various methods may be used to select one coding unit among a plurality of coding units.
[0410] According to an embodiment, the image decoding device 100 may partition the current coding unit into a plurality of coding units, and may determine a coding unit at a predefined position.
[0411] According to an embodiment, the image decoding device 100 may use information indicating the positions of an odd number of coding units to determine a coding unit at the center position among the odd number of coding units. Referring to , the image decoding device 100 may determine an odd number of coding units 620a, 620b, and 620c or an 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 middle coding unit 620b or the middle coding unit 660b by using the 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 at the central position by determining the positions of the coding units 620a, 620b, and 620c based on the information indicating the positions of the predefined samples included in the coding units 620a, 620b, and 620c. Specifically, the image decoding device 100 may determine the coding unit 620b at the central position by determining the positions of the coding units 620a, 620b, and 620c based on the information indicating the positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c.
[0412] According to an embodiment, the information indicating the positions of the upper left samples 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c may include the 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 samples 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c may include the 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 may determine the coding unit 620b at the central 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 corresponding to the difference between the coordinates of the coding units.
[0413] According to an embodiment, the information indicating the position of the upper left sample 630a of the upper coding unit 620a may include coordinates (xa, ya), the information indicating the position of the upper left sample 630b of the middle coding unit 620b may include coordinates (xb, yb), and the information indicating the position of the upper left sample 630c of the lower coding unit 620c may include coordinates (xc, yc). The image decoding device 100 may determine the middle coding unit 620b by using the coordinates of the upper left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the upper left samples 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the sample 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 samples 630a, 630b, and 630c may include coordinates indicating the absolute position in the picture, or may use the coordinates (dxb, dyb) indicating the relative position of the upper left sample 630b of the middle coding unit 620b with respect to the upper left sample 630a of the upper coding unit 620a and the coordinates (dxc, dyc) indicating the relative position of the upper left sample 630c of the lower coding unit 620c with respect to the upper left sample 630a of the upper coding unit 620a. The method of determining the coding unit at a predefined position by using the coordinates of the samples included in the coding unit as the information indicating the positions of the samples is not limited to the foregoing method, and may include various arithmetic methods capable of using the coordinates of the samples.
[0414] 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 coding unit from among the coding units 620a, 620b, and 620c based on a predefined criterion. For example, the image decoding device 100 may select the coding unit 620b having a size different from the sizes of the other coding units from among the coding units 620a, 620b, and 620c.
[0415] 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) which are information indicating the position of the upper left sample 630a of the upper coding unit 620a, the coordinates (xb, yb) which are information indicating the position of the upper left sample 630b of the middle coding unit 620b, and the coordinates (xc, yc) which are information indicating the position of the upper left sample 630c of the lower coding unit 620c. The image decoding device 100 may determine the respective sizes 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 middle coding unit 620b as the width of the current coding unit 600. The image decoding device 100 may determine the height of the middle 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 widths or heights of the upper coding unit 620a and the middle coding unit 620b. The image decoding device 100 may determine a coding unit having a size different from the sizes of other coding units based on the determined widths and heights of the coding units 620a, 620b, and 620c. Referring to , 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 a coding unit at a predefined position. However, the foregoing method of determining a coding unit having a size different from the sizes of other coding units performed by the image decoding device 100 only corresponds to an example of determining a coding unit at a predefined position by using the sizes of coding units determined based on the coordinates of samples, and thus, various methods of determining a coding unit at a predefined position by comparing the sizes of coding units determined based on the coordinates of predefined samples may be used.
[0416] The image decoding device 100 can determine the width or height of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd) as the information indicating the position of the upper left sample 670a of the left coding unit 660a, the coordinates (xe, ye) as the information indicating the position of the upper left sample 670b of the middle coding unit 660b, and the coordinates (xf, yf) as the information indicating the position of the upper left sample 670c of the right coding unit 660c. The image decoding device 100 can determine the respective sizes 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.
[0417] According to an embodiment, the image decoding device 100 can determine the width of the left coding unit 660a as xe - xd. The image decoding device 100 can 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 can determine the width of the middle coding unit 660b as xf - xe. The image decoding device 100 can 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 can 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 can determine a coding unit having a size different from the sizes of other coding units based on the determined widths and heights of the coding units 660a, 660b, and 660c. Referring to , the image decoding device 100 can 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 a coding unit at a predefined position. However, the foregoing method of determining a coding unit having a size different from the sizes of other coding units performed by the image decoding device 100 only corresponds to an example of determining a coding unit at a predefined position by using the sizes of coding units determined based on the coordinates of samples, and thus, various methods of determining a coding unit at a predefined position by comparing the sizes of coding units determined based on the coordinates of predefined samples can be used.
[0418] However, the position of the sample considered for determining the position of the coding unit is not limited to the foregoing upper left position, and information on any position of the samples included in the coding unit can be used.
[0419] According to an embodiment, the image decoding device 100 may select a coding unit at a predefined position from among an odd number of coding units determined by dividing a current coding unit, considering the shape of the current coding unit. For example, when the current coding unit has a non-square shape with a width longer than its height, the image decoding device 100 may determine a coding unit at a predefined position along the horizontal direction. That is, the image decoding device 100 may determine one coding unit among coding units at different positions along the horizontal direction and may impose a restriction on the coding unit. When the current coding unit has a non-square shape with a height longer than its width, the image decoding device 100 may determine a coding unit at a predefined position along the vertical direction. That is, the image decoding device 100 may determine one coding unit among coding units at different positions along the vertical direction and may impose a restriction on the coding unit.
[0420] According to an embodiment, the image decoding device 100 may use information indicating the respective positions of an even number of coding units to determine a coding unit at a predefined position among the even number of coding units. The image decoding device 100 may determine the even number of coding units by dividing (binary division; binary partitioning) the current coding unit and may determine a coding unit at a predefined position by using information about the positions of the even number of coding units. Operations related thereto may correspond to the operations of determining a coding unit at a predefined position (e.g., a center position) among an odd number of coding units described in detail above, and thus detailed descriptions thereof will not be provided here. Detailed description of the operation of determining a coding unit at a predefined position (e.g., a center position) among an odd number of coding units described in detail above, and thus detailed descriptions thereof will not be provided here.
[0421] According to an embodiment, when a non-square current coding unit is divided into a plurality of coding units, predefined information about a coding unit at a predefined position may be used in the division process to determine a coding unit at a predefined position among the plurality of coding units. For example, the image decoding device 100 may use at least one of block shape information and division shape mode information stored in samples included in an intermediate coding unit in the division process to determine a coding unit at the center position among the plurality of coding units determined by dividing the current coding unit.
[0422] Referring to , the image decoding device 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on at least one of the block shape information and the partition shape mode 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 for obtaining at least one of the block shape information and the partition shape mode information. That is, at least one of the block shape information and the partition shape mode information about 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 at least one of the block shape information and the partition shape mode information, the coding unit 620b including the sample point 640 may be determined as the coding unit at the center position. However, the information for determining the coding unit at the center position is not limited to at least one of the block shape information and the partition shape mode information, and various types of information may be used to determine the coding unit at the center position.
[0423] According to an embodiment, predefined information for identifying a coding unit at a predefined position may be obtained from a predefined sample point included in the coding unit to be determined. Refer to , the image decoding device 100 may use at least one of the block shape information and the partition shape mode information obtained from a sample point at a predefined position in the current coding unit 600 (e.g., the sample point at the center position of the current coding unit 600) to determine the coding unit at a predefined position (e.g., the coding unit at the center position among the divided coding units) among the plurality of 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 point at the predefined position by considering the block shape of the current coding unit 600, may determine the coding unit 620b including the sample point from which predefined information (e.g., at least one of the block shape information and the partition shape mode information) can be obtained among the plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and may impose a predefined restriction on the coding unit 620b. Refer to , according to an embodiment, in a decoding operation, the image decoding device 100 may determine the sample point 640 at the center position of the current coding unit 600 as the sample point from which predefined information can be obtained, and may impose a predefined restriction on the coding unit 620b including the sample point 640. However, the position of the sample point from which predefined information can be obtained is not limited to the foregoing position, and may include any position of the sample point included in the coding unit 620b to be determined to be restricted.
[0424] According to an embodiment, the positions of sample points from which predefined 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 positions of sample points from which predefined information can be obtained may be determined based on the shape. For example, the image decoding device 100 may determine, by using at least one of the information on the width of the current coding unit and the information on the height of the current coding unit, a sample point located on a boundary that divides at least one of the width and the height of the current coding unit into two equal parts as a sample point from which predefined information can be obtained. 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 sample points adjacent to the boundary that divides the long side of the current coding unit into two equal parts as a sample point from which predefined information can be obtained.
[0425] According to an embodiment, when the current coding unit is divided into a plurality of coding units, the image decoding device 100 may use at least one of the block shape information and the partitioning shape mode information to determine a coding unit at a predefined position among the plurality of coding units. According to an embodiment, the image decoding device 100 may obtain at least one of the block shape information and the partitioning shape mode information from a sample point at a predefined position in the coding unit, and may partition the plurality of coding units generated by partitioning the current coding unit by using at least one of the block shape information and the partitioning shape mode information, wherein at least one of the block shape information and the partitioning shape mode information is obtained from a sample point at a predefined position in each of the plurality of coding units. That is, the coding unit may be recursively partitioned based on at least one of the block shape information and the partitioning shape mode information, wherein at least one of the block shape information and the partitioning shape mode information is obtained from a sample point at a predefined position in each coding unit. The operation of recursively partitioning the coding unit is described above with reference to and thus its detailed description is not provided here.
[0426] According to an embodiment, the image decoding device 100 may determine one or more coding units by partitioning the current coding unit, and may determine an order of decoding the one or more coding units based on a predefined block (e.g., the current coding unit).
[0427] FIG. shows an order of processing the plurality of coding units when the image decoding device 100 determines the plurality of coding units by partitioning the current coding unit according to an embodiment.
[0428] According to an embodiment, based on at least one of block shape information and partitioning shape pattern information, the image decoding device 100 may determine second coding units 710a and 710b by partitioning a first coding unit 700 in a vertical direction, may determine second coding units 730a and 730b by partitioning the first coding unit 700 in a horizontal direction, or may determine second coding units 750a to 750d by partitioning the first coding unit 700 in both vertical and horizontal directions.
[0429] Referring , the image decoding device 100 may determine to process the second coding units 710a and 710b in a horizontal direction order 710c, where the second coding units 710a and 710b are determined by partitioning the first coding unit 700 in a vertical direction. The image decoding device 100 may determine to process the second coding units 730a and 730b in a vertical direction order 730c, where the second coding units 730a and 730b are determined by partitioning the first coding unit 700 in a horizontal direction. The image decoding device 100 may determine to process the second coding units 750a, 750b, 750c, and 750d determined by partitioning the first coding unit 700 in both vertical and horizontal directions in a predefined order (e.g., in a raster scan order or a zigzag scan order 750e), where the coding units in a row are processed in the predefined order and then the coding units in the next row are processed.
[0430] According to an embodiment, the image decoding device 100 may recursively partition coding units. Referring , 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 partitioning a first coding unit 700, and may recursively partition each of the determined plurality of coding units 710a and 710b, 730a and 730b, or 750a, 750b, 750c, and 750d. The partitioning method of the plurality of coding units 710a and 710b, 730a and 730b, or 750a, 750b, 750c, and 750d may correspond to the partitioning method of the first coding unit 700. Accordingly, each of the plurality of coding units 710a and 710b, 730a and 730b, or 750a, 750b, 750c, and 750d may be independently partitioned into a plurality of coding units. Referring , the image decoding device 100 may determine second coding units 710a and 710b by partitioning the first coding unit 700 in a vertical direction, and may determine to independently partition each of the second coding units 710a and 710b or not partition the second coding units 710a and 710b.
[0431] According to an embodiment, the image decoding device 100 may determine third coding units 720a and 720b by dividing the left second coding unit 710a in the horizontal direction, and may not divide the right second coding unit 710b.
[0432] According to an embodiment, the processing order of coding units may be determined based on the operation of dividing coding units. In other words, the processing order of the divided coding units may be determined based on the processing order of the coding unit immediately before 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 the vertical direction order 720c. Since the left second coding unit 710a and the right second coding unit 710b are processed in the 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 the vertical direction order 720c. The operation of determining the processing order of coding units based on the coding unit before division is not limited to the foregoing example, and various methods may be used to independently process the divided coding units determined to be of various shapes in a predefined order.
[0433] Illustrates the process of determining that the current coding unit will be divided into an odd number of coding units, which is performed by the image decoding device 100 when the coding units cannot be processed in a predefined order, according to an embodiment.
[0434] According to an embodiment, the image decoding device 100 may determine that the current coding unit will be divided into an odd number of coding units based on the obtained block shape information and division shape mode information. Refer to , 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.
[0435] According to an embodiment, the image decoding device 100 may determine whether there are an odd number of coding units by determining whether the third coding units 820a, 820b, 820c, 820d, and 820e can be processed in a predefined order. Refer to , the image decoding device 100 may determine the third coding units 820a, 820b, 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 will be divided into an odd number of coding units based on at least one of the block shape information and the division shape pattern information: the first coding unit 800, the second coding units 810a and 810b, or the third coding units 820a, 820b, 820c, 820d, and 820e. For example, the second coding unit 810b on the right among 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 may be a predefined order (e.g., the zigzag scan order 830), and the image decoding device 100 may determine whether the third coding units 820c, 820d, and 820e determined by dividing the second coding unit 810b on the right into an odd number of coding units satisfy the conditions for being processed in a predefined order.
[0436] According to an embodiment, the image decoding device 100 may determine whether the third coding units 820a, 820b, 820c, 820d, and 820e included in the first coding unit 800 satisfy a condition for being processed in a predefined 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 halved along the boundaries of the third coding units 820a, 820b, 820c, 820d, and 820e. For example, the third coding units 820a and 820b determined when the height of the non-square-shaped left second coding unit 810a is halved may satisfy the condition. Since 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 do not halve the width or height of the right second coding unit 810b, it may 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 based on the determination result that the right second coding unit 810b will be divided into an odd number of coding units. According to an embodiment, when a coding unit is divided into an odd number of coding units, the image decoding device 100 may impose a predefined restriction on the coding unit at a predefined position among the divided coding units. The restriction or the predefined position has been described above with respect to various embodiments, and thus no detailed description thereof is provided here.
[0437] FIG. shows a process of determining at least one coding unit by dividing a first coding unit 900 performed by an image decoding device 100 according to an embodiment.
[0438] According to an embodiment, the image decoding device 100 may divide the first coding unit 900 based on at least one of the block shape information and the division shape mode information obtained by the acquirer 105. 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. For example, referring to , when the block shape information indicates that the first coding unit 900 is a square and the partitioning shape mode information indicates that the first coding unit 900 is to be partitioned into non-square coding units, the image decoding device 100 may partition the first coding unit 900 into a plurality of non-square coding units. Specifically, when the partitioning shape mode information indicates that an odd number of coding units are determined by partitioning the first coding unit 900 in the horizontal or vertical direction, the image decoding device 100 may partition the square first coding unit 900 into an odd number of coding units (e.g., the second coding units 910a, 910b, and 910c determined by partitioning the square first coding unit 900 in the vertical direction, or the second coding units 920a, 920b, and 920c determined by partitioning the square first coding unit 900 in the horizontal direction).
[0439] 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 being processed in a predefined order, and the condition is related to whether at least one of the width and height of the first coding unit 900 will be halved along the boundaries of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Refer to , since the boundaries of the second coding units 910a, 910b, and 910c determined by partitioning the square first coding unit 900 in the vertical direction do not halve the width of the first coding unit 900, it may be determined that the first coding unit 900 does not satisfy the condition for being processed in a predefined order. In addition, since the boundaries of the second coding units 920a, 920b, and 920c determined by partitioning the square first coding unit 900 in the horizontal direction do not halve the height of the first coding unit 900, it may be determined that the first coding unit 900 does not satisfy the condition for being processed in a predefined order. When the above-mentioned condition is not satisfied as described above, the image decoding device 100 may determine that the scan order is not continuous, and may determine based on the determination result that the first coding unit 900 is to be partitioned into an odd number of coding units. According to an embodiment, when a coding unit is partitioned into an odd number of coding units, the image decoding device 100 may impose a predefined restriction on the coding unit at a predefined position among the partitioned coding units. The above-mentioned restriction or the predefined position has been described with respect to various embodiments, so no detailed description thereof is provided here.
[0440] According to an embodiment, the image decoding device 100 may determine coding units of various shapes by partitioning the first coding unit.
[0441] Refer to , the image decoding device 100 may divide the square first coding unit 900 or the non-square first coding units 930 or 950 into coding units of various shapes.
[0442] It is shown that when the second coding unit having a non-square shape determined by dividing the first coding unit 1000 by the image decoding device 100 according to an embodiment satisfies a predefined condition, the shape into which the second coding unit can be divided is restricted.
[0443] 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 at least one of the block shape information and the division shape pattern information obtained by the acquirer 105. The second coding units 1010a and 1010b, or 1020a and 1020b, may be independently divided. Accordingly, 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 at least one of the block shape information and the division shape pattern information regarding 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 dividing the non-square left second coding unit 1010a determined by dividing the first coding unit 1000 in the vertical direction in the horizontal direction. However, when the left second coding unit 1010a is divided in the horizontal direction, the image decoding device 100 may restrict the right second coding unit 1010b from being divided in the horizontal direction in which the left second coding unit 1010a is divided. When determining the third coding units 1014a and 1014b by dividing 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 divided 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 at least one of the block shape information and the division shape pattern information, and may be inefficient in terms of image decoding.
[0444] According to an embodiment, the image decoding device 100 may determine third coding units 1022a and 1022b, or 1024a and 1024b, by dividing non-square second coding units 1020a or 1020b, which are determined by dividing a first coding unit 1000 in a horizontal direction, in a vertical direction. However, when a second coding unit (e.g., the upper second coding unit 1020a) is divided in the vertical direction, for the foregoing reasons, the image decoding device 100 may restrict another second coding unit (e.g., the lower second coding unit 1020b) from being divided in the vertical direction in which the upper second coding unit 1020a is divided.
[0445] FIG. shows a process of dividing a square coding unit performed by the image decoding device 100 according to an embodiment when the division shape mode information indicates that the square coding unit will not be divided into four square coding units.
[0446] According to an embodiment, the image decoding device 100 may determine second coding units 1110a and 1110b, or 1120a and 1120b, etc., by dividing a first coding unit 1100 based on at least one of block shape information and division shape mode information. The division shape mode information may include information on various methods of dividing a coding unit, but the information on various division methods may not include information for dividing a coding unit into four square coding units. Based on the division shape mode information, the image decoding device 100 does not divide the square first coding unit 1100 into four square second coding units 1130a, 1130b, 1130c, and 1130d. The image decoding device 100 may determine non-square second coding units 1110a and 1110b, or 1120a and 1120b, etc., based on the division shape mode information.
[0447] According to an embodiment, the image decoding device 100 may independently divide 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 predefined order, and the division method may correspond to the method of dividing the first coding unit 1100 based on at least one of block shape information and division shape mode information.
[0448] For example, the image decoding device 100 may determine square third coding units 1112a and 1112b by dividing the second left coding unit 1110a in the horizontal direction, and may determine square third coding units 1114a and 1114b by dividing the second right coding unit 1110b in the horizontal direction. In addition, the image decoding device 100 may determine square third coding units 1116a, 1116b, 1116c, and 1116d by dividing both the second left coding unit 1110a and the second right coding unit 1110b in the horizontal direction. In this case, coding units having the same shape as the second coding units 1130a, 1130b, 1130c, and 1130d of the four squares divided from the first coding unit 1100 may be determined.
[0449] As another example, the image decoding device 100 may determine square third coding units 1122a and 1122b by dividing the second upper coding unit 1120a in the vertical direction, and may determine square third coding units 1124a and 1124b by dividing the second lower coding unit 1120b in the vertical direction. In addition, the image decoding device 100 may determine square third coding units 1126a, 1126b, 1126c, and 1126d by dividing both the second upper coding unit 1120a and the second lower coding unit 1120b in the vertical direction. In this case, coding units having the same shape as the second coding units 1130a, 1130b, 1130c, and 1130d of the four squares divided from the first coding unit 1100 may be determined.
[0450] It is shown that the processing order among multiple coding units according to an embodiment may be changed according to the processing of dividing the coding units.
[0451] According to an embodiment, the image decoding device 100 may divide the first coding unit 1200 based on at least one of block shape information and division shape mode information. When the block shape information indicates a square shape and the division shape mode information indicates dividing the first coding unit 1200 in at least one of the horizontal direction and the vertical direction, the image decoding device 100 may determine second coding units 1210a and 1210b, or 1220a and 1220b, etc. by dividing the first coding unit 1200. Refer to , non-square second coding units 1210a and 1210b, or 1220a and 1220b determined by dividing the first coding unit 1200 only in the horizontal or vertical direction can be independently divided based on at least one of the block shape information and the division shape pattern information for each coding unit. For example, the image decoding device 100 can 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 can 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. The operation of dividing the second coding units 1210a and 1210b, or 1220a and 1220b is described above with reference to and thus a detailed description thereof is not provided here.
[0452] According to an embodiment, the image decoding device 100 can process coding units in a predefined order. The operation of processing coding units in a predefined order is described above with reference to and thus a detailed description thereof is not provided here. Referring to , the image decoding device 100 can 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 can determine the processing order of the third coding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d based on the division method of the first coding unit 1200.
[0453] According to an embodiment, the image decoding device 100 can 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 can process the third coding units 1216a, 1216b, 1216c, and 1216d in the following processing order 1217: first process the third coding units 1216a and 1216c included in the left second coding unit 1210a in the vertical direction, and then process the third coding units 1216b and 1216d included in the right second coding unit 1210b in the vertical direction.
[0454] According to an embodiment, the image decoding device 100 may determine third coding units 1226a, 1226b, 1226c, and 1226d by dividing second coding units 1220a and 1220b generated by dividing a first coding unit 1200 in a horizontal direction in a vertical direction, and may process the third coding units 1226a, 1226b, 1226c, and 1226d in a processing order 1227 as follows: first process the third coding units 1226a and 1226b included in the upper second coding unit 1220a in a horizontal direction, and then process the third coding units 1226c and 1226d included in the lower second coding unit 1220b in a horizontal direction.
[0455] Referring , 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 dividing the first coding unit 1200 in a vertical direction are different from the second coding units 1220a and 1220b determined by dividing the first coding unit 1200 in a horizontal direction, the third coding units 1216a, 1216b, 1216c, and 1216d and the third coding units 1226a, 1226b, 1226c, and 1226d divided from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b ultimately show coding units of the same shape divided from the first coding unit 1200. Accordingly, by recursively dividing coding units in different ways based on at least one of block shape information and division shape pattern information, even if the coding units are finally determined to have the same shape, the image decoding device 100 may process multiple coding units in different orders.
[0456] Shows a process of determining the depth of a coding unit when the shape and size of the coding unit change when the coding unit is recursively divided to determine multiple coding units according to an embodiment.
[0457] According to an embodiment, the image decoding device 100 may determine the depth of a coding unit based on a predefined criterion. For example, the predefined 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 division is 2n (n > 0) times the length of the long side of the current coding unit after division, 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 division. In the following description, a coding unit with an increased depth is represented as a coding unit with a deeper depth.
[0458] Reference According to an embodiment, the image decoding device 100 may determine a second coding unit 1302 and a third coding unit 1304 with a deeper depth by dividing a first coding unit 1300 of a square based on block shape information indicating a square shape (e.g., the block shape information may be represented as "0:SQUARE"). Assume that the size of the first coding unit 1300 of the square is 2N×2N. The second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 by 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 by 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.
[0459] According to an embodiment, the image decoding device 100 may determine a second coding unit 1312 or 1322 and a third coding unit 1314 or 1324 with a lower depth by dividing a first coding unit 1310 or 1320 of a non-square based on block shape information indicating a non-square shape (e.g., the block shape information may be represented as "1:NS_VER" indicating a non-square shape with a height longer than its width, or may be represented as "2:NS_HOR" indicating a non-square shape with a width longer than its height).
[0460] The image decoding device 100 may determine the second coding unit 1302, 1312 or 1322 by dividing at least one of the width and height of a 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. [[ID=X]] [[ID=Y]]
[0461] According to an embodiment, the image decoding device 100 may determine the second coding units 1302, 1312, or 1322 by dividing at least one of the width and 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 the 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 both the horizontal and vertical directions.
[0462] According to an embodiment, the image decoding device 100 may determine the third coding units 1304, 1314, or 1324 by dividing at least one of the width and 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 both the vertical and horizontal directions.
[0463] According to an embodiment, the image decoding device 100 may determine the third coding units 1304, 1314, or 1324 by dividing at least one of the width and 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 both the vertical and horizontal directions.
[0464] According to an embodiment, the image decoding device 100 may determine the third coding units 1304, 1314, or 1324 by dividing at least one of the width and 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 both the vertical and horizontal directions.
[0465] According to an embodiment, the image decoding device 100 may divide the square coding units 1300, 1302, or 1304 in a horizontal direction or a vertical direction. For example, the image decoding device 100 may determine a first coding unit 1310 having a size of N×2N by dividing a first coding unit 1300 having a size of 2N×2N in a vertical direction, or may determine a first coding unit 1320 having a size of 2N×N by dividing the first coding unit 1300 in a horizontal direction. According to an embodiment, when determining the depth based on the length of the longest side of the coding unit, the depth of the coding unit determined by dividing the first coding unit 1300 having a size of 2N×2N in a horizontal direction or a vertical direction may be the same as the depth of the first coding unit 1300.
[0466] 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 having a width and height that 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 having a width and height that are 1 / 4 of the width and height of the first coding unit 1310 or 1320 may be D + 2.
[0467] Shows the depth that can be determined based on the shape and size of the coding unit according to an embodiment and the partial index (PID) for distinguishing the coding units.
[0468] According to an embodiment, the image decoding device 100 may determine second coding units of various shapes by dividing a square first coding unit 1400. Referring to FIG., the image decoding device 100 may determine second coding units 1402a and 1402b, second coding units 1404a and 1404b, and second coding units 1406a, 1406b, 1406c, and 1406d by dividing the first coding unit 1400 in at least one of a vertical direction and a 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.
[0469] 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 partitioning shape pattern information of the square-based 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-based first coding unit 1400 is equal to the length of the long sides 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, e.g., D. However, when the image decoding device 100 partitions the first coding unit 1400 into four square second coding units 1406a, 1406b, 1406c, and 1406d based on the partitioning shape pattern information, since 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 may be D + 1, which is 1 deeper than the depth D of the first coding unit 1400.
[0470] 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 partitioning a first coding unit 1410 whose height is longer than its width in the horizontal direction based on the partitioning 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 partitioning a first coding unit 1420 whose width is longer than its height in the vertical direction based on the partitioning shape pattern information.
[0471] According to an embodiment, the depths 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 partitioning shape pattern information of the non-square first coding unit 1410 or 1420 may be determined based on the lengths 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 non-square first coding unit 1410 whose height is longer than its 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.
[0472] In addition, the image decoding device 100 may divide a non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the partitioning shape mode information. The odd number of second coding units 1414a, 1414b, and 1414c may include non-square second coding units 1414a and 1414c and a 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 depth of the coding units divided from the first coding unit 1420 having a non-square shape with a width longer than its height by using the method of determining the depth of the coding units divided from the first coding unit as described above.
[0473] According to an embodiment, when the odd number of divided coding units do not have equal sizes, the image decoding device 100 may determine the PID for identifying the divided coding units based on the size ratio between the coding units. Refer to , the width of the coding unit 1414b at the central position among the odd number of divided coding units 1414a, 1414b, and 1414c may be equal to the widths 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 central position may include two other coding units 1414a or 1414c. Therefore, when the PID of the coding unit 1414b at the central position is 1 based on the scanning order, the PID of the coding unit 1414c located at an adjacent position to the coding unit 1414b may be increased by 2 and thus may be 3. That is, there may be a discontinuity in the PID values. According to an embodiment, the image decoding device 100 may determine whether the odd number of divided coding units do not have equal sizes based on whether there is a discontinuity in the PID for identifying the divided coding units.
[0474] According to an embodiment, the image decoding device 100 may determine whether to use a specific partitioning method based on the PID values for identifying the multiple coding units determined by partitioning the current coding unit. Refer to , the image decoding device 100 may determine an even number of coding units 1412a and 1412b or an odd number of coding units 1414a, 1414b, and 1414c by dividing a first coding unit 1410 having a rectangular shape with a height longer than its width. The image decoding device 100 may use the PID indicating the corresponding coding unit to identify the corresponding coding unit. According to an embodiment, the PID may be obtained from a sample point (e.g., the upper left sample point) at a predefined position of each coding unit.
[0475] According to an embodiment, the image decoding device 100 may determine a coding unit at a predefined position in the divided coding units by using the PID for distinguishing coding units. According to an embodiment, when the division shape mode information of the first coding unit 1410 having a rectangular shape with a height longer than its 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 the PID to each of the three coding units 1414a, 1414b, and 1414c. The image decoding device 100 may compare the PIDs of the odd number of divided coding units to determine the coding unit at the central position in the coding units. The image decoding device 100 may determine the coding unit 1414b corresponding to the middle value of the PIDs of the coding units as the coding unit at the central position in 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 device 100 may determine the PID for distinguishing the divided coding units based on the size ratio between the coding units. Refer to , the width of the coding unit 1414b generated by dividing the first coding unit 1410 may be equal to the widths of the other coding units 1414a and 1414c, and its height may be twice the heights 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 at the position adjacent to the coding unit 1414b may be increased by 2 and thus may be 3. When the PID does not increase uniformly as described above, the image decoding device 100 may determine that the coding unit is divided into a plurality of coding units, where the plurality of coding units includes a coding unit having a size different from the sizes of the other coding units. According to an embodiment, when the division shape mode 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 way that the coding unit at a predefined position (e.g., the coding unit at the center position) among the odd number of coding units has a size different from the sizes of the other coding units. In this case, the image decoding device 100 may determine the coding unit at the center position having a different size by using the PID of the coding unit. However, the PID, size, or position of the coding unit at the predefined position is not limited to the foregoing examples, and various PIDs, positions, and sizes of the coding unit may be used.
[0476] According to an embodiment, the image decoding device 100 may use a predefined data unit in which the division of the coding unit starts recursively.
[0477] Illustrates determining a plurality of coding units based on a plurality of predefined data units included in a picture according to an embodiment.
[0478] According to an embodiment, the predefined data unit may be defined as a data unit that starts recursively dividing the coding unit by using at least one of block shape information and division shape mode information. That is, the predefined data unit may correspond to the coding unit for determining the highest depth of the plurality of coding units divided from the current picture. In the following description, for ease of explanation, the predefined data unit is referred to as a reference data unit.
[0479] According to an embodiment, the reference data unit may have a predefined size and a predefined 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 integers represented as a power of 2. That is, the reference data unit may have a square shape or a non-square shape and may then be divided into an integer number of coding units.
[0480] According to an embodiment, the image decoding device 100 may divide a 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 mode information of each reference data unit. The operation of dividing the reference data units may correspond to a division operation using a quadtree structure.
[0481] According to an embodiment, the image decoding device 100 may pre-determine a minimum size allowed for the reference data units included in the current picture. Accordingly, the image decoding device 100 may determine various reference data units having a size equal to or greater than the minimum size, and may determine one or more coding units by referring to the determined reference data units by using block shape information and division shape mode information.
[0482] Referring to , the image decoding device 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., sequence, picture, slice, slice segment, largest coding unit, etc.) that may include one or more reference coding units.
[0483] According to an embodiment, the acquirer 105 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 the various data units from a bitstream. The operation of dividing the square reference coding unit 1500 into one or more coding units has been described above with respect to the operation of dividing the current coding unit 300 , and the operation of dividing the non-square reference coding unit 1502 into one or more coding units has been described above with respect to the operation of dividing the current coding unit 400 or 450 . Therefore, a detailed description thereof will not be provided here.
[0484] According to an embodiment, the image decoding device 100 may determine the size and shape of a reference coding unit using a PID for identifying the size and shape of the reference coding unit, based on some data units predetermined according to predefined conditions. That is, the acquirer 105 may obtain from the bitstream only the PID for identifying the size and shape of the reference coding unit for each slice, each slice segment, or each largest coding unit, where each slice, each slice segment, or each largest coding unit is a data unit (e.g., sequence, picture, slice, slice segment, largest coding unit, etc.) among various data units that satisfies the predefined conditions (e.g., a data unit having a size equal to or smaller than a slice). The image decoding device 100 may determine the size and shape of the reference coding unit for each data unit that satisfies the predefined conditions by using the PID. When the reference coding unit shape information and the reference coding unit size information are obtained from and used with respect to each data unit having a relatively small size, the efficiency of using the bitstream may not be high, and thus, 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 used 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.
[0485] According to an embodiment, the image decoding device 100 may use one or more reference coding units included in a largest coding unit. That is, the largest coding unit divided from an image may include one or more reference coding units, and coding units may be determined by recursively dividing each reference coding unit. According to an embodiment, at least one of the width and height of the largest 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 largest 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 largest coding unit n times based on a quadtree structure, and may divide the reference coding unit based on at least one of block shape information and division shape pattern information.
[0486] A processing block showing a criterion for determining an order of determination of reference coding units included in a picture 1600 according to an embodiment is shown.
[0487] According to an embodiment, the image decoding device 100 may determine one or more processing blocks divided from a picture. A processing block is a data unit including one or more reference coding units divided from a picture, and one or more reference coding units included in the processing block may be determined according to a specific order. That is, the determination order of one or more reference coding units determined in each of the processing blocks may correspond to one of various types of orders for determining reference coding units, and may vary according to the processing block. The determination order of the reference coding units determined for each processing block may be one of various orders, for example, raster scan order, zigzag scan, N-shaped scan, upper right diagonal scan, horizontal scan, and vertical scan, but is not limited to the foregoing scan orders.
[0488] According to an embodiment, the image decoding device 100 may obtain processing block size information and may determine the sizes of one or more processing blocks included in a picture. The image decoding device 100 may obtain the processing block size information from a bitstream and may determine the sizes of one or more processing blocks included in the picture. The size of a processing block may be a predefined size of a data unit indicated by the processing block size information.
[0489] According to an embodiment, the acquirer 105 of the image decoding device 100 may obtain the processing block size information from the bitstream according to each specific data unit. For example, the processing block size information may be obtained from the bitstream according to data units such as an image, a sequence, a picture, a slice, a slice segment, etc. That is, the acquirer 105 may obtain the processing block size information from the bitstream according to each of various data units, and the image decoding device 100 may determine the sizes of one or more processing blocks divided from a picture by using the obtained processing block size information. The size of a processing block may be an integer multiple of the size of a reference coding unit.
[0490] According to an embodiment, the image decoding device 100 may determine the sizes of the processing blocks 1602 and 1612 included in the picture 1600. For example, the image decoding device 100 may determine the size of a processing block based on the processing block size information obtained from the bitstream. Refer to According to an embodiment, the image decoding device 100 may determine the width of the processing blocks 1602 and 1612 to be four times the width of a reference coding unit, and may determine the height of the processing blocks 1602 and 1612 to be four times the height of a reference coding unit. The image decoding device 100 may determine the determination order of one or more reference coding units in one or more processing blocks.
[0491] According to an embodiment, the image decoding device 100 may determine processing blocks 1602 and 1612 included in the picture 1600 based on the size of the processing blocks, and may determine the determination order of one or more reference coding units in the processing blocks 1602 and 1612. According to an embodiment, the determination of the reference coding unit may include the determination of the size of the reference coding unit.
[0492] According to an embodiment, the image decoding device 100 may obtain, from a bitstream, determination order information of one or more reference coding units included in one or more processing blocks, and may determine the determination order for the one or more reference coding units based on the obtained determination order information. The determination order information may be defined as information for determining the order or direction of reference coding units in a processing block. That is, the determination order of reference coding units may be determined independently for each processing block.
[0493] According to an embodiment, the image decoding device 100 may obtain, from a bitstream, determination order information of reference coding units for each specific data unit. For example, the acquirer 105 may obtain, from a bitstream, determination order information of reference coding units for each data unit (such as an image, a sequence, a picture, a slice, a slice segment, or a processing block). Since the determination order information of reference coding units indicates the order for determining reference coding units in a processing block, the determination order information may be obtained for each specific data unit including an integer number of processing blocks.
[0494] According to an embodiment, the image decoding device 100 may determine one or more reference coding units based on the determined determination order.
[0495] According to an embodiment, the acquirer 105 may obtain, from a bitstream, determination order information of reference coding units as information related to the processing blocks 1602 and 1612, and the image decoding device 100 may determine the determination order of one or more reference coding units included in the processing blocks 1602 and 1612, and may determine one or more reference coding units included in the picture 1600 based on the determination order. Refer to , the image decoding device 100 can respectively determine the determination orders 1604 and 1614 of one or more reference coding units in the processing blocks 1602 and 1612. For example, when the determination order information of the reference coding units is obtained for each processing block, different types of determination order information of the reference coding units can be obtained for the processing blocks 1602 and 1612. When the determination order 1604 of the reference coding units in the processing block 1602 is the raster scan order, the reference coding units included in the processing block 1602 can be determined according to the raster scan order. Conversely, when the determination order 1614 of the reference coding units in another processing block 1612 is the reverse raster scan order, the reference coding units included in the processing block 1612 can be determined according to the reverse raster scan order.
[0496] According to an embodiment, the image decoding device 100 can decode the determined one or more reference coding units. The image decoding device 100 can decode an image based on the reference coding units determined as described above. The method of decoding the reference coding units can include various image decoding methods.
[0497] According to an embodiment, the image decoding device 100 can obtain block shape information indicating the shape of a current coding unit or partition shape mode information indicating a partition method of the current coding unit from a bitstream, and can use the obtained information. The block shape information or the partition shape mode information can be included in the bitstream related to various data units. For example, the image decoding device 100 can use the block shape information or the partition shape mode 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 can obtain a syntax element corresponding to the block shape information or the partition shape mode information from the bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and can use the obtained syntax element.
[0498] So far, various embodiments have been described. It will be apparent that those of ordinary skill in the art to which the present disclosure pertains can easily make various modifications thereto without changing the essential features of the present disclosure. Therefore, the disclosed embodiments should be considered in a descriptive sense only and not for the purpose of limitation. The scope of the present disclosure is defined by the appended claims rather than the above detailed description, and it should be noted that all differences falling within the claims and their equivalents are included in the scope of the present disclosure.
[0499] In addition, embodiments of the present disclosure can be written as programs executable on a computer and implemented on a general-purpose digital computer that runs the programs using a computer-readable recording medium. The computer-readable recording medium may include storage media such as magnetic storage media (e.g., ROM, floppy disks, hard disks, etc.) and optical reading media (e.g., CD-ROM, DVD, etc.).
Claims
1. An image decoding method performed by a device, the method comprising: Obtaining at least one coding unit including a current coding unit by hierarchically partitioning a current image; When the partitioning information of the current coding unit indicates that the current coding unit is not partitioned and the value indicating the area of the current coding unit is greater than or equal to the value indicating the area of a differential quantization parameter signaling unit, obtaining a differential quantization parameter for the current coding unit based on information about the transform unit that is first decoded from among at least one transform unit of the current coding unit; When the partitioning information of the current coding unit indicates that the current coding unit is partitioned, the value indicating the area of the current coding unit is equal to a predefined multiple of the value indicating the area of a differential quantization parameter signaling unit, and the partitioning type of the current coding unit is a ternary partitioning type, obtaining a differential quantization parameter for the current coding unit based on information about the transform unit that is first decoded from among at least one transform unit of the current coding unit; Obtaining a quantization parameter for the current coding unit based on a predicted quantization parameter for the current coding unit and a differential quantization parameter for the current coding unit; And Obtaining a reconstructed block of the current coding unit based on the quantization parameter for the current coding unit, wherein when the partitioning information indicates that the current coding unit is partitioned, the partitioning information indicates one of a binary partitioning type and a ternary partitioning type, and wherein the information about the transform unit includes sign information of the differential quantization parameter and absolute value information of the differential quantization parameter.
2. The image decoding method according to claim 1, wherein, When the partitioning information of the current coding unit indicates that the current coding unit is not partitioned and the value indicating the area of the current coding unit is greater than or equal to the value indicating the area of a differential quantization parameter signaling unit, obtaining a differential quantization parameter for the current coding unit based on information about the transform unit that is first decoded from among at least one transform unit of the current coding unit, includes: When a flag indicating whether signaling for a differential quantization parameter will be enabled indicates that signaling for the differential quantization parameter is enabled and a flag indicating whether a predefined signaling scheme for the differential quantization parameter will be used indicates that the predefined signaling scheme for the differential quantization parameter is used, When a partitioning flag indicating whether to partition the current coding unit indicates that the current coding unit is not partitioned, and When the sum of the value obtained by applying log2 to the width of the current coding unit and the value obtained by applying log2 to the height of the current coding unit is greater than or equal to the value obtained by applying log2 to the area of a differential quantization parameter signaling unit, When the value obtained by applying log2 to the height of the current coding unit or the value obtained by applying log2 to the width of the current coding unit is greater than the value obtained by applying log2 to the maximum size of a transform unit, determining the cuQPDeltaCode value of the current coding unit as a first value; When the values obtained by applying log2 to the height of the current coding unit and the values obtained by applying log2 to the width of the current coding unit are less than or equal to the value obtained by applying log2 to the maximum size of the transform unit, determine the value of cuQPDeltaCode of the current coding unit as a second value; and Identify the value of cuQPDeltaCode and the value of the coding block flag of the transform unit included in the current coding unit to obtain the differential quantization parameter for the current coding unit.
3. The image decoding method according to claim 1, wherein, When the partitioning information of the current coding unit indicates that the current coding unit is partitioned, and the value indicating the area of the current coding unit is equal to a predefined multiple of the value indicating the area of the differential quantization parameter signaling unit, and the partitioning type of the current coding unit is a ternary partitioning type, obtain the differential quantization parameter for the current coding unit based on the information about the transform unit that is first decoded from the at least one transform unit of the current coding unit, including: When the flag indicating whether signaling for the differential quantization parameter will be enabled indicates that signaling for the differential quantization parameter is enabled and the flag indicating whether a predefined signaling scheme for the differential quantization parameter will be used indicates that the predefined signaling scheme for the differential quantization parameter is used, When the partitioning flag indicating whether to partition the current coding unit indicates that the current coding unit will be partitioned, When the partitioning type of the current coding unit is a ternary partitioning type and the sum of the values obtained by applying log2 to the width of the current coding unit and the values obtained by applying log2 to the height of the current coding unit is equal to the value obtained by adding 1 to the value obtained by applying log2 to the area of the differential quantization parameter signaling unit, Determine the value of cuQpDeltaCode of the current coding unit as a first value; and Obtain the differential quantization parameter for the current coding unit based on the value of cuQpDeltaCode of the current coding unit.
4. The image decoding method according to claim 1, wherein, The predefined multiple is two.
5. An image decoding device, comprising: At least one processor configured to:[[]] Obtain at least one coding unit including a current coding unit by hierarchically partitioning a current image; When the partitioning information of the current coding unit indicates that the current coding unit is not partitioned, and the value indicating the area of the current coding unit is greater than or equal to the value indicating the area of the differential quantization parameter signaling unit, obtain the differential quantization parameter for the current coding unit based on the information about the transform unit that is first decoded from the at least one transform unit of the current coding unit; When the partitioning information of the current coding unit indicates that the current coding unit is partitioned, and the value indicating the area of the current coding unit is equal to a predefined multiple of the value indicating the area of the differential quantization parameter signaling unit, and the partitioning type of the current coding unit is a ternary partitioning type, obtain a differential quantization parameter for the current coding unit based on information about the transform unit that is first decoded from the at least one transform unit of the current coding unit; Obtain a quantization parameter for the current coding unit based on the predicted quantization parameter for the current coding unit and the differential quantization parameter for the current coding unit; And Obtain a reconstructed block of the current coding unit based on the quantization parameter for the current coding unit, wherein when the partitioning information indicates that the current coding unit is partitioned, the partitioning information indicates one of a binary partitioning type and a ternary partitioning type, and wherein the information about the transform unit includes sign information of the differential quantization parameter and absolute value information of the differential quantization parameter.
6. The image decoding device according to claim 5, wherein, The predefined multiple is two times.
7. An image coding method performed by a device, the method comprising: Obtain at least one coding unit including a current coding unit by hierarchically partitioning a current image; Obtain a differential quantization parameter for the current coding unit based on a predicted quantization parameter for the current coding unit and a quantization parameter for the current coding unit; When the partitioning information of the current coding unit indicates that the current coding unit is not partitioned, and the value indicating the area of the current coding unit is greater than or equal to the value indicating the area of the differential quantization parameter signaling unit, obtain information about the transform unit that is first encoded from the at least one transform unit of the current coding unit based on the differential quantization parameter for the current coding unit; When the partitioning information of the current coding unit indicates that the current coding unit is partitioned, and the value indicating the area of the current coding unit is equal to a predefined multiple of the value indicating the area of the differential quantization parameter signaling unit, and the partitioning type of the current coding unit is a ternary partitioning type, obtain information about the transform unit that is first encoded from the at least one transform unit of the current coding unit based on the differential quantization parameter for the current coding unit; And Encode the information about the transform unit that is first encoded from the at least one transform unit of the current coding unit, wherein when the partitioning information indicates that the current coding unit is partitioned, the partitioning information indicates one of a binary partitioning type and a ternary partitioning type, and wherein the information about the transform unit includes sign information of the differential quantization parameter and absolute value information of the differential quantization parameter.
8. The image encoding method according to claim 7, wherein, The predefined multiple is two times.
9. An image coding device, comprising: At least one processor configured to: Obtain at least one coding unit including a current coding unit by hierarchically partitioning a current image; Obtain a differential quantization parameter for the current coding unit based on a predicted quantization parameter for the current coding unit and a quantization parameter for the current coding unit; When the partitioning information of the current coding unit indicates that the current coding unit is not partitioned and the value indicating the area of the current coding unit is greater than or equal to the value indicating the area of the differential quantization parameter signaling unit, obtain information about the transform unit that is first coded among at least one transform unit of the current coding unit based on the differential quantization parameter for the current coding unit; When the partitioning information of the current coding unit indicates that the current coding unit is partitioned, the value indicating the area of the current coding unit is equal to a predefined multiple of the value indicating the area of the differential quantization parameter signaling unit, and the partitioning type of the current coding unit is a ternary partitioning type, obtain information about the transform unit that is first coded among the at least one transform unit of the current coding unit based on the differential quantization parameter for the current coding unit; And Encode the information about the transform unit that is first coded among the at least one transform unit of the current coding unit, wherein when the partitioning information indicates that the current coding unit is partitioned, the partitioning information indicates one of a binary partitioning type and a ternary partitioning type, and wherein the information about the transform unit includes sign information of the differential quantization parameter and absolute value information of the differential quantization parameter.
10. The image encoding device according to claim 9, wherein, The predefined multiple is two.