Predicted Motion Vector Derivation Method and Apparatus Using the Same

The method of constructing a candidate predicted motion vector list addresses the inefficiencies in encoding and decoding high-resolution videos by determining spatial and temporal candidate vectors, thereby improving coding efficiency and reducing complexity.

JP7699918B2Active Publication Date: 2025-06-30ELECTRONICS & TELECOMM RES INST +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2020189819
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2012-09-14
Filing Date
2020-11-13
Publication Date
2025-06-30
Estimated Expiration
2032-09-14

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality videos has led to higher data volumes, resulting in increased transmission and storage costs. Existing video compression technologies struggle to efficiently compress and decode such high-quality video data.

Method used

A method for constructing a candidate predicted motion vector list is developed, which involves determining spatial and temporal candidate prediction motion vector related information from peripheral prediction blocks. This list is used to improve video encoding and decoding efficiency.

Benefits of technology

The proposed method reduces the complexity of deriving optimal prediction motion vectors and enhances coding efficiency, thereby addressing the challenges posed by high-resolution and high-quality video data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007699918000011
    Figure 0007699918000011
  • Figure 0007699918000012
    Figure 0007699918000012
  • Figure 0007699918000013
    Figure 0007699918000013
Patent Text Reader

Abstract

To provide a method for inducing a prediction motion vector and an apparatus using the method.SOLUTION: An video decoding method may include: a step of determining information related to a plurality of spatial candidate prediction motion vectors from peripheral predicted blocks of a predicted target block; and a step of determining information related to temporal candidate prediction motion vectors on the basis of the information related to the plurality of spatial candidate prediction motion vectors. Accordingly, the present invention can reduce complexity occurring when inducing the optimum prediction motion vector and can enhance coding efficiency.SELECTED DRAWING: Figure 14
Need to check novelty before this filing date? Find Prior Art

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 Art

[0002] Recently, the demand for high-resolution and high-quality videos such as HD (High Definition) videos and UHD (Ultra High Definition) videos has been increasing in various application fields. As video data becomes higher in resolution and quality, the data volume relatively increases compared to existing video data. Therefore, when transmitting video data using a medium such as an existing wired or wireless broadband line or storing it using an existing storage medium, the transmission cost and storage cost increase. In order to solve such problems caused by the high resolution and high quality of video data, high-efficiency video compression technology can be utilized.

[0003] As video compression technologies, there are various technologies such as an inter-picture prediction technology that predicts pixel values included in a current picture from a picture before or after the current picture, an intra-picture prediction technology that predicts pixel values included in the current picture using pixel information within the current picture, and an entropy coding technology that assigns short codes to values with high occurrence frequencies and long codes to values with low occurrence frequencies. By using such video compression technologies, video data can be effectively compressed and transmitted or stored.

Summary of the Invention

Problems to be Solved by the Invention

[0004] An object of the present invention is to provide a method for constructing a candidate predicted motion vector list for increasing video encoding / decoding efficiency.

[0005] Another object of the present invention is to provide an apparatus for executing a method for constructing a candidate predicted motion vector list for increasing video encoding / decoding efficiency.

Means for Solving the Problem

[0006] A method for constructing a candidate prediction motion vector list according to an aspect of the present invention for achieving the above-described object of the present invention includes: determining a plurality of spatial candidate prediction motion vector related information from peripheral prediction blocks of a prediction target block; and determining temporal candidate prediction motion vector related information based on the plurality of spatial candidate prediction motion vector related information. The spatial candidate prediction motion vector related information is information including spatial candidate prediction motion vector availability information indicating whether a spatial candidate prediction motion vector is derived and at least one of the spatial candidate prediction motion vectors, and the temporal candidate prediction motion vector related information is information including temporal candidate prediction motion vector availability information indicating whether a temporal candidate prediction motion vector is derived and at least one of the temporal candidate prediction motion vectors. The step of determining a plurality of spatial candidate prediction motion vector related information from peripheral prediction blocks of the prediction target block includes: determining first spatial candidate prediction motion vector availability information and a first spatial candidate prediction motion vector; and determining second spatial candidate prediction motion vector availability information and a second spatial candidate prediction motion vector.The step of determining the temporal candidate prediction motion vector related information based on the plurality of spatial candidate prediction motion vector availability information and the plurality of spatial candidate prediction motion vectors includes: determining whether both the first spatial candidate prediction motion vector and the second spatial candidate prediction motion vector are available and whether the first spatial candidate prediction motion vector is different from the second spatial candidate prediction motion vector based on the first spatial candidate prediction motion vector availability information, the second spatial candidate prediction motion vector availability information, the first spatial candidate prediction motion vector, and the second spatial candidate prediction motion vector; and if both the first spatial candidate prediction motion vector and the second spatial candidate prediction motion vector are available and the first spatial candidate prediction motion vector is different from the second spatial candidate prediction motion vector, determining that the temporal candidate prediction motion vector availability information indicates that the temporal candidate prediction motion vector is not available. The temporal candidate prediction motion vector related information is information including at least one of the temporal candidate prediction motion vector availability information and the temporal candidate prediction motion vector.The step of determining time candidate prediction motion vector related information based on the plurality of spatial candidate prediction motion vector availability information and the plurality of spatial candidate prediction motion vectors includes: determining whether both the first spatial candidate prediction motion vector and the second spatial candidate prediction motion vector are available and whether the first spatial candidate prediction motion vector is different from the second spatial candidate prediction motion vector based on the first spatial candidate prediction motion vector availability information, the second spatial candidate prediction motion vector availability information, the first spatial candidate prediction motion vector, and the second spatial candidate prediction motion vector; and when at least one of the first spatial candidate prediction motion vector and the second spatial candidate prediction motion vector is not available, or when both the first spatial candidate prediction motion vector and the second spatial candidate prediction motion vector are available and the first spatial candidate prediction motion vector is the same as the second spatial candidate prediction motion vector, executing an induction process of the time candidate prediction motion vector related information to determine the time candidate prediction motion vector related information. The time candidate prediction motion vector related information is information including at least one of time candidate prediction motion vector availability information and a time candidate prediction motion vector. The candidate prediction motion vector list is composed of the first spatial candidate prediction motion vector when the first spatial candidate prediction motion vector is available based on the first spatial candidate prediction motion vector availability information, the second spatial candidate prediction motion vector when the second spatial candidate prediction motion vector is available based on the second spatial candidate prediction motion vector availability information, the time candidate prediction motion vector when the time candidate prediction motion vector is available based on the time candidate prediction motion vector availability information. The time candidate prediction motion vector related information is information including at least one of time candidate prediction motion vector availability information and a time candidate prediction motion vector.The candidate prediction motion vector list construction method further includes a step of removing the second spatial candidate prediction motion vector from the candidate prediction motion vector list when the first spatial candidate prediction motion vector and the second spatial candidate prediction motion vector that constitute the candidate prediction motion vector list are the same. The candidate prediction motion vector list construction method further includes a step of determining whether the number of candidate prediction motion vectors included in the candidate prediction motion vector list is smaller than the maximum number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list, which is the maximum candidate prediction motion vector number, and a step of adding or removing a candidate prediction motion vector to / from the candidate prediction motion vector list based on the determination result. The step of adding or removing a candidate prediction motion vector to / from the candidate prediction motion vector list based on the determination result includes a step of adding a zero vector to the candidate prediction motion vector list when the number of candidate prediction motion vectors included in the candidate prediction motion vector list is smaller than the maximum candidate prediction motion vector number, and a step of removing some of the candidate prediction motion vectors from the candidate prediction motion vector list so that the candidate prediction motion vector list includes the maximum candidate prediction motion vector number of candidate prediction motion vectors when the number of candidate prediction motion vectors included in the candidate prediction motion vector list is greater than or equal to the maximum candidate prediction motion vector number.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; when 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; when 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 when 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 is information calculated through steps 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; 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 when 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; determining whether a third motion vector exists in the third block, the fourth block, or the fifth block included in the second spatial candidate prediction block group when neither the first motion vector nor the second motion vector exists in the third block, the fourth block, or the fifth block included in the second spatial candidate prediction block group; and determining whether a fourth motion vector exists in the third block, the fourth block, or the fifth block included in the second spatial candidate prediction block group when none of the first motion vector, the second motion vector, or the third motion vector exists in the third block, the fourth block, or the fifth block included in the second spatial candidate prediction block group.

[0007] A video decoding apparatus according to another aspect of the present invention for achieving the above-described object of the present invention includes an entropy decoding unit that decodes information on a prediction motion vector used for performing inter-picture prediction on a prediction target block among the candidate prediction motion vectors included in a candidate prediction motion vector list, and a prediction unit that determines a plurality of spatial candidate prediction motion vector related information from peripheral prediction blocks of the prediction target block, determines temporal candidate prediction motion vector related information based on the plurality of spatial candidate prediction motion vector related information, and generates the candidate prediction motion vector list. The spatial candidate prediction motion vector related information is information including spatial candidate prediction motion vector availability information and at least one of the spatial candidate prediction motion vectors, and the temporal candidate prediction motion vector related information is information including temporal candidate prediction motion vector availability information and at least one of the temporal candidate prediction motion vectors. The plurality of spatial candidate prediction motion vector related information is at least one of information on first spatial candidate prediction motion vector availability information and a first spatial candidate prediction motion vector, and at least one of information on second spatial candidate prediction motion vector availability information and a second spatial candidate prediction motion vector. The temporal candidate prediction motion vector related information includes at least one of temporal candidate prediction motion vector availability information and a temporal candidate prediction motion vector. Both the first spatial candidate prediction motion vector and the second spatial candidate prediction motion vector are available. When the first spatial candidate prediction motion vector and the second spatial candidate prediction motion vector are different, it is determined that the temporal candidate prediction motion vector availability information is not available for the temporal candidate prediction motion vector.When at least one of the first spatial candidate prediction motion vectors and the second spatial candidate prediction motion vectors is unavailable, or when both the first spatial candidate prediction motion vector and the second spatial candidate prediction motion vector are available and the first spatial candidate prediction motion vector is the same as the second spatial candidate prediction motion vector, the temporal candidate prediction motion vector related information is determined by executing the derivation process of the temporal candidate prediction motion vector related information. The temporal candidate prediction motion vector related information includes at least one of the temporal candidate prediction motion vector availability information and the temporal candidate prediction motion vector. The candidate prediction motion vector list includes the first spatial candidate prediction motion vector when the first spatial candidate prediction motion vector is available based on the first spatial candidate prediction motion vector availability information, the second spatial candidate prediction motion vector when the second spatial candidate prediction motion vector is available based on the second spatial candidate prediction motion vector availability information, and the temporal candidate prediction motion vector when the temporal candidate prediction motion vector is available based on the temporal candidate prediction motion vector availability information. The temporal candidate prediction motion vector related information is information including at least one of the temporal candidate prediction motion vector availability information and the temporal candidate prediction motion vector. The candidate prediction motion vector list is a list reconfigured by removing the second spatial candidate prediction motion vector when the first spatial candidate prediction motion vector is the same as the second spatial candidate prediction motion vector. The candidate prediction motion vector list is a list reconfigured by adding or removing candidate prediction motion vectors based on a determination of whether the number of candidate prediction motion vectors included in the candidate prediction motion vector list is less than the maximum number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list, which is the maximum candidate prediction motion vector number.When the number of candidate prediction motion vectors included in the candidate prediction motion vector list is smaller than the maximum number of candidate prediction motion vectors, a zero vector is added to the candidate prediction motion vector list and reconfigured. When the number of candidate prediction motion vectors included in the candidate prediction motion vector list is greater than or equal to the maximum number of candidate prediction motion vectors, a part of the candidate prediction motion vectors among the candidate prediction motion vectors is removed from the candidate prediction motion vector list so that the candidate prediction motion vectors are included in the candidate prediction motion vector list by the maximum number of candidate prediction motion vectors and reconfigured.

Effect of the Invention

[0008] As described above, according to the motion vector list configuration method according to an embodiment of the present invention and an apparatus using the method, regarding a method of configuring a candidate prediction motion vector list and calculating a prediction motion vector, the complexity generated when inducing an optimal prediction motion vector can be reduced and the coding efficiency can be increased.

Brief Description of the Drawings

[0009]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Embodiments for Carrying Out the Invention

[0010] Hereinafter, embodiments of the present invention will be specifically described with reference to the drawings. In describing the embodiments of this specification, when it is determined that a specific description of a related known configuration or function will obscure the gist of this specification, the detailed description thereof will be omitted.

[0011] When a component is referred to as being “connected” or “connected” to another component, it should be understood that it may be directly connected or connected to the corresponding other component, but there may also be other components in between. Also, in the present invention, the description of including a specific configuration does not exclude configurations other than the corresponding configuration, but means that additional configurations can be included within the scope of the implementation of the present invention or the technical idea of the present invention.

[0012] Terms such as first, second, etc. can be used to describe various components, but the components should not be limited by the terms. The terms are only used for the purpose of distinguishing one component from another. For example, unless it deviates from the scope of the rights of the present invention, the first component can be named the second component, and similarly, the second component can also be named the first component.

[0013] In addition, the components shown in the embodiments of the present invention are independently illustrated to show different characteristic functions from each other, and it does not mean that each component is configured as separate hardware or a single software configuration unit. That is, for the sake of convenience of explanation, each component is listed and included as each component, and at least two of the components are integrated to form one component, or one component can be divided into a plurality of components to perform functions. Such integrated embodiments and separated embodiments of each component are included in the scope of the rights 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 the essential functions in the present invention, but are merely optional components for improving performance. The present invention can be implemented including only the essential components for embodying the essence of the present invention excluding the components used merely for improving performance, and a structure including only the essential components excluding the optional components used merely for improving performance is also included in the scope of the rights of the present invention.

[0015] FIG. 1 is a block diagram showing the configuration of a video encoding apparatus according to an embodiment of the present invention.

[0016] Referring to FIG. 1, the video encoding apparatus 100 includes a motion prediction unit 111, a motion compensation unit 112, an intra prediction unit 120, a switch 115, a subtractor 125, a conversion unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse conversion unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190.

[0017] The video encoding device 100 can perform encoding on an input video in an intra mode or an inter mode and output a bitstream. In the case of the intra mode, switch 115 can be switched to intra, and in the case of the inter mode, switch 115 can be switched to inter. The video encoding device 100 can calculate a prediction block for an input block of the input video and then encode the difference (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 prediction block by performing spatial prediction using the pixel values of the already encoded blocks around the current block.

[0019] In the case of the inter mode, the motion prediction unit 111 can find the region in the reference video stored in the reference picture buffer 190 that best matches the input block in the motion prediction process and obtain a motion vector. The motion compensation unit 112 can calculate a prediction block by performing motion compensation using the motion vector.

[0020] The motion prediction unit 111 can generate the candidate prediction motion vector list based on a plurality of spatial candidate prediction motion vector related information derived from the surrounding prediction blocks of the prediction target block and temporal candidate prediction motion vector related information determined based on the plurality of spatial candidate prediction motion vector related information. Regarding the detailed method for generating the candidate prediction motion vector list, it will be described later in the embodiments of the present invention, and the prediction unit that performs such an operation is included in the embodiments of the present invention.

[0021] The subtractor 125 can calculate a residual block based on the difference between the input block and the calculated prediction block. The conversion unit 130 can output a transform coefficient by performing a transform on the residual block. Here, the transform coefficient can mean a coefficient value calculated by performing a transform on the residual block and / or the residual signal. Hereinafter, in this specification, the quantized transform coefficient level calculated by applying quantization to the transform coefficient can also be called the transform coefficient.

[0022] The quantization unit 140 can quantize the input transform coefficient with quantization parameters and output a quantized transform coefficient level.

[0023] The entropy encoding unit 150 can output a bit stream by performing entropy encoding based on the value calculated by the quantization unit 140 or the encoding parameter value calculated in the encoding process.

[0024] When entropy encoding is applied, a small number of bits are assigned to symbols with a high occurrence probability, and a large number of bits are assigned to symbols with a low occurrence probability, and the symbols are represented, so that the size of the bit string for the symbol to be encoded can be reduced. Therefore, the compression performance of video encoding can be improved through entropy encoding. The entropy encoding unit 150 can use encoding methods such as exponential golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) for entropy encoding.

[0025] In the entropy encoding unit 150, information regarding the prediction motion vector used for performing inter-picture prediction on the prediction target block among the candidate prediction motion vectors included in the candidate prediction motion vector list can be encoded.

[0026] The video encoding apparatus according to the embodiment of FIG. 1 performs inter prediction encoding, that is, inter-picture prediction encoding. Therefore, the currently encoded video needs to be decoded and stored for use as a reference video. Accordingly, 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 calculate a reconstructed block.

[0027] The reconstructed block passes through the filter unit 180, and the filter unit 180 can apply at least one of a deblocking filter, SAO (Sample Adaptive Offset), and ALF (Adaptive Loop Filter) to the reconstructed block or the reconstructed picture. The reconstructed block that has passed through the filter unit 180 can be stored in the reference picture buffer 190.

[0028] FIG. 2 is a block diagram showing the configuration of a video decoding apparatus 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 device 200 can receive the input of the bitstream output by the encoder and perform decoding in the intra mode or the inter mode, thereby outputting the reconstructed video, that is, the restored video. In the case of the intra mode, the switch can be switched to intra, and in the case of the inter mode, the switch can be switched to inter. The video decoding device 200 obtains the reconstructed residual block restored from the received bitstream, calculates the prediction block, and then adds the reconstructed residual block and the prediction block to calculate the reconstructed block, that is, the restored block.

[0031] The entropy decoding unit 210 can perform entropy decoding on the input bitstream according to the probability distribution and calculate 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, symbols with a high occurrence probability are assigned a small number of bits, and symbols with a low occurrence probability are assigned a large number of bits to represent the symbols, so that the size of the bit sequence for each symbol can be reduced. Therefore, the compression performance of video decoding can be improved through the entropy decoding method.

[0033] In the entropy decoding unit 210, information on the prediction motion vector used for performing inter-picture prediction on the prediction target block among the candidate prediction motion vectors included in the candidate prediction motion vector list can be decoded.

[0034] The quantized coefficients are inverse quantized by the inverse quantization unit 220 and inverse transformed by the inverse transform unit 230. As a result of the inverse quantization / inverse transformation of the quantized coefficients, the reconstructed residual block can be calculated.

[0035] In the case of the intra mode, the intra prediction unit 240 can calculate a prediction block by performing spatial prediction using the pixel values of the already decoded blocks around the current block. In the case of the inter mode, the motion compensation unit 250 can calculate a prediction block by performing motion compensation using the motion vector and the reference video stored in the reference picture buffer 270.

[0036] In the case of the inter mode, a candidate prediction motion vector list can be generated based on a plurality of spatial candidate prediction motion vector related information derived from the peripheral prediction blocks of the prediction target block and temporal candidate prediction motion vector related information determined based on the plurality of spatial candidate prediction motion vector related information. A detailed method for generating the candidate prediction motion vector list will be described in detail in the embodiments of the present invention below. A decoding apparatus including a prediction unit that executes such an embodiment is included in the scope of the rights of the present invention.

[0037] The restored residual block and the prediction block are added via the adder 255, and the added block can pass through the filter unit 260. The filter unit 260 can apply at least one of a deblocking filter, SAO, and ALF to the restored block or the restored picture. The filter unit 260 can output the reconstructed video, that is, the restored video. The restored video can be stored in the reference picture buffer 270 and used for inter prediction.

[0038] Methods for improving the prediction performance of an encoding / decoding apparatus include a method of increasing the accuracy of an interpolation video and a method of predicting a difference signal. Here, the difference signal is a signal indicating the difference between the original video and the prediction video. In the present invention, the "difference signal" can be used interchangeably with "differential signal", "residual block", or "differential block" depending on the context, and those having ordinary knowledge in the relevant technical field can distinguish this within a range that does not affect the idea and essence of the invention.

[0039] As described above, hereinafter, in the embodiments of the present invention, for convenience of explanation, a coding unit is defined as an encoding unit and used. However, it can also be a unit for performing not only encoding but also decoding. Further, hereinafter, a unit or a block means a unit of video encoding and decoding, and the encoding or decoding unit at the time of video encoding and decoding means the divided unit when one video is divided into subdivided units for encoding or decoding. Therefore, it may be referred to as a macroblock, a coding unit (CU), a prediction unit (PU), a transform unit (TU), a transform block, etc. One block can be divided into lower blocks with a smaller size. The prediction unit is a basic block at the time of performing prediction / compensation. The prediction unit can also be divided into a plurality of partitions. A plurality of partitions are also basic blocks at the time of performing prediction, and the partitions obtained by dividing the prediction unit are also referred to as prediction units.

[0040] The video encoding method and the video decoding method described later in the embodiments of the present invention can be executed by each component included in the video encoder and the video decoder detailed in FIGS. 1 and 2. The meaning of a component includes not only a hardware meaning but also a software processing unit that can be executed via an algorithm.

[0041] FIG. 3 is a conceptual diagram showing a spatial candidate prediction block and a temporal candidate prediction block for calculating a candidate prediction motion vector according to an embodiment of the present invention.

[0042] Let the position of the pixel existing at the upper left end of the prediction target block be (xP, yP), and define the width of the prediction target block by a variable nPSW and the height of the prediction target block by a variable nPSH. MinPuSize can indicate the size of the smallest prediction block.

[0043] Hereinafter, in the embodiments of the present invention, the spatially neighboring prediction blocks of the prediction target block include a block including pixels existing at (xP - 1, yP + nPSH) as the first left block (A0 block) 300, and a block including pixels existing at (xP - 1, yP + nPSH - MinPuSize) as the second left block (A1 block) 310 and are used. Also, a block including pixels located at (xP + nPSW, yP - 1) is defined as the first upper block (B0 block) 320, a block including pixels located at (xP + nPSW - MinPuSize, yP - 1) is defined as the second upper block (B1 block) 330, and a block including pixels located at (xP - MinPuSize, yP - 1) is defined as the third upper block (B2 block) 340 and are used.

[0044] The spatially candidate prediction blocks can include the first left block (A0) 300, the second left block (A1, 310), the first upper block (B0) 320, the second upper block (B1) 330, and the third upper block (B2) 340. The spatially candidate prediction groups can be divided into two groups. A group including the first left block 300 and the second left block 310 is defined as the first spatially candidate prediction group, and a group including the first upper block 320, the second upper block 330, and the third upper block 340 can be defined as the second spatially candidate prediction group.

[0045] The temporal candidate prediction block 350 is a prediction block that includes a pixel at the position (xP + nPSW, yP + nPSH) in the Colocated Picture of the current prediction block based on the pixel position (xP, yP) in the picture including the current prediction target block. Or, when a prediction block including a pixel at the position (xP + nPSW, yP + nPSH) is not available, it can be a prediction block including a pixel at the position (xP + (nPSW >> 1), yP + (nPSH >> 1)). A prediction block including a pixel at the position (xP + nPSW, yP + nPSH) in the Colocated Picture is referred to as the first Colocated Block, and a prediction block including a pixel at the position (xP + (nPSW >> 1), yP + (nPSH >> 1)) in the Colocated Picture can be referred to as the second Colocated Block.

[0046] The positions and numbers of the spatial candidate prediction blocks and the positions and numbers of the temporal candidate prediction blocks disclosed in FIG. 3 are arbitrary, and the positions and numbers of the spatial candidate prediction blocks and the positions and numbers of the temporal candidate prediction blocks can change as long as they do not deviate from the essence of the present invention. Also, when constructing the candidate predicted motion vector list, the order of the prediction blocks preferentially scanned can also change. That is, hereinafter, the positions, numbers, scanning orders, candidate prediction groups, etc. of the candidate prediction blocks used when constructing the candidate predicted motion vector list described in the embodiments of the present invention are only one example, and can change as long as they do not deviate from the essence of the present invention. At this time, the candidate predicted motion vector list (Candidate Predicted Motion Vector List) means a list constructed using candidate predicted motion vectors.

[0047] FIG. 4 is a conceptual diagram for explaining a method of classifying motion vectors of spatial candidate prediction blocks through the 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.

[0048] Referring to FIG. 4, the motion vector of the spatial candidate prediction block calculated from the same reference frame and the same reference picture list as the prediction target block is referred to as the first motion vector 400. Referring to FIG. 4, assuming that the reference picture of the prediction target block 450 is the j picture and the reference picture list containing the j picture is the L0 list, since the reference picture indicated by the vector 400 of the spatial candidate prediction block 470 is the j picture and the reference picture list containing the j picture is the L0 list, the motion vector of the spatial candidate prediction block 470 and the motion vector of the prediction target block have the same reference picture and the same reference picture list. Thus, the motion vector calculated from the same reference frame and the same list as the prediction target block is defined as the first motion vector 400.

[0049] The motion vector of the spatial candidate prediction block 470 that has the same reference frame as the prediction target block 450 and is calculated from different reference picture lists is referred to as the second motion vector 410. Assuming that the reference picture of the prediction target block 450 is the j picture and the reference picture list containing the j picture is the L0 list, since the reference picture indicated by the vector of the spatial candidate prediction block 470 is the j picture and the reference picture list containing the j picture is the L1 list, the motion vector 410 of the spatial candidate prediction block and the motion vector of the prediction target block have the same reference picture but different reference picture lists. Thus, the motion vector that has the same reference frame as the prediction target block but is calculated from different lists is defined as the second motion vector 410.

[0050] A motion vector of a spatial candidate prediction block having a reference frame different from that of a prediction target block and calculated from the same reference picture list is referred to as a third motion vector 420. When it is assumed that the reference picture of the prediction target block 450 is the j picture and the reference picture list including the j picture is the L0 list, the reference picture indicated by the vector 420 of the spatial candidate prediction block 470 is the i picture, and since the reference picture list including the i picture is the L0 list, the motion vector of the spatial candidate prediction block and the motion vector of the prediction target block have different reference pictures but the same reference picture list. In this way, although the reference frames are different from the prediction target block 450, the motion vector calculated from the same list is defined as the third motion vector 420. In the case of the third motion vector 420, since the prediction target block and the reference picture are different from each other, when using the motion vector of the spatial candidate prediction block, it can be included in the candidate prediction motion vector list after being scaled based on the reference picture of the prediction target block.

[0051] The motion vector of the spatial candidate prediction block 470, which has a reference frame different from that of the prediction target block 450 and is calculated from different reference picture lists, is referred to as the fourth motion vector 430. Assuming that the reference picture of the prediction target block 450 is the j picture and the reference picture list containing the j picture is the L0 list, the reference picture indicated by the vector 430 of the spatial candidate prediction block 470 is the m picture, and since the reference picture list containing the m picture is the L1 list, the motion vector of the spatial candidate prediction block and the motion vector of the prediction target block have different reference pictures and different reference picture lists. Thus, the motion vector calculated from a reference frame different from that of the prediction target block and different reference picture lists is defined as the fourth motion vector 430. Since the fourth motion vector 430 also has a reference picture different from that of the prediction target block 450, when using the motion vector of the spatial candidate prediction block, scaling can be performed based on the reference picture of the prediction target block so that it can be included in the candidate prediction motion vector list.

[0052] The motion vector of the spatial candidate prediction block can be classified into the first to fourth motion vectors as described above according to the reference frame and reference picture list of the prediction target block. In the case of the first and second motion vectors, they are vectors that can be used without performing scaling and are defined as non-scaling motion vectors that do not perform scaling. In the case of the third and fourth motion vectors, they are vectors that can be used without performing scaling and can be defined and used as scaling motion vectors.

[0053] The method of classifying the motion vector of the spatial candidate prediction block into the first to fourth motion vectors can be used when determining the motion vector that is preferentially used as the candidate prediction motion vector among the motion vectors of the spatial candidate prediction block described in the embodiments of the present invention below.

[0054] Hereinafter, in the embodiments of the present invention, a motion vector selected as the optimal motion vector among candidate predicted motion vectors such as the first to fourth motion vectors can be defined as the predicted motion vector.

[0055] FIG. 5 is a flowchart showing a method for calculating candidate predicted motion vectors according to an embodiment of the present invention.

[0056] The candidate predicted motion vector means including at least one or more of a spatial candidate predicted motion vector and a temporal candidate predicted motion vector.

[0057] In the candidate predicted motion vector calculation method according to the embodiments of the present invention, in inducing the candidate predicted motion vector, the induction process can be executed in parallel. For example, in inducing the candidate predicted motion vector, when one candidate predicted motion vector is induced from each of two spatial candidate prediction groups (the first spatial candidate prediction group, the second spatial candidate prediction group), and one candidate predicted motion vector is induced from the temporal candidate prediction block, the operations of calculating the candidate predicted motion vectors from the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block can be executed in parallel. The fact that the candidate predicted motion vector induction process is executed in parallel means that the complexity of the candidate predicted motion vector induction process can be reduced.

[0058] Referring to FIG. 5, the step of calculating the first spatial candidate predicted motion vector from the first spatial candidate prediction group (step S500), the step of calculating the spatial candidate predicted motion vector from the second spatial candidate prediction group (step S520), and the step of calculating the temporal candidate predicted motion vector from the temporal candidate prediction block (step S540) are executed in parallel.

[0059] The steps for calculating candidate prediction motion vectors executed 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 candidate prediction motion vectors are induced in parallel. For example, the step of calculating candidate prediction motion vectors from the temporal candidate prediction block is removed, and only the step of calculating candidate prediction motion vectors from the first spatial candidate prediction group and the step of calculating candidate prediction motion vectors from the second spatial candidate prediction group can be executed in parallel.

[0060] In the candidate prediction motion vector induction method according to an embodiment of the present invention,

[0061] A) A method of using only unscaled motion vectors (the first motion vector or the second motion vector), which are prediction motion vectors that do not perform scaling, as candidate prediction motion vectors.

[0062] B) A method of using a third motion vector or a fourth motion vector that does not perform scaling as a candidate prediction motion vector when there is no unscaled motion vector (the first motion vector or the second motion vector).

[0063] Candidate prediction motion vectors can be calculated through this.

[0064] FIG. 6 is a flowchart showing a method for calculating candidate prediction motion vectors according to another embodiment of the present invention.

[0065] Referring to FIG. 6, it is sequentially determined whether there is an unscaled motion vector (the first motion vector or the second motion vector) in order from the left first block to the left second block (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 mean unscaled candidate prediction motion vectors that do not require scaling.

[0067] In step S600, for example, the presence or absence of a candidate prediction motion vector can be determined in the following order.

[0068] (1) Determine whether a non-scaling candidate prediction motion vector exists in the left first block. If a non-scaling candidate prediction motion vector exists in the left first block, determine the corresponding non-scaling candidate prediction motion vector as the candidate prediction motion vector.

[0069] (2) If a non-scaling candidate prediction motion vector does not exist in the left first block, determine whether a non-scaling candidate prediction motion vector exists in the left second block. If a non-scaling candidate prediction motion vector exists in the left second block, determine the corresponding non-scaling candidate prediction motion vector as the candidate prediction motion vector.

[0070] (3) If a non-scaling candidate prediction motion vector does not exist in the left second block, do not calculate a candidate prediction motion vector from the first spatial candidate prediction group (the left first block and the left second block).

[0071] As another example in step S600, the presence or absence of a candidate prediction motion vector can be determined in the following order.

[0072] (1) Determine whether a first motion vector exists in the left first block. If a first motion vector exists in the left first block, determine the corresponding vector as the candidate prediction motion vector.

[0073] (2) If a first motion vector does not exist in the left first block, determine whether a first motion vector exists in the left second block. If a first motion vector exists in the left second block, determine the corresponding vector as the candidate prediction motion vector.

[0074] (3) If there is no first motion vector in the second block on the left, determine whether there is a second motion vector in the first block on the left. If there is a second motion vector in the first block on the left, determine the corresponding vector as the candidate predicted motion vector.

[0075] (4) If there is no second motion vector in the first block on the left, determine whether there is a second motion vector in the second block on the left. If there is a second motion vector in the second block on the left, determine the corresponding vector as the candidate predicted motion vector.

[0076] The order as described above is merely an example of a method for calculating the non-scaling candidate predicted motion vector from the first spatial candidate prediction group, and it is also possible to calculate the non-scaling candidate predicted motion vector from the first spatial candidate prediction group through other orders.

[0077] As described above, as a result of the determination through step S600, if there is no non-scaling candidate predicted motion vector, the candidate predicted motion vector is not calculated from the first spatial candidate prediction group (the first block on the left and the second block on the left).

[0078] If there is a non-scaling candidate predicted motion vector through the method of calculating the non-scaling candidate predicted motion vector from the first spatial candidate prediction group, set the first spatial candidate prediction group availability information (for example, availableFlagLXY) to 1, and it can be indicated that there is a candidate predicted motion vector in the first spatial candidate prediction group. 1 is an arbitrary binary number for indicating the presence or absence of the candidate predicted motion vector, and the same meaning can also be included through other binary codes. The binary numbers 1 and 0 for indicating the content of the predetermined information in the embodiments of the present invention are arbitrary, and the corresponding information can be expressed based on codes calculated using other binary encoding methods or other encoding methods.

[0079] As another example, when there is no unscaled candidate prediction motion vector calculated through step S600, it is sequentially determined whether there is a scaled motion vector (the third motion vector or the fourth motion vector) in the left first block and the left second block (step S610).

[0080] For example, in step S610, it is possible to determine whether there is a scaled motion vector through the following steps.

[0081] (1) After sequentially determining whether there is a third motion vector or a fourth motion vector in the left first block, if there is a third motion vector or a fourth motion vector in the left first block, the corresponding third motion vector or fourth motion vector is determined as the candidate prediction motion vector without scaling.

[0082] (2) If there is no third motion vector or fourth motion vector in the left first block, it is sequentially determined whether there is a third motion vector to a fourth motion vector in the left second block. If there is a third motion vector or a fourth motion vector in the left second block, the corresponding third motion vector or fourth motion vector is determined as the candidate prediction motion vector without scaling.

[0083] That is, when there is no unscaled candidate prediction motion vector in the first spatial candidate prediction group, a scaled candidate prediction motion vector (the third motion vector or the fourth motion vector) is calculated from the first spatial candidate prediction group (the left first block and the left second block), and a motion vector without performing scaling can be calculated as the candidate prediction motion vector.

[0084] As a method for sequentially determining whether a scaling candidate prediction motion vector (the third motion vector or the fourth motion vector) exists in the left first block and the left second block which are step S610, various methods can be used, such as the method for calculating a scaling motion vector (the first motion vector or the first motion vector) from the left first block and the left second block described above. Such various embodiments are also included in the scope of the rights of the present invention.

[0085] When there exists a motion vector satisfying the conditions through step S600 or steps S600 to S610, the availability information of the first spatial candidate prediction group is set to 1, and the subsequent procedure for determining the existence of a motion vector is not executed.

[0086] In the second spatial candidate prediction group, a candidate prediction motion vector can be calculated in the same manner.

[0087] It is sequentially determined whether non-scaling motion vectors exist in the upper first block, the upper second block, and the upper third block in this order (step S620).

[0088] Step S620 for calculating a candidate prediction motion vector from the second spatial candidate prediction group can be executed in parallel with at least one of step S600 or step S610 for calculating a candidate prediction motion vector from the first spatial candidate prediction group, as described above.

[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 first block at the upper end to the third block at the upper end. If no first motion vector exists from the first block at the upper end to the third block at the upper end, it is determined whether a second motion vector exists in the order from the first block at the upper end to the third block at the upper end, or it is determined whether a first motion vector or a second motion vector exists in the first block at the upper end. Next, it is determined whether a first motion vector or a second motion vector exists in the second block at the upper end, and a spatial candidate prediction motion vector can be calculated through a method of determining whether a first motion vector or a second motion vector exists in the third block at the upper end.

[0090] The determination procedure of step S620 can be executed in various ways, similar to step S600, and such various determination procedures are included in the scope of the rights of the present invention.

[0091] If a candidate prediction motion vector that meets the conditions exists in the first block at the upper end to the third block at the upper end based on the sequential determination procedure of step S620, the subsequent determination procedure is not executed. The calculated motion vector can be included in the candidate prediction motion vector list, the availability information of the second spatial candidate prediction group can be set to 1, and it can be indicated that a candidate prediction motion vector exists in the second spatial candidate prediction group.

[0092] Similar to step S600, if no first motion vector or second motion vector, which is a non-scaling candidate prediction motion vector, exists in the first block at the upper end to the third block at the upper end through step S620, no candidate prediction motion vector is calculated from the second spatial candidate prediction group.

[0093] As another example, as a result of determining whether there is a non-scaling motion vector in the first upper block, the second upper block, and the third upper block via step S620, if there is no non-scaling motion vector, it is sequentially determined whether there is a scaling motion vector (the third motion vector and the fourth motion vector) in the first upper block, the second upper block, and the third upper block (step S630).

[0094] As a result of sequentially determining whether there is a first motion vector or a second motion vector in the first upper block, the second upper block, and the third upper block in this order via step S620, if a vector that meets the conditions cannot be found, a candidate predicted motion vector can be calculated via step S630.

[0095] If it is determined via step S630 that there is a third motion vector or a fourth motion vector in at least one of the first upper block, the second upper block, and the third upper block, the third motion vector and the fourth motion vector that do not perform scaling without performing scaling on the corresponding vector can be included in the candidate predicted motion vector list.

[0096] The procedure for determining whether there is a third motion vector or a fourth motion vector in at least one of the first upper block, the second upper block, and the third upper block can be executed using various determination methods, such as the method of calculating a motion vector from the first spatial candidate prediction group.

[0097] If there is a motion vector that meets the conditions via steps S620 and S630, one candidate predicted motion vector can be calculated from the second spatial candidate prediction group.

[0098] It is determined whether there is a candidate predicted motion vector in the temporal candidate prediction block (Colocated block) (step S640).

[0099] Step S640 for determining whether there is a candidate prediction motion vector in the temporal candidate prediction block can be executed in parallel with step S600 or S610 for calculating a candidate prediction motion vector from the first spatial candidate prediction group and step S620 or S630 for calculating a candidate prediction motion vector from the second spatial candidate prediction group.

[0100] As described above, the temporal candidate prediction block can be divided into a first Colocated block and a second Colocated block. After determining the availability of the first Colocated block, if the first Colocated block is not available, the second Colocated block can be selected as the Colocated block.

[0101] The Colocated picture including the temporal candidate prediction block can be one of the reference pictures in the reference picture list of the current picture according to predetermined information. Moreover, various methods can be used to calculate the Colocated picture including the temporal candidate prediction block. For a temporal candidate prediction block using two reference picture lists, only the motion vectors existing in one list can be preferentially used as candidate prediction motion vectors according to predetermined flag information. When the distance between the current picture and the reference picture of the current picture is different from the distance between the 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 the temporal candidate prediction block (Colocated block). For example, when an implementation for reducing computational complexity is required, scaling is not performed, or the scaling for the temporal candidate prediction block is not performed by setting not to perform scaling adaptively on the motion vector of the Colocated block via flag information.

[0103] When the candidate prediction motion vector calculated from the temporal candidate prediction block can be calculated, the temporal candidate prediction block availability information can be set to 1.

[0104] That is, in an embodiment of the present invention, by executing in parallel the procedure of determining whether there is a candidate prediction motion vector available in the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block, when calculating the candidate prediction motion vector, the dependency generated when calculating the candidate prediction motion vector from the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block can be removed.

[0105] Also, when determining in parallel whether there is a candidate prediction motion vector available in the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block, only the determination of whether there is a candidate prediction motion vector available in the first spatial candidate prediction group and the second spatial candidate prediction group is performed in parallel, and the procedure of determining whether there is a candidate prediction motion vector available in the temporal candidate prediction block is executed dependently. Similarly, when calculating the candidate prediction motion vector 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 a process of calculating the candidate prediction motion vector 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, an available candidate prediction motion vector can be indicated by using an availability information flag (availableFlagLXY or availableFlagCol).

[0107] As described above, when calculating the candidate prediction motion vector, as described above, the number and position of the blocks included in the first spatial candidate prediction group, the number and position of the blocks included in the second spatial candidate prediction group, and the number and position of the temporal candidate prediction blocks are arbitrary, and the number and position of the blocks included in the first spatial candidate prediction group and the second spatial candidate prediction group can change, and such embodiments are also included in the scope of the present invention's rights.

[0108] FIG. 7 is a flowchart showing a method for calculating a candidate prediction motion vector according to another embodiment of the present invention.

[0109] According to an embodiment of the present invention, when inducing a candidate prediction motion vector from the first spatial candidate prediction group and the second spatial candidate prediction group, individual scaling is performed regardless of whether scaling has been performed on the motion vector calculated from other candidate prediction blocks, so that the candidate prediction motion vector can be induced in parallel.

[0110] Induce a candidate prediction motion vector from the first spatial candidate prediction group (the first block on the left, the second block on the left).

[0111] To induce a candidate prediction motion vector from the first spatial candidate prediction group, it is possible to determine whether there is a non-scaled motion vector (the first motion vector or the second motion vector) in the first spatial candidate prediction group (step S700).

[0112] The method detailed in step S600 can be used to determine whether a non-scaling motion vector (the first motion vector or the second motion vector) exists in the first spatial candidate prediction group.

[0113] It is possible to determine whether a scaling motion vector (the third motion vector or the fourth motion vector) exists in the first spatial candidate prediction group in order to derive a candidate prediction motion vector from the first spatial candidate prediction group (step S710).

[0114] Based on the determination result through step S700, if no non-scaling motion vector exists, it is possible to determine whether a scaling motion vector (the third motion vector or the fourth motion vector) exists and select the scaling motion vector (the third motion vector or the fourth motion vector) as the candidate prediction motion vector.

[0115] In step S710, it is possible to determine whether the third motion vector or the fourth motion vector exists in the first spatial candidate prediction group by various methods as in step S610. In step S710, different from step S610, the third motion vector and the fourth motion vector calculated after performing scaling can be used as the candidate prediction motion vectors.

[0116] Derive a candidate prediction motion vector from the second spatial candidate prediction group (the upper first block, the upper second block, the upper third block).

[0117] It is possible 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 in order 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 is possible to determine whether a scaling motion vector (the third motion vector or the fourth motion vector) exists in the second spatial candidate prediction group in order to derive a candidate prediction motion vector from the second spatial candidate prediction group (step S730).

[0120] If, as a result of the determination via step S720, no non-scaling motion vector exists, a scaling motion vector (the third motion vector or the fourth motion vector) can be selected as the candidate prediction motion vector.

[0121] In step S730, it is possible to determine whether the third motion vector or the fourth motion vector exists in the second spatial candidate prediction group by various methods as in step S630, and in step S730, unlike step S630, the third motion vector and the fourth motion vector calculated after performing scaling can be used as the candidate prediction motion vectors.

[0122] Whether to perform scaling on the third motion vector and the fourth motion vector calculated from the second spatial candidate prediction group can be independently performed regardless of whether scaling was performed to calculate the candidate prediction motion vector from the first spatial candidate prediction group.

[0123] Determine whether a candidate prediction motion vector exists in the temporal candidate prediction block (Colocated block) (step S740).

[0124] Step S740 for determining whether there is a candidate prediction motion vector in the temporal candidate prediction block can be executed in parallel with step S700 or S710 for calculating the candidate prediction motion vector from the first spatial candidate prediction group described above or step S720 or S730 for calculating the candidate prediction motion vector from the second spatial candidate prediction group.

[0125] As described above, the temporal candidate prediction block can be divided into a plurality of 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 the availability of the first Colocated block, if the first Colocated block is not available, the second Colocated block can be selected as the Colocated block.

[0126] According to an embodiment of the present invention, independent scaling can be performed on the candidate prediction motion vector calculated from the temporal candidate prediction block without determining the scalability of 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. Also, scaling is not performed on the temporal candidate prediction block (Colocated block) by other methods. For example, when an embodiment for reducing the computational complexity is required, scaling is not performed, or scaling is not performed on the motion vector of the Colocated block through a method of setting not to perform adaptive scaling via flag information. 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 available candidate prediction motion vector can be indicated using the availability information flag (availableFlagLXY or availableFlagCol).

[0127] Similar to FIG. 6, as described above, when calculating the candidate prediction motion vector, as described above, the number and position of the blocks included in the first spatial candidate prediction group, the number and position of the blocks included in the second spatial candidate prediction group, and the number and position of the temporal candidate prediction blocks are arbitrary. The number and position of the blocks included in the first spatial candidate prediction group and the second spatial candidate prediction group can change, and such embodiments are also included in the scope of the rights of the present invention.

[0128] As shown in FIG. 7, it is also possible to perform scaling on both the first spatial candidate prediction group and the second spatial candidate prediction group. However, according to the embodiments of the present invention, it is also possible to perform scaling only on at least one of the first spatial candidate prediction group and the second spatial candidate prediction group.

[0129] For example, scaling can be performed only on the first spatial candidate prediction group. When performing scaling only on the first spatial candidate prediction group, it is similar to FIG. 7. However, in step S730 of FIG. 7, after determining whether there is a scaling motion vector (the third motion vector or the fourth motion vector) in the second spatial candidate prediction group to derive the candidate prediction motion vector from the second spatial candidate prediction group, a third motion vector or a fourth motion vector that does not perform scaling without performing scaling on the scaling motion vector (the third motion vector or the fourth motion vector) can be used as the candidate prediction motion vector.

[0130] Similarly, scaling can also be performed only for the second spatial candidate prediction group. In such a case, in step S710, after determining whether there is a scaling motion vector (the third motion vector or the fourth motion vector) in the first spatial candidate prediction group to derive a candidate prediction motion vector from the first spatial candidate prediction group, a third motion vector or a fourth motion vector that does not perform scaling without performing scaling on the scaling motion vector (the third motion vector or the fourth motion vector) can be used as the candidate prediction motion vector.

[0131] As another method, it is possible to use predetermined flag information indicating whether scaling is possible to use only one scaling for the candidate prediction motion vector. For example, when one scaling is performed in the first spatial candidate prediction group, scaling is not performed in the second spatial candidate prediction group, and when scaling is not performed in the first spatial candidate prediction group, the flag information can be used to indicate whether scaling is possible so that scaling is used in the second spatial candidate prediction group.

[0132] FIG. 8 is a flowchart showing a process of calculating an additional candidate prediction motion vector according to an embodiment of the present invention.

[0133] In FIG. 8, when the number of candidate prediction motion vectors included in the current candidate prediction motion vector list is not the maximum based on the number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list, a method of adding an additional candidate prediction motion vector to the candidate prediction motion vector list is disclosed. When predicting a motion vector using the method of adding an additional candidate prediction motion vector to the candidate prediction motion vector list, the coding efficiency can be improved.

[0134] Referring to FIG. 8, it is determined whether the number of candidate prediction motion vectors derived from the spatial candidate prediction group or the temporal candidate prediction block is less than the size of the candidate prediction motion vector list (step S800).

[0135] When the number of the derived candidate prediction motion vectors is the same as the number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list, only the derived candidate prediction motion vectors can be included in the candidate prediction motion vector list and used as the candidate prediction motion vectors of the prediction target block. Hereinafter, in the embodiments of the present invention, the number of the derived candidate prediction motion vectors means the number of the remaining candidate prediction motion vectors after removing the overlapping candidate prediction motion vectors from the candidate prediction motion vectors derived from the spatial candidate prediction group and the temporal candidate prediction block.

[0136] When the number of the derived candidate prediction motion vectors is less than the number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list, additional candidate prediction motion vectors are calculated (step S810).

[0137] As methods for calculating additional candidate prediction motion vectors, various candidate prediction motion vector calculation methods can be used, such as a method of performing scaling, a method of using an offset, and a method of using statistical results. Hereinafter, the method for calculating additional candidate prediction motion vectors in the embodiments of the present invention will be disclosed in detail.

[0138] It is determined whether the calculated additional candidate prediction motion vectors overlap with the motion vectors included in the candidate prediction motion vector list (step S820).

[0139] When the calculated additional candidate prediction motion vectors overlap with the motion vectors included in the candidate prediction motion vector list, new additional candidate prediction motion vectors are derived (step S810).

[0140] If the calculated additional candidate prediction motion vector does not overlap with the motion vectors included in the candidate prediction motion vector list, include the calculated additional candidate prediction motion vector in the candidate prediction motion vector list (step S830).

[0141] FIG. 9 is a flowchart showing a method for calculating an additional candidate prediction motion vector according to another embodiment of the present invention.

[0142] FIG. 9 shows a method using scaling among the methods for deriving the additional candidate prediction motion vector detailed in step S810.

[0143] Referring to FIG. 9, the spatial candidate prediction block 900 can be assumed to be a prediction block that performs inter-picture prediction based on two motion vectors (the motion vector 920 referring to the n-1 pictures included in the reference picture list L0 and the motion vector 940 referring to the n+1 pictures included in the reference picture list L1).

[0144] When calculating the candidate prediction motion vector of the prediction target block, among the motion vectors of the upper prediction block, the motion vector 920 referring to the n-1 pictures of the reference picture list L0 is removed from the candidate prediction motion vector list for duplicate removal. Assuming that only the motion vector 940 referring to the n+1 pictures of the remaining reference picture list L1 is used as the candidate prediction motion vector, the motion vector 940 referring to the reference picture list L1 that has not yet been used as the additional candidate prediction motion vector can be scaled and the derived motion vector can be used as the additional candidate prediction motion vector.

[0145] That is, a motion vector that references the n+1 pictures in the reference picture list L1 direction can be included in the candidate prediction motion vector list as an additional candidate prediction motion vector by performing scaling based on the distance between the reference picture n-1 included in the L0 list of the current prediction block and the n+1 pictures in the reference picture list L1 direction. Such a motion vector can be defined as an inverse direction scaling candidate prediction motion vector.

[0146] That is, according to an embodiment of the present invention, when a candidate prediction motion vector is derived from a prediction 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 prediction block and induced and used as an additional candidate prediction motion vector.

[0147] As a method for calculating an additional candidate prediction motion vector according to another embodiment of the present invention, a method based on an offset can be used.

[0148] For example, when one of the candidate prediction motion vectors in the candidate prediction motion vector list is {mvp_x, mvp_y}, an additional candidate prediction motion vector {mvp_x+α, mvp_y+β} can be induced by adding respective offsets α and β to the X component and Y component of the motion vector.

[0149] At this time, the offset value can be transmitted in units of picture, slice, LCU (largest coding unit), CU unit, and PU unit.

[0150] The offset value can be calculated based on the encoded / decoded motion vector difference (MVD) value. A high priority can be assigned to the MVD value that occurs most frequently based on a specific video unit and used as the offset value. A list having priorities in the order of the frequently occurring MVD values can be calculated. When there are a plurality of additional candidate prediction motion vectors, an offset can be added to the candidate prediction motion vectors in the candidate prediction motion vector list in the order of priority in the list to derive new candidate prediction motion vectors.

[0151] As a method for calculating additional candidate prediction motion vectors according to another embodiment of the present invention, a statistical method can be used.

[0152] For example, the motion vectors of the prediction blocks included in a predetermined slice can be sorted in the order of occurrence frequency, and at least one of the sorted motion vector values can be used as the candidate prediction motion vector of the prediction target block. At this time, in order to reduce the complexity, a predetermined limit value can be set to limit the number of motion vector values for checking the occurrence possibility and the frequency number to a certain number.

[0153] As another embodiment of using a statistical method for calculating additional candidate prediction motion vectors, the candidate prediction motion vector value having the highest occurrence frequency in the already encoded and decoded slices can be used as the additional candidate prediction motion vector.

[0154] At this time, referring to the motion vectors of the picture or slice to be encoded / decoded or the encoded / decoded picture or slice cannot be normally referred to when an error occurs in the bitstream. Therefore, at least one or more of the motion vectors having a high occurrence frequency can be encoded / decoded by upper level syntax elements (picture parameter set, adaptive parameter set, slice header, etc.) in the bitstream.

[0155] FIG. 10 is a flowchart showing a method for calculating a predicted motion vector according to an embodiment of the present invention.

[0156] Hereinafter, the predicted motion vector can be used as a term defining the motion vector selected as the optimal motion vector among the candidate predicted motion vectors.

[0157] Referring to FIG. 10, it is possible to determine whether the predicted motion vector of the prediction target block is a zero vector and receive an input via syntax element information. When information indicating that the predicted motion vector is a zero vector is transmitted via the syntax element information, the candidate predicted motion vector list information and index information for determining the candidate predicted motion vector to be used as the predicted motion vector of the prediction target block are not additionally encoded and decoded, thereby reducing the complexity of the encoding and decoding processes. At this time, the zero vector means a (0, 0) vector in which both the x component and the y component values of the vector are 0.

[0158] Determine whether the predicted motion vector is a zero vector (step S1000).

[0159] Determine whether the predicted motion vector used for the prediction target block to calculate the predetermined syntax element information is a zero vector.

[0160] If the predicted motion vector is a zero vector, set the zero vector determination flag (zero_mvp_flag), which is a syntax element, to 1 (step S1010). If the predicted motion vector is not a zero vector, set the zero vector determination flag, which is a syntax element, to 0 (step S1020).

[0161] The zero vector determination flag (zero_mvp_flag), which is a syntax element, is an example of a flag indicating that the predicted motion vector used for the current prediction block is a zero vector. The information that the predicted motion vector used for the prediction target block is a zero vector can be represented by syntax element information in other forms that are not flag information.

[0162] If the predicted motion vector is not a zero vector, the index information of the predicted motion vector is encoded (step S1030).

[0163] If the predicted motion vector is not a zero vector, based on the candidate predicted motion vector list calculated using the method for calculating candidate predicted motion vectors as detailed in FIGS. 3 to 8, the index information for the vector used as the predicted motion vector among the candidate predicted motion vectors can be encoded.

[0164] FIG. 11 is a flowchart showing a method for calculating a predicted motion vector according to another embodiment of the present invention.

[0165] In FIG. 11, a decoding method based on the encoding method of the predicted motion vector detailed in FIG. 10 is disclosed.

[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, the information that the predicted motion vector used for the prediction target block is a zero vector can be represented by syntax element information combined with other information that is not flag information or syntax element information in other forms. Also, 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 predicted motion vector of the prediction target block is determined to be a zero vector (step S1110).

[0169] When the zero vector determination 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 fact that the zero vector determination flag values are 0 and 1 is a value arbitrarily set to indicate whether the predicted motion vector of the block to be predicted is a zero vector.

[0171] When the zero vector determination flag information is 0, the index information of the predicted motion vector can be decoded to calculate the predicted motion vector of the block to be predicted.

[0172] Based on the decoded index information, the predicted motion vector of the current prediction block is determined.

[0173] Table 1 shows the syntax structure including the zero vector determination flag.

[0174]

Table 1

[0175] Referring to Table 1, by executing the process of decoding the index information of the candidate predicted motion vector according to whether the zero vector determination flag is 1, the process of calculating the candidate predicted motion vector and the candidate predicted motion vector list is not selectively executed unnecessarily in the decoding process.

[0176] FIG. 12 is a flowchart showing a method for calculating a predicted motion vector according to an embodiment of the present invention.

[0177] Referring to FIG. 12, a candidate predicted motion vector list is calculated (step S1200).

[0178] For example, in order to calculate the candidate prediction motion vector list, as in the method described above, candidate prediction 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 prediction motion vector is calculated for each, the calculated candidate prediction motion vectors can be included in the candidate prediction motion vector list and used to calculate the prediction motion vector of the prediction target block. If the candidate prediction motion vector list contains only a certain number of candidate prediction motion vectors, additional candidate prediction motion vectors (e.g., zero vectors, scaling vectors, etc.) can be included in the candidate prediction motion vector list if there are no certain number of candidate prediction motion vectors in the candidate prediction motion vector list. If there is a number greater than the number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list calculated from the first spatial candidate prediction group, the second spatial candidate prediction group, and the temporal candidate prediction block, a part of the calculated candidate prediction motion vectors can be removed and used.

[0179] Derive the prediction motion vector of the prediction block from the candidate prediction motion vector list (step S1210).

[0180] In the prediction motion vector calculation method according to an embodiment of the present invention, the prediction motion vector can be determined using the candidate prediction motion vector list itself without using index information for the candidate prediction motion vector. Since it is not necessary for the encoder to transmit index information for the candidate prediction motion vector to the decoder, the bits required for encoding the index information can be saved and the encoding efficiency can be improved.

[0181] For example, different methods can be used depending on the size of the candidate prediction motion vector list in order to determine the prediction motion vector using the candidate prediction motion vector list itself. The size of the candidate prediction motion vector list means the maximum number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list.

[0182] When the size of the candidate prediction motion vector list is 0, a zero vector is used as the prediction motion vector of the prediction block, and the index information for determining the prediction motion vector is not additionally decoded.

[0183] When the size of the candidate prediction motion vector list is 1, since there is one candidate prediction motion vector in the candidate prediction motion vector list, the candidate prediction motion vector existing in the list can be used as the prediction motion vector of the prediction block. Similar to the case where the size of the candidate prediction motion vector list is 0, the index information for determining the prediction motion vector is not additionally decoded.

[0184] When the size of the candidate prediction motion vector list is 2, among the candidate prediction motion vectors included in the candidate prediction motion vector list, the candidate prediction motion vector with a higher occurrence frequency within the slice to be coded / decoded can be derived as the prediction motion vector for decoding the prediction target block. When deriving a plurality of candidate prediction motion vectors, after arranging the candidate prediction motion vectors in the order of occurrence frequency, the candidate prediction motion vector with a high occurrence frequency can be derived as the prediction motion vector of the prediction block. At this time, in order to reduce the complexity of calculating the occurrence frequency of the candidate prediction motion vector, the occurrence frequency can be calculated only for N candidate prediction motion vectors (N is a natural number).

[0185] When the size of the candidate prediction motion vector list is 2, as another embodiment for calculating the prediction motion vector, the following Equation 1 and Equation 2 are used to compare the sum of the absolute value magnitudes in the x direction and the y direction of each candidate prediction motion vector, and the candidate prediction motion vector with a smaller sum of absolute values can be used as the prediction motion vector of the prediction block.

[0186]

Equation

[0187]

Equation

[0188] When the size of the candidate prediction motion vector list is 2, the following Equation 3 can be used as another example for calculating the prediction motion vector.

[0189]

Equation

[0190] Referring to Equation 3, in order to extract each component of the prediction motion vector, the x-direction component of the prediction motion vector can be used as the average value of the x-direction components of the two candidate prediction motion vectors, and the y-direction component of the prediction motion vector can be used as the average value of the y-direction components of the two candidate prediction motion vectors.

[0191] When the size of the candidate prediction motion vector list is 2, the following Equation 4 can be used as another example for calculating the prediction motion vector.

[0192]

Equation

[0193] Referring to Equation 4, in order to extract each component of the prediction motion vector, the x-direction component of the prediction motion vector can be used as the median value between the x-direction components of the two candidate prediction motion vectors and the zero vector, and the y-direction component of the prediction motion vector can be used as the median value between the y-direction components of the two candidate prediction motion vectors and the zero vector.

[0194] When the size of the candidate prediction motion vector list is 2, the following Equation 5 can be used as another example for calculating the prediction motion vector.

[0195]

Equation

[0196] Referring to Equation 5, in order 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 the two candidate predicted motion vectors and the 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 the two candidate predicted motion vectors and the zero vector.

[0197] When the size of the candidate predicted motion vector list is 2, in another embodiment of calculating the predicted motion vector, when calculating the occurrence frequency used in the above-mentioned statistical method, if the N motion vectors used and the two candidate predicted motion vectors in the candidate predicted motion vector list to be calculated for the frequency are different, the index information with a higher occurrence frequency can be used as the predicted motion vector of the prediction block based on the index information. For example, if the candidate predicted motion vector existing at index 0 in the previous candidate predicted motion vector list is used as the predicted motion vector, the candidate predicted motion vector existing at index 0 value can be used as the predicted motion vector.

[0198] When the size of the candidate predicted motion vector list is 3, since there are 3 candidate predicted motion vectors in the candidate predicted motion vector list, one of the candidate predicted motion vectors can be determined as the predicted motion vector.

[0199] The following Equation 6 shows a method for determining the predicted motion vector.

[0200]

Equation

[0201] Referring to Equation 6, in order to calculate the predicted motion vector, the predicted motion vector of the prediction target block can be calculated based on the candidate predicted motion vector corresponding to the median value among the x-direction components of the three candidate predicted motion vectors and the candidate predicted motion vector corresponding to the median value among the y-direction components of the three candidate predicted motion vectors.

[0202] When the size of the candidate prediction motion vector list is 3, the following Equation 7 can be used as another example for calculating the prediction motion vector.

[0203]

Equation

[0204] Referring to Equation 7, in order to calculate the prediction motion vector, based on the candidate prediction motion vector corresponding to the average value of the x-direction components of the three candidate prediction motion vectors and the candidate prediction motion vector corresponding to the average value of the y-direction components of the three candidate prediction motion vectors, the prediction motion vector of the block to be predicted can be calculated.

[0205] Even when there are three candidate prediction motion vectors in the candidate prediction motion vector list, index information is not used when calculating one prediction motion vector from the candidate prediction motion list.

[0206] FIG. 13 is a flowchart showing a method for calculating a prediction motion vector according to another embodiment of the present invention.

[0207] It can be assumed that the maximum number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list is N, and further, a spatial candidate prediction motion vector is derived from the spatial candidate prediction group, and then a temporal candidate prediction motion vector is derived from the temporal candidate prediction block. According to an embodiment of the present invention, when the number of candidate prediction motion vectors derived from the spatial candidate prediction group is N and is the same as the size of the candidate prediction motion vectors that can be included in the candidate prediction motion vector list, the step of deriving candidate prediction motion vectors from the temporal candidate prediction group and the step of additionally deriving candidate prediction motion vectors are not executed.

[0208] That is, according to the embodiments of the present invention, when the motion vectors necessary for the candidate prediction motion vector list have already been calculated, unnecessary candidate prediction motion vector derivation steps are not executed, thereby reducing the complexity in the encoding and decoding steps.

[0209] Referring to FIG. 13, it is confirmed whether the number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list is larger than the number of spatial candidate prediction motion vectors calculated (step S1300).

[0210] The number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list can be limited. For example, assuming that N prediction motion vectors can be included in the candidate prediction motion vector list, if the number of spatial candidate prediction motion vectors calculated from the spatial candidate prediction group is smaller than N, a temporal prediction motion vector can be calculated from the temporal candidate prediction block, or an additional prediction motion vector can be calculated. On the other hand, assuming that N prediction motion vectors can be included in the candidate prediction motion vector list, if the number of spatial candidate prediction motion vectors calculated from the spatial candidate prediction group is larger than or equal to N, the candidate prediction motion vector list can be calculated without calculating a temporal prediction motion vector from the temporal candidate prediction block or calculating an additional prediction motion vector (step S1320).

[0211] If the number of spatial candidate prediction motion vectors calculated from the spatial candidate prediction group is smaller than N, a temporal candidate prediction motion vector or an additional prediction motion vector is calculated (step S1310). At this time, the additional prediction motion vector is a zero vector.

[0212] If the number of candidate predicted motion vectors that can be included in the candidate predicted motion vector list is greater than the number of spatial candidate predicted motion vectors calculated through the step of checking whether the number of candidate predicted motion vectors that can be included in the candidate predicted motion vector list is greater than the number of spatial candidate predicted motion vectors calculated, the candidate predicted motion vectors calculated through step S1310 of calculating a temporal predicted motion vector or an additional predicted motion vector can be included in the candidate predicted motion vector list.

[0213] Calculate the candidate predicted motion vector list using the calculated spatial candidate predicted motion vector, temporal candidate predicted motion vector, or additional predicted motion vector (step S1320).

[0214] FIG. 14 is a flowchart showing a method for calculating candidate predicted motion vectors according to an embodiment of the present invention.

[0215] Referring to FIG. 14, calculate the spatial candidate predicted motion vector (step S1400).

[0216] A plurality of pieces of spatial candidate predicted motion vector related information can be derived from the encoded / decoded blocks (or peripheral prediction blocks) located spatially around the prediction target block. The spatial candidate predicted motion vector related information can indicate information including at least one of the spatial candidate predicted motion vector availability information (availableFlagLXN) and the spatial candidate predicted motion vector (mvLXN). That is, the unit of information including both the spatial candidate predicted motion vector availability information and the spatial candidate predicted motion vector is referred to as spatial candidate predicted motion vector related information, or one of the spatial candidate predicted motion vector or the spatial candidate predicted motion vector availability information can be referred to as the spatial candidate predicted motion vector related information.

[0217] For example, as shown in FIG. 3, a spatial candidate prediction motion vector can be derived from blocks corresponding to B1, which is a block adjacent to the upper end of the prediction target block X, A1, which is a block adjacent to the left side of the prediction target block, B0, which is a block located at the upper right corner of the prediction target block, B2, which is a block located at the upper left corner of the prediction target block, and A0, which is a block located at the lower left corner of the prediction target block, and determined as the spatial candidate prediction motion vector for the prediction target block. For the blocks A0, A1, B0, B1, and B2 (hereinafter referred to as spatial candidate prediction blocks), up to two spatial candidate prediction motion vectors for the encoding / decoding target block can be calculated. Hereinafter, the blocks A0, A1, B0, B1, and B2 are referred to as spatial candidate prediction blocks, and the blocks A0 and A1 can be classified into the first spatial candidate prediction block group, and the blocks B0, B1, and B2 can be classified into the second spatial candidate prediction group.

[0218] Such a spatial candidate prediction group is merely an example, and a spatial candidate prediction group can be generated from blocks at other positions, and such embodiments are also included in the scope of the rights of the present invention. Hereinafter, in the embodiments of the present invention, for convenience of explanation, a spatial candidate prediction block group composed of blocks existing at the positions described above will be assumed and described.

[0219] At this time, when a spatial candidate prediction motion vector is derived from the spatial candidate prediction block, set availableFlagLXY to 1; otherwise, set it to 0. Here, LX in availableFlagLXY indicates the reference picture list among reference picture lists L0 and L1 that the prediction target block refers to, and LX can be replaced with L0 or L1. Also, Y in availableFlagLXY indicates the position from which the spatial candidate prediction motion vector is derived. As shown in FIG. 2, when the spatial candidate prediction motion vector is derived from a block at position A0 or A1, Y becomes A; when the spatial candidate prediction motion vector is derived from a block at position B0, B1, or B2, Y can become B. At this time, the reference picture list (Reference Picture List) means a list including reference pictures used for inter-picture prediction or motion compensation. Types of reference picture lists include LC (List Combined), L0 (List0), L1 (List1), etc. And a reference picture (Reference Picture) means a picture that a specific block refers to for inter-picture prediction or motion compensation.

[0220] For example, one spatial candidate prediction motion vector can be derived from a block at position A0 or A1, and one spatial candidate prediction motion vector can be derived from a block at position B0, B1, or B2. At this time, if the prediction target block refers to reference picture list L0, and one spatial candidate prediction motion vector is derived from a block at position A0 and one spatial candidate prediction motion vector is derived from a block at position B1, set availableFlagL0A to 1 and availableFlagL0B to 1 as well. That is, availableFlagLXY indicates whether there is a spatial candidate prediction motion vector derived from a block at a predetermined position when the prediction target block refers to reference picture list LX.

[0221] Also, referring to FIG. 4 described above, the spatial candidate prediction motion vectors that can be derived can be classified into the following four motion vectors.

[0222] (1) First motion vector: When a block exists at a predetermined position, the corresponding block is not intra-coded, and the reference picture list and reference picture of the corresponding block are the same as those of the coding / decoding target block, the candidate prediction motion vector derived from the corresponding block.

[0223] (2) Second motion vector: When a block exists at a predetermined position, the corresponding block is not intra-coded, the reference picture list of the corresponding block is different from that of the coding / decoding target block, but the corresponding block and the coding / decoding target block refer to the same reference picture, the candidate prediction motion vector derived from the corresponding block.

[0224] (3) Third motion vector: When a block exists at a predetermined position, the corresponding block is not intra-coded, the reference picture list of the corresponding block is the same as that of the coding / decoding target block, but the reference picture of the corresponding block is different from that of the coding / decoding target block, the candidate prediction motion vector calculated by performing scaling on the motion vector of the corresponding block.

[0225] (4) Fourth motion vector: When a block exists at a predetermined position, the corresponding block is not intra-coded, and the reference picture list and reference picture of the corresponding block are different from those of the coding / decoding target block, the candidate prediction motion vector calculated by performing scaling on the motion vector of the corresponding block.

[0226] Whether the four spatially 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 a first motion vector or a second motion vector exists in the A1 block.

[0230] 3) Determine whether a third motion vector or a fourth motion vector exists in the A0 block.

[0231] 4) Determine whether a third motion vector or a fourth motion vector exists in the A1 block.

[0232] Sequentially execute the above 1) to 4) to determine whether there is a spatial candidate prediction motion vector that meets the conditions in the corresponding block. If there is a spatial candidate prediction motion vector that meets the conditions, induce the existing motion vector, and the next procedure is not executed. For example, if there is a spatial candidate prediction motion vector that meets 1), the procedures of 2) to 4) are not executed.

[0233] If the spatial candidate prediction motion vector that meets the conditions through 3) and 4) is the third motion vector or the fourth motion vector, the spatial candidate prediction motion vector can be calculated through scaling. In such a case, the flag information indicating whether scaling is executed can be used to indicate that scaling has been used. Or, if block A0 is available and block A0 does not use the in-picture prediction mode, or if block A1 is available and block A1 does not use the in-picture prediction mode, set the scaling availability display flag to 1. When block A0 and block A1 are not available, or when the spatial candidate prediction motion vector cannot be calculated from the first spatial candidate prediction block group as in the case of using in-picture prediction, set the scaling availability display flag to 0, and it is also possible to calculate two spatial candidate prediction motion vectors from the second spatial candidate prediction block group. Hereinafter, in the embodiments of the present invention, for the sake of convenience of explanation, it is assumed that the first spatial candidate prediction motion vector is calculated from the first spatial candidate prediction group and the second spatial candidate prediction motion vector is calculated from the second spatial candidate prediction group.

[0234] The following shows the order of calculating the spatial candidate prediction motion vector from the second spatial candidate prediction block group.

[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 the third motion vector or the fourth motion vector exists in the B0 block.

[0240] 5) Determine whether the third motion vector or the fourth motion vector exists in the B1 block.

[0241] 6) Determine whether the third motion vector or the fourth motion vector exists in the B2 block.

[0242] Similar to when calculating the first spatial candidate prediction motion vector, the above 1) to 6) are sequentially executed to determine whether there is a spatial candidate prediction motion vector that satisfies the condition in the corresponding block. If there is a spatial candidate prediction motion vector that satisfies the condition, the corresponding existing motion vector is induced and the next procedure is not executed.

[0243] Also, the spatial candidate prediction motion vector can be induced up to a maximum of N. At this time, N is a positive constant. As an example, N is 2.

[0244] Determine whether the two induced spatial candidate prediction motion vectors are different from each other (step S1410).

[0245] According to an embodiment of the present invention, time candidate prediction motion vector related information (for example, at least one of time candidate prediction motion vector availability information and a time candidate prediction motion vector) can be determined based on spatial candidate prediction motion vector related information. That is, in step S1400, it is possible to determine whether to derive a time candidate prediction motion vector based on the derived spatial candidate prediction motion vector related information.

[0246] It is determined whether two spatial candidate prediction motion vectors can be derived to determine whether the two derived spatial candidate prediction motion vectors are different from each other. When two spatial candidate prediction motion vectors are derived, both availableFlagLXA and availableFlagLXB are 1 and it is determined whether mvLXA and mvLXB are different from each other to determine whether the derived spatial candidate prediction motion vectors are different from each other. availableFlagLXA is a flag indicating whether a first spatial candidate prediction motion vector can be calculated from a first spatial candidate prediction group, and availableFlagLXB is a flag indicating whether a second spatial candidate prediction motion vector can be calculated from a second spatial candidate prediction group. For example, when a first spatial candidate prediction motion vector can be calculated from a first spatial candidate prediction group, availableFlagLXA can be set to 1. mvLXA can be calculated when availableFlagLXA is available as the first spatial candidate prediction motion vector, and mvLXB can be calculated when availableFlagLXB is available as the second spatial candidate prediction motion vector.

[0247] Hereinafter, in the embodiments of the present invention, availableFlagLXA can be defined as the availability information of the first spatial candidate prediction motion vector, and availableFlagLXB can be defined as the availability information of the second spatial candidate prediction motion vector and used. Also, mvLXA can be defined as the first spatial candidate prediction motion vector, and mvLXB can be defined as the second spatial candidate prediction motion vector.

[0248] Assuming that both availableFlagLXA and availableFlagLXB are 1, mvLXA and mvLXB are different, and the maximum number of candidate prediction motion vector lists that can be included in the candidate prediction motion vector list is 2, since the candidate prediction motion vector list can be composed of spatial candidate prediction motion vectors, additional induction of candidate prediction motion vectors is not necessary, and it is not necessary to induce the temporal candidate prediction motion vector, which is the candidate prediction motion vector derived from the Colocated block (temporal candidate prediction block). Therefore, the availableFlagLXCol, which is the flag information indicating whether the temporal candidate prediction motion vector is available, is set to 0, and the candidate prediction motion vector list is calculated only with the spatial candidate prediction motion vectors induced as in step S1430 described below. That is, since the temporal candidate prediction motion vector is not induced, the complexity of the candidate prediction motion vector induction process can be reduced.

[0249] That is, the temporal candidate prediction motion vector related information can be determined based on the spatial candidate prediction motion vector related information.

[0250] When both availableFlagLXA and availableFlagLXB are 1, it is also possible to selectively determine whether mvLXA and mvLXB are different. For example, two determination conditions can be used to execute 1) a step of determining whether both availableFlagLXA and availableFlagLXB are 1, and 2) a step of determining whether mvLXA and mvLXB are different when both availableFlagLXA and availableFlagLXB are 1.

[0251] If two spatial candidate prediction motion vectors are not derived, or if the two derived spatial candidate prediction motion vectors are the same as each other, calculate a temporal candidate prediction motion vector from the Colocated block (step S1420).

[0252] That is, in step S1420, the temporal candidate prediction motion vector related information can be determined based on the spatial candidate prediction motion vector related information.

[0253] If either availableFlagLXA or availableFlagLXB is not 1, or if mvLXA and mvLXB are the same, calculate a temporal candidate prediction motion vector from the Colocated block.

[0254] Assuming that two candidate prediction motion vectors must be included in the candidate prediction motion vector list, if either availableFlagLXA or availableFlagLXB is not 1, or if mvLXA and mvLXB are the same, then two candidate prediction motion vectors are not included in the candidate prediction motion vector list, so a temporal candidate prediction motion vector must be calculated from the Colocated block.

[0255] The following Table 2 and Table 3 show whether the process of deriving the temporal candidate prediction motion vector can be executed based on the result of the derived spatial candidate prediction motion vector.

[0256]

Table 2

[0257]

Table 3

[0258] Referring to Table 2 and Table 3, when calculating the spatial candidate prediction motion vector, the process of inducing the temporal candidate prediction motion vector can be divided into four categories according to the availableFlagLXY indicating whether the spatial candidate prediction motion vector is available and the identity of the induced spatial candidate prediction motion vector. Hereinafter, the induction of the temporal candidate prediction motion vector will be described for the four cases based on the availableFlagLXY of the spatial candidate prediction motion vector.

[0259] (1) When one spatial candidate prediction motion vector is induced, and availableFlagLXA is 1 and availableFlagLXB is 0, or availableFlagLXA is 0 and availableFlagLXB is 1. In the case of 1, since only one spatial candidate prediction motion vector is induced, the identity of the spatial candidate prediction motion vector cannot be determined. When the number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list is 2, the step of inducing the temporal candidate prediction motion vector is executed to calculate an additional candidate prediction motion vector. Then, when the temporal candidate prediction motion vector is induced, set availableFlagLXCol to 1; otherwise, set availableFlagLXCol to 0.

[0260] (2) This is the case where two spatial candidate prediction motion vectors are induced and availableFlagLXA and availableFlagLXB are 1. If the induced spatial candidate prediction motion vectors have the same value, one of the candidate prediction motion vectors with the same spatial candidate prediction motion vector is removed. Since there is only one remaining candidate prediction motion vector, when the number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list is two, the step of inducing a temporal candidate prediction motion vector to calculate an additional candidate prediction motion vector is executed. When a temporal candidate prediction motion vector is induced, availableFlagLXCol can be set to 1, and when a temporal candidate prediction motion vector is not induced, availableFlagLXCol can be set to 0.

[0261] (3) This is the case where two spatial candidate prediction motion vectors are induced and availableFlagLXA and availableFlagLXB are 1. If the values of the induced spatial candidate prediction motion vectors are different, when the number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list is two, there is no need to execute the step of inducing a temporal candidate prediction motion vector to calculate an additional candidate prediction motion vector, and availableFlagLXCol indicating the availability of the temporal candidate prediction motion vector is set to 0. At this time, when availableFlagLXCol, which is the availability information of the temporal candidate prediction motion vector, is 0, which is a predetermined value, it means that the temporal candidate prediction motion vector is not induced or the temporal candidate prediction motion vector is not available.

[0262] (4) This is the case where two spatial candidate prediction motion vectors are not induced and availableFlagLXA and availableFlagLXB are 0. In such a case, the temporal candidate prediction motion vector induction process can be executed to calculate the temporal candidate prediction motion vector.

[0263] That is, the maximum number of candidate predicted motion vectors that can be included in the candidate predicted motion vector list is two, both of the spatial candidate predicted motion vector availability information (availableFlagLXA, availableFlagLXB) are 1, and when the two calculated spatial candidate predicted motion vectors are different, the temporal candidate predicted motion vector is not calculated.

[0264] In the above-described embodiments of the present invention, a method of deriving temporal candidate predicted motion vector related information using both the spatial candidate predicted motion vector availability information and the spatial candidate predicted motion vector as spatial candidate predicted motion vector related information has been disclosed. However, it can also be used to derive temporal candidate predicted motion vector related information as spatial candidate predicted motion related information based on at least one of the spatial candidate predicted motion vector availability information and the spatial candidate predicted motion vector.

[0265] For example, when the induced two spatial candidate predicted motion vectors have different values from each other, the temporal candidate predicted motion vector related information can be derived without determining the value of the spatial candidate predicted motion vector availability information.

[0266] Hereinafter, a method of calculating the temporal candidate predicted motion vector will be disclosed.

[0267] FIG. 15 is a conceptual diagram for showing a method of calculating a temporal candidate predicted motion vector according to an embodiment of the present invention.

[0268] Referring to FIG. 15, a temporal candidate predicted motion vector can be calculated from the Colocated block 1520 existing in the Colocated picture of the prediction target block 1500.

[0269] When the point located at the upper left end 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 becomes a block including the point (xP + nPSW, yP + nPSH) located in the Colocated picture, and the second Colocated block 1560 can become a block including the point (xP + (nPSW >> 1), yP + (nPSH >> 1)) located in the Colocated picture. When a temporal candidate prediction motion vector is not derived from the first Colocated block (for example, when the first Colocated block is intra-predicted coded), a temporal candidate prediction motion vector can be derived from the second Colocated block. The number of calculated temporal candidate prediction motion vectors can be limited. For example, when only a maximum of one temporal candidate prediction motion vector is calculated, if a temporal candidate prediction motion vector is calculated from the first Colocated block, no temporal candidate prediction motion vector is calculated in the second Colocated block. In the case of a temporal candidate prediction motion vector, the value of the temporal candidate prediction motion vector can be scaled and used based on the relationship between the distance between the picture including the block to be predicted and the reference picture of the block to be predicted, and the distance between the picture including the Colocated block and the reference picture of the Colocated block.

[0270] The value of availableFlagLXCol is determined according to whether a temporal candidate prediction motion vector is derived. LX in availableFlagLXCol indicates the reference picture list to which the block to be encoded / decoded refers among the reference picture lists L0 and L1, and LX can be replaced with L0 or L1. When a temporal candidate prediction motion vector is derived, availableFlagLXCol can be set to 1, and when a temporal candidate prediction motion vector is not derived, availableFlagLXCol can be set to 0.

[0271] For example, when the block to be encoded / decoded refers to the reference picture list L0 and the temporal candidate prediction motion vector is derived from the H-position block in FIG. 15, set availableFlagL0Col to 1. When the temporal candidate prediction motion vector is not derived, set availableFlagL0Col to 0.

[0272] Add the derived candidate prediction motion vector to the candidate prediction motion vector list (step S1430).

[0273] Add the derived spatial candidate prediction motion vector and temporal candidate prediction motion vector to the candidate prediction motion vector list in the order in which they are derived. For example, the candidate prediction motion vector list can add candidate prediction motion vectors to the candidate prediction 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, add one spatial candidate prediction motion vector mvLXA and one temporal candidate prediction motion vector mvLXCol to the candidate prediction motion vector list. As another example, when availableFlagLXA is 1, availableFlagLXB is 1, and availableFlagLXCol is 0, add two spatial candidate prediction motion vectors mvLXA and mvLXB to the candidate prediction motion vector list.

[0274] As another example, when a spatial candidate prediction motion vector or a temporal candidate prediction motion vector is derived without judging the availability information of the spatial candidate prediction motion vector or the availability information of the temporal candidate prediction motion vector, it is also possible to directly add it to the candidate prediction motion vector list.

[0275] The size of the candidate prediction motion vector list can be limited to a predetermined size. For example, the predetermined size is 3, the candidate prediction motion vector first added to the candidate prediction motion vector list can have an index value of 0, and the candidate prediction motion vector last added can have an index value of 2.

[0276] That is, it can be determined whether the number of candidate prediction motion vectors included in the candidate prediction motion vector list is smaller than the maximum number of candidate prediction motion vectors, which is the maximum number of candidate prediction motion vectors that can be included in the candidate prediction motion vector list. Based on the determination result, a candidate prediction motion vector can be added to or removed from the candidate prediction motion vector list.

[0277] For example, when the number of the candidate prediction motion vectors included in the candidate prediction motion vector list is smaller than the maximum number of candidate prediction motion vectors, a zero vector can be added to the candidate prediction motion vector list. Also, when the number of the candidate prediction motion vectors included in the candidate prediction motion vector list is larger than or the same as the maximum number of candidate prediction motion vectors, some of the candidate prediction motion vectors can be removed from the candidate prediction motion vector list so that the candidate prediction motion vectors are included in the candidate prediction motion vector list up to the maximum number of candidate prediction motion vectors.

[0278] FIG. 16 is a conceptual diagram showing a method for calculating a candidate prediction motion vector list according to an embodiment of the present invention.

[0279] Referring to FIG. 16, when a non-scaled spatial candidate prediction motion vector (1, 0) is induced from block A1, a scaled spatial candidate prediction motion vector (-2, 0) is induced from block B1, and a scaled temporal candidate prediction motion vector (4, 1) is induced from block H, the induced candidate prediction motion vectors are added to the candidate prediction motion vector list as shown in the right table in the order of induction. At this time, the candidate prediction motion vector index value induced from the block at position A1 is 0, the candidate prediction motion vector index value induced from the block at position B1 is 1, and the candidate prediction motion vector index value induced from the block at position H is 2.

[0280] If, as in the third case of Table 3, the size of the candidate prediction motion vector list is 2, there are 2 induced spatial candidate prediction motion vectors, and the 2 spatial candidate prediction motion vectors are different from each other, since the size of the candidate prediction motion vector list is 2, it is possible to sequentially assign indexes to the induced spatial candidate prediction motion vectors without the need to separately induce temporal candidate prediction motion vectors to form the candidate prediction motion vector list.

[0281] Remove the same candidate prediction motion vectors to reconstruct the candidate prediction motion vector list (step S1440).

[0282] Determine whether there are the same candidate prediction motion vectors among the spatial candidate prediction motion vectors and the temporal candidate prediction motion vectors included in the candidate prediction motion vector list. If there are the same candidate prediction motion vectors, remove one of the same candidate prediction motion vectors to reconstruct the candidate prediction motion vector list.

[0283] For example, if the first spatial candidate prediction motion vector and the second spatial candidate prediction motion vector that make up the candidate prediction motion vector list are the same, the second spatial candidate prediction motion vector can be removed from the candidate prediction motion vector list.

[0284] FIG. 17 is a conceptual diagram showing removal of the same candidate prediction motion vector from the candidate prediction motion vector list according to an embodiment of the present invention.

[0285] Referring to FIG. 17, when the candidate prediction motion vectors of index 0 and index 1 included in the candidate prediction motion vector list are the same vector, only the candidate prediction motion vector having the smaller index value among them can be left, and the remaining candidate prediction motion vectors having the same value can be removed. The index values of the candidate prediction motion vectors having index values larger than the index value of the removed candidate prediction motion vector are changed by the number of the removed candidate prediction motion vectors.

[0286] Add and remove candidate prediction motion vectors to adjust the size of the candidate prediction motion vector list (step S1450).

[0287] The size of the candidate prediction motion vector list can be adjusted by adding or removing candidate prediction motion vectors to the candidate prediction motion vector list. If P is the number of candidate prediction motion vectors in the candidate prediction motion vector list and Q is the size of the final candidate prediction motion vector list, in order to make the size of P the same as that of Q, when P is smaller than Q, candidate prediction motion vectors can be added to the candidate prediction motion vector list, and when P is larger than Q, candidate prediction motion vectors can be removed from the candidate prediction motion vector list.

[0288] FIG. 18 is a conceptual diagram showing a method of adding and removing candidate prediction motion vectors according to an embodiment of the present invention to adjust the size of the candidate prediction motion vector list.

[0289] For example, assuming that the size of the candidate prediction motion vector list is 2, referring to the upper part of FIG. 18, since there is one candidate prediction motion vector included in the candidate prediction motion vector list, a zero vector (0, 0) can be added to the candidate prediction motion vector list to constitute the candidate prediction motion vector list.

[0290] Referring to the lower part of FIG. 18, since there are three candidate prediction motion vectors included in the candidate prediction motion vector list, one candidate prediction motion vector with the largest index value in the candidate prediction motion vector list can be removed to construct the candidate prediction motion vector list.

[0291] Determine the final prediction motion vector from the candidate prediction motion vector list (step S1460).

[0292] Based on the candidate prediction motion vector list calculated through the above-described steps S1400 to S1460 and the index information of the final prediction motion vector transmitted from the encoder, determine the final prediction motion vector to be used for motion compensation.

[0293] FIG. 19 is a conceptual diagram showing the determination of the final prediction motion vector in the candidate prediction motion vector list according to an embodiment of the present invention.

[0294] Referring to FIG. 19, when information indicating that the candidate prediction motion vector corresponding to index 1 in the encoder is used as the final prediction motion vector is transmitted, (-3, 6), which is the candidate prediction motion vector corresponding to index 1 in the calculated candidate prediction motion vector list, can be determined as the final prediction motion vector.

[0295] FIG. 20 is a flowchart showing a method for calculating a candidate prediction motion vector list according to an embodiment of the present invention.

[0296] In FIG. 20, as detailed in FIGS. 14 to 19, when the induced spatial candidate prediction motion vectors are different from each other, when the spatial candidate prediction motion vectors are the same without inducing the temporal candidate prediction motion vectors, the method of inducing the temporal candidate prediction motion vectors to calculate the candidate prediction motion vector list is organized.

[0297] 1) Whether there is a first spatial candidate prediction motion vector availability information indicating whether there is a spatial candidate prediction motion vector in the first spatial candidate prediction block group (A0, A1), and both the second spatial candidate prediction motion vector availability information indicating whether there is a spatial candidate prediction motion vector in the second spatial candidate prediction block group (B0, B1, B2) exist.

[0298] 2) Determine whether the first spatial candidate prediction motion vector derived from the first spatial candidate prediction group and the second spatial candidate prediction motion vector derived from the second spatial candidate prediction group are different from each other (step S2000).

[0299] Similar to step S1410 described above, step S2000 can derive a spatial candidate prediction motion vector based on the availability information and determine whether the two derived spatial candidate prediction motion vectors are different from each other.

[0300] The availability information of the first spatial candidate prediction motion vector can be calculated through the following steps.

[0301] The first to fourth motion vectors are the same as the definitions in FIG. 4 described above.

[0302] (1) Step of determining whether there is a first motion vector in the first block (A0) or the second block (A1) included in the first spatial candidate prediction block group

[0303] (2) When there is no first motion vector in the first block (A0) or the second block (A1) included in the first spatial candidate prediction block group, step of determining whether there is a second motion vector in the first block (A0) and the second block (A1) of the first spatial candidate prediction block group

[0304] (3) If there is no first motion vector or second motion vector in the first block (A0) or the second block (A1) included in the first spatial candidate prediction block group, determine whether there is a third motion vector in the first block (A0) and the second block (A1) of the first spatial candidate prediction block group.

[0305] (4) If there is no first motion vector, second motion vector, or third motion vector in the first block (A0) or the second block (A1) included in the first spatial candidate prediction block group, determine whether there is a fourth motion vector in the first block (A0) and the second block (A1) of 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 that have performed intra prediction, 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 that have performed intra prediction, and there is a first motion vector or a second motion vector in the third block, fourth block, or fifth block of the second spatial candidate prediction block group, 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 prediction motion vector can be calculated through the following steps.

[0308] (1) Determine whether a first motion vector exists in the third block (B0), fourth block (B1), or fifth block (B2) included in the second spatial candidate prediction block group.

[0309] (2) If the first motion vector does not exist in the third block (B0), fourth block (B1), or fifth block (B2) included in the second spatial candidate prediction block group, determine whether a second motion vector exists in the third block (B0), fourth block (B1), or fifth block (B2) of the second spatial candidate prediction block group.

[0310] (3) If neither the first motion vector nor the second motion vector exists in the third block (B0), fourth block (B1), or fifth block (B2) included in the second spatial candidate prediction block group, determine whether a third motion vector exists in the third block (B0), fourth block (B1), or fifth block (B2) of the second spatial candidate prediction block group.

[0311] (4) If none of the first motion vector, second motion vector, or third motion vector exists in the third block (B0), fourth block (B1), or fifth block (B2) included in the second spatial candidate prediction block group, determine whether a fourth motion vector exists in the third block (B0), fourth block (B1), or fifth block (B2) of the second spatial candidate prediction block group.

[0312] If the conditions disclosed in step S2000 are not satisfied, induce a temporal candidate prediction motion vector (step S2010).

[0313] When the conditions disclosed in the foregoing step S2000 are satisfied, there are two different spatial candidate prediction motion vectors. However, when the conditions disclosed in the foregoing step S2000 are not satisfied, there is one or fewer spatial candidate prediction motion vectors, or there are two identical spatial candidate prediction motion vectors. Therefore, when the conditions disclosed in the foregoing step S2000 are not satisfied, a temporal candidate prediction motion vector can be induced.

[0314] When the conditions disclosed in step S2000 are satisfied, set the availability information of the temporal candidate prediction motion vector to 0 (step S2020).

[0315] When the conditions disclosed in step S2000 are satisfied, set the availability information of the temporal candidate prediction motion vector, which is information indicating whether the temporal candidate prediction motion vector is available without performing the operation for calculating the temporal candidate prediction motion vector, to 0.

[0316] Calculate a candidate prediction motion vector list (step S2030).

[0317] The candidate prediction motion vector list can be calculated by indexing in the following order.

[0318] 1) If the first spatial candidate prediction motion vector is available, the first spatial candidate prediction motion vector.

[0319] 2) If the second spatial candidate prediction motion vector is available, the second spatial candidate prediction motion vector.

[0320] 3) If the temporal candidate prediction motion vector is available, the temporal candidate prediction motion vector.

[0321] Remove identical spatial candidate prediction motion vectors (step S2040).

[0322] When the value of the first spatial candidate prediction motion vector is the same as the value of the second spatial candidate prediction motion vector, the value of the second spatial candidate prediction motion vector can be removed from the candidate prediction motion vector list.

[0323] Add and remove the candidate prediction motion vector list to adjust the size of the candidate prediction motion vector list (step S2050).

[0324] When the number of candidate prediction motion vectors included in the candidate prediction motion vector list is less than 2, additional vectors such as zero vectors can be added to the candidate prediction motion vector list. When the number of candidate prediction motion vectors included in the candidate prediction motion vector list is greater than 2, the remaining candidate prediction motion vectors excluding index 0 and index 1 of the candidate prediction motion vector list can be removed.

[0325] Determine the final prediction motion vector from the candidate prediction motion vector list (step S2060).

[0326] One of the candidate prediction motion vectors included in the candidate prediction motion vector list can be used as the final prediction motion vector, which is the predicted value of the motion vector of the block to be predicted.

[0327] The video encoding and video decoding methods described above can be implemented in each component of each video encoder and video decoder device detailed in FIGS. 1 and 2.

[0328] Although described with reference to the embodiments above, those skilled in the art in the relevant technical field can understand that the present invention can be variously modified and changed within the scope not deviating from the idea and scope of the present invention described in the claims.

Claims

1. Determining first motion information of the prediction target block based on second motion information of one or more spatially adjacent blocks that are spatially adjacent to the prediction target block and third motion information of temporally adjacent blocks that are temporally adjacent to the prediction target block; Performing inter-picture prediction on the prediction target block using the first motion information of the prediction target block; comprising; A plurality of candidates in a list for the inter-picture prediction for the prediction target block are configured using the second motion information of the one or more spatially adjacent blocks and the third motion information of the temporally adjacent blocks, When the number of the plurality of candidates generated using the second motion information of the one or more spatially adjacent blocks in the list and the third motion information of the temporally adjacent blocks is smaller than the maximum number of candidates in the list, additional candidates are added to the list, Candidates for the decoded block are used as the additional candidates, The candidates for the decoded block are derived before decoding of the prediction target block, The candidates for the decoded block are one of a plurality of ordered motion vectors generated for a plurality of decoded blocks included in a target slice, The number of the plurality of motion vectors of the plurality of ordered decoded blocks is limited to a predetermined number, The target slice is a target of decoding and includes the prediction target block, characterized in that it is a decoding method.

2. Determining first motion information of the prediction target block based on second motion information of one or more spatially adjacent blocks that are spatially adjacent to the prediction target block and third motion information of temporally adjacent blocks that are temporally adjacent to the prediction target block; Performing inter-picture prediction on the prediction target block using the first motion information of the prediction target block; comprising; A plurality of candidates in a list for the inter-picture prediction for the prediction target block are configured using the second motion information of the one or more spatially adjacent blocks and the third motion information of the temporally adjacent blocks, If the number of the plurality of candidates in the list generated using the second motion information of the one or more spatially adjacent blocks and the third motion information of the temporally adjacent blocks is smaller than the maximum number of candidates in the list, additional candidates are added to the list, Candidates for the encoded block are used as the additional candidates, The candidates for the encoded block are derived prior to the encoding for the prediction target block, The candidates for the encoded block are one of a plurality of ordered motion vectors generated for a plurality of encoded blocks included in the target slice, The number of the plurality of motion vectors of the plurality of ordered encoded blocks is limited to a predetermined number, The target slice is an object of encoding and includes the prediction target block, characterized by an encoding method.

Citation Information

Patent Citations

  • Apparatus, system and method for enhanced drive force in an additive manufacturing print head

    WO2020131818A1