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

The video decoding method addresses image quality degradation in high-resolution videos by using non-square encoding units with adaptive quantization parameters, improving image quality and transmission efficiency.

JP2025107485AActive Publication Date: 2025-07-17SAMSUNG ELECTRONICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2025081802
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2020-01-10
Filing Date
2025-05-15
Publication Date
2025-07-17
Estimated Expiration
2041-01-08

AI Technical Summary

Technical Problem

Conventional video encoding methods using uniform square encoding units result in image quality degradation for high-resolution videos.

Method used

A video decoding method that obtains an initial quantization parameter (QP) value and picture header QP difference values to determine QP for encoding units, performing inverse quantization and restoring the encoding units using transform coefficients, allowing for non-square encoding unit forms.

Benefits of technology

Improves image quality by efficiently adapting to the characteristics of high-resolution videos through non-square encoding units, enhancing data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025107485000001_ABST
    Figure 2025107485000001_ABST
Patent Text Reader

Abstract

To effectively perform a quantization parameter and encode / decode a video.SOLUTION: A video decoding method according to an embodiment includes: obtaining, from a picture parameter set, a quantization parameter (QP) initial value to be applied to a current picture, and picture header QP difference value information; when the picture header QP difference value information indicates that QP difference value information is present in a picture header of the current picture, obtaining a first QP difference value for the current picture from the picture header; determining a QP for a coding unit included in the current picture, by using the QP initial value and the first QP difference value; obtaining transform coefficients of the coding unit by performing inverse quantization on the coding unit by using the QP; and reconstructing the coding unit by using the transform coefficients.SELECTED DRAWING: Figure 17
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a video decoding method and apparatus thereof, a video encoding method and apparatus thereof, and relates to a method and apparatus for effectively performing a quantization parameter (QP) and encoding a video, and a method and apparatus for decoding a video.

Background Art

[0002] In the case of a conventional compression method, after determining whether to divide in the process of determining the size of an encoding unit included in a picture, a square encoding unit is determined through a recursive division process of uniformly dividing into four encoding units of the same size. However, recently, for high-resolution videos, image quality degradation of the restored video caused by using an encoding unit in a uniform form of a square has become a problem. Therefore, a method and apparatus for dividing a high-resolution video into encoding units of various forms have been proposed.

Summary of the Invention

Problems to be Solved by the Invention

[0003] The problems to be solved by the present invention relate to a video decoding method and apparatus thereof, a video encoding method and apparatus thereof, and in a video encoding apparatus, a method for efficiently transmitting a quantization parameter (QP) difference value, and in a video decoding apparatus, a method for efficiently obtaining a QP difference value.

Means for Solving the Problems

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

Advantages of the Invention

[0005] According to a video encoding method and a video decoding method according to an embodiment, a method for transmitting a difference value of a quantization parameter (QP) is determined according to characteristics of a picture or data transmission efficiency, and the difference value of the QP can be signaled according to the method.

Brief Description of the Drawings

[0006] To further understand the drawings cited in this specification, a brief description of each drawing is provided:

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Figure 21

Figure 22

Figure 23

Figure 24

Figure 25

Figure 26

Figure 27

Figure 28

Figure 29

Figure 30

Figure 31

Figure 32

DETAILED DESCRIPTION OF THE INVENTION

[0007] A video decoding method according to an embodiment provided in the present disclosure obtains an initial value of a quantization parameter (QP) applied to a current picture from a picture parameter set, and obtains picture header QP difference value information indicating whether QP difference value information exists in the picture header of the current picture from the picture parameter set; when the picture header QP difference value information indicates that QP difference value information exists in the picture header of the current picture, obtaining a first QP difference value for the current picture from the picture header; determining a QP for an encoding unit included in the current picture by using the QP initial value and the first QP difference value; performing inverse quantization on the encoding unit by using the QP to obtain transform coefficients of the encoding unit; and restoring the encoding unit by using the transform coefficients.

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

[0009] According to one embodiment, the step of performing inverse quantization on the coding unit by using the QP to obtain the transform coefficients of the coding unit includes obtaining the QP difference value for the luma component of the current picture from the picture header; determining the QP for the luma component of the slice included in the current picture by adding the QP initial value and the first QP difference value for the luma component; and determining the QP for the coding unit included in the slice and included in the current picture by using the QP for the luma component of the slice.

[0010] According to one embodiment, the step of determining the QP for the coding unit includes obtaining the QP difference value for the coding unit from the bitstream; and determining the QP for the luma component of the coding unit by using the QP for the luma component of the slice and the QP difference value for the coding unit.

[0011] According to one embodiment, the step of performing inverse quantization on the encoding unit by using the QP and obtaining the transform coefficients of the encoding unit includes: obtaining, from the slice header, the second QP difference value for the luma component of the current slice; and determining the QP for the luma component of the current slice by adding the QP initial value and the second QP difference value for the luma component; and determining the QP of the encoding unit included in the current slice by using the QP for the luma component of the current slice.

[0012] According to one embodiment, the step of determining the QP of the encoding unit includes: obtaining the QP difference value for the encoding unit from the bitstream; and determining the QP for the luma component of the encoding unit by using the QP for the luma component of the current slice and the QP difference value for the encoding unit.

[0013] According to one embodiment, the step of performing inverse quantization on the encoding unit by using the QP and obtaining the transform coefficients of the encoding unit includes: obtaining, from the slice header, the Cb QP difference value for the Cb chroma component of the current slice and the Cr QP difference value for the Cr chroma component of the current slice; determining the Cb QP for the Cb chroma component of the current encoding unit by updating the QP for the Cb chroma component of the current encoding unit by using the Cb QP difference value for the Cb chroma component of the current slice; and determining the Cr QP for the Cr chroma component of the current encoding unit by updating the QP for the Cr chroma component of the current encoding unit by using the Cr QP difference value for the Cr chroma component of the current slice.

[0014] According to an embodiment provided by the present disclosure, a video decoding apparatus obtains an initial QP value applied to a current picture from a picture parameter set, and obtains picture header QP difference value information indicating whether QP difference value information exists in the picture header of the current picture from the picture parameter set. If the picture header QP difference value information indicates that the QP difference value information exists in the picture header, an acquisition unit obtains a first QP difference value for the current picture from the picture header, and if the picture header QP difference value information indicates that the QP difference value information exists in the picture header, determines a QP for the coding unit included in the current picture by using the initial QP value and the first QP difference value, performs inverse quantization on the coding unit by using the QP, obtains transform coefficients of the coding unit, and restores the coding unit by using the transform coefficients of the coding unit.

[0015] According to an embodiment provided by the present disclosure, a video encoding method includes determining an initial QP value applied to a current picture, and when determining a QP difference value for each picture, determining a first QP difference value between the QP used in the current picture and the initial QP value, and generating a picture header related to the current picture including the first QP difference value, and generating a picture parameter set including picture header QP difference value information indicating whether QP difference value information exists in the picture header of the current picture and the initial QP value.

[0016] According to the video encoding method according to an embodiment, when determining the QP difference value for each slice, the method further includes determining a second QP difference value between the QP used in the current slice included in the current picture and the initial QP value, and generating a slice header related to the current slice including the second QP difference value.

[0017] According to one embodiment, the step of generating a picture header related to the current picture including the first QP difference value includes: determining a QP for the luma component of a slice included in the current picture; and using a difference value between the QP for the luma component of the slice included in the current picture and the QP initial value to determine the first QP difference value for the luma component of the current picture.

[0018] According to one embodiment, the step of determining the first QP difference value includes: determining a QP difference value for the coding unit by using a difference value between the QP for the luma component of the coding unit and the QP for the luma component of the slice; and coding the QP difference value for the coding unit.

[0019] According to one embodiment, the step of generating a slice header related to the current slice including the second QP difference value includes: determining a QP for the luma component of the current slice; and using a difference value between the QP for the luma component of the current slice and the QP initial value to determine the second QP difference value for the luma component of the current slice.

[0020] According to one embodiment, the step of determining the second QP difference value includes: determining a QP difference value for the coding unit by subtracting the QP for the luma component of the current slice from the QP for the luma component of the coding unit; and coding the QP difference value for the coding unit.

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

[0022] A computer-readable recording medium having recorded thereon a program for causing a computer to execute a video decoding method according to an embodiment provided by the present disclosure is provided.

[0023] A computer-readable recording medium having recorded thereon a program for causing a computer to execute a video encoding method according to an embodiment provided by the present disclosure is provided.

[0024] The present disclosure can be modified in various ways and can have various embodiments. Specific embodiments are illustrated in the drawings and will be described in detail through detailed descriptions thereof. However, they are not intended to limit the embodiments of the present disclosure, and it should be understood that the present disclosure includes all modifications, equivalents, or alternatives included in the spirit and technical scope of various embodiments.

[0025] In the description of the present embodiment, when it is determined that a specific description related to related known technologies will make the gist of the present disclosure more unclear than necessary, the detailed description thereof will be omitted. Also, the numbers (e.g., first, second, etc.) used in the description process of the specification are merely identification symbols for distinguishing one component from another component.

[0026] Also, in this specification, when a component is referred to as being "coupled" or "connected" to another component, it should be understood that the former component is directly coupled or directly connected to the latter component, or, unless otherwise stated to the contrary, is coupled or connected through the mediation of yet another component in between.

[0027] Also, in this specification, components expressed as "~ section (unit)", "module", etc. may be such that two or more components are combined into one component, or one component is further subdivided into two or more components according to different functions. Also, each of the components described below can perform, in addition to its main function, some or all of the functions performed by other components. Needless to say, it is also possible that some of the main functions performed by each component are exclusively performed by other components.

[0028] Also, in this specification, "image" or "picture" can indicate a still image or video of a video, that is, the video itself.

[0029] Also, in this specification, "sample" refers to data assigned to a sampling position of an image and means data to be processed. For example, in an image of a spatial region, a pixel value or a conversion coefficient on a conversion region is also a sample. A unit including at least one such sample can be defined as a block.

[0030] Also, in this specification, "current block" can mean a block that is the maximum coding unit, coding unit, prediction unit, or conversion unit of the current image to be encoded or decoded.

[0031] Also, in this specification, a motion vector being in the list 0 direction means that it is a motion vector used to indicate a block within the reference picture included in list 0, and an AL motion vector being in the list 1 direction may mean that it is a motion vector used to indicate a block within the reference picture included in list 1. Also, a motion vector being unidirectional means that it is a motion vector used to indicate a block within the reference picture included in list 0 or list 1, and a motion vector being bidirectional may mean that the motion vector includes a motion vector in the list 0 direction and a motion vector in the list 1 direction.

[0032] Also, in this specification, "binary split" of a block means a split that generates two sub-blocks each having half the width or height of the block. Specifically, when "binary vertical split" is performed on the current block, at the midpoint of the current block width, the split is performed in the vertical direction (the portrait direction), so two sub-blocks can be generated, each having a width that is half of the current block width and the same height as the current block height. When "binary horizontal split" is performed on the current block, at the midpoint of the current block height, the split is performed in the horizontal direction (the landscape direction), so two sub-blocks can be generated, each having a height that is half of the current block height and the same width as the current block.

[0033] In addition, in this specification, the "ternary split" of a block means a split in which the width or height of the block is divided into a 1:2:1 ratio to generate three sub-blocks. Specifically, when a "ternary vertical split" is performed on the current block, the split is performed vertically (in the portrait direction) at the 1:2:1 ratio point of the current block width. Therefore, two sub-blocks having a width that is 1 / 4 of the current block width and the same height as the current block, and one sub-block having a width that is 2 / 4 of the current block width and the same height as the current block height can be generated. When a "ternary horizontal split" is performed on the current block, the split is performed horizontally (in the landscape direction) at the 1:2:1 ratio point of the current block height. Therefore, two sub-blocks having a height that is 1 / 4 of the current block height and the same width as the current block, and one sub-block having a height that is 2 / 4 of the current block height and the same width as the current block width can be generated.

[0034] In addition, in this specification, the "quad split" of a block means a split in which the width and height of the block are divided into a 1:1 ratio to generate four sub-blocks. Specifically, when a "quad split" is performed on the current block, the split is performed vertically (in the portrait direction) at the midpoint of the current block width, and the split is performed horizontally (in the landscape direction) at the midpoint of the current block height. Therefore, four sub-blocks having a width that is 1 / 2 of the current block width and a height that is 1 / 2 of the current block height can be generated.

[0035] Hereinafter, with reference to FIGS. 1 to 16, a video encoding apparatus, a video decoding apparatus, a video encoding method, and a video decoding method according to an embodiment will be described. With reference to FIGS. 3 to 16, a method for determining a data unit of video according to an embodiment will be described, and with reference to FIGS. 17 to 40, a video encoding / decoding method according to an embodiment using the determined data unit will be described later.

[0036] Hereinafter, with reference to FIGS. 1 and 2, a method and an apparatus for adaptively selecting based on various forms of coding units according to an embodiment of the present disclosure will be described.

[0037] FIG. 1 illustrates a schematic block diagram of a video decoding apparatus according to an embodiment.

[0038] The video decoding apparatus 100 also includes a receiving unit 110 and a decoding unit 120. The receiving unit 110 and the decoding unit 120 also include at least one processor. Further, the receiving unit 110 and the decoding unit 120 also include a memory for storing instruction words executed by at least one processor.

[0039] The receiving unit 110 can receive a bitstream. The bitstream includes information encoded by a video encoding apparatus 2200 described later for a video. Also, the bitstream can be transmitted from the video encoding apparatus 2200. The video encoding apparatus 2200 and the video decoding apparatus 100 are also connected by wire or wirelessly, and the receiving unit 110 can receive the bitstream via wire or wirelessly. The receiving unit 110 can receive the bitstream from a recording medium such as an optical medium or a hard disk. The decoding unit 120 can restore a video based on information obtained from the received bitstream. The decoding unit 120 can obtain a syntax element for restoring the video from the bitstream. The decoding unit 120 can restore the video based on the syntax element.

[0040] The operation of the video decoding apparatus 100 will be described in more detail with reference to FIG. 2.

[0041] FIG. 2 illustrates a flowchart of a video decoding method according to an embodiment.

[0042] According to an embodiment of the present disclosure, the receiving unit 110 receives a bitstream.

[0043] The video decoding apparatus 100 performs a step (210) of obtaining a bin string corresponding to a segmentation form mode of a coding unit from a bitstream. The video decoding apparatus 100 performs a step (220) of determining a segmentation rule of the coding unit. Also, the video decoding apparatus 100 performs a step (230) of dividing the coding unit into a plurality of coding units based on at least one of the bin string corresponding to the segmentation form mode and the segmentation rule. The video decoding apparatus 100 can determine a first allowable range of the size of the coding unit based on the ratio of the width and height of the coding unit in order to determine the segmentation rule. The video decoding apparatus 100 can determine a second allowable range of the size of the coding unit based on the segmentation form mode of the coding unit in order to determine the segmentation rule.

[0044] In the following, the segmentation of the coding unit according to an embodiment of the present disclosure will be described in detail.

[0045] First, one picture is also divided into one or more slices or one or more tiles. One slice or one tile is also a sequence of one or more maximum coding units (CTU: coding tree unit). As a concept compared with the maximum coding unit (CTU), there is a maximum coding block (CTB: coding tree block).

[0046] The maximum coding block (CTB) means an NxN block including NxN samples (N is an integer). Each color component is also divided into one or more maximum coding blocks.

[0047] When a picture has three sample arrays (sample arrays for Y, Cr, and Cb components), a coding tree unit (CTU) is a unit that includes the largest coded block of luma samples, two largest coded blocks of corresponding chroma samples, and the syntax structure used to code the luma and chroma samples. When the picture is a monochrome picture, a coding tree unit is a unit that includes the largest coded block of monochrome samples and the syntax structure used to code the monochrome samples. When the picture is coded in color planes separated by color components, a coding tree unit is a unit that includes the picture and the syntax structure used to code the samples of the picture.

[0048] One coding tree block (CTB) is also divided into an MxN coded block containing MxN samples (M and N are integers).

[0049] When a picture has sample arrays for Y, Cr, and Cb components, a coding unit (CU) is a unit that includes a coded block of luma samples, two coded blocks of corresponding chroma samples, and the syntax structure used to code the luma and chroma samples. When the picture is a monochrome picture, a coding unit is a unit that includes a coded block of monochrome samples and the syntax structure used to code the monochrome samples. When the picture is coded in color planes separated by color components, a coding unit is a unit that includes the picture and the syntax structure used to code the samples of the picture.

[0050] As described above, the maximum coding block and the maximum coding unit are concepts that are distinguished from each other, and the coding block and the coding unit are concepts that are distinguished from each other. That is, the (maximum) coding unit means a data structure including the (maximum) coding block including the sample and the corresponding syntax structure. However, since those skilled in the art can understand that the (maximum) coding unit or the (maximum) coding block refers to a block of a predetermined size including a predetermined number of samples, hereinafter, in this specification, unless there are special circumstances, the maximum coding block and the maximum coding unit, or the coding block and the coding unit are referred to without distinction.

[0051] The video is also divided into maximum coding units (CTUs). The size of the maximum coding unit is also determined based on the information obtained from the bitstream. The form of the maximum coding unit can have a square of the same size. However, it is not limited thereto.

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

[0053] For example, information related to the maximum size of a luma encoded block that can be split into two and the luma block size difference can be obtained from a bitstream. The information related to the luma block size difference may indicate the size difference between the maximum luma encoding unit and the maximum luma encoded block that can be split into two. Therefore, by combining the information related to the maximum size of the luma encoded block that can be split into two obtained from the bitstream and the information related to the luma block size difference, the size of the maximum luma encoding unit can be determined. By using the size of the maximum luma encoding unit, the size of the maximum chroma encoding unit can also be determined. For example, if the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chroma block is also half the size of the luma block, and similarly, the size of the maximum chroma encoding unit is also half the size of the maximum luma encoding unit.

[0054] According to one embodiment, since the information related to the maximum size of a luma encoded block that can be binary split is obtained from the bitstream, the maximum size of the luma encoded block that can be binary split can be variably determined. In contrast, the maximum size of a luma encoded block that can be ternary split can be fixed. For example, in an I picture, the maximum size of a luma encoded block that can be ternary split is 32x32, and in a P picture or a B picture, the maximum size of a luma encoded block that can be ternary split is also 64x64.

[0055] Also, the maximum encoding unit is hierarchically split into encoding units based on the split mode information obtained from the bitstream. As the split mode information, at least one of the information indicating whether quad split is performed, the information indicating the multiple split state, the split direction information, and the split type information is also obtained from the bitstream.

[0056] For example, the information indicating whether quad split is performed may indicate whether the current encoding unit is quad split (QUAD_SPLIT) or not.

[0057] If the current coding unit is not quad-split, the information indicating the multi-split status can indicate whether the current coding unit is not further split (NO_SPLIT) or whether it is binary / ternary split.

[0058] If the current coding unit is binary split or ternary split, the split direction information indicates that the current coding unit is split into one of the horizontal or vertical directions.

[0059] If the current coding unit is split horizontally or vertically, the split type information indicates that the current coding unit is split by binary split or ternary split.

[0060] The split mode of the current coding unit can be determined by the split direction information and the split type information. The split mode when the current coding unit is binary split horizontally is binary horizontal split (SPLIT_BT_HOR), the split mode when it is ternary split horizontally is ternary horizontal split (SPLIT_TT_HOR), the split mode when it is binary split vertically is binary vertical split (SPLIT_BT_VER), and the split mode when it is ternary split vertically can be determined as ternary vertical split (SPLIT_BT_VER).

[0061] The video decoding device 100 can obtain the split form mode information from one bit string from the bit stream. The form of the bit stream received by the video decoding device 100 also includes fixed length binary code, unary code, truncated unary code, predetermined binary code, etc. The bit string represents information in a binary array. The bit string is also composed of at least 1 bit. The video decoding device 100 can obtain the split form mode information corresponding to the bit string based on the split rule. The video decoding device 100 can determine whether to quad-split the coding unit based on one bit string, whether not to split it, or the split direction and split type.

[0062] The coding unit is smaller than or equal to the maximum coding unit. For example, since the maximum coding unit also has the largest size, it is one of the coding units. When it is indicated that the split form mode information related to the maximum coding unit is not split, the coding unit determined by the maximum coding unit has the same size as the maximum coding unit. When it is indicated that the split form mode information related to the maximum coding unit is split, the maximum coding unit is also split into coding units. Also, when the split form mode information related to the coding unit indicates splitting, the coding unit is further split into coding units of a smaller size. However, the splitting of the video is not limited thereto, and the maximum coding unit and the coding unit are not distinguished. The splitting of the coding unit will be described in more detail in FIGS. 3 to 16.

[0063] Also, one or more prediction blocks for prediction can be determined from the coding unit. The prediction block is the same as or smaller than the coding unit. Also, one or more transform blocks for transformation can be determined from the coding unit. The transform block is the same as or smaller than the coding unit.

[0064] The form and size of the conversion block and the prediction block are not related to each other.

[0065] As another embodiment, when the encoding unit is a prediction block, prediction can be performed using the encoding unit. Also, when the encoding unit is a conversion block, conversion can be performed using the encoding unit.

[0066] The division of the encoding unit will be described in more detail in FIGS. 3 to 16. The current block and the peripheral blocks of the present disclosure can indicate one of the maximum encoding unit, the encoding unit, the prediction block, and the conversion block. Also, the current block or the current encoding unit is the block in which decoding or encoding is currently being performed, or the block in which the current division is being performed. The peripheral block is also the block restored before the current block. The peripheral block can be adjacent to the current block spatially or temporally. The peripheral block can be located at one of the lower left, left, upper left, upper, upper right, right, and lower right sides of the current block.

[0067] FIG. 3 illustrates the process in which a video decoding apparatus according to an embodiment divides a current encoding unit and determines at least one encoding unit.

[0068] The block form also includes 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N. Here, N is also a positive integer. The block form information is information indicating at least one of the form, direction, ratio of width and height, or size of the encoding unit.

[0069] The form of the encoding unit also includes square and non-square. When the width and height of the encoding unit are the same (that is, when the block form of the encoding unit is 4Nx4N), the video decoding apparatus 100 can determine the block form information of the encoding unit as square. The video decoding apparatus 100 can also determine the form of the encoding unit as non-square.

[0070] When the widths and heights of the symbol units are different (that is, when the block form of the symbol unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the video decoding apparatus 100 can determine that the block form information of the symbol unit is non-square. When the form of the symbol unit is non-square, the video decoding apparatus 100 can determine the ratio of the width and height to be at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, and 32:1 in the block form information of the symbol unit. Also, based on the widths and heights of the symbol unit, the video decoding apparatus 100 can determine whether the symbol unit is in the horizontal direction or the vertical direction. Further, based on at least one of the width, height, or area of the symbol unit, the video decoding apparatus 100 can determine the size of the symbol unit.

[0071] The video decoding apparatus 100 according to one embodiment can use the block form information to determine the form of the symbol unit, and can use the split form mode information to determine how the symbol unit is split into a certain form. That is, the splitting method of the symbol unit indicated by the split form mode information can be determined by what block form the block form information used by the video decoding apparatus 100 indicates.

[0072] The video decoding apparatus 100 can acquire the split form mode information from the bit stream. However, without being limited thereto, the video decoding apparatus 100 and the video encoding apparatus 2200 can determine the pre-agreed split form mode information based on the block form information. The video decoding apparatus 100 can determine the pre-agreed split form mode information for the maximum coding unit or the minimum coding unit. For example, the video decoding apparatus 100 can determine the split form mode information for the maximum coding unit as quad split. Also, the video decoding apparatus 100 can determine the split form mode information for the minimum coding unit as "not split". Specifically, the video decoding apparatus 100 can determine the size of the maximum coding unit to be 256x256. The video decoding apparatus 100 can determine the pre-agreed split form mode information as quad split. The quad split is a split form mode that bisects both the width and height of the coding unit. The video decoding apparatus 100 can acquire a 128x128-sized coding unit from the 256x256-sized maximum coding unit based on the split form mode information. Also, the video decoding apparatus 100 can determine the size of the minimum coding unit to be 4x4. The video decoding apparatus 100 can acquire the split form mode information indicating "not split" for the minimum coding unit.

[0073] According to one embodiment, the video decoding apparatus 100 can utilize the block form information indicating that the current coding unit is square-shaped. For example, the video decoding apparatus 100 can determine whether to split the square coding unit, split it vertically, split it horizontally, or split it into four coding units based on the split form mode information. Referring to FIG. 3, when the block form information of the current coding unit 300 indicates a square form, the decoding unit 120 can determine whether to split the coding unit 310a having the same size as the current coding unit 300 based on the split form mode information indicating non-splitting, or determine the split coding units 310b, 310c, 310d, 310e, 310f based on the split form mode information indicating a predetermined splitting method.

[0074] Referring to FIG. 3, according to one embodiment, the video decoding apparatus 100 can determine two encoded units 310b obtained by vertically splitting the current encoded unit 300 based on split mode information indicating vertical splitting. The video decoding apparatus 100 can determine two encoded units 310c obtained by horizontally splitting the current encoded unit 300 based on split mode information indicating horizontal splitting. The video decoding apparatus 100 can determine four encoded units 310d obtained by vertically and horizontally splitting the current encoded unit 300 based on split mode information indicating vertical and horizontal splitting. According to one embodiment, the video decoding apparatus 100 can determine three encoded units 310e obtained by vertically splitting the current encoded unit 300 based on split mode information indicating ternary splitting in the vertical direction. The video decoding apparatus 100 can determine three encoded units 310f obtained by horizontally splitting the current encoded unit 300 based on split mode information indicating ternary splitting in the horizontal direction. However, the split forms in which a square encoded unit can be split are not construed as being limited to the foregoing forms, and may include various forms that the split mode information can indicate. A predetermined split form in which a square encoded unit is split will be specifically described below through various embodiments.

[0075] FIG. 4 illustrates a process in which a video decoding apparatus according to one embodiment splits an encoded unit having a non-square form and determines at least one encoded unit.

[0076] The video decoding apparatus 100 according to an embodiment can utilize block form information indicating that the current encoding unit has a non-square shape. The video decoding apparatus 100 can determine whether to divide a non-square current encoding unit or divide it in a predetermined method based on the division mode information. Referring to FIG. 4, when the block form information of the current encoding unit 400 or 450 indicates a non-square form, the video decoding apparatus 100 determines an encoding unit 410 or 460 having the same size as the current encoding unit 400 or 450 based on the division mode information indicating non-division, or determines divided encoding units 420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, 480c based on the division mode information indicating a predetermined division method. A predetermined division method for dividing a non-square encoding unit will be specifically described below through various embodiments.

[0077] The video decoding apparatus 100 according to an embodiment can utilize the division mode information to determine the form in which the encoding unit is divided. In that case, the division mode information can indicate the number of at least one encoding unit generated by dividing the encoding unit. Referring to FIG. 4, when the division mode information indicates that the current encoding unit 400 or 450 is divided into two encoding units, the video decoding apparatus 100 can divide the current encoding unit 400 or 450 based on the division mode information and determine two encoding units 420a, 420b or 470a, 470b included in the current encoding unit.

[0078] When the video decoding apparatus 100 according to an embodiment divides a non-square current encoding unit 400 or 450 based on the division mode information, the video decoding apparatus 100 can consider the position of the long side of the non-square current encoding unit 400 or 450 and divide the current encoding unit. For example, the video decoding apparatus 100 can consider the form of the current encoding unit 400 or 450 and divide the current encoding unit 400 or 450 in the direction of dividing the long side of the current encoding unit 400 or 450 to determine a plurality of encoding units.

[0079] According to one embodiment, when the split mode information indicates splitting the encoding unit (ternary split) into an odd number of blocks, the video decoding apparatus 100 can determine the odd number of encoding units included in the current encoding unit 400 or 450. For example, when the split mode information indicates splitting the current encoding unit 400 or 450 into three encoding units, the video decoding apparatus 100 can split the current encoding unit 400 or 450 into three encoding units 430a, 430b, 430c, 480a, 480b, 480c.

[0080] According to one embodiment, the ratio of the width and height of the current encoding unit 400 or 450 is also 4:1 or 1:4. When the ratio of the width and height is 4:1, since the size of the width is larger than the size of the height, the block form information is also in the horizontal direction. When the ratio of the width and height is 1:4, since the size of the width is smaller than the size of the height, the block form information is also in the vertical direction. The video decoding apparatus 100 can determine to split the current encoding unit into an odd number of blocks based on the split mode information. Also, the video decoding apparatus 100 can determine the split direction of the current encoding unit 400 or 450 based on the block form information of the current encoding unit 400 or 450. For example, when the current encoding unit 400 is in the vertical direction, the video decoding apparatus 100 can split the current encoding unit 400 in the horizontal direction and determine the encoding units 430a, 430b, 430c. Also, when the current encoding unit 450 is in the horizontal direction, the video decoding apparatus 100 can split the current encoding unit 450 in the vertical direction and determine the encoding units 480a, 480b, 480c.

[0081] According to one embodiment, the video decoding apparatus 100 can determine an odd number of encoding units included in the current encoding unit 400 or 450, and the sizes of the determined encoding units are not all the same. For example, among the determined odd number of encoding units 430a, 430b, 430c, 480a, 480b, 480c, the size of a predetermined encoding unit 430b or 480b may be different from the sizes of the other encoding units 430a, 430c, 480a, 480c. That is, the encoding units that can be determined by dividing the current encoding unit 400 or 450 can have multiple types of sizes, and in some cases, the odd number of encoding units 430a, 430b, 430c, 480a, 480b, 480c may each have a different size from one another.

[0082] According to one embodiment, when the split form mode information indicates that the encoding unit is split into an odd number of blocks, the video decoding apparatus 100 can determine an odd number of encoding units included in the current encoding unit 400 or 450. Furthermore, the video decoding apparatus 100 can impose a predetermined restriction on at least one of the odd number of encoding units generated by the split. Referring to FIG. 4, the video decoding apparatus 100 can make the decoding process for the encoding units 430b, 480b located in the center among the three encoding units 430a, 430b, 430c, 480a, 480b, 480c generated by splitting the current encoding unit 400 or 450 different from that of the other encoding units 430a, 430c, 480a, 480c. For example, the video decoding apparatus 100 can restrict the encoding units 430b, 480b located in the center from being further split or being split a predetermined number of times, different from the other encoding units 430a, 430c, 480a, 480c.

[0083] FIG. 5 illustrates the process by which a video decoding apparatus splits an encoding unit based on at least one of block form information and split form mode information according to one embodiment.

[0084] According to an embodiment, the video decoding apparatus 100 can determine whether to divide a square-shaped first encoding unit 500 into encoding units or not based on at least one of block form information and division form mode information. According to an embodiment, when the division form mode information indicates dividing the first encoding unit 500 in the horizontal direction, the video decoding apparatus 100 can divide the first encoding unit 500 in the horizontal direction to determine a second encoding unit 510. The first encoding unit, the second encoding unit, and the third encoding unit used according to an embodiment are terms used to understand the pre- and post-division relationship between encoding units. For example, if the first encoding unit is divided, the second encoding unit is determined, and if the second encoding unit is divided, the third encoding unit can be determined. In the following, the relationship between the first encoding unit, the second encoding unit, and the third encoding unit used is also understood according to the above-described features.

[0085] According to an embodiment, the video decoding apparatus 100 can determine whether to divide the determined second encoding unit 510 based on the division mode information, or not to divide it. Referring to FIG. 5, the video decoding apparatus 100 divides the first encoding unit 500 based on the division mode information, and determines whether to divide the determined non-square second encoding unit 510 into at least one of the third encoding units 520a, 520b, 520c, 520d, or not to divide the second encoding unit 510. The video decoding apparatus 100 can obtain the division mode information. The video decoding apparatus 100 divides the first encoding unit 500 based on the obtained division mode information, and can divide a plurality of second encoding units (e.g., 510) in various forms. The second encoding unit 510 can be divided according to the manner in which the first encoding unit 500 is divided based on the division mode information. According to an embodiment, when the first encoding unit 500 is divided into the second encoding unit 510 based on the division mode information for the first encoding unit 500, the second encoding unit 510 is also divided into the third encoding units (e.g., 520a, 520b, 520c, 520d) based on the division mode information for the second encoding unit 510. That is, the encoding unit is recursively divided based on the division mode information related to each encoding unit. Therefore, in a non-square encoding unit, a square encoding unit can be determined, and such a square encoding unit can be recursively divided to determine a non-square encoding unit.

[0086] Referring to FIG. 5, among the odd-numbered third encoding units 520b, 520c, 520d determined by dividing the non-square-shaped second encoding unit 510, a predetermined encoding unit (e.g., the encoding unit located in the middle or the square-shaped encoding unit) is recursively divided. According to one embodiment, one square-shaped third encoding unit 520b among the odd-numbered third encoding units 520b, 520c, 520d is divided horizontally and also divided into a plurality of fourth encoding units. One non-square-shaped fourth encoding unit 530b or 530d among the plurality of fourth encoding units 530a, 530b, 530c, 530d is further divided into a plurality of encoding units. For example, the non-square-shaped fourth encoding unit 530b or 530d can be further divided into an odd number of encoding units. Methods that can be used for the recursive division of encoding units will be described later through various embodiments.

[0087] According to one embodiment, the video decoding apparatus 100 can divide each of the third encoding units 520a, 520b, 520c, 520d into encoding units based on the division mode information. Also, the video decoding apparatus 100 can determine not to divide the second encoding unit 510 based on the division mode information. According to one embodiment, the video decoding apparatus 100 can divide the non-square-shaped second encoding unit 510 into an odd number of third encoding units 520b, 520c, 520d. The video decoding apparatus 100 can impose a predetermined limitation on a predetermined third encoding unit among the odd-numbered third encoding units 520b, 520c, 520d. For example, the video decoding apparatus 100 can limit the encoding unit 520c located in the middle among the odd-numbered third encoding units 520b, 520c, 520d so that it is not further divided, or limit that it must be divided a set number of times.

[0088] Referring to FIG. 5, among the odd number of third encoding units 520b, 520c, 520d included in the non-square second encoding unit 510, the encoding unit 520c located in the middle may not be further divided, or may be restricted to be divided into a predetermined division form (for example, only divided into four encoding units, or divided into a form corresponding to the divided form of the second encoding unit 510), or may be restricted to be divided only a predetermined number of times (for example, divided about n times (n>0)). However, the above restriction on the encoding unit 520c located in the middle is only a simple embodiment, and thus should not be construed as being limited to the foregoing embodiments. Instead, it must be construed to include various restrictions such that the encoding unit 520c located in the middle can be decoded differently from the other encoding units 520b, 520d.

[0089] According to one embodiment, the video decoding apparatus 100 can obtain the division form mode information used for dividing the current encoding unit at a predetermined position within the current encoding unit.

[0090] FIG. 6 illustrates a method for determining a predetermined encoding unit among an odd number of encoding units by the video decoding apparatus 100 according to one embodiment.

[0091] Referring to FIG. 6, the division form mode information of the current encoding units 600, 650 is also obtained from samples at predetermined positions (for example, samples 640, 690 located in the middle) among the plurality of samples included in the current encoding units 600, 650. However, the predetermined position within the current encoding unit 600 from which at least one of such division form mode information can be obtained should not be construed as being limited to the middle position illustrated in FIG. 6. Instead, the predetermined position should be construed to include various positions (for example, the uppermost end, the lowermost end, the left side, the right side, the upper left side, the lower left side, the upper right side, or the lower right side, etc.) that can be included within the current encoding unit 600. The video decoding apparatus 100 can obtain the division form mode information obtained from the predetermined position and determine whether to divide the current encoding unit into encoding units of various forms and sizes or not to divide it.

[0092] According to an embodiment, the video decoding apparatus 100 can select one of the encoding units when the current encoding unit is divided into a predetermined number of encoding units. The method for selecting one of the plurality of encoding units is also diverse, and the description related to such a method will be described later through the following various embodiments.

[0093] According to an embodiment, the video decoding apparatus 100 can divide the current encoding unit into a plurality of encoding units and determine the encoding unit at a predetermined position.

[0094] According to an embodiment, the video decoding apparatus 100 can utilize the information indicating the positions of each of the odd-numbered encoding units in order to determine the encoding unit located in the middle among the odd-numbered encoding units. Referring to FIG. 6, the video decoding apparatus 100 can divide the current encoding unit 600 or the current encoding unit 650 and determine the odd-numbered encoding units 620a, 620b, 620c, or the odd-numbered encoding units 660a, 660b, 660c. The video decoding apparatus 100 can utilize the information related to the positions of the odd-numbered encoding units 620a, 620b, 620c, or the odd-numbered encoding units 660a, 660b, 660c to determine the middle encoding unit 620b or the middle encoding unit 660b. For example, the video decoding apparatus 100 can determine the position of the middle encoding unit 620b by determining the positions of the encoding units 620a, 620b, 620c based on the information indicating the positions of predetermined samples included in the encoding units 620a, 620b, 620c. Specifically, the video decoding apparatus 100 can determine the position of the middle encoding unit 620b by determining the positions of the encoding units 620a, 620b, 620c based on the information indicating the positions of the samples 630a, 630b, 630c at the upper left ends of the encoding units 620a, 620b, 620c.

[0095] According to one embodiment, the information indicating the positions of the left-upper samples 630a, 630b, and 630c respectively included in the encoding units 620a, 620b, and 620c also includes information related to the positions or coordinates within the pictures of the encoding units 620a, 620b, and 620c. According to one embodiment, the information indicating the positions of the left-upper samples 630a, 630b, and 630c respectively included in the encoding units 620a, 620b, and 620c also includes information indicating the widths or heights of the encoding units 620a, 620b, and 620c included in the current encoding unit 600, and such widths or heights also correspond to information indicating the differences between the coordinates within the pictures of the encoding units 620a, 620b, and 620c. That is, the video decoding apparatus 100 can determine the centrally located encoding unit 620b by directly using the information related to the positions or coordinates within the pictures of the encoding units 620a, 620b, and 620c, or by using the information related to the widths or heights of the encoding units corresponding to the difference values between the coordinates.

[0096] According to one embodiment, the information indicating the position of the sample 630a at the upper left end of the upper encoding unit 620a indicates (xa, ya) coordinates, the information indicating the position of the sample 530b at the upper left end of the middle encoding unit 620b indicates (xb, yb) coordinates, and the information indicating the position of the sample 630c at the upper left end of the lower encoding unit 620c may indicate (xc, yc) coordinates. The video decoding device 100 can determine the middle encoding unit 620b by using the coordinates of the samples 630a, 630b, and 630c at the upper left end included in the encoding units 620a, 620b, and 620c respectively. For example, when the coordinates of the samples 630a, 630b, and 630c at the upper left end are arranged in ascending or descending order, the encoding unit 620b including the coordinates (xb, yb) of the sample 630b located in the middle can be determined as the encoding unit located in the middle among the encoding units 620a, 620b, and 620c determined by dividing the current encoding unit 600. However, the coordinates indicating the positions of the samples 630a, 630b, and 630c at the upper left end indicate the coordinates of the absolute positions within the picture, and further, based on the position of the sample 630a at the upper left end of the upper encoding unit 620a, the information (dxb, dyb) coordinates indicating the relative position of the sample 630b at the upper left end of the middle encoding unit 620b and the information (dxc, dyc) coordinates indicating the relative position of the sample 630c at the upper left end of the lower encoding unit 620c can also be used. Also, as the information indicating the position of the sample included in the encoding unit, the method of determining the encoding unit at a predetermined position by using the coordinates of the sample is not construed as being limited to the above-described method, and must be construed by various arithmetic methods that can use the coordinates of the sample.

[0097] The video decoding device 100 according to one embodiment can divide the current encoding unit 600 into a plurality of encoding units 620a, 620b, and 620c, and can select an encoding unit according to a predetermined criterion among the encoding units 620a, 620b, and 620c. For example, the video decoding device 100 can select the encoding unit 620b having a different size among the encoding units 620a, 620b, and 620c.

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

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

[0100] According to one embodiment, the video decoding apparatus 100 can determine the width of the left encoding unit 660a as xe - xd. The video decoding apparatus 100 can determine the height of the left encoding unit 660a as the height of the current encoding unit 650. The video decoding apparatus 100 according to one embodiment can determine the width of the middle encoding unit 660b as xf - xe. The video decoding apparatus 100 can determine the height of the middle encoding unit 660b as the height of the current encoding unit 600. The video decoding apparatus 100 according to one embodiment can determine the width or height of the right encoding unit 660c using the width or height of the current encoding unit 650 and the widths and heights of the left encoding unit 660a and the middle encoding unit 660b. Based on the determined widths and heights of the encoding units 660a, 660b, 660c, the video decoding apparatus 100 can determine an encoding unit having a size different from other encoding units. Referring to FIG. 6, the video decoding apparatus 100 can determine the middle encoding unit 660b, which has a size different from the sizes of the left encoding unit 660a and the right encoding unit 660c, as the encoding unit at a predetermined position. However, the process in which the aforementioned video decoding apparatus 100 determines an encoding unit having a size different from other encoding units is only one embodiment of determining the encoding unit at a predetermined position using the size of the encoding unit determined based on the sample coordinates. Thus, various processes of comparing the sizes of the encoding units determined by predetermined sample coordinates and determining the encoding unit at a predetermined position can be used.

[0101] However, the position of the sample considered for determining the position of the encoding unit is not construed as being limited to the upper left end described above, and it is also construed that information related to the position of any sample included in the encoding unit can be used.

[0102] According to an embodiment, the video decoding apparatus 100 can select an encoding unit at a predetermined position from among an odd number of encoding units determined by dividing the current encoding unit in consideration of the form of the current encoding unit. For example, if the current encoding unit is a non-square shape whose width is greater than its height, the video decoding apparatus 100 can determine an encoding unit at a predetermined position along the horizontal direction. That is, the video decoding apparatus 100 can determine one of the encoding units set with different positions in the horizontal direction and place a restriction on the encoding unit concerned. If the current encoding unit is a non-square shape whose height is greater than its width, the video decoding apparatus 100 can determine an encoding unit at a predetermined position along the vertical direction. That is, the video decoding apparatus 100 can determine one of the encoding units set with different positions in the vertical direction and place a restriction on the encoding unit concerned.

[0103] According to an embodiment, the video decoding apparatus 100 can use information indicating the position of each of the even number of encoding units to determine an encoding unit at a predetermined position among the even number of encoding units. The video decoding apparatus 100 can divide (binary divide) the current encoding unit to determine an even number of encoding units, and can use the information related to the positions of the even number of encoding units to determine an encoding unit at a predetermined position. The specific process involved is also a process corresponding to the process of determining an encoding unit at a predetermined position (e.g., the middle position) among the odd number of encoding units described in FIG. 6, and thus is omitted.

[0104] According to an embodiment, when a non-square current encoding unit is divided into a plurality of encoding units, in order to determine an encoding unit at a predetermined position among the plurality of encoding units, predetermined information related to the encoding unit at the predetermined position can be used in the division process. For example, in order to determine the encoding unit located in the middle among the encoding units obtained by dividing the current encoding unit into a plurality of units, the video decoding apparatus 100 can use at least one of the block form information and the division form mode information stored in the samples included in the middle encoding unit in the division process.

[0105] Referring to FIG. 6, the video decoding apparatus 100 can divide the current encoding unit 600 into a plurality of encoding units 620a, 620b, 620c based on the split form mode information, and can determine the encoding unit 620b located in the middle among the plurality of encoding units 620a, 620b, 620c. Furthermore, the video decoding apparatus 100 can determine the encoding unit 620b located in the middle in consideration of the position where the split form mode information is acquired. That is, the split form mode information of the current encoding unit 600 is obtained from the sample 640 located in the middle of the current encoding unit 600. When the current encoding unit 600 is divided into a plurality of encoding units 620a, 620b, 620c based on the split form mode information, the encoding unit 620b including the sample 640 can be determined as the encoding unit located in the middle. However, the information used to determine the encoding unit located in the middle is not limited to the split form mode information, and various types of information are also used in the process of determining the encoding unit located in the middle.

[0106] According to an embodiment, the predetermined information for identifying the encoding unit at a predetermined position is also obtained from predetermined samples included in the encoding unit to be determined. Referring to FIG. 6, the video decoding apparatus 100 determines the encoding unit at a predetermined position (for example, the encoding unit located in the middle among the plurality of encoding units obtained by dividing the current encoding unit 600) among the plurality of encoding units 620a, 620b, 620c determined by dividing the current encoding unit 600. In order to do so, the video decoding apparatus 100 can utilize the division mode information obtained from the sample at the predetermined position (for example, the sample located in the middle of the current encoding unit 600) within the current encoding unit 600. That is, the video decoding apparatus 100 can determine the sample at the predetermined position in consideration of the block form of the current encoding unit 600. The video decoding apparatus 100 determines the encoding unit 620b including the sample at which the predetermined information (e.g., division mode information) can be obtained among the plurality of encoding units 620a, 620b, 620c determined by dividing the current encoding unit 600, and can impose a predetermined limitation. Referring to FIG. 6, the video decoding apparatus 100 according to an embodiment can determine the sample 640 located in the middle of the current encoding unit 600 as the sample at which the predetermined information can be obtained, and the video decoding apparatus 100 can impose a predetermined limitation on the encoding unit 620b including such a sample 640 during the decoding process. However, the position of the sample at which the predetermined information can be obtained is not construed as being limited to the aforementioned position, and is also construed as a sample at any position included in the encoding unit 620b to be determined for imposing the limitation.

[0107] According to one embodiment, the position of the sample from which predetermined information can be obtained is also determined by the form of the current encoding unit 600. According to one embodiment, the block form information can determine whether the form of the current encoding unit is square or non-square, and based on the form, the position of the sample from which predetermined information can be obtained can be determined. For example, the video decoding apparatus 100 can utilize at least one of the information related to the width of the current encoding unit and the information related to the height, and determine a sample located on the boundary that divides at least one of the width and height of the current encoding unit into halves as a sample from which predetermined information can be obtained. As another example, if the block form information related to the current encoding unit indicates that it is non-square, the video decoding apparatus 100 can determine one of the samples including the boundary that divides the long side of the current encoding unit into halves as a sample from which predetermined information can be obtained.

[0108] According to one embodiment, when the video decoding apparatus 100 divides the current encoding unit into a plurality of encoding units, it can utilize the division form mode information to determine the encoding unit at a predetermined position among the plurality of encoding units. According to one embodiment, the video decoding apparatus 100 can obtain the division form mode information from a sample at a predetermined position included in the encoding unit, and the video decoding apparatus 100 can divide the plurality of encoding units generated by dividing the current encoding unit by utilizing the division form mode information obtained from the samples at the predetermined positions included in each of the plurality of encoding units. That is, the encoding unit is recursively divided by utilizing the division form mode information obtained from the samples at the predetermined positions included in each encoding unit. Since the recursive division process of the encoding unit has been described with reference to FIG. 5, detailed description is omitted.

[0109] According to one embodiment, the video decoding apparatus 100 can divide the current encoding unit and determine at least one encoding unit, and can determine the order in which such at least one encoding unit is decoded by a predetermined block (e.g., the current encoding unit).

[0110] FIG. 7 illustrates the order in which a plurality of coded units are processed when a video decoding apparatus according to an embodiment divides a current coded unit and determines a plurality of coded units.

[0111] The video decoding apparatus 100 according to an embodiment can divide the first coded unit 700 vertically according to the division mode information to determine the second coded units 710a and 710b, divide the first coded unit 700 horizontally to determine the second coded units 730a and 730b, or divide the first coded unit 700 both vertically and horizontally to determine the second coded units 750a, 750b, 750c, and 750d.

[0112] Referring to FIG. 7, the video decoding apparatus 100 can determine the order so that the second coded units 710a and 710b determined by dividing the first coded unit 700 vertically are processed in the horizontal direction (710c). The video decoding apparatus 100 can determine the processing order of the second coded units 730a and 730b determined by dividing the first coded unit 700 horizontally to be in the vertical direction (730c). The video decoding apparatus 100 can determine the second coded units 750a, 750b, 750c, and 750d determined by dividing the first coded unit 700 both vertically and horizontally according to a predetermined order (e.g., raster scan order or z scan order 750e) in which the coded units located in the next row are processed after the coded units located in one row are processed.

[0113] The video decoder 100 according to one embodiment can recursively divide an encoding unit. Referring to FIG. 7, the video decoder 100 can divide the first encoding unit 700 to determine a plurality of encoding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d, and each of the determined plurality of encoding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d can be recursively divided. The method of dividing the plurality of encoding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d also corresponds to the method of dividing the first encoding unit 700. Thereby, each of the plurality of encoding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d is independently divided into a plurality of encoding units. Referring to FIG. 7, the video decoder 100 can divide the first encoding unit 700 in the vertical direction to determine the second encoding units 710a, 710b, and further determine whether to independently divide each of the second encoding units 710a, 710b or not divide them.

[0114] The video decoder 100 according to one embodiment can divide the left second encoding unit 710a in the horizontal direction into third encoding units 720a, 720b, and the right second encoding unit 710b is not divided.

[0115] According to one embodiment, the processing order of encoding units is also determined based on the division process of the encoding units. In other words, the processing order of the divided encoding units is also determined based on the processing order of the encoding unit immediately before being divided. The video decoding apparatus 100 can determine the order in which the third encoding units 720a and 720b determined by dividing the second encoding unit 710a on the left side are processed, independently of the second encoding unit 710b on the right side. Since the second encoding unit 710a on the left side is divided in the horizontal direction and the third encoding units 720a and 720b are determined, the third encoding units 720a and 720b are also processed in the vertical direction (720c). Also, since the order in which the second encoding unit 710a on the left side and the second encoding unit 710b on the right side are processed corresponds to the horizontal direction (710c), after the third encoding units 720a and 720b included in the second encoding unit 710a on the left side are processed in the vertical direction (720c), the encoding unit 710b on the right side can be processed. Since the above description is for explaining the process in which the processing order of the encoding units is determined by the encoding units before division respectively, it should not be construed as being limited to the above-described embodiment, and it should be construed that encoding units divided and determined in various forms can be used in various methods in which they are processed independently in a predetermined order.

[0116] FIG. 8 illustrates a process in which the video decoding apparatus 100 according to one embodiment determines that the current encoding unit is divided into an odd number of encoding units when a predetermined order encoding unit cannot be processed.

[0117] According to an embodiment, the video decoding apparatus 100 can determine that the current coding unit is divided into an odd number of coding units based on the acquired split form mode information. Referring to FIG. 8, the square-shaped first coding unit 800 is also divided into non-square-shaped second coding units 810a and 810b, and the second coding units 810a and 810b are each independently divided into third coding units 820a, 820b, 820c, 820d, and 820e. According to an embodiment, in the second coding unit, the left coding unit 810a can be divided horizontally to determine a plurality of third coding units 820a and 820b, and the right coding unit 810b can be divided into an odd number of third coding units 820c, 820d, and 820e.

[0118] According to an embodiment, the video decoding apparatus 100 can determine whether the third coding units 820a, 820b, 820c, 820d, and 820e can be processed in a predetermined order, and can determine whether there are coding units divided into an odd number. Referring to FIG. 8, the video decoding apparatus 100 can recursively divide the first coding unit 800 to determine the third coding units 820a, 820b, 820c, 820d, and 820e. Based on at least one of the block form information and the split form mode information, the video decoding apparatus 100 can determine whether the first coding unit 800, the second coding units 810a and 810b, or the third coding units 820a, 820b, 820c, 820d, and 820e are divided into an odd number of coding units in the divided form. For example, among the second coding units 810a and 810b, the coding unit located on the right is also divided into an odd number of third coding units 820c, 820d, and 820e. The order in which a plurality of coding units included in the first coding unit 800 are processed also becomes a predetermined order (e.g., z-scan order (830)), and the video decoding apparatus 100 can determine whether the third coding units 820c, 820d, and 820e determined by dividing the right second coding unit 810b into an odd number satisfy the condition that they can be processed in the predetermined order.

[0119] According to an embodiment, a video decoding apparatus 100 can determine whether the third encoding units 820a, 820b, 820c, 820d, 820e included in the first encoding unit 800 satisfy the condition of being processable in a predetermined order. The condition is related to whether at least one of the width and height of the second encoding units 810a, 810b is divided in half by the boundaries of the third encoding units 820a, 820b, 820c, 820d, 820e. For example, the third encoding units 820a, 820b determined by dividing the height of the non-square-shaped left second encoding unit 810a in half can satisfy the condition. Since the boundaries of the third encoding units 820c, 820d, 820e determined by dividing the right second encoding unit 810b into three encoding units cannot divide the width or height of the right second encoding unit 810b in half, it can be determined that the third encoding units 820c, 820d, 820e cannot satisfy the condition. When such a condition is not satisfied, the video decoding apparatus 100 determines that there is a disconnection in the scan order, and based on the determination result, it can be determined that the right second encoding unit 810b is divided into an odd number of encoding units. According to an embodiment, when the video decoding apparatus 100 is divided into an odd number of encoding units, for the encoding unit at a predetermined position among the divided encoding units, a predetermined restriction can be imposed. Since such restriction details or predetermined positions have been described through various embodiments, detailed description is omitted.

[0120] FIG. 9 illustrates a process in which a video decoding apparatus according to an embodiment divides a first encoding unit and determines at least one encoding unit.

[0121] According to an embodiment, the video decoding apparatus 100 can divide the first encoding unit 900 based on the split form mode information acquired via the receiving unit 110. The square first encoding unit 900 can be divided into four square encoding units or a plurality of non-square encoding units. For example, referring to FIG. 9, when the first encoding unit 900 is square and the split form mode information indicates that it is to be divided into non-square encoding units, the video decoding apparatus 100 can divide the first encoding unit 900 into a plurality of non-square encoding units. Specifically, when the split form mode information indicates that the first encoding unit 900 is to be divided in the horizontal or vertical direction to determine an odd number of encoding units, the video decoding apparatus 100 can divide the square first encoding unit 900 into the second encoding units 910a, 910b, 910c determined by being divided vertically as odd-numbered encoding units, or the second encoding units 920a, 920b, 920c determined by being divided horizontally.

[0122] According to one embodiment, the video decoding apparatus 100 can determine whether the second encoding units 910a, 910b, 910c, 920a, 920b, 920c included in the first encoding unit 900 satisfy the condition that they can be processed in a predetermined order. The condition is related to whether at least one of the width and height of the first encoding unit 900 is divided in half along the boundaries of the second encoding units 910a, 910b, 910c, 920a, 920b, 920c. Referring to FIG. 9, for the square first encoding unit 900, since the boundaries of the second encoding units 910a, 910b, 910c determined by vertical division cannot divide the width of the first encoding unit 900 in half, the first encoding unit 900 can be determined not to satisfy the condition that it can be processed in a predetermined order. Also, for the square first encoding unit 900, since the boundaries of the second encoding units 920a, 920b, 920c determined by horizontal division cannot divide the width of the first encoding unit 900 in half, the first encoding unit 900 can be determined not to satisfy the condition that it can be processed in a predetermined order. When such a condition is not satisfied, the video decoding apparatus 100 determines that there is a break in the scan order, and based on the determination result, can determine that the first encoding unit 900 is divided into an odd number of encoding units. According to one embodiment, when the video decoding apparatus 100 is divided into an odd number of encoding units, for the encoding unit at a predetermined position among the divided encoding units, a predetermined restriction can be imposed. Since such restriction details or predetermined positions have been described through various embodiments, detailed description is omitted.

[0123] According to one embodiment, the video decoding apparatus 100 can divide the first encoding unit and determine encoding units in various forms.

[0124] Referring to FIG. 9, the video decoding apparatus 100 can divide the square first encoding unit 900, the non-square first encoding units 930 or 950 into encoding units in various forms.

[0125] FIG. 10 illustrates that when a non-square second encoded unit determined by dividing a first encoded unit satisfies a predetermined condition, the form in which the second encoded unit can be divided is restricted in a video decoding apparatus according to an embodiment.

[0126] A video decoding apparatus 100 according to an embodiment can determine to divide a square first encoded unit 1000 into non-square second encoded units 1010a, 1010b, 1020a, 1020b based on the division mode information acquired via a receiving unit 110. The second encoded units 1010a, 1010b, 1020a, 1020b are divided independently. Thereby, the video decoding apparatus 100 can determine whether to divide into a plurality of encoded units or not based on the division mode information related to each of the second encoded units 1010a, 1010b, 1020a, 1020b. A video decoding apparatus 100 according to an embodiment can divide a non-square left second encoded unit 1010a determined by dividing the first encoded unit 1000 in the vertical direction in the horizontal direction to determine third encoded units 1012a, 1012b. However, when the video decoding apparatus 100 divides the left second encoded unit 1010a in the horizontal direction, it can be restricted so that the right second encoded unit 1010b cannot be divided in the horizontal direction in the same direction as the direction in which the left second encoded unit 1010a is divided. If the right second encoded unit 1010b is divided in the same direction and third encoded units 1014a, 1014b are determined, the third encoded units 1012a, 1012b, 1014a, 1014b can be determined by the left second encoded unit 1010a and the right second encoded unit 1010b being independently divided in the horizontal direction. However, that is the same result as when the video decoding apparatus 100 divides the first encoded unit 1000 into four square second encoded units 1030a, 1030b, 1030c, 1030d based on the division mode information, and that is also inefficient in terms of video decoding.

[0127] According to an embodiment, the video decoding apparatus 100 can divide a non-square second encoding unit 1020a or 1020b determined by dividing a first encoding unit 1000 in the horizontal direction in the vertical direction to determine third encoding units 1022a, 1022b, 1024a, and 1024b. However, when the video decoding apparatus 100 divides one of the second encoding units (e.g., the upper-end second encoding unit 1020a) in the vertical direction, for the above-described reasons, other second encoding units (e.g., the lower-end encoding unit 1020b) can be restricted so as not to be divided in the vertical direction in the same direction as the direction in which the upper-end second encoding unit 1020a is divided.

[0128] FIG. 11 illustrates a process in which a video decoding apparatus divides a square encoding unit when the division mode information cannot indicate division into four square encoding units according to an embodiment.

[0129] According to an embodiment, the video decoding apparatus 100 can divide a first encoding unit 1100 based on division mode information to determine second encoding units 1110a, 1110b, 1120a, and 1120b. The division mode information may include information related to various forms in which the encoding unit can be divided. However, the information related to various forms may not include information for dividing into four square encoding units. According to such division mode information, the video decoding apparatus 100 cannot divide a square first encoding unit 1100 into four square second encoding units 1130a, 1130b, 1130c, and 1130d. Based on the division mode information, the video decoding apparatus 100 can determine non-square second encoding units 1110a, 1110b, 1120a, and 1120b.

[0130] According to an embodiment, the video decoding apparatus 100 can independently divide non-square second encoding units 1110a, 1110b, 1120a, and 1120b. Through a recursive method, each of the second encoding units 1110a, 1110b, 1120a, and 1120b is divided in a predetermined order, which is also a division method corresponding to the way the first encoding unit 1100 is divided based on the division form mode information.

[0131] For example, the video decoding apparatus 100 can horizontally divide the left second encoding unit 1110a to determine square third encoding units 1112a and 1112b, and horizontally divide the right second encoding unit 1110b to determine square third encoding units 1114a and 1114b. Furthermore, the video decoding apparatus 100 can horizontally divide both the left second encoding unit 1110a and the right second encoding unit 1110b to determine square third encoding units 1116a, 1116b, 1116c, and 1116d. In such a case, the encoding units can be determined in the same form as when the first encoding unit 1100 is divided into four square second encoding units 1130a, 1130b, 1130c, and 1130d.

[0132] As another example, the video decoding apparatus 100 can vertically divide the upper second encoding unit 1120a to determine square third encoding units 1122a and 1122b, and vertically divide the lower second encoding unit 1120b to determine square third encoding units 1124a and 1124b. Furthermore, the video decoding apparatus 100 can vertically divide both the upper second encoding unit 1120a and the lower second encoding unit 1120b to determine square third encoding units 1126a, 1126b, 1126a, and 1126b. In such a case, the encoding units can be determined in the same form as when the first encoding unit 1100 is divided into four square second encoding units 1130a, 1130b, 1130c, and 1130d.

[0133] FIG. 12 illustrates, according to one embodiment, that the processing order among a plurality of encoding units may also differ depending on the splitting process of the encoding units.

[0134] According to one embodiment, the video decoding apparatus 100 can split the first encoding unit 1200 based on the split form mode information. When the block form is square and the split form mode information indicates that the first encoding unit 1200 is split in at least one of the horizontal and vertical directions, the video decoding apparatus 100 can split the first encoding unit 1200 and determine second encoding units (e.g., 1210a, 1210b, 1220a, 1220b). Referring to FIG. 12, the non-square second encoding units 1210a, 1210b, 1220a, 1220b determined by splitting the first encoding unit 1200 only in the horizontal or vertical direction are split independently based on the relevant split form mode information. For example, the video decoding apparatus 100 can split the second encoding units 1210a, 1210b generated by splitting the first encoding unit 1200 in the vertical direction in the horizontal direction respectively to determine third encoding units 1216a, 1216b, 1216c, 1216d, and can split the second encoding units 1220a, 1220b generated by splitting the first encoding unit 1200 in the horizontal direction in the horizontal direction respectively to determine third encoding units 1226a, 1226b, 1226c, 1226d. Since the splitting process of such second encoding units 1210a, 1210b, 1220a, 1220b has been described in relation to FIG. 11, detailed description is omitted.

[0135] The video decoding apparatus 100 according to an embodiment can process encoding units in a predetermined order. Since the features related to the processing of the encoding units in the predetermined order have been described with reference to FIG. 7, detailed descriptions thereof will be omitted. Referring to FIG. 12, the video decoding apparatus 100 can divide a square-shaped first encoding unit 1200 and determine four square-shaped third encoding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d. The video decoding apparatus 100 according to an embodiment can determine the processing order of the third encoding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d according to the form in which the first encoding unit 1200 is divided.

[0136] The video decoding apparatus 100 according to an embodiment can divide the second encoding units 1210a and 1210b generated by being divided in the vertical direction in the horizontal direction respectively, and determine the third encoding units 1216a, 1216b, 1216c, 1216d. The video decoding apparatus 100 can process the third encoding units 1216a, 1216b, 1216c, 1216d according to the order (1217) of first processing the third encoding units 1216a and 1216c included in the left second encoding unit 1210a in the vertical direction and then processing the third encoding units 1216b and 1216d included in the right second encoding unit 1210b in the vertical direction.

[0137] The video decoding apparatus 100 according to an embodiment can divide the second encoding units 1220a and 1220b generated by being divided in the horizontal direction in the vertical direction respectively, and determine the third encoding units 1226a, 1226b, 1226c, 1226d. The video decoding apparatus 100 can process the third encoding units 1226a, 1226b, 1226c, 1226d according to the order (1227) of first processing the third encoding units 1226a and 1226b included in the upper second encoding unit 1220a in the horizontal direction and then processing the third encoding units 1226c and 1226d included in the lower second encoding unit 1220b in the horizontal direction.

[0138] Referring to FIG. 12, the second encoding units 1210a, 1210b, 1220a, 1220b can be respectively divided, and square-shaped third encoding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d can be determined. The second encoding units 1210a, 1210b determined by being divided in the vertical direction and the second encoding units 1220a, 1220b determined by being divided in the horizontal direction are divided into different forms. However, according to the third encoding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d determined later, ultimately, the first encoding unit 1200 is divided into encoding units of the same form. Thereby, even if the video decoding apparatus 100 recursively divides the encoding units through different processes based on the divided form mode information to determine encoding units of the same form, it can perform different sequential processes on a plurality of encoding units determined to be of the same form.

[0139] FIG. 13 illustrates, according to one embodiment, the process of determining the depth of an encoding unit when the encoding unit is recursively divided and a plurality of encoding units are determined, where the form and size of the encoding unit change.

[0140] The video decoding apparatus 100 according to one embodiment can determine the depth of an encoding unit according to a predetermined criterion. For example, the predetermined criterion can also be the length of the long side of the encoding unit. When the length of the long side of the current encoding unit is divided by 2 n (n>0) times the length of the long side of the encoding unit before division, it can be determined that the depth of the current encoding unit is increased by n compared to the depth of the encoding unit before division. Hereinafter, an encoding unit with an increased depth is expressed as an encoding unit with a lower depth.

[0141] Referring to FIG. 13, according to one embodiment, based on block form information indicating a square shape (for example, the block form information may indicate "0:SQUARE"), the video decoding apparatus 100 can divide a square-shaped first encoding unit 1300 and determine second encoding units 1302, third encoding units 1304, etc. with a lower depth. If the size of the square-shaped first encoding unit 1300 is 2Nx2N, the second encoding unit 1302 determined by dividing the width and height of the first encoding unit 1300 by 1 / 2 can have a size of NxN. Further, the third encoding unit 1304 determined by dividing the width and height of the second encoding unit 1302 by 1 / 2 can have a size of N / 2xN / 2. In that case, the width and height of the third encoding unit 1304 correspond to 1 / 4 times that of the first encoding unit 1300. When the depth of the first encoding unit 1300 is D, the depth of the second encoding unit 1302, which is 1 / 2 times the width and height of the first encoding unit 1300, is also D + 1, and the depth of the third encoding unit 1304, which is 1 / 4 times the width and height of the first encoding unit 1300, is also D + 2.

[0142] According to one embodiment, based on block form information indicating a non-square shape (for example, the block form information may indicate "1:NS_VER" indicating a non-square with a height larger than the width, or "2:NS_HOR" indicating a non-square with a width larger than the height), the video decoding apparatus 100 can divide a non-square-shaped first encoding unit 1310 or 1320 and determine second encoding units 1312 or 1322, third encoding units 1314 or 1324 with a lower depth.

[0143] The video decoding device 100 can divide at least one of the width and height of the first encoding unit 1310 of Nx2N size to determine a second encoding unit (e.g., 1302, 1312, 1322). That is, the video decoding device 100 can divide the first encoding unit 1310 horizontally to determine a second encoding unit 1302 of NxN size or a second encoding unit 1322 of NxN / 2 size, or can divide it both horizontally and vertically to determine a second encoding unit 1312 of N / 2xN size.

[0144] The video decoding device 100 according to one embodiment can also divide at least one of the width and height of the first encoding unit 1320 of 2NxN size to determine a second encoding unit (e.g., 1302, 1312, 1322). That is, the video decoding device 100 can divide the first encoding unit 1320 vertically to determine a second encoding unit 1302 of NxN size or a second encoding unit 1312 of N / 2xN size, or can divide it both horizontally and vertically to determine a second encoding unit 1322 of NxN / 2 size.

[0145] The video decoding device 100 according to one embodiment can also divide at least one of the width and height of the second encoding unit 1302 of NxN size to determine a third encoding unit (e.g., 1304, 1314, 1324). That is, the video decoding device 100 can divide the second encoding unit 1302 both vertically and horizontally to determine a third encoding unit 1304 of N / 2xN / 2 size, a third encoding unit 1314 of N / 4xN / 2 size, or a third encoding unit 1324 of N / 2xN / 4 size.

[0146] The video decoding apparatus 100 according to one embodiment can also divide at least one of the width and height of the second encoding unit 1312 of N / 2xN size to determine a third encoding unit (e.g., 1304, 1314, 1324). That is, the video decoding apparatus 100 can divide the second encoding unit 1312 in the horizontal direction to determine a third encoding unit 1304 of N / 2xN / 2 size or a third encoding unit 1324 of N / 2xN / 4 size, or divide it in both the vertical and horizontal directions to determine a third encoding unit 1314 of N / 4xN / 2 size.

[0147] The video decoding apparatus 100 according to one embodiment can also divide at least one of the width and height of the second encoding unit 1322 of NxN / 2 size to determine a third encoding unit (e.g., 1304, 1314, 1324). That is, the video decoding apparatus 100 can divide the second encoding unit 1322 in the vertical direction to determine a third encoding unit 1304 of N / 2xN / 2 size or a third encoding unit 1314 of N / 4xN / 2 size, or divide it in both the vertical and horizontal directions to determine a third encoding unit 1324 of N / 2xN / 4 size.

[0148] The video decoding apparatus 100 according to one embodiment can divide a square encoding unit (e.g., 1300, 1302, 1304) in the horizontal or vertical direction. For example, the first encoding unit 1300 of 2Nx2N size can be divided in the vertical direction to determine a first encoding unit 1310 of Nx2N size, or divided in the horizontal direction to determine a first encoding unit 1320 of 2NxN size. According to one embodiment, when the depth is determined based on the length of the maximum long side of the encoding unit, the depth of the encoding unit determined by dividing the first encoding unit 1300 of 2Nx2N size in the horizontal or vertical direction is the same as the depth of the first encoding unit 1300.

[0149] According to an embodiment, the width and height of the third encoding unit 1314 or 1324 also correspond to 1 / 4 times that of the first encoding unit 1310 or 1320. When the depth of the first encoding unit 1310 or 1320 is D, the depth of the second encoding unit 1312 or 1322, which is 1 / 2 times the width and height of the first encoding unit 1310 or 1320, is also D + 1, and the depth of the third encoding unit 1314 or 1324, which is 1 / 4 times the width and height of the first encoding unit 1310 or 1320, is also D + 2.

[0150] FIG. 14 illustrates, according to an embodiment, the depth that can be determined according to the form and size of the encoding unit, and the index (PID: part index) for encoding unit division.

[0151] The video decoding apparatus 100 according to an embodiment can divide the square first encoding unit 1400 and determine second encoding units in various forms. Referring to FIG. 14, the video decoding apparatus 100 can divide the first encoding unit 1400 in at least one of the vertical and horizontal directions according to the division form mode information, and determine the second encoding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d. That is, the video decoding apparatus 100 can determine the second encoding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d based on the division form mode information related to the first encoding unit 1400.

[0152] According to an embodiment, the second encoding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d related to the square first encoding unit 1400 and determined by the split form mode information can have their depths determined based on the length of the long side. For example, since the length of one side of the square first encoding unit 1400 is the same as the length of the long side of the non-square second encoding units 1402a, 1402b, 1404a, 1404b, the depths of the first encoding unit 1400 and the non-square second encoding units 1402a, 1402b, 1404a, 1404b can be considered equal to D. In contrast, when the video decoding device 100 divides the first encoding unit 1400 into four square second encoding units 1406a, 1406b, 1406c, 1406d based on the split form mode information, since the length of one side of the square second encoding units 1406a, 1406b, 1406c, 1406d is 1 / 2 times the length of one side of the first encoding unit 1400, the depth of the second encoding units 1406a, 1406b, 1406c, 1406d is also at a depth of D + 1, which is one depth lower than the depth D of the first encoding unit 1400.

[0153] The video decoding device 100 according to an embodiment can divide the first encoding unit 1410 in a form where the height is greater than the width horizontally according to the split form mode information into a plurality of second encoding units 1412a, 1412b, 1414a, 1414b, 1414c. The video decoding device 100 according to an embodiment can divide the first encoding unit 1420 in a form where the width is greater than the height vertically according to the split form mode information into a plurality of second encoding units 1422a, 1422b, 1424a, 1424b, 1424c.

[0154] According to an embodiment, the second encoding units 1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, 1424c related to the non-square first encoding units 1410 or 1420 can have their depths determined based on the length of the long side. For example, since the length of one side of the square second encoding units 1412a, 1412b is 1 / 2 times the length of one side of the non-square first encoding unit 1410 where the height is greater than the width, the depth of the square second encoding units 1412a, 1412b is D + 1, which is one depth lower than the depth D of the non-square first encoding unit 1410.

[0155] Furthermore, the video decoding apparatus 100 can divide the non-square first encoding unit 1410 into an odd number of second encoding units 1414a, 1414b, 1414c based on the segmentation mode information. The odd number of second encoding units 1414a, 1414b, 1414c also includes non-square second encoding units 1414a, 1414c and square second encoding units 1414b. In that case, since the length of the long side of the non-square second encoding units 1414a, 1414c and the length of one side of the square second encoding unit 1414b are 1 / 2 times the length of one side of the first encoding unit 1410, the depth of the second encoding units 1414a, 1414b, 1414c is also D + 1, which is one depth lower than the depth D of the first encoding unit 1410. The video decoding apparatus 100 can determine the depth of the encoding unit related to the non-square first encoding unit 1420 where the width is greater than the height in a manner corresponding to the method for determining the depth of the encoding unit related to the first encoding unit 1410.

[0156] According to an embodiment, the video decoding apparatus 100 can determine an index (PID) for dividing the divided coding units based on the ratio of the sizes between the coding units when the coding units divided into an odd number are not of the same size. Referring to FIG. 14, among the coding units 1414a, 1414b, 1414c divided into an odd number, the coding unit 1414b located in the middle has the same width as the other coding units 1414a, 1414c, but its height is also twice the height of the coding units 1414a, 1414c with different heights. That is, in that case, the coding unit 1414b located in the middle also includes the two other coding units 1414a, 1414c. Therefore, according to the scan order, if the index (PID) of the coding unit 1414b located in the middle is 1, the coding unit 1414c located in the next order has an index that is also 3, which is an increase of 2. That is, there may be a discontinuity in the index values. The video decoding apparatus 100 according to an embodiment can determine whether the coding units divided into an odd number are not of the same size based on the presence or absence of such a discontinuity in the index for dividing the divided coding units.

[0157] According to an embodiment, the video decoding apparatus 100 can determine whether a specific division form is divided based on the index values for dividing a plurality of coding units determined by dividing from the current coding unit. Referring to FIG. 14, the video decoding apparatus 100 can divide the first coding unit 1410 having a rectangular shape with a height greater than the width to determine an even number of coding units 1412a, 1412b or an odd number of coding units 1414a, 1414b, 1414c. The video decoding apparatus 100 can use an index (PID) indicating each coding unit to divide each of the plurality of coding units. According to an embodiment, the index (PID) is also obtained from samples at a predetermined position (e.g., the upper left sample) of each coding unit.

[0158] The video decoding apparatus 100 according to one embodiment can determine an encoded unit at a predetermined position among the encoded units that are divided and determined using an index for encoding unit classification. According to one embodiment, when the split form mode information related to the first encoded unit 1410 having a rectangular shape with a height greater than the width indicates that it is divided into three encoded units, the video decoding apparatus 100 can divide the first encoded unit 1410 into three encoded units 1414a, 1414b, and 1414c. The video decoding apparatus 100 can assign an index related to each of the three encoded units 1414a, 1414b, and 1414c. The video decoding apparatus 100 can compare the indexes related to each encoded unit in order to determine the middle encoded unit among the encoded units divided into an odd number. The video decoding apparatus 100 can determine, as the middle-positioned encoded unit among the encoded units that the first encoded unit 1410 is divided and determined into, the encoded unit 1414b having an index corresponding to the middle value among the indexes based on the index of the encoded unit. The video decoding apparatus 100 according to one embodiment can determine an index based on the ratio of the sizes between encoded units when the encoded units are not of the same size in determining the index for the divided encoded unit classification. Referring to FIG. 14, the encoded unit 1414b generated by dividing the first encoded unit 1410 has the same width as the other encoded units 1414a and 1414c, but is also twice the height of the encoded units 1414a and 1414c with different heights. In that case, if the index (PID) of the middle-positioned encoded unit 1414b is 1, the next-order encoded unit 1414c has an index that is also 3 with an increase of 2. In such a case where the index increases uniformly but the increase amounts are different, the video decoding apparatus 100 can determine that it is divided into a plurality of encoded units including an encoded unit having a size different from the other encoded units.According to one embodiment, when the split mode information indicates that it is split into an odd number of encoding units, the video decoding apparatus 100 can split the current encoding unit into a form in which the encoding unit at a predetermined position (e.g., the middle encoding unit) among the odd number of encoding units has a different size from the other encoding units. In that case, the video decoding apparatus 100 can use the index (PID) related to the encoding unit to determine the middle encoding unit having different sizes. However, since the above-mentioned index, the size or position of the encoding unit at the predetermined position to be determined is specified for the purpose of explaining one embodiment, it should not be construed as being limited thereto, and it should be construed that various indexes, positions and sizes of the encoding units can be used.

[0159] The video decoding apparatus 100 according to one embodiment can use a predetermined data unit at which the recursive splitting of the encoding unit starts.

[0160] FIG. 15 illustrates a case where a plurality of encoding units are determined by a plurality of predetermined data units included in a picture according to one embodiment.

[0161] According to one embodiment, the predetermined data unit is also defined as a data unit at which the encoding unit starts to be recursively split using the split mode information. That is, it also corresponds to the encoding unit at the highest depth used in the process of determining a plurality of encoding units for splitting the current picture. Hereinafter, for the sake of convenience in explanation, such a predetermined data unit is referred to as a reference data unit.

[0162] According to one embodiment, the reference data unit can indicate a predetermined size and form. According to one embodiment, the reference encoding unit also includes MxN samples. Here, M and N are the same as each other and are also integers expressed as powers of 2. That is, the reference data unit indicates a square or non-square form and is then split into an integer number of encoding units.

[0163] The video decoding apparatus 100 according to an embodiment can divide a current picture into a plurality of reference data units. The video decoding apparatus 100 according to an embodiment can divide the plurality of reference data units for dividing the current picture by using the division form mode information related to each reference data unit. Such a division process of the reference data unit can correspond to a division process using a quad-tree structure.

[0164] The video decoding apparatus 100 according to an embodiment can pre-determine the minimum size that the reference data unit included in the current picture can have. Thereby, the video decoding apparatus 100 can determine reference data units of various sizes having a size equal to or larger than the minimum size, and based on the determined reference data units, can use the division form mode information to determine at least one coding unit.

[0165] Referring to FIG. 15, the video decoding apparatus 100 can use a square reference coding unit 1500 or can also use a non-square reference coding unit 1502. According to an embodiment, the form and size of the reference coding unit are also determined by various data units (e.g., sequence, picture, slice, slice segment, tile, tile group, maximum coding unit, etc.) including at least one reference coding unit.

[0166] The receiving unit 110 of the video decoding apparatus 100 according to an embodiment can obtain at least one of information related to the form of the reference encoding unit and information related to the size of the reference encoding unit from the bit stream for each of the various data units. The process of determining at least one encoding unit included in the square reference encoding unit 1500 is described via the process of dividing the current encoding unit 300 in FIG. 3, and the process of determining at least one encoding unit included in the non-square reference encoding unit 1502 is described via the process of dividing the current encoding unit 400 or 450 in FIG. 4, so detailed description is omitted.

[0167] According to an embodiment, the video decoding apparatus 100 can use an index for identifying the size and form of a reference encoding unit in order to determine the size and form of the reference encoding unit by a partial data unit determined in advance based on a predetermined condition. That is, the receiving unit 110 obtains, from the bit stream, only an index for identifying the size and form of the reference encoding unit for each of data units that satisfy a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) among the various data units (e.g., sequence, picture, slice, slice segment, tile, tile group, maximum coding unit, etc.), such as a slice, a slice segment, a tile, a tile group, and a maximum coding unit. The video decoding apparatus 100 can determine the size and form of the reference data unit for each data unit that satisfies the predetermined condition by using the index. If information related to the form of the reference encoding unit and information related to the size of the reference encoding unit are obtained from the bit stream and used for each data unit of a relatively small size, the utilization efficiency of the bit stream deteriorates. Therefore, instead of directly obtaining information related to the form of the reference encoding unit and information related to the size of the reference encoding unit, only the index can be obtained and used. In that case, at least one of the size and form of the reference encoding unit corresponding to the index indicating the size and form of the reference encoding unit is also determined in advance. That is, the video decoding apparatus 100 can determine at least one of the size and form of the reference encoding unit included in the data unit serving as a reference for index acquisition by selecting at least one of the size and form of the predetermined reference encoding unit by using the index.

[0168] According to one embodiment, the video decoding apparatus 100 can utilize at least one reference coding unit included in one maximum coding unit. That is, the maximum coding unit for dividing video includes at least one reference coding unit, and through the recursive division process of each reference coding unit, the coding unit can be determined. According to one embodiment, at least one of the width and height of the maximum coding unit also corresponds to an integer multiple of at least one of the width and height of the reference coding unit. According to one embodiment, the size of the reference coding unit is also the size obtained by dividing the maximum coding unit n times by a quad-tree structure. That is, the video decoding apparatus 100 can divide the maximum coding unit n times by a quad-tree structure to determine the reference coding unit, and according to various embodiments, the reference coding unit can be divided based on at least one of the block form information and the division form mode information.

[0169] According to one embodiment, the video decoding apparatus 100 can obtain and utilize, from the bitstream, the block form information indicating the form of the current coding unit or the division form mode information indicating the method of dividing the current coding unit. The division form mode information can be included in the bitstream related to various data units. For example, the video decoding apparatus 100 can utilize the division form mode information included in the sequence parameter set, picture parameter set, video parameter set, slice header, slice segment header, tile header, tile group header. Furthermore, the video decoding apparatus 100 can obtain and utilize, from the bitstream, the syntax element corresponding to the block form information or the division form mode information for each of the maximum coding unit, reference coding unit, and processing block.

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

[0171] The video decoder 100 can determine the splitting rule of the video. The splitting rule may also be determined in advance between the video decoder 100 and the video encoder 2200. The video decoder 100 can determine the splitting rule of the video based on the information obtained from the bitstream. The video decoder 100 can determine the splitting rule based on the information obtained from at least one of the sequence parameter set, the picture parameter set, the video parameter set, the slice header, the slice segment header, the tile header, and the tile group header. The video decoder 100 can determine the splitting rule differently according to a frame, a slice, a tile, a temporal layer, a maximum coding unit, or a coding unit.

[0172] The video decoder 100 can determine the splitting rule based on the block form of the coding unit. The block form also includes the size, form, ratio of width and height, and direction of the coding unit. The video decoder 100 can determine in advance to determine the splitting rule based on the block form of the coding unit. However, it is not limited thereto. The video decoder 100 can determine the splitting rule based on the information obtained from the received bitstream.

[0173] The form of the coding unit also includes a square and a non-square. When the width and height of the coding unit are the same, the video decoder 100 can determine the form of the coding unit as a square. When the width and height of the coding unit are not the same, the video decoder 100 can determine the form of the coding unit as a non-square.

[0174] The size of the encoding unit also includes various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, …, 256x256. The size of the encoding unit is also classified by the length of the long side, the length of the short side, or the area of the encoding unit. The video decoding apparatus 100 can apply the same splitting rule to the encoding units classified into the same group. For example, the video decoding apparatus 100 can classify the encoding units having the same long side length into the same size. Also, the video decoding apparatus 100 can apply the same splitting rule to the encoding units having the same long side length.

[0175] The ratio of the width and height of the encoding unit also includes those such as 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1 or 1:32. Also, the direction of the encoding unit also includes the horizontal direction and the vertical direction. The horizontal direction may indicate a case where the size of the encoding unit width is larger than the size of the height. The vertical direction may indicate a case where the size of the encoding unit width is smaller than the size of the height.

[0176] The video decoding apparatus 100 can adaptively determine the splitting rule based on the size of the encoding unit. The video decoding apparatus 100 can determine different acceptable splitting form modes based on the size of the encoding unit. For example, the video decoding apparatus 100 can determine whether splitting is allowed based on the size of the encoding unit. The video decoding apparatus 100 can determine the splitting direction according to the size of the encoding unit. The video decoding apparatus 100 can determine the acceptable splitting type according to the size of the encoding unit.

[0177] Determining the splitting rule based on the size of the encoding unit is also a pre-determined splitting rule among the video decoding apparatuses 100. Also, the video decoding apparatus 100 can determine the splitting rule based on the information obtained from the bit stream.

[0178] The video decoding device 100 can adaptively determine a splitting rule based on the position of the encoding unit. The video decoding device 100 can adaptively determine a splitting rule based on the position occupied by the encoding unit in the video.

[0179] Also, the video decoding device 100 can determine a splitting rule so that the encoding units generated by different splitting paths do not have the same block form. However, it is not limited thereto, and the encoding units generated by different splitting paths can have the same block form. The encoding units generated by different splitting paths can have different decoding processing orders. Since the decoding processing order has been described with FIG. 12, a detailed description thereof will be omitted.

[0180] FIG. 16 is a drawing showing a block diagram of a video encoding and decoding system.

[0181] The encoder 1610 of the video encoding and decoding system 1600 transmits the encoded bitstream of the video, and the decoder 1650 receives the bitstream and decodes it to output a restored video. Here, the decoder 1650 also has a configuration similar to that of the video decoding device 100.

[0182] At the symbolization end 1610, when the prediction mode of the current block is the inter prediction mode, the inter prediction encoding unit 1605 generates motion information of the current block indicating a reference block of a reference picture temporally adjacent to the current picture. The inter prediction encoding unit 1605 can utilize samples of the reference block to determine prediction samples of the current block. The intra prediction encoding unit 1610 can determine intra prediction information indicating a direction in which adjacent samples similar to the current block are located or a method of determining prediction samples so as to utilize adjacent samples spatially adjacent to the current block to determine prediction samples of the current block. The inter prediction encoding unit 1605 can determine reference samples to be used for prediction of the current block among the first restored samples stored in the DPB (decoded picture buffer) 1648.

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

[0184] The quantized conversion coefficients output from the quantization unit 1625 can be inverse quantized and inverse transformed via the inverse quantization unit 1633 and the inverse conversion unit 1635, and further residual sample values can be generated.

[0185] In the adder 1615, the residual sample value and the predicted sample value are combined, and a restored sample value is output. The post-restoration filtering unit 1640 performs post-restoration filtering on the restored samples, and the restored sample value updated through the post-restoration filtering is also used as a reference sample value for intra prediction performed by the intra prediction unit 1610. The post-restoration filtering unit 1640 can perform Hadamard transform domain filtering or bilateral filtering on the restored sample value.

[0186] The in-loop filtering unit 1645 can perform at least one of deblocking filtering and adaptive loop filtering on the restored samples updated through the post-restoration filtering. The restored sample value updated through the filtering of the in-loop filtering unit 1645 is stored in the DPB 1648 and is also used as a reference sample value for inter prediction performed by the inter prediction unit 1605.

[0187] The entropy decoding unit 1655 of the decoder 1650 performs entropy decoding on the received bitstream and can parse the residual syntax element including the level value. The quantized transform coefficients can be restored from the residual syntax element. The inverse quantization unit 1660 performs inverse quantization on the quantized transform coefficients and outputs the transform coefficients, and the inverse transform unit 1665 can perform inverse transform on the transform coefficients and output the residual sample value.

[0188] The inter-prediction coding unit 1670 of the decoder 1650 can use the motion information of the current block parsed by the entropy decoding unit 1655 to determine a reference picture temporally adjacent to the current picture and determine a reference block within the reference picture. The inter-prediction coding unit 1670 can use the samples of the reference block to determine the predicted samples of the current block. The intra-prediction coding unit 1675 of the decoder 1650 can use the motion information of the current block parsed by the entropy decoding unit 1655 and use the intra-prediction information to determine reference samples spatially adjacent to the current block, and use the determined adjacent samples to determine the predicted samples of the current block. The inter-prediction coding unit 1670 can determine, among the samples restored first and stored in the DPB (decoded picture buffer) 1690, the reference samples to be used for the prediction of the current block.

[0189] In the adder 1695 of the decoder 1650, the residual sample value and the predicted sample value are combined to output the restored sample value of the current block. The post-restoration filtering unit 1680 of the decoder 1650 can perform Hadamard transform domain filtering or bilateral filtering on the restored sample value. The restored sample value updated through the filtering of the post-restoration filtering unit 1680 is also used as the reference sample value for intra-prediction performed by the intra-prediction unit 1675.

[0190] The in-loop filtering unit 1685 of the decoder 1650 is used for the restored samples updated through post-restoration filtering and can perform at least one of deblocking filtering and adaptive loop filtering. The restored sample value updated through the filtering of the in-loop filtering unit 1685 is stored in the DPB 1690 and is also used as the reference sample value for inter-prediction performed by the inter-prediction unit 1670.

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

[0192] FIG. 17 illustrates a block diagram of a video decoding apparatus according to an embodiment.

[0193] A video decoding apparatus 1700 according to an embodiment includes an acquisition unit 1710 and a decoding unit 1720. The video decoding apparatus 1700 acquires a bitstream generated as an encoding result of video, and based on the information included in the bitstream, grasps the positions of blocks divided from a picture, and can decode blocks such as a maximum coding unit and a coding unit.

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

[0195] In order to restore video through video decoding, the video decoding apparatus 1700 can perform a video decoding operation including prediction by operating in cooperation with an internal video decoding processor or an external video decoding processor mounted therein. The internal video decoding processor of the video decoding apparatus 1700 according to an embodiment can also implement a basic video decoding operation by including a video decoding processing module not only in a separate processor but also in a central processing unit or a graphics processing unit.

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

[0197] The video decoding device 1700 receives a bitstream generated as an encoding result of a video. The bitstream also includes information related to the current picture. The picture also includes one or more maximum coding units. The video decoding device 1700 can determine the position of the current block within the picture based on the information obtained from the bitstream. The current block is a block generated by being divided by a tree structure from the picture and may correspond to, for example, a maximum coding unit or a coding unit. The video decoding device 1700 can determine whether the current block is further divided into lower-level blocks of a lower depth and determine the tree structure of the current block. Compared with the current depth of the current block, the depth increases as the number of times of division from the current block to the lower-level block increases, and the lower depth can be determined. Among the blocks forming the tree structure included in the current picture, the blocks located at the tree leaf are blocks that are not further divided. Therefore, the video decoding device 1700 can decode the block by performing inverse quantization, inverse transformation, and prediction on one or more blocks that are not further divided.

[0198] The video decoder 1700 can perform prediction on the current block and generate prediction samples for the current block. The video decoder 1700 can perform inverse transformation on the current block and generate residual samples of the current block. The restoration unit 1730 can generate restored samples of the current block by using the prediction samples of the current block and the residual samples of the current block. The video decoder 1700 can restore the current picture by restoring samples block by block.

[0199] For example, when the prediction mode of the current block is the intra mode, the video decoder 1700 can use the intra prediction information of the current block to determine reference samples among the samples of spatially adjacent blocks located in the intra prediction direction, and use the reference samples to determine prediction samples corresponding to the current block.

[0200] For example, when the prediction mode of the current block is the inter mode, the video decoder 1700 can restore the current block by using the motion vector of the current block. The video decoder 1700 can use the motion vector of the current block to determine a reference block in the reference picture, and determine prediction samples corresponding to the current block from the reference samples included in the reference block. The video decoder 1700 can use the transform coefficient levels obtained from the bitstream to restore the transform coefficients, perform inverse quantization and inverse transformation on the transform coefficients, and restore the residual samples. The video decoder 1700 can combine the prediction samples corresponding to the current block and the residual samples to determine the restored samples of the current block.

[0201] When the current block is predicted with the skip mode, the video decoder 1700 does not need to parse the transform coefficients of the current block from the bitstream. The video decoder 1700 can directly use the prediction samples of the current block to determine the restored samples of the current block.

[0202] According to one embodiment, the video decoder 1700 utilizes a quantization parameter (QP) to perform inverse quantization. The QP is set for each coding unit, and one QP can be applied to the transform coefficients included in the coding unit. A picture also includes one or more slices, and one slice also includes one or more coding units. The video decoder 1700 can obtain information necessary to determine the QP for each coding unit, for each slice, or for each picture from the bitstream.

[0203] According to one embodiment, the acquisition unit 1710 can obtain information necessary to determine the QP for each coding unit from the coding unit-related bitstream syntax. The acquisition unit 1710 can obtain information necessary to determine the QP for each slice from the slice header syntax. The acquisition unit 1710 can obtain information necessary to determine the QP for each picture from the picture header syntax.

[0204] First, it can be determined at the picture parameter set level whether the video decoder 1700 obtains the QP difference value for each picture or for each slice.

[0205] According to one embodiment, the acquisition unit 1710 can acquire the initial QP value applied to the current picture from the picture parameter set. Further, the acquisition unit 1710 can acquire picture header QP difference value information indicating whether QP difference value information exists in the picture header of the current picture from the picture parameter set. If the picture header QP difference value information indicates that QP difference value information exists in the picture header, the acquisition unit 1710 can acquire the first QP difference value for the current picture from the picture header. If the picture header QP difference value information indicates that QP difference value information does not exist in the picture header, the acquisition unit 1710 can acquire the second QP difference value for the current slice from the slice header of the current slice included in the current picture.

[0206] According to one embodiment, if the picture header QP difference value information indicates that QP difference value information exists in the picture header, the decoding unit 1720 can determine the QP for the coded unit included in the current picture by using the initial QP value and the first QP difference value. The decoding unit 1720 can perform inverse quantization on the coded units included in the current picture by using the first QP difference value and the QP.

[0207] According to one embodiment, if the picture header QP difference value information indicates that QP difference value information does not exist in the picture header, the decoding unit 1720 can determine the QP for the coded unit included in the current slice by using the initial QP value and the second QP difference value. The decoding unit 1720 can perform inverse quantization on the coded units included in the current slice by using the QP determined by using the second QP difference value.

[0208] Hereinafter, with reference to FIG. 18, the process in which the video decoding apparatus 1700 acquires QP difference value information picture-by-picture or slice-by-slice and performs inverse quantization unit-by-unit will be described in detail.

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

[0210] In stage 1810, the acquisition unit 1710 can acquire the QP initial value applied to the current picture and the picture header QP difference value information from the picture parameter set. The picture header QP difference value information according to one embodiment may indicate whether QP difference value information exists in the picture header of the current picture.

[0211] In stage 1820, when the picture header QP difference value information indicates that QP difference value information exists in the picture header of the current picture, the acquisition unit 1810 can acquire the first QP difference value for the current picture from the picture header.

[0212] In stage 1830, the decoding unit 1820 can determine the QP for the coded unit included in the current picture by using the QP initial value and the first QP difference value.

[0213] In stage 1840, the decoding unit 1820 can perform inverse quantization on the coded unit by using the QP determined by using the first QP difference value and obtain the transform coefficients of the coded unit. That is, inverse quantization can be performed on the coded units included in the current picture by using the QP determined by using the first QP difference value.

[0214] In stage 1850, the decoding unit 1820 can restore the coded unit by using the transform coefficients of the coded unit acquired in stage 1840. The decoding unit 1820 can perform inverse transformation on the transform coefficients, obtain the residual samples, and use the residual samples to determine the restored samples of the coded unit.

[0215] According to one embodiment, when the picture header QP difference value information indicates that there is no QP difference value information in the picture header, the acquisition unit 1710 can acquire a second QP difference value for the current slice from the slice header of the current slice included in the current picture. The decoding unit 1720 can determine the QP for the coding unit included in the current slice by using the QP initial value and the second QP difference value. The decoding unit 1720 can perform inverse quantization on the coding unit by using the QP determined by using the second QP difference value, and acquire the transform coefficients of the coding unit. The decoding unit 1720 can restore the coding unit by using the transform coefficients. That is, inverse quantization can be performed on the coding unit included in the current slice by using the QP determined by using the second QP difference value.

[0216] In step 1820, when the picture header QP difference value information indicates that there is QP difference value information in the picture header of the current picture, the acquisition unit 1810 can acquire the first QP difference value for the luma component of the current picture from the picture header. The decoding unit 1820 can determine the QP for the luma component of the slice included in the current picture by adding the QP initial value and the first QP difference value for the luma component. The decoding unit 1820 can use the QP for the luma component of the slice to determine the QP of the coding unit included in the slice included in the current picture while being included in the current picture.

[0217] In step 1820, the acquisition unit 1710 can acquire the QP difference value for the coding unit from the bitstream. The decoding unit 1820 can determine the QP for the luma component of the coding unit by using the QP for the luma component of the slice and the QP difference value for the coding unit. The decoding unit 1820 can perform inverse quantization on the transform coefficients included in the coding unit by using the QP for the coding unit. The residual samples of the coding unit can be decoded by performing inverse transform on the inverse quantized transform coefficients.

[0218] According to another embodiment, the acquisition unit 1710 does not acquire the QP difference value for the coding unit from the bitstream. In that case, the decoding unit 1810 can use the predicted QP prediction value for the coding unit to determine the QP for the luma component of the coding unit.

[0219] According to one embodiment, when the picture header QP difference value information indicates that there is no QP difference value information in the picture header of the current picture, the acquisition unit 1810 can acquire the second QP difference value for the luma component of the current slice from the slice header. The decoding unit 1820 can determine the QP for the luma component of the current slice by adding the QP initial value and the second QP difference value for the luma component. The decoding unit 1820 can use the QP for the luma component of the current slice to determine the QP of the coding unit included in the current slice. The decoding unit 1820 can use the QP for the coding unit to perform inverse quantization on the transform coefficients included in the coding unit. Inverse transformation is performed on the inverse quantized transform coefficients, and the residual samples of the coding unit can be decoded. When the picture header QP difference value information indicates that there is no QP difference value information in the picture header of the current picture, the acquisition unit 1810 can acquire the QP difference value for the coding unit included in the current slice from the bitstream. The decoding unit 1820 can use the QP difference value for the coding unit to determine the QP for the luma component of the current coding unit included in the current slice.

[0220] When the picture header QP difference value information indicates that there is no QP difference value information in the picture header of the current picture, the acquisition unit 1810 can acquire the Cb QP difference value for the Cb chroma component of the current slice and the Cr QP difference value for the Cr chroma component of the current slice from the slice header. The decoding unit 1820 can determine the Cb QP for the Cb chroma component of the current coded unit included in the current slice by updating the QP for the Cb chroma component of the current slice using the Cb QP difference value for the Cb chroma component of the current slice. The decoding unit 1820 can determine the Cr QP for the Cr chroma component of the current coded unit included in the current slice by updating the QP for the Cr chroma component of the current slice using the Cr QP difference value for the Cr chroma component of the current slice.

[0221] FIG. 19 illustrates a block diagram of a video encoding apparatus according to an embodiment.

[0222] Referring to FIG. 19, a video encoding apparatus 1900 according to an embodiment also includes a quantization unit 1910 and an information encoding unit 1920.

[0223] A video encoding apparatus 1900 according to an embodiment also includes a central processor (not shown) that controls the quantization unit 1910 and the information encoding unit 1920. Alternatively, the quantization unit 1910 and the information encoding unit 1920 may be operated by respective self-processors (not shown), and the video encoding apparatus 1900 can be operated as a whole by the processors (not shown) operating in an organic manner with each other. Alternatively, the quantization unit 1910 and the information encoding unit 1920 can be controlled by the control of an external processor (not shown) of the video encoding apparatus 1900.

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

[0225] For video encoding, the video encoding device 1900 can perform a video encoding operation including prediction by operating in cooperation with an internally mounted video encoding processor or an external video encoding processor. The internal video encoding processor of the video encoding device 1900 according to one embodiment can implement a basic video encoding operation not only by a separate processor but also by a central processing unit or a graphics processing unit including a video encoding processing module.

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

[0227] The video encoding device 1900 according to one embodiment can divide a picture into a plurality of maximum coding units, divide each maximum coding unit into blocks of various sizes and various forms, and perform encoding.

[0228] For example, when the prediction mode of the current block is the intra mode, the video encoding device 1900 can determine reference samples among the samples of the spatially adjacent blocks located in the intra prediction direction of the current block, and use the reference samples to determine the prediction samples of the current block. A residual sample that is the difference between the prediction sample and the sample of the current block is determined, the residual sample is transformed based on a transform block to generate transform coefficients, the transform coefficients are quantized, and quantized transform coefficients can be generated.

[0229] For example, when the current block is predicted in skip mode, the video encoding device 1900 can determine a motion vector for predicting the current block. The video encoding device 1900 can determine a reference block of the current block within the reference picture and determine a motion vector indicating the reference block from the current block. In the case of skip mode, encoding of the residual block is not necessary.

[0230] For example, when the prediction mode of the current block is inter mode, the video encoding device 1900 can determine a motion vector for predicting the current block. The video encoding device 1900 can determine a reference block of the current block within the reference picture and determine a motion vector indicating the reference block from the current block. The video encoding device 1900 can use the reference samples included in the reference block to determine the predicted samples of the current block, determine the residual samples which are the difference between the predicted samples and the samples of the current block, and generate quantized transform coefficients by performing transformation and quantization based on the transform block for the residual samples.

[0231] The current block is a block generated by being divided by a tree structure from the video and can correspond to, for example, a largest coding unit, a coding unit, or a transform unit. The video encoding device 1900 can encode the blocks included in the picture in the encoding order.

[0232] The video encoding device 1900 according to one embodiment uses a QP for quantization. The QP is set for each coding unit, and one QP can be applied to the transform coefficients included in the coding unit. The picture also includes one or more slices, and one slice also includes one or more coding units. The video encoding device 1900 can encode to signal the information necessary for determining the QP for each coding unit and determining the QP for each coding unit, each slice, or each picture.

[0233] According to one embodiment, the information encoding unit 1920 can encode the information necessary to determine the QP for each encoding unit and output it in the form of an encoding unit-related bitstream syntax. The information encoding unit 1920 can encode the information necessary to determine the QP for each slice and output it in the form of a slice header syntax. The information encoding unit 1920 can encode the information necessary to determine the QP for each picture and output it in the form of a picture header syntax.

[0234] First, the video encoding device 1900 can determine at the picture parameter set level whether to transmit the QP difference value for each picture or for each slice.

[0235] According to one embodiment, the quantization unit 1910 can determine the initial QP value applied to the current picture.

[0236] When determining the QP difference value for each picture, the information encoding unit 1920 can determine the first QP difference value between the QP used in the current picture and the initial QP value. The information encoding unit 1920 can generate a picture header related to the current picture including the first QP difference value.

[0237] When determining the QP difference value for each slice, the information encoding unit 1920 can determine the second QP difference value between the QP used in the current slice included in the current picture and the initial QP value. The information encoding unit 1920 can generate a slice header related to the current slice including the second QP difference value.

[0238] According to one embodiment, the information encoding unit 1920 can generate a picture header QP difference value information indicating whether QP difference value information exists in the picture header of the current picture, and a picture parameter set including the initial QP value.

[0239] Hereinafter, with reference to FIG. 20, the process in which the video encoding apparatus 1900 signals QP difference value information picture-by-picture or slice-by-slice will be described in detail.

[0240] FIG. 20 illustrates a flowchart of a video encoding method according to an embodiment.

[0241] In step 2010, the quantization unit 1910 can determine the QP initial value applied to the current picture.

[0242] In step 2020, when determining the QP difference value picture-by-picture, the information encoding unit 1920 can determine the first QP difference value between the QP used in the current picture and the QP initial value, and generate a picture header related to the current picture including the first QP difference value.

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

[0244] According to an embodiment, when determining the QP difference value slice-by-slice, the information encoding unit 1920 can determine the second QP difference value between the QP used in the current slice included in the current picture and the QP initial value, and generate a slice header related to the current slice including the second QP difference value.

[0245] In stage 2020, when the quantization unit 1910 determines the QP difference value for each picture, it can determine the QP for the luma component of the slice included in the current picture. The information encoding unit 1920 can utilize the difference value between the QP for the luma component of the slice included in the current picture and the QP initial value to determine the first QP difference value for the luma component of the current picture. The information encoding unit 1920 can utilize the difference value between the QP for the luma component of the coding unit and the QP for the luma component of the slice to determine the QP difference value for the coding unit. The information encoding unit 1920 can encode the QP difference value for the coding unit.

[0246] In stage 2030, when the quantization unit 1910 determines the QP difference value for each slice, it can determine the QP for the luma component of the current slice. The information encoding unit 1920 can utilize the difference value between the QP for the luma component of the current slice and the QP initial value to determine the second QP difference value for the luma component of the current slice. The information encoding unit 1920 can determine the QP difference value for the coding unit by subtracting the QP for the luma component of the current slice from the QP for the luma component of the coding unit. The information encoding unit 1920 can encode the QP difference value for the coding unit.

[0247] The quantization unit 1910 according to another embodiment can also utilize the predicted QP prediction value for the coding unit to determine the QP for the luma component of the coding unit, and use the QP to perform quantization for each coding unit. In that case, the information encoding unit 1920 does not encode the QP difference value for the coding unit.

[0248] In stage 2030, when encoding QP difference values for each slice, the information encoding unit 1920 can determine a Cb QP difference value for the Cb chroma component of the current slice to determine the QP of the encoding unit included in the current slice. Also, the information encoding unit 1920 can determine a Cr QP difference value for the Cr chroma component of the current slice to determine the QP of the encoding unit included in the current slice. The information encoding unit 1920 can encode the Cb QP difference value of the current slice and the Cr QP difference value for the Cr chroma component, and generate a slice header for the current slice including the Cb QP difference value and the Cr QP difference value.

[0249] The quantization unit 1910 can perform quantization on the transform coefficients of the encoding unit using QP, and generate quantized transform coefficients of the encoding unit. The information encoding unit 1920 can perform entropy encoding on the information related to the quantized transform coefficients, and generate a bitstream.

[0250] The video decoding apparatus 1700 according to an embodiment and the video encoding apparatus 1900 according to an embodiment can selectively signal QP difference values picture-by-picture or slice-by-slice. Therefore, the video encoding apparatus 1900 according to an embodiment determines whether to signal QP difference values picture-by-picture or slice-by-slice according to the characteristics of the data picture or the data transmission efficiency, and can signal QP difference values by a method with high transmission efficiency. The video decoding apparatus 1700 according to an embodiment determines whether to obtain QP difference values picture-by-picture or slice-by-slice based on the information obtained from the picture parameter set, and can determine QP picture-by-picture or QP slice-by-slice. Therefore, when QP difference values are signaled picture-by-picture, it is not necessary to signal QP difference values slice-by-slice included in the picture, so data for signaling QP can be reduced.

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

[0252] In the case of a conventional video codec, generally, the initial value of QP is set in a picture parameter set (PPS), and the difference value of the initial value of QP for each slice is transmitted via a slice header, and the QP is set for each slice.

[0253] On the other hand, in the video decoding apparatus 1700 according to an embodiment, for each picture, a picture header can be obtained, and information related to QP can be signaled from the picture header. In the present invention, since it is possible to select whether to signal the QP difference value for each picture or to signal the QP difference value for each slice between the video decoding apparatus 1700 and the video encoding apparatus 1900, the signaling structure of QP becomes simple.

[0254] First, in step 2100, the video decoding apparatus 1700 can obtain the initial value of QP from a picture parameter set (PPS) or a sequence parameter set (SPS) that is at a higher level than the picture header. Also, in step 2110, the video decoding apparatus 1700 can obtain picture header QP difference value (dQP) information from the picture parameter set (PPS) or the sequence parameter set (SPS). The video decoding apparatus 1700 can determine whether to determine the QP at the picture level or at the slice level based on the picture header QP difference value information.

[0255] Specifically, when the picture header QP difference value information is not 0 (for example, when the picture header QP difference value information is 1), that is, when there is a QP difference value (delta value) in the picture header, in step 2120, the video decoder 1700 can obtain the QP difference value from the picture header. The video decoder 1700 can use the QP difference value obtained from the picture header and the QP initial value obtained from the picture parameter set (PPS) or the sequence parameter set (SPS) to determine the QP for each picture.

[0256] When the picture header QP difference value information is 0, that is, when there is no QP difference value in the picture header, in step 2130, the video decoder 1700 can obtain the QP difference value from the slice header. The video decoder 1700 can use the QP difference value obtained from the slice header and the QP initial value obtained from the picture parameter set (PPS) or the sequence parameter set (SPS) to determine the QP for each slice.

[0257] For the operations of the video decoder 1700 in steps 2100 to 2130, the video encoder 1900 can determine whether to determine the QP at the picture level or the slice level. In addition, the video encoder 1900 can encode the picture header QP difference value information indicating whether to determine the QP at the picture level or at the slice level.

[0258] Specifically, when the video encoder 1900 determines the QP for each picture, it can encode the QP difference value for each picture. Therefore, the video encoder 1900 can generate the picture header of the current picture including the QP difference value of the current picture. In that case, the picture header QP difference value information can be encoded to indicate 1 so that it indicates that there is a QP difference value in the picture header of the current picture.

[0259] When the video encoding device 1900 determines the QP for each slice, the QP difference value can be encoded for each slice. Therefore, the video encoding device 1900 can generate a slice header of the current slice including the QP difference value of the current slice. In that case, the picture header QP difference value information can be encoded to indicate 0 so that the QP difference value does not exist in the picture header.

[0260] The video encoding device 1900 according to one embodiment can generate a picture parameter set (PPS) or a sequence parameter set (SPS) including an initial value of QP and picture header QP difference value information.

[0261] As described above, at the picture level, when the same QP is set for each encoding unit included in the current picture, the QP can be signaled only in the picture header, so that the amount of bits for signaling the QP can be reduced. That is, for each slice included in the current picture, without the need to signal the QP through the slice header, the QP difference value can be signaled only once in the picture header of the current picture. If the characteristics of the slices included in the current picture are different, in order to set the QP in more detail, the QP can be set separately for each slice, and the QP difference value can be signaled for each slice header for each slice.

[0262] Hereinafter, with reference to FIGS. 22 to 24, the syntax structure for signaling the picture header QP difference value information will be described in detail.

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

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

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

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

[0267] SliceQpY = 26 + pps_init_qp_minus26 + ph_qp_delta SliceQpY = 26 + pps_init_qp_minus26 + sh_qp_delta Therefore, the QP SliceQpY of the luma component of the slice can be determined within the range from -QpBdOffset to +63.

[0268] FIG. 23 illustrates a picture header including the QP difference value of the current picture according to an embodiment.

[0269] Video encoding device 1900 can include syntax element ph_qp_delta 2320 in picture header syntax 2300. Syntax element ph_qp_delta 2320 can indicate the QP difference value applicable to the current picture. Specifically, when pps_qp_delta_info_in_ph_flag 2220 included in the previous picture parameter set syntax 2200 indicates 1 (2310), syntax element ph_qp_delta 2320 can be included in picture header syntax 2300.

[0270] Video decoding device 1700 can obtain syntax element ph_qp_delta 2320 from picture header syntax 2300. Specifically, when pps_qp_delta_info_in_ph_flag 2220 obtained from the previous picture parameter set syntax 2200 indicates 1 (2310), syntax element ph_qp_delta 2320 can be obtained from picture header syntax 2300. In that case, for the current picture corresponding to picture header syntax 2300, the QP of the picture can be determined by adding syntax element pps_init_qp_minus26 2210 and ph_qp_delta 2320. For all encoding units included in the current picture, the QP of the picture can be applied. When the QP difference value of the encoding unit is obtained from the syntax structure corresponding to each encoding unit, the QP of the encoding unit can be determined by adding the QP difference value of the encoding unit and the QP of the picture. Video decoding device 1700 can use the QP determined for each encoding unit to perform inverse quantization on the transformed samples of the encoding unit.

[0271] FIG. 24 illustrates a slice header including the QP difference value of the current slice according to an embodiment.

[0272] The video encoding device 1900 can include the syntax element sh_qp_delta 2420 in the slice header syntax 2400. The syntax element sh_qp_delta 2420 can indicate the QP difference value of the luma component applicable to the current slice. Specifically, when pps_qp_delta_info_in_ph_flag 2220 included in the previous picture parameter set syntax 2200 indicates 0 (2410), the syntax element sh_qp_delta 2420 can be included in the slice header syntax 2400. Also, the video encoding device 1900 can include the syntax elements sh_cb_qp_offset and sh_cr_qp_offset 2430 in the slice header syntax 2400. The syntax elements sh_cb_qp_offset and sh_cr_qp_offset 2430 indicate the QP difference value of the chroma Cb component and the QP difference value of the chroma Cr component, respectively.

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

[0274] Also, the video decoder 1700 can parse the syntax elements sh_cb_qp_offset and sh_cr_qp_offset 2430 from the slice header syntax 2400. From the syntax elements sh_cb_qp_offset and sh_cr_qp_offset 2430, the QP difference value of the chroma Cb component and the QP difference value of the chroma Cr component can be obtained respectively. Therefore, the video decoder 1700 can use the QP difference value of the chroma Cb component to determine the QP for the chroma Cb component of the coding unit included in the current slice, and use the QP difference value of the chroma Cr component to determine the QP for the chroma Cr component of the coding unit included in the current slice. The video decoder 1700 can use the QP determined for each coding unit to perform inverse quantization on the transformed samples of the coding unit.

[0275] sh_cb_qp_offset and sh_cr_qp_offset 2430 are also values in the range from -12 to 12 respectively.

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

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

[0278] As another example, when signaling the POC (picture order counter), the POC information can be included only in the picture header that is not the slice header. In such a case, it becomes difficult to confirm which picture a specific slice belongs to. However, by using time stamps, sequence numbers, etc. signaled at the system level, it is possible to confirm the index of the picture to which the slice belongs. Also, it can be determined by being notified from an external system of the codec that information of a specific slice or picture header has been lost.

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

[0280] Hereinafter, with reference to FIGS. 25 to 32, a syntax structure for selectively signaling parameters available for various tools at the picture level or slice level will be described in detail. Through the flag signaled in the picture sequence set, it can be determined whether the tool-related parameters are signaled in the picture header or in the slice header.

[0281] FIG. 25 illustrates a picture parameter set including information indicating whether a deblocking filter related parameter is included in a picture header according to an embodiment.

[0282] Video encoder 1900 can include pps_dbf_info_in_ph_flag 2510 in picture parameter set syntax 2500. Syntax element pps_dbf_info_in_ph_flag 2510 can indicate whether a deblocking filter filtering related parameter difference value for the current picture exists in the picture header of the current picture.

[0283] Video decoder 1700 can parse pps_dbf_info_in_ph_flag 2510 from picture parameter set syntax 2500. Video decoder 1700 can check from syntax element pps_dbf_info_in_ph_flag 2510 whether a deblocking filter related parameter for the current picture exists in the current picture header.

[0284] FIG. 26 illustrates a picture header including deblocking filter related parameters of a current picture according to an embodiment.

[0285] Video encoding device 1900 can include syntax elements ph_luma_beta_offset_div2, ph_luma_tc_offset_div2, ph_cb_beta_offset_div2, ph_cb_tc_offset_div2, ph_cr_beta_offset_div2, ph_cr_tc_offset_div2 2620 in picture header syntax 2600. Specifically, when pps_dbf_info_in_ph_flag 2510 included in the previous picture parameter set (PPS) 2500 indicates 1 (2610), syntax elements ph_luma_beta_offset_div2, ph_luma_tc_offset_div2, ph_cb_beta_offset_div2, ph_cb_tc_offset_div2, ph_cr_beta_offset_div2, ph_cr_tc_offset_div2 2620 can be included in picture header syntax 2600.

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

[0287] The syntax element ph_luma_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the luma component of a slice in the current picture. The syntax element ph_luma_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to the luma component of a slice in the current picture. The syntax element ph_cb_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the Cb component of a slice in the current picture. The syntax element ph_cb_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to the Cb component of a slice in the current picture. The syntax element ph_cr_beta_offset_div2 may indicate an offset for the deblocking parameter β applied to the Cr component of a slice in the current picture. The syntax element ph_cr_tC_offset_div2 may indicate an offset for the deblocking parameter tC applied to the Cr component of a slice in the current picture. The video decoder 1700 can perform deblocking filtering on the boundaries of the coded units included in the current picture by using the deblocking filtering related parameters obtained from the picture header.

[0288] Figure 27 illustrates a slice header including deblocking filter related parameters of the current slice according to an embodiment.

[0289] Video encoding device 1900 can include syntax elements sh_luma_beta_offset_div2, sh_luma_tc_offset_div2, sh_cb_beta_offset_div2, sh_cb_tc_offset_div2, sh_cr_beta_offset_div2, sh_cr_tc_offset_div2 2720 in slice header syntax 2700. Specifically, when pps_dbf_info_in_ph_flag 2510 included in the previous picture parameter set (PPS) 2500 indicates 0 (2710), syntax elements sh_luma_beta_offset_div2, sh_luma_tc_offset_div2, sh_cb_beta_offset_div2, sh_cb_tc_offset_div2, sh_cr_beta_offset_div2, sh_cr_tc_offset_div2 2720 can be included in slice header syntax 2700.

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

[0291] 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 decoder 1700 can perform deblocking filtering on the boundaries of the coding units included in the current slice by using the deblocking filtering related parameters obtained from the slice header.

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

[0293] Video encoding device 1900 can include pps_rpl_info_in_ph_flag 2810, pps_sao_info_in_ph_flag 2820, pps_alf_info_in_ph_flag 2830, and pps_wp_info_in_ph_flag 2840 in picture parameter set syntax 2800. Syntax element pps_rpl_info_in_ph_flag 2810 can indicate whether reference picture list related parameters for the current picture exist in the picture header of the current picture. Syntax element pps_sao_info_in_ph_flag 2820 can indicate whether SAO (sample adaptive offset) related parameters for the current picture exist in the picture header of the current picture. Syntax element pps_alf_info_in_ph_flag 2830 can indicate whether ALF (adaptive loop filtering) related parameters for the current picture exist in the picture header of the current picture. Syntax element pps_wp_info_in_ph_flag 2840 can indicate whether weighted prediction related parameters for the current picture exist in the picture header of the current picture.

[0294] Video decoder 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 picture parameter set syntax 2800. Video decoder 1700 can check, from syntax element pps_rpl_info_in_ph_flag 2810, whether there are reference picture list related parameters for the current picture in the picture header of the current picture. Video decoder 1700 can check, from syntax element pps_sao_info_in_ph_flag 2820, whether there are SAO related parameters for the current picture in the picture header of the current picture. Video decoder 1700 can check, from syntax element pps_alf_info_in_ph_flag 2830, whether there are ALF related parameters for the current picture in the picture header of the current picture. Video decoder 1700 can check, from syntax element pps_wp_info_in_ph_flag 2840, whether there are weighted prediction related parameters for the current picture in the picture header of the current picture.

[0295] Figure 29 illustrates a picture header including weighted prediction related parameters, SAO related parameters, and reference picture list related parameters for a current picture according to an embodiment.

[0296] The video encoding device 1900 can include the weighted value prediction syntax pred_weight_table() 2920 in the picture header syntax 2900. Specifically, when pps_wp_info_in_ph_flag 2840 included in the previous picture parameter set (PPS) 2800 indicates 1 (2910), the weighted value prediction syntax pred_weight_table() 2920 can be included in the picture header syntax 2900.

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

[0298] The video decoding device 1700 can obtain the parameters for determining the weighted values of the luma components and the weighted values of the chroma components necessary for performing weighted value prediction from the weighted value prediction syntax pred_weight_table() 2920. For each block included in the current picture, the video decoding device 1700 can perform weighted value prediction using the weighted values of the luma components and the weighted values of the chroma components.

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

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

[0301] The video decoding device 1700 can confirm whether SAO is to be performed for the luma component of the current picture from the syntax element ph_sao_luma_enabled_flag. The video decoding device 1700 can confirm whether SAO is to be performed for the chroma component of the current picture from the syntax element ph_sao_chroma_enabled_flag. The video decoding device 1700 can perform SAO for the luma component and the chroma component of the maximum coding unit included in the current picture, respectively, based on the syntax elements ph_sao_luma_enabled_flag and ph_sao_chroma_enabled_flag 2940.

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

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

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

[0305] FIG. 30 illustrates a picture header including the ALF-related parameters of the current picture according to an embodiment.

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

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

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

[0309] The video decoder 1700 can perform ALF on the luma component and the chroma component for 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, ph_alf_cc_cr_aps_id 3020.

[0310] FIG. 31 illustrates a slice header including reference picture list related parameters, weighted value prediction related parameters, and SAO related parameters according to an embodiment.

[0311] The video encoder 1900 can include the reference picture list syntax ref_pic_lists() 3120 in the slice header syntax 3100. Specifically, when pps_rpl_info_in_ph_flag 2810 included in the previous picture parameter set (PPS) 2800 indicates 0 (3110), the reference picture list syntax ref_pic_lists() 3120 can be included in the slice header syntax 3100.

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

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

[0314] The video encoder 1900 can include the weighted prediction syntax pred_weight_table() 3140 in the slice header syntax 3100. Specifically, when pps_wp_info_in_ph_flag 2840 included in the previous picture parameter set (PPS) 2800 indicates 0 (3130), the weighted prediction syntax pred_weight_table() 3140 can be included in the slice header syntax 3100.

[0315] The video decoder 1700 can call the weighted prediction syntax pred_weight_table() 3140 from the slice header syntax 3100. Specifically, when pps_wp_info_in_ph_flag 2840 included in the previous picture parameter set (PPS) 2800 indicates 0 (3130), the weighted prediction syntax pred_weight_table() 3140 can be called from the slice header syntax 3100.

[0316] The video decoder 1700 can obtain parameters for determining the weighted values of the luma components and the weighted values of the chroma components necessary for performing weighted prediction from the weighted prediction syntax pred_weight_table() 3140. The video decoder 1700 can perform weighted prediction for the blocks included in the current slice using the weighted values of the luma components and the weighted values of the chroma components.

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

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

[0319] The video decoding device 1700 can confirm whether SAO is used for the luma component of the current slice from the syntax element sh_sao_luma_used_flag. The video decoding device 1700 can confirm whether SAO is used for the chroma component of the current slice from the syntax element sh_sao_chroma_used_flag. The video decoding device 1700 can perform SAO for the luma component and the chroma component of the maximum coding unit included in the current slice, respectively, based on the syntax elements sh_sao_luma_used_flag and sh_sao_chroma_used_flag 3160.

[0320] FIG. 32 illustrates a slice header including ALF-related parameters of the current slice according to an embodiment.

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

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

[0323] The syntax element sh_num_alf_aps_ids_luma indicates the number of ALF APSs that the current slice refers to. The syntax element sh_alf_aps_id_luma[i] indicates the aps_adaptation_parameter_set_id of the i-th ALF APS that the luma component of the current slice refers to. The syntax element sh_alf_cb_enabled_flag indicates whether ALF is allowed for the Cb component of the current slice. The syntax element sh_alf_cr_enabled_flag indicates whether ALF is allowed for the Cr component of the current slice. The syntax element sh_alf_aps_id_chroma indicates the aps_adaptation_parameter_set_id of the ALF APS that the chroma component of the current slice refers to. The syntax element sh_alf_cc_cb_enabled_flag indicates whether cross-component ALF is allowed for the Cb component of the current slice. The syntax element sh_alf_cc_cb_aps_id indicates the aps_adaptation_parameter_set_id of the ALF APS that the Cb component of the current slice refers to. 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 that the Cr component of the current slice refers to.

[0324] The video decoder 1700 can perform ALF for the luma component and the chroma component for 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, sh_alf_cc_cr_aps_id 3220.

[0325] The video decoder 1700 according to an embodiment and the video encoder 1900 according to an embodiment can selectively signal deblocking filtering related parameters, reference picture list related parameters, weighted prediction related parameters, SAO related parameters, and ALF related parameters for each picture or for each slice. Therefore, the video encoder 1900 according to an embodiment determines whether to signal the tool-specific related parameters for each picture or for each slice according to the characteristics of the data picture or the data transmission efficiency, and can signal the tool-specific related parameters by a method with high transmission efficiency. The video decoder 1700 according to an embodiment determines whether to obtain the tool-specific related parameters for each picture or for each slice based on the information obtained from the picture parameter set, and can obtain the tool-specific related parameters for each picture or for each slice. Therefore, when the tool-specific related parameters are signaled for each picture, it is not necessary to signal the tool-specific related parameters for each slice included in the picture, so that the data for signaling the tool-specific related parameters can be reduced.

[0326] Incidentally, the above-described embodiments of the present disclosure can be created as a program executable by a computer, and the created program is also stored in a medium.

[0327] The medium continuously stores a program executable by a computer, or temporarily stores it for execution or download. The medium is also various recording or storage means in a form in which one or several pieces of hardware are combined, but is not limited to a medium directly connected to a certain computer system, and is also distributed on a network. Examples of the medium include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROM (compact disc read-only memory) and DVD (digital versatile disc); magneto-optical media such as floptical disks; and those including ROM (read-only memory), RAM (random access memory), flash memory, etc., and configured to store program instruction words. A recording medium readable by a device is also provided in the form of a non-transitory recording medium. Here, the "non-transitory recording medium" is only a tangible device and does not include signals (e.g., electromagnetic waves), and this term does not distinguish between the case where data is semi-permanently stored in the recording medium and the case where it is temporarily stored. As an example, the "non-transitory recording medium" also includes a buffer in which data is temporarily stored.

[0328] Also, as examples of other media, an app store that distributes applications, and recording media or storage recording media managed by sites, servers, etc. that supply and distribute various other software can also be mentioned.

[0329] According to one embodiment, the methods according to the various embodiments disclosed in this document are also included in or provided as a computer program product. The computer program product can be traded as a commodity between a seller and a purchaser. The computer program product is distributed in the form of a machine-readable recording medium (e.g., CD-ROM), or via an application store (e.g., Play StoreTM), or can also be distributed directly online (e.g., downloaded or uploaded) between two user devices (e.g., smartphones). In the case of online distribution, at least a part of the computer program product (e.g., a downloadable app) can be at least temporarily stored or temporarily generated in a machine-readable recording medium such as the memory of a manufacturer's server, an application store's server, or a relay server.

[0330] As described above, the technical idea of the present disclosure has been described in detail with preferred embodiments. However, the technical idea of the present disclosure is not limited to the foregoing embodiments, and various modifications and changes can be made by those skilled in the art within the scope of the technical idea of the present disclosure.

Claims

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

2. A video encoding device, comprising: an encoding unit that performs quantization on transform coefficients of a current picture; a bitstream generation unit that encodes an initial value of a quantization parameter (QP) applied to the current picture, encodes a QP difference value flag indicating whether a QP difference value exists in a picture header of the current picture, and generates a picture parameter set including the QP initial value and the QP difference value flag; When the QP difference value flag is encoded to indicate that the QP difference value does not exist in the picture header, the encoding unit performs quantization on the transform coefficients included in the current slice using a first QP for the current slice included in the current picture, and the bitstream generation unit encodes a first QP difference value between the first QP of the current slice included in the current picture and the QP initial value, and generates a slice header including the first QP difference value for the current slice, When the QP difference value flag is encoded to indicate that a QP difference value exists in the picture header of the current picture, the encoding unit performs quantization on the transform coefficients included in at least one slice using a second QP for at least one slice included in the current picture, and the bitstream generation unit does not encode the QP difference value set for each of the at least one slice, encodes a second QP difference value between the second QP and the QP initial value, and generates a picture header for the current picture including the second QP difference value, When the QP difference value flag is encoded to indicate that a QP difference value exists in the picture header of the current picture, the encoding unit performs quantization on the transform coefficients included in the coding unit using a coding unit QP for the coding unit included in the at least one slice, and the bitstream generation unit encodes a coding unit QP difference value between the coding unit QP and the second QP, A video encoding device, characterized in that.

3. A computer-readable recording medium on which a bitstream generated by a video encoding method is recorded, wherein the bitstream includes a picture parameter set including a QP (Quantization Parameter) initial value applied to a current picture and a QP difference value flag indicating whether a QP difference value exists in the picture header of the current picture, When the QP difference value flag is encoded to indicate that no QP difference value exists in the picture header, quantization is performed on the transform coefficients included in the current slice using a first QP for the current slice included in the current picture, a first QP difference value between the first QP of the current slice included in the current picture and the QP initial value is encoded, and a slice header including the first QP difference value for the current slice is generated. When the QP difference value flag is encoded to indicate that a QP difference value exists in the picture header of the current picture, quantization is performed on the transform coefficients included in at least one slice using a second QP for at least one slice included in the current picture, the QP difference value set for each of the at least one slice is not encoded, a second QP difference value between the second QP and the QP initial value is encoded, and a picture header for the current picture including the second QP difference value is generated. When the QP difference value flag is encoded to indicate that a QP difference value exists in the picture header of the current picture, quantization is performed on the transform coefficients included in the coding unit using a coding unit QP for the coding unit included in the at least one slice, and a coding unit QP difference value between the coding unit QP and the second QP is encoded. A recording medium, characterized by the above.

Citation Information

Patent Citations

  • Image processing apparatus, image processing method, program and recording medium

    JP2014195319A