Encoding method and device thereof, and decoding method and device thereof

Inter prediction in UMVE mode addresses bandwidth limitations in video transmission by optimizing motion vector correction for improved coding efficiency and compression.

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

Patent Information

Application Number
JP2025136066
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-02-28
Filing Date
2025-08-19
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

High-quality video transmission is limited by bandwidth constraints, necessitating improved video encoding and decoding methods that enhance compression rates while minimizing image quality degradation.

Method used

The implementation of inter prediction in an ultimate motion vector expression (UMVE) mode, which includes determining whether UMVE mode is allowed for a data unit, applying it to a current block, correcting a base motion vector, and restoring the block based on the corrected motion vector.

Benefits of technology

This approach improves coding efficiency by optimizing motion vector prediction, thereby enhancing video compression and reducing data transmission requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025159150000001_ABST
    Figure 2025159150000001_ABST
Patent Text Reader

Abstract

To provide a video decoding method.SOLUTION: A video decoding method includes: determining whether a UMVE mode is allowed for an upper data unit including a current block; when the UMVE mode is allowed for the upper data unit, determining whether the UMVE mode is applied to the current block; when the UMVE mode is applied to the current block, determining a base motion vector of the current block; determining a correction distance and a correction direction for correction of the base motion vector; determining a motion vector of the current block by correcting the base motion vector according to the correction distance and the correction direction; and reconstructing the current block on the basis of the motion vector of the current block.SELECTED DRAWING: Figure 28
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to video encoding and decoding methods, and more particularly to methods for efficiently encoding and decoding information related to motion vectors. [Background technology]

[0002] High-quality video requires a large amount of data during encoding. However, the bandwidth allowed for transmitting video data is limited, which restricts the data rate applied during video data transmission. Therefore, for efficient video data transmission, a video data encoding and decoding method that increases the compression rate while minimizing degradation of image quality is needed.

[0003] Video data is also compressed by removing spatial and temporal redundancy between pixels. Because adjacent pixels typically have common characteristics, coding information is transmitted in pixel data units to remove the redundancy between adjacent pixels.

[0004] The pixel values ​​of pixels included in a data unit are not directly transmitted, but a method required to obtain the pixel values ​​is transmitted. A prediction method for predicting pixel values ​​similar to original values ​​is determined for each data unit, and coding information related to the prediction method is transmitted from the encoder to the decoder. In addition, since the predicted value is not exactly the same as the original value, residual data related to the difference between the original value and the predicted value is transmitted from the encoder to the decoder.

[0005] As prediction accuracy increases, the coding information required to identify a prediction method increases, but the size of residual data decreases. Therefore, a prediction method is determined taking into account the sizes of the coding information and residual data. In particular, data units divided into pictures have various sizes, and as the data unit becomes larger, the accuracy of prediction is likely to decrease, but the coding information is reduced. Therefore, the block size is determined to suit the picture characteristics.

[0006] Prediction methods include intra-prediction and inter-prediction. Intra-prediction is a method of predicting pixels of a block from pixels surrounding the block. Inter-prediction is a method of predicting pixels by referencing pixels of other pictures referenced by the picture containing the block. Thus, intra-prediction eliminates spatial redundancy, and inter-prediction eliminates temporal redundancy.

[0007] As the number of prediction methods increases, the amount of coding information required to indicate the prediction methods also increases. Therefore, the coding information applied to a block can also be predicted from other blocks to reduce the size of the coding information.

[0008] Although video data loss is permitted to a degree that cannot be perceived by human vision, the residual data can be lossy compressed through conversion and quantization processes to reduce the amount of residual data. Summary of the Invention [Problem to be solved by the invention]

[0009] A video encoding method and a video encoding device that perform inter prediction in an ultimate motion vector expression (UMVE) mode are disclosed. Also, a video decoding method and a video decoding device that perform inter prediction in the UMVE mode are disclosed. Also, a computer-readable recording medium having recorded thereon a program for causing a computer to execute the video encoding method and the video decoding method according to an embodiment of the present disclosure is disclosed. [Means for solving the problem]

[0010] In the present disclosure, a video decoding method is provided, including a step of determining whether UMVE mode is allowed for an upper data unit including a current block, a step of determining whether UMVE mode is applied to the current block if UMVE mode is allowed for the upper data unit, a step of determining a base motion vector of the current block if UMVE mode is applied to the current block, a step of determining a correction size and correction direction for correcting the base motion vector, a step of correcting the base motion vector according to the correction size and the correction direction and determining a motion vector of the current block, and a step of restoring the current block based on the motion vector of the current block.

[0011] In the present disclosure, a video decoding device is provided that includes a processor that determines whether UMVE mode is allowed for an upper data unit including a current block, and if UMVE mode is allowed for the upper data unit, determines whether UMVE mode is applied to the current block, and if UMVE mode is applied to the current block, determines a base motion vector of the current block, determines a correction size and correction direction for correcting the base motion vector, corrects the base motion vector based on the correction size and the correction direction, determines a motion vector of the current block, and reconstructs the current block based on the motion vector of the current block.

[0012] A video encoding method is provided, including a step of determining whether UMVE mode is allowed for an upper data unit including a current block; a step of determining a motion vector for the current block; if UMVE mode is allowed for the upper data unit, a step of determining whether UMVE mode is applied to the current block based on the motion vector; a step of determining a base motion vector for the current block based on the motion vector, and a correction size and correction direction for correcting the base motion vector; and a step of outputting a bitstream including information related to the UMVE mode of the current block.

[0013] A video encoding device is provided that includes a processor that determines whether UMVE mode is allowed for an upper data unit including a current block, determines a motion vector for the current block, and if UMVE mode is allowed for the upper data unit, determines whether UMVE mode is applied to the current block based on the motion vector, determines a base motion vector of the current block and a correction size and correction direction for correcting the base motion vector based on the motion vector, and outputs a bitstream including coding information according to the UMVE mode of the current block.

[0014] A computer-recordable recording medium is provided, on which a program for performing the video encoding method and the video decoding method is recorded.

[0015] The technical problems to be solved by this embodiment are not limited to those described above, and other technical problems can be inferred from the following embodiments. [Effects of the Invention]

[0016] By performing inter-prediction on blocks included in a video using the UMVE mode, the coding rate of the video can be improved. [Brief explanation of the drawings]

[0017] [Figure 1A] 1 is a block diagram of a video encoding device based on a coding unit with a tree structure according to an embodiment of the present disclosure. [Figure 1B] 1 is a block diagram of a video decoding device based on a coding unit with a tree structure according to an embodiment; [Figure 2] 10 is a diagram illustrating a process of dividing a current coding unit and determining at least one coding unit according to an embodiment. [Figure 3] 10A and 10B are diagrams illustrating a process in which a non-square coding unit is divided and at least one coding unit is determined according to one embodiment. [Figure 4] 10 is a diagram illustrating a process of dividing a coding unit based on at least one of block shape information and division shape information according to an embodiment; [Figure 5] 10 is a diagram illustrating a method for determining a predetermined coding unit among an odd number of coding units according to one embodiment. [Figure 6] 10 is a diagram illustrating an order in which a plurality of coding units are processed when a current coding unit is divided and a plurality of coding units are determined, according to an embodiment; [Figure 7] 10 is a diagram illustrating a process of determining that a current coding unit is divided into an odd number of coding units when coding units cannot be processed in a predetermined order, according to one embodiment. [Figure 8] 1 is a diagram illustrating a process in which a first coding unit is divided and at least one coding unit is determined, according to one embodiment. [Figure 9] FIG. 10 is a diagram illustrating that, according to one embodiment, when a non-square second coding unit determined by dividing a first coding unit satisfies a predetermined condition, the manner in which the second coding unit can be divided is restricted. [Figure 10] 10 is a diagram illustrating a process of dividing a square-shaped coding unit when division form information does not indicate division into four square-shaped coding units, according to one embodiment. [Figure 11] 10 is a diagram illustrating that the processing order of a plurality of coding units may vary depending on the division process of the coding units, according to an embodiment. [Figure 12] 10 is a diagram illustrating a process of determining the depth of a coding unit according to one embodiment when a coding unit is recursively divided to determine multiple coding units, as the shape and size of the coding unit change. [Figure 13] 10 is a diagram illustrating a depth determined depending on the type and size of a coding unit and an index (PID: part index) for a coding unit partition according to an embodiment. [Figure 14]10 is a diagram illustrating a plurality of coding units being determined based on a plurality of predetermined data units included in a picture according to an embodiment; [Figure 15] 1 is a diagram illustrating processing blocks that determine the order in which reference coding units included in a picture are determined, according to one embodiment. [Figure 16] FIG. 10 is a diagram illustrating an inter prediction method in UMVE mode. [Figure 17] FIG. 1 is a block diagram of a video decoding device that performs decoding in UMVE mode. [Figure 18] 10 is a diagram illustrating UMVE mode motion vector candidates having a diamond-shaped distribution based on a base motion vector. [Figure 19] 10 is a diagram illustrating UMVE mode motion vector candidates having a rectangular distribution based on a base motion vector. [Figure 20] 1 illustrates an embodiment of a UMVE mode having a different number of motion vector candidates for each group. [Figure 21] 10 is a diagram illustrating an example of a UMVE mode in which the distribution pattern of motion vector candidates differs for each group. [Figure 22] FIG. 1 is a diagram illustrating an embodiment of a method for correcting two basic motion vectors by bi-prediction. [Figure 23] 10 is a diagram illustrating a method for selecting an inter mode tool for a current block in skip mode. [Figure 24] When the slice type of the current slice including the current block is P type, a method for selecting an inter-mode tool of the current block in direct mode is disclosed. [Figure 25] When the slice type of the current slice including the current block is type B, a method for selecting an inter-mode tool of the current block in direct mode is disclosed. [Figure 26] 1 is a flowchart of a decoding method according to one embodiment of the UMVE mode. [Figure 27]1 is a block diagram of a video encoder with inter prediction according to one embodiment of the UMVE mode; [Figure 28] 1 is a flowchart of an encoding method according to an embodiment of the UMVE mode. DETAILED DESCRIPTION OF THE INVENTION

[0018] A video decoding method is provided, including: determining whether an ultimate motion vector expression (UMVE) mode is allowed for an upper data unit including a current block; if the UMVE mode is allowed for the upper data unit, determining whether the UMVE mode is applied to the current block; if the UMVE mode is applied to the current block, determining a base motion vector of the current block; determining a correction size and a correction direction for correcting the base motion vector; correcting the base motion vector according to the correction size and the correction direction and determining a motion vector of the current block; and restoring the current block based on the motion vector of the current block.

[0019] The features of the disclosed embodiments and methods for achieving them will become clearer with reference to the following embodiments, taken in conjunction with the accompanying drawings. However, the present disclosure is not limited to the embodiments disclosed below, and may be embodied in various different forms. The present embodiments are provided solely for the purpose of completing the disclosure and fully conveying the scope of the invention to those skilled in the art to which the present disclosure pertains.

[0020] The terms used in this specification will be briefly explained, and the disclosed embodiments will be specifically described.

[0021] The terms used in this specification are currently commonly used and general terms that have been selected as much as possible while taking into consideration the function of the present disclosure. However, these terms may vary depending on the intentions of engineers in the relevant field, precedents, or the emergence of new technologies. In addition, in certain cases, the applicant may have arbitrarily selected terms, and in such cases, their meanings will be described in detail in the description of the invention. Therefore, the terms used in this disclosure must be defined based on the meanings of the terms and the overall content of the present disclosure, rather than simply by the names of the terms.

[0022] In this specification, the singular expression includes the plural expression unless the context clearly dictates otherwise.

[0023] Throughout the specification, when a part "comprises" a certain component, it does not mean that it excludes other components and may further include other components, unless specifically stated to the contrary. Furthermore, the term "module" used in the specification refers to software or a hardware component such as an FPGA or ASIC, and a "module" performs a certain function. However, "module" is not limited to software or hardware. A "module" may also be configured to reside on an addressable recording medium or to execute one or more processors. Thus, by way of example, "module" includes components such as software components, object-oriented software components, class components, and task components; as well as processes, functions, attributes, procedures, subroutines, program code segments, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables. Components and functions provided in "modules" may be combined into fewer components and "modules," or may be further separated into additional components and "modules."

[0024] The term "current block" refers to one of a coding unit, a prediction unit, and a transform unit that is currently being coded or decoded. For convenience of explanation, when it is necessary to distinguish between other types of blocks such as a prediction unit and a transform unit, the terms "current coding block," "current prediction block," and "current transform block" may also be used. Furthermore, a "lower block" refers to a data unit separated from the "current block." And, a "higher block" refers to a data unit including the "current block."

[0025] Hereinafter, a "sample" refers to data assigned to a sampling position in an image and subject to processing. For example, in a spatial domain image, a pixel value and a transform coefficient in the transform domain are also samples. A unit including at least one such sample can be defined as a block.

[0026] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present disclosure. In the drawings, portions that are not relevant to the description will be omitted in order to clearly explain the present disclosure.

[0027] FIG. 1A illustrates a block diagram of a video coding device 100 based on a tree-structured coding unit, according to one embodiment of the present disclosure.

[0028] The video encoding device 100 includes an encoding unit 110 and a bitstream generation unit 120 .

[0029] The encoding unit 110 divides a picture or a slice included in a picture into a plurality of maximum coding units according to the size of the maximum coding unit. The maximum coding unit is a data unit having a size such as 32x32, 64x64, 128x128, or 256x256, and is also a square data unit whose vertical and horizontal dimensions are a power of 2. The encoding unit 110 may provide maximum coding unit size information indicating the size of the maximum coding unit to the bitstream generation unit 120. Then, the bitstream generation unit 120 may include the maximum coding unit size information in the bitstream.

[0030] The encoding unit 110 divides the maximum coding unit to determine the coding unit. Whether to divide the coding unit is determined based on whether the division of the coding unit is efficient through rate-distortion optimization. Then, division information indicating whether the coding unit is divided is generated. The division information may also be expressed in the form of a flag.

[0031] Coding units can also be divided in various ways. For example, a square coding unit can be divided into four square coding units with half the width and half the height. A square coding unit can also be divided into two rectangular coding units with half the width. A square coding unit can also be divided into two rectangular coding units with half the height. A square coding unit can also be divided into three coding units by dividing the width or height 1:2:1.

[0032] A rectangular coding unit whose width is twice its height is also split into two square coding units. A rectangular coding unit whose width is twice its height is also split into two rectangular coding units whose width is four times its height. A rectangular coding unit whose width is twice its height is also split into two rectangular coding units and one square coding unit by splitting the width 1:2:1.

[0033] Similarly, a rectangular coding unit whose height is twice its width is also split into two square coding units. A rectangular coding unit whose height is twice its width is also split into two rectangular coding units whose height is four times its width. Similarly, a rectangular coding unit whose height is twice its width is also split into two rectangular coding units and one square coding unit by splitting the height 1:2:1.

[0034] When two or more partitioning methods are available in the video encoding device 100, information regarding a partitioning method that can be used for a coding unit among the partitioning methods available in the video encoding device 100 is also determined for each picture. Thus, it is also determined that only a specific partitioning method is used for each picture. If the video encoding device 100 uses only one partitioning method, information regarding a partitioning method that can be used for a coding unit is not separately determined.

[0035] For coding units of a specific size, the coding unit is also divided according to a specific division method. For example, if the coding unit size is 256x265, the coding unit is also set to be divided into only four square coding units with half the width and height.

[0036] When the partition information of a coding unit indicates that the coding unit is partitioned, partition type information indicating a partitioning method for the coding unit is also generated. If there is only one partitioning method that can be used in the picture to which the coding unit belongs, partition type information is not generated. If the partitioning method is determined adaptively based on the coding information surrounding the coding unit, partition type information is not generated.

[0037] As described above, video data of a current picture is divided into maximum coding units according to the maximum size of the coding unit. The maximum coding unit may include coding units hierarchically divided from the maximum coding unit. The type and location of the lower coding units may be determined according to the division type of the upper coding unit. A minimum size of the coding unit that limits the division of the coding units may also be preset.

[0038] The encoding unit 110 compares the coding efficiency when the coding unit is hierarchically divided with the coding efficiency when the coding unit is not divided. Then, the encoding unit 110 determines whether to divide the coding unit based on the comparison result. If it is determined that dividing the coding unit is more efficient, the encoding unit 110 divides the coding unit hierarchically. If it is determined that not dividing the coding unit is more efficient based on the comparison result, the encoding unit 110 does not divide the coding unit. Whether to divide a coding unit is determined independently of whether other adjacent coding units are divided.

[0039] The final divided coding units are predicted by intra prediction or inter prediction. Intra prediction is a method of predicting samples of the prediction unit using reference samples around the prediction unit. Inter prediction is a method of predicting samples of the prediction unit using reference samples obtained from a reference picture referenced by the current picture.

[0040] For intra prediction, the encoding unit 110 may apply a plurality of intra prediction methods to a prediction unit and select the most efficient intra prediction method, which may include a DC mode, a planar mode, and directional modes such as a vertical mode and a horizontal mode.

[0041] The intra prediction is also performed for each prediction unit when a reconstructed sample around the coding unit is used as a reference sample. However, when a reconstructed sample within the coding unit is used as a reference sample, the reconstruction of the reference sample within the coding unit must take precedence over prediction, so the prediction order of the prediction unit belongs to the transformation order of the transform unit. Therefore, when a reconstructed sample within the coding unit is used as a reference sample, only the intra prediction method for the transform unit corresponding to the prediction unit is determined for the prediction unit, and substantial intra prediction is also performed for each transform unit.

[0042] The encoding unit 110 may select the most efficient inter prediction method by determining an optimal motion vector and reference picture. For inter prediction, the coding unit determination unit 120 may determine a plurality of motion vector candidates from coding units spatially and temporally adjacent to the current coding unit, and determine the most efficient motion vector among them as a motion vector. Similarly, the coding unit may determine a plurality of reference picture candidates from coding units spatially and temporally adjacent to the current coding unit, and determine the most efficient reference picture among them. According to an embodiment, the reference picture may also be determined from a reference picture list previously determined for the current picture. According to an embodiment, for prediction accuracy, the most efficient motion vector among the plurality of motion vector candidates may be determined as a predicted motion vector, and the predicted motion vector may be corrected to determine a motion vector. Inter prediction may also be performed in parallel for each prediction unit within a coding unit.

[0043] The encoder 110 can restore a coding unit by using a skip mode, which omits all coding information including a residual signal except for information indicating a motion vector and a reference picture. Because the residual signal is omitted, the skip mode can be used when prediction accuracy is very high.

[0044] The partition modes used may be limited depending on the prediction method for the prediction unit. For example, only partition modes related to prediction units of 2Nx2N and NxN sizes are applied to intra prediction, while partition modes related to prediction units of 2Nx2N, 2NxN, Nx2N, and NxN sizes are applied to inter prediction. Also, only partition modes related to prediction units of 2Nx2N size are applied to the skip mode of inter prediction. In the video encoding device 100, the partition modes allowed for each prediction method may also be changed depending on the encoding efficiency.

[0045] The video encoding device 100 may perform transformation based on a coding unit. The video encoding device 100 may transform residual data, which is a difference between an original value and a predicted value of a pixel included in a coding unit, through a predetermined process. For example, the video encoding device 100 may perform lossy compression on the residual data through quantization and DCT / DST transformation. Alternatively, the video encoding device 100 may perform lossless compression on the residual data without quantization.

[0046] In conclusion, the encoding unit 110 determines the most efficient prediction method for the current coding unit from among a plurality of intra prediction methods and inter prediction methods. Then, the encoding unit 110 determines the prediction method for the current coding unit based on the coding efficiency of the prediction result. Similarly, the encoding unit 110 may determine the transformation method based on the coding efficiency of the transformation result. The coding efficiency of the coding unit is finally determined based on the method of determining the most efficient prediction method and transformation method for the coding unit. The encoding unit 110 determines the hierarchical structure of the largest coding unit based on the coding efficiency of the finally divided coding unit.

[0047] The encoding unit 110 can measure the coding efficiency of the coding unit and the prediction efficiency of the prediction method using a rate-distortion optimization technique based on Lagrangian multiplier.

[0048] The encoding unit 110 may generate partition information indicating whether the coding unit is to be partitioned according to the determined hierarchical structure of the largest coding unit. Then, for the coding unit for which partitioning has been completed, the encoding unit 110 may generate partition mode information for determining a prediction unit and transform unit partition information for determining a transform unit. Furthermore, if there are two or more partition methods for the coding unit, the encoding unit 110 may generate partition mode information indicating the partition method together with the partition information. Then, the encoding unit 110 may generate information related to the prediction method and the transform method used for the prediction unit and the transform unit.

[0049] The bitstream generating unit 120 can output the information generated by the encoding unit 110 in the form of a bitstream according to the hierarchical structure of the maximum coding unit.

[0050] A method for determining coding units, prediction units, and transform units based on the tree structure of the largest coding unit according to an embodiment will be described in detail below with reference to FIGS.

[0051] FIG. 1B illustrates a block diagram of a video decoder 150 based on tree-structured coding units, according to one embodiment.

[0052] The video decoding device 150 includes a receiving unit 160 and a decoding unit 170 .

[0053] The definitions of various terms, such as coding unit, prediction unit, transform unit, and various partition information, used in the decoding operation of the video decoding device 150 according to an embodiment are the same as those described with reference to FIG. 1 and the video encoding device 100. Furthermore, although the purpose of the video decoding device 150 is to restore video data, various encoding methods used in the video encoding device 100 are also applicable to the video decoding device 150.

[0054] The receiving unit 160 receives and parses a bitstream related to coded video. The decoding unit 170 extracts information required for decoding for each maximum coding unit from the parsed bitstream and provides the extracted information to the decoding unit 170. The decoding unit 170 may extract information related to the maximum size of the coding unit of the current picture from a header, sequence parameter set, or picture parameter set related to the current picture.

[0055] In addition, the decoding unit 170 extracts partition information related to the coding unit according to a tree structure for each maximum coding unit from the parsed bitstream. The extracted partition information is output to the decoding unit 170. The decoding unit 170 can partition the maximum coding unit according to the extracted partition information and determine the tree structure of the maximum coding unit.

[0056] The partition information extracted by the decoding unit 170 is partition information related to the tree structure determined by the video encoding device 100 to generate the minimum coding error. Therefore, the video decoding device 150 can decode the data using the encoding method that generates the minimum coding error and restore the video.

[0057] The decoding unit 170 may extract partition information related to data units, such as prediction units and transform units, included in a coding unit. For example, the decoding unit 170 may extract information related to the most efficient partition mode related to the prediction unit. The decoding unit 170 may also extract transform partition information related to the most efficient tree structure in the transform unit.

[0058] In addition, the decoding unit 170 may obtain information related to the most efficient prediction method for a prediction unit divided from a coding unit, and may obtain information related to the most efficient transform method for a transform unit divided from a coding unit.

[0059] The decoding unit 170 extracts information from the bitstream using the method used to construct the bitstream in the bitstream generation unit 120 of the video encoding device 100.

[0060] The decoding unit 170 can divide the largest coding unit into coding units having the most efficient tree structure based on the division information. The decoding unit 170 can then divide the coding unit into prediction units based on information related to the partition mode. The decoding unit 170 can divide the coding unit into transform units based on the transform division information.

[0061] The decoding unit 170 can predict a prediction unit based on information related to a prediction method. Then, the decoding unit 170 can inverse quantize and inverse transform residual data corresponding to the difference between an original pixel value and a predicted pixel value based on the information related to a transformation method for a transformation unit. Furthermore, the decoding unit 170 can restore pixels of a coding unit based on a prediction result of the prediction unit and a transformation result of the transformation unit.

[0062] FIG. 2 illustrates a process in which the video decoder 150 divides the current coding unit and determines at least one coding unit, according to one embodiment.

[0063] According to an embodiment, the video decoding device 150 may determine the type of coding unit using block type information and may determine the type of division of the coding unit using partition type information. That is, the division method of the coding unit indicated by the partition type information may be determined depending on the block type indicated by the block type information used by the video decoding device 150.

[0064] According to one embodiment, the video decoding device 150 may use block shape information indicating that the current coding unit is square. For example, the video decoding device 150 may determine whether to not split the square coding unit, split it vertically, split it horizontally, or split it into four coding units, based on the partition shape information. Referring to FIG. 2, when the block shape information of the current coding unit 200 indicates a square shape, the decoder 180 may not split a coding unit 210a having the same size as the current coding unit 200 based on the partition shape information indicating no split, or may determine divided coding units 210b, 210c, 210d, etc., based on the partition shape information indicating a predetermined split method.

[0065] Referring to FIG. 2, according to one embodiment, the video decoding device 150 may determine two coding units 210b obtained by vertically dividing the current coding unit 200 based on the division type information indicating vertical division. The video decoding device 150 may determine two coding units 210c obtained by horizontally dividing the current coding unit 200 based on the division type information indicating horizontal division. The video decoding device 150 may determine four coding units 210d obtained by vertically and horizontally dividing the current coding unit 200 based on the division type information indicating vertical and horizontal division. However, the division type into which a square coding unit may be divided is not limited to the above-described type, and may include various types that can be indicated by the division type information. Predetermined division types into which a square coding unit may be divided will be described in detail below through various embodiments.

[0066] FIG. 3 illustrates a process by which video decoder 150 divides a non-square coding unit to determine at least one coding unit, according to one embodiment.

[0067] According to one embodiment, the video decoding device 150 may use block shape information indicating that the current coding unit is non-square. The video decoding device 150 may determine whether to not split the non-square current coding unit or to split it in a predetermined manner based on the partitioning type information. Referring to FIG. 3, if the block shape information of the current coding unit 300 or 350 indicates a non-square shape, the video decoding device 150 may not split the coding unit 310 or 360 having the same size as the current coding unit 300 or 350 based on the partitioning type information indicating no partitioning, or may determine the split coding units 320a, 320b, 330a, 330b, 330c, 370a, 370b, 380a, 380b, and 380c based on the partitioning type information indicating a predetermined partitioning method. The predetermined partitioning method for splitting a non-square coding unit will be described in detail below through various embodiments.

[0068] According to an embodiment, the video decoding device 150 may determine a manner in which a coding unit is divided using the division type information, and in this case, the division type information may indicate the number of coding units to be generated by dividing the coding unit. Referring to FIG. 3, if the division type information indicates that the current coding unit 300 or 350 is to be divided into two coding units, the video decoding device 150 may divide the current coding unit 300 or 350 based on the division type information and determine two coding units 320a, 320b, or 370a, 370b included in the current coding unit.

[0069] According to an embodiment, when the video decoding device 150 divides the non-square current coding unit 300 or 350 based on the division type information, the video decoding device 150 may divide the current coding unit by considering the position of the long side of the non-square current coding unit 300 or 350. For example, the video decoding device 150 may determine a plurality of coding units by dividing the current coding unit 300 or 350 in a direction that divides the long side of the current coding unit 300 or 350, taking into account the shape of the current coding unit 300 or 350.

[0070] According to one embodiment, if the partitioning type information indicates that a coding unit is to be divided into an odd number of blocks, the video decoding device 150 may determine an odd number of coding units to be included in the current coding unit 300 or 350. For example, if the partitioning type information indicates that the current coding unit 300 or 350 is to be divided into three coding units, the video decoding device 150 may divide the current coding unit 300 or 350 into three coding units 330a, 330b, 330c, 380a, 380b, and 380c. According to one embodiment, the video decoding device 150 may determine an odd number of coding units to be included in the current coding unit 300 or 350, and the determined coding units may not all be the same size. For example, among the determined odd number of coding units 330a, 330b, 330c, 380a, 380b, and 380c, the size of a given coding unit 330b or 380b may be different from the sizes of the other coding units 330a, 330c, 380a, and 380c. That is, coding units that can be determined by dividing the current coding unit 300 or 350 may have a variety of sizes.

[0071] According to an embodiment, when the partitioning type information indicates that a coding unit is to be partitioned into an odd number of blocks, the video decoding device 150 may determine the odd number of coding units included in the current coding unit 300 or 350. Furthermore, the video decoding device 150 may impose a predetermined restriction on at least one of the odd number of coding units generated by the partitioning. Referring to FIG. 3, the video decoding device 150 may perform a different decoding process for the central coding units 330b and 380b among the three coding units 330a, 330b, 330c, and 380a, 380b, and 380c generated by partitioning the current coding unit 300 or 350 from the other coding units 330a, 330c, 380a, and 380c. For example, the video decoding device 150 may limit the coding units 330b and 380b located in the center from being further divided, or may limit them to being divided a predetermined number of times, unlike the other coding units 330a, 330c, 380a, and 380c.

[0072] FIG. 4 illustrates a process in which the video decoding device 150 divides a coding unit based on at least one of block format information and partition format information, according to an embodiment.

[0073] According to one embodiment, the video decoding device 150 may determine whether or not to divide the square-shaped first coding unit 400 into coding units based on at least one of block shape information and partition shape information. According to one embodiment, if the partition shape information indicates that the first coding unit 400 is to be partitioned horizontally, the video decoding device 150 may divide the first coding unit 400 horizontally to determine the second coding unit 410. According to one embodiment, the terms "first coding unit," "second coding unit," and "third coding unit" used are terms used to understand the division relationship between coding units. For example, if the first coding unit is partitioned, the second coding unit may be determined, and if the second coding unit is partitioned, the third coding unit may be determined. Hereinafter, the relationship between the first coding unit, the second coding unit, and the third coding unit used may also be understood to be in accordance with the above-described characteristics.

[0074] According to an embodiment, the video decoding device 150 may determine whether to divide the determined second coding unit 410 into coding units based on at least one of block shape information and partition shape information. Referring to FIG. 4, the video decoding device 150 may divide the first coding unit 400 based on at least one of block shape information and partition shape information, and may divide the determined non-square second coding unit 410 into at least one third coding unit 420a, 420b, 420c, 420d, etc., or may not divide the second coding unit 410. The video decoding device 150 may acquire at least one of block shape information and partition shape information, and may divide the first coding unit 400 based on the acquired at least one of the block shape information and partition shape information, for example, into a plurality of second coding units 410 of various shapes. The second coding units 410 may also be divided according to the manner in which the first coding unit 400 was divided, based on at least one of the block shape information and partition shape information related to the first coding unit 400. According to an embodiment, when the first coding unit 400 is divided into the second coding units 410 based on at least one of the block shape information and partition shape information related to the first coding unit 400, the second coding units 410 may also be divided into third coding units 420a, 420b, 420c, 420d, etc., based on at least one of the block shape information and partition shape information related to the second coding unit 410. That is, the coding units are also recursively divided based on at least one of the division type information and the block type information associated with each coding unit. Methods that can be used for recursive division of the coding units will be described below in various exemplary embodiments.

[0075] According to an embodiment, the video decoding device 150 may determine whether to divide each of the third coding units 420a, 420b, 420c, 420d, etc. into coding units or not to divide the second coding unit 410 based on at least one of the block shape information and the partition shape information. According to an embodiment, the video decoding device 150 may divide the non-square second coding unit 410 into an odd number of third coding units 420b, 420c, 420d. The video decoding device 150 may impose a predetermined restriction on certain third coding units among the odd number of third coding units 420b, 420c, 420d. For example, the video decoding device 150 may restrict the middle coding unit 420c of the odd number of third coding units 420b, 420c, 420d from being further divided or may restrict it to be divided a configurable number of times. 4, the video decoding device 150 may restrict the middle coding unit 420c of the odd number of third coding units 420b, 420c, and 420d included in the non-square second coding unit 410 to not be further divided, to be divided into a predetermined division pattern (e.g., into only four coding units, or into a pattern corresponding to the division pattern of the second coding unit 410), or to be divided a predetermined number of times (e.g., divided n times; n>0). However, the above restrictions on the middle coding unit 420c are merely exemplary and should not be construed as being limited to the above exemplary embodiment, but should be construed as including various restrictions that may allow the middle coding unit 420c to be decoded differently from the other coding units 420b and 420d.

[0076] According to an embodiment, the video decoding device 150 may obtain at least one of block configuration information and partition configuration information used to partition the current coding unit at a predetermined position within the current coding unit.

[0077] According to an embodiment, when a current coding unit is divided into a predetermined number of coding units, the video decoding device 150 may select one of the coding units. There are various methods for selecting one of the plurality of coding units, and such methods will be described later in the following various embodiments.

[0078] According to an embodiment, the video decoding device 150 may divide a current coding unit into a plurality of coding units and determine a coding unit at a predetermined position.

[0079] FIG. 5 illustrates a method by which video decoder 150 determines a coding unit at a predetermined position among an odd number of coding units, according to one embodiment.

[0080] According to an embodiment, the video decoding device 150 may use information indicating the positions of each odd-numbered coding unit to determine a middle coding unit among the odd-numbered coding units. Referring to FIG. 5, the video decoding device 150 may divide the current coding unit 500 to determine odd-numbered coding units 520a, 520b, and 520c. The video decoding device 150 may determine the middle coding unit 520b using information regarding the positions of the odd-numbered coding units 520a, 520b, and 520c. For example, the video decoding device 150 may determine the positions of the coding units 520a, 520b, and 520c based on information indicating the positions of certain samples included in the coding units 520a, 520b, and 520c to determine the middle coding unit 520b. Specifically, the video decoding device 150 can determine the middle coding unit 520b by determining the positions of the coding units 520a, 520b, and 520c based on information indicating the positions of the upper left samples 530a, 530b, and 530c of the coding units 520a, 520b, and 520c.

[0081] According to an embodiment, the information indicating the positions of the top left samples 530a, 530b, and 530c included in the coding units 520a, 520b, and 520c, respectively, may include information related to the positions or coordinates of the coding units 520a, 520b, and 520c within the picture. According to an embodiment, the information indicating the positions of the top left samples 530a, 530b, and 530c included in the coding units 520a, 520b, and 520c, respectively, may include information indicating the width or height of the coding units 520a, 520b, and 520c included in the current coding unit 500, and such width or height also corresponds to information indicating the difference between the coordinates of the coding units 520a, 520b, and 520c within the picture. That is, the video decoding device 150 can determine the coding unit 520b located in the middle by directly using information related to the positions or coordinates of the coding units 520a, 520b, and 520c within the picture, or by using information related to the width or height of the coding unit corresponding to the difference between the coordinates.

[0082] According to an embodiment, information indicating the position of the top left sample 530a of the top coding unit 520a may indicate (xa, ya) coordinates, information indicating the position of the top left sample 530b of the middle coding unit 520b may indicate (xb, yb) coordinates, and information indicating the position of the top left sample 530c of the bottom coding unit 520c may indicate (xc, yc) coordinates. The video decoding device 150 may determine the middle coding unit 520b using the coordinates of the top left samples 530a, 530b, and 530c included in the coding units 520a, 520b, and 520c, respectively. For example, when the coordinates of the top left samples 530a, 530b, and 530c are sorted in ascending or descending order, the coding unit 520b including the coordinates (xb, yb) of the middle sample 530b may be determined as the middle coding unit among the coding units 520a, 520b, and 520c obtained by dividing the current coding unit 500. However, the coordinates indicating the positions of the top left samples 530a, 530b, and 530c may indicate absolute positions within a picture. Furthermore, (dxb, dyb) coordinates indicating the relative position of the top left sample 530b of the middle coding unit 520b based on the position of the top left sample 530a of the top coding unit 520a, or (dxc, dyc) coordinates indicating the relative position of the top left sample 530c of the bottom coding unit 520c may be used. Furthermore, the method of determining a coding unit at a predetermined position by using the coordinates of the sample as information indicating the position of the sample included in the coding unit should not be interpreted as being limited to the above-mentioned method, but should be interpreted as various arithmetic methods that can use the coordinates of the sample.

[0083] According to an embodiment, the video decoder 150 may divide the current coding unit 500 into multiple coding units 520a, 520b, and 520c and select a coding unit from the coding units 520a, 520b, and 520c according to a predetermined criterion. For example, the video decoder 150 may select a coding unit 520b having a different size from the coding units 520a, 520b, and 520c.

[0084] According to an embodiment, the video decoding device 150 may determine the width or height of each of the coding units 520a, 520b, and 520c using the (xa, ya) coordinates indicating the position of the top left sample 530a of the top coding unit 520a, the (xb, yb) coordinates indicating the position of the top left sample 530b of the middle coding unit 520b, and the (xc, yc) coordinates indicating the position of the top left sample 530c of the bottom coding unit 520c. The video decoding device 150 may determine the size of each of the coding units 520a, 520b, and 520c using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the coding units 520a, 520b, and 520c.

[0085] According to an embodiment, the video decoding device 150 may determine the width of the top coding unit 520a as xb-xa and the height as yb-ya. According to an embodiment, the video decoding device 150 may determine the width of the middle coding unit 520b as xc-xb and the height as yc-yb. According to an embodiment, the video decoding device 150 may determine the width or height of the bottom coding unit using the width or height of the current coding unit and the widths and heights of the top coding unit 520a and the middle coding unit 520b. Based on the determined widths and heights of the coding units 520a, 520b, and 520c, the video decoding device 150 may determine a coding unit having a different size from the other coding units. Referring to FIG. 5, the video decoding device 150 may determine the middle coding unit 520b, which has a different size from the top coding unit 520a and the bottom coding unit 520c, as a coding unit of a predetermined position. However, the process in which the video decoding device 150 determines coding units having different coding units and different sizes is merely one embodiment of determining a coding unit at a predetermined position using the size of the coding unit determined based on sample coordinates, and various other processes may also be used to determine a coding unit at a predetermined position by comparing the size of the coding unit determined based on predetermined sample coordinates.

[0086] However, the position of the sample considered to determine the position of the coding unit is not limited to the upper left end as mentioned above, but may also be interpreted as information related to the position of any sample included in the coding unit being usable.

[0087] According to an embodiment, the video decoding device 150 may select a coding unit at a predetermined position from among an odd number of coding units determined by dividing the current coding unit, taking into account the shape of the current coding unit. For example, if the current coding unit is non-square in shape, where the width is greater than the height, the video decoding device 150 may determine a coding unit at a predetermined position along the horizontal direction. That is, the video decoding device 150 may determine one of the coding units at a different position in the horizontal direction and set a constraint on the coding unit. If the current coding unit is non-square in shape, where the height is greater than the width, the video decoding device 150 may determine a coding unit at a predetermined position along the vertical direction. That is, the video decoding device 150 may determine one of the coding units at a different position in the vertical direction and set a constraint on the coding unit.

[0088] According to one embodiment, the video decoding device 150 may use information indicating the positions of each of the even-numbered coding units to determine a coding unit at a predetermined position among the even-numbered coding units. The video decoding device 150 may divide the current coding unit to determine the even-numbered coding units, and may determine a coding unit at a predetermined position using information regarding the positions of the even-numbered coding units. Specific steps related to this process correspond to the process of determining a coding unit at a predetermined position (e.g., the middle position) among the odd-numbered coding units described with reference to FIG. 5, and therefore will not be described here.

[0089] According to an embodiment, when a non-square current coding unit is divided into a plurality of coding units, in order to determine a coding unit at a predetermined position among the plurality of coding units, the video decoding device 150 may use predetermined information related to the coding unit at a predetermined position during the division process. For example, in order to determine a coding unit at a center among the plurality of coding units into which the current coding unit is divided, the video decoding device 150 may use at least one of block shape information and partition shape information stored in a sample included in the center coding unit during the division process.

[0090] 5, the video decoding device 150 may divide a current coding unit 500 into a plurality of coding units 520a, 520b, and 520c based on at least one of block shape information and partition shape information, and may determine a central coding unit 520b among the plurality of coding units 520a, 520b, and 520c. Furthermore, the video decoding device 150 may determine the central coding unit 520b by considering a position where at least one of block shape information and partition shape information is obtained. That is, when at least one of the block shape information and partition shape information of the current coding unit 500 is also obtained in a central sample 540 of the current coding unit 500, and the current coding unit 500 is divided into a plurality of coding units 520a, 520b, and 520c based on at least one of the block shape information and the partition shape information, the video decoding device 150 may determine the central coding unit 520b including the sample 540. However, the information used to determine the coding unit located in the middle is not interpreted as being limited to at least one of block shape information and division shape information, and various types of information are also used in the process of determining the coding unit located in the middle.

[0091] According to an embodiment, predetermined information for identifying a coding unit at a predetermined position may also be acquired from a predetermined sample included in the coding unit to be determined. Referring to FIG. 5, the video decoding device 150 may use at least one of block shape information and partition shape information acquired from a sample at a predetermined position within the current coding unit 500 (e.g., a sample at the center of the current coding unit 500) to determine a coding unit at a predetermined position (e.g., a coding unit at the middle of the multiple coding units 520a, 520b, and 520c obtained by dividing the current coding unit 500). That is, the video decoding device 150 may determine the sample at the predetermined position by considering the block shape of the current coding unit 500. The video decoding device 150 may determine a coding unit 520b including a sample from which predetermined information (e.g., at least one of block shape information and partition shape information) can be acquired from a multiple coding units 520a, 520b, and 520c obtained by dividing the current coding unit 500, and may impose a predetermined restriction. 5, according to one embodiment, the video decoder 150 may determine a sample 540 located in the middle of the current coding unit 500 as a sample from which certain information can be acquired, and may place a certain restriction on the decoding process of the coding unit 520b including such sample 540. However, the position of the sample from which certain information can be acquired is not limited to the above position, but may also be a sample at any position included in the coding unit 520b determined to place the restriction.

[0092] According to an embodiment, the location of a sample from which certain information can be acquired is also determined according to the shape of the current coding unit 500. According to an embodiment, block shape information may determine whether the shape of the current coding unit is square or non-square, and the location of a sample from which certain information can be acquired may be determined according to the shape. For example, the video decoding device 150 may determine, using at least one of information related to the width and information related to the height of the current coding unit, a sample located on a boundary that divides at least one of the width and height of the current coding unit in half as a sample from which certain information can be acquired. For another example, if the block shape information related to the current coding unit indicates a non-square shape, the video decoding device 150 may determine, as a sample from which certain information can be acquired, one of the samples adjacent to a boundary that divides the long side of the current coding unit in half.

[0093] According to an embodiment, when the video decoding device 150 divides a current coding unit into a plurality of coding units, the video decoding device 150 may use at least one of block shape information and partition shape information to determine a coding unit at a predetermined position among the plurality of coding units. According to an embodiment, the video decoding device 150 may acquire at least one of block shape information and partition shape information from a sample at a predetermined position included in the coding unit, and may divide the plurality of coding units generated by dividing the current coding unit using at least one of partition shape information and block shape information acquired from a sample at a predetermined position included in each of the plurality of coding units. That is, the coding units may also be recursively divided using at least one of block shape information and partition shape information acquired from a sample at a predetermined position included in each of the plurality of coding units. The recursive division process of a coding unit has been described with reference to FIG. 4, and therefore, a detailed description thereof will be omitted.

[0094] In one embodiment, the video decoding device 150 can divide the current coding unit and determine at least one coding unit, and can determine the order in which such at least one coding unit is decoded by a predetermined block (e.g., the current coding unit).

[0095] FIG. 6 illustrates an order in which multiple coding units are processed when the video decoder 150 divides the current coding unit and determines multiple coding units, according to one embodiment.

[0096] According to one embodiment, the video decoding device 150 may vertically divide the first coding unit 600 and determine the second coding units 610a and 610b, or may horizontally divide the first coding unit 600 and determine the second coding units 630a and 630b, or may vertically and horizontally divide the first coding unit 600 and determine the second coding units 650a, 650b, 650c, and 650d, based on the block format information and the partition format information.

[0097] 6, the video decoding device 150 may determine the order of processing the second coding units 610a and 610b, which are determined by dividing the first coding unit 600 in the vertical direction, in the horizontal direction 610c. The video decoding device 150 may determine the processing order of the second coding units 630a and 630b, which are determined by dividing the first coding unit 600 in the horizontal direction, as the vertical direction 630c. The video decoding device 150 may determine the processing order of the second coding units 650a, 650b, 650c, and 650d, which are determined by dividing the first coding unit 600 in the vertical and horizontal directions, in a predetermined order 650e (e.g., raster scan order or z scan order) in which coding units located in one row are processed before coding units located in the next row are processed.

[0098] According to an embodiment, the video decoder 150 may recursively divide a coding unit (CU). Referring to Figure 6, the video decoder 150 may divide a first CU 600 to determine a plurality of CUs 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d, and may recursively divide each of the determined CUs 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d. The method of dividing the CUs 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d corresponds to the method of dividing the first CU 600. 6, the video decoding device 150 may divide the first coding unit 600 vertically to determine the second coding units 610a and 610b, and may further determine whether to divide the second coding units 610a and 610b independently.

[0099] In one embodiment, the video decoding device 150 may horizontally divide the second coding unit 610a on the left side into third coding units 620a and 620b, while not dividing the second coding unit 610b on the right side.

[0100] According to an embodiment, the processing order of the coding units is also determined based on the division process of the coding units. In other words, the processing order of the divided coding units is also determined based on the processing order of the coding units immediately before the division. The video decoding device 150 may determine the processing order of the third coding units 620a and 620b, which are determined by dividing the second coding unit 610a on the left side, independently of the second coding unit 610b on the right side. Since the second coding unit 610a on the left side is divided horizontally to determine the third coding units 620a and 620b, the third coding units 620a and 620b are also processed in the vertical direction 620c. Furthermore, since the processing order of the second coding unit 610a on the left side and the second coding unit 610b on the right side corresponds to the horizontal direction 610c, the third coding units 620a and 620b included in the second coding unit 610a on the left side may be processed in the vertical direction 620c before the right coding unit 610b is processed. The above content is intended to explain the process by which the processing order of coding units is determined based on the coding units before they are divided, and therefore should not be interpreted as being limited to the above embodiment, but should be interpreted as meaning that coding units that are divided into various forms and determined can be used in various ways in which they can be processed independently in a predetermined order.

[0101] FIG. 7 illustrates a process in which the video decoder 150 determines that a current coding unit is to be divided into an odd number of coding units when a predetermined-order coding unit cannot be processed, according to one embodiment.

[0102] According to an embodiment, the video decoding device 150 may determine that the current coding unit is divided into an odd number of coding units based on the acquired block shape information and partition shape information. Referring to Figure 7, a square-shaped first coding unit 700 is divided into non-square-shaped second coding units 710a and 710b, and the second coding units 710a and 710b are also independently divided into third coding units 720a, 720b, 720c, 720d, and 720e. According to an embodiment, the video decoding device 150 may divide the left coding unit 710a of the second coding unit horizontally to determine a plurality of third coding units 720a and 720b, and may divide the right coding unit 710b into an odd number of third coding units 720c, 720d, and 720e.

[0103] According to an embodiment, the video decoding device 150 may determine whether there is an odd number of coding units by determining whether the third coding units 720a, 720b, 720c, 720d, and 720e are processed in a predetermined order. Referring to FIG. 7, the video decoding device 150 may recursively divide the first coding unit 700 to determine the third coding units 720a, 720b, 720c, 720d, and 720e. The video decoding device 150 may determine whether the first coding unit 700, the second coding unit 710a, 710b, or the third coding unit 720a, 720b, 720c, 720d, and 720e are divided into an odd number of coding units based on at least one of block type information and partition type information. For example, in the second coding units 710a and 710b, the coding units located on the right side are also divided into an odd number of third coding units 720c, 720d, and 720e. The order in which the coding units included in the first coding unit 700 are processed may be a predetermined order 730 (e.g., z scan order), and the video decoding device 150 may determine whether the third coding units 720c, 720d, and 720e determined by dividing the second coding unit 710b on the right side into an odd number of coding units satisfy the condition that they can be processed in the predetermined order.

[0104] According to one embodiment, the video decoding device 150 may determine whether the third coding units 720a, 720b, 720c, 720d, and 720e included in the first coding unit 700 satisfy a condition that they can be processed in a predetermined order, and the condition relates to whether at least one of the width and height of the second coding units 710a and 710b is divided in half by the boundary of the third coding units 720a, 720b, 720c, 720d, and 720e. For example, third coding units 720a and 720b, which are determined by dividing the height of the non-square left second coding unit 710a in half, satisfy the condition, but third coding units 720c, 720d, and 720e, which are determined by dividing the right second coding unit 710b into three coding units, do not satisfy the condition because the boundaries of the third coding units 720c, 720d, and 720e do not divide the width or height of the right second coding unit 710b in half. The video decoding device 150 may determine that such unsatisfied conditions indicate a discontinuity in the scanning order and, based on the determination result, may determine to divide the right second coding unit 710b into an odd number of coding units. According to an embodiment, when dividing the right second coding unit 710b into an odd number of coding units, the video decoding device 150 may impose a predetermined restriction on coding units at predetermined positions among the divided coding units. Since the content of such restriction and the predetermined positions have been described in various embodiments, detailed description thereof will be omitted.

[0105] 8 illustrates a process in which the video decoding device 150 divides a first coding unit 800 and determines at least one coding unit, according to an embodiment. According to an embodiment, the video decoding device 150 may divide the first coding unit 800 based on at least one of block shape information and partition shape information acquired via the receiving unit 160. The square-shaped first coding unit 800 may be divided into four square-shaped coding units or into a plurality of non-square coding units. For example, referring to FIG. 8, if the block shape information indicates that the first coding unit 800 is square and the partition shape information indicates that the first coding unit 800 is to be divided into non-square coding units, the video decoding device 150 may divide the first coding unit 800 into a plurality of non-square coding units. Specifically, if the division format information indicates that the first coding unit 800 is to be divided horizontally or vertically to determine an odd number of coding units, the video decoding device 150 can divide the square-shaped first coding unit 800 into second coding units 810a, 810b, and 810c determined by dividing it vertically as an odd number of coding units, or into second coding units 820a, 820b, and 820c determined by dividing it horizontally.

[0106] According to an embodiment, the video decoding device 150 may determine whether the second coding units 810a, 810b, 810c, 820a, 820b, and 820c included in the first coding unit 800 satisfy a condition that they can be processed in a predetermined order, where the condition relates to whether at least one of the width and height of the first coding unit 800 is divided in half by the boundaries of the second coding units 810a, 810b, 810c, 820a, 820b, and 820c. Referring to Figure 8, the boundaries of the second coding units 810a, 810b, and 810c determined by dividing the square-shaped first coding unit 800 vertically do not divide the width of the first coding unit 800 in half, so it is also determined that the first coding unit 800 does not satisfy the condition that it can be processed in a predetermined order. In addition, since the boundaries of the second coding units 820a, 820b, and 820c determined by dividing the square-shaped first coding unit 800 horizontally do not divide the width of the first coding unit 800 in half, it is determined that the first coding unit 800 does not satisfy the condition for being processed in a predetermined order. If such a condition is not satisfied, the video decoding device 150 determines that the scanning order is broken and may determine to divide the first coding unit 800 into an odd number of coding units based on the determination result. According to an embodiment, when dividing the first coding unit 800 into an odd number of coding units, the video decoding device 150 may impose a predetermined restriction on a coding unit at a predetermined position among the divided coding units. The content of such a restriction or the predetermined position has been described in various embodiments, and therefore a detailed description thereof will be omitted.

[0107] According to an embodiment, the video decoding device 150 may divide the first coding unit and determine various types of coding units.

[0108] Referring to FIG. 8, the video decoding apparatus 150 may divide a square-shaped first coding unit 800, a non-square-shaped first coding unit 830, or a non-square-shaped first coding unit 850 into various types of coding units.

[0109] FIG. 9 illustrates that, according to one embodiment, the video decoding device 150 restricts the manner in which the second coding unit (900) may be divided if the non-square second coding unit determined by dividing the first coding unit (900) satisfies certain conditions.

[0110] According to an embodiment, the video decoding device 150 may determine to divide the square-shaped first coding unit 900 into non-square-shaped second coding units 910a, 910b, 920a, and 920b based on at least one of block shape information and partition shape information acquired via the receiving unit 160. The second coding units 910a, 910b, 920a, and 920b may be divided independently. Thus, the video decoding device 150 may determine whether to divide the second coding units 910a, 910b, 920a, and 920b into multiple coding units or not based on at least one of block shape information and partition shape information associated with each of the second coding units 910a, 910b, 920a, and 920b. According to an embodiment, the video decoding device 150 may horizontally divide the non-square-shaped left second coding unit 910a, which is determined by vertically dividing the first coding unit 900, to determine third coding units 912a and 912b. However, when the video decoding device 150 divides the left second coding unit 910a horizontally, the right second coding unit 910b may be restricted so that it is not divided horizontally in the same direction as the division of the left second coding unit 910a. If the right second coding unit 910b is divided in the same direction to determine the third coding units 914a and 914b, the left second coding unit 910a and the right second coding unit 910b may be divided horizontally independently to determine the third coding units 912a, 912b, 914a, and 914b. However, this is the same result as if the video decoding device 150 divided the first coding unit 900 into four square second coding units 930a, 930b, 930c, and 930d based on at least one of the block shape information and the partition shape information, which is inefficient in terms of video decoding.

[0111] According to one embodiment, the video decoding device 150 may vertically divide the non-square second coding unit 920a or 920b, which is determined by horizontally dividing the first coding unit 330, to determine the third coding units 922a, 922b, 924a, and 924b. However, if the video decoding device 150 vertically divides one of the second coding units (e.g., the top second coding unit 920a), for the reasons described above, the video decoding device 150 may restrict the other second coding units (e.g., the bottom coding unit 920b) from being vertically divided in the same direction as the top second coding unit 920a.

[0112] FIG. 10 illustrates a process in which the video decoding device 150 divides a square-shaped coding unit when the division form information does not indicate division into four square-shaped coding units, according to one embodiment.

[0113] According to an embodiment, the video decoding device 150 may divide the first coding unit 1000 into second coding units 1010a, 1010b, 1020a, 1020b, etc., based on at least one of block shape information and partition shape information. The partition shape information may include information regarding various shapes into which the coding unit may be divided, but the information regarding the various shapes may not include information for dividing the coding unit into four square coding units. According to such partition shape information, the video decoding device 150 may not divide the square-shaped first coding unit 1000 into four square-shaped second coding units 1030a, 1030b, 1030c, and 1030d. Based on the partition shape information, the video decoding device 150 may determine non-square second coding units 1010a, 1010b, 1020a, 1020b, etc.

[0114] According to one embodiment, the video decoding device 150 may independently divide the non-square second coding units 1010a, 1010b, 1020a, 1020b, etc. The second coding units 1010a, 1010b, 1020a, 1020b, etc. are divided in a predetermined order using a recursive method, which corresponds to the method of dividing the first coding unit 1000 based on at least one of block shape information and partition shape information.

[0115] For example, the video decoding device 150 may horizontally divide the left-side second coding unit 1010a to determine square-shaped third coding units 1012a and 1012b, and may horizontally divide the right-side second coding unit 1010b to determine square-shaped third coding units 1014a and 1014b. Furthermore, the video decoding device 150 may horizontally divide both the left-side second coding unit 1010a and the right-side second coding unit 1010b to determine square-shaped third coding units 1016a, 1016b, 1016c, and 1016d. In this case, the coding units may be determined in the same manner as when the first coding unit 1000 is divided into four square-shaped second coding units 1030a, 1030b, 1030c, and 1030d.

[0116] For another example, the video decoding device 150 may vertically divide the top second coding unit 1020a to determine square third coding units 1022a and 1022b, and may vertically divide the bottom second coding unit 1020b to determine square third coding units 1024a and 1024b. Furthermore, the video decoding device 150 may vertically divide both the top second coding unit 1020a and the bottom second coding unit 1020b to determine square third coding units 1022a, 1022b, 1024a, and 1024b. In this case, the coding units may be determined in the same manner as when the first coding unit 1000 is divided into four square second coding units 1030a, 1030b, 1030c, and 1030d.

[0117] FIG. 11 illustrates that the processing order of multiple coding units may vary depending on the division process of the coding units, according to one embodiment.

[0118] According to an embodiment, the video decoding device 150 may partition the first coding unit 1100 based on block shape information and partition shape information. If the block shape information indicates a square shape and the partition shape information indicates that the first coding unit 1100 is to be partitioned in at least one of the horizontal and vertical directions, the video decoding device 150 may partition the first coding unit 1100 to determine, for example, second coding units 1110a, 1110b, 1120a, 1120b, 1130a, 1130b, 1130c, 1130d, etc. Referring to FIG. 11, the non-square second coding units 1110a, 1110b, 1120a, and 1120b determined by partitioning the first coding unit 1100 only in the horizontal or vertical direction may be independently partitioned based on the block shape information and partition shape information associated therewith. For example, the video decoding device 150 may horizontally divide the second coding units 1110a and 1110b, which are generated by vertically dividing the first coding unit 1100, into third coding units 1116a, 1116b, 1116c, and 1116d, and may horizontally divide the second coding units 1120a and 1120b, which are generated by horizontally dividing the first coding unit 1100, into third coding units 1126a, 1126b, 1126c, and 1126d. The division process for the second coding units 1110a, 1110b, 1120a, and 1120b has been described with reference to FIG. 9, and therefore, detailed description thereof will be omitted.

[0119] According to an embodiment, the video decoding device 150 may process coding units in a predetermined order. The characteristics of processing coding units in a predetermined order have been described with reference to FIG. 6, and therefore detailed description thereof will be omitted. Referring to FIG. 11, the video decoding device 150 may divide a square-shaped first coding unit 1100 to determine four square-shaped third coding units 1116a, 1116b, 1116c, 1116d, 1126a, 1126b, 1126c, and 1126d. According to an embodiment, the video decoding device 150 may determine the processing order of the third coding units 1116a, 1116b, 1116c, 1116d, 1126a, 1126b, 1126c, and 1126d depending on the division form of the first coding unit 1100.

[0120] According to one embodiment, the video decoding device 150 can horizontally divide the second coding units 1110a and 1110b, which have been generated by vertical division, to determine the third coding units 1116a, 1116b, 1116c, and 1116d. The video decoding device 150 can process the third coding units 1116a, 1116b, 1116c, and 1116d in the order (1117) of first vertically processing the third coding units 1116a and 1116b included in the left-side second coding unit 1110a, and then vertically processing the third coding units 1116c and 1116d included in the right-side second coding unit 1110b.

[0121] According to one embodiment, the video decoding device 150 can vertically divide the second coding units 1120a and 1120b, which have been generated by dividing them horizontally, to determine the third coding units 1126a, 1126b, 1126c, and 1126d. The video decoding device 150 can process the third coding units 1126a, 1126b, 1126c, and 1126d in the order (1127) of first horizontally processing the third coding units 1126a and 1126b included in the top second coding unit 1120a, and then horizontally processing the third coding units 1126c and 1126d included in the bottom second coding unit 1120b.

[0122] 11, the second coding units 1110a, 1110b, 1120a, and 1120b may be divided into square-shaped third coding units 1116a, 1116b, 1116c, 1116d, 1126a, 1126b, 1126c, and 1126d. The second coding units 1110a and 1110b, which are determined by dividing vertically, and the second coding units 1120a and 1120b, which are determined by dividing horizontally, are divided into different types. However, the third coding units 1116a, 1116b, 1116c, 1116d, 1126a, 1126b, 1126c, and 1126d, which are subsequently determined, ultimately result in the first coding unit 1100 being divided into coding units of the same type. As a result, the video decoding device 150 recursively divides coding units through different processes based on at least one of block type information and division type information, and as a result, determines coding units of the same type, and can process multiple coding units determined to be of the same type in different orders.

[0123] FIG. 12 illustrates a process of determining the coding unit depth according to changes in the shape and size of the coding unit when a coding unit is recursively divided to determine multiple coding units, according to one embodiment.

[0124] According to an embodiment, the video decoder 150 may determine the depth of the coding unit based on a predetermined criterion. For example, the predetermined criterion may be the long side length of the coding unit. The video decoder 150 may determine the depth of the coding unit based on a predetermined criterion. For example, the video decoder 150 may determine the depth of the coding unit based on a criterion that the long side length of the current coding unit is twice the long side length of the coding unit before the division. n When the coding unit is divided by (n>0), it can be determined that the depth of the current coding unit is increased by n from the depth of the coding unit before division. Hereinafter, the coding unit whose depth is increased will be referred to as a coding unit of a lower depth.

[0125] 12, according to an embodiment, the video decoding device 150 may divide the square-shaped first coding unit 1200 based on block shape information indicating a square shape (for example, the block shape information may indicate "0:SQUARE"), and determine a second coding unit 1202, a third coding unit 1204, etc., at a lower depth. If the size of the square-shaped first coding unit 1200 is 2Nx2N, the width and height of the first coding unit 1200 may be halved. 1 The second coding unit 1202 determined by dividing the width and height of the second coding unit 1202 by 1 / 2 may have a size of NxN. Furthermore, the third coding unit 1204 determined by dividing the width and height of the second coding unit 1202 by 1 / 2 may have a size of N / 2xN / 2. In this case, the width and height of the third coding unit 1204 are 1 / 2 of the width and height of the first coding unit 1200. 2 If the depth of the first coding unit 1200 is D, then 1 / 2 of the width and height of the first coding unit 1200 1 The depth of the second coding unit 1202 is also D+1, which is half the width and height of the first coding unit 1200. 2 The depth of the third coding unit 1204, which is double the depth, is also D+2.

[0126] According to one embodiment, based on block shape information indicating a non-square shape (for example, the block shape information may indicate "1:NS_VER", indicating a non-square shape in which the height is greater than the width, or "2:NS_HOR", indicating a non-square shape in which the width is greater than the height), the video decoding device 150 may divide the first coding unit 1210 or 1220, which is non-square, and determine a second coding unit 1212 or 1222, a third coding unit 1214 or 1224, etc., at a lower depth.

[0127] The video decoding device 150 may divide at least one of the width and height of the first coding unit 1210 having a size of Nx2N to determine, for example, second coding units 1202, 1212, 1222, etc. That is, the video decoding device 150 may divide the first coding unit 1210 horizontally to determine the second coding unit 1202 having a size of NxN or the second coding unit 1222 having a size of NxN / 2, or may divide the first coding unit 1210 horizontally and vertically to determine the second coding unit 1212 having a size of N / 2xN.

[0128] According to an embodiment, the video decoding device 150 may divide at least one of the width and height of the first coding unit 1220 having a size of 2NxN to determine, for example, the second coding units 1202, 1212, 1222, etc. That is, the video decoding device 150 may divide the first coding unit 1220 vertically to determine the second coding unit 1202 having a size of NxN or the second coding unit 1212 having a size of N / 2xN, or may divide the first coding unit 1220 horizontally and vertically to determine the second coding unit 1222 having a size of NxN / 2.

[0129] According to an embodiment, the video decoding device 150 may divide at least one of the width and height of the NxN second coding unit 1202 to determine, for example, the third coding units 1204, 1214, 1224, etc. That is, the video decoding device 150 may divide the second coding unit 1202 vertically and horizontally to determine the N / 2xN / 2 third coding unit 1204, the N / 2xN / 2 third coding unit 1214, or the N / 2xN / 2 third coding unit 1224.

[0130] According to an embodiment, the video decoding device 150 may divide at least one of the width and height of the second coding unit 1212 having a size of N / 2xN to determine, for example, the third coding units 1204, 1214, 1224, etc. That is, the video decoding device 150 may divide the second coding unit 1212 horizontally to determine the third coding unit 1204 having a size of N / 2xN / 2 or the third coding unit 1224 having a size of N / 2xN / 2, or may divide the second coding unit 1212 vertically and horizontally to determine the third coding unit 1214 having a size of N / 2xN / 2.

[0131] According to an embodiment, the video decoding device 150 may divide at least one of the width and height of the second coding unit 1214 having a size of NxN / 2 to determine, for example, the third coding units 1204, 1214, 1224, etc. That is, the video decoding device 150 may divide the second coding unit 1212 vertically to determine the third coding unit 1204 having a size of N / 2xN / 2 or the third coding unit 1214 having a size of N / 2xN / 2, or may divide the second coding unit 1212 vertically and horizontally to determine the third coding unit 1224 having a size of N / 2xN / 2.

[0132] According to an embodiment, the video decoding device 150 may divide, for example, square coding units 1200, 1202, and 1204 horizontally or vertically. For example, the first coding unit 1200 having a size of 2Nx2N may be divided vertically to determine the first coding unit 1210 having a size of Nx2N, or may be divided horizontally to determine the first coding unit 1220 having a size of 2NxN. According to an embodiment, if the depth is determined based on the longest side length of the coding unit, the depth of the coding unit determined by dividing the first coding unit 1200, 1202, or 1204 having a size of 2Nx2N horizontally or vertically may be the same as the depth of the first coding unit 1200, 1202, or 1204.

[0133] According to one embodiment, the width and height of the third coding unit 1214 or 1224 may be half that of the first coding unit 1210 or 1220. If the depth of the first coding unit 1210 or 1220 is D, the depth of the second coding unit 1212 or 1214, which is half the width and height of the first coding unit 1210 or 1220, may also be D+1, and the depth of the third coding unit 1214 or 1224, which is half the width and height of the first coding unit 1210 or 1220, may also be D+2.

[0134] FIG. 13 illustrates a depth determined by the type and size of a coding unit and an index (PID: part index) for a coding unit partition, according to one embodiment.

[0135] According to an embodiment, the video decoding device 150 may determine various types of second coding units by dividing a square-shaped first coding unit 1300. Referring to Figure 13, the video decoding device 150 may divide the first coding unit 1300 in at least one of the vertical and horizontal directions according to the division type information to determine second coding units 1302a, 1302b, 1304a, 1304b, 1306a, 1306b, 1306c, and 1306d. That is, the video decoding device 150 may determine the second coding units 1302a, 1302b, 1304a, 1304b, 1306a, 1306b, 1306c, and 1306d based on the division type information related to the first coding unit 1300.

[0136] According to one embodiment, the depths of the second coding units 1302a, 1302b, 1304a, 1304b, 1306a, 1306b, 1306c, and 1306d determined by the division type information for the square-shaped first coding unit 1300 are also determined based on the long side lengths. For example, since the length of one side of the square-shaped first coding unit 1300 is the same as the long side lengths of the non-square-shaped second coding units 1302a, 1302b, 1304a, and 1304b, the depths of the first coding unit 1300 and the non-square-shaped second coding units 1302a, 1302b, 1304a, and 1304b can be considered to be the same as D. In contrast, when the video decoding device 150 divides the first coding unit 1300 into four square-shaped second coding units 1306a, 1306b, 1306c, and 1306d based on the division format information, the length of one side of the square-shaped second coding units 1306a, 1306b, 1306c, and 1306d is half the length of one side of the first coding unit 1300, so the depth of the second coding units 1306a, 1306b, 1306c, and 1306d is also a depth of D+1, which is one depth lower than the depth D of the first coding unit 1300.

[0137] According to an embodiment, the video decoding device 150 may divide a first coding unit 1310, whose height is greater than its width, horizontally according to the division format information and divide the first coding unit 1310 into a plurality of second coding units 1312a, 1312b, 1314a, 1314b, and 1314c. According to an embodiment, the video decoding device 150 may divide a first coding unit 1320, whose width is greater than its height, vertically according to the division format information and divide the first coding unit 1320 into a plurality of second coding units 1322a, 1322b, 1324a, 1324b, and 1324c.

[0138] According to one embodiment, the depths of the second coding units 1312a, 1312b, 1314a, 1314b, 1316a, 1316b, 1316c, and 1316d determined by the division type information related to the non-square first coding unit 1310 or 1320 are also determined based on the long side lengths. For example, the length of one side of the square second coding units 1312a and 1312b is half the length of one side of the non-square first coding unit 1310, whose height is greater than its width. Therefore, the depths of the square second coding units 1302a, 1302b, 1304a, and 1304b are D+1, which is one depth lower than the depth D of the non-square first coding unit 1310.

[0139] Furthermore, the video decoding device 150 may divide the non-square first coding unit 1310 into an odd number of second coding units 1314a, 1314b, and 1314c based on the division format information. The odd number of second coding units 1314a, 1314b, and 1314c may include the non-square second coding units 1314a and 1314c and the square second coding unit 1314b. In this case, the length of the long sides of the non-square second coding units 1314a and 1314c and the length of one side of the square second coding unit 1314b are half the length of one side of the first coding unit 1310. Therefore, the depths of the second coding units 1314a, 1314b, and 1314c are also D+1, which is one depth lower than D, the depth of the first coding unit 1310. The video decoding device 150 can determine the depth of a coding unit associated with a non-square first coding unit 1320 whose width is greater than its height in a manner corresponding to the above-mentioned manner for determining the depth of a coding unit associated with the first coding unit 1310.

[0140] According to an embodiment, when determining an index (PID) for a divided coding unit segment, if the divided coding units are not the same size, the video decoder 150 may determine the index based on the size ratio between the coding units. Referring to FIG. 13, among the divided coding units 1314a, 1314b, and 1314c, the middle coding unit 1314b has the same width as the other coding units 1314a and 1314c but is twice as high as the other coding units 1314a and 1314c. That is, in this case, the middle coding unit 1314b may include both the other coding units 1314a and 1314c. Therefore, if the index (PID) of the middle coding unit 1314b in the scanning order is 1, the next coding unit 1314c has an index (PID) of 3, which is two higher than the index of the other coding unit 1314a and 1314c. That is, a discontinuity in the index values ​​occurs. According to one embodiment, the video decoding device 150 can determine whether coding units divided into an odd number of parts are not the same size based on whether there is a discontinuity in the indexes for the partitions between the coding units divided in this way.

[0141] According to one embodiment, the video decoder 150 may determine whether a current coding unit has been divided into a specific division type based on an index value for distinguishing the plurality of coding units determined by dividing the current coding unit. Referring to FIG. 13, the video decoder 150 may divide a rectangular first coding unit 1310, whose height is greater than its width, to determine an even number of coding units 1312a and 1312b or an odd number of coding units 1314a, 1314b, and 1314c. The video decoder 150 may use an index (PID) indicating each coding unit to distinguish each of the plurality of coding units. According to one embodiment, the PID may also be obtained from a sample at a predetermined position (e.g., the top left sample) of each coding unit.

[0142] According to an embodiment, the video decoding device 150 may determine a coding unit at a predetermined position among the coding units determined by division using an index for coding unit division. According to an embodiment, if division type information for a rectangular first coding unit 1310 whose height is greater than its width indicates that the first coding unit 1310 is to be divided into three coding units, the video decoding device 150 may divide the first coding unit 1310 into three coding units 1314a, 1314b, and 1314c. The video decoding device 150 may assign an index to each of the three coding units 1314a, 1314b, and 1314c. The video decoding device 150 may compare the indexes associated with each coding unit to determine a middle coding unit among the odd number of coding units. Based on the indexes of the coding units, the video decoding device 150 may determine the coding unit 1314b having an index corresponding to the middle value among the indexes as the middle coding unit among the coding units determined by dividing the first coding unit 1310. According to an embodiment, when determining indexes for dividing the divided coding units, the video decoder 150 may determine the indexes based on the size ratio between the coding units if the coding units are not the same size. Referring to FIG. 13, a coding unit 1314b generated by dividing a first coding unit 1310 has the same width as the other coding units 1314a and 1314c but is twice as high as the other coding units 1314a and 1314c, which have different heights. In this case, if the index (PID) of the middle coding unit 1314b is 1, the next coding unit 1314c has an index (PID) of 3, which is 2 higher. In such a case, when the indexes increase uniformly but the increase widths are different, the video decoder 150 may determine that the image has been divided into multiple coding units, including coding units having different sizes from the other coding units.According to one embodiment, if the division type information indicates division into an odd number of coding units, the video decoding device 150 may divide the current coding unit such that a coding unit at a predetermined position among the odd number of coding units (e.g., a middle coding unit) has a different size from the other coding units. In this case, the video decoding device 150 may determine the middle coding unit having a different size using an index (PID) associated with the coding unit. However, the index and the size or position of the determined coding unit are specified for purposes of describing one embodiment and should not be construed as being limited thereto, and various indexes, positions, and sizes of coding units may be used.

[0143] According to one embodiment, the video decoder 150 may utilize a predetermined data unit from which the recursive division of the coding units begins.

[0144] FIG. 14 illustrates a plurality of coding units determined from a plurality of predetermined data units included in a picture according to one embodiment.

[0145] According to an embodiment, the predetermined data unit is also defined as a data unit from which a coding unit begins to be recursively divided using at least one of block type information and partition type information. That is, it also corresponds to a coding unit of the highest depth used in determining a plurality of coding units into which a current picture is divided. Hereinafter, for convenience of explanation, such a predetermined data unit will be referred to as a reference data unit.

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

[0147] According to an embodiment, the video decoding device 150 may divide the current picture into a plurality of reference data units. According to an embodiment, the video decoding device 150 may divide the current picture into a plurality of reference data units using partition information associated with each reference data unit. The division process of the reference data units corresponds to a division process using a quad-tree structure.

[0148] According to an embodiment, the video decoding device 150 may determine in advance a minimum size that a reference data unit included in a current picture may have, and may determine reference data units of various sizes that are equal to or larger than the minimum size, and may determine at least one coding unit based on the determined reference data unit using block type information and partition type information.

[0149] 14, the video decoding device 150 may use a square-shaped reference coding unit 1400 or a non-square-shaped reference coding unit 1402. According to an embodiment, the shape and size of the reference coding unit may be determined based on various data units (e.g., a sequence, a picture, a slice, a slice segment, a maximum coding unit, etc.) that include at least one reference coding unit.

[0150] According to an embodiment, the receiving unit 160 of the video decoding device 150 may acquire at least one of information regarding the type of the reference coding unit and information regarding the size of the reference coding unit from the bitstream for each of the various data units. The process of determining at least one coding unit included in the square-shaped reference coding unit 1400 has been described through the process of dividing the current coding unit 300 in FIG. 10, and the process of determining at least one coding unit included in the non-square-shaped reference coding unit 1400 has been described through the process of dividing the current coding unit 1100 or 1150 in FIG. 11, so detailed descriptions thereof will be omitted.

[0151] According to an embodiment, the video decoding device 150 may use an index for identifying the size and type of a base coding unit to determine the size and type of the base coding unit according to a predetermined data unit determined in advance based on a predetermined condition. That is, the receiving unit 160 may acquire only an index for identifying the size and type of the base coding unit for each slice, slice segment, maximum coding unit, etc., as a data unit satisfying a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) among the various data units (e.g., a sequence, a picture, a slice, a slice segment, a maximum coding unit, etc.) from the bitstream. The video decoding device 150 may determine the size and type of the base data unit for each data unit satisfying the predetermined condition by using the index. If information regarding the type of the base coding unit and information regarding the size of the base coding unit were acquired and used from the bitstream for each data unit of a relatively small size, the bitstream utilization efficiency would be poor. Therefore, instead of directly acquiring information regarding the type of the base coding unit and information regarding the size of the base coding unit, only the index may be acquired and used. In this case, at least one of the size and type of the reference coding unit corresponding to the index indicating the size and type of the reference coding unit is also determined in advance. That is, the video decoding device 150 may determine at least one of the size and type of the reference coding unit included in the data unit serving as a reference for index acquisition by selecting at least one of the size and type of the predetermined reference coding unit according to the index.

[0152] According to one embodiment, the video decoding device 150 may use at least one reference coding unit included in one maximum coding unit. That is, the maximum coding unit for dividing a video includes at least one reference coding unit, and coding units may be determined through a recursive division process of each reference coding unit. According to one embodiment, at least one of the width and height of the maximum coding unit may be an integer multiple of at least one of the width and height of the reference coding unit. According to one embodiment, the size of the reference coding unit is also the size obtained by dividing the maximum coding unit n times using a quadtree structure. That is, the video decoding device 150 may determine the reference coding unit by dividing the maximum coding unit n times using a quadtree structure, and according to various embodiments, may divide the reference coding unit based on at least one of block shape information and partition shape information.

[0153] FIG. 15 illustrates processing blocks that are responsible for determining the order in which reference coding units included in a picture 1500 are determined, according to one embodiment.

[0154] According to an embodiment, the video decoding device 150 may determine at least one processing block for dividing a picture. A processing block is a data unit including at least one reference coding unit for dividing a picture, and the at least one reference coding unit included in the processing block may be determined in a specific order. That is, the determination order of the at least one reference coding unit determined in each processing block may correspond to one of various orders in which the reference coding units may be determined, and the determination order of the reference coding units determined in each processing block may differ for each processing block. The determination order of the reference coding units determined for each processing block may be one of various orders, such as raster scan, Z scan, N scan, up-right diagonal scan, horizontal scan, and vertical scan, but the possible orders should not be interpreted as being limited to the scan order.

[0155] According to an embodiment, the video decoder 150 may acquire information related to the size of a processing block and determine the size of at least one processing block included in the video. The video decoder 150 may acquire information related to the size of a processing block from a bitstream and determine the size of at least one processing block included in the video. The size of such a processing block is also a predetermined size of a data unit indicated by the information related to the size of the processing block.

[0156] According to one embodiment, the receiving unit 160 of the video decoding device 150 may acquire information regarding the size of a processing block for each specific data unit from the bitstream. For example, the information regarding the size of a processing block may be acquired from the bitstream for each data unit, such as an image, a sequence, a picture, a slice, or a slice segment. That is, the receiving unit 160 may acquire information regarding the size of a processing block from the bitstream for each of the multiple data units, and the video decoding device 150 may determine the size of at least one processing block for dividing a picture using the acquired information regarding the size of the processing block. The size of such a processing block may be an integer multiple of the base coding unit.

[0157] According to an embodiment, the video decoding device 150 may determine the size of the processing blocks 1502 and 1512 included in the picture 1500. For example, the video decoding device 150 may determine the size of the processing blocks based on information related to the size of the processing blocks obtained from the bitstream. Referring to FIG. 15, according to an embodiment, the video decoding device 150 may determine the horizontal size of the processing blocks 1502 and 1512 to be four times the horizontal size of the reference coding unit and the vertical size of the processing blocks 1502 and 1512 to be four times the vertical size of the reference coding unit. The video decoding device 150 may determine the order in which at least one reference coding unit is determined within at least one processing block.

[0158] According to one embodiment, the video decoding device 150 may determine each of the processing blocks 1502 and 1512 included in the picture 1500 based on the size of the processing block, and may determine the order of determining at least one reference coding unit included in the processing blocks 1502 and 1512. According to one embodiment, determining the reference coding unit may include determining the size of the reference coding unit.

[0159] According to an embodiment, the video decoding device 150 may acquire information regarding a determination order of at least one reference coding unit included in at least one processing block from a bitstream and may determine an order in which at least one reference coding unit is determined based on the acquired information regarding the determination order. The information regarding the determination order may also be defined as an order or direction in which the reference coding units are determined within a processing block. That is, the order in which the reference coding units are determined may be determined independently for each processing block.

[0160] According to an embodiment, the video decoding device 150 may acquire information regarding the determination order of the reference coding units from the bitstream for each specific data unit. For example, the receiving unit 160 may acquire information regarding the determination order of the reference coding units from the bitstream for each data unit path, such as an image, a sequence, a picture, a slice, a slice segment, a processing block, etc. Since the information regarding the determination order of the reference coding units indicates the determination order of the reference coding units within a processing block, the information regarding the determination order may also be acquired for each specific data unit including an integer number of processing blocks.

[0161] The video decoder 150 may determine at least one reference coding unit based on the order determined according to an embodiment.

[0162] According to an embodiment, the receiving unit 160 may acquire information related to a base coding unit determination order as information related to the processing blocks 1502 and 1512 from the bitstream, and the video decoding device 150 may determine an order for determining at least one base coding unit included in the processing blocks 1502 and 1512 and determine at least one base coding unit included in the picture 1500 according to the determined coding unit order. Referring to Figure 15, the video decoding device 150 may determine a determination order (1504, 1514) of at least one base coding unit associated with each of the processing blocks 1502 and 1512. For example, if information related to the determination order of the base coding units is acquired for each processing block, the determination order of the base coding units associated with each of the processing blocks 1502 and 1512 may differ for each processing block. If the reference coding unit determination order (1504) associated with the processing block 1502 is a raster scan order, the reference coding units included in the processing block 1502 are also determined in the raster scan order. On the other hand, if the reference coding unit determination order (1514) associated with another processing block 1512 is a reverse raster scan order, the reference coding units included in the processing block 1512 are also determined in the reverse raster scan order.

[0163] 1 to 15 illustrate a method for dividing a video into maximum coding units and dividing the maximum coding units into coding units of a hierarchical tree structure. 16 to 28 illustrate an ultimate motion vector expression (UMVE) mode for deriving motion vectors for inter prediction.

[0164] Inter prediction is a prediction method in which a current block is predicted from a reference block similar to the current block obtained from a reference picture of the current picture. To inter predict the current block, a motion vector indicating a spatial difference between the current block and the reference block and a reference picture referenced by the current picture are determined. The current block is then predicted with reference to the reference block determined by the motion vector and the reference picture. The UMVE mode introduced in this disclosure is an inter prediction mode for efficiently encoding and / or decoding motion vectors.

[0165] In the UMVE mode, a UMVE candidate list is determined from blocks spatially or temporally adjacent to the current block. Then, a reference picture and a base motion vector of the current block are determined from the UMVE candidate of the current block selected from the UMVE candidate list. The motion vector of the current block is generated by correcting the base motion vector of the current block according to the correction size and correction direction.

[0166] Inter prediction in UMVE mode will be described in detail in FIG. 16. Referring to FIG. 16, a base motion vector 1600 obtained from a UMVE candidate of a current block is (5, -4). However, if the reference block indicated by the base motion vector 1600 is inaccurate, the coding efficiency of the current block will be reduced. Therefore, in UMVE mode, the base motion vector 1600 is also corrected by a correction size 1602 and a correction direction 1604.

[0167] For example, when the correction size 1602 is 2 and the correction direction 1604 is the +x direction, a correction motion vector 1606 for correcting the base motion vector 1600 is determined to be (2, 0). Then, the sum vector (7, -4) of the base motion vector 1600 and the correction motion vector 1606 is determined to be the motion vector 1608 of the current block. Therefore, the current block is also predicted by the motion vector 1608 indicating the accurate reference block. Therefore, in the UMVE mode, the accuracy of prediction can be improved by correcting the base motion vector 1600.

[0168] In UMVE mode, in order to reduce the amount of information required to correct the basic motion vector 1600, the correction size 1602 and correction direction 1604 have a limited number of candidates. For example, if the correction size 1602 is determined from eight correction size candidates, the correction size information indicating the correction size 1602 can be expressed using a truncated unary code from a minimum of 1 bit to a maximum of 7 bits. Similarly, if the correction direction 1604 is determined from four correction direction candidates (+x, -x, +y, -y), the correction direction information indicating the correction direction 1604 can also be expressed using 2 bits. Therefore, the number of bits required to determine the correction motion vector 1606 is limited to 9 bits. Therefore, in UMVE mode, the number of bits required to determine the correction motion vector 1606 is limited to a determined size or less, thereby improving compression efficiency.

[0169] FIG. 17 illustrates a block diagram of a video decoding device 1700 that performs decoding according to the UMVE mode.

[0170] The video decoding apparatus 1700 includes a high-level parameter determination unit 1710, a coding mode determination unit 1720, and a decoding unit 1730. In Fig. 17, the high-level parameter determination unit 1710, the coding mode determination unit 1720, and the decoding unit 1730 are represented as separate components, but according to an embodiment, the high-level parameter determination unit 1710, the coding mode determination unit 1720, and the decoding unit 1730 may be combined into one component.

[0171] 17, the high-level parameter determination unit 1710, the coding mode determination unit 1720, and the decoding unit 1730 are expressed as a structural unit located in one device, but the devices responsible for the functions of the high-level parameter determination unit 1710, the coding mode determination unit 1720, and the decoding unit 1730 do not necessarily need to be physically adjacent to each other. Therefore, depending on the embodiment, the high-level parameter determination unit 1710, the coding mode determination unit 1720, and the decoding unit 1730 may be distributed.

[0172] The upper level parameter determining unit 1710, the coding mode determining unit 1720, and the decoding unit 1730 may be implemented by one processor or by multiple processors depending on the embodiment.

[0173] The upper parameter determination unit 1710 may determine whether the UMVE mode is allowed for an upper data unit of the current block. The upper data unit may be a sequence, a picture, a slice, or a slice segment of the current block. For example, the upper parameter determination unit 1710 may determine whether the UMVE mode is allowed for a picture unit.

[0174] The upper parameter determination unit 1710 may determine whether the UMVE mode is allowed for each upper data unit. For example, the upper parameter determination unit 1710 may determine whether the UMVE mode is allowed for a current sequence. Then, the upper parameter determination unit 1710 may determine whether the UMVE mode is allowed for a current picture included in the current sequence. Similarly, the upper parameter determination unit 1710 may determine whether the UMVE mode is allowed for a current slice included in the current picture.

[0175] If the UMVE mode is not allowed for the current sequence, the upper parameter determination unit 1710 may determine that the UMVE mode is not allowed for all pictures included in the current sequence. Similarly, if the UMVE mode is not allowed for the current picture, the upper parameter determination unit 1710 may determine that the UMVE mode is not allowed for all slices included in the current picture.

[0176] The upper parameter determination unit 1710 acquires a UMVE enabled flag from the bitstream, which indicates whether the UMVE mode is enabled for the upper data unit of the current block. If the UMVE enabled flag indicates that the UMVE mode is enabled for the upper data unit, the coding mode determination unit 1720 determines whether the UMVE mode is applied to all blocks included in the upper data unit. Conversely, if the UMVE enabled flag indicates that the UMVE mode is not enabled for the upper data unit, the coding mode determination unit 1720 determines that the UMVE mode is not applied to all blocks included in the upper data unit.

[0177] When the UMVE allowable flag indicates 1, the UMVE allowable flag is also interpreted as allowing the UMVE mode for the upper data unit. Conversely, when the UMVE allowable flag indicates 0, the UMVE allowable flag is also interpreted as not allowing the UMVE mode for the upper data unit. Depending on the embodiment, the meaning of the UMVE allowable flag may also be interpreted in the opposite way.

[0178] The upper parameter determination unit 1710 may acquire a UMVE enable flag for each upper data unit. If the enablement of the UMVE mode is determined on a picture-by-picture basis, the upper parameter determination unit 1710 may acquire a UMVE enable flag on a picture-by-picture basis. However, if the enablement of the UMVE mode is determined hierarchically in the order of a sequence unit, a picture unit, and a slice unit, the upper parameter determination unit 1710 may acquire a UMVE enable flag for a sequence unit, a UMVE enable flag for a picture unit, and a UMVE enable flag for a slice unit.

[0179] In another embodiment, the UMVE enable flag may indicate whether a default setting related to the UMVE mode is applied to the upper data unit. For example, when the UMVE enable flag indicates 0, the UMVE enable flag may be interpreted as applying a default setting related to the UMVE mode to the upper data unit. Conversely, when the UMVE enable flag indicates 1, the UMVE enable flag may be interpreted as not applying a default setting related to the UMVE mode to the upper data unit. If the UMVE enable flag is not acquired, the upper parameter determination unit 1710 may apply a default setting related to the UMVE mode to the upper data unit.

[0180] The basic settings related to the UMVE mode may not allow the UMVE mode for higher data units, or may apply only the UMVE mode to higher data units under specific conditions. The basic settings related to the UMVE mode may be set differently for each sequence unit, each picture unit, and each slice unit.

[0181] The upper parameter determination unit 1710 may determine whether to allow the UMVE mode for the upper data unit according to a specific condition, without a UMVE allowable flag. For example, if the current picture is the last picture of a group of pictures (GoP), the upper parameter determination unit 1710 may apply basic settings related to the UMVE mode to the upper data unit, without a UMVE allowable flag. As another example, the upper parameter determination unit 1710 may apply basic settings related to the UMVE mode to the upper data unit, without a UMVE allowable flag, according to the temporal layer depth of the current picture.

[0182] The upper parameter determination unit 1710 may determine whether to allow other inter prediction modes depending on whether the UMVE mode is allowed for the upper data unit. For example, if the UMVE mode is allowed according to the UMVE allowance flag, a predetermined inter prediction mode is not allowed for the upper data unit. The predetermined inter prediction mode may include a decoder-side motion vector derivation (DMVD) mode, a decoder-side motion vector refinement (DMVR) mode, a skip mode, a direct mode, a merge mode, etc.

[0183] For example, in the UMVE mode, information related to a motion vector is obtained from a bitstream, whereas in the DMVD mode or DMVR mode, information related to a motion vector is not obtained from the bitstream and a motion vector is derived. Therefore, according to one embodiment, if the UMVE mode is allowed for the upper data unit, the upper parameter determination unit 1710 may determine that the DMVD mode or the DMVR mode is not allowed for the upper data unit.

[0184] As another example, if the UMVE mode is allowed for the upper data unit, the upper parameter determination unit 1710 may determine that the skip mode, direct mode, and merge mode that omit information related to the motion vector are not allowed.

[0185] According to another embodiment, when the UMVE mode is permitted for the upper data unit, the upper parameter determination unit 1710 may acquire an enable flag for the predetermined inter prediction mode from the bitstream for the upper data unit. According to yet another embodiment, when the UMVE mode is permitted for the upper data unit, the upper parameter determination unit 1710 may apply a basic setting for the predetermined inter prediction mode to the upper data unit without acquiring an enable flag for the predetermined inter prediction mode. The predetermined inter prediction mode may include a DMVD mode, a DMVR mode, a skip mode, a direct mode, a merge mode, an overlapped block motion compensation (OBMC) mode, an illumination compensation (IC) mode, an affine mode, etc.

[0186] If the UMVE mode is allowed for the upper data unit, the upper parameter determination unit 1710 may additionally acquire setting information related to the UMVE mode to be applied to the upper data unit. The additional information related to the UMVE mode acquired by the upper parameter determination unit 1710 will now be described.

[0187] The higher-level parameter determination unit 1710 may acquire UMVE candidate number information indicating the number of UMVE candidates of the UMVE mode allowed for the higher-level data unit from the bitstream, and the decoding unit 1730 may determine as many UMVE candidates as indicated by the UMVE candidate number information.

[0188] In addition, the higher-level parameter determination unit 1710 can acquire correction size candidate number information indicating the number of correction size candidates allowed for the higher-level data unit from the bitstream. Then, the decoding unit 1730 determines as many correction size candidates as indicated by the correction size candidate number information.

[0189] In addition, the higher-level parameter determination unit 1710 may acquire, from the bitstream, information on the number of candidate correction directions indicating the number of candidate correction directions allowed for the higher-level data unit. Then, the decoding unit 1730 determines as many candidate correction directions as indicated by the information on the number of candidate correction directions.

[0190] The UMVE candidate number information may indicate a difference between the minimum number of UMVE candidates and the number of UMVE candidates used in the upper data unit. For example, if the minimum number of UMVE candidates is 4 and the number of UMVE candidates used in the upper data unit is 5, the UMVE candidate number information may indicate 1. Similar to the UMVE candidate number information, the correction size candidate number information and the correction direction candidate number information may also indicate a difference between the minimum number and the number of candidates used in the upper data unit.

[0191] The higher-level parameter determination unit 1710 may acquire UMVE candidate list configuration information indicating how to configure a UMVE candidate list from the bitstream. The UMVE candidate list configuration information may indicate that a UMVE candidate list for the UMVE mode is configured based on a motion vector candidate list used in the merge mode.

[0192] Alternatively, the UMVE candidate list configuration information may indicate that a motion vector candidate list dedicated to the UMVE mode is configured. For example, the motion vector candidate list dedicated to the UMVE mode may be configured by statistically analyzing motion vector information used in decoding the current picture. If the left block and the upper block of the current block have a high probability of being selected as UMVE candidates, the left block and the upper block of the current block may be preferentially included in the UMVE candidate list.

[0193] Alternatively, the UMVE candidate list configuration information may indicate that a motion vector candidate list is configured by mixing a motion vector candidate list used in the merge mode and a motion vector candidate list dedicated to the UMVE mode.

[0194] If the upper parameter determination unit 1710 cannot obtain the UMVE candidate list configuration information or if the UMVE candidate list is determined implicitly, it selects a UMVE candidate list configuration method based on basic settings.

[0195] The higher-level parameter determination unit 1710 can obtain correction size range information for multiple blocks of the higher-level data unit from the bitstream, and the decoding unit 1730 determines the correction size of the basic motion vector based on the correction size range indicated by the correction size range information.

[0196] For example, the correction size range information may indicate the minimum value of the correction size candidates. If the minimum value of the correction size candidates indicated by the correction size range information is 1 and the number of correction size candidates indicated by the correction size number candidate information is 4, the correction size candidates are determined to be {1, 2, 4, 8}.

[0197] The correction size range information may also indicate a size difference between correction size candidates. For example, the correction size range information may indicate whether the values ​​of the correction size candidates increase arithmetically or geometrically. If the values ​​of the correction size candidates increase arithmetically, the correction size candidates are determined as {1, 2, 3, 4, 5, ...}. If the values ​​of the correction size candidates increase geometrically, the correction size candidates are determined as {1, 2, 4, 8, 16, ...}.

[0198] The correction size range information may also indicate one of a plurality of predetermined correction size candidate sets, for example, a first correction size candidate set {1,2,4,8}, a second correction size candidate set {1,2,3,4}, or a third correction size candidate set {4,8,16,32}.

[0199] The higher-level parameter determination unit 1710 may acquire correction size resizing information for a plurality of blocks of the higher-level data unit from the bitstream. The correction size resizing information indicates whether the range of correction size candidates is changed according to the temporal distance between the current picture and the reference picture. Therefore, when the correction size resizing information indicates a change in the range of correction size candidates, the decoding unit 1730 may determine the range of correction size candidates according to the temporal distance between the current picture and the reference picture.

[0200] Generally, when a current block refers to a reference block of a reference picture that is temporally far away from the current picture, the probability that the error of the basic motion vector is large is high. On the other hand, when a current block refers to a reference block of a reference picture that is temporally close to the current picture, the probability that the error of the basic motion vector is small is high. Therefore, when a correction size candidate set is determined in proportion to the temporal distance between the current picture and the reference picture, the prediction accuracy of the motion vector can be improved.

[0201] For example, if the temporal distance between the current picture and the reference picture is short, the minimum value of the correction size candidates is determined to be 1 / 2. If the temporal distance between the current picture and the reference picture is medium, the minimum value of the correction size candidates is determined to be 1. If the temporal distance between the current picture and the reference picture is long, the minimum value of the correction size candidates is determined to be 2.

[0202] The temporal distance between the current picture and the reference picture may also be determined based on a threshold value of 1 or more. For example, if the threshold value is 3, the temporal distance between the current picture and the reference picture may be compared with the three threshold values ​​to determine the minimum correction size candidate.

[0203] The higher-level parameter determination unit 1710 may determine the minimum value of the correction size candidates for the higher-level data unit based on the minimum value of the correction size candidate in the correction size range information and the temporal distance between the current picture and the reference picture. Specifically, the minimum value of the correction size candidate in the correction size range information may be changed based on the temporal distance between the current picture and the reference picture, thereby determining the minimum value of the correction size candidate for the higher-level data unit.

[0204] If the upper parameter determination unit 1710 cannot obtain the correction size change information or if the change of the correction size is determined internally, the upper parameter determination unit 1710 determines whether to change the correction size according to the basic setting.

[0205] The upper parameter determiner 1710 may acquire prediction direction change permission information for multiple blocks of the upper data unit from the bitstream. The current block acquires information related to the prediction direction of the reference picture as well as information related to the base motion vector from a UMVE candidate selected from the UMVE candidate list. If the prediction direction change permission information does not allow a change in prediction direction, the prediction direction of the UMVE candidate is applied to the current block. However, conversely, if the prediction direction change permission information allows a change in prediction direction, a prediction direction different from that of the UMVE candidate may be applied to the current block.

[0206] The prediction direction indicates one of list 0 uni-prediction, list 1 uni-prediction, and bi-prediction using both list 0 and list 1. In the case of uni-prediction, only one reference block from list 0 or list 1 is used to predict the current block, while in the case of bi-prediction, both the reference block from list 0 and the reference block from list 1 are used. Therefore, bi-prediction is likely to have higher prediction accuracy than uni-prediction. Therefore, when a change in prediction direction is allowed, even if the UMVE candidate indicates uni-prediction, the prediction direction of the UMVE mode is also determined as bi-prediction, thereby improving coding efficiency in the UMVE mode.

[0207] Therefore, if the prediction direction change permission information indicates that a change in the prediction direction is permitted, the decoding unit 1730 may change the prediction direction of the current block. For example, if a change in the prediction direction is permitted, even if the prediction direction of the UMVE candidate is list 0 uni-prediction, the prediction direction of the current block may be determined to be list 1 uni-prediction or bi-prediction.

[0208] The upper parameter determination unit 1710 may acquire primary prediction direction information for an upper data unit from the bitstream. The primary prediction direction information indicates whether or not there is a primary prediction direction for the upper data unit. Furthermore, if there is a primary prediction direction for the upper data unit, the primary prediction direction information indicates what the primary prediction direction of the upper data unit is. Once the primary prediction direction of the upper data unit is set, a block to which the UMVE mode is applied and included in the upper data unit is predicted according to the primary prediction direction. For example, if the primary prediction direction is determined to be bi-predictive, a block to which the UMVE mode is applied may be bi-predicted. Therefore, even if the prediction direction of a UMVE candidate is uni-predictive, the prediction direction of the current block is also determined to be bi-predictive.

[0209] The higher-level parameter determination unit 1710 may acquire both prediction direction change permission information and primary prediction direction information. When the prediction direction change permission information indicates that a prediction direction change is permitted and the primary prediction direction information indicates that a primary prediction direction is set, the prediction direction information acquired by the decoding unit 1730 indicates whether the prediction direction of the current block is the primary prediction direction. For example, if the primary prediction direction is bi-predictive and the prediction direction information indicates that the prediction direction of the current block is the primary prediction direction, the prediction direction of the current block is determined to be bi-predictive. If the primary prediction direction is bi-predictive and the prediction direction information indicates that the prediction direction of the current block is not the primary prediction direction, the prediction direction of the current block is determined to be list 0 uni-predictive or list 1 uni-predictive, which are backup prediction directions, according to the prediction direction information.

[0210] The higher-level parameter determination unit 1710 can acquire multiple correction allowance information indicating how many times the corrected basic motion vector is to be corrected from the bitstream. If the multiple correction allowance information indicates that the basic motion vector can be corrected multiple times, the decoding unit 1730 can correct the basic motion vector multiple times.

[0211] The coding mode determination unit 1720 determines whether the UMVE mode is applied to the current block when the UMVE mode is allowed for the higher data unit. The coding mode determination unit 1720 may acquire a UMVE flag indicating whether the UMVE mode is applied to the current block from the bitstream. For example, when the UMVE flag indicates that the UMVE mode is applied to the current block, the coding mode determination unit 1720 may determine the prediction mode of the current block to be the UMVE mode. Conversely, when the UMVE flag indicates that the UMVE mode is not applied to the current block, the coding mode determination unit 1720 does not determine the prediction mode of the current block to be the UMVE mode.

[0212] When the UMVE mode is applied to the current block, the coding mode determination unit 1720 may determine that another inter prediction mode is not applied to the current block. For example, when the UMVE mode is applied to the current block according to the UMVE flag, a predetermined inter prediction mode is not applied to the current block. The predetermined inter prediction mode may include DMVD mode, DMVR mode, skip mode, direct mode, merge mode, OBMC mode, IC mode, affine mode, etc. Conversely, when the UMVE mode is applied to the current block, the coding mode determination unit 1720 may determine that a specific prediction mode is applied to the current block.

[0213] Furthermore, if the UMVE mode is not applied to the current block, the coding mode determination unit 1720 may determine that another intra prediction mode is applied to the current block. For example, the intra prediction mode may include a DMVD mode, a DMVR mode, a merge mode, an OBMC mode, an IC mode, an affine mode, etc.

[0214] When the UMVE mode is applied to the current block, the decoding unit 1730 may determine a basic motion vector of the current block from the UMVE candidates. The decoding unit 1730 may determine a UMVE candidate list by a UMVE candidate list configuration method according to UMVE candidate list configuration information. The number of UMVE candidates included in the UMVE candidate list is also determined by UMVE candidate number information.

[0215] The decoding unit 1730 may obtain, from the bitstream, a UMVE index indicating a UMVE candidate including the base motion vector and reference picture of the current block from the UMVE candidate list, and may determine the base motion vector and reference picture of the current block using the UMVE index.

[0216] The decoding unit 1730 can determine a correction size and a correction direction for correcting the base motion vector. In UMVE mode, the base motion vector is corrected for prediction accuracy. Therefore, to determine a correction motion vector for correcting the base motion vector, the decoding unit 1730 determines a correction size indicating the magnitude of the correction motion vector and a correction direction indicating the direction of the correction motion vector.

[0217] The decoding unit 1730 may determine correction size candidates based on the correction size candidate number information, correction size range information, and correction size change information related to the higher data unit. The decoding unit 1730 may determine the number of correction size candidates based on the correction size candidate number information. The decoding unit 1730 may then determine the minimum value of the correction size candidates and the size difference between the correction size candidates based on the correction size range information. Furthermore, when the correction size change information indicates a change in the range of correction size candidates, the decoding unit 1730 may determine the range of correction size candidates based on the distance between the current picture and the reference picture. For example, the minimum value of the correction size candidates may be changed by comparing the distance between the current picture and the reference picture with a predetermined threshold value. Therefore, the range of correction size candidates may be determined based on the changed minimum value.

[0218] The decoding unit 1730 can acquire correction size information indicating the correction size of the base motion vector from the bitstream. The correction size information indicates a correction size candidate corresponding to the correction size of the base motion vector from among a predetermined number of correction size candidates. The decoding unit 1730 can determine the correction size of the base motion vector based on the correction size candidate indicated by the correction size information.

[0219] The decoding unit 1730 can determine a correction direction candidate based on the correction size direction number information related to the higher-order data unit, and then determines the correction direction from a predetermined number of correction direction candidates.

[0220] The decoding unit 1730 can acquire correction direction information indicating the correction direction of the base motion vector from the bitstream. The correction direction information indicates a correction direction candidate corresponding to the correction direction of the base motion vector from a predetermined number of correction direction candidates. The decoding unit 1730 can determine the correction direction of the base motion vector based on the correction direction candidate indicated by the correction direction information.

[0221] The decoding unit 1730 may determine the motion vector of the current block by correcting the base motion vector according to the determined correction size and correction direction. For example, if the correction size is 2 and the correction direction is +x, a motion vector whose x value is increased by 2 from the base motion vector is used to predict the current block.

[0222] 18 to 21 are diagrams illustrating a process of determining a motion vector for a current block in UMVE mode. In FIG. 18 and FIG. 21, the coordinates indicated by the base motion vector are set to (base_x, base_y). Further, the correction motion vectors according to the correction size and correction direction in UMVE mode will be explained based on (base_x, base_y).

[0223] Referring to FIG. 18, the decoding unit 1730 may determine motion vector candidates having a diamond-shaped distribution based on a base motion vector.

[0224] The decoding unit 1730 can determine the motion vector candidates ((base_x+1 / 4,base_y)1802, (base_x-1 / 4,base_y)1803, (base_x,base_y+1 / 4)1804, (base_x,base_y-1 / 4)1805) that are located 1 / 4 pixel away from the base motion vector (base_x,base_y)1801 as the first candidate group.

[0225] The decoding unit 1730 can determine the motion vector candidates ((base_x+1 / 2,base_y) 1806, (base_x-1 / 2,base_y) 1807, (base_x,base_y+1 / 2) 1808, (base_x,base_y-1 / 2) 1809) that are 1 / 2 pixel away from the base motion vector (base_x,base_y) 1801 as the second candidate group.

[0226] The decoding unit 1730 can determine the motion vector candidates ((base_x+1,base_y) 1810, (base_x-1,base_y) 1811, (base_x,base_y+1) 1812, (base_x,base_y-1) 1813) that are one pixel away from the base motion vector (base_x,base_y) 1801 as the third candidate group.

[0227] The decoding unit 1730 may select one of the first to third candidate groups according to the correction distance, and may determine one motion vector candidate from the candidate group as the motion vector of the current block according to the correction direction.

[0228] Referring to FIG. 19, the decoding unit 1730 may determine motion vector predictor candidates having a rectangular distribution based on a base motion vector.

[0229] Similarly, the decoding unit 1730 can determine the motion vector candidates ((base_x+1 / 4,base_y+1 / 4) 1902, (base_x+1 / 4,base_y-1 / 4) 1903, (base_x-1 / 4,base_y+1 / 4) 1904, (base_x-1 / 4,base_y-1 / 4) 1905) that are approximately 1 / 4 pixel away from the base motion vector (base_x,base_y) 1901 as the first candidate group.

[0230] The decoding unit 1730 can determine the motion vector candidates ((base_x+1 / 2,base_y+1 / 2) 1906, (base_x+1 / 2,base_y-1 / 2) 1907, (base_x-1 / 2,base_y+1 / 2) 1908, (base_x-1 / 2,base_y-1 / 2) 1909) that are located approximately 1 / 2 pixel away from the base motion vector (base_x,base_y) 1901 as the second candidate group.

[0231] The decoding unit 1730 can determine the motion vector candidates ((base_x+1,base_y+1) 1910, (base_x+1,base_y-1) 1911, (base_x-1,base_y+1) 1912, (base_x-1,base_y-1) 1913) that are approximately one pixel away from the base motion vector (base_x,base_y) 1901 as the third candidate group.

[0232] 20, the video decoding device 1730 can determine a different number of motion vector candidates for each group. Although the pixel spacing is 1 / 4 pixel, the component values ​​of the vector candidates are scaled by 4 times for convenience.

[0233] Specifically, the decoding unit 1730 can determine eight motion vector candidates ((base_x+1 / 4,base_y / 4) 2002, (base_x-1 / 4,base_y) 2003, (base_x,base_y+1 / 4) 2004, (base_x,base_y-1 / 4) 2005, (base_x+1 / 4,base_y+1 / 4) 2006, (base_x+1 / 4,base_y-1 / 4) 2007, (base_x-1 / 4,base_y+1 / 4) 2008, (base_x-1 / 4,base_y-1 / 4) 2009) located at a distance of approximately 1 / 4 pixel from the base motion vector as the first candidate group.

[0234] Furthermore, the decoding unit 1730 can determine eight motion vector candidates ((base_x+½,base_y) 2010, (base_x−½,base_y) 2011, (base_x,base_y+½) 2012, (base_x,base_y−½) 2013, (base_x+½,base_y+½) 2014, (base_x+½,base_y−½) 2015, (base_x−½,base_y+½) 2016, (base_x−½,base_y−½) 2017) located at a distance of approximately ½ pixel from the base motion vector as a second candidate group.

[0235] The decoding unit 1730 can determine eight motion vector candidates ((base_x+1,base_y) 2018, (base_x-1,base_y) 2019, (base_x,base_y+1) 2020, (base_x,base_y-1) 2021, (base_x+1,base_y+1) 2022, (base_x+1,base_y-1) 2023, (base_x-1,base_y+1) 2024, (base_x-1,base_y-1) 2025) that are located approximately one pixel away from the base motion vector as a third candidate group.

[0236] 21, the decoding unit 1730 may determine various distribution patterns of motion vector candidates included in each candidate group for each candidate group. Specifically, the decoding unit 1730 may determine motion vector candidates 2102, 2103, 2104, and 2105 having a diamond-shaped distribution based on a base motion vector 2101 as a first candidate group. The decoding unit 1730 may also determine motion vector candidates 2106, 2107, 2108, and 2109 having a rectangular distribution based on the base motion vector 2101 as a second candidate group. The decoding unit 1730 may also determine motion vector candidates 2110, 2111, 2112, and 2113 having a diamond-shaped distribution based on the base motion vector 2101 as a third candidate group. As shown in FIG. 21, the distribution of motion vector candidates in each candidate group may be determined in various distribution patterns in addition to the distribution patterns shown in FIG. 21.

[0237] The decoder 1730 can determine one or more base motion vectors. If there are two base motion vectors, motion vector candidates are also generated using each of the base motion vectors.

[0238] The decoding unit 1730 can perform bi-prediction. If bi-prediction is performed using the reference pictures in list 0 and list 1 as the base motion vector, the motion vector of each prediction direction is also corrected according to the temporal distance between the current picture and the reference picture.

[0239] For example, if the reference pictures of list 0 and list 1 are located in the same direction from the current picture, the correction directions of the base motion vectors of list 0 and list 1 are determined to be the same. Conversely, if the reference pictures of list 0 and list 1 are located in opposite directions from the current picture, the correction direction of the base motion vector of list 0 is determined to be opposite to the correction direction of the base motion vector of list 1.

[0240] Furthermore, the correction size of the base motion vector of list 0 and the correction size of the base motion vector of list 1 are determined to be proportional to the temporal distance between the reference picture of list 0 and the current picture, and the temporal distance between the reference picture of list 1 and the current picture, respectively. Therefore, if the temporal distance between the reference picture of list 0 and the current picture is twice the temporal distance between the reference picture of list 1 and the current picture, the correction size of the base motion vector of list 0 is determined to be twice the correction size of the base motion vector of list 0.

[0241] The correction size and correction direction indicated by the correction size information and correction direction information obtained from the bitstream are also applied to the basic motion vectors of list 0.

[0242] The correction size and correction direction used to correct the base motion vector of list 0 are also changed taking into account the distance between the reference picture of list 0 and the current picture and the distance between the reference picture of list 1 and the current picture, and the changed correction size and correction direction are then applied to the base motion vector of list 1.

[0243] Conversely, in some embodiments, the correction size and correction direction indicated by the correction size information and correction direction information are applied to the basic motion vectors of list 1, and the modified correction size and correction direction are also applied to the basic motion vectors of list 0.

[0244] Figure 22 shows an embodiment of a method for correcting two basic motion vectors using bi-prediction. In Figure 22, the basic motion vector 2202 of list 0 indicates (0, -1), and the basic motion vector 2212 of list 1 indicates (0, 2).

[0245] In UMVE mode, the correction size and correction direction are applied to both the base motion vector 2202 of list 0 and the base motion vector 2212 of list 1. When the correction size for the base motion vector 2202 in the list 0 direction is 1 and the correction direction is −y, the motion vector 2204 of list 0 becomes (0, −2).

[0246] The reference pictures of list 0 and list 1 are located in opposite directions from the current picture. Therefore, the correction direction of the base motion vector 2212 of list 1 is determined to be the opposite of the correction direction of the base motion vector 2202 of list 0. Therefore, the correction direction of the base motion vector 2212 of list 1 is determined to be +y.

[0247] The reference pictures of list 0 and list 1 are the same temporal distance away from the current picture. Therefore, the correction size of the base motion vector 2212 of list 1 is determined to be the same as the correction size of the base motion vector 2202 in the list 0 direction. Therefore, the correction size of the base motion vector 2212 of list 1 is determined to be 1.

[0248] Therefore, the motion vector 2214 of list 1 is determined to be (0, 3), which is larger in y component by 1 than the basic motion vector 2212 of list 1.

[0249] If the correction size associated with the basic motion vector 2202 in the list 0 direction is 2, the motion vector 2206 in the list 0 direction is determined to be (0, -3), and the motion vector 2216 in the list 1 direction is determined to be (0, 4). If the correction size associated with the basic motion vector 2202 in the list 0 direction is 4, the motion vector 2208 in the list 0 direction is determined to be (0, -5), and the motion vector 2218 in the list 1 direction is determined to be (0, 6).

[0250] If the prediction direction change permission information indicates that a change in the prediction direction is permitted, the decoder 1730 acquires prediction direction information from the bitstream and changes the prediction direction of the current block according to the prediction direction information. The prediction direction information may indicate whether or not to change the prediction direction. If the prediction direction information does not indicate a change in the prediction direction, the current block is predicted according to the prediction direction of the UMVE candidate. However, if the prediction direction information indicates a change in the prediction direction, the current block is predicted according to a prediction direction different from that of the UMVE candidate.

[0251] Additionally, the prediction direction information may indicate a changed prediction direction. For example, if the prediction direction of the UMVE candidate is list 0 uni-prediction, the prediction direction information may indicate one of list 1 uni-prediction and bi-prediction. Therefore, the prediction direction information may indicate whether the prediction direction is changed and the changed prediction direction.

[0252] If there is no change in the prediction direction, the prediction direction information is also set to 0. If there is a change in the prediction direction, the prediction direction information is also set to 10 or 11 depending on the changed prediction direction. For example, if the prediction direction of the UMVE candidate is list 0 uni-prediction, when the prediction direction of the current block is list 0 uni-prediction, the prediction direction information is also set to 0.

[0253] If the prediction direction of the current block is bi-predictive or list 1 uni-predictive, the prediction direction information is also set to 10 or 11. According to an embodiment, if the prediction direction of the UMVE candidate is uni-predictive and the prediction direction of the current block is bi-predictive, the prediction direction information is also set to 10. According to an embodiment, if the prediction direction of the UMVE candidate is uni-predictive and the prediction direction of the current block is uni-predictive in the other direction, the prediction direction information is also set to 11.

[0254] As another example, when the prediction direction of the UMVE candidate is list 1 uni-prediction, the prediction direction information is also set to 0 when the prediction direction of the current block is list 1 uni-prediction.

[0255] If the prediction direction of the current block is bi-predictive or list 0 uni-predictive, the prediction direction information is also set to 10 or 11. According to an embodiment, if the prediction direction of a UMVE candidate is uni-predictive and the prediction direction of the current block is bi-predictive, the prediction direction information is also set to 10. According to an embodiment, if the prediction direction of a UMVE candidate is uni-predictive and the prediction direction of the current block is uni-predictive in the other direction, the prediction direction information is also set to 11.

[0256] As another example, when the prediction direction of the UMVE candidate is bi-predictive, the prediction direction information may be set to 0 if the prediction direction of the current block is bi-predictive.

[0257] If the prediction direction of the current block is list 0 uni-predictive or list 1 uni-predictive, the prediction direction information is also set to 10 or 11. According to an embodiment, if the prediction direction of the UMVE candidate is bi-predictive and the prediction direction of the current block is list 0 uni-predictive, the prediction direction information is also set to 10. According to an embodiment, if the prediction direction of the UMVE candidate is bi-predictive and the prediction direction of the current block is list 1 uni-predictive, the prediction direction information is also set to 11.

[0258] If the prediction direction information indicates a change in the prediction direction, the decoder 1730 may modify the motion vector of the UMVE candidate according to the modified prediction direction. For example, if the prediction direction of the UMVE candidate is list 0 uni-prediction and the prediction direction of the current block is list 1 uni-prediction, the motion vector of list 0 is modified to be suitable for prediction using the reference picture of list 1. Specifically, the motion vector of list 0 is scaled and modified according to the ratio between the temporal distance between the reference picture of list 0 and the current picture and the temporal distance between the reference picture of list 1 and the current picture.

[0259] For example, if the motion vector of list 0 is (8, 6) and the ratio of the temporal distance between the reference picture of list 0 and the current picture and the temporal distance between the reference picture of list 1 and the current picture is 2:1, the motion vector of list 1 can also be determined as (4, 3). If the temporal distance ratio is 2:-1, that is, if the reference picture of list 1 and the reference picture of list 0 are in different directions from the current picture, the motion vector of list 1 can also be determined as (-4, -3).

[0260] If the prediction direction of a UMVE candidate is list 0 uni-predictive and the prediction direction of the current block is bi-predictive, a motion vector of list 1 can be obtained based on the motion vector of list 0 of the UMVE candidate. The motion vector of list 1 can also be obtained by scaling the motion vector related to the reference picture of list 0 according to the ratio between the temporal distance between the reference picture of list 0 and the current picture and the temporal distance between the reference picture of list 1 and the current picture. The reference picture of list 1 is also determined as a picture located in a specific order in list 1. The reference picture and motion vector of list 0 and the reference picture and motion vector of list 1 can both be used to predict the current block.

[0261] Similarly, when the prediction direction of a UMVE candidate is list 1 uni-prediction and the prediction direction of the current block is bi-prediction, the motion vector of list 0 can be obtained from the motion vector of list 1. The reference picture of list 0 is also determined to be a picture located in a specific order of list 0. The reference picture and motion vector of list 0 and the reference picture and motion vector of list 1 can both be used to predict the current block.

[0262] If the prediction direction of the UMVE candidate is bi-predictive and the prediction direction of the current block is list 0 uni-predictive, the current block is predicted using only the motion vectors and reference pictures of list 0 among the motion vectors and reference pictures of list 0 and the motion vectors and reference pictures of list 1. Conversely, if the changed prediction direction is bi-predictive and the changed prediction direction is list 1 uni-predictive, the current block is predicted using only the motion vectors and reference pictures of list 1 among the motion vectors and reference pictures of list 0 and the motion vectors and reference pictures of list 1.

[0263] When the primary prediction direction information is acquired, the decoding unit 1730 can change the motion vector of the UMVE candidate according to the primary prediction direction indicated by the primary prediction direction information. If the primary prediction direction of the current picture and the reference prediction direction of the UMVE candidate are the same, the current block is predicted using the reference picture and motion vector of the UMVE candidate. However, if the primary prediction direction of the current picture and the reference prediction direction of the UMVE candidate are different, the motion vector of the UMVE candidate is changed according to the primary prediction direction. The change of the motion vector and reference picture of the UMVE candidate according to the primary prediction direction is performed in the same manner as the change of the motion vector and reference picture of the UMVE candidate according to the prediction direction information.

[0264] According to an embodiment, the decoding unit 1730 may acquire primary prediction direction information and, if a change in prediction direction is permitted according to the prediction direction change permission information, change the prediction direction of the current block according to the prediction direction information. When the primary prediction direction information is set, the prediction direction information indicates a prediction direction of the current block among the primary prediction direction and two alternate prediction directions. If the prediction direction information indicates the primary prediction direction, the current block is predicted according to the primary prediction direction. However, if the prediction direction information indicates an alternate prediction direction, the current block is predicted according to the prediction direction indicated by the prediction direction information among the two alternate prediction directions. When the primary prediction direction information is set, the prediction direction information may assign 0 to the primary prediction direction, 10 to the first alternate prediction direction, and 11 to the second alternate prediction direction. The two alternate prediction directions associated with the primary prediction direction may be determined by various methods according to various embodiments.

[0265] If the decoder 1730 is able to correct a base motion vector multiple times based on the multiple correction allowance information, the decoder 1730 can correct the corrected base motion vector once more. Accordingly, the decoder 1730 can acquire additional correction size information and additional correction direction information from the bitstream. The decoder 1730 can then correct the base motion vector once more based on the additional correction size determined by the additional correction size information and the additional correction direction determined by the additional correction direction information.

[0266] When the correction size is equal to or greater than a threshold value, the decoder 1730 may acquire additional correction size information and additional correction direction information. The additional correction size and additional correction direction indicated by the additional correction size information and additional correction direction information are also limited by the correction size and correction direction. For example, the additional correction size may be determined to be smaller than the correction size. Alternatively, the additional correction direction may be determined to be different from the correction direction.

[0267] The decoding unit 1730 may reconstruct the current block based on the motion vector and reference picture of the current block. When the prediction direction of the current block is list 0 uni-prediction or list 1 uni-prediction, the decoding unit 1730 may predict the current block using one motion vector and reference picture. When the prediction direction of the current block is bi-prediction, the decoding unit 1730 may predict the current block using the motion vector and reference picture of list 0 and the motion vector and reference picture of list 1.

[0268] The decoding unit 1730 may reconstruct the current block based on the prediction result of the current block. The decoding unit 1730 may reconstruct the current block based on the predicted block of the current block and the residual block of the current block. The residual block of the current block indicates a difference between the reconstructed block of the current block and the predicted block.

[0269] The UMVE candidate number information, correction size candidate number information, correction direction candidate number information, UMVE candidate list configuration information, correction size range information, main prediction direction information, UMVE index, correction size information and correction direction information, prediction direction information, additional correction size information, and additional correction direction information decoded by the video decoding device 1700 are also binarized by fixed length coding or truncated unary coding.

[0270] The functions of the high-level parameter determination unit 1710, the coding mode determination unit 1720, and the decoding unit 1730 are also performed in the decoding unit 170 of FIG. 1B.

[0271] Figures 23 to 25 illustrate an example of a method for selecting an inter-mode tool for a reference picture and a motion vector of a current block. Figures 23 to 25 commonly illustrate a syntax structure of a coding unit. According to the syntax structure according to the embodiment, when the current block is in skip mode or direct mode, the UMVE mode is also selected. In Figures 23 to 25, ae(v) indicates that the syntax element in the same row is entropy decoded. Therefore, cu_skip_flag[x0][y0] and cu_skip_umve[x0][y0] in Figure 23, cu_direct[x0][y0] and affine_dir[x0][y0] in Figure 24, and cu_direct[x0][y0] and cu_direct_umve[x0][y0] in Figure 25 are entropy decoded.

[0272] 23 discloses a method for selecting an inter-mode tool for a current block in skip mode. In skip mode, most of the coding information required to reconstruct the current block is omitted, and the current block is reconstructed using only a portion of the coding information. Therefore, by omitting the coding information required to reconstruct the current block, coding efficiency is improved.

[0273] According to the embodiment of FIG. 23, an inter mode tool may be used in skip mode. According to one embodiment, UMVE mode, affine mode, and merge mode may be used in skip mode. According to one embodiment, cu_skip_flag[x0][y0] indicating whether skip mode is applied to the current block is obtained. If skip mode is applied to the current block (if(cu_skip_flag[x0][y0])), cu_skip_umve[x0][y0] indicating whether the inter mode tool of the current block is UMVE mode is obtained. If UMVE mode is applied to the current block (if(cu_skip_umve[x0][y0]), cu_mode=skip_UMVE), information related to the base motion vector of the current picture and neighboring blocks included in the reference picture, and correction size information and correction direction information related to correction of the base motion vector are obtained (mvp_idx_umve(x0, y0, identical_list0_list1 flag)). If the UMVE mode is not applied to the current block, the affine mode (cu_mode=skip_AFFINE) or the merge mode (cu_mode=SKIP) can be applied to the current block.

[0274] In the embodiment of Figure 23, the order of application of the UMVE mode, affine mode, and merge mode is determined. However, those skilled in the art would be able to easily change the type of inter-mode tool applied in skip mode. Also, those skilled in the art would be able to change the order of determination of the inter-mode tools applied in skip mode.

[0275] 24 discloses a method for selecting an inter-mode tool for a current block in direct mode when the slice type of the current slice including the current block is P type. In direct mode, some of the coding information required to determine the motion vector of the current block is omitted. Therefore, the reduction in coding information required to determine the motion vector of the current block improves coding efficiency.

[0276] According to the embodiment of FIG. 24, when the slice type of the current slice is P, the UMVE mode and the affine mode can be used in the direct mode. According to one embodiment, cu_direct[x0][y0] is obtained, indicating whether the direct mode is applied to the current block. If the direct mode is applied to the current block (if(cu_direct[x0][y0])), affine_dir[x0][y0] is obtained, indicating whether the inter-mode tool of the current block is affine mode. If the affine mode is not applied to the current block (if(affine_dir[x0][y0])), it is determined that the UMVE mode is applied to the current block (cu_mode=DIR_UMVE). If the UMVE mode is applied to the current block, information related to neighboring blocks including the base motion vector of the current picture and the reference picture, and correction size information and correction direction information related to correction of the base motion vector are obtained (mvp_idx_umve(x0, y0, identical_list0_list1 flag)).

[0277] In the embodiment of Figure 24, the order of application of the affine mode and the UMVE mode is determined. However, those skilled in the art would be able to easily change the type of inter-mode tool applied in the direct mode. Also, those skilled in the art would be able to change the order of determination of the inter-mode tools applied in the direct mode.

[0278] FIG. 25 discloses a method for selecting an inter-mode tool for a current block in direct mode when the slice type of the current slice including the current block is type B.

[0279] According to the embodiment of FIG. 25, when the slice type of the current slice is type B, the UMVE mode, affine mode, or merge mode may be used. According to one embodiment, cu_direct[x0][y0] indicating whether the direct mode is applied to the current block is obtained. If the direct mode is applied to the current block (if(cu_direct[x0][y0])), cu_direct_umve[x0][y0] indicating whether the inter mode tool of the current block is the UMVE mode is obtained. If the UMVE mode is applied to the current block (if(cu_direct_umve[x0][y0]), cu_mode=DIR_UMVE), information related to neighboring blocks including the base motion vector of the current picture and the reference picture, and correction size information and correction direction information related to correction of the base motion vector are obtained (mvp_idx_umve(x0, y0, identical_list0_list1 flag)). If the UMVE mode is not applied to the current block, the affine mode (cu_mode=DIR_AFFINE) or the merge mode (cu_mode=DIR) can be applied to the current block.

[0280] 25, the order of application of the UMVE mode, affine mode, and merge mode is determined. However, those skilled in the art could easily change the type of inter-mode tool applied in direct mode. Also, those skilled in the art could easily change the order of determination of the inter-mode tools applied in direct mode.

[0281] FIG. 26 illustrates a flowchart of a decoding method in the UMVE mode of the video decoding device 1700 of FIG.

[0282] In step 2610, it is determined whether the UMVE mode is allowed for the upper data unit including the current block. Whether the UMVE mode is allowed for the upper data unit can be determined based on the UMVE allow flag obtained from the bitstream.

[0283] If the UMVE mode is allowed for the upper data unit, UMVE candidate number information indicating the number of UMVE candidates for the UMVE mode allowed for the upper data unit and UMVE candidate list configuration information indicating how to configure a motion vector candidate list referenced by multiple blocks of the upper data unit can be obtained from the bitstream.

[0284] Correction size candidate number information indicating the number of correction size candidates may be obtained from the bitstream, correction size range information for a plurality of blocks of the upper data unit may be obtained, and correction size change information for a plurality of blocks of the upper data unit may be obtained.

[0285] Correction direction candidate number information indicating the number of correction direction candidates can be acquired from the bitstream.

[0286] Prediction direction change permission information for a plurality of blocks of the higher-level data unit may be obtained from the bitstream, and main prediction direction information indicating a main prediction direction of the higher-level data unit may be obtained from the bitstream.

[0287] In step 2620, if the UMVE mode is allowed for the upper data unit, it is determined whether the UMVE mode is applied to the current block. Whether the UMVE mode is applied to the current block may be determined based on a UMVE flag obtained from the bitstream. If the UMVE mode is not applied to the current block, another inter prediction mode other than the UMVE mode may be applied to the current block.

[0288] The number of UMVE candidates for the current block indicated by the UMVE candidate number information can be determined. The method for constructing the UMVE candidate list can be determined by the UMVE candidate list configuration information. The UMVE candidate list for the current block can be constructed according to the number of UMVE candidates and the method for constructing the UMVE candidate list.

[0289] In addition, the number of correction size candidates for the current block indicated by the correction size candidate number information may be determined. Correction size candidates may be determined based on the correction size range indicated by the correction size range information. In addition, when the correction size change information indicates that the correction size of the base motion vector is adaptively changed depending on the distance between the current picture of the current block and the reference picture, the correction size range may be changed depending on the distance between the current picture of the current block and the reference picture.

[0290] In addition, the number of correction direction candidates for the current block indicated by the correction direction candidate number information can be determined.

[0291] When the UMVE mode is applied to the current block and the prediction direction change permission information indicates that a change in prediction direction is permitted, prediction direction information can be obtained from the bitstream.

[0292] In step 2630, if the UMVE mode is applied to the current block, a base motion vector of the current block is determined. A UMVE candidate is determined from the determined UMVE candidate list. Then, a reference picture and a base motion vector can be extracted from a neighboring block of the current block indicated by the UMVE candidate.

[0293] In step 2640, a correction size and a correction direction for correcting the base motion vector are determined. The correction size of the base motion vector among the correction size candidates may be determined based on correction size information acquired from the bitstream. The correction direction of the base motion vector among the correction direction candidates may be determined based on correction direction information acquired from the bitstream.

[0294] The corrected basic motion vector is further corrected according to an additional correction size and an additional correction direction. According to an embodiment, if the correction size is equal to or greater than a threshold value, the basic motion vector may be further corrected. The additional correction size may be determined to be smaller than the correction size.

[0295] In step 2650, a motion vector of the current block is determined by correcting the base motion vector according to the correction size and the correction direction. Then, the motion vector of the current block and the reference picture may be changed according to the prediction direction indicated by the prediction direction information. If a primary prediction direction is determined for the higher-level data unit, the prediction direction information may indicate a prediction direction of the current block in the primary prediction direction and two preliminary prediction directions. If a primary prediction direction is not determined for the higher-level data unit, the prediction direction information may indicate a prediction direction of the current block in the prediction direction of a UMVE candidate and the remaining two prediction directions.

[0296] In step 2660, the current block is reconstructed based on the motion vector of the current block.

[0297] The inter prediction method according to the UMVE mode performed in the video decoding device 1700 of FIG. 17 is also applied to the decoding method according to the UMVE mode of FIG.

[0298] FIG. 27 illustrates a block diagram of a video encoding device 2800 that performs inter prediction according to the UMVE mode.

[0299] The video encoding device 2700 includes an encoding parameter determination unit 2710, a motion vector determination unit 2720, an encoding information determination unit 2730, and an output unit 2740. In Figure 27, the encoding parameter determination unit 2710, the motion vector determination unit 2720, the encoding information determination unit 2730, and the output unit 2740 are shown as separate components, but according to an embodiment, the encoding parameter determination unit 2710, the motion vector determination unit 2720, the encoding information determination unit 2730, and the output unit 2740 may be combined into one component.

[0300] 27, the coding parameter determination unit 2710, the motion vector determination unit 2720, the coding information determination unit 2730, and the output unit 2740 are expressed as a structural unit located in a single device, but the devices responsible for the functions of the coding parameter determination unit 2710, the motion vector determination unit 2720, the coding information determination unit 2730, and the output unit 2740 do not necessarily have to be physically adjacent to each other. Therefore, depending on the embodiment, the coding parameter determination unit 2710, the motion vector determination unit 2720, the coding information determination unit 2730, and the output unit 2740 may be distributed.

[0301] The coding parameter determination unit 2710, the motion vector determination unit 2720, the coding information determination unit 2730, and the output unit 2740 may be implemented by one processor or by multiple processors depending on the embodiment.

[0302] The encoding parameter determination unit 2710 determines whether the UMVE mode is allowed for the upper data unit including the current block. The encoding parameter determination unit 2710 may determine whether the UMVE mode is allowed based on the frequency with which the UMVE mode is used in the upper data unit. Alternatively, the encoding parameter determination unit 2710 may determine whether the UMVE mode is allowed based on image characteristics.

[0303] The motion vector determination unit 2720 determines a motion vector of a current block. The motion vector determination unit 2720 may obtain a plurality of motion vectors from neighboring blocks of the current block. The motion vector determination unit 2720 may then determine the motion vector of the current block by scanning the neighboring motion vectors. The motion vector determination unit 2720 may determine an optimal motion vector as the motion vector of the current block through rate-distortion optimization.

[0304] If the UMVE mode is allowed for the higher data unit, the coding information decision unit 2730 determines whether the UMVE mode is applied to the current block based on the motion vector. The coding information decision unit 2730 may determine whether the motion vector of the current block determined by the motion vector decision unit 2720 is derived in the UMVE mode. If the motion vector of the current block is derived in the UMVE mode, the coding information decision unit 2730 may decide to apply the UMVE mode to the current block. Alternatively, if the minimum error between the motion vector of the current block and the motion vector according to the UMVE mode is less than or equal to a critical value, the coding information decision unit 2730 may decide to apply the UMVE mode to the current block.

[0305] When the UMVE mode is applied to the current block, the coding information determination unit 2730 determines a base motion vector of the current block and a correction size and correction direction for correcting the base motion vector according to the motion vector of the current block. The coding information determination unit 2730 may determine the correction size and correction direction according to the difference between the motion vector of the current block and the base motion vector of the current block.

[0306] The output unit 2740 outputs a bitstream including coding information of the current block according to the UMVE mode. The coding information may include a UMVE permission flag, a UMVE flag, UMVE candidate number information, correction size candidate number information, correction direction candidate number information, UMVE candidate list configuration information, correction size range information, correction size change information, prediction direction change permission information, primary prediction direction information, and multiple correction permission information.

[0307] The functions of the coding parameter determination unit 2710, the motion vector determination unit 2720, and the coding information determination unit 2730 are also performed in the coding unit 110 of Fig. 1A. The function of the output unit 2740 is also performed in the bitstream generation unit 120 of Fig. 1A.

[0308] FIG. 28 illustrates a flowchart of an encoding method according to the UMVE mode of the video encoding device 2800 of FIG.

[0309] In step 2810, it is determined whether the UMVE mode is allowed for the upper data unit including the current block. Whether the UMVE mode is allowed may be determined based on the frequency with which the UMVE mode is used in the upper data unit, or based on the characteristics of the image.

[0310] In operation 2820, a motion vector for the current block is determined. Multiple motion vectors may be obtained from neighboring blocks of the current block. The motion vector for the current block may then be determined by scanning the neighboring motion vectors. An optimal motion vector may be determined as the motion vector for the current block through rate-distortion optimization.

[0311] In step 2830, if the UMVE mode is allowed for the upper data unit, it is determined whether the UMVE mode is applied to the current block based on the motion vector. It is also determined whether the motion vector of the current block can be derived in the UMVE mode. If the motion vector of the current block can be derived in the UMVE mode, it is also determined that the UMVE mode is applied to the current block. Alternatively, if the minimum error between the motion vector of the current block and the motion vector according to the UMVE mode is less than a critical value, it is also determined that the UMVE mode is applied to the current block.

[0312] In step 2840, a base motion vector of the current block and a correction size and correction direction for correcting the base motion vector are determined based on the motion vector. The correction size and correction direction can be determined based on the difference between the motion vector of the current block and the base motion vector of the current block.

[0313] In step 2850, a bitstream including information about the UMVE mode of the current block is output.

[0314] The inter prediction method according to the UMVE mode performed in the video encoding device 2700 of FIG. 27 is also applied to the encoding method according to the UMVE mode of FIG.

[0315] According to the video encoding technique based on the tree-structured coding unit described with reference to Figures 1 to 28, spatial domain video data is encoded for each tree-structured coding unit, and according to the video decoding technique based on the tree-structured coding unit, the spatial domain video data is restored while decoding is performed for each maximum coding unit, and video, which is a picture and a picture sequence, may be restored. The restored video may be played back by a playback device, stored on a recording medium, or transmitted over a network.

[0316] Meanwhile, the above-described embodiments of the present disclosure can be written as a computer-executable program, and can also be implemented in a general-purpose digital computer that runs the program using a computer-readable recording medium.

[0317] While the present disclosure has been described in connection with certain best embodiments, other alternatives, variations, and modifications to the present disclosure will be apparent to those skilled in the art in light of the foregoing description. Therefore, the claims are intended to encompass all such alternatives, variations, and modifications. Accordingly, all content described in the specification and drawings is intended to be illustrative and not limiting.

[0318] The means taught by the present application are listed below as examples.

[0319] (Appendix 1) determining whether an ultimate motion vector expression (UMVE) mode is allowed for an upper data unit including the current block; If the upper data unit is allowed to use the UMVE mode, determining whether the UMVE mode is applied to the current block; determining a base motion vector of the current block if a UMVE mode is applied to the current block; determining a correction size and a correction direction for correcting the basic motion vector; correcting the base motion vector according to the correction size and the correction direction to determine a motion vector of the current block; and restoring the current block based on the motion vector of the current block. (Appendix 2) The video decoding method according to claim 1, wherein the higher-level data unit is one of a sequence, a picture, and a slice. (Appendix 3) The step of determining whether the UMVE mode is allowed comprises: obtaining a UMVE enable flag from the bitstream; determining whether the UMVE mode is allowed for the upper data unit according to the UMVE allowance flag; The step of determining whether the UMVE mode is applied to the current block includes: obtaining a UMVE flag from the bitstream, the UMVE flag indicating whether a UMVE mode is applied to the current block; determining whether a UMVE mode is applied to the current block according to the UMVE flag; The step of determining a base motion vector of the current block comprises: obtaining a UMVE index indicating a UMVE candidate including a base motion vector and a reference picture of the current block from the bitstream; determining a base motion vector and a reference picture of the current block according to the UMVE index; The step of determining the correction size and the correction direction includes: obtaining correction size information indicating a correction size of the base motion vector and correction direction information indicating a correction direction of the base motion vector from the bitstream; and determining a correction size and a correction direction of the base motion vector according to the correction size information and the correction direction information. (Appendix 4) The step of determining whether the UMVE mode is applied includes: The video decoding method of Supplementary Note 1, further comprising the step of applying a first inter prediction mode other than the UMVE mode to the current block if the UMVE mode is not applied to the current block. (Appendix 5) The video decoding method includes: If the UMVE mode is allowed for the upper data unit, acquiring UMVE candidate number information indicating the number of UMVE candidates of the UMVE mode allowed for the upper data unit, correction size candidate number information indicating the number of correction size candidates, and correction direction candidate number information indicating the number of correction direction candidates from the bitstream; When the UMVE mode is applied to the current block, determining reference picture candidates, the correction size candidates, and the correction direction candidates of the current block based on the number of UMVE candidates indicated by the UMVE candidate number information, the number of correction size candidates indicated by the correction size candidate number information, and the number of correction direction candidates indicated by the correction direction candidate number information, The step of determining the base motion vectors comprises: determining a base motion vector of the current block based on the base motion vector selected from the UMVE candidates; The step of determining the correction size and the correction direction includes: The video decoding method according to claim 1, further comprising determining a correction size from the correction size candidates and determining a correction direction from the correction direction candidates. (Appendix 6) The video decoding method includes: If the UMVE mode is allowed for the higher level data unit, the method further includes obtaining UMVE candidate list configuration information from a bitstream, the UMVE candidate list configuration information indicating a method for configuring a motion vector candidate list referred to by a plurality of blocks of the higher level data unit; The step of determining the base motion vectors comprises: constructing a UMVE candidate list for the current block according to the UMVE candidate list configuration information; determining a base motion vector and a reference picture for the current block from the UMVE candidate list. (Appendix 7) The UMVE candidate list configuration information is The video decoding method described in Appendix 6, characterized in that it shows a first list determination method for determining a UMVE candidate list using a merge motion vector candidate list, or a second list determination method for determining a UMVE candidate list based on the motion vectors frequently used in the current picture. (Appendix 8) The video decoding method includes: If the UMVE mode is allowed for the upper data unit, the method further includes obtaining correction size range information for a plurality of blocks of the upper data unit from a bitstream; The step of determining the correction size and the correction direction includes: 2. The video decoding method of claim 1, further comprising determining a correction size of the base motion vector based on the correction size range indicated by the correction size range information. (Appendix 9) The video decoding method includes: If the UMVE mode is allowed for the upper data unit, the method further includes obtaining correction size change information for a plurality of blocks of the upper data unit from a bitstream; The step of determining the correction size and the correction direction includes: When the correction size change information indicates that the correction size of the base motion vector is adaptively changed depending on the distance between the current picture of the current block and the reference picture, the video decoding method described in Supplementary Note 1 is characterized in that it includes a step of changing the correction size of the base motion vector depending on the distance between the current picture of the current block and the reference picture. (Appendix 10) The video decoding method includes: If the UMVE mode is allowed for the upper data unit, obtaining prediction direction change allowance information for a plurality of blocks of the upper data unit from a bitstream; When the UMVE mode is applied to the current block and the prediction direction change permission information indicates that the prediction direction change is permitted, obtaining prediction direction information from the bitstream, The step of determining the motion vector comprises: 2. The video decoding method of claim 1, further comprising: changing a motion vector of the current block according to a prediction direction indicated by the prediction direction information. (Appendix 11) The video decoding method includes: determining a primary prediction direction of the UMVE mode if the UMVE mode is allowed for the upper data unit; The step of determining the motion vector comprises: determining the motion vector based on the primary prediction direction; When the prediction direction change information indicates that the prediction direction is changed, changing the base motion vector according to an auxiliary prediction direction other than the primary prediction direction; The step of determining the correction size and the correction direction includes: determining the correction size and the correction direction based on the primary prediction direction; and when the prediction direction change information indicates that the prediction direction is changed, changing the correction size and the correction direction according to an auxiliary prediction direction other than the primary prediction direction. (Appendix 12) The video decoding method includes: When the correction size is equal to or greater than a threshold value, determining an additional correction size and an additional correction direction for further correcting the basic motion vector, The motion vector determination of the current block includes: determining a motion vector of the current block according to the correction size, the correction direction, the additional correction size, and the additional correction direction; 2. The video decoding method of claim 1, wherein the additional correction size is smaller than the correction size. (Appendix 13) Determine whether the UMVE (ultimate motion vector expression) mode is allowed for the upper data unit containing the current block, If the upper data unit is allowed to use the UMVE mode, determining whether the UMVE mode is applied to the current block; If the UMVE mode is applied to the current block, a base motion vector of the current block is determined, and a correction size and a correction direction for correcting the base motion vector are determined; correcting the base motion vector according to the correction size and the correction direction to determine a motion vector of the current block; A video decoding device comprising: a processor for reconstructing the current block based on a motion vector of the current block. (Appendix 14) determining whether an ultimate motion vector expression (UMVE) mode is allowed for an upper data unit including the current block; determining a motion vector for the current block; If the upper data unit is allowed to use the UMVE mode, determining whether the UMVE mode is applied to the current block according to the motion vector; determining a base motion vector of the current block and a correction size and a correction direction for correcting the base motion vector according to the motion vector; and outputting a bitstream including information related to the UMVE mode of the current block. (Appendix 15) Determine whether the UMVE (ultimate motion vector expression) mode is allowed for the upper data unit containing the current block, determining a motion vector for the current block; If the upper data unit is allowed to use the UMVE mode, it is determined whether the UMVE mode is applied to the current block according to the motion vector; determining a base motion vector of the current block and a correction size and a correction direction for correcting the base motion vector according to the motion vector; a processor for outputting a bitstream including encoding information of the current block in UMVE mode;

Claims

1. obtaining correction size range information indicating one of a plurality of correction size candidate sets from a bitstream; When a first MV prediction mode for predicting a motion vector is applied to the current block, obtaining information related to a motion vector from the bitstream, and determining a base motion vector indicated by the information related to the motion vector from a motion vector candidate list of the current block; obtaining correction size information and correction direction information from the bitstream; determining a correction size using the correction size range information and the correction size information; correcting the base motion vector according to the correction size and the correction direction information to determine a motion vector of the current block; one of the plurality of correction size candidate sets includes a plurality of candidates; one correction size candidate set is selected from the plurality of correction size candidate sets according to the correction size range information; The correction size is determined to be one of the correction size candidates included in the selected correction size candidate set indicated by the correction size information; A video decoding method, characterized in that, among the plurality of correction size candidate sets, a first correction size candidate set includes the correction size candidate {1,2}, and a second correction size candidate set does not include the correction size candidate {1,2}.

2. Acquire correction size range information indicating one of a plurality of correction size candidate sets from the bitstream; When a first MV prediction mode for predicting a motion vector is applied to the current block, information related to the motion vector is obtained from the bitstream, and a base motion vector indicated by the information related to the motion vector is determined from a motion vector candidate list of the current block; obtaining correction size information and correction direction information from the bitstream; determining a correction size using the correction size range information and the correction size information; a processor for performing an operation of correcting the base motion vector according to the correction size and the correction direction information and determining a motion vector of the current block; one of the plurality of correction size candidate sets includes a plurality of candidates; one correction size candidate set is selected from the plurality of correction size candidate sets according to the correction size range information; The correction size is determined to be one of the correction size candidates included in the selected correction size candidate set indicated by the correction size information; A video decoding device characterized in that, among the plurality of correction size candidate sets, a first correction size candidate set includes correction size candidate {1,2}, and a second correction size candidate set does not include the correction size candidate {1,2}.

3. generating correction size range information indicating one of a plurality of correction size candidate sets; determining a base motion vector from a motion vector candidate list of the current block when a first MV prediction mode for predicting a motion vector is applied to the current block, and generating information related to the motion vector for indicating the base motion vector from the motion vector candidate list; determining a correction size and a correction direction based on a difference between the motion vector of the current block and the base motion vector; generating correction size information indicating the correction size selected from the one correction size candidate set; generating correction direction information for indicating the correction direction; and outputting a bitstream including the correction size range information, the correction size information, and the correction direction information, one of the plurality of correction size candidate sets includes a plurality of candidates; the correction size range information indicates one correction size candidate set among the plurality of correction size candidate sets, the correction size information indicates the correction size among the correction size candidates included in the correction size candidate set, A video encoding method, characterized in that, among the plurality of correction size candidate sets, a first correction size candidate set includes correction size candidate {1,2}, and a second correction size candidate set does not include correction size candidate {1,2}.

4. 1. A method for transmitting a bitstream generated by encoding video, comprising: generating correction size range information indicating one of a plurality of correction size candidate sets; determining a base motion vector from a motion vector candidate list of the current block when a first MV prediction mode for predicting a motion vector is applied to the current block, and generating information related to the motion vector for indicating the base motion vector from the motion vector candidate list; determining a correction size and a correction direction based on a difference between the motion vector of the current block and the base motion vector; generating correction size information indicating the correction size selected from the one correction size candidate set; generating correction direction information for indicating the correction direction; outputting the bitstream including the first MV prediction mode allowance information, the correction size range information, the correction size information, and the correction direction information, one of the plurality of correction size candidate sets includes a plurality of candidates; the correction size range information indicates one correction size candidate set among the plurality of correction size candidate sets, the correction size information indicates the correction size among the correction size candidates included in the correction size candidate set, A method characterized in that, among the plurality of correction size candidate sets, a first correction size candidate set includes the correction size candidate {1,2}, and a second correction size candidate set does not include the correction size candidate {1,2}.

Citation Information

Patent Citations

  • Video encoding device and video decoding device using high precision skip encoding, and method thereof

    JP2017537529A