Video decoding method and apparatus for obtaining a quantization parameter, video encoding method and apparatus for transmitting a quantization parameter
The video decoding method addresses image quality degradation in high-resolution images by using QP initial and differential values to determine coding unit QPs, enhancing transmission efficiency and image quality through adaptive coding unit division.
Patent Information
- Application Number
- JP2022542286
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-01-10
- Filing Date
- 2021-01-08
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2041-01-08
AI Technical Summary
Conventional video compression methods using uniform square coding units lead to image quality degradation for high-resolution images, necessitating efficient methods for dividing high-resolution images into various coding units.
A video decoding method that obtains a quantization parameter (QP) initial value and QP differential values from picture and slice headers, using these values to determine the QP for coding units and perform inverse quantization to restore the coding units.
This method enables efficient transmission and acquisition of QP differential values, improving data transmission efficiency and image quality by allowing for adaptive coding unit division based on picture characteristics.
Smart Images

Figure 0007684311000001 
Figure 0007684311000002 
Figure 0007684311000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a video decoding method and apparatus, a video encoding method and apparatus, and a video decoding method and apparatus that effectively perform a quantization parameter (QP) and encode a video. [Background technology]
[0002] In the case of a conventional compression method, after determining whether or not to divide a coding unit included in a picture in a process of determining the size of the coding unit, a square coding unit is determined through a recursive division process in which the coding unit is uniformly divided into four coding units of the same size. However, in recent years, for high-resolution images, degradation of the image quality of a restored image caused by the use of a uniform coding unit of a square shape has become an issue. Therefore, methods and devices for dividing a high-resolution image into various types of coding units have been proposed. Summary of the Invention [Problem to be solved by the invention]
[0003] The problem to be solved by the present invention relates to a video decoding method and apparatus, and a video encoding method and apparatus, and is to solve a method for efficiently transmitting a quantization parameter (QP) difference value in a video encoding device, and a method for efficiently acquiring a QP difference value in a video decoding device. [Means for solving the problem]
[0004] According to an embodiment of the present disclosure, a video decoding method includes the steps of: obtaining a quantization parameter (QP) initial value to be applied to a current picture from a picture parameter set; obtaining picture header QP differential value information from the picture parameter set, the picture header indicating whether QP differential value information exists in a picture header of the current picture; 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. Effect of the Invention
[0005] According to an embodiment of the video encoding method and the video decoding method, a method for transmitting a quantization parameter (QP) differential value can be determined based on picture characteristics or data transmission efficiency, and the QP differential value can be signaled based on the determined method. [Brief description of the drawings]
[0006] In order to more fully understand the drawings referred to herein, a brief description of each drawing is provided: [Figure 1] 1 is a schematic block diagram of a video decoding device according to an embodiment. [Diagram 2] 4 is a flowchart of a video decoding method according to an embodiment. [Diagram 3] 1 is a diagram illustrating a process in which a video decoding apparatus divides a current coding unit and determines at least one coding unit according to an embodiment. [Figure 4] 1 is a diagram illustrating a process in which a video decoder divides a coding unit having a non-square shape and determines at least one coding unit according to an embodiment. [Diagram 5]11 is a diagram illustrating a process in which a video decoding apparatus divides a coding unit based on at least one of block configuration information and partition configuration mode information, according to an embodiment; [Figure 6] 11 is a diagram illustrating a method for a video decoding apparatus to determine a predetermined coding unit from among an odd number of coding units, according to an embodiment; [Figure 7] 11 is a diagram illustrating an order in which a plurality of coding units are processed when a video decoding apparatus divides a current coding unit and determines the plurality of coding units, according to an embodiment; [Figure 8] 11 is a diagram illustrating a process in which a video decoding apparatus determines to divide a current coding unit into an odd number of coding units when coding units cannot be processed in a predetermined order, according to an embodiment; [Figure 9] 1 is a diagram illustrating a process in which a video decoding apparatus divides a first coding unit and determines at least one coding unit according to an embodiment. [Figure 10] A diagram illustrating that a video decoding device according to one embodiment restricts the manner in which a second coding unit may be divided when a non-square second coding unit determined by dividing a first coding unit satisfies a certain condition. [Figure 11] A diagram illustrating a process in which a video decoding device divides a square-shaped coding unit when the division mode information cannot indicate division into four square-shaped coding units, according to one embodiment. [Figure 12] 11 is a diagram illustrating that a processing order among a plurality of coding units may differ depending on a division process of the coding units, according to an embodiment; [Figure 13] A diagram illustrating a process of determining the depth of a coding unit according to one embodiment when a coding unit is recursively divided and multiple coding units are determined, as the shape and size of the coding unit change. [Figure 14] 1 is a diagram illustrating a depth that can be determined according to the shape and size of a coding unit, and an index for coding unit partitions (pPID: part index) according to one embodiment. [Figure 15]2 illustrates a number of coding units determined according to a number of predefined data units included in a picture, according to one embodiment. FIG. [Figure 16] FIG. 1 shows a block diagram of a video encoding and decoding system. [Figure 17] 1 is a block diagram of a video decoding device according to one embodiment. [Figure 18] 4 is a flowchart of a video decoding method according to one embodiment. [Figure 19] FIG. 1 is a block diagram of a video encoding device according to one embodiment. [Figure 20] 2 is a flowchart of a video encoding method according to one embodiment. [Figure 21] FIG. 1 is a schematic diagram for deriving a quantization parameter (QP) at a picture level or slice level according to one embodiment. [Figure 22] FIG. 1 illustrates a picture parameter set including picture header QP differential value information according to one embodiment. [Figure 23] 1 illustrates a picture header including a QP differential value for a current picture according to one embodiment. [Figure 24] A diagram illustrating a slice header including a QP differential value for a current slice according to one embodiment. [Diagram 25] FIG. 1 illustrates a picture parameter set including information indicating whether a picture header includes deblocking filter-related parameters, according to one embodiment. [Figure 26] FIG. 1 illustrates a picture header including deblocking filter related parameters for a current picture according to one embodiment. [Figure 27] A diagram illustrating a slice header including deblocking filter related parameters for a current slice according to one embodiment. [Figure 28] FIG. 1 illustrates a picture parameter set including information indicating whether various tool-related parameters are included in a picture header, according to one embodiment. [Figure 29] 1 illustrates a picture header including weighted prediction-related parameters, sample adaptive offset (SAO)-related parameters, and reference picture list-related parameters of a current picture according to one embodiment. [Diagram 30] FIG. 1 illustrates a picture header including adaptive loop filter (ALF) related parameters of a current picture according to one embodiment. [Diagram 31] 1 is a diagram illustrating a slice header including reference picture list-related parameters, weighted prediction-related parameters, and SAO-related parameters of a current slice according to an embodiment. [Diagram 32] A diagram illustrating a slice header including ALF-related parameters for a current slice according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0007] According to an embodiment of the present disclosure, a video decoding method includes the steps of: obtaining a quantization parameter (QP) initial value to be applied to a current picture from a picture parameter set; obtaining picture header QP differential value information from the picture parameter set, the picture header indicating whether QP differential value information exists in a picture header of the current picture; 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.
[0008] According to one embodiment, the video decoding method further includes, when the picture header QP differential value information indicates that the QP differential value information is not present in the picture header, a step of obtaining a second QP differential value for the current slice from a slice header of a 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 coding unit using the QP to obtain transform coefficients of the coding unit, and a step of restoring the coding unit using the transform coefficients.
[0009] 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 also includes a step of obtaining the QP difference value for the luma component of the current picture from the picture header, determining a QP for the luma component of a slice included in the current picture by adding the QP initial value and the first QP difference value for the luma component, and determining a QP for the coding unit included in the current picture and included in the slice using a QP for the luma component of the slice.
[0010] In one embodiment, the step of determining a QP for the coding unit also includes a step of obtaining a QP differential value for the coding unit from a bitstream, and a step of determining a QP for the luma component of the coding unit using a QP for the luma component of the slice and the QP differential value for the coding unit.
[0011] 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 also includes the steps of obtaining the second QP difference 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 QP initial value and the second QP difference value for the luma component, and determining a QP for the coding unit included in the current slice using the QP for the luma component of the current slice.
[0012] According to one embodiment, the step of determining a QP for the coding unit also includes a step of obtaining a QP differential value for the coding unit from a bitstream, and a step of determining a QP for the luma component of the coding unit using a QP for the luma component of the current slice and the QP differential value for the coding unit.
[0013] According to an embodiment, the step of performing inverse quantization on the coding unit using the QP and obtaining transform coefficients of the coding unit may also include 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.
[0014] According to an embodiment of the present disclosure, a video decoding apparatus includes an acquisition unit that acquires a QP initial value applied to a current picture from a picture parameter set, acquires picture header QP differential value information indicating whether QP differential value information is present in a picture header of the current picture from the picture parameter set, and, if the picture header QP differential value information indicates that the QP differential value information is present in the picture header, acquires a first QP differential value for the current picture from the picture header; and, if the picture header QP differential value information indicates that the QP differential value information is present in the picture header, determines a QP for a coding unit included in the current picture using the QP initial value and the first QP differential value, performs inverse quantization on the coding unit using the QP, acquires transform coefficients of the coding unit, and restores the coding unit using the transform coefficients of the coding unit.
[0015] A video encoding method according to an embodiment provided by the present disclosure also includes a step of determining a QP initial value to be applied to a current picture; when determining the QP differential value for each picture, determining a first QP differential value between a QP used in the current picture and the QP initial value and generating a picture header related to the current picture including the first QP differential value; and generating the picture parameter set including picture header QP differential value information indicating whether or not QP differential value information exists in the picture header of the current picture and the QP initial value.
[0016] According to one embodiment, the video encoding method further includes, when determining the QP difference value per slice, determining a second QP difference value between a QP used in a current slice included in the current picture and the QP initial value, and generating a slice header related to the current slice including the second QP difference value.
[0017] According to one embodiment, the step of generating a picture header for the current picture including the first QP difference value also includes a step of determining a QP for a luma component of a slice included in the current picture, and a step of determining the first QP difference value for the luma component of the current picture using a difference value between the QP for the luma component of a slice included in the current picture and the QP initial value.
[0018] According to one embodiment, the step of determining the first QP differential value also includes a step of determining a QP differential value for the coding unit using a difference value between a QP for a luma component of the coding unit and a QP for a luma component of the slice, and a step of encoding the QP differential value for the coding unit.
[0019] According to one embodiment, the step of generating a slice header for the current slice including the second QP differential value also includes a step of determining a QP for the luma component of the current slice, and a step of determining the second QP differential value for the luma component of the current slice using a difference between the QP for the luma component of the current slice and the QP initial value.
[0020] According to one embodiment, the step of determining the second QP differential value also includes a step of determining a QP differential value for the coding unit by subtracting a QP for the luma component of the current slice from a QP for the luma component of the coding unit, and a step of encoding the QP differential value for the coding unit.
[0021] According to an embodiment, determining the second QP differential value may also include determining a Cb QP differential value for a Cb chroma component of a current coding unit to determine a QP for a Cb chroma component of the current coding unit included in the current slice; determining a Cr QP differential value for a Cr chroma component of the current coding unit to determine a QP for a Cr chroma component of the current coding unit included in the current slice; and encoding 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, and generating a slice header for the current slice including the Cb QP differential value and the Cr QP differential value.
[0022] A computer-readable recording medium having a program recorded thereon for causing a computer to execute a video decoding method according to an embodiment of the present disclosure is provided.
[0023] A computer-readable recording medium having a program recorded thereon for causing a computer to execute a video encoding method according to an embodiment of the present disclosure is provided.
[0024] The present disclosure can be modified in various ways and can have various embodiments, but specific embodiments are illustrated in the drawings and will be described in detail through detailed descriptions. However, they are not intended to limit the embodiments of the present disclosure, and the present disclosure should be understood to include all modifications, equivalents, or alternatives that fall within the spirit and technical scope of the various embodiments.
[0025] In the description of the present embodiment, if a detailed description of related prior art is deemed to unnecessarily obscure the gist of the present disclosure, the detailed description will be omitted. In addition, numbers (e.g., first, second, etc.) used in the description of the specification are merely identification symbols for distinguishing one component from other components.
[0026] Furthermore, 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 to the other component, or may be connected via another component in between, unless otherwise specified to the contrary.
[0027] In addition, in this specification, components expressed as "units", "modules", etc. may be two or more components combined into one component, or one component may be divided into two or more components based on further subdivided functions. In addition, each component described below may additionally perform some or all of the functions of other components in addition to its own main function, and it goes without saying that some of the main functions of each component are exclusively performed by other components.
[0028] Also, in this specification, an "image" or "picture" may refer to a still or moving image of a video, i.e., the video itself.
[0029] In addition, in this specification, a "sample" refers to data assigned to a sampling position of an image and to data to be processed. For example, in a spatial domain image, a pixel value and a transform coefficient in a transform domain are also samples. A unit including at least one such sample can be defined as a block.
[0030] In addition, in this specification, a 'current block' may refer to a block of a maximum coding unit, a coding unit, a prediction unit, or a transform unit of a current image to be encoded or decoded.
[0031] In addition, in this specification, a motion vector in the list 0 direction may mean that the motion vector is used to indicate a block in a reference picture included in list 0, and a motion vector in the list 1 direction may mean that the motion vector is used to indicate a block in a reference picture included in list 1. In addition, a motion vector being unidirectional may mean that the motion vector is used to indicate a block in a reference picture included in list 0 or list 1, and a motion vector being bidirectional may mean that the motion vector includes a motion vector in the list 0 direction and a motion vector in the list 1 direction.
[0032] In addition, in this specification, a "binary split" of a block refers to a split that generates two sub-blocks each having half the width or height of the block. Specifically, a "binary vertical split" is performed on the current block, and the split is performed in the vertical direction at half the width of the current block, so that two sub-blocks having a width half the width of the current block and a height equal to the height of the current block are generated. A "binary horizontal split" is performed on the current block, and the split is performed in the horizontal direction at half the height of the current block, so that two sub-blocks having a height half the height of the current block and a width equal to the width of the current block are generated.
[0033] In addition, in this specification, a "ternary split" of a block refers to a division in which the width or height of the block is divided in a ratio of 1:2:1 to generate three sub-blocks. Specifically, a "ternary vertical split" is performed on the current block, and the division is performed in the vertical direction (vertical direction) at a point where the current block width is 1:2:1, so that two sub-blocks having a width that is 1 / 4 of the current block width and the same height as the current block, and one sub-block having a width that is 2 / 4 of the current block width and the same height as the current block height can be generated. A "ternary horizontal split" is performed on the current block, and the division is performed in the horizontal direction (horizontal direction) at a point where the current block height is 1:2:1, so that two sub-blocks having a height that is 1 / 4 of the current block height and the same width as the current block, and one sub-block having a height that is 2 / 4 of the current block height and the same width as the current block can be generated.
[0034] In addition, in this specification, a "quad split" of a block refers to a division in which the width and height of the block are divided in a 1:1 ratio to generate four sub-blocks. Specifically, when a "quad split" is performed on a current block, the current block is divided vertically at half the width of the current block and horizontally at half the height of the current block, so that four sub-blocks each having a width that is 1 / 2 the width of the current block and a height that is 1 / 2 the height of the current block can be generated.
[0035] Hereinafter, a video encoding device, a video decoding device, a video encoding method, and a video decoding method according to an embodiment will be described with reference to Figures 1 to 16. A method for determining a data unit of a video according to an embodiment will be described with reference to Figures 3 to 16, and a video encoding / decoding method using the determined data unit according to an embodiment will be described later with reference to Figures 17 to 40.
[0036] Hereinafter, with reference to FIG. 1 and FIG. 2, a method and apparatus for adaptively selecting based on coding units of various forms according to an embodiment of the present disclosure will be described.
[0037] FIG. 1 illustrates a schematic block diagram of a video decoding device according to one embodiment.
[0038] The video decoding device 100 also includes a receiving unit 110 and a decoding unit 120. The receiving unit 110 and the decoding unit 120 also include at least one processor. The receiving unit 110 and the decoding unit 120 also include a memory that stores instructions executed by the at least one processor.
[0039] The receiving unit 110 may receive a bitstream. The bitstream includes information obtained by encoding an image by a video encoding device 2200 described below. The bitstream may also be transmitted from the video encoding device 2200. The video encoding device 2200 and the video decoding device 100 may be connected to each other by wire or wirelessly, and the receiving unit 110 may receive the bitstream via wire or wirelessly. The receiving unit 110 may receive the bitstream from a recording medium such as an optical medium or a hard disk. The decoding unit 120 may restore an image based on information acquired from the received bitstream. The decoding unit 120 may acquire syntax elements for restoring an image from the bitstream. The decoding unit 120 may restore an image based on the syntax elements.
[0040] The operation of the video decoding device 100 will be described in further detail below in conjunction with FIG.
[0041] FIG. 2 illustrates a flow chart of a video decoding method according to one embodiment.
[0042] According to one embodiment of the present disclosure, the receiver 110 receives a bitstream.
[0043] The video decoding apparatus 100 performs a step of acquiring (210) a bin string corresponding to a partition mode of a coding unit from a bitstream. The video decoding apparatus 100 performs a step of determining (220) a partition rule for the coding unit. The video decoding apparatus 100 also performs a step of partitioning (230) the coding unit into a plurality of coding units based on at least one of the partition rules and the bin string corresponding to the partition mode. To determine the partition rule, the video decoding apparatus 100 may determine a first allowable range of the size of the coding unit according to a ratio of a width and a height of the coding unit. To determine the partition rule, the video decoding apparatus 100 may determine a second allowable range of the size of the coding unit according to a partition mode of the coding unit.
[0044] In the following, the division of coding units according to one embodiment of the present disclosure will be described in detail.
[0045] First, a picture is divided into one or more slices or one or more tiles. A slice or a tile is also a sequence of one or more coding tree units (CTUs). A coding tree block (CTB) is a concept that contrasts with a coding tree unit (CTU).
[0046] A maximal coding block (CTB) means an NxN block containing NxN samples, where N is an integer. Each color component is also divided into one or more maximal coding blocks.
[0047] If a picture has three sample arrays (sample arrays for Y, Cr, and Cb components), the largest coding unit (CTU) is a unit that includes the largest coded block of luma samples, the two largest coded blocks of corresponding chroma samples, and the syntax structure used to code the luma samples and chroma samples. If the picture is a monochrome picture, the largest coding unit is a unit that includes the largest coded block of monochrome samples and the syntax structure used to code the monochrome samples. If the picture is a picture coded into color planes separated by color components, the largest coding unit is a unit that includes the picture and the syntax structure used to code the samples of the picture.
[0048] One maximal coding block (CTB) is also divided into MxN coding blocks containing MxN samples (M, N are integers).
[0049] When a picture has sample arrays for Y, Cr, and Cb components, a coding unit (CU) is a unit including a coding block of luma samples, two coding blocks of corresponding chroma samples, and a syntax structure used to code the luma samples and chroma samples. When the picture is a monochrome picture, a coding unit is a unit including a coding block of monochrome samples and a syntax structure used to code the monochrome samples. When the picture is a picture coded into color planes separated by color components, a coding unit is a unit including the picture and a syntax structure used to code the samples of the picture.
[0050] As described above, the largest coding block and the largest coding unit are distinct concepts, and the coding block and the coding unit are distinct concepts. That is, the (largest) coding unit means a data structure including a (largest) coding block including a sample and a syntax structure corresponding thereto. However, since a person skilled in the art can understand that the (largest) coding unit or the (largest) coding block refers to a block of a predetermined size including a predetermined number of samples, in the following description, the largest coding block and the largest coding unit, or the coding block and the coding unit, will be referred to without distinction unless there is a special reason.
[0051] The image is also divided into maximum coding units (CTUs), the size of which is also determined based on information obtained from the bitstream, and the shape of the maximum coding units may have a square shape of the same size, but is not limited thereto.
[0052] For example, information regarding a maximum size of a luma coding block may be obtained from a bitstream, where the maximum size of the luma coding block indicated by the information regarding the maximum size of the luma coding block may be one of 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, and 256x256.
[0053] For example, information on the maximum size of a luma coding block that can be divided into two and the luma block size difference may be obtained from a bitstream. The information on the luma block size difference may indicate a size difference between the luma maximum coding unit and the largest luma coding block that can be divided into two. Thus, the size of the luma maximum coding unit may be determined by combining the information on the maximum size of a luma coding block that can be divided into two obtained from the bitstream and the information on the luma block size difference. The size of the chroma maximum coding unit may also be determined by using the size of the luma maximum coding unit. For example, if the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chroma block is half the size of the luma block, and similarly, the size of the chroma maximum coding unit is half the size of the luma maximum coding unit.
[0054] According to an embodiment, since information on the maximum size of a luma coding block capable of binary partitioning is acquired from a bitstream, the maximum size of a luma coding block capable of binary partitioning may be variably determined. In contrast, the maximum size of a luma coding block capable of ternary partitioning may be fixed. For example, in an I picture, the maximum size of a luma coding block capable of ternary partitioning is 32x32, and in a P picture or B picture, the maximum size of a luma coding block capable of ternary partitioning is also 64x64.
[0055] The maximum coding unit is also hierarchically divided into coding units based on partition mode information acquired from the bitstream. As the partition mode information, at least one of information indicating whether or not the image is divided into quads, information indicating whether or not the image is divided into multiple parts, partition direction information, and partition type information is also acquired from the bitstream.
[0056] For example, the information indicating whether or not a current coding unit is quad-split may indicate whether or not the current coding unit is quad-split (QUAD_SPLIT) or not.
[0057] If the current coding unit is not split into quads, the information indicating whether or not the current coding unit is to be split further may indicate whether the current coding unit is not to be split further (NO_SPLIT) or whether or not the current coding unit is to be split into binary / ternary.
[0058] If the current coding unit is binary-divided or ternary-divided, the division direction information indicates that the current coding unit is divided in one of the horizontal and vertical directions.
[0059] If the current coding unit is split horizontally or vertically, the split type information indicates that the current coding unit is split by binary split or ternary split.
[0060] The partition mode of the current coding unit may be determined according to the partition direction information and the partition type information. If the current coding unit is binary partitioned horizontally, the partition mode may be determined as binary horizontal partition (SPLIT_BT_HOR), if the current coding unit is ternary partitioned horizontally, the partition mode may be determined as ternary horizontal partition (SPLIT_TT_HOR), if the current coding unit is binary partitioned vertically, the partition mode may be determined as binary vertical partition (SPLIT_BT_VER), and if the current coding unit is ternary partitioned vertically, the partition mode may be determined as ternary vertical partition (SPLIT_BT_VER).
[0061] The video decoding device 100 can obtain partition mode information from one bin string from a bitstream. The format of the bitstream received by the video decoding device 100 can include fixed length binary code, unary code, truncated unary code, predetermined binary code, etc. The bin string indicates information as a sequence of binary numbers. The bin string is also composed of at least one bit. The video decoding device 100 can obtain partition mode information corresponding to the bin string based on a partition rule. The video decoding device 100 can determine whether to partition a coding unit into quads, whether not to partition, or the partition direction and partition type based on one bin string.
[0062] A coding unit may be smaller than or equal to a maximum coding unit. For example, the maximum coding unit is also a coding unit having a maximum size, and is therefore also one of the coding units. If the division mode information related to the maximum coding unit indicates that the coding unit is not divided, the coding unit determined by the maximum coding unit has the same size as the maximum coding unit. If the division mode information related to the maximum coding unit indicates that the coding unit is divided, the maximum coding unit is also divided into coding units of a smaller size. However, the division of an image is not limited thereto, and the maximum coding unit and the coding unit are not distinguished from each other. The division of coding units will be described in more detail with reference to FIG. 3 to FIG. 16.
[0063] Also, one or more prediction blocks for prediction may be determined from the coding unit, where the prediction blocks are the same as or smaller than the coding unit, and one or more transform blocks for transformation may be determined from the coding unit, where the transform blocks are the same as or smaller than the coding unit.
[0064] The shapes and sizes of the transformation block and the prediction block are also independent of each other.
[0065] In another embodiment, a prediction may be performed using a coding unit as a prediction block, and a transformation may be performed using the coding unit as a transform block.
[0066] The division of the coding unit will be described in more detail in FIG. 3 to FIG. 16. The current block and the neighboring blocks in the present disclosure may indicate one of the largest coding unit, the coding unit, the prediction block, and the transformation block. The current block or the current coding unit is a block that is currently being decoded or coded, or a block that is currently being divided. The neighboring blocks are also blocks that are reconstructed before the current block. The neighboring blocks may be spatially or temporally adjacent to the current block. The neighboring blocks may be located at one of the lower left side, the left side, the upper left side, the upper side, the upper right side, the right side, and the lower right side of the current block.
[0067] FIG. 3 illustrates a process in which a video decoding apparatus divides a current coding unit and determines at least one coding unit according to an embodiment.
[0068] The block shape may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N, where N is a positive integer. The block shape information is information indicating at least one of the shape, direction, width and height ratio, or size of a coding unit.
[0069] The shape of the coding unit may be square or non-square. If the width and height of the coding unit are the same (i.e., the block shape of the coding unit is 4Nx4N), the video decoding device 100 may determine that the block shape information of the coding unit is square. The video decoding device 100 may also determine that the shape of the coding unit is non-square.
[0070] When the width and height of the coding unit are different (i.e., when the block shape of the coding unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the video decoding apparatus 100 may determine the block shape information of the coding unit to be non-square. When the shape of the coding unit is non-square, the video decoding apparatus 100 may determine the ratio of the width and height in the block shape information of the coding unit to at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, and 32:1. Based on the width and height of the coding unit, the video decoding apparatus 100 may determine whether the coding unit is horizontal or vertical. Based on at least one of the width, height, and width of the coding unit, the video decoding apparatus 100 may determine the size of the coding unit.
[0071] According to an embodiment, the video decoding device 100 may determine the type of the coding unit using block type information, and may determine the type in which the coding unit is to be partitioned using partition type mode information. That is, depending on the block type indicated by the block type information used by the video decoding device 100, a partitioning method of the coding unit indicated by the partition type mode information may be determined.
[0072] The video decoding device 100 can acquire the partition mode information from the bitstream. However, the present invention is not limited thereto, and the video decoding device 100 and the video encoding device 2200 can determine the partition mode information agreed upon in advance based on the block format information. The video decoding device 100 can determine the partition mode information agreed upon in advance for the maximum coding unit or the minimum coding unit. For example, the video decoding device 100 can determine the partition mode information for the maximum coding unit as quad partition. Also, the video decoding device 100 can determine the partition mode information for the minimum coding unit as "no partition". Specifically, the video decoding device 100 can determine the size of the maximum coding unit as 256x256. The video decoding device 100 can determine the partition mode information agreed upon in advance as quad partition. The quad partition is a partition mode in which both the width and the height of the coding unit are divided into two equal parts. Based on the partition mode information, the video decoding device 100 can obtain a coding unit of 128x128 size from the maximum coding unit of 256x256 size. Also, the video decoding device 100 can determine the size of the minimum coding unit to be 4x4. The video decoding device 100 can obtain partition mode information indicating "no partition" for the minimum coding unit.
[0073] According to an embodiment, the video decoding apparatus 100 may use block shape information indicating that the current coding unit is square. For example, the video decoding apparatus 100 may determine whether to not split the square coding unit, to split it vertically, to split it horizontally, or to split it into four coding units according to the partition shape mode information. Referring to FIG. 3, when the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 may not split the coding unit 310a having the same size as the current coding unit 300 according to the partition shape mode information indicating no partition, or may determine the divided coding units 310b, 310c, 310d, 310e, and 310f according to the partition shape mode information indicating a predetermined partition method.
[0074] Referring to FIG. 3, the video decoding device 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the partition mode information indicating division in the vertical direction, according to an embodiment. The video decoding device 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the partition mode information indicating division in the horizontal direction. The video decoding device 100 may determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical and horizontal directions based on the partition mode information indicating division in the vertical and horizontal directions. The video decoding device 100 may determine three coding units 310e obtained by dividing the current coding unit 300 in the vertical direction based on the partition mode information indicating ternary division in the vertical direction, according to an embodiment. The video decoding device 100 may determine three coding units 310f obtained by dividing the current coding unit 300 in the horizontal direction based on the partition mode information indicating ternary division in the horizontal direction. However, the division pattern into which the square coding unit may be divided is not limited to the above-mentioned pattern, and may include various patterns that may be indicated by the division pattern mode information. The predetermined division patterns into which the square coding unit may be divided will be described in detail below through various embodiments.
[0075] FIG. 4 illustrates a process in which a video decoding apparatus divides a non-square coding unit to determine at least one coding unit, according to an embodiment.
[0076] According to an embodiment, the video decoding apparatus 100 may use block shape information indicating that the current coding unit is non-square. The video decoding apparatus 100 may determine whether to not split the non-square current coding unit or to split the non-square current coding unit in a predetermined manner according to the partition mode information. Referring to FIG. 4, when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the video decoding apparatus 100 may determine a coding unit 410 or 460 having the same size as the current coding unit 400 or 450 according to the partition mode information indicating no partition, or may determine partitioned coding units 420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, and 480c according to the partition mode information indicating a predetermined partition method. The predetermined partition method for partitioning a non-square coding unit will be described in detail below through various embodiments.
[0077] According to an embodiment, the video decoding apparatus 100 may determine a form in which a coding unit is divided using the partition mode information, and in this case, the partition mode information may indicate the number of at least one coding unit generated by dividing the coding unit. Referring to FIG 4, when the partition mode information indicates that the current coding unit 400 or 450 is divided into two coding units, the video decoding apparatus 100 may divide the current coding unit 400 or 450 based on the partition mode information and determine two coding units 420a, 420b or 470a, 470b included in the current coding unit.
[0078] When the video decoding device 100 according to an embodiment divides the non-square shaped current coding unit 400 or 450 based on the division shape mode information, the video decoding device 100 may divide the current coding unit in consideration of the position of a long side of the non-square shaped current coding unit 400 or 450. For example, the video decoding device 100 may divide the current coding unit 400 or 450 in a direction dividing the long side of the current coding unit 400 or 450 in consideration of the shape of the current coding unit 400 or 450 to determine a plurality of coding units.
[0079] According to an embodiment, when the partition mode information indicates that a coding unit is to be partitioned into an odd number of blocks (ternary partitioning), the video decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450. For example, when the partition mode information indicates that the current coding unit 400 or 450 is to be partitioned into three coding units, the video decoding device 100 may partition the current coding unit 400 or 450 into three coding units 430a, 430b, 430c, 480a, 480b, and 480c.
[0080] According to an embodiment, the width-to-height ratio of the current coding unit 400 or 450 is 4:1 or 1:4. When the width-to-height ratio is 4:1, the width is greater than the height, so the block shape information is also horizontal. When the width-to-height ratio is 1:4, the width is smaller than the height, so the block shape information is also vertical. The video decoding apparatus 100 may determine to divide the current coding unit into an odd number of blocks based on the partition shape mode information. In addition, the video decoding apparatus 100 may determine a partition direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current coding unit 400 is vertical, the video decoding apparatus 100 may divide the current coding unit 400 in the horizontal direction to determine coding units 430a, 430b, and 430c. Also, if the current coding unit 450 is horizontal, the video decoding apparatus 100 may divide the current coding unit 450 vertically to determine coding units 480a, 480b, and 480c.
[0081] According to an embodiment, the video decoding apparatus 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and the determined coding units may not have the same size. For example, the size of a certain coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c may be different from the other coding units 430a, 430c, 480a, and 480c. That is, the coding units that may be determined by dividing the current coding unit 400 or 450 may have a plurality of sizes, and in some cases, the odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c may have different sizes.
[0082] According to an embodiment, when the partition mode information indicates that a coding unit is partitioned into an odd number of blocks, the video decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and may further set a predetermined restriction on at least one of the odd number of coding units generated by partitioning. Referring to FIG 4, the video decoding device 100 may perform a decoding process for the central coding unit 430b, 480b among three coding units 430a, 430b, 430c, 480a, 480b, 480c generated by partitioning the current coding unit 400 or 450 differently from the other coding units 430a, 430c, 480a, 480c. For example, the video decoding device 100 may limit the centrally located coding units 430b and 480b from being further divided, unlike the other coding units 430a, 430c, 480a, and 480c, or may limit the number of divisions to a predetermined number.
[0083] FIG. 5 illustrates a process in which a video decoding apparatus divides a coding unit based on at least one of block configuration information and partition configuration mode information, according to an embodiment.
[0084] According to an embodiment, the video decoding apparatus 100 may determine whether or not to divide the square-shaped first coding unit 500 into coding units based on at least one of the block shape information and the partition mode information. According to an embodiment, if the partition mode information indicates that the first coding unit 500 is to be partitioned in the horizontal direction, the video decoding apparatus 100 may partition the first coding unit 500 in the horizontal direction to determine the second coding unit 510. The first coding unit, the second coding unit, and the third coding unit used according to an embodiment are terms used to understand the partitioning context between the coding units. For example, if the first coding unit is partitioned, the second coding unit may be determined, and if the second coding unit is partitioned, the third coding unit may be determined. In the following, the relationship between the first coding unit, the second coding unit, and the third coding unit used may be understood to be according to the above-mentioned characteristics.
[0085] According to an embodiment, the video decoding apparatus 100 may determine whether or not to divide the determined second coding unit 510 into coding units based on the partition mode information. Referring to FIG. 5, the video decoding apparatus 100 may divide the non-square second coding unit 510 determined by dividing the first coding unit 500 into at least one third coding unit 520a, 520b, 520c, 520d based on the partition mode information, or may not divide the second coding unit 510. The video decoding apparatus 100 may acquire the partition mode information, and may divide the first coding unit 500 into a plurality of second coding units (e.g., 510) of various types based on the acquired partition mode information, and the second coding unit 510 may be divided according to the manner in which the first coding unit 500 is divided based on the partition mode information. According to one embodiment, if the first coding unit 500 is split into the second coding unit 510 based on the split mode information for the first coding unit 500, the second coding unit 510 is also split into the third coding units (e.g., 520a, 520b, 520c, 520d) based on the split mode information for the second coding unit 510. That is, the coding units are also split recursively based on the split mode information associated with each coding unit. Thus, in a non-square coding unit, a square coding unit may be determined, and the square coding unit may be recursively split to determine a non-square coding unit.
[0086] 5, among the odd number of third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510, a certain coding unit (e.g., a coding unit located in the middle or a square coding unit) is also divided recursively. According to an embodiment, one square-shaped third coding unit 520b among the odd number of third coding units 520b, 520c, and 520d is divided horizontally into a plurality of fourth coding units. One non-square-shaped fourth coding unit 530b or 530d among the plurality of fourth coding units 530a, 530b, 530c, and 530d is further divided into a plurality of coding units. For example, the non-square-shaped fourth coding unit 530b or 530d may be further divided into an odd number of coding units. Methods that can be used for the recursive division of coding units will be described below through various embodiments.
[0087] The video decoding device 100 according to an embodiment may divide each of the third coding units 520a, 520b, 520c, and 520d into coding units based on the partition mode information. The video decoding device 100 may also determine not to partition the second coding unit 510 based on the partition mode information. The video decoding device 100 may divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d according to an embodiment. The video decoding device 100 may impose a predetermined restriction on a certain third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the video decoding device 100 may restrict the coding unit 520c located in the middle of the odd number of third coding units 520b, 520c, and 520d so that it is not further divided or that it must be divided a settable number of times.
[0088] 5, the video decoding apparatus 100 may restrict the center coding unit 520c of the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to not be further divided, or to be divided into a predetermined division form (e.g., into only four coding units, or into a form corresponding to the division form of the second coding unit 510), or to be divided only a predetermined number of times (e.g., divided n times (n>0)). However, the above restriction on the center coding unit 520c is merely a simple embodiment, and should not be construed as being limited to the above embodiment, but should be construed as including various restrictions that the center coding unit 520c may be decoded differently from the other coding units 520b and 520d.
[0089] The video decoding apparatus 100 according to an embodiment may obtain partition mode information used to partition the current coding unit at a predetermined position within the current coding unit.
[0090] FIG. 6 illustrates a method for a video decoding apparatus 100 to determine a predetermined coding unit from among an odd number of coding units according to an embodiment.
[0091] 6, the partition mode information of the current coding unit 600, 650 is also obtained from a sample at a predetermined position (e.g., samples 640, 690 located in the middle) among a plurality of samples included in the current coding unit 600, 650. However, the predetermined position in the current coding unit 600 where at least one of the partition mode information can be obtained is not limited to the center position shown in FIG. 6, but may include various positions (e.g., top end, bottom end, left end, right end, top left end, bottom left end, top right end, bottom right end, etc.) that may be included in the current coding unit 600. The video decoding apparatus 100 may obtain the partition mode information obtained from the predetermined position and determine whether to partition the current coding unit into coding units of various types and sizes or not to divide the current coding unit.
[0092] According to an embodiment, when a current coding unit is divided into a predetermined number of coding units, the video decoding apparatus 100 may select one of the coding units. There are various methods for selecting one of the plurality of coding units, and such methods will be described below through various embodiments.
[0093] According to an embodiment, the video decoding apparatus 100 may divide a current coding unit into a plurality of coding units and determine a coding unit at a predetermined position.
[0094] According to an embodiment, the video decoding apparatus 100 may use information indicating the positions of the odd-numbered coding units to determine a coding unit located in the middle among the odd-numbered coding units. Referring to FIG 6, the video decoding apparatus 100 may divide a current coding unit 600 or a current coding unit 650 to determine odd-numbered coding units 620a, 620b, and 620c or odd-numbered coding units 660a, 660b, and 660c. The video decoding apparatus 100 may determine the middle coding unit 620b or the middle coding unit 660b using information regarding the positions of the odd-numbered coding units 620a, 620b, and 620c or the odd-numbered coding units 660a, 660b, and 660c. For example, the video decoding device 100 may determine the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of certain samples included in the coding units 620a, 620b, and 620c, thereby determining the center coding unit 620b. Specifically, the video decoding device 100 may determine the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c, thereby determining the center coding unit 620b.
[0095] According to an embodiment, the information indicating the positions of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, also includes information related to the positions or coordinates of the coding units 620a, 620b, and 620c in the picture. According to an embodiment, the information indicating the positions of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, also includes information indicating the width or height of the coding units 620a, 620b, and 620c included in the current coding unit 600, and such width or height also corresponds to information indicating the difference between the coordinates of the coding units 620a, 620b, and 620c in the picture. That is, the video decoding device 100 can determine the coding unit 620b located in the middle by directly using information related to the positions or coordinates of the coding units 620a, 620b, and 620c within the picture, or by using information related to the width or height of the coding unit corresponding to the difference between the coordinates.
[0096] According to an embodiment, information indicating a position of the top left sample 630a of the top coding unit 620a may indicate (xa, ya) coordinates, information indicating a position of the top left sample 530b of the middle coding unit 620b may indicate (xb, yb) coordinates, and information indicating a position of the top left sample 630c of the bottom coding unit 620c may indicate (xc, yc) coordinates. The video decoding apparatus 100 may determine the middle coding unit 620b using the coordinates of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the top left samples 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the middle sample 630b may be determined as the middle coding unit among the coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. However, the coordinates indicating the positions of the top left samples 630a, 630b, and 630c may indicate absolute positions within a picture, and further, the (dxb, dyb) coordinates indicating the relative position of the top left sample 630b of the middle coding unit 620b and the (dxc, dyc) coordinates indicating the relative position of the top left sample 630c of the bottom coding unit 620c may be used. In addition, the method of determining a coding unit at a predetermined position by using the coordinates of a sample as information indicating the position of the sample included in the coding unit should not be interpreted as being limited to the above-mentioned method, but should be interpreted by various arithmetic methods that can use the coordinates of the sample.
[0097] According to an embodiment, the video decoding device 100 may divide a current coding unit 600 into a plurality of coding units 620a, 620b, and 620c, and may select a coding unit from among the coding units 620a, 620b, and 620c according to a predetermined criterion. For example, the video decoding device 100 may select a coding unit 620b having a different size from among the coding units 620a, 620b, and 620c.
[0098] According to an embodiment, the video decoding device 100 may determine the width or height of each of the coding units 620a, 620b, and 620c using (xa, ya) coordinates indicating the position of the top left sample 630a of the top coding unit 620a, (xb, yb) coordinates indicating the position of the top left sample 630b of the middle coding unit 620b, and (xc, yc) coordinates indicating the position of the top left sample 630c of the bottom coding unit 620c. The video decoding device 100 may determine the size of each of the coding units 620a, 620b, and 620c using (xa, ya), (xb, yb), and (xc, yc) coordinates indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the video decoding device 100 may determine the width of the top coding unit 620a as the width of the current coding unit 600. The video decoding apparatus 100 may determine the height of the top coding unit 620a as yb-ya. The video decoding apparatus 100 according to an embodiment may determine the width of the middle coding unit 620b as the width of the current coding unit 600. The video decoding apparatus 100 may determine the height of the middle coding unit 620b as yc-yb. The video decoding apparatus 100 according to an embodiment may determine the width or height of the bottom coding unit using the width or height of the current coding unit and the width and height of the top coding unit 620a and the middle coding unit 620b. The video decoding apparatus 100 may determine a coding unit having a different size from other coding units based on the determined width and height of the coding units 620a, 620b, and 620c. Referring to FIG. 6, the video decoding apparatus 100 may determine the middle coding unit 620b having a different size from the top coding unit 620a and the bottom coding unit 620c as a coding unit at a predetermined position. However, the above-mentioned process in which the video decoding device 100 determines a coding unit having a size different from other coding units is merely one embodiment of determining a coding unit at a predetermined position using the size of the coding unit determined based on sample coordinates, and various other processes may be used to determine a coding unit at a predetermined position by comparing the size of the coding unit determined based on predetermined sample coordinates.
[0099] The video decoding device 100 may determine the width or height of each of the coding units 660a, 660b, and 660c using the (xd, yd) coordinates indicating the position of the top left sample 670a of the left coding unit 660a, the (xe, ye) coordinates indicating the position of the top left sample 670b of the middle coding unit 660b, and the (xf, yf) coordinates indicating the position of the top left sample 670c of the right coding unit 660c. The video decoding device 100 may determine the size of each of the coding units 660a, 660b, and 660c using the coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the coding units 660a, 660b, and 660c.
[0100] According to an embodiment, the video decoding device 100 may determine the width of the left coding unit 660a as xe-xd. The video decoding device 100 may determine the height of the left coding unit 660a as the height of the current coding unit 650. The video decoding device 100 according to an embodiment may determine the width of the middle coding unit 660b as xf-xe. The video decoding device 100 may determine the height of the middle coding unit 660b as the height of the current coding unit 600. The video decoding device 100 according to an embodiment may determine the width or height of the right coding unit 660c using the width or height of the current coding unit 650 and the widths and heights of the left coding unit 660a and the middle coding unit 660b. The video decoding device 100 may determine a coding unit having a size different from other coding units based on the determined widths and heights of the coding units 660a, 660b, and 660c. 6, the video decoding apparatus 100 may determine a middle coding unit 660b having a size different from the sizes of the left coding unit 660a and the right coding unit 660c as a coding unit at a predetermined position. However, the above-described process of the video decoding apparatus 100 determining a coding unit having a size different from other coding units is merely one embodiment of determining a coding unit at a predetermined position using the size of the coding unit determined based on sample coordinates, and various processes of determining a coding unit at a predetermined position by comparing the size of the coding unit determined based on predetermined sample coordinates may be used.
[0101] However, the position of the sample considered to determine the position of the coding unit is not to be interpreted as being limited to the upper left end as mentioned above, but rather, it is also to be interpreted that information related to the position of any sample included in the coding unit may be used.
[0102] According to an embodiment, the video decoding apparatus 100 may select a coding unit at a predetermined position from among an odd number of coding units determined by dividing the current coding unit, taking into consideration the shape of the current coding unit. For example, if the current coding unit is a non-square shape in which the width is greater than the height, the video decoding apparatus 100 may determine a coding unit at a predetermined position along the horizontal direction. That is, the video decoding apparatus 100 may determine one of the coding units set at different positions in the horizontal direction and set a restriction on the coding unit. If the current coding unit is a non-square shape in which the height is greater than the width, the video decoding apparatus 100 may determine a coding unit at a predetermined position along the vertical direction. That is, the video decoding apparatus 100 may determine one of the coding units set at different positions in the vertical direction and set a restriction on the coding unit.
[0103] The video decoding apparatus 100 according to an embodiment may use information indicating the positions of each of the even number of coding units to determine a coding unit at a predetermined position among the even number of coding units. The video decoding apparatus 100 may determine the even number of coding units by dividing (binary dividing) the current coding unit, and may determine the coding unit at a predetermined position by using information regarding the positions of the even number of coding units. A detailed process related thereto corresponds to the process of determining a coding unit at a predetermined position (e.g., the middle position) among the odd number of coding units described in FIG. 6, and therefore will not be described here.
[0104] According to an embodiment, when a non-square current coding unit is divided into a plurality of coding units, in order to determine a coding unit at a predetermined position among the plurality of coding units, the video decoding apparatus 100 may use predetermined information related to the coding unit at a predetermined position during the division process. For example, in order to determine a coding unit at a center among the plurality of coding units into which the current coding unit is divided, the video decoding apparatus 100 may use at least one of block shape information and partition shape mode information stored in a sample included in the center coding unit during the division process.
[0105] 6, the video decoding apparatus 100 may divide a current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, and may determine a coding unit 620b located in the middle of the plurality of coding units 620a, 620b, and 620c. Furthermore, the video decoding apparatus 100 may determine the coding unit 620b located in the middle by considering a position where the partition mode information is acquired. That is, the partition mode information of the current coding unit 600 is acquired from a sample 640 located in the middle of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, the coding unit 620b including the sample 640 may be determined as the coding unit located in the middle. However, information used to determine the coding unit located in the middle is not limited to the partition mode information, and various types of information may be used in the process of determining the coding unit located in the middle.
[0106] According to an embodiment, the predetermined information for identifying the coding unit at the predetermined position is also obtained from a predetermined sample included in the coding unit to be determined. Referring to FIG. 6, the video decoding device 100 may use partition mode information obtained from a sample at a predetermined position in the current coding unit 600 (e.g., a sample at the middle of the current coding unit 600) to determine a coding unit at a predetermined position (e.g., a coding unit at the middle of the coding units) among a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. That is, the video decoding device 100 may determine the sample at the predetermined position by considering the block format of the current coding unit 600, and may determine a coding unit 620b including a sample from which predetermined information (e.g., partition mode information) can be obtained among a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and may set a predetermined restriction. 6, the video decoding device 100 according to an embodiment may determine a sample 640 located in the middle of a current coding unit 600 as a sample from which certain information may be acquired, and may set a certain restriction in a decoding process for a coding unit 620b including such a sample 640. However, the position of a sample from which certain information may be acquired is not limited to the above position, but may be a sample at any position included in the coding unit 620b to be determined for setting the restriction.
[0107] According to an embodiment, the position of the sample from which the predetermined information can be obtained is also determined according to the shape of the current coding unit 600. According to an embodiment, the block shape information may determine whether the shape of the current coding unit is square or non-square, and may determine the position of the sample from which the predetermined information can be obtained according to the shape. For example, the video decoding apparatus 100 may determine, using at least one of information related to the width and information related to the height of the current coding unit, a sample located on a boundary that divides at least one of the width and height of the current coding unit in half as a sample from which the predetermined information can be obtained. For another example, when the block shape information related to the current coding unit indicates that the current coding unit is non-square, the video decoding apparatus 100 may determine one of the samples including a boundary that divides the long side of the current coding unit in half as a sample from which the predetermined information can be obtained.
[0108] When a current coding unit is divided into a plurality of coding units, the video decoding apparatus 100 according to an embodiment may use partition mode information to determine a coding unit at a predetermined position among the plurality of coding units. The video decoding apparatus 100 according to an embodiment may acquire partition mode information from a sample at a predetermined position included in the coding unit, and may divide a plurality of coding units generated by dividing the current coding unit using partition mode information acquired from a sample at a predetermined position included in each of the plurality of coding units. That is, the coding units are also recursively divided using partition mode information acquired from a sample at a predetermined position included in each of the coding units. The recursive division process of the coding unit has been described with reference to FIG. 5, and therefore a detailed description thereof will be omitted.
[0109] A video decoding device 100 according to one embodiment can divide a current coding unit and determine at least one coding unit, and can determine the order in which such at least one coding unit is decoded by a predetermined block (e.g., the current coding unit).
[0110] FIG. 7 illustrates an order in which a plurality of coding units are processed when a video decoding apparatus divides a current coding unit to determine the plurality of coding units, according to an embodiment.
[0111] According to one embodiment, the video decoding device 100 may, based on the partition mode information, partition the first coding unit 700 vertically to determine the second coding units 710a and 710b, partition the first coding unit 700 horizontally to determine the second coding units 730a and 730b, or partition the first coding unit 700 vertically and horizontally to determine the second coding units 750a, 750b, 750c, and 750d.
[0112] 7, the video decoding device 100 may determine an order in which second coding units 710a and 710b determined by dividing the first coding unit 700 in the vertical direction are processed in the horizontal direction (710c). The video decoding device 100 may determine a processing order of second coding units 730a and 730b determined by dividing the first coding unit 700 in the horizontal direction as the vertical direction (730c). The video decoding device 100 may determine second coding units 750a, 750b, 750c, and 750d determined by dividing the first coding unit 700 in the vertical and horizontal directions according to a predetermined order (e.g., a raster scan order or a z scan order 750e) in which a coding unit located in one row is processed and then a coding unit located in the next row is processed.
[0113] According to an embodiment, the video decoding apparatus 100 may recursively divide the coding units. Referring to FIG. 7, the video decoding apparatus 100 may divide the first coding unit 700 to determine a plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d, and may recursively divide each of the determined coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. A method of dividing the plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d corresponds to a method of dividing the first coding unit 700. Thus, the plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d are also divided into a plurality of coding units independently. Referring to FIG 7, the video decoding device 100 may divide the first coding unit 700 in the vertical direction to determine the second coding units 710a and 710b, and may further determine whether or not to divide each of the second coding units 710a and 710b independently.
[0114] According to an embodiment, the video decoding apparatus 100 may divide the second coding unit 710a on the left side in the horizontal direction and divide it into third coding units 720a and 720b, while the second coding unit 710b on the right side is not divided.
[0115] According to an embodiment, the processing order of the coding units is also determined based on the division process of the coding units. In other words, the processing order of the divided coding units is also determined based on the processing order of the coding units immediately before the division. The video decoding device 100 may determine the processing order of the third coding units 720a and 720b determined by dividing the second coding unit 710a on the left side, independently of the second coding unit 710b on the right side. Since the second coding unit 710a on the left side is divided in the horizontal direction and the third coding units 720a and 720b are determined, the third coding units 720a and 720b are also processed in the vertical direction (720c). In addition, since the order in which the second coding unit 710a on the left side and the second coding unit 710b on the right side are processed corresponds to the horizontal direction (710c), the third coding units 720a and 720b included in the second coding unit 710a on the left side may be processed in the vertical direction (720c) before the right coding unit 710b is processed. The above content is intended to explain a process in which the processing order of the coding units is determined based on the coding units before division, and should not be construed as being limited to the above embodiment, but should be construed as being used in various methods in which the coding units determined by being divided in various forms may be processed independently in a predetermined order.
[0116] FIG. 8 illustrates a process in which a video decoding apparatus 100 determines that a current coding unit is divided into an odd number of coding units when a certain ordered coding unit cannot be processed, according to an embodiment.
[0117] The video decoding device 100 according to an embodiment may determine that the current coding unit is divided into an odd number of coding units based on the acquired division mode information. Referring to FIG. 8, a square-shaped first coding unit 800 is also divided into non-square-shaped second coding units 810a and 810b, and the second coding units 810a and 810b are also independently divided into third coding units 820a, 820b, 820c, 820d, and 820e. The video decoding device 100 according to an embodiment may divide the left coding unit 810a in the second coding unit in the horizontal direction to determine a plurality of third coding units 820a and 820b, and may divide the right coding unit 810b into an odd number of third coding units 820c, 820d, and 820e.
[0118] According to an embodiment, the video decoding apparatus 100 may determine whether the third coding units 820a, 820b, 820c, 820d, and 820e can be processed in a predetermined order, and may determine whether there is an odd number of coding units. Referring to FIG. 8, the video decoding apparatus 100 may recursively divide the first coding unit 800 to determine the third coding units 820a, 820b, 820c, 820d, and 820e. The video decoding apparatus 100 may determine whether the first coding unit 800, the second coding unit 810a, 810b, or the third coding unit 820a, 820b, 820c, 820d, and 820e are divided into an odd number of coding units in a division form based on at least one of block form information and division form mode information. For example, the coding unit located on the right side of the second coding units 810a and 810b is also divided into an odd number of third coding units 820c, 820d, and 820e. The order in which the multiple coding units included in the first coding unit 800 are processed may be a predetermined order (e.g., z scan order (830)), and the video decoding device 100 may determine whether the third coding units 820c, 820d, and 820e determined by dividing the right second coding unit 810b into an odd number of units satisfy a condition that they can be processed in the predetermined order.
[0119] According to an embodiment, the video decoding apparatus 100 may determine whether the third coding units 820a, 820b, 820c, 820d, and 820e included in the first coding unit 800 satisfy a condition that they may be processed in a predetermined order, and the condition is related to whether at least one of the width and height of the second coding units 810a and 810b is divided in half by the boundary of the third coding units 820a, 820b, 820c, 820d, and 820e. For example, the third coding units 820a and 820b determined by dividing the height of the non-square left second coding unit 810a in half may satisfy the condition. Since the boundaries of the third coding units 820c, 820d, and 820e determined by dividing the right second coding unit 810b into three coding units cannot divide the width or height of the right second coding unit 810b in half, it may be determined that the third coding units 820c, 820d, and 820e do not satisfy the condition. If such a condition is not satisfied, the video decoding apparatus 100 may determine that there is a disconnection in the scanning order, and may determine that the right second coding unit 810b is to be divided into an odd number of coding units based on the determination result. When the right second coding unit 810b is divided into an odd number of coding units, the video decoding apparatus 100 according to an embodiment may set a predetermined restriction on a coding unit at a predetermined position among the divided coding units when the coding units are divided into an odd number of coding units. The content of such a restriction or the predetermined position has been described through various embodiments, and detailed description thereof will be omitted.
[0120] FIG. 9 illustrates a process in which a video decoding apparatus divides a first coding unit to determine at least one coding unit, according to an embodiment.
[0121] The video decoding apparatus 100 according to an embodiment may divide the first coding unit 900 based on the division mode information acquired via the receiving unit 110. The square-shaped first coding unit 900 may be divided into four square-shaped coding units or into a plurality of non-square-shaped coding units. For example, referring to FIG. 9, when the first coding unit 900 is a square and the division mode information indicates that the first coding unit 900 is to be divided into non-square coding units, the video decoding apparatus 100 may divide the first coding unit 900 into a plurality of non-square coding units. Specifically, when the division mode information indicates that the first coding unit 900 is to be divided horizontally or vertically to determine an odd number of coding units, the video decoding device 100 can divide the square-shaped first coding unit 900 into second coding units 910a, 910b, and 910c determined by dividing it vertically, or second coding units 920a, 920b, and 920c determined by dividing it horizontally, as an odd number of coding units.
[0122] According to an embodiment, the video decoding apparatus 100 may determine whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition 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 first coding unit 900 is divided in half along the boundary of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Referring to FIG. 9, the boundary of the second coding units 910a, 910b, and 910c determined by dividing the square-shaped first coding unit 900 in the vertical direction does not divide the width of the first coding unit 900 in half, so it may be determined that the first coding unit 900 does not satisfy the condition that they can be processed in a predetermined order. In addition, since the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction do not divide the width of the first coding unit 900 in half, it may be determined that the first coding unit 900 does not satisfy the condition to be processed in a predetermined order. If such a condition is not satisfied, the video decoding device 100 may determine that the scanning order is broken, and may determine that the first coding unit 900 is divided into an odd number of coding units based on the determination result. When the coding unit is divided into an odd number of coding units, the video decoding device 100 according to an embodiment may set a predetermined restriction on a coding unit at a predetermined position among the divided coding units, and the content of such a restriction or the predetermined position has been described through various embodiments, and detailed description thereof will be omitted.
[0123] According to an embodiment, the video decoding apparatus 100 may divide the first coding unit and determine various types of coding units.
[0124] 9, the video decoding apparatus 100 may divide a square-shaped first coding unit 900, a non-square-shaped first coding unit 930, or a non-square-shaped first coding unit 950 into various types of coding units.
[0125] FIG. 10 illustrates that, in one embodiment, a video decoding device restricts the manner in which a second coding unit may be divided when a non-square second coding unit determined by dividing a first coding unit satisfies certain conditions.
[0126] The video decoding device 100 according to an embodiment may determine to divide the square-shaped first coding unit 1000 into non-square-shaped second coding units 1010a, 1010b, 1020a, and 1020b based on the division mode information acquired via the receiving unit 110. The second coding units 1010a, 1010b, 1020a, and 1020b may be divided independently. Thus, the video decoding device 100 may determine whether to divide the first coding unit 1000 into a plurality of coding units or not to divide the first coding unit 1000 into a plurality of coding units based on the division mode information related to each of the second coding units 1010a, 1010b, 1020a, and 1020b. The video decoding device 100 according to an embodiment may determine the third coding units 1012a and 1012b by dividing the left non-square-shaped second coding unit 1010a, which is determined by dividing the first coding unit 1000 vertically, in the horizontal direction. However, when the video decoding device 100 divides the left second coding unit 1010a in the horizontal direction, the right second coding unit 1010b may be restricted so that it cannot be divided horizontally in the same direction as the division direction of the left second coding unit 1010a. If the right second coding unit 1010b is divided in the same direction and the third coding units 1014a and 1014b are determined, the left second coding unit 1010a and the right second coding unit 1010b may be divided independently in the horizontal direction to determine the third coding units 1012a, 1012b, 1014a, and 1014b. However, this is the same result as when the video decoding device 100 divides the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c, and 1030d based on the division mode information, and this is inefficient in terms of video decoding.
[0127] According to an embodiment, the video decoding device 100 may vertically divide the non-square second coding unit 1020a or 1020b, which is determined by dividing the first coding unit 1000 in the horizontal direction, to determine the third coding units 1022a, 1022b, 1024a, and 1024b. However, when the video decoding device 100 divides one of the second coding units (e.g., the top second coding unit 1020a) in the vertical direction, the video decoding device 100 may restrict the other second coding units (e.g., the bottom coding unit 1020b) from being divided vertically in the same direction as the top second coding unit 1020a, for the above-mentioned reasons.
[0128] FIG. 11 illustrates a process in which a video decoding apparatus divides a square coding unit when the division mode information does not indicate division into four square coding units, according to one embodiment.
[0129] According to an embodiment, the video decoding device 100 may divide the first coding unit 1100 into second coding units 1110a, 1110b, 1120a, and 1120b based on the division mode information. The division mode information may include information related to various types into which the coding unit may be divided, but the information related to the various types may not include information for dividing the coding unit into four square coding units. According to such division mode information, the video decoding device 100 may not divide the square first coding unit 1100 into four square second coding units 1130a, 1130b, 1130c, and 1130d. Based on the division mode information, the video decoding device 100 may determine the non-square second coding units 1110a, 1110b, 1120a, and 1120b.
[0130] According to an embodiment, the video decoding apparatus 100 may independently divide the non-square second coding units 1110a, 1110b, 1120a, and 1120b. Through a recursive method, the second coding units 1110a, 1110b, 1120a, and 1120b are divided in a predetermined order, which is also a division method corresponding to the division method of the first coding unit 1100 based on the division mode information.
[0131] For example, the video decoding device 100 may divide the left second coding unit 1110a in the horizontal direction to determine square third coding units 1112a and 1112b, and may divide the right second coding unit 1110b in the horizontal direction to determine square third coding units 1114a and 1114b. Furthermore, the video decoding device 100 may divide both the left second coding unit 1110a and the right second coding unit 1110b in the horizontal direction to determine square third coding units 1116a, 1116b, 1116c, and 1116d. In this case, the coding units may be determined in the same form as when the first coding unit 1100 is divided into four square second coding units 1130a, 1130b, 1130c, and 1130d.
[0132] As another example, the video decoding device 100 may vertically divide the top second coding unit 1120a to determine square third coding units 1122a and 1122b, and may vertically divide the bottom second coding unit 1120b to determine square third coding units 1124a and 1124b. Furthermore, the video decoding device 100 may vertically divide both the top second coding unit 1120a and the bottom second coding unit 1120b to determine square third coding units 1126a, 1126b, 1126a, and 1126b. In this case, the coding units may be determined in the same form as when the first coding unit 1100 is divided into four square second coding units 1130a, 1130b, 1130c, and 1130d.
[0133] FIG. 12 illustrates that the processing order of a plurality of coding units may vary depending on the division process of the coding units, according to an embodiment.
[0134] According to an embodiment, the video decoding apparatus 100 may divide the first coding unit 1200 based on the partition mode information. When the block shape is a square and the partition mode information indicates that the first coding unit 1200 is partitioned in at least one of the horizontal and vertical directions, the video decoding apparatus 100 may divide the first coding unit 1200 to determine the second coding units (e.g., 1210a, 1210b, 1220a, and 1220b). Referring to FIG. 12, the non-square second coding units 1210a, 1210b, 1220a, and 1220b determined by partitioning the first coding unit 1200 only in the horizontal or vertical direction are also independently divided based on the partition mode information associated therewith. For example, the video decoding apparatus 100 may determine third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 vertically, and may determine third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 horizontally. The division process of the second coding units 1210a, 1210b, 1220a, and 1220b has been described with reference to FIG. 11, and a detailed description thereof will be omitted.
[0135] The video decoding device 100 according to an embodiment may process the coding units in a predetermined order. The characteristics related to the processing of the coding units in a predetermined order have been described with reference to FIG. 7, and therefore detailed description thereof will be omitted. Referring to FIG. 12, the video decoding device 100 may divide the square-shaped first coding unit 1200 to determine four square-shaped third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. The video decoding device 100 according to an embodiment may determine the processing order of the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d according to the manner in which the first coding unit 1200 is divided.
[0136] According to one embodiment, the video decoding device 100 can horizontally divide the second coding units 1210a and 1210b, which have been generated by dividing them vertically, to determine the third coding units 1216a, 1216b, 1216c, and 1216d. The video decoding device 100 can process the third coding units 1216a, 1216b, 1216c, and 1216d in an order (1217) of first vertically processing the third coding units 1216a and 1216c included in the left second coding unit 1210a, and then vertically processing the third coding units 1216b and 1216d included in the right second coding unit 1210b.
[0137] According to one embodiment, the video decoding device 100 can vertically divide the second coding units 1220a and 1220b generated by dividing them horizontally to determine the third coding units 1226a, 1226b, 1226c, and 1226d, and the video decoding device 100 can process the third coding units 1226a, 1226b, 1226c, and 1226d in an order (1227) of first horizontally processing the third coding units 1226a and 1226b included in the upper second coding unit 1220a, and then horizontally processing the third coding units 1226c and 1226d included in the lower second coding unit 1220b.
[0138] 12, the second coding units 1210a, 1210b, 1220a, and 1220b are each divided to determine square-shaped third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. The second coding units 1210a and 1210b determined by dividing in the vertical direction and the second coding units 1220a and 1220b determined by dividing in the horizontal direction are divided in different shapes, but the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d determined thereafter ultimately result in the first coding unit 1200 being divided into coding units of the same shape. As a result, the video decoding device 100 recursively divides the coding units through different processes based on the division type mode information, and as a result, even if the coding units are determined to have the same type, the video decoding device 100 can process multiple coding units determined to have the same type in different orders.
[0139] FIG. 13 illustrates a process of determining the depth of a coding unit according to one embodiment, when a coding unit is recursively divided to determine multiple coding units, as the shape and size of the coding unit change.
[0140] According to an embodiment, the video decoding apparatus 100 may determine the depth of the coding unit according to a predetermined criterion. For example, the predetermined criterion may be the length of a long side of the coding unit. The video decoding apparatus 100 may determine the depth of the coding unit according to a predetermined criterion when the length of the long side of the current coding unit is twice as long as the length of the long side of the coding unit before the division. n When the coding unit is divided by (n>0), it may be determined that the depth of the current coding unit is increased by n from the depth of the coding unit before the division. Hereinafter, the coding unit with the increased depth is referred to as a coding unit of a lower depth.
[0141] 13, according to an embodiment, the video decoding apparatus 100 may divide the square-shaped first coding unit 1300 based on block shape information indicating a square shape (for example, the block shape information may indicate "0:SQUARE") to determine a second coding unit 1302, a third coding unit 1304, etc., of a lower depth. If the size of the square-shaped first coding unit 1300 is 2Nx2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 by 1 / 2 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 1 / 2 may have a size of N / 2xN / 2. In this case, the width and height of the third coding unit 1304 correspond to 1 / 4 times that of the first coding unit 1300. If the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302, which is 1 / 2 the width and height of the first coding unit 1300, is also D+1, and the depth of the third coding unit 1304, which is 1 / 4 the width and height of the first coding unit 1300, is also D+2.
[0142] 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 greater than the width, or "2:NS_HOR" indicating a non-square shape in which the width is greater than the height), the video decoding device 100 may divide the first coding unit 1310 or 1320, which is non-square, and determine a second coding unit 1312 or 1322 and a third coding unit 1314 or 1324 of a lower depth.
[0143] The video decoding device 100 may divide at least one of the width and height of the first coding unit 1310 having a size of Nx2N to determine second coding units (e.g., 1302, 1312, 1322). That is, the video decoding device 100 may divide the first coding unit 1310 in the horizontal direction to determine the second coding unit 1302 having a size of NxN or the second coding unit 1322 having a size of NxN / 2, or may divide the first coding unit 1310 in the horizontal and vertical directions to determine the second coding unit 1312 having a size of N / 2xN.
[0144] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the first coding unit 1320 having a size of 2NxN to determine second coding units (e.g., 1302, 1312, 1322). That is, the video decoding device 100 may divide the first coding unit 1320 vertically to determine the second coding unit 1302 having a size of NxN or the second coding unit 1312 having a size of N / 2xN, and may divide the first coding unit 1320 horizontally and vertically to determine the second coding unit 1322 having a size of NxN / 2.
[0145] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the second coding unit 1302 having a size of NxN to determine third coding units (e.g., 1304, 1314, 1324). That is, the video decoding device 100 may divide the second coding unit 1302 in the vertical and horizontal directions to determine the third coding unit 1304 having a size of N / 2xN / 2, the third coding unit 1314 having a size of N / 4xN / 2, or the third coding unit 1324 having a size of N / 2xN / 4.
[0146] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the second coding unit 1312 having a size of N / 2xN to determine third coding units (e.g., 1304, 1314, 1324). That is, the video decoding device 100 may divide the second coding unit 1312 in the horizontal direction to determine the third coding unit 1304 having a size of N / 2xN / 2 or the third coding unit 1324 having a size of N / 2xN / 4, or may divide the second coding unit 1312 in the vertical and horizontal directions to determine the third coding unit 1314 having a size of N / 4xN / 2.
[0147] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the second coding unit 1322 having a size of NxN / 2 to determine the third coding unit (e.g., 1304, 1314, 1324). That is, the video decoding device 100 may divide the second coding unit 1322 vertically to determine the third coding unit 1304 having a size of N / 2xN / 2 or the third coding unit 1314 having a size of N / 4xN / 2, or may divide the second coding unit 1322 vertically and horizontally to determine the third coding unit 1324 having a size of N / 2xN / 4.
[0148] According to an embodiment, the video decoding apparatus 100 may divide a square-shaped coding unit (e.g., 1300, 1302, 1304) in the horizontal or vertical direction. For example, the first coding unit 1300 having a size of 2Nx2N may be divided vertically to determine the first coding unit 1310 having a size of Nx2N, or may be divided horizontally to determine the first coding unit 1320 having a size of 2NxN. According to an embodiment, when the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by dividing the first coding unit 1300 having a size of 2Nx2N in the horizontal or vertical direction may be the same as the depth of the first coding unit 1300.
[0149] According to an embodiment, the width and height of the third coding unit 1314 or 1324 is also 1 / 4 times that of the first coding unit 1310 or 1320. When the depth of the first coding unit 1310 or 1320 is D, the depth of the second coding unit 1312 or 1322, which is 1 / 2 times the width and height of the first coding unit 1310 or 1320, is also D+1, and the depth of the third coding unit 1314 or 1322, which is 1 / 4 times the width and height of the first coding unit 1310 or 1320, is also D+2.
[0150] FIG. 14 illustrates a depth that may be determined according to the type and size of a coding unit, and an index (PID: part index) for coding unit partitions, according to one embodiment.
[0151] According to an embodiment, the video decoding apparatus 100 may divide the square-shaped first coding unit 1400 to determine various types of second coding units. Referring to FIG 14, the video decoding apparatus 100 may divide the first coding unit 1400 in at least one of a vertical direction and a horizontal direction according to the partition mode information to determine the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d. That is, the video decoding apparatus 100 may determine the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d based on the partition mode information related to the first coding unit 1400.
[0152] According to an embodiment, the depths of the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d determined by the partition mode information related to the square-shaped first coding unit 1400 may be determined based on the length of the long side. For example, since the length of one side of the square-shaped first coding unit 1400 is the same as the length of the long side of the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b, the depths of the first coding unit 1400 and the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b can be considered to be equal at D. In contrast, when the video decoding device 100 divides the first coding unit 1400 into four square-shaped second coding units 1406a, 1406b, 1406c, and 1406d based on the division mode information, the length of one side of the square-shaped second coding units 1406a, 1406b, 1406c, and 1406d is 1 / 2 the length of one side of the first coding unit 1400, so the depth of the second coding units 1406a, 1406b, 1406c, and 1406d is also a depth of D+1, which is one depth lower than the depth D of the first coding unit 1400.
[0153] The video decoding apparatus 100 according to an embodiment may divide a first coding unit 1410, whose height is greater than its width, in the horizontal direction according to the partition mode information, and divide the first coding unit 1410 into a plurality of second coding units 1412a, 1412b, 1414a, 1414b, and 1414c. The video decoding apparatus 100 according to an embodiment may divide a first coding unit 1420, whose width is greater than its height, in the vertical direction according to the partition mode information, and divide the first coding unit 1420 into a plurality of second coding units 1422a, 1422b, 1424a, 1424b, and 1424c.
[0154] According to an embodiment, the depths of the second coding units 1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, and 1424c determined by the partition mode information related to the non-square first coding unit 1410 or 1420 may be determined based on the length of the long side. For example, the length of one side of the square second coding units 1412a and 1412b is ½ times the length of one side of the non-square first coding unit 1410 whose height is greater than its width, so the depths of the square second coding units 1412a and 1412b are D+1, which is one depth lower than the depth D of the non-square first coding unit 1410.
[0155] Furthermore, the video decoding device 100 can divide the non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the division mode information. The odd number of second coding units 1414a, 1414b, and 1414c can also include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, the length of the long side of the non-square second coding units 1414a and 1414c and the length of one side of the square second coding unit 1414b are 1 / 2 times the length of one side of the first coding unit 1410, so the depths of the second coding units 1414a, 1414b, and 1414c are also D+1, which is one depth lower than D, which is the depth of the first coding unit 1410. The video decoding device 100 may determine the depth of a coding unit associated with a non-square first coding unit 1420, whose width is greater than its height, in a manner corresponding to the above-mentioned manner for determining the depth of a coding unit associated with the first coding unit 1410.
[0156] In determining an index (PID) for partitioning a divided coding unit, the video decoding apparatus 100 according to an embodiment may determine an index based on a ratio of sizes between the coding units when the coding units divided into an odd number of coding units are not the same size. Referring to FIG. 14, the coding unit 1414b located in the middle of the coding units 1414a, 1414b, and 1414c divided into an odd number of coding units has the same width as the other coding units 1414a and 1414c, but is twice as high as the other coding units 1414a and 1414c, which have different heights. That is, in this case, the coding unit 1414b located in the middle includes the other coding units 1414a and 1414c. Therefore, if the index (PID) of the coding unit 1414b located in the middle according to the scanning order is 1, the coding unit 1414c located next in the order has an index of 3, which is increased by 2. That is, discontinuity in the index value may exist. According to one embodiment, the video decoding device 100 can determine whether coding units divided into an odd number of parts are not the same size based on the presence of discontinuity in the indexes for partitioning between such divided coding units.
[0157] According to an embodiment, the video decoder 100 may determine whether the current coding unit is divided into a specific division type based on the value of an index for distinguishing the plurality of coding units determined by dividing the current coding unit. Referring to FIG. 14, the video decoder 100 may divide a rectangular first coding unit 1410 whose height is greater than its width to determine even coding units 1412a, 1412b or odd coding units 1414a, 1414b, 1414c. The video decoder 100 may use an index (PID) indicating each coding unit to distinguish each of the plurality of coding units. According to an embodiment, the index (PID) may also be obtained from a sample at a predetermined position (e.g., the top left sample) of each coding unit.
[0158] The video decoding apparatus 100 according to an embodiment may determine a coding unit at a predetermined position among the coding units determined by dividing the coding units using an index for dividing the coding units. According to an embodiment, when the division mode information related to the rectangular first coding unit 1410 whose height is greater than its width indicates that the first coding unit 1410 is divided into three coding units, the video decoding apparatus 100 may divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The video decoding apparatus 100 may assign an index related to each of the three coding units 1414a, 1414b, and 1414c. The video decoding apparatus 100 may compare the indexes related to each coding unit in order to determine a middle coding unit among the odd number of coding units divided. The video decoding apparatus 100 may determine the coding unit 1414b having an index corresponding to a middle value among the indexes based on the indexes of the coding units as a coding unit at a middle position among the coding units determined by dividing the first coding unit 1410. In determining an index for dividing a divided coding unit, the video decoder 100 may determine an index based on a size ratio between the coding units when the coding units are not the same size. Referring to FIG. 14, a coding unit 1414b generated by dividing a first coding unit 1410 has the same width as other coding units 1414a and 1414c, but is twice as high as other coding units 1414a and 1414c, which have different heights. In this case, if the index (PID) of the coding unit 1414b located in the middle is 1, the index of the coding unit 1414c located next thereto is 3, which is an increase of 2. In such a case, when the indexes are increased uniformly but the increase widths are different, the video decoder 100 may determine that the coding unit is divided into a plurality of coding units including a coding unit having a different size from other coding units.According to an embodiment, when the division mode information indicates that the current coding unit is divided into an odd number of coding units, the video decoding apparatus 100 may divide the current coding unit into a form in which a coding unit at a predetermined position (e.g., a middle coding unit) among the odd number of coding units has a different size from other coding units. In this case, the video decoding apparatus 100 may determine a middle coding unit having a different size using an index (PID) related to the coding units. However, the above index and the size or position of the coding unit at the predetermined position to be determined are specified for describing an embodiment, and should not be construed as being limited thereto, and various indexes, positions and sizes of coding units may be used.
[0159] The video decoding apparatus 100 according to an embodiment may use a predetermined data unit from which recursive division of a coding unit begins.
[0160] FIG. 15 illustrates a number of coding units being determined according to a number of predefined data units included in a picture, according to one embodiment.
[0161] According to an embodiment, the predetermined data unit is also defined as a data unit from which the coding unit starts to be recursively divided using the division mode information. That is, it also corresponds to a coding unit of the highest depth used in the process of determining a plurality of coding units for dividing the current picture. Hereinafter, for convenience of explanation, such a predetermined data unit is referred to as a reference data unit.
[0162] According to an embodiment, the reference data unit may have a predetermined size and shape. According to an embodiment, the reference coding unit may include MxN samples, where M and N may be equal to each other or may be integers expressed as a power of 2. That is, the reference data unit may have a square or non-square shape and may then be divided into an integer number of coding units.
[0163] The video decoding apparatus 100 according to an embodiment may divide a current picture into a plurality of reference data units. The video decoding apparatus 100 according to an embodiment may divide a plurality of reference data units into which the current picture is divided, using partition mode information associated with each of the reference data units. The division process of the reference data units may correspond to a division process using a quad-tree structure.
[0164] According to an embodiment, the video decoding apparatus 100 may determine in advance a minimum size that a reference data unit included in a current picture may have, and may determine reference data units of various sizes that are equal to or larger than the minimum size, and may determine at least one coding unit using partition mode information based on the determined reference data unit.
[0165] 15, the video decoding apparatus 100 may use a square-shaped reference coding unit 1500 or a non-square-shaped reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined according to various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) including at least one reference coding unit.
[0166] The receiving unit 110 of the video decoding apparatus 100 according to an embodiment may obtain at least one of information on the type of the base coding unit and information on the size of the base coding unit from the bitstream for each of the various data units. The process of determining at least one coding unit included in the square-shaped base coding unit 1500 has been described through the process of dividing the current coding unit 300 in Fig. 3, and the process of determining at least one coding unit included in the non-square-shaped base coding unit 1502 has been described through the process of dividing the current coding unit 400 or 450 in Fig. 4, so detailed description thereof will be omitted.
[0167] The video decoding apparatus 100 according to an embodiment may use an index for identifying the size and type of the reference coding unit in order to determine the size and type of the reference coding unit according to a certain data unit that is determined in advance based on a predetermined condition. That is, the receiving unit 110 may acquire only an index for identifying the size and type of the reference coding unit for each slice, slice segment, tile, tile group, maximum coding unit, etc. as a data unit that satisfies a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) among the various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) from the bitstream. The video decoding apparatus 100 may determine the size and type of the reference data unit for each data unit that satisfies the predetermined condition by using the index. If the information on the type of the reference coding unit and the information on the size of the reference coding unit are obtained from the bitstream for each data unit of a relatively small size and used, the bitstream utilization efficiency becomes poor, so instead of directly obtaining the information on the type of the reference coding unit and the information on the size of the reference coding unit, only the index can be obtained and used. In this case, at least one of the size and type of the reference coding unit corresponding to the index indicating the size and type of the reference coding unit is also determined in advance. That is, the video decoding device 100 can determine at least one of the size and type of the reference coding unit included in the data unit that is the basis for obtaining the index by selecting at least one of the size and type of the previously determined reference coding unit according to the index.
[0168] The video decoding apparatus 100 according to an embodiment may use at least one reference coding unit included in one maximum coding unit. That is, the maximum coding unit into which a video is divided may include at least one reference coding unit, and coding units may be determined through a recursive division process of each reference coding unit. According to an embodiment, at least one of the width and height of the maximum coding unit may be an integer multiple of at least one of the width and height of the reference coding unit. According to an embodiment, the size of the reference coding unit may be a size obtained by dividing the maximum coding unit n times according to a quad tree structure. That is, the video decoding apparatus 100 may determine the reference coding unit by dividing the maximum coding unit n times according to a quad tree structure, and may divide the reference coding unit based on at least one of block configuration information and partition configuration mode information according to various embodiments.
[0169] The video decoding apparatus 100 according to an embodiment may acquire and use block type information indicating a type of a current coding unit or partition type mode information indicating a method of dividing the current coding unit from a bitstream. The partition type mode information may be included in a bitstream associated with various data units. For example, the video decoding apparatus 100 may use partition type mode information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, or a tile group header. Furthermore, the video decoding apparatus 100 may acquire and use a syntax element corresponding to block type information or partition type mode information from the bitstream for each of a maximum coding unit, a reference coding unit, and a processing block.
[0170] A method for determining a division rule according to an embodiment of the present disclosure will now be described in detail.
[0171] The video decoding device 100 may determine a partitioning rule for a video. The partitioning rule may be determined in advance between the video decoding device 100 and the video encoding device 2200. The video decoding device 100 may determine the partitioning rule for a video based on information acquired from a bitstream. The video decoding device 100 may determine the partitioning rule based on information acquired from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, and a tile group header. The video decoding device 100 may determine the partitioning rule differently depending on a frame, a slice, a tile, a temporal layer, a maximum coding unit, or a coding unit.
[0172] The video decoding device 100 may determine the partitioning rule based on the block type of the coding unit. The block type may include the size, shape, width and height ratio, and direction of the coding unit. The video decoding device 100 may determine in advance to determine the partitioning rule based on the block type of the coding unit. However, the present invention is not limited thereto. The video decoding device 100 may determine the partitioning rule based on information obtained from a received bitstream.
[0173] The shape of the coding unit may include a square and a non-square. If the width and height of the coding unit are the same, the video decoding device 100 may determine the shape of the coding unit to be a square. If the width and height of the coding unit are not the same, the video decoding device 100 may determine the shape of the coding unit to be a non-square.
[0174] 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 also be classified according to the length of the long side, the length of the short side, or the width of the coding unit. The video decoding device 100 may apply the same division rule to the coding units classified into the same group. For example, the video decoding device 100 may classify the coding units having the same long side length into the same size. Furthermore, the video decoding device 100 may apply the same division rule to the coding units having the same long side length.
[0175] The ratio of the width and height of the coding unit may be 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, or 1:32, etc. The direction of the coding unit may be horizontal or vertical. The horizontal direction may indicate that the coding unit width is greater than the height. The vertical direction may indicate that the coding unit width is smaller than the height.
[0176] The video decoding device 100 may adaptively determine a partitioning rule based on the size of the coding unit. The video decoding device 100 may determine an allowable partitioning mode differently based on the size of the coding unit. For example, the video decoding device 100 may determine whether partitioning is allowed based on the size of the coding unit. The video decoding device 100 may determine a partitioning direction according to the size of the coding unit. The video decoding device 100 may determine an allowable partitioning type according to the size of the coding unit.
[0177] Determining the partitioning rule based on the size of the coding unit is also a pre-determined partitioning rule for the video decoding device 100. In addition, the video decoding device 100 can determine the partitioning rule based on information obtained from the bitstream.
[0178] The video decoding device 100 can adaptively determine the partitioning rule based on the position of the coding unit. The video decoding device 100 can adaptively determine the partitioning rule based on the position that the coding unit occupies in the video.
[0179] Furthermore, the video decoding device 100 may determine a division rule such that the coding units generated by different division paths do not have the same block type. However, the present invention is not limited thereto, and the coding units generated by different division paths may have the same block type. The coding units generated by different division paths may have different decoding process orders. The decoding process order has been described with reference to FIG. 12, and therefore will not be described in detail.
[0180] FIG. 16 is a block diagram of a video encoding and decoding system.
[0181] An encoder 1610 of the video encoding and decoding system 1600 transmits an encoded bitstream of video, and a decoder 1650 receives and decodes the bitstream to output a restored video. Here, the decoder 1650 has a similar configuration to the video decoding device 100.
[0182] In the encoding stage 1610, the inter prediction encoding unit 1605 generates motion information of a current block indicating a reference block of a reference picture 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 may determine a prediction sample of the current block using a sample of the reference block. The intra prediction encoding unit 1610 may determine intra prediction information indicating a direction in which an adjacent sample similar to the current block is located or a method of determining a prediction sample, so as to determine a prediction sample of the current block using adjacent samples spatially adjacent to the current block. The inter prediction encoding unit 1605 may determine a reference sample to be used for prediction of the current block from among first restored samples stored in a decoded picture buffer (DPB) 1648.
[0183] The transform unit 1620 performs transform on residual sample values obtained by extracting predicted samples generated by the inter prediction encoding unit 1605 or the intra prediction encoding unit 1610 from original samples of the current block, and outputs transform coefficients. The quantization unit 1625 quantizes the transform coefficients output from the transform unit 1620, and outputs quantized transform coefficients. The entropy encoding unit 1630 may encode the quantized transform coefficients into residual syntax elements including level values, and output the encoded residual syntax elements in the form of a bitstream.
[0184] The quantized transform coefficients output from the quantization unit 1625 may be inverse quantized and inverse transformed via the inverse quantization unit 1633 and the inverse transform unit 1635 to generate further residual sample values.
[0185] The adder 1615 adds the residual sample value and the predicted sample value to output a reconstructed sample value. The post-reconstruction filtering unit 1640 performs post-reconstruction filtering on the reconstructed samples, and the reconstructed sample values updated through the post-reconstruction filtering are also used as reference sample values for intra prediction performed by the intra prediction unit 1610. The post-reconstruction filtering unit 1640 may perform Hadamard transform domain filtering or bilateral filtering on the reconstructed sample values.
[0186] The in-loop filtering unit 1645 may perform at least one of deblocking filtering and adaptive loop filtering on the reconstructed samples updated through the post-reconstruction filtering. The reconstructed sample values updated through the filtering of the in-loop filtering unit 1645 are stored in the DPB 1648 and are also used as reference sample values for inter prediction performed by the inter prediction unit 1605.
[0187] The entropy decoding unit 1655 of the decoder 1650 may perform entropy decoding on the received bitstream and parse the residual syntax element including the level value. The quantized transform coefficients may be restored from the residual syntax element. The inverse quantization unit 1660 may perform inverse quantization on the quantized transform coefficients and output the transform coefficients, and the inverse transform unit 1665 may perform inverse transform on the transform coefficients and output the residual sample values.
[0188] The inter prediction coding unit 1670 of the decoder 1650 may determine a reference picture temporally adjacent to the current picture using motion information of the current block parsed by the entropy decoding unit 1655, and may determine a reference block in the reference picture. The inter prediction coding unit 1670 may determine a prediction sample of the current block using a sample of the reference block. The intra prediction coding unit 1675 of the decoder 1650 may determine a reference sample spatially adjacent to the current block using intra prediction information using motion information of the current block parsed by the entropy decoding unit 1655, and may determine a prediction sample of the current block using the determined adjacent sample. The inter prediction coding unit 1670 may determine a reference sample to be used for prediction of the current block from among first restored samples stored in a decoded picture buffer (DPB) 1690.
[0189] The adder 1695 of the decoder 1650 adds the residual sample value and the predicted sample value to output a reconstructed sample value of the current block. The post-reconstruction filtering unit 1680 of the decoder 1650 may perform Hadamard transform domain filtering or bilateral filtering on the reconstructed sample value. The reconstructed sample value updated through filtering by the post-reconstruction filtering unit 1680 is also used as a reference sample value for intra prediction performed by the intra prediction unit 1675.
[0190] The in-loop filtering unit 1685 of the decoder 1650 is used on the reconstructed samples updated through post-reconstruction filtering, and may perform at least one of deblocking filtering and adaptive loop filtering. The reconstructed sample values updated through filtering by the in-loop filtering unit 1685 are stored in the DPB 1690, and are also used as reference sample values for inter prediction performed by the inter predictor 1670.
[0191] A video encoding method, a video decoding method, a video encoding device, and a video decoding device according to an 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 with reference to Figures 1 to 16. Hereinafter, with reference to Figures 17 to 40, a video encoding method and device therefor, or a video decoding method and device therefor, for determining a quantization parameter (QP) and performing quantization or inverse quantization according to an embodiment disclosed in the present specification will be described.
[0192] FIG. 17 illustrates a block diagram of a video decoding device according to one embodiment.
[0193] A video decoding device 1700 according to an 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 a video, and can determine the positions of blocks divided from a picture based on information included in the bitstream, and decode blocks such as a maximum coding unit and a coding unit.
[0194] The video decoding device 1700 also includes one or more data storage units (not shown) that store input / output data of the acquisition unit 1710 and the decoding unit 1720. The video decoding device 1700 also includes a memory control unit (not shown) that controls data input / output of the data storage units (not shown).
[0195] The video decoding device 1700 may perform video decoding operations including prediction by operating in conjunction with an internal video decoding processor or an external video decoding processor to restore images through video decoding. The internal video decoding processor of the video decoding device 1700 according to an embodiment may be implemented by implementing a basic video decoding operation by including a video decoding processing module in a central processing unit or a graphic processing unit, rather than a separate processor.
[0196] The video decoding device 1700 may be included in the above-mentioned video decoding device 100. For example, the obtaining 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 video encoding and decoding system described with reference to FIG. 16. For example, the decoding unit 1720 also includes the functionality of the inverse quantization unit 1633 of the decoder 1650.
[0197] The video decoding device 1700 receives a bitstream generated as a result of encoding a video. The bitstream also includes information related to a current picture. The picture also includes one or more largest coding units. The video decoding device 1700 may determine a position of a current block within a picture based on information acquired from the bitstream. The current block is a block generated by dividing a picture according to a tree structure, and may correspond to, for example, a largest coding unit or a coding unit. The video decoding device 1700 may determine whether the current block is further divided into lower blocks of a lower depth and determine a tree structure of the current block. The lower depth may be determined by increasing the number of divisions from the current block to the lower blocks compared to the current depth of the current block. Among blocks forming a tree structure included in the current picture, blocks located at tree leaves are blocks that are not further divided. Thus, the video decoding device 1700 may decode a block by performing inverse quantization, inverse transformation, and prediction on one or more blocks that are not further divided.
[0198] The video decoding apparatus 1700 may perform prediction on the current block and generate a predicted sample of the current block. The video decoding apparatus 1700 may perform inverse transform on the current block and generate a residual sample of the current block. The reconstruction unit 1730 may generate a reconstructed sample of the current block using the predicted sample of the current block and the residual sample of the current block. The video decoding apparatus 1700 may reconstruct the current picture by reconstructing samples for each block.
[0199] For example, if the prediction mode of the current block is intra mode, the video decoding device 1700 can use intra prediction information of the current block to determine a reference sample among samples of spatially adjacent blocks located in the intra prediction direction, and use the reference sample to determine a prediction sample corresponding to the current block.
[0200] For example, if the prediction mode of the current block is an inter mode, the video decoding apparatus 1700 may reconstruct the current block using a motion vector of the current block. The video decoding apparatus 1700 may determine a reference block in a reference picture using the motion vector of the current block, and may determine a predicted sample corresponding to the current block from a reference sample included in the reference block. The video decoding apparatus 1700 may reconstruct a transform coefficient using a transform coefficient level acquired from a bitstream, perform inverse quantization and inverse transform on the transform coefficient, and reconstruct a residual sample. The video decoding apparatus 1700 may determine a reconstructed sample of the current block by combining the predicted sample corresponding to the current block and the residual sample.
[0201] 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, and may use the predicted samples of the current block directly to determine the reconstructed samples of the current block.
[0202] The video decoding device 1700 according to an embodiment uses a quantization parameter (QP) to perform inverse quantization. The QP may be set for each coding unit, and one QP may be applied to transform coefficients included in the coding unit. A picture may include one or more slices, and one slice may include one or more coding units. In order to determine the QP for each coding unit, the video decoding device 1700 may obtain information required to determine the QP for each coding unit, slice, or picture from a bitstream.
[0203] According to an embodiment, the acquiring unit 1710 may acquire information required to determine a QP for each coding unit from a coding unit-related bitstream syntax, may acquire information required to determine a QP for each slice from a slice header syntax, and may acquire information required to determine a QP for each picture from a picture header syntax.
[0204] First, the video decoding apparatus 1700 may determine, at a picture parameter set level, whether to obtain a QP differential value for each picture or each slice.
[0205] According to an embodiment, the acquiring unit 1710 may acquire an initial QP value to be applied to a current picture from a picture parameter set. Also, the acquiring unit 1710 may 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 acquiring unit 1710 may 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 acquiring unit 1710 may acquire a second QP differential value for the current slice from a slice header of a current slice included in the current picture.
[0206] According to an embodiment, if the picture header QP differential value information indicates that the QP differential value information exists in the picture header, the decoder 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. The decoder 1720 may perform inverse quantization on the coding unit included in the current picture using the first QP differential value and the QP.
[0207] According to an embodiment, if the picture header QP differential value information indicates that the picture header does not include QP differential value information, the decoder 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. The decoder 1720 may perform inverse quantization on the coding unit included in the current slice using the QP determined using the second QP differential value.
[0208] Hereinafter, a process in which the video decoding apparatus 1700 acquires QP differential value information for each picture or slice and performs inverse quantization for each coding unit will be described in detail with reference to FIG.
[0209] FIG. 18 illustrates a flowchart of a video decoding method according to one embodiment.
[0210] In operation 1810, the acquisition unit 1710 may acquire a QP initial value and picture header QP differential value information to be applied to the current picture from a picture parameter set. According to an embodiment, the picture header QP differential value information may indicate whether or not QP differential value information exists in the picture header of the current picture.
[0211] 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 obtaining unit 1810 may obtain a first QP differential value for the current picture from the picture header.
[0212] In operation 1830, the decoder 1820 may determine a QP for a coding unit included in the current picture using the QP initial value and the first QP differential value.
[0213] In operation 1840, the decoder 1820 may perform inverse quantization on the coding unit using the QP determined using the first QP difference value to obtain transform coefficients of the coding unit. That is, inverse quantization may be performed on the coding unit included in the current picture using the QP determined using the first QP difference value.
[0214] In operation 1850, the decoder 1820 may reconstruct the coding unit using the transform coefficients of the coding unit obtained in operation 1840. The decoder 1820 may perform an inverse transform on the transform coefficients to obtain residual samples, and may determine reconstructed samples of the coding unit using the residual samples.
[0215] According to an embodiment, if the picture header QP differential value information indicates that the picture header does not include QP differential value information, the acquiring unit 1710 may acquire a second QP differential value for the current slice from a slice header of the current slice included in the current picture. The decoding unit 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 decoding unit 1720 may perform inverse quantization on the coding unit using the QP determined using the second QP differential value and acquire transform coefficients of the coding unit. The decoding unit 1720 may restore the coding unit using the transform coefficients. That is, inverse quantization may be performed on the coding unit included in the current slice using the QP determined using the second QP differential value.
[0216] In operation 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 obtaining unit 1810 may obtain the first QP differential value for the luma component of the current picture from the picture header. The decoding unit 1820 may determine a QP for the luma component of a slice included in the current picture by adding a QP initial value and the first QP differential value for the luma component. The decoding unit 1820 may determine a QP of a coding unit included in a slice included in the current picture while being included in the current picture, using a QP for the luma component of the slice.
[0217] In step 1820, the obtaining unit 1710 may obtain a QP difference value for the coding unit from the bitstream. The decoding unit 1820 may determine a QP for the luma component of the coding unit by using a QP for a luma component of the slice and the QP difference value for the coding unit. The decoding unit 1820 may perform inverse quantization on transform coefficients included in the coding unit by using the QP for the coding unit. Residual samples of the coding unit may be decoded by performing inverse transform on the dequantized transform coefficients.
[0218] In another embodiment, the obtaining unit 1710 does not obtain the QP difference value for the coding unit from the bitstream, in which case the decoding unit 1810 may use a QP predicted value for the coding unit to determine a QP for the luma component of the coding unit.
[0219] According to an embodiment, if the picture header QP differential value information indicates that the picture header of the current picture does not include QP differential value information, the acquiring unit 1810 may acquire a second QP differential value for the luma component of the current slice from the slice header. The decoding unit 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 decoding unit 1820 may determine a QP for a coding unit included in the current slice by using a QP for the luma component of the current slice. The decoding unit 1820 may perform inverse quantization on transform coefficients included in the coding unit by using a QP for the coding unit. Residual samples of the coding unit may be decoded by performing inverse transform on the inverse quantized transform coefficients. If the picture header QP differential value information indicates that the picture header of the current picture does not include QP differential value information, the acquiring unit 1810 may acquire a QP differential value for a coding unit included in the current slice from a bitstream. The decoder 1820 may determine a QP for a luma component of the current coding unit included in the current slice using the QP difference value for the coding unit.
[0220] If the picture header QP differential value information indicates that QP differential value information does not exist in the picture header of the current picture, the acquisition unit 1810 may acquire 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. The decoding unit 1820 may determine 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. The decoding unit 1820 may determine 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 included in the current slice using the Cr QP differential value for the Cr chroma component of the current slice.
[0221] FIG. 19 illustrates a block diagram of a video encoding device according to one embodiment.
[0222] Referring to FIG. 19, a video encoding device 1900 according to an embodiment also includes a quantizer 1910 and an information encoder 1920 .
[0223] The video encoding device 1900 according to an embodiment may also include a central processor (not shown) that controls the quantization unit 1910 and the 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 by the processors (not shown) operating in an organic manner. 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.
[0224] The video encoding device 1900 also includes one or more data storage units (not shown) that store input / output data of the quantization unit 1910 and the information encoding unit 1920. The video encoding device 1900 also includes a memory control unit (not shown) that controls data input / output of the data storage units (not shown).
[0225] The video encoding device 1900 may perform video encoding operations including prediction by operating in conjunction with an internal video encoding processor or an external video encoding processor for video encoding. The internal video encoding processor of the video encoding device 1900 according to an embodiment may be implemented by implementing a basic video encoding operation by including a video encoding processing module in a central processing unit or a graphic processing unit, rather than a separate processor.
[0226] The video encoding device 1900 may correspond to the encoder 1600 of the video encoding and decoding system described with reference to Figure 16. For example, the information encoder 1920 may correspond to the entropy encoder 1630 of the encoder 1600. The quantizer 1910 may correspond to the quantizer 1625 of the encoder 1600.
[0227] The video encoding device 1900 according to an embodiment may divide a picture into a plurality of maximal coding units, divide each of the maximal coding units into blocks of various sizes and shapes, and encode the blocks.
[0228] For example, if the prediction mode of the current block is the intra mode, the video encoding apparatus 1900 may determine a reference sample from among samples of spatially neighboring blocks located in the intra prediction direction of the current block, and may determine a prediction sample of the current block using the reference sample. A residual sample that is a difference between the prediction sample and a sample of the current block may be determined, and the residual sample may be transformed based on a transform block to generate transform coefficients, and the transform coefficients may be quantized to generate quantized transform coefficients.
[0229] For example, if the current block is predicted in skip mode, the video encoding device 1900 may determine a motion vector for predicting the current block. The video encoding device 1900 may determine a reference block of the current block in a reference picture and determine a motion vector indicating the reference block from the current block. In the case of skip mode, coding of the residual block is not required.
[0230] For example, if the prediction mode of the current block is an inter mode, the video encoding apparatus 1900 may determine a motion vector for predicting the current block. The video encoding apparatus 1900 may determine a reference block of the current block in a reference picture, and may determine a motion vector indicating the reference block from the current block. The video encoding apparatus 1900 may determine a prediction sample of the current block using a reference sample included in the reference block, determine a residual sample that is a difference between the prediction sample and a sample of the current block, and perform transformation and quantization on the residual sample based on a transformation block to generate a quantized transformation coefficient.
[0231] The current block is a block generated by dividing an image according to a tree structure, and may correspond to, for example, a maximum coding unit, a coding unit, or a transform unit. The video encoding device 1900 may encode blocks included in a picture according to a coding order.
[0232] The video encoding device 1900 according to an embodiment uses a QP to perform quantization. The QP may be set for each coding unit, and one QP may be applied to transform coefficients included in the coding unit. A picture may include one or more slices, and one slice may include one or more coding units. The video encoding device 1900 may determine a QP for each coding unit, and may encode information required for determining a QP for each coding unit, slice, or picture in order to signal the information.
[0233] According to an embodiment, the information encoder 1920 may encode information required to determine a QP for each coding unit and output the encoded information in the form of a coding unit-related bitstream syntax. The information encoder 1920 may encode information required to determine a QP for each slice and output the encoded information in the form of a slice header syntax. The information encoder 1920 may encode information required to determine a QP for each picture and output the encoded information in the form of a picture header syntax.
[0234] First, the video encoding device 1900 can determine, at a picture parameter set level, whether to transmit a QP differential value for each picture or each slice.
[0235] According to an embodiment, the quantizer 1910 may determine an initial QP value to be applied to the current picture.
[0236] When determining the QP difference value for each picture, the information encoder 1920 may determine a first QP difference value between the QP used in the current picture and an initial QP value, and may generate a picture header for the current picture including the first QP difference value.
[0237] When determining the QP difference value for each slice, the information encoding unit 1920 may determine a second QP difference value between a QP used in a current slice included in the current picture and an initial QP value, and may generate a slice header for the current slice including the second QP difference value.
[0238] According to an embodiment, the information encoding unit 1920 may generate a picture parameter set including picture header QP differential value information indicating whether or not QP differential value information exists in the picture header of the current picture, and an initial QP value.
[0239] Hereinafter, a process in which the video encoding device 1900 signals QP difference value information for each picture or slice will be described in detail with reference to FIG.
[0240] FIG. 20 illustrates a flow chart of a video encoding method according to one embodiment.
[0241] In step 2010, the quantizer 1910 can determine an initial QP value to be applied to the current picture.
[0242] In step 2020, when determining a QP differential value for each picture, the information encoding unit 1920 may determine a first QP differential value between the QP used in the current picture and an initial QP value, and generate a picture header for the current picture including the first QP differential value.
[0243] In step 2030, the information encoding unit 1920 may generate a picture parameter set including picture header QP differential value information indicating whether or not QP differential value information exists in the picture header of the current picture, and an initial QP value.
[0244] 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 the QP used in the current slice included in the current picture and the initial QP value, and generate a slice header for the current slice including the second QP differential value.
[0245] In operation 2020, when the quantization unit 1910 determines a QP difference value for each picture, it may determine a QP for a luma component of a slice included in the current picture. The information encoding unit 1920 may determine a first QP difference value for the luma component of the current picture by using a difference value between a QP for a luma component of a slice included in the current picture and an initial QP value. The information encoding unit 1920 may determine a QP difference value for a coding unit by using a difference value between a QP for a luma component of a coding unit and a QP for a luma component of a slice. The information encoding unit 1920 may encode the QP difference value for the coding unit.
[0246] In operation 2030, when the quantization unit 1910 determines a QP difference value for each slice, it may determine a QP for the luma component of the current slice. The information encoding unit 1920 may determine a second QP difference value for the luma component of the current slice by using a difference value between the QP for the luma component of the current slice and an initial QP value. The information encoding unit 1920 may determine a QP difference value for a coding unit by subtracting a QP for the luma component of the current slice from a QP for the luma component of the coding unit. The information encoding unit 1920 may encode the QP difference value for the coding unit.
[0247] According to another embodiment, the quantizer 1910 may use a QP predicted value predicted for a coding unit to determine a QP for a luma component of the coding unit, and may perform quantization for the coding unit using the QP. In this case, the information encoder 1920 does not encode a QP difference value for the coding unit.
[0248] In the case of encoding the QP differential value for each slice in operation 2030, the information encoding unit 1920 may determine a Cb QP differential value for the Cb chroma component of the current slice to determine a QP for the Cb chroma component of the coding unit included in the current slice. In addition, the information encoding unit 1920 may determine a Cr QP differential value for the Cr chroma component of the current slice to determine a QP for the Cr chroma component of the coding unit included in the current slice. The information encoding unit 1920 may encode the Cb QP differential value of the current slice and the Cr QP differential value for the Cr chroma component, and generate a slice header for the current slice including the Cb QP differential value and the Cr QP differential value.
[0249] The quantization unit 1910 may quantize the transform coefficients of the coding unit using the QP to generate quantized transform coefficients of the coding unit. The information encoding unit 1920 may perform entropy encoding on information related to the quantized transform coefficients to generate a bitstream.
[0250] The video decoding apparatus 1700 according to an embodiment and the video encoding apparatus 1900 according to an embodiment may selectively signal a QP differential value per picture or per slice. Thus, the video encoding apparatus 1900 according to an embodiment may determine whether to signal a QP differential value per picture or per slice according to a characteristic of a data picture or data transmission efficiency, and may signal a QP differential value in a manner with high transmission efficiency. The video decoding apparatus 1700 according to an embodiment may determine whether to acquire a QP differential value per picture or per slice based on information acquired from a picture parameter set, and may determine a QP per picture or per slice. Thus, when a QP differential value is signaled per picture, data for signaling a QP may be saved since there is no need to signal a QP differential value per slice included in a picture.
[0251] FIG. 21 illustrates a schematic diagram for deriving QP at the picture level or slice level, according to one embodiment.
[0252] In the case of conventional video codecs, the initial value of QP is generally set in a picture parameter set (PPS), and the difference value of the initial QP value of each slice is transmitted via the slice header, and the QP is set for each slice.
[0253] In contrast, in the video decoding device 1700 according to an embodiment, a picture header can be obtained for each picture, and information related to the QP can be signaled from the picture header. In the present invention, a selection is made between the video decoding device 1700 and the video encoding device 1900 as to whether to signal a QP differential value for each picture or for each slice, thereby simplifying the signaling structure of the QP.
[0254] First, in step 2100, the video decoding apparatus 1700 may acquire an initial value of QP from a picture parameter set (PPS) or a sequence parameter set (SPS) which is a higher level than the picture header. Also, in step 2110, the video decoding apparatus 1700 may acquire picture header QP differential value (dQP) information from the picture parameter set (PPS) or the sequence parameter set (SPS). The video decoding apparatus 1700 may determine whether to determine a QP at a picture level or a slice level according to the picture header QP differential value information.
[0255] Specifically, when the picture header QP differential value information is not 0 (for example, when the picture header QP differential value information is 1), that is, when a QP differential value (delta value) exists in the picture header, the video decoding device 1700 may acquire a QP differential value from the picture header in step 2120. The video decoding device 1700 may determine a QP for each picture using the QP differential value acquired from the picture header and a QP initial value acquired from a picture parameter set (PPS) or a sequence parameter set (SPS).
[0256] If the picture header QP differential value information is 0, i.e., if there is no QP differential value in the picture header, the video decoding apparatus 1700 may acquire a QP differential value from a slice header in step 2130. The video decoding apparatus 1700 may determine a QP for each slice using the QP differential value acquired from the slice header and a QP initial value acquired from a picture parameter set (PPS) or a sequence parameter set (SPS).
[0257] 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. Also, the video encoding device 1900 may encode picture header QP difference value information indicating whether to determine the QP at the picture level or the slice level.
[0258] Specifically, when the video encoding device 1900 determines the QP for each picture, the QP differential value can be encoded for each picture. Therefore, 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 of the current picture can be encoded so that the picture header QP differential value information indicates 1 to indicate that a QP differential value exists.
[0259] When the video encoding device 1900 determines the QP for each slice, the QP differential value can be encoded for each slice. Thus, 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 can be encoded so that the picture header QP differential value information indicates 0 to indicate that there is no QP differential value in the picture header.
[0260] The video encoding device 1900 according to an embodiment can generate a picture parameter set (PPS) or a sequence parameter set (SPS) including an initial value of QP and picture header QP differential value information.
[0261] As described above, when the same QP is set for the coding units included in the current picture at the picture level, the QP can be signaled only in the picture header, so that the amount of bits for signaling the QP can be reduced. That is, the QP differential value can be signaled once only in the picture header of the current picture without the need 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, a QP can be set separately for each slice in order to set the QP in more detail, and a QP differential value can be signaled for each slice header.
[0262] Hereinafter, a syntax structure for signaling picture header QP differential value information will be described in detail with reference to FIG. 22 to FIG.
[0263] FIG. 22 illustrates a picture parameter set including picture header QP differential value information according to one embodiment.
[0264] The video encoding device 1900 may include, in the picture parameter set syntax 2200, syntax elements pps_init_qp_minus26 2210 and pps_qp_delta_info_in_ph_flag 2220. The syntax element pps_qp_delta_info_in_ph_flag 2220 may indicate whether a QP delta value for the current picture is present in the picture header of the current picture.
[0265] The video decoding device 1700 may 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 may obtain an initial value of QP applicable to the current picture or a slice included in the current picture from the syntax element pps_init_qp_minus26 2210. The video decoding device 1700 may determine from the syntax element pps_qp_delta_info_in_ph_flag 2220 whether a QP differential value for the current picture exists in the picture header of the current picture.
[0266] The syntax element pps_init_qp_minus26 2210 may indicate an initial value of QP SliceQpY applicable to the current picture or slices contained in the current picture. If the picture QP differential value ph_qp_delta is decoded to a non-zero value in the picture header, the initial value of SliceQpY is also adjusted using the QP differential value at the picture level. If the slice QP differential value sh_qp_delta is decoded to a non-zero value in the slice header, the initial value of SliceQpY is also adjusted using the QP differential value at the slice level. The value of pps_init_qp_minus26 2210 may range from -(26+QpBdOffset) to +37. QpBdOffset may be determined by the bit depth. SliceQpY may be determined by the following formula depending on whether ph_qp_delta or sh_qp_delta is decoded:
[0267] SliceQpY = 26 + pps_init_qp_minus26 + ph_qp_delta SliceQpY = 26 + pps_init_qp_minus26 + sh_qp_delta Therefore, the QP SliceQpY of the luma component of the slice can be determined at −QpBdOffset with a range up to +63.
[0268] FIG. 23 illustrates a picture header including a QP differential value for the current picture according to one embodiment.
[0269] 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 previous picture parameter set syntax 2200 indicates 1 (2310), the syntax element ph_qp_delta 2320 may be included in the picture header syntax 2300.
[0270] The video decoding device 1700 may obtain a syntax element ph_qp_delta 2320 from the picture header syntax 2300. Specifically, when pps_qp_delta_info_in_ph_flag 2220 obtained from the previous picture parameter set syntax 2200 indicates 1 (2310), the syntax element ph_qp_delta 2320 may be obtained from the picture header syntax 2300. In this case, for a current picture corresponding to the picture header syntax 2300, the QP of the picture may be determined by adding the syntax elements pps_init_qp_minus26 2210 and ph_qp_delta 2320. The QP of the picture may be applied to all coding units included in the current picture. When the QP difference value of the coding unit is obtained from the syntax structure corresponding to each coding unit, the QP of the coding unit may be determined by adding the QP difference value of the coding unit and the QP of the picture. The video decoding device 1700 may perform inverse quantization on the transform samples of the coding unit by using the QP determined for each coding unit.
[0271] FIG. 24 illustrates a slice header including a QP differential value for the current slice according to one embodiment.
[0272] 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 a current slice. Specifically, when pps_qp_delta_info_in_ph_flag 2220 included in the previous picture parameter set syntax 2200 indicates 0 (2410), the slice header syntax 2400 may include the syntax element sh_qp_delta 2420. 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 indicate the QP difference value of the chroma Cb component and the QP difference value of the chroma Cr component, respectively.
[0273] The video decoding device 1700 may acquire a syntax element sh_qp_delta 2420 from the slice header syntax 2400. Specifically, when pps_qp_delta_info_in_ph_flag 2220 acquired from the previous picture parameter set syntax 2200 indicates 0 (2410), the syntax element sh_qp_delta 2420 may be acquired from the slice header syntax 2400. In this case, for a current slice corresponding to the slice header syntax 2400, the QP of the luma component of the slice may be determined by adding the syntax elements pps_init_qp_minus26 2210 and sh_qp_delta 2420. The QP of the luma component of the slice may be applied to all coding units included in the current slice. When the QP differential value of the luma component of the coding unit is obtained from the syntax structure corresponding to each coding unit, the QP of the luma component of the coding unit can be determined by adding the QP differential value of the luma component of the coding unit and the QP of the luma component of the slice.
[0274] Also, the video decoding apparatus 1700 may parse syntax elements sh_cb_qp_offset and sh_cr_qp_offset 2430 from the slice header syntax 2400. From the syntax elements sh_cb_qp_offset and sh_cr_qp_offset 2430, the QP difference value of the chroma Cb component and the QP difference value of the chroma Cr component may be obtained, respectively. Thus, the video decoding apparatus 1700 may determine a QP for the chroma Cb component of a coding unit included in the current slice using the QP difference value of the chroma Cb component, and may determine a QP for the chroma Cr component of a coding unit included in the current slice using the QP difference value of the chroma Cr component. The video decoding apparatus 1700 may perform inverse quantization on transform samples of the coding units using the QP determined for each coding unit.
[0275] sh_cb_qp_offset and sh_cr_qp_offset 2430 are also values ranging from -12 to 12, respectively.
[0276] The QP offset of the Cb component in the slice may be determined as pps_cb_qp_offset+sh_cb_qp_offset, where the value of pps_cb_qp_offset+sh_cb_qp_offset may be determined within the range of −12 to +12. Similarly, the QP offset of the Cr component in the slice may be determined as pps_cr_qp_offset+sh_cr_qp_offset, where the value of pps_cr_qp_offset+sh_cr_qp_offset may be determined within the range of −12 to +12.
[0277] In addition, when a QP difference value (delta QP) is signaled at the coding unit level, the QP determined at the tile start, slice start, picture header, or slice header is also used as the initial value of the QP. For example, when the QP is determined at the picture header and a slice or tile exists in the picture, the QP determined at the picture header at the start of the slice or tile may be used as the initial value. Thus, the QP of the coding unit may be determined by adding the QP difference value of the coding unit signaled at the coding unit level and the initial value of the QP determined at the tile start or slice start.
[0278] As another example, when signaling a picture order counter (POC), POC information may be included only in a picture header, not in a slice header. In such a case, it may be difficult to determine which picture a particular slice belongs to. However, it is possible to determine the index of the picture to which the slice belongs by using a timestamp or sequence number signaled at the system level. In addition, it is also possible to determine that information of a particular slice or picture header has been lost by receiving a notification from an external system of the codec.
[0279] According to an embodiment of the video encoding method and the video decoding method, a method for transmitting a QP differential value may be determined according to picture characteristics or data transmission efficiency, and the QP differential value may be signaled according to the determined method.
[0280] Syntax structures for selectively signaling parameters available in various tools at the picture level or slice level will be detailed below with reference to Figures 25 to 32. Through a flag signaled in the picture sequence set, it can be determined whether the tool-related parameters are signaled in the picture header or the slice header.
[0281] FIG. 25 illustrates a picture parameter set including information indicating whether a picture header includes deblocking filter related parameters, according to one embodiment.
[0282] The video encoding device 1900 may include, in the picture parameter set syntax 2500, a pps_dbf_info_in_ph_flag 2510. The syntax element pps_dbf_info_in_ph_flag 2510 may indicate whether a deblocking filtering related parameter difference value for the current picture is present in the picture header of the current picture.
[0283] The video decoding device 1700 may parse the pps_dbf_info_in_ph_flag 2510 from the picture parameter set syntax 2500. The video decoding device 1700 may determine from the syntax element pps_dbf_info_in_ph_flag 2510 whether deblocking filtering related parameters for the current picture are present in the current picture header.
[0284] FIG. 26 illustrates a picture header containing deblocking filter related parameters for the current picture according to one embodiment.
[0285] 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, and ph_cr_tc_offset_div2 2620 in the picture header syntax 2600. Specifically, when the pps_dbf_info_in_ph_flag 2510 included in the previous picture parameter set (PPS) 2500 indicates 1 (2610), the picture header syntax 2600 can 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.
[0286] The video decoding device 1700 can obtain the 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, and ph_cr_tc_offset_div2 2620 from the picture header syntax 2600. Specifically, when the pps_dbf_info_in_ph_flag 2510 included in the previous picture parameter set (PPS) 2500 indicates 1 (2610), the 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, and ph_cr_tc_offset_div2 2620 can be obtained from the picture header syntax 2600.
[0287] The syntax element ph_luma_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the luma component of a slice in the current picture. The syntax element ph_luma_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to the luma component of a slice in the current picture. The syntax element ph_cb_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the Cb component of a slice in the current picture. The syntax element ph_cb_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to the Cb component of a slice in the current picture. The syntax element ph_cr_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the Cr component of a slice in the current picture. The syntax element ph_cr_tC_offset_div2 may indicate an offset for the deblocking parameter tC to be applied to the Cr component of a slice in the current picture. The video decoding device 1700 may perform deblocking filtering on the boundary of the coding unit included in the current picture by using the deblocking filtering related parameters obtained from the picture header.
[0288] FIG. 27 illustrates a slice header including deblocking filter related parameters for the current slice according to one embodiment.
[0289] 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, and sh_cr_tc_offset_div2 2720 in the slice header syntax 2700. Specifically, when the pps_dbf_info_in_ph_flag 2510 included in the previous picture parameter set (PPS) 2500 indicates 0 (2710), the slice header syntax 2700 can 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.
[0290] The video decoding device 1700 can obtain 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, and sh_cr_tc_offset_div2 2720 from the slice header syntax 2700. Specifically, when the pps_dbf_info_in_ph_flag 2510 included in the previous picture parameter set (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 obtained from the slice header syntax 2700.
[0291] The syntax element sh_luma_beta_offset_div2 may indicate an offset for deblocking parameter β applied for the luma component of the current slice. The syntax element sh_luma_tC_offset_div2 may indicate an offset for deblocking parameter tC applied for the luma component of the current slice. The syntax element sh_cb_beta_offset_div2 may indicate an offset for deblocking parameter β applied for the Cb component of the current slice. The syntax element sh_cb_tC_offset_div2 may indicate an offset for deblocking parameter tC applied for the Cb component of the current slice. The syntax element sh_cr_beta_offset_div2 may indicate an offset for deblocking parameter β applied for the Cr component of the current slice. The syntax element sh_cr_tC_offset_div2 may indicate an offset for deblocking parameter tC applied for the Cr component of the current slice. The video decoding apparatus 1700 may perform deblocking filtering on the boundaries of the coding units included in the current slice using the deblocking filtering related parameters acquired from the slice header.
[0292] 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.
[0293] 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 reference picture list related parameters for the current picture are present in the picture header of the current picture. The syntax element pps_sao_info_in_ph_flag 2820 may indicate whether sample adaptive offset (SAO) related parameters for the current picture are present in the picture header of the current picture. The syntax element pps_alf_info_in_ph_flag 2830 may indicate whether adaptive loop filtering (ALF) related parameters for the current picture are present in the picture header of the current picture. The syntax element pps_wp_info_in_ph_flag 2840 may indicate whether weighted prediction related parameters for the current picture are present in the picture header of the current picture.
[0294] The video decoding device 1700 may 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 may determine whether or not reference picture list related parameters for the current picture are present in the picture header of the current picture from the syntax element pps_rpl_info_in_ph_flag 2810. The video decoding device 1700 may determine whether or not SAO related parameters for the current picture are present in the picture header of the current picture from the syntax element pps_sao_info_in_ph_flag 2820. The video decoding device 1700 may determine whether or not ALF-related parameters for the current picture are present in the picture header of the current picture from the syntax element pps_alf_info_in_ph_flag 2830. The video decoding device 1700 may determine whether or not weighted prediction-related parameters for the current picture are present in the picture header of the current picture from the syntax element pps_wp_info_in_ph_flag 2840.
[0295] FIG. 29 illustrates a picture header including weighted prediction-related parameters, SAO-related parameters, and reference picture list-related parameters of a current picture according to one embodiment.
[0296] The video encoding device 1900 may include a weight prediction syntax pred_weight_table( ) 2920 in the picture header syntax 2900. Specifically, when a pps_wp_info_in_ph_flag 2840 included in a previous picture parameter set (PPS) 2800 indicates 1 (2910), the weight prediction syntax pred_weight_table( ) 2920 may be included in the picture header syntax 2900.
[0297] The video decoding device 1700 can call the weight prediction syntax pred_weight_table( ) 2920 from the picture header syntax 2900. Specifically, when pps_wp_info_in_ph_flag 2840 included in the previous picture parameter set (PPS) 2800 indicates 1 (2910), the video decoding device 1700 can call the weight prediction syntax pred_weight_table( ) 2920 from the picture header syntax 2900.
[0298] The video decoding apparatus 1700 may acquire parameters for determining weights of luma components and weights of chroma components required for performing weighted prediction from the weighted prediction syntax pred_weight_table() 2920. The video decoding apparatus 1700 may perform weighted prediction using weights of luma components and weights of chroma components for a block included in a current picture.
[0299] 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 previous picture parameter set (PPS) 2800 indicates 1 (2930), the picture header syntax 2900 may include syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag 2940.
[0300] The video decoding device 1700 may acquire 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 previous picture parameter set (PPS) 2800 indicates 1 (2930), the video decoding device 1700 may acquire syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag 2940 from the picture header syntax 2900.
[0301] The video decoding device 1700 may 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 may determine whether SAO is performed for the chroma components of the current picture from the syntax element ph_sao_chroma_enabled_flag. The video decoding device 1700 may perform SAO on the luma component and the chroma component of the largest coding unit included in the current picture based on the syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag 2940, respectively.
[0302] The video encoding device 1900 may include a reference picture list syntax ref_pic_lists() (2960) in the picture header syntax 2900. Specifically, when a pps_rpl_info_in_ph_flag 2810 included in a previous picture parameter set (PPS) 2800 indicates 1 (2950), the video encoding device 1900 may include a reference picture list syntax ref_pic_lists() (2960) in the picture header syntax 2900.
[0303] The video decoding device 1700 can call the reference picture list syntax ref_pic_lists() 2960 from the picture header syntax 2900. Specifically, when a pps_rpl_info_in_ph_flag 2810 included in a previous picture parameter set (PPS) 2800 indicates 1 (2950), the video decoding device 1700 can call the reference picture list syntax ref_pic_lists() 2960 from the picture header syntax 2900.
[0304] The video decoding device 1700 may acquire parameters for determining a reference picture list for a block of the current picture from the reference picture list syntax ref_pic_lists() 2960. The video decoding device 1700 may determine a reference picture list for a block included in the current picture using the parameters acquired from the reference picture list syntax ref_pic_lists() 2960, and perform inter prediction using the reference picture list for each block.
[0305] FIG. 30 illustrates a picture header containing ALF-related parameters of the current picture according to one embodiment.
[0306] The video encoding device 1900 may include in the picture header syntax 3000 the 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. Specifically, when the pps_alf_info_in_ph_flag 2830 included in the previous picture parameter set (PPS) 2800 indicates 1 (3010), the picture header syntax 3000 may include the 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.
[0307] The video encoding device 1900 can obtain the 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 the pps_alf_info_in_ph_flag 2830 included in the previous picture parameter set (PPS) 2800 indicates 1 (3010), the 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.
[0308] The syntax element ph_num_alf_aps_ids_luma indicates the number of ALF APSs referenced by a slice included in the current picture. The syntax element ph_alf_aps_id_luma[i] indicates the aps_adaptation_parameter_set_id of the i-th ALF APS referenced by the luma component of a slice included in the current picture. The syntax element ph_alf_cb_enabled_flag indicates whether ALF is enabled for the Cb component of the current picture. The syntax element ph_alf_cr_enabled_flag indicates whether ALF is enabled 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 component of a slice included in the current picture. The syntax element ph_alf_cc_cb_enabled_flag indicates whether cross-component ALF is permitted 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 component of a slice included in the current picture. The syntax element ph_alf_cc_cr_enabled_flag indicates whether cross-component ALF is permitted 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 component of a slice included in the current picture.
[0309] The video decoding device 1700 can perform ALF for the luma component and chroma component for each maximum coding unit of the current picture using the acquired 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.
[0310] FIG. 31 illustrates a slice header including reference picture list-related parameters, weighted prediction-related parameters, and SAO-related parameters of a current slice according to one embodiment.
[0311] The video encoding device 1900 may include a reference picture list syntax ref_pic_lists() 3120 in the slice header syntax 3100. Specifically, when a pps_rpl_info_in_ph_flag 2810 included in a previous picture parameter set (PPS) 2800 indicates 0 (3110), the slice header syntax 3100 may include a reference picture list syntax ref_pic_lists() 3120.
[0312] The video decoding device 1700 can call the reference picture list syntax ref_pic_lists() 3120 from the slice header syntax 3100. Specifically, when a pps_rpl_info_in_ph_flag 2810 included in a previous picture parameter set (PPS) 2800 indicates 0 (3110), the video decoding device 1700 can call the reference picture list syntax ref_pic_lists() 3120 from the slice header syntax 3100.
[0313] The video decoding device 1700 may acquire parameters for determining a reference picture list from a block of the current slice from the reference picture list syntax ref_pic_lists() 3120. The video decoding device 1700 may determine a reference picture list for a block included in the current slice using the parameters acquired from the reference picture list syntax ref_pic_lists() 3120, and perform inter prediction using the reference picture list for each block.
[0314] The video encoding device 1900 may include a weight prediction syntax pred_weight_table( ) 3140 in the slice header syntax 3100. Specifically, when a pps_wp_info_in_ph_flag 2840 included in a previous picture parameter set (PPS) 2800 indicates 0 (3130), the slice header syntax 3100 may include a weight prediction syntax pred_weight_table( ) 3140.
[0315] The video decoding device 1700 may call the weight prediction syntax pred_weight_table( ) 3140 from the slice header syntax 3100. Specifically, when a pps_wp_info_in_ph_flag 2840 included in a previous picture parameter set (PPS) 2800 indicates 0 (3130), the video decoding device 1700 may call the weight prediction syntax pred_weight_table( ) 3140 from the slice header syntax 3100.
[0316] The video decoding apparatus 1700 may acquire parameters for determining weights of luma components and weights of chroma components required for performing weighted prediction from the weighted prediction syntax pred_weight_table() 3140. The video decoding apparatus 1700 may perform weighted prediction using weights of luma components and weights of chroma components for a block included in a current slice.
[0317] The video encoding device 1900 can 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 previous picture parameter set (PPS) 2800 indicates 0 (3150), the slice header syntax 3100 can include syntax elements sh_sao_luma_used_flag and sh_sao_chroma_used_flag 3160.
[0318] The video decoding device 1700 can acquire syntax elements sh_sao_luma_used_flag and sh_sao_chroma_used_flag 3160 from the slice header syntax 3100. Specifically, when pps_sao_info_in_ph_flag 2820 included in the previous picture parameter set (PPS) 2800 indicates 0 (3150), the video decoding device 1700 can acquire syntax elements sh_sao_luma_used_flag and sh_sao_chroma_used_flag 3160 from the slice header syntax 3100.
[0319] The video decoding device 1700 may 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 may 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 may perform SAO on the luma component and chroma component of the largest coding unit included in the current slice based on the syntax elements sh_sao_luma_used_flag and sh_sao_chroma_used_flag 3160, respectively.
[0320] FIG. 32 illustrates a slice header including ALF-related parameters for the current slice according to one embodiment.
[0321] The video encoding device 1900 may include in the slice header syntax 3200 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. Specifically, when the pps_alf_info_in_ph_flag 2830 included in the previous picture parameter set (PPS) 2800 indicates 0 (3210), the slice header syntax 3200 can include 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.
[0322] The video encoding device 1900 can obtain 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 from the slice header syntax 3200. Specifically, when the pps_alf_info_in_ph_flag 2830 included in the previous picture parameter set (PPS) 2800 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 obtained from the slice header syntax 3200.
[0323] 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 i-th ALF APS referenced by the luma component of the current slice. The syntax element sh_alf_cb_enabled_flag indicates whether ALF is enabled for the Cb component of the current slice. The syntax element sh_alf_cr_enabled_flag indicates whether ALF is enabled 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 permitted 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 permitted 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.
[0324] The video decoding device 1700 can perform ALF for the luma component and chroma component for each maximum coding unit of the current slice using the acquired 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.
[0325] The video decoding device 1700 according to an embodiment and the video encoding device 1900 according to an embodiment may selectively signal the deblocking filtering related parameters, the reference picture list related parameters, the weighted prediction related parameters, the SAO related parameters, and the ALF related parameters on a picture-by-picture or slice-by-slice basis. Thus, the video encoding device 1900 according to an embodiment may determine whether to signal the tool-specific related parameters on a picture-by-picture basis or on a slice-by-slice basis according to characteristics of a data picture or data transmission efficiency, and may signal the tool-specific related parameters in a manner with high transmission efficiency. The video decoding device 1700 according to an embodiment may determine whether to acquire the tool-specific related parameters on a picture-by-picture basis or on a slice-by-slice basis based on information acquired from a picture parameter set, and may acquire the tool-specific related parameters on a picture-by-picture basis or on a slice-by-slice basis. Therefore, when the tool-related parameters are signaled on a picture-by-picture basis, the tool-related parameters do not need to be signaled on a slice-by-slice basis included in the picture, and therefore data for signaling the tool-related parameters can be reduced.
[0326] The above-described embodiment of the present disclosure can be created into a program that can be executed by a computer, and the created program can also be stored on a medium.
[0327] The medium may be a medium for continuously storing a computer executable program or a medium for temporarily storing the program for execution or download. The medium may be a variety of recording or storage means in the form of a single or multiple pieces of hardware, and is not limited to a medium directly connected to a computer system, but may be a medium distributed over a network. Examples of the medium include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs (compact disc read-only memories) and DVDs (digital versatile discs); magnetic-optical media such as floptical disks; and read-only memory (ROM), random access memory (RAM), flash memory, etc., which are configured to store program instructions. The machine-readable recording medium may also be provided in the form of a non-transitory recording medium. Here, the term "non-transitory recording medium" simply means a tangible device that does not include signals (e.g., electromagnetic waves), and the term does not distinguish between data that is stored semi-permanently on a recording medium and data that is stored temporarily. For example, a "non-transitory recording medium" also includes a buffer in which data is temporarily stored.
[0328] Further examples of other media include app stores that distribute applications, sites that supply and distribute a variety of other software, and recording media or storage recording media managed by servers.
[0329] According to one embodiment, the method according to the various embodiments disclosed herein may be included in a computer program product. The computer program product may be traded between a seller and a buyer as a commodity. The computer program product may be distributed in the form of a machine-readable recording medium (e.g., 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 part of the computer program product (e.g., a downloadable app) may be at least temporarily stored or temporarily generated in a machine-readable recording medium such as the memory of a manufacturer's server, an application store server, or an intermediary server.
[0330] The above describes in detail the technical ideas of the present disclosure by citing preferred embodiments. However, the technical ideas of the present disclosure are not limited to the above-described embodiments, and various modifications and changes may be made by those skilled in the art within the scope of the technical ideas of the present disclosure.
Claims
1. obtaining a quantization parameter (QP) initial value to be applied to a current picture from a picture parameter set; obtaining a QP differential value flag indicating whether a QP differential value exists in a picture header of the current picture from the picture parameter set; if the QP differential value flag indicates that a QP differential value exists in the picture header of the current picture, obtaining a first QP differential value for the current picture from the picture header and determining a first QP for at least one slice included in the current picture using the first QP differential value obtained for the current picture and the QP initial value; performing inverse quantization on transform coefficients included in a first slice of the at least one slice using the first QP for the at least one slice; if the QP differential value flag indicates that the QP differential value does not exist in the picture header, obtaining a second QP differential value for the current slice from a slice header of a current slice included in the current picture and determining a first QP for the current slice. determining a second QP for the current slice using a QP difference value and the QP initial value; and performing inverse quantization on transform coefficients included in the current slice using the second QP, wherein when the first QP difference value is obtained from a picture header of the current picture according to the QP difference value flag, a QP difference value for the at least one slice included in the current picture is not separately obtained from a slice header of the at least one slice.
2. An acquisition unit for acquiring a quantization parameter (QP) initial value to be applied to a current picture from a picture parameter set, acquiring a QP differential value flag indicating whether a QP differential value exists in a picture header of the current picture from the picture parameter set, and acquiring a first QP differential value for the current picture from the picture header if the QP differential value flag indicates that the QP differential value exists in the picture header, and acquiring a second QP differential value for the current slice from a slice header of a current slice included in the current picture if the QP differential value flag indicates that the QP differential value does not exist in the picture header; and determining a first QP for at least one slice included in the current picture using the first QP differential value acquired for the current picture and the QP initial value if the QP differential value flag indicates that a QP differential value exists in the picture header of the current picture, and performing inverse quantization on transform coefficients included in a first slice of the at least one slice using a QP; and if the QP difference value flag indicates that the QP difference value does not exist in the picture header, determining a second QP for the current slice using the second QP difference value obtained for the current slice and the QP initial value, and performing inverse quantization on transform coefficients included in the current slice using the second QP, wherein if the first QP difference value is obtained from a picture header of the current picture according to the QP difference value flag, a QP difference value for the at least one slice included in the current picture is not separately obtained from a slice header of the at least one slice.
3. A method for transmitting a bitstream generated by a video encoding method, comprising the steps of: determining a quantization parameter (QP) initial value to be applied to a current picture; encoding a QP differential value flag indicating the presence or absence of a QP differential value in a picture header of the current picture; performing quantization on transform coefficients included in at least one slice included in the current picture using a first QP for the at least one slice included in the current picture if the QP differential value flag is encoded to indicate the presence of a QP differential value in the picture header of the current picture, determining a first QP differential value between the first 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 if the QP differential value flag is encoded to indicate the absence of the QP differential value in the picture header of the current picture, performing quantization on transform coefficients included in the at least one slice included in the current picture using a first QP for the at least one slice included in the current picture, determining a first QP differential value between the first QP used in the current picture and the QP initial value, performing quantization on transform coefficients included in the current slice using a QP, determining a second QP difference value between the second QP used in the 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 difference value; generating a picture parameter set including the QP difference value flag and the QP initial value; and transmitting a bitstream including the picture parameter set; and wherein if the first QP difference value exists in a picture header of the current picture, a QP difference value for the at least one slice included in the current picture is not separately included in a slice header of the at least one slice.
4. A video encoding device, comprising: a quantization unit that determines a QP initial value to be applied to a current picture; and an information encoding unit that encodes a QP differential value flag indicating the presence or absence of a QP differential value in a picture header of the current picture and generates a picture parameter set including the QP initial value and the QP differential value flag, wherein if the QP differential value flag is encoded to indicate that a QP differential value exists in the picture header of the current picture, the quantization unit performs quantization on transform coefficients included in at least one slice included in the current picture using a first QP for the at least one slice included in the current picture, the information encoding unit determines a first QP differential value between the first QP used in the current picture and the QP initial value, and generates a picture header for the current picture including the first QP differential value, and if the QP differential value flag is encoded to indicate that the QP differential value does not exist in the picture header, the quantization unit performs quantization on transform coefficients included in the at least one slice using a first QP for the at least one slice included in the current picture, and performing quantization on transform coefficients included in the current slice using a QP, the information encoding unit determining a second QP difference value between the second QP used in the current slice included in the current picture and the initial QP value, and generating a slice header for the current slice including the second QP difference value; and if the first QP difference value exists in a picture header of the current picture, the information encoding unit does not separately include a QP difference value for the at least one slice included in the current picture in a slice header of the at least one slice.
Citation Information
Patent Citations
Image processing apparatus, image processing method, program and recording medium
JP2014195319A