Motion vector encoding device and method, and motion vector decoding device and method

By selecting and combining peripheral block motion vectors with differential vectors based on bitstream information, the method enhances motion vector prediction accuracy and reduces vector size in video encoding and decoding.

JP7789870B2Active Publication Date: 2025-12-22SAMSUNG ELECTRONICS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024158162
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-01-26
Filing Date
2024-09-12
Publication Date
2025-12-22
Estimated Expiration
2041-01-27

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies face challenges in improving the prediction accuracy of motion vectors and reducing the size of differential motion vectors in bitstreams.

Method used

A method that selects available peripheral blocks to obtain a predicted motion vector from adjacent blocks and combines it with a differential motion vector to determine the current block's motion vector, using information from the bitstream to guide the selection process.

Benefits of technology

Improves motion vector prediction accuracy and reduces the size of differential motion vectors in bitstreams, enhancing encoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007789870000001
    Figure 0007789870000001
  • Figure 0007789870000002
    Figure 0007789870000002
  • Figure 0007789870000003
    Figure 0007789870000003
Patent Text Reader

Abstract

To provide a motion vector coding device and method, and a motion vector decoding device and method.SOLUTION: A motion vector decoding method according an embodiment is disclosed, which includes the steps of: determining availability of a first peripheral block selected by information acquired from a bitstream, of peripheral blocks adjacent to a current block; when the first peripheral block is identified not to be available from information indicating the availability of the first peripheral block, or when a reference image index of the first peripheral block in a same prediction direction as a prediction direction of the current block is the same value as a value determined in advance, acquiring a predicted motion vector of the current block from a motion vector of a second peripheral block adjacent to the current block and at a position determined in advance; and joining the predicted motion vector of the current block and a differential motion vector to each other to acquire a motion vector of the current block.SELECTED DRAWING: Figure 20
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to the field of video encoding and decoding, and more particularly to an apparatus and method for encoding and decoding a current motion vector using neighboring motion vectors. [Background technology]

[0002] In encoding and decoding of video, the video is divided into blocks, and each block can be predictively encoded and predictively decoded through inter prediction or intra prediction.

[0003] Inter-prediction is a method for compressing images by removing temporal redundancy between images, and motion estimation coding is a typical example. Motion estimation coding predicts a block of a current image using at least one reference image. A predetermined evaluation function can be used to search for a reference block most similar to the current block within a predetermined search range. The current block is predicted based on the reference block, and the resulting predicted block is subtracted from the current block to generate and encode a residual block. To make the prediction more accurate, the reference image can be interpolated to generate pixels in sub-pel units, which are smaller than integer pel units, and inter-prediction can be performed based on the sub-pel pixels.

[0004] In codecs such as H.264 AVC (Advanced Video Coding) and HEVC (High Efficiency Video Coding), the motion vector of a previously coded block adjacent to the current block or a block included in a previously coded image is used to predict the motion vector of the current block. A differential motion vector, which is the difference between the motion vector of the current block and the motion vector of the previously coded block, is signaled to a decoder side in a predetermined manner. Summary of the Invention [Problem to be solved by the invention]

[0005] A motion vector encoding apparatus and method, and a motion vector decoding apparatus and method according to an embodiment aim to improve prediction accuracy of a motion vector of a current block.

[0006] Furthermore, a motion vector encoding device and method, and a motion vector decoding device and method according to an embodiment have a technical object to reduce the size of a differential motion vector included in a bitstream. [Means for solving the problem]

[0007] A motion vector decoding method according to one embodiment also includes the steps of: selecting a first peripheral block from among peripheral blocks adjacent to a current block based on information obtained from a bitstream; if the first peripheral block is identified as available using information indicating the availability of the first peripheral block and there is no motion vector of the first peripheral block in the same prediction direction as the prediction direction of the current block, obtaining a predicted motion vector of the current block from a motion vector of a second peripheral block at a predetermined position adjacent to the current block; and combining the predicted motion vector of the current block and a differential motion vector to obtain a motion vector of the current block. [Effects of the Invention]

[0008] A motion vector encoding apparatus and method and a motion vector decoding apparatus and method according to an embodiment may improve prediction accuracy of a motion vector of a current block.

[0009] Furthermore, the motion vector encoding device and method, and the motion vector decoding device and method according to an embodiment can reduce the size of the differential motion vector included in the bitstream.

[0010] However, the effects that can be achieved by the motion vector encoding device and method, and the motion vector decoding device and method according to one embodiment are not limited to those mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art in the technical field to which this disclosure pertains from the following description. [Brief explanation of the drawings]

[0011] In order to more fully understand the drawings referred to herein, a brief description of each drawing is provided. [Figure 1] FIG. 1 is a block diagram of a video decoding device according to an embodiment. [Figure 2] 1 is a block diagram of a video encoding device according to an embodiment. [Figure 3] 10 is a diagram illustrating a process of dividing a current coding unit and determining at least one coding unit according to one embodiment. [Figure 4] 10A-10C illustrate a process for dividing a coding unit having a non-square shape to determine at least one coding unit according to one embodiment. [Figure 5] 10 is a diagram illustrating a process of dividing a coding unit based on at least one of block shape information and division shape mode information according to an embodiment; [Figure 6]10 is a diagram illustrating a method for determining a predetermined coding unit from among an odd number of coding units, according to an embodiment. [Figure 7] 10 is a diagram illustrating an order in which multiple coding units are processed when a current coding unit is divided to determine multiple coding units, according to an embodiment; [Figure 8] 10 is a diagram illustrating a process of determining whether a current coding unit is to be divided into an odd number of coding units when coding units cannot be processed in a predetermined order, according to one embodiment. [Figure 9] 1 illustrates a process of dividing a first coding unit to determine at least one coding unit, according to one embodiment. [Figure 10] 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 form in which the first coding unit can be divided is restricted. [Figure 11] 10 is a diagram illustrating a process of dividing a square coding unit when division mode information cannot indicate division into four square coding units, according to one embodiment. [Figure 12] 10 is a diagram illustrating how a processing order among multiple coding units may vary depending on a division process of the coding units, according to an embodiment. [Figure 13] 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 14] 10 is a diagram illustrating a depth that can be determined depending on the type and size of a coding unit and an index (PID: part index) for a coding unit partition, according to one embodiment. [Figure 15] 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 16]10 is a diagram illustrating coding units that can be determined for each picture when the combination of ways in which coding units can be divided varies for each picture, according to an embodiment. [Figure 17] 10A and 10B are diagrams illustrating various types of coding units that can be determined based on division mode information expressed by a binary code, according to an embodiment; [Figure 18] 10A and 10B are diagrams illustrating other forms of coding units that can be determined based on division mode information expressed by binary code according to one embodiment. [Figure 19] 1 is a block diagram of a video encoding system and a video decoding system; [Figure 20] FIG. 1 is a block diagram illustrating a configuration of a video decoding device according to an embodiment. [Figure 21A] 10 is an exemplary diagram illustrating the positions of neighboring blocks when a block to the left of a current block is available; [Figure 21B] 10 is an exemplary diagram illustrating the positions of neighboring blocks when a block to the left and a block to the right of a current block are available; [Figure 21C] 10 is a diagram illustrating the positions of neighboring blocks when a block to the right of a current block is available; [Figure 22] 10 is a diagram illustrating a mapping relationship between an index indicating a motion vector resolution, a motion vector resolution, and the position of a neighboring block. FIG. [Figure 23A] 10 is a diagram illustrating a case where a reference image index of a first neighboring block in the same prediction direction as that of a current block is not equal to a predetermined value. [Figure 23B] 10 is a diagram illustrating a case where a reference image index of a first neighboring block in the same prediction direction as that of a current block is equal to a predetermined value. [Figure 23C]This figure illustrates a case where, when the prediction direction of the current block is bidirectional, one of the reference image index in the list 0 direction of the first surrounding block and the reference image index in the list 1 direction is the same as a predetermined value, and the other is not the same as a predetermined value. [Figure 24] 1 is a flowchart illustrating a method for decoding motion vectors according to one embodiment. [Figure 25] 1 is a block diagram illustrating the configuration of a video encoding device according to one embodiment. [Figure 26] 1 is a flowchart illustrating a method for encoding motion vectors according to one embodiment. [Figure 27] FIG. 10 is a diagram illustrating a process of obtaining a predicted motion vector according to an embodiment. [Figure 28] FIG. 10 is a diagram illustrating a process of obtaining a predicted motion vector according to an embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0012] According to one embodiment, a motion vector decoding method also includes the steps of: selecting a first peripheral block from among peripheral blocks adjacent to a current block based on information obtained from a bitstream; using information indicating the availability of the first peripheral block, if the first peripheral block is identified as available and there is no motion vector of the first peripheral block in the same prediction direction as the prediction direction of the current block, obtaining a predicted motion vector of the current block from a motion vector of a second peripheral block at a predetermined position adjacent to the current block; and combining the predicted motion vector of the current block and a differential motion vector to obtain a motion vector of the current block.

[0013] If the reference image index of the second neighboring block in the same prediction direction as the current block is −1, the motion vector of the first neighboring block in the same prediction direction as the current block does not exist.

[0014] The availability of the first peripheral block is also determined based on at least one of whether a tile including the first peripheral block and a tile including the current block are different from each other, whether the first peripheral block is located outside the current image, whether the first peripheral block is intra-predicted, and whether reconstruction of the first peripheral block is complete.

[0015] The step of obtaining a predicted motion vector of the current block also includes a step of obtaining a predicted motion vector of the current block from the motion vector of the first peripheral block if the first peripheral block is identified as available using information indicating the availability of the first peripheral block and a motion vector of the first peripheral block exists in the same prediction direction as the prediction direction of the current block.

[0016] The information acquired from the bitstream includes information indicating a motion vector resolution of the current block among a plurality of motion vector resolutions, and the plurality of motion vector resolutions are also mapped to neighboring blocks at different positions.

[0017] The location of the second peripheral block also differs depending on information indicating availability of the left and right peripheral blocks of the current block.

[0018] The step of obtaining a predicted motion vector of the current block may also include a step of obtaining a predicted motion vector of the current block from the motion vector of the second peripheral block if the second peripheral block is identified as available using information indicating the availability of the second peripheral block, and if the reference image index of the second peripheral block in the same prediction direction as the prediction direction of the current block is the same as the reference image index of the current block, or if a motion vector of the second peripheral block in the same prediction direction as the prediction direction of the current block exists.

[0019] The step of obtaining a predicted motion vector of the current block also includes a step of obtaining a predicted motion vector of the current block from a motion vector of a block decoded before the current block, if the second peripheral block is identified as unavailable using information indicating the availability of the second peripheral block or if there is no motion vector of the second peripheral block in the same prediction direction as the prediction direction of the current block.

[0020] The step of obtaining a predicted motion vector of the current block may also include the step of obtaining a predicted motion vector of the current block from a motion vector of the second surrounding block if the first surrounding block is identified as unavailable.

[0021] According to one embodiment, the video decoding device also includes a motion vector prediction unit that selects a first peripheral block from among peripheral blocks adjacent to a current block based on information acquired from a bitstream, and, if the first peripheral block is identified as available using information indicating the availability of the first peripheral block and there is no motion vector of the first peripheral block in the same prediction direction as the prediction direction of the current block, obtains a predicted motion vector of the current block from a motion vector of a second peripheral block at a predetermined position adjacent to the current block; and a motion vector restoration unit that combines the predicted motion vector of the current block with a differential motion vector to obtain a motion vector of the current block.

[0022] According to one embodiment, a motion vector encoding method also includes the steps of: if a first peripheral block selected from peripheral blocks adjacent to a current block is identified as available and there is no motion vector of the first peripheral block in the same prediction direction as the prediction direction of the current block, obtaining a predicted motion vector of the current block from the motion vector of a second peripheral block at a predetermined position adjacent to the current block; and generating a bitstream including a differential motion vector between the motion vector of the current block and the predicted motion vector, and information indicating the first peripheral block.

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

[0024] In the description of the present embodiment, if a detailed description of related prior art is deemed to unnecessarily obscure the gist of the present disclosure, that detailed description will be omitted. Furthermore, numbers (e.g., first, second, etc.) used in the description of the specification are merely identifiers for distinguishing one component from another.

[0025] Furthermore, in this specification, when a component is referred to as being "coupled" or "connected" to another component, it should be understood that the component may be directly coupled or connected to the other component, but may also be coupled or connected via other components in between, unless otherwise specified.

[0026] In addition, in this specification, a component expressed as a "unit," "module," etc. may be two or more components combined into one component, or one component may be further divided into two or more components based on function. Furthermore, each component described below may additionally perform some or all of the functions performed by other components in addition to its own main function, and it goes without saying that some of the main functions performed by each component may be exclusively performed by other components.

[0027] Also, as used herein, "image" or "picture" may refer to a still or moving image (video).

[0028] In this specification, a "sample" or "signal" refers to data assigned to a sampling position in an image and to data to be processed. For example, in a spatial domain image, a pixel value or a transform coefficient in a transform domain is also a sample. A unit including at least one such sample can be defined as a block.

[0029] In the following, with reference to FIGS. 1 to 19, a video encoding method and apparatus therefor, and a video decoding method and apparatus therefor based on tree-structured coding units and transform units according to an embodiment are disclosed.

[0030] FIG. 1 illustrates a block diagram of a video decoding device 100 according to one embodiment.

[0031] The video decoding device 100 also includes a bitstream obtaining unit 110 and a decoding unit 120. The bitstream obtaining unit 110 and the decoding unit 120 also include at least one processor. The bitstream obtaining unit 110 and the decoding unit 120 also include a memory that stores instructions executed by the at least one processor.

[0032] The bitstream acquisition unit 110 may receive a bitstream. The bitstream includes information on video encoded by the video encoding device 200 (described below). The bitstream may also be transmitted from the video encoding device 200. The video encoding device 200 and the video decoding device 100 may be connected via a wired or wireless connection, and the bitstream acquisition unit 110 may receive the bitstream via a wired or wireless connection. The bitstream acquisition unit 110 may receive the bitstream from a recording medium such as an optical medium or a hard disk. The decoding unit 120 may reconstruct the video based on information acquired from the received bitstream. The decoding unit 120 may acquire syntax elements for reconstructing the video from the bitstream. The decoding unit 120 may reconstruct the video based on the syntax elements.

[0033] To explain the operation of the video decoding apparatus 100 in detail, the bitstream obtaining unit 110 can receive a bitstream.

[0034] The video decoding device 100 may perform an operation of acquiring a bin string corresponding to a partition mode of a coding unit from a bitstream. The video decoding device 100 may then perform an operation of determining a partition rule for the coding unit. The video decoding device 100 may also perform an operation of partitioning a coding unit into a plurality of coding units based on the bin string corresponding to the partition mode and at least one of the partition rules. To determine the partition rule, the video decoding device 100 may determine a first allowable range of the size of the coding unit based on a ratio between the width and height of the coding unit. To determine the partition rule, the video decoding device 100 may determine a second allowable range of the size of the coding unit based on the partition mode of the coding unit.

[0035] In the following, the division of coding units according to one embodiment of the present disclosure will be described in detail.

[0036] First, a picture may be divided into one or more slices or one or more tiles. A slice or a tile is also a sequence of one or more largest coding units (CTUs). In one embodiment, a slice includes one or more tiles, and a slice also includes one or more largest coding units. A slice including one or more tiles may be determined within a picture.

[0037] A concept contrasting with the maximum coding unit (CTU) is the maximum coding block (CTB), which is an NxN block containing NxN samples (N is an integer). Each color component can be divided into one or more maximum coding blocks.

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

[0039] One maximal coding block (CTB) may be divided into MxN coding blocks each including MxN samples (M and N are integers).

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

[0041] As mentioned above, the largest coding block and the largest coding unit are distinct concepts, and the coding block and the coding unit are distinct concepts. That is, a (largest) coding unit refers to a data structure including a (largest) coding block including a corresponding sample and a corresponding syntax structure. However, since those skilled in the art can understand that a (largest) coding unit or a (largest) coding block refers to a block of a predetermined size including a predetermined number of samples, hereinafter in this specification, the largest coding block and the largest coding unit, or the coding block and the coding unit, will be referred to without distinction unless otherwise specified.

[0042] An image may be divided into maximum coding units (CTUs). The size of the maximum coding units may be determined based on information obtained from the bitstream. The maximum coding units may have a square shape of the same size, but are not limited thereto.

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

[0044] For example, information regarding the maximum size of a luma coding block that can be divided into two and a luma block size difference may be acquired from a bitstream. The information regarding the luma block size difference may indicate a size difference between the largest luma coding unit and the largest luma coding block that can be divided into two. Therefore, the size of the largest luma coding unit may be determined by combining the information regarding the maximum size of a luma coding block that can be divided into two and the information regarding the luma block size difference acquired from the bitstream. The size of the largest chroma coding unit may also be determined using the size of the largest luma coding unit. For example, if the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chroma block is half the size of the luma block, and similarly, the size of the largest chroma coding unit is half the size of the largest luma coding unit.

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

[0046] Furthermore, the maximum coding unit may be hierarchically divided into coding units based on partition mode information acquired from the bitstream, which may include at least one of information indicating whether or not a quad split is performed, information indicating whether or not a multi-split is performed, partition direction information, and partition type information acquired from the bitstream.

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

[0048] If the current coding unit is not split into quads, the information indicating whether or not to split the current coding unit further may indicate whether the current coding unit is not split further (NO_SPLIT) or whether or not to split it into binary / ternary.

[0049] If the current coding unit is binary-divided or ternary-divided, the division direction information indicates that the current coding unit is divided in either the horizontal direction or the vertical direction.

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

[0051] The partition mode of the current coding unit may be determined based on the partition direction information and the partition type information. If the current coding unit is binary partitioned horizontally, the partition mode may be binary horizontal partition (SPLIT_BT_HOR), if it is ternary partitioned horizontally, the partition mode may be ternary horizontal partition (SPLIT_TT_HOR), if it is binary partitioned vertically, the partition mode may be binary vertical partition (SPLIT_BT_VER), and if it is ternary partitioned vertically, the partition mode may be ternary vertical partition (SPLIT_TT_VER).

[0052] The video decoding device 100 can obtain partition mode information from a bin string from a bitstream. The format of the bitstream received by the video decoding device 100 can include fixed-length binary code, unary code, truncated unary code, predetermined binary code, etc. The bin string represents information as a sequence of binary digits. The bin string is also composed of at least one bit. The video decoding device 100 can obtain partition mode information corresponding to the bin string based on a partitioning rule. The video decoding device 100 can determine whether to partition a coding unit into quads, whether not to partition it, or the partition direction and type based on the bin string.

[0053] A coding unit may be smaller than or equal to the maximum coding unit. For example, the maximum coding unit is also a coding unit because it has the largest size. If the partition mode information for the maximum coding unit indicates no partitioning, the coding unit determined in the maximum coding unit has the same size as the maximum coding unit. If the partition mode information for the maximum coding unit indicates partitioning, the maximum coding unit is also partitioned into coding units. Furthermore, if the partition mode information for the coding unit indicates partitioning, the coding unit may be further partitioned into smaller coding units. However, the partitioning of video is not limited thereto, and the maximum coding unit and the coding unit may not be distinguished. The partitioning of coding units will be described in more detail with reference to FIGS. 3 to 16.

[0054] Also, one or more prediction blocks for prediction may be determined from the coding unit, where the prediction blocks may be the same as or smaller than the coding unit. Also, one or more transform blocks for transformation may be determined from the coding unit, where the transform blocks may be the same as or smaller than the coding unit.

[0055] The shapes and sizes of the transform block and the prediction block are independent of each other.

[0056] In another embodiment, prediction can be performed using a coding unit as a prediction block, and transformation can be performed using the coding unit as a transform block.

[0057] The division of a coding unit will be described in more detail with reference to Figures 3 to 16. In the present disclosure, the current block and neighboring blocks may refer to one of a largest coding unit, a coding unit, a prediction block, and a transform block. The current block or the current coding unit is a block currently being decoded or coded, or a block currently being divided. The neighboring blocks may also be blocks reconstructed before the current block. The neighboring blocks may be spatially or temporally adjacent to the current block. The neighboring blocks may be located at one of the lower left, left, upper left, upper, upper right, right, or lower right sides of the current block.

[0058] FIG. 3 illustrates a process in which the video decoding device 100 divides the current coding unit and determines at least one coding unit, according to an embodiment.

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

[0060] The shape of the coding unit may be square or non-square. If the width and height of the coding unit are the same (i.e., if the block shape of the coding unit is 4Nx4N), the video decoding device 100 may determine the block shape information of the coding unit to be square. The video decoding device 100 may also determine the shape of the coding unit to be non-square.

[0061] If the width and height of a coding unit are different (i.e., the block shape of the coding unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the video decoding device 100 may determine that the block shape information of the coding unit is non-square. If the block shape of the coding unit is non-square, the video decoding device 100 may determine that the width-to-height ratio in the block shape information of the coding unit is at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, and 32:1. Furthermore, based on the width and height of the coding unit, the video decoding device 100 may determine whether the coding unit is horizontally oriented or vertically oriented. Furthermore, the video decoding apparatus 100 may determine the size of the coding unit based on at least one of the width, height, and area of ​​the coding unit.

[0062] According to an embodiment, the video decoding device 100 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 mode information. That is, the division method of the coding unit indicated by the partition type mode information may be determined depending on the block type indicated by the block type information used by the video decoding device 100.

[0063] The video decoding device 100 may acquire partition mode information from a bitstream. However, without being limited thereto, the video decoding device 100 and the video encoding device 200 may determine pre-agreed partition mode information based on block format information. The video decoding device 100 may determine pre-agreed partition mode information for the largest coding unit or the smallest coding unit. For example, the video decoding device 100 may determine the partition mode information for the largest coding unit as quad partitioning. Also, the video decoding device 100 may determine the partition mode information for the smallest coding unit as "no partitioning." Specifically, the video decoding device 100 may determine the size of the largest coding unit as 256x256. The video decoding device 100 may determine the pre-agreed partition mode information as quad partitioning. The quad partitioning is a partition mode in which both the width and height of the coding unit are divided into two equal parts. Based on the partition mode information, the video decoding device 100 can obtain a coding unit of 128x128 size from the maximum coding unit of 256x256 size. Also, the video decoding device 100 can determine the size of the minimum coding unit to be 4x4. The video decoding device 100 can obtain partition mode information indicating "no partition" for the minimum coding unit.

[0064] According to an embodiment, the video decoding device 100 may use block shape information indicating that the current coding unit is square. For example, the video decoding device 100 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 mode information. Referring to FIG. 3, when the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 may not split a coding unit 310a having the same size as the current coding unit 300 based on the partition shape mode information indicating no split, or may determine split coding units 310b, 310c, 310d, 310e, and 310f based on the partition shape mode information indicating a predetermined split method.

[0065] Referring to FIG. 3, the video decoding device 100 may determine two coding units 310b obtained by vertically dividing the current coding unit 300 based on partition mode information indicating vertical division. The video decoding device 100 may determine two coding units 310c obtained by horizontally dividing the current coding unit 300 based on partition mode information indicating horizontal division. The video decoding device 100 may determine four coding units 310d obtained by vertically and horizontally dividing the current coding unit 300 based on partition mode information indicating vertical and horizontal division. The video decoding device 100 may determine three coding units 310e obtained by vertically dividing the current coding unit 300 based on partition mode information indicating vertical ternary division. The video decoding device 100 may determine three coding units 310f obtained by horizontally dividing the current coding unit 300 based on partition mode information indicating horizontal ternary division. However, the division patterns into which the square coding unit may be divided are not limited to the above-described patterns, but may include various patterns that may be indicated by the division pattern mode information. The predetermined division patterns into which the square coding unit may be divided will be described in detail below through various embodiments.

[0066] FIG. 4 illustrates a process in which the video decoding device 100 divides a non-square coding unit and determines at least one coding unit, according to an embodiment.

[0067] According to one embodiment, the video decoding device 100 may use block shape information indicating that the current coding unit is non-square. The video decoding device 100 may determine whether to not split the non-square current coding unit or to split it in a predetermined manner based on the partition shape mode information. Referring to FIG. 4, if the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the video decoding device 100 may determine a coding unit 410 or 460 having the same size as the current coding unit 400 or 450 based on the partition shape mode information indicating no splitting, or may determine split coding units 420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, and 480c based on the partition shape mode information indicating a predetermined splitting method. Predetermined splitting methods for splitting non-square coding units will be described in detail below through various embodiments.

[0068] According to an embodiment, the video decoding device 100 may determine a manner in which a coding unit is to be divided using the partition mode information, and in this case, the partition mode information may indicate the number of coding units to be generated by dividing the coding unit. Referring to Figure 4, if the partition mode information indicates that the current coding unit 400 or 450 is to be divided into two coding units, the video decoding device 100 may divide the current coding unit 400 or 450 based on the partition mode information and determine two coding units 420a and 420b or 470a and 470b included in the current coding unit.

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

[0070] According to one embodiment, if the partition mode information indicates that a coding unit is to be divided into an odd number of blocks (ternary partitioning), the video decoding device 100 may determine the odd number of coding units included in the current coding unit 400 or 450. For example, if the partition mode information indicates that the current coding unit 400 or 450 is to be divided into three coding units, the video decoding device 100 may divide the current coding unit 400 or 450 into three coding units 430a, 430b, 430c, 480a, 480b, and 480c.

[0071] According to an embodiment, the width-to-height ratio of the current coding unit 400 or 450 may be 4:1 or 1:4. When the width-to-height ratio is 4:1, the width is greater than the height, and therefore the block shape information is horizontal. When the width-to-height ratio is 1:4, the width is smaller than the height, and therefore the block shape information is vertical. The video decoding device 100 may determine to divide the current coding unit into an odd number of blocks based on the partition shape mode information. The video decoding device 100 may also determine the partition direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, if the current coding unit 400 is vertically oriented, the video decoding device 100 may divide the current coding unit 400 horizontally to determine coding units 430a, 430b, and 430c. Also, if the current coding unit 450 is horizontal, the video decoding apparatus 100 may divide the current coding unit 450 vertically to determine coding units 480a, 480b, and 480c.

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

[0073] According to an embodiment, when the partition mode information indicates that a coding unit is to be partitioned into an odd number of blocks, the video decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450. Further, the video decoding device 100 may impose a predetermined restriction on at least one of the odd number of coding units generated by the partition. Referring to FIG. 4, the video decoding device 100 may perform a different decoding process for the central coding units 430b and 480b among three coding units 430a, 430b, 430c, 480a, 480b, and 480c generated by partitioning the current coding unit 400 or 450 from the other coding units 430a, 430c, 480a, and 480c. For example, the video decoding device 100 may limit the coding units 430b and 480b located in the center from being further divided, or may limit them to being divided only a predetermined number of times, unlike the other coding units 430a, 430c, 480a, and 480c.

[0074] FIG. 5 illustrates a process in which the video decoding apparatus 100 divides a coding unit based on at least one of block configuration information and partition configuration mode information, according to an embodiment.

[0075] According to one embodiment, the video decoding device 100 may determine whether or not to divide the square-shaped first coding unit 500 into coding units based on at least one of block shape information and partition shape mode information. According to one embodiment, if the partition shape mode information indicates that the first coding unit 500 is to be divided horizontally, the video decoding device 100 may divide the first coding unit 500 horizontally to determine the second coding unit 510. 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 divided, the second coding unit may be determined, and if the second coding unit is divided, 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.

[0076] According to an embodiment, the video decoding device 100 may determine whether to divide the determined second coding unit 510 into coding units based on partition mode information. Referring to FIG. 5, the video decoding device 100 may divide the non-square second coding unit 510, determined by dividing the first coding unit 500, into at least one third coding unit 520a, 520b, 520c, or 520d, or may not divide the second coding unit 510. The video decoding device 100 may acquire partition mode information and may divide the first coding unit 500 based on the acquired partition mode information. For example, the video decoding device 100 may divide the first coding unit 500 into a plurality of second coding units 510 of various shapes. The second coding units 510 may be divided in the same manner as the first coding unit 500 was divided, based on the partition mode information. According to one embodiment, if a first coding unit 500 is divided into a second coding unit 510 based on the division mode information associated with the first coding unit 500, the second coding unit 510 may also be divided into, for example, third coding units 520a, 520b, 520c, and 520d based on the division mode information associated with the second coding unit 510. That is, the coding units may be recursively divided based on the division mode information associated with each coding unit. Thus, for a non-square coding unit, square coding units may be determined, and the square coding units may be recursively divided to determine non-square coding units.

[0077] Referring to FIG. 5 , among the odd number of third coding units 520b, 520c, and 520d obtained by dividing the non-square second coding unit 510, a certain coding unit (e.g., a central coding unit or a square-shaped coding unit) may be recursively divided. According to one embodiment, the non-square third coding unit 520c, which is one of the odd number of third coding units 520b, 520c, and 520d, may be divided horizontally into a plurality of fourth coding units. The non-square fourth coding unit 530b or 530d, which is one of the plurality of fourth coding units 530a, 530b, 530c, and 530d, may be further divided into a plurality of coding units. For example, the non-square fourth coding unit 530b or 530d may be further divided into an odd number of coding units. Methods that can be used for recursively dividing coding units will be described below through various embodiments.

[0078] According to an embodiment, the video decoding device 100 may divide each of the third coding units 520a, 520b, 520c, and 520d into coding units based on the partition mode information. Furthermore, the video decoding device 100 may determine not to partition the second coding unit 510 based on the partition mode information. According to an embodiment, the video decoding device 100 may divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The video decoding device 100 may impose a certain restriction on a certain third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the video decoding device 100 may restrict the middle coding unit 520c among the odd number of third coding units 520b, 520c, and 520d so that it cannot be further divided or that it must be divided a configurable number of times.

[0079] 5, the video decoding apparatus 100 may restrict the middle coding unit 520c of the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to not be further divided, or to be divided into a predetermined division pattern (e.g., into only four coding units, or into a pattern corresponding to the division pattern of the second coding unit 510), or to be divided only a predetermined number of times (e.g., to be divided only n times (n>0)). However, the above restriction on the middle coding unit 520c is merely an embodiment and should not be construed as being limited to the above embodiment, but should be construed as including various restrictions that may allow the middle coding unit 520c to be decoded differently from the other coding units 520b and 520d.

[0080] According to an embodiment, the video decoding apparatus 100 may acquire, at a predetermined position within the current coding unit, partition mode information used to partition the current coding unit.

[0081] FIG. 6 illustrates a method by which the video decoding device 100 determines a predetermined coding unit from among an odd number of coding units, according to one embodiment.

[0082] 6, partition mode information of current coding units 600 and 650 may be obtained from a sample at a predetermined position (e.g., sample 640 or 690 located in the middle) among a plurality of samples included in current coding units 600 and 650. However, the predetermined position within current coding unit 600 from which at least one piece of partition mode information can be obtained is not limited to the center position shown in FIG. 6, but may include various positions (e.g., top, bottom, left, right, top left, bottom left, top right, or bottom right) that are also included within current coding unit 600. Video decoding device 100 may obtain the partition mode information obtained from the predetermined position and determine whether to partition the current coding unit into coding units of various types and sizes, or not to divide the current coding unit.

[0083] According to an embodiment, when a current coding unit is divided into a predetermined number of coding units, the video decoding apparatus 100 may select one of the coding units. There are various methods for selecting one of the plurality of coding units, and such methods will be described below with reference to various embodiments.

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

[0085] According to an embodiment, the video decoding device 100 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 Figure 6, the video decoding device 100 may divide a current coding unit 600 or a current coding unit 650 to determine odd-numbered coding units 620a, 620b, and 620c or odd-numbered coding units 660a, 660b, and 660c. The video decoding device 100 may determine the middle coding unit 620b or the middle coding unit 660b using information regarding the positions of the odd-numbered coding units 620a, 620b, and 620c or odd-numbered coding units 660a, 660b, and 660c. For example, the video decoding device 100 can determine the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of certain samples included in the coding units 620a, 620b, and 620c, thereby determining the center coding unit 620b. Specifically, the video decoding device 100 can determine the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c, thereby determining the center coding unit 620b.

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

[0087] According to an embodiment, information indicating the position of the top left sample 630a of the top coding unit 620a may indicate (xa, ya) coordinates, information indicating the position of the top left sample 630b of the middle coding unit 620b may indicate (xb, yb) coordinates, and information indicating the position of the top left sample 630c of the bottom coding unit 620c may indicate (xc, yc) coordinates. The video decoding device 100 may determine the middle coding unit 620b using the coordinates of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the top left samples 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the middle sample 630b may be determined as the middle coding unit among the coding units 620a, 620b, and 620c obtained by dividing the current coding unit 600. However, the coordinates indicating the positions of the top left samples 630a, 630b, and 630c may indicate absolute positions within a picture. Furthermore, the (dxb, dyb) coordinates indicating the relative position of the top left sample 630b of the middle coding unit 620b and the (dxc, dyc) coordinates indicating the relative position of the top left sample 630c of the bottom coding unit 620c may be used. 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 using various arithmetic methods that can use the coordinates of the sample.

[0088] According to an embodiment, the video decoding device 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c and select a coding unit from the coding units 620a, 620b, and 620c according to a predetermined criterion. For example, the video decoding device 100 may select a coding unit 620b having a different size from the coding units 620a, 620b, and 620c.

[0089] According to an embodiment, the video decoding device 100 may determine the width or height of each of the coding units 620a, 620b, and 620c using the (xa, ya) coordinates indicating the position of the top left sample 630a of the top coding unit 620a, the (xb, yb) coordinates indicating the position of the top left sample 630b of the middle coding unit 620b, and the (xc, yc) coordinates indicating the position of the top left sample 630c of the bottom coding unit 620c. The video decoding device 100 may determine the size of each of the coding units 620a, 620b, and 620c using the (xa, ya), (xb, yb), and (xc, yc) coordinates indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the video decoding device 100 may determine the width of the top coding unit 620a as the width of the current coding unit 600. The video decoding device 100 may determine the height of the top coding unit 620a as yb-ya. According to an embodiment, the video decoding device 100 may determine the width of the middle coding unit 620b as the width of the current coding unit 600. The video decoding device 100 may determine the height of the middle coding unit 620b as yc-yb. According to an embodiment, the video decoding device 100 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 620a and the middle coding unit 620b. The video decoding device 100 may determine a coding unit having a different size from the other coding units based on the determined widths and heights of the coding units 620a, 620b, and 620c. Referring to FIG. 6, the video decoding device 100 may determine the middle coding unit 620b, which has a different size from the top coding unit 620a and the bottom coding unit 620c, as a coding unit of a predetermined position. However, the process in which the video decoding device 100 determines a coding unit having a size different from other coding units is merely one embodiment of determining a coding unit at a predetermined position using the size of the coding unit determined based on sample coordinates, and various other processes may be used to determine a coding unit at a predetermined position by comparing the size of the coding unit determined based on predetermined sample coordinates.

[0090] The video decoding device 100 may determine the width or height of each of the coding units 660a, 660b, and 660c using the (xd, yd) coordinates indicating the position of the top left sample 670a of the left coding unit 660a, the (xe, ye) coordinates indicating the position of the top left sample 670b of the middle coding unit 660b, and the (xf, yf) coordinates indicating the position of the top left sample 670c of the right coding unit 660c. The video decoding device 100 may determine the size of each of the coding units 660a, 660b, and 660c using the coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the coding units 660a, 660b, and 660c.

[0091] According to an embodiment, the video decoding device 100 may determine the width of the left coding unit 660a as xe-xd. The video decoding device 100 may determine the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the video decoding device 100 may determine the width of the middle coding unit 660b as xf-xe. The video decoding device 100 may determine the height of the middle coding unit 660b as the height of the current coding unit 600. According to an embodiment, the video decoding device 100 may determine the width or height of the right coding unit 660c using the width or height of the current coding unit 650 and the widths and heights of the left coding unit 660a and the middle coding unit 660b. Based on the determined widths and heights of the coding units 660a, 660b, and 660c, the video decoding device 100 may determine a coding unit having a size different from the other coding units. 6, the video decoding apparatus 100 may determine a middle coding unit 660b, which has a size different from that of a left coding unit 660a and a right coding unit 660c, as a coding unit at a predetermined position. However, the process in which the video decoding apparatus 100 determines a coding unit having a size different from that of other coding units, is merely one embodiment in which the video decoding apparatus 100 determines a coding unit at a predetermined position using the size of the coding unit determined based on sample coordinates. Therefore, various processes for determining a coding unit at a predetermined position by comparing the size of the coding unit determined based on predetermined sample coordinates may be used.

[0092] 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.

[0093] According to an embodiment, the video decoding device 100 may select a coding unit at a predetermined position from among an odd number of coding units determined by dividing the current coding unit, taking into account the shape of the current coding unit. For example, if the current coding unit is non-square in shape, with its width greater than its height, the video decoding device 100 may select a coding unit at a predetermined position along the horizontal direction. That is, the video decoding device 100 may select 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, with its height greater than its width, the video decoding device 100 may select a coding unit at a predetermined position along the vertical direction. That is, the video decoding device 100 may select one of the coding units at a different position in the vertical direction and set a constraint on the coding unit.

[0094] According to one embodiment, the video decoding apparatus 100 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 apparatus 100 may determine the even-numbered coding units by dividing (binary dividing) the current coding unit, and may determine the 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. 6, and therefore will not be described here.

[0095] According to an embodiment, when a non-square current coding unit is divided into a plurality of coding units, predetermined information related to the coding unit at a predetermined position may be used in the division process to determine a coding unit at a predetermined position among the plurality of coding units. For example, the video decoding apparatus 100 may use at least one of block shape information and partition shape mode information stored in a sample included in the middle coding unit in the division process to determine a coding unit at a middle position among the plurality of coding units into which the current coding unit is divided.

[0096] 6, the video decoding device 100 may divide a current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, and may determine a central coding unit 620b among the plurality of coding units 620a, 620b, and 620c. Furthermore, the video decoding device 100 may determine the central coding unit 620b by considering a position at which the partition mode information is acquired. That is, the partition mode information of the current coding unit 600 is acquired from a sample 640 located in the middle of the current coding unit 600. If the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, the coding unit 620b including the sample 640 may be determined to be the central coding unit. However, the information used to determine the central coding unit is not limited to the partition mode information, and various types of information may be used in the process of determining the central coding unit.

[0097] According to an embodiment, predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample included in the coding unit to be determined. Referring to FIG. 6, the video decoding device 100 may use partition mode information obtained from a sample at a predetermined position within the current coding unit 600 (e.g., a sample located at the center of the current coding unit 600) to determine a coding unit at a predetermined position (e.g., a central coding unit among multiple coding units 620a, 620b, and 620c obtained by dividing the current coding unit 600). That is, the video decoding device 100 may determine the sample at the predetermined position by considering the block type of the current coding unit 600. The video decoding device 100 may determine a coding unit 620b including a sample from which predetermined information (e.g., partition mode information) can be obtained among the multiple coding units 620a, 620b, and 620c obtained by dividing the current coding unit 600, and may impose a predetermined restriction. 6, according to one embodiment, the video decoding device 100 may determine a sample 640 located in the middle of the current coding unit 600 as a sample from which certain information can be acquired, and may place a certain restriction on the decoding process of a coding unit 620b including such sample 640. However, the position of the sample from which certain information can be acquired is not limited to the above-described position, but may also be a sample at an arbitrary position included in the coding unit 620b determined to place the restriction.

[0098] According to one embodiment, the location of a sample from which predetermined information can be acquired may be determined based on the shape of the current coding unit 600. According to one 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 predetermined information can be acquired may be determined based on the shape. For example, the video decoding apparatus 100 may determine, using at least one of information related to the width and information related to the height of the current coding unit, a sample located on a boundary that divides at least one of the width and height of the current coding unit in half as a sample from which predetermined 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 apparatus 100 may determine, as a sample from which predetermined information can be acquired, one of the samples adjacent to a boundary that divides the long side of the current coding unit in half.

[0099] According to an embodiment, when the video decoding apparatus 100 divides a current coding unit into a plurality of coding units, the video decoding apparatus 100 may use partition mode information to determine a coding unit at a predetermined position among the plurality of coding units. According to an embodiment, the video decoding apparatus 100 may acquire the partition mode 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 the partition mode information acquired from a sample at a predetermined position included in each of the plurality of coding units. That is, the coding units may be recursively divided using the partition mode information acquired from a sample at a predetermined position included in each of the plurality of coding units. The recursive division process of the coding units has been described with reference to FIG. 5, and therefore, a detailed description thereof will be omitted.

[0100] According to one embodiment, the video decoding device 100 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).

[0101] FIG. 7 illustrates an order in which multiple coding units are processed when the video decoding apparatus 100 divides a current coding unit and determines multiple coding units, according to an embodiment.

[0102] According to one embodiment, the video decoding device 100 may divide the first coding unit 700 vertically and determine the second coding units 710a and 710b, or may divide the first coding unit 700 horizontally and determine the second coding units 730a and 730b, or may divide the first coding unit 700 vertically and horizontally and determine the second coding units 750a, 750b, 750c, and 750d, according to the division mode information.

[0103] 7, the video decoding device 100 may determine the order of processing second coding units 710a and 710b, which are determined by dividing the first coding unit 700 in the vertical direction, in a horizontal direction 710c. The video decoding device 100 may determine the processing order of second coding units 730a and 730b, which are determined by dividing the first coding unit 700 in the horizontal direction, as a vertical direction 730c. The video decoding device 100 may determine the processing order of second coding units 750a, 750b, 750c, and 750d, which are determined by dividing the first coding unit 700 in the vertical and horizontal directions, in a predetermined order (e.g., raster scan order or z scan order 750e) in which coding units located in one row are processed before coding units located in the next row are processed.

[0104] According to an embodiment, the video decoding device 100 may recursively divide a coding unit (CU). Referring to Figure 7, the video decoding device 100 may divide a first CU 700 to determine a plurality of CUs 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d, and may recursively divide each of the determined CUs 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. The method of dividing the plurality of CUs 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d corresponds to the method of dividing the first CU 700. 7, the video decoding apparatus 100 may divide the first coding unit 700 vertically to determine the second coding units 710a and 710b, and may further determine whether to divide each of the second coding units 710a and 710b independently.

[0105] According to one embodiment, the video decoding device 100 can divide the second coding unit 710a on the left side horizontally into third coding units 720a and 720b, while the second coding unit 710b on the right side is not divided.

[0106] According to an embodiment, the processing order of coding units is also determined based on the division process of the coding units. In other words, the processing order of divided coding units is also determined based on the processing order of the coding units immediately before the division. The video decoding apparatus 100 may determine the processing order of the third coding units 720a and 720b, which are determined by dividing the second coding unit 710a on the left side, independently of the second coding unit 710b on the right side. Since the second coding unit 710a on the left side is divided horizontally to determine the third coding units 720a and 720b, the third coding units 720a and 720b may be processed in the vertical direction 720c. Furthermore, since the processing order of the second coding unit 710a on the left side and the second coding unit 710b on the right side corresponds to the horizontal direction 710c, the third coding units 720a and 720b included in the second coding unit 710a on the left side may be processed in the vertical direction 720c before the right coding unit 710b is processed. The above content is intended to explain 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.

[0107] FIG. 8 illustrates a process in which the video decoding apparatus 100 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 an embodiment.

[0108] According to an embodiment, the video decoding device 100 may determine that a current coding unit is to be divided into an odd number of coding units based on the acquired partition mode information. Referring to FIG. 8, a square-shaped first coding unit 800 may be divided into non-square-shaped second coding units 810a and 810b, and the second coding units 810a and 810b may be independently divided into third coding units 820a, 820b, 820c, 820d, and 820e. According to an embodiment, the video decoding device 100 may divide the left coding unit 810a of the second coding unit horizontally to determine a plurality of third coding units 820a and 820b, and the right coding unit 810b may be divided into an odd number of third coding units 820c, 820d, and 820e.

[0109] According to an embodiment, the video decoding device 100 may determine whether the third coding units 820a, 820b, 820c, 820d, and 820e can be processed in a predetermined order, and determine whether there are any coding units divided into an odd number of coding units. Referring to FIG. 8, the video decoding device 100 may recursively divide the first coding unit 800 to determine the third coding units 820a, 820b, 820c, 820d, and 820e. The video decoding device 100 may determine whether the first coding unit 800, the second coding unit 810a, 810b, or the third coding unit 820a, 820b, 820c, 820d, and 820e are divided into an odd number of coding units in a division format based on at least one of block format information and partition format mode information. For example, in the second coding units 810a and 810b, the coding units located on the right side may be divided into an odd number of third coding units 820c, 820d, and 820e. The order in which the coding units included in the first coding unit 800 are processed may be a predetermined order (e.g., z scan order 830), and the video decoding device 100 may determine whether the third coding units 820c, 820d, and 820e determined by dividing the second coding unit 810b on the right side into an odd number of coding units satisfy the condition that they can be processed in the predetermined order.

[0110] According to an embodiment, the video decoding device 100 may determine whether the third coding units 820a, 820b, 820c, 820d, and 820e included in the first coding unit 800 satisfy a condition that they can be processed in a predetermined order, where the condition relates to whether at least one of the width and height of the second coding units 810a and 810b is divided in half by the boundaries of the third coding units 820a, 820b, 820c, 820d, and 820e. For example, the third coding units 820a and 820b, which are determined by dividing the height of the non-square left second coding unit 810a in half, may satisfy the condition. The boundaries of the third coding units 820c, 820d, and 820e, which are determined by dividing the right-side second coding unit 810b into three coding units, may not divide the width or height of the right-side second coding unit 810b in half, so the third coding units 820c, 820d, and 820e may be determined not to satisfy the condition. If such a condition is not satisfied, the video decoding device 100 may determine that there is a disconnection in the scanning order, and based on this determination result, may determine that the right-side second coding unit 810b is to be divided into an odd number of coding units. According to an embodiment, when dividing into an odd number of coding units, the video decoding device 100 may impose a predetermined restriction on coding units at predetermined positions among the divided coding units. The content of such a restriction and the predetermined positions have been described in various embodiments, so detailed description thereof will be omitted.

[0111] FIG. 9 illustrates a process in which the video decoding device 100 divides a first coding unit 900 to determine at least one coding unit, according to an embodiment.

[0112] According to an embodiment, the video decoding device 100 may divide the first coding unit 900 based on the partition mode information acquired via the bitstream acquisition unit 110. The square-shaped first coding unit 900 may be divided into four square-shaped coding units or into a plurality of non-square coding units. For example, referring to FIG. 9, if the first coding unit 900 is square and the partition mode information indicates that the first coding unit 900 is to be divided into non-square coding units, the video decoding device 100 may divide the first coding unit 900 into a plurality of non-square coding units. Specifically, when the division mode information indicates that the first coding unit 900 is to be divided horizontally or vertically to determine an odd number of coding units, the video decoding device 100 can divide the square-shaped first coding unit 900 into second coding units 910a, 910b, and 910c determined by dividing it vertically, or second coding units 920a, 920b, and 920c determined by dividing it horizontally, as an odd number of coding units.

[0113] According to an embodiment, the video decoding device 100 may determine whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition that they can be processed in a predetermined order, where the condition relates to whether at least one of the width and height of the first coding unit 900 is divided in half along the boundaries of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Referring to Figure 9, the boundaries of the second coding units 910a, 910b, and 910c determined by dividing the square-shaped first coding unit 900 vertically do not divide the width of the first coding unit 900 in half, so it may be determined that the first coding unit 900 does not satisfy the condition that it can be processed in a predetermined order. In addition, since the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the square-shaped first coding unit 900 horizontally do not divide the height of the first coding unit 900 in half, it may be determined that the first coding unit 900 does not satisfy the condition for being processed in a predetermined order. If such a condition is not satisfied, the video decoding device 100 may determine that there is a disconnection in the scanning order, and based on the determination result, may determine that the first coding unit 900 is to be divided into an odd number of coding units. According to an embodiment, when dividing the first coding unit 900 into an odd number of coding units, the video decoding device 100 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.

[0114] According to an embodiment, the video decoding apparatus 100 may divide the first coding unit and determine various types of coding units.

[0115] Referring to FIG. 9, the video decoding apparatus 100 may divide a square-shaped first coding unit 900, a non-square-shaped first coding unit 930, or a non-square-shaped first coding unit 950 into various types of coding units.

[0116] FIG. 10 illustrates that, according to one embodiment, when a non-square second coding unit determined by dividing a first coding unit 1000 by a video decoding device 100 satisfies certain conditions, the manner in which the second coding unit may be divided is restricted.

[0117] According to an embodiment, the video decoding device 100 may determine to divide a square-shaped first coding unit 1000 into non-square-shaped second coding units 1010a, 1010b, 1020a, and 1020b based on the division mode information acquired via the bitstream acquisition unit 110. The second coding units 1010a, 1010b, 1020a, and 1020b may be divided independently. Thus, the video decoding device 100 may determine whether to divide the second coding unit 1010a, 1010b, 1020a, and 1020b into multiple coding units or not, based on the division mode information associated with each of the second coding units 1010a, 1010b, 1020a, and 1020b. According to an embodiment, the video decoding device 100 may horizontally divide the left-side non-square-shaped second coding unit 1010a, which is determined by dividing the first coding unit 1000 vertically, to determine third coding units 1012a and 1012b. However, when the video decoding device 100 divides the left-side second coding unit 1010a horizontally, the right-side second coding unit 1010b may be restricted so that it cannot be divided horizontally in the same direction as the division of the left-side second coding unit 1010a. If the right-side second coding unit 1010b is divided in the same direction to determine the third coding units 1014a and 1014b, the left-side second coding unit 1010a and the right-side second coding unit 1010b may be divided horizontally independently to determine the third coding units 1012a, 1012b, 1014a, and 1014b. However, this is the same result as if the video decoding device 100 had divided the first coding unit 1000 into four square-shaped second coding units 1030a, 1030b, 1030c, and 1030d based on the division mode information, which is inefficient in terms of video decoding.

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

[0119] FIG. 11 illustrates a process in which the video decoding apparatus 100 divides a square coding unit when the division mode information does not indicate division into four square coding units, according to one embodiment.

[0120] According to an embodiment, the video decoding device 100 may divide the first coding unit 1100 into second coding units 1110a, 1110b, 1120a, and 1120b based on the partition mode information. The partition mode information may include information regarding various types of division into which the coding unit may be divided. However, the information regarding the various types may not include information for dividing the first coding unit into four square coding units. According to such partition mode information, the video decoding device 100 may not divide the square-shaped first coding unit 1100 into four square-shaped second coding units 1130a, 1130b, 1130c, and 1130d. Based on the partition mode information, the video decoding device 100 may determine non-square second coding units 1110a, 1110b, 1120a, and 1120b.

[0121] According to an embodiment, the video decoding apparatus 100 may independently divide the non-square second coding units 1110a, 1110b, 1120a, and 1120b by recursively dividing the second coding units 1110a, 1110b, 1120a, and 1120b in a predetermined order, which corresponds to the division method for the first coding unit 1100 based on the division mode information.

[0122] For example, the video decoding device 100 may horizontally divide the left-side second coding unit 1110a into square-shaped third coding units 1112a and 1112b, and may horizontally divide the right-side second coding unit 1110b into square-shaped third coding units 1114a and 1114b. Furthermore, the video decoding device 100 may horizontally divide both the left-side second coding unit 1110a and the right-side second coding unit 1110b into square-shaped third coding units 1116a, 1116b, 1116c, and 1116d. In this case, the coding units may be determined in the same manner as when the first coding unit 1100 is divided into four square-shaped second coding units 1130a, 1130b, 1130c, and 1130d.

[0123] For another example, the video decoding device 100 may vertically divide the top second coding unit 1120a to determine square third coding units 1122a and 1122b, and may vertically divide the bottom second coding unit 1120b to determine square third coding units 1124a and 1124b. Furthermore, the video decoding device 100 may vertically divide both the top second coding unit 1120a and the bottom second coding unit 1120b to determine square third coding units 1126a, 1126b, 1126a, and 1126b. In this case, the coding units may be determined in the same manner as when the first coding unit 1100 is divided into four square second coding units 1130a, 1130b, 1130c, and 1130d.

[0124] FIG. 12 illustrates how the processing order of multiple coding units may vary depending on the division process of the coding units, according to one embodiment.

[0125] According to an embodiment, the video decoding device 100 may partition the first coding unit 1200 based on the partition mode information. If the block shape is square and the partition mode information indicates that the first coding unit 1200 is to be partitioned in at least one of the horizontal and vertical directions, the video decoding device 100 may partition the first coding unit 1200 to determine, for example, second coding units 1210a, 1210b, 1220a, and 1220b. Referring to FIG. 12, the non-square second coding units 1210a, 1210b, 1220a, and 1220b determined by partitioning the first coding unit 1200 only horizontally or only vertically may be independently partitioned based on the partition mode information associated therewith. For example, the video decoding apparatus 100 may determine third coding units 1216a, 1216b, 1216c, and 1216d by horizontally dividing second coding units 1210a and 1210b, which are generated by vertically dividing the first coding unit 1200, and may determine third coding units 1226a, 1226b, 1226c, and 1226d by vertically dividing second coding units 1220a and 1220b, which are generated by horizontally dividing the first coding unit 1200. The process of dividing the second coding units 1210a, 1210b, 1220a, and 1220b has been described with reference to FIG. 11, and therefore, detailed description thereof will be omitted.

[0126] According to an embodiment, the video decoding device 100 may process coding units in a predetermined order. The characteristics related to processing coding units in a predetermined order have been described with reference to FIG. 7, and therefore detailed description thereof will be omitted. Referring to FIG. 12, the video decoding device 100 may divide a square-shaped first coding unit 1200 to determine four square-shaped third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. According to an embodiment, the video decoding device 100 may determine the processing order of the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d depending on the division form of the first coding unit 1200.

[0127] According to one embodiment, the video decoding device 100 can horizontally divide the second coding units 1210a and 1210b, which have been generated by vertical division, to determine the third coding units 1216a, 1216b, 1216c, and 1216d. The video decoding device 100 can process the third coding units 1216a, 1216b, 1216c, and 1216d in an order 1217 in which the third coding units 1216a and 1216c included in the left second coding unit 1210a are first processed vertically, and then the third coding units 1216b and 1216d included in the right second coding unit 1210b are processed vertically.

[0128] According to one embodiment, the video decoding device 100 can vertically divide the second coding units 1220a and 1220b, which have been generated by dividing them horizontally, to determine the third coding units 1226a, 1226b, 1226c, and 1226d. The video decoding device 100 can process the third coding units 1226a, 1226b, 1226c, and 1226d in an order 1227 in which the third coding units 1226a and 1226b included in the top second coding unit 1220a are first processed horizontally, and then the third coding units 1226c and 1226d included in the bottom second coding unit 1220b are processed horizontally.

[0129] 12, the second coding units 1210a, 1210b, 1220a, and 1220b may be divided into square-shaped third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. The second coding units 1210a and 1210b determined by vertical division and the second coding units 1220a and 1220b determined by horizontal division are divided into different types, but the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d determined thereafter ultimately result in the first coding unit 1200 being divided into coding units of the same type. As a result, the video decoding device 100 recursively divides the coding units through different processes based on the division mode information, and as a result, even if coding units of the same type are determined, different order processing can be performed on multiple coding units determined to be of the same type.

[0130] FIG. 13 illustrates a process of determining the depth of a coding unit according to one embodiment when a coding unit is recursively divided to determine multiple coding units, as the shape and size of the coding unit change.

[0131] According to an embodiment, the video decoding device 100 may determine the depth of the coding unit according to a predetermined criterion. For example, the predetermined criterion may be the length of the long side of the coding unit. The video decoding device 100 may determine the depth of the coding unit according to a predetermined criterion. For example, the predetermined criterion may be the length of the long side of the current coding unit. The video decoding device 100 may determine the depth of the coding unit according to a predetermined criterion. For example, the video decoding device 100 may determine the depth of the current coding unit according to a predetermined criterion. 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.

[0132] 13 , according to an embodiment, the video decoding apparatus 100 may divide a square-shaped first coding unit 1300 based on block shape information indicating a square shape (e.g., the block shape information may indicate “0:SQUARE”), and determine a second coding unit 1302, a third coding unit 1304, etc., of a lower depth. If the size of the square-shaped first coding unit 1300 is 2N×2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 by half may have a size of N×N. Furthermore, the third coding unit 1304 determined by dividing the width and height of the second coding unit 1302 by half may have a size of N / 2×N / 2. In this case, the width and height of the third coding unit 1304 correspond to ¼ times the width and height of the first coding unit 1300. If the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302, which is 1 / 2 the width and height of the first coding unit 1300, is also D+1, and the depth of the third coding unit 1304, which is 1 / 4 the width and height of the first coding unit 1300, is also D+2.

[0133] In one embodiment, based on block shape information indicating a non-square shape (for example, the block shape information may indicate "1:NS_VER", indicating a non-square shape in which the height is greater than the width, or "2:NS_HOR", indicating a non-square shape in which the width is greater than the height), the video decoding device 100 can divide the first coding unit 1310 or 1320, which is non-square, and determine the second coding unit 1312 or 1322 and the third coding unit 1314 or 1324 of a lower depth.

[0134] The video decoding device 100 may divide at least one of the width and height of the first coding unit 1310 having a size of Nx2N to determine, for example, second coding units 1302, 1312, and 1322. That is, the video decoding device 100 may divide the first coding unit 1310 horizontally to determine the second coding unit 1302 having a size of NxN or the second coding unit 1322 having a size of NxN / 2, or may divide the first coding unit 1310 horizontally and vertically to determine the second coding unit 1312 having a size of N / 2xN.

[0135] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the first coding unit 1320 having a size of 2NxN to determine, for example, the second coding units 1302, 1312, and 1322. That is, the video decoding device 100 may vertically divide the first coding unit 1320 to determine the second coding unit 1302 having a size of NxN or the second coding unit 1312 having a size of N / 2xN, or may horizontally and vertically divide the first coding unit 1320 to determine the second coding unit 1322 having a size of NxN / 2.

[0136] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the NxN second coding unit 1302 to determine, for example, third coding units 1304, 1314, and 1324. That is, the video decoding device 100 may divide the second coding unit 1302 vertically and horizontally to determine the N / 2xN / 2 third coding unit 1304, the N / 4xN / 2 third coding unit 1314, or the N / 2xN / 4 third coding unit 1324.

[0137] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the second coding unit 1312 having a size of N / 2xN to determine, for example, the third coding units 1304, 1314, and 1324. That is, the video decoding device 100 may divide the second coding unit 1312 horizontally to determine the third coding unit 1304 having a size of N / 2xN / 2 or the third coding unit 1324 having a size of N / 2xN / 4, or may divide the second coding unit 1312 vertically and horizontally to determine the third coding unit 1314 having a size of N / 4xN / 2.

[0138] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the second coding unit 1322 having a size of NxN / 2 to determine, for example, the third coding units 1304, 1314, and 1324. That is, the video decoding device 100 may divide the second coding unit 1322 vertically to determine the third coding unit 1304 having a size of N / 2xN / 2 or the third coding unit 1314 having a size of N / 4xN / 2, or may divide the second coding unit 1322 vertically and horizontally to determine the third coding unit 1324 having a size of N / 2xN / 4.

[0139] According to an embodiment, the video decoding device 100 may divide, for example, square-shaped coding units 1300, 1302, and 1304 horizontally or vertically. For example, the first coding unit 1300 having a size of 2Nx2N may be divided vertically to determine a first coding unit 1310 having a size of Nx2N, or may be divided horizontally to determine a first coding unit 1320 having a size of 2NxN. According to an embodiment, if the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by dividing the first coding unit 1300 having a size of 2Nx2N horizontally or vertically may be the same as the depth of the first coding unit 1300.

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

[0141] FIG. 14 illustrates a depth that can be determined depending on the type and size of a coding unit and an index (PID: part index) for a coding unit partition, according to one embodiment.

[0142] According to an embodiment, the video decoding device 100 may determine various types of second coding units by dividing a square-shaped first coding unit 1400. Referring to Figure 14, the video decoding device 100 may divide the first coding unit 1400 in at least one of a vertical direction and a horizontal direction according to the partition mode information, and determine second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d. That is, the video decoding device 100 may determine the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d based on the partition mode information related to the first coding unit 1400.

[0143] According to one embodiment, the depths of the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d determined by the partition mode information for the square-shaped first coding unit 1400 may be determined based on the lengths of their long sides. For example, since the length of one side of the square-shaped first coding unit 1400 is the same as the length of the long sides of the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b, the depths of the first coding unit 1400 and the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b can be considered to be the same as D. In contrast, when the video decoding device 100 divides the first coding unit 1400 into four square-shaped second coding units 1406a, 1406b, 1406c, and 1406d based on the division mode information, the length of one side of the square-shaped second coding units 1406a, 1406b, 1406c, and 1406d is half the length of one side of the first coding unit 1400, so the depth of the second coding units 1406a, 1406b, 1406c, and 1406d is also a depth of D+1, which is one depth lower than the depth D of the first coding unit 1400.

[0144] According to an embodiment, the video decoding device 100 may divide a first coding unit 1410, whose height is greater than its width, horizontally according to the partition mode information and divide the first coding unit 1410 into a plurality of second coding units 1412a, 1412b, 1414a, 1414b, and 1414c. According to an embodiment, the video decoding device 100 may divide a first coding unit 1420, whose width is greater than its height, vertically according to the partition mode information and divide the first coding unit 1420 into a plurality of second coding units 1422a, 1422b, 1424a, 1424b, and 1424c.

[0145] According to an embodiment, the depths of the second coding units 1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, and 1424c determined by the partition mode information related to the non-square first coding unit 1410 or 1420 may be determined based on the length of their long sides. For example, since the length of one side of the square-shaped second coding units 1412a and 1412b is half the length of one side of the non-square first coding unit 1410, whose height is greater than its width, the depths of the square-shaped second coding units 1412a and 1412b are D+1, which is one depth lower than the depth D of the non-square first coding unit 1410.

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

[0147] According to an embodiment, when determining an index (PID) for partitioning a divided coding unit, if the divided coding units are not the same size, the video decoding apparatus 100 may determine the index based on the size ratio between the coding units. Referring to FIG. 14, among the divided coding units 1414a, 1414b, and 1414c, the middle coding unit 1414b has the same width as the other coding units 1414a and 1414c but is twice as high as the other coding units 1414a and 1414c. That is, in this case, the middle coding unit 1414b includes both the other coding units 1414a and 1414c. Therefore, if the index (PID) of the middle coding unit 1414b in the scanning order is 1, the index of the next coding unit 1414c is 3, which is an increase of 2. That is, discontinuity in index values ​​may exist. According to one embodiment, the video decoding device 100 can determine whether coding units divided into an odd number of parts are not the same size based on whether there is a discontinuity in the indexes for partitioning between the coding units divided in this way.

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

[0149] According to an embodiment, the video decoding device 100 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 partition mode information for a rectangular first coding unit 1410 whose height is greater than its width indicates that the first coding unit 1410 is to be divided into three coding units, the video decoding device 100 may divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The video decoding device 100 may assign an index to each of the three coding units 1414a, 1414b, and 1414c. The video decoding device 100 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 100 may determine the coding unit 1414b having an index corresponding to the middle value as the middle coding unit among the coding units determined by dividing the first coding unit 1410. According to an embodiment, when determining an index for dividing a divided coding unit, if the coding units are not the same size, the video decoding apparatus 100 may determine the index based on the size ratio between the coding units. Referring to Figure 14, a coding unit 1414b generated by dividing a first coding unit 1410 has the same width as other coding units 1414a and 1414c but is twice the height of other coding units 1414a and 1414c. In this case, if the index (PID) of the middle coding unit 1414b is 1, the index of the next coding unit 1414c is 3, which is an index increased by 2.In such a case, if the indexes increase uniformly but the increments are different, the video decoding device 100 may determine that the current coding unit has been divided into a plurality of coding units, including a coding unit having a different size from the other coding units. According to one embodiment, if the division mode information indicates division into an odd number of coding units, the video decoding device 100 may divide the current coding unit into a form in which 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 100 may determine the middle coding unit having a different size using an index (PID) associated with the coding unit. However, the above index and the size or position of the determined coding unit are specific 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.

[0150] According to one embodiment, the video decoding device 100 can use a predetermined data unit from which the recursive division of the coding unit begins.

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

[0152] According to one embodiment, the predetermined data unit is also defined as a data unit from which a coding unit begins to be recursively divided using division mode information. That is, the predetermined data unit may correspond to a coding unit of the highest depth used in determining a plurality of coding units for dividing a current picture. Hereinafter, for convenience of explanation, such a predetermined data unit will be referred to as a reference data unit.

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

[0154] According to an embodiment, the video decoding apparatus 100 may divide a current picture into a plurality of reference data units. According to an embodiment, the video decoding apparatus 100 may divide the reference data units into which the current picture is divided using partition mode information associated with each reference data unit. The division process of the reference data units may correspond to a division process using a quad-tree structure.

[0155] According to an embodiment, the video decoding apparatus 100 may determine in advance the 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 partition mode information.

[0156] 15, the video decoding apparatus 100 may use a square-shaped reference coding unit 1500 or a non-square-shaped reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined based on various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) that include at least one reference coding unit.

[0157] According to an embodiment, the bitstream obtaining unit 110 of the video decoding device 100 may obtain at least one of information regarding the type of the base coding unit and information regarding the size of the base coding unit from the bitstream for each of the various data units. The process of determining at least one coding unit included in the square-shaped base coding unit 1500 has been described through the process of dividing the current coding unit 300 in FIG. 3, and the process of determining at least one coding unit included in the non-square-shaped base coding unit 1502 has been described through the process of dividing the current coding unit 400 or 450 in FIG. 4, so detailed descriptions thereof will be omitted.

[0158] According to an embodiment, the video decoding apparatus 100 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 some data units predetermined based on a predetermined condition. That is, the bitstream obtaining unit 110 may obtain only an index for identifying the size and type of the base coding unit for each slice, slice segment, tile, tile group, and maximum coding unit 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 tile, a tile group, a maximum coding unit, etc.) from the bitstream. The video decoding apparatus 100 may determine the size and type of the base data unit for each data unit satisfying the predetermined condition by using the index. If information regarding the type of the reference coding unit and information regarding the size of the reference coding unit are obtained from a bitstream for each relatively small data unit and used, the bitstream utilization efficiency will be undesirable. Therefore, instead of directly obtaining information regarding the type of the reference coding unit and information regarding the size of the reference coding unit, only the index may be obtained and used. In this case, at least one of the size and type of the reference coding unit corresponding to the index indicating the size and type of the reference coding unit is predetermined. That is, the video decoding device 100 may determine at least one of the size and type of the reference coding unit included in the data unit that is the basis for obtaining the index by selecting at least one of the predetermined size and type of the reference coding unit according to the index.

[0159] According to one embodiment, the video decoding apparatus 100 may use at least one reference coding unit included in one maximum coding unit. That is, the maximum coding unit into which a video is divided may include at least one reference coding unit, and coding units may be determined through a recursive division process of each reference coding unit. According to 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 the size obtained by dividing the maximum coding unit n times using a quadtree structure. That is, the video decoding apparatus 100 may determine the reference coding unit by dividing the maximum coding unit n times using a quadtree structure. According to various embodiments, the video decoding apparatus 100 may divide the reference coding unit based on at least one of block shape information and partition shape mode information.

[0160] According to an embodiment, the video decoding apparatus 100 may acquire and use block type information indicating the type of a current coding unit or partition type mode information indicating a method of partitioning the current coding unit from a bitstream. The partition type mode information may be included in bitstreams associated with various data units. For example, the video decoding apparatus 100 may use partition type mode information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, or a tile group header. Furthermore, the video decoding apparatus 100 may acquire and use syntax elements corresponding to block type information or partition type mode information from a bitstream for each maximum coding unit or base coding unit.

[0161] A method for determining the division rule according to one embodiment of the present disclosure will now be described in detail.

[0162] The video decoding device 100 may determine a video partitioning rule. The partitioning rule may be predetermined between the video decoding device 100 and the video encoding device 200. The video decoding device 100 may determine the video partitioning rule based on information acquired from a bitstream. The video decoding device 100 may determine the partitioning rule based on information acquired from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, and a tile group header. The video decoding device 100 may determine the partitioning rule differently depending on the frame, slice, tile, temporal layer, maximum coding unit, or coding unit.

[0163] The video decoding device 100 may determine a partitioning rule based on the block type of the coding unit. The block type may include the size, shape, width-to-height ratio, and direction of the coding unit. The video encoding device 200 and the video decoding device 100 may determine in advance to determine the partitioning rule based on the block type of the coding unit. However, this is not limited to this. The video decoding device 100 may determine the partitioning rule based on information obtained from a bitstream received from the video encoding device 200.

[0164] The shape of the coding unit may be square or non-square. If the width and height of the coding unit are the same, the video decoding device 100 may determine the shape of the coding unit to be square. If the width and height of the coding unit are not the same, the video decoding device 100 may determine the shape of the coding unit to be non-square.

[0165] The size of the coding unit may include various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, ..., and 256x256. The size of the coding unit may also be classified according to the length of the long side, the length of the short side, or the width of the coding unit. The video decoding device 100 may apply the same partitioning rule to coding units classified into the same group. For example, the video decoding device 100 may classify coding units having the same long side length into the same size. The video decoding device 100 may also apply the same partitioning rule to coding units having the same long side length.

[0166] The width-to-height ratio of a coding unit may be 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, or 1:32. The direction of the coding unit may be horizontal or vertical. The horizontal direction may indicate that the width of the coding unit is greater than the height. The vertical direction may indicate that the width of the coding unit is smaller than the height.

[0167] The video decoding device 100 may adaptively determine a partitioning rule based on the size of the coding unit. The video decoding device 100 may determine different allowable partitioning modes based on the size of the coding unit. For example, the video decoding device 100 may determine whether partitioning is allowed based on the size of the coding unit. The video decoding device 100 may determine the partitioning direction based on the size of the coding unit. The video decoding device 100 may determine allowable partitioning types based on the size of the coding unit.

[0168] Determining the partitioning rule based on the size of the coding unit is also a partitioning rule determined in advance between the video encoding device 200 and the video decoding device 100. In addition, the video decoding device 100 can determine the partitioning rule based on information obtained from the bitstream.

[0169] The video decoding device 100 can adaptively determine the division rule based on the position of the coding unit. The video decoding device 100 can adaptively determine the division rule based on the position that the coding unit occupies in the video.

[0170] Furthermore, the video decoding device 100 may determine a division rule so that coding units generated through different division paths do not have the same block type. However, this is not limited thereto, and coding units generated through different division paths may have the same block type. Coding units generated through different division paths may have different decoding processing orders. The decoding processing order has been described with reference to FIG. 12 , so a detailed description thereof will be omitted.

[0171] FIG. 16 illustrates coding units that may be determined for each picture when the combinations of how coding units may be divided vary from picture to picture, according to an embodiment.

[0172] Referring to FIG. 16, the video decoding apparatus 100 may determine different combinations of partitioning patterns into which coding units may be divided for each picture. For example, the video decoding apparatus 100 may decode a video using a picture 1600 that may be divided into four coding units, a picture 1610 that may be divided into two or four coding units, and a picture 1620 that may be divided into two, three, or four coding units, in at least one picture included in the video. The video decoding apparatus 100 may use only partitioning pattern information indicating that the picture 1600 is to be divided into four square coding units to divide the picture 1600 into multiple coding units. The video decoding apparatus 100 may use only partitioning pattern information indicating that the picture 1610 is to be divided into two or four coding units to divide the picture 1610. The video decoding apparatus 100 may use only partitioning pattern information indicating that the picture 1620 is to be divided into two, three, or four coding units to divide the picture 1620. The above-described combinations of division forms are merely embodiments for explaining the operation of the video decoding device 100, and therefore the described combinations of division forms should not be interpreted as being limited to the above-described embodiments, but should be interpreted as meaning that various combinations of division forms can be used for each specified data unit.

[0173] According to one embodiment, the bitstream obtaining unit 110 of the video decoding device 100 may obtain a bitstream including an index indicating a combination of partition type information for each predetermined data unit (e.g., a sequence, a picture, a slice, a slice segment, a tile, or a tile group). For example, the bitstream obtaining unit 110 may obtain an index indicating a combination of partition type information from a sequence parameter set, a picture parameter set, a slice header, or a tile header (or a tile group header). The video decoding device 100 may use the obtained index to determine a combination of partition types into which a coding unit may be divided for each predetermined data unit, thereby using a combination of different partition types for each predetermined data unit.

[0174] FIG. 17 illustrates various types of coding units that are determined based on division mode information that may be expressed by a binary code, according to one embodiment.

[0175] According to an embodiment, the video decoding apparatus 100 may divide a coding unit into various types using block type information and partition type mode information acquired via the bitstream acquisition unit 110. The types of the coding unit that can be divided may correspond to various types including the types described in the above embodiments.

[0176] Referring to FIG. 17, the video decoding device 100 can divide a square-shaped coding unit in at least one of the horizontal and vertical directions based on the division mode information, and can divide a non-square-shaped coding unit in the horizontal or vertical direction.

[0177] According to an embodiment, when the video decoding device 100 is capable of dividing a square coding unit horizontally and vertically into four square coding units, the division mode information for the square coding unit may indicate four different division modes. According to an embodiment, the division mode information may be expressed as a two-digit binary code, and a binary code may be assigned to each division mode. For example, if the coding unit is not divided, the division mode information may be expressed as (00)b; if the coding unit is divided horizontally and vertically, the division mode information may be expressed as (01)b; if the coding unit is divided horizontally, the division mode information may be expressed as (10)b; and if the coding unit is divided vertically, the division mode information may be expressed as (11)b.

[0178] According to an embodiment, when the video decoding apparatus 100 divides a non-square coding unit horizontally or vertically, the type of division indicated by the division mode information is determined depending on the number of coding units into which the coding unit is divided. Referring to FIG. 17, according to an embodiment, the video decoding apparatus 100 can divide a non-square coding unit into up to three coding units. The video decoding apparatus 100 can divide a coding unit into two coding units, in which case the division mode information can also be expressed as (10)b. The video decoding apparatus 100 can divide a coding unit into three coding units, in which case the division mode information can also be expressed as (11)b. The video decoding apparatus 100 can determine not to divide a coding unit, in which case the division mode information can also be expressed as (0)b. That is, the video decoding apparatus 100 can use variable length coding (VLC) instead of fixed length coding (FLC) to use a binary code indicating the division mode information.

[0179] According to one embodiment, referring to FIG. 17, the binary code of the partition mode information indicating that the coding unit is not divided may also be expressed as (0)b. If the binary code of the partition mode information indicating that the coding unit is not divided is set to (00)b, the binary code of the 2-bit partition mode information must be used regardless of the absence of the partition mode information set to (01)b. However, as shown in FIG. 17, when three types of division for a non-square coding unit are used, the video decoding device 100 can determine that the coding unit is not divided even if the 1-bit binary code (0)b is used as the partition mode information, thereby efficiently using the bitstream. However, the division type of the non-square coding unit indicated by the partition mode information should not be construed as being limited to the three types shown in FIG. 17, but may be construed as being various types including those described in the above embodiment.

[0180] FIG. 18 illustrates another form of a coding unit that is also determined based on partition mode information that may be expressed by a binary code, according to one embodiment.

[0181] Referring to FIG. 18, the video decoding device 100 may divide a square-shaped coding unit horizontally or vertically and may divide a non-square-shaped coding unit horizontally or vertically based on the partition mode information. That is, the partition mode information may indicate that a square-shaped coding unit is to be divided in one direction. In such a case, the binary code of the partition mode information indicating that a square-shaped coding unit is not to be divided may also be expressed as (0)b. If the binary code of the partition mode information indicating that a coding unit is not to be divided is set to (00)b, the binary code of the 2-bit partition mode information must be used even if there is no partition mode information set to (01)b. However, as shown in FIG. 18, when three types of division modes for a square-shaped coding unit are used, the video decoding device 100 can determine that the coding unit is not to be divided even if the 1-bit binary code (0)b is used as the partition mode information, thereby efficiently using the bitstream. However, the division form of the square-shaped coding unit indicated by the division form mode information should not be interpreted as being limited to the three forms shown in Figure 18, but should be interpreted as being in various forms including the above-mentioned embodiments.

[0182] According to one embodiment, block shape information or partition shape mode information may be expressed using a binary code, and such information may be directly generated in a bitstream. Alternatively, block shape information or partition shape mode information that can be expressed using a binary code may be used as a binary code input in CABAC (context adaptive binary arithmetic coding) without being directly generated in a bitstream.

[0183] According to one embodiment, the video decoding device 100 may acquire syntax related to block topology information or partition topology mode information through CABAC. A bitstream including binary codes related to the syntax may be acquired through the bitstream acquisition unit 110. The video decoding device 100 may debinarize a bin string included in the acquired bitstream to detect a syntax element indicating block topology information or partition topology mode information. According to one embodiment, the video decoding device 100 may obtain a set of binary bin strings corresponding to the syntax element to be decoded and decode each bin using probability information. The video decoding device 100 may repeat the process until a bin string formed by the decoded bins is identical to one of the previously obtained bin strings. The video decoding device 100 may determine a syntax element by debinarizing the bin string.

[0184] According to an embodiment, the video decoding apparatus 100 may perform an adaptive binary arithmetic coding decoding process to determine a syntax related to a bin string, and may update a probability model related to the acquired bins via the bitstream acquisition unit 110. Referring to FIG. 17, the bitstream acquisition unit 110 of the video decoding apparatus 100 may acquire a bitstream indicating a binary code indicating partition mode information, according to an embodiment. The video decoding apparatus 100 may determine a syntax related to the partition mode information using the acquired binary code having a size of 1 or 2 bits. To determine the syntax related to the partition mode information, the video decoding apparatus 100 may update a probability related to each bit in the 2-bit binary code. That is, the video decoding apparatus 100 may update a probability of having a value of 0 or 1 when decoding a subsequent bin, depending on whether the value of the first bin in the 2-bit binary code is 0 or 1.

[0185] According to one embodiment, in the process of determining a syntax, the video decoding device 100 can update the probabilities associated with the bins used in the process of decoding the bins of a bin string associated with the syntax, and the video decoding device 100 can determine that a particular bit in the bin string has the same probability without updating the probability.

[0186] 17, in the process of determining a syntax using a bin string indicating partition mode information related to a non-square coding unit, video decoding apparatus 100 may determine the syntax related to the partition mode information using one bin having a value of 0 if the non-square coding unit is not to be partitioned. That is, if the block topology information indicates that the current coding unit is non-square, the first bin of the bin string related to the partition mode information is 0 if the non-square coding unit is not to be partitioned, and is 1 if the non-square coding unit is to be partitioned into two or three coding units. Thus, the probability that the first bin of the bin string of the partition mode information related to the non-square coding unit is 0 is 1 / 3, and the probability that it is 1 is 2 / 3. As described above, since the partition mode information indicating that a non-square coding unit is not partitioned can be represented only by a 1-bit bin string having a value of 0, the video decoding device 100 can determine whether the second bin is 0 or 1 only when the first bin of the partition mode information is 1, and determine the syntax related to the partition mode information. According to an embodiment, when the first bin related to the partition mode information is 1, the video decoding device 100 can decode the bins by considering that the probability that the second bin is 0 or 1 is the same.

[0187] According to one embodiment, the video decoding device 100 may use various probabilities associated with each bin in determining the bins of the bin string associated with the partition mode information. According to one embodiment, the video decoding device 100 may determine the probabilities of the bins associated with the partition mode information differently along the direction of a non-square block. According to one embodiment, the video decoding device 100 may determine the probabilities of the bins associated with the partition mode information differently depending on the width or the length of the long side of the current coding unit. According to one embodiment, the video decoding device 100 may determine the probabilities of the bins associated with the partition mode information differently depending on at least one of the shape and the length of the long side of the current coding unit.

[0188] According to an embodiment, the video decoding apparatus 100 may determine that the probabilities of bins associated with the partition mode information are the same for coding units having a predetermined size or larger. For example, based on the length of the long side of the coding unit, the video decoding apparatus 100 may determine that the probabilities of bins associated with the partition mode information are the same for coding units having a size of 64 samples or larger.

[0189] According to an embodiment, the video decoding apparatus 100 also determines the initial probabilities associated with the bins that make up the bin string of the partition mode information based on the slice type (eg, I slice, P slice, or B slice).

[0190] FIG. 19 is a block diagram of a video encoding system and a video decoding system.

[0191] The encoder 1910 of the video encoding and decoding system 1900 transmits an encoded bitstream of video, and the decoder 1950 receives and decodes the bitstream to output a restored video. Here, the decoder 1950 has a configuration similar to that of the video decoding device 100.

[0192] In the encoder 1910, the inter-prediction coding unit 1905 generates motion information for a current block indicating a reference block of a reference picture temporally adjacent to the current picture when the prediction mode of the current block is inter-prediction mode. The inter-prediction coding unit 1905 may determine a prediction sample for the current block using a sample of the reference block. The intra-prediction coding unit 1910 may determine intra-prediction information indicating a direction in which a neighboring sample similar to the current block is located or a method for determining a prediction sample, so as to determine a prediction sample for the current block using neighboring samples spatially adjacent to the current block.

[0193] The inter-prediction coding unit 1905 can determine a reference sample to be used for predicting the current block from among previously reconstructed samples stored in a DPB (Decoded Picture Buffer) 1948.

[0194] The transform unit 1920 transforms residual sample values ​​obtained by removing predicted samples generated by the inter-prediction coding unit 1905 or the intra-prediction coding unit 1910 from original samples of the current block, and outputs transform coefficients. The quantization unit 1925 quantizes the transform coefficients output from the transform unit 1920 and outputs quantized transform coefficients. The entropy coding unit 1930 can encode the quantized transform coefficients into residual syntax elements including level values ​​and output them in the form of a bitstream.

[0195] The quantized transform coefficients output from the quantization unit 1925 are inversely quantized and inversely transformed via the inverse quantization unit 1933 and the inverse transform unit 1935, and residual sample values ​​can be generated.

[0196] The adder 1915 adds the residual sample values ​​and the predicted sample values ​​to output reconstructed sample values. The post-reconstruction filtering unit 1940 performs post-reconstruction filtering on the reconstructed samples, and the reconstructed sample values ​​updated through the post-reconstruction filtering may be used as reference sample values ​​for intra prediction also performed by the intra prediction unit 1910. The post-reconstruction filtering unit 1940 may perform Hadamard transform domain filtering or bilateral filtering on the reconstructed sample values.

[0197] The in-loop filtering unit 1945 may perform at least one of deblocking filtering and adaptive loop filtering on reconstructed samples updated through post-reconstruction filtering. The reconstructed sample values ​​updated through filtering by the in-loop filtering unit 1945 may also be stored in the DPB 1948 and used as reference sample values ​​for inter prediction performed by the inter predictor 1905.

[0198] The entropy decoding unit 1955 of the decoder 1950 can perform entropy decoding on the received bitstream and parse residual syntax elements including level values. Quantized transform coefficients can be reconstructed from the residual syntax elements. The inverse quantization unit 1960 can perform inverse quantization on the quantized transform coefficients to output transform coefficients, and the inverse transform unit 1965 can perform inverse transform on the transform coefficients to output residual sample values.

[0199] The inter-prediction coding unit 1970 of the decoder 1950 may determine a reference picture that is temporally adjacent to the current picture and determine a reference block within the reference picture using the motion information of the current block parsed by the entropy decoding unit 1955. The inter-prediction coding unit 1970 may determine a prediction sample of the current block using a sample of the reference block. The intra-prediction coding unit 1975 of the decoder 1950 may use the motion information of the current block parsed by the entropy decoding unit 1955, and may determine a reference sample that is spatially adjacent to the current block using intra-prediction information, and may determine a prediction sample of the current block using the determined neighboring sample.

[0200] The inter-prediction coding unit 1970 can determine a reference sample to be used for predicting the current block from among previously reconstructed samples stored in a DPB (Decoded Picture Buffer) 1990.

[0201] An adder 1995 of the decoder 1950 adds the residual sample values ​​and the predicted sample values ​​to output reconstructed sample values ​​of the current block. A post-reconstruction filtering unit 1980 of the decoder 1950 may perform Hadamard transform domain filtering or bilateral filtering on the reconstructed sample values. The reconstructed sample values ​​updated through filtering by the post-reconstruction filtering unit 1980 may be used as reference sample values ​​for intra prediction performed by the intra prediction unit 1975.

[0202] The in-loop filtering unit 1985 of the decoder 1950 may perform at least one of deblocking filtering and adaptive loop filtering using the reconstructed samples updated through post-reconstruction filtering. The reconstructed sample values ​​updated through filtering by the in-loop filtering unit 1985 may be stored in the DPB 1990 and used as reference sample values ​​for inter prediction performed by the inter predictor 1970.

[0203] The above-described various embodiments have described operations related to a video decoding method performed by the video decoding apparatus 100. Hereinafter, operations of the video encoding apparatus 200 that performs a video encoding method corresponding to a reverse process of the video decoding method will be described through various embodiments.

[0204] FIG. 2 illustrates a block diagram of a video encoding device 200 capable of encoding video based on at least one of block topology information and partition topology mode information, according to one embodiment.

[0205] The video encoding device 200 may also include an encoding unit 220 and a bitstream generation unit 210. The encoding unit 220 may receive input video and encode the input video. The encoding unit 220 may encode the input video to obtain at least one syntax element. The syntax element may include at least one of a skip flag, a prediction mode, a motion vector difference, a motion vector prediction method (or index), a transform quantized coefficient, a coded block pattern, a coded block flag, an intra prediction mode, a direct flag, a merge flag, a delta QP, a reference index, a prediction direction, and a transform index. The encoding unit 220 may determine a context model based on block shape information including at least one of a coding unit shape, a direction, a width-to-height ratio, and a size.

[0206] The bitstream generator 210 may generate a bitstream based on the coded input video. For example, the bitstream generator 210 may generate the bitstream by entropy coding syntax elements based on a context model. The video coding device 200 may also transmit the bitstream to the video decoding device 100.

[0207] According to an embodiment, the encoding unit 220 of the video encoding device 200 may determine the shape of the coding unit. For example, the coding unit may be square or non-square, and information indicating such shape may be included in the block shape information.

[0208] According to an embodiment, the encoding unit 220 may determine the type of division of a coding unit. The encoding unit 220 may determine the type of at least one coding unit included in the coding unit, and the bitstream generation unit 210 may generate a bitstream including division type mode information including information related to the type of the coding unit.

[0209] According to an embodiment, the encoder 220 may determine whether a coding unit is to be split or not. If the encoder 220 determines that a coding unit includes only one coding unit or that the coding unit is not to be split, the bitstream generator 210 may generate a bitstream including split mode information indicating that the coding unit is not to be split. Alternatively, the encoder 220 may split the coding unit into multiple coding units, and the bitstream generator 210 may generate a bitstream including split mode information indicating that the coding unit is to be split into multiple coding units.

[0210] According to an embodiment, the division mode information may include information indicating how many coding units a coding unit is divided into or in which direction the coding unit is divided. For example, the division mode information may indicate division in at least one of the vertical and horizontal directions, or may indicate no division.

[0211] The video encoding device 200 determines information related to a partition mode based on a partition mode of a coding unit. The video encoding device 200 determines a context model based on at least one of the shape, direction, width-to-height ratio, and size of the coding unit. Then, the video encoding device 200 generates information related to a partition mode for dividing the coding unit in a bitstream based on the context model.

[0212] To determine a context model, the video encoding apparatus 200 may obtain an array that associates at least one of a shape, a direction, a width-to-height ratio, and a size of a coding unit with an index related to the context model. The video encoding apparatus 200 may obtain an index related to the context model from the array based on at least one of a shape, a direction, a width-to-height ratio, and a size of the coding unit. The video encoding apparatus 200 may determine the context model based on the index related to the context model.

[0213] The video encoding apparatus 200 may determine the context model based on block shape information including at least one of the shape, direction, width-to-height ratio, and size of neighboring coding units adjacent to the coding unit, and the neighboring coding units may include at least one of the coding units located to the lower left, left, upper left, upper, upper right, right, or lower right of the coding unit.

[0214] To determine the context model, the video encoding apparatus 200 may compare the width of the upper neighboring coding unit with the width of the coding unit. The video encoding apparatus 200 may also compare the height of the left and right neighboring coding units with the height of the coding unit. The video encoding apparatus 200 may then determine the context model based on the comparison results.

[0215] The operation of the video encoding device 200 includes similar content to the operation of the video decoding device 100 described with reference to FIGS. 3 to 19, and therefore a detailed description thereof will be omitted.

[0216] FIG. 20 is a block diagram illustrating the configuration of a video decoding device 2000 according to one embodiment.

[0217] 20, a video decoding apparatus 2000 includes a bitstream obtaining unit 2010 and a predictive decoding unit 2030. The predictive decoding unit 2030 includes a motion vector predictor 2032 and a motion vector restorer 2034.

[0218] 20 may correspond to the bitstream obtainer 110 shown in FIG. 1, and the predictive decoder 2030 may correspond to the decoder 120 shown in FIG.

[0219] According to an embodiment, the bitstream obtaining unit 2010 and the predictive decoding unit 2030 may be implemented as at least one processor. The video decoding device 2000 may also include one or more memories (not shown) that store input and output data of the bitstream obtaining unit 2010 and the predictive decoding unit 2030. The video decoding device 2000 may also include a memory control unit (not shown) that controls data input and output to and from the memory (not shown).

[0220] The bitstream obtaining unit 2010 obtains a bitstream generated as a result of video encoding. The bitstream obtaining unit 2010 obtains syntax elements for video decoding from the bitstream. Binary values ​​corresponding to the syntax elements are also included in the bitstream according to the hierarchical structure of the video. The bitstream obtaining unit 2010 can obtain the syntax elements by entropy decoding the binary values ​​included in the bitstream.

[0221] The bitstream may also include information regarding a prediction mode of a current block in a current image. The current block may refer to a block of a maximum coding unit, a coding unit, or a transform unit divided from the current image to be decoded.

[0222] The prediction mode of the current block may be an intra prediction mode or an inter prediction mode. As described above, the inter prediction mode is a mode in which the current block is reconstructed from a reference block indicated by the motion vector of the current block in a reference image.

[0223] The prediction decoding unit 2030 can reconstruct the current block using intra prediction or inter prediction depending on the prediction mode of the current block.

[0224] In the inter prediction mode, motion information may be used to reconstruct the current block. The motion information of the current block may include a prediction direction, a reference image index, and a motion vector of the current block. The prediction direction, the reference image index, and the motion vector of the current block may also be identified from information included in the bitstream.

[0225] The prediction direction of the current block is any one of list 0 direction, list 1 direction, and bidirectional. The prediction direction being list 0 direction means that a picture included in reference picture list 0 is used as a reference picture in list 0 direction, and the prediction direction being list 1 direction means that a picture included in reference picture list 1 is used as a reference picture in list 1 direction. Furthermore, the prediction direction being bidirectional means that a picture included in reference picture list 0 is used as a reference picture in list 0 direction, and a picture included in reference picture list 1 is used as a reference picture in list 1 direction.

[0226] The reference picture index indicates a picture used as a reference picture of a block from among pictures included in reference picture list 0 and / or reference picture list 1. The reference picture index in the list 0 direction identifies a picture used as a reference picture in the list 0 direction from among pictures included in reference picture list 0. Furthermore, the reference picture index in the list 1 direction identifies a picture used as a reference picture in the list 1 direction from among pictures included in reference picture list 1.

[0227] The motion vector specifies the position of a reference block in a reference picture. The motion vector in the list 0 direction means a motion vector that indicates a reference block in a reference picture in the list 0 direction, and the motion vector in the list 1 direction means a motion vector that indicates a reference block in a reference picture in the list 1 direction.

[0228] If the prediction direction of the current block is the list 0 direction, the motion information of the current block includes at least one of information that the prediction direction of the current block is the list 0 direction, a reference picture index in the list 0 direction, and a motion vector in the list 0 direction. If the current block is in the list 1 direction, the motion information of the current block includes at least one of information that the prediction direction of the current block is the list 1 direction, a reference picture index in the list 1 direction, and a motion vector in the list 1 direction. If the current block is bidirectional, the motion information of the current block includes at least one of information that the prediction direction of the current block is bidirectional, a reference picture index in the list 0 direction, a reference picture index in the list 1 direction, a motion vector in the list 0 direction, and a motion vector in the list 1 direction.

[0229] In one embodiment, when the prediction mode of the current block is inter prediction mode, the bitstream acquisition unit 2010 may acquire information indicating a prediction direction of the current block and a reference image index of the current block from the bitstream. The prediction decoding unit 2030 may acquire a differential motion vector of the current block from information included in the bitstream, and may acquire a motion vector of the current block by combining the predicted motion vector of the current block and the differential motion vector.

[0230] The prediction decoding unit 2030 can reconstruct the current block based on the prediction direction, reference image index, and motion vector of the current block.

[0231] The method by which the predictive decoding unit 2030 obtains the predicted motion vector of the current block will be described in detail below.

[0232] According to an embodiment, the motion vector prediction unit 2032 may obtain a predicted motion vector using motion vectors of neighboring blocks adjacent to the current block, where the neighboring blocks are blocks at predetermined positions used to obtain the predicted motion vector of the current block and are included in the current image together with the current block.

[0233] The peripheral blocks also include A0 block, A1 block, B0 block, B1 block and B2 block at predetermined positions.

[0234] The motion vector prediction unit 2032 can identify the locations of the A0, A1, B0, B1, and B2 blocks based on the information indicating the availability of the blocks to the left and right of the current block.

[0235] In a typical video codec, decoding of an image proceeds in a raster scan direction, in which case the block to the left of the current block is decoded before the current block and is available, while the block to the right of the current block is not decoded and is not available.

[0236] In the present disclosure, the decoding direction of blocks divided from an image can be adaptively determined. That is, instead of collectively decoding blocks divided from the image along a raster scan direction, some blocks can be decoded from the right to the left, thereby improving coding efficiency. As a result, the block to the right of the current block can be used, and the block to the left of the current block cannot be used, or both the block to the right and the block to the left of the current block can be used.

[0237] Whether the left and right blocks are available is determined in the same manner as determining the availability of the first peripheral block, which will be described later.

[0238] The location of the neighboring blocks, which varies depending on the availability of blocks to the left and right of the current block, will be described with reference to FIGS. 21A to 21C.

[0239] FIG. 21A is an exemplary drawing illustrating the positions of the surrounding blocks when the block to the left of the current block 2100 is available.

[0240] The positions of the surrounding blocks when the left block of the current block 2100 is available are also identical to the positions of the spatial surrounding blocks specified in the HEVC standard.

[0241] 21A, the peripheral blocks may include a left lower corner block A0, a left lower block A1, a right upper corner block B0, a right upper block B1, and a left upper corner block B2 of the current block 2100. As shown in FIG. 21A, the left lower block A1 may be located above the left lower corner block A0, and the right upper block B1 may be located to the left of the right upper corner block B0.

[0242] FIG. 21B is an exemplary diagram illustrating the locations of neighboring blocks when the blocks to the left and right of the current block 2100 are available.

[0243] 21B, the neighboring blocks may include an upper right corner block A0, a lower left block A1, an upper left block B0, a lower right block B1, and an upper left corner block B2 of the current block 2100. As shown in FIG. 21B, the upper left corner block B2 may be located to the left of the upper left block B0.

[0244] FIG. 21C is a diagram illustrating the positions of the surrounding blocks when the block to the right of the current block 2100 is available.

[0245] 21C, the peripheral blocks may include a lower right corner block A0, a lower right block A1, an upper left corner block B0, an upper left block B1, and an upper right corner block B2 of the current block 2100. As shown in FIG. 21C, the lower right block A1 may be located above the lower right corner block A0, and the upper left block B1 may be located to the right of the upper left corner block B0.

[0246] The positions of the peripheral blocks shown in FIGS. 21A to 21C are merely examples, and the positions and number of peripheral blocks may be variously changed depending on the implementation.

[0247] The motion vector prediction unit 2032 determines the availability of the blocks to the left and right of the current block, and can identify the positions of the surrounding blocks to be used to obtain the predicted motion vector of the current block from information indicating the availability of the left and right blocks.

[0248] In one embodiment, the motion vector prediction unit 2032 selects a first peripheral block from the peripheral blocks based on information acquired from the bitstream, where the first peripheral block is any one of the A0, A1, B0, B1, and B2 blocks corresponding to the peripheral blocks.

[0249] In one embodiment, the information obtained from the bitstream also indicates the motion vector resolution of the current block. The motion vector prediction unit 2032 can check the motion vector resolution of the current block from among a plurality of predetermined motion vector resolutions based on the information obtained from the bitstream, and select a first neighboring block for obtaining a predicted motion vector.

[0250] The motion vector resolution may refer to the accuracy of a pixel position that a motion vector determined through inter prediction can indicate among pixels included in a reference image (or an interpolated reference image). The motion vector resolution having N pixel units (N is a rational number) means that a motion vector can have an accuracy of N pixel units. For example, a motion vector resolution of 1 / 4 pixel units may mean that a motion vector can indicate a pixel in 1 / 4 pixel units (i.e., sub-pixel units) in an interpolated reference image, and a motion vector resolution of 1 pixel unit may mean that a motion vector can indicate a pixel corresponding to 1 pixel unit (i.e., integer pixel units) in an interpolated reference image. Among various motion vector resolutions, a motion vector resolution that can represent the motion vector of a current block using a small number of bits may be adaptively determined.

[0251] In one embodiment, the information indicating the motion vector resolution obtained from the bitstream may indicate any one of various motion vector resolutions, and may also indicate any one first peripheral block among peripheral blocks at different positions.

[0252] FIG. 22 is a diagram illustrating a mapping relationship between an index indicating a motion vector resolution, a motion vector resolution, and a position of a neighboring block.

[0253] 22, it can be seen that the motion vector resolution and the neighboring block corresponding to the first neighboring block can be determined according to the value of the index (AMVR index). For example, if the index (AMVR index) is 0, the motion vector resolution of the current block can be selected to be 1 / 4 pixel unit (pel) and the first neighboring block can be selected to be block A1. Also, if the index (AMVR index) is 1, the motion vector resolution of the current block can be selected to be 1 / 2 pixel unit (pel) and the first neighboring block can be selected to be block B1.

[0254] In the existing HEVC standard, various neighboring blocks are included in a candidate list, and the motion vector of a neighboring block in the candidate list selected from information signaled via a bitstream is used as a predicted motion vector. However, in the present disclosure, the first neighboring block used to obtain the predicted motion vector of the current block may be identified by information obtained from the bitstream, i.e., information indicating the motion vector resolution of the current block. Therefore, separate information indicating one of the neighboring blocks included in the candidate list (e.g., mvp_l0_flag, mvp_l1_flag in HEVC) is not included in the bitstream.

[0255] The motion vector prediction unit 2032 determines the availability of the selected first peripheral block based on the information indicating the motion vector resolution. Specifically, the motion vector prediction unit 2032 determines the availability of the first peripheral block based on at least one of whether a tile including the first peripheral block is different from a tile including the current block, whether the first peripheral block is located outside the current image, whether the first peripheral block is intra-predicted, and whether the reconstruction of the first peripheral block is complete.

[0256] For example, the motion vector predictor 2032 may determine that the first peripheral block is not available if any one of the following four conditions is satisfied:

[0257] (Condition 1) The tile containing the first peripheral block and the tile containing the current block are different from each other.

[0258] (Condition 2) The first surrounding block is located outside the current image.

[0259] (Condition 3) The first surrounding block is not restored.

[0260] (Condition 4) The first surrounding block is coded in intra prediction mode or IBC (Intra Block Copy) mode.

[0261] In the IBC mode, a prediction block corresponding to a current block is searched for within a current image. The prediction block can also be obtained through motion estimation for the current image. For example, a prediction block can be searched for in integer pixel units within the current image, and the positional relationship between the current block and the searched prediction block can be signaled to the decoder.

[0262] In one embodiment, the motion vector prediction unit 2032 may determine that the motion vector of the first peripheral block is usable as a predicted motion vector if the first peripheral block is identified as usable from the information indicating the availability of the first peripheral block and the reference image index of the first peripheral block in the same prediction direction as the prediction direction of the current block is not equal to a predetermined value (e.g., −1). If the motion vector of the first peripheral block is usable as a predicted motion vector, the motion vector prediction unit 2032 derives a predicted motion vector of the current block from the motion vector of the first peripheral block.

[0263] If the information indicating the availability of the first peripheral block indicates that the first peripheral block is unavailable, or if the information indicating the availability of the first peripheral block indicates that the first peripheral block is available, but the reference image index of the first peripheral block in the same prediction direction as the prediction direction of the current block is the same as a predetermined value, it may be determined that the motion vector of the first peripheral block is unavailable as a predicted motion vector. In this case, the motion vector prediction unit 2032 may obtain a default motion vector through a default motion vector deriving procedure described below and obtain a predicted motion vector of the current block using the default motion vector.

[0264] The reference image index of the first neighboring block in the same prediction direction as the prediction direction of the current block being not equal to a predetermined value may mean that there is a motion vector of the first neighboring block indicating a reference image in the same prediction direction as the prediction direction of the current block. Conversely, the reference image index of the first neighboring block in the same prediction direction as the prediction direction of the current block being equal to a predetermined value may mean that there is no motion vector of the first neighboring block indicating a reference image in the same prediction direction as the prediction direction of the current block.

[0265] The reference image index of the first peripheral block includes a reference image index in the list 0 direction and a reference image index in the list 1 direction, and the values ​​of the reference image index in the list 0 direction and the reference image index in the list 1 direction are also determined along the prediction direction of the first peripheral block.

[0266] For example, if the prediction direction of the first surrounding block is the list 0 direction, the reference picture index in the list 0 direction is set to the value of the index (e.g., ref_idx_l0) obtained from the bitstream, and the reference picture index in the list 1 direction is set to a predetermined value. Since the pictures included in the reference picture list have indexes from 0 to n (n is a natural number), the predetermined value can be a value different from 0 to n, for example, -1.

[0267] If the prediction direction of the first surrounding block is list 1 direction, the reference image index in list 1 direction is set to the value of the index (e.g., ref_idx_l1) obtained from the bitstream, and the reference image index in list 0 direction is set to a predetermined value.

[0268] If the prediction direction of the first surrounding block is bidirectional, the reference image index in the list 0 direction and the reference image index in the list 1 direction are both set to the values ​​of the indexes (e.g., ref_idx_l0, ref_idx_l1) obtained from the bitstream.

[0269] Hereinafter, cases where the reference image index of the first neighboring block in the same prediction direction as the current block is the same as or different from a predetermined value will be described with reference to Figures 23A to 23C.

[0270] FIG. 23A illustrates a case where the reference image index of the first neighboring block in the same prediction direction as the current block is not equal to a predetermined value.

[0271] 23A , the prediction directions of the current block 2312 and the first peripheral block 2314 are both in the list 0 direction. Therefore, the motion vector MV of the first peripheral block 2314 indicates a reference block in a reference picture 2330 included in reference picture list 0. The reference picture index of the first peripheral block 2314 in the list 0 direction is set according to information acquired from the bitstream, and the reference picture index of the first peripheral block 2314 in the list 1 direction is set to a predetermined value. The motion vector predictor 2032 obtains a predicted motion vector for the current block 2312 using the motion vector MV of the first peripheral block 2314 because the reference picture index of the first peripheral block 2314 in the list 0 direction, which is the same prediction direction as the prediction direction of the current block 2312, is not the same as the predetermined value.

[0272] Similarly, if the prediction directions of the current block 2312 and the first peripheral block 2314 are both in the list 1 direction, the motion vector prediction unit 2032 obtains the predicted motion vector of the current block 2312 using the motion vector MV of the first peripheral block 2314, since the reference image index of the first peripheral block 2314 in the list 1 direction, which is the same prediction direction as the prediction direction of the current block 2312, is not the same as the predetermined value.

[0273] FIG. 23B illustrates a case where the reference image index of the first neighboring block in the same prediction direction as the current block is equal to a predetermined value.

[0274] 23B, the prediction direction of the current block 2312 is the list 1 direction, and the prediction direction of the first peripheral block 2314 is the list 0 direction. The motion vector MV of the first peripheral block 2314 indicates a reference block in a reference picture 2330 included in reference picture list 0. The reference picture index of the first peripheral block 2314 in the list 0 direction is set according to information acquired from the bitstream, and the reference picture index of the first peripheral block 2314 in the list 1 direction is set to a predetermined value. The motion vector predictor 2032 obtains a predicted motion vector for the current block 2312 using a default motion vector, which will be described later, because the reference picture index of the first peripheral block 2314 in the list 1 direction, which is the same prediction direction as the prediction direction of the current block 2312, is the same as the predetermined value.

[0275] Similarly, if the prediction direction of the current block 2312 is the list 0 direction and the prediction direction of the first surrounding block 2314 is the list 1 direction, the motion vector prediction unit 2032 obtains the predicted motion vector of the current block 2312 using the default motion vector because the reference image index of the first surrounding block 2314 in the list 0 direction, which is the same prediction direction as the prediction direction of the current block 2312, is the same as a predetermined value.

[0276] Figure 23C is a diagram illustrating a case where, when the prediction direction of the current block is bidirectional, one of the reference image index in the list 0 direction of the first surrounding block and the reference image index in the list 1 direction is the same as a predetermined value, and the other is not the same as a predetermined value.

[0277] 23C, the prediction direction of the current block 2312 is bidirectional, and the prediction direction of the first peripheral block 2314 is list 1 direction. The motion vector MV of the first peripheral block 2314 points to a reference block in a reference picture 2350 included in reference picture list 1. The reference picture index of the first peripheral block 2314 in list 0 direction is set to a predetermined value, and the reference picture index of the first peripheral block 2314 in list 1 direction is set according to information obtained from the bitstream. As described above, the bidirectional prediction direction includes both list 0 direction and list 1 direction. The motion vector prediction unit 2032 obtains a predicted motion vector in the list 0 direction of the current block 2312 using a default motion vector because the reference image index in the list 0 direction of the first peripheral block 2314 is the same as a predetermined value, and obtains a predicted motion vector in the list 0 direction of the current block 2312 using a motion vector MV in the list 1 direction of the first peripheral block 2314 because the reference image index in the list 1 direction of the first peripheral block 2314 is not the same as a predetermined value.

[0278] If the prediction direction of the current block 2312 is bidirectional and the prediction direction of the first peripheral block 2314 is list 0 direction, the motion vector prediction unit 2032 uses the motion vector MV of the first peripheral block 2314 in the list 0 direction to obtain a predicted motion vector of the current block 2312 in the list 0 direction, and uses the default motion vector to obtain a predicted motion vector of the current block 2312 in the list 1 direction.

[0279] In the present disclosure, if a first peripheral block is available and the reference image index of the first peripheral block in the same prediction direction as that of the current block is not equal to a predetermined value, it is determined that the motion vector of the first peripheral block may be used as a predicted motion vector, and the predicted motion vector of the current block is obtained from the motion vector of the first peripheral block.

[0280] If it is determined that the motion vector of the first peripheral block can be used as a predicted motion vector only under the condition that the first peripheral block must be available, the predicted motion vector of the current block may be set to a zero vector, i.e., (0,0). In other words, if the first peripheral block is available but there is no motion vector of the first peripheral block in the same prediction direction as the current block, the motion vector of the first peripheral block cannot be used as a predicted motion vector of the current block. As a result, the predicted motion vector of the current block may be determined to be a zero vector, which ultimately increases the number of bits required to represent the differential motion vector.

[0281] In the present disclosure, if both the condition that the first peripheral block must be available and the condition that the motion vector of the first peripheral block having the same prediction direction as the prediction direction of the current block must exist are satisfied, the motion vector of the first peripheral block is used to obtain the predicted motion vector of the current block, thereby reducing the number of bits required to represent the differential motion vector.

[0282] The following describes a process of deriving a default motion vector when the motion vector of the first surrounding block is not available as a predicted motion vector.

[0283] In one embodiment, if the motion vector of the first peripheral block is unavailable as a predicted motion vector, the motion vector prediction unit 2032 may set the motion vector of a second peripheral block at a predetermined position as a default motion vector. There may be multiple second peripheral blocks, and in this case, the motion vector of any one of the second peripheral blocks may be set as the default motion vector through availability determination for the multiple second peripheral blocks.

[0284] The second peripheral block may correspond to at least one of the peripheral blocks. For example, the second peripheral block may include the A1 block and the B1 block. For another example, the location of the second peripheral block may be different from the locations of the A0 block, the A1 block, the B0 block, the B1 block, and the B2 block.

[0285] If the second neighboring blocks include block A1 and block B1, the positions of block A1 and block B1 also vary depending on the availability of blocks to the left and right of the current block, as described above. Specifically, referring to FIGS. 21A through 21C, if the block to the left of the current block is available, block A1 may be located at the bottom left of the current block, and block B1 may be located at the top right of the current block. If both the blocks to the left and right of the current block are available, block A1 may be located at the bottom left of the current block, and block B1 may be located at the bottom right of the current block. If the block to the right of the current block is available, block A1 may be located at the bottom right of the current block, and block B1 may be located at the top left of the current block.

[0286] The motion vector prediction unit 2032 determines the availability of the A1 block, and if the A1 block is identified as available based on the information indicating whether the A1 block is available, the motion vector prediction unit 2032 can determine the motion vector of the A1 block as the default motion vector. If the A1 block is not available, the motion vector prediction unit 2032 determines the availability of the B1 block, and if the B1 block is identified as available based on the information indicating whether the B1 block is available, the motion vector prediction unit 2032 can determine the motion vector of the B1 block as the default motion vector. That is, the motion vector prediction unit 2032 can check whether the motion vectors of the A1 block and the B1 block can be used as the default motion vector in the order of the A1 block → the B1 block.

[0287] The availability of the A1 block and the B1 block is also determined based on the four conditions for determining the availability of the first peripheral block described above.

[0288] In one embodiment, the motion vector prediction unit 2032 may set the motion vector of the second peripheral block to a default motion vector if the second peripheral block is identified as available from the information indicating the availability of the second peripheral block, and if the reference image index of the second peripheral block in the same prediction direction as the prediction direction of the current block is the same as the reference image index of the current block, or if the reference image index of the second peripheral block in the same prediction direction as the prediction direction of the current block is not the same as a predetermined value (i.e., if a motion vector of the second peripheral block in the same prediction direction as the prediction direction of the current block exists).

[0289] If the information indicating the availability of the second peripheral block identifies that the second peripheral block is unavailable or if there is no motion vector of the second peripheral block with the same prediction direction as the prediction direction of the current block, the motion vector prediction unit 2032 can set the motion vector of the block decoded before the current block as the default motion vector.

[0290] The motion vector prediction unit 2032 may determine the motion vector of the first neighboring block or the default motion vector as the predicted motion vector of the current block.

[0291] When the motion vector of the first peripheral block is determined as the predicted motion vector, if the reference image index of the first peripheral block having the same prediction direction as the prediction direction of the current block is not the same as the reference image index of the current block, the motion vector prediction unit 2032 may update the predicted motion vector of the current block by scaling the predicted motion vector of the current block according to the distance between the current image and the reference image of the current block and the distance between the current image and the reference image of the first peripheral block.

[0292] In one embodiment, if the reference image index of a second neighboring block (or a block used to obtain the default motion vector and decoded before the current block) having the same prediction direction as the current block's prediction direction is the same as the reference image index of the current block, the motion vector prediction unit 2032 may determine the default motion vector as the predicted motion vector of the current block. Also, if the reference image index of a second neighboring block (or a block used to obtain the default motion vector and decoded before the current block) having the same prediction direction as the current block's prediction direction is not the same as the reference image index of the current block, the motion vector prediction unit 2032 may scale the default motion vector according to the distance between the current image and the reference image of the current block and the distance between the current image and the reference image of the second neighboring block (or a block decoded before the current block), and determine the scaled default motion vector as the predicted motion vector of the current block.

[0293] After obtaining the predicted motion vector of the current block, the motion vector prediction unit 2032 may adjust the predicted motion vector of the current block if the motion vector resolution of the current block is different from a predetermined motion vector resolution (e.g., the smallest motion vector resolution among a plurality of motion vector resolutions). The reason for adjusting the predicted motion vector is to match the motion vector resolution of the current block with the resolution of the predicted motion vector.

[0294] The motion vector prediction unit 2032 can adjust the predicted motion vector represented by coordinates in an image interpolated by the minimum motion vector resolution to the motion vector resolution of the current block, by adjusting the predicted motion vector to point to a surrounding pixel instead of the pixel indicated by the predicted motion vector.

[0295] For example, if the minimum motion vector resolution is in 1 / 4 pixel units and the motion vector resolution of the current block is in 1 pixel units, the motion vector prediction unit 2032 may adjust the predicted motion vector of (19,27) so that the predicted motion vector becomes (20,28) because, if the minimum motion vector resolution is in 1 / 4 pixel units, an integer pixel has coordinates of (4n,4m) in the interpolated image.

[0296] In one embodiment, when adjusting a predicted motion vector according to the motion vector resolution of the current block, the motion vector prediction unit 2032 may cause the adjusted predicted motion vector to indicate a pixel located to the right and top of the pixel indicated by the predicted motion vector before adjustment. In another embodiment, the motion vector prediction unit 2032 may cause the adjusted predicted motion vector to indicate a pixel located to the left and top, left and bottom, or right and bottom of the pixel indicated by the predicted motion vector before adjustment.

[0297] To summarize the above, according to one embodiment, if the motion vector of a first peripheral block is available as a predicted motion vector, the motion vector of the first peripheral block is determined as the predicted motion vector of the current block. If the reference image index of the first peripheral block having the same prediction direction as the current block is not the same as the reference image index of the current block, the predicted motion vector is scaled. If the motion vector resolution of the current block is not the same as a predetermined motion vector resolution among a plurality of motion vector resolutions, the predicted motion vector or the scaled predicted motion vector is adjusted according to the motion vector resolution of the current block.

[0298] Furthermore, if the motion vector of the first neighboring block cannot be used as a predicted motion vector, a default motion vector is derived. If the reference image index of a block (the block used to derive the default motion vector) having the same prediction direction as the current block is not the same as the reference image index of the current block, the default motion vector is scaled, and the scaled default motion vector is determined as the predicted motion vector of the current block. If the motion vector resolution of the current block is not the same as a predetermined motion vector resolution among multiple motion vector resolutions, the predicted motion vector is adjusted according to the motion vector resolution of the current block.

[0299] The motion vector restoration unit 2034 combines the predicted motion vector of the current block with the differential motion vector acquired from the bitstream to obtain the motion vector of the current block. The motion vector restoration unit 2034 can add the predicted motion vector of the current block and the differential motion vector to obtain the motion vector of the current block.

[0300] The prediction decoding unit 2030 may perform inter-prediction on the current block based on the prediction direction, reference image index, and motion vector of the current block, and reconstruct the current block.

[0301] FIG. 24 is a flowchart illustrating a method for decoding motion vectors according to one embodiment.

[0302] In operation S2410, the video decoding apparatus 2000 determines the availability of a first neighboring block selected from neighboring blocks adjacent to the current block according to information acquired from the bitstream.

[0303] In one embodiment, the information obtained from the bitstream also includes information indicating the motion vector resolution of the current block among a plurality of motion vector resolutions.

[0304] In operation S2420, the video decoding apparatus 2000 determines whether a first neighboring block is available and whether a motion vector of the first neighboring block having the same prediction direction as the prediction direction of the current block exists.

[0305] In step S2430, if the first surrounding block is available and a motion vector of the first surrounding block having the same prediction direction as the prediction direction of the current block exists, the video decoding device 2000 obtains a predicted motion vector of the current block from the motion vector of the first surrounding block.

[0306] In step S2440, if the first surrounding block is not available or there is no motion vector of the first surrounding block with the same prediction direction as the prediction direction of the current block, the video decoding device 2000 obtains a predicted motion vector of the current block from the motion vector of the second surrounding block.

[0307] As mentioned above, if the second neighboring block is not available, the predicted motion vector of the current block can be obtained from the motion vector of a block decoded before the current block.

[0308] In operation S2450, the video decoding apparatus 2000 combines the predicted motion vector of the current block with the differential motion vector to obtain the motion vector of the current block.

[0309] FIG. 25 is a block diagram illustrating the configuration of a video encoding device 2500 according to one embodiment.

[0310] 25, a video encoding device 2500 includes a predictive encoding unit 2510 and a bitstream generating unit 2530. The predictive encoding unit 2510 also includes a motion vector predictor 2512 and a motion vector encoder 2514.

[0311] The predictive encoder 2510 may correspond to the encoder 220 in FIG. 2, and the bitstream generator 2530 may correspond to the bitstream generator 210 in FIG.

[0312] According to an embodiment, the predictive encoder 2510 and the bitstream generator 2530 may be implemented as at least one processor. The video encoder 2500 may also include one or more memories (not shown) that store input and output data of the predictive encoder 2510 and the bitstream generator 2530. The video encoder 2500 may also include a memory controller (not shown) that controls data input and output to and from the memory (not shown).

[0313] The predictive coding unit 2510 codes the video according to the prediction mode, and the bitstream generation unit 2530 generates a bitstream including information generated as a result of the video coding.

[0314] The predictive coding unit 2510 may determine a prediction mode of a current block in a current image. If the prediction mode of the current block is determined to be an inter prediction mode, the bitstream generation unit 2530 may include information indicating motion information of the current block in the bitstream.

[0315] The motion vector prediction unit 2512 predicts the motion vector of the current block to be coded in the inter prediction mode.

[0316] According to an embodiment, the motion vector predictor 2512 may obtain a predicted motion vector using motion vectors of neighboring blocks adjacent to the current block. The locations of the neighboring blocks have been described above, and therefore will not be described in detail.

[0317] In one embodiment, the motion vector prediction unit 2512 selects a first peripheral block from the peripheral blocks, which is any one of the A0 block, A1 block, B0 block, B1 block, and B2 block corresponding to the peripheral blocks.

[0318] In one embodiment, the motion vector prediction unit 2512 may select a first neighboring block that is mapped to the motion vector resolution of the current block from among a plurality of motion vector resolutions.

[0319] The motion vector prediction unit 2512 determines the availability of the first peripheral block based on at least one of whether a tile including the first peripheral block and a tile including the current block are different from each other, whether the first peripheral block is located outside the current image, whether the first peripheral block has been intra-predicted, and whether reconstruction of the first peripheral block has been completed.

[0320] In one embodiment, the motion vector prediction unit 2512 may determine that the first peripheral block is usable as a predicted motion vector if the information indicating the availability of the first peripheral block indicates that the first peripheral block is usable, and if the reference image index of the first peripheral block in the same prediction direction as the prediction direction of the current block is not equal to a predetermined value (i.e., if a motion vector of the first peripheral block in the same prediction direction as the prediction direction of the current block exists). The predetermined value may be, for example, −1. If the motion vector of the first peripheral block is usable as a predicted motion vector, the motion vector prediction unit 2512 derives a predicted motion vector of the current block from the motion vector of the first peripheral block.

[0321] If the information indicating the availability of the first peripheral block indicates that the first peripheral block is unavailable, or if the reference image index of the first peripheral block in the same prediction direction as the current block is equal to a predetermined value, it may be determined that the motion vector of the first peripheral block is unavailable as a predicted motion vector. In this case, the motion vector prediction unit 2512 may obtain a predicted motion vector of the current block using a default motion vector.

[0322] In one embodiment, if the motion vector of the first peripheral block is unavailable as a predicted motion vector, the motion vector prediction unit 2512 may set the motion vector of a second peripheral block at a predetermined position as a default motion vector. There may be multiple second peripheral blocks, and in this case, the motion vector of any one of the second peripheral blocks may be set as the default motion vector through availability determination for the multiple second peripheral blocks.

[0323] If the second surrounding blocks include the A1 block and the B1 block, the motion vector prediction unit 2512 determines the availability of the A1 block. If the A1 block is identified as available based on the information indicating whether the A1 block is available, the motion vector prediction unit 2512 may determine the availability of the B1 block as the default motion vector. If the A1 block is not available, the motion vector prediction unit 2512 determines the availability of the B1 block. If the B1 block is identified as available based on the information indicating whether the B1 block is available, the motion vector prediction unit 2512 may determine the motion vector of the B1 block as the default motion vector. That is, the motion vector prediction unit 2512 may check whether the motion vectors of the A1 block and the B1 block can be used as the default motion vector in the order of the A1 block → the B1 block.

[0324] In one embodiment, the motion vector prediction unit 2512 may set the motion vector of the second peripheral block to a default motion vector if the second peripheral block is identified as available from the information indicating the availability of the second peripheral block, and if the reference image index of the second peripheral block in the same prediction direction as the prediction direction of the current block is the same as the reference image index of the current block, or if the reference image index of the second peripheral block in the same prediction direction as the prediction direction of the current block is not the same as a predetermined value (i.e., if a motion vector of the second peripheral block in the same prediction direction as the prediction direction of the current block exists).

[0325] If the information indicating the availability of the second peripheral block identifies that the second peripheral block is unavailable or if the reference image index of the second peripheral block having the same prediction direction as the current block is the same as a predetermined value, the motion vector prediction unit 2512 can set the motion vector of the block coded before the current block as the default motion vector.

[0326] The motion vector prediction unit 2512 may determine the motion vector of the first neighboring block or the default motion vector as the predicted motion vector of the current block.

[0327] When the motion vector of the first peripheral block is determined as the predicted motion vector, if the reference image index of the first peripheral block having the same prediction direction as the prediction direction of the current block is not the same as the reference image index of the current block, the motion vector prediction unit 2512 may update the predicted motion vector of the current block by scaling the predicted motion vector of the current block according to the distance between the current image and the reference image of the current block and the distance between the current image and the reference image of the first peripheral block.

[0328] In one embodiment, if a default motion vector is obtained, the motion vector prediction unit 2512 may determine the default motion vector as a predicted motion vector of the current block if the reference image index of the second neighboring block (or a block used to obtain the default motion vector and decoded before the current block) in the same prediction direction as the current block is the same as the reference image index of the current block. If the reference image index of the second neighboring block (or a block used to obtain the default motion vector and decoded before the current block) in the same prediction direction as the current block is not the same as the reference image index of the current block, the motion vector prediction unit 2512 may scale the default motion vector according to the distance between the current image and the reference image of the current block and the distance between the current image and the reference image of the second neighboring block (or a block decoded before the current block), and determine the scaled default motion vector as a predicted motion vector of the current block.

[0329] After the predicted motion vector of the current block is obtained, the motion vector prediction unit 2512 can adjust the predicted motion vector of the current block if the motion vector resolution of the current block is different from a predetermined motion vector resolution (e.g., the smallest motion vector resolution among multiple motion vector resolutions).

[0330] The motion vector encoding unit 2514 obtains a differential motion vector between the motion vector of the current block and the predicted motion vector. The motion vector encoding unit 2514 may obtain a differential motion vector by subtracting the predicted motion vector from the motion vector of the current block.

[0331] The bitstream generator 2530 generates a bitstream including information indicating a differential motion vector of the current block and information indicating a first peripheral block among the peripheral blocks. As described above, the information indicating the first peripheral block also indicates a motion vector resolution of the current block among a plurality of motion vector resolutions.

[0332] FIG. 26 is a flowchart illustrating a method for encoding motion vectors according to one embodiment.

[0333] In operation S2610, the video encoding device 2500 determines the availability of a first neighboring block selected from neighboring blocks adjacent to the current block. In one embodiment, the video encoding device 2500 may select the first neighboring block having a motion vector resolution corresponding to the motion vector resolution of the current block.

[0334] In operation S2620, the video encoding apparatus 2500 determines whether a first neighboring block is available and whether a motion vector of the first neighboring block having the same prediction direction as the prediction direction of the current block exists.

[0335] In step S2630, if the first peripheral block is available and a motion vector of the first peripheral block with the same prediction direction as the current block exists, the video encoding device 2500 obtains a predicted motion vector of the current block from the motion vector of the first peripheral block.

[0336] In step S2640, if the first surrounding block is not available or there is no motion vector of the first surrounding block with the same prediction direction as the prediction direction of the current block, the video encoding device 2500 obtains a predicted motion vector of the current block from the motion vector of the second surrounding block.

[0337] If the second neighboring block is not available, the predicted motion vector of the current block may be obtained from the motion vector of a block coded before the current block.

[0338] In operation S2650, the video encoding device 2500 obtains a differential motion vector between the motion vector of the current block and the predicted motion vector, and generates a bitstream including information indicating the differential motion vector and information indicating a first peripheral block. The information indicating the first peripheral block is also information indicating the motion vector resolution of the current block among a plurality of motion vector resolutions.

[0339] 27 and 28 are diagrams illustrating a process of obtaining a motion vector predictor according to an embodiment.

[0340] 27 and 28 specifically illustrate an example of the above embodiment. In FIG. 27 and 28, LX included in mvpLX and mvLX indicates the prediction direction of the current block. That is, if the prediction direction of the current block is the L0 direction, X is 0, and if the prediction direction of the current block is the L1 direction, X is 1. If the prediction direction of the current block is bidirectional, X may have values ​​of 0 and 1 sequentially.

[0341] In S2710, a flag (mvpAvailFlag) indicating availability of the motion vector predictor is set to 0.

[0342] In S2720, a block used to obtain a predicted motion vector for the current block is identified based on information (amvr_idx) indicating the motion vector resolution of the current block. If amvr_idx is 1, block B1 is selected. Then, a determination is made as to the availability of block B1. The availability of block B1 is also determined based on the four conditions for determining the availability of the first peripheral block described above. To avoid redundant explanation, FIG. 27 only illustrates the process when amvr_idx is 1, but blocks at different positions are selected depending on the value of amvr_idx. For example, as shown in FIG. 22, a block mapped to amvr_idx may be selected.

[0343] In S2730, the B1 block is identified as available from the information indicating the availability of the B1 block (availableB1), and if the reference video index (RefIdxLX) of the B1 block in the same prediction direction as the prediction direction of the current block is not equal to -1, the flag indicating the availability of the predicted motion vector (mvpAvailFlag) is set to 1, and the motion vector of the B1 block is set to the predicted motion vector (mvpLX).

[0344] In S2740, if the reference picture index (refIdxLX) of the current block and the reference picture index (RefIdxLX[xNbB1][yNbB1]) of the B1 block are not the same, the predicted motion vector (mvpLX) is scaled by the ratio (distScaleFactorLX) of the distance (currPocDiffLX) between the current picture and the reference picture of the B1 block (RefPicListX[RefIdxLX[xNbB1][yNbB1]]) and the distance (targetPocDiffLX) between the current picture and the reference picture of the current block (RefPicListX[refIdxLX]).

[0345] In S2750, if amvr_idx is not 0, i.e., if the motion vector resolution of the current block is different from a predetermined motion vector resolution (e.g., the minimum motion vector resolution), the predicted motion vector (mvpLX) is adjusted. If amvr_idx is 0, i.e., if the predicted motion vector is obtained from the motion vector of the A1 block, the predicted motion vector adjustment process is not performed.

[0346] Next, referring to FIG. 28, in S2810, if the flag (mvpAvailFlag) indicating the availability of the predicted motion vector is 0, that is, if the information indicating the availability of the B1 block (availableB1) identifies that the B1 block is not available, or if the reference image index (RefIdxLX[xNbB1][yNbB1]) of the B1 block in the same prediction direction as the prediction direction of the current block is equal to -1, the default motion vector derivation procedure of S2820 to S2890 is performed.

[0347] In S2820, the availability of the A1 block and the B1 block is determined. The availability of the A1 block and the B1 block is also determined based on the four conditions for determining the availability of the first peripheral block described above.

[0348] In S2830, both the x-axis component and the y-axis component of the default motion vector (DefaultMvLX) are set to zero.

[0349] In S2840, if the A1 block is identified as available from the information indicating the availability of the A1 block (availableA1), and the reference image index (refIdxLX) of the current block is identical to the reference image index (RefIdxLX[xNbA1][yNbA1]) of the A1 block, the motion vector of the A1 block is set to the default motion vector.

[0350] In S2850, if the conditions described in S2840 are not satisfied, the B1 block is identified as available from the information indicating the availability of the B1 block (availableB1), and the reference video index (refIdxLX) of the current block and the reference video index (RefIdxLX[xNbB1][yNbB1]) of the B1 block are identical, the motion vector of the B1 block is set to the default motion vector.

[0351] In S2860, if the conditions described in S2850 are not satisfied, the A1 block is identified as available from the information indicating the availability of the A1 block (availableA1), and the reference video index (RefIdxLX[xNbA1][yNbA1]) of the A1 block is not equal to -1, the motion vector of the A1 block is set to the default motion vector.

[0352] In S2870, if the conditions described in S2860 are not satisfied, the B1 block is identified as available from the information indicating the availability of the B1 block (availableB1), and the reference video index (RefIdxLX[xNbB1][yNbB1]) of the B1 block is not equal to -1, the motion vector of the B1 block is set to the default motion vector.

[0353] In S2880, if the motion vector of the A1 block or the motion vector of the B1 block is not set as the default motion vector, the motion vector of the block decoded before the current block is set as the default motion vector.

[0354] In S2890, if the reference picture index (refIdxLX) of the current block and the default reference picture index (DefaultRefIdxLX) are not the same, the default motion vector is scaled according to the ratio (distScaleFactorLX) of the distance (currPocDiffLX) between the current picture and the picture (RefPicListX[DefaultRefIdxLX]) indicated by the default reference picture index and the distance (targetPocDiffLX) between the current picture and the reference picture (RefPicListX[refIdxLX]) of the current block. Here, the default reference picture index (DefaultRefIdxLX) may refer to the reference picture index of the block used to obtain the default motion vector.

[0355] In S2895, the default motion vector (DefaultMvLX) is set as the predicted motion vector (mvpLX) of the current block.

[0356] Although not shown in Figure 28, if amvr_idx is not 0, i.e., if the motion vector resolution of the current block is different from a predetermined motion vector resolution (e.g., the minimum motion vector resolution), adjustment of the predicted motion vector (mvpLX) is performed.

[0357] The above-described embodiments of the present disclosure can be created into a program that can be executed by a computer, and the created program can also be stored on a medium.

[0358] The medium may continuously store a computer-executable program or temporarily store it for execution or download. The medium may also be a variety of recording or storage means, either in the form of a single piece of hardware or a combination of several pieces of hardware. It is not limited to media directly connected to a computer system, but may also be distributed over a network. Examples of the medium include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs (Compact Disc Read-Only Memory) and DVDs (Digital Versatile Discs); magneto-optical media such as floptical disks; and read-only memory (ROM), random access memory (RAM), flash memory, and other media configured to store program instructions. Other examples of media include recording or storage media managed by app stores that distribute applications, websites that provide or distribute various software, and servers.

[0359] The technical idea of ​​the present disclosure has been described in detail above with reference to preferred embodiments, but the technical idea of ​​the present disclosure is not limited to the above-described embodiments, and various modifications and changes may be made by those skilled in the art within the scope of the technical idea of ​​the present disclosure.

Claims

1. In a motion vector decoding method by a video decoding device, obtaining information indicating a motion vector resolution of a current block from a bitstream; selecting a first peripheral block from among a plurality of peripheral blocks adjacent to the current block using information indicating a motion vector resolution of the current block; determining a motion vector predictor for the current block using a motion vector of the first neighboring block if the current block references a reference picture in list 0 and the first neighboring block references a reference picture in list 0; determining a motion vector of a second peripheral block among the plurality of peripheral blocks as a default motion vector if the current block refers to a reference picture in list 0 and the first peripheral block refers to a reference picture in list 1, and determining the motion vector predictor of the current block using the default motion vector; adjusting the motion vector predictor based on information indicating a motion vector resolution of the current block; determining a motion vector for the current block using the adjusted motion vector predictor for the current block.

2. In a motion vector encoding method by a video encoding device, determining a motion vector resolution of a current block; selecting a first neighboring block from among a plurality of neighboring blocks adjacent to the current block using a motion vector resolution of the current block; determining a motion vector predictor for the current block using a motion vector of the first neighboring block if the current block references a reference picture in list 0 and the first neighboring block references a reference picture in list 0; determining a motion vector of a second peripheral block among the plurality of peripheral blocks as a default motion vector if the current block refers to a reference picture in list 0 and the first peripheral block refers to a reference picture in list 1, and determining a motion vector predictor for the current block using the default motion vector; adjusting the motion vector predictor based on the motion vector resolution of the current block; generating a bitstream including information indicating a motion vector resolution of the current block.

3. A method for generating and transmitting a bitstream by an encoding method, comprising: The bitstream comprises: including information indicating the motion vector resolution of the current block, The encoding method comprises: selecting a first neighboring block from a plurality of neighboring blocks adjacent to the current block using a motion vector resolution of the current block; determining a motion vector predictor for the current block using a motion vector of the first neighboring block if the current block references a reference picture in list 0 and the first neighboring block references a reference picture in list 0; determining a motion vector of a second peripheral block among the plurality of peripheral blocks as a default motion vector if the current block refers to a reference picture in list 0 and the first peripheral block refers to a reference picture in list 1, and determining a motion vector predictor of the current block using the default motion vector; adjusting the motion vector predictor based on the motion vector resolution of the current block; generating the bitstream including information indicating a motion vector resolution of the current block; Transmission method.

Citation Information

Patent Citations

  • Apparatus and method for encoding motion vector determined using adaptive motion vector resolution, and apparatus and method for decoding motion vector

    EP3618435A1

  • Method and device for encoding motion vectors, and method and device for decoding said vectors

    JP2013530660A

  • JPP7556979B

  • Interframe prediction method and apparatus, and terminal device

    WO2019109955A1