Video encoding method, video decoding method and recording medium
By adjusting motion vector candidate lists and employing entropy encoding, the method addresses the challenge of computational complexity in high-definition and ultra-high-definition video processing, enhancing encoding efficiency and reducing complexity.
Patent Information
- Application Number
- JP2024137850
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2013-01-18
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-06
- Estimated Expiration
- 2033-01-18
AI Technical Summary
Existing video encoding and decoding technologies face challenges in improving efficiency while reducing computational complexity, particularly in high-definition and ultra-high-definition video processing.
The method involves adjusting motion vector candidate lists by adding or removing specific motion vectors based on a maximum number, using techniques like spatial and temporal motion vector prediction, and employing entropy encoding to optimize video encoding and decoding processes.
This approach reduces computational complexity and enhances video encoding efficiency by optimizing motion vector prediction and entropy encoding, leading to improved performance in high-definition and ultra-high-definition video processing.
Smart Images

Figure 2024157018000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a video encoding / decoding method and apparatus, and more particularly, to a motion vector prediction technique capable of reducing computational complexity. [Background technology]
[0002] Recently, as HD (High Definition) resolution broadcasting services have expanded not only in Korea but also around the world, many users have become accustomed to high-resolution, high-quality images, and as a result, many organizations are accelerating the development of next-generation video devices. In addition, as interest in UHD (Ultra High Definition), which has a resolution four times higher than that of HDTV, is growing, a compression technique for higher resolution, higher quality images is being demanded.
[0003] For image compression, inter prediction technology that predicts pixel values contained in a current image from previous and / or future images in time, intra prediction technology that predicts pixel values contained in a current image using pixel information within the current image, and entropy coding technology that assigns short codes to symbols that occur frequently and long codes to symbols that occur infrequently can be used. Summary of the Invention [Problem to be solved by the invention]
[0004] An object of the present invention is to provide a video encoding method and apparatus capable of not only improving video encoding efficiency but also reducing computational complexity.
[0005] Another technical object of the present invention is to provide a video decoding method and apparatus capable of improving video encoding efficiency as well as reducing computational complexity.
[0006] Another technical object of the present invention is to provide a method and apparatus for generating a predicted block, which can not only improve video coding efficiency but also reduce computational complexity.
[0007] Another technical object of the present invention is to provide an inter prediction method and apparatus capable of improving video coding efficiency as well as reducing computational complexity.
[0008] Another technical object of the present invention is to provide a method and apparatus for predicting a motion vector that can not only improve video coding efficiency but also reduce computational complexity. [Means for solving the problem]
[0009] To achieve the above object, the image decoding method of the present invention includes a step of inverse quantizing and inverse transforming an entropy decoded residual block to restore the residual block, a step of performing motion compensation to generate a prediction block, and a step of restoring an image by adding the restored residual block to the prediction block, and adjusting a motion vector candidate list by adding a specific motion vector candidate or removing some from the motion vector candidates based on a maximum motion vector candidate number value of a motion vector candidate list associated with the prediction block, and in the step of generating the prediction block, a predicted motion vector of the prediction block is determined based on the adjusted motion vector candidate list.
[0010] The step of generating the prediction block includes the steps of deriving motion vector candidates associated with the prediction block to construct a motion vector candidate list, removing one identical motion vector candidate from among the spatial motion vector candidates included in the motion vector candidate list, adjusting the motion vector candidate list by adding the specific motion vector candidate to the motion vector candidate list or removing some of the specific motion vector candidates, and determining a predicted motion vector from among the motion vector candidates included in the adjusted motion vector candidate list.
[0011] The step of adjusting the motion vector candidate list includes a step of adding the specific motion vector candidate when the number of motion vector candidates included in the motion vector candidate list is less than a maximum motion vector candidate number value, regardless of whether a motion vector candidate exists in the motion vector candidate list or whether the specific motion vector candidate exists in the motion vector candidate list.
[0012] The step of adjusting the motion vector candidate list includes a step of repeatedly adding the specific motion vector candidate when the number of motion vector candidates included in the motion vector candidate list is smaller than a maximum number of motion vector candidates, until the number of motion vector candidates included in the motion vector candidate list reaches the maximum number of motion vector candidates.
[0013] The specific motion vector is a (0,0) motion vector, and the maximum motion vector candidate number value is two.
[0014] When there is no motion vector candidate in the motion vector candidate list, two of the specific motion vectors are added.
[0015] When one of the specific motion vectors exists in the motion vector candidate list, one more of the specific motion vectors is added.
[0016] The step of adjusting the motion vector candidate list includes a step of removing, from the motion vector candidate list, a motion vector candidate having an index value greater than an index value obtained by subtracting 1 from the maximum motion vector candidate number value, when the number of motion vector candidates included in the motion vector candidate list is greater than the maximum motion vector candidate number value.
[0017] To achieve the above object, the image decoding apparatus of the present invention includes a residual block restoration unit that inverse quantizes and inverse transforms an entropy-decoded residual block to restore a residual block, a prediction block generation unit that performs motion compensation to generate a prediction block, and an image restoration unit that adds the restored residual block to the prediction block to restore an image, wherein the prediction block generation unit adjusts a motion vector candidate list by adding a specific motion vector candidate or removing some from among the motion vector candidates based on a maximum motion vector candidate number value of a motion vector candidate list associated with the prediction block, and determines a predicted motion vector of the prediction block based on the adjusted motion vector candidate list.
[0018] The prediction block generation unit includes a motion vector candidate list construction unit that induces motion vector candidates associated with the prediction block to construct a motion vector candidate list, a same motion vector candidate removal unit that removes one same motion vector candidate from among the spatial motion vector candidates included in the motion vector candidate list, a motion vector candidate list adjustment unit that adjusts the motion vector candidate list by adding the specific motion vector candidate to the motion vector candidate list or removing some of the specific motion vector candidate, and a predicted motion vector determination unit that determines a predicted motion vector from the adjusted motion vector candidate list.
[0019] When the number of motion vector candidates included in the motion vector candidate list is smaller than a maximum motion vector candidate number value, the motion vector candidate list adjustment unit adds the specific motion vector candidate regardless of whether a motion vector candidate exists in the motion vector candidate list or whether the specific motion vector candidate exists in the motion vector candidate list.
[0020] When the number of motion vector candidates included in the motion vector candidate list is smaller than a maximum number of motion vector candidates, the motion vector candidate list adjustment unit repeatedly adds the specific motion vector candidate until the number of motion vector candidates included in the motion vector candidate list reaches the maximum number of motion vector candidates.
[0021] The specific motion vector is a (0,0) motion vector, and the maximum motion vector candidate number value is two.
[0022] When there is no motion vector candidate in the motion vector candidate list, two of the specific motion vectors are added.
[0023] When one of the specific motion vectors exists in the motion vector candidate list, one more of the specific motion vectors is added.
[0024] To achieve the above object, the image encoding method of the present invention includes a step of performing inter-frame prediction or motion compensation on an input image to generate a prediction block, and a step of transforming and quantizing a residual block, which is the difference between a current input block and the prediction block predicted by the inter-frame prediction, to entropy encode the residual block, and a step of adjusting a motion vector candidate list by adding a specific motion vector candidate or removing some from the motion vector candidates based on a maximum motion vector candidate number value of a motion vector candidate list associated with the prediction block, and in the step of generating the prediction block, a prediction motion vector of the prediction block is determined based on the adjusted motion vector candidate list.
[0025] The step of generating the prediction block includes the steps of deriving motion vector candidates associated with the prediction block to construct a motion vector candidate list, removing one identical motion vector candidate from among the spatial motion vector candidates included in the motion vector candidate list, adjusting the motion vector candidate list by adding the specific motion vector candidate to the motion vector candidate list or removing some of the specific motion vector candidates, and determining a predicted motion vector from the adjusted motion vector candidate list.
[0026] The step of adjusting the motion vector candidate list includes a step of adding the specific motion vector candidate when the number of motion vector candidates included in the motion vector candidate list is less than a maximum motion vector candidate number value, regardless of whether a motion vector candidate exists in the motion vector candidate list or whether the specific motion vector candidate exists in the motion vector candidate list.
[0027] To achieve the above object, the image encoding device of the present invention includes a prediction block generator that performs inter-frame prediction or motion compensation on an input image to generate a prediction block, and an encoding unit that transforms and quantizes a residual block, which is a difference between a current input block and the prediction block predicted by the inter-frame prediction, to entropy encode the residual block. The prediction block generator adjusts a motion vector candidate list by adding a specific motion vector candidate or removing some from the motion vector candidates based on a maximum motion vector candidate number value of a motion vector candidate list associated with the prediction block, and determines a prediction motion vector of the prediction block based on the adjusted motion vector candidate list. Effect of the Invention
[0028] According to the video encoding method of the present invention, it is possible to reduce computational complexity and improve video encoding efficiency.
[0029] According to the video decoding method according to the present invention, it is possible to reduce computational complexity and improve video encoding efficiency.
[0030] According to the method for generating a predicted block according to the present invention, it is possible to reduce computational complexity and improve video coding efficiency.
[0031] According to the inter prediction method according to the present invention, it is possible to reduce computational complexity and improve video coding efficiency.
[0032] According to the motion vector prediction method of the present invention, it is possible to reduce the computational complexity and improve the video coding efficiency. [Brief description of the drawings]
[0033] [Figure 1] 1 is a block diagram showing a configuration of an embodiment of a video encoding device to which the present invention is applied; [Diagram 2] 1 is a block diagram showing a configuration of an embodiment of a video decoding device to which the present invention is applied; [Diagram 3] 1 is a flow chart illustrating an example of an inter prediction method; [Figure 4] 5 is a flowchart illustrating a process in which a video encoding / decoding apparatus according to an embodiment of the present invention derives motion vector candidates and determines a predicted motion vector. [Diagram 5] 1 illustrates an example of a spatial motion vector candidate derivation process. [Figure 6] 1 illustrates an example of a process for deriving temporal motion vector candidates. [Figure 7] 1 illustrates a schematic diagram of an embodiment of constructing a motion vector candidate list based on guided motion vector candidates. [Figure 8] 1 illustrates a schematic diagram of an embodiment for removing identical motion vector candidates from a motion vector candidate list. [Figure 9]4 is a flowchart illustrating a motion vector candidate list adjustment process according to an embodiment of the present invention. [Figure 10] 10 shows a schematic example of an additional embodiment of a (0,0) motion vector when there is one motion vector candidate in the motion vector candidate list. [Figure 11] 10A, there is one (0,0) motion vector candidate in the motion vector candidate list, an additional embodiment of the (0,0) motion vector is illustrated. [Figure 12] 10 shows a schematic example of an additional implementation of a (0,0) motion vector when no motion vector is present in the motion vector candidate list. [Figure 13] 1 illustrates a schematic diagram of an embodiment of removing a portion of motion vector candidates from a motion vector candidate list; [Figure 14] 13 illustrates a process of determining a predicted motion vector from among motion vector candidates in a motion vector candidate list. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0034] Hereinafter, the embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing the embodiments of the present invention, if a detailed description of related known configurations or functions is determined to obscure the gist of the present specification, the detailed description will be omitted.
[0035] When a component is described as being "connected" or "coupled" to another component, it should be understood that the component may be directly connected or coupled to the other component, but there may be other components in between. In addition, in the present invention, the content of a description that "includes" a specific component does not exclude components other than the component, but means that additional components may be included in the implementation of the present invention or within the scope of the technical idea of the present invention.
[0036] Terms such as "first" and "second" may be used to describe various components, but the components should not be limited by the terms. The terms are used only to distinguish one component from another. For example, a first component may be named a second component, and similarly, a second component may be named a first component, without departing from the scope of the present invention.
[0037] In addition, components disclosed 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 list of components for convenience of explanation, and at least two components among the components may be integrated into one component, or one component may be divided into multiple components to perform a function, and such integrated and separated embodiments of each component are included in the scope of the present invention as long as they do not deviate from the essence of the present invention.
[0038] 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 including only the components essential for the realization of the essence of the present invention, excluding components merely used for improving performance, and a structure including only the essential components, excluding optional components merely used for improving performance, is also included in the scope of the present invention.
[0039] FIG. 1 is a block diagram showing a configuration according to an embodiment of a video encoding device to which the present invention is applied.
[0040] 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 video buffer 190.
[0041] The video encoding device 100 may output a bitstream by performing encoding on the input video in intra mode or inter mode. Intra prediction means intra-frame prediction, and inter prediction means inter-frame prediction. In the intra mode, the switch 115 may switch to intra, and in the inter mode, the switch 115 may switch to inter. The video encoding device 100 may generate a predicted block for an input block of the input video, and then encode the difference between the input block and the predicted block.
[0042] In the case of the intra mode, the intra prediction unit 120 may generate a prediction block by performing spatial prediction using pixel values of already-encoded blocks surrounding the current block.
[0043] In the case of an inter mode, the motion prediction unit 111 may search for an area that best matches an input block in a reference image stored in the reference image buffer 190 during the motion prediction process to obtain a motion vector. Here, the image may be used to mean the same thing as a picture, which will be described later. The motion compensation unit 112 may generate a prediction block by performing motion compensation using the motion vector. Here, the motion vector is a two-dimensional vector used in inter prediction and may indicate an offset between a block in a current image to be encoded / decoded and a block in a reference image.
[0044] The subtractor 125 may generate a residual block based on the difference between the input block and the generated prediction block. The transform unit 130 may output a transform coefficient by performing a transform on the residual block. The quantization unit 140 may output a quantized coefficient by quantizing the input transform coefficient based on a quantization parameter.
[0045] The entropy coding unit 150 can output a bit stream by performing entropy coding based on values calculated by the quantization unit 140 or coding parameters calculated during the coding process, such as a motion vector difference, a reference picture index, a motion vector candidate index, and prediction direction information.
[0046] When entropy coding 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 to represent the symbols, thereby reducing the size of the bit string for the symbol to be coded. Therefore, the compression performance of the video coding can be improved through the 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 the entropy coding.
[0047] Since the video encoding apparatus according to the embodiment of Fig. 1 performs inter-prediction encoding, i.e., inter-frame predictive encoding, a currently encoded image needs to be decoded and stored to be used as a reference image. Therefore, the quantized coefficients are inverse quantized by the inverse quantization unit 160 and inverse transformed by the inverse transform unit 170. The inverse quantized and inverse transformed coefficients are added to the prediction block via the adder 175 to generate a reconstructed block.
[0048] The reconstructed block passes through the 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 image. The filter unit 180 is also called an adaptive in-loop filter. The deblocking filter may remove block distortion that occurs at the boundary between blocks. The SAO may add an appropriate offset value to pixel values to compensate for coding errors. The ALF may perform filtering based on a value obtained by comparing a reconstructed image with an original image. The reconstructed block that has passed through the filter unit 180 may be stored in a reference image buffer 190.
[0049] FIG. 2 is a block diagram showing a configuration according to an embodiment of a video decoding device to which the present invention is applied.
[0050] 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 video buffer 270.
[0051] The video decoding apparatus 200 may receive a bitstream output from an encoder, perform decoding in an intra mode or an inter mode, and output a reconstructed image, i.e., a restored image. In the intra mode, a switch may be switched to intra, and in the inter mode, a switch may be switched to inter. The video decoding apparatus 200 may obtain a reconstructed residual block from the input bitstream to generate a prediction block, and may then generate a reconstructed block, i.e., a restored block, by adding the reconstructed residual block and the prediction block.
[0052] The entropy decoding unit 210 may generate symbols including symbols in the form of quantized coefficients by entropy decoding the input bit stream according to a probability distribution. The entropy decoding method is the same as the entropy coding method described above.
[0053] 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 to represent the symbols, thereby reducing the size of the bit string for each symbol. Therefore, the compression performance of the image decoding can be improved through the entropy decoding method.
[0054] 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 generated as a result of the inverse quantization / inverse transformation of the quantized coefficients.
[0055] In the case of the intra mode, the intra prediction unit 240 may generate a prediction block by performing spatial prediction using pixel values of already encoded / decoded blocks around the current block. In the case of the inter mode, the motion compensation unit 250 may generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference image buffer 270.
[0056] 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 image. The filter unit 260 may output a reconstructed image, i.e., a reconstructed image. The reconstructed image may be stored in a reference image buffer 270 and used for inter prediction.
[0057] Hereinafter, a block refers to a unit of video encoding and decoding. A coding unit or a decoding unit in video encoding and decoding refers to a divided unit when an image is divided and encoded or decoded, and is therefore also called a unit, a coding unit (CU), a prediction unit (PU), a transform unit (TU), a transform block, or the like. Furthermore, one block may be divided into subblocks having smaller sizes. A prediction unit is a basic unit when performing inter prediction or motion compensation, and is also called a prediction block. A prediction unit may be divided into a plurality of partitions, and the plurality of partitions also become a basic unit when performing prediction, and a partition into which a prediction unit is divided may also be called a prediction unit. In addition, in this specification, a "picture" may be used instead of a "video", a "frame", a "field" and / or a "slice" depending on the context, and such a division may be easily understood by a person having ordinary skill in the art. For example, a P picture, a B picture, and a forward B picture, which will be described later, may be used in place of a P slice, a B slice, and a forward B slice, respectively, depending on the picture. In addition, in this specification, a current block may indicate a block when inter prediction or motion compensation is performed, and in this case, the current block means a prediction unit or a prediction block.
[0058] FIG. 3 is a flow chart that outlines an embodiment of an inter prediction method.
[0059] Referring to FIG. 3, the encoder and decoder can derive motion information for a current block (S310).
[0060] In the inter mode, the encoder and the decoder may derive motion information of a current block and then perform inter prediction and / or motion compensation based on the induced motion information. In this case, the encoder and the decoder may improve coding efficiency by using motion information of a reconstructed neighboring block and / or a collocated block corresponding to the current block in a previously reconstructed collocated picture. Here, the reconstructed neighboring block may include a block in the current picture that has already been encoded and / or decoded and reconstructed, which is adjacent to the current block and / or a block located at an outer corner of the current block. In addition, the encoder and the decoder may determine a predetermined relative position based on a block that is spatially co-located with the current block in the collocated picture, and may derive the collocated block based on the determined predetermined relative position (an internal and / or external position of a block that is spatially co-located with the current block). Here, as an example, the collocated picture may correspond to one of reference pictures included in a reference picture list. In addition, here, motion information refers to information required during inter prediction or motion compensation, including at least one of a motion vector, a reference picture index, a motion vector candidate index, a motion vector difference, a reference picture list, a predicted motion vector, a merge flag, a merge index, a prediction direction, and availability information.
[0061] Meanwhile, the motion information deriving method can change according to the prediction mode of the current block. Prediction modes applied for inter prediction include motion vector prediction including Advanced Motion Vector Prediction (AMVP), merge mode, and the like.
[0062] For example, when motion vector prediction is applied, the encoder and decoder may generate a motion vector candidate list using the motion vector of the reconstructed neighboring block and / or the motion vector of the collocated block. That is, the motion vector of the reconstructed neighboring block and / or the motion vector of the collocated block may be used as a motion vector candidate. The encoder may transmit a motion vector predictor index indicating an optimal motion vector predictor selected from the motion vector candidates included in the list to the decoder. In this case, the decoder may select a motion vector predictor of the current block from the motion vector predictor candidates included in the motion vector candidate list using the motion vector predictor index.
[0063] The encoder can obtain a motion vector difference (MVD) between the motion vector of the current block and the predicted motion vector, encode the MVD, and transmit the MVD to the decoder. In this case, the decoder can decode the received motion vector difference and derive the motion vector of the current block through the sum of the decoded motion vector difference and the predicted motion vector.
[0064] As another example, when a merge mode is applied, the encoder and decoder may generate a merge candidate list using motion information of reconstructed neighboring blocks and / or motion information of collocated blocks, i.e., if motion information of reconstructed neighboring blocks and / or collocated blocks exists, the encoder and decoder may use the motion information as a merge candidate for the current block.
[0065] The encoder may select a merge candidate that can provide optimal coding efficiency from among the merge candidates included in the merge candidate list as motion information for the current block. At this time, a merge index indicating the selected merge candidate may be included in a bitstream and transmitted to the decoder. The decoder may select one of the merge candidates included in the merge candidate list using the transmitted merge index, and may determine the selected merge candidate as motion information of the current block. Therefore, when a merge mode is applied, motion information of the reconstructed neighboring block and / or collocated block may be used as the motion information of the current block.
[0066] In the above-mentioned AMVP and merge modes, the motion information of the reconstructed neighboring blocks and / or the motion information of the collocated blocks can be used to derive the motion information of the current block. In the embodiments described below, the motion information derived from the reconstructed neighboring blocks is called spatial motion information, and the motion information derived based on the collocated blocks is called temporal motion information. For example, the motion vector derived from the reconstructed neighboring blocks is called spatial motion vector, and the motion vector derived based on the collocated blocks is called temporal motion vector.
[0067] Also, referring to FIG. 3, the encoder and decoder may generate a predicted block by performing motion compensation on a current block based on the derived motion information (S320). Here, the predicted block refers to a motion compensated block generated as a result of performing motion compensation on a current block. Also, a plurality of motion compensated blocks may constitute one motion compensated image. Therefore, in the embodiments described below, the predicted block may be expressed as a 'motion compensated block' and / or a 'motion compensated image' depending on the context, and such a distinction may be easily made by a person having ordinary skill in the art.
[0068] Meanwhile, there are P pictures and B pictures for which inter-prediction is performed. A P picture refers to a picture for which uni-directional prediction using one reference picture is performed, and a B picture refers to a picture for which forward-directional, backward-directional or bi-predictive prediction using one or more, for example, two, reference pictures can be performed. For example, in a B picture, inter-prediction can be performed using one forward reference picture (past picture) and one backward reference picture (future picture). In addition, in a B picture, prediction can be performed using two forward reference pictures, and prediction can be performed using two backward reference pictures.
[0069] Here, the reference pictures may be managed by reference picture lists. The reference picture used in a P picture may be assigned to reference picture list 0 (L0 or List0). The two reference pictures used in a B picture may be assigned to reference picture list 0 and reference picture list 1 (L1 or List1), respectively. Hereinafter, the L0 reference picture list may have the same meaning as reference picture list 0, and the L1 reference picture list may have the same meaning as reference picture list 1.
[0070] Generally, a forward reference picture may be assigned to reference picture list 0, and a backward reference picture may be assigned to reference picture list 1. However, the method of assigning reference pictures is not limited thereto, and a forward reference picture may be assigned to reference picture list 1, and a backward reference picture may be assigned to reference picture list 0. Hereinafter, a reference picture assigned to reference picture list 0 is referred to as an L0 reference picture, and a reference picture assigned to reference picture list 1 is referred to as an L1 reference picture.
[0071] Reference pictures may be generally assigned to a reference picture list in descending order according to their reference picture numbers. Here, the reference picture numbers refer to numbers assigned to each reference picture in a POC (Picture Order Count) order, and the POC order refers to a display order and / or a time order of pictures. For example, two reference pictures with the same reference picture numbers may correspond to the same reference picture. The reference pictures assigned to a reference picture list can be rearranged by Reference Picture List Modification.
[0072] As described above, in a P picture, unidirectional prediction using one L0 reference picture can be performed, and in a B picture, forward, backward or bidirectional prediction can be performed using one L0 reference picture and one L1 reference picture, i.e., two reference pictures. Prediction using one reference picture is called uni-prediction, and prediction using two reference pictures including an L0 reference picture and an L1 reference picture is called bi-prediction.
[0073] Bi-prediction may be used as a concept including all of forward prediction, backward prediction, and bidirectional prediction, but in the embodiment described below, prediction using two reference pictures (L0 reference picture and L1 reference picture) is referred to as bidirectional prediction for convenience. That is, in the embodiment described below, bidirectional prediction means bi-prediction and may be understood as a concept including all of forward, backward, and bidirectional prediction using two reference pictures (L0 reference picture and L1 reference picture). In addition, even when bi-prediction is performed, forward prediction or backward prediction may be performed, but in the embodiment described below, prediction using only one reference picture is referred to as unidirectional prediction for convenience. That is, in the embodiment described below, unidirectional prediction means uni-prediction and should be understood as a concept including only prediction using one reference picture. In addition, hereinafter, information indicating whether unidirectional prediction (uni-prediction) or bidirectional prediction (bi-prediction) is applied to a block on which prediction is performed is referred to as prediction direction information.
[0074] FIG. 4 is a flowchart illustrating a process in which a video encoding / decoding apparatus according to an embodiment of the present invention derives motion vector candidates and determines a predicted motion vector.
[0075] Referring to Fig. 4, the encoder and decoder first derive spatial motion vector candidates in order to determine a predicted motion vector (S410). As described above, the encoder and decoder may derive motion vector candidates from blocks (reference blocks) that have already been restored in the spatial vicinity of the current block as spatial motion vector candidates. In this case, the spatial motion vector candidates may be induced up to the maximum number of spatial motion vector candidates (maxNumSpatialMVPCand). If the reference picture of the reference block and the reference picture of the current block are different from each other, the spatial motion vector candidates may be induced by performing scaling.
[0076] When the spatial motion vector candidate derivation is completed, the encoder and decoder derive a temporal motion vector candidate (S420). The encoder and decoder may derive a motion vector candidate from a collocated block restored from a collocated picture that is a temporal periphery of the current block. In addition, the temporal motion vector candidates may be derived up to a maximum number of temporal motion vector candidates (maxNumTemporalMVPCand). In addition, if the distance between the current picture and the reference picture of the current block is different from the distance between the collocated picture and the reference picture of the collocated block, the temporal motion vector candidate may be derived by performing scaling.
[0077] When the derivation of the spatial motion vector candidate or the derivation of the temporal motion vector candidate is completed, the derivation of the spatial motion vector candidate or the temporal motion vector candidate is added to the motion vector candidate list (S430). That is, the encoder and the decoder may add the derivation of the spatial motion vector candidate and the temporal motion vector candidate to the motion vector candidate list (mvpListLX) in order. The motion vector candidate list (mvpListLX) refers to a motion vector candidate list corresponding to one of the reference picture lists L0 and L1, and for example, the motion vector candidate list corresponding to the reference picture list L0 may be represented as mvpListL0.
[0078] After the motion vector candidate list is constructed, the encoder and decoder remove identical motion vector candidates (S440). It is examined whether there are motion vector candidates having the same motion vector value in the motion vector candidate list (mvpListLX). For example, if there are multiple identical spatial motion vector candidates, only the spatial motion vector candidate having the smallest motion vector candidate index is left among the identical spatial motion vector candidates, and the remaining spatial motion vector candidates are removed from the motion vector candidate list. That is, if there are multiple candidates having the same motion vector value, only one candidate having the same motion vector value can be left in the motion vector candidate list. Then, the number of removed motion vector candidates is one.
[0079] Then, the encoder and the decoder adjust the motion vector candidate list by adding a specific motion vector or removing some of the motion vector candidates (S450). The encoder and the decoder can adjust the size of the motion vector candidate list by adding a motion vector to the motion vector candidate list (mvpListLX) or removing some of the motion vector candidates included in the motion vector candidate list. The number of motion vector candidates to be removed is one. At this time, the encoder and the decoder can add a specific motion vector without considering whether a motion vector candidate exists in the motion vector candidate list based on the maximum number of motion vector candidates (maxNumMVPCand). Also, the encoder and the decoder can adjust the number of motion vector candidates in the motion vector candidate list by adding a specific motion vector without considering whether a specific motion vector exists in the motion vector candidate list. At this time, the specific motion vector to be added is a vector having a fixed integer value, and may be a (0,0) motion vector. Here, the (0,0) motion vector means a motion vector whose x and y components have values of 0, and is called a zero motion vector.
[0080] Finally, the encoder and decoder may determine a motion vector predictor based on the adjusted motion vector candidate list (S460).
[0081] FIG. 5 illustrates an example of a spatial motion vector candidate derivation process.
[0082] 5, the encoder and decoder determine whether there is motion information for reconstructed neighboring blocks 510, 512, 514, 516, and 518 to derive spatial motion vector candidates for a current block 500. If there is no motion information for the reconstructed neighboring blocks, it may be determined that they cannot be used as motion vector candidates.
[0083] According to one embodiment of the present invention, the encoder and decoder can derive spatial motion vectors from AO block 510 located in the lower left corner of the current block 500, A1 block 512 adjacent to the bottom left end of the current block 500, B0 block 514 located in the upper right corner of the current block 500, B1 block 516 adjacent to the upper right end of the current block 500, and B2 block 518 located in the upper left corner of the current block 500, and determine them as spatial motion vector candidates for the current block 500.
[0084] In this case, it may be determined whether a motion vector exists for each block in the order of A0, A1, BO, B1, and B2 blocks 510, 512, 514, 516, and 518. If a motion vector exists, the motion vector of the corresponding block may be determined as a motion vector candidate. The spatial motion vector candidates may be derived up to a maximum spatial motion vector number (maxNumSpatialMVPCand), where the maximum spatial motion vector number (maxNumSpatialMVPCand) is a positive integer including 0. According to an embodiment of the present invention, the maximum spatial motion vector number (maxNumSpatialMVPCand) is 2. Therefore, a total of two spatial motion vectors are derived by deriving one motion vector candidate from the A0 block 510 and the A1 block 512 and one motion vector candidate from the BO block 514, the B1 block 516, and the B2 block 518, and at the same time, if the motion vector derived from the A0 block 510 and the A1 block 512 is not the same as the motion vector derived from the BO block 514, the B1 block 516, and the B2 block 518, the process of deriving a temporal motion vector candidate is not performed. Also, if the reference picture of the restored neighboring block is different from the reference picture of the current block 500, the motion vector of the neighboring block can be scaled and used using the distance between the reference picture of the current block 500 and the reference picture of the restored neighboring block.
[0085] According to another embodiment of the present invention, the spatial motion vector may be derived from the reconstructed neighboring blocks in the following manner.
[0086] 1) If a block exists at a predetermined position, the block is not intra-coded, and the reference picture list and reference picture of the block are the same as the reference picture list and reference picture of the current block, the motion vector of the block can be induced as a motion vector candidate for the current block.
[0087] 2) If a block exists at a predetermined position, the block is not intra-coded, and the reference picture list of the block is different from the reference picture list of the current block, but the reference pictures of the block and the current block are the same, the motion vector of the block can be induced as a motion vector candidate for the current block.
[0088] 3) If a block exists at a predetermined position, the block is not intra-coded, and the reference picture list of the block is the same as the reference picture list of the current block, but the reference picture of the block is different from the reference picture of the current block, the motion vector of the block can be scaled to guide it as a motion vector candidate for the current block.
[0089] 4) If a block is present at a predetermined position, the block is not intra-coded, and the reference picture list and reference picture of the block are different from the reference picture list and reference picture of the current block, the motion vector of the block can be scaled to guide it as a motion vector candidate for the current block.
[0090] Based on the above steps 1) to 4), the encoder and decoder may sequentially proceed with steps 1) and 2) for AO block 510, 1) and 2) for A1 block 512, 3) and 4) for AO block 510, 3) and 4) for A1 block 512, 1) and 2) for B0 block 514, 1) and 2) for B1 block 516, 1) and 2) for B2 block 518, 3) and 4) for B0 block 514, 3) and 4) for B1 block 516, and 3) and 4) for B2 block 518.
[0091] FIG. 6 illustrates an example of a temporal motion vector candidate derivation process.
[0092] Referring to FIG. 6, the encoder and decoder can derive motion vector candidates from a correspondingly located block (or collocated block 600) reconstructed in a correspondingly located picture (or collocated picture) that is a temporal periphery of the current block 500.
[0093] According to an embodiment of the present invention, a temporal motion vector candidate can be derived in the order of a block 610 at an H position outside a collocated block 600 that corresponds to the same spatial position as the current block 500 in a collocated picture of the current picture, and a block 612 at a C3 position inside the collocated block 600. In this case, if a motion vector can be derived from the H block 610, a temporal motion vector can be derived from the H block 610, and if a motion vector cannot be derived from the H block 610, a temporal motion vector candidate can be derived from the C3 block 612.
[0094] Here, the H block 610 is a block at the lower right corner of the collocated block 600, and the C3 block 612 is a block at the lower right corner of the blocks obtained by dividing a regular square based on the center of the collocated block 600 into four blocks. A temporal motion vector can be determined according to the relative positions of the H block 610 and the C3 block 612. If a certain H block 610 and C3 block 612 are intra-coded, a temporal motion vector candidate cannot be derived.
[0095] Also, the temporal motion vector candidates can be derived up to a maximum number of temporal motion vectors (maxNumTemporalMVPCand). At this time, the maximum number of temporal motion vectors (maxNumTemporalMVPCand) is a positive integer including 0, and as an example, the maximum number of temporal motion vectors (maxNumTemporalMVPCand) is 1. If the distance between the current picture and the reference picture of the current block 500 and the distance between the collocated picture and the reference picture of the collocated block 600 are different from each other, the temporal motion vector candidates can be derived by performing scaling on the motion vectors.
[0096] The scaling can be performed through the following process.
[0097] First, a td value and a tb value indicating a POC (Picture Order Count) difference value between the collocated picture and the reference picture of the H block 610 or the C3 block 612, and a POC difference value between the current picture and the reference picture of the current block are obtained. In this case, in the case of i) a spatial motion vector deriving process, the td value indicates a difference value between the POC of the current picture and the POC of the reference picture referred to by the spatially adjacent reference block, and the tb value indicates a difference value between the POC of the current picture and the POC of the reference picture referred to by the current block. In this case, when the prediction directions of the reference picture of the current block and the reference picture of the reference block are different from each other, the signs of the td and tb values can be assigned to the difference. In some cases, the td value or the tb value can be adjusted to be included in the range of -128 to 127. In this case, if the td value or tb value is smaller than -128, the td value or tb value can be adjusted to -128, and if the td value or tb value is larger than 127, the td value or tb value can be adjusted to 127. If the td value or tb value is within the range of -128 to 127, the td value or tb value is not adjusted.
[0098] After determining the td and tb values, calculate the tx value, which is inversely proportional to the td value. This can be determined using the formula (16384+(Abs(td)>>1)) / td, where Abs() indicates the absolute value of the input value.
[0099] Then, the scaling factor DistScaleFactor is determined using the formula (tb*tx+32)>>6 and adjusted so that it is within the range of -1024 to 1023.
[0100] With the adjusted DistScaleFactor value, a scaled temporal motion vector can be calculated using the formula Sign(DistScaleFactor*mvCol)*((Abs(DistScaleFactor*mvCol)+127)>>8), where Sign() outputs the sign information of the input value and mvCol indicates the temporal motion vector value before scaling.
[0101] FIG. 7 illustrates a schematic diagram of an embodiment of constructing a motion vector candidate list based on a derived motion vector.
[0102] Referring to FIG 7, the encoder and decoder add the guided motion vector candidates to a motion vector candidate list (mvpListLX). The encoder and decoder add the guided spatial motion vector candidates and temporal motion vector candidates to the motion vector candidate list in order. mvpListLX refers to a motion vector candidate list corresponding to one of the reference picture lists L0 and L1. For example, the motion vector candidate list corresponding to the reference picture list L0 may be represented as mvpListL0.
[0103] The size of the motion vector candidate list (mvpListLX) may be determined based on a predetermined number, i.e., the maximum number of motion vector candidates (maxNumMVPCand) is 2. If the maximum number of motion vector candidates is 3 and there are three induced motion vector candidates, the motion vector candidate added first to the motion vector candidate list (mvpListLX) may have a motion vector candidate index value of 0, and the motion vector candidate added last may have a motion vector candidate index value of 2.
[0104] According to the embodiment of FIG. 7, when a non-scaled spatial motion vector candidate (1,0) is derived from the A1 block 512, a scaled spatial motion vector candidate (4,-1) is derived from the B1 block 516, and a temporal motion vector candidate (2,3) is derived from the H block 610, the motion vector candidates are added to the motion vector candidate list 700 in the correct order. In this case, the motion vector candidate index value derived from the A1 block 512 may be 0, the motion vector candidate index value derived from the B1 block 516 may be 1, and the motion vector candidate index value derived from the H block 610 may be 2. In the above embodiment, assuming that the maximum number of motion vector candidates is 2, since the motion vector candidates derived from the A1 block 512 and the B1 block 516 are not the same, no temporal motion vector candidate is derived and the motion vector candidates derived from the A1 block 512 and the B1 block 516 are added to the motion vector candidate list.
[0105] FIG. 8 illustrates a schematic diagram of an embodiment for removing identical motion vectors from a motion vector candidate list.
[0106] 8, the encoder and decoder check whether there is an identical motion vector candidate in a motion vector candidate list 800. If there are a plurality of identical motion vector candidates as a result of the check, only the motion vector candidate with the smallest motion vector candidate index among the identical motion vector candidates is left in the motion vector candidate list 800, and the remaining motion vector candidates are removed from the motion vector candidate list 800. In this case, the identical motion vector candidate removal operation can be performed only on spatial motion vector candidates.
[0107] According to the embodiment of Fig. 8, when the motion vector candidate list 800 is composed of three motion vector candidates, (1,0), (1,0), and (2,3), the candidates corresponding to index 0 and index 1 are the same (1,0). If there are identical motion vectors, the encoder and decoder leave only the motion vector candidate with the smallest index in the motion vector candidate list 810 from among the identical motion vector candidates, as in the reconstructed motion vector candidate list 810, and remove the remaining motion vector candidates.
[0108] FIG. 9 is a flow chart illustrating a motion vector candidate list adjustment process according to an embodiment of the present invention.
[0109] 9, the encoder and decoder determine whether the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list is less than the maximum number of motion vector candidates (maxNumMVPCand) (S910). If the number of motion candidates included is less than the maximum number of motion vector candidates, the (0,0) motion vector is added to the motion vector candidate list (S920). By adding the (0,0) motion vector to the motion vector candidate list, the number of motion vector candidates (numMVPCandLX) can be increased by 1. After adding the (0,0) motion vector, the determination of whether the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list is less than the maximum number of motion vector candidates (maxNumMVPCand) and the operation of adding the (0,0) motion vector are repeated until the number of motion vector candidates (numMVPCandLX) reaches the maximum number of motion vector candidates (maxNumMVPCand). That is, by performing the above process until the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list becomes the same as the maximum number of motion vector candidates (maxNumMVPCand), the number of motion vector candidates (numMVPCandLX) and the maximum number of motion vector candidates (maxNumMVPCand) can become the same.
[0110] However, according to another embodiment of the present invention, if the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list is less than the maximum number of motion vector candidates (maxNumMVPCand), only one (0,0) motion vector can be added.
[0111] In conclusion, the number of motion vector candidates included in the motion vector candidate list may be determined by the maximum number of motion vector candidates.
[0112] According to an embodiment of the present invention, when the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list is greater than the maximum number of motion vector candidates (maxNumMVPCand), the motion vector candidate list may be adjusted by removing some of the motion vector candidates. At this time, the removed motion vector candidate is a motion vector candidate having an index value greater than a number (maxNumMVPCand-1) that is one less than the maximum number of motion vector candidates. Also, when the number of included motion candidates is the same as the maximum number of motion vector candidates, a final motion vector candidate is derived. At this time, when the maximum number of motion vector candidates (maxNumMVPCand) is 2, a maximum of two motion vector candidates may be finally derived. At this time, the derived motion vector candidate may be included in the motion vector candidate list, and one of the derived motion vector candidates may be determined as a predicted motion vector of a prediction block.
[0113] According to another embodiment of the present invention, when the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list is greater than or equal to the maximum number of motion vector candidates (maxNumMVPCand), the motion vector candidate list can be adjusted by removing some of the motion vector candidates. Similarly, when the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list is equal to the maximum number of motion vector candidates (maxNumMVPCand), there is no need to remove the motion vector candidates, so the motion vector candidate list can be adjusted by removing some of the motion vector candidates only when the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list is greater than the maximum number of motion vector candidates (maxNumMVPCand).
[0114] Through the above process, a motion vector candidate is added to the motion vector candidate list by comparing only the number of motion vector candidates in the motion vector candidate list with the maximum number of motion vector candidates, and therefore, a duplicate check is not performed to determine whether a specific motion vector candidate to be added ((0,0) motion vector) exists in the motion vector candidate list, thereby reducing computational complexity in motion vector prediction.
[0115] In addition, it is possible to compare only the number of motion vector candidates in the motion vector candidate list with the maximum number of motion vector candidates, and it is not necessary to perform a list empty check to check whether a motion vector exists in the motion vector candidate list, which is performed in an intermediate step of constructing the motion vector candidate list, thereby further reducing the computational complexity of motion vector prediction.
[0116] FIG. 10 illustrates a schematic example of an additional embodiment of a (0,0) motion vector when there is one motion vector candidate in the motion vector candidate list.
[0117] The encoder and decoder may adjust the size of the motion vector candidate list by adding or removing a motion vector from the motion vector candidate list (mvpListLX). Here, numMVPCandLX means the number of motion vector candidates in the motion vector candidate list corresponding to one of the reference picture lists L0 and L1, and the size of the maximum motion vector candidate list may be determined by a maximum number of motion vector candidates (maxNumMVPCand), which is a predetermined number. For example, the number of motion vector candidates in the motion vector candidate list corresponding to the reference picture list L0 may be expressed as numMVPCandL0. Here, numMVPCandLX and maxNumMVPCand are positive integers including 0, and in one embodiment, maxNumMVPCand is 2.
[0118] 10, in one embodiment of the present invention, when the maximum number of motion vector candidates (maxNumMVPCand) is 2, the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list 1000 is 1. Since the number of motion vector candidates included in the motion vector candidate list 1000 is smaller than the maximum number of motion vector candidates (maxNumMVPCand), a specific motion vector is added to the motion vector candidate list 1000, and the number of motion vector candidates (numMVPCandLX) can be increased by 1. As a result, a motion vector candidate list 1010 whose size is adjusted by adding the specific motion vector can be generated. At this time, the specific motion vector to be added is a vector having a predetermined fixed integer value, and is a (0,0) motion vector.
[0119] FIG. 11 illustrates a schematic example of an additional (0,0) motion vector when there is one (0,0) motion vector candidate in the motion vector candidate list.
[0120] Referring to FIG. 11, in another embodiment of the present invention, the maximum number of motion vector candidates (maxNumMVPCand) is 2, the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list 1100 is less than the maximum number of motion vector candidates (maxNumMVPCand), and one specific motion vector ((0,0) motion vector) may exist in the motion vector candidate list 1100. In this case, the encoder and decoder may add a specific motion vector regardless of whether the specific motion vector ((0,0) motion vector) exists in the motion vector candidate list 1100. As a result, a motion vector candidate list 1110 whose size is adjusted by adding one more specific motion vector may be generated. In this case, the specific motion vector to be added is a vector having a predetermined fixed integer value, and is the (0,0) motion vector. By adding a specific motion vector, the number of motion vector candidates (numMVPCandLX) can be increased. Therefore, the motion vector candidate list 1110 may include as many (0,0) motion vectors as the maximum number of motion vector candidates (maxNumMVPCand). The encoder and decoder add a specific motion vector by comparing only the maximum number of motion vector candidates (maxNumMVPCand) with the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list, and therefore, the encoder and decoder do not need to determine whether a specific motion vector is in the list, thereby reducing the computational complexity.
[0121] FIG. 12 illustrates a schematic example of an additional implementation of the (0,0) motion vector when no motion vector is present in the motion vector candidate list.
[0122] Referring to FIG. 12, in another embodiment of the present invention, the maximum number of motion vector candidates (maxNumMVPCand) is 2, the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list 1200 is smaller than the maximum number of motion vector candidates (maxNumMVPCand), and no motion vector exists in the motion vector candidate list 1200. In this case, the encoder and decoder can repeatedly add a specific motion vector regardless of whether a motion vector candidate exists in the motion vector candidate list 1200. The number of motion vector candidates (numMVPCandLX) can be increased by adding a specific motion vector. That is, the encoder and decoder can add a specific motion vector until the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list reaches the maximum number of motion vector candidates (maxNumMVPCand). As in the above embodiment, when the maximum number of motion vector candidates (maxNumMVPCand) is 2, two specific motion vectors can be added. At this time, the specific motion vector to be added is a vector having a predetermined fixed integer value, and is a (0,0) motion vector. Therefore, the motion vector candidate list 1210 may include as many (0,0) motion vectors as the maximum number of motion vector candidates (maxNumMVPCand). The encoder and decoder add the specific motion vector by comparing only the maximum number of motion vector candidates (maxNumMVPCand) with the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list, and therefore, it is possible to reduce the computational complexity by not determining whether the motion vector candidate is in the list.
[0123] Although not shown in the drawings, according to another embodiment of the present invention, when the maximum number of motion vector candidates (maxNumMVPCand) is 2 and the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list is smaller than the maximum number of motion vector candidates (maxNumMVPCand), one specific motion vector can be added. By adding the specific motion vector, the number of motion vector candidates (numMVPCandLX) can be increased. That is, the specific motion vector to be added can be added only one specific motion vector without repeatedly adding the specific motion vector to be added. For example, when there is no motion vector in the motion vector candidate list, the encoder and decoder can add one specific motion vector regardless of whether the motion vector candidate exists in the motion vector candidate list. By adding the specific motion vector, the number of motion vector candidates (numMVPCandLX) can be increased. In this case, the specific motion vector to be added is a vector having a predetermined fixed integer value, and is a (0,0) motion vector. Even in such a case, the encoder and decoder add a specific motion vector by only comparing the maximum number of motion vector candidates (maxNumMVPCand) with the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list, thereby reducing computational complexity by not determining whether the motion vector candidate is in the list.
[0124] FIG. 13 illustrates a schematic diagram of an embodiment for removing a portion of motion vector candidates from a motion vector candidate list.
[0125] 13, in one embodiment of the present invention, when the number of motion vector candidates (numMVPCandLX) included in a motion vector candidate list 1300 is greater than the maximum number of motion vector candidates (maxNumMVPCand), the encoder and decoder may remove a motion vector candidate having an index value greater than a value (maxNumMVPCand-1) that is 1 less than the maximum number of motion vector candidates from the motion vector candidate list 1300. For example, when the maximum number of motion vector candidates (maxNumMVPCand) is 2 and the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list 1300 is 3, a motion vector candidate (4,-3) having an index value greater than 1, which is a value (maxNumMVPCand-1) that is 1 less than the maximum number of motion vector candidates, 2, may be removed from the motion vector candidate list 1300 to generate a size-adjusted motion vector candidate list 1310.
[0126] According to another embodiment of the present invention, when the number of motion vector candidates (numMVPCandLX) included in the motion vector candidate list is greater than or equal to the maximum number of motion vector candidates (maxNumMVPCand), the encoder and decoder can remove motion vector candidates having index values greater than a value (maxNumMVPCand-1) less than the maximum number of motion vector candidates from the motion vector candidate list.
[0127] FIG. 14 illustrates a process of determining a motion vector predictor from among the motion vector candidates in the motion vector candidate list.
[0128] Referring to FIG. 14, the encoder and decoder can determine a motion vector predictor from the motion vector candidates included in the motion vector candidate list 1400 adjusted through the above process.
[0129] According to an embodiment, the encoder and decoder may determine a motion vector candidate in the motion vector candidate list 1400 corresponding to a specific motion vector candidate index as a motion vector predictor. For example, if the maximum number of motion vector candidates (maxNumMVPCand) is 2 and the motion vector candidate index is 1, the motion vector candidate (2,3) may be determined as a motion vector predictor.
[0130] The encoder and decoder can generate a prediction block by performing inter prediction or motion compensation based on the predicted motion vector value determined as above.
[0131] In the above embodiments, the method is described based on a flow chart with a series of steps or blocks, but the present invention is not limited to the order of steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Also, a person skilled in the art can understand that the steps shown in the flow chart are not exclusive, and other steps may be included, or one or more steps in the flow chart may be deleted without affecting the scope of the present invention.
[0132] The above-described embodiments include examples of various aspects. It is not possible to describe all possible combinations for illustrating various aspects, but a person skilled in the art can recognize that other combinations are possible. Therefore, the present invention includes all alterations, modifications, and variations that fall within the scope of the claims.
Claims
1. a motion vector candidate list constructing unit that constructs a motion vector candidate list; a motion vector candidate list adjustment unit that adjusts the motion vector candidate list based on a maximum number of motion vector candidates in the motion vector candidate list; a motion vector predictor determination unit that determines a motion vector predictor based on the adjusted motion vector candidate list, the motion vector candidate list includes at least one of a spatial motion vector candidate, a temporal motion vector candidate, and a specific motion vector candidate; The temporal motion vector candidate is generated by performing scaling when a difference between a current picture and a reference picture of a current block is different from a difference between a collocated picture and a reference picture of a collocated block; The maximum number of motion vector candidates is two; if there is no motion vector candidate in the motion vector candidate list, two specific motion vector candidates are added to the motion vector candidate list by the motion vector candidate list adjuster; the motion vector candidate list constructing unit induces the spatial motion vector candidate, induces the temporal motion vector candidate, and adds at least one of the induced spatial motion vector candidate and the induced temporal motion vector candidate to the motion vector candidate list; The operation of removing duplicate motion vector candidates is performed only on the spatial motion vector candidates, and the temporal motion vector candidates are derived except when there are two derived spatial motion vector candidates and they are different from each other; and when the number of motion vector candidates in the motion vector candidate list is smaller than the maximum number of motion vector candidates, the motion vector candidate list adjustment unit repeatedly adds the specific motion vector candidate based only on the maximum number of motion vector candidates and the number of motion vector candidates in the motion vector candidate list until the number of motion vector candidates in the motion vector candidate list reaches the maximum number of motion vector candidates.
2. The video decoding apparatus of claim 1 , wherein the specific motion vector candidate is a (0,0) motion vector.
3. a prediction block generation unit that performs inter prediction to generate a prediction block; an encoding unit that performs entropy encoding of a residual block corresponding to a difference between a current block and a prediction block predicted by the inter prediction; a predicted motion vector corresponding to the predicted block is included in a motion vector candidate list; one or more specific motion vector candidates are added to the motion vector candidate list based on a maximum number of motion vector candidates in the motion vector candidate list; the motion vector candidate list includes at least one of spatial motion vector candidates, temporal motion vector candidates, and the particular motion vector candidate; The temporal motion vector candidate is generated by performing scaling when a difference between a current picture and a reference picture of a current block is different from a difference between a collocated picture and a reference picture of a collocated block; The maximum number of motion vector candidates is two; if there is no motion vector candidate in the motion vector candidate list, two specific motion vector candidates are added to the motion vector candidate list by the motion vector candidate list adjuster; The motion vector candidate list includes: Deriving the spatial motion vector candidates; deriving said candidate temporal motion vectors; adding at least one of the induced spatial motion vector candidates and the induced temporal motion vector candidates to the motion vector candidate list; The operation of removing duplicate motion vector candidates is performed only on the spatial motion vector candidates, and the temporal motion vector candidates are derived except when there are two derived spatial motion vector candidates and they are different from each other; a video encoding device, wherein, when the number of motion vector candidates in the motion vector candidate list is smaller than a maximum number of motion vector candidates, the specific motion vector candidate is repeatedly added to the motion vector candidate list based only on the maximum number of motion vector candidates and the number of motion vector candidates in the motion vector candidate list, until the number of motion vector candidates in the motion vector candidate list reaches the maximum number of motion vector candidates.
4. The video encoding device according to claim 3 , wherein the specific motion vector candidate is a (0,0) motion vector.
Citation Information
Patent Citations
Moving image decoder, moving image decoding method, moving image decoding program, receiver, reception method and reception program
JP2013085235A
Method and apparatus for encoding motion information and method and apparatus for decoding same
WO2012173415A2
Method and apparatus for encoding motion information, and method and apparatus for decoding same
WO2013002557A2
Method of decoding motion vector
WO2013067924A1
