Method for inducing prediction motion vector and apparatuses using the method
The method optimizes video encoding and decoding efficiency by constructing a candidate motion vector predictor list using spatial and temporal information from neighboring blocks, reducing complexity and enhancing the encoding process.
Patent Information
- Application Number
- JP2025132349
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2012-09-14
- Filing Date
- 2025-08-07
- Publication Date
- 2025-10-06
AI Technical Summary
Existing video compression technologies face inefficiencies in encoding and decoding processes, particularly in constructing candidate motion vector predictor lists, which affect the overall efficiency of video encoding and decoding.
A method and apparatus for constructing a candidate motion vector predictor list by determining spatial and temporal candidate predictor motion vector-related information from neighboring blocks, including availability information and specific motion vectors, and adjusting the list based on availability and uniqueness of these vectors to optimize the predictor list.
This approach reduces complexity in deriving optimal predicted motion vectors and improves encoding efficiency by optimizing the candidate motion vector list construction process.
Smart Images

Figure 2025147221000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a decoding method and apparatus, and more particularly to a method for deriving a predicted motion vector and an apparatus using the method. [Background technology]
[0002] Recently, demand for high-resolution, high-quality video, such as HD (High Definition) video and UHD (Ultra High Definition) video, is increasing in various application fields. As video data becomes higher in resolution and quality, the data volume increases relatively compared to existing video data. Therefore, when video data is transmitted using existing media such as wired or wireless broadband lines or stored using existing storage media, transmission and storage costs increase. To solve these problems that arise as video data becomes higher in resolution and quality, highly efficient video compression technology can be utilized.
[0003] There are various video compression techniques, such as inter-frame prediction techniques that predict pixel values contained in a current picture from pictures before or after the current picture, intra-frame prediction techniques that predict pixel values contained in a current picture using pixel information within the current picture, and entropy coding techniques that assign short codes to values that occur frequently and long codes to values that occur less frequently.Using these video compression techniques, video data can be effectively compressed and transmitted or stored. Summary of the Invention [Problem to be solved by the invention]
[0004] SUMMARY OF THE INVENTION An object of the present invention is to provide a method for constructing a candidate motion vector predictor list to increase video encoding / decoding efficiency.
[0005] Another object of the present invention is to provide an apparatus for performing a method for constructing a candidate motion vector predictor list to increase video encoding / decoding efficiency. [Means for solving the problem]
[0006] According to one aspect of the present invention, a method for constructing a candidate predictor motion vector list includes determining a plurality of pieces of spatial candidate predictor motion vector-related information from neighboring prediction blocks of a block to be predicted, and determining temporal candidate predictor motion vector-related information based on the plurality of pieces of spatial candidate predictor motion vector-related information. The spatial candidate predictor motion vector-related information includes spatial candidate predictor motion vector availability information indicating whether a spatial candidate predictor motion vector is induced and at least one of the spatial candidate predictor motion vectors, and the temporal candidate predictor motion vector-related information includes temporal candidate predictor motion vector availability information indicating whether a temporal candidate predictor motion vector is induced and at least one of the temporal candidate predictor motion vectors. The step of determining the plurality of pieces of spatial candidate predictor motion vector-related information from neighboring prediction blocks of the block to be predicted includes determining first spatial candidate predictor motion vector availability information and a first spatial candidate predictor motion vector, and determining second spatial candidate predictor motion vector availability information and a second spatial candidate predictor motion vector.The step of determining temporal candidate predictor motion vector associated information based on the plurality of spatial candidate predictor motion vector availability information and the plurality of spatial candidate predictor motion vectors includes: determining whether both the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector are available and the first spatial candidate predictor motion vector is different, based on the first spatial candidate predictor motion vector availability information, the second spatial candidate predictor motion vector availability information, the first spatial candidate predictor motion vector, and the second spatial candidate predictor motion vector; and determining temporal candidate predictor motion vector availability information to indicate that the temporal candidate predictor motion vector is unavailable if both the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector are available and the first spatial candidate predictor motion vector is different, wherein the temporal candidate predictor motion vector associated information is information including at least one of the temporal candidate predictor motion vector availability information and the temporal candidate predictor motion vector.The step of determining temporal candidate predictor motion vector related information based on the plurality of spatial candidate predictor motion vector availability information and the plurality of spatial candidate predictor motion vectors includes the steps of determining whether both the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector are available and the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector are different, based on the first spatial candidate predictor motion vector availability information, the second spatial candidate predictor motion vector availability information, the first spatial candidate predictor motion vector, and the second spatial candidate predictor motion vector; and determining the temporal candidate predictor motion vector-related information by performing a process of deriving the temporal candidate predictor motion vector-related information when at least one spatial candidate predictor motion vector among the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector is unavailable, or when both the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector are available and the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector are the same, wherein the temporal candidate predictor motion vector-related information is information including at least one of temporal candidate predictor motion vector availability information and temporal candidate predictor motion vectors. The candidate predictor motion vector list includes the first spatial candidate predictor motion vector if the first spatial candidate predictor motion vector is available based on the first spatial candidate predictor motion vector availability information, the second spatial candidate predictor motion vector if the second spatial candidate predictor motion vector is available based on the second spatial candidate predictor motion vector availability information, and the temporal candidate predictor motion vector if the temporal candidate predictor motion vector is available based on the temporal candidate predictor motion vector availability information, and the temporal candidate predictor motion vector related information is information including at least one of the temporal candidate predictor motion vector availability information and the temporal candidate predictor motion vector.The candidate predictor motion vector list construction method further includes a step of, when the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector constituting the candidate predictor motion vector list are the same, removing the second spatial candidate predictor motion vector from the candidate predictor motion vector list. The candidate predictor motion vector list construction method further includes a step of determining whether the number of candidate predictor motion vectors included in the candidate predictor motion vector list is smaller than a maximum number of candidate predictor motion vectors, which is the maximum number of the candidate predictor motion vectors that can be included in the candidate predictor motion vector list, and a step of adding or removing a candidate predictor motion vector to the candidate predictor motion vector list based on the determination result. The step of adding or removing candidate predictive motion vectors from the candidate predictive motion vector list based on the judgment result includes a step of adding a zero vector to the candidate predictive motion vector list if the number of candidate predictive motion vectors included in the candidate predictive motion vector list is smaller than the maximum number of candidate predictive motion vectors, and a step of removing some of the candidate predictive motion vectors from the candidate predictive motion vector list if the number of candidate predictive motion vectors included in the candidate predictive motion vector list is greater than or equal to the maximum number of candidate predictive motion vectors so that the candidate predictive motion vectors included in the candidate predictive motion vector list are equal to the maximum number of candidate predictive motion vectors.The first spatial candidate prediction motion vector availability information is information calculated through the steps of: determining whether a first motion vector exists in a first block or a second block included in a first spatial candidate prediction block group; if the first motion vector does not exist in the first block or the second block included in the first spatial candidate prediction block group, determining whether a second motion vector exists in the first block and the second block of the first spatial candidate prediction block group; if the first motion vector or the second motion vector does not exist in the first block or the second block included in the first spatial candidate prediction block group, determining whether a third motion vector exists in the first block and the second block of the first spatial candidate prediction block group; and if the first motion vector, the second motion vector, or the third motion vector does not exist in the first block or the second block included in the first spatial candidate prediction block group, determining whether a fourth motion vector exists in the first block and the second block of the first spatial candidate prediction block group.The second spatial candidate prediction motion vector availability information includes a step of determining whether a first motion vector exists in a third block, a fourth block, or a fifth block included in a second spatial candidate prediction block group; if the first motion vector does not exist in the third block, the fourth block, or the fifth block included in the second spatial candidate prediction block group, a step of determining whether a second motion vector exists in the third block, the fourth block, or the fifth block of the second spatial candidate prediction block group; and a step of determining whether a second motion vector exists in the third block, the fourth block, or the fifth block included in the second spatial candidate prediction block group. determining whether a third motion vector exists in the third block, the fourth block, or the fifth block of the second spatial candidate prediction block group when the first motion vector or the second motion vector does not exist in the block; and determining whether a fourth motion vector exists in the third block, the fourth block, or the fifth block of the second spatial candidate prediction block group when the first motion vector, the second motion vector, or the third motion vector does not exist in the third block, the fourth block, or the fifth block included in the second spatial candidate prediction block group.
[0007] According to another aspect of the present invention, a video decoding device includes an entropy decoder configured to decode information on a predicted motion vector used to perform inter prediction on a block to be predicted, among candidate predicted motion vectors included in a candidate predicted motion vector list, and a predictor configured to determine a plurality of spatial candidate predicted motion vector-related information from neighboring prediction blocks of the block to be predicted, and to determine temporal candidate predicted motion vector-related information based on the plurality of spatial candidate predicted motion vector-related information to generate the candidate predicted motion vector list. The spatial candidate predicted motion vector-related information includes spatial candidate predicted motion vector availability information and at least one of the spatial candidate predicted motion vectors, and the temporal candidate predicted motion vector-related information includes temporal candidate predicted motion vector availability information and at least one of the temporal candidate predicted motion vectors. The plurality of spatial candidate predicted motion vector-related information includes first spatial candidate predicted motion vector availability information and at least one of the first spatial candidate predicted motion vector, and second spatial candidate predicted motion vector availability information and at least one of the second spatial candidate predicted motion vector. The temporal candidate predicted motion vector related information includes at least one of temporal candidate predicted motion vector availability information and a temporal candidate predicted motion vector, and when both the first spatial candidate predicted motion vector and the second spatial candidate predicted motion vector are available and the first spatial candidate predicted motion vector and the second spatial candidate predicted motion vector are different, the temporal candidate predicted motion vector availability information is determined to indicate that the temporal candidate predicted motion vector is not available.The temporal candidate predictor motion vector-related information is determined by performing a derivation process of the temporal candidate predictor motion vector-related information when at least one spatial candidate predictor motion vector among the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector is unavailable, or when both the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector are available and the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector are the same, and the temporal candidate predictor motion vector-related information includes at least one of the temporal candidate predictor motion vector availability information and the temporal candidate predictor motion vector. The candidate predictor motion vector list includes the first spatial candidate predictor motion vector if the first spatial candidate predictor motion vector is available based on the first spatial candidate predictor motion vector availability information, the second spatial candidate predictor motion vector if the second spatial candidate predictor motion vector is available based on the second spatial candidate predictor motion vector availability information, and the temporal candidate predictor motion vector if a temporal candidate predictor motion vector is available based on the temporal candidate predictor motion vector availability information, and the temporal candidate predictor motion vector related information is information including at least one of temporal candidate predictor motion vector availability information and temporal candidate predictor motion vectors. The candidate predictor motion vector list is a list that is reconstructed by removing the second spatial candidate predictor motion vector if the first spatial candidate predictor motion vector and the second spatial candidate predictor motion vector are the same. The candidate predictor motion vector list is a list that is reconstructed by determining whether the number of candidate predictor motion vectors included in the candidate predictor motion vector list is smaller than the maximum number of candidate predictor motion vectors, which is the maximum number of candidate predictor motion vectors that can be included in the candidate predictor motion vector list, and adding or removing candidate predictor motion vectors based on the determination result.If the number of candidate predictive motion vectors included in the candidate predictive motion vector list is smaller than the maximum number of candidate predictive motion vectors, a zero vector is added to the candidate predictive motion vector list and the candidate predictive motion vector list is reconstructed. If the number of candidate predictive motion vectors included in the candidate predictive motion vector list is greater than or equal to the maximum number of candidate predictive motion vectors, some of the candidate predictive motion vectors are removed from the candidate predictive motion vector list and the candidate predictive motion vectors are reconstructed so that the maximum number of candidate predictive motion vectors are included in the candidate predictive motion vector list. [Effects of the Invention]
[0008] As described above, according to the motion vector list construction method and the device using the method according to an embodiment of the present invention, the complexity that occurs when deriving the optimal predicted motion vector can be reduced and encoding efficiency can be improved in relation to the method of constructing a candidate predicted motion vector list and calculating a predicted motion vector. [Brief explanation of the drawings]
[0009] [Figure 1] 1 is a block diagram showing a configuration of a video encoding device according to an embodiment of the present invention; [Figure 2] 1 is a block diagram showing a configuration of a video decoding device according to an embodiment of the present invention; [Figure 3] 1 is a conceptual diagram illustrating spatial candidate prediction blocks and temporal candidate prediction blocks for calculating candidate predicted motion vectors according to an embodiment of the present invention. [Figure 4] 10 is a conceptual diagram for explaining a method for classifying motion vectors of spatial candidate prediction blocks through a relationship between the motion vector of a prediction target block and the motion vectors of spatial candidate prediction blocks according to an embodiment of the present invention. FIG. [Figure 5] 10 is a flowchart illustrating a method for calculating a candidate predicted motion vector according to an embodiment of the present invention. [Figure 6]10 is a flowchart illustrating a method for calculating a candidate predicted motion vector according to an embodiment of the present invention. [Figure 7] 10 is a flowchart illustrating a method for calculating a candidate predicted motion vector according to an embodiment of the present invention. [Figure 8] 10 is a flowchart illustrating a process of calculating an additional candidate predicted motion vector according to an embodiment of the present invention. [Figure 9] 10 is a flowchart illustrating a method for calculating an additional candidate predicted motion vector according to another embodiment of the present invention. [Figure 10] 1 is a flowchart illustrating a method for calculating a predicted motion vector according to an embodiment of the present invention. [Figure 11] 1 is a flowchart illustrating a method for calculating a predicted motion vector according to an embodiment of the present invention. [Figure 12] 1 is a flowchart illustrating a motion vector predictor calculation method according to an embodiment of the present invention. [Figure 13] 10 is a flowchart illustrating a method for calculating a predicted motion vector according to another embodiment of the present invention. [Figure 14] 10 is a flowchart illustrating a method for calculating a candidate predicted motion vector according to an embodiment of the present invention. [Figure 15] FIG. 2 is a conceptual diagram illustrating a method for calculating a temporal candidate predicted motion vector according to an embodiment of the present invention. [Figure 16] FIG. 1 is a conceptual diagram illustrating a method for calculating a candidate predicted motion vector list according to an embodiment of the present invention. [Figure 17] FIG. 10 is a conceptual diagram illustrating removing the same candidate predicted motion vector from a candidate predicted motion vector list according to an embodiment of the present invention. [Figure 18] 1 is a conceptual diagram illustrating a method for adjusting the size of a candidate motion vector predictor list by adding and removing candidate motion vector predictors according to an embodiment of the present invention. [Figure 19] 1 is a conceptual diagram illustrating how a final motion vector predictor is determined from a candidate motion vector predictor list according to an embodiment of the present invention. [Figure 20]1 is a flowchart illustrating a method for calculating a candidate predicted motion vector list according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0010] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing the examples of this specification, if a detailed description of related known configurations or functions is deemed to obscure the gist of this specification, the detailed description will be omitted.
[0011] When a component is referred to as being "coupled" or "connected" to another component, it should be understood that the component may be directly coupled or connected to the other component, but that there may be other components in between. Furthermore, in the present invention, when a component is described as "including" a specific component, it does not exclude components other than the component, but rather means that additional components may be included within the scope of the implementation or technical idea of the present invention.
[0012] Terms such as "first" and "second" may be used to describe various components, but the components should not be limited by these terms. These terms are used only to distinguish one component from another. For example, a first component may be called a "second component," and similarly, a second component may be called a "first component," without departing from the scope of the present invention.
[0013] Furthermore, the components shown in the embodiments of the present invention are illustrated independently to show different characteristic functions, and do not mean that each component is configured as a separate hardware or software unit. That is, each component is included as a separate component for the convenience of explanation, and at least two of the components may be integrated into one component, or one component may be divided into multiple components to perform its function. Such integrated and separated embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.
[0014] In addition, some components are not essential components for performing essential functions in the present invention, but are optional components merely for improving performance. The present invention may be embodied by including only components essential for embodying the essence of the present invention, excluding components merely used for improving performance, and a structure including only essential components, excluding optional components merely used for improving performance, is also included in the scope of the present invention.
[0015] FIG. 1 is a block diagram showing the configuration of a video encoding device according to an embodiment of the present invention.
[0016] Referring to FIG. 1, the video encoding device 100 includes a motion prediction unit 111, a motion compensation unit 112, an intra prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190.
[0017] The video encoding device 100 may perform encoding on an input image in intra mode or inter mode and output a bitstream. In the intra mode, the switch 115 may be switched to intra, and in the inter mode, the switch 115 may be switched to inter. The video encoding device 100 may calculate a prediction block for an input block of the input image, and then encode a residual between the input block and the prediction block.
[0018] In the case of the intra mode, the intra prediction unit 120 can calculate a predicted block by performing spatial prediction using pixel values of previously coded blocks surrounding the current block.
[0019] In the case of inter mode, the motion prediction unit 111 may obtain a motion vector by searching for an area that best matches the input block in a reference image stored in the reference picture buffer 190 during the motion prediction process. The motion compensation unit 112 may calculate a prediction block by performing motion compensation using the motion vector.
[0020] The motion prediction unit 111 may generate the candidate prediction motion vector list based on a plurality of pieces of spatial candidate prediction motion vector-related information derived from neighboring prediction blocks of the block to be predicted and a plurality of pieces of temporal candidate prediction motion vector-related information determined based on the plurality of pieces of spatial candidate prediction motion vector-related information. A detailed method for generating a candidate prediction motion vector list will be described later in an embodiment of the present invention, and a prediction unit performing such an operation is included in an embodiment of the present invention.
[0021] The subtractor 125 may calculate a residual block based on the difference between the input block and the calculated prediction block. The transform unit 130 may output transform coefficients by performing a transform on the residual block. Herein, the transform coefficient may refer to a coefficient value calculated by performing a transform on the residual block and / or the residual signal. Hereinafter, a quantized transform coefficient level calculated by applying quantization to a transform coefficient may also be referred to as a transform coefficient.
[0022] The quantization unit 140 quantizes the input transform coefficients according to the quantization parameter and outputs quantized transform coefficient levels.
[0023] The entropy coding unit 150 can output a bit stream by performing entropy coding based on the value calculated by the quantization unit 140 or the coding parameter value calculated during the coding process.
[0024] When entropy coding is applied, fewer bits are assigned to symbols with higher occurrence probabilities and more bits are assigned to symbols with lower occurrence probabilities to represent the symbols, thereby reducing the size of the bit string for the symbols to be coded. Therefore, the compression performance of video coding can be improved through entropy coding. The entropy coding unit 150 can use coding methods such as exponential golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) for entropy coding.
[0025] The entropy coding unit 150 can code information on a predicted motion vector used to perform inter prediction on a target block to be predicted, among the candidate predicted motion vectors included in the candidate predicted motion vector list.
[0026] 1 performs inter-prediction coding, i.e., inter-frame predictive coding, so that a currently coded image needs to be decoded and stored to be used as a reference image. Therefore, the quantized coefficients are inversely quantized by an inverse quantization unit 160 and inversely transformed by an inverse transform unit 170. The inversely quantized and inversely transformed coefficients are added to a predicted block via an adder 175 to calculate a reconstructed block.
[0027] The reconstructed block passes through a filter unit 180, which may apply at least one of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstructed block or the reconstructed picture. The reconstructed block that has passed through the filter unit 180 may be stored in a reference picture buffer 190.
[0028] FIG. 2 is a block diagram showing the configuration of a video decoding device according to another embodiment of the present invention.
[0029] Referring to FIG. 2, the video decoding apparatus 200 includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra prediction unit 240, a motion compensation unit 250, an adder 255, a filter unit 260, and a reference picture buffer 270.
[0030] The video decoding apparatus 200 receives a bitstream output from an encoder and performs decoding in an intra mode or an inter mode to output a reconstructed image, i.e., a restored image. In the intra mode, a switch may be converted to intra, and in the inter mode, a switch may be converted to inter. The video decoding apparatus 200 may obtain a reconstructed residual block from the input bitstream to calculate a prediction block, and then calculate a reconstructed block, i.e., a restored block, by adding the reconstructed residual block and the prediction block.
[0031] The entropy decoding unit 210 can entropy decode the input bitstream according to a probability distribution to generate symbols including symbols in the form of quantized coefficients. The entropy decoding method is the same as the entropy encoding method described above.
[0032] When the entropy decoding method is applied, a smaller number of bits are assigned to symbols having a higher occurrence probability, and a larger number of bits are assigned to symbols having a lower occurrence probability, thereby reducing the size of the bit string for each symbol. Therefore, the entropy decoding method can improve the compression performance of video decoding.
[0033] The entropy decoding unit 210 can decode information on a predicted motion vector used to perform inter prediction on a target block to be predicted, among the candidate predicted motion vectors included in the candidate predicted motion vector list.
[0034] The quantized coefficients are inverse quantized in the inverse quantization unit 220 and inverse transformed in the inverse transform unit 230, and a reconstructed residual block can be calculated as a result of the inverse quantization / inverse transformation of the quantized coefficients.
[0035] In the case of an intra mode, the intra prediction unit 240 may calculate a predicted block by performing spatial prediction using pixel values of already decoded blocks surrounding the current block. In the case of an inter mode, the motion compensation unit 250 may calculate a predicted block by performing motion compensation using a motion vector and a reference picture stored in the reference picture buffer 270.
[0036] In the case of an inter mode, the candidate predicted motion vector list may be generated based on a plurality of pieces of spatial candidate predicted motion vector-related information derived from neighboring prediction blocks of the block to be predicted and a plurality of pieces of temporal candidate predicted motion vector-related information determined based on the plurality of pieces of spatial candidate predicted motion vector-related information. A detailed method for generating a candidate predicted motion vector list will be described in detail in the following embodiments of the present invention, and a decoding device including a prediction unit for performing such embodiments is included in the scope of the present invention.
[0037] The reconstructed residual block and the prediction block are added via an adder 255, and the added block may pass through a filter unit 260. The filter unit 260 may apply at least one of a deblocking filter, SAO, and ALF to the reconstructed block or the reconstructed picture. The filter unit 260 may output a reconstructed image, i.e., a reconstructed image. The reconstructed image may be stored in a reference picture buffer 270 and used for inter prediction.
[0038] Methods for improving the prediction performance of an encoding / decoding device include a method for increasing the accuracy of an interpolated image and a method for predicting a difference signal. Here, the difference signal is a signal indicating the difference between an original image and a predicted image. In the present invention, the term "difference signal" may be substituted for "difference signal," "residual block," or "difference block" depending on the context, and a person skilled in the art can distinguish between these terms within a scope that does not affect the idea or essence of the invention.
[0039] As described above, in the following embodiments of the present invention, for convenience of explanation, a coding unit is defined and used as a coding unit, but it can also be a unit for performing not only encoding but also decoding. Furthermore, hereinafter, a unit or a block refers to a unit of video encoding and decoding. When an image is divided into smaller units for encoding or decoding, the encoding or decoding unit refers to the divided unit, and may therefore be referred to as a macroblock, a coding unit (CU), a prediction unit (PU), a transform unit (TU), a transform block, etc. A block may be divided into smaller sub-blocks. A prediction unit is a basic block when performing prediction / compensation, and the prediction unit may be divided into multiple partitions. Multiple partitions also serve as basic blocks when performing prediction, and the partitions into which a prediction unit is divided are also referred to as prediction units.
[0040] A video encoding method and a video decoding method described below in an embodiment of the present invention may be performed by each component included in the video encoder and the video decoder detailed in Figures 1 and 2. The term "component" may refer not only to hardware but also to a software processing unit that can be executed via an algorithm.
[0041] FIG. 3 is a conceptual diagram illustrating spatial candidate prediction blocks and temporal candidate prediction blocks for calculating candidate predicted motion vectors according to an embodiment of the present invention.
[0042] The position of the pixel at the top left corner of the prediction target block is defined as (xP, yP), the width of the prediction target block is defined as nPSW, and the height of the prediction target block is defined as nPSH. MinPuSize can indicate the size of the smallest prediction block.
[0043] In the following embodiment of the present invention, the spatially neighboring prediction blocks of the current block are defined as follows: a block including pixels at (xP-1, yP+nPSH) is referred to as the first left block (A0 block) 300, and a block including pixels at (xP-1, yP+nPSH-MinPuSize) is referred to as the second left block (A1 block) 310. Also, a block including pixels at (xP+nPSW, yP-1) is referred to as the top first block (B0 block) 320, a block including pixels at (xP+nPSW-MinPuSize, yP-1) is referred to as the top second block (B1 block) 330, and a block including pixels at (xP-MinPuSize, yP-1) is referred to as the top third block (B2 block) 340.
[0044] The spatial candidate prediction blocks may include a left first block (A0) 300, a left second block (A1, 310), a top first block (B0) 320, a top second block (B1) 330, and a top third block (B2) 340. The spatial candidate prediction group may be divided into two groups, and the group including the left first block 300 and the left second block 310 may be defined as a first spatial candidate prediction group, and the group including the top first block 320, the top second block 330, and the top third block 340 may be defined as a second spatial candidate prediction group.
[0045] The temporal candidate prediction block 350 is a prediction block including a pixel at a position (xP+nPSW, yP+nPSH) in the colocated picture of the current prediction block based on a pixel position (xP, yP) in the picture including the current block to be predicted, or if a prediction block including a pixel at a position (xP+nPSW, yP+nPSH) is not available, it can be a prediction block including a pixel at a position (xP+(nPSW>>1), yP+(nPSH>>1)). The prediction block including a pixel at a position (xP+nPSW, yP+nPSH) in the colocated picture can be referred to as a first colocated block, and the prediction block including a pixel at a position (xP+(nPSW>>1), yP+(nPSH>>1)) in the colocated picture can be referred to as a second colocated block.
[0046] The positions and number of spatial candidate prediction blocks and the positions and number of temporal candidate prediction blocks disclosed in Figure 3 are arbitrary and may be changed without departing from the spirit of the present invention. In addition, the order of predicted blocks to be preferentially scanned when constructing a candidate predicted motion vector list may also be changed. That is, the positions, number, scanning order, candidate prediction groups, etc. of candidate predicted blocks used when constructing a candidate predicted motion vector list described in the following embodiments of the present invention are merely examples and may be changed without departing from the spirit of the present invention. In this case, a candidate predicted motion vector list refers to a list constructed using candidate predicted motion vectors.
[0047] FIG. 4 is a conceptual diagram illustrating a method for classifying motion vectors of spatial candidate prediction blocks based on the relationship between the motion vector of the prediction target block and the motion vector of the spatial candidate prediction block according to an embodiment of the present invention.
[0048] 4, a motion vector of a spatial candidate prediction block calculated from the same reference frame and the same reference picture list as a block to be predicted is referred to as a first motion vector 400. Referring to FIG. 4, assuming that the reference picture of a block to be predicted 450 is picture j and the reference picture list including picture j is the L0 list, the reference picture indicated by vector 400 of spatial candidate prediction block 470 is picture j and the reference picture list including picture j is the L0 list, so the motion vector of spatial candidate prediction block 470 and the motion vector of the block to be predicted have the same reference picture and the same reference picture list. In this way, a motion vector calculated from the same reference frame and the same list as a block to be predicted is defined as a first motion vector 400.
[0049] The motion vector of the spatial candidate prediction block 470, which has the same reference frame as the block to be predicted 450 but is calculated from a different reference picture list, is referred to as the second motion vector 410. Assuming that the reference picture of the block to be predicted 450 is picture j and the reference picture list containing picture j is the L0 list, the reference picture indicated by the vector of the spatial candidate prediction block 470 is picture j and the reference picture list containing picture j is the L1 list. Therefore, the motion vector 410 of the spatial candidate prediction block and the motion vector of the block to be predicted have the same reference picture but different reference picture lists. Thus, the motion vector calculated from the same reference frame as the block to be predicted but different lists is defined as the second motion vector 410.
[0050] A motion vector of a spatial candidate prediction block having a different reference frame from the block to be predicted and calculated from the same reference picture list is referred to as a third motion vector 420. Assuming that the reference picture of the block to be predicted 450 is j picture and the reference picture list including j picture is the L0 list, the reference picture indicated by the vector 420 of the spatial candidate prediction block 470 is i picture and the reference picture list including i picture is the L0 list. Therefore, the motion vector of the spatial candidate prediction block and the motion vector of the block to be predicted have different reference pictures but the same reference picture list. Thus, a motion vector calculated from a different reference frame but the same list as the block to be predicted 450 is defined as a third motion vector 420. Because the third motion vector 420 and the block to be predicted have different reference pictures, when used, the motion vector of the spatial candidate prediction block can be scaled based on the reference picture of the block to be predicted and included in the candidate prediction motion vector list.
[0051] The motion vector of the spatial candidate prediction block 470, which has a different reference frame and is calculated from a different reference picture list than the block to be predicted 450, is referred to as the fourth motion vector 430. Assuming that the reference picture of the block to be predicted 450 is picture j and the reference picture list including picture j is the L0 list, the reference picture indicated by vector 430 of the spatial candidate prediction block 470 is picture m and the reference picture list including picture m is the L1 list. Therefore, the motion vector of the spatial candidate prediction block and the motion vector of the block to be predicted have different reference pictures and different reference picture lists. Thus, the motion vector calculated from a different reference frame and a different reference picture list than the block to be predicted is defined as the fourth motion vector 430. Because the fourth motion vector 430 also has a different reference picture than the block to be predicted 450, when using the motion vector of the spatial candidate prediction block, scaling can be performed based on the reference picture of the block to be predicted before being included in the candidate prediction motion vector list.
[0052] The motion vectors of the spatial candidate prediction blocks can be classified into the first to fourth motion vectors as described above according to the reference frame and reference picture list of the block to be predicted. The first and second motion vectors can be used without scaling and are defined as non-scaling motion vectors, while the third and fourth motion vectors can be used without scaling and are defined as scaling motion vectors.
[0053] The method of classifying the motion vectors of spatial candidate prediction blocks into the first to fourth motion vectors can be used when determining which motion vector is to be preferentially used as the candidate prediction motion vector among the motion vectors of spatial candidate prediction blocks described in the embodiments of the present invention below.
[0054] Hereinafter, in an embodiment of the present invention, a motion vector selected as the optimum motion vector among candidate predicted motion vectors such as the first to fourth motion vectors may be defined as a predicted motion vector.
[0055] FIG. 5 is a flowchart illustrating a method for calculating a candidate predicted motion vector according to an embodiment of the present invention.
[0056] The candidate predicted motion vector includes at least one of a spatial candidate predicted motion vector and a temporal candidate predicted motion vector.
[0057] In a candidate predictor motion vector calculation method according to an embodiment of the present invention, when deriving a candidate predictor motion vector, the derivation process can be performed in parallel. For example, when deriving a candidate predictor motion vector, if one candidate predictor motion vector is derived from each of two spatial candidate prediction groups (a first spatial candidate prediction group and a second spatial candidate prediction group) and one candidate predictor motion vector is derived from a temporal candidate prediction block, operations of calculating candidate predictor motion vectors from the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block can be performed in parallel. Performing the candidate predictor motion vector derivation process in parallel means that the complexity of the candidate predictor motion vector derivation process can be reduced.
[0058] Referring to Figure 5, a step of calculating a first spatial candidate prediction motion vector from a first spatial candidate prediction group (step S500), a step of calculating a spatial candidate prediction motion vector from a second spatial candidate prediction group (step S520), and a step of calculating a temporal candidate prediction motion vector from a temporal candidate prediction block (step S540) are executed in parallel.
[0059] The steps for calculating candidate predicted motion vectors performed in parallel in Fig. 5 are optional, and other methods can be used as long as they do not deviate from the essence of the present invention, that is, deriving candidate predicted motion vectors in parallel. For example, the step of calculating candidate predicted motion vectors from temporal candidate prediction blocks can be removed, and only the step of calculating candidate predicted motion vectors from the first spatial candidate prediction group and the step of calculating candidate predicted motion vectors from the second spatial candidate prediction group can be performed in parallel.
[0060] In a method for deriving a candidate predicted motion vector according to an embodiment of the present invention,
[0061] A) A method of using only non-scaling motion vectors (first motion vectors or second motion vectors), which are motion vector predictors that do not perform scaling, as candidate motion vector predictors.
[0062] B) When a non-scaling motion vector (first motion vector or second motion vector) does not exist, a third motion vector or a fourth motion vector that does not perform scaling is used as a candidate predicted motion vector.
[0063] The candidate predicted motion vector can be calculated via
[0064] FIG. 6 is a flowchart illustrating a method for calculating a candidate predicted motion vector according to another embodiment of the present invention.
[0065] Referring to FIG. 6, it is determined sequentially from the first left block to the second left block whether a non-scaling motion vector (first motion vector or second motion vector) exists (step S600).
[0066] As described above, the first motion vector and the second motion vector have the same reference picture index as the block to be predicted, and refer to non-scaling candidate predicted motion vectors for which scaling does not need to be performed.
[0067] In step S600, for example, it is possible to determine whether or not a candidate predicted motion vector exists in the following order.
[0068] (1) Determine whether a non-scaling candidate predictive motion vector exists in the first block on the left, and if a non-scaling candidate predictive motion vector exists in the first block on the left, determine the non-scaling candidate predictive motion vector as the candidate predictive motion vector.
[0069] (2) If there is no non-scaling candidate predictive motion vector in the first block on the left side, it is determined whether there is a non-scaling candidate predictive motion vector in the second block on the left side. If there is a non-scaling candidate predictive motion vector in the second block on the left side, the non-scaling candidate predictive motion vector is determined as a candidate predictive motion vector.
[0070] (3) If there is no non-scaling candidate predictor motion vector in the second left block, no candidate predictor motion vector is calculated from the first spatial candidate prediction group (first left block and second left block).
[0071] In another embodiment, in step S600, it may be determined whether or not a candidate predicted motion vector exists in the following order.
[0072] (1) Determine whether or not a first motion vector exists in the first block on the left side, and if a first motion vector exists in the first block on the left side, determine the corresponding vector as a candidate predicted motion vector.
[0073] (2) If the first motion vector does not exist in the first block on the left, determine whether the first motion vector exists in the second block on the left, and if the first motion vector exists in the second block on the left, determine the corresponding vector as a candidate predicted motion vector.
[0074] (3) If the first motion vector does not exist in the second block on the left, determine whether the second motion vector exists in the first block on the left, and if the second motion vector exists in the first block on the left, determine the corresponding vector as the candidate predicted motion vector.
[0075] (4) If the first block on the left does not have a second motion vector, determine whether the second block on the left has a second motion vector, and if the second block on the left has a second motion vector, determine the corresponding vector as a candidate predicted motion vector.
[0076] The above order is merely an example of a method for calculating a non-scaling candidate prediction motion vector from the first spatial candidate prediction group, and it is also possible to calculate a non-scaling candidate prediction motion vector from the first spatial candidate prediction group via other orders.
[0077] As described above, if the result of determining through step S600 is that there is no non-scaling candidate predicted motion vector, no candidate predicted motion vector is calculated from the first spatial candidate predicted group (first block on the left and second block on the left).
[0078] If a non-scaling candidate predicted motion vector is present through the method of calculating a non-scaling candidate predicted motion vector from the first spatial candidate predicted group, the first spatial candidate predicted group availability information (e.g., availableFlagLXY) may be set to 1 to indicate the presence of a candidate predicted motion vector in the first spatial candidate predicted group. 1 is an arbitrary binary number for indicating the presence or absence of a candidate predicted motion vector, and the same meaning may be conveyed through other binary codes. In embodiments of the present invention, the binary numbers 1 and 0 representing the content of predetermined information are arbitrary, and the corresponding information may be expressed based on codes calculated using other binary encoding methods or other encoding methods.
[0079] In another embodiment, if there is no non-scaling candidate predicted motion vector calculated through step S600, it is sequentially determined whether a scaling motion vector (third motion vector or fourth motion vector) exists in the first left block and the second left block (step S610).
[0080] For example, in step S610, it can be determined whether or not a scaling motion vector exists through the following steps.
[0081] (1) After sequentially determining whether a third motion vector or a fourth motion vector exists in the first block on the left, if a third motion vector or a fourth motion vector exists in the first block on the left, the third motion vector or the fourth motion vector is determined as a candidate predicted motion vector without scaling.
[0082] (2) If the third motion vector or the fourth motion vector does not exist in the first block on the left, it is determined sequentially whether the third motion vector through the fourth motion vector exist in the second block on the left, and if the third motion vector or the fourth motion vector exists in the second block on the left, the third motion vector or the fourth motion vector is determined as the candidate predicted motion vector without scaling.
[0083] That is, if there is no non-scaling candidate predictive motion vector in the first spatial candidate predictive group, a scaling candidate predictive motion vector (third motion vector or fourth motion vector) can be calculated from the first spatial candidate predictive group (first block on the left and second block on the left), and a motion vector that does not perform scaling can be calculated as a candidate predictive motion vector.
[0084] As a method of sequentially determining whether a scaling candidate predicted motion vector (third motion vector or fourth motion vector) exists in the first left block and the second left block in step S610, various methods can be used, such as the method of calculating a scaling motion vector (first motion vector or fourth motion vector) from the first left block and the second left block described above, and such various embodiments are also included in the scope of the present invention.
[0085] If a motion vector that satisfies the condition exists through step S600 or steps S600 to S610, the first spatial candidate prediction group availability information is set to 1, and the subsequent motion vector existence determination procedure is not performed.
[0086] In the second spatial candidate prediction group, a candidate predicted motion vector can be calculated in a similar manner.
[0087] It is determined in turn whether or not a non-scaling motion vector exists for the top first block, top second block, and top third block (step S620).
[0088] As described above, step S620 of calculating a candidate predicted motion vector from the second spatial candidate prediction group can be performed in parallel with at least one of step S600 or step S610 of calculating a candidate predicted motion vector from the first spatial candidate prediction group.
[0089] For example, similar to the method detailed in step S600, in step S620, it is determined whether a first motion vector exists in the order from the top-most first block to the top-most third block, and if a first motion vector does not exist in the order from the top-most first block to the top-most third block, it is determined whether a second motion vector exists in the order from the top-most first block to the top-most third block, or it is determined whether a first motion vector or a second motion vector exists in the top-most first block, then it is determined whether a first motion vector or a second motion vector exists in the top-most second block, and a spatial candidate predicted motion vector can be calculated through a method of determining whether a first motion vector or a second motion vector exists in the top-most third block.
[0090] The determination procedure of step S620, like step S600, can be performed in various ways, and such various determination procedures are within the scope of the present invention.
[0091] If there is a candidate predicted motion vector that meets the conditions in the first to third uppermost blocks based on the sequential determination procedure of step S620, the subsequent determination procedures are not performed. The calculated motion vector can be included in the candidate predicted motion vector list, and the second spatial candidate prediction group availability information can be set to 1 to indicate that a candidate predicted motion vector exists in the second spatial candidate prediction group.
[0092] Similar to step S600, if there is no first or second motion vector that is a non-scaling candidate predictor motion vector in the top first block to the top third block via step S620, no candidate predictor motion vector is calculated from the second spatial candidate predictor group.
[0093] In another embodiment, if a result of determining whether a non-scaling motion vector exists in the top first block, the top second block, and the top third block through step S620 shows that a non-scaling motion vector does not exist, it is sequentially determined whether a scaling motion vector (third motion vector and fourth motion vector) exists in the top first block, the top second block, and the top third block (step S630).
[0094] If, as a result of sequentially determining whether a first motion vector or a second motion vector exists in the order from the top first block to the top third block through step S620, a vector that meets the conditions cannot be found, a candidate predicted motion vector can be calculated through step S630.
[0095] If it is determined through step S630 that a third motion vector or a fourth motion vector exists in at least one of the top first block, the top second block, and the top third block, scaling may not be performed on the corresponding vector, and the third and fourth motion vectors that do not undergo scaling may be included in the candidate predicted motion vector list.
[0096] The procedure of determining whether a third or fourth motion vector exists in at least one of the top first block, the top second block, and the top third block can be performed using various determination methods, such as a method of calculating a motion vector from a first spatial candidate prediction group.
[0097] If a motion vector that satisfies the conditions exists through steps S620 and S630, one candidate predicted motion vector can be calculated from the second spatial candidate prediction group.
[0098] It is determined whether or not a candidate predicted motion vector exists in the temporal candidate predicted block (colocated block) (step S640).
[0099] Step S640 of determining whether a candidate predictor motion vector exists in the temporal candidate predictor block can be performed in parallel with step S600 or S610 of calculating a candidate predictor motion vector from the first spatial candidate predictor group and step S620 or S630 of calculating a candidate predictor motion vector from the second spatial candidate predictor group.
[0100] As described above, the temporal candidate prediction block can be divided into a first colocated block and a second colocated block, and after determining whether the first colocated block is available, if the first colocated block is not available, the second colocated block can be selected as the colocated block.
[0101] A colocated picture including a temporal candidate prediction block can be one of the reference pictures in the reference picture list of the current picture according to predetermined information. Furthermore, various methods can be used to calculate a colocated picture including a temporal candidate prediction block. A temporal candidate prediction block using two reference picture lists can use only a motion vector present in one list preferentially according to predetermined flag information as a candidate prediction motion vector. When the distance between the current picture and the reference picture of the current picture is different from the distance between a picture including the temporal candidate prediction block and the reference picture of the temporal candidate prediction block, scaling can be performed on the candidate prediction motion vector calculated from the temporal candidate prediction block.
[0102] According to an embodiment of the present invention, scaling is not performed on a temporal candidate prediction block (colocated block). For example, if it is necessary to reduce the computational complexity, scaling is not performed on the temporal candidate prediction block, or scaling is not performed on the temporal candidate prediction block by setting flag information to not perform adaptive scaling on the motion vector of the colocated block.
[0103] If a candidate predicted motion vector calculated from the temporal candidate predicted block can be calculated, the temporal candidate predicted block availability information can be set to 1.
[0104] That is, in an embodiment of the present invention, by performing in parallel the procedures for determining whether there is a candidate predictor motion vector available in the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block, it is possible to eliminate the dependency that occurs when calculating a candidate predictor motion vector from the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block.
[0105] In addition, when determining in parallel whether a candidate predictive motion vector is available in the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block, a determination is made in parallel only as to whether a candidate predictive motion vector is available in the first spatial candidate prediction group and the second spatial candidate prediction group, and the procedure of determining whether a candidate predictive motion vector is available in the temporal candidate prediction block is executed subordinately. Similarly, when calculating candidate predictive motion vectors from the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block, it is also possible to execute the process of calculating candidate predictive motion vectors in parallel only in at least two groups.
[0106] If there is a motion vector that can be calculated from the first spatial candidate prediction group, the second spatial candidate prediction group, or the temporal candidate prediction block through the above process, the availability information flag (availableFlagLXY or availableFlagCol) can be used to indicate that there is an available candidate prediction motion vector.
[0107] As described above, when calculating a candidate prediction motion vector, the number and positions of blocks included in the first spatial candidate prediction group, the number and positions of blocks included in the second spatial candidate prediction group, and the number and positions of temporal candidate prediction blocks are arbitrary, and the number and positions of blocks included in the first spatial candidate prediction group and the second spatial candidate prediction group may vary, and such embodiments are also included in the scope of the present invention.
[0108] FIG. 7 is a flowchart illustrating a method for calculating a candidate predicted motion vector according to another embodiment of the present invention.
[0109] According to an embodiment of the present invention, when deriving candidate prediction motion vectors from the first spatial candidate prediction group and the second spatial candidate prediction group, scaling is performed individually regardless of whether scaling has been performed on motion vectors calculated from other candidate prediction blocks, thereby making it possible to derive candidate prediction motion vectors in parallel.
[0110] Derive a candidate predictor motion vector from the first spatial candidate predictor group (first block on the left, second block on the left).
[0111] To derive a candidate predicted motion vector from the first spatial candidate predicted group, it can be determined whether a non-scaling motion vector (first motion vector or second motion vector) exists in the first spatial candidate predicted group (step S700).
[0112] The method detailed in step S600 can be used to determine whether a non-scaling motion vector (first motion vector or second motion vector) exists in the first spatial candidate prediction group.
[0113] It can be determined whether a scaling motion vector (third motion vector or fourth motion vector) exists in the first spatial candidate prediction group to derive a candidate prediction motion vector from the first spatial candidate prediction group (step S710).
[0114] If the determination result through step S700 indicates that a non-scaling motion vector does not exist, it is determined whether a scaling motion vector (third motion vector or fourth motion vector) exists, and the scaling motion vector (third motion vector or fourth motion vector) can be selected as a candidate predicted motion vector.
[0115] In step S710, as in step S610, it can be determined whether a third motion vector or a fourth motion vector exists in the first spatial candidate prediction group using various methods, and in step S710, unlike step S610, the third motion vector and the fourth motion vector calculated after performing scaling can be used as candidate prediction motion vectors.
[0116] A candidate predictor motion vector is derived from the second spatial candidate predictor group (top-edge first block, top-edge second block, top-edge third block).
[0117] It can be determined whether a non-scaling motion vector (the first motion vector or the second motion vector) exists in the second spatial candidate prediction group to derive a candidate prediction motion vector from the second spatial candidate prediction group (step S720).
[0118] The method detailed in step S620 can be used to determine whether a non-scaling motion vector (the first motion vector or the second motion vector) exists in the second spatial candidate prediction group.
[0119] It can be determined whether a scaling motion vector (third motion vector or fourth motion vector) exists in the second spatial candidate prediction group to derive a candidate prediction motion vector from the second spatial candidate prediction group (step S730).
[0120] If it is determined in step S720 that there is no non-scaling motion vector, a scaling motion vector (the third motion vector or the fourth motion vector) can be selected as a candidate predicted motion vector.
[0121] In step S730, as in step S630, it can be determined whether a third motion vector or a fourth motion vector exists in the second spatial candidate prediction group using various methods, and in step S730, unlike step S630, the third motion vector and the fourth motion vector calculated after performing scaling can be used as candidate prediction motion vectors.
[0122] Whether or not scaling is performed on the third and fourth motion vectors calculated from the second spatial candidate prediction group can be performed independently, regardless of whether scaling was performed to calculate the candidate prediction motion vector from the first spatial candidate prediction group.
[0123] It is determined whether or not a candidate predicted motion vector exists in the temporal candidate predicted block (colocated block) (step S740).
[0124] Step S740 of determining whether a candidate predictor motion vector exists in the temporal candidate predictor block can be performed in parallel with step S700 or S710 of calculating a candidate predictor motion vector from the first spatial candidate predictor group and step S720 or S730 of calculating a candidate predictor motion vector from the second spatial candidate predictor group.
[0125] As described above, the temporal candidate prediction block can be divided into multiple candidate prediction blocks, such as the first colocated block and the second colocated block. If one temporal candidate prediction motion vector is calculated from the temporal candidate prediction block, after determining whether the first colocated block is available, if the first colocated block is unavailable, the second colocated block can be selected as the colocated block.
[0126] According to an embodiment of the present invention, scaling may be performed independently on a candidate prediction motion vector calculated from a temporal candidate prediction block without determining whether to scale the candidate prediction motion vector calculated from the first spatial candidate prediction group and the candidate prediction motion vector calculated from the second spatial candidate prediction group. Alternatively, scaling may not be performed on a temporal candidate prediction block (colocated block) using another method. For example, if a reduction in computational complexity is required, scaling may not be performed, or scaling may not be performed on a temporal candidate prediction block by setting flag information to not adaptively scale the motion vector of the colocated block. If a motion vector that can be calculated from the first spatial candidate prediction group, the second spatial candidate prediction group, or the temporal candidate prediction block through the above process exists, the presence of an available candidate prediction motion vector may be indicated using an availability information flag (availableFlagLXY or availableFlagCol).
[0127] As with FIG. 6, as described above, when calculating a candidate prediction motion vector, the number and positions of blocks included in the first spatial candidate prediction group, the number and positions of blocks included in the second spatial candidate prediction group, and the number and positions of temporal candidate prediction blocks are arbitrary, and the number and positions of blocks included in the first spatial candidate prediction group and the second spatial candidate prediction group may vary, and such embodiments are also within the scope of the present invention.
[0128] Although it is possible to perform scaling on both the first spatial candidate prediction group and the second spatial candidate prediction group as shown in FIG. 7, according to an embodiment of the present invention, it is also possible to perform scaling on only at least one of the first spatial candidate prediction group or the second spatial candidate prediction group.
[0129] For example, scaling can be performed only on the first spatial candidate prediction group.When scaling is performed only on the first spatial candidate prediction group, similar to Fig. 7, except that in step S730 of Fig. 7, after determining whether there is a scaling motion vector (third motion vector or fourth motion vector) in the second spatial candidate prediction group to derive a candidate predicted motion vector from the second spatial candidate prediction group, scaling is not performed on the scaling motion vector (third motion vector or fourth motion vector), and the third motion vector or fourth motion vector that does not perform scaling can be used as a candidate predicted motion vector.
[0130] In a similar manner, scaling can be performed only on the second spatial candidate prediction group. In this case, in step S710, after determining whether a scaling motion vector (third motion vector or fourth motion vector) exists in the first spatial candidate prediction group to derive a candidate prediction motion vector from the first spatial candidate prediction group, scaling can be omitted for the scaling motion vector (third motion vector or fourth motion vector), and the third or fourth motion vector without scaling can be used as a candidate prediction motion vector.
[0131] As another method, it is possible to use predetermined flag information indicating whether scaling is possible or not to use only one scaling for a candidate predicted motion vector. For example, if one scaling is performed in a first spatial candidate prediction group, scaling is not performed in a second spatial candidate prediction group, and if scaling is not performed in the first spatial candidate prediction group, scaling is used in the second spatial candidate prediction group. It is possible to display whether scaling is possible or not using flag information.
[0132] FIG. 8 is a flowchart illustrating a process of calculating an additional candidate predicted motion vector according to an embodiment of the present invention.
[0133] 8, when the number of candidate predictor motion vectors currently included in the candidate predictor motion vector list is not the maximum based on the number of candidate predictor motion vectors that can be included in the candidate predictor motion vector list, a method for adding an additional candidate predictor motion vector to the candidate predictor motion vector list is disclosed. By using the method for adding the additional candidate predictor motion vector to the candidate predictor motion vector list, coding efficiency during motion vector prediction can be improved.
[0134] Referring to FIG. 8, it is determined whether the number of candidate predictor motion vectors derived from a spatial candidate predictor group or a temporal candidate predictor block is smaller than the size of the candidate predictor motion vector list (step S800).
[0135] When the number of induced candidate predictor motion vectors is equal to the number of candidate predictor motion vectors that can be included in the candidate predictor motion vector list, only the induced candidate predictor motion vectors can be included in the candidate predictor motion vector list and used as candidate predictor motion vectors for the block to be predicted. Hereinafter, in the present embodiment, the number of induced candidate predictor motion vectors refers to the number of candidate predictor motion vectors remaining after removing candidate predictor motion vectors that overlap with the candidate predictor motion vectors induced from the spatial candidate predictor group and the temporal candidate predictor block.
[0136] If the derived candidate motion vector predictor is smaller than the number of candidate motion vector predictors that can be included in the candidate motion vector predictor list, additional candidate motion vector predictors are calculated (step S810).
[0137] As a method for calculating an additional candidate predicted motion vector, various methods for calculating a candidate predicted motion vector can be used, such as a method for performing scaling, a method for using an offset, a method for using a statistical result, etc. Hereinafter, a method for calculating an additional candidate predicted motion vector in an embodiment of the present invention will be disclosed in detail.
[0138] It is determined whether the calculated additional candidate motion vector predictor overlaps with a motion vector included in the candidate motion vector predictor list (step S820).
[0139] If the calculated additional candidate predicted motion vector overlaps with a motion vector included in the candidate predicted motion vector list, a new additional candidate predicted motion vector is derived (step S810).
[0140] If the calculated additional candidate motion vector predictor does not overlap with any motion vector included in the candidate motion vector predictor list, the calculated additional candidate motion vector predictor is included in the candidate motion vector predictor list (step S830).
[0141] FIG. 9 is a flowchart illustrating a method for calculating an additional candidate predicted motion vector according to another embodiment of the present invention.
[0142] FIG. 9 shows a method using scaling among the methods for deriving additional candidate predicted motion vectors detailed in step S810.
[0143] Referring to Figure 9, a spatial candidate prediction block 900 can be assumed to be a prediction block that performs inter-frame prediction based on two motion vectors (motion vector 920 referencing the n-1 picture included in reference picture list L0 and motion vector 940 referencing the n+1 picture included in reference picture list L1).
[0144] When calculating a candidate predictor motion vector for a block to be predicted, it is assumed that the motion vector 920 of the upper predictor block that references the n-1 picture of the reference picture list L0 is removed from the candidate predictor motion vector list to remove redundancy, and only the remaining motion vector 940 that references the n+1 picture of the reference picture list L1 is used as a candidate predictor motion vector. In this case, the motion vector derived by scaling the motion vector 940 that references the reference picture list L1 that has not yet been used as an additional candidate predictor motion vector can be used as an additional candidate predictor motion vector.
[0145] That is, a motion vector that references the n+1 picture in the reference picture list L1 direction may be scaled based on the distance between the reference picture n-1 included in the L0 list of the current prediction block and the n+1 picture in the reference picture list L1 direction, and the resulting motion vector may be included in the candidate predicted motion vector list as an additional candidate predicted motion vector. Such a motion vector may be defined as a reverse scaling candidate predicted motion vector.
[0146] That is, according to an embodiment of the present invention, when a candidate predicted motion vector is derived from a predicted block that references ref_list[X], X=0 or 1, a motion vector that references ref_list[1-X] can be scaled based on the reference picture of the predicted block and derived and used as an additional candidate predicted motion vector.
[0147] According to another embodiment of the present invention, an offset-based method may be used as a method for calculating additional candidate predicted motion vectors.
[0148] For example, if one of the candidate predictor motion vectors in the candidate predictor motion vector list is {mvp_x, mvp_y}, an additional candidate predictor motion vector {mvp_x+α, mvp_y+β} can be derived by adding offsets α and β to the X and Y components of the motion vector, respectively.
[0149] In this case, the offset value can be transmitted in units of a picture, a slice, a largest coding unit (LCU), a CU, or a PU.
[0150] The offset value may be calculated based on an encoded / decoded motion vector difference (MVD) value. A high priority may be assigned to the MVD value that occurs most frequently based on a specific video unit, and the MVD value may be used as the offset value. A list with priorities in the order of the frequently occurring MVD values may be calculated. When there are multiple candidate predictor motion vectors to add, offsets may be added to candidate predictor motion vectors in the candidate predictor motion vector list in the order of priority within the list to derive new candidate predictor motion vectors.
[0151] According to another embodiment of the present invention, a statistical method may be used to calculate additional candidate predicted motion vectors.
[0152] For example, the motion vectors of the prediction blocks included in a given slice may be sorted in order of frequency of occurrence, and at least one of the sorted motion vector values may be used as a candidate prediction motion vector for the block to be predicted. In this case, in order to reduce complexity, a predetermined limit value may be set to limit the number of motion vectors whose occurrence and frequency are checked to a certain number.
[0153] In another embodiment using a statistical method to calculate an additional candidate predicted motion vector, the candidate predicted motion vector value that occurs most frequently in slices that have already been coded and decoded can be used as the additional candidate predicted motion vector.
[0154] In this case, if an error occurs in the bitstream, the motion vector of the picture or slice being coded / decoded cannot be referenced correctly in the current picture or slice. Therefore, at least one of the motion vectors with a high occurrence frequency can be coded / decoded using higher level syntax elements (picture parameter set, adaptive parameter set, slice header, etc.) in the bitstream.
[0155] FIG. 10 is a flowchart illustrating a method for calculating a motion vector predictor according to an embodiment of the present invention.
[0156] Hereinafter, a motion vector predictor may be used as a term to define a motion vector selected as the best motion vector among candidate motion vector predictors.
[0157] 10, whether the predicted motion vector of the block to be predicted is a zero vector can be determined and input via syntax element information. If information that the predicted motion vector is a zero vector is transmitted via the syntax element information, the complexity of the encoding and decoding process can be reduced by not additionally encoding and decoding candidate predicted motion vector list information and index information for determining a candidate predicted motion vector to be used as the predicted motion vector of the block to be predicted. In this case, the zero vector refers to a (0,0) vector in which both the x and y component values of the vector are 0.
[0158] It is determined whether the predicted motion vector is a zero vector (step S1000).
[0159] It is determined whether the predicted motion vector used for the block to be predicted in order to calculate the predetermined syntax element information is a zero vector.
[0160] If the predicted motion vector is a zero vector, the zero vector determination flag (zero_mvp_flag), which is a syntax element, is set to 1 (step S1010), and if the predicted motion vector is not a zero vector, the zero vector determination flag, which is a syntax element, is set to 0 (step S1020).
[0161] The zero vector determination flag (zero_mvp_flag) of a syntax element is an example of a flag indicating that the predicted motion vector used in the current prediction block is a zero vector. Information that the predicted motion vector used in the block to be predicted is a zero vector may be expressed by syntax element information in a form other than flag information.
[0162] If the predicted motion vector is not a zero vector, the index information of the predicted motion vector is coded (step S1030).
[0163] If the predicted motion vector is not a zero vector, index information for the vector used as the predicted motion vector among the candidate predicted motion vectors can be encoded based on the candidate predicted motion vector list calculated using the method for calculating the candidate predicted motion vector as detailed in Figures 3 to 8.
[0164] FIG. 11 is a flowchart illustrating a method for calculating a motion vector predictor according to another embodiment of the present invention.
[0165] FIG. 11 shows a decoding method based on the coding method of the predicted motion vector detailed in FIG.
[0166] Referring to FIG. 11, the zero vector determination flag information is decoded to determine whether the flag value is 1 (step S1100).
[0167] As described above, information that the predicted motion vector used in the block to be predicted is a zero vector may be expressed as syntax element information combined with other information other than flag information or as syntax element information in other forms. In addition, determining whether the flag value is 1 is optional, and it is also possible to determine whether the flag value is 0 depending on the definition of the flag.
[0168] If the zero vector determination flag information is 1, the motion vector predictor of the block to be predicted is determined to be a zero vector (Step S1110).
[0169] If the zero vector decision flag information is 0, the index information is decoded to calculate the predicted motion vector of the block to be predicted (step S1120).
[0170] The zero vector decision flag value of 0 or 1 is a value arbitrarily set to indicate whether the predicted motion vector of the block to be predicted is a zero vector or not.
[0171] When the zero vector decision flag information is 0, the index information of the motion vector predictor can be decoded to calculate the motion vector predictor of the block to be predicted.
[0172] A predicted motion vector of the current predicted block is determined based on the decoded index information.
[0173] Table 1 shows the syntax structure in which the zero vector decision flag is included.
[0174] [Table 1]
[0175] Referring to Table 1, by performing the process of decoding the index information of the candidate predicted motion vector depending on whether the zero vector determination flag is 1, the process of calculating the candidate predicted motion vector and the candidate predicted motion vector list unnecessarily during the decoding process is not selectively performed.
[0176] FIG. 12 is a flowchart showing a method for calculating a motion vector predictor according to an embodiment of the present invention.
[0177] Referring to FIG. 12, a candidate motion vector predictor list is calculated (Step S1200).
[0178] For example, to calculate the candidate predictive motion vector list, as described above, candidate predictive motion vectors are calculated from the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block. Assuming that one candidate predictive motion vector is calculated from each of them, the calculated candidate predictive motion vector can be included in the candidate predictive motion vector list and used to calculate a predictive motion vector for the block to be predicted. If the candidate predictive motion vector list includes only a certain number of candidate predictive motion vectors, if the candidate predictive motion vector list does not include the certain number of candidate predictive motion vectors, additional candidate predictive motion vectors (e.g., zero vectors, scaling vectors, etc.) can be included in the candidate predictive motion vector list. If the number of candidate predictive motion vectors calculated from the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block is greater than the number of candidate predictive motion vectors that can be included in the candidate predictive motion vector list, some of the calculated candidate predictive motion vectors can be removed and used.
[0179] A motion vector predictor for the prediction block is derived from the candidate motion vector predictor list (Step S1210).
[0180] In the method for calculating a motion vector predictor according to an embodiment of the present invention, a motion vector predictor can be determined from a list of candidate motion vector predictors without using index information for the candidate motion vector predictor. Since the encoder does not need to transmit index information for the candidate motion vector predictor to the decoder, bits required for encoding the index information can be saved, thereby improving encoding efficiency.
[0181] For example, different methods may be used to determine a motion vector predictor in the candidate motion vector predictor list itself depending on the size of the candidate motion vector predictor list, where the size of the candidate motion vector predictor list refers to the maximum number of candidate motion vector predictors that can be included in the candidate motion vector predictor list.
[0182] If the candidate motion vector predictor list size is 0, a zero vector is used as the motion vector predictor of the prediction block, and index information for determining the motion vector predictor is not additionally decoded.
[0183] When the size of the candidate motion vector predictor list is 1, the candidate motion vector predictor list contains one candidate motion vector predictor, and therefore the candidate motion vector predictor in the list can be used as the motion vector predictor of the prediction block. As in the case where the size of the candidate motion vector predictor list is 0, index information for determining the motion vector predictor is not additionally decoded.
[0184] When the size of the candidate motion vector predictor list is 2, the candidate motion vector predictor having a higher occurrence frequency in the slice to be coded / decoded among the candidate motion vector predictors included in the candidate motion vector predictor list can be guided as the motion vector predictor for decoding the block to be predicted. When guiding multiple candidate motion vector predictors, the candidate motion vector predictors are sorted in order of occurrence frequency, and the candidate motion vector with a higher occurrence frequency can be guided as the motion vector predictor for the prediction block. In this case, to reduce the complexity of calculating the occurrence frequency of the candidate motion vector predictor, the occurrence frequency can be calculated for only N candidate motion vector predictors (N is a natural number).
[0185] When the size of the candidate predictor motion vector list is 2, another example of calculating the predictor motion vector is to use the following formulas 1 and 2 to compare the sums of the absolute magnitudes in the x and y directions of each candidate predictor motion vector, and use the candidate predictor motion vector with the smaller sum of absolute values as the predictor motion vector for the prediction block.
[0186]
number
[0187]
number
[0188] When the size of the candidate motion vector predictor list is two, the following Equation 3 can be used as another example for calculating the motion vector predictor.
[0189]
number
[0190] Referring to Equation 3, to extract each component of the predicted motion vector, the x-direction component of the predicted motion vector can be used as the average value of the x-direction components of two candidate predicted motion vectors, and the y-direction component of the predicted motion vector can be used as the average value of the y-direction components of two candidate predicted motion vectors.
[0191] When the size of the candidate motion vector predictor list is two, the following Equation 4 can be used as another example for calculating the motion vector predictor.
[0192]
number
[0193] Referring to Equation 4, to extract each component of the predicted motion vector, the x-direction component of the predicted motion vector can be used as the median value between the x-direction components of two candidate predicted motion vectors and a zero vector, and the y-direction component of the predicted motion vector can be used as the median value between the y-direction components of two candidate predicted motion vectors and a zero vector.
[0194] When the size of the candidate motion vector predictor list is two, the following Equation 5 can be used as another example for calculating the motion vector predictor.
[0195]
number
[0196] Referring to Equation 5, to extract each component of the motion vector, the x-direction component of the predicted motion vector can be used as the average value of the x-direction components of two candidate predicted motion vectors and a zero vector, and the y-direction component of the predicted motion vector can be used as the average value of the y-direction components of two candidate predicted motion vectors and a zero vector.
[0197] In another embodiment for calculating a motion vector predictor when the size of the candidate motion vector predictor list is 2, when calculating the occurrence frequency used in the statistical method described above, if the N motion vectors used and two candidate motion vector predictors in the candidate motion vector predictor list that are the subject of frequency calculation are different, index information with a higher occurrence frequency can be used as the motion vector predictor of the prediction block. For example, if a candidate motion vector predictor existing at index 0 in the previous candidate motion vector predictor list was used as the motion vector predictor, the candidate motion vector predictor existing at index 0 can be used as the motion vector predictor.
[0198] When the size of the candidate motion vector predictor list is three, there are three candidate motion vector predictors in the candidate motion vector predictor list, and one of these candidate motion vector predictors can be determined as the motion vector predictor.
[0199] Equation 6 below shows a method for determining a motion vector predictor.
[0200]
number
[0201] Referring to Equation 6, in order to calculate a predicted motion vector, a predicted motion vector of a block to be predicted can be calculated based on a candidate predicted motion vector corresponding to the median value among the x-direction components of three candidate predicted motion vectors and a candidate predicted motion vector corresponding to the median value among the y-direction components of three candidate predicted motion vectors.
[0202] When the size of the candidate motion vector predictor list is three, the following Equation 7 can be used as another example for calculating the motion vector predictor.
[0203]
number
[0204] Referring to Equation 7, to calculate a predicted motion vector, a predicted motion vector of a block to be predicted can be calculated based on a candidate predicted motion vector corresponding to the average value of the x-direction components of three candidate predicted motion vectors and a candidate predicted motion vector corresponding to the average value of the y-direction components of three candidate predicted motion vectors.
[0205] Even when there are three candidate motion vector predictors in the candidate motion vector predictor list, index information is not used to calculate one motion vector predictor from the candidate motion vector predictor list.
[0206] FIG. 13 is a flowchart illustrating a method for calculating a motion vector predictor according to another embodiment of the present invention.
[0207] It may be assumed that the maximum number of candidate predictor motion vectors that can be included in the candidate predictor motion vector list is N, and that a spatial candidate predictor motion vector is first derived from a spatial candidate predictor group, and then a temporal candidate predictor motion vector is derived from a temporal candidate predictor block. According to an embodiment of the present invention, if the number of candidate predictor motion vectors derived from the spatial candidate predictor group is N and is the same as the size of the candidate predictor motion vectors that can be included in the candidate predictor motion vector list, the step of deriving a candidate predictor motion vector from the temporal candidate predictor group and the step of additionally deriving a candidate predictor motion vector are not performed.
[0208] That is, according to an embodiment of the present invention, if a motion vector required for a candidate predicted motion vector list has already been calculated, unnecessary candidate predicted motion vector derivation steps can be omitted, thereby reducing complexity in the encoding and decoding steps.
[0209] Referring to FIG. 13, it is determined whether the number of candidate motion vector predictors that can be included in the candidate motion vector predictor list is greater than the calculated number of spatial candidate motion vector predictors (step S1300).
[0210] The number of candidate predictive motion vectors that can be included in the candidate predictive motion vector list may be limited. For example, assuming that N predictive motion vectors can be included in the candidate predictive motion vector list, if the number of spatial candidate predictive motion vectors calculated from the spatial candidate predictive group is less than N, a temporal predictive motion vector can be calculated from a temporal candidate predictive block, or an additional predictive motion vector can be calculated. On the other hand, assuming that N predictive motion vectors can be included in the candidate predictive motion vector list, if the number of spatial candidate predictive motion vectors calculated from the spatial candidate predictive group is greater than or equal to N, a temporal predictive motion vector can be calculated from the temporal candidate predictive block, or a candidate predictive motion vector list can be calculated without calculating an additional predictive motion vector (step S1320).
[0211] If the number of spatial candidate prediction motion vectors calculated from the spatial candidate prediction group is less than N, a temporal candidate prediction motion vector or an additional prediction motion vector is calculated (step S1310). In this case, the additional prediction motion vector is a zero vector.
[0212] If the number of candidate predictive motion vectors that can be included in the candidate predictive motion vector list is greater than the number of calculated spatial candidate predictive motion vectors through a step of checking whether the number of candidate predictive motion vectors that can be included in the candidate predictive motion vector list is greater than the number of calculated spatial candidate predictive motion vectors, the candidate predictive motion vector calculated through step S1310 of calculating a temporal predictive motion vector or an additional predictive motion vector can be included in the candidate predictive motion vector list.
[0213] A candidate motion vector predictor list is calculated using the calculated spatial candidate motion vector predictor, temporal candidate motion vector predictor, or additional motion vector predictor (step S1320).
[0214] FIG. 14 is a flowchart illustrating a method for calculating a candidate predicted motion vector according to an embodiment of the present invention.
[0215] Referring to FIG. 14, a spatial candidate motion vector predictor is calculated (Step S1400).
[0216] A plurality of pieces of spatial candidate predicted motion vector-related information may be derived from coded / decoded blocks (or neighboring prediction blocks) located spatially in the neighborhood of the block to be predicted. The spatial candidate predicted motion vector-related information may indicate information including at least one of spatial candidate predicted motion vector availability information (availableFlagLXN) and spatial candidate predicted motion vectors (mvLXN). That is, a unit of information including both spatial candidate predicted motion vector availability information and spatial candidate predicted motion vectors may be referred to as spatial candidate predicted motion vector-related information, or one of spatial candidate predicted motion vectors or spatial candidate predicted motion vector availability information may be referred to as spatial candidate predicted motion vector-related information.
[0217] For example, as shown in Figure 3, spatial candidate prediction motion vectors may be derived from blocks corresponding to B1, which is a block adjacent to the top of a block X to be predicted, A1, which is a block adjacent to the left of the block to be predicted, B0, which is a block located at the top right corner of the block to be predicted, B2, which is a block located at the top left corner of the block to be predicted, and A0, which is a block located at the bottom left corner of the block to be predicted, and determined as spatial candidate prediction motion vectors for the block to be predicted. Up to two spatial candidate prediction motion vectors for a block to be coded / decoded may be calculated from blocks A0, A1, B0, B1, and B2 (hereinafter referred to as spatial candidate prediction blocks). Hereinafter, blocks A0, A1, B0, B1, and B2 are referred to as spatial candidate prediction blocks, and blocks A0 and A1 may be classified into a first spatial candidate prediction block group, and blocks B0, B1, and B2 may be classified into a second spatial candidate prediction group.
[0218] The spatial candidate prediction group is merely an example, and a spatial candidate prediction group may be generated using blocks at other positions, and such embodiments are also within the scope of the present invention. Hereinafter, for convenience of explanation, in the embodiments of the present invention, a spatial candidate prediction block group composed of blocks located at the above-mentioned positions will be described.
[0219] In this case, if a spatial candidate prediction motion vector is derived from a spatial candidate prediction block, availableFlagLXY is set to 1; otherwise, it is set to 0. LX in availableFlagLXY indicates a reference picture list, one of reference picture lists L0 and L1, that the block to be predicted refers to, and LX may be substituted for L0 or L1. Y in availableFlagLXY indicates a position from which the spatial candidate prediction motion vector is derived. As shown in FIG. 2, if a spatial candidate prediction motion vector is derived from a block at position A0 or A1, Y may be A, and if a spatial candidate prediction motion vector is derived from a block at position B0, B1, or B2, Y may be B. In this case, the reference picture list refers to a list including reference pictures used for inter prediction or motion compensation. Types of reference picture lists include LC (List Combined), L0 (List0), L1 (List1), etc. A reference picture refers to a picture that a specific block refers to for inter-frame prediction or motion compensation.
[0220] For example, one spatial candidate predicted motion vector can be derived from the block at position A0 or A1, and one spatial candidate predicted motion vector can be derived from the block at position B0, B1, or B2. In this case, if the block to be predicted refers to reference picture list L0, and one spatial candidate predicted motion vector is derived from the block at position A0, and one spatial candidate predicted motion vector is derived from the block at position B1, availableFlagL0A is set to 1, and availableFlagL0B is also set to 1. In other words, availableFlagLXY indicates whether a spatial candidate predicted motion vector derived from a block at a predetermined position exists when the block to be predicted refers to reference picture list LX.
[0221] Also, referring to FIG. 4, the spatial candidate predicted motion vectors that can be derived can be classified into the following four motion vectors.
[0222] (1) First motion vector: A candidate predicted motion vector derived from a block when the block exists at a predetermined position, the block is not intra-coded, and the reference image list and reference image of the block are the same as the reference image list and reference image of the block to be coded / decoded.
[0223] (2) Second motion vector: A candidate predicted motion vector derived from a block when the block exists at a predetermined position, the block is not intra-coded, the reference image list of the block is different from the reference image list of the block to be coded / decoded, but the block and the block to be coded / decoded refer to the same reference image.
[0224] (3) Third motion vector: When a block exists at a predetermined position, the block is not intra-coded, and the reference image list of the block is the same as the reference image list of the block to be coded / decoded, but the reference image of the block is different from the reference image of the block to be coded / decoded, this is a candidate predicted motion vector calculated by scaling the motion vector of the block.
[0225] (4) Fourth motion vector: When a block exists at a specified position, the block is not intra-coded, and the reference image list and reference image of the block are different from the reference image list and reference image of the block to be coded / decoded, a candidate predicted motion vector calculated by scaling the motion vector of the block.
[0226] Whether the four spatial candidate prediction motion vectors classified as above exist in the spatial candidate prediction block can be searched in the following order.
[0227] (1) First spatial candidate prediction block group
[0228] 1) Determine whether the first motion vector or the second motion vector exists in the A0 block.
[0229] 2) Determine whether the first motion vector or the second motion vector exists in the A1 block.
[0230] 3) Determine whether there is a third or fourth motion vector in the A0 block.
[0231] 4) Determine whether there is a third or fourth motion vector in the A1 block.
[0232] By sequentially performing the above steps 1) to 4), it can be determined whether a spatial candidate predicted motion vector that satisfies the conditions exists for the corresponding block. If a spatial candidate predicted motion vector that satisfies the conditions exists, the corresponding existing motion vector is derived and the following steps are not performed. For example, if a spatial candidate predicted motion vector that satisfies 1) exists, steps 2) to 4) are not performed.
[0233] If the spatial candidate prediction motion vector that satisfies the conditions through 3) and 4) is the third motion vector or the fourth motion vector, the spatial candidate prediction motion vector may be calculated through scaling. In this case, flag information indicating whether scaling is performed may be used to indicate that scaling is used. Alternatively, if block A0 is available and block A0 does not use an intra-frame prediction mode, or if block A1 is available and block A1 does not use an intra-frame prediction mode, the scaling enable / disable indication flag may be set to 1. If block A0 and block A1 are unavailable or use intra-frame prediction, for example, a spatial candidate prediction motion vector cannot be calculated from the first spatial candidate prediction block group, the scaling enable / disable indication flag may be set to 0, and two spatial candidate prediction motion vectors may be calculated from the second spatial candidate prediction block group. Hereinafter, for convenience of explanation, in the embodiments of the present invention, a case will be described in which a first spatial candidate prediction motion vector is calculated from the first spatial candidate prediction group and a second spatial candidate prediction motion vector is calculated from the second spatial candidate prediction group.
[0234] The order of calculating spatial candidate prediction motion vectors from the second spatial candidate prediction block group is as follows.
[0235] (2) Second spatial candidate prediction block group
[0236] 1) Determine whether the first motion vector or the second motion vector exists in the B0 block.
[0237] 2) Determine whether the first motion vector or the second motion vector exists in the B1 block.
[0238] 3) Determine whether the first motion vector or the second motion vector exists in the B2 block.
[0239] 4) Determine whether there is a third or fourth motion vector in the B0 block.
[0240] 5) Determine whether there is a third or fourth motion vector in the B1 block.
[0241] 6) Determine whether there is a third or fourth motion vector in block B2.
[0242] As in the case of calculating the first spatial candidate predicted motion vector, steps 1) to 6) above can be performed sequentially to determine whether a spatial candidate predicted motion vector that satisfies the conditions exists for the corresponding block. If a spatial candidate predicted motion vector that satisfies the conditions exists, the corresponding existing motion vector is derived and the next procedure is not performed.
[0243] Furthermore, up to N spatial candidate predicted motion vectors can be derived, where N is a positive constant, for example, 2.
[0244] It is determined whether the two derived spatial candidate motion vector predictors are different from each other (step S1410).
[0245] According to an embodiment of the present invention, temporal candidate predicted motion vector related information (e.g., at least one of temporal candidate predicted motion vector availability information and a temporal candidate predicted motion vector) may be determined based on spatial candidate predicted motion vector related information. That is, in step S1400, it may be determined whether to derive a temporal candidate predicted motion vector based on the derived spatial candidate predicted motion vector related information.
[0246] To determine whether two derived spatial candidate predictor motion vectors are different from each other, it is determined whether two spatial candidate predictor motion vectors can be derived. If two spatial candidate predictor motion vectors are derived, it is determined whether both availableFlagLXA and availableFlagLXB are 1 and mvLXA and mvLXB are different from each other to determine whether the derived spatial candidate predictor motion vectors are different from each other. availableFlagLXA is a flag indicating whether a first spatial candidate predictor motion vector can be calculated from a first spatial candidate prediction group, and availableFlagLXB is a flag indicating whether a second spatial candidate predictor motion vector can be calculated from a second spatial candidate prediction group. For example, if a first spatial candidate predictor motion vector can be calculated from the first spatial candidate prediction group, availableFlagLXA may be set to 1. mvLXA can be calculated as a first spatial candidate predicted motion vector when availableFlagLXA is available, and mvLXB can be calculated as a second spatial candidate predicted motion vector when availableFlagLXB is available.
[0247] Hereinafter, in an embodiment of the present invention, availableFlagLXA can be defined as the first spatial candidate predicted motion vector availability information, and availableFlagLXB can be defined as the second spatial candidate predicted motion vector availability information. Also, mvLXA can be defined as the first spatial candidate predicted motion vector, and mvLXB can be defined as the second spatial candidate predicted motion vector.
[0248] Assuming that both availableFlagLXA and availableFlagLXB are 1, mvLXA and mvLXB are different, and the maximum number of candidate predictor motion vectors that can be included in a candidate predictor motion vector list is two, the candidate predictor motion vector list can be configured using spatial candidate predictor motion vectors, so there is no need to derive additional candidate predictor motion vectors, and there is no need to derive temporal candidate predictor motion vectors, which are candidate predictor motion vectors derived from colocated blocks (temporal candidate predictor blocks). Therefore, availableFlagLXCol, which is flag information indicating whether a temporal candidate predictor motion vector is available, is set to 0, and the candidate predictor motion vector list is calculated using only the derived spatial candidate predictor motion vectors as in step S1430 described below. In other words, because the temporal candidate predictor motion vector is not derived, the complexity of the candidate predictor motion vector deriving process can be reduced.
[0249] That is, the temporal candidate predicted motion vector associated information can be determined based on the spatial candidate predicted motion vector associated information.
[0250] It is also possible to selectively determine whether mvLXA and mvLXB are different when both availableFlagLXA and availableFlagLXB are 1. For example, two conditions can be used to perform the following steps: 1) determining whether both availableFlagLXA and availableFlagLXB are 1; and 2) if both availableFlagLXA and availableFlagLXB are 1, determining whether mvLXA and mvLXB are different.
[0251] If two spatial candidate predictor motion vectors are not induced, or if the two induced spatial candidate predictor motion vectors are the same, a temporal candidate predictor motion vector is calculated from the colocated block (step S1420).
[0252] That is, in step S1420, temporal candidate predicted motion vector associated information can be determined based on spatial candidate predicted motion vector associated information.
[0253] If both availableFlagLXA and availableFlagLXB are not 1, or if mvLXA and mvLXB are the same, a temporal candidate motion vector predictor is calculated from the colocated block.
[0254] Assuming that the candidate predictor motion vector list must include two candidate predictor motion vectors, if availableFlagLXA and availableFlagLXB are not both 1, or if mvLXA and mvLXB are the same, the candidate predictor motion vector list does not include two candidate predictor motion vectors, and a temporal candidate predictor motion vector must be calculated from the colocated block.
[0255] Tables 2 and 3 below show whether a process of deriving a temporal candidate predicted motion vector can be performed depending on the result of deriving a spatial candidate predicted motion vector.
[0256] [Table 2]
[0257] [Table 3]
[0258] Referring to Tables 2 and 3, when a spatial candidate predicted motion vector is calculated, the temporal candidate predicted motion vector derivation process can be divided into four steps depending on whether the spatial candidate predicted motion vector is available or not and whether the derived spatial candidate predicted motion vector is identical. Hereinafter, the temporal candidate predicted motion vector derivation process will be described for the four steps depending on the availableFlagLXY of the spatial candidate predicted motion vector.
[0259] (1) This is the case where one spatial candidate predictor motion vector is derived, where availableFlagLXA is 1 and availableFlagLXB is 0, or availableFlagLXA is 0 and availableFlagLXB is 1. When this is 1, only one spatial candidate predictor motion vector is derived, and therefore the identity of the spatial candidate predictor motion vector cannot be determined. When the number of candidate predictor motion vectors that can be included in the candidate predictor motion vector list is two, a step of deriving a temporal candidate predictor motion vector is performed to calculate an additional candidate predictor motion vector. Then, if a temporal candidate predictor motion vector is derived, availableFlagLXCol is set to 1; otherwise, availableFlagLXCol is set to 0.
[0260] (2) This is the case where two spatial candidate predictor motion vectors are derived, and availableFlagLXA and availableFlagLXB are 1. If the derived spatial candidate predictor motion vectors have the same value, one of the spatial candidate predictor motion vectors is removed. If there is only one remaining candidate predictor motion vector, and therefore the number of candidate predictor motion vectors that can be included in the candidate predictor motion vector list is two, a step of deriving a temporal candidate predictor motion vector is performed to calculate an additional candidate predictor motion vector. If a temporal candidate predictor motion vector is derived, availableFlagLXCol can be set to 1, and if a temporal candidate predictor motion vector is not derived, availableFlagLXCol can be set to 0.
[0261] (3) This is the case where two spatial candidate predictor motion vectors are induced, and availableFlagLXA and availableFlagLXB are 1. When the values of the induced spatial candidate predictor motion vectors are different and the number of candidate predictor motion vectors that can be included in the candidate predictor motion vector list is two, there is no need to perform the step of deriving a temporal candidate predictor motion vector to calculate an additional candidate predictor motion vector, and availableFlagLXCol, which indicates the availability of a temporal candidate predictor motion vector, is set to 0. In this case, when availableFlagLXCol, which is the availability information of a temporal candidate predictor motion vector, is a predetermined value of 0, it means that a temporal candidate predictor motion vector is not induced or that a temporal candidate predictor motion vector is not available.
[0262] (4) A case where two spatial candidate predicted motion vectors are not derived, that is, when availableFlagLXA and availableFlagLXB are 0. In this case, a temporal candidate predicted motion vector can be calculated by performing a temporal candidate predicted motion vector deriving process.
[0263] That is, the maximum number of candidate predictor motion vectors that can be included in the candidate predictor motion vector list is two, and if both of the spatial candidate predictor motion vector availability information (availableFlagLXA, availableFlagLXB) are 1 and the two calculated spatial candidate predictor motion vectors are different, no temporal candidate predictor motion vector is calculated.
[0264] In the above-described embodiment of the present invention, a method for deriving temporal candidate predictor motion vector related information using both spatial candidate predictor motion vector availability information and spatial candidate predictor motion vectors as spatial candidate predictor motion vector related information has been disclosed. However, the spatial candidate predictor motion vector related information can also be used to derive temporal candidate predictor motion vector related information based on at least one of the spatial candidate predictor motion vector availability information and the spatial candidate predictor motion vectors.
[0265] For example, when a spatial candidate predicted motion vector is derived and two derived spatial candidate predicted motion vectors have different values, temporal candidate predicted motion vector related information can be derived without determining the value of the spatial candidate predicted motion vector availability information.
[0266] A method for calculating a temporal candidate motion vector predictor will be disclosed below.
[0267] FIG. 15 is a conceptual diagram illustrating a method for calculating a temporal candidate predicted motion vector according to an embodiment of the present invention.
[0268] Referring to FIG. 15, a temporal candidate motion vector predictor can be calculated from a colocated block 1520 present in a colocated picture of a block 1500 to be predicted.
[0269] When the point located at the upper left corner of the block to be predicted is (xP, yP), the width value of the block to be predicted is nPSW, and the height value of the block to be predicted is nPSH, the first colocated block 1540 may be a block including a point (xP+nPSW, yP+nPSH) located in the colocated picture, and the second colocated block 1560 may be a block including a point (xP+(nPSW>>1), yP+(nPSH>>1)) located in the colocated picture. When a temporal candidate predictor motion vector is not derived from the first colocated block (e.g., when the first colocated block is intra prediction coded), a temporal candidate predictor motion vector may be derived from the second colocated block. The number of calculated temporal candidate predictor motion vectors may be limited. For example, when only a maximum of one temporal candidate predictor motion vector is calculated, if a temporal candidate predictor motion vector is calculated from the first colocated block, a temporal candidate predictor motion vector is not calculated for the second colocated block. In the case of a temporal candidate predicted motion vector, the temporal candidate predicted motion vector value can be scaled and used based on the relationship between the distance between the picture containing the block to be predicted and the reference picture of the block to be predicted, and the distance between the picture containing the colocated block and the reference picture of the colocated block.
[0270] The value of availableFlagLXCol is determined depending on whether a temporal candidate predictor motion vector is induced. LX in availableFlagLXCol indicates which of reference picture lists L0 and L1 the current block to be coded / decoded refers to, and LX may be substituted for L0 or L1. If a temporal candidate predictor motion vector is induced, availableFlagLXCol may be set to 1, and if a temporal candidate predictor motion vector is not induced, availableFlagLXCol may be set to 0.
[0271] For example, if the block to be coded / decoded refers to the reference video list L0 and a temporal candidate predicted motion vector is derived from the H position block in Figure 15, availableFlagL0Col is set to 1, and if a temporal candidate predicted motion vector is not derived, availableFlagL0Col is set to 0.
[0272] The derived candidate motion vector predictor is added to a candidate motion vector predictor list (step S1430).
[0273] The derived spatial candidate predictor motion vectors and temporal candidate predictor motion vectors are added to the candidate predictor motion vector list in the derived order. For example, the candidate predictor motion vectors can be added to the candidate predictor motion vector list according to the values of availableFlagLXA, availableFlagLXB, and availableFlagLXCol. For example, when availableFlagLXA is 1, availableFlagLXB is 0, and availableFlagLXCol is 1, one spatial candidate predictor motion vector mvLXA and one temporal candidate predictor motion vector mvLXCol are added to the candidate predictor motion vector list. As another example, when availableFlagLXA is 1, availableFlagLXB is 1, and availableFlagLXCol is 0, two spatial candidate predictor motion vectors mvLXA and mvLXB are added to the candidate predictor motion vector list.
[0274] In another embodiment, if a spatial candidate predictor motion vector or a temporal candidate predictor motion vector is derived without making a judgment on the spatial candidate predictor motion vector availability information or the temporal candidate predictor motion vector availability information, it is also possible to add it directly to the candidate predictor motion vector list.
[0275] The size of the candidate motion vector predictor list may be limited to a predetermined size. For example, the predetermined size may be 3, and the candidate motion vector predictor added first to the candidate motion vector predictor list may have an index value of 0, and the candidate motion vector predictor added last may have an index value of 2.
[0276] That is, it may be determined whether the number of candidate predictor motion vectors included in the candidate predictor motion vector list is smaller than the maximum number of candidate predictor motion vectors that can be included in the candidate predictor motion vector list, and based on the determination result, it may be possible to add or remove candidate predictor motion vectors from the candidate predictor motion vector list.
[0277] For example, if the number of the candidate predictor motion vectors included in the candidate predictor motion vector list is smaller than the maximum number of candidate predictor motion vectors, a zero vector may be added to the candidate predictor motion vector list. Also, if the number of the candidate predictor motion vectors included in the candidate predictor motion vector list is greater than or equal to the maximum number of candidate predictor motion vectors, some of the candidate predictor motion vectors may be removed from the candidate predictor motion vector list so that the maximum number of candidate predictor motion vectors is included in the candidate predictor motion vector list.
[0278] FIG. 16 is a conceptual diagram illustrating a method for calculating a candidate predicted motion vector list according to an embodiment of the present invention.
[0279] 16, if an unscaled spatial candidate predictor motion vector (1,0) is derived from block A1, a scaled spatial candidate predictor motion vector (-2,0) is derived from block B1, and a scaled temporal candidate predictor motion vector (4,1) is derived from block H, the derived candidate predictor motion vectors are added to the candidate predictor motion vector list in the derived order as shown in the table on the right. In this case, the candidate predictor motion vector index value derived from the block at position A1 is 0, the candidate predictor motion vector index value derived from the block at position B1 is 1, and the candidate predictor motion vector index value derived from the block at position H is 2.
[0280] If, as in the case of number 3 in Table 3, the size of the candidate predictor motion vector list is 2, there are two induced spatial candidate predictor motion vectors, and the two spatial candidate predictor motion vectors are different from each other, since the size of the candidate predictor motion vector list is 2, it is possible to construct the candidate predictor motion vector list by sequentially assigning indexes to the induced spatial candidate predictor motion vectors without the need to separately derive a temporal candidate predictor motion vector.
[0281] The candidate motion vector predictor list is reconstructed by removing the same candidate motion vector predictor (Step S1440).
[0282] It is determined whether or not the same candidate predictive motion vector exists among the spatial candidate predictive motion vectors and the temporal candidate predictive motion vectors included in the candidate predictive motion vector list, and if the same candidate predictive motion vector exists, one of the same candidate predictive motion vectors is removed to reconstruct the candidate predictive motion vector list.
[0283] For example, if a first spatial candidate predictor motion vector and a second spatial candidate predictor motion vector that constitute a candidate predictor motion vector list are the same, the second spatial candidate predictor motion vector can be removed from the candidate predictor motion vector list.
[0284] FIG. 17 is a conceptual diagram illustrating removing the same candidate predicted motion vector from the candidate predicted motion vector list according to an embodiment of the present invention.
[0285] 17, when the candidate predictor motion vectors of index 0 and index 1 included in the candidate predictor motion vector list are the same vector, only the candidate predictor motion vector with the smaller index value may be retained and the remaining candidate predictor motion vectors with the same index value may be removed. The index values of candidate predictor motion vectors with index values larger than the index value of the removed candidate predictor motion vector may be changed by the number of the removed candidate predictor motion vectors.
[0286] The size of the candidate motion vector predictor list is adjusted by adding and removing candidate motion vector predictors (step S1450).
[0287] A candidate predictor motion vector can be added to or removed from the candidate predictor motion vector list to adjust the size of the candidate predictor motion vector list. When P is the number of candidate predictor motion vectors in the candidate predictor motion vector list and Q is the size of the final candidate predictor motion vector list, if P is smaller than Q, a candidate predictor motion vector can be added to the candidate predictor motion vector list, and if P is greater than Q, a candidate predictor motion vector can be removed from the candidate predictor motion vector list, so that the size of P and the size of Q are the same.
[0288] FIG. 18 is a conceptual diagram illustrating a method for adjusting the size of a candidate motion vector predictor list by adding and removing candidate motion vector predictors according to an embodiment of the present invention.
[0289] For example, assuming that the size of the candidate predictor motion vector list is 2, referring to the upper part of Figure 18, since the candidate predictor motion vector list contains one candidate predictor motion vector, the candidate predictor motion vector list can be constructed by adding a zero vector (0,0) to the candidate predictor motion vector list.
[0290] Referring to the lower part of Figure 18, since there are three candidate predictor motion vectors included in the candidate predictor motion vector list, the candidate predictor motion vector list can be constructed by removing the candidate predictor motion vector with the largest index value from the candidate predictor motion vector list.
[0291] A final motion vector predictor is determined from the candidate motion vector predictor list (step S1460).
[0292] The final predicted motion vector to be used for motion compensation is determined based on the candidate predicted motion vector list calculated through steps S1400 to S1460 and the index information of the final predicted motion vector transmitted from the encoder.
[0293] FIG. 19 is a conceptual diagram illustrating determining a final motion vector predictor from a candidate motion vector predictor list according to an embodiment of the present invention.
[0294] Referring to Figure 19, if the encoder transmits information that the candidate predictor motion vector corresponding to index 1 has been used as the final predictor motion vector, the candidate predictor motion vector (-3, 6) corresponding to index 1 in the calculated candidate predictor motion vector list can be determined as the final predictor motion vector.
[0295] FIG. 20 is a flowchart illustrating a method for calculating a candidate motion vector predictor list according to an embodiment of the present invention.
[0296] Figure 20 summarizes the method of calculating a candidate predictor motion vector list by not deriving a temporal candidate predictor motion vector when the induced spatial candidate predictor motion vectors are different from each other, and by deriving a temporal candidate predictor motion vector when the spatial candidate predictor motion vectors are the same, as described in detail in Figures 14 to 19.
[0297] 1) both first spatial candidate prediction motion vector availability information indicating whether a spatial candidate prediction motion vector exists in a first spatial candidate prediction block group (A0, A1) and second spatial candidate prediction motion vector availability information indicating whether a spatial candidate prediction motion vector exists in a second spatial candidate prediction block group (B0, B1, B2) exist;
[0298] 2) Determine whether a first spatial candidate prediction motion vector derived from the first spatial candidate prediction group and a second spatial candidate prediction motion vector derived from the second spatial candidate prediction group are different from each other (step S2000).
[0299] Step S2000, like the above-described step S1410, can derive a spatial candidate predicted motion vector based on availability information and determine whether the two induced spatial candidate predicted motion vectors are different from each other.
[0300] The availability information of the first spatial candidate predicted motion vector can be calculated through the following steps.
[0301] The first to fourth motion vectors are defined in the same way as in FIG.
[0302] (1) determining whether a first motion vector exists in a first block (A0) or a second block (A1) included in a first spatial candidate prediction block group;
[0303] (2) if the first motion vector does not exist in the first block (A0) or the second block (A1) included in the first spatial candidate prediction block group, determining whether the first block (A0) and the second block (A1) of the first spatial candidate prediction block group have a second motion vector;
[0304] (3) determining whether a third motion vector exists in the first block (A0) and the second block (A1) of the first spatial candidate prediction block group when the first motion vector or the second motion vector does not exist in the first block (A0) or the second block (A1) included in the first spatial candidate prediction block group;
[0305] (4) determining whether a fourth motion vector exists in the first block (A0) and the second block (A1) of the first spatial candidate prediction block group when the first motion vector, the second motion vector, or the third motion vector does not exist in the first block (A0) or the second block (A1) included in the first spatial candidate prediction block group;
[0306] According to an embodiment of the present invention, if the first block (A0) and the second block (A1) included in the first spatial candidate prediction block group do not exist or if the first block (A0) and the second block (A1) included in the first spatial candidate prediction block group are blocks for which intra-frame prediction has been performed, such information can be displayed using predetermined flag information. According to an embodiment of the present invention, if the first block (A0) and the second block (A1) included in the first spatial candidate prediction block group do not exist or if the first block (A0) and the second block (A1) included in the first spatial candidate prediction block group are blocks for which intra-frame prediction has been performed, and if the third block, fourth block, or fifth block in the second spatial candidate prediction block group has a first motion vector or a second motion vector, the first motion vector or the second motion vector derived from the second spatial candidate prediction block group can be used as the first spatial candidate prediction vector.
[0307] The availability information of the second spatial candidate predicted motion vector can be calculated through the following steps.
[0308] (1) determining whether a first motion vector exists in a third block (B0), a fourth block (B1), or a fifth block (B2) included in a second spatial candidate prediction block group;
[0309] (2) when the first motion vector does not exist in the third block (B0), the fourth block (B1), or the fifth block (B2) included in the second spatial candidate prediction block group, determining whether the second motion vector exists in the third block (B0), the fourth block (B1), or the fifth block (B2) of the second spatial candidate prediction block group;
[0310] (3) when the third block (B0), the fourth block (B1) or the fifth block (B2) included in the second spatial candidate prediction block group does not have the first motion vector or the second motion vector, determining whether the third block (B0), the fourth block (B1) or the fifth block (B2) of the second spatial candidate prediction block group has a third motion vector.
[0311] (4) when the third block (B0), the fourth block (B1) or the fifth block (B2) included in the second spatial candidate prediction block group does not have the first motion vector, the second motion vector or the third motion vector, determining whether the third block (B0), the fourth block (B1) or the fifth block (B2) of the second spatial candidate prediction block group has a fourth motion vector;
[0312] If the conditions disclosed in step S2000 are not met, a temporal candidate predicted motion vector is derived (step S2010).
[0313] If the conditions disclosed in step S2000 are met, two different spatial candidate predicted motion vectors exist, but if the conditions disclosed in step S2000 are not met, one or fewer spatial candidate predicted motion vectors exist, or two identical spatial candidate predicted motion vectors exist. Therefore, if the conditions disclosed in step S2000 are not met, a temporal candidate predicted motion vector can be derived.
[0314] If the condition disclosed in step S2000 is met, the temporal candidate motion vector predictor availability information is set to 0 (step S2020).
[0315] If the conditions disclosed in step S2000 are met, the temporal candidate predicted motion vector availability information, which is information indicating whether the temporal candidate predicted motion vector is available, is set to 0 without performing an operation to calculate the temporal candidate predicted motion vector.
[0316] A candidate motion vector predictor list is calculated (step S2030).
[0317] The candidate motion vector predictor list can be calculated by indexing in the following order:
[0318] 1) If the first spatial candidate predicted motion vector is available, the first spatial candidate predicted motion vector.
[0319] 2) If a second spatial candidate predicted motion vector is available, the second spatial candidate predicted motion vector.
[0320] 3) Temporal candidate predicted motion vectors, if available.
[0321] The same spatial candidate predicted motion vectors are removed (step S2040).
[0322] If the value of the first spatial candidate predictor motion vector and the value of the second spatial candidate predictor motion vector are the same, the value of the second spatial candidate predictor motion vector may be removed from the candidate predictor motion vector list.
[0323] The size of the candidate motion vector predictor list is adjusted by adding and removing candidate motion vector predictors (step S2050).
[0324] If the number of candidate predictor motion vectors included in the candidate predictor motion vector list is less than two, an additional vector such as a zero vector can be added to the candidate predictor motion vector list, and if the number of candidate predictor motion vectors included in the candidate predictor motion vector list is greater than two, the remaining candidate predictor motion vectors except for index 0 and index 1 of the candidate predictor motion vector list can be removed.
[0325] A final motion vector predictor is determined from the candidate motion vector predictor list (step S2060).
[0326] One of the candidate motion vector predictors included in the candidate motion vector predictor list can be used as the final motion vector predictor, which is a predicted value of the motion vector of the block to be predicted.
[0327] The above-described video encoding and video decoding methods can be implemented by the respective components of the video encoder and video decoder devices detailed in FIGS.
[0328] Although the present invention has been described above with reference to the embodiments, it will be understood by those skilled in the art that various modifications and variations of the present invention can be made without departing from the spirit and scope of the present invention as set forth in the claims.
Claims
1. determining motion information of a block to be predicted based on motion information of a plurality of neighboring blocks of the block to be predicted; generating a prediction block using motion information of the block to be predicted; A decoding method comprising:
2. forming a plurality of candidates in a list using motion information of the plurality of neighboring blocks; 2. The method of claim 1, wherein additional candidates generated based on the plurality of neighboring blocks are added to the list.
3. The candidates in the list are constructed using motion information of the neighboring blocks; if the number of candidates in the list is less than a maximum number of candidates in the list, an additional candidate is added to the list; 2. The method of claim 1, wherein the additional candidates are candidates included in another list used before decoding the block to be predicted.
4. 2. The decoding method according to claim 1, wherein the motion information of the block to be predicted is an average of the motion information of the plurality of neighboring blocks.
5. the plurality of adjacent blocks is three adjacent blocks; 2. The decoding method according to claim 1, wherein the motion information of the block to be predicted is determined using the motion information of the three adjacent blocks.
6. the plurality of neighboring blocks includes a first spatial neighboring block, a second spatial neighboring block, and a temporal neighboring block; 2. The decoding method according to claim 1, wherein, when at least one of the motion information of the first spatial neighboring block and the motion information of the second spatial neighboring block is unavailable or when the motion information of the first spatial neighboring block is equal to the motion information of the second spatial neighboring block, the motion information of the temporal neighboring block is added to a list for inter-frame prediction of the block to be predicted.
7. A computer-readable recording medium storing a bitstream, 10. A computer-readable recording medium, comprising: a video decoder; a video decoder that executes the decoding method of claim 1; and a bitstream that, when decoded by the video decoder, causes the video decoder to execute the decoding method of claim 1.
8. 1. An encoding method comprising: determining motion information of the block to be predicted based on motion information of a plurality of neighboring blocks of the block to be predicted; generating a prediction block using motion information of the block to be predicted; 2. A method for encoding comprising:
9. The candidates in the list are constructed using motion information of the neighboring blocks; 9. The method of claim 8, wherein additional candidates generated based on the plurality of neighboring blocks are added to the list.
10. The candidates in the list are constructed using motion information of the neighboring blocks; if the number of the plurality of candidates in the list is less than the maximum number of candidates in the list, an additional candidate is added to the list; 9. The method of claim 8, wherein the additional candidates are candidates included in another list used before encoding the block to be predicted.
11. The encoding method according to claim 8 , wherein the motion information of the block to be predicted is an average of the motion information of the plurality of neighboring blocks.
12. the plurality of adjacent blocks is three adjacent blocks; 9. The encoding method according to claim 8, wherein the motion information of the block to be predicted is determined using the motion information of the three neighboring blocks.
13. the plurality of neighboring blocks includes a first spatial neighboring block, a second spatial neighboring block, and a temporal neighboring block; 9. The encoding method according to claim 8, wherein, when at least one of the motion information of the first spatial neighboring block and the motion information of the second spatial neighboring block is unavailable or when the motion information of the first spatial neighboring block is equal to the motion information of the second spatial neighboring block, the motion information of the temporal neighboring block is added to a list for inter-frame prediction of the block to be predicted.
14. A non-transitory computer-readable recording medium storing a bitstream generated by a video encoding device that executes a video encoding method, The video encoding method includes: determining motion information of a block to be predicted based on motion information of a plurality of neighboring blocks of the block to be predicted; generating a prediction block using motion information of the block to be predicted; A computer-readable recording medium comprising:
15. A computer-readable medium for storing a bitstream, comprising: The bitstream, when decoded by a video decoder, causes the video decoder to perform the following steps: determining motion information of a block to be predicted based on motion information of a plurality of neighboring blocks of the block to be predicted; generating the predicted block using motion information of the block to be predicted; A computer-readable recording medium that causes a computer to execute the above steps.
16. The candidates in the list are constructed using motion information of the neighboring blocks; 16. The computer-readable medium of claim 15, wherein additional candidates generated based on the plurality of neighboring blocks are added to the list.
17. The candidates in the list are constructed using motion information of the neighboring blocks; if the number of candidates in the list is less than a maximum number of candidates in the list, an additional candidate is added to the list; 16. The computer-readable medium of claim 15, wherein the additional candidates are candidates included in another list used before decoding the block to be predicted.
18. The computer-readable medium of claim 15, wherein the motion information of the block to be predicted is an average of the motion information of the neighboring blocks.
19. the plurality of adjacent blocks is three adjacent blocks; 16. The computer-readable medium of claim 15, wherein motion information of the block to be predicted is determined using motion information of the three neighboring blocks.
20. the plurality of neighboring blocks includes a first spatial neighboring block, a second spatial neighboring block, and a temporal neighboring block; 16. The computer-readable medium of claim 15, wherein if at least one of the motion information of the first spatial neighboring block and the motion information of the second spatial neighboring block is unavailable or if the motion information of the first spatial neighboring block is equal to the motion information of the second spatial neighboring block, the motion information of the temporal neighboring block is added to a list for inter prediction of the block to be predicted.
21. 1. A method for transmitting a bitstream, comprising: transmitting the bitstream including information used to generate reconstruction blocks; the reconstructed block is generated based on the predicted block; the prediction block is generated using motion information of a block to be predicted; A method for transmitting a bitstream, characterized in that motion information of the block to be predicted is determined based on motion information of multiple blocks adjacent to the block to be predicted.
22. The candidates in the list are constructed using motion information of the neighboring blocks; The method of claim 21 , wherein additional candidates generated based on the plurality of neighboring blocks are added to the list.
23. The candidates in the list are constructed using motion information of the neighboring blocks; if the number of candidates in the list is less than a maximum number of candidates in the list, an additional candidate is added to the list; 22. The method of claim 21, wherein the additional candidates are candidates included in another list used before decoding the block to be predicted.
24. The method of claim 21 , wherein the motion information of the block to be predicted is an average of the motion information of the neighboring blocks.
25. the plurality of adjacent blocks is three adjacent blocks; The method of claim 21 , wherein the motion information of the block to be predicted is determined using the motion information of the three neighboring blocks.
26. the plurality of neighboring blocks includes a first spatial neighboring block, a second spatial neighboring block, and a temporal neighboring block; 22. The method of claim 21, wherein the motion information of the temporal neighboring block is added to a list for inter prediction of the block to be predicted if at least one of the motion information of the first spatial neighboring block and the motion information of the second spatial neighboring block is unavailable or if the motion information of the first spatial neighboring block is equal to the motion information of the second spatial neighboring block.
Citation Information
Patent Citations
Combined motion vector and reference index prediction for video coding
US20090304084A1