Video decoding method and apparatus for obtaining quantization parameter, and video encoding method and apparatus for transmitting quantization parameter

IL330431A0Pending Publication Date: 2026-08-01SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
IL330431
Authority / Receiving Office
IL · IL
Patent Type
Applications
Current Assignee / Owner
Priority Date
2020-01-10
Filing Date
2021-01-08
Publication Date
2026-08-01

AI Technical Summary

Technical Problem

Conventional video compression methods using uniform square coding units lead to image quality deterioration for high-resolution images, necessitating the development of methods to efficiently divide high-resolution images into various types of coding units.

Method used

A video decoding method and device that obtain and utilize Quantization Parameter (QP) initial values and difference values from picture headers to determine QP for coding units, enabling efficient transmission and inverse quantization of transform coefficients, while also considering non-square coding units and adaptive division methods.

Benefits of technology

This approach improves the image quality of high-resolution images by allowing for efficient division and processing of coding units, enhancing data transmission efficiency and image reconstruction accuracy.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

Provided is a video decoding method according to an embodiment provided in the present disclosure, the video decoding method comprising: obtaining, from a picture parameter set, a QP initial value and picture header QP difference value information to be applied to a current picture; when the picture header QP difference value information indicates that QP difference value information is present in a picture header of the current picture, obtaining, from the picture header, a first QP difference value for the current picture; determining a QP for a coding unit included in the current picture by using the QP initial value and the first QP difference value; obtaining transformation coefficients of the coding unit by performing inverse quantization on the coding unit by using the QP; and reconstructing the coding unit by using the transformation coefficients.
Need to check novelty before this filing date? Find Prior Art

Description

Video decoding method and device for obtaining quantization parameters, video encoding method and device for transmitting quantization parameters

[0001] The present disclosure relates to a video decoding method and device, a video encoding method and device, and a method and device for encoding a video by effectively performing a quantization parameter (QP), and a method and device for decoding a video.

[0002] In the case of conventional compression methods, the process of determining the size of the coding unit included in the picture involves deciding whether to split it, and then uniformly splitting it into four coding units of the same size through a recursive splitting process to determine square coding units. However, recently, the deterioration of the image quality of the restored image caused by the use of a uniform square coding unit shape for high-resolution images has become a problem. Therefore, methods and devices for splitting high-resolution images into coding units of various shapes have been proposed.

[0003] The present disclosure relates to a video decoding method and device, and a video encoding method and device, and aims to solve a problem of a method for efficiently transmitting a QP differential value in a video encoding device and a method for efficiently obtaining a QP differential value in a video decoding device.

[0004] A video decoding method according to an embodiment of the present disclosure may include the steps of: obtaining a QP (Quantization Parameter) initial value to be applied to a current picture from a picture parameter set, and obtaining picture header QP differential value information indicating whether QP differential value information exists in a picture header of the current picture from the picture parameter set; obtaining a first QP differential value for the current picture from the picture header when the picture header QP differential value information indicates that QP differential value information exists in the picture header of the current picture; determining a QP for a coding unit included in the current picture using the QP initial value and the first QP differential value; performing inverse quantization on the coding unit using the QP to obtain transform coefficients of the coding unit; and restoring the coding unit using the transform coefficients.

[0005] According to a video encoding method and a video decoding method according to one embodiment, a method for transmitting a differential value of a QP can be determined according to a characteristic of a picture or data transmission efficiency, and the differential value of the QP can be signaled according to the method.

[0006] To facilitate a more thorough understanding of the drawings cited herein, a brief description of each drawing is provided.

[0007] FIG. 1 illustrates a schematic block diagram of an image decoding device according to one embodiment.

[0008] FIG. 2 illustrates a flowchart of an image decoding method according to one embodiment.

[0009] FIG. 3 illustrates a process in which an image decoding device divides a current encoding unit to determine at least one encoding unit according to one embodiment.

[0010] FIG. 4 illustrates a process in which an image decoding device determines at least one encoding unit by dividing a non-square encoding unit according to one embodiment.

[0011] FIG. 5 illustrates a process in which an image decoding device divides an encoding unit based on at least one of block shape information and division shape mode information, according to one embodiment.

[0012] FIG. 6 illustrates a method for a video decoding device to determine a predetermined encoding unit among an odd number of encoding units according to one embodiment.

[0013] FIG. 7 illustrates the order in which multiple encoding units are processed when an image decoding device determines multiple encoding units by dividing a current encoding unit according to one embodiment.

[0014] FIG. 8 illustrates a process for determining that a current encoding unit is divided into an odd number of encoding units when the encoding units cannot be processed in a predetermined order, according to one embodiment.

[0015] FIG. 9 illustrates a process in which an image decoding device divides a first encoding unit to determine at least one encoding unit according to one embodiment.

[0016] FIG. 10 illustrates that, according to one embodiment, a video decoding device limits the shapes into which a second encoding unit can be divided when a non-square shape of a second encoding unit determined by dividing a first encoding unit satisfies a predetermined condition.

[0017] FIG. 11 illustrates a process of a video decoding device dividing a square-shaped encoding unit when the split shape mode information cannot indicate that the encoding unit is divided into four square-shaped encoding units according to one embodiment.

[0018] FIG. 12 illustrates that, according to one embodiment, the processing order between multiple encoding units may vary depending on the process of dividing the encoding units.

[0019] FIG. 13 illustrates a process in which the depth of an encoding unit is determined as the shape and size of the encoding unit change when the encoding unit is recursively divided to determine a plurality of encoding units according to one embodiment.

[0020] FIG. 14 illustrates an index (part index, hereinafter referred to as PID) for depth and encoding unit distinction that can be determined according to the shape and size of encoding units according to one embodiment.

[0021] FIG. 15 illustrates that a plurality of encoding units are determined according to a plurality of predetermined data units included in a picture according to one embodiment.

[0022] Figure 16 is a block diagram showing a video encoding and decoding system.

[0023] FIG. 17 illustrates a block diagram of a video decoding device according to one embodiment.

[0024] FIG. 18 illustrates a flowchart of a video decoding method according to one embodiment.

[0025] FIG. 19 illustrates a block diagram of a video encoding device according to one embodiment.

[0026] FIG. 20 illustrates a flowchart of a video encoding method according to one embodiment.

[0027] FIG. 21 illustrates a schematic diagram for deriving QP at the picture level or slice level according to one embodiment.

[0028] FIG. 22 illustrates a picture parameter set including picture header QP difference value information according to one embodiment.

[0029] FIG. 23 illustrates a picture header including a QP differential value of a current picture according to one embodiment.

[0030] FIG. 24 illustrates a slice header containing the QP differential value of the current slice according to one embodiment.

[0031] FIG. 25 illustrates a picture parameter set including information indicating whether a picture header includes deblocking filter related parameters according to one embodiment.

[0032] FIG. 26 illustrates a picture header including deblocking filter related parameters of the current picture according to one embodiment.

[0033] FIG. 27 illustrates a slice header containing deblocking filter related parameters of the current slice according to one embodiment.

[0034] FIG. 28 illustrates a picture parameter set including information indicating whether various tool-related parameters are included in the picture header according to one embodiment.

[0035] FIG. 29 illustrates a picture header including parameters related to weight prediction of a current picture, parameters related to sample adaptive offset (SAO), and parameters related to a reference picture list, according to one embodiment.

[0036] FIG. 30 illustrates a picture header including ALF (Adaptive loop filter) related parameters of the current picture according to one embodiment.

[0037] FIG. 31 illustrates a slice header including parameters related to a reference picture list of a current slice, parameters related to weight prediction, and parameters related to SAO, according to one embodiment.

[0038] FIG. 32 illustrates a slice header containing ALF related parameters of the current slice according to one embodiment.

[0039] A video decoding method according to an embodiment of the present disclosure may include the steps of: obtaining a QP (Quantization Parameter) initial value to be applied to a current picture from a picture parameter set, and obtaining picture header QP differential value information indicating whether QP differential value information exists in a picture header of the current picture from the picture parameter set; obtaining a first QP differential value for the current picture from the picture header when the picture header QP differential value information indicates that QP differential value information exists in the picture header of the current picture; determining a QP for a coding unit included in the current picture using the QP initial value and the first QP differential value; performing inverse quantization on the coding unit using the QP to obtain transform coefficients of the coding unit; and restoring the coding unit using the transform coefficients.

[0040] According to one embodiment, the video decoding method may further include: when the picture header QP differential value information indicates that the QP differential value information does not exist in the picture header, obtaining a second QP differential value for the current slice from the slice header of the current slice included in the current picture; determining a QP for the coding unit included in the current slice using the QP initial value and the second QP differential value; performing inverse quantization on the coding unit using the QP to obtain transform coefficients of the coding unit; and restoring the coding unit using the transform coefficients.

[0041] According to one embodiment, the step of performing inverse quantization on the coding unit using the QP to obtain transform coefficients of the coding unit may include: obtaining the QP differential value for the luma component of the current picture from the picture header; determining a QP for the luma component of slices included in the current picture by adding the QP initial value and the first QP differential value for the luma component; and determining a QP of the coding unit included in the current picture and included in the slices using the QP for the luma component of the slices.

[0042] According to one embodiment, the step of determining the QP of the encoding unit may include the step of obtaining a QP differential value for the encoding unit from a bitstream; and the step of determining a QP for a luma component of the encoding unit using the QP for the luma component of the slices and the QP differential value for the encoding unit.

[0043] According to one embodiment, the step of performing inverse quantization on the coding unit using the QP to obtain transform coefficients of the coding unit may include the steps of: obtaining the second QP differential value for the luma component of the current slice from the slice header; determining a QP for the luma component of the current slice by adding the second QP differential value for the luma component to the QP initial value; and determining a QP of the coding unit included in the current slice using the QP for the luma component of the current slice.

[0044] According to one embodiment, the step of determining the QP of the encoding unit may include the step of obtaining a QP differential value for the encoding unit from a bitstream; and the step of determining a QP for a luma component of the encoding unit using the QP for the luma component of the current slice and the QP differential value for the encoding unit.

[0045] According to one embodiment, the step of performing inverse quantization on the coding unit using the QP to obtain transform coefficients of the coding unit may include the steps of: obtaining a Cb QP differential value for a Cb chroma component of the current slice and a Cr QP differential value for a Cr chroma component of the current slice from the slice header; determining a Cb QP for the Cb chroma component of the current coding unit by updating a QP for the Cb chroma component of the current coding unit included in the current slice using the Cb QP differential value for the Cb chroma component of the current slice; and determining a Cr QP for the Cr chroma component of the current coding unit by updating a QP for the Cr chroma component of the current coding unit using the Cr QP differential value for the Cr chroma component of the current slice.

[0046] According to an embodiment of the present disclosure, a video decoding device may include an acquisition unit that acquires a QP initial value to be applied to a current picture from a picture parameter set, acquires picture header QP differential value information indicating whether QP differential value information exists in a picture header of the current picture from the picture parameter set, and acquires a first QP differential value for the current picture from the picture header if the picture header QP differential value information indicates that the QP differential value information exists in the picture header; and a decoding unit that determines a QP for a coding unit included in the current picture using the QP initial value and the first QP differential value if the picture header QP differential value information indicates that the QP differential value information exists in the picture header, performs inverse quantization on the coding unit using the QP to acquire transform coefficients of the coding unit, and reconstructs the coding unit using the transform coefficients of the coding unit.

[0047] A video encoding method according to an embodiment provided in the present disclosure may include: a step of determining a QP initial value to be applied to a current picture; a step of determining a first QP differential value between a QP used in a current picture and the QP initial value when the QP differential value is determined for each picture, and generating a picture header for the current picture including the first QP differential value; and a step of generating the picture parameter set including picture header QP differential value information indicating whether QP differential value information exists in the picture header of the current picture and the QP initial value.

[0048] According to one embodiment, the video encoding method may further include, when determining the QP differential value for each slice, a step of determining a second QP differential value between a QP used in a current slice included in the current picture and the QP initial value, and generating a slice header for the current slice including the second QP differential value.

[0049] According to one embodiment, the step of generating a picture header for the current picture, including the first QP differential value, may include the steps of: determining a QP for a luma component of slices included in the current picture; and determining the first QP differential value for a luma component of the current picture using a difference value between the QP for the luma component of the slices included in the current picture and the QP initial value.

[0050] According to one embodiment, the step of determining the first QP difference value may include the step of determining the QP difference value for the coding unit by using a difference value between a QP for a luma component of the coding unit and a QP for a luma component of the slices; and the step of encoding the QP difference value for the coding unit.

[0051] In one embodiment, the step of generating a slice header for the current slice, including the second QP difference value, may include the steps of: determining a QP for a luma component of the current slice; and determining the second QP difference value for the luma component of the current slice using a difference value between the QP for the luma component of the current slice and the QP initial value.

[0052] According to one embodiment, the step of determining the second QP differential value may include the step of determining the QP differential value for the encoding unit by subtracting the QP for the luma component of the current slice from the QP for the luma component of the encoding unit; and the step of encoding the QP differential value for the encoding unit.

[0053] According to one embodiment, the step of determining the second QP difference may include: a step of determining a Cb QP difference for a Cb chroma component of the current coding unit to determine a QP of the Cb chroma component of the current coding unit included in the current slice; a step of determining a Cr QP difference for a Cr chroma component of the current coding unit to determine a QP of the Cr chroma component of the current coding unit included in the current slice; and a step of encoding the Cb QP difference for the Cb chroma component of the current slice and the Cr QP difference for the Cr chroma component of the current slice, and generating a slice header for the current slice including the Cb QP difference and the Cr QP difference.

[0054] A computer-readable recording medium is provided, having recorded thereon a program for performing a video decoding method according to one embodiment of the present disclosure by a computer.

[0055] A computer-readable recording medium is provided, having recorded thereon a program for performing a video encoding method according to one embodiment of the present disclosure by a computer.

[0056] The present disclosure may be subject to various modifications and embodiments. Specific embodiments are illustrated in the drawings and described in detail herein. However, this is not intended to limit the embodiments of the present disclosure, and it should be understood that the present disclosure encompasses all modifications, equivalents, and alternatives falling within the spirit and technical scope of the various embodiments.

[0057] In describing the embodiments, detailed descriptions of related known technologies are omitted if they are deemed to unnecessarily obscure the gist of the present disclosure. Furthermore, numbers (e.g., "first," "second," etc.) used throughout the description of the specification are merely identifiers used to distinguish one component from another.

[0058] Additionally, in this specification, when a component is referred to as being “connected” or “connected” to another component, it should be understood that the component may be directly connected or connected to the other component, but may also be connected or connected via another component in between, unless there is a specific description to the contrary.

[0059] In addition, components expressed as 'unit', 'module', etc. in this specification may be two or more components combined into one component, or one component may be divided into two or more components with more detailed functions. In addition, each component described below may additionally perform some or all of the functions performed by other components in addition to its own main function, and of course, some of the main functions performed by each component may be performed exclusively by other components.

[0060] Additionally, in this specification, 'image' or 'picture' may refer to a still image of a video or a moving image, i.e., the video itself.

[0061] Additionally, in this specification, "sample" refers to data assigned to a sampling location in an image and is the subject of processing. For example, pixel values ​​in a spatial domain image and transform coefficients in a transform domain may be samples. A unit containing at least one such sample may be defined as a block.

[0062] Additionally, in this specification, 'current block' may mean a block of the maximum encoding unit, encoding unit, prediction unit, or transformation unit of the current image to be encoded or decoded.

[0063] Also, in this specification, when a motion vector is in the direction of list 0, it may mean that the motion vector is used to point to a block in a reference picture included in list 0, and when a motion vector is in the direction of list 1, it may mean that the motion vector is used to point to a block in a reference picture included in list 1. Also, when a motion vector is unidirectional, it may mean that the motion vector is used to point to a block in a reference picture included in list 0 or list 1, and when a motion vector is bidirectional, it may mean that the motion vector includes a motion vector in the direction of list 0 and a motion vector in the direction of list 1.

[0064] Also, in this specification, 'binary split' of a block means a split that creates two sub-blocks each having half the width or height of the block. Specifically, when 'binary vertical split' is performed on the current block, the split is performed vertically (vertically) at a point halfway between the width of the current block, so that two sub-blocks can be created that have a width that is half the width of the current block and a height that is the same as the height of the current block. When 'binary horizontal split' is performed on the current block, the split is performed horizontally (horizontally) at a point halfway between the height of the current block, so that two sub-blocks can be created that have a height that is half the height of the current block and a width that is the same as the width of the current block.

[0065] Also, in this specification, 'ternary split' of a block means a split in which the width or height of the block is split in a 1:2:1 ratio to create three sub-blocks. Specifically, when 'ternary vertical split' is performed on the current block, the split is performed in the vertical direction (vertical direction) at a point with a 1:2:1 ratio of the width of the current block, so that two sub-blocks having a width that is 1 / 4 of the width of the current block and the same height as the current block, and one sub-block having a width that is 2 / 4 of the width of the current block and the same height as the height of the current block can be created. When a 'ternary horizontal split' is performed on the current block, the split is performed horizontally (horizontally) at a point with a ratio of 1:2:1 of the height of the current block, so that two sub-blocks with a height that is 1 / 4 of the height of the current block and a width that is the same as the width of the current block can be created, and one sub-block with a height that is 2 / 4 of the height of the current block and a width that is the same as the width of the current block can be created.

[0066] In addition, in this specification, 'quad split' of a block means a split in which the width and height of the block are split in a 1:1 ratio to create four sub-blocks. Specifically, when 'quad split' is performed on the current block, the split is performed vertically (vertically) at a point halfway between the width of the current block and horizontally (horizontally) at a point halfway between the height of the current block, so that four sub-blocks can be created each having a width that is halfway between the width of the current block and a height that is halfway between the height of the current block.

[0067] Hereinafter, with reference to FIGS. 1 to 16, an image encoding device, an image decoding device, an image encoding method, and an image decoding method according to an embodiment are described. With reference to FIGS. 3 to 16, a method for determining a data unit of an image according to an embodiment is described, and with reference to FIGS. 17 to 40, a video encoding / decoding method according to an embodiment using the determined data unit is described.

[0068] Hereinafter, with reference to FIGS. 1 and 2, a method and device for adaptively selecting based on various types of encoding units according to one embodiment of the present disclosure are described.

[0069] FIG. 1 illustrates a schematic block diagram of an image decoding device according to one embodiment.

[0070] The video decoding device (100) may include a receiving unit (110) and a decoding unit (120). The receiving unit (110) and the decoding unit (120) may include at least one processor. In addition, the receiving unit (110) and the decoding unit (120) may include a memory that stores instructions to be executed by at least one processor.

[0071] The receiving unit (110) can receive a bitstream. The bitstream includes information obtained by encoding an image by an image encoding device (2200) described below. In addition, the bitstream can be transmitted from the image encoding device (2200). The image encoding device (2200) and the image decoding device (100) can be connected by wire or wirelessly, and the receiving unit (110) can receive the bitstream by wire or wirelessly. The receiving unit (110) can receive the bitstream from a storage medium such as an optical medium or a hard disk. The decoding unit (120) can restore the image based on information obtained from the received bitstream. The decoding unit (120) can obtain syntax elements for restoring the image from the bitstream. The decoding unit (120) can restore the image based on the syntax elements.

[0072] The operation of the video decoding device (100) will be described in more detail with reference to FIG. 2.

[0073] FIG. 2 illustrates a flowchart of an image decoding method according to one embodiment.

[0074] According to one embodiment of the present disclosure, the receiving unit (110) receives a bitstream.

[0075] The image decoding device (100) performs a step (210) of obtaining a binstring corresponding to a splitting shape mode of an encoding unit from a bitstream. The image decoding device (100) performs a step (220) of determining a splitting rule of the encoding unit. In addition, the image decoding device (100) performs a step (230) of splitting the encoding unit into a plurality of encoding units based on at least one of the binstring corresponding to the splitting shape mode and the splitting rule. In order to determine the splitting rule, the image decoding device (100) may determine a first allowable range of the size of the encoding unit according to a ratio of the width and height of the encoding unit. In order to determine the splitting rule, the image decoding device (100) may determine a second allowable range of the size of the encoding unit according to the splitting shape mode of the encoding unit.

[0076] Below, the division of encoding units according to one embodiment of the present disclosure is described in detail.

[0077] First, a picture can be divided into one or more slices or one or more tiles. A slice or a tile can be a sequence of one or more Coding Tree Units (CTUs). The concept that contrasts with a Coding Tree Block (CTB) is a Coding Tree Block (CTB).

[0078] A maximum coding block (CTB) is an NxN block containing NxN samples (where N is an integer). Each color component can be divided into one or more maximum coding blocks.

[0079] When a picture has three sample arrays (sample arrays for Y, Cr, and Cb components), a maximum coding unit (CTU) is a unit that includes a maximum coding block of luma samples, two maximum coding blocks of corresponding chroma samples, and syntax structures used to encode the luma samples and chroma samples. When a picture is a monochrome picture, a maximum coding unit is a unit that includes a maximum coding block of monochrome samples and syntax structures used to encode the monochrome samples. When a picture is a picture that is encoded with a color plane that is separated by color components, a maximum coding unit is a unit that includes syntax structures used to encode the picture and samples of the picture.

[0080] A single maximum coding block (CTB) can be divided into MxN coding blocks containing MxN samples (M, N are integers).

[0081] When a picture has a sample array for each Y, Cr, and Cb component, a coding unit (CU) is a unit that includes a coding block for a luma sample and two coding blocks for corresponding chroma samples, and syntax structures used to encode the luma sample and the chroma samples. When a picture is a monochrome picture, a coding unit is a unit that includes a coding block for a monochrome sample and syntax structures used to encode the monochrome samples. When a picture is a picture that is encoded with a color plane that is separated by color component, a coding unit is a unit that includes syntax structures used to encode the picture and samples of the picture.

[0082] As explained above, the maximum coding block and the maximum coding unit are distinct concepts, and the coding block and the coding unit are distinct concepts. That is, the (maximum) coding unit refers to a data structure including a (maximum) coding block including the corresponding sample and a syntax structure corresponding to it. However, since a person skilled in the art can understand that the (maximum) coding unit or the (maximum) coding block refers to a block of a predetermined size including a predetermined number of samples, the following specification will refer to the maximum coding block and the maximum coding unit, or the coding block and the coding unit, without distinction unless there are special circumstances.

[0083] An image can be divided into Coding Tree Units (CTUs). The size of the CTUs can be determined based on information obtained from the bitstream. The shape of the CTUs can be a square of equal size, but is not limited thereto.

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

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

[0086] According to one embodiment, since information about the maximum size of a luma coding block capable of binary splitting is obtained from a bitstream, the maximum size of the luma coding block capable of binary splitting can be determined variably. Alternatively, the maximum size of a luma coding block capable of ternary splitting can be fixed. For example, the maximum size of a luma coding block capable of ternary splitting in an I picture may be 32x32, and the maximum size of a luma coding block capable of ternary splitting in a P picture or a B picture may be 64x64.

[0087] Additionally, the maximum coding unit can be hierarchically divided into coding units based on the division shape mode information obtained from the bitstream. As the division shape mode information, at least one of information indicating whether quad division is performed, information indicating whether multi-division is performed, division direction information, and division type information can be obtained from the bitstream.

[0088] For example, information indicating whether a quad split is present may indicate whether the current encoding unit is to be quad split (QUAD_SPLIT) or not to be quad split.

[0089] If the current encoding unit is not quad-split, the information indicating whether it is multi-split may indicate whether the current encoding unit will not be split any further (NO_SPLIT) or whether it will be binary / ternary split.

[0090] When the current encoding unit is binary or ternary split, the split direction information indicates that the current encoding unit is split in either the horizontal or vertical direction.

[0091] When the current encoding unit is split in the horizontal or vertical direction, the split type information indicates that the current encoding unit is split into binary split or ternary split.

[0092] Depending on the split direction information and the split type information, the split mode of the current encoding unit can be determined. The split mode when the current encoding unit is split into binaries in the horizontal direction can be determined as binary horizontal split (SPLIT_BT_HOR), the split mode when the current encoding unit is split into ternaries in the horizontal direction can be determined as ternary horizontal split (SPLIT_TT_HOR), the split mode when the current encoding unit is split into binaries in the vertical direction can be determined as binary vertical split (SPLIT_BT_VER), and the split mode when the current encoding unit is split into ternaries in the vertical direction can be determined as ternary vertical split (SPLIT_BT_VER).

[0093] The image decoding device (100) can obtain segmentation shape mode information from a bitstream from a single binstring. The format of the bitstream received by the image decoding device (100) can include a fixed length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. The binstring represents information as a series of binary numbers. The binstring can be composed of at least one bit. The image decoding device (100) can obtain segmentation shape mode information corresponding to the binstring based on a segmentation rule. The image decoding device (100) can determine whether to quad-segment an encoding unit, whether not to quad-segment, or the segmentation direction and segmentation type based on a single binstring.

[0094] The coding unit may be smaller than or equal to the maximum coding unit. For example, the maximum coding unit is also a coding unit with the maximum size, so it is a coding unit. If the split shape mode information for the maximum coding unit indicates that it is not split, the coding unit determined from the maximum coding unit has the same size as the maximum coding unit. If the split shape mode information for the maximum coding unit indicates that it is split, the maximum coding unit may be split into coding units. In addition, if the split shape mode information for the coding unit indicates splitting, the coding units may be split into coding units of smaller sizes. However, the splitting of the image is not limited thereto, and the maximum coding unit and the coding units may not be distinguished. The splitting of the coding unit is described in more detail with reference to FIGS. 3 to 16.

[0095] Additionally, one or more prediction blocks for prediction may be determined from the coding unit. The prediction blocks may be equal to or smaller than the coding unit. Additionally, one or more transformation blocks for transformation may be determined from the coding unit. The transformation blocks may be equal to or smaller than the coding unit.

[0096] The shape and size of the transformation block and the prediction block may be unrelated.

[0097] In another embodiment, prediction may be performed using the encoding unit as a prediction block. Transformation may also be performed using the encoding unit as a transform block.

[0098] The division of a coding unit is described in more detail with reference to FIGS. 3 to 16. The current block and neighboring blocks of the present disclosure may represent one of a maximum coding unit, a coding unit, a prediction block, and a transform block. In addition, the current block or the current coding unit is a block currently being decoded or encoded, or a block currently being divided. The neighboring block may be a block reconstructed before the current block. The neighboring block may be spatially or temporally adjacent to the current block. The neighboring block may be located on one of the lower left, left, upper left, upper right, upper right, right, and lower right sides of the current block.

[0099] FIG. 3 illustrates a process in which an image decoding device divides a current encoding unit to determine at least one encoding unit according to one embodiment.

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

[0101] The shape of the encoding unit may include square and non-square. When the width and height of the encoding unit are equal (i.e., when the block shape of the encoding unit is 4Nx4N), the image decoding device (100) may determine the block shape information of the encoding unit as square. The image decoding device (100) may determine the shape of the encoding unit as non-square.

[0102] When the width and height of the encoding unit are different (i.e., when the block shape of the encoding unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the image decoding device (100) may determine the block shape information of the encoding unit to be non-square. When the shape of the encoding unit is non-square, the image decoding device (100) may determine the ratio of the width and height among the block shape information of the encoding unit to be at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, and 32:1. Additionally, based on the width length and height length of the encoding unit, the image decoding device (100) can determine whether the encoding unit is in the horizontal or vertical direction. Additionally, based on at least one of the width length, height length, or area of ​​the encoding unit, the image decoding device (100) can determine the size of the encoding unit.

[0103] According to one embodiment, the image decoding device (100) can determine the shape of an encoding unit using block shape information, and can determine the shape into which the encoding unit is divided using segmentation shape mode information. That is, the splitting method of the encoding unit indicated by the segmentation shape mode information can be determined depending on which block shape the block shape information used by the image decoding device (100) indicates.

[0104] The image decoding device (100) can obtain the segmentation shape mode information from the bitstream. However, the present invention is not limited thereto, and the image decoding device (100) and the image encoding device (2200) can determine the pre-agreed segmentation shape mode information based on the block shape information. The image decoding device (100) can determine the pre-agreed segmentation shape mode information for the maximum coding unit or the minimum coding unit. For example, the image decoding device (100) can determine the segmentation shape mode information for the maximum coding unit as quad split. In addition, the image decoding device (100) can determine the segmentation shape mode information for the minimum coding unit as “not split.” Specifically, the image decoding device (100) can determine the size of the maximum coding unit as 256x256. The image decoding device (100) can determine the pre-agreed segmentation shape mode information as quad split. Quad splitting is a splitting mode that divides both the width and height of an encoding unit in half. The image decoding device (100) can obtain a coding unit of size 128x128 from a maximum coding unit of size 256x256 based on the splitting mode information. In addition, the image decoding device (100) can determine the size of the minimum coding unit as 4x4. The image decoding device (100) can obtain splitting mode information indicating "not splitting" for the minimum coding unit.

[0105] According to one embodiment, the image decoding device (100) may use block shape information indicating that the current encoding unit is a square shape. For example, the image decoding device (100) may determine whether to not split a square encoding unit, to split it vertically, to split it horizontally, to split it into four encoding units, etc., according to the split shape mode information. Referring to FIG. 3, when the block shape information of the current encoding unit (300) indicates a square shape, the decoding unit (120) may not split an encoding unit (310a) having the same size as the current encoding unit (300) according to the split shape mode information indicating that it is not split, or may determine a split encoding unit (310b, 310c, 310d, 310e, 310f, etc.) based on the split shape mode information indicating a predetermined splitting method.

[0106] Referring to FIG. 3, the image decoding device (100) may determine two coding units (310b) by vertically dividing the current coding unit (300) based on the split shape mode information indicating that the current coding unit (300) is vertically divided, according to an embodiment. The image decoding device (100) may determine two coding units (310c) by horizontally dividing the current coding unit (300) based on the split shape mode information indicating that the current coding unit (300) is horizontally divided, according to an embodiment. The image decoding device (100) may determine four coding units (310d) by vertically and horizontally dividing the current coding unit (300) based on the split shape mode information indicating that the current coding unit (300) is vertically and horizontally divided, according to an embodiment. The image decoding device (100) may determine three coding units (310e) by vertically dividing the current coding unit (300) based on the split shape mode information indicating that the current coding unit (300) is ternary divided, according to an embodiment. The image decoding device (100) can determine three coding units (310f) into which the current coding unit (300) is horizontally divided based on the division shape mode information indicating that the ternary division is horizontally divided. However, the division shapes into which a square coding unit can be divided should not be interpreted as being limited to the above-described shapes, and may include various shapes that can be indicated by the division shape mode information. Specified division shapes into which a square coding unit is divided will be specifically described below through various embodiments.

[0107] FIG. 4 illustrates a process in which an image decoding device determines at least one encoding unit by dividing a non-square encoding unit according to one embodiment.

[0108] According to one embodiment, the image decoding device (100) may utilize block shape information indicating that the current encoding unit is non-square. The image decoding device (100) may determine whether to not split the current non-square encoding unit or to split it using a predetermined method based on the split shape mode information. Referring to FIG. 4, when the block shape information of the current encoding unit (400 or 450) indicates a non-square shape, the image decoding device (100) may determine an encoding unit (410 or 460) having the same size as the current encoding unit (400 or 450) according to the split shape mode information indicating that it is not split, or may determine a split encoding unit (420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, 480c) based on the split shape mode information indicating a predetermined splitting method. The predetermined splitting method by which a non-square encoding unit is split will be described in detail through various embodiments below.

[0109] According to one embodiment, the image decoding device (100) may determine a form in which an encoding unit is split using split form mode information, and in this case, the split form mode information may indicate the number of at least one encoding unit generated by splitting the encoding unit. Referring to FIG. 4, when the split form mode information indicates that the current encoding unit (400 or 450) is split into two encoding units, the image decoding device (100) may split the current encoding unit (400 or 450) based on the split form mode information to determine two encoding units (420a, 420b, or 470a, 470b) included in the current encoding unit.

[0110] According to one embodiment, when the image decoding device (100) splits a current encoding unit (400 or 450) having a non-square shape based on split shape mode information, the image decoding device (100) may split the current encoding unit by considering the position of the long side of the non-square current encoding unit (400 or 450). For example, the image decoding device (100) may split the current encoding unit (400 or 450) in a direction that splits the long side of the current encoding unit (400 or 450) by considering the shape of the current encoding unit (400 or 450) to determine a plurality of encoding units.

[0111] According to one embodiment, if the split shape mode information indicates that the coding unit is split into an odd number of blocks (ternary splitting), the image decoding device (100) may determine an odd number of coding units included in the current coding unit (400 or 450). For example, if the split shape mode information indicates that the current coding unit (400 or 450) is split into three coding units, the image decoding device (100) may split the current coding unit (400 or 450) into three coding units (430a, 430b, 430c, 480a, 480b, 480c).

[0112] According to one embodiment, the ratio of the width and height of the current encoding unit (400 or 450) may be 4:1 or 1:4. When the ratio of the width and height is 4:1, the block shape information may be in the horizontal direction because the length of the width is longer than the length of the height. When the ratio of the width and height is 1:4, the block shape information may be in the vertical direction because the length of the width is shorter than the length of the height. The image decoding device (100) may determine to split the current encoding unit into an odd number of blocks based on the split shape mode information. In addition, the image decoding device (100) may determine the splitting direction of the current encoding unit (400 or 450) based on the block shape information of the current encoding unit (400 or 450). For example, if the current encoding unit (400) is in the vertical direction, the image decoding device (100) can divide the current encoding unit (400) in the horizontal direction to determine encoding units (430a, 430b, 430c). Also, if the current encoding unit (450) is in the horizontal direction, the image decoding device (100) can divide the current encoding unit (450) in the vertical direction to determine encoding units (480a, 480b, 480c).

[0113] According to one embodiment, the image decoding device (100) may determine an odd number of coding units included in the current coding unit (400 or 450), and the sizes of the determined coding units may not all be the same. For example, among the determined odd number of coding units (430a, 430b, 430c, 480a, 480b, 480c), the size of a given coding unit (430b or 480b) may have a different size from the other coding units (430a, 430c, 480a, 480c). That is, the encoding units into which the current encoding unit (400 or 450) can be divided and determined can have multiple types of sizes, and in some cases, an odd number of encoding units (430a, 430b, 430c, 480a, 480b, 480c) can each have different sizes.

[0114] According to one embodiment, when the split shape mode information indicates that the coding unit is split into an odd number of blocks, the image decoding device (100) can determine an odd number of coding units included in the current coding unit (400 or 450), and further, the image decoding device (100) can place a predetermined restriction on at least one coding unit among the odd number of coding units generated by splitting. Referring to FIG. 4, the image decoding device (100) can perform a decoding process for a coding unit (430b, 480b) located in the center among three coding units (430a, 430b, 430c, 480a, 480b, 480c) generated by splitting the current coding unit (400 or 450) differently from the decoding process for other coding units (430a, 430c, 480a, 480c). For example, the image decoding device (100) can restrict the encoding unit (430b, 480b) located in the center from being split any further, unlike other encoding units (430a, 430c, 480a, 480c), or can restrict it to be split only a predetermined number of times.

[0115] FIG. 5 illustrates a process in which an image decoding device divides an encoding unit based on at least one of block shape information and division shape mode information, according to one embodiment.

[0116] According to one embodiment, the image decoding device (100) may determine whether to split or not to split a first coding unit (500) having a square shape into coding units based on at least one of block shape information and split shape mode information. According to one embodiment, when the split shape mode information indicates splitting the first coding unit (500) in the horizontal direction, the image decoding device (100) may split the first coding unit (500) in the horizontal direction to determine a second coding unit (510). The first coding unit, the second coding unit, and the third coding unit used according to one embodiment are terms used to understand the relationship before and after splitting between coding units. For example, when the first coding unit is split, the second coding unit may be determined, and when the second coding unit is split, the third coding unit may be determined. Hereinafter, the relationship between the first coding unit, the second coding unit, and the third coding unit used may be understood to follow the above-described characteristics.

[0117] According to one embodiment, the image decoding device (100) may determine to split or not split the determined second encoding unit (510) into encoding units based on the split shape mode information. Referring to FIG. 5, the image decoding device (100) may split the first encoding unit (500) based on the split shape mode information to split the determined second encoding unit (510) of a non-square shape into at least one third encoding unit (520a, 520b, 520c, 520d, etc.) or may not split the second encoding unit (510). The image decoding device (100) can obtain split shape mode information, and the image decoding device (100) can split the first encoding unit (500) based on the obtained split shape mode information to split a plurality of second encoding units (e.g., 510) of various shapes, and the second encoding unit (510) can be split according to the way in which the first encoding unit (500) is split based on the split shape mode information. According to one embodiment, when the first encoding unit (500) is split into the second encoding unit (510) based on the split shape mode information for the first encoding unit (500), the second encoding unit (510) can also be split into the third encoding unit (e.g., 520a, 520b, 520c, 520d, etc.) based on the split shape mode information for the second encoding unit (510). That is, the coding unit can be recursively split based on the split shape mode information associated with each coding unit. Accordingly, a square coding unit can be determined from a non-square coding unit, and such a square coding unit can be recursively split to determine a non-square coding unit.

[0118] Referring to FIG. 5, among the odd number of third coding units (520b, 520c, 520d) determined by splitting the second coding unit (510) having a non-square shape, a predetermined coding unit (e.g., a coding unit located in the middle or a coding unit having a square shape) may be split recursively. According to an embodiment, the third coding unit (520b) having a square shape, which is one of the odd number of third coding units (520b, 520c, 520d), may be split horizontally into a plurality of fourth coding units. The fourth coding unit (530b or 530d) having a non-square shape, which is one of the plurality of fourth coding units (530a, 530b, 530c, 530d), may be split again into a plurality of coding units. For example, the fourth coding unit (530b or 530d) having a non-square shape may be further divided into an odd number of coding units. Methods that can be used for recursive division of coding units will be described later through various embodiments.

[0119] According to one embodiment, the image decoding device (100) may split each of the third encoding units (520a, 520b, 520c, 520d, etc.) into encoding units based on the split shape mode information. In addition, the image decoding device (100) may determine not to split the second encoding unit (510) based on the split shape mode information. According to one embodiment, the image decoding device (100) may split the second encoding unit (510) having a non-square shape into an odd number of third encoding units (520b, 520c, 520d). The image decoding device (100) may place a predetermined restriction on a predetermined third encoding unit among the odd number of third encoding units (520b, 520c, 520d). For example, the image decoding device (100) can limit the encoding unit (520c) located in the middle among an odd number of third encoding units (520b, 520c, 520d) to not be divided any further or to be divided a settable number of times.

[0120] Referring to FIG. 5, the image decoding device (100) may limit the coding unit (520c) located in the middle among the odd number of third coding units (520b, 520c, 520d) included in the second coding unit (510) having a non-square shape to not be split any further, or to be split in a predetermined split form (for example, to be split only into four coding units or to be split in a form corresponding to the split form of the second coding unit (510), or to be split only a predetermined number of times (for example, to be split only n times, where n>0). However, the above limitations on the coding unit (520c) located in the middle are merely simple embodiments and should not be interpreted as being limited to the above-described embodiments, but should be interpreted as including various limitations in which the coding unit (520c) located in the middle can be decoded differently from the other coding units (520b, 520d).

[0121] According to one embodiment, the image decoding device (100) can obtain the segmentation shape mode information used to segment the current encoding unit from a predetermined location within the current encoding unit.

[0122] FIG. 6 illustrates a method for a video decoding device to determine a predetermined encoding unit among an odd number of encoding units according to one embodiment.

[0123] Referring to FIG. 6, the split shape mode information of the current encoding unit (600, 650) can be obtained from a sample at a predetermined position among a plurality of samples included in the current encoding unit (600, 650) (for example, a sample (640, 690) located in the center). However, the predetermined position within the current encoding unit (600) from which at least one of the split shape mode information can be obtained should not be interpreted as being limited to the center position illustrated in FIG. 6, but should be interpreted as including various positions (for example, top, bottom, left, right, upper left, lower left, upper right, or lower right, etc.) that can be included within the current encoding unit (600). The image decoding device (100) can obtain the split shape mode information obtained from the predetermined position and determine whether or not to split the current encoding unit into encoding units of various shapes and sizes.

[0124] According to one embodiment, the image decoding device (100) may select one of the coding units when the current coding unit is divided into a predetermined number of coding units. Various methods may be used to select one of the multiple coding units, and descriptions of such methods will be provided later through various embodiments.

[0125] According to one embodiment, the image decoding device (100) can divide the current encoding unit into a plurality of encoding units and determine an encoding unit at a predetermined position.

[0126] According to one embodiment, the image decoding device (100) may use information indicating the positions of each of the odd-numbered coding units to determine an coding unit located in the middle of the odd-numbered coding units. Referring to FIG. 6, the image decoding device (100) may divide the current coding unit (600) or the current coding unit (650) to determine odd-numbered coding units (620a, 620b, 620c) or odd-numbered coding units (660a, 660b, 660c). The image decoding device (100) may use information about the positions of the odd-numbered coding units (620a, 620b, 620c) or odd-numbered coding units (660a, 660b, 660c) to determine the middle coding unit (620b) or the middle coding unit (660b). For example, the image decoding device (100) can determine the coding unit (620b) located in the center by determining the positions of the coding units (620a, 620b, 620c) based on information indicating the positions of predetermined samples included in the coding units (620a, 620b, 620c). Specifically, the image decoding device (100) can determine the coding unit (620b) located in the center by determining the positions of the coding units (620a, 620b, 620c) based on information indicating the positions of samples (630a, 630b, 630c) at the upper left of the coding units (620a, 620b, 620c).

[0127] According to one embodiment, information indicating the positions of the upper left samples (630a, 630b, 630c) included in each of the coding units (620a, 620b, 620c) may include information on the positions or coordinates of the coding units (620a, 620b, 620c) within the picture. According to one embodiment, information indicating the positions of the upper left samples (630a, 630b, 630c) included in each of the coding units (620a, 620b, 620c) may include information indicating the width or height of the coding units (620a, 620b, 620c) included in the current coding unit (600), and this width or height may correspond to information indicating the difference between the coordinates of the coding units (620a, 620b, 620c) within the picture. That is, the image decoding device (100) can determine the encoding unit (620b) located in the center by directly using information about the positions or coordinates of the encoding units (620a, 620b, 620c) within the picture or by using information about the width or height of the encoding unit corresponding to the difference between the coordinates.

[0128] According to one embodiment, information indicating the position of the sample (630a) at the upper left of the upper encoding unit (620a) may represent (xa, ya) coordinates, information indicating the position of the sample (530b) at the upper left of the middle encoding unit (620b) may represent (xb, yb) coordinates, and information indicating the position of the sample (630c) at the upper left of the lower encoding unit (620c) may represent (xc, yc) coordinates. The image decoding device (100) may determine the middle encoding unit (620b) using the coordinates of the upper left samples (630a, 630b, 630c) included in the encoding units (620a, 620b, 620c), respectively. For example, when the coordinates of the samples (630a, 630b, 630c) on the upper left are sorted in ascending or descending order, the encoding unit (620b) including the coordinates (xb, yb) of the sample (630b) located in the center can be determined as the encoding unit located in the center among the encoding units (620a, 620b, 620c) determined by dividing the current encoding unit (600). However, the coordinates indicating the positions of the upper left samples (630a, 630b, 630c) may indicate coordinates indicating the absolute positions within the picture, and further, based on the position of the upper left sample (630a) of the upper left coding unit (620a), the (dxb, dyb) coordinates, which are information indicating the relative position of the sample (630b) of the upper left of the middle coding unit (620b), and the (dxc, dyc) coordinates, which are information indicating the relative position of the sample (630c) of the upper left of the lower coding unit (620c), may be used. In addition, the method of determining the coding unit of a given position by using the coordinates of the corresponding sample as information indicating the position of the sample included in the coding unit should not be interpreted as being limited to the above-described method, but should be interpreted as various arithmetic methods that can utilize the coordinates of the sample.

[0129] According to one embodiment, the image decoding device (100) may divide the current encoding unit (600) into a plurality of encoding units (620a, 620b, 620c), and select an encoding unit from among the encoding units (620a, 620b, 620c) according to a predetermined criterion. For example, the image decoding device (100) may select an encoding unit (620b) having a different size from among the encoding units (620a, 620b, 620c).

[0130] According to one embodiment, the image decoding device (100) may determine the width or height of each of the encoding units (620a, 620b, 620c) by using the (xa, ya) coordinate, which is information indicating the position of the sample (630a) at the upper left of the upper encoding unit (620a), the (xb, yb) coordinate, which is information indicating the position of the sample (630b) at the upper left of the middle encoding unit (620b), and the (xc, yc) coordinate, which is information indicating the position of the sample (630c) at the upper left of the lower encoding unit (620c). The image decoding device (100) can determine the size of each of the encoding units (620a, 620b, 620c) using coordinates (xa, ya), (xb, yb), (xc, yc) indicating the positions of the encoding units (620a, 620b, 620c). According to one embodiment, the image decoding device (100) can determine the width of the upper encoding unit (620a) as the width of the current encoding unit (600). The image decoding device (100) can determine the height of the upper encoding unit (620a) as yb-ya. According to one embodiment, the image decoding device (100) can determine the width of the middle encoding unit (620b) as the width of the current encoding unit (600). The image decoding device (100) may determine the height of the middle encoding unit (620b) as yc-yb. According to one embodiment, the image decoding device (100) may determine the width or height of the lower encoding unit using the width or height of the current encoding unit and the width and height of the upper encoding unit (620a) and the middle encoding unit (620b). The image decoding device (100) may determine an encoding unit having a different size from other encoding units based on the width and height of the determined encoding units (620a, 620b, 620c).Referring to FIG. 6, the image decoding device (100) can determine the middle encoding unit (620b) having a different size from the sizes of the upper encoding unit (620a) and the lower encoding unit (620c) as the encoding unit of a predetermined position. However, the process by which the image decoding device (100) described above determines the encoding unit having a different size from other encoding units is merely an embodiment of determining the encoding unit of a predetermined position using the size of the encoding unit determined based on sample coordinates, and therefore, various processes of determining the encoding unit of a predetermined position by comparing the sizes of the encoding units determined according to predetermined sample coordinates can be used.

[0131] The image decoding device (100) can determine the width or height of each of the encoding units (660a, 660b, 660c) by using the (xd, yd) coordinate, which is information indicating the position of the sample (670a) at the upper left of the left encoding unit (660a), the (xe, ye) coordinate, which is information indicating the position of the sample (670b) at the upper left of the middle encoding unit (660b), and the (xf, yf) coordinate, which is information indicating the position of the sample (670c) at the upper left of the right encoding unit (660c). The image decoding device (100) can determine the size of each of the encoding units (660a, 660b, 660c) by using the (xd, yd), (xe, ye), (xf, yf), which are coordinates indicating the positions of the encoding units (660a, 660b, 660c).

[0132] According to one embodiment, the image decoding device (100) may determine the width of the left encoding unit (660a) as xe-xd. The image decoding device (100) may determine the height of the left encoding unit (660a) as the height of the current encoding unit (650). According to one embodiment, the image decoding device (100) may determine the width of the middle encoding unit (660b) as xf-xe. The image decoding device (100) may determine the height of the middle encoding unit (660b) as the height of the current encoding unit (600). According to one embodiment, the image decoding device (100) may determine the width or height of the right encoding unit (660c) using the width or height of the current encoding unit (650) and the widths and heights of the left encoding unit (660a) and the middle encoding unit (660b). The image decoding device (100) can determine an encoding unit having a different size from other encoding units based on the width and height of the determined encoding units (660a, 660b, 660c). Referring to FIG. 6, the image decoding device (100) can determine a middle encoding unit (660b) having a different size from the sizes of the left encoding unit (660a) and the right encoding unit (660c) as an encoding unit at a predetermined position. However, the process of the image decoding device (100) described above determining an encoding unit having a different size from other encoding units is merely an embodiment of determining an encoding unit at a predetermined position using the size of the encoding unit determined based on sample coordinates, and therefore, various processes of determining an encoding unit at a predetermined position by comparing the sizes of the encoding units determined according to predetermined sample coordinates can be used.

[0133] However, the location of the sample considered for determining the location of the encoding unit should not be interpreted as being limited to the upper left corner described above, and it can be interpreted that information on the location of any sample included in the encoding unit can be used.

[0134] According to one embodiment, the image decoding device (100) may select an coding unit at a predetermined position from among an odd number of coding units determined by dividing the current coding unit, taking into consideration the shape of the current coding unit. For example, if the current coding unit has a non-square shape in which the width is longer than the height, the image decoding device (100) may determine an coding unit at a predetermined position in the horizontal direction. That is, the image decoding device (100) may determine one of the coding units whose positions are set differently in the horizontal direction and place a restriction on the corresponding coding unit. If the current coding unit has a non-square shape in which the height is longer than the width, the image decoding device (100) may determine an coding unit at a predetermined position in the vertical direction. That is, the image decoding device (100) may determine one of the coding units whose positions are set differently in the vertical direction and place a restriction on the corresponding coding unit.

[0135] According to one embodiment, the image decoding device (100) may use information indicating the positions of each of the even-numbered coding units to determine the coding unit at a predetermined position among the even-numbered coding units. The image decoding device (100) may determine the even-numbered coding units by dividing the current coding unit (binary dividing) and may determine the coding unit at a predetermined position using information about the positions of the even-numbered coding units. A specific process for this may be a process corresponding to the process of determining the coding unit at a predetermined position (e.g., the center position) among the odd-numbered coding units described above in FIG. 6, and thus will be omitted.

[0136] According to one embodiment, when a current encoding unit having a non-square shape is split into a plurality of encoding units, predetermined information about the encoding unit at a predetermined position may be used during the splitting process to determine an encoding unit at a predetermined position among the plurality of encoding units. For example, the image decoding device (100) may use at least one of block shape information and split shape mode information stored in a sample included in a middle encoding unit during the splitting process to determine an encoding unit located in the middle among the encoding units into which the current encoding unit is split.

[0137] Referring to FIG. 6, the image decoding device (100) can split the current encoding unit (600) into a plurality of encoding units (620a, 620b, 620c) based on the split shape mode information, and can determine the encoding unit (620b) located in the middle among the plurality of encoding units (620a, 620b, 620c). Furthermore, the image decoding device (100) can determine the encoding unit (620b) located in the middle by considering the position where the split shape mode information is acquired. That is, the split shape mode information of the current encoding unit (600) can be obtained from a sample (640) located in the center of the current encoding unit (600), and when the current encoding unit (600) is split into a plurality of encoding units (620a, 620b, 620c) based on the split shape mode information, the encoding unit (620b) including the sample (640) can be determined as the encoding unit located in the center. However, the information used to determine the encoding unit located in the center should not be interpreted as being limited to the split shape mode information, and various types of information can be used in the process of determining the encoding unit located in the center.

[0138] According to one embodiment, predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample included in the coding unit to be determined. Referring to FIG. 6, the image decoding device (100) may use split shape mode information obtained from a sample at a predetermined position within the current coding unit (600) (e.g., a sample located at the center of the current coding unit (600)) to determine a coding unit at a predetermined position among a plurality of coding units (620a, 620b, 620c) determined by splitting the current coding unit (600) (e.g., a coding unit located at the center of the coding units split into multiple units). That is, the image decoding device (100) can determine the sample at the predetermined position by considering the block shape of the current encoding unit (600), and the image decoding device (100) can determine an encoding unit (620b) that includes a sample from which predetermined information (e.g., division shape mode information) can be obtained among a plurality of encoding units (620a, 620b, 620c) determined by dividing the current encoding unit (600), and can set a predetermined restriction. Referring to FIG. 6, according to one embodiment, the image decoding device (100) can determine a sample (640) located at the center of the current encoding unit (600) as a sample from which predetermined information can be obtained, and the image decoding device (100) can set a predetermined restriction on the encoding unit (620b) that includes such a sample (640) during the decoding process. However, the location of the sample from which certain information can be obtained should not be interpreted as being limited to the above-described location, but may be interpreted as samples at any location included in the encoding unit (620b) to be determined in order to set a limitation.

[0139] According to one embodiment, the position of a sample from which predetermined information can be obtained may be determined according to the shape of the current encoding unit (600). According to one embodiment, the block shape information may determine whether the shape of the current encoding unit is square or non-square, and may determine the position of a sample from which predetermined information can be obtained according to the shape. For example, the image decoding apparatus (100) may determine a sample located on a boundary that divides at least one of the width and height of the current encoding unit in half as a sample from which predetermined information can be obtained, using at least one of information about the width and information about the height of the current encoding unit. As another example, when the block shape information related to the current encoding unit indicates that the shape is non-square, the image decoding apparatus (100) may determine one of the samples including a boundary that divides the long side of the current encoding unit in half as a sample from which predetermined information can be obtained.

[0140] According to one embodiment, when the image decoding device (100) divides the current encoding unit into a plurality of encoding units, the image decoding device (100) may use the split shape mode information to determine the encoding unit at a predetermined position among the plurality of encoding units. According to one embodiment, the image decoding device (100) may obtain the split shape mode information from a sample at a predetermined position included in the encoding unit, and the image decoding device (100) may divide the plurality of encoding units generated by splitting the current encoding unit using the split shape mode information obtained from the sample at a predetermined position included in each of the plurality of encoding units. That is, the encoding unit may be recursively divided using the split shape mode information obtained from the sample at a predetermined position included in each of the encoding units. Since the recursive division process of the encoding unit has been described above with reference to FIG. 5, a detailed description thereof will be omitted.

[0141] According to one embodiment, the image decoding device (100) can divide a current encoding unit to determine at least one encoding unit, and can determine the order in which the at least one encoding unit is decoded according to a predetermined block (e.g., the current encoding unit).

[0142] FIG. 7 illustrates the order in which multiple encoding units are processed when an image decoding device divides a current encoding unit to determine multiple encoding units according to one embodiment.

[0143] According to one embodiment, the image decoding device (100) may determine second encoding units (710a, 710b) by vertically splitting the first encoding unit (700) according to the splitting shape mode information, determine second encoding units (730a, 730b) by horizontally splitting the first encoding unit (700), or determine second encoding units (750a, 750b, 750c, 750d) by vertically and horizontally splitting the first encoding unit (700).

[0144] Referring to FIG. 7, the image decoding device (100) can determine the order in which the second encoding units (710a, 710b) determined by vertically dividing the first encoding unit (700) are processed in the horizontal direction (710c). The image decoding device (100) can determine the order in which the second encoding units (730a, 730b) determined by horizontally dividing the first encoding unit (700) are processed in the vertical direction (730c). The image decoding device (100) can determine the second encoding units (750a, 750b, 750c, 750d) determined by dividing the first encoding unit (700) in the vertical and horizontal directions according to a predetermined order (e.g., raster scan order (750e) or z scan order (z scan order)) in which encoding units located in one row are processed and then encoding units located in the next row are processed.

[0145] According to one embodiment, the image decoding device (100) can recursively split the encoding units. Referring to FIG. 7, the image decoding device (100) can split the first encoding unit (700) to determine a plurality of encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d), and can recursively split each of the determined plurality of encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d). A method for splitting a plurality of coding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d) may be a method corresponding to a method for splitting the first coding unit (700). Accordingly, the plurality of coding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d) may each be independently split into a plurality of coding units. Referring to FIG. 7, the image decoding device (100) may split the first coding unit (700) in the vertical direction to determine the second coding units (710a, 710b), and further may determine to independently split or not split each of the second coding units (710a, 710b).

[0146] According to one embodiment, the image decoding device (100) may horizontally divide the second encoding unit (710a) on the left into third encoding units (720a, 720b), and may not divide the second encoding unit (710b) on the right.

[0147] According to one embodiment, the processing order of the coding units may be determined based on the splitting process of the coding units. In other words, the processing order of the split coding units may be determined based on the processing order of the coding units immediately before splitting. The image decoding device (100) may determine the processing order of the third coding units (720a, 720b) ​​determined by splitting the second coding unit (710a) on the left, independently from the second coding unit (710b) on the right. Since the second coding unit (710a) on the left is split horizontally and the third coding units (720a, 720b) ​​are determined, the third coding units (720a, 720b) ​​may be processed in the vertical direction (720c). In addition, since the order in which the second encoding unit (710a) on the left and the second encoding unit (710b) on the right are processed corresponds to the horizontal direction (710c), the right encoding unit (710b) can be processed after the third encoding units (720a, 720b) ​​included in the second encoding unit (710a) on the left are processed in the vertical direction (720c). Since the above-described content is intended to explain the process in which the processing order of the encoding units is determined according to the encoding units before splitting, it should not be interpreted as being limited to the above-described embodiment, but should be interpreted as being used in various ways in which encoding units that are split and determined in various forms can be independently processed according to a predetermined order.

[0148] FIG. 8 illustrates a process for determining that a current encoding unit is divided into an odd number of encoding units when the encoding units cannot be processed in a predetermined order, according to one embodiment.

[0149] According to one embodiment, the image decoding device (100) may determine that the current encoding unit is split into an odd number of encoding units based on the acquired split shape mode information. Referring to FIG. 8, a first encoding unit (800) having a square shape may be split into second encoding units (810a, 810b) having a non-square shape, and the second encoding units (810a, 810b) may each be independently split into third encoding units (820a, 820b, 820c, 820d, 820e). According to one embodiment, the image decoding device (100) can determine a plurality of third encoding units (820a, 820b) by horizontally dividing the left encoding unit (810a) among the second encoding units, and can divide the right encoding unit (810b) into an odd number of third encoding units (820c, 820d, 820e).

[0150] According to one embodiment, the image decoding device (100) can determine whether there is an odd number of split coding units by determining whether the third coding units (820a, 820b, 820c, 820d, 820e) can be processed in a predetermined order. Referring to FIG. 8, the image decoding device (100) can determine the third coding units (820a, 820b, 820c, 820d, 820e) by recursively splitting the first coding unit (800). The image decoding device (100) can determine whether the first encoding unit (800), the second encoding unit (810a, 810b), or the third encoding unit (820a, 820b, 820c, 820d, 820e) is divided into an odd number of encoding units based on at least one of the block shape information and the split shape mode information. For example, the encoding unit located on the right side of the second encoding unit (810a, 810b) can be divided into an odd number of third encoding units (820c, 820d, 820e). The order in which the plurality of encoding units included in the first encoding unit (800) are processed can be a predetermined order (e.g., z-scan order (830)), and the image decoding device (100) can determine whether the third encoding unit (820c, 820d, 820e) determined by dividing the second encoding unit (810b) on the right into odd numbers satisfies the condition that it can be processed according to the predetermined order.

[0151] According to one embodiment, the image decoding device (100) may determine whether the third encoding units (820a, 820b, 820c, 820d, 820e) included in the first encoding unit (800) satisfy a condition that they can be processed in a predetermined order, and the condition is related to whether at least one of the width and height of the second encoding unit (810a, 810b) is split in half according to the boundary of the third encoding unit (820a, 820b, 820c, 820d, 820e). For example, the third encoding unit (820a, 820b) determined by splitting the height of the left second encoding unit (810a) of a non-square shape in half may satisfy the condition. Since the boundaries of the third encoding units (820c, 820d, 820e) determined by dividing the right second encoding unit (810b) into three encoding units do not divide the width or height of the right second encoding unit (810b) in half, it may be determined that the third encoding units (820c, 820d, 820e) do not satisfy the condition. In the case where this condition is not satisfied, the image decoding device (100) may determine that there is a disconnection in the scanning order, and may determine that the right second encoding unit (810b) is divided into an odd number of encoding units based on the determination result. According to an embodiment, the image decoding device (100) may place a predetermined restriction on an encoding unit at a predetermined position among the divided encoding units when the encoding unit is divided into an odd number of encoding units. Since the contents of such restrictions or predetermined positions have been described above through various embodiments, a detailed description thereof will be omitted.

[0152] FIG. 9 illustrates a process in which an image decoding device divides a first encoding unit to determine at least one encoding unit according to one embodiment.

[0153] According to one embodiment, the image decoding device (100) may split the first encoding unit (900) based on the split shape mode information obtained through the receiver (110). The first encoding unit (900) having a square shape may be split into four square-shaped encoding units or may be split into a plurality of non-square encoding units. For example, referring to FIG. 9, when the first encoding unit (900) is square and the split shape mode information indicates that it is split into non-square encoding units, the image decoding device (100) may split the first encoding unit (900) into a plurality of non-square encoding units. Specifically, when the split shape mode information indicates that the first encoding unit (900) is split in the horizontal direction or the vertical direction to determine an odd number of encoding units, the image decoding device (100) can split the first encoding unit (900) having a square shape into second encoding units (910a, 910b, 910c) determined by splitting them in the vertical direction into an odd number of encoding units or second encoding units (920a, 920b, 920c) determined by splitting them in the horizontal direction.

[0154] According to one embodiment, the image decoding device (100) can determine whether the second encoding units (910a, 910b, 910c, 920a, 920b, 920c) included in the first encoding unit (900) satisfy a condition that allows them to be processed in a predetermined order, and the condition is related to whether at least one of the width and height of the first encoding unit (900) is split in half according to the boundary of the second encoding units (910a, 910b, 910c, 920a, 920b, 920c). Referring to FIG. 9, since the boundaries of the second coding units (910a, 910b, 910c) determined by vertically dividing the first coding unit (900) in a square shape do not divide the width of the first coding unit (900) in half, it may be determined that the first coding unit (900) does not satisfy the condition that it can be processed in a predetermined order. In addition, since the boundaries of the second coding units (920a, 920b, 920c) determined by horizontally dividing the first coding unit (900) in a square shape do not divide the width of the first coding unit (900) in half, it may be determined that the first coding unit (900) does not satisfy the condition that it can be processed in a predetermined order. If such a condition is not satisfied, the image decoding device (100) may determine that the scan order is disconnected, and based on the determination result, may determine that the first encoding unit (900) is divided into an odd number of encoding units. According to one embodiment, the image decoding device (100) may place a predetermined restriction on an encoding unit at a predetermined position among the divided encoding units when the encoding unit is divided into an odd number of encoding units. Since the contents of such restrictions or predetermined positions, etc. have been described above through various embodiments, a detailed description thereof will be omitted.

[0155] According to one embodiment, the image decoding device (100) can divide the first encoding unit to determine encoding units of various shapes.

[0156] Referring to FIG. 9, the image decoding device (100) can divide the first encoding unit (900) having a square shape and the first encoding unit (930 or 950) having a non-square shape into encoding units of various shapes.

[0157] FIG. 10 illustrates that, according to one embodiment, a video decoding device limits the shapes into which a second encoding unit can be divided when a non-square shape of a second encoding unit determined by dividing a first encoding unit satisfies a predetermined condition.

[0158] According to one embodiment, the image decoding device (100) may determine to split a first coding unit (1000) having a square shape into second coding units (1010a, 1010b, 1020a, 1020b) having a non-square shape based on the split shape mode information obtained through the receiver (110). The second coding units (1010a, 1010b, 1020a, 1020b) may be split independently. Accordingly, the image decoding device (100) may determine to split or not split into a plurality of coding units based on the split shape mode information related to each of the second coding units (1010a, 1010b, 1020a, 1020b). According to one embodiment, the image decoding device (100) may determine third encoding units (1012a, 1012b) by horizontally dividing the left second encoding unit (1010a) having a non-square shape determined by vertically dividing the first encoding unit (1000). However, when the image decoding device (100) divides the left second encoding unit (1010a) in the horizontal direction, the right second encoding unit (1010b) may be restricted from being horizontally divided in the same direction as the direction in which the left second encoding unit (1010a) is divided. If the second encoding unit on the right (1010b) is split in the same direction to determine the third encoding unit (1014a, 1014b), the second encoding unit on the left (1010a) and the second encoding unit on the right (1010b) may be independently split in the horizontal direction to determine the third encoding unit (1012a, 1012b, 1014a, 1014b). However, this is the same result as the image decoding device (100) splitting the first encoding unit (1000) into four square-shaped second encoding units (1030a, 1030b, 1030c, 1030d) based on the split shape mode information, which may be inefficient in terms of image decoding.

[0159] According to one embodiment, the image decoding device (100) may determine third coding units (1022a, 1022b, 1024a, 1024b) by vertically dividing a second coding unit (1020a or 1020b) having a non-square shape determined by dividing a first coding unit (1000) in a horizontal direction. However, when the image decoding device (100) vertically divides one of the second coding units (e.g., the upper second coding unit (1020a)), the other second coding units (e.g., the lower coding unit (1020b)) may be restricted from being vertically divided in the same direction as the direction in which the upper second coding unit (1020a) is divided, for the reasons described above.

[0160] FIG. 11 illustrates a process of a video decoding device dividing a square-shaped encoding unit when the split shape mode information cannot indicate that the encoding unit is divided into four square-shaped encoding units according to one embodiment.

[0161] According to one embodiment, the image decoding device (100) may split the first encoding unit (1100) based on the split shape mode information to determine the second encoding units (1110a, 1110b, 1120a, 1120b, etc.). The split shape mode information may include information about various shapes into which the encoding unit may be split, but the information about various shapes may not include information for splitting the encoding unit into four encoding units having a square shape. According to this split shape mode information, the image decoding device (100) cannot split the first encoding unit (1100) having a square shape into four second encoding units having a square shape (1130a, 1130b, 1130c, 1130d). Based on the segmentation shape mode information, the image decoding device (100) can determine a second encoding unit (1110a, 1110b, 1120a, 1120b, etc.) of a non-square shape.

[0162] According to one embodiment, the image decoding device (100) can independently split each of the second encoding units (1110a, 1110b, 1120a, 1120b, etc.) having a non-square shape. Each of the second encoding units (1110a, 1110b, 1120a, 1120b, etc.) can be split in a predetermined order using a recursive method, which may be a splitting method corresponding to a method in which the first encoding unit (1100) is split based on splitting shape mode information.

[0163] For example, the image decoding device (100) can determine third coding units (1112a, 1112b) having a square shape by splitting the left second coding unit (1110a) in the horizontal direction, and can determine third coding units (1114a, 1114b) having a square shape by splitting the right second coding unit (1110b) in the horizontal direction. Furthermore, the image decoding device (100) can also determine third coding units (1116a, 1116b, 1116c, 1116d) having a square shape by splitting both the left second coding unit (1110a) and the right second coding unit (1110b) in the horizontal direction. In this case, the encoding unit can be determined in the same form as the first encoding unit (1100) being divided into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d).

[0164] As another example, the image decoding device (100) may determine third coding units (1122a, 1122b) having a square shape by vertically splitting the upper second coding unit (1120a), and may determine third coding units (1124a, 1124b) having a square shape by vertically splitting the lower second coding unit (1120b). Furthermore, the image decoding device (100) may determine third coding units (1126a, 1126b, 1126a, 1126b) having a square shape by vertically splitting both the upper second coding unit (1120a) and the lower second coding unit (1120b). In this case, the encoding unit can be determined in the same form as the first encoding unit (1100) being divided into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d).

[0165] FIG. 12 illustrates that, according to one embodiment, the processing order between multiple encoding units may vary depending on the process of dividing the encoding units.

[0166] According to one embodiment, the image decoding device (100) may split the first encoding unit (1200) based on the split shape mode information. If the block shape is square and the split shape mode information indicates that the first encoding unit (1200) is split in at least one of the horizontal direction and the vertical direction, the image decoding device (100) may split the first encoding unit (1200) to determine second encoding units (e.g., 1210a, 1210b, 1220a, 1220b, etc.). Referring to FIG. 12, the second encoding units (1210a, 1210b, 1220a, 1220b) having a non-square shape determined by splitting the first encoding unit 1200 only in the horizontal direction or the vertical direction may be independently split based on the split shape mode information for each. For example, the image decoding device (100) can determine third encoding units (1216a, 1216b, 1216c, 1216d) by horizontally dividing second encoding units (1210a, 1210b) generated by vertically dividing the first encoding unit (1200), and can determine third encoding units (1226a, 1226b, 1226c, 1226d) by horizontally dividing second encoding units (1220a, 1220b) generated by horizontally dividing the first encoding unit (1200). Since the process of dividing the second encoding units (1210a, 1210b, 1220a, 1220b) has been described above with reference to FIG. 11, a detailed description thereof will be omitted.

[0167] According to one embodiment, the image decoding device (100) can process encoding units according to a predetermined order. Since the characteristics of processing encoding units according to a predetermined order have been described above with reference to FIG. 7, a detailed description thereof will be omitted. Referring to FIG. 12, the image decoding device (100) can divide a first encoding unit (1200) having a square shape and determine four third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) having a square shape. According to one embodiment, the image decoding device (100) can determine the processing order of the third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) depending on the form in which the first encoding unit (1200) is divided.

[0168] According to one embodiment, the image decoding device (100) may determine third encoding units (1216a, 1216b, 1216c, 1216d) by horizontally dividing the second encoding units (1210a, 1210b) generated by vertically dividing them, and the image decoding device (100) may process the third encoding units (1216a, 1216b, 1216c, 1216d) according to an order (1217) of first processing the third encoding units (1216a, 1216c) included in the left second encoding unit (1210a) in the vertical direction and then processing the third encoding units (1216b, 1216d) included in the right second encoding unit (1210b) in the vertical direction.

[0169] According to one embodiment, the image decoding device (100) may determine third encoding units (1226a, 1226b, 1226c, 1226d) by vertically dividing the second encoding units (1220a, 1220b) generated by being divided in the horizontal direction, and the image decoding device (100) may process the third encoding units (1226a, 1226b, 1226c, 1226d) according to an order (1227) of first processing the third encoding units (1226a, 1226b) included in the upper second encoding unit (1220a) in the horizontal direction and then processing the third encoding units (1226c, 1226d) included in the lower second encoding unit (1220b) in the horizontal direction.

[0170] Referring to FIG. 12, the second encoding units (1210a, 1210b, 1220a, 1220b) can be divided into third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) having a square shape. The second encoding units (1210a, 1210b) determined by being split in the vertical direction and the second encoding units (1220a, 1220b) determined by being split in the horizontal direction are split into different shapes, but according to the third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) determined later, the first encoding unit (1200) is ultimately split into encoding units of the same shape. Accordingly, even if the image decoding device (100) determines encoding units of the same shape as a result by recursively splitting the encoding units through different processes based on the split shape mode information, it can process a plurality of encoding units determined in the same shape in different orders.

[0171] FIG. 13 illustrates a process in which the depth of an encoding unit is determined as the shape and size of the encoding unit change when the encoding unit is recursively divided to determine a plurality of encoding units according to one embodiment.

[0172] According to one embodiment, the image decoding device (100) may determine the depth of an encoding unit according to a predetermined criterion. For example, the predetermined criterion may be the length of a long side of the encoding unit. If the length of the long side of the current encoding unit is split to be 2n (n>0) times the length of the long side of the encoding unit before splitting, the image decoding device (100) may determine that the depth of the current encoding unit is increased by n compared to the depth of the encoding unit before splitting. Hereinafter, an encoding unit with an increased depth is expressed as an encoding unit of a lower depth.

[0173] Referring to FIG. 13, according to one embodiment, based on block shape information indicating a square shape (for example, the block shape information may indicate '0: SQUARE'), the image decoding device (100) may divide a first coding unit (1300) having a square shape to determine a second coding unit (1302), a third coding unit (1304), etc. of a lower depth. If the size of the first coding unit (1300) having a square shape is 2Nx2N, the second coding unit (1302) determined by dividing the width and height of the first coding unit (1300) by half may have a size of NxN. Furthermore, the third coding unit (1304) determined by dividing the width and height of the second coding unit (1302) by half may have a size of N / 2xN / 2. In this case, the width and height of the third encoding unit (1304) correspond to 1 / 4 of the width and height of the first encoding unit (1300). When the depth of the first encoding unit (1300) is D, the depth of the second encoding unit (1302), which is 1 / 2 of the width and height of the first encoding unit (1300), may be D+1, and the depth of the third encoding unit (1304), which is 1 / 4 of the width and height of the first encoding unit (1300), may be D+2.

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

[0175] The image decoding device (100) can determine a second encoding unit (e.g., 1302, 1312, 1322, etc.) by splitting at least one of the width and height of the first encoding unit (1310) having a size of Nx2N. That is, the image decoding device (100) can split the first encoding unit (1310) in the horizontal direction to determine a second encoding unit (1302) having a size of NxN or a second encoding unit (1322) having a size of NxN / 2, and can also split the first encoding unit (1310) in the horizontal direction and the vertical direction to determine a second encoding unit (1312) having a size of N / 2xN.

[0176] According to one embodiment, the image decoding device (100) may determine a second coding unit (e.g., 1302, 1312, 1322, etc.) by splitting at least one of the width and the height of the first coding unit (1320) having a size of 2NxN. That is, the image decoding device (100) may split the first coding unit (1320) in the vertical direction to determine a second coding unit (1302) having a size of NxN or a second coding unit (1312) having a size of N / 2xN, and may also split the first coding unit (1320) in the horizontal direction and the vertical direction to determine a second coding unit (1322) having a size of NxN / 2.

[0177] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by splitting at least one of the width and the height of the second encoding unit (1302) having a size of NxN. That is, the image decoding device (100) may split the second encoding unit (1302) in the vertical direction and the horizontal direction to determine a third encoding unit (1304) having a size of N / 2xN / 2, a third encoding unit (1314) having a size of N / 4xN / 2, or a third encoding unit (1324) having a size of N / 2xN / 4.

[0178] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by splitting at least one of the width and the height of the second encoding unit (1312) having a size of N / 2xN. That is, the image decoding device (100) may split the second encoding unit (1312) in the horizontal direction to determine a third encoding unit (1304) having a size of N / 2xN / 2 or a third encoding unit (1324) having a size of N / 2xN / 4, or split the second encoding unit (1312) in the vertical direction and the horizontal direction to determine a third encoding unit (1314) having a size of N / 4xN / 2.

[0179] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by splitting at least one of the width and the height of the second encoding unit (1322) having a size of NxN / 2. That is, the image decoding device (100) may split the second encoding unit (1322) in the vertical direction to determine a third encoding unit (1304) having a size of N / 2xN / 2 or a third encoding unit (1314) having a size of N / 4xN / 2, or split the second encoding unit (1322) in the vertical direction and the horizontal direction to determine a third encoding unit (1324) having a size of N / 2xN / 4.

[0180] According to one embodiment, the image decoding device (100) may split a square-shaped encoding unit (e.g., 1300, 1302, 1304) in a horizontal direction or a vertical direction. For example, a first encoding unit (1300) having a size of 2Nx2N may be split in the vertical direction to determine a first encoding unit (1310) having a size of Nx2N, or may be split in the horizontal direction to determine a first encoding unit (1320) having a size of 2NxN. According to one embodiment, when the depth is determined based on the length of the longest side of the encoding unit, the depth of the encoding unit determined by splitting the first encoding unit (1300) having a size of 2Nx2N in the horizontal direction or the vertical direction may be the same as the depth of the first encoding unit (1300).

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

[0182] FIG. 14 illustrates an index (part index, hereinafter referred to as PID) for depth and encoding unit distinction that can be determined according to the shape and size of encoding units according to one embodiment.

[0183] According to one embodiment, the image decoding device (100) may split a first encoding unit (1400) having a square shape to determine second encoding units of various shapes. Referring to FIG. 14, the image decoding device (100) may split the first encoding unit (1400) in at least one of a vertical direction and a horizontal direction according to the split shape mode information to determine second encoding units (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d). That is, the image decoding device (100) can determine the second encoding unit (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d) based on the split shape mode information for the first encoding unit (1400).

[0184] According to one embodiment, the depth of the second coding units (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d) determined according to the split shape mode information for the first coding unit (1400) having a square shape may be determined based on the length of the long side. For example, since the length of one side of the first coding unit (1400) having a square shape and the length of the long side of the second coding unit (1402a, 1402b, 1404a, 1404b) having a non-square shape are the same, the depth of the first coding unit (1400) and the second coding units (1402a, 1402b, 1404a, 1404b) having a non-square shape may be considered to be the same as D. In contrast, when the image decoding device (100) divides the first encoding unit (1400) into four square-shaped second encoding units (1406a, 1406b, 1406c, 1406d) based on the split shape mode information, the length of one side of the square-shaped second encoding units (1406a, 1406b, 1406c, 1406d) is half the length of one side of the first encoding unit (1400), so the depth of the second encoding units (1406a, 1406b, 1406c, 1406d) may be a depth of D+1, which is one depth lower than D, the depth of the first encoding unit (1400).

[0185] According to one embodiment, the image decoding device (100) may split a first encoding unit (1410) having a height greater than its width into a plurality of second encoding units (1412a, 1412b, 1414a, 1414b, 1414c) in a horizontal direction according to the splitting shape mode information. According to one embodiment, the image decoding device (100) may split a first encoding unit (1420) having a width greater than its height into a plurality of second encoding units (1422a, 1422b, 1424a, 1424b, 1424c) in a vertical direction according to the splitting shape mode information.

[0186] According to one embodiment, the depth of the second coding unit (1412a, 1412b, 1414a, 1414b, 1414c. 1422a, 1422b, 1424a, 1424b, 1424c) determined based on the split shape mode information for the first coding unit (1410 or 1420) of a non-square shape may be determined based on the length of the long side. For example, since the length of one side of the second encoding unit (1412a, 1412b) in the shape of a square is half the length of one side of the first encoding unit (1410) in the shape of a non-square having a height longer than a width, the depth of the second encoding unit (1412a, 1412b) in the shape of a square is D+1, which is one depth lower than the depth D of the first encoding unit (1410) in the shape of a non-square.

[0187] Furthermore, the image decoding device (100) can split a non-square first encoding unit (1410) into an odd number of second encoding units (1414a, 1414b, 1414c) based on the split shape mode information. The odd number of second encoding units (1414a, 1414b, 1414c) can include non-square second encoding units (1414a, 1414c) and square second encoding units (1414b). In this case, since the length of the long side of the second encoding unit (1414a, 1414c) of a non-square shape and the length of one side of the second encoding unit (1414b) of a square shape are half the length of one side of the first encoding unit (1410), the depth of the second encoding unit (1414a, 1414b, 1414c) may be a depth of D+1, which is one depth lower than D, which is the depth of the first encoding unit (1410). The image decoding device (100) may determine the depth of the encoding units associated with the first encoding unit (1420) of a non-square shape, in which the width is longer than the height, in a manner corresponding to the above method of determining the depth of the encoding units associated with the first encoding unit (1410).

[0188] According to one embodiment, when determining an index (PID) for distinguishing divided coding units, the image decoding device (100) may determine the index based on a size ratio between the coding units when the coding units divided into an odd number are not of the same size. Referring to FIG. 14, among the coding units (1414a, 1414b, 1414c) divided into an odd number, the coding unit (1414b) located in the middle may have the same width as the other coding units (1414a, 1414c) but may have a height that is twice the height of the coding units (1414a, 1414c) that are different in height. That is, in this case, the coding unit (1414b) located in the middle may include two of the other coding units (1414a, 1414c). Accordingly, if the index (PID) of the encoding unit (1414b) located in the middle according to the scanning order is 1, the index of the encoding unit (1414c) located in the next order may be 3, which is an increase of 2. In other words, there may be a discontinuity in the index value. According to one embodiment, the image decoding device (100) may determine whether the encoding units divided into an odd number are not of the same size based on the presence or absence of discontinuity in the index for distinguishing between the divided encoding units.

[0189] According to one embodiment, the image decoding device (100) may determine whether the image is divided into a specific split shape based on the value of an index for distinguishing a plurality of coding units that are divided from the current coding unit. Referring to FIG. 14, the image decoding device (100) may divide a first coding unit (1410) having a rectangular shape in which the height is longer than the width, to determine an even number of coding units (1412a, 1412b) or an odd number of coding units (1414a, 1414b, 1414c). The image decoding device (100) may use an index (PID) indicating each coding unit to distinguish each of the plurality of coding units. According to one embodiment, the PID may be obtained from a sample (for example, an upper left sample) at a predetermined position of each coding unit.

[0190] According to one embodiment, the image decoding device (100) may determine an coding unit at a predetermined position among the coding units that are divided and determined using an index for distinguishing the coding units. According to one embodiment, when the split shape mode information for the first coding unit (1410) having a rectangular shape with a height longer than the width indicates that the first coding unit (1410) is divided into three coding units, the image decoding device (100) may divide the first coding unit (1410) into three coding units (1414a, 1414b, 1414c). The image decoding device (100) may assign an index to each of the three coding units (1414a, 1414b, 1414c). The image decoding device (100) may compare the indexes for each coding unit to determine the middle coding unit among the coding units divided into an odd number of coding units. The image decoding device (100) may determine a coding unit (1414b) having an index corresponding to a middle value among the indices of the coding units as a coding unit at a middle position among the coding units determined by splitting the first coding unit (1410). According to an embodiment, when determining an index for distinguishing the split coding units, the image decoding device (100) may determine the index based on a size ratio between the coding units when the coding units do not have the same size. Referring to FIG. 14, the coding unit (1414b) generated by splitting the first coding unit (1410) may have the same width as other coding units (1414a, 1414c) but may be twice the height of the coding units (1414a, 1414c) that are different in height. In this case, if the index (PID) of the encoding unit (1414b) located in the middle is 1, the index of the encoding unit (1414c) located in the next order may be 3, which is an increase of 2.In cases like this where the index increases uniformly and then the increase amount changes, the image decoding device (100) may determine that the current encoding unit is divided into a plurality of encoding units including encoding units having different sizes from other encoding units. According to one embodiment, when the split shape mode information indicates that the current encoding unit is divided into an odd number of encoding units, the image decoding device (100) may divide the current encoding unit into a form in which an encoding unit at a predetermined position among the odd number of encoding units (for example, a middle encoding unit) has a different size from the other encoding units. In this case, the image decoding device (100) may determine a middle encoding unit having a different size using an index (PID) for the encoding unit. However, the above-described index, the size or position of the encoding unit at the predetermined position to be determined are specific for explaining one embodiment and should not be interpreted as being limited thereto, and it should be interpreted that various indexes, positions and sizes of encoding units can be used.

[0191] According to one embodiment, the image decoding device (100) may utilize a predetermined data unit from which recursive division of the encoding unit begins.

[0192] FIG. 15 illustrates that a plurality of encoding units are determined according to a plurality of predetermined data units included in a picture according to one embodiment.

[0193] According to one embodiment, a predetermined data unit may be defined as a data unit from which a coding unit begins to be recursively split using split shape mode information. That is, it may correspond to a coding unit of the highest depth used in the process of determining multiple coding units for splitting the current picture. For convenience of explanation, this predetermined data unit will be referred to as a reference data unit hereinafter.

[0194] In one embodiment, the reference data unit may exhibit a predetermined size and shape. In one embodiment, the reference coding unit may include MxN samples, where M and N may be the same and may be integers expressed as powers of 2. That is, the reference data unit may exhibit a square or non-square shape, and may be subsequently divided into an integer number of coding units.

[0195] According to one embodiment, the video decoding device (100) can divide the current picture into a plurality of reference data units. According to one embodiment, the video decoding device (100) can divide the plurality of reference data units into which the current picture is divided using division type mode information for each reference data unit. This division process of the reference data units can correspond to a division process using a quad-tree structure.

[0196] According to one embodiment, the image decoding device (100) may predetermine the minimum size that a reference data unit included in the current picture may have. Accordingly, the image decoding device (100) may determine reference data units of various sizes having a size greater than or equal to the minimum size, and may determine at least one encoding unit using segmentation mode information based on the determined reference data unit.

[0197] Referring to FIG. 15, the image decoding device (100) may use a reference coding unit (1500) having a square shape, or may use a reference coding unit (1502) having a non-square shape. According to one embodiment, the shape and size of the reference coding unit may be determined according to various data units (e.g., sequence, picture, slice, slice segment, tile, tile group, maximum coding unit, etc.) that may include at least one reference coding unit.

[0198] According to one embodiment, the receiving unit (110) of the image decoding device (100) can obtain at least one of information on the shape of the reference coding unit and information on the size of the reference coding unit from the bitstream for each of the various data units. The process of determining at least one coding unit included in the square-shaped reference coding unit (1500) has been described above through the process of splitting the current coding unit (300) of FIG. 3, and the process of determining at least one coding unit included in the non-square-shaped reference coding unit (1502) has been described above through the process of splitting the current coding unit (400 or 450) of FIG. 4, so a detailed description thereof will be omitted.

[0199] According to one embodiment, the image decoding device (100) may use an index for identifying the size and shape of the reference coding unit to determine the size and shape of the reference coding unit according to some data units that are predetermined based on a predetermined condition. That is, the receiving unit (110) may obtain only an index for identifying the size and shape of the reference coding unit for each slice, slice segment, tile, tile group, maximum coding unit, etc., among the various data units (e.g., sequences, pictures, slices, slice segments, tiles, tile groups, maximum coding units, etc.) that satisfy a predetermined condition (e.g., data units having a size smaller than a slice) from the bitstream. The image decoding device (100) may determine the size and shape of the reference data unit for each data unit that satisfies the predetermined condition by using the index. When information about the shape of the reference coding unit and information about the size of the reference coding unit are obtained from the bitstream for each relatively small-sized data unit and used, the efficiency of the bitstream may not be good. Therefore, instead of directly obtaining information about the shape of the reference coding unit and information about the size of the reference coding unit, only the index may be obtained and used. In this case, at least one of the size and shape of the reference coding unit corresponding to the index indicating the size and shape of the reference coding unit may be determined in advance. That is, the image decoding device (100) can determine at least one of the size and shape of the reference coding unit included in the data unit that serves as the basis for obtaining the index by selecting at least one of the sizes and shapes of the predetermined reference coding units according to the index.

[0200] According to one embodiment, the image decoding device (100) may use at least one reference coding unit included in one maximum coding unit. That is, a maximum coding unit for dividing an image may include at least one reference coding unit, and a coding unit may be determined through a recursive splitting process of each reference coding unit. According to one embodiment, at least one of the width and the height of the maximum coding unit may correspond to an integer multiple of at least one of the width and the height of the reference coding unit. According to one embodiment, the size of the reference coding unit may be a size obtained by splitting the maximum coding unit n times according to a quad tree structure. That is, the image decoding device (100) may split the maximum coding unit n times according to the quad tree structure to determine the reference coding unit, and may split the reference coding unit based on at least one of block shape information and split shape mode information according to various embodiments.

[0201] According to one embodiment, the video decoding device (100) may obtain and use block shape information indicating the shape of the current encoding unit or split shape mode information indicating a method of splitting the current encoding unit from the bitstream. The split shape mode information may be included in a bitstream related to various data units. For example, the video decoding device (100) may use split 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 tile header, and a tile group header. Furthermore, the video decoding device (100) may obtain and use a syntax element corresponding to block shape information or split shape mode information from the bitstream for each maximum encoding unit, each reference encoding unit, and each processing block.

[0202] Hereinafter, a method for determining a partitioning rule according to one embodiment of the present disclosure will be described in detail.

[0203] The video decoding device (100) can determine a segmentation rule of the video. The segmentation rule may be predetermined between the video decoding device (100) and the video encoding device (2200). The video decoding device (100) can determine the segmentation rule of the video based on information obtained from a bitstream. The video decoding device (100) can determine the segmentation rule based on information obtained from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, and a tile group header. The video decoding device (100) can determine the segmentation rule differently according to a frame, a slice, a tile, a temporal layer, a maximum coding unit, or an coding unit.

[0204] The image decoding device (100) may determine a segmentation rule based on the block shape of the encoding unit. The block shape may include the size, shape, width and height ratio, and direction of the encoding unit. The image decoding device (100) may determine in advance that the segmentation rule will be determined based on the block shape of the encoding unit. However, the present invention is not limited thereto. The image decoding device (100) may determine the segmentation rule based on information obtained from the received bitstream.

[0205] The shape of the encoding unit may include a square and a non-square shape. If the width and height of the encoding unit are equal, the image decoding device (100) may determine the shape of the encoding unit as a square. In addition, if the width and height of the encoding unit are not equal, the image decoding device (100) may determine the shape of the encoding unit as a non-square shape.

[0206] The size of the coding unit may include various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, ..., 256x256. The size of the coding unit may be classified according to the length of the long side, the length of the short side, or the area of ​​the coding unit. The image decoding device (100) may apply the same splitting rule to the coding units classified into the same group. For example, the image decoding device (100) may classify the coding units having the same long side length into the same size. In addition, the image decoding device (100) may apply the same splitting rule to the coding units having the same long side length.

[0207] The ratio of the width to the height of the coding unit may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, or 1:32, etc. In addition, the direction of the coding unit may include a horizontal direction and a vertical direction. The horizontal direction may indicate a case where the length of the width of the coding unit is longer than the length of the height. The vertical direction may indicate a case where the length of the width of the coding unit is shorter than the length of the height.

[0208] The image decoding device (100) can adaptively determine a splitting rule based on the size of the encoding unit. The image decoding device (100) can determine a different allowable splitting mode based on the size of the encoding unit. For example, the image decoding device (100) can determine whether splitting is allowed based on the size of the encoding unit. The image decoding device (100) can determine a splitting direction based on the size of the encoding unit. The image decoding device (100) can determine an allowable splitting type based on the size of the encoding unit.

[0209] Determining the splitting rule based on the size of the encoding unit may be a splitting rule predetermined between the image decoding devices (100). In addition, the image decoding device (100) may determine the splitting rule based on information obtained from the bitstream.

[0210] The image decoding device (100) can adaptively determine a segmentation rule based on the position of the encoding unit. The image decoding device (100) can adaptively determine a segmentation rule based on the position that the encoding unit occupies in the image.

[0211] Additionally, the image decoding device (100) can determine a splitting rule so that encoding units generated through different splitting paths do not have the same block shape. However, this is not limited thereto, and encoding units generated through different splitting paths may have the same block shape. Encoding units generated through different splitting paths may have different decoding processing orders. Since the decoding processing order has been described together with FIG. 12, a detailed description thereof will be omitted.

[0212] Figure 16 is a block diagram showing a video encoding and decoding system.

[0213] The encoder (1610) of the image encoding and decoding system (1600) transmits an encoded bitstream of an image, and the decoder (1650) receives the bitstream and decodes it to output a restored image. Here, the decoder (1650) may have a configuration similar to that of the image decoding device (100).

[0214] In the encoding unit (1610), the inter prediction encoding unit (1605) generates motion information of the current block that points to a reference block of a reference picture that is temporally adjacent to the current picture when the prediction mode of the current block is the inter prediction mode. The inter prediction encoding unit (1605) can determine prediction samples of the current block using samples of the reference blocks. The intra prediction encoding unit (1610) can determine intra prediction information indicating a direction in which neighboring samples similar to the current block are located or a method of determining prediction samples so that the prediction samples of the current block can be determined using neighboring samples that are spatially adjacent to the current block. The inter prediction encoding unit (1605) can determine reference samples to be used for prediction of the current block from among previously reconstructed samples stored in the DPB (Decoded Picture Buffer) (1648).

[0215] The transform unit (1620) performs a transform on the residual sample values ​​obtained by subtracting the prediction samples generated by the inter prediction encoding unit (1605) or the intra prediction encoding unit (1610) from the original sample of the current block, and outputs transform coefficients. The quantization unit (1625) quantizes the transform coefficients output from the transform unit (1620) and outputs the quantized transform coefficients. The entropy encoding unit (1630) can encode the quantized transform coefficients into residual syntax elements including level values ​​and output them in the form of a bitstream.

[0216] The quantized transform coefficients output from the quantization unit (1625) can be dequantized and inversely transformed through the inverse quantization unit (1633) and inverse transformation unit (1635) to generate residual sample values ​​again.

[0217] In the adder (1615), residual sample values ​​and predicted sample values ​​are combined to output restored sample values. The post-restoration filtering unit (1640) performs post-restoration filtering on the restored samples, and the restored sample values ​​updated through the post-restoration filtering can be used as reference sample values ​​for intra prediction to be performed in the intra prediction unit (1610). The post-restoration filtering unit (1640) can perform Hadamard transform domain filtering or bilateral filtering on the restored sample values.

[0218] The in-loop filtering unit (1645) can perform at least one of deblocking filtering and adaptive loop filtering on restored samples updated through post-restoration filtering. Restored sample values ​​updated through filtering by the in-loop filtering unit (1645) can be stored in the DPB (1648) and used as reference sample values ​​for inter prediction to be performed by the inter prediction unit (1605).

[0219] The entropy decoding unit (1655) of the decoder (1650) can perform entropy decoding on the received bitstream to parse residual syntax elements including level values. Quantized transform coefficients can be restored from the residual syntax elements. The inverse quantization unit (1660) can perform inverse quantization on the quantized transform coefficients to output transform coefficients, and the inverse transform unit (1665) can perform inverse transformation on the transform coefficients to output residual sample values.

[0220] The inter prediction encoding unit (1670) of the decoder (1650) can determine a reference picture temporally adjacent to the current picture using the motion information of the current block parsed by the entropy decoding unit (1655), and can determine a reference block within the reference picture. The inter prediction encoding unit (1670) can determine prediction samples of the current block using samples of the reference blocks. The intra prediction encoding unit (1675) of the decoder (1650) can determine reference samples spatially adjacent to the current block using the intra prediction information using the motion information of the current block parsed by the entropy decoding unit (1655), and can determine prediction samples of the current block using the determined neighboring samples. The inter prediction encoding unit (1670) can determine reference samples to be used for prediction of the current block from among previously reconstructed samples stored in the DPB (Decoded Picture Buffer) (1690).

[0221] The adder (1695) of the decoder (1650) combines residual sample values ​​and predicted sample values ​​to output a restored sample value of the current block. The post-restoration filtering unit (1680) of the decoder (1650) can perform Hadamard transform domain filtering or bilateral filtering on the restored sample values. The restored sample values ​​updated through the filtering of the post-restoration filtering unit (1680) can be used as reference sample values ​​for intra prediction to be performed in the intra prediction unit (1675).

[0222] The in-loop filtering unit (1685) of the decoder (1650) can perform at least one of deblocking filtering and adaptive loop filtering on restored samples updated through post-restoration filtering. The restored sample values ​​updated through filtering of the in-loop filtering unit (1685) are stored in the DPB (1690) and can be used as reference sample values ​​for inter prediction to be performed in the inter prediction unit (1670).

[0223] A video encoding method and a decoding method, a video encoding device and a decoding device according to one embodiment propose a method of performing quantization or inverse quantization based on a data unit determined in the video encoding device and the video decoding device described above with reference to FIGS. 1 to 16. Hereinafter, a video encoding method and a device or a video decoding method and a device for performing quantization or inverse quantization by determining a quantization parameter (QP) according to one embodiment disclosed in the present specification will be described in detail with reference to FIGS. 17 to 40.

[0224] FIG. 17 illustrates a block diagram of a video decoding device according to one embodiment.

[0225] A video decoding device (1700) according to one embodiment includes an acquisition unit (1710) and a decoding unit (1720). The video decoding device (1700) acquires a bitstream generated as a result of encoding an image, determines the positions of blocks divided from a picture based on information included in the bitstream, and can decode blocks such as a maximum encoding unit and an encoding unit.

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

[0227] The video decoding device (1700) can perform a video decoding operation including prediction by operating in conjunction with an internally installed video decoding processor or an external video decoding processor to restore an image through image decoding. According to one embodiment, the internal video decoding processor of the video decoding device (1700) can implement a basic image decoding operation not only as a separate processor, but also by including a central processing unit or a graphics processing unit with an image decoding processing module.

[0228] The video decoding device (1700) may be included in the aforementioned video decoding device (100). For example, the acquisition unit (1710) and the decoding unit (1720) may correspond to the decoding unit (120) of the video decoding device (100). The video decoding device (1700) may correspond to the decoder (1650) of the aforementioned video encoding and decoding system with reference to FIG. 16. For example, the decoding unit (1720) may include the function of the inverse quantization unit (1633) of the decoder (1650).

[0229] A video decoding device (1700) receives a bitstream generated as a result of encoding an image. The bitstream may include information about a current picture. The picture may include one or more maximum coding units. The video decoding device (1700) may determine the position of a current block within the picture based on information obtained from the bitstream. The current block is a block generated by dividing the picture according to a tree structure, and may correspond to, for example, a maximum coding unit or a coding unit. The video decoding device (1700) may determine whether the current block is further divided into lower-depth sub-blocks and may determine the tree structure of the current block. The lower depth may be determined by increasing the number of times the current block is divided into lower-depth blocks compared to the current depth of the current block. Among the blocks forming the tree structure included in the current picture, blocks located at tree leaves are blocks that are no longer divided. Accordingly, the video decoding device (1700) can decode blocks by performing inverse quantization, inverse transformation, and prediction on one or more blocks that are no longer divided.

[0230] The video decoding device (1700) can perform prediction on the current block to generate prediction samples of the current block. The video decoding device (1700) can perform inverse transformation on the current block to generate residual samples of the current block. The restoration unit (1730) can generate restoration samples of the current block using the prediction samples of the current block and the residual samples of the current block. The video decoding device (1700) can restore the current picture by restoring samples for each block.

[0231] For example, if the prediction mode of the current block is an intra mode, the video decoding device (1700) can use the intra prediction information of the current block to determine a reference sample among samples of a spatial neighboring block located in the intra prediction direction, and use the reference sample to determine prediction samples corresponding to the current block.

[0232] For example, when the prediction mode of the current block is inter mode, the video decoding device (1700) can reconstruct the current block using the motion vector of the current block. The video decoding device (1700) can determine a reference block in a reference picture using the motion vector of the current block, and determine prediction samples corresponding to the current block from reference samples included in the reference block. The video decoding device (1700) can reconstruct transform coefficients using transform coefficient levels obtained from a bitstream, and perform inverse quantization and inverse transformation on the transform coefficients to reconstruct residual samples. The video decoding device (1700) can determine reconstructed samples of the current block by combining the prediction samples corresponding to the current block and the residual samples.

[0233] If the current block is predicted in skip mode, the video decoding device (1700) does not need to parse the transform coefficients of the current block from the bitstream. The video decoding device (1700) can determine the reconstructed samples of the current block using the prediction samples of the current block as is.

[0234] A video decoding device (1700) according to one embodiment uses a quantization parameter (QP) to perform inverse quantization. The QP is set for each coding unit, and one QP can be applied to transform coefficients included in the coding unit. A picture can include one or more slices, and one slice can include one or more coding units. In order to determine the QP for each coding unit, the video decoding device (1700) can obtain information necessary to determine the QP for each coding unit, slice, or picture from a bitstream.

[0235] According to one embodiment, the acquisition unit (1710) may acquire information necessary to determine QP for each coding unit from the bitstream syntax related to the coding unit. The acquisition unit (1710) may acquire information necessary to determine QP for each slice from the slice header syntax. The acquisition unit (1710) may acquire information necessary to determine QP for each picture from the picture header syntax.

[0236] First, the video decoding device (1700) can determine at the picture parameter set level whether to obtain QP differential values ​​for each picture or for each slice.

[0237] According to one embodiment, the acquisition unit (1710) can acquire a QP initial value to be applied to a current picture from a picture parameter set. In addition, the acquisition unit (1710) can acquire picture header QP differential value information indicating whether QP differential value information exists in a picture header of the current picture from the picture parameter set. If the picture header QP differential value information indicates that QP differential value information exists in the picture header, the acquisition unit (1710) can acquire a first QP differential value for the current picture from the picture header. If the picture header QP differential value information indicates that QP differential value information does not exist in the picture header, the acquisition unit (1710) can acquire a second QP differential value for the current slice from the slice header of the current slice included in the current picture.

[0238] According to one embodiment, the decoding unit (1720) may determine a QP for a coding unit included in the current picture using a QP initial value and a first QP differential value if the picture header QP differential value information indicates that QP differential value information exists in the picture header. The decoding unit (1720) may perform inverse quantization on the coding units included in the current picture using the QP using the first QP differential value.

[0239] According to one embodiment, the decoding unit (1720) may determine a QP for a coding unit included in the current slice using a QP initial value and a second QP differential value if the picture header QP differential value information indicates that QP differential value information does not exist in the picture header. The decoding unit (1720) may perform inverse quantization on the coding units included in the current slice using the QP determined using the second QP differential value.

[0240] Referring to FIG. 18 below, a process in which a video decoding device (1700) obtains QP differential value information for each picture or slice and performs inverse quantization for each encoding unit is described in detail.

[0241] FIG. 18 illustrates a flowchart of a video decoding method according to one embodiment.

[0242] In step 1810, the acquisition unit (1710) can acquire QP initial value and picture header QP differential value information to be applied to the current picture from the picture parameter set. According to one embodiment, the picture header QP differential value information can indicate whether QP differential value information exists in the picture header of the current picture.

[0243] In step 1820, if the picture header QP differential value information indicates that QP differential value information exists in the picture header of the current picture, the acquisition unit (1810) can acquire the first QP differential value for the current picture from the picture header.

[0244] In step 1830, the decoding unit (1820) can determine a QP for a coding unit included in the current picture using a QP initial value and a first QP differential value.

[0245] In step 1840, the decoding unit (1820) can perform inverse quantization on the coding unit using the QP determined using the first QP differential value to obtain a transform coefficient of the coding unit. That is, inverse quantization can be performed on the coding units included in the current picture using the QP determined using the first QP differential value.

[0246] In step 1850, the decoding unit (1820) can restore the encoding unit using the transform coefficient of the encoding unit obtained in step 1840. The decoding unit (1820) can perform an inverse transformation on the transform coefficient to obtain residual samples, and determine restored samples of the encoding unit using the residual samples.

[0247] According to one embodiment, when the picture header QP differential value information indicates that the picture header does not contain QP differential value information, the acquisition unit (1710) may acquire a second QP differential value for the current slice from the slice header of the current slice included in the current picture. The decoder (1720) may determine a QP for a coding unit included in the current slice using a QP initial value and the second QP differential value. The decoder (1720) may perform inverse quantization on the coding unit using the QP determined using the second QP differential value to acquire transform coefficients of the coding unit. The decoder (1720) may reconstruct the coding unit using the transform coefficients. That is, inverse quantization may be performed on the coding units included in the current slice using the QP determined using the second QP differential value.

[0248] In step 1820, if the picture header QP differential value information indicates that the picture header of the current picture contains QP differential value information, the acquisition unit (1810) can acquire the first QP differential value for the luma component of the current picture from the picture header. The decoding unit (1820) can determine the QP for the luma component of the slices included in the current picture by adding the QP initial value and the first QP differential value for the luma component. The decoding unit (1820) can use the QP for the luma component of the slices to determine the QP of the coding unit included in the slices included in the current picture and included in the current picture.

[0249] In step 1820, the acquisition unit (1710) can acquire a QP differential value for the coding unit from the bitstream. The decoding unit (1820) can determine a QP for the luma component of the coding unit using the QP for the luma component of the slices and the QP differential value for the coding unit. The decoding unit (1820) can perform inverse quantization on transform coefficients included in the coding unit using the QP for the coding unit. Residual samples of the coding unit can be decoded by performing inverse transformation on the inversely quantized transform coefficients.

[0250] According to another embodiment, the acquisition unit (1710) may not acquire the QP differential value for the encoding unit from the bitstream. In this case, the decoding unit (1810) may determine the QP for the luma component of the encoding unit using the predicted QP prediction value for the encoding unit.

[0251] According to one embodiment, when the picture header QP differential value information indicates that the QP differential value information does not exist in the picture header of the current picture, the acquisition unit (1810) may acquire a second QP differential value for the luma component of the current slice from the slice header. The decoder (1820) may determine a QP for the luma component of the current slice by adding a QP initial value and the second QP differential value for the luma component. The decoder (1820) may determine a QP of a coding unit included in the current slice using the QP for the luma component of the current slice. The decoder (1820) may perform inverse quantization on transform coefficients included in the coding unit using the QP for the coding unit. Residual samples of the coding unit may be decoded by performing inverse transformation on the inversely quantized transform coefficients. If the picture header QP differential value information indicates that the picture header of the current picture does not contain QP differential value information, the acquisition unit (1810) can acquire the QP differential value for the coding unit included in the current slice from the bitstream. The decoding unit (1820) can determine the QP for the luma component of the current coding unit included in the current slice using the QP differential value for the coding unit.

[0252] When the picture header QP differential value information indicates that the QP differential value information does not exist in the picture header of the current picture, the acquisition unit (1810) can acquire the Cb QP differential value for the Cb chroma component of the current slice and the Cr QP differential value for the Cr chroma component of the current slice from the slice header. The decoding unit (1820) can determine the Cb QP for the Cb chroma component of the current coding unit by updating the QP for the Cb chroma component of the current coding unit included in the current slice using the Cb QP differential value for the Cb chroma component of the current slice. The decoding unit (1820) can determine the Cr QP for the Cr chroma component of the current coding unit by updating the QP for the Cr chroma component of the current coding unit included in the current slice using the Cr QP differential value for the Cr chroma component of the current slice.

[0253] FIG. 19 illustrates a block diagram of a video encoding device according to one embodiment.

[0254] Referring to FIG. 19, a video encoding device (1900) according to one embodiment may include a quantization unit (1910) and an information encoding unit (1920).

[0255] A video encoding device (1900) according to one embodiment may include a central processor (not shown) that controls a quantization unit (1910) and an information encoding unit (1920). Alternatively, the quantization unit (1910) and the information encoding unit (1920) may be operated by their own processors (not shown), and the video encoding device (1900) may be operated as a whole as the processors (not shown) organically operate with each other. Alternatively, the quantization unit (1910) and the information encoding unit (1920) may be controlled under the control of an external processor (not shown) of the video encoding device (1900).

[0256] The video encoding device (1900) may include one or more data storage units (not shown) in which input / output data of the quantization unit (1910) and the information encoding unit (1920) are stored. The video encoding device (1900) may also include a memory control unit (not shown) that controls data input / output of the data storage unit (not shown).

[0257] The video encoding device (1900) can perform a video encoding operation including prediction by operating in conjunction with an internally installed video encoding processor or an external video encoding processor for video encoding. The internal video encoding processor of the video encoding device (1900) according to one embodiment can implement a basic video encoding operation not only as a separate processor, but also by including a central processing unit or a graphics processing unit with a video encoding processing module.

[0258] The video encoding device (1900) may correspond to the encoder (1600) of the video encoding and decoding system described above with reference to FIG. 16. For example, the information encoding unit (1920) may correspond to the entropy encoding unit (1630) of the encoder (1600). The quantization unit (1910) may correspond to the quantization unit (1625) of the encoder (1600).

[0259] A video encoding device (1900) according to one embodiment can divide a picture into a plurality of maximum encoding units, and encode each maximum encoding unit by dividing it into blocks of various sizes and shapes.

[0260] For example, if the prediction mode of the current block is intra mode, the video encoding device (1900) can determine reference samples among samples of spatial neighboring blocks located in the intra prediction direction of the current block, and determine prediction samples of the current block using the reference samples. It can determine residual samples, which are differences between the prediction samples and samples of the current block, generate transform coefficients by transforming the residual samples based on a transform block, and generate quantized transform coefficients by performing quantization on the transform coefficients.

[0261] For example, if the current block is predicted in skip mode, the video encoding unit (1900) can determine a motion vector for predicting the current block. The video encoding unit (1900) can determine a reference block of the current block within a reference picture and determine a motion vector pointing from the current block to the reference block. In the case of skip mode, encoding of the residual block is not required.

[0262] For example, when the prediction mode of the current block is inter mode, the video encoding device (1900) can determine a motion vector for predicting the current block. The video encoding device (1900) can determine a reference block of the current block in the reference picture, and determine a motion vector pointing to the reference block from the current block. The video encoding device (1900) can determine prediction samples of the current block using reference samples included in the reference block, determine residual samples which are differences between the prediction samples and the samples of the current block, and perform transformation and quantization on the residual samples based on a transform block, thereby generating quantized transform coefficients.

[0263] The current block is a block generated by dividing an image according to a tree structure, and may correspond to, for example, a maximum encoding unit, an encoding unit, or a transformation unit. The video encoding device (1900) may encode blocks included in a picture according to an encoding order.

[0264] A video encoding device (1900) according to one embodiment uses QP to perform quantization. QP is set for each coding unit, and one QP can be applied to transform coefficients included in the coding unit. A picture can include one or more slices, and one slice can include one or more coding units. The video encoding device (1900) can determine QP for each coding unit, and encode information necessary to determine QP for each coding unit, slice, or picture to signal it.

[0265] The information encoding unit (1920) according to one embodiment may encode information necessary for determining QP for each encoding unit and output it in the form of encoding unit-related bitstream syntax. The information encoding unit (1920) may encode information necessary for determining QP for each slice and output it in the form of slice header syntax. The information encoding unit (1920) may encode information necessary for determining QP for each picture and output it in the form of picture header syntax.

[0266] First, the video encoding device (1900) can determine at the picture parameter set level whether to transmit QP differential values ​​for each picture or for each slice.

[0267] A quantization unit (1910) according to one embodiment can determine a QP initial value to be applied to the current picture.

[0268] When determining a QP differential value for each picture, the information encoding unit (1920) can determine a first QP differential value between the QP used in the current picture and the QP initial value. The information encoding unit (1920) can generate a picture header for the current picture including the first QP differential value.

[0269] When determining the QP differential value for each slice, the information encoding unit (1920) can determine a second QP differential value between the QP used in the current slice included in the current picture and the QP initial value. The information encoding unit (1920) can generate a slice header for the current slice, which includes the second QP differential value.

[0270] An information encoding unit (1920) according to one embodiment can generate a picture parameter set including picture header QP differential value information indicating whether QP differential value information exists in the picture header of the current picture and a QP initial value.

[0271] Referring to FIG. 20 below, a process of a video encoding device (1900) signaling QP difference value information for each picture or each slice is described in detail.

[0272] FIG. 20 illustrates a flowchart of a video encoding method according to one embodiment.

[0273] At step 2010, the quantization unit (1910) can determine a QP initial value to be applied to the current picture.

[0274] In step 2020, when determining a QP differential value for each picture, the information encoding unit (1920) can determine a first QP differential value between the QP used in the current picture and the QP initial value, and generate a picture header for the current picture including the first QP differential value.

[0275] In step 2030, the information encoding unit (1920) can generate a picture parameter set including picture header QP differential value information indicating whether QP differential value information exists in the picture header of the current picture and a QP initial value.

[0276] According to one embodiment, when determining a QP differential value for each slice, the information encoding unit (1920) may determine a second QP differential value between a QP used in a current slice included in a current picture and a QP initial value, and generate a slice header for the current slice including the second QP differential value.

[0277] In step 2020, when the quantization unit (1910) determines the QP differential value for each picture, it may determine the QP for the luma component of the slices included in the current picture. The information encoding unit (1920) may determine the first QP differential value for the luma component of the current picture using the difference value between the QP for the luma component of the slices included in the current picture and the QP initial value. The information encoding unit (1920) may determine the QP differential value for the coding unit using the difference value between the QP for the luma component of the coding unit and the QP for the luma component of the slices. The information encoding unit (1920) may encode the QP differential value for the coding unit.

[0278] In step 2030, when the quantization unit (1910) determines the QP differential value for each slice, it may determine the QP for the luma component of the current slice. The information encoding unit (1920) may determine the second QP differential value for the luma component of the current slice by using the difference value between the QP for the luma component of the current slice and the QP initial value. The information encoding unit (1920) may determine the QP differential value for the encoding unit by subtracting the QP for the luma component of the current slice from the QP for the luma component of the encoding unit. The information encoding unit (1920) may encode the QP differential value for the encoding unit.

[0279] According to another embodiment, the quantization unit (1910) may determine a QP for a luma component of the coding unit using a QP prediction value predicted for the coding unit, and perform quantization on the coding unit using the QP. In this case, the information encoding unit (1920) may not encode the QP differential value for the coding unit.

[0280] In step 2030, when encoding the QP differential value for each slice, the information encoding unit (1920) may determine the Cb QP differential value for the Cb chroma component of the current slice to determine the QP of the Cb chroma component of the encoding unit included in the current slice. In addition, the information encoding unit (1920) may determine the Cr QP differential value for the Cr chroma component of the current slice to determine the QP of the Cr chroma component of the encoding unit included in the current slice. The information encoding unit (1920) may encode the Cb QP differential value and the Cr QP differential value for the Cr chroma component of the current slice, and generate a slice header for the current slice including the Cb QP differential value and the Cr QP differential value.

[0281] The quantization unit (1910) can perform quantization on the transform coefficients of the encoding unit using QP to generate quantized transform coefficients of the encoding unit. The information encoding unit (1920) can perform entropy encoding on information about the quantized transform coefficients to generate a bitstream.

[0282] A video decoding device (1700) according to an embodiment and a video encoding device (1900) according to an embodiment can selectively signal a QP differential value for each picture or each slice. Accordingly, the video encoding device (1900) according to an embodiment can determine whether to signal a QP differential value for each picture or each slice based on characteristics of a data picture or data transmission efficiency, and can signal the QP differential value according to a method with high transmission efficiency. The video decoding device (1700) according to an embodiment can determine whether to obtain a QP differential value for each picture or each slice based on information obtained from a picture parameter set, and determine a QP for each picture or a QP for each slice. Accordingly, when a QP differential value is signaled for each picture, there is no need to signal a QP differential value for each slice included in the picture, so data for signaling the QP can be reduced.

[0283] FIG. 21 illustrates a schematic diagram for deriving QP at the picture level or slice level according to one embodiment.

[0284] In the case of conventional video codecs, the initial value of QP QP is generally set in the picture parameter set (PPS), and the difference value of the initial value of QP of each slice is transmitted through the slice header, so that QP is set for each slice.

[0285] In contrast, in a video decoding device (1700) according to one embodiment, a picture header can be obtained for each picture, and information about QP can be signaled from the picture header. In the present invention, since it is possible to select whether to signal a QP differential value for each picture or for each slice between the video decoding device (1700) and the video encoding device (1900), the signaling structure of QP can be simplified.

[0286] First, in step 2100, the video decoding device (1700) can obtain an initial value of QP from a picture parameter set PPS or a sequence parameter set (SPS) at a higher level than the picture header. In addition, in step 2110, the video decoding device (1700) can obtain picture header QP differential value (dQP) information from the PPS or SPS. The video decoding device (1700) can determine whether to determine QP at the picture level or at the slice level based on the picture header QP differential value information.

[0287] Specifically, when the picture header QP differential value information is not 0 (for example, when the picture header QP differential value information is 1), i.e., when the picture header contains a QP differential value (delta value), the video decoding device (1700) can obtain the QP differential value from the picture header in step 2120. The video decoding device (1700) can determine the QP for each picture using the QP differential value obtained from the picture header and the QP initial value obtained from the PPS or SPS.

[0288] If the picture header QP differential value information is 0, i.e., if the picture header does not contain a QP differential value, the video decoding device (1700) can obtain a QP differential value from the slice header in step 2130. The video decoding device (1700) can determine a QP for each slice using the QP differential value obtained from the slice header and the QP initial value obtained from the PPS or SPS.

[0289] For the operation of steps 2100 to 2130 of the video decoding device (1700), the video encoding device (1900) may determine whether to determine the QP at the picture level or the slice level. In addition, the video encoding device (1900) may encode picture header QP differential value information indicating whether to determine the QP at the picture level or the slice level.

[0290] Specifically, when the video encoding device (1900) determines QP for each picture, it can encode the QP differential value for each picture. Accordingly, the video encoding device (1900) can generate a picture header of the current picture including the QP differential value of the current picture. In this case, the picture header QP differential value information can be encoded to indicate 1 to indicate that the QP differential value exists in the picture header of the current picture.

[0291] When the video encoding device (1900) determines QP for each slice, the QP differential value can be encoded for each slice. Accordingly, the video encoding device (1900) can generate a slice header of the current slice including the QP differential value of the current slice. In this case, the picture header QP differential value information can be encoded to indicate 0 to indicate that the QP differential value does not exist in the picture header.

[0292] A video encoding device (1900) according to one embodiment can generate a PPS or SPS including an initial value of QP and picture header QP differential value information.

[0293] As above, when setting the same QP for the coding units included in the current picture at the picture level, the QP can be signaled only in the picture header, thereby reducing the amount of bits for signaling the QP. That is, the QP differential value can be signaled only once in the picture header of the current picture, without having to signal the QP through the slice header for each slice included in the current picture. If the characteristics of the slices included in the current picture are different, the QP can be set separately for each slice to set the QP in more detail, and the QP differential value can be signaled for each slice header for each slice.

[0294] The syntax structures for signaling picture header QP difference value information are described below with reference to FIGS. 22 to 24.

[0295] FIG. 22 illustrates a picture parameter set including picture header QP difference value information according to one embodiment.

[0296] The video encoding device (1900) may include syntax elements pps_init_qp_minus26 (2210) and pps_qp_delta_info_in_ph_flag (2220) in the picture parameter set syntax (2200). The syntax element pps_qp_delta_info_in_ph_flag (2220) may indicate whether a QP differential value for the current picture exists in the picture header of the current picture.

[0297] The video decoding device (1700) can parse the syntax elements pps_init_qp_minus26 (2210) and pps_qp_delta_info_in_ph_flag (2220) from the picture parameter set syntax (2200). The video decoding device (1700) can obtain an initial value of a QP applicable to the current picture or slices included in the current picture from the syntax element pps_init_qp_minus26 (2210). The video decoding device (1700) can check whether a QP differential value for the current picture exists in the picture header of the current picture from the syntax element pps_qp_delta_info_in_ph_flag (2220).

[0298] The syntax element pps_init_qp_minus26(2210) may indicate an initial value of QP SliceQpY applicable to the current picture or slices included in the current picture. If the QP difference ph_qp_delta of the picture in the picture header is decoded to a non-zero value, the initial value of SliceQpY at the picture level may be adjusted using the QP difference. If the QP difference sh_qp_delta of the slice in the slice header is decoded to a non-zero value, the initial value of SliceQpY at the slice level may be adjusted using the QP difference. The value of pps_init_qp_minus26(2210) may be a value in the range of -( 26 + QpBdOffset ) to +37. QpBdOffset may be determined by the bit depth. SliceQpY can be determined by the following equation, depending on whether ph_qp_delta or sh_qp_delta is decrypted.

[0299] SliceQpY = 26 + pps_init_qp_minus26 + ph_qp_delta

[0300] SliceQpY = 26 + pps_init_qp_minus26 + sh_qp_delta

[0301] Therefore, the QP SliceQpY of the luma component of the slice can be determined in the range from -QpBdOffset to +63.

[0302] FIG. 23 illustrates a picture header including a QP differential value of a current picture according to one embodiment.

[0303] The video encoding device (1900) may include a syntax element ph_qp_delta (2320) in the picture header syntax (2300). The syntax element ph_qp_delta (2320) may indicate a QP differential value applicable to the current picture. Specifically, when pps_qp_delta_info_in_ph_flag (2220) included in the PPS (2200) indicates 1 (2310), the syntax element ph_qp_delta (2320) may be included in the picture header syntax (2300).

[0304] The video decoding device (1700) can obtain the syntax element ph_qp_delta (2320) from the picture header syntax (2300). Specifically, when the pps_qp_delta_info_in_ph_flag (2220) obtained from the PPS (2200) indicates 1 (2310), the syntax element ph_qp_delta (2320) can be obtained from the picture header syntax (2300). In this case, the QP of the picture can be determined by adding the syntax elements pps_init_qp_minus26 (2210) and ph_qp_delta (2320) for the current picture corresponding to the picture header syntax (2300), and the QP of the picture can be applied to all coding units included in the current picture. When the QP differential value of the encoding unit is obtained from the syntax structure corresponding to each encoding unit, the QP of the encoding unit can be determined by adding the QP differential value of the encoding unit and the QP of the picture. The video decoding device (1700) can perform inverse quantization on the transform samples of the encoding unit using the QP determined for each encoding unit.

[0305] FIG. 24 illustrates a slice header containing the QP differential value of the current slice according to one embodiment.

[0306] The video encoding device (1900) may include a syntax element sh_qp_delta (2420) in the slice header syntax (2400). The syntax element sh_qp_delta (2420) may indicate a QP differential value of a luma component applicable to the current slice. Specifically, when the pps_qp_delta_info_in_ph_flag (2220) included in the PPS (2200) indicates 0 (2410), the syntax element sh_qp_delta (2420) may be included in the slice header syntax (2400). In addition, the video encoding device (1900) may include syntax elements sh_cb_qp_offset and sh_cr_qp_offset (2430) in the slice header syntax (2400). The syntax elements sh_cb_qp_offset and sh_cr_qp_offset (2430) represent the QP difference value of the chroma Cb component and the QP difference value of the chroma Cr component, respectively.

[0307] The video decoding device (1700) can obtain the syntax element sh_qp_delta (2420) from the slice header syntax (2400). Specifically, when the pps_qp_delta_info_in_ph_flag (2220) obtained from the PPS (2200) indicates 0 (2410), the syntax element sh_qp_delta (2420) can be obtained from the slice header syntax (2400). In this case, the QP of the luma component of the slice can be determined by adding the syntax elements pps_init_qp_minus26 (2210) and sh_qp_delta (2420) for the current slice corresponding to the slice header syntax (2400), and the QP of the luma component of the slice can be applied to all coding units included in the current slice. When the QP differential value of the luma component of the encoding unit is obtained from the syntax structure corresponding to each encoding unit, the QP of the luma component of the encoding unit can be determined by adding the QP differential value of the luma component of the encoding unit and the QP of the luma component of the slice.

[0308] In addition, the video decoding device (1700) can parse the syntax elements sh_cb_qp_offset and sh_cr_qp_offset (2430) from the slice header syntax (2400). The QP differential value of the chroma Cb component and the QP differential value of the chroma Cr component can be obtained from the syntax elements sh_cb_qp_offset and sh_cr_qp_offset (2430), respectively. Accordingly, the video decoding device (1700) can determine the QP for the chroma Cb components of the coding units included in the current slice using the QP differential value of the chroma Cb component, and can determine the QP for the chroma Cr components of the coding units included in the current slice using the QP differential value of the chroma Cr component. The video decoding device (1700) can perform inverse quantization on the transform samples of the coding unit using the QP determined for each coding unit.

[0309] sh_cb_qp_offset and sh_cr_qp_offset(2430) can each be a value in the range of -12 to 12.

[0310] The offset of the QP of the Cb component in a slice can be determined as pps_cb_qp_offset + sh_cb_qp_offset, and the value of pps_cb_qp_offset + sh_cb_qp_offset can be determined within the range of -12 to +12. Similarly, the offset of the QP of the Cr component in a slice can be determined as pps_cr_qp_offset + sh_cr_qp_offset, and the value of pps_cr_qp_offset + sh_cr_qp_offset can be determined within the range of -12 to +12.

[0311] In addition, when signaling a QP difference (delta QP) at the coding unit level, the QP determined at the start of a tile, the start of a slice, the start of a picture header, or the slice header can be used as the initial value of the QP. For example, when a QP is determined at the picture header and there are slices or tiles in the picture, the QP determined at the start of the slice or tile can be used as the initial value. Accordingly, the QP of the coding unit can be determined by adding the QP difference of the coding unit signaled at the coding unit level and the initial value of the QP determined at the start of a tile or the start of a slice.

[0312] As another example, when signaling a picture order counter (POC), POC information can be included only in the picture header, not the slice header. In this case, it can be difficult to determine which picture a specific slice belongs to. However, timestamps or sequence numbers signaled at the system level can be used to determine the index of the picture to which a slice belongs. Furthermore, the codec can determine that information for a specific slice or picture header is missing by receiving notification from an external system.

[0313] According to a video encoding method and a video decoding method according to one embodiment, a method for transmitting a differential value of a QP can be determined according to a characteristic of a picture or data transmission efficiency, and the differential value of the QP can be signaled according to the method.

[0314] Hereinafter, with reference to FIGS. 25 to 32, syntax structures for selectively signaling parameters available in various tools at the picture level or slice level are described. Whether tool-related parameters are signaled in the picture header or slice header can be determined through flags signaled in the picture sequence set.

[0315] FIG. 25 illustrates a picture parameter set including information indicating whether a picture header includes deblocking filter related parameters according to one embodiment.

[0316] The video encoding device (1900) may include pps_dbf_info_in_ph_flag (2510) in the picture parameter set syntax (2500). The syntax element pps_dbf_info_in_ph_flag (2510) may indicate whether a deblocking filtering related parameter differential value for the current picture exists in the picture header of the current picture.

[0317] The video decoding device (1700) can parse pps_dbf_info_in_ph_flag (2510) from the picture parameter set syntax (2500). The video decoding device (1700) can check whether a deblocking filtering related parameter for the current picture exists in the current picture header from the syntax element pps_dbf_info_in_ph_flag (2510).

[0318] FIG. 26 illustrates a picture header including deblocking filter related parameters of the current picture according to one embodiment.

[0319] The video encoding device (1900) may include syntax elements ph_luma_beta_offset_div2, ph_luma_tc_offset_div2, ph_cb_beta_offset_div2, ph_cb_tc_offset_div2, ph_cr_beta_offset_div2, ph_cr_tc_offset_div2 (2620) in the picture header syntax (2600). Specifically, when pps_dbf_info_in_ph_flag (2510) included in the PPS (2500) indicates 1 (2610), the picture header syntax (2600) may include syntax elements ph_luma_beta_offset_div2, ph_luma_tc_offset_div2, ph_cb_beta_offset_div2, ph_cb_tc_offset_div2, ph_cr_beta_offset_div2, ph_cr_tc_offset_div2 (2620).

[0320] The video decoding device (1700) can obtain syntax elements ph_luma_beta_offset_div2, ph_luma_tc_offset_div2, ph_cb_beta_offset_div2, ph_cb_tc_offset_div2, ph_cr_beta_offset_div2, ph_cr_tc_offset_div2 (2620) from the picture header syntax (2600). Specifically, when pps_dbf_info_in_ph_flag (2510) included in the PPS (2500) indicates 1 (2610), syntax elements ph_luma_beta_offset_div2, ph_luma_tc_offset_div2, ph_cb_beta_offset_div2, ph_cb_tc_offset_div2, ph_cr_beta_offset_div2, ph_cr_tc_offset_div2 (2620) can be obtained from the picture header syntax (2600).

[0321] The syntax element ph_luma_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to luma components of slices within the current picture. The syntax element ph_luma_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to luma components of slices within the current picture. The syntax element ph_cb_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to Cb components of slices within the current picture. The syntax element ph_cb_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to Cb components of slices within the current picture. The syntax element ph_cr_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to Cr components of slices within the current picture. The syntax element ph_cr_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to Cr components of slices within the current picture. The video decoding device (1700) may perform deblocking filtering on the boundaries of encoding units included in the current picture using the deblocking filtering-related parameters obtained from the picture header.

[0322] FIG. 27 illustrates a slice header containing deblocking filter related parameters of the current slice according to one embodiment.

[0323] The video encoding device (1900) may include syntax elements sh_luma_beta_offset_div2, sh_luma_tc_offset_div2, sh_cb_beta_offset_div2, sh_cb_tc_offset_div2, sh_cr_beta_offset_div2, sh_cr_tc_offset_div2 (2720) in the slice header syntax (2700). Specifically, when pps_dbf_info_in_ph_flag (2510) included in the PPS (2500) indicates 0 (2710), the syntax elements sh_luma_beta_offset_div2, sh_luma_tc_offset_div2, sh_cb_beta_offset_div2, sh_cb_tc_offset_div2, sh_cr_beta_offset_div2, sh_cr_tc_offset_div2 (2720) can be included in the slice header syntax (2700).

[0324] The video decoding device (1700) can obtain syntax elements sh_luma_beta_offset_div2, sh_luma_tc_offset_div2, sh_cb_beta_offset_div2, sh_cb_tc_offset_div2, sh_cr_beta_offset_div2, sh_cr_tc_offset_div2 (2720) from the slice header syntax (2700). Specifically, when pps_dbf_info_in_ph_flag (2510) included in the PPS (2500) indicates 0 (2710), syntax elements sh_luma_beta_offset_div2, sh_luma_tc_offset_div2, sh_cb_beta_offset_div2, sh_cb_tc_offset_div2, sh_cr_beta_offset_div2, sh_cr_tc_offset_div2 (2720) can be obtained from the slice header syntax (2700).

[0325] The syntax element sh_luma_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the luma components of the current slice. The syntax element sh_luma_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to the luma components of the current slice. The syntax element sh_cb_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the Cb components of the current slice. The syntax element sh_cb_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to the Cb components of the current slice. The syntax element sh_cr_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the Cr components of the current slice. The syntax element sh_cr_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to the Cr components of the current slice. The video decoding device (1700) may perform deblocking filtering on the boundaries of the encoding units included in the current slice using the deblocking filtering-related parameters obtained from the slice header.

[0326] FIG. 28 illustrates a picture parameter set including information indicating whether various tool-related parameters are included in the picture header according to one embodiment.

[0327] The video encoding device (1900) may include pps_rpl_info_in_ph_flag (2810), pps_sao_info_in_ph_flag (2820), pps_alf_info_in_ph_flag (2830), and pps_wp_info_in_ph_flag (2840) in the picture parameter set syntax (2800). The syntax element pps_rpl_info_in_ph_flag (2810) may indicate whether a reference picture list related parameter for the current picture exists in the picture header of the current picture. The syntax element pps_sao_info_in_ph_flag (2820) may indicate whether a SAO (Sample Adaptive Offset) related parameter for the current picture exists in the picture header of the current picture. The syntax element pps_alf_info_in_ph_flag (2830) may indicate whether an ALF (Adaptive Loop Filtering) related parameter for the current picture exists in the picture header of the current picture. The syntax element pps_wp_info_in_ph_flag (2840) may indicate whether a weighted prediction related parameter for the current picture exists in the picture header of the current picture.

[0328] The video decoding device (1700) can parse pps_rpl_info_in_ph_flag (2810), pps_sao_info_in_ph_flag (2820), pps_alf_info_in_ph_flag (2830), and pps_wp_info_in_ph_flag (2840) from the picture parameter set syntax (2800). The video decoding device (1700) can check whether a reference picture list related parameter for the current picture exists in the picture header of the current picture from the syntax element pps_rpl_info_in_ph_flag (2810). The video decoding device (1700) can check whether a SAO (Sample Adaptive Offset) related parameter for the current picture exists in the picture header of the current picture from the syntax element pps_sao_info_in_ph_flag (2820). The video decoding device (1700) can check whether an ALF (Adaptive Loop Filtering) related parameter for the current picture exists in the picture header of the current picture from the syntax element pps_alf_info_in_ph_flag (2830). The video decoding device (1700) can check whether a weighted prediction related parameter for the current picture exists in the picture header of the current picture from the syntax element pps_wp_info_in_ph_flag (2840).

[0329] FIG. 29 illustrates a picture header including parameters related to weight prediction of a current picture, parameters related to sample adaptive offset (SAO), and parameters related to a reference picture list, according to one embodiment.

[0330] The video encoding device (1900) may include the weight prediction syntax pred_weight_table( ) (2920) in the picture header syntax (2900). Specifically, when the pps_wp_info_in_ph_flag (2840) included in the PPS (2800) indicates 1 (2910), the weight prediction syntax pred_weight_table( ) (2920) may be included in the picture header syntax (2900).

[0331] The video decoding device (1700) can call the weight prediction syntax pred_weight_table( ) (2920) from the picture header syntax (2900). Specifically, when the pps_wp_info_in_ph_flag (2840) included in the PPS (2800) indicates 1 (2910), the weight prediction syntax pred_weight_table( ) (2920) can be called from the picture header syntax (2900).

[0332] The video decoding device (1700) can obtain parameters for determining the weights of luma components and the weights of chroma components required for performing weight prediction from the weight prediction syntax pred_weight_table( ) (2920). The video decoding device (1700) can perform weight prediction using the weights of luma components and the weights of chroma components for blocks included in the current picture.

[0333] The video encoding device (1900) may include syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag (2940) in the picture header syntax (2900). Specifically, when pps_sao_info_in_ph_flag (2820) included in the PPS (2800) indicates 1 (2930), the syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag (2940) may be included in the picture header syntax (2900).

[0334] The video decoding device (1700) can obtain the syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag (2940) from the picture header syntax (2900). Specifically, when pps_sao_info_in_ph_flag (2820) included in the PPS (2800) indicates 1 (2930), the video decoding device (1700) can obtain the syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag (2940) from the picture header syntax (2900).

[0335] The video decoding device (1700) can determine whether SAO is performed for the luma component of the current picture from the syntax element ph_sao_luma_enabled_flag. The video decoding device (1700) can determine whether SAO is performed for the chroma component of the current picture from the syntax element ph_sao_chroma_enabled_flag. The video decoding device (1700) can perform SAO on the luma component and the chroma component of the maximum coding units included in the current picture, respectively, based on the syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag (2940).

[0336] The video encoding device (1900) may include a reference picture list syntax ref_pic_lists( ) (2960) in the picture header syntax (2900). Specifically, when the pps_rpl_info_in_ph_flag (2810) included in the PPS (2800) indicates 1 (2950), the reference picture list syntax ref_pic_lists( ) (2960) may be included in the picture header syntax (2900).

[0337] The video decoding device (1700) can call the reference picture list syntax ref_pic_lists( ) (2960) from the picture header syntax (2900). Specifically, when the pps_rpl_info_in_ph_flag (2810) included in the PPS (2800) indicates 1 (2950), the reference picture list syntax ref_pic_lists( ) (2960) can be called from the picture header syntax (2900).

[0338] The video decoding device (1700) can obtain parameters for determining a reference picture list from blocks of the current picture from the reference picture list syntax ref_pic_lists( ) (2960). The video decoding device (1700) can determine a reference picture list for blocks included in the current picture using the parameters obtained from the reference picture list syntax ref_pic_lists( ) (2960), and perform inter prediction using the reference picture list for each block.

[0339] FIG. 30 illustrates a picture header including ALF (Adaptive loop filter) related parameters of the current picture according to one embodiment.

[0340] The video encoding device (1900) may include syntax elements ph_num_alf_aps_ids_luma, ph_alf_aps_id_luma[i], ph_alf_cb_enabled_flag, ph_alf_cr_enabled_flag, ph_alf_aps_id_chroma, ph_alf_cc_cb_enabled_flag, ph_alf_cc_cb_aps_id, ph_alf_cc_cr_enabled_flag, ph_alf_cc_cr_aps_id (3020) in the picture header syntax (3000). Specifically, when pps_alf_info_in_ph_flag (2830) included in the PPS (2800) indicates 1 (3010), the picture header syntax (3000) may include syntax elements ph_num_alf_aps_ids_luma, ph_alf_aps_id_luma[i], ph_alf_cb_enabled_flag, ph_alf_cr_enabled_flag, ph_alf_aps_id_chroma, ph_alf_cc_cb_enabled_flag, ph_alf_cc_cb_aps_id, ph_alf_cc_cr_enabled_flag, ph_alf_cc_cr_aps_id (3020).

[0341] The video encoding device (1900) can obtain syntax elements ph_num_alf_aps_ids_luma, ph_alf_aps_id_luma[i], ph_alf_cb_enabled_flag, ph_alf_cr_enabled_flag, ph_alf_aps_id_chroma, ph_alf_cc_cb_enabled_flag, ph_alf_cc_cb_aps_id, ph_alf_cc_cr_enabled_flag, ph_alf_cc_cr_aps_id (3020) from the picture header syntax (3000). Specifically, when pps_alf_info_in_ph_flag (2830) included in the PPS (2800) indicates 1 (3010), syntax elements ph_num_alf_aps_ids_luma, ph_alf_aps_id_luma[i], ph_alf_cb_enabled_flag, ph_alf_cr_enabled_flag, ph_alf_aps_id_chroma, ph_alf_cc_cb_enabled_flag, ph_alf_cc_cb_aps_id, ph_alf_cc_cr_enabled_flag, ph_alf_cc_cr_aps_id (3020) can be obtained from the picture header syntax (3000).

[0342] The syntax element ph_num_alf_aps_ids_luma indicates the number of ALF APSs referenced by the slices included in the current picture. The syntax element ph_alf_aps_id_luma[i] indicates the aps_adaptation_parameter_set_id of the ith ALF APS referenced by the luma components of the slices included in the current picture. The syntax element ph_alf_cb_enabled_flag indicates whether ALF is allowed for the Cb component of the current picture. The syntax element ph_alf_cr_enabled_flag indicates whether ALF is allowed for the Cr component of the current picture. The syntax element ph_alf_aps_id_chroma indicates the aps_adaptation_parameter_set_id of the ALF APS referenced by the chroma components of the slices included in the current picture. The syntax element ph_alf_cc_cb_enabled_flag indicates whether cross-component ALF is allowed for the Cb component of the current picture. The syntax element ph_alf_cc_cb_aps_id indicates the aps_adaptation_parameter_set_id of the ALF APS referenced by the Cb components of the slices included in the current picture. The syntax element ph_alf_cc_cr_enabled_flag indicates whether cross-component ALF is allowed for the Cr component of the current picture. The syntax element ph_alf_cc_cr_aps_id indicates the aps_adaptation_parameter_set_id of the ALF APS referenced by the Cr components of the slices included in the current picture.

[0343] The video decoding device (1700) can perform ALF on the luma component and the chroma component for each maximum coding unit of the current picture using the obtained syntax elements ph_num_alf_aps_ids_luma, ph_alf_aps_id_luma[i], ph_alf_cb_enabled_flag, ph_alf_cr_enabled_flag, ph_alf_aps_id_chroma, ph_alf_cc_cb_enabled_flag, ph_alf_cc_cb_aps_id, ph_alf_cc_cr_enabled_flag, ph_alf_cc_cr_aps_id (3020).

[0344] FIG. 31 illustrates a slice header including parameters related to a reference picture list of a current slice, parameters related to weight prediction, and parameters related to SAO, according to one embodiment.

[0345] The video encoding device (1900) may include a reference picture list syntax ref_pic_lists( )(3120) in the slice header syntax (3100). Specifically, when the pps_rpl_info_in_ph_flag (2810) included in the PPS (2800) indicates 0 (3110), the reference picture list syntax ref_pic_lists( )(3120) may be included in the slice header syntax (3100).

[0346] The video decoding device (1700) can call the reference picture list syntax ref_pic_lists( ) (3120) from the slice header syntax (3100). Specifically, when the pps_rpl_info_in_ph_flag (2810) included in the PPS (2800) indicates 0 (3110), the reference picture list syntax ref_pic_lists( ) (3120) can be called from the slice header syntax (3100).

[0347] The video decoding device (1700) can obtain parameters for determining a reference picture list from blocks of the current slice from the reference picture list syntax ref_pic_lists( ) (3120). The video decoding device (1700) can determine a reference picture list for blocks included in the current slice using the parameters obtained from the reference picture list syntax ref_pic_lists( ) (3120), and perform inter prediction using the reference picture list for each block.

[0348] The video encoding device (1900) may include the weight prediction syntax pred_weight_table( ) (3140) in the slice header syntax (3100). Specifically, when the pps_wp_info_in_ph_flag (2840) included in the PPS (2800) indicates 0 (3130), the weight prediction syntax pred_weight_table( ) (3140) may be included in the slice header syntax (3100).

[0349] The video decoding device (1700) can call the weight prediction syntax pred_weight_table( ) (3140) from the slice header syntax (3100). Specifically, when the pps_wp_info_in_ph_flag (2840) included in the PPS (2800) indicates 0 (3130), the weight prediction syntax pred_weight_table( ) (3140) can be called from the slice header syntax (3100).

[0350] The video decoding device (1700) can obtain parameters for determining the weights of luma components and the weights of chroma components required for performing weight prediction from the weight prediction syntax pred_weight_table( ) (3140). The video decoding device (1700) can perform weight prediction using the weights of luma components and the weights of chroma components for blocks included in the current slice.

[0351] The video encoding device (1900) may include syntax elements sh_sao_luma_used_flag and sh_sao_chroma_used_flag (3160) in the slice header syntax (3100). Specifically, when pps_sao_info_in_ph_flag (2820) included in the PPS (2800) indicates 0 (3150), the syntax elements sh_sao_luma_used_flag and sh_sao_chroma_used_flag (3160) may be included in the slice header syntax (3100).

[0352] The video decoding device (1700) can obtain the syntax elements sh_sao_luma_used_flag and sh_sao_chroma_used_flag (3160) from the slice header syntax (3100). Specifically, when the pps_sao_info_in_ph_flag (2820) included in the PPS (2800) indicates 0 (3150), the syntax elements sh_sao_luma_used_flag and sh_sao_chroma_used_flag (3160) can be obtained from the slice header syntax (3100).

[0353] The video decoding device (1700) can determine whether SAO is used for the luma component of the current slice from the syntax element sh_sao_luma_used_flag. The video decoding device (1700) can determine whether SAO is used for the chroma component of the current slice from the syntax element sh_sao_chroma_used_flag. The video decoding device (1700) can perform SAO on the luma component and the chroma component of the largest coding units included in the current slice, respectively, based on the syntax elements sh_sao_luma_used_flag and sh_sao_chroma_used_flag (3160).

[0354] FIG. 32 illustrates a slice header containing ALF related parameters of the current slice according to one embodiment.

[0355] The video encoding device (1900) may include syntax elements sh_num_alf_aps_ids_luma, sh_alf_aps_id_luma[i], sh_alf_cb_enabled_flag, sh_alf_cr_enabled_flag, sh_alf_aps_id_chroma, sh_alf_cc_cb_enabled_flag, sh_alf_cc_cb_aps_id, sh_alf_cc_cr_enabled_flag, sh_alf_cc_cr_aps_id (3220) in the slice header syntax (3200). Specifically, when pps_alf_info_in_ph_flag (2830) included in the PPS (2800) above indicates 0 (3210), the syntax elements sh_num_alf_aps_ids_luma, sh_alf_aps_id_luma[i], sh_alf_cb_enabled_flag, sh_alf_cr_enabled_flag, sh_alf_aps_id_chroma, sh_alf_cc_cb_enabled_flag, sh_alf_cc_cb_aps_id, sh_alf_cc_cr_enabled_flag, sh_alf_cc_cr_aps_id (3220) can be included in the slice header syntax (3200).

[0356] The video encoding device (1900) can obtain syntax elements sh_num_alf_aps_ids_luma, sh_alf_aps_id_luma[i], sh_alf_cb_enabled_flag, sh_alf_cr_enabled_flag, sh_alf_aps_id_chroma, sh_alf_cc_cb_enabled_flag, sh_alf_cc_cb_aps_id, sh_alf_cc_cr_enabled_flag, sh_alf_cc_cr_aps_id (3220) from the slice header syntax (3200). Specifically, when pps_alf_info_in_ph_flag (2830) included in the PPS (2800) above indicates 0 (3210), syntax elements sh_num_alf_aps_ids_luma, sh_alf_aps_id_luma[i], sh_alf_cb_enabled_flag, sh_alf_cr_enabled_flag, sh_alf_aps_id_chroma, sh_alf_cc_cb_enabled_flag, sh_alf_cc_cb_aps_id, sh_alf_cc_cr_enabled_flag, sh_alf_cc_cr_aps_id (3220) can be obtained from the slice header syntax (3200).

[0357] The syntax element sh_num_alf_aps_ids_luma indicates the number of ALF APSs referenced by the current slice. The syntax element sh_alf_aps_id_luma[i] indicates the aps_adaptation_parameter_set_id of the ith ALF APS referenced by the luma component of the current slice. The syntax element sh_alf_cb_enabled_flag indicates whether ALF is allowed for the Cb component of the current slice. The syntax element sh_alf_cr_enabled_flag indicates whether ALF is allowed for the Cr component of the current slice. The syntax element sh_alf_aps_id_chroma indicates the aps_adaptation_parameter_set_id of the ALF APS referenced by the chroma component of the current slice. The syntax element sh_alf_cc_cb_enabled_flag indicates whether cross-component ALF is allowed for the Cb component of the current slice. The syntax element sh_alf_cc_cb_aps_id indicates the aps_adaptation_parameter_set_id of the ALF APS referenced by the Cb component of the current slice. The syntax element sh_alf_cc_cr_enabled_flag indicates whether cross-component ALF is allowed for the Cr component of the current slice. The syntax element sh_alf_cc_cr_aps_id indicates the aps_adaptation_parameter_set_id of the ALF APS referenced by the Cr component of the current slice.

[0358] The video decoding device (1700) can perform ALF on the luma component and the chroma component for each maximum coding unit of the current slice using the obtained syntax elements sh_num_alf_aps_ids_luma, sh_alf_aps_id_luma[i], sh_alf_cb_enabled_flag, sh_alf_cr_enabled_flag, sh_alf_aps_id_chroma, sh_alf_cc_cb_enabled_flag, sh_alf_cc_cb_aps_id, sh_alf_cc_cr_enabled_flag, sh_alf_cc_cr_aps_id (3220).

[0359] A video decoding device (1700) according to an embodiment and a video encoding device (1900) according to an embodiment can selectively signal deblocking filtering related parameters, reference picture list related parameters, weight prediction related parameters, SAO related parameters, and ALF related parameters for each picture or each slice, respectively. Accordingly, the video encoding device (1900) according to an embodiment determines whether to signal the related parameters for each tool for each picture or for each tool for each slice, based on the characteristics of the data picture or data transmission efficiency, and can signal the related parameters for each tool according to a method with high transmission efficiency. The video decoding device (1700) according to an embodiment determines whether to acquire the related parameters for each tool for each picture or for each tool for each slice, based on information acquired from a picture parameter set, and can acquire the related parameters for each tool for each picture or the related parameters for each tool for each slice. Accordingly, when the relevant parameters are signaled for each tool for each picture, there is no need to signal the relevant parameters for each tool for each slice included in the picture, so data for signaling the relevant parameters for each tool can be reduced.

[0360] Meanwhile, the embodiments of the present disclosure described above can be written as a program that can be executed on a computer, and the written program can be stored in a medium.

[0361] A medium may permanently store a computer-executable program, or may temporarily store it for execution or download. Furthermore, the medium may be a variety of recording or storage means, either in the form of a single piece of hardware or in the form of a combination of multiple pieces of hardware. It is not limited to media directly connected to a computer system, but may also be distributed across a network. Examples of media include magnetic media such as hard disks, floppy disks, and magnetic tape; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floptical disks; and anything configured to store program instructions, including ROM, RAM, and flash memory. Machine-readable storage media may be provided in the form of non-transitory storage media. Here, the term "non-transitory storage media" simply means that the storage media is tangible and does not contain signals (e.g., electromagnetic waves). The term does not distinguish between data being permanently stored on a storage medium and data being temporarily stored. For example, a 'non-transitory storage medium' may include a buffer in which data is temporarily stored.

[0362] In addition, examples of other media include app stores that distribute applications, sites that supply or distribute various software, and recording or storage media managed by servers.

[0363] According to one embodiment, the method according to various embodiments disclosed in the present document may be provided as included in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store (e.g., Play Store™) or directly between two user devices (e.g., smartphones). In the case of online distribution, at least a portion of the computer program product (e.g., a downloadable app) may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.

[0364] Above, the technical idea of ​​the present disclosure has been described in detail with reference to preferred embodiments, but the technical idea of ​​the present disclosure is not limited to the above embodiments, and various modifications and changes are possible by a person having ordinary knowledge in the art within the scope of the technical idea of ​​the present disclosure.

Claims

1. A step of obtaining a QP (Quantization Parameter) initial value to be applied to a current picture from a picture parameter set, and obtaining picture header QP differential value information indicating whether QP differential value information exists in the picture header of the current picture from the picture parameter set; A step of obtaining a first QP differential value for the current picture from the picture header, when the picture header QP differential value information indicates that QP differential value information exists in the picture header of the current picture; A step of determining a QP for a coding unit included in the current picture using the QP initial value and the first QP differential value; A step of performing inverse quantization on the encoding unit using the above QP to obtain transform coefficients of the encoding unit; and A video decoding method, characterized by comprising a step of restoring the encoding unit using the above transformation coefficients.

2. In the first paragraph, the video decoding method, If the picture header QP differential value information indicates that the QP differential value information does not exist in the picture header, a step of obtaining a second QP differential value for the current slice from the slice header of the current slice included in the current picture; A step of determining a QP for a coding unit included in the current slice using the QP initial value and the second QP differential value; A step of performing inverse quantization on the encoding unit using the above QP to obtain transform coefficients of the encoding unit; and A video decoding method, characterized in that it further comprises a step of restoring the encoding unit using the above transformation coefficients.

3. In the first paragraph, the step of performing inverse quantization on the encoding unit using the QP to obtain transform coefficients of the encoding unit is as follows. A step of obtaining the QP differential value for the luma component of the current picture from the picture header; A step of determining a QP for a luma component of slices included in the current picture by adding the QP initial value and the first QP differential value for the luma component; and A video decoding method, characterized by comprising a step of determining a QP of the coding unit included in the current picture and included in the slices by using a QP for a luma component of the slices.

4. In the third paragraph, the step of determining the QP of the encoding unit comprises: A step of obtaining a QP differential value for the above encoding unit from a bitstream; and A video decoding method, characterized by comprising a step of determining a QP for a luma component of the coding unit by using a QP difference value for the coding unit and a QP for the luma component of the slices.

5. In the second paragraph, the step of performing inverse quantization on the encoding unit using the QP to obtain transform coefficients of the encoding unit is as follows. A step of obtaining the second QP differential value for the luma component of the current slice from the slice header; A step of determining a QP for the luma component of the current slice by adding the QP initial value and the second QP differential value for the luma component; and A video decoding method, characterized by comprising a step of determining a QP of the encoding unit included in the current slice by using a QP for a luma component of the current slice.

6. In the fifth paragraph, the step of determining the QP of the encoding unit comprises: A step of obtaining a QP differential value for the above encoding unit from a bitstream; and A video decoding method, characterized by comprising a step of determining a QP for a luma component of the coding unit by using a QP for a luma component of the current slice and a QP differential value for the coding unit.

7. In the first paragraph, the step of performing inverse quantization on the encoding unit using the QP to obtain transform coefficients of the encoding unit is as follows. A step of obtaining a Cb QP differential value for the Cb chroma component of the current slice and a Cr QP differential value for the Cr chroma component of the current slice from the slice header; A step of determining a Cb QP for the Cb chroma component of the current encoding unit by updating the QP for the Cb chroma component of the current encoding unit included in the current slice using the Cb QP differential value for the Cb chroma component of the current slice; and A video decoding method, characterized in that it comprises a step of determining a Cr QP for a Cr chroma component of the current encoding unit by updating the QP for the Cr chroma component of the current encoding unit using a Cr QP differential value for the Cr chroma component of the current slice.

8. In a video decryption device, An acquisition unit that acquires a QP initial value to be applied to a current picture from a picture parameter set, acquires picture header QP differential value information indicating whether QP differential value information exists in a picture header of the current picture from the picture parameter set, and acquires a first QP differential value for the current picture from the picture header if the picture header QP differential value information indicates that the QP differential value information exists in the picture header; and A video decoding device characterized by comprising a decoding unit which determines a QP for an encoding unit included in the current picture using the QP initial value and the first QP differential value if the picture header QP differential value information indicates that the QP differential value information exists in the picture header, performs inverse quantization on the encoding unit using the QP to obtain transform coefficients of the encoding unit, and restores the encoding unit using the transform coefficients of the encoding unit.

9. A step for determining the initial QP value to be applied to the current picture; When determining the QP differential value for each picture, a step of determining a first QP differential value between the QP used in the current picture and the QP initial value, and generating a picture header for the current picture including the first QP differential value; and A video encoding method, characterized by comprising a step of generating a picture parameter set including picture header QP differential value information indicating whether QP differential value information exists in the picture header of the current picture and the QP initial value.

10. In the 9th paragraph, the video encoding method, A video encoding method, characterized in that when determining the QP differential value for each slice, further comprising the step of determining a second QP differential value between a QP used in a current slice included in the current picture and the QP initial value, and generating a slice header for the current slice including the second QP differential value.

11. In the 9th paragraph, the step of generating a picture header for the current picture including the first QP differential value is, A step of determining QP for luma components of slices included in the current picture; and A video encoding method, characterized by comprising a step of determining the first QP differential value for the luma component of the current picture by using the difference value between the QP for the luma component of the slices included in the current picture and the QP initial value.

12. In the 11th paragraph, the step of determining the first QP difference value is: A step of determining a QP differential value for the encoding unit by using a difference value between a QP for a luma component of the encoding unit and a QP for a luma component of the slices; and A video encoding method, characterized by comprising a step of encoding a QP differential value for the above encoding unit.

13. In the 10th paragraph, the step of generating a slice header for the current slice, which includes the second QP difference value, A step of determining a QP for the luma component of the current slice; A video encoding method, characterized by comprising the step of determining the second QP differential value for the luma component of the current slice by using the difference value between the QP for the luma component of the current slice and the QP initial value.

14. In the 13th paragraph, the step of determining the second QP difference value is: A step of determining a QP differential for the encoding unit by subtracting the QP for the luma component of the current slice from the QP for the luma component of the encoding unit; and A video encoding method, characterized by comprising a step of encoding a QP differential value for the above encoding unit.

15. In the 13th paragraph, the step of determining the second QP difference value is: A step of determining a Cb QP differential value for the Cb chroma component of the current encoding unit, for determining the QP of the Cb chroma component of the current encoding unit included in the current slice; A step of determining a Cr QP differential value for a Cr chroma component of the current encoding unit, for determining a QP of the Cr chroma component of the current encoding unit included in the current slice; and A video encoding method, comprising the steps of encoding a Cb QP differential value for a Cb chroma component of the current slice and a Cr QP differential value for a Cr chroma component of the current slice, and generating a slice header for the current slice including the Cb QP differential value and the Cr QP differential value.