Motion information encoding method, decoding method, encoding device, decoding device, and recording medium
By determining basic and residual motion vectors based on transition distance and direction from a bitstream, the method addresses the challenge of representing motion information with fewer bits, improving compression efficiency in video encoding and decoding.
Patent Information
- Application Number
- JP2025070051
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2017-09-12
- Filing Date
- 2025-04-22
- Publication Date
- 2025-07-23
- Estimated Expiration
- 2038-09-12
AI Technical Summary
Existing video encoding and decoding methods face challenges in representing motion information and differential motion vectors with a small number of bits, leading to inefficiencies in compression and data transmission.
A method for decoding motion information involves determining a basic motion vector and a primary residual motion vector based on transition distance and direction from a bitstream, and optionally a secondary residual motion vector, to accurately represent the motion vector of a current block with fewer bits.
This approach allows for more efficient representation of motion information and residual motion vectors using fewer bits, enhancing compression efficiency and data transmission in video encoding and decoding processes.
Smart Images

Figure 2025108685000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video encoding and decoding. More specifically, the present invention relates to a method and apparatus for encoding motion information used in video encoding and decoding, and a method and apparatus for decoding the same.
Background Art
[0002] In video encoding and decoding methods, in order to encode a video, one picture is divided into blocks, and each block can be predicted and encoded through inter prediction or intra prediction.
[0003] The inter prediction is a method of removing temporal redundancy between pictures and compressing a video, and motion estimation encoding is a typical example. The motion estimation encoding uses at least one reference picture to predict a block of a current picture. Using a predetermined evaluation function, a reference block most similar to the current block can be searched within a predetermined search range. The current block is predicted based on the reference block, and a predicted block generated as a result of the prediction is subtracted from the current block to generate and encode a residual block. At this time, in order to perform the prediction more accurately, interpolation is performed on the search range of the reference picture to generate pixels of a sub-pel unit smaller than an integer pel unit, and inter prediction can be performed based on the generated pixels of the sub-pel unit.
[0004] In codecs such as H.264 AVC (advanced video coding) and HEVC (high efficiency video coding), in order to predict the motion vector of the current block, the motion vectors of previously encoded blocks adjacent to the current block or blocks included in a previously encoded picture are used as the prediction motion vector of the current block. The differential motion vector, which is the difference between the motion vector of the current block and the prediction motion vector, is signaled on the decoder side via a predetermined method. Summary of the Invention Problems to be Solved by the Invention
[0005] A motion information encoding method, a decoding method, a motion information encoding apparatus, and a decoding apparatus according to an embodiment make it a technical problem to represent motion information with a small number of bits.
[0006] Also, a motion information encoding method, a decoding method, a motion information encoding apparatus, and a decoding apparatus according to an embodiment make it a technical problem to represent a differential motion vector with a small number of bits. Means for Solving the Problems
[0007] A motion information decoding method according to an embodiment of the present disclosure may include: determining a basic motion vector of a current block; determining a primary residual motion vector related to the current block based on information obtained from a bitstream among at least one primary residual motion vector candidate classified by a transition distance and a transition direction; and applying the primary residual motion vector to the basic motion vector to determine the motion vector of the current block.
[0008] In one embodiment, the step of determining the motion vector of the current block may further include: obtaining, from a bitstream, information indicating a secondary residual motion vector associated with the current block; and applying the secondary residual motion vector determined based on the information indicating the secondary residual motion vector to a basic motion vector that has been modified by applying the primary residual motion vector to determine the motion vector of the current block.
Advantages of the Invention
[0009] A method and apparatus for encoding and decoding motion information according to one embodiment can represent motion information with a smaller number of bits.
[0010] Also, a method and apparatus for encoding and decoding motion information according to one embodiment can represent a residual motion vector with a smaller number of bits.
[0011] However, the effects that can be achieved by a method and apparatus for encoding and decoding motion information 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 technical field to which the present disclosure pertains from the following description.
Brief Description of the Drawings
[0012] To better understand the drawings cited in this specification, a brief description of each drawing is provided.
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25
Figure 26
Figure 27
Figure 28
Figure 29
Figure 30
Figure 31
Figure 32
Figure 33
Figure 34
Mode for Carrying Out the Invention
[0013] A method for decoding motion information according to an embodiment of the present disclosure may include: determining a basic motion vector of a current block; determining a primary residual motion vector related to the current block based on information obtained from a bitstream among at least one candidate primary residual motion vector classified by a transition distance and a transition direction; and applying the primary residual motion vector to the basic motion vector to determine a motion vector of the current block.
[0014] In one embodiment, the step of determining the motion vector of the current block may further include: obtaining information indicating a secondary residual motion vector related to the current block from a bitstream; and applying the secondary residual motion vector determined based on the information indicating the secondary residual motion vector to the basic motion vector changed by applying the primary residual motion vector to determine the motion vector of the current block.
[0015] In one embodiment, the method for decoding the motion information further includes the step of obtaining, from a bitstream, an index indicating at least one of a transition distance and a transition direction of the primary residual motion vector, and the step of determining the primary residual motion vector may include the step of determining, as the primary residual motion vector related to the current block, the primary residual motion vector candidate corresponding to the obtained index among the at least one primary residual motion vector candidate.
[0016] In one embodiment, the method for decoding the motion information may further include the step of determining, as the basic motion vector of the current block, any one of the at least one basic motion vector candidate.
[0017] In one embodiment, the step of determining the motion vector of the current block includes: when the basic motion vector of the current block corresponds to a bidirectional motion vector, the prediction direction of the current block corresponds to bidirectionality, and the primary residual motion vector is determined for a first unidirectional direction, determining a primary residual motion vector for a second unidirectional direction based on the primary residual motion vector for the first unidirectional direction; applying the primary residual motion vector for the first unidirectional direction to the basic motion vector for the first unidirectional direction to determine the motion vector for the first unidirectional direction of the current block; and applying the primary residual motion vector for the second unidirectional direction to the basic motion vector for the second unidirectional direction to determine the motion vector for the second unidirectional direction of the current block.
[0018] In one embodiment, the step of determining the primary residual motion vector for the second unidirectional direction may include the step of determining at least one of the magnitude and sign of the component value of the primary residual motion vector for the second unidirectional direction based on the positional relationship between the reference picture corresponding to the basic motion vector for the first unidirectional direction, the reference picture corresponding to the basic motion vector for the second unidirectional direction, and the current picture including the current block.
[0019] In one embodiment, the step of determining the motion vector of the current block may include: when the basic motion vector of the current block corresponds to a motion vector in a first single direction and the prediction direction of the current block corresponds to a second single direction different from the first single direction, determining the basic motion vector in the second single direction based on the basic motion vector in the first single direction, and determining the primary residual motion vector for the second single direction based on the primary residual motion vector for the first single direction; and applying the primary residual motion vector for the second single direction to the basic motion vector in the second single direction to determine the motion vector of the current block.
[0020] In one embodiment, the step of determining the motion vector of the current block may include: when the basic motion vector of the current block corresponds to a motion vector in a first single direction and the prediction direction of the current block corresponds to a bi - direction, determining the basic motion vector in the second single direction based on the basic motion vector in the first single direction, and determining the primary residual motion vector for the second single direction based on the primary residual motion vector for the first single direction; applying the primary residual motion vector for the first single direction to the basic motion vector in the first single direction to determine the motion vector of the current block in the first single direction; and applying the primary residual motion vector for the second single direction to the basic motion vector in the second single direction to determine the motion vector of the current block in the second single direction.
[0021] In one embodiment, the method for decoding the motion information may further include entropy - decoding at least a part of the index indicating the primary residual motion vector from the bit - stream by a context model.
[0022] In one embodiment, the method for decoding motion information further includes a step of determining at least one candidate for a primary residual motion vector associated with each of at least one candidate for a basic motion vector. Among the at least one candidate for a primary residual motion vector, the candidate for a primary residual motion vector determined corresponding to a bidirectional candidate for a basic motion vector may include a candidate for a primary residual motion vector in the list 0 direction including values of the same sign or opposite signs, and a candidate for a primary residual motion vector in the list 1 direction.
[0023] In one embodiment, among the candidate for a primary residual motion vector in the list 0 direction and the candidate for a primary residual motion vector in the list 1 direction, the magnitude of at least one value may be scaled in consideration of the distance between a first reference picture corresponding to a candidate for a basic motion vector in a first unidirectional direction, a current picture including the current block, and a second reference picture corresponding to a candidate for a basic motion vector in a second unidirectional direction.
[0024] In one embodiment, the method for decoding motion information further includes, when the current block corresponds to a first child block split from a parent block, a step of determining a motion vector of the current block as a basic motion vector of the second child block, and a step of applying a primary residual motion vector determined for the second child block to the basic motion vector of the second child block to determine a motion vector of the second child block.
[0025] In one embodiment, the method for decoding motion information further includes, when the current block corresponds to a first child block split from a parent block, a step of applying at least one of information indicating a basic motion vector obtained in relation to the current block, information indicating a transition distance, and information indicating a transition direction to the second child block.
[0026] In one embodiment, the method for decoding the motion information may further include obtaining, at at least one level among a transform unit level, an encoding unit level, a maximum encoding unit level, a slice level, and a picture level, information indicating at least one of whether a predetermined encoding mode is applied to the current block, a basic motion vector related to the current block, a first-order residual motion vector related to the current block, a priority order of a displacement distance, and a priority order of a displacement direction.
[0027] A method for encoding motion information according to an embodiment of the present disclosure may include determining a basic motion vector of a current block, and based on a difference between the motion vector of the current block and the basic motion vector, determining a first-order residual motion vector related to the current block among at least one first-order residual motion vector candidate classified by a displacement distance and a displacement direction, and generating a bitstream including at least one of information indicating the basic motion vector and information indicating the first-order residual motion vector.
[0028] 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. However, it should not be construed as limiting the embodiments of the present disclosure, and the present disclosure should be understood to include all modifications, equivalents, or alternatives included in the spirit and technical scope of various embodiments.
[0029] In the description of this embodiment, if it is determined that a specific description related to related known technologies makes the gist of the present disclosure unnecessarily unclear, the detailed description thereof will be omitted. Also, the numbers (for example, first, second, etc.) used in the description process of the specification are merely identification symbols for distinguishing one component from other components.
[0030] Also, in this specification, when a component is referred to as being "coupled" or "connected" to a different component, it is to be understood that the component may be directly coupled or directly connected to the other component, but unless there is a specific statement to the contrary, it may also be coupled or connected through other intervening components.
[0031] Also, in this specification, components expressed as "~ part (unit)" or "module" may be formed by combining two or more components into one component, or one component may be further subdivided into two or more components according to function. Each of the components described below can also perform, in addition to its main function, some or all of the functions performed by other components. Needless to say, even if some of the main functions of each component are exclusively performed by other components, they can still be carried out.
[0032] Also, in this specification, "image" or "picture" can represent a still image or video of a video, that is, the video itself.
[0033] Also, in this specification, "sample" refers to data assigned to the sampling position of an image and means data to be processed. For example, in an image of a spatial region, the pixel value and the conversion coefficient on the conversion region are also samples. A unit containing at least one such sample can be defined as a block.
[0034] Also, in this specification, "current block" means the block of the maximum coding unit, coding unit, prediction unit, or conversion unit of the current video being encoded or decoded.
[0035] Also, in this specification, that a motion vector is in the list 0 direction means that it is a motion vector used to indicate a block within a reference picture included in list 0, and that a motion vector is in the list 1 direction means that it is a motion vector used to indicate a block within a reference picture included in list 1. Also, that a motion vector is unidirectional means that it is a motion vector used to indicate a block within a reference picture included in list 0 or list 1, and that a motion vector is bidirectional means that the motion vector includes a motion vector in the list 0 direction and a motion vector in the list 1 direction.
[0036] Hereinafter, with reference to FIGS. 1 to 20, a video encoding method and apparatus based on a tree-structured encoding unit and a conversion unit according to an embodiment, and a video decoding method and apparatus thereof are disclosed. Each of the video encoding apparatus 200 and the video decoding apparatus 100 described with reference to FIGS. 1 to 20 may include a video encoding apparatus 3300 and a video decoding apparatus 2100 described with reference to FIGS. 21 to 34, respectively.
[0037] FIG. 1 illustrates a block diagram of a video decoding apparatus 100 according to an embodiment.
[0038] The video decoding apparatus 100 may include a bitstream acquisition unit 110 and a decoding unit 120. The bitstream acquisition unit 110 and the decoding unit 120 may include at least one processor. Also, the bitstream acquisition unit 110 and the decoding unit 120 may include a memory that stores instruction words executed by at least one processor.
[0039] The bitstream acquisition unit 110 can receive a bitstream. The bitstream includes information obtained by the video encoding device 200 described later encoding a video. Further, the bitstream can be transmitted from the video encoding device 200. The video encoding device 200 and the video decoding device 100 are connected either by wire or wirelessly, and the bitstream acquisition unit 110 can receive the bitstream via wire or wirelessly. The bitstream acquisition unit 110 can receive the bitstream from a recording medium such as an optical medium or a hard disk. The decoding unit 120 can restore a video based on the information obtained from the received bitstream. The decoding unit 120 can acquire syntax elements for restoring the video from the bitstream. The decoding unit 120 can restore the video based on the syntax elements.
[0040] Describing the operation of the video decoding device 100 in detail, the bitstream acquisition unit 110 can receive a bitstream.
[0041] The video decoding device 100 can perform an operation of acquiring a binstring corresponding to the splitting form mode of the encoding unit from the bitstream. Then, the video decoding device 100 can perform an operation of determining the splitting rule of the encoding unit. Further, the video decoding device 100 can perform an operation of splitting the encoding unit into a plurality of encoding units based on at least one of the binstring corresponding to the splitting form mode and the splitting rule. The video decoding device 100 can determine a first allowable range of the size of the encoding unit based on the ratio of the width and height of the encoding unit in order to determine the splitting rule. The video decoding device 100 can determine a second allowable range of the size of the encoding unit based on the splitting form mode of the encoding unit in order to determine the splitting rule.
[0042] Hereinafter, according to an embodiment of the present disclosure, the splitting of the encoding unit will be described in detail.
[0043] First, one picture is also divided into one or more slices. One slice is also a sequence of one or more coding tree units (CTUs). As a concept compared with the coding tree unit (CTU), there is a coding tree block (CTB).
[0044] The coding tree block (CTB) means an NxN block containing NxN samples (N is an integer). Each color component is also divided into one or more coding tree blocks.
[0045] When a picture has three sample arrays (sample arrays for Y, Cr, and Cb components separately), the coding tree unit (CTU) is a unit including a coding tree block of luma samples, two coding tree blocks of corresponding chroma samples, and the syntax structure used to code the luma samples and chroma samples. When the picture is a monochrome picture, the coding tree unit is a unit including a coding tree block of monochrome samples and the syntax structure used to code the monochrome samples. When the picture is a picture coded in color planes separated by color components, the coding tree unit is a unit including the said picture and the syntax structure used to code the samples of the picture.
[0046] One coding tree block (CTB) is also divided into an MxN coding block containing MxN samples (M and N are integers).
[0047] When a picture has a sample array by Y, Cr, and Cb components, a coding unit (CU) is a unit including a coding block of luma samples, two coding blocks of corresponding chroma samples, and a syntax structure used to code the luma samples and chroma samples. When a picture is a monochrome picture, a coding unit is a unit including a coding block of monochrome samples and a syntax structure used to code the monochrome samples. When a picture is coded in a color plane separated by color components, a coding unit is a unit including the picture and a syntax structure used to code the samples of the picture.
[0048] As described above, the maximum coding block and the maximum coding unit are concepts distinguished from each other, and the coding block and the coding unit are concepts distinguished from each other. That is, the (maximum) coding unit means a data structure including the (maximum) coding block including the samples and the corresponding syntax structure. However, since those skilled in the art can understand that the (maximum) coding unit or the (maximum) coding block refers to a block of a predetermined size including a predetermined number of samples, hereinafter, in this specification, the maximum coding block and the maximum coding unit, or the coding block and the coding unit, will be referred to without distinction unless there are special circumstances.
[0049] Video is also divided into maximum coding units (CTUs). The size of the maximum coding unit is also determined based on the information obtained from the bitstream. The form of the maximum coding unit can have a square of the same size. However, it is not limited thereto.
[0050] For example, information related to the maximum size of the luma coding block can be obtained from the bitstream. For example, the maximum size of the luma coding block indicated by the information related to the maximum size of the luma coding block is also one of 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, 256x256.
[0051] For example, information related to the maximum size of a luma encoding block that can be split into two and the luma block size difference can be obtained from the bitstream. The information related to the luma block size difference can indicate the difference in size between the maximum luma encoding unit and the maximum luma encoding block that can be split into two. Therefore, by combining the information related to the maximum size of the luma encoding block that can be split into two obtained from the bitstream and the information related to the luma block size difference, the size of the maximum luma encoding unit is determined. By using the size of the maximum luma encoding unit, the size of the maximum chroma encoding unit can also be determined. For example, if the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chroma block is also half the size of the luma block, and similarly, the size of the maximum chroma encoding unit is also half the size of the maximum luma encoding unit.
[0052] According to one embodiment, since the information related to the maximum size of a luma encoding block that can be binary split is obtained from the bitstream, the maximum size of the luma encoding block that can be binary split is also variably determined. In contrast, the maximum size of a luma encoding block that can be ternary split can be fixed. For example, the maximum size of a luma encoding block that can be ternary split in an I slice is 32x32, and in a P slice or a B slice, the maximum size of a luma encoding block that can be ternary split is also 64x64.
[0053] Also, the maximum encoding unit is hierarchically split into encoding units based on the split mode information obtained from the bitstream. As the split mode information, at least one of the information indicating whether it is a quad split, the information indicating the number of splits, the split direction information, and the split type information is also obtained from the bitstream.
[0054] For example, the information indicating the quad split status can show whether the current coding unit is quad split (QUAD_SPLIT) or not.
[0055] If the current coding unit is not quad split, the information indicating the multi-split status can show whether the current coding unit is not further split (NO_SPLIT) or is binary / ternary split.
[0056] If the current coding unit is binary split or ternary split, the split direction information indicates that the current coding unit is split into one of the horizontal or vertical directions.
[0057] If the current coding unit is split into the horizontal or vertical direction, the split type information indicates that the current coding unit is split by binary split or ternary split.
[0058] Based on the split direction information and the split type information, the split mode of the current coding unit is determined. The split mode when the current coding unit is binary split horizontally is binary horizontal split (SPLIT_BT_HOR), the split mode when it is ternary split horizontally is ternary horizontal split (SPLIT_TT_HOR), the split mode when it is binary split vertically is binary vertical split (SPLIT_BT_VER), and the split mode when it is ternary split vertically is ternary vertical split (SPLIT_TT_VER).
[0059] The video decoding device 100 can obtain the split form mode information from one bit string from the bit stream. The form of the bit stream received by the video decoding device 100 may include fixed length binary code, unary code, truncated unary code, a predetermined binary code, etc. The bit string represents information as a sequence of binary numbers. The bit string can be composed of at least one bit. The video decoding device 100 can obtain the split form mode information corresponding to the bit string based on the splitting rule. The video decoding device 100 can determine whether to quad-split the encoding unit or not, or determine the splitting direction and splitting type based on one bit string.
[0060] The encoding unit is smaller than or the same as the maximum encoding unit. For example, since the maximum encoding unit is also an encoding unit with the maximum size, it is one of the encoding units. When it indicates that the split form mode information related to the maximum encoding unit is not split, the encoding unit determined as the maximum encoding unit has the same size as the maximum encoding unit. When it indicates that the split form mode information related to the maximum encoding unit is split, the maximum encoding unit is also split into encoding units. Also, when the split form mode information related to the encoding unit indicates splitting, the encoding unit is further split into encoding units of a smaller size. However, the splitting of the video is not limited thereto, and the maximum encoding unit and the encoding unit are not distinguished. The splitting of the encoding unit will be described in more detail in FIGS. 3 to 16.
[0061] In addition, one or more prediction blocks for prediction are determined from the encoding unit. The prediction block is the same as or smaller than the encoding unit. Also, one or more transform blocks for transformation are determined from the encoding unit. The transform block is the same as or smaller than the encoding unit.
[0062] The form and size of the conversion block and the prediction block are independent of each other.
[0063] In other embodiments, the encoding unit uses the encoding unit as a prediction block for prediction. Also, the encoding unit uses the encoding unit as a conversion block for conversion.
[0064] The division of the encoding unit will be described in more detail with reference to FIGS. 3 to 16. The current block and the surrounding blocks of the present disclosure can indicate one of the maximum encoding unit, the encoding unit, the prediction block, and the conversion block. Also, the current block or the current encoding unit is a block where current decoding or encoding is being performed, or a block where current division is being performed. The surrounding block is also a block restored before the current block. The surrounding block can be spatially or temporally adjacent to the current block. The surrounding block can be located at one of the lower left, left, upper left, upper, upper right, right, and lower right sides of the current block.
[0065] FIG. 3 illustrates a process in which a video decoding apparatus 100 according to an embodiment divides a current encoding unit and determines at least one encoding unit.
[0066] The block form may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N. Here, N is also a positive integer. The block form information is information indicating at least one of the form, direction, ratio of width and height, or size of the encoding unit.
[0067] The form of the encoding unit may include square and non-square. When the width and height of the encoding unit are the same (that is, when the block form of the encoding unit is 4Nx4N), the video decoding apparatus 100 can determine the block form information of the encoding unit as square. The video decoding apparatus 100 can determine the form of the encoding unit as non-square.
[0068] When the widths and heights of the symbol units are different (that is, when the block form of the symbol unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the video decoding apparatus 100 can determine that the block form information of the symbol unit is non-square. When the form of the symbol unit is non-square, the video decoding apparatus 100 can determine the ratio of the width and height to at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, 32:1 in the block form information of the symbol unit. Further, based on the width size and height size of the symbol unit, the video decoding apparatus 100 can determine whether the symbol unit is in the horizontal direction or the vertical direction. Further, based on at least one of the width size, height size, or area of the symbol unit, the video decoding apparatus 100 can determine the size of the symbol unit.
[0069] The video decoding apparatus 100 according to one embodiment can use the block form information to determine the form of the symbol unit, and can use the split form mode information to determine how the symbol unit is split into any form. That is, the splitting method of the symbol unit indicated by the split form mode information is determined by what block form the block form information used by the video decoding apparatus 100 indicates.
[0070] The video decoding apparatus 100 can acquire the split form mode information from the bit stream. However, it is not limited thereto. The video decoding apparatus 100 and the video encoding apparatus 200 can determine the pre-agreed split form mode information based on the block form information. The video decoding apparatus 100 can determine the pre-agreed split form mode information for the maximum coding unit or the minimum coding unit. For example, the video decoding apparatus 100 can determine that the split form mode information for the maximum coding unit is quad split. Also, the video decoding apparatus 100 can determine that the split form mode information for the minimum coding unit is "not split". Specifically, the video decoding apparatus 100 can determine that the size of the maximum coding unit is 256x256. The video decoding apparatus 100 can determine that the pre-agreed split form mode information is quad split. The quad split is a split form mode that bisects both the width and height of the coding unit. The video decoding apparatus 100 can acquire a 128x128-sized coding unit from the 256x256-sized maximum coding unit based on the split form mode information. Also, the video decoding apparatus 100 can determine that the size of the minimum coding unit is 4x4. The video decoding apparatus 100 can acquire the split form mode information indicating "not split" for the minimum coding unit.
[0071] According to an embodiment, the video decoding apparatus 100 can utilize block form information indicating whether the current coding unit is square. For example, the video decoding apparatus 100 can determine whether to divide a square coding unit, divide it vertically, divide it horizontally, or divide it into four coding units based on the split form mode information. Referring to FIG. 3, when the block form information of the current coding unit 300 indicates a square form, the decoding unit 120 can determine not to divide the coding unit 310a having the same size as the current coding unit 300 based on the split form mode information indicating non-division, or can determine the coding units 310b, 310c, 310d, 310e, 310f, etc. that are divided based on the split form mode information indicating a predetermined division method.
[0072] Referring to FIG. 3, according to an embodiment, the video decoding apparatus 100 can determine two coding units 310b obtained by vertically dividing the current coding unit 300 based on the split form mode information indicating vertical division. The video decoding apparatus 100 can determine two coding units 310c obtained by horizontally dividing the current coding unit 300 based on the split form mode information indicating horizontal division. The video decoding apparatus 100 can determine four coding units 310d obtained by vertically and horizontally dividing the current coding unit 300 based on the split form mode information indicating vertical and horizontal division. According to an embodiment, the video decoding apparatus 100 can determine three coding units 310e obtained by vertically dividing the current coding unit 300 based on the split form mode information indicating vertical ternary division. The video decoding apparatus 100 can determine three coding units 310f obtained by horizontally dividing the current coding unit 300 based on the split form mode information indicating horizontal ternary division. However, the division forms in which a square coding unit can be divided are not construed as being limited to the foregoing forms, and include various forms that can be indicated by the split form mode information. A predetermined division form in which a square coding unit is divided will be specifically described below through various embodiments.
[0073] FIG. 4 illustrates a process in which a video decoding apparatus 100 according to an embodiment divides an encoding unit in a non-square form and determines at least one encoding unit.
[0074] The video decoding apparatus 100 according to an embodiment can utilize block form information indicating whether the current encoding unit is non-square. The video decoding apparatus 100 can determine whether to divide the non-square current encoding unit or divide it in a predetermined method based on the division mode information. Referring to FIG. 4, when the block form information of the current encoding unit 400 or 450 indicates a non-square form, the video decoding apparatus 100 determines an encoding unit 410 or 460 having the same size as the current encoding unit 400 or 450 based on the division mode information indicating non-division, or determines divided encoding units 420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, 480c based on the division mode information indicating a predetermined division method. A predetermined division method for dividing a non-square encoding unit will be specifically described below through various embodiments.
[0075] The video decoding apparatus 100 according to an embodiment can utilize the division mode information to determine the form in which the encoding unit is divided. In that case, the division mode information can indicate the number of at least one encoding unit generated by dividing the encoding unit. Referring to FIG. 4, when the division mode information indicates that the current encoding unit 400 or 450 is divided into two encoding units, the video decoding apparatus 100 can divide the current encoding unit 400 or 450 based on the division mode information and determine two encoding units 420a, 420b, or 470a, 470b included in the current encoding unit.
[0076] When the video decoder 100 according to an embodiment divides the current encoding unit 400 or 450 in a non-square form based on the split form mode information, the video decoder 100 can divide the current encoding unit considering the position of the long side of the non-square current encoding unit 400 or 450. For example, the video decoder 100 can consider the form of the current encoding unit 400 or 450 and divide the current encoding unit 400 or 450 in the direction of dividing the long side of the current encoding unit 400 or 450 to determine a plurality of encoding units.
[0077] According to an embodiment, when the split form mode information indicates dividing the encoding unit into an odd number of blocks (ternary split), the video decoder 100 can determine the odd number of encoding units included in the current encoding unit 400 or 450. For example, when the split form mode information indicates dividing the current encoding unit 400 or 450 into three encoding units, the video decoder 100 can divide the current encoding unit 400 or 450 into three encoding units 430a, 430b, 430c, 480a, 480b, 480c.
[0078] According to an embodiment, the ratio of the width and height of the current encoding unit 400 or 450 is also 4:1 or 1:4. When the ratio of the width and height is 4:1, since the size of the width is larger than the size of the height, the block form information is also in the horizontal direction. When the ratio of the width and height is 1:4, since the size of the width is smaller than the size of the height, the block form information is also in the vertical direction. The video decoding apparatus 100 can determine to divide the current encoding unit into an odd number of blocks based on the split form mode information. Also, the video decoding apparatus 100 can determine the split direction of the current encoding unit 400 or 450 based on the block form information of the current encoding unit 400 or 450. For example, when the current encoding unit 400 is in the vertical direction, the video decoding apparatus 100 can divide the current encoding unit 400 in the horizontal direction and determine the encoding units 430a, 430b, 430c. Also, when the current encoding unit 450 is in the horizontal direction, the video decoding apparatus 100 can divide the current encoding unit 450 in the vertical direction and determine the encoding units 480a, 480b, 480c.
[0079] The video decoding apparatus 100 according to an embodiment can determine an odd number of encoding units included in the current encoding unit 400 or 450, and the sizes of the determined encoding units are not all the same. For example, among the determined odd number of encoding units 430a, 430b, 430c, 480a, 480b, 480c, the size of a predetermined encoding unit 430b or 480b can also have a size different from that of the other encoding units 430a, 430c, 480a, 480c. That is, the encoding units that can be determined by dividing the current encoding unit 400 or 450 can have multiple types of sizes, and in some cases, the odd number of encoding units 430a, 430b, 430c, 480a, 480b, 480c can each have a different size from each other.
[0080] According to one embodiment, when the split form mode information indicates that the encoding unit is split into an odd number of blocks, the video decoding apparatus 100 can determine the odd number of encoding units included in the current encoding unit 400 or 450. Further, the video decoding apparatus 100 can impose a predetermined restriction on at least one of the odd number of encoding units generated by splitting. Referring to FIG. 4, the video decoding apparatus 100 can make the decoding process related to the centrally located encoding units 430b, 480b among the three encoding units 430a, 430b, 430c, 480a, 480b, 480c generated by splitting the current encoding unit 400 or 450 different from those of the other encoding units 430a, 430c, 480a, 480c. For example, the video decoding apparatus 100 can restrict the centrally located encoding units 430b, 480b so that they are not split further or are split a predetermined number of times, different from the other encoding units 430a, 430c, 480a, 480c.
[0081] FIG. 5 illustrates a process in which the video decoding apparatus 100 according to one embodiment splits an encoding unit based on at least one of the block form information and the split form mode information.
[0082] The video decoding apparatus 100 according to one embodiment can determine whether to split the square first encoding unit 500 into encoding units or not based on at least one of the block form information and the split form mode information. According to one embodiment, when the split form mode information indicates that the first encoding unit 500 is split horizontally, the video decoding apparatus 100 can split the first encoding unit 500 horizontally to determine the second encoding unit 510. The first encoding unit, the second encoding unit, and the third encoding unit used according to one embodiment are terms used to understand the pre- and post-split relationships between the encoding units. For example, if the first encoding unit is split, the second encoding unit is determined, and if the second encoding unit is split, the third encoding unit is determined. In the following, the relationships among the first encoding unit, the second encoding unit, and the third encoding unit used can be understood to be based on the foregoing features.
[0083] According to an embodiment, the video decoder 100 can determine whether to divide the determined second encoding unit 510 into encoding units or not based on the division form mode information. Referring to FIG. 5, the video decoder 100 divides the first encoding unit 500 based on the division form mode information, and divides the determined non-square second encoding unit 510 into at least one of the third encoding units 520a, 520b, 520c, 520d, or does not divide the second encoding unit 510. The video decoder 100 can obtain the division form mode information. The video decoder 100 divides the first encoding unit 500 based on the obtained division form mode information. For example, a plurality of second encoding units 510 in various forms can be divided. The second encoding unit 510 is also divided by the method by which the first encoding unit 500 is divided based on the division form mode information. According to an embodiment, when the first encoding unit 500 is divided into the second encoding unit 510 based on the division form mode information related to the first encoding unit 500, the second encoding unit 510 is also divided into, for example, the third encoding units 520a, 520b, 520c, 520d based on the division form mode information related to the second encoding unit 510. That is, the encoding unit is recursively divided based on the division form mode information related to each encoding unit. Therefore, in the non-square encoding unit, a square encoding unit is determined, and such a square encoding unit is recursively divided to determine a non-square encoding unit.
[0084] Referring to FIG. 5, among the odd-numbered third encoding units 520b, 520c, 520d determined by dividing the non-square-shaped second encoding unit 510, a predetermined encoding unit (e.g., the encoding unit located in the middle, or a square-shaped encoding unit) is recursively divided. According to one embodiment, the square-shaped third encoding unit 520b, which is one of the odd-numbered third encoding units 520b, 520c, 520d, is divided horizontally and also divided into a plurality of fourth encoding units. Among the plurality of fourth encoding units 530a, 530b, 530c, 530d, a non-square-shaped fourth encoding unit 530b or 530d is further divided into a plurality of encoding units. For example, the non-square-shaped fourth encoding unit 530b or 530d is further divided into an odd number of encoding units. The method used for the recursive division of the encoding units will be described later through various embodiments.
[0085] According to one embodiment, the video decoding device 100 can divide each of the third encoding units 520a, 520b, 520c, 520d into encoding units based on the division mode information. Also, the video decoding device 100 can determine not to divide the second encoding unit 510 based on the division mode information. According to one embodiment, the video decoding device 100 can divide the non-square-shaped second encoding unit 510 into an odd number of third encoding units 520b, 520c, 520d. The video decoding device 100 can impose a predetermined limit on a predetermined third encoding unit among the odd-numbered third encoding units 520b, 520c, 520d. For example, the video decoding device 100 can limit that the encoding unit 520c located in the middle of the odd-numbered third encoding units 520b, 520c, 520d is not further divided, or limit that it must be divided a set number of times.
[0086] Referring to FIG. 5, for the encoding unit 520c located in the middle among the odd-numbered third encoding units 520b, 520c, 520d included in the non-square second encoding unit 510, it can be restricted that it is not further divided or is divided into a predetermined division form (for example, divided only into 4 encoding units or divided into a form corresponding to the divided form of the second encoding unit 510), or restricted to be divided a predetermined number of times (for example: divided only n times, n>0). However, the above restriction on the encoding unit 520c located in the middle is merely an embodiment and should not be construed as being limited to the foregoing embodiments. It must be construed that it includes various restrictions such that the encoding unit 520c located in the middle is decoded differently from the other encoding units 520b, 520d.
[0087] According to an embodiment, the video decoding apparatus 100 can obtain the division form mode information used for dividing the current encoding unit at a predetermined position within the current encoding unit.
[0088] FIG. 6 illustrates a method for determining a predetermined encoding unit among an odd number of encoding units by the video decoding apparatus 100 according to an embodiment.
[0089] Referring to FIG. 6, the division form mode information of the current encoding units 600, 650 can be obtained from the samples at predetermined positions (for example, the samples 640, 690 located in the middle) among the plurality of samples included in the current encoding units 600, 650. However, among such division form mode information, the predetermined position within the current encoding unit 600 from which at least one can be obtained should not be construed as being limited to the middle position illustrated in FIG. 6. It must be construed that the predetermined position may include various positions included in the current encoding unit 600 (for example: the uppermost end, the lowermost end, the left side, the right side, the upper left end, the lower left end, the upper right end or the lower right end, etc.). The video decoding apparatus 100 can obtain the division form mode information obtained from the predetermined position and determine whether to divide the current encoding unit into encoding units of various forms and sizes or not to divide it.
[0090] According to one embodiment, the video decoding apparatus 100 can select one of the encoding units when the current encoding unit is divided into a predetermined number of encoding units. The methods for selecting one of the plurality of encoding units are diverse, and the description related to such methods will be described later through various embodiments below.
[0091] According to one embodiment, the video decoding apparatus 100 can divide the current encoding unit into a plurality of encoding units and determine the encoding unit at a predetermined position.
[0092] According to one embodiment, the video decoding apparatus 100 can utilize the information indicating the positions of each of the odd-numbered encoding units to determine the encoding unit located in the middle among the odd-numbered encoding units. Referring to FIG. 6, the video decoding apparatus 100 can divide the current encoding unit 600 or the current encoding unit 650 and determine the odd-numbered encoding units 620a, 620b, 620c or the odd-numbered encoding units 660a, 660b, 660c. The video decoding apparatus 100 can utilize the information related to the positions of the odd-numbered encoding units 620a, 620b, 620c or the odd-numbered encoding units 660a, 660b, 660c to determine the middle encoding unit 620b or the middle encoding unit 660b. For example, the video decoding apparatus 100 can determine the position of the middle encoding unit 620b by determining the positions of the encoding units 620a, 620b, 620c based on the information indicating the positions of predetermined samples included in the encoding units 620a, 620b, 620c. Specifically, the video decoding apparatus 100 can determine the position of the middle encoding unit 620b by determining the positions of the encoding units 620a, 620b, 620c based on the information indicating the positions of the samples 630a, 630b, 630c at the upper left end of the encoding units 620a, 620b, 620c.
[0093] According to one embodiment, the information indicating the positions of the upper left samples 630a, 630b, and 630c respectively included in the encoding units 620a, 620b, and 620c may include information related to the positions or coordinates within the pictures of the encoding units 620a, 620b, and 620c. According to one embodiment, the information indicating the positions of the upper left samples 630a, 630b, and 630c respectively included in the encoding units 620a, 620b, and 620c may include information indicating the widths or heights of the encoding units 620a, 620b, and 620c included in the current encoding unit 600, and such widths or heights also correspond to the information indicating the differences between coordinates within the pictures of the encoding units 620a, 620b, and 620c. That is, the video decoding apparatus 100 can determine the middle encoding unit 620b by directly using the information related to the positions or coordinates within the pictures of the encoding units 620a, 620b, and 620c, or by using the information related to the widths or heights of the encoding units corresponding to the difference values between the coordinates.
[0094] According to one embodiment, the information indicating the position of the sample 630a at the upper left end of the upper encoding unit 620a can indicate the (xa, ya) coordinates, the information indicating the position of the sample 530b at the upper left end of the middle encoding unit 620b can indicate the (xb, yb) coordinates, and the information indicating the position of the sample 630c at the upper left end of the lower encoding unit 620c can indicate the (xc, yc) coordinates. The video decoding apparatus 100 can determine the middle encoding unit 620b by using the coordinates of the samples 630a, 630b, and 630c at the upper left ends respectively included in the encoding units 620a, 620b, and 620c. For example, when the coordinates of the samples 630a, 630b, and 630c at the upper left end are arranged in ascending or descending order, the encoding unit 620b including the coordinates (xb, yb) of the sample 630b located in the middle can be determined as the encoding unit located in the middle among the encoding units 620a, 620b, and 620c into which the current encoding unit 600 is divided and determined. However, the coordinates indicating the positions of the samples 630a, 630b, and 630c at the upper left end can be coordinates indicating the absolute positions within the picture, and furthermore, based on the position of the sample 630a at the upper left end of the upper encoding unit 620a, the (dxb, dyb) coordinates which are information indicating the relative position of the sample 630b at the upper left end of the middle encoding unit 620b and the (dxc, dyc) coordinates which are information indicating the relative position of the sample 630c at the upper left end of the lower encoding unit 620c can also be used. Also, the method of determining the encoding unit at a predetermined position by using the coordinates of the sample as the information indicating the position of the sample included in the encoding unit is not construed as being limited to the above-described method, and must be construed as various arithmetic methods that can use the coordinates of the sample.
[0095] The video decoding apparatus 100 according to one embodiment can divide the current encoding unit 600 into a plurality of encoding units 620a, 620b, and 620c, and in the encoding units 620a, 620b, and 620c, an encoding unit can be selected according to a predetermined criterion. For example, the video decoding apparatus 100 can select the encoding unit 620b having a different size in the encoding units 620a, 620b, and 620c.
[0096] The video decoding apparatus 100 according to one embodiment can determine the width or height of each of the encoding units 620a, 620b, and 620c by using the (xa, ya) coordinates which are the information indicating the position of the sample 630a at the upper left end of the upper encoding unit 620a, the (xb, yb) coordinates which are the information indicating the position of the sample 630b at the upper left end of the middle encoding unit 620b, and the (xc, yc) coordinates which are the information indicating the position of the sample 630c at the upper left end of the lower encoding unit 620c. The video decoding apparatus 100 can determine the size of each of the encoding units 620a, 620b, and 620c by using the coordinates (xa, ya), (xb, yb), and (xc, yc) which are the coordinates indicating the positions of the encoding units 620a, 620b, and 620c. According to one embodiment, the video decoding apparatus 100 can determine the width of the upper encoding unit 620a to be the width of the current encoding unit 600. The video decoding apparatus 100 can determine the height of the upper encoding unit 620a to be (yb - ya). The video decoding apparatus 100 according to one embodiment can determine the width of the middle encoding unit 620b to be the width of the current encoding unit 600. The video decoding apparatus 100 can determine the height of the middle encoding unit 620b to be (yc - yb). The video decoding apparatus 100 according to one embodiment can determine the width or height of the lower encoding unit by using the width or height of the current encoding unit and the widths and heights of the upper encoding unit 620a and the middle encoding unit 620b. The video decoding apparatus 100 can determine an encoding unit having a size different from that of other encoding units based on the determined widths and heights of the encoding units 620a, 620b, and 620c. Referring to FIG. 6, the video decoding apparatus 100 can determine the middle encoding unit 620b having a size different from the sizes of the upper encoding unit 620a and the lower encoding unit 620c as the encoding unit at a predetermined position. However, the process in which the aforementioned video decoding apparatus 100 determines an encoding unit having a size different from that of other encoding units is only one embodiment of determining the encoding unit at a predetermined position by using the size of the encoding unit determined based on the sample coordinates, so various processes of comparing the sizes of the encoding units determined by predetermined sample coordinates and determining the encoding unit at a predetermined position can be used.
[0097] The video decoding device 100 can determine the width or height of each of the encoding units 660a, 660b, and 660c by using the (xd, yd) coordinates, which are information indicating the position of the sample 670a at the upper left end of the left encoding unit 660a, the (xe, ye) coordinates, which are information indicating the position of the sample 670b at the upper left end of the middle encoding unit 660b, and the (xf, yf) coordinates, which are information indicating the position of the sample 670c at the upper left end of the right encoding unit 660c. The video decoding device 100 can determine the size of each of the encoding units 660a, 660b, and 660c by using the coordinates (xd, yd), (xe, ye), and (xf, yf), which are the coordinates indicating the positions of the encoding units 660a, 660b, and 660c.
[0098] According to one embodiment, the video decoding apparatus 100 can determine the width of the left encoding unit 660a as (xe - xd). The video decoding apparatus 100 can determine the height of the left encoding unit 660a as the height of the current encoding unit 650. The video decoding apparatus 100 according to one embodiment can determine the width of the middle encoding unit 660b as (xf - xe). The video decoding apparatus 100 can determine the height of the middle encoding unit 660b as the height of the current encoding unit 600. The video decoding apparatus 100 according to one embodiment can determine the width or height of the right encoding unit 660c using the width or height of the current encoding unit 650 and the widths and heights of the left encoding unit 660a and the middle encoding unit 660b. The video decoding apparatus 100 can determine an encoding unit having a size different from other encoding units based on the determined widths and heights of the encoding units 660a, 660b, and 660c. Referring to FIG. 6, the video decoding apparatus 100 can determine the middle encoding unit 660b, which has a size different from that of the left encoding unit 660a and the right encoding unit 660c, as the encoding unit at a predetermined position. However, the process in which the aforementioned video decoding apparatus 100 determines an encoding unit having a size different from other encoding units is only one embodiment of determining the encoding unit at a predetermined position using the size of the encoding unit determined based on the sample coordinates. Therefore, various processes of comparing the sizes of the encoding units determined by predetermined sample coordinates and determining the encoding unit at a predetermined position can be used.
[0099] However, the position of the sample considered for determining the position of the encoding unit is not construed as being limited to the upper left end described above, and it is construed that information related to the position of any sample included in the encoding unit is used.
[0100] According to one embodiment, the video decoding apparatus 100 can select an encoding unit at a predetermined position from among an odd number of encoding units determined by dividing the current encoding unit, taking into account the form of the current encoding unit. For example, if the current encoding unit has a non-square shape with a width greater than the height, the video decoding apparatus 100 can determine an encoding unit at a predetermined position along the horizontal direction. That is, the video decoding apparatus 100 can determine one of the encoding units with different positions in the horizontal direction and place a restriction on the encoding unit concerned. If the current encoding unit has a non-square shape with a height greater than the width, the video decoding apparatus 100 can determine an encoding unit at a predetermined position along the vertical direction. That is, the video decoding apparatus 100 can determine one of the encoding units with different positions in the vertical direction and place a restriction on the encoding unit concerned.
[0101] According to one embodiment, the video decoding apparatus 100 can use information indicating the position of each of the even number of encoding units to determine an encoding unit at a predetermined position among the even number of encoding units. The video decoding apparatus 100 can divide (binary division) the current encoding unit to determine an even number of encoding units, and use the information related to the positions of the even number of encoding units to determine an encoding unit at a predetermined position. The specific process involved is also the process corresponding to the process of determining an encoding unit at a predetermined position (e.g., the middle position) among the odd number of encoding units described in FIG. 6, so it will be omitted.
[0102] According to one embodiment, when a non-square current encoding unit is divided into a plurality of encoding units, in order to determine an encoding unit at a predetermined position among the plurality of encoding units, in the division process, predetermined information related to the encoding unit at the predetermined position can be used. For example, the video decoding apparatus 100 can use at least one of the block form information and the division form mode information stored in the samples included in the middle encoding unit in the division process in order to determine the encoding unit located in the middle among the encoding units obtained by dividing the current encoding unit into a plurality of encoding units.
[0103] Referring to FIG. 6, the video decoding apparatus 100 can divide the current encoding unit 600 into a plurality of encoding units 620a, 620b, 620c based on the split form mode information, and can determine the encoding unit 620b located in the middle among the plurality of encoding units 620a, 620b, 620c. Further, the video decoding apparatus 100 can determine the encoding unit 620b located in the middle in consideration of the position where the split form mode information is obtained. That is, the split form mode information of the current encoding unit 600 is obtained from the sample 640 located in the middle of the current encoding unit 600. When the current encoding unit 600 is divided into a plurality of encoding units 620a, 620b, 620c based on the split form mode information, the encoding unit 620b including the sample 640 can be determined as the encoding unit located in the middle. However, the information used to determine the encoding unit located in the middle is not limited to the split form mode information, and various types of information are used in the process of determining the encoding unit located in the middle.
[0104] According to one embodiment, the predetermined information for identifying the encoding unit at a predetermined position is also obtained from a predetermined sample included in the encoding unit to be determined. Referring to FIG. 6, the video decoding apparatus 100 determines the encoding unit at a predetermined position (e.g., the encoding unit located in the middle among the plurality of encoding units obtained by dividing the current encoding unit 600) among the plurality of encoding units 620a, 620b, 620c determined by dividing the current encoding unit 600. To do so, the video decoding apparatus 100 can use the segmentation mode information obtained from the sample at the predetermined position (e.g., the sample located in the middle of the current encoding unit 600) within the current encoding unit 600. That is, the video decoding apparatus 100 can determine the sample at the predetermined position in consideration of the block form of the current encoding unit 600. The video decoding apparatus 100 determines the encoding unit 620b that includes a sample from which predetermined information (e.g., segmentation mode information) can be obtained among the plurality of encoding units 620a, 620b, 620c determined by dividing the current encoding unit 600, and can impose a predetermined limitation. Referring to FIG. 6, the video decoding apparatus 100 according to one embodiment can determine the sample 640 located in the middle of the current encoding unit 600 as a sample from which predetermined information can be obtained, and the video decoding apparatus 100 can impose a predetermined limitation on the encoding unit 620b that includes such a sample 640 during the decoding process. However, the position of the sample from which predetermined information can be obtained is not construed as being limited to the aforementioned position, but is construed as a sample at any position included in the encoding unit 620b determined for imposing the limitation.
[0105] According to one embodiment, the position of the sample from which predetermined information can be obtained is also determined by the form of the current coding unit 600. According to one embodiment, the block form information can determine whether the form of the current coding unit is square or non-square, and can determine the position of the sample from which predetermined information can be obtained according to the form. For example, the video decoding device 100 uses at least one of the information related to the width and the information related to the height of the current coding unit, and determines a sample located on the boundary that divides at least one of the width and the height of the current coding unit into half as a sample from which predetermined information can be obtained. As yet another example, when indicating whether the block form information related to the current coding unit is non-square, the video decoding device 100 can determine one of the samples adjacent to the boundary that divides the long side of the current coding unit into half as a sample from which predetermined information can be obtained.
[0106] According to one embodiment, when the video decoding device 100 divides the current coding unit into a plurality of coding units, it can use the division form mode information to determine the coding unit at a predetermined position among the plurality of coding units. According to one embodiment, the video decoding device 100 can obtain the division form mode information from a sample at a predetermined position included in the coding unit, and the video decoding device 100 can divide the plurality of coding units generated by dividing the current coding unit by using the division form mode information obtained from the samples at the predetermined positions included in each of the plurality of coding units. That is, the coding unit is also recursively divided by using the division form mode information obtained from the samples at the predetermined positions included in each coding unit. Since the recursive division process of the coding unit has been described in detail with reference to FIG. 5, the detailed description will be omitted.
[0107] 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).
[0108] FIG. 7 illustrates the order in which a plurality of encoded units are processed when the video decoder 100 according to an embodiment divides the current encoding unit and determines a plurality of encoded units.
[0109] The video decoder 100 according to an embodiment can divide the first encoded unit 700 vertically by the division mode information to determine the second encoded units 710a and 710b, divide the first encoded unit 700 horizontally to determine the second encoded units 730a and 730b, or divide the first encoded unit 700 both vertically and horizontally to determine the second encoded units 750a, 750b, 750c, and 750d.
[0110] Referring to FIG. 7, the video decoder 100 can determine the order such that the second encoded units 710a and 710b determined by vertically dividing the first encoded unit 700 are processed in the horizontal direction (710c). The video decoder 100 can determine the processing order of the second encoded units 730a and 730b determined by horizontally dividing the first encoded unit 700 as the vertical direction (730c). The video decoder 100 can determine the second encoded units 750a, 750b, 750c, and 750d determined by dividing the first encoded unit 700 both vertically and horizontally in a predetermined order (e.g., raster scan order or z scan order (750e)) in which the encoded units located in one row are processed first and then the encoded units located in the next row are processed.
[0111] The video decoding device 100 according to an embodiment can recursively divide an encoding unit. Referring to FIG. 7, the video decoding device 100 can divide a first encoding unit 700 to determine a plurality of encoding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d, and can recursively divide each of the determined plurality of encoding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d. The method of dividing the plurality of encoding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d also corresponds to the method of dividing the first encoding unit 700. Thereby, each of the plurality of encoding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d is also independently divided into a plurality of encoding units. Referring to FIG. 7, the video decoding device 100 can divide the first encoding unit 700 in the vertical direction to determine second encoding units 710a, 710b, and can further determine whether to independently divide each of the second encoding units 710a, 710b or not divide them.
[0112] The video decoding device 100 according to an embodiment can divide the left second encoding unit 710a in the horizontal direction into third encoding units 720a, 720b, and the right second encoding unit 710b is not divided.
[0113] According to one embodiment, the processing order of encoding units is also determined based on the division process of the encoding units. In other words, the processing order of the divided encoding units is also determined based on the processing order of the encoding unit immediately before being divided. The video decoding apparatus 100 can determine the order in which the third encoding units 720a and 720b determined by dividing the second encoding unit 710a on the left side are processed, independently of the second encoding unit 710b on the right side. Since the second encoding unit 710a on the left side is divided in the horizontal direction and the third encoding units 720a and 720b are determined, the third encoding units 720a and 720b are processed in the vertical direction (720c). Also, since the order in which the second encoding unit 710a on the left side and the second encoding unit 710b on the right side are processed corresponds to the horizontal direction (710c), after the third encoding units 720a and 720b included in the second encoding unit 710a on the left side are processed in the vertical direction (720c), the right encoding unit 710b can be processed. Since the above description is for explaining the process in which the processing order of each encoding unit is determined by the encoding unit before division, it should not be construed as being limited to the above-described embodiment, and it should be construed that encoding units divided and determined in various forms are used in various methods of being independently processed in a predetermined order.
[0114] FIG. 8 illustrates a process in which the video decoding apparatus 100 according to one embodiment determines that the current encoding unit is divided into an odd number of encoding units when the encoding units in a predetermined order are not processed.
[0115] According to an embodiment, the video decoding apparatus 100 can determine that the current encoding unit is divided into an odd number of encoding units based on the acquired split form mode information. Referring to FIG. 8, the square-shaped first encoding unit 800 is divided into non-square-shaped second encoding units 810a and 810b, and the second encoding units 810a and 810b are each independently divided into third encoding units 820a, 820b, 820c, 820d, and 820e. According to an embodiment, in the video decoding apparatus 100, among the second encoding units, the left encoding unit 810a can be divided horizontally to determine a plurality of third encoding units 820a and 820b, and the right encoding unit 810b can be divided into an odd number of third encoding units 820c, 820d, and 820e.
[0116] According to an embodiment, the video decoding apparatus 100 can determine whether the third encoding units 820a, 820b, 820c, 820d, and 820e can be processed in a predetermined order, and can determine whether there are encoding units divided into an odd number. Referring to FIG. 8, the video decoding apparatus 100 can recursively divide the first encoding unit 800 to determine the third encoding units 820a, 820b, 820c, 820d, and 820e. The video decoding apparatus 100 can determine whether, among the block form information and the split form mode information, at least one of the first encoding unit 800, the second encoding units 810a and 810b, or the third encoding units 820a, 820b, 820c, 820d, and 820e is divided into an odd number of encoding units. For example, among the second encoding units 810a and 810b, the encoding unit located on the right is also divided into an odd number of third encoding units 820c, 820d, and 820e. The order in which a plurality of encoding units included in the first encoding unit 800 are processed is also a predetermined order (e.g., z-scan order (830)), and the video decoding apparatus 100 can determine whether the third encoding units 820c, 820d, and 820e determined by dividing the right second encoding unit 810b into an odd number satisfy the condition of being processed in the predetermined order.
[0117] The video decoding apparatus 100 according to an embodiment can determine whether or not the third encoding units 820a, 820b, 820c, 820d, 820e included in the first encoding unit 800 satisfy the condition that they can be processed in a predetermined order. The condition is related to whether or not at least one of the width and height of the second encoding units 810a, 810b is divided in half along the boundaries of the third encoding units 820a, 820b, 820c, 820d, 820e. For example, the third encoding units 820a, 820b determined by dividing the height of the non-square-shaped left second encoding unit 810a in half can satisfy the condition. Since the boundaries of the third encoding units 820c, 820d, 820e determined by dividing the right second encoding unit 810b into three encoding units cannot divide the width or height of the right second encoding unit 810b in half, it is also determined that the third encoding units 820c, 820d, 820e cannot satisfy the condition. When such a condition is not satisfied, the video decoding apparatus 100 according to an embodiment determines that there is a break in the scan order, and based on the determination result, it can be determined that the right second encoding unit 810b is divided into an odd number of encoding units. The video decoding apparatus 100 according to an embodiment can impose a predetermined restriction on the encoding unit at a predetermined position among the divided encoding units when divided into an odd number of encoding units. Since such restriction details or predetermined positions have been described in detail through various embodiments, the detailed description will be omitted.
[0118] FIG. 9 illustrates a process in which the video decoding apparatus 100 according to an embodiment divides the first encoding unit 900 and determines at least one encoding unit.
[0119] According to an embodiment, the video decoding apparatus 100 can divide the first encoding unit 900 based on the divided form mode information acquired via the bit stream acquisition unit 110. The square first encoding unit 900 can be divided into four square encoding units or a plurality of non-square encoding units. For example, referring to FIG. 9, when the first encoding unit 900 is square and the divided form mode information indicates that it is divided into non-square encoding units, the video decoding apparatus 100 can divide the first encoding unit 900 into a plurality of non-square encoding units. Specifically, when the divided form mode information indicates that the first encoding unit 900 is divided in the horizontal or vertical direction to determine an odd number of encoding units, the video decoding apparatus 100 can divide the square first encoding unit 900 into the second encoding units 910a, 910b, 910c determined by vertical division as odd-numbered encoding units, or the second encoding units 920a, 920b, 920c determined by horizontal division.
[0120] The video decoding apparatus 100 according to one embodiment can determine whether the second encoding units 910a, 910b, 910c, 920a, 920b, 920c included in the first encoding unit 900 satisfy the condition that they can be processed in a predetermined order. The condition is related to whether at least one of the width and height of the first encoding unit 900 is divided in half along the boundaries of the second encoding units 910a, 910b, 910c, 920a, 920b, 920c. Referring to FIG. 9, since the boundaries of the second encoding units 910a, 910b, 910c determined by vertically dividing the square-shaped first encoding unit 900 cannot divide the width of the first encoding unit 900 in half, it is also determined that the first encoding unit 900 cannot satisfy the condition that it can be processed in a predetermined order. Also, since the boundaries of the second encoding units 920a, 920b, 920c determined by horizontally dividing the square-shaped first encoding unit 900 cannot divide the width of the first encoding unit 900 in half, it is also determined that the first encoding unit 900 cannot satisfy the condition that it can be processed in a predetermined order. When such a condition is not satisfied, the video decoding apparatus 100 determines that there is a break in the scan order, and based on the determination result, it can be determined that the first encoding unit 900 is divided into an odd number of encoding units. The video decoding apparatus 100 according to one embodiment, when divided into an odd number of encoding units, can place a predetermined restriction on the encoding unit at a predetermined position among the divided encoding units. Since such restriction details or predetermined positions have been described through various embodiments, detailed description will be omitted.
[0121] According to one embodiment, the video decoding apparatus 100 can divide the first encoding unit and determine encoding units in various forms.
[0122] Referring to FIG. 9, the video decoding apparatus 100 can divide the square-shaped first encoding unit 900, the non-square-shaped first encoding units 930 or 950 into encoding units in various forms.
[0123] FIG. 10 illustrates that when a non-square second encoding unit determined by dividing a first encoding unit 1000 of a video decoding apparatus 100 according to an embodiment satisfies a predetermined condition, the form in which the second encoding unit can be divided is restricted.
[0124] A video decoding apparatus 100 according to an embodiment can determine to divide a square first encoding unit 1000 into non-square second encoding units 1010a, 1010b, 1020a, 1020b based on the division form mode information acquired via a bit stream acquisition unit 110. The second encoding units 1010a, 1010b, 1020a, 1020b are divided independently. Thereby, the video decoding apparatus 100 can determine whether to divide into a plurality of encoding units or not based on the division form mode information related to each of the second encoding units 1010a, 1010b, 1020a, 1020b. A video decoding apparatus 100 according to an embodiment can divide a non-square left second encoding unit 1010a determined by dividing the first encoding unit 1000 in the vertical direction in the horizontal direction to determine third encoding units 1012a, 1012b. However, when the video decoding apparatus 100 divides the left second encoding unit 1010a in the horizontal direction, it can be restricted so that the right second encoding unit 1010b is not divided in the same horizontal direction as the direction in which the left second encoding unit 1010a is divided. If the right second encoding unit 1010b is divided in the same direction and third encoding units 1014a, 1014b are determined, the third encoding units 1012a, 1012b, 1014a, 1014b are determined by the left second encoding unit 1010a and the right second encoding unit 1010b being independently divided in the horizontal direction. However, that is the same result as when the video decoding apparatus 100 divides the first encoding unit 1000 into four square second encoding units 1030a, 1030b, 1030c, 1030d based on the division form mode information, which is inefficient in terms of video decoding.
[0125] According to one embodiment, the video decoding apparatus 100 can divide the non-square second encoding units 1020a or 1020b determined by dividing the first encoding unit 1000 in the horizontal direction in the vertical direction to determine the third encoding units 1022a, 1022b, 1024a, 1024b. However, when the video decoding apparatus 100 divides one of the second encoding units (e.g., the upper-end second encoding unit 1020a) in the vertical direction, for the above-described reasons, it can be restricted such that the other second encoding unit (e.g., the lower-end encoding unit 1020b) is not divided in the vertical direction in the same direction as the direction in which the upper-end second encoding unit 1020a is divided.
[0126] FIG. 11 illustrates a process in which the video decoding apparatus 100 divides a square encoding unit when the division mode information cannot indicate division into four square encoding units according to one embodiment.
[0127] According to one embodiment, the video decoding apparatus 100 can divide the first encoding unit 1100 based on the division mode information to determine the second encoding units 1110a, 1110b, 1120a, 1120b. The division mode information may include information related to various forms in which the encoding unit can be divided. However, the information related to various forms may not include information for dividing into four square encoding units. According to such division mode information, the video decoding apparatus 100 cannot divide the square first encoding unit 1100 into four square second encoding units 1130a, 1130b, 1130c, 1130d. Based on the division mode information, the video decoding apparatus 100 can determine the non-square second encoding units 1110a, 1110b, 1120a, 1120b.
[0128] The video decoding apparatus 100 according to an embodiment can independently divide non-square second encoding units 1110a, 1110b, 1120a, and 1120b respectively. Through a recursive method, each of the second encoding units 1110a, 1110b, 1120a, and 1120b is divided in a predetermined order, which is also a division method corresponding to the way the first encoding unit 1100 is divided based on the division form mode information.
[0129] For example, the video decoding apparatus 100 can divide the left second encoding unit 1110a in the horizontal direction to determine square third encoding units 1112a and 1112b, and divide the right second encoding unit 1110b in the horizontal direction to determine square third encoding units 1114a and 1114b. Further, the video decoding apparatus 100 can divide both the left second encoding unit 1110a and the right second encoding unit 1110b in the horizontal direction to determine square third encoding units 1116a, 1116b, 1116c, and 1116d. In such a case, the encoding units are determined in the same form as when the first encoding unit 1100 is divided into four square second encoding units 1130a, 1130b, 1130c, and 1130d.
[0130] Taking another example, the video decoding apparatus 100 can divide the upper second encoding unit 1120a in the vertical direction to determine square third encoding units 1122a and 1122b, and divide the lower second encoding unit 1120b in the vertical direction to determine square third encoding units 1124a and 1124b. Further, the video decoding apparatus 100 can divide both the upper second encoding unit 1120a and the lower second encoding unit 1120b in the vertical direction to determine square third encoding units 1126a, 1126b, 1126a, and 1126b. In such a case, the encoding units are determined in the same form as when the first encoding unit 1100 is divided into four square second encoding units 1130a, 1130b, 1130c, and 1130d.
[0131] FIG. 12 illustrates, according to one embodiment, that the processing order among a plurality of encoding units also differs depending on the splitting process of the encoding units.
[0132] The video decoding apparatus 100 according to one embodiment can split the first encoding unit 1200 based on the split form mode information. When the block form is square and the split form mode information indicates that the first encoding unit 1200 is split in at least one of the horizontal direction and the vertical direction, the video decoding apparatus 100 can split the first encoding unit 1200 and determine, for example, the second encoding units 1210a, 1210b, 1220a, 1220b. Referring to FIG. 12, the non-square second encoding units 1210a, 1210b, 1220a, 1220b determined by splitting the first encoding unit 1200 only in the horizontal direction or the vertical direction are split independently based on the relevant split form mode information. For example, the video decoding apparatus 100 can split the second encoding units 1210a, 1210b generated by splitting the first encoding unit 1200 in the vertical direction in the horizontal direction respectively to determine the third encoding units 1216a, 1216b, 1216c, 1216d, and can split the second encoding units 1220a, 1220b generated by splitting the first encoding unit 1200 in the horizontal direction in the horizontal direction respectively to determine the third encoding units 1226a, 1226b, 1226c, 1226d. Since the splitting process of such second encoding units 1210a, 1210b, 1220a, 1220b has been described in detail in relation to FIG. 11, the detailed description will be omitted.
[0133] The video decoding apparatus 100 according to an embodiment can process encoding units in a predetermined order. Since the features related to the processing of encoding units in a predetermined order have been described in detail with reference to FIG. 7, the detailed description will be omitted. Referring to FIG. 12, the video decoding apparatus 100 can divide a square-shaped first encoding unit 1200 and determine four square-shaped third encoding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d. The video decoding apparatus 100 according to an embodiment can determine the processing order of the third encoding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d according to the form in which the first encoding unit 1200 is divided.
[0134] The video decoding apparatus 100 according to an embodiment can divide the second encoding units 1210a, 1210b generated by being divided in the vertical direction in the horizontal direction respectively, and determine the third encoding units 1216a, 1216b, 1216c, 1216d. The video decoding apparatus 100 can process the third encoding units 1216a, 1216b, 1216c, 1216d in the order (1217) of first processing the third encoding units 1216a, 1216c included in the left second encoding unit 1210a in the vertical direction, and then processing the third encoding units 1216b, 1216d included in the right second encoding unit 1210b in the vertical direction.
[0135] The video decoding apparatus 100 according to an embodiment can divide the second encoding units 1220a, 1220b generated by being divided in the horizontal direction in the vertical direction respectively, and determine the third encoding units 1226a, 1226b, 1226c, 1226d. The video decoding apparatus 100 can process the third encoding units 1226a, 1226b, 1226c, 1226d in the order (1227) of first processing the third encoding units 1226a, 1226b included in the upper second encoding unit 1220a in the horizontal direction, and then processing the third encoding units 1226c, 1226d included in the lower second encoding unit 1220b in the horizontal direction.
[0136] Referring to FIG. 12, the second encoding units 1210a, 1210b, 1220a, 1220b are each divided to determine square-shaped third encoding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d. The second encoding units 1210a, 1210b determined by being divided in the vertical direction and the second encoding units 1220a, 1220b determined by being divided in the horizontal direction are divided into different forms, but according to the third encoding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d to be determined later, ultimately, they are encoding units of the same form and are the result of the division of the first encoding unit 1200. Thereby, the video decoding apparatus 100 can recursively divide the encoding units through different processes based on the division form mode information, and as a result, even if encoding units of the same form are determined, a plurality of encoding units determined to be of the same form can be processed in different orders.
[0137] FIG. 13 illustrates, according to an embodiment, the process of determining the depth of an encoding unit when the encoding unit is recursively divided and a plurality of encoding units are determined, where the form and size of the encoding unit change.
[0138] The video decoding apparatus 100 according to an embodiment can determine the depth of an encoding unit according to a predetermined criterion. For example, the predetermined criterion can also be the long side length of the encoding unit. When the long side length of the current encoding unit is divided by 2n (n > 0) times the long side length of the encoding unit before division, the video decoding apparatus 100 can determine that the depth of the current encoding unit is increased by n bits compared to the depth of the encoding unit before division. Hereinafter, the encoding unit with increased depth will be expressed as the encoding unit with lower depth.
[0139] Referring to FIG. 13, according to one embodiment, based on block form information indicating whether it is square (for example, the block form information can indicate "0:SQUARE"), the video decoding device 100 can divide the first encoded unit 1300 that is square and determine the second encoded unit 1302, the third encoded unit 1304, etc. with a lower depth. If the size of the square first encoded unit 1300 is 2Nx2N, the second encoded unit 1302 determined by dividing the width and height of the first encoded unit 1300 by 1 / 2 can have a size of NxN. Furthermore, the third encoded unit 1304 determined by dividing the width and height of the second encoded unit 1302 by 1 / 2 can have a size of N / 2xN / 2. In that case, the width and height of the third encoded unit 1304 correspond to 1 / 4 times that of the first encoded unit 1300. When the depth of the first encoded unit 1300 is D, the depth of the second encoded unit 1302, which is 1 / 2 times the width and height of the first encoded unit 1300, is also (D + 1), and the depth of the third encoded unit 1304, which is 1 / 4 times the width and height of the first encoded unit 1300, is also (D + 2).
[0140] According to one embodiment, based on block form information indicating a non-square shape (for example, the block form information can indicate "1:NS_VER" indicating whether it is a non-square with a height greater than the width, or "2:NS_HOR" indicating whether it is a non-square with a width greater than the height), the video decoding device 100 can divide the first encoded unit 1310 or 1320 that is non-square and determine the second encoded unit 1312 or 1322, the third encoded unit 1314 or 1324, etc. with a lower depth.
[0141] The video decoding device 100 can divide at least one of the width and height of the first encoding unit 1310 of Nx2N size, and for example, can determine the second encoding units 1302, 1312, 1322. That is, the video decoding device 100 can divide the first encoding unit 1310 in the horizontal direction to determine the second encoding unit 1302 of NxN size or the second encoding unit 1322 of NxN / 2 size, and can also divide it in the horizontal and vertical directions to determine the second encoding unit 1312 of N / 2xN size.
[0142] The video decoding device 100 according to one embodiment can also divide at least one of the width and height of the first encoding unit 1320 of 2NxN size, and for example, can determine the second encoding units 1302, 1312, 1322. That is, the video decoding device 100 can divide the first encoding unit 1320 in the vertical direction to determine the second encoding unit 1302 of NxN size or the second encoding unit 1312 of N / 2xN size, and can also divide it in the horizontal and vertical directions to determine the second encoding unit 1322 of NxN / 2 size.
[0143] The video decoding device 100 according to one embodiment can also divide at least one of the width and height of the second encoding unit 1302 of NxN size, and for example, can determine the third encoding units 1304, 1314, 1324. That is, the video decoding device 100 can divide the second encoding unit 1302 in the vertical and horizontal directions to determine the third encoding unit 1304 of N / 2xN / 2 size, the third encoding unit 1314 of N / 4xN / 2 size, or the third encoding unit 1324 of N / 2xN / 4 size.
[0144] The video decoding apparatus 100 according to one embodiment can also divide at least one of the width and height of the second encoding unit 1312 of N / 2xN size to determine, for example, the third encoding units 1304, 1314, 1324. That is, the video decoding apparatus 100 can divide the second encoding unit 1312 horizontally to determine the third encoding unit 1304 of N / 2xN / 2 size or the third encoding unit 1324 of N / 2xN / 4 size, or divide it vertically and horizontally to determine the third encoding unit 1314 of N / 4xN / 2 size.
[0145] The video decoding apparatus 100 according to one embodiment can also divide at least one of the width and height of the second encoding unit 1322 of NxN / 2 size to determine, for example, the third encoding units 1304, 1314, 1324. That is, the video decoding apparatus 100 can divide the second encoding unit 1322 vertically to determine the third encoding unit 1304 of N / 2xN / 2 size or the third encoding unit 1314 of N / 4xN / 2 size, or divide it vertically and horizontally to determine the third encoding unit 1324 of N / 2xN / 4 size.
[0146] The video decoding apparatus 100 according to one embodiment can, for example, divide the square encoding units 1300, 1302, 1304 horizontally or vertically. For example, the first encoding unit 1300 of 2Nx2N size can be divided vertically to determine the first encoding unit 1310 of Nx2N size, or divided horizontally to determine the first encoding unit 1320 of 2NxN size. According to one embodiment, when the depth is determined based on the longest side length of the encoding unit, the depth of the encoding unit determined by dividing the first encoding unit 1300 of 2Nx2N size horizontally or vertically is the same as the depth of the first encoding unit 1300.
[0147] According to one embodiment, the width and height of the third encoding unit 1314 or 1324 correspond to 1 / 4 times that of the first encoding unit 1310 or 1320. When the depth of the first encoding unit 1310 or 1320 is D, the depth of the second encoding unit 1312 or 1322, which is 1 / 2 times the width and height of the first encoding unit 1310 or 1320, is also (D + 1), and the depth of the third encoding unit 1314 or 1324, which is 1 / 4 times the width and height of the first encoding unit 1310 or 1320, is also (D + 2).
[0148] FIG. 14 illustrates, according to one embodiment, the depth determined by the form and size of the encoding unit, and the index (PID: part index) for encoding unit division.
[0149] The video decoding apparatus 100 according to one embodiment can divide the square first encoding unit 1400 and determine second encoding units in various forms. Referring to FIG. 14, the video decoding apparatus 100 can divide the first encoding unit 1400 in at least one of the vertical direction and the horizontal direction according to the division form mode information, and determine the second encoding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d. That is, the video decoding apparatus 100 can determine the second encoding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d based on the division form mode information related to the first encoding unit 1400.
[0150] According to an embodiment, the depths of the second encoding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d determined by the division mode information related to the square first encoding unit 1400 are determined based on the long side length. For example, since one side length of the square first encoding unit 1400 is the same as the long side lengths of the non-square second encoding units 1402a, 1402b, 1404a, 1404b, the depths of the first encoding unit 1400 and the non-square second encoding units 1402a, 1402b, 1404a, 1404b can be regarded as the same as D. On the contrary, when the video decoding apparatus 100 divides the first encoding unit 1400 into four square second encoding units 1406a, 1406b, 1406c, 1406d based on the division mode information, since one side length of the square second encoding units 1406a, 1406b, 1406c, 1406d is 1 / 2 times the one side length of the first encoding unit 1400, the depth of the second encoding units 1406a, 1406b, 1406c, 1406d is also the depth (D + 1) which is one depth lower than the depth D of the first encoding unit 1400.
[0151] The video decoding apparatus 100 according to an embodiment can divide the first encoding unit 1410 in a form where the height is larger than the width horizontally by the division mode information into a plurality of second encoding units 1412a, 1412b, 1414a, 1414b, 1414c.
[0152] The video decoding apparatus 100 according to an embodiment can divide the first encoding unit 1420 in a form where the width is larger than the height vertically by the division mode information into a plurality of second encoding units 1422a, 1422b, 1424a, 1424b, 1424c.
[0153] According to an embodiment, the second encoding units 1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, 1424c related to the non-square first encoding units 1410 or 1420 are determined by the split form mode information. Based on the long side length, the depth is determined. For example, since the side length of one side of the square second encoding units 1412a, 1412b is 1 / 2 times the side length of one side of the non-square first encoding unit 1410 where the height is greater than the width, the depth of the square second encoding units 1412a, 1412b is one depth lower than the depth D of the non-square first encoding unit 1410, which is (D + 1).
[0154] Furthermore, the video decoding device 100 can divide the non-square first encoding unit 1410 into an odd number of second encoding units 1414a, 1414b, 1414c based on the split form mode information. The odd number of second encoding units 1414a, 1414b, 1414c may include non-square second encoding units 1414a, 1414c and square second encoding units 1414b. In that case, since the long side length of the non-square second encoding units 1414a, 1414c and the side length of one side of the square second encoding unit 1414b are 1 / 2 times the side length of one side of the first encoding unit 1410, the depth of the second encoding units 1414a, 1414b, 1414c is also one depth lower than the depth D of the first encoding unit 1410, which is (D + 1). The video decoding device 100 can determine the depth of the encoding unit related to the non-square first encoding unit 1420 where the width is greater than the height in a manner corresponding to the method for determining the depth of the encoding unit related to the first encoding unit 1410.
[0155] According to an embodiment, in the determination of an index (PID) for the division of segmented encoding units, when the encoding units divided into an odd number are not of the same size as each other, the index can be determined based on the ratio of the sizes between the encoding units. Referring to FIG. 14, among the encoding units 1414a, 1414b, and 1414c divided into an odd number, the encoding unit 1414b located in the middle has the same width as the other encoding units 1414a and 1414c, but its height is also twice the height of the encoding units 1414a and 1414c with different heights. That is, in that case, the encoding unit 1414b located in the middle may include the two other encoding units 1414a and 1414c. Therefore, according to the scan order, if the index (PID) of the encoding unit 1414b located in the middle is 1, the encoding unit 1414c located in the next order has an index that is also 3, which is an increase of 2. That is, there is a discontinuity in the index values. The video decoding apparatus 100 according to an embodiment can determine whether the encoding units divided into an odd number are not of the same size as each other based on the presence or absence of such a discontinuity in the index for the division between the segmented encoding units.
[0156] The video decoding apparatus 100 according to an embodiment can determine whether it is divided into a specific division form based on the index values for dividing a plurality of encoding units determined by being segmented from the current encoding unit. Referring to FIG. 14, the video decoding apparatus 100 can divide the first rectangular encoding unit 1410 whose height is greater than its width and determine an even number of encoding units 1412a and 1412b, or an odd number of encoding units 1414a, 1414b, and 1414c. The video decoding apparatus 100 can use an index (PID) indicating each encoding unit to divide each of the plurality of encoding units. According to an embodiment, the PID is also obtained from samples at a predetermined position (e.g., the upper left sample) of each encoding unit.
[0157] The video decoding apparatus 100 according to an embodiment can determine an encoded unit at a predetermined position among the encoded units that are divided and determined using an index for dividing the encoding units. According to an embodiment, when the division mode information related to the first encoded unit 1410 having a rectangular shape with a height larger than the width indicates that it is divided into three encoded units, the video decoding apparatus 100 can divide the first encoded unit 1410 into three encoded units 1414a, 1414b, and 1414c. The video decoding apparatus 100 can assign an index related to each of the three encoded units 1414a, 1414b, and 1414c. The video decoding apparatus 100 can compare the indexes related to each encoded unit in order to determine the middle encoded unit among the encoded units divided into an odd number. The video decoding apparatus 100 can determine, as the encoded unit at the middle position among the encoded units that the first encoded unit 1410 is divided and determined into, the encoded unit 1414b having an index corresponding to the middle value among the indexes, based on the index of the encoded unit. The video decoding apparatus 100 according to an embodiment can determine an index based on the ratio of the sizes between the encoded units when the encoded units are not of the same size in determining the index for dividing the divided encoded units. Referring to FIG. 14, the encoded unit 1414b generated by dividing the first encoded unit 1410 has the same width as the other encoded units 1414a and 1414c, but is also twice the height of the encoded units 1414a and 1414c with different heights. In that case, if the index (PID) of the encoded unit 1414b located in the middle is 1, the encoded unit 1414c located in the next order also has an index of 3, which is an increase of 2.As in such a case, when the index increases uniformly and the increase widths are different, according to one embodiment, the video decoding apparatus 100 can determine that it is divided into a plurality of coding units including coding units having sizes different from other coding units. When the division mode information indicates that it is divided into an odd number of coding units, the video decoding apparatus 100 can divide the current coding unit into a form in which the coding unit at a predetermined position (e.g., the middle coding unit) among the odd number of coding units has a size different from other coding units. In that case, the video decoding apparatus 100 can use the index (PID) related to the coding unit to determine the middle coding unit having a different size. However, since the above-mentioned index, the size or position of the coding unit at the predetermined position to be determined is specified for the purpose of explaining one embodiment, it should not be construed as being limited thereto, and it should be construed that various indexes, positions and sizes of coding units can be used.
[0158] The video decoding apparatus 100 according to one embodiment can use a predetermined data unit at which the recursive division of the coding unit starts.
[0159] FIG. 15 illustrates a case where a plurality of coding units are determined by a plurality of predetermined data units included in a picture according to one embodiment.
[0160] According to one embodiment, the predetermined data unit is also defined as a data unit at which the coding unit starts to be recursively divided using the division mode information. That is, it corresponds to the coding unit at the highest depth used in the process of determining a plurality of coding units for dividing the current picture. Hereinafter, for the sake of convenience in explanation, such a predetermined data unit is referred to as a reference data unit.
[0161] According to one embodiment, the reference data unit can indicate a predetermined size and form. According to one embodiment, the reference encoding unit may include MxN samples. Here, M and N are the same as each other and are also integers represented by powers of 2. That is, the reference data unit can indicate a square or non-square form and is also divided into an integer number of encoding units hereafter.
[0162] The video decoding apparatus 100 according to one embodiment can divide the current picture into a plurality of reference data units. The video decoding apparatus 100 according to one embodiment can divide the plurality of reference data units for dividing the current picture by using the division form mode information related to each reference data unit. Such a division process of the reference data unit corresponds to a division process using a quad-tree structure.
[0163] The video decoding apparatus 100 according to one embodiment can determine in advance the minimum size that the reference data unit included in the current picture can have. Thereby, the video decoding apparatus 100 can determine reference data units of various sizes having a size equal to or larger than the minimum size, and by using the division form mode information based on the determined reference data units, at least one encoding unit can be determined.
[0164] Referring to FIG. 15, the video decoding apparatus 100 can use the square reference encoding unit 1500 or can also use the non-square reference encoding unit 1502. According to one embodiment, the form and size of the reference encoding unit are also determined by various data units (e.g., sequence, picture, slice, slice segment, maximum encoding unit, etc.) including at least one reference encoding unit.
[0165] According to one embodiment, the bit stream acquisition unit 110 of the video decoding apparatus 100 can acquire at least one of information related to the form of the reference coding unit and information related to the size of the reference coding unit from the bit stream for each of the various data units. The process of determining at least one coding unit included in the square reference coding unit 1500 is 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 reference coding unit 1502 is described in detail through the process of dividing the current coding unit 400 or 450 in FIG. 4. Therefore, detailed descriptions will be omitted.
[0166] According to an embodiment, the video decoding apparatus 100 can use an index for identifying the size and form of a reference encoding unit in order to determine the size and form of the reference encoding unit by a partial data unit determined in advance based on a predetermined condition. That is, the bitstream acquisition unit 110 can acquire only the index for identifying the size and form of the reference encoding unit for each of the slice, slice segment, maximum coding unit, etc. as data units that satisfy a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) among the various data units (e.g., sequence, picture, slice, slice segment, maximum coding unit, etc.) from the bitstream. By using the index, the video decoding apparatus 100 can determine the size and form of the reference data unit for each data unit that satisfies the predetermined condition. When acquiring and using the information related to the form of the reference encoding unit and the information related to the size of the reference encoding unit for each relatively small-sized data unit from the bitstream, the utilization efficiency of the bitstream deteriorates. Therefore, instead of directly acquiring the information related to the form of the reference encoding unit and the information related to the size of the reference encoding unit, only the index can be acquired and used. In that case, at least one of the size and form of the reference encoding unit corresponding to the index indicating the size and form of the reference encoding unit is also a predetermined one. That is, the video decoding apparatus 100 can determine at least one of the size and form of the reference encoding unit included in the data unit serving as the reference for index acquisition by selecting at least one of the predetermined size and form of the reference encoding unit by the index.
[0167] According to one embodiment, the video decoding apparatus 100 can utilize at least one reference coding unit included in one maximum coding unit. That is, the maximum coding unit for dividing video includes at least one reference coding unit, and the coding unit is determined through the 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 corresponds to at least one integer multiple of the width and height of the reference coding unit. According to one embodiment, the size of the reference coding unit is also the size obtained by dividing the maximum coding unit n times by a quad-tree structure. That is, the video decoding apparatus 100 can divide the maximum coding unit n times by a quad-tree structure to determine the reference coding unit, and according to various embodiments, the reference coding unit can be divided based on at least one of the block form information and the division form mode information.
[0168] FIG. 16 illustrates a processing block that serves as a reference for determining the determination order of the reference coding units included in the picture 1600 according to one embodiment.
[0169] The video decoding apparatus 100 according to one embodiment can determine at least one processing block that divides a picture. The processing block is a data unit including at least one reference coding unit that divides video, and at least one reference coding unit included in the processing block is also determined in a specific order. That is, the determination order of at least one reference coding unit determined in each processing block corresponds to one of various types of orders in which the reference coding unit is determined, and the reference coding unit determination order determined in each processing block is also different for each processing block. The determination order of the reference coding unit determined for each processing block is one of various orders such as raster scan, Z-scan, N-scan, up-right diagonal scan, horizontal scan, and vertical scan, but the order that can be determined is not construed as being limited to the scan order described above.
[0170] The video decoding apparatus 100 according to one embodiment can obtain information related to the size of a processing block and determine the size of at least one processing block included in the video. The video decoding apparatus 100 can obtain information related to the size of a processing block from a bitstream and determine the size of at least one processing block included in the video. Such a size of the processing block is also a predetermined size of a data unit indicated by the information related to the size of the processing block.
[0171] According to one embodiment, the bitstream acquisition unit 110 of the video decoding apparatus 100 can acquire information related to the size of a processing block from a bitstream for each specific data unit. For example, the information related to the size of a processing block is a data unit such as a video, sequence, picture, slice, slice segment, and is also acquired from the bitstream. That is, the bitstream acquisition unit 110 can acquire information related to the size of a processing block from the bitstream for each of the above-described various data units, and the video decoding apparatus 100 can utilize the acquired information related to the size of the processing block to determine the size of at least one processing block for dividing a picture, and such a size of the processing block is also an integer multiple of the size of a reference coding unit.
[0172] According to one embodiment, the video decoding apparatus 100 can determine the sizes of the processing blocks 1602 and 1612 included in the picture 1600. For example, the video decoding apparatus 100 can determine the size of a processing block based on the information related to the size of the processing block acquired from the bitstream. Referring to FIG. 16, according to one embodiment, the video decoding apparatus 100 can determine that the horizontal size of the processing blocks 1602 and 1612 is 4 times the horizontal size of a reference coding unit, and the vertical size is 4 times the vertical size of a reference coding unit. The video decoding apparatus 100 can determine the order in which at least one reference coding unit is determined within at least one processing block.
[0173] According to one embodiment, the video decoding apparatus 100 can determine each of the processing blocks 1602 and 1612 included in the picture 1600 based on the size of the processing block, and can determine the order in which at least one reference coding unit included in the processing blocks 1602 and 1612 is determined. According to one embodiment, the determination of a reference coding unit may include the determination of the size of the reference coding unit.
[0174] According to an embodiment, the video decoding apparatus 100 can acquire information related to the determination order of at least one reference coding unit included in at least one processing block from a bitstream, and based on the acquired information related to the determination order, can determine the order in which at least one reference coding unit is determined. The information related to the determination order is also defined as the order or direction in which the reference coding unit is determined within the processing block. That is, the order in which the reference coding unit is determined is determined independently for each processing block.
[0175] According to an embodiment, the video decoding apparatus 100 can acquire information related to the determination order of the reference coding unit from the bitstream for each specific data unit. For example, the bitstream acquisition unit 110 can acquire information related to the determination order of the reference coding unit from the bitstream for each data unit such as a video, sequence, picture, slice, slice segment, and processing block. Since the information related to the determination order of the reference coding unit indicates the reference coding unit determination order within the processing block, the information related to the determination order can be acquired for each specific data unit including an integer number of processing blocks.
[0176] According to an embodiment, the video decoding apparatus 100 can determine at least one reference coding unit based on the determined order.
[0177] According to an embodiment, the bitstream acquisition unit 110 can acquire, from the bitstream, information related to the determination order of reference coding units as information related to the processing blocks 1602 and 1612. The video decoder 100 determines the order for determining at least one reference coding unit included in the processing blocks 1602 and 1612, and can determine at least one reference coding unit included in the picture 1600 according to the determination order of the coding units. Referring to FIG. 16, the video decoder 100 can determine the determination order (1604 and 1614) of at least one reference coding unit related to each of the processing blocks 1602 and 1612. For example, when the information related to the determination order of the reference coding units is acquired for each processing block, the determination order of the reference coding units related to each of the processing blocks 1602 and 1612 is also different for each processing block. When the determination order (1604) of the reference coding units related to the processing block (1602) is in the raster scan order, the reference coding units included in the processing block 1602 are also determined according to the raster scan order. On the contrary, when the determination order (1614) of the reference coding units related to the other processing block 1612 is in the reverse order of the raster scan order, the reference coding units included in the processing block 1612 are also determined according to the reverse order of the raster scan order.
[0178] According to an embodiment, the video decoder 100 can decode the determined at least one reference coding unit. The video decoder 100 can decode the video based on the reference coding units determined through the foregoing embodiments. The method for decoding the reference coding units may include various methods for decoding the video.
[0179] The video decoding apparatus 100 according to an embodiment can obtain and use block form information indicating the form of the current encoding unit or splitting form mode information indicating a method of splitting the current encoding unit from a bitstream. The splitting form mode information is included in bitstreams related to various data units. For example, the video decoding apparatus 100 can use the splitting form mode information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, or a slice segment header. Further, the video decoding apparatus 100 can obtain and use, from the bitstream, a syntax element corresponding to the block form information or the splitting form mode information for each of the maximum coding unit, the reference coding unit, and the processing block.
[0180] Hereinafter, a method for determining a splitting rule according to an embodiment of the present disclosure will be described in detail.
[0181] The video decoding apparatus 100 can determine a splitting rule for video. The splitting rule is also predefined between the video decoding apparatus 100 and the video encoding apparatus 200. The video decoding apparatus 100 can determine the splitting rule for video based on information obtained from the bitstream. The video decoding apparatus 100 can determine the splitting rule based on information obtained from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, and a slice segment header. The video decoding apparatus 100 can determine the splitting rule to be different depending on a frame, a slice, a temporal layer, a maximum coding unit, or a coding unit.
[0182] The video decoding device 100 can determine a splitting rule based on the block form of the encoding unit. The block form may include the size, form, ratio of width and height, and direction of the encoding unit. The video encoding device 200 and the video decoding device 100 can determine in advance to determine a splitting rule based on the block form of the encoding unit. However, it is not limited thereto. The video decoding device 100 can determine a splitting rule based on the information obtained from the bitstream received from the video encoding device 200.
[0183] The form of the encoding unit may include a square and a non-square. When the width and height of the encoding unit are the same, the video decoding device 100 can determine the form of the encoding unit as a square. Also, when the width and height of the encoding unit are not the same, the video decoding device 100 can determine the form of the encoding unit as a non-square.
[0184] The size of the encoding unit may include various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, …, 256x256. The size of the encoding unit can be classified by the length of the long side, the length of the short side, or the area of the encoding unit. The video decoding device 100 can apply the same splitting rule to the encoding units classified into the same group. For example, the video decoding device 100 can classify the encoding units having the same long side length into the same size. Also, the video decoding device 100 can apply the same splitting rule to the encoding units having the same long side length.
[0185] The ratio of the width and height of the encoding unit may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, or 1:32, etc. Also, the direction of the encoding unit may include a horizontal direction and a vertical direction. The horizontal direction can indicate the case where the width of the encoding unit is larger than the height. The vertical direction can indicate the case where the width of the encoding unit is smaller than the height.
[0186] The video decoding device 100 can adaptively determine a splitting rule based on the size of an encoding unit. The video decoding device 100 can determine different acceptable splitting form modes based on the size of the encoding unit. For example, the video decoding device 100 can determine whether splitting is acceptable based on the size of the encoding unit. The video decoding device 100 can determine a splitting direction according to the size of the encoding unit. The video decoding device 100 can determine an acceptable splitting type according to the size of the encoding unit.
[0187] Determining a splitting rule based on the size of an encoding unit is also a predefined splitting rule between the video encoding device 200 and the video decoding device 100. Also, the video decoding device 100 can determine a splitting rule based on information obtained from the bitstream.
[0188] The video decoding device 100 can adaptively determine a splitting rule based on the position of the encoding unit. The video decoding device 100 can adaptively determine a splitting rule based on the position occupied by the encoding unit in the video.
[0189] Also, the video decoding device 100 can determine a splitting rule so that encoding units generated in different splitting paths do not have the same block form. However, it is not limited thereto, and encoding units generated in different splitting paths can have the same block form. Encoding units generated in different splitting paths can have different decoding processing orders. Since the decoding processing order has been described with reference to FIG. 12, a detailed description thereof will be omitted.
[0190] FIG. 17 illustrates encoding units that can be determined for each picture when the combinations of forms in which an encoding unit can be split are different for each picture according to an embodiment.
[0191] Referring to FIG. 17, the video decoding apparatus 100 can determine different combinations of division forms in which the encoding units can be divided for each picture. For example, the video decoding apparatus 100 can use Picture 1700 which can be divided into 4 encoding units among at least one picture included in the video, Picture 1710 which can be divided into 2 or 4 encoding units, and Picture 1720 which can be divided into 2, 3, or 4 encoding units to decode the video. The video decoding apparatus 100 can use only the division form information indicating that Picture 1700 is divided into 4 square encoding units to divide Picture 1700 into a plurality of encoding units. The video decoding apparatus 100 can use only the division form information indicating that Picture 1710 is divided into 2 or 4 encoding units to divide Picture 1710. The video decoding apparatus 100 can use only the division form information indicating that Picture 1720 is divided into 2, 3, or 4 encoding units to divide Picture 1720. Since the above combinations of division forms are only embodiments for explaining the operation of the video decoding apparatus 100, the above combinations of division forms should not be construed as being limited to the above embodiments, and it must be construed that various combinations of division forms can be used for each predetermined data unit.
[0192] The bitstream acquisition unit 110 of the video decoding apparatus 100 according to one embodiment can acquire a bitstream including an index indicating a combination of division form information for each predetermined data unit (e.g., sequence, picture, slice, etc.). For example, the bitstream acquisition unit 110 can acquire an index indicating a combination of division form information in a sequence parameter set, a picture parameter set, or a slice header. The video decoding apparatus 100 of the video decoding apparatus 100 can use the acquired index to determine a combination of division forms in which the encoding units can be divided for each predetermined data unit, and thereby can use different combinations of division forms for each predetermined data unit.
[0193] FIG. 18 illustrates various forms of encoding units determined based on split form mode information that can be represented in binary code according to one embodiment.
[0194] The video decoding apparatus 100 according to one embodiment can use the block form information and the split form mode information acquired via the bit stream acquisition unit 110 to split the encoding unit into various forms. The forms of the encoding unit that can be split correspond to various forms including the forms described via the foregoing embodiments.
[0195] Referring to FIG. 18, the video decoding apparatus 100 can split a square encoding unit in at least one of the horizontal direction and the vertical direction based on the split form mode information, and can split a non-square encoding unit in the horizontal direction or the vertical direction.
[0196] When the video decoding apparatus 100 according to one embodiment can split a square encoding unit in the horizontal direction and the vertical direction into four square encoding units, the split forms that the split form mode information related to the square encoding unit can indicate are also four. According to one embodiment, the split form mode information is also represented as a two-digit binary code, and a binary code is assigned to each split form. For example, when the encoding unit is not split, the split form mode information is also represented as (00b), when the encoding unit is split in the horizontal direction and the vertical direction, the split form mode information is also represented as (01)b, when the encoding unit is split in the horizontal direction, the split form mode information is also represented as (10)b, and when the encoding unit is split in the vertical direction, the split form mode information is also represented as (11)b.
[0197] According to one embodiment, when the video decoding apparatus 100 divides a non-square coding unit in the horizontal or vertical direction, the type of division form that can be indicated by the division form mode information is also determined by the number of coding units into which the coding unit is divided. Referring to FIG. 18, according to one 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 the coding unit into two coding units. In that case, the division form mode information can also be expressed as (10)b. The video decoding apparatus 100 can divide the coding unit into three coding units. In that case, the division form mode information can also be expressed as (11)b. The video decoding apparatus 100 can determine not to divide the coding unit. In that case, the division form 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) in order to utilize the binary code indicating the division form mode information.
[0198] According to one embodiment, referring to FIG. 18, the binary code of the division form mode information indicating that the coding unit is not divided can also be expressed as (0)b. If the binary code of the division form mode information indicating that the coding unit is not divided is set to (00b), then, although there is no division form mode information set to (01)b, the binary codes of the 2-bit division form mode information must be used. However, as shown in FIG. 18, in the case of using three types of division forms related to non-square coding units, the video decoding apparatus 100 can determine that the coding unit is not divided even if it uses the 1-bit binary code (0)b as the division form mode information, so that the bit stream can be used efficiently. However, the division form of the non-square coding unit indicated by the division form mode information should not be interpreted as being limited to only the three types shown in FIG. 18, but should be interpreted in various forms including the above-described embodiments.
[0199] FIG. 19 illustrates another form of an encoding unit that can be determined based on split form mode information that can be represented in binary code according to one embodiment.
[0200] Referring to FIG. 19, the video decoding apparatus 100 can divide a square encoding unit in the horizontal or vertical direction, and can divide a non-square encoding unit in the horizontal or vertical direction based on the split form mode information. That is, the split form mode information can indicate that a square encoding unit is divided in one direction. In such a case, the binary code of the split form mode information indicating that the square encoding unit is not divided is also represented as (0)b. If the binary code of the split form mode information indicating that the encoding unit is not divided is set to (00b), then although there is no split form mode information set to (01)b, the binary codes of the 2-bit split form mode information must all be used. However, as shown in FIG. 19, if three split forms related to a square encoding unit are used, the video decoding apparatus 100 can determine that the encoding unit is not divided by using a 1-bit binary code (0)b as the split form mode information, so that the bit stream can be used efficiently. However, the split form of the square encoding unit indicated by the split form mode information should not be interpreted as being limited to only the three forms illustrated in FIG. 19, and should be interpreted in various forms including the foregoing embodiments.
[0201] According to one embodiment, the block form information or the split form mode information is also represented using binary code, and such information is immediately generated in the bit stream. Further, the block form information or the split form mode information that is also represented by binary code is not immediately generated in the bit stream, and is also used as the binary code input by CABAC (context adaptive binary arithmetic coding).
[0202] The video decoder 100 according to an embodiment will explain the process of obtaining the syntax related to the block form information or the split form mode information via CABAC. Through the bitstream acquisition unit 110, a bitstream including the binary code related to the syntax can be obtained. The video decoder 100 can inverse binary the bin string included in the obtained bitstream to detect the syntax element indicating the block form information or the split form mode information. The video decoder 100 according to an embodiment can obtain a set of binary bin strings corresponding to the syntax element to be decoded, utilize the probability information, and decode each bin. The video decoder 100 can repeat until the bin string composed of such decoded bins becomes the same as one of the previously obtained bin strings. The video decoder 100 can perform inverse binary of the bin string to determine the syntax element.
[0203] According to one embodiment, the video decoding apparatus 100 can perform a decoding process of adaptive binary arithmetic coding to determine the syntax related to the bit string, and the video decoding apparatus 100 can update the probability model related to the bits acquired via the bit stream acquisition unit 110. Referring to FIG. 18, the bit stream acquisition unit 110 of the video decoding apparatus 100 can acquire, according to one embodiment, a bit stream indicating a binary code indicating the split mode information. Using the acquired binary code having a size of 1 bit or 2 bits, the video decoding apparatus 100 can determine the syntax related to the split mode information. The video decoding apparatus 100 can update the probability related to each bit of the 2-bit binary code in order to determine the syntax related to the split mode information. That is, the video decoding apparatus 100 can update the probability of having a value of 0 or 1 when decoding the next bit according to whether the value of the first bit of the 2-bit binary code is 0 or 1.
[0204] According to one embodiment, the video decoding apparatus 100 can update the probability related to the bits used in the process of decoding the bits of the bit string related to the syntax in the process of determining the syntax, and the video decoding apparatus 100 can determine not to update the probability and to have the same probability for specific bits in the bit string.
[0205] Referring to FIG. 18, in the process of determining the syntax using the bit string indicating the partitioning mode information for a non-square coding unit, if the video decoding apparatus 100 does not partition the non-square coding unit, it can use one bit having a value of 0 to determine the syntax related to the partitioning mode information. That is, when the block form information indicates whether the current coding unit is non-square, the first bit of the bit string related to the partitioning mode information is 0 when the non-square coding unit is not partitioned, and is also 1 when it is partitioned into two or three coding units. Thereby, the probability that the first bit of the bit string of the partitioning 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 video decoding apparatus 100 represents the partitioning mode information indicating that the non-square coding unit is not partitioned by only a 1-bit bit string having a value of 0, the video decoding apparatus 100 determines whether the second bit is 0 or 1 only when the first bit of the partitioning mode information is 1, and can determine the syntax related to the partitioning mode information. The video decoding apparatus 100 according to an embodiment can decode the bit assuming that the probabilities that the second bit is 0 or 1 are the same when the first bit related to the partitioning mode information is 1.
[0206] In the process of determining the bits of the bit string related to the partitioning mode information, the video decoding apparatus 100 according to an embodiment can use various probabilities related to each bit. The video decoding apparatus 100 according to an embodiment can determine the probabilities of the bits related to the partitioning mode information to be different along the direction of the non-square block. The video decoding apparatus 100 according to an embodiment can determine the probabilities of the bits related to the partitioning mode information to be different according to the size or the long side length of the current coding unit. The video decoding apparatus 100 according to an embodiment can determine the probabilities of the bits related to the partitioning mode information to be different according to at least one of the form and the long side length of the current coding unit.
[0207] According to an embodiment, the video decoding apparatus 100 can determine that the probabilities of bins related to the split mode information are the same for coding units having a size equal to or larger than a predetermined size. For example, based on the length of the long side of the coding unit, it can be determined that the probabilities of bins related to the split mode information are the same for coding units having a size of 64 samples or more.
[0208] According to an embodiment, the initial probabilities related to the bins constituting the bin string of the split mode information of the video decoding apparatus 100 are also determined based on the slice type (e.g., I slice, P slice, B slice,...).
[0209] FIG. 20 is a drawing showing a block diagram of a video encoding system and a decoding system that perform loop filtering.
[0210] The encoding terminal 2010 of the video encoding system and decoding system 2000 transmits the encoded bitstream of the video, and the decoding terminal 2050 receives the bitstream and decodes it to output a restored video. Here, the encoding terminal 2010 has a configuration similar to that of the video encoding apparatus 200 described later, and the decoding terminal 2050 has a configuration similar to that of the video decoding apparatus 100.
[0211] In the encoding terminal 2010, the prediction encoding unit 2015 outputs a reference video through inter prediction and intra prediction, and the conversion and quantization unit 2020 quantizes the residual data between the reference video and the current input video into quantized conversion coefficients and outputs them. The entropy encoding unit 2025 encodes and converts the quantized conversion coefficients and outputs them as a bitstream. The quantized conversion coefficients are restored to data in the spatial domain through the inverse quantization and inverse conversion unit 2030, and the restored data in the spatial domain is output as a restored video through the deblocking filtering unit 2035 and the loop filtering unit 2040. The restored video is also used as a reference video for the next input video through the prediction encoding unit 2015.
[0212] In the bitstream received at the decoding terminal 2050, the encoded video data is restored to the residual data in the spatial domain through the entropy decoding unit 2055 and the inverse quantization and inverse transformation unit 2060. The reference video and the residual data output from the prediction decoding unit 2075 are combined to form the video data in the spatial domain, and the deblocking filtering unit 2065 and the loop filtering unit 2070 can perform filtering on the video data in the spatial domain and output the restored video related to the current original video. The restored video is also used as a reference video related to the next original video by the prediction decoding unit 2075.
[0213] The loop filtering unit 2040 at the encoding terminal 2010 performs loop filtering using the filter information input by user input or system settings. The filter information used by the loop filtering unit 2040 is output to the entropy encoding unit 2010 and transmitted to the decoding terminal 2050 together with the encoded video data. The loop filtering unit 2070 at the decoding terminal 2050 can perform loop filtering based on the filter information input from the decoding terminal 2050.
[0214] The above-described various embodiments have described the operations related to the video decoding method performed by the video decoding apparatus 100. Hereinafter, the operations of the video encoding apparatus 200 that performs a video encoding method corresponding to the reverse process in such a video decoding method will be described through various embodiments.
[0215] FIG. 2 illustrates a block diagram of a video encoding apparatus 200 that can encode a video based on at least one of block form information and split form mode information according to an embodiment.
[0216] The video encoding device 200 may include an encoding unit 220 and a bitstream generation unit 210. The encoding unit 220 can receive an input video and encode the input video. The encoding unit 220 can encode the input video and 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 can determine a context model based on block form information including at least one of the form, direction, width-to-height ratio, or size of the encoding unit.
[0217] The bitstream generation unit 210 can generate a bitstream based on the encoded input video. For example, the bitstream generation unit 210 can generate a bitstream by entropy encoding the syntax element based on the context model. Also, the video encoding device 200 can transmit the bitstream to the video decoding device 100.
[0218] According to an embodiment, the encoding unit 220 of the video encoding device 200 can determine the form of the encoding unit. For example, the encoding unit can be square or have a non-square form, and information indicating such a form may be included in the block form information.
[0219] According to one embodiment, the encoding unit 220 can determine how the encoding unit is divided. The encoding unit 220 can determine the form of at least one encoding unit included in the encoding unit, and the bitstream generation unit 210 can generate a bitstream including division form mode information including information related to the form of such an encoding unit.
[0220] According to one embodiment, the encoding unit 220 can determine whether the encoding unit is divided or not. When the encoding unit 220 determines that only one encoding unit is included in the encoding unit or the encoding unit is not divided, the bitstream generation unit 210 can generate a bitstream including division form mode information indicating that the encoding unit is not divided. Also, the encoding unit 220 can divide the encoding unit into a plurality of encoding units included therein, and the bitstream generation unit 210 can generate a bitstream including division form mode information indicating that the encoding unit is divided into a plurality of encoding units.
[0221] According to one embodiment, information indicating how many encoding units the encoding unit is divided into or in which direction it is divided may be included in the division form mode information. For example, the division form mode information can indicate whether to divide in at least one of the vertical direction and the horizontal direction or not to divide.
[0222] The video encoding device 200 determines information related to the division form mode based on the division form mode of the encoding unit. The video encoding device 200 determines a context model based on at least one of the form, direction, ratio of width and height, or size of the encoding unit. Then, the video encoding device 200 generates information related to the division form mode for dividing the encoding unit into a bitstream based on the context model.
[0223] The video encoding device 200 can obtain an array for associating at least one of the form, direction, width-to-height ratio, or size of the encoding unit with an index related to the context model in order to determine the context model. The video encoding device 200 can obtain an index related to the context model based on at least one of the form, direction, width-to-height ratio, or size of the encoding unit in the array. The video encoding device 200 can determine the context model based on the index related to the context model.
[0224] The video encoding device 200 can determine the context model based on the block form information including at least one of the form, direction, width-to-height ratio, or size of the surrounding encoding units adjacent to the encoding unit in order to determine the context model. Further, the surrounding encoding units may include at least one of the encoding units located at the lower left side, left side, upper left side, upper side, upper right side, right side, or lower right side of the encoding unit.
[0225] Also, the video encoding device 200 can compare the width size of the upper surrounding encoding unit with the width size of the encoding unit in order to determine the context model. Also, the video encoding device 200 can compare the height sizes of the left and right surrounding encoding units with the height size of the encoding unit. Also, the video encoding device 200 can determine the context model based on the comparison result.
[0226] The operation of the video encoding device 200 includes content similar to the operation of the video decoding device 100 described with reference to FIGS. 3 to 20, and thus a detailed description thereof will be omitted.
[0227] Hereinafter, with reference to FIGS. 21 to 34, a video decoding device 2100 and a video encoding device 3300 according to an embodiment will be described.
[0228] FIG. 21 is a block diagram of a video decoding device 2100 according to an embodiment.
[0229] Referring to FIG. 21, a video decoding apparatus 2100 according to an embodiment may include an acquisition unit 2110 and a motion information decoding unit 2130.
[0230] The video decoding apparatus 2100 can acquire a bitstream generated as an encoding result of a video, and decode motion information for inter prediction based on the information included in the bitstream.
[0231] A video decoding apparatus 2100 according to an embodiment may include a central processor (not shown) that controls the acquisition unit 2110 and the motion information decoding unit 2130. Alternatively, the acquisition unit 2110 and the motion information decoding unit 2130 may operate by respective self-processors (not shown), and the video decoding apparatus 2100 can also operate as a whole by the processors (not shown) operating organically with each other. Alternatively, the acquisition unit 2110 and the motion information decoding unit 2130 are also controlled by the control of an external processor (not shown) of the video decoding apparatus 2100.
[0232] The video decoding apparatus 2100 may include one or more data storage units (not shown) in which the input / output data of the acquisition unit 2110 and the motion information decoding unit 2130 are stored. The video decoding apparatus 2100 may include a memory control unit (not shown) that controls data input / output of the data storage unit (not shown).
[0233] The video decoding apparatus 2100 can perform a video decoding operation including prediction by operating in cooperation with an internally mounted video decoding processor or an external video decoding processor in order to restore a video through video decoding. The internal video decoding processor of the video decoding apparatus 2100 according to an embodiment can also implement a basic video decoding operation by including a central processing unit or a graphics processing unit in addition to a separate processor in a video decoding processing module.
[0234] The video decoding device 2100 may be included in the aforementioned video decoding device 100. For example, the acquisition unit 2110 may also be included in the bitstream acquisition unit 110 of the video decoding device 100 illustrated in FIG. 1, and the motion information decoding unit 2130 may be included in the decoding unit 120 of the video decoding device 100.
[0235] The acquisition unit 2110 receives a bitstream generated as an encoding result of a video. The bitstream may include information for determining a motion vector used for inter prediction of the current block. The current block is a block generated by being divided by a tree structure from the video, and corresponds to, for example, a largest coding unit, a coding unit, or a transform unit.
[0236] The acquisition unit 2110 can determine the current block based on at least one of block form information and / or information related to a division form mode included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, and a slice segment header. Further, the acquisition unit 2110 can acquire, from the bitstream, a syntax element corresponding to the block form information or the information related to the division form mode for each largest coding unit, reference coding unit, and processing block, and use it to determine the current block.
[0237] The bitstream may include information indicating a prediction mode of the current block, but the prediction mode of the current block may include at least one of an intra mode, an inter mode, a merge mode, a skip mode, and a mode preset according to the present disclosure. The aforementioned preset mode is also a mode for determining at least one primary residual motion vector candidate among primary residual motion vector candidates classified by a transition distance and a transition direction as a primary residual motion vector related to the current block. The primary residual motion vector will be described in detail below.
[0238] In one embodiment, the bitstream may include information indicating at least one of whether a preset mode has been applied to the current block, the basic motion vector of the current block, the primary residual motion vector of the current block, the priority of the transition distance for classifying the primary residual motion vector candidates, and the priority of the transition direction for classifying the primary residual motion vector candidates. The acquisition unit 2110 can acquire the information included in the bitstream at a level corresponding to at least one unit among the coding unit, the conversion unit, the maximum coding unit, the slice unit, and the picture unit.
[0239] The motion information decoding unit 2130 determines the motion vector of the current block based on the information included in the bitstream.
[0240] The motion information decoding unit 2130 can confirm whether a preset mode has been applied to the current block based on the information included in the bitstream. The information indicating whether the preset mode has been applied may include a flag or an index.
[0241] The motion information decoding unit 2130 acquires the information indicating whether the preset mode has been applied from the bitstream at the unit level corresponding to the current block, and can decode the current block according to the preset mode. The motion information decoding unit 2130 can also acquire the information indicating whether the preset mode has been applied from the bitstream at the unit level corresponding to the upper block, slice, or picture, and decode the blocks included in the upper block, slice, or picture according to the preset mode.
[0242] In one example, the motion information decoding unit 2130 can also determine whether a preset mode has been applied to the current block based on information related to at least one of the current block, the previously decoded block, the current slice, the previously decoded slice, the current picture, and the previously decoded picture. In that case, the motion information decoding unit 2130 can determine whether the preset mode has been applied based on the same criteria as the video encoding device 3300.
[0243] When the preset mode is applied to the current block, the motion information decoding unit 2130 can determine a primary residual motion vector candidate related to each of at least one basic motion vector candidate. The primary residual motion vector candidate is also classified by a transition distance and a transition direction.
[0244] In one embodiment, at least one basic motion vector candidate of the current block is also determined based on the motion vectors of peripheral blocks that are spatially and temporally related to the current block. The peripheral blocks that are spatially and temporally related to the current block may include blocks decoded prior to the current block. The peripheral blocks that are spatially related to the current block may include, for example, but are not limited to, the block located to the left of the current block and the block located above the current block.
[0245] Also, the peripheral blocks that are temporally related to the current block may include, for example, the blocks located at the same position as the current block and the blocks spatially adjacent to the blocks at the same position among the blocks included in a reference picture different from the current picture including the current block.
[0246] In one embodiment, the motion information decoding unit 2130 can determine the motion vectors of the peripheral blocks related to the current block as at least one basic motion vector candidate. Alternatively, the motion information decoding unit 2130 can also change the motion vectors of the peripheral blocks related to the current block and determine at least one basic motion vector candidate. Alternatively, the motion information decoding unit 2130 can also combine the motion vectors of the peripheral blocks related to the current block in a predetermined manner and determine at least one basic motion vector candidate.
[0247] In one embodiment, the motion information decoding unit 2130 can also determine at least one basic motion vector candidate in the same way as the method for determining the candidate list of the motion vector predictor in the merge mode or AMVP mode of HEVC.
[0248] In one embodiment, the motion information decoding unit 2130 can also determine the zero motion vector having 0 as a component as the basic motion vector candidate.
[0249] If at least one basic motion vector candidate is determined, the motion information decoding unit 2130 can determine the basic motion vector of the current block based on the information included in the bitstream. The information indicating the basic motion vector of the current block may include an index, and the index indicating the basic motion vector of the current block is also obtained from the bitstream corresponding to at least one level among the transform unit level, coding unit level, maximum coding unit level, slice level, or picture level.
[0250] In one embodiment, the information indicating the basic motion vector of the current block is encoded by a fixed length coding (FLC), unary coding, or truncated unary coding method and may be included in the bitstream.
[0251] In one embodiment, the motion information decoding unit 2130 can also determine the basic motion vector of the current block among at least one basic motion vector candidate based on information related to at least one of the current block, the previously decoded block, the current slice, the previously decoded slice, the current picture, and the previously decoded picture. In that case, the motion information decoding unit 2130 can determine the basic motion vector on the same basis as the video encoding device 3300.
[0252] Once the basic motion vector related to the current block is determined, the motion information decoding unit 2130 can determine the primary residual motion vector of the current block among at least one primary residual motion vector candidate.
[0253] The primary residual motion vector candidates of the current block can be classified by the displacement distance and the displacement direction. However, the acquisition unit 2110 acquires information indicating at least one of the displacement distance and the displacement direction from the bitstream, and the motion information decoding unit 2130 can determine the primary residual motion vector corresponding to the information indicating at least one of the displacement distance and the displacement direction.
[0254] At least one of the information indicating the displacement distance and the information indicating the displacement direction for specifying the primary residual motion vector of the current block is also acquired from the bitstream at the transform unit level, the coding unit level, the maximum coding unit level, the slice level, or the picture level.
[0255] The information indicating the displacement distance and the displacement direction for specifying the primary residual motion vector of the current block is encoded by a fixed-length coding (FLC) method, a unary coding method, or a truncated unary coding method and may be included in the bitstream. The acquisition unit 2110 can also decode at least one of the information indicating the displacement direction, for example, the index indicating the displacement direction, from the bitstream using a context model.
[0256] In one embodiment, the motion information decoding unit 2130 can also determine the primary residual motion vector of the current block among at least one primary residual motion vector candidate based on information related to at least one of the current block, the previously decoded block, the current slice, the previously decoded slice, the current picture, and the previously decoded picture. In that case, the motion information decoding unit 2130 can determine the primary residual motion vector based on the same criteria as the video encoding device 3300.
[0257] Once the primary residual motion vector of the current block is determined, the motion information decoding unit 2130 can apply the primary residual motion vector to the basic motion vector of the current block to determine the motion vector of the current block. In one example, the motion information decoding unit 2130 can add the primary residual motion vector to the basic motion vector of the current block to determine the motion vector of the current block.
[0258] When the bitstream contains information indicating the secondary residual motion vector, the motion information decoding unit 2130 can determine the secondary residual motion vector of the current block based on the information indicating the secondary residual motion vector. The information indicating the secondary residual motion vector is encoded by a method different from the encoding method of the information indicating the primary residual motion vector (e.g., fixed-length coding, unary coding, or truncated unary coding) and may be included in the bitstream. As an example, the information indicating the secondary residual motion vector may be encoded by the exponential golomb coding method and included in the bitstream. The acquisition unit 2110 can acquire the information indicating the secondary residual motion vector from the bitstream at the conversion unit level, coding unit level, maximum coding unit level, slice level, or picture level.
[0259] The motion information decoding unit 2130 can also determine the motion vector of the current block by applying the secondary residual motion vector to the basic motion vector that has been changed by applying the primary residual motion vector. In one example, the motion information decoding unit 2130 can determine the motion vector of the current block by adding the secondary residual motion vector to the basic motion vector that has been changed by applying the primary residual motion vector.
[0260] In one embodiment, when the prediction direction of the current block is bi-direction, the secondary residual motion vector is also included in the bitstream for only one of the uni-directions. For example, the information indicating the secondary residual motion vector may be included in the bitstream for only one of the uni-directions of list 0 direction and list 1 direction.
[0261] When the secondary residual motion vector is included in the bitstream for only the list 0 direction, the motion information decoding unit 2130 can apply the secondary residual motion vector for the list 0 direction to the basic motion vector of the list 0 direction that has been changed by applying the primary residual motion vector for the list 0 direction, and determine the motion vector of the current block in the list 0 direction. Then, the motion information decoding unit 2130 can apply the primary residual motion vector for the list 1 direction to the basic motion vector of the list 1 direction to determine the motion vector of the current block in the list 1 direction, or can also apply the secondary residual motion vector for the list 0 direction to the result of applying the primary residual motion vector for the list 1 direction to the basic motion vector of the list 1 direction to determine the motion vector of the current block in the list 1 direction.
[0262] When comparing the preset mode according to the present disclosure with the AMVP mode of HEVC, in the AMVP mode, after the decoding device determines the predicted motion vector and the residual motion vector, the two are combined to determine the motion vector of the block. In the preset mode according to the present disclosure, the basic motion vector performs a function similar to the predicted motion vector, and the primary residual motion vector performs a function similar to the residual motion vector in the AMVP mode. However, in the preset mode according to the present disclosure, the primary residual motion vector is classified according to the transition distance and the transition direction and is encoded by at least one of fixed-length coding, unary coding, and truncated unary coding, whereas the residual motion vector in the AMVP mode is encoded by the exponential golomb coding method, which is a difference. Additionally, the preset mode according to the present disclosure can improve the accuracy of the motion vector of the block by encoding / decoding the secondary residual motion vector.
[0263] Hereinafter, with reference to FIGS. 22 to 25, a method for determining a primary residual motion vector candidate corresponding to any one of the basic motion vector candidates will be described.
[0264] FIGS. 22 to 25 are drawings showing primary residual motion vector candidates displayed on a coordinate plane.
[0265] Referring to FIGS. 22 to 25, the motion information decoding unit 2130 can determine the candidate located in a predetermined form in the configuration of the primary residual motion vector candidate. The predetermined form may also be a polygon such as a rhombus or a rectangle, or a form similar to a circle.
[0266] The motion information decoding unit 2130 can determine, as candidates for the displacement distance determined at a preset point (e.g., the point (0, 0)), candidates for the primary residual motion vector. At the preset point, the motion information decoding unit 2130 can determine, as the first candidate group, candidates for the primary residual motion vector at the first displacement distance, determine, as the second candidate group, candidates for the primary residual motion vector at the second displacement distance, and determine, as the nth candidate group, candidates for the primary residual motion vector at the nth displacement distance. The motion information decoding unit 2130 can determine, as the first candidate group, the candidate for the primary residual motion vector closest to the preset point, and determine, as the second candidate group, the candidate for the primary residual motion vector next closest thereto. That is, as the displacement distance increases, the numbers of the candidate groups increase in order.
[0267] As the numbers of the candidate groups increase, the intervals of the displacement distances can also increase, such as in logarithmic scale intervals or non-linear intervals. Also, as the numbers of the candidate groups increase, the displacement distances can increase at intervals of an integer N (e.g., N, 2N, 3N,...). Further, with the increase of the candidate groups, the displacement distances are also determined such that the differences from the previous displacement distances increase constantly.
[0268] Also, the displacement distance can be determined according to the definition of the user. Alternatively, the motion information decoding unit 2130 can directly determine the displacement distance based on information related to the current block, Temporal layer, GOP, etc., and can also obtain, via the bit stream, information indicating the displacement distance for determining candidates for the primary residual motion vector.
[0269] The motion information decoding unit 2130 can also determine the displacement distance for determining candidates for the primary residual motion vector of the current block according to the displacement distance determined at a high level higher than the level corresponding to the current block.
[0270] The number of first residual motion vector candidates is determined independently for each candidate group. The motion information decoding unit 2130 can also determine the number of first residual motion vector candidates for each candidate group of the current block based on the number information determined at a higher level than the level corresponding to the current block.
[0271] FIGS. 22 and 23 illustrate the case where the number of first residual motion vector candidates in each candidate group is 4. Also, FIGS. 22 and 23 illustrate the case where the number of candidate groups is 3, but the number of candidate groups is not limited to 3.
[0272] Referring to FIG. 22, the motion information decoding unit 2130 can determine first residual motion vector candidates having a rhombus-shaped distribution with respect to a preset point. The interval between each pixel corresponds to a 1 / 4 pixel distance. Hereinafter, for the sake of convenience, the component values of the vector candidates are displayed after being scaled by 4 times. The 1 / 4 pixel distance corresponds to a transition distance of 1.
[0273] The motion information decoding unit 2130 can determine first residual motion vector candidates ((1, 0), (-1, 0), (0, 1), (0, -1)) at a 1 / 4 pixel distance from the preset point as the first candidate group.
[0274] The motion information decoding unit 2130 can determine first residual motion vector candidates ((2, 0), (-2, 0), (0, 2), (0, -2)) at a 1 / 2 pixel distance from the preset point as the second candidate group.
[0275] The motion information decoding unit 2130 can determine first residual motion vector candidates ((4, 0), (-4, 0), (0, 4), (0, -4)) at a 1 pixel distance from the preset point as the third candidate group.
[0276] Referring to FIG. 23, the motion information decoding unit 2130 can determine first residual motion vector candidates having a square-shaped distribution with respect to a preset point.
[0277] The motion information decoding unit 2130 can determine the primary residual motion vector candidates ((1, 1), (1, -1), (-1, 1), (-1, -1)) at a distance of approximately 1 / 4 pixel from the preset point as the first candidate group based on the preset point.
[0278] The motion information decoding unit 2130 can determine the primary residual motion vector candidates ((2, 2), (2, -2), (-2, 2), (-2, -2)) at a distance of approximately 1 / 2 pixel from the preset point as the second candidate group based on the preset point.
[0279] The motion information decoding unit 2130 can determine the primary residual motion vector candidates ((4, 4), (4, -4), (-4, 4), (-4, -4)) at a distance of approximately 1 pixel from the preset point as the third candidate group based on the preset point.
[0280] Referring to FIG. 24, the motion information decoding unit 2130 can also determine the number of primary residual motion vector candidates included in at least one candidate group among many candidate groups to be different from other candidate groups.
[0281] Specifically, the motion information decoding unit 2130 can determine eight primary residual motion vector candidates ((1, 0), (-1, 0), (0, 1), (0, -1), (1, 1), (1, -1), (-1, 1), (-1, -1)) at a distance of approximately 1 / 4 pixel from the preset point as the first candidate group.
[0282] Also, the motion information decoding unit 2130 can determine eight primary residual motion vector candidates ((2, 0), (-2, 0), (0, 2), (0, -2), (2, 2), (2, -2), (-2, 2), (-2, -2)) at a distance of approximately 1 / 2 pixel from the preset point as the second candidate group.
[0283] The motion information decoding unit 2130 can determine four primary residual motion vector candidates ((4, 0), (-4, 0), (0, 4), (0, -4)) at a distance of approximately 1 pixel from the preset point as the third candidate group.
[0284] Referring to FIG. 25, the motion information decoding unit 2130 can diversely determine the distribution forms of the primary residual motion vector candidates for each candidate group. As an example, based on a preset point, the motion information decoding unit 2130 can determine the primary residual motion vector candidates ((1, 0), (-1, 0), (0, 1), (0, -1)) having a rhombus-shaped distribution as the first candidate group.
[0285] Also, based on a preset point, the motion information decoding unit 2130 can determine the primary residual motion vector candidates ((2, 2), (-2, 2), (2, -2), (-2, -2)) having a square-shaped distribution as the second candidate group.
[0286] Also, based on a preset point, the motion information decoding unit 2130 can determine the primary residual motion vector candidates ((4, 0), (-4, 0), (0, 4), (0, -4)) having a rhombus-shaped distribution as the third candidate group. The distribution forms of the primary residual motion vector candidates included in each candidate group can have various distribution forms other than the distribution forms illustrated in FIG. 25.
[0287] FIG. 26 is a drawing for explaining an index indicating a primary residual motion vector candidate according to an embodiment.
[0288] As illustrated in FIG. 26, reference numeral 2601 is a bit representation corresponding to an index indicating a basic motion vector candidate, reference numeral 2602 is a bit representation corresponding to an index indicating the transition distance (or candidate group) of the primary residual motion vector candidate, and reference numerals 2603 and 2604 are also bit representations corresponding to an index indicating the transition direction of the primary residual motion vector candidate.
[0289] The motion information decoding unit 2130 can assign an index to each of at least one basic motion vector candidate in order to determine the basic motion vector of the current block based on the index indicating the basic motion vector included in the bit stream. Further, the motion information decoding unit 2130 can assign an index to each of the primary residual motion vector candidates in order to determine the primary residual motion vector of the current block based on the index indicating the primary residual motion vector included in the bit stream.
[0290] Referring to FIG. 26, an index of 0 is assigned to the basic motion vector candidate 0, and an index of 10 is assigned to the basic motion vector candidate 1. The index indicating each basic motion vector candidate is also expressed by a unary coding method or a cut-off type unary coding method in a predetermined order.
[0291] As going from the basic motion vector candidate 0 to the basic motion vector candidate 4, the number of bits representing the index increases, but the priority order between the basic motion vector candidates for assigning the index can be set based on the same criteria as the video encoding apparatus 3300.
[0292] In one embodiment, the information indicating the priority among the basic motion vector candidates for assigning an index is included in the bitstream. In this case, the motion information decoding unit 2130 can also assign an index to each of the basic motion vector candidates according to the information indicating the priority obtained from the bitstream. The information indicating the priority among the basic motion vector candidates obtained from the bitstream may be compared with the priority among the basic motion vector candidates determined in the previous block, previous slice, or previous picture, and may include information related to the changed priority. For example, in the previous block, previous slice, or previous picture, if the priority of the basic motion vector candidate 0 was the first priority, but in relation to the current block, current slice, or current picture, the priority of the basic motion vector candidate 0 is changed to the third priority, the bitstream may include the information that the priority of the basic motion vector candidate 0 is changed to the third priority. Further, the bitstream includes information indicating that there is no change in the priority among the basic motion vector candidates in the current block, current slice, or current picture as compared with the priority among the basic motion vector candidates determined in the previous block, previous slice, or previous picture.
[0293] The primary residual motion vector candidates determined corresponding to one basic motion vector candidate are also grouped into candidate groups according to the determined criteria. Here, the determined criteria also mean how far the transition distance is from the preset point. The index related to each grouped candidate group is also represented by a unary coding or truncated unary coding method. According to an embodiment, the index related to each grouped candidate group is also represented by a fixed-length coding method.
[0294] Referring to FIG. 26, from candidate group 0 corresponding to the transition distance 1 to candidate group 7 corresponding to the transition distance 8, the number of bits for representing the index of the candidate group increases, but the priority among the candidate groups for assigning an index is also set according to the same criteria as the video encoding apparatus 3300.
[0295] In one embodiment, the information indicating the priority among candidate groups for assigning an index is included in the bitstream. In this case, the motion information decoding unit 2130 can assign an index to each candidate group based on the information indicating the priority obtained from the bitstream. The information indicating the priority among candidate groups obtained from the bitstream may include information related to the order of change when compared with the priority among candidate groups determined in the previous block, previous slice, or previous picture. For example, in the previous block, previous slice, or previous picture, if the priority of candidate group 0 was the first, but in relation to the current block, current slice, or current picture, the priority of candidate group 0 is changed to the third, the bitstream may include the information that the priority of candidate group 0 is changed to the third. Also, the bitstream may include the information that there is no change in the priority among candidate groups in the current block, current slice, or current picture when compared with the priority among candidate groups determined in the previous block, previous slice, or previous picture.
[0296] On one hand, the candidate group 0 illustrated in FIG. 26 may include candidates separated by a transition distance 1 from the preset point. However, in one embodiment, the candidate group 0 may include candidates separated by a distance of 0 from the preset point. The candidate separated by a distance of 0 from the preset point means the preset point itself. Thus, as described with reference to FIGS. 22 to 25, when the preset point corresponds to (0, 0), the primary residual motion vector candidate is (0, 0). In that case, if the information indicating the candidate group for specifying the primary residual motion vector of the current block indicates the candidate group 0, then, without the need to acquire the information indicating the transition direction, as long as there is no secondary residual motion vector, the basic motion vector of the current block, that is, also becomes the motion vector of the current block. In other words, for the current block, if any one basic motion vector is determined and the information indicating the candidate group indicates the candidate group 0, the basic motion vector becomes the motion vector of the current block, so that the conventional HEVC merge mode or skip mode can be replaced.
[0297] For the primary residual motion vector candidates included in any one candidate group, an index (or flag) indicating the transition direction is assigned. In that case, the index indicating the transition direction is also represented by a fixed-length coding method. For example, if any one candidate group includes four primary residual motion vector candidates, two bits are required to indicate each primary residual motion vector candidate.
[0298] The motion information decoding unit 2130 can group the primary residual motion vector candidates included in one candidate group according to their positions on the coordinate plane, and can assign an index or flag corresponding to the grouped groups.
[0299] Referring to FIG. 26, depending on whether the primary residual motion vector candidates (1,0), (-1,0), (0,1), and (0,-1), which are the primary residual motion vector candidates corresponding to candidate group 0 of the basic motion vector 0, are located on the x-axis or the y-axis, an index (or flag) of 0 or 1 is assigned as shown by reference numeral 2603 in the drawing. Depending on whether they are located in the + direction or the - direction, an index (or flag) of 0 or 1 is assigned as shown by reference numeral 2604 in the drawing.
[0300] As described above, the acquisition unit 2110 can decode at least one of the indexes indicating the transition direction of the primary residual motion vector from the bit stream using the context model. For example, the acquisition unit 2110 divides the four primary residual motion vector candidates included in one candidate group into two groups, each including two candidates located on the x-axis and two candidates located on the y-axis, and can decode the index 2603 indicating whether it is a candidate located on the x-axis or a candidate located on the y-axis using the context model. If it is determined whether it is a candidate located on the x-axis or a candidate located on the y-axis, the acquisition unit 2110 can decode the index 2604 indicating whether it is a candidate in the + direction or a candidate in the - direction using the context model.
[0301] In one embodiment, the motion information decoding unit 2130 includes only the candidates located at the preset points in each candidate group on the coordinate plane. For example, the motion information decoding unit 2130 can include only the candidates located on the x-axis or only the candidates located on the y-axis in each candidate group based on the information related to at least one of the previous picture, the current picture, the previous slice, the current slice, the previous block, and the current block. For example, in FIG. 26, among the candidates (1,0), (-1,0), (0,1), and (0,-1) included in candidate group 0, only (1,0) and (-1,0) are included in candidate group 0, and only the index of reference numeral 2604 in the drawing is assigned to each candidate as the index indicating the transition direction.
[0302] Next, a method for determining a primary residual motion vector candidate when the basic motion vector candidate is a bidirectional motion vector will be described.
[0303] First, FIG. 27 is a drawing for explaining motion information used for bidirectional prediction of a block, and illustrates a case where a block is bidirectionally predicted in the AMVP mode of HEVC.
[0304] Block 2710 can be unidirectionally predicted using the reference picture 2730 included in list 0 or the reference picture 2750 included in list 1, or can be bidirectionally predicted using the two reference pictures 2730 and 2750 included in list 0 and list 1.
[0305] Referring to FIG. 27, when the prediction direction of block 2710 is unidirectional in the list 0 direction, the motion vector MV0 of block 2710 in the list 0 direction is determined based on the prediction motion vector MVP0 corresponding to the list 0 direction and the residual motion vector MVD0 for the list 0 direction. And when the prediction direction of block 2710 is unidirectional in the list 1 direction, the motion vector MV1 of block 2710 in the list 1 direction is determined based on the prediction motion vector MVP1 corresponding to the list 1 direction and the residual motion vector MVD1 for the list 1 direction.
[0306] When the prediction direction of block 2710 is bidirectional including the list 0 direction and the list 1 direction, the motion vector MV0 of block 2710 in the list 0 direction is determined based on the prediction motion vector MVP0 corresponding to the list 0 direction and the residual motion vector MVD0 for the list 0 direction, and the motion vector MV1 of block 2710 in the list 1 direction is determined based on the prediction motion vector MVP1 corresponding to the list 1 direction and the residual motion vector MVD1 for the list 1 direction.
[0307] That is, if a block is bi - directionally predicted, it means that the motion vector of the block includes a motion vector in the list 0 direction and a motion vector in the list 1 direction, and the residual motion vector also means that it includes a residual motion vector for the list 0 direction and a residual motion vector for the list 1 direction.
[0308] Also in one embodiment of the present disclosure, if any one basic motion vector candidate corresponds to a bi - directional motion vector, it will include a basic motion vector candidate in the list 0 direction and a basic motion vector candidate in the list 1 direction. However, a method for determining a primary residual motion vector candidate for the list 0 direction and a primary residual motion vector candidate for the list 1 direction will be described below.
[0309] FIG. 28 illustrates the positional relationship between a first reference picture 2830 indicated by a first unidirectional basic motion vector candidate, a second reference picture 2850 indicated by a second unidirectional basic motion vector candidate, and a current picture 2810 including a current block when a certain basic motion vector candidate corresponds to a bi - directional motion vector. In FIG. 28, let the distance between the current picture 2810 and the first reference picture 2830 be d1, and the distance between the current picture 2810 and the second reference picture 2850 be d2. The distance between pictures means the difference in POC values of two pictures. Also, the first unidirectional means the list 0 direction or the list 1 direction, and the second unidirectional means a direction different from the first unidirectional.
[0310] Referring to FIG. 28, the current picture 2810 has a POC of B, and each of the first reference picture 2830 and the second reference picture 2850 has a POC of A and a POC of C. The primary residual motion vector candidate when POC B has a value between POC A and POC C is illustrated in FIG. 29.
[0311] The primary residual motion vector candidates illustrated in the aforementioned FIG. 26 consist of residual candidates for list 0 or residual candidates for list 1 along the direction of the basic motion vector candidate. However, when the basic motion vector candidate is bidirectional, each of the primary residual motion vector candidates may include a residual candidate for list 0 and a residual candidate for list 1.
[0312] When POC B has a value between POC A and POC C, each primary residual motion vector candidate classified by the transition distance and the transition direction may include a primary residual motion vector candidate for the first unidirectional direction having a magnitude value corresponding to the transition distance and a primary residual motion vector candidate for the second unidirectional direction having a value of the opposite sign while having a magnitude value corresponding to the transition distance.
[0313] For example, referring to FIG. 29, among the primary residual motion vector candidates belonging to candidate group 0, the primary residual motion vector candidate specified by index 00 indicating the transition direction may include (1,0) having a magnitude value corresponding to the transition distance as a component and (-1,0) having a value of the opposite sign as a component. (1,0) corresponds to the primary residual motion vector candidate for the first unidirectional direction, and (-1,0) corresponds to the primary residual motion vector candidate for the second unidirectional direction. If the index indicating the transition direction is obtained as 00 from the bitstream, the motion information decoding unit 2130 can determine (1,0) as the primary residual motion vector for the first unidirectional direction of the current block and determine (-1,0) as the primary residual motion vector for the second unidirectional direction of the current block.
[0314] In one embodiment, the value of the primary residual motion vector candidate for any one unidirectional direction is scaled by the distance between d1 and d2. For example, if the primary residual motion vector candidate for the first unidirectional direction when d1 is 1 is (1,0), then when d2 is 2, the primary residual motion vector candidate for the second unidirectional direction is also determined to be (-2,0).
[0315] In other words, if the primary residual motion vector candidate for the first unidirectional direction is (x, y), the primary residual motion vector candidate for the second unidirectional direction is also determined to be ((d2 / d1)*(-x), (d2 / d1)*(-y)). In one example, d2 / d1 is calculated as an integer (int) type, or depending on the embodiment, it is also calculated as a double type or a float type. Alternatively, depending on the embodiment, d2 / d1 can be converted via bit shift operators (<<, >>), the converted value can be rounded, and then the bit shift operators can be applied again for calculation.
[0316] FIG. 30 illustrates the positional relationship between a first reference picture 2930 indicated by a basic motion vector candidate for a first unidirectional direction, a second reference picture 2950 indicated by a basic motion vector candidate for a second unidirectional direction, and a current picture 2910 including a current block, when a certain basic motion vector candidate corresponds to a bidirectional motion vector. In FIG. 30, the distance between the current picture 2910 and the first reference picture 2930 is defined as d1, and the distance between the current picture 2910 and the second reference picture 2950 is defined as d2.
[0317] Referring to FIG. 30, the current picture 2910 has a POC of A, and each of the first reference picture 2930 and the second reference picture 2950 has a POC of B and a POC of C, respectively. The primary residual motion vector candidates when POC A is smaller than POC B and POC C are illustrated in FIG. 31. The primary residual motion vector candidates when POC A is larger than POC B and POC C are the same as those illustrated in FIG. 31.
[0318] Each of the primary residual motion vector candidates classified by the transition distance and the transition direction may include a residual candidate for the first unidirectional direction and a residual candidate for the second unidirectional direction.
[0319] If POC A has a value greater than or less than POC B and POC C, each primary residual motion vector candidate classified by the displacement distance and displacement direction may include a primary residual motion vector candidate for a first unidirectional direction having a value of a magnitude corresponding to the displacement distance, and a primary residual motion vector candidate for a second unidirectional direction having values of the same sign with the same magnitude corresponding to the displacement distance as components.
[0320] For example, referring to FIG. 31, among the primary residual motion vector candidates included in candidate group 0, the primary residual motion vector candidate specified by index 00 indicating the displacement direction may include (1, 0) having a value of a magnitude corresponding to the displacement distance as a component, and (1, 0) having values of the same size and the same sign as components as (1, 0).
[0321] In one embodiment, the value of the primary residual motion vector candidate for any one unidirectional direction is scaled by the distance between d1 and d2. For example, if the primary residual motion vector candidate for the first unidirectional direction when d1 is 1 is (1, 0), then the primary residual motion vector candidate for the second unidirectional direction when d2 is 2 is also determined to be (2, 0).
[0322] In other words, when the primary residual motion vector candidate for the first unidirectional direction is (x, y), the primary residual motion vector candidate for the second unidirectional direction is also determined to be ((d2 / d1)*(x), (d2 / d1)*(y)). In one example, d2 / d1 is also calculated as an integer (int) type, or depending on the implementation example, d2 / d1 is calculated as a double type or a float type. Alternatively, depending on the implementation example, d2 / d1 can be converted via bit shift operators (<<, >>), the converted value can be rounded, and then the bit shift operator can be further applied for calculation.
[0323] Hereinafter, a method for determining the motion vector of the current block will be described in consideration of the prediction direction of the current block and the direction of the basic motion vector.
[0324] When the prediction direction of the current block is the same as the direction of the basic motion vector of the current block, the motion information decoding unit 2130 can apply the primary residual motion vector to the basic motion vector of the current block to determine the motion vector of the current block.
[0325] In one embodiment, the acquisition unit 2110 can extract information indicating the usage direction of the basic motion vector, for example, an index, from the bitstream. The information indicating the usage direction of the basic motion vector corresponds to the prediction direction of the current block. In one example, when the usage direction of the basic motion vector is the list 0 direction, unidirectional prediction in the list 0 direction can be performed on the current block, and when the usage direction of the basic motion vector is the list 1 direction, unidirectional prediction in the list 1 direction can be performed on the current block. Also, when the usage direction of the basic motion vector is bidirectional, the current block can be predicted bidirectionally.
[0326] For example, when the basic motion vector is bidirectional, the bit value 0 can indicate that the usage direction of the basic motion vector is bidirectional, the bit value 10 can indicate that the usage direction of the basic motion vector is the list 0 direction, and the bit value 11 can indicate that the usage direction of the basic motion vector is the list 1 direction.
[0327] Also, for example, when the basic motion vector is the first unidirectional in the list 0 direction or the list 1 direction, the bit value 0 can indicate that the usage direction of the basic motion vector is the first unidirectional, the bit value 10 can indicate that the usage direction of the basic motion vector is the second unidirectional different from the first unidirectional, and the bit value 11 can indicate that the usage direction of the basic motion vector is bidirectional.
[0328] The usage direction of the basic motion vector corresponding to the bit value may be changed.
[0329] When the basic motion vector is bidirectional and the utilization direction of the basic motion vector is bidirectional The motion information decoding unit 2130 can determine the motion vector of the current block in the list 0 direction by applying the primary residual motion vector for the list 0 direction to the basic motion vector in the list 0 direction. Then, the motion information decoding unit 2130 can determine the motion vector of the current block in the list 1 direction by applying the primary residual motion vector for the list 1 direction to the basic motion vector in the list 1 direction.
[0330] When the basic motion vector is bidirectional and the usage direction of the basic motion vector is bidirectional, but the bitstream only contains information indicating the primary residual motion vector for the list 0 direction, the motion information decoding unit 2130 can generate the primary residual motion vector for the list 1 direction based on the primary residual motion vector for the list 0 direction.
[0331] The motion information decoding unit 2130 can generate the primary residual motion vector for the list 1 direction in consideration of the positional relationship among the reference picture corresponding to the basic motion vector in the list 0 direction, the current picture including the current block, and the reference picture corresponding to the basic motion vector in the list 1 direction.
[0332] In one example, when the current picture is located between the reference picture in the list 0 direction and the reference picture in the list 1 direction, the motion information decoding unit 2130 changes the sign of the value of the primary residual motion vector for the list 0 direction to the opposite, and scales the value of the primary residual motion vector for the list 0 direction by the ratio of d1 (the distance between the current picture and the reference picture in the list 0 direction) and d2 (the distance between the current picture and the reference picture in the list 1 direction), thereby determining the primary residual motion vector for the list 1 direction. For example, when the primary residual motion vector for the list 0 direction is (1, 1), d1 is 1, and d2 is 2, the primary residual motion vector for the list 1 direction is also determined to be (-2, -2).
[0333] In other cases, when the current picture is located before or after the reference picture in the list 0 direction and the reference picture in the list 1 direction, the motion information decoding unit 2130 maintains the same sign of the value of the primary residual motion vector for the list 0 direction, scales the value of the primary residual motion vector for the list 0 direction according to the ratio between d1 and d2, and can determine the primary residual motion vector for the list 1 direction. For example, when the primary residual motion vector for the list 0 direction is (1, 1), d1 is 1, and d2 is 2, the primary residual motion vector for the list 1 direction is also determined to be (2, 2).
[0334] When the basic motion vector is bidirectional and the utilization direction of the basic motion vector is unidirectional When the basic motion vector is bidirectional and the usage direction of the basic motion vector is in the list 0 direction or the list 1 direction, the motion information decoding unit 2130 can apply the primary residual motion vector for the list 0 direction or the primary residual motion vector for the list 1 direction to the basic motion vector in the list 0 direction or the basic motion vector in the list 1 direction to determine the motion vector of the current block in the list 0 direction or the list 1 direction.
[0335] If the usage direction of the basic motion vector is in the first unidirectional direction, but the bitstream only contains information indicating the primary residual motion vector for the second unidirectional direction, the motion information decoding unit 2130 can, as described above, consider the positional relationship and distance between the current picture, the reference picture in the list 0 direction, and the reference picture in the list 1 direction, and determine the primary residual motion vector for the first unidirectional direction from the primary residual motion vector for the second unidirectional direction.
[0336] When the basic motion vector and the utilization direction of the basic motion vector are unidirectional The basic motion vector is the first unidirectional vector in the list 0 direction or the list 1 direction, the utilization direction of the basic motion vector is the second unidirectional vector different from the first unidirectional vector, and when the bit stream only includes the information indicating the primary residual motion vector for the first unidirectional vector, the motion information decoding unit 2130 can determine the basic motion vector in the second unidirectional vector based on the basic motion vector in the first unidirectional vector, and determine the primary residual motion vector for the second unidirectional vector based on the primary residual motion vector for the first unidirectional vector.
[0337] First, the motion information decoding unit 2130 can consider d1 (the distance between the current picture and the first reference picture indicated by the basic motion vector in the first unidirectional vector), and determine the second reference picture located in the direction opposite to the first reference picture with the current picture as the center.
[0338] In one example, the second reference picture separated by approximately the same distance as d1 can be determined. In that case, since d1 and d2 (the distance between the current picture and the second reference picture) are the same and the current picture is located between the first reference picture and the second reference picture, the motion information decoding unit 2130 can change the sign of the basic motion vector in the first unidirectional vector to the opposite, generate the basic motion vector in the second unidirectional vector, change the sign of the primary residual motion vector for the first unidirectional vector to the opposite, and generate the primary residual motion vector for the second unidirectional vector.
[0339] If there is no picture separated by the same distance as d1, then, while being located in the direction opposite to the first reference picture with the current picture as the center, the picture closest to the current picture can be determined as the second reference picture. In that case, the current picture is located between the first reference picture and the second reference picture, but d1 and d2 are different from each other. The motion information decoding unit 2130 can generate the basic motion vector in the second unidirectional direction by reversing the sign of the basic motion vector in the first unidirectional direction and scaling it by the ratio of d1 and d2. Also, the motion information decoding unit 2130 can generate the primary residual motion vector for the second unidirectional direction by reversing the sign of the primary residual motion vector for the first unidirectional direction and scaling it by the ratio of d1 and d2.
[0340] When the current picture corresponds to the last picture of a GOP (group of picture), the motion information decoding unit 2130 can determine any one picture located in the same direction as the first reference picture with the current picture as the center as the second reference picture. The first reference picture, or the picture closest to the current picture, is also determined as the second reference picture. In that case, since the current picture will be located after the first reference picture and the second reference picture, the motion information decoding unit 2130 can scale the value of the basic motion vector in the first unidirectional direction by the ratio of d1 and d2 (without changing the sign) to generate the basic motion vector in the second unidirectional direction. Also, the motion information decoding unit 2130 can scale the value of the primary residual motion vector for the first unidirectional direction by the ratio of d1 and d2 (without changing the sign) to generate the primary residual motion vector for the second unidirectional direction.
[0341] In one example, when the current picture corresponds to the last picture of a GOP and the first reference picture itself is determined as the second reference picture, the motion information decoding unit 2130 can also determine the basic motion vector in the first unidirectional direction as the basic motion vector in the second unidirectional direction and as the primary residual motion vector for the first unidirectional direction.
[0342] Once the basic motion vector for the second unidirectional direction and the first residual motion vector are generated, the motion information decoding unit 2130 can apply the first residual motion vector for the second unidirectional direction to the basic motion vector for the second unidirectional direction to determine the motion vector for the second unidirectional direction of the current block.
[0343] When the basic motion vector is unidirectional and the utilization direction of the basic motion vector is bidirectional If the basic motion vector is in the first unidirectional direction of list 0 direction or list 1 direction, the usage direction of the basic motion vector is bidirectional, and the bitstream only contains information indicating the first residual motion vector for the first unidirectional direction, the motion information decoding unit 2130 can generate the basic motion vector for the second unidirectional direction based on the basic motion vector for the first unidirectional direction, and generate the first residual motion vector for the second unidirectional direction based on the first residual motion vector for the first unidirectional direction.
[0344] First, the motion information decoding unit 2130 can consider d1 (the distance between the current picture and the first reference picture indicated by the basic motion vector for the first unidirectional direction) and determine the second reference picture located in the direction opposite to the first reference picture with the current picture as the center.
[0345] In one example, the second reference picture separated by the same distance as d1 can be determined. In that case, since d1 and d2 (the distance between the current picture and the second reference picture) are the same and the current picture is located between the first reference picture and the second reference picture, the motion information decoding unit 2130 can change the sign of the basic motion vector for the first unidirectional direction to the opposite to generate the basic motion vector for the second unidirectional direction, and change the sign of the first residual motion vector for the first unidirectional direction to the opposite to generate the first residual motion vector for the second unidirectional direction.
[0346] If there is no picture separated by the same distance as d1, the picture closest to the current picture while being located in the direction opposite to the first reference picture can be determined as the second reference picture with the current picture as the center. In that case, the current picture is located between the first reference picture and the second reference picture, but d1 and d2 are different from each other. The motion information decoding unit 2130 can generate the basic motion vector in the second unidirectional direction by changing the sign of the basic motion vector in the first unidirectional direction to the opposite and scaling it by the ratio of d1 and d2. Also, the motion information decoding unit 2130 can generate the primary residual motion vector for the second unidirectional direction by changing the sign of the primary residual motion vector for the first unidirectional direction to the opposite and scaling it by the ratio of d1 and d2.
[0347] When the current picture corresponds to the last picture of the GOP, the motion information decoding unit 2130 can determine any one picture located in the same direction as the first reference picture with the current picture as the center as the second reference picture. The picture closest to the first reference picture or the current picture is also determined as the second reference picture. In that case, since the current picture will be located after the first reference picture and the second reference picture, the motion information decoding unit 2130 can scale the value of the basic motion vector in the first unidirectional direction by the ratio of d1 and d2 (without changing the sign) to generate the basic motion vector in the second unidirectional direction. Also, the motion information decoding unit 2130 can scale the value of the primary residual motion vector for the first unidirectional direction by the ratio of d1 and d2 (without changing the sign) to generate the primary residual motion vector for the second unidirectional direction.
[0348] In one example, when the current picture corresponds to the last picture of the GOP and the first reference picture itself is determined as the second reference picture, the motion information decoding unit 2130 can also determine the basic motion vector in the first unidirectional direction as the basic motion vector in the second unidirectional direction and as the primary residual motion vector for the first unidirectional direction.
[0349] Once the basic motion vector for the second unidirectional direction and the primary residual motion vector are generated, the motion information decoding unit 2130 can apply the primary residual motion vector for the second unidirectional direction to the basic motion vector for the second unidirectional direction to determine the motion vector for the second unidirectional direction of the current block, and apply the primary residual motion vector for the first unidirectional direction to the basic motion vector for the first unidirectional direction to determine the motion vector for the first unidirectional direction of the current block.
[0350] On the other hand, in one embodiment, the acquisition unit 2110 can acquire information indicating whether the current block is multi-path coded from the bit stream, and information about the coding mode applied to the current block when multi-path coding is applied. Multi-path coding means that after encoding a block in two different coding modes, the most efficient coding mode is finally selected to encode the block.
[0351] If the acquisition unit 2110 confirms that the current block is multi-path coded, it can acquire information indicating which of the two coding modes the current block was coded in, for example, a flag.
[0352] If the motion information decoding unit 2130 confirms that the current block to which multi-path coding is applied is coded in the preset mode according to the present disclosure, it can decode the motion information of the current block based on the information indicating the basic motion vector of the current block and the information indicating the primary residual motion vector. If the motion information decoding unit 2130 confirms that the multi-path coded current block is coded in a mode other than the preset mode, for example, the merge mode, the skip mode or the AMVP mode, it can decode the motion information according to the confirmed mode.
[0353] On the one hand, the current block according to the present disclosure corresponds to the first child block split from the parent block. When the motion information decoding unit 2130 determines that the bit stream contains information indicating the split of the parent block, the motion information decoding unit 2130 can split the parent block into a first child block and a second child block corresponding to the current block. Alternatively, the motion information decoding unit 2130 can split the parent block into a first child block and a second child block corresponding to the current block by considering at least one of the size, horizontal length, and vertical length of the parent block. For example, when the horizontal length of the parent block is longer than the vertical length, the motion information decoding unit 2130 can split the horizontal length of the parent block in half to determine two child blocks. When the vertical length of the parent block is longer than the horizontal length, the motion information decoding unit 2130 can split the vertical length of the parent block in half to determine two child blocks. The parent block means a block that serves as a basic unit for prediction, such as a prediction unit of HEVC. According to an embodiment, the motion information decoding unit 2130 can also split the parent block into a first child block, a second child block, and a third child block corresponding to the current block, that is, three child blocks.
[0354] In addition, the form of the child block may include not only a square or a rectangle but also a triangle, a trapezoid, etc.
[0355] When the preset mode according to the present disclosure is applied to the first child block, the motion information decoding unit 2130 can determine the motion vector of the first child block by the method described above.
[0356] As an example related to the method of determining the motion vector of the second sub-block, similar to the first sub-block, the motion information decoding unit 2130 determines the basic motion vector of the second sub-block and the first-order residual motion vector of the second sub-block based on the information indicating the basic motion vector obtained from the bit stream and the information indicating the first-order residual motion vector, combines the basic motion vector and the first-order residual motion vector, and can determine the motion vector of the second sub-block. In that case, the basic motion vector candidate and the first-order residual motion vector candidate determined for the parent block can also be used identically for the first sub-block and the second sub-block. In other words, the basic motion vector candidate and the first-order residual motion vector candidate are determined at the parent block level, the motion vector of the first sub-block is determined based on the information indicating the basic motion vector of the first sub-block and the information indicating the first-order residual motion vector, and the motion vector of the second sub-block is also determined based on the information indicating the basic motion vector of the second sub-block and the information indicating the first-order residual motion vector.
[0357] In another example, the motion vector determined for the first sub-block is determined as the basic motion vector of the second sub-block, and only the information indicating the first-order residual motion vector of the second sub-block is obtained from the bit stream, and the first-order residual motion vector of the second sub-block can be determined. The motion information decoding unit 2130 can combine the first-order residual motion vector of the second sub-block with the basic motion vector of the second sub-block to determine the motion vector of the second sub-block.
[0358] As yet another example, among information indicating a basic motion vector, information indicating a transition distance, and information indicating a transition direction, which are obtained from a bit stream in relation to a first child block, at least one of them may also be shared with a second child block. In that case, the motion information decoding unit 2130 determines a basic motion vector and a primary residual motion vector of the second child block based on information shared with the second child block among information indicating a basic motion vector, information indicating a transition distance, and information indicating a transition direction, which are obtained from the bit stream in relation to the first child block, and the remaining information obtained from the bit stream in relation to the second child block.
[0359] Also, information indicating a secondary residual motion vector may be included only in a bit stream related to any one of the aforementioned first child block and second child block. For example, if a secondary residual motion vector is determined in relation to the first child block, the motion information decoding unit 2130 can apply the secondary residual motion vector of the first child block also to the second child block.
[0360] In one embodiment, the first child block is encoded in a preset mode according to the present disclosure, and the second child block is also encoded in a mode different from the mode applied to the first child block. In that case, the motion information decoding unit 2130 can decode the first child block and the second child block according to the respective modes applied to the first child block and the second child block.
[0361] Once motion vectors are determined for each of the first sub-block and the second sub-block, a first prediction block corresponding to the first sub-block and a second prediction block corresponding to the second sub-block are determined by inter prediction. Then, the boundary between the first prediction block and the second prediction block is smoothed by a smoothing filter, and a residual block is added to the finally generated final prediction block as a result of the filtering, and finally the parent block is restored. For the smoothing filtering, an N-tap filter can be applied, or an OBMC (overlapped block motion compensation) method can be applied. By the OBMC method, a weight can be applied to an overlapping portion of the first prediction block and the second prediction block. The weight of the boundary region is 0.5:0.5, but the farther the region is from the boundary, the greater the weight is increased.
[0362] FIG. 32 is a flowchart for explaining a video decoding method according to an embodiment.
[0363] In step S3210, the video decoding apparatus 2100 determines a basic motion vector of the current block. The video decoding apparatus 2100 can determine any one of at least one basic motion vector candidate as the basic motion vector of the current block.
[0364] The video decoding apparatus 2100 can determine the basic motion vector of the current block based on information indicating the basic motion vector included in the bit stream. In one example, the video decoding apparatus 2100 can obtain information indicating the basic motion vector at a block level, a slice level, or a picture level.
[0365] In step S3220, the video decoding apparatus 2100 determines a primary residual motion vector of the current block.
[0366] The video decoding device 2100 can determine a primary residual motion vector candidate for each of at least one basic motion vector candidate, obtain information indicating the transition distance and transition direction of the primary residual motion vector from the bitstream, and determine the primary residual motion vector of the current block among the primary residual motion vector candidates.
[0367] The video decoding device 2100 can obtain at least one of the information indicating the transition distance and the information indicating the transition direction at the block level, slice level, or picture level.
[0368] In step S3230, the video decoding device 2100 can apply the primary residual motion vector to the basic motion vector of the current block to determine the motion vector of the current block.
[0369] When the bitstream includes information indicating a secondary residual motion vector, the video decoding device 2100 can also apply the secondary residual motion vector to the basic motion vector changed by applying the primary residual motion vector to determine the motion vector of the current block.
[0370] FIG. 33 is a block diagram of a video encoding device 3300 according to an embodiment.
[0371] Referring to FIG. 33, a video encoding device 3300 according to an embodiment of the present invention may include a motion information encoding unit 3310 and a generation unit 3330.
[0372] The video encoding device 3300 can encode video and generate a bitstream including information generated as an encoding result.
[0373] The video encoding device 3300 according to one embodiment may include a central processor (not shown) that controls the motion information encoding unit 3310 and the generation unit 3330. Alternatively, the motion information encoding unit 3310 and the generation unit 3330 may be operated by their respective own processors (not shown), and the processors (not shown) may operate in an organic manner with each other, so that the video encoding device 3300 can also operate as a whole. Alternatively, the motion information encoding unit 3310 and the generation unit 3330 may also be controlled by the control of an external processor (not shown).
[0374] The video encoding device 3300 may include one or more data storage units (not shown) in which the input / output data of the motion information encoding unit 3310 and the generation unit 3330 are stored. The video encoding device 3300 may include a memory control unit (not shown) that controls the data input / output of the data storage unit (not shown).
[0375] In order to encode a video, the video encoding device 3300 can perform a video encoding operation including prediction by operating in cooperation with an internally mounted video encoding processor or an external video encoding processor. The internal video encoding processor of the video encoding device 3300 according to one embodiment can also implement a basic video encoding operation by including a central processing unit or a graphics processing unit as well as a separate processor in a video encoding processing module.
[0376] The video encoding device 3300 may be included in the aforementioned video encoding device 200. For example, the generation unit 3330 may also be included in the bitstream generation unit 210 of the video encoding device 200 illustrated in FIG. 2, and the motion information encoding unit 3310 may be included in the encoding unit 220 of the video encoding device 200.
[0377] The motion information encoding unit 3310 encodes the motion vector of the current block. The current block corresponds to, for example, a maximum coding unit, a coding unit, or a transform unit as a block generated by being divided by a tree structure from a video. The motion information encoding unit 3310 can determine a prediction mode applied to the current block. The prediction mode may include at least one of, for example, an intra mode, an inter mode, a merge mode, a skip mode, and a preset mode according to the present disclosure.
[0378] The generation unit 3330 generates a bitstream including information generated as an encoding result related to the motion vector. In one embodiment, the bitstream indicates whether a preset mode has been applied to the current block, the basic motion vector of the current block, the primary residual motion vector of the current block, the priority order of the transition distances for classifying the primary residual motion vector candidates, and the priority order of the transition directions for classifying the primary residual motion vector candidates. The generation unit 3330 can include the information in a bitstream corresponding to at least one of the coding unit level, the transform unit level, the maximum coding unit level, the slice unit level, and the picture unit level.
[0379] The motion information encoding unit 3310 can determine whether to apply a preset mode to the current block.
[0380] The motion information encoding unit 3310 can determine whether to apply a preset mode to the current block based on information related to at least one of the current block, the previously encoded block, the current slice, the previously encoded slice, the current picture, and the previously encoded picture.
[0381] In one example, the motion information encoding unit 3310 can also determine whether to apply the already set mode to the current block, taking into account the statistical information related to the prediction mode in the previous slice or the previous picture. The motion information encoding unit 3310 can also determine not to apply the already set mode to the current block based on the statistical information.
[0382] In one example, the motion information encoding unit 3310 can also determine to apply the already set mode to the current block based on the cost corresponding to each of many applicable prediction modes for the current block. Rate-distortion cost can be used when calculating the cost.
[0383] When the already set mode is applied to the current block, the motion information encoding unit 3310 can determine a primary residual motion vector candidate related to each of at least one basic motion vector candidate. The primary residual motion vector candidate is also classified by the transition distance and the transition direction. Since the method for determining the primary residual motion vector candidate is the same as that described in connection with the video decoding apparatus 2100, detailed description is omitted.
[0384] In one embodiment, at least one basic motion vector candidate of the current block is also determined based on the motion vectors of the surrounding blocks that are spatially and temporally related to the current block. The surrounding blocks that are spatially and temporally related to the current block may include blocks encoded earlier than the current block.
[0385] In one embodiment, the motion information encoding unit 3310 can determine the motion vectors of the peripheral blocks related to the current block as at least one basic motion vector candidate. Alternatively, the motion information encoding unit 3310 can also change the motion vectors of the peripheral blocks related to the current block and determine at least one basic motion vector candidate. Alternatively, the motion information encoding unit 3310 can also combine the motion vectors of the peripheral blocks related to the current block by a predetermined method and determine at least one basic motion vector candidate.
[0386] In one embodiment, the motion information encoding unit 3310 can also determine at least one basic motion vector candidate in the same way as the method for determining the candidate list of motion vector predictors in the merge mode or AMVP mode of HEVC.
[0387] In one embodiment, the motion information encoding unit 3310 can also determine a zero motion vector having 0 as a component as a basic motion vector candidate.
[0388] Once at least one basic motion vector candidate is determined, the motion information encoding unit 3310 can determine the basic motion vector of the current block from among at least one of the basic motion vector candidates. The motion information encoding unit 3310 can determine the basic motion vector of the current block based on information related to at least one of the current block, the previously encoded block, the current slice, the previously encoded slice, the current picture, and the previously encoded picture.
[0389] In one example, the motion information encoding unit 3310 can also determine the basic motion vector of the current block in consideration of the statistical information in the previous slice or previous picture. In another example, the motion information encoding unit 3310 can also determine the basic motion vector of the current block based on the cost between at least one basic motion vector candidate. Rate-distortion cost can be used during cost calculation.
[0390] In one embodiment, the information indicating the basic motion vector of the current block may be encoded by a method of fixed-length coding (FLC), unary coding, or truncated unary coding, and may be included in the bitstream.
[0391] Once the basic motion vector related to the current block is determined, the motion information encoding unit 3310 can determine the primary residual motion vector of the current block among at least one primary residual motion vector candidate.
[0392] The motion information encoding unit 3310 can determine the primary residual motion vector of the current block among at least one primary residual motion vector candidate by considering the difference value between the motion vector of the current block and the basic motion vector of the current block.
[0393] The information indicating the transition distance and transition direction for specifying the primary residual motion vector of the current block may be encoded by at least one method of fixed-length coding, unary coding, and truncated unary coding, and may be included in the bitstream. The generation unit 3330 can encode at least one of the information indicating the transition direction, for example, the index indicating the transition direction, using the context model and include it in the bitstream.
[0394] In one embodiment, the motion information encoding unit 3310 can also determine the primary residual motion vector of the current block among at least one primary residual motion vector candidate based on the information related to at least one of the current block, the previously encoded block, the current slice, the previously encoded slice, the current picture, and the previously encoded picture.
[0395] Once the primary residual motion vector of the current block is determined, the motion information encoding unit 3310 can apply the primary residual motion vector to the basic motion vector of the current block, compare the value generated as a result of the application with the motion vector of the current block, and determine the secondary residual motion vector. For example, the secondary residual motion vector corresponds to the value obtained by subtracting the result of adding the basic motion vector and the primary residual motion vector of the current block from the motion vector of the current block.
[0396] Once the secondary residual motion vector is determined, the generation unit 3330 can generate a bitstream including information indicating the secondary residual motion vector of the current block. The generation unit 3330 can encode the information indicating the secondary residual motion vector by a method different from the encoding method (e.g., fixed-length encoding, unary encoding, or truncated unary encoding) of the information indicating the primary residual motion vector, and include it in the bitstream. As an example, the information indicating the secondary residual motion vector may be encoded by the exponential golomb coding method and included in the bitstream. The generation unit 3330 can include the information indicating the secondary residual motion vector in the bitstream corresponding to the conversion unit level, encoding unit level, maximum encoding unit level, slice level, or picture level.
[0397] In one embodiment, when the prediction direction of the current block is bi-directional, the generation unit 3330 can also include in the bitstream only the information indicating the secondary residual motion vector for any one of the unidirectional directions, which is not the secondary residual motion vector for the bi-directional direction.
[0398] The generation unit 3330 can include in the bitstream the index indicating the basic motion vector of the current block and the index indicating the primary residual motion vector. For this purpose, the motion information encoding unit 3310 can assign indexes to at least one basic motion vector candidate and at least one primary residual motion vector candidate.
[0399] As shown in FIG. 26, reference numeral 2601 corresponds to an index indicating a basic motion vector candidate, reference numeral 2602 corresponds to an index indicating a transition distance (or candidate group) of a primary residual motion vector candidate, and reference numerals 2603 and 2604 correspond to an index indicating a transition direction of the primary residual motion vector candidate.
[0400] Referring to FIG. 26, an index of 0 is assigned to the basic motion vector candidate 0, and an index of 10 is assigned to the basic motion vector candidate 1. That is, the index indicating each basic motion vector candidate is also expressed by a method of unary coding or truncated unary coding in a predetermined order.
[0401] From the basic motion vector candidate 0 to the basic motion vector candidate 4, the number of bits representing the index increases, but the priority among the basic motion vector candidates for assigning the index is also determined by a preset criterion.
[0402] In one embodiment, the motion information encoding unit 3310 can also determine the priority among the basic motion vector candidates for the current block in consideration of the number or ratio of times the basic motion vector has been selected in the previous slice or previous picture among the basic motion vector candidates. For example, if the basic motion vector candidate 3 has been most frequently selected as the basic motion vector of the block in the previous slice or previous picture, the motion information encoding unit 3310 can assign an index of 0 to the basic motion vector candidate 3.
[0403] In one embodiment, the information indicating the priority among the basic motion vector candidates for assigning the index may be included in the bit stream. The information indicating the priority among the basic motion vector candidates may include information related to the order in which a change has occurred compared to the priority among the basic motion vector candidates determined in the previous block, previous slice, or previous picture.
[0404] The primary residual motion vector candidates determined corresponding to one basic motion vector candidate are also grouped into candidate groups according to the determined criteria. Here, the determined criteria also relate to how far apart they are from a preset location in terms of the transition distance. The indexes related to each grouped candidate group are also expressed by the method of unary coding or truncated unary coding. According to an embodiment, the indexes related to each grouped candidate group are also expressed by a fixed-length coding method.
[0405] Referring to FIG. 26, as going from candidate group 0 corresponding to transition distance 1 to candidate group 7 corresponding to transition distance 8, the number of bits for expressing the index of the candidate group increases, but the priority order between candidate groups for assigning an index is also determined by preset criteria.
[0406] In one embodiment, the motion information encoding unit 3310 can also determine the priority order between candidate groups for the current block in consideration of the number or ratio selected for identifying the primary residual motion vector in the previous slice or previous picture among the candidate groups. For example, if the primary residual motion vector candidates included in candidate group 3 were most frequently selected as the primary residual motion vector of the block in the previous slice or previous picture, the motion information encoding unit 3310 can assign an index of 0 to candidate group 3.
[0407] In one embodiment, the information indicating the priority order between candidate groups for assigning an index may be included in the bit stream. The information indicating the priority order between candidate groups may include information related to the order in which a change has occurred compared with the priority order between candidate groups determined in the previous block, previous slice, or previous picture.
[0408] On one hand, candidate group 0 shown in FIG. 26 may include candidates separated by a transition distance 1 from a preset point. However, in one embodiment, candidate group 0 may include candidates separated by a transition distance of 0 from the preset point. The candidates separated by a transition distance of 0 from the preset point mean the preset point itself. So, as described in FIGS. 22 to 25, when the preset point corresponds to (0, 0), the primary residual motion vector candidate becomes (0, 0). In that case, if the information indicating the candidate group for specifying the primary residual motion vector indicates candidate group 0, the basic motion vector becomes the motion vector of the block, i.e., the motion vector of the current block, as long as there is no secondary residual motion vector. In other words, if the basic motion vector of the current block is the same as the motion vector of the current block, the motion information encoding unit 3310 can select candidate group 0 and include the information indicating candidate group 0 in the bit stream. If candidate group 0 is selected, the basic motion vector becomes the motion vector of the current block, so the merge mode or skip mode of the conventional HEVC can be replaced.
[0409] For the primary residual motion vector candidates included in any one candidate group, an index (or flag) indicating the transition direction is assigned. In that case, the index indicating the transition direction is also represented by a fixed-length coding method. For example, if any one candidate group includes 4 primary residual motion vector candidates, 2 bits are also required to indicate each primary residual motion vector candidate.
[0410] The motion information encoding unit 3310 can divide the primary residual motion vector candidates included in one candidate group into groups according to their positions on the coordinate plane and assign an index corresponding to the divided groups.
[0411] Referring to FIG. 26, for the primary residual motion vector candidates (1, 0), (-1, 0), (0, 1), (0, -1) corresponding to candidate group 0 of the basic motion vector 0, depending on whether they are located on the x-axis or the y-axis, an index (or flag) of 0 or 1 is assigned as shown by reference numeral 2603. Depending on whether they are located in the + direction or the - direction, an index (or flag) of 0 or 1 is assigned as shown by reference numeral 2604.
[0412] As described above, the generation unit 3330 can encode at least one of the indexes indicating the transition direction of the primary residual motion vector by using a context model. For example, the generation unit 3330 divides the four primary residual motion vector candidates included in one candidate group into two groups, each including two candidates located on the x-axis and two candidates located on the y-axis, and can encode the index 2603 indicating whether it is a candidate located on the x-axis or a candidate located on the y-axis by using a context model. If it is determined whether it is a candidate located on the x-axis or a candidate located on the y-axis, the generation unit 3330 can encode the index 2604 indicating whether it is a candidate in the + direction or a candidate in the - direction by using a context model.
[0413] In one embodiment, the motion information encoding unit 3310 can also include only candidates located at a preset point on the coordinate plane in each candidate group. For example, the motion information encoding unit 3310 can include only candidates located on the x-axis or candidates located on the y-axis in each candidate group based on information related to at least one of the previous picture, the current picture, the previous slice, the current slice, the previous block, and the current block. For example, in FIG. 26, among the candidates (1, 0), (-1, 0), (0, 1), and (0, -1) included in candidate group 0, only (1, 0) and (-1, 0) are included in candidate group 0, and only the index of reference numeral 2704 in the drawing is assigned to each candidate as an index indicating the transition direction for specifying the candidate.
[0414] When the basic motion vector candidate is a bidirectional motion vector, the motion information encoding unit 3310 can also be configured such that each primary residual motion vector candidate classified by the transition distance and the transition direction includes a primary residual motion vector candidate for the list 0 direction and a primary residual motion vector candidate for the list 1 direction. The method for determining the primary residual motion vector candidate for bidirectionality is the same as that described in connection with the video decoding apparatus 2100, and thus detailed description thereof is omitted.
[0415] In one embodiment, if the basic motion vector of the current block is determined, the video encoding method determines the usage direction of the basic motion vector, and the generation unit 3330 can include information indicating the usage direction of the basic motion vector in the bitstream.
[0416] The basic motion vector corresponds to a motion vector for the list 0 direction, a motion vector for the list 1 direction, or a motion vector for bidirectionality. However, the video encoding method can determine the usage direction of the basic motion vector so as to increase the encoding efficiency of the motion vector of the current block.
[0417] The information indicating the usage direction of the basic motion vector may include an index. For example, when the basic motion vector is bidirectional, a bit value of 0 indicates that the usage direction of the basic motion vector is bidirectional, a bit value of 10 indicates that the usage direction of the basic motion vector is in the list 0 direction, and a bit value of 11 can indicate that the usage direction of the basic motion vector is in the list 1 direction.
[0418] Also, for example, when the basic motion vector is a first unidirectional in the list 0 direction or the list 1 direction, a bit value of 0 indicates that the usage direction of the basic motion vector is the first unidirectional, a bit value of 10 indicates that the usage direction of the basic motion vector is a second unidirectional different from the first unidirectional, and a bit value of 11 can indicate that the usage direction of the basic motion vector is bidirectional.
[0419] The usage direction of the basic motion vector corresponding to the bit value may also be changed.
[0420] In one example, when the basic motion vector is bidirectional and the usage direction of the basic motion vector is determined to be bidirectional, the motion information encoding unit 3310 can determine a primary residual motion vector for the list 0 direction of the current block and a primary residual motion vector for the list 1 direction. Then, the generation unit 3330 can include in the bit stream information indicating the bidirectional basic motion vector, and information indicating the primary residual motion vector for the list 0 direction of the current block and the primary residual motion vector for the list 1 direction.
[0421] As another example, when the basic motion vector is bidirectional and the usage direction of the basic motion vector is determined to be bidirectional, the motion information encoding unit 3310 can determine a primary residual motion vector for the list 0 direction of the current block and a primary residual motion vector for the list 1 direction. However, the generation unit 3330 can include in the bit stream information indicating only one of the primary residual motion vector for the list 0 direction and the primary residual motion vector for the list 1 direction, and information indicating the basic motion vector.
[0422] As yet another example, when the basic motion vector is bidirectional and the usage direction of the basic motion vector is the first unidirectional direction of list 0 direction or list 1 direction, the motion information encoding unit 3310 determines a primary residual motion vector for the first unidirectional direction of the current block, and the generation unit 3330 can include information indicating the basic motion vector and information indicating the primary residual motion vector for the first unidirectional direction in the bit stream.
[0423] As yet another example, when the basic motion vector is bidirectional and the usage direction of the basic motion vector is the first unidirectional direction of list 0 direction or list 1 direction, the motion information encoding unit 3310 determines a primary residual motion vector for a second unidirectional direction different from the first unidirectional direction of the current block, and the generation unit 3330 can include information indicating the basic motion vector and information indicating the primary residual motion vector for the second unidirectional direction in the bit stream.
[0424] As yet another example, when the basic motion vector is the first unidirectional direction of list 0 direction or list 1 direction and the usage direction of the basic motion vector is a second unidirectional direction different from the first unidirectional direction, the motion information encoding unit 3310 determines a primary residual motion vector of the current block for the first unidirectional direction, and the generation unit 3330 can include information indicating the basic motion vector and information indicating the primary residual motion vector for the first unidirectional direction in the bit stream.
[0425] As yet another example, when the basic motion vector is the first unidirectional direction of list 0 direction or list 1 direction and the usage direction of the basic motion vector is bidirectional, the motion information encoding unit 3310 determines a primary residual motion vector of the current block for the first unidirectional direction, and the generation unit 3330 can include information indicating the basic motion vector and information indicating the primary residual motion vector for the first unidirectional direction in the bit stream.
[0426] On the one hand, in one embodiment, the motion information encoding unit 3310 can determine whether to apply multi-path coding to the current block. After encoding the current block by two different encoding modes, the motion information encoding unit 3310 can select any one of the encoding modes based on the cost. The generation unit 3330 can include in the bit stream information indicating whether the current block is multi-path coded and, when multi-path coding is applied, information about the encoding mode applied to the current block.
[0427] The above two different encoding modes may include any one of the AMVP mode, the merge mode, and the skip mode and a preset mode according to the present disclosure.
[0428] In one embodiment, the motion information encoding unit 3310 can determine how to divide the parent block and divide the parent block into a first child block corresponding to the current block and a second child block adjacent thereto. According to an embodiment, the motion information encoding unit 3310 can also determine how to divide the parent block and divide the parent block into a first child block corresponding to the current block, a second child block adjacent thereto, and a third child block.
[0429] The motion information encoding unit 3310 encodes the first child block according to the above preset mode, and the generation unit 3330 can generate a bit stream including the information generated as the encoding result related to the first child block.
[0430] Regarding the encoding method of the second sub-block, as an example, the motion information encoding unit 3310 can also encode the second sub-block according to the preset mode according to the present disclosure, similar to the first sub-block. In that case, the basic motion vector candidate determined for the parent block and the primary residual motion vector candidate can be used identically for the first sub-block and the second sub-block as well. In other words, the basic motion vector candidate and the primary residual motion vector candidate are determined at the parent block level. Among the basic motion vector candidates, the basic motion vector of the first sub-block and the basic motion vector of the second sub-block are determined independently. Among the primary residual motion vector candidates, the primary residual motion vector of the first sub-block and the primary residual motion vector of the second sub-block are also determined independently.
[0431] In another example, the motion information encoding unit 3310 can determine the motion vector determined for the first sub-block as the basic motion vector of the second sub-block and determine the primary residual motion vector of the second sub-block among the primary residual motion vector candidates. The generation unit 3330 can include information indicating the primary residual motion vector of the second sub-block in the bit stream instead of including information indicating the basic motion vector of the second sub-block.
[0432] As yet another example, at least one of the basic motion vector, transition distance, and transition direction determined in relation to the first sub-block can also be applied to the second sub-block. In that case, the motion information encoding unit 3310 can also encode the motion vector of the second sub-block by using at least one of the basic motion vector, transition distance, and transition direction determined in relation to the first sub-block.
[0433] Also, the motion information encoding unit 3310 can determine only the secondary residual motion vector related to any one of the first sub-block and the second sub-block, and the generation unit 3330 can also include information indicating the determined secondary residual motion vector in the bit stream.
[0434] In one embodiment, the motion information encoding unit 3310 can encode the first sub-block in a preset mode according to the present disclosure, and can also encode the second sub-block in a mode different from the mode applied to the first sub-block.
[0435] FIG. 34 is a flowchart for explaining a video encoding method according to one embodiment.
[0436] In step S3410, the video encoding apparatus 3300 determines the basic motion vector of the current block. The video encoding apparatus 3300 can determine any one of the basic motion vector candidates as the basic motion vector of the current block among at least one basic motion vector candidate.
[0437] In step S3420, the video encoding apparatus 3300 determines the primary residual motion vector of the current block.
[0438] The video encoding apparatus 3300 can determine a primary residual motion vector candidate for each of at least one basic motion vector candidate, and determine the primary residual motion vector of the current block among the primary residual motion vector candidates.
[0439] The video encoding apparatus 3300 can also determine, as the primary residual motion vector of the current block, the primary residual motion vector candidate having the value most similar to the value obtained by subtracting the basic motion vector of the current block from the motion vector of the current block.
[0440] In step S3430, the video encoding apparatus 3300 generates a bitstream generated as an encoding result related to the current block.
[0441] The bitstream may include information indicating at least one of whether a preset mode has been applied to the current block, the basic motion vector of the current block, the primary residual motion vector of the current block, the priority of the transition distance for classifying the primary residual motion vector candidates, and the priority of the transition direction for classifying the primary residual motion vector candidates. The generation unit 3330 can include the information in a bitstream corresponding to at least one level among the encoding unit level, the conversion unit level, the maximum encoding unit level, the slice unit level, and the picture unit level.
[0442] On the other hand, the above-described embodiments of the present disclosure can be created as a program executable by a computer, and the created program can be stored in a medium.
[0443] The medium continuously stores a program executable by a computer or temporarily stores it for execution or download. The medium is also various recording or storage means in a form in which a single or several pieces of hardware are combined, but is not limited to a medium directly connected to a certain computer system and may be distributed on a network. Examples of the medium include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROM (compact disc read only memory) and DVD (digital versatile disc); magneto-optical media such as floptical disks; and those including ROM (read-only memory), RAM (random access memory), flash memory, etc., and configured to store program instruction words. Further, as examples of other media, there can be mentioned recording media or recording media managed by an app store that distributes an application, and sites, servers, etc. that supply or distribute various other software.
[0444] As described above, the technical idea of the present disclosure has been described in detail with reference to preferred embodiments. However, the technical idea of the present disclosure is not limited to the foregoing embodiments, and various modifications and changes can be made by those skilled in the art within the scope of the technical idea of the present disclosure.
[0445] (Appendix 1) In a method for decoding motion information, determining a basic motion vector of a current block; determining a primary residual motion vector related to the current block based on information obtained from a bit stream among at least one primary residual motion vector candidate classified by a transition distance and a transition direction; applying the primary residual motion vector to the basic motion vector to determine a motion vector of the current block, characterized in that the method for decoding motion information includes the above steps. (Appendix 2) The step of determining the motion vector of the current block further includes obtaining information indicating a secondary residual motion vector related to the current block from a bit stream; applying a secondary residual motion vector determined based on the information indicating the secondary residual motion vector to a basic motion vector changed by applying the primary residual motion vector to determine a motion vector of the current block, characterized in that the method for decoding motion information according to Appendix 1 further includes the above steps. (Appendix 3) The method for decoding motion information further includes obtaining an index indicating at least one of a transition distance and a transition direction of the primary residual motion vector from a bit stream, wherein the step of determining the primary residual motion vector includes determining, as a primary residual motion vector related to the current block, a primary residual motion vector candidate corresponding to the obtained index among the at least one primary residual motion vector candidate, characterized in that the method for decoding motion information according to Appendix 1 includes the above steps. (Appendix 4) The method for decoding the motion information is as follows: The method for decoding the motion information according to Supplementary Note 1, further comprising determining, as the basic motion vector of the current block, any one of at least one basic motion vector candidate. (Supplementary Note 5) The step of determining the motion vector of the current block is as follows: When the basic motion vector of the current block corresponds to a bidirectional motion vector, the prediction direction of the current block corresponds to bidirectionality, and the primary residual motion vector is determined for the first unidirectional direction, determining a primary residual motion vector for the second unidirectional direction based on the primary residual motion vector for the first unidirectional direction; Applying the primary residual motion vector for the first unidirectional direction to the basic motion vector for the first unidirectional direction to determine the motion vector for the first unidirectional direction of the current block; Applying the primary residual motion vector for the second unidirectional direction to the basic motion vector for the second unidirectional direction to determine the motion vector for the second unidirectional direction of the current block, the method for decoding the motion information according to Supplementary Note 1. (Supplementary Note 6) The step of determining the primary residual motion vector for the second unidirectional direction is as follows: Based on the positional relationship between the reference picture corresponding to the basic motion vector in the first unidirectional direction, the reference picture corresponding to the basic motion vector in the second unidirectional direction, and the current picture including the current block, determining at least one of the magnitude and sign of the component value of the primary residual motion vector for the second unidirectional direction, the method for decoding the motion information according to Supplementary Note 5. (Supplementary Note 7) The step of determining the motion vector of the current block is as follows: When the basic motion vector of the current block corresponds to a motion vector in a first single direction and the prediction direction of the current block corresponds to a second single direction different from the first single direction, determining the basic motion vector in the second single direction based on the basic motion vector in the first single direction, and determining the primary residual motion vector for the second single direction based on the primary residual motion vector for the first single direction; applying the primary residual motion vector for the second single direction to the basic motion vector in the second single direction to determine the motion vector of the current block, the method for decoding motion information according to appended claim 1, characterized by comprising the steps of. (Appended claim 8) The step of determining the motion vector of the current block is When the basic motion vector of the current block corresponds to a motion vector in a first single direction and the prediction direction of the current block corresponds to bidirectional, determining the basic motion vector in a second single direction based on the basic motion vector in the first single direction, and determining the primary residual motion vector for the second single direction based on the primary residual motion vector for the first single direction; applying the primary residual motion vector for the first single direction to the basic motion vector in the first single direction to determine the motion vector of the current block in the first single direction; applying the primary residual motion vector for the second single direction to the basic motion vector in the second single direction to determine the motion vector of the current block in the second single direction, the method for decoding motion information according to appended claim 1, characterized by comprising the steps of. (Appended claim 9) The method for decoding motion information is further comprising the step of entropy decoding at least a part of the index indicating the primary residual motion vector from the bit stream by a context model, the method for decoding motion information according to appended claim 1, characterized by this. (Appended claim 10) The method for decoding motion information is further comprising the step of determining at least one primary residual motion vector candidate related to each of at least one basic motion vector candidate, Among the at least one primary residual motion vector candidate, the primary residual motion vector candidate determined corresponding to the bidirectional basic motion vector candidate includes a primary residual motion vector candidate in the list 0 direction including values of the same sign or opposite signs, and a primary residual motion vector candidate in the list 1 direction, and is characterized in that it is the motion information decoding method according to appended note 1. (Appended note 11) Among the primary residual motion vector candidate in the list 0 direction and the primary residual motion vector candidate in the list 1 direction, the magnitude of at least one value is characterized in that it is scaled in consideration of the distances among a first reference picture corresponding to a first unidirectional basic motion vector candidate, a current picture including the current block, and a second reference picture corresponding to the second unidirectional basic motion vector candidate, and is the motion information decoding method according to appended note 10. (Appended note 12) The motion information decoding method when the current block corresponds to a first child block divided from a parent block, determining a motion vector of the current block as a basic motion vector of the second child block; applying a primary residual motion vector determined for the second child block to the basic motion vector of the second child block to determine a motion vector of the second child block, and is further characterized in that it is the motion information decoding method according to appended note 1. (Appended note 13) The motion information decoding method when the current block corresponds to a first child block divided from a parent block, further includes applying at least one of information indicating a basic motion vector obtained in relation with the current block, information indicating a transition distance, and information indicating a transition direction to the second child block, and is characterized in that it is the motion information decoding method according to appended note 1. (Appended note 14) The motion information decoding method Whether a predetermined encoding mode is applied to the current block, at least one of information indicating the basic motion vector related to the current block, the primary residual motion vector related to the current block, the priority order of the transition distance, and the priority order of the transition direction is obtained at at least one level among the conversion unit level, the encoding unit level, the maximum encoding unit level, the slice level, and the picture level. The method for decoding motion information according to Supplementary Note 1 is further characterized by including this step. (Supplementary Note 15) In a method for encoding motion information, Determining a basic motion vector of a current block; Based on the difference between the motion vector of the current block and the basic motion vector, determining a primary residual motion vector related to the current block from among at least one primary residual motion vector candidate classified by a transition distance and a transition direction; Generating a bit stream including at least one of information indicating the basic motion vector and information indicating the primary residual motion vector. The method for encoding motion information is characterized by including this step.
Claims
1. In a method for decoding motion information, parsing a displacement index and a displacement direction index from a bitstream to obtain a primary residual motion vector for a first list; if the current block is bi-predicted, scaling the primary residual motion vector based on the difference between the picture order count (POC) of the current picture and the POC of the first reference picture in the first list, and the difference between the POC of the current picture and the POC of the second reference picture in the second list to derive a secondary residual motion vector for the second list; obtaining a first motion vector for the first list using the primary residual motion vector and a first basic motion vector for the first list; obtaining a second motion vector for the second list using the secondary residual motion vector and a second basic motion vector for the second list; restoring the current block using the first motion vector, the first reference picture, the second motion vector, and the second reference picture. A method for decoding motion information, comprising the above steps.
2. In a method for encoding motion information, obtaining a primary residual motion vector for a first list using a first motion vector for the first list of the current block and a first basic motion vector for the first list; if it is determined that the current block is bi-predicted, scaling the primary residual motion vector based on the difference between the picture order count (POC) of the current picture and the POC of the first reference picture in the first list, and the difference between the POC of the current picture and the POC of the second reference picture in the second list to derive a secondary residual motion vector for the second list; generating a bitstream including a displacement index and a displacement direction index; wherein the displacement index and the displacement direction index indicate the primary residual motion vector. A method for encoding motion information.
3. A method for transmitting the bitstream generated by the encoding method according to Claim 2.
Citation Information
Patent Citations
Encoder and encoding method, and decoder and decoding method
JP2006279573A
Image encoder, image encoding method and image encoding program
JP2013034186A
Image decoding apparatus and image encoding apparatus
JP2013223049A
Motion vector coding and BI-prediction in HEVC and its extensions
WO2013138631A1
Video encoding device and video decoding device using high-precision skip encoding and method thereof
WO2016068685A1