Video decoding method and device for obtaining quantization parameters and video encoding method and device for sending quantization parameters

By dynamically determining the quantization parameter (QP) of the codec unit in video encoding and decoding, the problem of reconstruction quality deterioration caused by uniform square codec units in high-resolution images is solved, and the encoding and decoding efficiency and image quality are improved.

CN115280773BActive Publication Date: 2025-10-03SAMSUNG ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202180020581.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-01-10
Filing Date
2021-01-08
Publication Date
2025-10-03
Estimated Expiration
2041-01-08

AI Technical Summary

Technical Problem

In the prior art, video coding and decoding of high-resolution images uses uniform square coding units, which leads to the problem of deterioration of reconstructed image quality.

Method used

In the video decoding and encoding method, a picture parameter set is used to obtain a quantization parameter (QP) initial value and difference information, the QP of the codec unit is dynamically determined, and an inverse quantization process is performed to reconstruct the codec unit.

Benefits of technology

The sending and notification of quantization parameter differences can be flexibly determined based on data transmission efficiency and picture characteristics, thereby improving the efficiency and image quality of video encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115280773B_ABST
    Figure CN115280773B_ABST
Patent Text Reader

Abstract

A video decoding method is provided, including: obtaining a quantization parameter (QP) initial value and picture header QP difference information to be applied to a current picture from a picture parameter set; when the picture header QP difference information indicates that QP difference information exists in a picture header of the current picture, obtaining a first QP difference value of the current picture from a picture header; determining a QP of a codec unit included in the current picture by using the QP initial value and the first QP difference value; performing inverse quantization on the codec unit by using the QP to obtain a transform coefficient of the codec unit; and reconstructing the codec unit by using the transform coefficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a video decoding method and apparatus and a video encoding method and apparatus, and more particularly, to a method and apparatus for encoding and decoding a video by efficiently implementing a quantization parameter (QP). Background Art

[0002] In a typical compression method, square codec units are determined through a recursive division process. In this recursive division process, while determining the size of the codec unit, it is determined whether to divide the codec unit included in the picture, and then the codec unit is evenly divided into four codec units of the same size. However, recently, the image quality degradation of the reconstructed image caused by using codec units with a uniform square shape for high-resolution images has become a problem. Therefore, a method and apparatus for dividing a high-resolution image into codec units of various shapes have been proposed. Summary of the Invention

[0003] Technical issues

[0004] The present disclosure relates to a video decoding method and apparatus and a video encoding method and apparatus, and an object thereof is to provide a method for efficiently transmitting a quantization parameter (QP) difference value through a video encoding apparatus thereof and a method for efficiently obtaining a QP difference value through a video decoding apparatus thereof.

[0005] Technical Solution

[0006] A video decoding method provided according to an embodiment of the present disclosure may include: obtaining a quantization parameter (QP) initial value to be applied to a current picture from a picture parameter set, and obtaining picture header QP difference information indicating whether QP difference information exists in a picture header of the current picture from the picture parameter set; when the picture header QP difference information indicates that QP difference information exists in a picture header of the current picture, obtaining a first QP difference of the current picture from the picture header; determining a QP of a codec unit included in the current picture by using the QP initial value and the first QP difference; performing inverse quantization on the codec unit by using the QP to obtain a transform coefficient of the codec unit; and reconstructing the codec unit by using the transform coefficient.

[0007] Beneficial effects

[0008] According to the video encoding method and the video decoding method of the embodiment, a method of transmitting a difference in a quantization parameter (QP) may be determined according to data transmission efficiency or characteristics of a picture, and the difference in QP may be signaled according to the method. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] A brief description of each figure is provided to provide a better understanding of the figures referenced herein.

[0010] Figure 1 is a schematic block diagram of an image decoding apparatus according to an embodiment.

[0011] Figure 2 is a flowchart of an image decoding method according to an embodiment.

[0012] Figure 3 A process of determining at least one coding unit by dividing a current coding unit, performed by an image decoding apparatus according to an embodiment, is shown.

[0013] Figure 4 A process of determining at least one codec unit by dividing a non-square codec unit, performed by an image decoding apparatus according to an embodiment, is shown.

[0014] Figure 5 A process of dividing a codec unit based on at least one of block shape information or division shape mode information, performed by an image decoding apparatus according to an embodiment, is shown.

[0015] Figure 6 A method of determining a specific codec unit from among an odd number of codec units, performed by an image decoding apparatus according to an embodiment, is illustrated.

[0016] Figure 7 1. The order in which a plurality of codec units are processed when the image decoding apparatus determines a plurality of codec units by dividing a current codec unit according to an embodiment is shown.

[0017] Figure 8 A process of determining that a current codec unit is to be divided into an odd number of codec units, performed by an image decoding apparatus, is shown according to an embodiment when codec units cannot be processed in a specific order.

[0018] Figure 9 A process of determining at least one coding unit by dividing a first coding unit, performed by an image decoding apparatus according to an embodiment, is shown.

[0019] Figure 10 It is shown that according to an embodiment, when a second codec unit having a non-square shape determined when an image decoding apparatus divides a first codec unit satisfies a specific condition, the shapes into which the second codec unit can be divided are restricted.

[0020] Figure 11 A process of dividing a square codec unit performed by an image decoding apparatus when division shape pattern information cannot indicate that the square codec unit is divided into four square codec units according to an embodiment is shown.

[0021] Figure 12It is shown that the processing order among the plurality of codec units according to the embodiment may be changed depending on the process of dividing the codec units.

[0022] Figure 13 A process of determining the depth of a codec unit as the shape and size of the codec unit change when the codec unit is recursively divided to determine a plurality of codec units according to an embodiment is shown.

[0023] Figure 14 1. It shows that a depth may be determined based on a shape and size of a codec unit and a partial index (PID) for distinguishing the codec units according to an embodiment.

[0024] Figure 15 It is shown that a plurality of coding units are determined based on a plurality of specific data units included in a picture according to an embodiment.

[0025] Figure 16 It is a block diagram of an image encoding and decoding system.

[0026] Figure 17 is a block diagram of a video decoding apparatus according to an embodiment.

[0027] Figure 18 is a flowchart of a video decoding method according to an embodiment.

[0028] Figure 19 is a block diagram of a video encoding apparatus according to an embodiment.

[0029] Figure 20 is a flowchart of a video encoding method according to an embodiment.

[0030] Figure 21 is an overview for introducing a quantization parameter (QP) in a picture level or a slice level according to an embodiment.

[0031] Figure 22 A picture parameter set including picture header QP difference information according to an embodiment is shown.

[0032] Figure 23 A picture header including a QP difference value of a current picture is shown according to an embodiment.

[0033] Figure 24 A slice header including a QP difference value for a current slice is shown according to an embodiment.

[0034] Figure 25 A picture parameter set including information indicating whether a picture header includes deblocking filter related parameters according to an embodiment is shown.

[0035] Figure 26A picture header including deblocking filter related parameters of a current picture according to an embodiment is shown.

[0036] Figure 27 A slice header including deblocking filter related parameters of a current slice according to an embodiment is shown.

[0037] Figure 28 A picture parameter set including information indicating whether a picture header includes a variety of tool-related parameters according to an embodiment is shown.

[0038] Figure 29 A picture header including weighted prediction related parameters of a current picture, sample adaptive offset (SAO) related parameters, and reference picture list related parameters according to an embodiment is shown.

[0039] Figure 30 A picture header including adaptive loop filter (ALF) related parameters of a current picture according to an embodiment is shown.

[0040] Figure 31 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 is shown.

[0041] Figure 32 A slice header including ALF-related parameters of a current slice according to an embodiment is shown.

[0042] Best Mode

[0043] According to an embodiment provided by the present disclosure, a video decoding method includes: obtaining a quantization parameter (QP) initial value to be applied to a current picture from a picture parameter set, and obtaining picture header QP difference information indicating whether QP difference information exists in a picture header of the current picture from the picture parameter set; when the picture header QP difference information indicates that QP difference information exists in a picture header of the current picture, obtaining a first QP difference value of the current picture from the picture header; determining a QP of a codec unit included in the current picture by using the QP initial value and the first QP difference value; performing inverse quantization on the codec unit by using the QP to obtain a transform coefficient of the codec unit; and reconstructing the codec unit by using the transform coefficient.

[0044] According to an embodiment, the video decoding method may further include: when the picture header QP difference information indicates that the QP difference information does not exist in the picture header, obtaining a second QP difference of the current slice included in the current picture from the slice header of the current slice; determining the QP of the codec unit included in the current slice by using the QP initial value and the second QP difference; performing inverse quantization on the codec unit by using the QP to obtain a transform coefficient of the codec unit; and reconstructing the codec unit by using the transform coefficient.

[0045] According to an embodiment, obtaining a transform coefficient of a codec unit by performing inverse quantization on the codec unit using a QP may include: obtaining a QP difference value of a luma component of a current picture from a picture header; determining a QP of a luma component of a slice included in the current picture by adding a QP initial value and a first QP difference value of the luma component; and determining a QP of a codec unit included in the current picture and in the slice by using the QP of the luma component of the slice.

[0046] According to an embodiment, determining the QP of the coding unit may include: obtaining a QP difference value of the coding unit from a bitstream; and determining the QP of the luma component of the coding unit by using the QP of the luma component of the slice and the QP difference value of the coding unit.

[0047] According to an embodiment, obtaining a transform coefficient of a codec unit by performing inverse quantization on the codec unit using a QP may include: obtaining a second QP difference value of a luma component of a current slice from a slice header; determining a QP of a luma component of the current slice by adding a QP initial value and the second QP difference value of the luma component; and determining a QP of a codec unit included in the current slice by using the QP of the luma component of the current slice.

[0048] According to an embodiment, determining the QP of the coding unit may include: obtaining a QP difference value of the coding unit from a bitstream; and determining the QP of the luma component of the coding unit by using the QP of the luma component of the current slice and the QP difference value of the coding unit.

[0049] According to an embodiment, obtaining a transform coefficient of a codec unit by performing inverse quantization on the codec unit using the QP may include: obtaining a Cb QP difference value of a Cb chroma component of a current slice and a Cr QP difference value of a Cr chroma component of a current slice from a slice header; updating the QP of the Cb chroma component of the current codec unit by using the Cb QP difference value of the Cb chroma component of the current slice to determine the Cb QP of the Cb chroma component of the current codec unit included in the current slice; and updating the QP of the Cr chroma component of the current codec unit by using the Cr QP difference value of the Cr chroma component of the current slice to determine the Cr QP of the Cr chroma component of the current codec unit.

[0050] A video decoding apparatus according to an embodiment of the present disclosure includes: an obtainer configured to obtain a QP initial value to be applied to a current picture from a picture parameter set, obtain picture header QP difference information indicating whether QP difference information is included in a picture header of the current picture from the picture parameter set, and when the picture header QP difference information indicates that the QP difference information is included in the picture header, obtain a first QP difference of the current picture from the picture header; and a decoder configured to determine a QP of a codec unit included in the current picture by using the QP initial value and the first QP difference when the picture header QP difference information indicates that the QP difference information is included in the picture header, obtain a transform coefficient of the codec unit by performing inverse quantization on the codec unit by using the QP, and reconstruct the codec unit by using the transform coefficient of the codec unit.

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

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

[0053] According to an embodiment, generating a picture header of a current picture, the picture header including a first QP difference value, may include: determining a QP of a luma component of a slice included in the current picture; and determining the first QP difference value of the luma component of the current picture by using a difference value between the QP initial value and the QP of the luma component of the slice included in the current picture.

[0054] According to an embodiment, determining the first QP difference may include: determining the QP difference of the coding unit by using a difference between the QP of the luma component of the coding unit and the QP of the luma component of the slice; and encoding the QP difference of the coding unit.

[0055] According to an embodiment, generating a slice header of a current slice, the slice header including a second QP difference value, may include: determining a QP of a luma component of the current slice; and determining the second QP difference value of the luma component of the current slice by using a difference between the QP of the luma component of the current slice and an initial QP value.

[0056] According to an embodiment, determining the second QP difference may include: determining the QP difference of the coding unit by subtracting the QP of the luma component of the current slice from the QP of the luma component of the coding unit; and encoding the QP difference of the coding unit.

[0057] According to an embodiment, determining the second QP difference may include: determining a Cb QP difference value of a Cb chroma component of a current codec unit included in a current slice, the Cb QP difference value being used to determine the QP of the Cb chroma component of the current codec unit; determining a Cr QP difference value of a Cr chroma component of the current codec unit, the Cr QP difference value being used to determine the QP of the Cr chroma component of the current codec unit; and encoding the Cb QP difference value of the Cb chroma component of the current slice and the Cr QP difference value of the Cr chroma component of the current slice, and generating a slice header for the current slice, the slice header including the Cb QP difference value and the Cr QP difference value.

[0058] A computer-readable recording medium having recorded thereon a program for executing the video decoding method according to an embodiment of the present disclosure on a computer.

[0059] A computer-readable recording medium having recorded thereon a program for executing the video encoding method according to an embodiment of the present disclosure on a computer. DETAILED DESCRIPTION

[0060] Since the present disclosure allows for various changes and numerous examples, specific embodiments will be shown in the drawings and described in detail in the written description. However, this is not intended to limit the present disclosure to a specific mode of practice, and it will be understood that all changes, equivalents, and substitutes that do not depart from the spirit and technical scope of the present disclosure are included in the present disclosure.

[0061] In the description of the embodiment, when it is thought that some detailed explanations of the related art may unnecessarily obscure the essence of the present disclosure, these explanations are omitted. In addition, the numbers (e.g., first, second, etc.) used in the description of the specification sheets are merely identifiers for distinguishing one element from another.

[0062] Furthermore, in this specification, it should be understood that when elements are “connected” or “coupled” to each other, the elements can be directly connected or coupled to each other, but may optionally be connected or coupled to each other through intervening elements, unless otherwise stated.

[0063] In this specification, regarding elements represented as "units" or "modules", two or more elements may be combined into one element, or one element may be divided into two or more elements according to the subdivided functions. In addition, each element described below may perform part or all of the functions performed by another element in addition to its own main function, and some main functions of each element may be completely performed by another component.

[0064] Furthermore, in this specification, “image” or “picture” may refer to a still image or a moving image of a video, that is, the video itself.

[0065] In this specification, "sample" refers to data assigned to a sampling location of an image, that is, data to be processed. For example, pixel values ​​of an image in the spatial domain and transform coefficients of a transform region can be samples. A unit including at least one such sample can be defined as a block.

[0066] Also, in this specification, a 'current block' may refer to a block of a maximum coding unit, a coding unit, a prediction unit, or a transformation unit of a current image to be encoded or decoded.

[0067] In the present specification, a motion vector in the list 0 direction may indicate a motion vector indicating a block in a reference picture included in list 0, and a motion vector in the list 1 direction may indicate a motion vector indicating a block in a reference picture included in list 1. In addition, a unidirectional motion vector may indicate a motion vector indicating a block in a reference picture included in list 0 or list 1, and a bidirectional motion vector may indicate that a motion vector includes a motion vector in the list 0 direction and a motion vector in the list 1 direction.

[0068] In addition, in this specification, "binary split" of a block refers to a split used to generate two sub-blocks, each of which has a width or height half the width or height of the block. Specifically, when a "binary vertical split" is performed on the current block, the split is performed in the vertical direction (longitudinal direction) at half the width of the current block, thereby generating two sub-blocks having a width half the width of the current block and the same height as the current block. When a "binary horizontal split" is performed on the current block, the split is performed in the horizontal direction (lateral direction) at half the height of the current block, thereby generating two sub-blocks having a height half the height of the current block and the same width as the current block.

[0069] In addition, in this specification, "three-pronged splitting" of a block refers to splitting for generating three sub-blocks whose widths or heights are 1:2:1 of the width or height of the block. In detail, when "three-pronged vertical splitting" is performed on the current block, the split is performed in the vertical direction (longitudinal direction) at a point of 1:2:1 of the current block width, and thus, two sub-blocks having a width of 1 / 4 of the current block width and the same height as the current block, and one sub-block having a width of 2 / 4 of the current block width and the same height as the current block can be generated. When "three-pronged horizontal splitting" is performed on the current block, the split is performed in the horizontal direction (lateral direction) at a point of 1:2:1 of the current block height, and thus, two sub-blocks having a height of 1 / 4 of the current block height and the same width as the current block, and one sub-block having a height of 2 / 4 of the current block height and the same width as the current block can be generated.

[0070] In addition, in this specification, "quad partitioning" of a block refers to partitioning for generating four sub-blocks whose width and height are 1:1 of the width and height of the block. Specifically, when "quad partitioning" is performed on the current block, the partitioning is performed at half the width of the current block in the vertical direction (longitudinal direction) and at half the height of the current block in the horizontal direction (lateral direction), and thus four sub-blocks having a width of 1 / 2 the width of the current block and a height of 1 / 2 the height of the current block can be generated.

[0071] In the following, reference will be made to Figures 1 to 16 The image encoding device and the image decoding device, and the image encoding method and the image decoding method according to the embodiment are described. Figures 3 to 16 A method for determining a data unit of an image according to an embodiment will be described with reference to Figure 17 to Figure 4 0 describes a video encoding / decoding method according to an embodiment using a determined data unit.

[0072] In the following, reference will be made to Figure 1 and Figure 2 A method and apparatus for adaptive selection based on various shapes of a codec according to an embodiment of the present disclosure are described.

[0073] Figure 1 is a schematic block diagram of an image decoding apparatus according to an embodiment.

[0074] The image decoding apparatus 100 may include a receiver 110 and a decoder 120. The receiver 110 and the decoder 120 may include at least one processor. In addition, the receiver 110 and the decoder 120 may include a memory storing instructions to be executed by the at least one processor.

[0075] The receiver 110 can receive a bitstream. The bitstream includes information about an image encoded by the image encoding device 2200 described later. In addition, the bitstream can be transmitted from the image encoding device 2200. The image encoding device 2200 and the image decoding device 100 can be connected via a wired or wireless connection, and the receiver 110 can receive the bitstream via a wired or wireless connection. The receiver 110 can receive the bitstream from a storage medium such as an optical medium or a hard disk. The decoder 120 can reconstruct the image based on the information obtained from the received bitstream. The decoder 120 can obtain syntax elements for reconstructing the image from the bitstream. The decoder 120 can reconstruct the image based on the syntax elements.

[0076] Will refer to Figure 2 The operation of the image decoding device 100 is described in detail.

[0077] Figure 2 is a flowchart of an image decoding method according to an embodiment.

[0078] According to an embodiment of the present disclosure, the receiver 110 receives a bit stream.

[0079] The image decoding device 100 obtains a binary string corresponding to the division shape pattern of the codec unit from the bitstream (operation 210). The image decoding device 100 determines a division rule for the codec unit (operation 220). In addition, the image decoding device 100 divides the codec unit into a plurality of codec units based on at least one of the binary strings corresponding to the division shape pattern or the division rule (operation 230). The image decoding device 100 can determine the allowable first range of the size of the codec unit based on the aspect ratio of the codec unit, thereby determining the division rule. The image decoding device 100 can determine the allowable second range of the size of the codec unit based on the division shape pattern of the codec unit, thereby determining the division rule.

[0080] Hereinafter, the division of the encoding and decoding units will be described in detail according to an embodiment of the present disclosure.

[0081] First, a picture can be divided into one or more slices or one or more slices. A slice or a slice can be a sequence of one or more largest codec units (coding tree units (CTUs)). Compared to the largest codec unit (CTU), there is a conceptually largest codec block (codec tree block (CTB)).

[0082] A maximum codec unit (CTB) represents an NxN block (N is an integer) consisting of NxN samples. Each color component can be divided into one or more maximum codec blocks.

[0083] When a picture includes three sample arrays (sample arrays of Y, Cr, and Cb components), the maximum codec unit (CTU) includes a maximum codec block of luma samples, two corresponding maximum codec blocks of chroma samples, and a syntax structure for encoding luma samples and chroma samples. When the picture is a monochrome picture, the maximum codec unit includes a maximum codec block of monochrome samples and a syntax structure for encoding monochrome samples. When the picture is coded in color planes separated by color components, the maximum codec unit includes the picture and a syntax structure for encoding picture samples.

[0084] One largest codec block (CTB) can be divided into M×N codec blocks (M and N are integers) each including M×N samples.

[0085] When a picture has sample arrays for Y, Cr, and Cb components, a codec unit (CU) includes a codec block of luma samples, two corresponding codec blocks of chroma samples, and syntax structures for encoding luma and chroma samples. When a picture is a monochrome picture, a codec unit includes a codec block of monochrome samples and syntax structures for encoding monochrome samples. When a picture is coded in color planes separated by color components, a codec unit includes the picture and syntax structures for encoding picture samples.

[0086] As described above, the maximum codec block and the maximum codec unit are conceptually different from each other, and the codec block and the codec unit are conceptually different from each other. That is, the (maximum) codec unit refers to a data structure that includes a (maximum) codec block, which includes corresponding samples and a syntax structure corresponding to the (maximum) codec block. However, because those skilled in the art understand that a (maximum) codec unit or a (maximum) codec block refers to a block of a specific size that includes a specific number of samples, unless otherwise specified, the following description does not distinguish between the maximum codec block and the maximum codec unit, or between the codec block and the codec unit.

[0087] The image can be divided into maximum codec units (CTUs). The size of each maximum codec unit can be determined based on information obtained from the bitstream. The shape of each maximum codec unit can be a square of the same size. However, the present disclosure is not limited thereto.

[0088] For example, information about the maximum size of the luma codec block can be obtained from the bitstream. For example, the maximum size of the luma codec block indicated by the information about the maximum size of the luma codec block can be one of 4×4, 8×8, 16×16, 32×32, 64×64, 128×128, and 256×256.

[0089] For example, information about the luminance block size difference and the maximum size of the luminance codec block that can be divided into two can be obtained from the bitstream. The information about the luminance block size difference may refer to the size difference between the luminance maximum codec unit and the maximum luminance codec block that can be divided into two. Therefore, when the information about the maximum size of the luminance codec block that can be divided into two and the information about the luminance block size difference obtained from the bitstream are combined with each other, the size of the luminance maximum codec unit can be determined. The size of the chroma maximum codec unit can be determined by using the size of the luminance maximum codec unit. For example, when the ratio of Y:Cb:Cr is 4:2:0 according to the color format, the size of the chroma block may be half the size of the luminance block, and the size of the chroma maximum codec unit may be half the size of the luminance maximum codec unit.

[0090] According to an embodiment, since information about the maximum size of a binary-dividable luma codec block is obtained from the bitstream, the maximum size of the binary-dividable luma codec block can be variably determined. In contrast, the maximum size of a trifurcating luma codec block can be fixed. For example, the maximum size of a trifurcating luma codec block in an I-picture can be 32×32, while the maximum size of a trifurcating luma codec block in a P-picture or a B-picture can be 64×64.

[0091] In addition, the maximum codec unit can be hierarchically divided into codec units based on the division shape pattern information obtained from the bitstream. At least one of information indicating whether to perform quad splitting, information indicating whether to perform multi-split, division direction information, or division type information can be obtained from the bitstream as the division shape pattern information.

[0092] For example, the information indicating whether to perform quad splitting may indicate whether the current codec unit is to be quad split (QUAD_SPLIT).

[0093] When the current codec unit is not quad-split, the information indicating whether to perform multi-split may indicate whether the current codec unit is no longer split (NO_SPLIT) or is binary / tripartite.

[0094] When the current codec unit is binary-partitioned or tri-partitioned, the division direction information indicates whether the current codec unit is divided in one of a horizontal direction and a vertical direction.

[0095] When the current codec unit is split in the horizontal direction or the vertical direction, the split type information indicates whether the current codec unit is split into two or three branches.

[0096] The split mode of the current codec unit may be determined based on the split direction information and the split type information. The split mode when the current codec unit is split into two branches in the horizontal direction may be determined as a binary horizontal split mode (SPLIT_BT_HOR), the split mode when the current codec unit is split into three branches in the horizontal direction may be determined as a three-branch horizontal split mode (SPLIT_TT_HOR), the split mode when the current codec unit is split into two branches in the vertical direction may be determined as a binary vertical split mode (SPLIT_BT_VER), and the split mode when the current codec unit is split into three branches in the vertical direction may be determined as a three-branch vertical split mode SPLIT_BT_VER.

[0097] The image decoding device 100 can obtain a binary string of partition shape pattern information from a bitstream. The bitstream received by the image decoding device 100 can be in the form of a fixed-length binary code, a unary code, a truncated unary code, a predetermined binary code, or the like. A binary string is information in a binary number. A binary string can include at least one bit. The image decoding device 100 can obtain partition shape pattern information corresponding to the binary string based on a partitioning rule. Based on the binary string, the image decoding device 100 can determine whether to quad-split the codec unit, whether to split the codec unit, the direction of the split, and the type of split.

[0098] The codec unit may be smaller than or equal to the maximum codec unit. For example, since the maximum codec unit is a codec unit having the largest size, the maximum codec unit is one of the codec units. When the division shape pattern information about the maximum codec unit indicates that division is not performed, the codec unit determined in the maximum codec unit has the same size as the maximum codec unit. When the division shape pattern information about the maximum codec unit indicates that division is performed, the maximum codec unit may be divided into codec units. In addition, when the division shape pattern information about the codec unit indicates that division is performed, the codec unit may be divided into smaller codec units. However, the division of the image is not limited thereto, and the maximum codec unit and the codec unit may not be distinguished. Reference will be made to Figures 3 to 16 Describe the division of the coding unit in detail.

[0099] Furthermore, one or more prediction blocks for prediction may be determined from the codec unit. A prediction block may be the same size as or smaller than the codec unit. Furthermore, one or more transform blocks for transform may be determined from the codec unit. A transform block may be the same size as or smaller than the codec unit.

[0100] The shapes and sizes of the transform block and the prediction block may be unrelated to each other.

[0101] In another embodiment, prediction may be performed by using the codec unit as a prediction unit. In addition, transformation may be performed by using the codec unit as a transformation block.

[0102] Will refer to Figures 3 to 16 The division of the codec unit is described in detail. The current block and adjacent block of the present disclosure may indicate one of the maximum codec unit, the codec unit, the prediction block, and the transform block. In addition, the current block of the current codec unit is the block currently being decoded or encoded or the block currently being divided. The adjacent block may be a block reconstructed before the current block. The adjacent block may be spatially or temporally adjacent to the current block. The adjacent block may be located at one of the lower left, left, upper left, top, upper right, right, and lower right of the current block.

[0103] Figure 3 A process of determining at least one coding unit by dividing a current coding unit, performed by an image decoding apparatus according to an embodiment, is shown.

[0104] The block shape may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N. Here, N may be a positive integer. The block shape information is information indicating at least one of the shape, orientation, aspect ratio, or size of the codec unit.

[0105] The shape of the codec unit may be square or non-square. When the width and height of the codec unit are the same (i.e., when the block shape of the codec unit is 4Nx4N), the image decoding device 100 may determine the block shape information of the codec unit as a square. The image decoding device 100 may determine the shape of the codec unit as a non-square.

[0106] When the width and height of the codec unit differ from each other (i.e., when the block shape of the codec unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the image decoding device 100 may determine the block shape information of the codec unit as a non-square shape. When the shape of the codec unit is non-square, the image decoding device 100 may determine the aspect ratio in the block shape information of the codec unit to be at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, or 32:1. In addition, the image decoding device 100 may determine whether the codec unit is horizontally or vertically oriented based on the width and height of the codec unit. In addition, the image decoding device 100 may determine the size of the codec unit based on at least one of the width, height, or area of ​​the codec unit.

[0107] According to an embodiment, the image decoding apparatus 100 may determine the shape of a codec unit using block shape information, and may determine a codec unit division method using division shape pattern information. That is, the codec unit division method indicated by the division shape pattern information may be determined based on the block shape indicated by the block shape information used by the image decoding apparatus 100.

[0108] The image decoding device 100 can obtain the division shape pattern information from the bitstream. However, the embodiment is not limited thereto, and the image decoding device 100 and the image encoding device 2200 can determine the pre-agreed division shape pattern information based on the block shape information. The image decoding device 100 can determine the pre-agreed division shape pattern information about the maximum codec unit or the minimum codec unit. For example, the image decoding device 100 can determine the division shape pattern information about the maximum codec unit as quadripartition. In addition, the image decoding device 100 can determine the division shape pattern information about the minimum codec unit as "no division". Specifically, the image decoding device 100 can determine the size of the maximum codec unit to be 256×256. The image decoding device 100 can determine the pre-agreed division shape pattern information as quadripartition. Quadripartition is a division shape pattern in which the width and height of the codec unit are both divided equally. Based on the division shape pattern information, the image decoding device 100 can obtain a codec unit of 128×128 size from a maximum codec unit of 256×256 size. Furthermore, the image decoding device 100 may determine the size of the minimum decoding unit to be 4 × 4. The image decoding device 100 may obtain division shape pattern information indicating “no division” with respect to the minimum decoding unit.

[0109] According to an embodiment, the image decoding apparatus 100 may use block shape information indicating that the current codec unit has a square shape. For example, the image decoding apparatus 100 may determine whether to divide a square codec unit, whether to divide a square codec unit vertically, whether to divide a square codec unit horizontally, or whether to divide a square codec unit into four codec units based on the division shape mode information. Figure 3 , when the block shape information of the current codec unit 300 indicates a square shape, the decoder 120 can determine that the codec unit 310a having the same size as the current codec unit 300 is not divided based on the division shape pattern information indicating non-division, or can determine that the codec unit 310b, 310c, 310d, 310e or 310f is divided based on the division shape pattern information indicating a specific division method.

[0110] Reference Figure 3According to an embodiment, the image decoding device 100 may determine two codec units 310b obtained by dividing the current codec unit 300 in the vertical direction based on the division shape pattern information indicating that division is performed in the vertical direction. The image decoding device 100 may determine two codec units 310c obtained by dividing the current codec unit 300 in the horizontal direction based on the division shape pattern information indicating that division is performed in the horizontal direction. The image decoding device 100 may determine four codec units 310d obtained by dividing the current codec unit 300 in the vertical and horizontal directions based on the division shape pattern information indicating that division is performed in the vertical and horizontal directions. According to an embodiment, the image decoding device 100 may determine three codec units 310e obtained by dividing the current codec unit 300 in the vertical direction based on the division shape pattern information indicating that three-way division is performed in the vertical direction. The image decoding device 100 may determine three codec units 310f obtained by dividing the current codec unit 300 in the horizontal direction based on the division shape pattern information indicating that three-way division is performed in the horizontal direction. However, the division method of the square codec unit is not limited to the above method, and the division shape pattern information can indicate various methods. Some division methods of dividing the square codec unit will be described in detail below in conjunction with various embodiments.

[0111] Figure 4 A process of determining at least one codec unit by dividing a non-square codec unit, performed by an image decoding apparatus according to an embodiment, is shown.

[0112] According to an embodiment, the image decoding apparatus 100 may use block shape information indicating that the current codec unit has a non-square shape. The image decoding apparatus 100 may determine whether to divide the non-square current codec unit or whether to divide the non-square current codec unit by using a specific division method based on the division shape mode information. Figure 4 When the block shape information of the current codec unit 400 or 450 indicates a non-square shape, the image decoding apparatus 100 may determine that the codec unit 410 or 460 having the same size as the current codec unit 400 or 450 is not divided based on the division shape mode information indicating non-division, or determine that the codec units 420a and 420b, 430a to 430c, 470a and 470b, or 480a to 480c are divided based on the division shape mode information indicating a specific division method. Some division methods for dividing non-square codec units will be described in detail below in conjunction with various embodiments.

[0113] According to an embodiment, the image decoding apparatus 100 may determine a division method of a codec unit by using division shape pattern information. In this case, the division shape pattern information may indicate the number of one or more codec units generated by dividing the codec unit. Figure 4 When the division shape pattern information indicates that the current codec unit 400 or 450 is divided into two codec units, the image decoding device 100 can determine the two codec units 420a and 420b or 470a and 470b included in the current codec unit 400 or 450 by dividing the current codec unit 400 or 450 based on the division shape pattern information.

[0114] According to an embodiment, when the image decoding apparatus 100 divides the non-square current codec unit 400 or 450 based on the division shape pattern information, the image decoding apparatus 100 may divide the current codec unit in consideration of the position of the long side of the non-square current codec unit 400 or 450. For example, considering the shape of the current codec unit 400 or 450, the image decoding apparatus 100 may determine a plurality of codec units by dividing the long side of the current codec unit 400 or 450.

[0115] According to an embodiment, when the division shape pattern information indicates that the codec unit is divided (tripartitioned) into an odd number of blocks, the image decoding device 100 may determine an odd number of codec units included in the current codec unit 400 or 450. For example, when the division shape pattern information indicates that the current codec unit 400 or 450 is divided into three codec units, the image decoding device 100 may divide the current codec unit 400 or 450 into three codec units 430a, 430b, and 430c or 480a, 480b, and 480c.

[0116] Depending on the embodiment, the aspect ratio of the current codec unit 400 or 450 may be 4:1 or 1:4. When the aspect ratio is 4:1, the block shape information may be horizontal because the width is longer than the height. When the aspect ratio is 1:4, the block shape information may be vertical because the width is shorter than the height. The image decoding device 100 may determine whether to divide the current codec unit into an odd number of blocks based on the division shape pattern information. Furthermore, the image decoding device 100 may determine the division direction of the current codec unit 400 or 450 based on the block shape information of the current codec unit 400 or 450. For example, when the current codec unit 400 is in the vertical direction, the image decoding device 100 may determine codec units 430a to 430c by dividing the current codec unit 400 in the horizontal direction. Furthermore, when the current codec unit 450 is in the horizontal direction, the image decoding device 100 may determine codec units 480a to 480c by dividing the current codec unit 450 in the vertical direction.

[0117] According to an embodiment, the image decoding apparatus 100 may determine an odd number of codec units included in the current codec unit 400 or 450, and not all of the determined codec units may have the same size. For example, a particular codec unit 430b or 480b among the determined odd number of codec units 430a, 430b, and 430c or 480a, 480b, and 480c may have a size different from that of the other codec units 430a and 430c or 480a and 480c. That is, the codec units determined by dividing the current codec unit 400 or 450 may have a variety of sizes, and in some cases, all of the odd number of codec units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes.

[0118] According to an embodiment, when the division shape pattern information indicates that the codec unit is divided into an odd number of blocks, the image decoding device 100 may determine an odd number of codec units included in the current codec unit 400 or 450, and further, may impose a specific restriction on at least one codec unit among the odd number of codec units generated by dividing the current codec unit 400 or 450. Figure 4The image decoding apparatus 100 may set a decoding process for the codec unit 430b or 480b located at the center among the three codec units 430a, 430b, and 430c, or 480a, 480b, and 480c, generated when the current codec unit 400 or 450 is divided into different codec units than the other codec units 430a and 430c, 480a, or 480c. For example, the image decoding apparatus 100 may limit the codec unit 430b or 480b located at the center to not be divided again or to be divided only a specific number of times, unlike the other codec units 430a and 430c, or 480a and 480c.

[0119] Figure 5 A process of dividing a codec unit based on at least one of block shape information or division shape mode information, performed by an image decoding apparatus according to an embodiment, is shown.

[0120] According to an embodiment, based on at least one of the block shape information or the division shape pattern information, the image decoding device 100 may determine whether to divide the square first codec unit 500 into codec units or not. According to an embodiment, when the division shape pattern information indicates that the first codec unit 500 is to be divided horizontally, the image decoding device 100 may determine the second codec unit 510 by dividing the first codec unit 500 horizontally. The first codec unit, second codec unit, and third codec unit used in the embodiment are terms used to understand the relationship before and after the codec units are divided. For example, the second codec unit may be determined by dividing the first codec unit, and the third codec unit may be determined by dividing the second codec unit. It should be understood that the structures of the first codec unit, the second codec unit, and the third codec unit follow the above description.

[0121] According to an embodiment, based on the division shape pattern information, the image decoding apparatus 100 may determine whether to divide the determined second codec unit 510 into codec units or not. Figure 5The image decoding device 100 may divide the non-square second codec unit 510 determined by dividing the first codec unit 500 into one or more third codec units 520a or 520b, 520c, and 520d based on the division shape pattern information, or may not divide the codec unit 510. The image decoding device 100 may obtain the division shape pattern information and, based on the obtained division shape pattern information, may obtain a plurality of second codec units of various shapes (e.g., the second codec unit 510) by dividing the first codec unit 500. The image decoding device 100 may also divide the second codec unit 510 using the division method of the first codec unit 500 based on the division shape pattern information. According to an embodiment, when the first codec unit 500 is divided into the second codec unit 510 based on the division shape pattern information of the first codec unit 500, the second codec unit 510 may also be divided into the third codec units 520a or 520b, 520c, and 520d based on the division shape pattern information of the second codec unit 510. That is, the codec units can be recursively divided based on the division shape pattern information of each codec unit. Therefore, square codec units can be determined by dividing non-square codec units, and non-square codec units can be determined by recursively dividing square codec units.

[0122] Reference Figure 5 , a specific codec unit (e.g., a codec unit located at a center position or a square codec unit) among the odd-numbered third codec units 520b, 520c, and 520d determined by dividing the non-square second codec unit 510 can be recursively divided. According to an embodiment, the square third codec unit 520b among the odd-numbered third codec units 520b, 520c, and 520d can be divided into multiple fourth codec units in the horizontal direction. The non-square fourth codec unit 530b or 530d among the multiple fourth codec units 530a, 530b, 530c, and 530d can be further divided into multiple codec units. For example, the non-square fourth codec unit 530b or 530d can be further divided into an odd-numbered codec unit. The following describes a method that can be used to recursively divide codec units in conjunction with various embodiments.

[0123] According to an embodiment, the image decoding device 100 may divide each of the third codec units 520a or 520b, 520c, and 520d into codec units based on the division shape pattern information. Furthermore, the image decoding device 100 may determine not to divide the second codec unit 510 based on the division shape pattern information. According to an embodiment, the image decoding device 100 may divide the non-square second codec unit 510 into an odd number of third codec units 520b, 520c, and 520d. The image decoding device 100 may impose specific restrictions on specific third codec units among the odd number of third codec units 520b, 520c, and 520d. For example, the image decoding device 100 may restrict the third codec unit 520c located at the center of the odd number of third codec units 520b, 520c, and 520d from being further divided or from being divided a set number of times.

[0124] Reference Figure 5 , the image decoding device 100 may limit the third codec unit 520c (which is located at the center position among the odd-numbered third codec units 520b, 520c, and 520d included in the non-square second codec unit 510) to no longer be divided, to be divided by using a specific division method (for example, to be divided only into four codec units or to be divided by using the division method of the second codec unit 510), or to be divided only a specific number of times (for example, to be divided only n times (where n>0)). However, the restriction on the third codec unit 520c located at the center position is not limited to the above example, and various restrictions for decoding the third codec unit 520c located at the center position differently from the other third codec units 520b and 520d may be included.

[0125] According to an embodiment, the image decoding apparatus 100 may obtain division shape pattern information for dividing the current codec unit from a specific position in the current codec unit.

[0126] Figure 6 A method of determining a specific codec unit from among an odd number of codec units, performed by an image decoding apparatus according to an embodiment, is illustrated.

[0127] Reference Figure 6 , the division shape pattern information of the current codec unit 600 or 650 can be obtained from a sample at a specific position (e.g., a sample 640 or 690 at a center position) among a plurality of samples included in the current codec unit 600 or 650. However, the specific position in the current codec unit 600 from which at least one piece of division shape pattern information can be obtained is not limited to Figure 6The image decoding apparatus 100 may obtain the division shape pattern information from a specific position and determine whether to divide or not divide the current codec unit into codec units of various shapes and sizes.

[0128] According to an embodiment, when the current codec unit is divided into a specific number of codec units, the image decoding apparatus 100 may select one of the codec units. Various methods may be used to select one of the plurality of codec units, as will be described below with respect to various embodiments.

[0129] According to an embodiment, the image decoding apparatus 100 may divide a current codec unit into a plurality of codec units, and may determine the codec units at specific positions.

[0130] According to an embodiment, the image decoding apparatus 100 may determine a centrally located codec unit from among the odd-numbered codec units using information indicating the positions of the odd-numbered codec units. Figure 6 , the image decoding device 100 can determine the odd-numbered codec units 620a, 620b, and 620c or the odd-numbered codec units 660a, 660b, and 660c by dividing the current codec unit 600 or the current codec unit 650. The image decoding device 100 can determine the intermediate codec unit 620b or the intermediate codec unit 660b by using information about the positions of the odd-numbered codec units 620a, 620b, and 620c or the odd-numbered codec units 660a, 660b, and 660c. For example, the image decoding device 100 can determine the center-positioned codec unit 620b by determining the positions of the codec units 620a, 620b, and 620c based on information indicating the positions of specific samples included in the codec units 620a, 620b, and 620c. In detail, the image decoding device 100 can determine the codec unit 620b located at the center position by determining the positions of the codec units 620a, 620b and 620c based on information indicating the positions of the upper left samples 630a, 630b and 630c of the codec units 620a, 620b and 620c.

[0131] According to an embodiment, the information indicating the positions of the upper left samples 630a, 630b, and 630c respectively included in the codec units 620a, 620b, and 620c may include information about the positions or coordinates of the codec units 620a, 620b, and 620c in the picture. According to an embodiment, the information indicating the positions of the upper left samples 630a, 630b, and 630c respectively included in the codec units 620a, 620b, and 620c may include information indicating the width or height of the codec units 620a, 620b, and 620c included in the current codec unit 600, and the width or height may correspond to information indicating the difference between the coordinates of the codec units 620a, 620b, and 620c in the picture. That is, the image decoding device 100 can determine the codec unit 620b located at the center position by directly using information about the positions or coordinates of the codec units 620a, 620b and 620c in the picture, or by using information about the width or height of the codec unit corresponding to the difference between the coordinates.

[0132] According to an embodiment, the information indicating the position of the upper left sample 630a of the upper codec unit 620a may include coordinates (xa, ya), the information indicating the position of the upper left sample 630b of the middle codec unit 620b may include coordinates (xb, yb), and the information indicating the position of the upper left sample 630c of the lower codec unit 620c may include coordinates (xc, yc). The image decoding device 100 may determine the middle codec unit 620b by using the coordinates of the upper left samples 630a, 630b, and 630c included in the codec units 620a, 620b, and 620c, respectively. For example, when the coordinates of the upper left samples 630a, 630b, and 630c are sorted in ascending or descending order, the codec unit 620b including the coordinates (xb, yb) of the sample 630b at the center position may be determined as the codec unit at the center position among the codec units 620a, 620b, and 620c determined by dividing the current codec unit 600. However, the coordinates indicating the positions of the upper left samples 630a, 630b, and 630c may include coordinates indicating absolute positions in the picture, or coordinates (dxb, dyb) indicating the relative position of the upper left sample 630b of the middle codec unit 620b and coordinates (dxc, dyc) indicating the position of the upper left sample 630c of the lower codec unit 620c relative to the upper left sample 630a of the upper codec unit 620a may be used. The method of determining a codec unit at a specific position by using the coordinates of samples included in the codec unit as information indicating the sample position is not limited to the above method, and may include various arithmetic methods capable of using sample coordinates.

[0133] According to an embodiment, the image decoding apparatus 100 may divide the current codec unit 600 into a plurality of codec units 620a, 620b, and 620c, and may select one of the codec units 620a, 620b, and 620c based on a specific criterion. For example, the image decoding apparatus 100 may select a codec unit 620b having a size different from that of the other codec units from among the codec units 620a, 620b, and 620c.

[0134] According to an embodiment, the image decoding device 100 may determine the width or height of each of the codec units 620a, 620b, and 620c using the coordinates (xa, ya) indicating the position of the top left sample 630a of the upper codec unit 620a, the coordinates (xb, yb) indicating the position of the top left sample 630b of the middle codec unit 620b, and the coordinates (xc, yc) indicating the position of the top left sample 630c of the lower codec unit. The image decoding device 100 may determine the respective sizes of the codec units 620a, 620b, and 620c using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the codec units 620a, 620b, and 620c. According to an embodiment, the image decoding device 100 may determine the width of the upper codec unit 620a as the width of the current codec unit 600. The image decoding device 100 may determine the height of the upper codec unit 620a as yb-ya. According to an embodiment, the image decoding device 100 may determine the width of the intermediate codec unit 620b as the width of the current codec unit 600. The image decoding device 100 may determine the height of the intermediate codec unit 620b as yc-yb. According to an embodiment, the image decoding device 100 may determine the width or height of the lower codec unit 620c by using the width or height of the current codec unit 600 or the width or height of the upper codec unit 620a and the middle codec unit 620b. The image decoding device 100 may determine a codec unit having a size different from that of other codec units based on the determined width and height of the codec units 620a to 620c. Figure 6 , the image decoding device 100 may determine the middle codec unit 620b having a size different from that of the upper codec unit 620a and the lower codec unit 620c as the codec unit at a specific location. However, the above-described method of determining a codec unit having a size different from that of other codec units, performed by the image decoding device 100, only corresponds to an example of determining a codec unit at a specific location by using the size of the codec unit determined based on the coordinates of the sample, and therefore, various methods of determining a codec unit at a specific location by comparing the size of the codec unit determined based on the coordinates of a specific sample may be used.

[0135] The image decoding apparatus 100 can determine the width or height of each of the codec units 660a, 660b, and 660c using the coordinates (xd, yd) indicating the position of the upper left sample 670a of the left codec unit 660a, the coordinates (xe, ye) indicating the position of the upper left sample 670b of the middle codec unit 660b, and the coordinates (xf, yf) indicating the position of the upper left sample 670c of the right codec unit 660c. The image decoding apparatus 100 can determine the respective sizes of the codec units 660a, 660b, and 660c using the coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the codec units 660a, 660b, and 660c.

[0136] According to an embodiment, the image decoding device 100 may determine the width of the left codec unit 660a as xe-xd. The image decoding device 100 may determine the height of the left codec unit 660a as the height of the current codec unit 650. According to an embodiment, the image decoding device 100 may determine the width of the intermediate codec unit 660b as xf-xe. The image decoding device 100 may determine the height of the intermediate codec unit 660b as the height of the current codec unit 600. According to an embodiment, the image decoding device 100 may determine the width or height of the right codec unit 660c by using the width or height of the current codec unit 650 or the width or height of the left codec unit 660a and the intermediate codec unit 660b. The image decoding device 100 may determine a codec unit having a size different from that of other codec units based on the determined width and height of the codec units 660a to 660c. Reference Figure 6 , the image decoding device 100 may determine the middle codec unit 660b having a size different from that of the left codec unit 660a and the right codec unit 660c as the codec unit at a specific position. However, the above-described method of determining a codec unit having a size different from that of other codec units, performed by the image decoding device 100, only corresponds to an example of determining a codec unit at a specific position by using the size of the codec unit determined based on the coordinates of the sample, and therefore, various methods of determining a codec unit at a specific position by comparing the size of the codec unit determined based on the coordinates of a specific sample may be used.

[0137] However, the position of the sample considered for determining the position of the codec unit is not limited to the above-mentioned upper left position, and information on arbitrary positions of samples included in the codec unit may be used.

[0138] According to an embodiment, the image decoding device 100 may select a codec unit at a specific position from among the odd-numbered codec units determined by dividing the current codec unit, taking into account the shape of the current codec unit. For example, when the current codec unit has a non-square shape with a width greater than a height, the image decoding device 100 may determine the codec unit at a specific position in the horizontal direction. That is, the image decoding device 100 may determine one of the codec units with a different position in the horizontal direction and impose restrictions on the codec unit. When the current codec unit has a non-square shape with a height greater than a width, the image decoding device 100 may determine the codec unit at a specific position in the vertical direction. That is, the image decoding device 100 may determine one of the codec units with a different position in the vertical direction and impose restrictions on the codec unit.

[0139] According to an embodiment, the image decoding device 100 may use information indicating the corresponding positions of the even-numbered codec units to determine the codec unit at a specific position from the even-numbered codec units. The image decoding device 100 may determine the even-numbered codec units by dividing (binary division) the current codec unit, and may determine the codec unit at a specific position by using information about the positions of the even-numbered codec units. Operations related thereto may correspond to operations for determining the codec unit at a specific position (e.g., a center position) from the odd-numbered codec units, which has been described above with respect to Figure 6 Detailed description is given and therefore a detailed description thereof is not provided here.

[0140] According to an embodiment, when a non-square current codec unit is divided into a plurality of codec units, specific information about a codec unit at a specific position may be used in the division operation to determine the codec unit at the specific position from among the plurality of codec units. For example, the image decoding apparatus 100 may use at least one of block shape information or division shape pattern information stored in samples included in the intermediate codec units in the division operation to determine the codec unit at the center position from among the plurality of codec units determined by dividing the current codec unit.

[0141] Reference Figure 6, the image decoding device 100 may divide the current codec unit 600 into multiple codec units 620a, 620b, and 620c based on the division shape pattern information, and may determine the codec unit 620b at the center position from the multiple codec units 620a, 620b, and 620c. Furthermore, the image decoding device 100 may determine the codec unit 620b at the center position by considering the position from which the division shape pattern information was obtained. Specifically, the division shape pattern information of the current codec unit 600 may be obtained from a sample 640 located at the center position of the current codec unit 600. When the current codec unit 600 is divided into the multiple codec units 620a, 620b, and 620c based on the division shape pattern information, the codec unit 620b including the sample 640 may be determined as the codec unit at the center position. However, the information used to determine the codec unit at the center position is not limited to the division shape pattern information, and various types of information may be used to determine the codec unit at the center position.

[0142] According to an embodiment, specific information for identifying a codec unit at a specific position may be obtained from a specific sample included in the codec unit to be determined. Figure 6 , the image decoding device 100 can use the division shape pattern information obtained from the sample at the specific position in the current codec unit 600 (for example, the sample at the center position of the current codec unit 600) to determine the codec unit at the specific position (for example, the codec unit at the center position among the multiple divided codec units) from the multiple codec units 620a, 620b, and 620c determined by dividing the current codec unit 600. That is, the image decoding device 100 can determine the sample at the specific position by considering the block shape of the current codec unit 600, determine the codec unit 620b including the sample from which the specific information (for example, the division shape pattern information) can be obtained from the multiple codec units 620a, 620b, and 620c determined by dividing the current codec unit 600, and can impose specific restrictions on the codec unit 620b. Figure 6 According to an embodiment, in a decoding operation, the image decoding apparatus 100 may determine the sample 640 at the center position of the current codec unit 600 as a sample from which specific information can be obtained, and may impose specific restrictions on the codec unit 620b including the sample 640. However, the position of the sample from which specific information can be obtained is not limited to the above-mentioned position, and may include any position of the sample included in the codec unit 620b to be determined for restriction.

[0143] According to an embodiment, the position of the sample from which specific information can be obtained can be determined based on the shape of the current codec unit 600. According to an embodiment, the block shape information may indicate whether the current codec unit is square or non-square, and the position of the sample from which specific information can be obtained can be determined based on the shape. For example, the image decoding device 100 may determine a sample located on a boundary for dividing at least one of the width or height of the current codec unit into two halves by using at least one of the information about the width of the current codec unit or the information about the height of the current codec unit as a sample from which specific information can be obtained. As another example, when the block shape information of the current codec unit indicates a non-square shape, the image decoding device 100 may determine one of the samples including the boundary for dividing the long side of the current codec unit into two halves as a sample from which predetermined information can be obtained.

[0144] According to an embodiment, when the current codec unit is divided into a plurality of codec units, the image decoding device 100 can use the division shape pattern information to determine the codec unit at a specific position from among the plurality of codec units. According to an embodiment, the image decoding device 100 can obtain the division shape pattern information from the sample at the specific position in the codec unit, and divide the plurality of codec units generated by dividing the current codec unit by using the division shape pattern information obtained from the sample at the specific position in each of the plurality of codec units. That is, the codec unit can be recursively divided based on the division shape pattern information obtained from the sample at the specific position in each codec unit. Figure 5 The operation of the recursive partitioning codec unit is described, and therefore a detailed description thereof will not be provided here.

[0145] According to an embodiment, the image decoding apparatus 100 may determine one or more codec units by dividing a current codec unit, and may determine an order of decoding the one or more codec units based on a specific block (eg, the current codec unit).

[0146] Figure 7 1. The order in which a plurality of codec units are processed when the image decoding apparatus determines a plurality of codec units by dividing a current codec unit according to an embodiment is shown.

[0147] According to an embodiment, based on the division shape pattern information, the image decoding device 100 can determine the second codec units 710a and 710b by dividing the first codec unit 700 in the vertical direction, determine the second codec units 730a and 730b by dividing the first codec unit 700 in the horizontal direction, or determine the second codec units 750a to 750d by dividing the first codec unit 700 in the vertical and horizontal directions.

[0148] Reference Figure 7 , the image decoding apparatus 100 may determine to process the second codec units 710a and 710b determined by dividing the first codec unit 700 in the vertical direction in a horizontal order 710c. The image decoding apparatus 100 may determine to process the second codec units 730a and 730b determined by dividing the first codec unit 700 in the horizontal direction in a vertical order 730c. The image decoding apparatus 100 may determine to process the second codec units 750a to 750d determined by dividing the first codec unit 700 in the vertical and horizontal directions in a specific order (e.g., in a raster scan order or a Z scan order 750e) of processing codec units in one row and then processing codec units in the next row.

[0149] According to an embodiment, the image decoding apparatus 100 may recursively divide the coding unit. Figure 7 , the image decoding device 100 can determine a plurality of codec units 710a and 710b, 730a and 730b, or 750a to 750d by dividing the first codec unit 700, and recursively divide each of the determined plurality of codec units 710b, 730a and 730b, or 750a to 750d. The division method of the plurality of codec units 710b, 730a and 730b, or 750a to 750d can correspond to the division method of the first codec unit 700. In this way, each of the plurality of codec units 710b, 730a and 730b, or 750a to 750d can be independently divided into a plurality of codec units. Referring to Figure 7 , the image decoding apparatus 100 may determine the second codec units 710a and 710b by dividing the first codec unit 700 in a vertical direction, and may determine whether to divide or not divide each of the second codec units 710a and 710b independently.

[0150] According to an embodiment, the image decoding device 100 may determine the third codec units 720a and 720b by dividing the left second codec unit 710a in the horizontal direction, and may not divide the right second codec unit 710b.

[0151] According to an embodiment, the order in which codec units are processed can be determined based on the operation of dividing the codec units. In other words, the order in which the codec units are divided can be determined based on the order in which the codec units were processed immediately before the division. The image decoding device 100 can determine the order in which the third codec units 720a and 720b, determined by dividing the left second codec unit 710a, are processed independently of the right second codec unit 710b. Because the third codec units 720a and 720b are determined by dividing the left second codec unit 710a horizontally, the third codec units 720a and 720b can be processed in a vertical order 720c. Because the left and right second codec units 710a and 710b are processed in the horizontal order 710c, the right second codec unit 710b can be processed after the third codec units 720a and 720b included in the left second codec unit 710a are processed in the vertical order 720c. The operation of determining the processing order of codec units based on the codec units before division is not limited to the above example, and various methods may be used to independently process codec units divided and determined into various shapes in a specific order.

[0152] Figure 8 A process of determining that a current codec unit is to be divided into an odd number of codec units, performed by an image decoding apparatus, is shown according to an embodiment when codec units cannot be processed in a predetermined order.

[0153] According to an embodiment, the image decoding apparatus 100 may determine whether the current codec unit is divided into an odd number of codec units based on the obtained division shape pattern information. Figure 8 , the square first codec unit 800 can be divided into non-square second codec units 810a and 810b, and the second codec units 810a and 810b can be independently divided into third codec units 820a and 820b and 820c to 820e. According to an embodiment, the image decoding device 100 can determine a plurality of third codec units 820a and 820b by dividing the left second codec unit 810a in the horizontal direction, and can divide the right second codec unit 810b into an odd number of third codec units 820c to 820e.

[0154] According to an embodiment, the image decoding apparatus 100 may determine whether any codec unit is divided into an odd number of codec units by determining whether the third codec units 820a and 820b and 820c to 820e can be processed in a specific order. Figure 8, the image decoding device 100 can determine the third codec units 820a and 820b and 820c to 820e by recursively dividing the first codec unit 800. The image decoding device 100 can determine whether any of the first codec unit 800, the second codec units 810a and 810b, and the third codec units 820a and 820b and 820c to 820e is divided into an odd number of codec units based on at least one of the block shape information or the division shape pattern information. For example, the right second codec unit 810b among the second codec units 810a and 810b can be divided into an odd number of third codec units 820c, 820d, and 820e. The processing order of the multiple codec units included in the first codec unit 800 can be a specific order (for example, a Z scan order 830), and the image decoding device 100 can determine whether the third codec units 820c, 820d and 820e determined by dividing the right second codec unit 810b into an odd number of codec units meet the conditions for processing in a specific order.

[0155] According to an embodiment, the image decoding apparatus 100 may determine whether the third codec units 820a and 820b, and 820c through 820e, included in the first codec unit 800, satisfy a condition for processing in a specific order, wherein the condition relates to whether at least one of the width or height of the second codec units 810a and 810b is divided in half along the boundary of the third codec units 820a and 820b, and 820c through 820e. For example, the third codec units 820a and 820b determined when the height of the non-square left second codec unit 810a is divided in half may satisfy the condition. However, the third codec units 820c through 820e may be determined not to satisfy the condition because the boundary of the third codec units 820c through 820e determined when the right second codec unit 810b is divided into three codec units does not divide the width or height of the right second codec unit 810b in half. When the conditions described above are not met, the image decoding device 100 may determine that the scan order is disconnected, and based on the result of the determination, may determine that the right second codec unit 810b is divided into an odd number of codec units. According to an embodiment, when the codec unit is divided into an odd number of codec units, the image decoding device 100 may impose specific restrictions on codec units at specific positions among the divided codec units. The restrictions or specific positions have been described above with respect to various embodiments, and therefore, a detailed description thereof will not be provided.

[0156] Figure 9 A process of determining at least one coding unit by dividing a first coding unit, performed by an image decoding apparatus according to an embodiment, is shown.

[0157] According to an embodiment, the image decoding apparatus 100 may divide the first codec unit 900 based on the division shape pattern information obtained by the receiver 110. The square first codec unit 900 may be divided into four square codec units, or may be divided into a plurality of non-square codec units. Figure 9 When the division shape mode information indicates that the first codec unit 900 is divided into non-square codec units, the image decoding device 100 may divide the first codec unit 900 into a plurality of non-square codec units. Specifically, when the division shape mode information indicates that an odd number of codec units is determined by dividing the first codec unit 900 in the horizontal direction or the vertical direction, the image decoding device 100 may divide the square first codec unit 900 into an odd number of codec units, for example, second codec units 910a, 910b, and 910c determined by dividing the square first codec unit 900 in the vertical direction, or second codec units 920a, 920b, and 920c determined by dividing the square first codec unit 900 in the horizontal direction.

[0158] According to an embodiment, the image decoding device 100 may determine whether the second codec units 910a, 910b, 910c, 920a, 920b, and 920c included in the first codec unit 900 satisfy a condition for being processed in a specific order, and the condition relates to whether at least one of the width or height of the first codec unit 900 is divided into two halves along the boundary of the second codec units 910a, 910b, 910c, 920a, 920b, and 920c. Figure 9 Because the boundaries of second codec units 910a, 910b, and 910c determined by vertically dividing the square first codec unit 900 do not divide the width of the first codec unit 900 in half, it can be determined that the first codec unit 900 does not meet the conditions for processing in a specific order. Furthermore, because the boundaries of second codec units 920a, 920b, and 920c determined by horizontally dividing the square first codec unit 900 do not divide the width of the first codec unit 900 in half, it can be determined that the first codec unit 900 does not meet the conditions for processing in a predetermined order. When the conditions are not met as described above, the image decoding device 100 may decide to interrupt the scanning order and, based on the result of the decision, determine that the first codec unit 900 is divided into an odd number of codec units. According to an embodiment, when a codec unit is divided into an odd number of codec units, the image decoding device 100 may impose specific restrictions on codec units at specific locations among the divided codec units. The restrictions or specific locations have been described above with respect to various embodiments, and therefore, a detailed description thereof will not be provided.

[0159] According to an embodiment, the image decoding apparatus 100 may determine codec units of various shapes by dividing the first codec unit.

[0160] Reference Figure 9 , the image decoding apparatus 100 may divide the square first codec unit 900 or the non-square first codec unit 930 or 950 into codec units of various shapes.

[0161] Figure 10 It is shown that according to an embodiment, when a second codec unit having a non-square shape determined when an image decoding apparatus divides a first codec unit satisfies a specific condition, the shapes into which the second codec unit can be divided are restricted.

[0162] According to an embodiment, based on the division shape pattern information obtained by the receiver 110, the image decoding device 100 may determine whether to divide the square first codec unit 1000 into non-square second codec units 1010a and 1010b or 1020a and 1020b. The second codec units 1010a and 1010b or 1020a and 1020b may be divided independently. In this way, the image decoding device 100 may determine whether to divide each of the second codec units 1010a and 1010b or 1020a and 1020b into multiple codec units based on the division shape pattern information of each of the second codec units 1010a and 1010b or 1020a and 1020b. According to an embodiment, the image decoding device 100 may determine the third codec units 1012a and 1012b by horizontally dividing the non-square left second codec unit 1010a determined by vertically dividing the first codec unit 1000. However, when the left second codec unit 1010a is divided horizontally, the image decoding device 100 may restrict the right second codec unit 1010b from being divided in the same horizontal direction as the left second codec unit 1010a. When the third codec units 1014a and 1014b are determined by dividing the right second codec unit 1010b in the same direction, since the left second codec unit 1010a and the right second codec unit 1010b are independently divided horizontally, the third codec units 1012a and 1012b or 1014a and 1014b may be determined. However, this is equivalent to the case where the image decoding device 100 divides the first codec unit 1000 into four square-shaped second codec units 1030a, 1030b, 1030c, and 1030d based on the division shape pattern information, and may be inefficient in terms of image decoding.

[0163] According to an embodiment, the image decoding apparatus 100 may determine the third codec units 1022a and 1022b or 1024a and 1024b by vertically dividing the non-square second codec unit 1020a or 1020b determined by horizontally dividing the first codec unit 1000. However, when the second codec unit (e.g., the upper second codec unit 1020a) is vertically divided, the image decoding apparatus 100 may restrict another second codec unit (e.g., the lower second codec unit 1020b) from being divided in the vertical direction in which the upper second codec unit 1020a is divided for the above-mentioned reasons.

[0164] Figure 11 A process of dividing a square codec unit performed by an image decoding apparatus when division shape pattern information cannot indicate that the square codec unit is divided into four square codec units according to an embodiment is shown.

[0165] According to an embodiment, the image decoding apparatus 100 may determine second codec units 1110a and 1110b, or 1120a and 1120b, etc., by dividing the first codec unit 1100 based on the division shape pattern information. The division shape pattern information may include information regarding various methods for dividing the codec unit, but the information regarding the various division methods may not include information for dividing the codec unit into four square codec units. Based on this division shape pattern information, the image decoding apparatus 100 may not divide the square first codec unit 1100 into four square second codec units 1130a, 1130b, 1130c, and 1130d. The image decoding apparatus 100 may determine non-square second codec units 1110a and 1110b, or 1120a and 1120b, etc. based on the division shape pattern information.

[0166] According to an embodiment, the image decoding apparatus 100 may independently divide the non-square second codec units 1110a and 1110b or 1120a and 1120b, etc. Each of the second codec units 1110a and 1110b or 1120a and 1120b, etc. may be recursively divided in a specific order, and the division method may correspond to the method of dividing the first codec unit 1100 based on the division shape pattern information.

[0167] For example, the image decoding device 100 can determine square third codec units 1112a and 1112b by horizontally dividing the left second codec unit 1110a, and can determine square third codec units 1114a and 1114b by horizontally dividing the right second codec unit 1110b. Furthermore, the image decoding device 100 can determine square third codec units 1116a, 1116b, 1116c, and 1116d by horizontally dividing the left second codec unit 1110a and the right second codec unit 1110b. In this case, codec units having the same shape as the four square second codec units 1130a, 1130b, 1130c, and 1130d divided from the first codec unit 1100 can be determined.

[0168] As another example, the image decoding device 100 can determine square third codec units 1122a and 1122b by vertically dividing the upper second codec unit 1120a, and can also determine square third codec units 1124a and 1124b by vertically dividing the lower second codec unit 1120b. Furthermore, the image decoding device 100 can determine square third codec units 1126a, 1126b, 1126c, and 1126d by vertically dividing the upper second codec unit 1120a and the lower second codec unit 1120b. In this case, codec units having the same shape as the four square second codec units 1130a, 1130b, 1130c, and 1130d divided from the first codec unit 1100 can be determined.

[0169] Figure 12 It is shown that the processing order among the plurality of codec units according to the embodiment can be changed according to the process of dividing the codec units.

[0170] According to an embodiment, the image decoding device 100 may divide the first codec unit 1200 based on the division shape mode information. When the block shape indicates a square and the division shape mode information indicates that the first codec unit 1200 is divided in at least one of the horizontal direction and the vertical direction, the image decoding device 100 may determine the second codec units 1210a and 1210b or 1220a and 1220b, etc. by dividing the first codec unit 1200. Figure 12, the non-square second codec units 1210a and 1210b or 1220a and 1220b determined by dividing the first codec unit 1200 only in the horizontal direction or the vertical direction can be independently divided based on the division shape pattern information of each codec unit. For example, the image decoding device 100 can determine the third codec units 1216a, 1216b, 1216c, and 1216d by dividing the second codec units 1210a and 1210b generated by dividing the first codec unit 1200 in the vertical direction in the horizontal direction, and can determine the third codec units 1226a, 1226b, 1226c, and 1226d by dividing the second codec units 1220a and 1220b generated by dividing the first codec unit 1200 in the horizontal direction in the horizontal direction. Figure 11 The operation of dividing the second codec units 1210a and 1210b or 1220a and 1220b is described, and thus a detailed description thereof will not be provided here.

[0171] According to an embodiment, the image decoding apparatus 100 may process the encoding and decoding units in a specific order. Figure 7 The operations of the codec units are described as being processed in a predetermined order, and therefore a detailed description thereof will not be provided here. Figure 12 , the image decoding apparatus 100 may determine four square third codec units 1216a, 1216b, 1216c, and 1216d, and 1226a, 1226b, 1226c, and 1226d by dividing the square first codec unit 1200. According to an embodiment, the image decoding apparatus 100 may determine the processing order of the third codec units 1216a, 1216b, 1216c, and 1216d, and 1226a, 1226b, 1226c, and 1226d based on the division method of the first codec unit 1200.

[0172] According to an embodiment, the image decoding device 100 can determine the third codec units 1216a, 1216b, 1216c and 1216d by dividing the second codec units 1210a and 1210b generated by dividing the first codec unit 1200 in the vertical direction in the horizontal direction, and can process the third codec units 1216a, 1216b, 1216c and 1216d in the vertical direction according to the processing order 1217 for initially processing the third codec units 1216a and 1216c included in the left second codec unit 1210a, and then process the third codec units 1216b and 1216d included in the right second codec unit 1210b in the vertical direction.

[0173] According to an embodiment, the image decoding device 100 can determine the third codec units 1226a, 1226b, 1226c and 1226d by dividing the second codec units 1220a and 1220b generated by dividing the first codec unit 1200 in the horizontal direction in the vertical direction, and can process the third codec units 1226a, 1226b, 1226c and 1226d in the horizontal direction according to the processing order 1227 for initially processing the third codec units 1226a and 1226b included in the upper second codec unit 1220a, and then process the third codec units 1226c and 1226d included in the lower second codec unit 1220b in the horizontal direction.

[0174] Reference Figure 12 , the square third codec units 1216a, 1216b, 1216c, and 1216d, and 1226a, 1226b, 1226c, and 1226d can be determined by dividing the second codec units 1210a and 1210b, and 1220a and 1220b, respectively. Although the second codec units 1210a and 1210b determined by dividing the first codec unit 1200 in the vertical direction are different from the second codec units 1220a and 1220b determined by dividing the first codec unit 1200 in the horizontal direction, the third codec units 1216a, 1216b, 1216c, and 1216d, and 1226a, 1226b, 1226c, and 1226d divided therefrom ultimately show codec units of the same shape divided from the first codec unit 1200. In this way, by recursively dividing the codec units in different ways based on the division shape pattern information, the image decoding device 100 can process a plurality of codec units in different orders even when the codec units are ultimately determined to be the same shape.

[0175] Figure 13 A process of determining the depth of a codec unit as the shape and size of the codec unit change when the codec unit is recursively divided to determine a plurality of codec units according to an embodiment is shown.

[0176] According to an embodiment, the image decoding device 100 may determine the depth of the codec unit based on a specific criterion. For example, the specific criterion may be the length of the long side of the codec unit. When the length of the long side of the codec unit before division is 2n times (n>0) the length of the long side of the current codec unit after division, the image decoding device 100 may determine that the depth of the current codec unit has increased by n from the depth of the codec unit before division. In the following description, a codec unit with an increased depth is referred to as a codec unit with a deeper depth.

[0177] Reference Figure 13According to an embodiment, the image decoding apparatus 100 may determine the second codec unit 1302 and the third codec unit 1304 of a greater depth by dividing the square first codec unit 1300 based on block shape information indicating a square shape (for example, the block shape information may be represented as "0: SQUARE"). Assuming that the size of the square first codec unit 1300 is 2N×2N, the size of the second codec unit 1302 determined by dividing the width and height of the first codec unit 1300 into 1 / 2 may be N×N. Furthermore, the size of the third codec unit 1304 determined by dividing the width and height of the second codec unit 1302 into 1 / 2 may be N / 2×N / 2. In this case, the width and height of the third codec unit 1304 are 1 / 4 times the width and height of the first codec unit 1300. When the depth of the first codec unit 1300 is D, the depth of the second codec unit 1302 whose width and height are 1 / 2 times that of the first codec unit 1300 may be D+1, and the depth of the third codec unit 1304 whose width and height are 1 / 4 times that of the first codec unit 1300 may be D+2.

[0178] According to an embodiment, the image decoding device 100 can determine a second codec unit 1312 or 1322 and a third codec unit 1314 or 1324 having a deeper depth by dividing the non-square first codec unit 1310 or 1320 based on block shape information indicating a non-square shape (for example, the block shape information can be represented as "1:NS_VER" indicating a non-square shape, whose height is longer than the width, or as "2:NS_HOR" indicating a non-square shape, whose width is longer than the height).

[0179] The image decoding apparatus 100 may determine the second codec unit 1302, 1312, or 1322 by dividing at least one of the width or height of the first codec unit 1310 having an N×2N size. That is, the image decoding apparatus 100 may determine the second codec unit 1302 having an N×N size or the second codec unit 1322 having an N×N / 2 size by dividing the first codec unit 1310 in the horizontal direction, or may determine the second codec unit 1312 having an N / 2×N size by dividing the first codec unit 1310 in the horizontal and vertical directions.

[0180] According to an embodiment, the image decoding apparatus 100 may determine the second codec unit 1302, 1312, or 1322 by dividing at least one of the width or height of the first codec unit 1320 having a size of 2N×N. That is, the image decoding apparatus 100 may determine the second codec unit 1302 having a size of N×N or the second codec unit 1312 having a size of N / 2×N by dividing the first codec unit 1320 in the vertical direction, or may determine the second codec unit 1322 having a size of N×N / 2 by dividing the first codec unit 1320 in the horizontal and vertical directions.

[0181] According to an embodiment, the image decoding apparatus 100 may determine the third codec unit 1304, 1314, or 1324 by dividing at least one of the width or height of the second codec unit 1302 having a size of N×N. That is, the image decoding apparatus 100 may determine the third codec unit 1304 having a size of N / 2×N / 2, the third codec unit 1314 having a size of N / 4×N / 2, or the third codec unit 1324 having a size of N / 2×N / 4 by dividing the second codec unit 1302 in the vertical and horizontal directions.

[0182] According to an embodiment, the image decoding apparatus 100 may determine the third codec unit 1304, 1314, or 1324 by dividing at least one of the width or height of the second codec unit 1312 having a size of N / 2×N. That is, the image decoding apparatus 100 may determine the third codec unit 1304 having a size of N / 2×N / 2 or the third codec unit 1324 having a size of N / 2×N / 4 by dividing the second codec unit 1312 in the horizontal direction, or may determine the third codec unit 1314 having a size of N / 4×N / 2 by dividing the second codec unit 1312 in the vertical and horizontal directions.

[0183] According to an embodiment, the image decoding apparatus 100 may determine the third codec unit 1304, 1314, or 1324 by dividing at least one of the width or height of the second codec unit 1322 having a size of N×N / 2. That is, the image decoding apparatus 100 may determine the third codec unit 1304 having a size of N / 2×N / 2 or the third codec unit 1314 having a size of N / 4×N / 2 by dividing the second codec unit 1322 in the vertical direction, or may determine the third codec unit 1324 having a size of N / 2×N / 4 by dividing the second codec unit 1322 in the vertical and horizontal directions.

[0184] According to an embodiment, the image decoding device 100 may divide the square codec unit 1300, 1302, or 1304 in the horizontal or vertical direction. For example, the image decoding device 100 may determine the first codec unit 1310 of size N×2N by dividing the first codec unit 1300 of size 2N×2N in the vertical direction, or may determine the first codec unit 1320 of size 2N×N by dividing the first codec unit 1300 in the horizontal direction. According to an embodiment, when the depth is determined based on the length of the longest side of the codec unit, the depth of the codec unit determined by dividing the first codec unit 1300 of size 2N×2N in the horizontal or vertical direction may be the same as the depth of the first codec unit 1300.

[0185] According to an embodiment, the width and height of the third codec unit 1314 or 1324 may be 1 / 4 times that of the first codec unit 1310 or 1320. When the depth of the first codec unit 1310 or 1320 is D, the depth of the second codec unit 1312 or 1322 having a width and height 1 / 2 times that of the first codec unit 1310 or 1320 may be D+1, and the depth of the third codec unit 1314 or 1324 having a width and height 1 / 4 times that of the first codec unit 1310 or 1320 may be D+2.

[0186] Figure 14 1. A depth that may be determined based on a shape and size of a codec unit and a partial index (PID) for distinguishing the codec units according to an embodiment is shown.

[0187] According to an embodiment, the image decoding apparatus 100 may determine second codec units of various shapes by dividing the square first codec unit 1400. Figure 14 , the image decoding apparatus 100 can determine the second codec units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d by dividing the first codec unit 1400 in at least one of the vertical direction and the horizontal direction based on the division shape pattern information. That is, the image decoding apparatus 100 can determine the second codec units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d based on the division shape pattern information of the first codec unit 1400.

[0188] According to an embodiment, the depth of the second codec units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d determined based on the division shape pattern information of the square first codec unit 1400 can be determined based on the length of their long sides. For example, because the side length of the square first codec unit 1400 is equal to the length of the long side of the non-square second codec units 1402a and 1402b and 1404a and 1404b, the first codec unit 2100 and the non-square second codec units 1402a and 1402b and 1404a and 1404b can have the same depth, such as D. However, since the side length of the square second codec units 1406a, 1406b, 1406c and 1406d is 1 / 2 times the side length of the first codec unit 1400, the depth of the second codec units 1406a, 1406b, 1406c and 1406d can be D+1, which is 1 deeper than the depth D of the first codec unit 1400.

[0189] According to an embodiment, the image decoding apparatus 100 may determine a plurality of second codec units 1412a and 1412b, and 1414a, 1414b, and 1414c by horizontally dividing the first codec unit 1410 so that its height is longer than its width based on the division shape pattern information. According to an embodiment, the image decoding apparatus 100 may determine a plurality of second codec units 1422a and 1422b, and 1424a, 1424b, and 1424c by vertically dividing the first codec unit 1420 so that its width is longer than its height based on the division shape pattern information.

[0190] According to an embodiment, the depth of the second codec units 1412a and 1412b, 1414a, 1414b, and 1414c, or 1422a and 1422b, 1424a, 1424b, and 1424c, determined based on the division shape pattern information of the non-square first codec unit 1410 or 1420, can be determined based on the length of their long sides. For example, because the side length of the square second codec units 1412a and 1412b is 1 / 2 times the length of the long side of the first codec unit 1410 having a non-square shape in which the height is longer than the width, the depth of the square second codec units 1412a and 1412b is D+1, which is 1 deeper than the depth D of the non-square first codec unit 1410.

[0191] Furthermore, the image decoding apparatus 100 may divide the non-square first codec unit 1410 into an odd number of second codec units 1414a, 1414b, and 1414c based on the division shape pattern information. The odd number of second codec units 1414a, 1414b, and 1414c may include the non-square second codec units 1414a and 1414c and the square second codec unit 1414b. In this case, because the length of the long side of the non-square second codec units 1414a and 1414c and the length of the side of the square second codec unit 1414b are ½ times the length of the long side of the first codec unit 1410, the depth of the second codec units 1414a, 1414b, and 1414c may be D+1, which is 1 deeper than the depth D of the non-square first codec unit 1410. The image decoding device 100 may determine the depth of the codec unit split from the first codec unit 1420 having a non-square shape having a width longer than a height by using the above-described method of determining the depth of the codec unit split from the first codec unit 1410 .

[0192] According to an embodiment, when the odd-numbered divided codec units do not have equal sizes, the image decoding apparatus 100 may determine a PID for identifying the divided codec units based on a size ratio between the codec units. Figure 14 , the center-positioned codec unit 1414b among the odd-numbered divided codec units 1414a, 1414b, and 1414c may have the same width as the other codec units 1414a and 1414c and twice the height of the other codec units 1414a and 1414c. That is, in this case, the center-positioned codec unit 1414b may include two other codec units 1414a or 1414c. Therefore, when the PID of the center-positioned codec unit 1414b is 1 based on the scan order, the PID of the codec unit 1414c located next to the codec unit 1414b may increase by 2 and thus may be 3. That is, there may be a discontinuity in the PID values. According to an embodiment, the image decoding device 100 may determine whether the odd-numbered divided codec units are not of equal size based on whether there is a discontinuity in the PIDs used to identify the divided codec units.

[0193] According to an embodiment, the image decoding apparatus 100 may determine whether to use a specific division method based on a PID value for identifying a plurality of codec units determined by dividing the current codec unit. Figure 14, the image decoding apparatus 100 can determine the even number of codec units 1412a and 1412b or the odd number of codec units 1414a, 1414b, and 1414c by dividing the first codec unit 1410 having a rectangular shape with a height longer than a width. The image decoding apparatus 100 can identify the corresponding codec unit using a PID indicating the corresponding codec unit. According to an embodiment, the PID can be obtained from a sample at a specific position of each codec unit (e.g., the upper left sample).

[0194] According to an embodiment, the image decoding device 100 can use PIDs used to distinguish codec units to determine a codec unit at a specific location from among the divided codec units. According to an embodiment, when the division shape pattern information of a first codec unit 1410 having a rectangular shape with a height longer than width indicates that the codec unit is divided into three codec units, the image decoding device 100 can divide the first codec unit 1410 into three codec units 1414a, 1414b, and 1414c. The image decoding device 100 can assign a PID to each of the three codec units 1414a, 1414b, and 1414c. The image decoding device 100 can compare the PIDs of the odd-numbered divided codec units to determine the codec unit located at the center among the codec units. From among the codec units determined by dividing the first codec unit 1410, the image decoding device 100 can determine the codec unit 1414b having a PID corresponding to a middle value among the PIDs of the codec units as the codec unit located at the center. According to an embodiment, when the divided codec units do not have equal sizes, the image decoding apparatus 100 may determine a PID for distinguishing the divided codec units based on a size ratio between the codec units. Figure 14, the codec unit 1414b generated by dividing the first codec unit 1410 may have a width equal to that of the other codec units 1414a and 1414c and a height twice that of the other codec units 1414a and 1414c. In this case, when the PID of the codec unit 1414b located at the center is 1, the PID of the codec unit 1414c located next to the codec unit 1414b may increase by 2 and thus may be 3. When the PIDs do not increase evenly as described above, the image decoding device 100 may determine that the codec unit is divided into a plurality of codec units, including a codec unit having a size different from that of the other codec units. According to an embodiment, when the division shape pattern information indicates that the codec unit is divided into an odd number of codec units, the image decoding device 100 may divide the current codec unit so that a codec unit at a specific position among the odd number of codec units (e.g., the codec unit at the center) has a size different from that of the other codec units. In this case, the image decoding apparatus 100 can determine the codec units with different sizes and center positions by using the PID of the codec unit. However, the PID and the size or position of the codec unit at a specific position are not limited to the above example, and various PIDs and various positions and sizes of codec units can be used.

[0195] According to an embodiment, the image decoding apparatus 100 may start recursively dividing a specific data unit using a coding unit.

[0196] Figure 15 It is shown that a plurality of coding units are determined based on a plurality of specific data units included in a picture according to an embodiment.

[0197] According to an embodiment, a specific data unit may be defined as a data unit that recursively divides a codec unit by using division shape pattern information. That is, the specific data unit may correspond to the codec unit of the highest depth, which is used to determine the multiple codec units divided from the current picture. In the following description, for ease of explanation, the specific data unit is referred to as a reference data unit.

[0198] Depending on the embodiment, the reference data unit may have a specific size and a specific size shape. Depending on the embodiment, the reference data unit may include M×N samples. Here, M and N may be equal to each other and may be integers expressed as powers of 2. That is, the reference data unit may have a square or non-square shape and may be divided into an integer number of codec units.

[0199] According to an embodiment, the image decoding apparatus 100 may divide the current picture into a plurality of reference data units. According to an embodiment, the image decoding apparatus 100 may divide the plurality of reference data units divided from the current picture by using division shape pattern information of each reference data unit. The operation of dividing the reference data units may correspond to a division operation using a quadtree structure.

[0200] According to an embodiment, the image decoding apparatus 100 may predetermine the minimum size allowed for the reference data unit included in the current picture. Therefore, the image decoding apparatus 100 may determine various reference data units whose sizes are equal to or larger than the minimum size, and may determine one or more codec units by using the partition shape pattern information with reference to the determined reference data units.

[0201] Reference Figure 15 , the image decoding apparatus 100 may use a square reference codec unit 1500 or a non-square reference codec unit 1502. Depending on the embodiment, the shape and size of the reference codec unit may be determined based on various data units (e.g., a sequence, a picture, a slice, a slice segment, a slice, a slice group, a largest codec unit, etc.) that can include one or more reference codec units.

[0202] According to an embodiment, the receiver 110 of the image decoding apparatus 100 can obtain at least one of the reference codec unit shape information or the reference codec unit size information about each of the various data units from the bitstream. The operation of dividing the square reference codec unit 1500 into one or more codec units has been described above with respect to the division. Figure 3 The operation of the current codec unit 300 is described above, and the operation of dividing the non-square reference codec unit 1502 into one or more codec units has been described above with respect to the division Figure 4 The operation of the current codec unit 400 or 450 has been described above. Therefore, a detailed description thereof will not be provided again.

[0203] According to an embodiment, the image decoding device 100 may use a PID for identifying the size and shape of a reference codec unit to determine the size and shape of the reference codec unit based on a portion of data units predetermined based on a specific condition. Specifically, the receiver 110 may obtain from the bitstream only the PID for identifying the size and shape of the reference codec unit for each slice, slice segment, slice, slice group, or largest codec unit (which is a data unit that satisfies a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) among various data units (e.g., a sequence, picture, slice, slice segment, slice, slice group, largest codec unit, etc.). The image decoding device 100 may use the PID to determine the size and shape of the reference data unit for each data unit that satisfies the specific condition. When obtaining and using reference codec unit shape information and reference codec unit size information from the bitstream based on each relatively small data unit, using the bitstream may be inefficient. Therefore, instead of directly obtaining the reference codec unit shape information and reference codec unit size information, only the PID may be obtained and used. In this case, at least one of the size and shape of the reference codec unit corresponding to the PID for identifying the size and shape of the reference codec unit may be predetermined. That is, the image decoding apparatus 100 may determine at least one of the size and shape of the reference codec unit included in the data unit serving as the unit for obtaining the PID by selecting at least one of the previously determined sizes and shapes of the reference codec unit based on the PID.

[0204] According to an embodiment, the image decoding device 100 may use one or more reference codec units included in the maximum codec unit. That is, the maximum codec unit divided from the picture may include one or more reference codec units, and the codec unit may be determined by recursively dividing each reference codec unit. According to an embodiment, at least one of the width or height of the maximum codec unit may be an integer multiple of at least one of the width or height of the reference codec unit. According to an embodiment, the size of the reference codec unit may be obtained by dividing the maximum codec unit n times based on a quadtree structure. That is, according to various embodiments, the image decoding device 100 may determine the reference codec unit by dividing the maximum codec unit n times based on a quadtree structure, and may divide the reference codec unit based on at least one of block shape information or division shape pattern information.

[0205] According to an embodiment, the image decoding device 100 can obtain block shape information indicating the shape of the current codec unit or division shape pattern information indicating the division method of the current codec unit from the bitstream, and use the obtained information. The division shape pattern information can be included in the bitstream associated with various data units. For example, the image decoding device 100 can use the division shape pattern information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a slice header, or a slice group header. In addition, the image decoding device 100 can obtain syntax elements corresponding to the block shape information or the division shape pattern information from the bitstream according to each maximum codec unit, each reference codec unit, or each processing block, and use the obtained syntax elements.

[0206] Hereinafter, a method for determining a division rule according to an embodiment of the present disclosure will be described in detail.

[0207] The image decoding device 100 may determine a division rule for an image. The division rule may be predetermined between the image decoding device 100 and the image encoding device 2200. The image decoding device 100 may determine the division rule for an image based on information obtained from a bitstream. The image decoding device 100 may determine the division rule based on information obtained from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a slice header, or a slice group header. The image decoding device 100 may determine the division rule differently based on a frame, a slice, a slice, a temporal layer, a maximum codec unit, or a codec unit.

[0208] The image decoding device 100 may determine the division rule based on the block shape of the codec unit. The block shape may include the size, shape, aspect ratio, and orientation of the codec unit. The image decoding device 100 may predetermine the division rule based on the block shape information of the codec unit. However, the present disclosure is not limited to this. The image decoding device 100 may determine the image division rule based on information obtained from the received bitstream.

[0209] The shape of the codec unit can be square or non-square. When the width and height of the codec unit are the same, the image decoding device 100 may determine the shape of the codec unit to be square. In addition, when the width and height of the codec unit are different, the image decoding device 100 may determine the shape of the codec unit to be non-square.

[0210] The size of the codec unit can include various sizes, such as 4×4, 8×4, 4×8, 8×8, 16×4, 16×8, ..., 256x256. The size of the codec unit can be classified based on the length of the long side, the length of the short side, or the area of ​​the codec unit. The image decoding device 100 can apply the same division rule to codec units classified into the same group. For example, the image decoding device 100 can classify codec units with the same long side length as having the same size. In addition, the image decoding device 100 can apply the same division rule to codec units with the same long side length.

[0211] The aspect ratio of the codec unit may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, 1:32, etc. In addition, the direction of the codec unit may include a horizontal direction and a vertical direction. The horizontal direction may indicate that the width of the codec unit is greater than its height. The vertical direction may indicate that the width of the codec unit is shorter than its height.

[0212] The image decoding device 100 can adaptively determine the division rule based on the size of the codec unit. The image decoding device 100 can determine the allowable division shape patterns differently based on the size of the codec unit. For example, the image decoding device 100 can determine whether to allow division based on the size of the codec unit. The image decoding device 100 can determine the division direction based on the size of the codec unit. The image decoding device 100 can determine the allowable division type based on the size of the codec unit.

[0213] The division rule determined based on the size of the coding unit may be a division rule determined in advance in the image decoding device 100. In addition, the image decoding device 100 may determine the division rule based on information obtained from a bitstream.

[0214] The image decoding apparatus 100 may adaptively determine a division rule based on the position of the coding unit. The image decoding apparatus 100 may adaptively determine a division rule based on the position of the coding unit in the image.

[0215] In addition, the image decoding device 100 may determine the division rule so that the codec units generated via different division paths do not have the same block shape. However, the present disclosure is not limited thereto, and the codec units generated via different division paths have the same block shape. The codec units generated via different division paths may have different decoding processing orders. As has been mentioned above, Figure 12 The decoding process order is described, so its details are not provided again.

[0216] Figure 16 It is a block diagram of an image encoding and decoding system.

[0217] The encoding device 1610 of the image encoding and decoding system (1600) transmits an encoded bit stream of an image, and the decoding device 1650 outputs a reconstructed image by receiving and decoding the bit stream. Here, the decoding device 1650 may have a configuration similar to that of the image decoding apparatus 100.

[0218] At the encoding end 1610, when the prediction mode of the current block is the inter-frame prediction mode, the inter-frame prediction encoder 1605 generates motion information of the current block, which indicates the reference block of the reference picture that is temporally adjacent to the current picture. The inter-frame prediction encoder 1605 can determine the prediction sample of the current block by using the sample of the reference block. The intra-frame prediction encoder 1610 can determine the intra-frame prediction information, which indicates the method of determining the prediction sample or the direction in which the adjacent samples similar to the current block are located, so that the prediction sample of the current block is determined by using the adjacent samples that are spatially adjacent to the current block. The inter-frame prediction encoder 1605 can determine the reference sample to be used to predict the current block from the previously reconstructed samples stored in the decoded picture buffer (DPB) 1648.

[0219] The transformer 1620 transforms the residual sample values ​​obtained by subtracting the prediction samples generated by the inter-frame prediction encoder 1605 or the intra-frame prediction encoder 1610 from the original samples of the current block, thereby outputting the transform coefficients. The quantizer 1625 quantizes the transform coefficients output from the transformer 1620 and outputs the quantized transform coefficients. The entropy encoder 1630 can encode the quantized transform coefficients using the residual syntax element including the level value and output them in the form of a bitstream.

[0220] The quantized transform coefficient output from the quantizer 1625 may be inversely quantized and inversely transformed via the inverse quantizer 1633 and the inverse transformer 1635 , and thus a residual sample value may be generated again.

[0221] The residual sample value and the predicted sample value are added at the adder 1615, and thus a reconstructed sample value is output. The post-reconstruction filter 1640 performs post-reconstruction filtering on the reconstructed sample, and the reconstructed sample value updated by the post-reconstruction filtering can be used as a reference sample value for intra-frame prediction to be performed by the intra-frame prediction encoder 1610. The post-reconstruction filter 1640 can perform Hadamard transform domain filtering or bilateral filtering on the reconstructed sample value.

[0222] The loop filter 1645 may perform at least one of deblocking filtering or adaptive loop filtering on the reconstructed samples updated by the post-reconstruction filtering. The reconstructed sample values ​​updated by the filtering of the loop filter 1645 may be stored in the DPB 1648 and may be used as reference sample values ​​for inter-frame prediction to be performed by the inter-frame prediction encoder 1605.

[0223] The entropy decoder 1655 of the decoding device 1650 can perform entropy decoding on the received bitstream to parse the residual syntax element including the level value. The quantized transform coefficients can be reconstructed from the residual syntax element. The inverse quantizer 1660 can output the transform coefficients by performing inverse quantization on the quantized transform coefficients, and the inverse transformer 1665 can output the residual sample values ​​by performing inverse transform on the transform coefficients.

[0224] The inter-frame prediction encoder 1670 of the decoding device 1650 can determine a reference picture that is temporally adjacent to the current picture by using the motion information of the current block parsed by the entropy decoder 1655, and determine a reference block in the reference picture. The inter-frame prediction encoder 1670 can determine the prediction sample of the current block by using samples of the reference block. The intra-frame prediction encoder 1675 of the decoding device 1650 can determine the reference sample that is spatially adjacent to the current block by using the intra-frame prediction information and the motion information of the current block parsed by the entropy decoder 1655, and determine the prediction sample of the current block by using the determined adjacent samples. The inter-frame prediction encoder 1670 can determine the reference sample to be used for predicting the current block from among the previously reconstructed samples stored in the DPB 1690.

[0225] The residual sample values ​​and the predicted sample values ​​are added at the adder 1695 of the decoding device 1650, and thus the reconstructed sample values ​​of the current block are output. The post-reconstruction filter 1680 of the decoding device 1650 can perform Hadamard transform domain filtering or bilateral filtering on the reconstructed sample values. The reconstructed sample values ​​updated by the filtering of the post-reconstruction filter 1680 can be used as reference sample values ​​for intra-frame prediction to be performed by the intra-frame prediction encoder 1675.

[0226] The loop filter 1685 of the decoding device 1650 may perform at least one of deblocking filtering or adaptive loop filtering on the reconstructed samples updated by the post-reconstruction filtering. The reconstructed sample values ​​updated by the filtering of the loop filter 1685 may be stored in the DPB 1690 and may be used as reference sample values ​​for inter-frame prediction to be performed by the inter-frame prediction encoder 1670.

[0227] The video encoding and decoding method and the video encoding and decoding device according to the embodiment propose a method based on the above reference Figures 1 to 16The method for performing quantization or inverse quantization on a data unit determined by the video encoding device and the video decoding device described herein. Figure 17 to Figure 4 0 describes a video encoding method and apparatus or a video decoding method and apparatus for performing quantization or inverse quantization by determining a quantization parameter (QP) according to an embodiment of the present disclosure.

[0228] Figure 17 is a block diagram of a video decoding apparatus according to an embodiment.

[0229] The video decoding device 1700 according to an embodiment includes an obtainer 1710 and a decoder 1720. The video decoding device 1700 may obtain a bitstream generated as a result of encoding an image, determine positions of blocks divided from a picture based on information included in the bitstream, and decode the blocks such as a maximum codec unit and a codec unit.

[0230] The video decoding apparatus 1700 may include at least one data storage (not shown) storing input and output data of the obtainer 1710 and the decoder 1720. The video decoding apparatus 1700 may include a memory controller (not shown) for controlling data input and output of the data storage.

[0231] The video decoding device 1700 can perform image decoding operations including prediction by operating in connection with an internal video decoding processor or an external video decoding processor to reconstruct an image through image decoding. The internal video decoding processor of the video decoding device 1700 according to an embodiment can perform basic image decoding operations as a separate processor, or a central processing unit or a graphics processing unit including an image decoding processing module can perform basic image decoding operations.

[0232] The video decoding device 1700 may be included in the above-mentioned image decoding device 100. For example, the obtainer 1710 and the decoder 1720 may correspond to the decoder 120 of the image decoding device 100. The video decoding device 1700 may correspond to the above-mentioned Figure 16 The decoding device 1650 of the image encoding and decoding system is described. For example, the decoder 1720 may include the function of the inverse quantizer 1633 of the decoding device 1650.

[0233] The video decoding device 1700 receives a bitstream generated as a result of encoding an image. The bitstream may include information about the current picture. The picture may include one or more maximum codec units. The video decoding device 1700 may determine the position of the current block in the picture based on the information obtained from the bitstream. The current block is a block generated when the picture is divided according to the tree structure, and may correspond to a maximum codec unit or a codec unit, for example. The video decoding device 1700 determines whether to further divide the current block into sub-blocks of a lower depth and may determine the tree structure of the current block. The lower depth may be determined by adding the number of divisions from the current block to the sub-blocks to the current depth of the current block. Among the blocks forming the tree structure included in the current picture, the blocks located at the leaves are blocks that are no longer divided. Therefore, the video decoding device 1700 may decode one or more blocks that are no longer divided by performing inverse quantization, inverse transformation, and prediction on the blocks.

[0234] The video decoding device 1700 may generate prediction samples of the current block by performing prediction on the current block. The video decoding device 1700 may generate residual samples of the current block by performing inverse transform on the current block. The reconstructor 1730 may generate reconstructed samples of the current block by using the prediction samples of the current block and the residual samples of the current block. The video decoding device 1700 may reconstruct the current picture by reconstructing the samples of each block.

[0235] For example, when the prediction mode of the current block is the intra mode, the video decoding device 1700 can determine the reference sample among the samples of the spatially adjacent blocks located in the intra prediction direction by using the intra prediction information of the current block, and determine the prediction sample corresponding to the current block by using the reference sample.

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

[0237] When the current block is predicted in skip mode, the video decoding apparatus 1700 may not need to parse the transform coefficient of the current block from the bitstream. The video decoding apparatus 1700 may determine the reconstructed sample of the current block by using the prediction sample of the current block as it is.

[0238] The video decoding apparatus 1700 according to an embodiment uses a quantization parameter (QP) to perform inverse quantization. A QP is set for each codec unit, and a QP can be applied to the transform coefficients included in the codec unit. A picture may include one or more slices, and a slice may include one or more codec units. To determine the QP for each codec unit, the video decoding apparatus 1700 may obtain a plurality of pieces of information required to determine the QP for each codec unit, each slice, or each picture from the bitstream.

[0239] The obtainer 1710 according to an embodiment may obtain information required to determine the QP of each codec unit from the bitstream syntax associated with the codec unit. The obtainer 1710 may obtain information required to determine the QP of each slice from the slice header syntax. The obtainer 1710 may obtain information required to determine the QP of each picture from the picture header syntax.

[0240] First, the video decoding apparatus 1700 may determine whether to obtain a QP difference value for each picture or a QP difference value for each slice in a picture parameter setting stage.

[0241] According to an embodiment, the obtainer 1710 may obtain an initial QP value to be applied to the current picture from a picture parameter set. Furthermore, the obtainer 1710 may obtain picture header QP difference information indicating whether QP difference information exists in the picture header of the current picture from the picture parameter set. When the picture header QP difference information indicates that QP difference information exists in the picture header, the obtainer 1710 may obtain a first QP difference value for the current picture from the picture header. When the picture header QP difference information indicates that QP difference information does not exist in the picture header, the obtainer 1710 may obtain a second QP difference value for the current slice from a slice header of the current slice included in the current picture.

[0242] When the picture header QP difference information indicates that QP difference information is present in the picture header, the decoder 1720 according to an embodiment may determine the QP of the codec unit included in the current picture by using the QP initial value and the first QP difference value. The decoder 1720 may perform inverse quantization on the codec unit included in the current picture by using the QP determined by using the first QP difference value.

[0243] When the picture header QP difference information indicates that the QP difference information does not exist in the picture header, the decoder 1720 may determine the QP of the codec unit included in the current slice by using the QP initial value and the second QP difference value. The decoder 1720 may perform inverse quantization on the codec unit included in the current slice by using the QP determined by using the second QP difference value.

[0244] In the following, reference will be made to Figure 18The video decoding apparatus 1700 will now be described as performing inverse quantization on each codec unit by obtaining QP difference information for each picture or each slice.

[0245] Figure 18 is a flowchart of a video decoding method according to an embodiment.

[0246] In operation 1810, the obtainer 1710 may obtain picture header QP difference information and a QP initial value to be applied to the current picture from a picture parameter set. The picture header QP difference information according to an embodiment may indicate whether QP difference information exists in the picture header of the current picture.

[0247] In operation 1820 , when the picture header QP difference information indicates that QP difference information exists in the picture header of the current picture, the obtainer 1810 may obtain a first QP difference of the current picture from the picture header.

[0248] In operation 1830 , the decoder 1820 may determine the QP of the coding unit included in the current picture by using the QP initial value and the first QP difference value.

[0249] In operation 1840, the decoder 1820 may obtain a transform coefficient of the codec unit by performing inverse quantization on the codec unit using the QP determined by using the first QP difference value. In other words, inverse quantization may be performed on the codec unit included in the current picture using the QP determined by using the first QP difference value.

[0250] In operation 1850, the decoder 1820 may reconstruct the codec unit by using the transform coefficient of the codec unit obtained in operation 1840. The decoder 1820 may obtain residual samples by performing inverse transform on the transform coefficient and determine reconstructed samples of the codec unit by using the residual samples.

[0251] According to an embodiment, when the picture header QP difference information indicates that QP difference information is not present in the picture header, the obtainer 1710 may obtain a second QP difference for the current slice from the slice header of the current slice included in the current picture. The decoder 1720 may determine the QP of the codec unit included in the current slice by using the QP initial value and the second QP difference. The decoder 1720 may obtain transform coefficients of the codec unit by performing inverse quantization on the codec unit using the QP determined using the second QP difference. The decoder 1720 may reconstruct the codec unit using the transform coefficients. In other words, inverse quantization may be performed on the codec unit included in the current slice by using the QP determined using the second QP difference.

[0252] In operation 1820, when the picture header QP difference information indicates that QP difference information exists in the picture header of the current picture, the obtainer 1810 may obtain a first QP difference value of the luma component of the current picture from the picture header. The decoder 1820 may determine the QP of the luma component of the slice included in the current picture by adding the QP initial value and the first QP difference value of the luma component. The decoder 1820 may determine the QP of the codec unit included in the slice included in the current picture by using the QP of the luma component of the slice.

[0253] In operation 1820, the obtainer 1710 may obtain the QP difference of the codec unit from the bitstream. The decoder 1820 may determine the QP of the luma component of the codec unit by using the QP of the luma component of the slice and the QP difference of the codec unit. The decoder 1820 may perform inverse quantization on the transform coefficients included in the codec unit by using the QP of the codec unit. The residual samples of the codec unit may be decoded by performing inverse transform on the inverse quantized transform coefficients.

[0254] According to another embodiment, the obtainer 1710 may not obtain the QP difference value of the codec unit from the bitstream. In this case, the decoder 1810 may determine the QP of the luma component of the codec unit by using the QP prediction value predicted for the codec unit.

[0255] According to an embodiment, when the picture header QP difference information indicates that the picture header of the current picture does not contain QP difference information, the obtainer 1810 may obtain a second QP difference value for the luma component of the current slice from the slice header. The decoder 1820 may determine the QP for the luma component of the current slice by adding the initial QP value to the second QP difference value for the luma component. The decoder 1820 may determine the QP for the codec unit included in the current slice by using the QP for the luma component of the current slice. The decoder 1820 may perform inverse quantization on the transform coefficients included in the codec unit by using the QP for the codec unit. The residual samples of the codec unit may be decoded by performing an inverse transform on the inversely quantized transform coefficients. When the picture header QP difference information indicates that the picture header of the current picture does not contain QP difference information, the obtainer 1810 may obtain the QP difference value for the codec unit included in the current slice from the bitstream. The decoder 1820 may determine the QP of the luma component of the current codec unit included in the current slice by using the QP difference value of the codec unit.

[0256] When the picture header QP difference information indicates that the picture header of the current picture does not contain QP difference information, the obtainer 1810 may obtain the Cb QP difference of the Cb chroma component of the current slice and the Cr QP difference of the Cr chroma component of the current slice from the slice header. The decoder 1820 may determine the Cb QP of the Cb chroma component of the current codec unit included in the current slice by using the Cb QP difference of the Cb chroma component of the current slice. The decoder 1820 may determine the CrQP of the Cr chroma component of the current codec unit included in the current slice by using the Cr QP difference of the Cb chroma component of the current slice to update the QP of the Cr chroma component of the current codec unit.

[0257] Figure 19 is a block diagram of a video encoding apparatus according to an embodiment.

[0258] Reference Figure 19 , the video encoding apparatus 1900 according to an embodiment may include a quantizer 1910 and an information encoder 1920 .

[0259] The video encoding apparatus 1900 according to an embodiment may include a central processor (not shown) for controlling the quantizer 1910 and the information encoder 1920. Alternatively, the quantizer 1910 and the information encoder 1920 may each be operated by their own processors (not shown), and the processors may operate systematically so that the video encoding apparatus 1900 operates as a whole. Alternatively, the quantizer 1910 and the information encoder 1920 may be controlled under the control of an external processor (not shown) of the video encoding apparatus 1900.

[0260] The video encoding apparatus 1900 may include at least one data storage (not shown) storing input and output data of the quantizer 1910 and the information encoder 1920. The video encoding apparatus 1900 may include a memory controller (not shown) for controlling data input and output of the data storage.

[0261] The video encoding device 1900 can perform image encoding operations including prediction by operating in connection with an internal video encoding processor or an external video encoding processor to encode an image. The internal video encoding processor of the video encoding device 1900 according to an embodiment can perform basic image encoding operations as a separate processor, or a central processing unit or a graphics processing unit including an image encoding processing module can perform basic image decoding operations.

[0262] The video encoding device 1900 may correspond to the above reference Figure 16The encoding device 1600 of the image encoding and decoding system described above may correspond to the entropy encoder 1630 of the encoding device 1600. The quantizer 1910 may correspond to the quantizer 1625 of the encoding device 1600.

[0263] The video encoding apparatus 1900 according to an embodiment may divide a picture into a plurality of maximum codec units, and divide each maximum codec unit into blocks having various sizes and various shapes for encoding.

[0264] For example, when the prediction mode of the current block is the intra mode, the video encoding apparatus 1900 can determine a reference sample among samples of spatially adjacent blocks located in the intra prediction direction by using the intra prediction information of the current block, and determine the prediction sample of the current block by using the reference sample. A residual sample that is a difference between the prediction sample and the sample of the current block can be determined, a transform coefficient can be generated by converting the residual sample based on the transform block, and a quantized transform coefficient can be generated by performing quantization on the transform coefficient.

[0265] For example, when predicting a current block in skip 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 for the current block from a reference picture and determine a motion vector indicating the reference block from the current block. In skip mode, the residual block may not need to be encoded.

[0266] For example, when the prediction mode of the current block is inter mode, the video encoding device 1900 may determine a motion vector to predict the current block. The video encoding device 1900 may determine a reference block for the current block from a reference picture, and determine a motion vector indicating the reference block from the current block. The video encoding device 1900 may determine a prediction sample for 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 generate a quantized transform coefficient by performing a transform and quantization on the residual sample based on a transform block.

[0267] The current block is a block generated when the image is divided according to the tree structure, and may correspond to, for example, a maximum codec unit, a codec unit, or a transform unit. The video encoding apparatus 1900 may encode blocks included in a picture according to a coding order.

[0268] The video encoding device 1900 according to an embodiment uses QP to perform quantization. A QP is set for each codec unit, and a QP can be applied to the transform coefficients included in the codec unit. A picture can include one or more slices, and a slice can include one or more codec units. The video encoding device 1900 can determine the QP for each codec unit and encode multiple pieces of information required to determine the QP for each codec unit, each slice, or each picture for signaling.

[0269] The information encoder 1920 according to an embodiment may encode the information required to determine the QP of each codec unit and output it in the form of a codec unit-related bitstream syntax. The information encoder 1920 may encode the information required to determine the QP of each slice and output it in the form of a slice header syntax. The information encoder 1920 may encode the information required to determine the QP of each picture and output it in the form of a picture header syntax.

[0270] First, the video encoding apparatus 1900 may determine whether to transmit a QP difference value for each picture or a QP difference value for each slice at a picture parameter set level.

[0271] The quantizer 1910 according to an embodiment may determine a QP initial value to be applied to a current picture.

[0272] When determining the QP difference value for each picture, the information encoder 1920 may determine a first QP difference value between the QP initial value and the QP used in the current picture. The information encoder 1920 may generate a picture header of the current picture including the first QP difference value.

[0273] When determining the QP difference value for each slice, the information encoder 1920 may determine a second QP difference value between the QP initial value and the QP used in the current slice included in the current picture. The information encoder 1920 may generate a slice header of the current slice, the slice header including the second QP difference value.

[0274] The information encoder 1920 according to an embodiment may generate a picture parameter set including a QP initial value and picture header QP difference information indicating whether QP difference information exists in a picture header of a current picture.

[0275] In the following, reference will be made to Figure 20 A process in which the video encoding apparatus 1900 signals QP difference information for each picture or each slice is described.

[0276] Figure 20 is a flowchart of a video encoding method according to an embodiment.

[0277] In operation 2010 , the quantizer 1910 may determine a QP initial value to be applied to the current picture.

[0278] In operation 2020 , when determining a QP difference value for each picture, the information encoder 1920 may determine a first QP difference value between the QP initial value and the QP used in the current picture, and generate a picture header of the current picture, the picture header including the first QP difference value.

[0279] In operation 2030 , the information encoder 1920 may generate a picture parameter set including a QP initial value and picture header QP difference information indicating whether QP difference information exists in a picture header of a current picture.

[0280] According to an embodiment, when determining a QP difference value for each slice, the information encoder 1920 may determine a second QP difference value between the QP initial value and the QP used in the current slice included in the current picture, and generate a slice header of the current slice including the second QP difference value.

[0281] In operation 2020, when determining the QP difference value for each picture, the quantizer 1910 may determine the QP of the luma component of the slice included in the current picture. The information encoder 1920 may determine a first QP difference value for the luma component of the current picture by using the difference between the QP initial value and the QP of the luma component of the slice included in the current picture. The information encoder 1920 may determine the QP difference value for the coding unit by using the difference between the QP of the luma component of the slice and the QP of the luma component of the coding unit. The information encoder 1920 may encode the QP difference value for the coding unit.

[0282] In operation 2030, when determining the QP difference value for each slice, the quantizer 1910 may determine the QP of the luma component of the current slice. The information encoder 1920 may determine a second QP difference value for the luma component of the current slice by using the difference between the QP initial value and the QP of the luma component of the current slice. The information encoder 1920 may determine the QP difference value for the coding unit by subtracting the QP of the luma component of the current slice from the QP of the luma component of the coding unit. The information encoder 1920 may encode the QP difference value for the coding unit.

[0283] According to another embodiment, the quantizer 1910 may determine the QP of the luminance component of the codec unit by using the QP prediction value predicted for the codec unit and perform quantization on the codec unit by using the QP. In this case, the information encoder 1920 may not encode the QP difference value of the codec unit.

[0284] In operation 2030, when encoding the QP difference value for each slice, the information encoder 1920 may determine a Cb QP difference value for the Cb chroma component of the current slice, which is used to determine the QP of the Cb chroma component of the codec unit included in the current slice. Furthermore, the information encoder 1920 may determine a Cr QP difference value for the Cr chroma component of the current slice, which is used to determine the QP of the Cr chroma component of the codec unit included in the current slice. The information encoder 1920 may encode the Cb QP difference value and the Cr QP difference value of the Cr chroma component of the current slice and generate a slice header for the current slice including the Cb QP difference value and the Cr QP difference value.

[0285] The quantizer 1910 may generate a quantized transform coefficient of the codec unit by performing quantization on the transform coefficient of the codec unit using a QP. The information encoder 1920 may generate a bitstream by performing entropy encoding on a plurality of pieces of information on the quantized transform coefficient.

[0286] The video decoding device 1700 and the video encoding device 1900 according to an embodiment can selectively signal a QP difference for each picture or each slice. Therefore, the video encoding device 1900 according to an embodiment can determine whether to signal a QP difference for each picture or each slice based on data transmission efficiency or characteristics of the data picture, and signal the QP difference using a method that achieves high transmission efficiency. The video decoding device 1700 according to an embodiment can determine whether to obtain a QP difference for each picture or each slice based on information obtained from a picture parameter set, and determine the QP for each picture or each slice. Therefore, when a QP difference is signaled for each picture, it is not necessary to signal a QP difference for each slice included in the picture, thereby reducing the amount of data used for QP signaling.

[0287] Figure 21 is an overview for introducing QP in picture level or slice level according to an embodiment.

[0288] In a general video codec, a QP initial value is generally configured in a picture parameter set (PPS), and a difference in the QP initial value of a slice is transmitted through a slice header, and thus QP is configured for each slice.

[0289] On the other hand, the video decoding apparatus 1700 according to an embodiment can obtain the picture header of each picture and the signaling information about QP from the picture header. In the present disclosure, whether to signal the QP difference value for each picture or the QP difference value for each slice is selected between the video decoding apparatus 1700 and the video encoding apparatus 1900, thereby simplifying the QP signaling structure.

[0290] First, in operation 2100, the video decoding apparatus 1700 may obtain a QP initial value from a higher-level sequence parameter set (SPS) or PPS, which is a picture header. Furthermore, in operation 2110, the video decoding apparatus 1700 may obtain picture header QP difference (dQP) information from the PPS or SPS. The video decoding apparatus 1700 may determine whether to determine the QP at the picture level or at the slice level based on the picture header dQP information.

[0291] In detail, when the picture header dQP information is not 0 (for example, when the picture header dQP information is 1), that is, when the QP difference value (delta value) exists in the picture header, the video decoding device 1700 may obtain the QP difference value from the picture header in operation 2120. The video decoding device 1700 may determine the QP of each picture by using the QP difference value obtained from the picture header and the QP initial value obtained from the PPS or SPS.

[0292] When the picture header dQP information is 0, that is, when the QP difference value does not exist in the picture header, the video decoding apparatus 1700 may obtain the QP difference value from the slice header in operation 2130. The video decoding apparatus 1700 may determine the QP of each slice by using the QP difference value obtained from the slice header and the QP initial value obtained from the PPS or SPS.

[0293] For operations 2100 to 2130 of the video decoding apparatus 1700 , the video encoding apparatus 1900 may determine whether to determine QP at a picture level or a slice level. Furthermore, the video encoding apparatus 1900 may encode picture header dQP information indicating whether QP is determined at a picture level or a slice level.

[0294] Specifically, when determining the QP for each picture, the video encoding apparatus 1900 may encode the QP difference for each picture. Therefore, the video encoding apparatus 1900 may generate a picture header for the current picture including the QP difference for the current picture. In this case, the picture header dQP information may be encoded to indicate 1, thereby indicating that the QP difference exists in the picture header of the current picture.

[0295] When determining the QP for each slice, the video encoding apparatus 1900 may encode the QP difference value for each slice. Therefore, the video encoding apparatus 1900 may generate a slice header for the current slice including the QP difference value for the current slice. In this case, the picture header dQP information may be encoded to indicate 0, thereby indicating that the QP difference value does not exist in the picture header.

[0296] The video encoding device 1900 according to an embodiment may generate a PPS or an SPS including a QP initial value and picture header dQP information.

[0297] As described above, when the same QP is configured for the codecs included in the current picture at the picture level, the QP is signaled only from the picture header, thereby reducing the number of bits used for QP signaling. In other words, the QP difference can be signaled only once from the picture header of the current picture, without having to signal the QP via the slice header of each slice included in the current picture. When the characteristics of the slices included in the current picture differ from each other, the QP can be separately configured for each slice to configure the QP in more detail, and the QP difference can be signaled to each slice for each slice header.

[0298] In the following, reference will be made to Figures 22 to 24 Describes the syntax structure for signaling picture header dQP information.

[0299] Figure 22 A picture parameter set including picture header dQP information according to an embodiment is shown.

[0300] The video encoding apparatus 1900 may include syntax elements pps_init_qp_minus26 2210 and pps_qp_delta_info_in_ph_flag 2220 of the picture parameter set syntax 2200. The syntax element pps_qp_delta_info_in_ph_flag 2220 may indicate whether a QP difference value of a current picture exists in a picture header of the current picture.

[0301] The video decoding apparatus 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 apparatus 1700 may obtain a QP initial value applicable to a current picture or a slice included in the current picture from the syntax element pps_init_qp_minus26 2210. The video decoding apparatus 1700 may identify from the syntax element pps_qp_delta_info_in_ph_flag 2220 whether a QP difference value of the current picture exists in the picture header of the current picture.

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

[0303] SliceQpY=26+pps_init_qp_minus26+ph_qp_delta

[0304] SliceQpY=26+pps_init_qp_minus26+sh_qp_delta

[0305] Therefore, the QP SliceQpY of the luma component of the slice may be determined within the range from -QpBdOffset to +63.

[0306] Figure 23 A picture header including a QP difference value of a current picture is shown according to an embodiment.

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

[0308] The video decoding apparatus 1700 can obtain the syntax element ph_qp_delta 2320 from the picture header syntax 2300. Specifically, when the pps_qp_delta_info_in_ph_flag 2220 obtained from the PPS 2200 indicates 1 (2310), the syntax element ph_qp_delta 2320 can be obtained from the picture header syntax 2300. In this case, the QP of the picture can be determined by adding the syntax elements pps_init_qp_minus 26 2210 and ph_qp_delta 2320 corresponding to the current picture in the picture header syntax 2300. The QP of the picture can be applied to all codec units included in the current picture. When the QP difference value of the codec unit is obtained from the syntax structure corresponding to each codec unit, the QP of the codec unit can be determined by adding the QP difference value of the codec unit to the QP of the picture. The video decoding apparatus 1700 may perform inverse quantization on transformed samples of a codec unit by using the QP of each codec unit.

[0309] Figure 24 A slice header including a QP difference value for a current slice is shown according to an embodiment.

[0310] The video encoding apparatus 1900 may include a syntax element sh_qp_delta 2420 for the slice header syntax 2400. The syntax element sh_qp_delta 2420 may indicate a QP difference value applicable to the luma component of the current slice. Specifically, when the pps_qp_delta_info_in_ph_flag 2220 included in the PPS 2200 indicates 0 (2410), the syntax element sh_qp_delta 2420 may be included in the slice header syntax 2400. Furthermore, the video encoding apparatus 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 a QP difference value for the chroma Cb component and a QP difference value for the chroma Cr component, respectively.

[0311] The video decoding apparatus 1700 may obtain the syntax element sh_qp_delta 2420 from the slice header syntax 2400. Specifically, when the pps_qp_delta_info_in_ph_flag 2220 obtained from the PPS 2200 indicates 0 (2410), the syntax element sh_qp_delta 2420 may be obtained from the slice header syntax 2400. In this case, 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 corresponding to the current slice of the slice header syntax 2400. The QP of the luma component of the slice may be applied to all codec units included in the current slice. When the QP difference value of the luma component of the codec unit is obtained from the syntax structure corresponding to each codec unit, the QP of the luma component of the codec unit can be determined by adding the QP difference value of the luma component of the codec unit and the QP of the luma component of the slice.

[0312] In addition, the video decoding apparatus 1700 can parse the syntax elements sh_cb_qp_offset and sh_cr_qp_offset 2430 from the slice header syntax 2400. The QP difference value of the chroma Cb component and the QP difference value of the chroma Cr component can be obtained from the syntax elements sh_cb_qp_offset and sh_cr_qp_offset 2430, respectively. Therefore, the video decoding apparatus 1700 can determine the QP of the chroma Cb component of the codec unit included in the current slice by using the QP difference value of the chroma Cb component, and determine the QP of the chroma Cr component of the codec unit included in the current slice by using the QP difference value of the chroma Cr component. The video decoding apparatus 1700 can perform inverse quantization on the transformed samples of the codec unit by using the QP of each codec unit.

[0313] The sh_cb_qp_offset and sh_cr_qp_offset 2430 may each have a value ranging between -12 and 12.

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

[0315] Furthermore, when a QP difference (delta QP) is signaled at the codec level, the QP specified at the start of a slice, the start of a slice, a picture header, or a slice header can be used as the QP initial value. For example, when the QP is specified in a picture header and a slice or slice exists in a picture, the QP specified in the picture header at the start of the slice or slice can be used as the QP initial value. Thus, the QP of a codec can be determined by adding the QP difference of the codec signaled at the codec level to the QP initial value specified at the start of a slice or slice.

[0316] As another example, when a picture order counter (POC) is signaled, the POC information may be included only in the picture header, not in the slice header. In this case, it may be difficult to identify which picture a particular slice belongs to. However, the index of the picture to which the slice belongs is identified by using a timestamp or sequence number to be signaled at the system level. In addition, the loss of information about a particular slice or picture header can be determined by receiving a notification from a system external to the codec.

[0317] According to the video encoding method and the video decoding method of the embodiment, a method of transmitting a QP difference may be determined according to data transmission efficiency or characteristics of a picture, and the QP difference may be signaled according to the method.

[0318] In the following, reference will be made to Figures 25 to 32 This document describes the syntax structure used to selectively signal parameters available in various tools at the picture level or slice level. Whether tool-related parameters are signaled from a picture header or a slice header can be determined by a flag signaled from a picture sequence set.

[0319] Figure 25 A picture parameter set including information indicating whether a picture header includes deblocking filter related parameters according to an embodiment is shown.

[0320] The video encoding apparatus 1900 may include the pps_dbf_info_in_ph_flag 2510 in the picture parameter set syntax 2500. The syntax element pps_dbf_info_in_ph_flag 2510 may indicate whether a deblocking filter-related parameter difference value of the current picture exists in the picture header of the current picture.

[0321] The video decoding apparatus 1700 may parse the pps_dbf_info_in_ph_flag 2510 from the picture parameter set syntax 2500. The video decoding apparatus 1700 may identify from the syntax element pps_dbf_info_in_ph_flag 2510 whether the deblocking filter related parameters of the current picture exist in the current picture header.

[0322] Figure 26 A picture header including deblocking filter related parameters of a current picture according to an embodiment is shown.

[0323] The video encoding apparatus 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 for the picture header syntax 2600 . In detail, when the pps_dbf_info_in_ph_flag 2510 included in the PPS 2500 indicates 1 ( 2610 ), syntax elements ph_luma_beta_offset_div2, ph_luma_tc_offset_div2, ph_cb_beta_offset_div2, ph_cb_tc_offset_div2, ph_cr_beta_offset_div2, and ph_cr_tc_offset_div2 2620 may be included in the picture header syntax 2600 .

[0324] The video decoding device 1700 may 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 . In detail, when the pps_dbf_info_in_ph_flag 2510 included in the PPS 2500 indicates 1 ( 2610 ), syntax elements ph_luma_beta_offset_div2, ph_luma_tc_offset_div2, ph_cb_beta_offset_div2, ph_cb_tc_offset_div2, ph_cr_beta_offset_div2, and ph_cr_tc_offset_div2 2620 may be obtained from the picture header syntax 2600 .

[0325] 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 applied to the Cr component of a slice in the current picture. The video decoding apparatus 1700 may perform deblocking filtering on a boundary of a coding unit included in a current picture by using a deblocking filtering related parameter obtained from a picture header.

[0326] Figure 27 A slice header including deblocking filter related parameters of a current slice according to an embodiment is shown.

[0327] The video encoding apparatus 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 for the slice header syntax 2700 . In detail, when the pps_dbf_info_in_ph_flag 2510 included in the PPS 2500 indicates 0 ( 2710 ), syntax elements sh_luma_beta_offset_div2, sh_luma_tc_offset_div2, sh_cb_beta_offset_div2, sh_cb_tc_offset_div2, sh_cr_beta_offset_div2, and sh_cr_tc_offset_div2 2720 may be included in the slice header syntax 2700 .

[0328] The video decoding device 1700 may 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 . In detail, when the pps_dbf_info_in_ph_flag 2510 included in the PPS 2500 indicates 0 ( 2710 ), syntax elements sh_luma_beta_offset_div2, sh_luma_tc_offset_div2, sh_cb_beta_offset_div2, sh_cb_tc_offset_div2, sh_cr_beta_offset_div2, and sh_cr_tc_offset_div2 2720 may be obtained from the slice header syntax 2700 .

[0329] The syntax element sh_luma_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the luma component of the current slice. The syntax element sh_luma_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to the luma component of the current slice. The syntax element sh_cb_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the Cb component of the current slice. The syntax element sh_cb_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to the Cb component of the current slice. The syntax element sh_cr_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the Cr component of the current slice. The syntax element sh_cr_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to the Cr component of the current slice. The video decoding apparatus 1700 may perform deblocking filtering on a boundary of a coding unit included in a current slice by using a deblocking filtering-related parameter obtained from a slice header.

[0330] Figure 28 A picture parameter set including information indicating whether a picture header includes various tool-related parameters according to an embodiment is shown.

[0331] The video encoding apparatus 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 for the picture parameter set syntax 2800. The syntax element pps_rpl_info_in_ph_flag 2810 may indicate whether reference picture list-related parameters of 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 of 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 of 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 of the current picture exist in the picture header of the current picture.

[0332] The video decoding apparatus 1700 can parse pps_rpl_info_in_ph_flag 2810, pps_sao_info_in_ph_flag 2820, pps_alf_info_in_ph_flag 2830, and pps_wp_info_in_ph_flag 2840 from the picture parameter set syntax 2800. The video decoding apparatus 1700 can identify whether reference picture list-related parameters of 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 apparatus 1700 can identify whether SAO-related parameters of 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 apparatus 1700 can identify whether ALF-related parameters of 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 apparatus 1700 may identify whether the weighted prediction related parameters of the current picture exist in the picture header of the current picture from the syntax element pps_wp_info_in_ph_flag 2840 .

[0333] Figure 29 A picture header including weighted prediction related parameters, SAO related parameters, and reference picture list related parameters of a current picture according to an embodiment is shown.

[0334] The video encoding apparatus 1900 may include the weighted prediction syntax pred_weight_table() 2920 to the picture header syntax 2900. In detail, when the pps_wp_info_in_ph_flag 2840 included in the PPS 2800 indicates 1 (2910), the weighted prediction syntax pred_weight_table() 2920 may be included in the picture header syntax 2900.

[0335] The video decoding device 1700 may call the weighted prediction syntax pred_weight_table() 2920 from the picture header syntax 2900. In detail, when the pps_wp_info_in_ph_flag 2840 included in the PPS 2800 indicates 1 (2910), the weighted prediction syntax pred_weight_table() 2920 may be called from the picture header syntax 2900.

[0336] The video decoding apparatus 1700 may obtain parameters for determining the weight of the luma component and the weight of the chroma component required for performing weighted prediction from the weighted prediction syntax pred_weight_table() 2920. The video decoding apparatus 1700 may perform weighted prediction on a block included in the current picture by using the weight of the luma component and the weight of the chroma component.

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

[0338] The video decoding device 1700 may obtain the syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag 2940 from the picture header syntax 2900. In detail, when pps_sao_info_in_ph_flag 2820 included in the PPS 2800 indicates 1 (2930), the syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag 2940 may be obtained from the picture header syntax 2900.

[0339] The video decoding apparatus 1700 can identify whether SAO is performed on the luma component of the current picture from the syntax element ph_sao_luma_enabled_flag. The video decoding apparatus 1700 can identify whether SAO is performed on the chroma component of the current picture from the syntax element ph_sao_chroma_enabled_flag. The video decoding apparatus 1700 can perform SAO on each of the luma component and the chroma component of the maximum codec unit included in the current picture based on the syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag 2940.

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

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

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

[0343] Figure 30 FIG. 4 shows a picture header including ALF-related parameters of a current picture according to an embodiment.

[0344] The video encoding apparatus 1900 may include syntax elements ph_num_alf_aps_ids_luma, ph_alf_aps_id_luma[i], ph_alf_cb_enabled_flag, ph_alf_cr_enabled_flag, ph_alf_aps_id_chroma, ph_alf_cc_cb_enabled_flag, ph_alf_cc_cb_aps_id, ph_alf_cc_cr_enabled_flag, and ph_alf_cc_cr_aps_id 3020 for the picture header syntax 3000 . In detail, when pps_alf_info_in_ph_flag 2830 included in the PPS 2800 indicates 1 ( 3010 ), syntax elements ph_num_alf_aps_ids_luma, ph_alf_aps_id_luma[i], ph_alf_cb_enabled_flag, ph_alf_cr_enabled_flag, ph_alf_aps_id_chroma, ph_alf_cc_cb_enabled_flag, ph_alf_cc_cb_aps_id, ph_alf_cc_cr_enabled_flag, and ph_alf_cc_cr_aps_id 3020 may be included in the picture header syntax 3000 .

[0345] The video encoding device 1900 may 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, and ph_alf_cc_cr_aps_id 3020 from the picture header syntax 3000 . In detail, when pps_alf_info_in_ph_flag 2830 included in the PPS 2800 indicates 1 ( 3010 ), syntax elements ph_num_alf_aps_ids_luma, ph_alf_aps_id_luma[i], ph_alf_cb_enabled_flag, ph_alf_cr_enabled_flag, ph_alf_aps_id_chroma, ph_alf_cc_cb_enabled_flag, ph_alf_cc_cb_aps_id, ph_alf_cc_cr_enabled_flag, and ph_alf_cc_cr_aps_id 3020 may be obtained from the picture header syntax 3000 .

[0346] The syntax element ph_num_alf_aps_ids_luma indicates the number of ALF APSs referenced by slices 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 the 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 components of the slice included in the current picture. The syntax element ph_alf_cc_cb_enabled_flag indicates whether cross-component ALF is enabled 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 the slice included in the current picture. The syntax element ph_alf_cc_cr_enabled_flag indicates whether cross-component ALF is allowed for the Cr component of the current picture. The syntax element ph_alf_cc_cr_aps_id indicates the aps_adaptation_parameter_set_id of the ALF APS referenced by the Cr component of the slice included in the current picture.

[0347] The video decoding apparatus 1700 may perform ALF on the luma component and chroma component of each maximum coding unit of the current picture by using the obtained syntax elements ph_num_alf_aps_ids_luma, ph_alf_aps_id_luma[i], ph_alf_cb_enabled_flag, ph_alf_cr_enabled_flag, ph_alf_aps_id_chroma, ph_alf_cc_cb_enabled_flag, ph_alf_cc_cb_aps_id, ph_alf_cc_cr_enabled_flag, and ph_alf_cc_cr_aps_id 3020.

[0348] Figure 31 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 is shown.

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

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

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

[0352] The video encoding apparatus 1900 may include the weighted prediction syntax pred_weight_table() 3140 to the slice header syntax 3100. In detail, when the pps_wp_info_in_ph_flag 2840 included in the PPS 2800 indicates 0 (3130), the weighted prediction syntax pred_weight_table() 3140 may be included in the slice header syntax 3100.

[0353] The video decoding device 1700 may call the weighted prediction syntax pred_weight_table() 3140 from the slice header syntax 3100. In detail, when the pps_wp_info_in_ph_flag 2840 included in the PPS 2800 indicates 0 (3130), the weighted prediction syntax pred_weight_table() 3140 may be called from the slice header syntax 3100.

[0354] The video decoding apparatus 1700 may obtain parameters for determining the weight of the luma component and the weight of the chroma component required for performing weighted prediction from the weighted prediction syntax pred_weight_table() 3140. The video decoding apparatus 1700 may perform weighted prediction on a block included in the current slice by using the weight of the luma component and the weight of the chroma component.

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

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

[0357] The video decoding apparatus 1700 can identify whether SAO is used for the luma component of the current slice from the syntax element sh_sao_luma_used_flag. The video decoding apparatus 1700 can identify whether SAO is used for the chroma component of the current slice from the syntax element sh_sao_chroma_used_flag. The video decoding apparatus 1700 can perform SAO on each of the luma component and chroma component of the maximum codec unit included in the current slice based on the syntax elements sh_sao_luma_used_flag and sh_sao_chroma_used_flag 3160.

[0358] Figure 32 A slice header including ALF-related parameters of a current slice according to an embodiment is shown.

[0359] The video encoding apparatus 1900 may include syntax elements sh_num_alf_aps_ids_luma, sh_alf_aps_id_luma[i], sh_alf_cb_enabled_flag, sh_alf_cr_enabled_flag, sh_alf_aps_id_chroma, sh_alf_cc_cb_enabled_flag, sh_alf_cc_cb_aps_id, sh_alf_cc_cr_enabled_flag, and sh_alf_cc_cr_aps_id 3220 for the slice header syntax 3200 . In detail, when the pps_alf_info_in_ph_flag 2830 included in the PPS 2800 indicates 0 ( 3210 ), syntax elements sh_num_alf_aps_ids_luma, sh_alf_aps_id_luma[i], sh_alf_cb_enabled_flag, sh_alf_cr_enabled_flag, sh_alf_aps_id_chroma, sh_alf_cc_cb_enabled_flag, sh_alf_cc_cb_aps_id, sh_alf_cc_cr_enabled_flag, and sh_alf_cc_cr_aps_id 3220 may be included in the slice header syntax 3200 .

[0360] The video encoding device 1900 may 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, and sh_alf_cc_cr_aps_id 3220 from the slice header syntax 3200 . In detail, when the pps_alf_info_in_ph_flag 2830 included in the PPS 2800 indicates 0 ( 3210 ), syntax elements sh_num_alf_aps_ids_luma, sh_alf_aps_id_luma[i], sh_alf_cb_enabled_flag, sh_alf_cr_enabled_flag, sh_alf_aps_id_chroma, sh_alf_cc_cb_enabled_flag, sh_alf_cc_cb_aps_id, sh_alf_cc_cr_enabled_flag, and sh_alf_cc_cr_aps_id 3220 may be obtained from the slice header syntax 3200 .

[0361] 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 components of the current slice. The syntax element sh_alf_cc_cb_enabled_flag indicates whether cross-component ALF is enabled for the Cb component of the current slice. The syntax element sh_alf_cc_cb_aps_id indicates the aps_adaptation_parameter_set_id of the ALF APS referenced by the Cb component of the current slice. The syntax element sh_alf_cc_cr_enabled_flag indicates whether cross-component ALF is allowed for the Cr component of the current slice. The syntax element sh_alf_cc_cr_aps_id indicates the aps_adaptation_parameter_set_id of the ALF APS referenced by the Cr component of the current slice.

[0362] The video decoding apparatus 1700 may perform ALF on the luma component and chroma component of each maximum coding unit of the current slice by using the obtained syntax elements sh_num_alf_aps_ids_luma, sh_alf_aps_id_luma[i], sh_alf_cb_enabled_flag, sh_alf_cr_enabled_flag, sh_alf_aps_id_chroma, sh_alf_cc_cb_enabled_flag, sh_alf_cc_cb_aps_id, sh_alf_cc_cr_enabled_flag, and sh_alf_cc_cr_aps_id 3220 .

[0363] The video decoding apparatus 1700 and the video encoding apparatus 1900 according to the embodiment can selectively signal deblocking filter parameters, reference picture list parameters, weighted prediction parameters, SAO parameters, and ALF parameters for each picture or slice. Therefore, the video encoding apparatus 1900 according to the embodiment can determine whether to signal tool-related parameters for each picture or each slice based on data transmission efficiency or characteristics of the data picture, and signal the tool-related parameters using a method with high transmission efficiency. The video decoding apparatus 1700 according to the embodiment can determine whether to obtain tool-related parameters for each picture or each slice based on information obtained from a picture parameter set, and obtain the tool-related parameters for each picture or each slice. Therefore, when tool-related parameters are signaled for each picture, it is not necessary to signal the tool-related parameters for each slice included in the picture, thereby reducing the data used to signal the tool-related parameters.

[0364] Meanwhile, the above-disclosed embodiments may be written as computer-executable programs that may be stored in a medium.

[0365] The medium can store computer executable programs continuously, or temporarily store computer executable programs or instructions for running or downloading. In addition, the medium can be any of a variety of recording media or storage media, in which single-chip or multi-chip hardware is combined, and the medium is not limited to a medium directly connected to the computer system, but can be distributed on a network. Examples of media include magnetic media such as hard disks, floppy disks and tapes configured to store program instructions, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as optical floppy disks, and ROM, RAM and flash memory. Machine-readable storage media can be provided in the form of non-transitory storage media. Here, "non-transitory storage media" only means tangible devices and does not contain signals (e.g., electromagnetic waves). The term does not distinguish between cases where data is semi-permanently stored in a storage medium and cases where data is temporarily stored in a storage medium. For example, a "non-transitory storage medium" may include a buffer for temporarily storing data.

[0366] Other examples of the medium include recording media and storage media managed by an application store that distributes applications or by a website, server, or the like that provides or distributes other various types of software.

[0367] According to an embodiment, the methods according to various embodiments disclosed in this specification may be provided by being included in a computer program product. A computer program product is a product that can be traded between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., a compact disc read-only memory (CD-ROM)) or through an application store (e.g., Play StoreTM ) or distributed (e.g., downloaded or uploaded) between two user devices (e.g., smartphones) directly or online. In the case of online distribution, at least a portion of the computer program product (e.g., a downloadable application) may be at least temporarily generated or temporarily stored in a machine-readable storage medium, such as a manufacturer's server, an application store's server, or a memory of a relay server.

[0368] Although one or more embodiments of the present disclosure have been described with reference to the drawings, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope defined by the following claims.

Claims

1. A video decoding method, comprising: Obtain an initial value of a quantization parameter (QP) to be applied to the current picture from a picture parameter set; Obtaining a QP difference flag indicating whether a QP difference exists in a picture header of a current picture from a picture parameter set; when the QP difference flag indicates that a QP difference exists in a picture header of the current picture, obtaining a first QP difference of the current picture from the picture header, determining a first QP for the current picture using the QP initial value and the first QP difference obtained for the current picture, and performing inverse quantization on transform coefficients in a codec unit included in at least one slice in the current picture using the first QP of the current picture; when the QP difference flag indicates that the QP difference does not exist in the picture header, obtaining a second QP difference for a current slice included in the current picture from a slice header of the current slice, determining a second QP for the current slice included in the current picture using the QP initial value and the second QP difference obtained for the current slice, and performing inverse quantization on transform coefficients in a codec unit included in the current slice using the second QP of the current slice, When the first QP difference is obtained from the picture header of the current picture according to the QP difference flag, the QP difference is not obtained from the slice header of the at least one slice in the current picture.

2. A video encoding apparatus, comprising: a quantizer configured to perform quantization on transform coefficients included in a current picture; as well as an information encoder configured to encode a quantization parameter (QP) initial value to be applied to a current picture, encode a QP difference flag indicating whether a QP difference value exists in a picture header of the current picture, and generate a picture parameter set including the QP initial value and the QP difference flag, in: When determining the QP difference for the current picture, a quantizer performs quantization on transform coefficients in a codec unit included in at least one slice in the current picture using a first QP for the current picture, and an information encoder encodes a first QP difference for the current picture between the first QP and the QP initial value and generates a picture header for the current picture to include the first QP difference for the current picture without encoding the QP difference for each of the at least one slice; and generates each slice header for the at least one slice, wherein a QP difference flag is encoded to indicate the presence of the QP difference in the picture header of the current picture, and When determining the QP difference value for each slice included in the current picture, the quantizer performs quantization on transform coefficients included in the codec unit of the current slice among each slice of the current picture using the second QP for the current slice, and the information encoder encodes the second QP difference value for the current slice between the second QP for the current slice and the QP initial value and generates a slice header for the current slice to include the second QP difference value for the current slice, wherein the QP difference flag is encoded to indicate that the QP difference value does not exist in the picture header of the current picture.

3. A method for transmitting a bitstream generated by encoding a video, comprising: performing quantization on transform coefficients included in a current picture; Encode an initial value of the quantization parameter (QP) to be applied to the current picture; Encoding a QP difference flag indicating whether a QP difference exists in a picture header of a current picture; Generate a picture parameter set including a QP initial value and a QP difference flag; as well as Output bitstream including PPS, in: When determining a QP initial value for a current picture, quantization is performed on transform coefficients in a codec unit included in at least one slice in the current picture using a first QP for the current picture, a first QP difference for the current picture is encoded, the first QP difference for the current picture being between the QP initial value and a first QP used in the current picture, and a picture header for the current picture is generated to include the first QP difference for the current picture without encoding a QP difference for each of the at least one slice; each slice header of the at least one slice is generated, wherein a QP difference flag is encoded to indicate the presence of a QP difference in the picture header of the current picture, When a QP difference is determined for each slice included in the current picture, quantization is performed on a transform coefficient included in a codec unit included in a current slice among each slice of the current picture using a second QP for the current slice, a second QP difference for the current slice between the QP initial value and the second QP for the current slice is encoded, and a slice header of the current slice is generated to include the second QP difference for the current slice, wherein a QP difference flag is encoded to indicate that the QP difference does not exist in a picture header of the current picture.

Citation Information

Patent Citations

  • Method and apparatus for hierarchical data unit-based video encoding and decoding comprising quantization parameter prediction

    CN104094600A

  • Image encoding and decoding method and device

    CN104754361A