WO2012096551A2 - Method and device for encoding/decoding motion vector - Google Patents

Method and device for encoding/decoding motion vector Download PDF

Info

Publication number
WO2012096551A2
WO2012096551A2 PCT/KR2012/000361 KR2012000361W WO2012096551A2 WO 2012096551 A2 WO2012096551 A2 WO 2012096551A2 KR 2012000361 W KR2012000361 W KR 2012000361W WO 2012096551 A2 WO2012096551 A2 WO 2012096551A2
Authority
WO
WIPO (PCT)
Prior art keywords
motion vector
resolution
prediction mode
encoding
unidirectional
Prior art date
Application number
PCT/KR2012/000361
Other languages
French (fr)
Korean (ko)
Other versions
WO2012096551A3 (en
Inventor
임정연
문주희
이영렬
김해광
전병우
한종기
이주옥
박형미
Original Assignee
에스케이텔레콤 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020110004388A external-priority patent/KR101377528B1/en
Application filed by 에스케이텔레콤 주식회사 filed Critical 에스케이텔레콤 주식회사
Publication of WO2012096551A2 publication Critical patent/WO2012096551A2/en
Publication of WO2012096551A3 publication Critical patent/WO2012096551A3/en
Priority to US13/942,081 priority Critical patent/US9648340B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the present invention relates to motion vector encoding and decoding.
  • the present invention relates to a motion vector encoding method and apparatus in consideration of adaptive motion vector resolution, and a motion vector decoding method and apparatus.
  • the encoding of data for a video is made up of intra prediction encoding and inter prediction encoding.
  • Such intra prediction encoding or inter prediction encoding is widely used for compressing various data in an effective way to reduce correlation between data.
  • the motion vector of the current block determined by estimating the motion of the current block to be currently encoded by inter prediction encoding is closely correlated with the motion vector of the neighboring block, the motion vector of the neighboring block is determined from the motion vector of the current block.
  • PMV Predicted Motion Vector
  • DMV Differential Motion Vector
  • the encoder encodes and transmits only a difference vector, which is a difference between the predicted motion vector and the current motion vector determined by estimating the motion of the current block in a previously encoded, decoded and reconstructed reference frame. .
  • the decoder also predicts the motion vector of the current block by using the motion vector of the neighboring block previously decoded, and reconstructs the current motion vector by adding the transmitted difference vector and the predicted motion vector.
  • the resolution when performing inter prediction encoding, the resolution may be collectively increased by interpolating a reference frame, and then encoded by a difference vector, which is a difference between the predicted motion vector determined by estimating the motion of the current block and the current motion vector, and then transmitted. have.
  • a difference vector which is a difference between the predicted motion vector determined by estimating the motion of the current block and the current motion vector, and then transmitted.
  • the resolution of the reference frame image that is, the reference image
  • more accurate inter prediction is possible, thereby reducing the amount of bits generated by encoding the residual signal between the original image and the predicted image, but increasing the resolution vector of the motion vector.
  • the amount of bits generated by encoding also increases.
  • the resolution of the reference picture becomes smaller, the bit amount generated by encoding the residual signal becomes larger, but since the resolution of the motion vector becomes smaller, the bit amount generated by encoding the difference vector also becomes smaller.
  • inter prediction is performed by using the same resolution and interpolating the same resolution for an image having a coding unit such as all blocks, slices, and pictures of the image.
  • a coding unit such as all blocks, slices, and pictures of the image.
  • the resolution of the motion vector is fixed at 1/4 pixel resolution.
  • the residual signal increases, and thus, it is difficult to efficiently encode the compression vector.
  • inter prediction decoding since inter prediction decoding operates correspondingly to inter prediction encoding, it is difficult to expect high efficiency of inter prediction decoding in a state where the compression efficiency of inter prediction encoding is reduced.
  • the present invention has a main object to improve the coding efficiency of the motion vector, the compression efficiency of the image, and the quality of the reproduced image by encoding the motion vector using adaptive motion vector precision.
  • the primary purpose is to reconstruct a motion vector encoded using adaptive motion vector precision.
  • an object thereof is to efficiently encode and decode information representing the precision of a motion vector.
  • a motion vector encoding method comprising: determining a first motion vector and a second motion vector associated with a current block to be encoded; Determining a prediction motion vector of each of the first and second motion vectors; Calculating a first differential motion vector that is a difference between the first motion vector and a predicted motion vector of the first motion vector, and a second differential motion vector that is a difference between the second motion vector and a predicted motion vector of the second motion vector. step; And encoding the first differential motion vector and the second differential motion vector, wherein the resolution of the first motion vector and the resolution of the second motion vector are different from each other.
  • a method of decoding a motion vector comprising: determining a prediction motion vector of each of a first motion vector and a second motion vector associated with a current block to be decoded; Decoding a first differential motion vector that is a difference between the first motion vector and a predicted motion vector of the first motion vector, and a second differential motion vector that is a difference between the second motion vector and a predicted motion vector of the second motion vector.
  • step Reconstructing the first motion vector using the decoded first differential motion vector and the predicted motion vector of the first motion vector; And reconstructing the second motion vector using the decoded second differential motion vector and the predicted motion vector of the second motion vector, wherein the resolution of the first motion vector and the second motion vector
  • the resolution is characterized by different from each other.
  • a motion vector encoding method comprising: selecting an inter prediction mode of a current block to be encoded; Selecting the resolution of at least one motion vector used for inter prediction of the current block according to whether the inter prediction mode is a unidirectional simple prediction mode, a unidirectional complex prediction mode, or a bidirectional prediction mode; And encoding the at least one motion vector according to the resolution of the selected motion vector.
  • a motion vector decoding method comprising: selecting an inter prediction mode of a current block to be decoded; Selecting the resolution of at least one motion vector used for inter prediction of the current block according to whether the inter prediction mode is a unidirectional simple prediction mode, a unidirectional complex prediction mode, or a bidirectional prediction mode; And decoding the at least one motion vector according to the resolution of the selected motion vector.
  • the compression efficiency of the image and the image quality of the reproduced image can be improved by adaptively determining the precision of the motion vector, encoding the motion vector, and decoding the encoded motion vector.
  • the present invention can reduce the number of bits required for encoding the differential motion vector.
  • the present invention can improve the compression efficiency of an image by improving the image quality of a reproduced image and reducing the number of bits necessary for encoding a residual signal of the image through motion compensation using a high precision motion vector.
  • the amount of data necessary for encoding the information indicating the precision of the motion vector can be reduced.
  • FIG. 1 is a diagram for explaining combination examples of an implementation relating to a resolution of a motion vector and a resolution flag of a motion vector according to each inter prediction mode according to the present invention.
  • FIG. 2 is a diagram for explaining combination examples of other implementations related to the resolution of a motion vector and a resolution flag of the motion vector according to each inter prediction mode according to the present invention.
  • a video encoding apparatus Video Encoding Apparatus
  • a video decoding apparatus Video Decoding Apparatus
  • PC personal computer
  • PDA personal digital assistant
  • PMP portable multimedia player
  • PSP Portable Multimedia Player
  • PSP PlayStation Portable
  • Wireless Communication Terminal Wireless Communication Terminal
  • TV Television
  • the present invention refers to various devices including various programs for encoding or decoding an image, a memory for storing data, and a microprocessor for executing and operating a program.
  • the motion vector may have various resolutions.
  • the motion vector according to the first embodiment of the present invention may have 1/4 pixel resolution and 1/8 resolution.
  • the motion vector encoding apparatus may generate and transmit a motion vector resolution flag indicating the resolution of the motion vector of the current block.
  • the motion vector resolution flag indicates the resolution of the motion vector of the current block, not the differential motion vector or the prediction motion vector.
  • a plurality of motion vectors associated with the current block may be transmitted.
  • a motion vector resolution flag may be transmitted for each motion vector.
  • the motion vector resolution flag may be transmitted in the current block unit.
  • the current block has a motion vector resolution of 1/4 and two motion vectors of (2/4, 1/4) and (-1/4, 1/4) may be transmitted.
  • Each motion compensation block is generated using two motion vectors, and a prediction block of the current block is generated using the average of the two motion compensation blocks. In this case, the average of two motion compensation blocks may be calculated using weights.
  • the decoder decodes the plurality of motion vectors.
  • blocks having different resolutions may be generated using a plurality of motion vectors. For example, if there are two motion vectors used for inter prediction of the current block and each motion vector is (0, 1/4) or (1/4, 1), the two motion vectors are used. By generating a motion compensation block of, and bi-linear interpolation of the two motion compensation blocks, a motion compensation block of position (1/8, 5/8) can be generated. Therefore, the encoder may encode the motion vector using two motion vectors capable of calculating the corresponding position without encoding the motion vector using the resolution of 1/8 pixel unit. In this case, the motion vector resolution is fixed at 1/4 pixel resolution, and the motion vector resolution flag does not need to be encoded. In addition, the reference images of the plurality of motion vectors may be the same or different.
  • the resolution of each motion vector may be different without fixing the resolution of the plurality of motion vectors equally. For example, if the motion vector 1 is (1/4, 1) and the motion vector 2 is (1/8, 3/4), the motion compensation is performed similarly to the above description (3/16, 7/8).
  • the motion compensation block of the position may be generated.
  • the motion vector 1 is fixed at a resolution of 1/4 pixels, and thus the motion vector resolution flag is not encoded.
  • the motion vector 2 adaptively encodes a motion vector resolution and encodes a motion vector resolution flag indicating the resolution.
  • the resolution of motion vector 1 may be adaptively encoded and the resolution of motion vector 2 may be fixed to a predetermined value.
  • the resolution may be adaptively selected and encoded for each motion vector.
  • the decoder normally performs the reverse operation of the encoder. Determination of the motion vector resolution and use of the resolution flag are previously promised between the encoder and the decoder. According to this promise, when the motion vector resolution is fixed, the decoder knows the fixed resolution in advance, and when the motion vector resolution flag is transmitted from the encoder, the decoder decodes the motion vector using the motion vector resolution flag.
  • the present embodiment is also applicable to the case of the P picture in which the unidirectional simple prediction mode and the unidirectional complex prediction mode are allowed, and when the unidirectional complex prediction mode is used.
  • the present embodiment is applicable to an inter prediction mode in which a bidirectional prediction mode using two reference images in a B picture is allowed.
  • it is naturally applicable to the unidirectional complex prediction mode in the inter prediction mode using one reference picture in the B picture.
  • the unidirectional simple prediction mode of a P picture is the same as the prediction mode used for encoding and decoding a conventional P picture. That is, it is an inter prediction mode using one past reference picture and one motion vector.
  • the unidirectional complex prediction mode of the P picture is an inter prediction mode using one past reference picture and two motion vectors.
  • the operation is substantially the same as the bidirectional prediction of the B picture, except that two motion compensation blocks are generated using one past reference picture.
  • the unidirectional compound prediction mode is also possible in the B picture, and the unidirectional compound prediction mode of the B picture is the same as the unidirectional compound prediction mode of the P picture.
  • a unidirectional simple prediction mode in which one motion vector exists
  • a unidirectional complex prediction mode and a bidirectional prediction mode in which two motion vectors exist.
  • An optimal prediction mode is determined for each block or for an arbitrary region, and information indicating the determined prediction mode is encoded.
  • a unidirectional simple prediction mode, a unidirectional complex prediction mode, and a bidirectional prediction mode are possible.
  • a unidirectional simple prediction mode and a unidirectional complex prediction mode are possible.
  • the bidirectional prediction mode and the unidirectional complex prediction mode generate one reference block using a weighted average of two reference blocks on which motion compensation is performed using two motion vectors.
  • a reference block may be generated by taking an average of two motion vectors to obtain an actual motion vector, and then performing motion compensation using the real motion vector. For example, motion vectors (1/4, 1) and (1/8, 3/4) are encoded, and (3/16, 7/8) calculated using two motion vectors for motion compensation. To perform motion compensation and generate a reference block.
  • each motion vector resolution may be determined for each prediction mode.
  • FIG. 1 is a diagram for describing implementations regarding whether a resolution of a motion vector and a resolution flag of a motion vector are transmitted according to each inter prediction mode according to the present invention.
  • Fig. 1 shows the resolution flags of motion vectors that can be used in unidirectional simple prediction mode, unidirectional complex prediction mode, and bidirectional prediction mode with 1/4 pixel resolution or 1/8 pixel resolution and in each case. Implementations regarding transmission or not are described.
  • the resolution of the motion vector 1 is fixed to 1/4 pixel, and therefore the resolution flag is not transmitted and the resolution of the motion vector 2 is (1)
  • the resolution of motion vector 1 and motion vector 2 may be selected among 1/4 or 1/8 pixels, respectively. And therefore both the resolution flag of motion vector 1 and the resolution flag of motion vector 2 are transmitted, (3) the resolution of motion vector 1 can be selected between 1/4 or 1/8 pixels and thus the resolution of motion vector 1 (4) Resolution of motion vector 1 and motion vector 2 when the flag is transmitted and the resolution of motion vector 2 is fixed to 1/4 pixel and therefore the resolution flag of motion vector 2 is not transmitted.
  • FIG. 1 where the degree can be selected from 1/4 or 1/8 pixels and one resolution flag is transmitted indicating the resolution of motion vector 1 and motion vector 2.
  • FIG. 2 is a diagram for describing other implementations related to resolution of a motion vector and transmission of a resolution flag of a motion vector according to each inter prediction mode according to the present invention.
  • the resolution of the motion vector 1 is fixed at 1/4 pixel, so no resolution flag is transmitted, and the resolution of the motion vector 2 is 1/2 or 1 If / 8 pixels can be selected and thus the resolution flag of motion vector 2 is transmitted, (2) the resolution of motion vector 1 can be selected from 1/2 or 1/8 pixels, so the resolution flag of motion vector 1 is Is transmitted, the resolution of motion vector 2 can be selected from 1/2 or 1/4 pixels, so if the resolution flag of motion vector 2 is transmitted, (3) the resolution of motion vector 1 is 1/2 or 1/8 pixel (4) the motion vector when the resolution flag of the motion vector 1 is transmitted, and the resolution flag of the motion vector 2 is fixed to 1/4 pixel, and thus the resolution flag of the motion vector 2 is not transmitted.
  • Four implementations in which the resolution of 1 and motion vector 2 can be selected among 1/4 or 1/8 pixels and one resolution flag representing the resolution of motion vector 1 and motion vector 2 are transmitted are shown in FIG. have.
  • the motion vector resolution may be determined for each motion vector or in a unit of a block, macroblock, slice, picture, or sequence corresponding to a predetermined image region, for example, a unit of encoding / decoding.
  • a unit of encoding / decoding For example, when inter prediction of blocks belonging to the first slice, the resolution of the motion vector in the unidirectional simple prediction mode is fixed to 1/4 pixel. Therefore, the resolution flag is not transmitted separately, and the resolution of the motion vector 1 in the bidirectional prediction mode is The resolution flag of the motion vector 2 can be selected between 1/4 or 1/8 pixels so that the resolution flag of the motion vector 2 is transmitted to the decoder.
  • the resolution of the motion vector in the unidirectional simple prediction mode is fixed to 1/2 pixel, and thus the resolution flag is not transmitted separately, and the resolution of the motion vector 1 in the bidirectional prediction mode is 1 /.
  • the resolution flag of motion vector 2 can be selected from 1/2 or 1/8 pixels so that the resolution flag of motion vector 2 is transmitted to the decoder.
  • the motion vector resolution may be determined by a resolution combination in which the P picture and the B picture are different from each other.
  • all P pictures may be encoded and decoded using the combination example 1 of FIG. 3, and all B pictures may be encoded and decoded using the combination example 8 of FIG. 3.
  • the present embodiment can be applied to both the P picture and the B picture. It is possible to use different motion vector resolutions for each prediction mode used in the P picture and the B picture.
  • the motion vector may have various resolutions.
  • inter prediction encoding includes a unidirectional simple prediction mode in which one motion vector exists according to the motion vector resolution, and a unidirectional complex prediction mode in which two motion vectors exist and a bidirectional prediction mode.
  • the prediction mode uses unidirectional simple prediction mode
  • the prediction mode is unidirectional simple prediction mode.
  • the optimal prediction mode among the unidirectional complex prediction mode and the bidirectional prediction mode is determined and encoded. Accordingly, the optimal motion vector resolution is determined for each block or for an arbitrary region, and information representing the determined motion vector resolution is encoded, and the information indicating the determined prediction mode is encoded according to the motion vector resolution.
  • a unidirectional simple prediction mode, a unidirectional complex prediction mode, and a bidirectional prediction mode are possible.
  • the motion vector resolution is 1/4
  • the motion vector resolution flag is encoded by 1/4
  • the prediction mode is a unidirectional simple prediction mode
  • the prediction mode is not encoded.
  • the motion vector resolution is higher than 1/4, for example, 1/8
  • the motion vector resolution flag is encoded as 1/8
  • the prediction mode is optimal prediction among unidirectional simple prediction mode, unidirectional complex prediction mode, and bidirectional prediction mode. Encode the mode.
  • a unidirectional simple prediction mode and a unidirectional complex prediction mode are possible.
  • the motion vector resolution flag is encoded by 1/4
  • the prediction mode is a unidirectional simple prediction mode, and the prediction mode is not encoded.
  • the motion vector resolution flag is encoded as 1/8, and the prediction mode determines the optimal prediction mode among unidirectional simple prediction mode and unidirectional complex prediction mode.
  • the optimal prediction mode is encoded.
  • the motion vector resolution and the inter prediction mode may be encoded by respective syntax.
  • the motion vector resolution and the prediction mode of the current block are encoded.
  • the decoder decodes the prediction mode to unidirectional simple prediction mode because the motion vector resolution is 1/8.
  • FIG. 3 shows an example of a method of encoding and decoding a motion vector resolution and an inter prediction mode in one syntax in the case of a P picture.
  • the prediction mode is unidirectional complex prediction mode
  • the prediction mode is unidirectional simple prediction mode
  • the motion vector resolution is 1/4.
  • the prediction mode is a unidirectional simple prediction mode, and is encoded as '0'. If the unidirectional complex prediction mode is selected, the resolutions of the motion vectors 1 and 2 may be selected among the combinations of the unidirectional complex prediction mode / bidirectional prediction mode shown in FIG. 1.
  • the bin of FIG. 3 is encoded as it is, and when the CABAC is encoded, the probability may be encoded by different bins with reference to FIGS. 4 to 6.
  • FIG. 5 is a diagram illustrating a probability condition of bin 1
  • FIG. 6 is a diagram illustrating a probability condition of bin 2.
  • blocks A and B are encoded when encoding bin 1 of '10'. If the two blocks are 1/4, they are encoded using the probability model 0 (Context 0).
  • a probability model is determined using prediction modes of blocks A and B. If both blocks are not unidirectional complex prediction mode, probability model 2 (Context Encoding using 2).
  • FIG. 7 is an example of a method of encoding and decoding a motion vector resolution and an inter prediction mode with one syntax in the case of a B picture.
  • the prediction mode is the bidirectional prediction mode
  • the prediction mode is the unidirectional complex prediction mode
  • the prediction mode is the unidirectional simple prediction mode
  • the prediction mode is unidirectional simple prediction mode
  • the resolutions of the motion vectors 1 and 2 may be selected among the combinations of the unidirectional complex prediction mode / bidirectional prediction mode shown in FIG. 1.
  • the bin of FIG. 7 is encoded as it is, and when the CABAC is encoded, the bin may be encoded with different probabilities for each bin with reference to FIGS. 4 to 6 and 8.
  • 8 is a diagram illustrating a probability condition of bin 3.
  • arithmetic coding may be performed by varying a probability condition according to a prediction mode of a neighboring block. For example, if blocks A and B, which are neighboring blocks, are both bidirectional predictive modes, they are encoded using probability model 0 (Context 0), and if one of blocks A and B is bidirectional predictive mode, probability model 1 (Context 1) If both blocks A and B are not in the bidirectional prediction mode, they are encoded using the probability model 2 (Context 2).
  • the bidirectional prediction mode and the unidirectional complex prediction mode generate one reference block using a weighted average of two reference blocks on which motion compensation is performed using two motion vectors.
  • a reference block may be generated by taking an average of two motion vectors to obtain an actual motion vector, and then performing motion compensation using the real motion vector. For example, motion vectors (1/4, 1) and (1/8, 3/4) are encoded, and (3/16, 7/8) calculated using two motion vectors for motion compensation. To perform motion compensation and generate a reference block.
  • the decoder normally performs the reverse operation of the encoder. Determination of prediction mode and use of mode information, determination of motion vector resolution and use of resolution flags are made in advance between the encoder and the decoder. According to this promise, the decoder can decode the prediction mode information and then decode the promised motion vector resolution according to the prediction mode. For example, when the motion vector resolution is fixed, the fixed resolution is known in advance, and when the motion vector resolution flag is transmitted from the encoder, the motion vector is decoded using the motion vector resolution flag.
  • the present invention is a useful invention that can reduce the number of bits required for encoding a differential motion vector.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The method for encoding a motion vector according to an embodiment of the present invention comprises: a step for determining a first motion vector and a second motion vector related to a current block to be encoded; a step for determining a predicted motion vector for each of the first motion vector and the second motion vector; a step for calculating a first differential motion vector, which is a differential between the first motion vector and the predicted motion vector of the first motion vector, and a second differential motion vector, which is a differential between the second motion vector and the predicted motion vector of the second motion vector; and a step for encoding the first differential motion vector and the second differential motion vector, wherein the resolution of the first motion vector and the resolution of the second motion vector are different from each other.

Description

움직임 벡터 부호화/복호화 방법 및 장치Motion vector encoding / decoding method and apparatus
본 발명은 움직임 벡터 부호화 및 복호화에 관한 것이다. 상세하게는, 적응적인 움직임 벡터 해상도(adaptive motion vector resolution)를 고려한 움직임 벡터 부호화 방법 및 장치와, 움직임 벡터 복호화 방법 및 장치에 관한 것이다.The present invention relates to motion vector encoding and decoding. In detail, the present invention relates to a motion vector encoding method and apparatus in consideration of adaptive motion vector resolution, and a motion vector decoding method and apparatus.
이 부분에 기술된 내용은 단순히 본 발명의 실시예에 대한 배경 정보를 제공할 뿐 종래기술을 구성하는 것은 아니다.The contents described in this section merely provide background information on the embodiments of the present invention and do not constitute a prior art.
동영상에 대한 데이터의 부호화는 인트라 예측 부호화와 인터 예측 부호화로 성립되어 있다. 이러한 인트라 예측 부호화 또는 인터 예측 부호화는 데이터 간에 존재하는 상관도(Correlation)를 줄일 수 있는 효과적인 방법으로 다양한 데이터의 압축에 널리 사용된다. 특히, 인터 예측 부호화에서 현재 부호화하고자 하는 현재 블록의 움직임을 추정하여 결정되는 현재 블록의 움직임 벡터는 주변 블록의 움직임 벡터와 밀접한 상관 관계가 있기 때문에, 주변 블록의 움직임 벡터로부터 현재 블록의 움직임 벡터에 대한 예측값(PMV: Predicted Motion Vector, 이하 '예측 움직임 벡터'라 칭함)을 계산한 후 현재 블록의 움직임 벡터의 값 자체를 부호화하지 않고 예측값에 대한 차분값(DMV: Differential Motion Vector, 이하 '차분 벡터'라 칭함)만을 부호화함으로써 부호화해야 할 비트량을 상당히 줄일 수 있으며 그에 따라 부호화 효율을 높일 수 있다.The encoding of data for a video is made up of intra prediction encoding and inter prediction encoding. Such intra prediction encoding or inter prediction encoding is widely used for compressing various data in an effective way to reduce correlation between data. In particular, since the motion vector of the current block determined by estimating the motion of the current block to be currently encoded by inter prediction encoding is closely correlated with the motion vector of the neighboring block, the motion vector of the neighboring block is determined from the motion vector of the current block. After calculating the predicted motion vector (PMV: Predicted Motion Vector), the differential value of the predicted value (DMV: Differential Motion Vector) is calculated without encoding the value of the motion vector of the current block itself. By coding only '), the amount of bits to be encoded can be significantly reduced, thereby improving the coding efficiency.
즉, 인터 예측 부호화를 수행하는 경우, 부호화기는 이전에 부호화되고 복호화되어 복원된 참조 프레임에서 현재 블록의 움직임을 추정하여 결정한 예측 움직임 벡터와 현재 움직임 벡터와의 차분값인 차분 벡터만을 부호화하여 전송한다. 복호화기도 미리 복호화된 주위의 블록의 움직임 벡터를 이용하여 현재 블록의 움직임 벡터를 예측하여 전송된 차분 벡터와 예측 움직임 벡터를 더하여 현재 움직임 벡터를 복원한다.That is, in the case of performing inter prediction encoding, the encoder encodes and transmits only a difference vector, which is a difference between the predicted motion vector and the current motion vector determined by estimating the motion of the current block in a previously encoded, decoded and reconstructed reference frame. . The decoder also predicts the motion vector of the current block by using the motion vector of the neighboring block previously decoded, and reconstructs the current motion vector by adding the transmitted difference vector and the predicted motion vector.
또한, 인터 예측 부호화를 수행할 때, 참조 프레임을 보간하여 해상도를 일괄적으로 높인 후, 현재 블록의 움직임을 추정하여 결정한 예측 움직임 벡터와 현재 움직임 벡터와의 차분값인 차분 벡터를 부호화하여 전송할 수 있다. 이때, 참조 프레임의 영상 즉, 참조 영상의 해상도를 커지면 더욱 정확한 인터 예측이 가능하여 원 영상과 예측 영상 간의 잔차 신호를 부호화하여 발생하는 비트량은 줄어 들지만, 움직임 벡터의 해상도도 커지므로 차분 벡터를 부호화하여 발생하는 비트량도 커진다. 반대로, 참조 영상의 해상도가 작아지면 잔차 신호를 부호화하여 발생하는 비트량은 커지지만, 움직임 벡터의 해상도도 작아지므로 차분 벡터를 부호화하여 발생하는 비트량도 작아진다.In addition, when performing inter prediction encoding, the resolution may be collectively increased by interpolating a reference frame, and then encoded by a difference vector, which is a difference between the predicted motion vector determined by estimating the motion of the current block and the current motion vector, and then transmitted. have. In this case, when the resolution of the reference frame image, that is, the reference image, is increased, more accurate inter prediction is possible, thereby reducing the amount of bits generated by encoding the residual signal between the original image and the predicted image, but increasing the resolution vector of the motion vector. The amount of bits generated by encoding also increases. On the contrary, when the resolution of the reference picture becomes smaller, the bit amount generated by encoding the residual signal becomes larger, but since the resolution of the motion vector becomes smaller, the bit amount generated by encoding the difference vector also becomes smaller.
그런데, 종래기술에 따른 인터 예측 부호화에서는 영상의 모든 블록, 슬라이스, 픽처 등과 같은 부호화 단위의 영상에 대해 동일한 해상도로 보간하고 동일한 해상도의 움직임 벡터를 이용하여 인터 예측이 수행되었다. 예컨대, H.264/AVC 표준의 경우 움직임 벡터의 해상도는 1/4화소 해상도로 고정된다. 이와 같은 종래 기술에 따르면, 움직임 벡터가 커지게 되면 잔차 신호도 커지게 되고 그에 따라 효율적인 부호화가 어려워 압축 효율이 저하되는 문제점이 있다.However, in the inter prediction encoding according to the related art, inter prediction is performed by using the same resolution and interpolating the same resolution for an image having a coding unit such as all blocks, slices, and pictures of the image. For example, for the H.264 / AVC standard, the resolution of the motion vector is fixed at 1/4 pixel resolution. According to the conventional technology, as the motion vector increases, the residual signal also increases, and thus, it is difficult to efficiently encode the compression vector.
또한, 인터 예측 복호화는 인터 예측 부호화에 상응적으로 동작하기 때문에, 인터 예측 부호화의 압축 효율이 저하된 상태에서는 인터 예측 복호화의 고효율을 기대하기 어렵다는 문제점이 있다.In addition, since inter prediction decoding operates correspondingly to inter prediction encoding, it is difficult to expect high efficiency of inter prediction decoding in a state where the compression efficiency of inter prediction encoding is reduced.
전술한 문제점을 해결하기 위해 본 발명은, 적응적인 움직임 벡터 정밀도를 이용하여 움직임 벡터를 부호화함으로써 움직임 벡터의 부호화 효율, 영상의 압축 효율 및 재생 영상의 화질을 향상시키는 데 주된 목적이 있다.In order to solve the above problems, the present invention has a main object to improve the coding efficiency of the motion vector, the compression efficiency of the image, and the quality of the reproduced image by encoding the motion vector using adaptive motion vector precision.
또한, 적응적인 움직임 벡터 정밀도를 이용하여 부호화된 움직임 벡터를 복원하는 데 주된 목적이 있다.In addition, the primary purpose is to reconstruct a motion vector encoded using adaptive motion vector precision.
또한, 적응적인 움직임 벡터 정밀도를 이용하는 경우, 움직임 벡터의 정밀도를 나타내는 정보를 효율적으로 부호화 및 복호화하는 데 목적이 있다.In addition, when adaptive motion vector precision is used, an object thereof is to efficiently encode and decode information representing the precision of a motion vector.
전술한 목적을 달성하기 위한 본 발명의 일 실시예에 따른 움직임 벡터 부호화 방법은, 부호화할 현재 블록과 관련된 제1 움직임 벡터와 제2 움직임 벡터를 결정하는 단계; 상기 제1 움직임 벡터와 제2 움직임 벡터의 각각의 예측 움직임 벡터를 결정하는 단계; 상기 제1 움직임 벡터와 상기 제1 움직임 벡터의 예측 움직임 벡터 간의 차분인 제1 차분 움직임 벡터 및 상기 제2 움직임 벡터와 상기 제2 움직임 벡터의 예측 움직임 벡터 간의 차분인 제2 차분 움직임 벡터를 산출하는 단계; 및 상기 제1 차분 움직임 벡터와 상기 제2 차분 움직임 벡터를 부호화하는 단계;를 포함하고,상기 제1 움직임 벡터의 해상도와 상기 제2 움직임 벡터의 해상도는 서로 상이한 것을 특징으로 한다.According to an aspect of the present invention, there is provided a motion vector encoding method comprising: determining a first motion vector and a second motion vector associated with a current block to be encoded; Determining a prediction motion vector of each of the first and second motion vectors; Calculating a first differential motion vector that is a difference between the first motion vector and a predicted motion vector of the first motion vector, and a second differential motion vector that is a difference between the second motion vector and a predicted motion vector of the second motion vector. step; And encoding the first differential motion vector and the second differential motion vector, wherein the resolution of the first motion vector and the resolution of the second motion vector are different from each other.
전술한 목적을 달성하기 위한 본 발명의 일 실시예에 따른 움직임 벡터 복호화 방법은, 복호할 현재 블록과 관련된 제1 움직임 벡터와 제2 움직임 벡터의 각각의 예측 움직임 벡터를 결정하는 단계; 상기 제1 움직임 벡터와 상기 제1 움직임 벡터의 예측 움직임 벡터 간의 차분인 제1 차분 움직임 벡터 및 상기 제2 움직임 벡터와 상기 제2 움직임 벡터의 예측 움직임 벡터 간의 차분인 제2 차분 움직임 벡터를 복호하는 단계; 상기 복호된 제1 차분 움직임 벡터와 상기 제1 움직임 벡터의 예측 움직임 벡터를 이용하여 상기 제1 움직임 벡터를 복원하는 단계; 및 상기 복호된 제2 차분 움직임 벡터와 상기 제2 움직임 벡터의 예측 움직임 벡터를 이용하여 상기 제2 움직임 벡터를 복원하는 단계;를 포함하고, 상기 제1 움직임 벡터의 해상도와 상기 제2 움직임 벡터의 해상도는 서로 상이한 것을 특징으로 한다.According to an aspect of the present invention, there is provided a method of decoding a motion vector, comprising: determining a prediction motion vector of each of a first motion vector and a second motion vector associated with a current block to be decoded; Decoding a first differential motion vector that is a difference between the first motion vector and a predicted motion vector of the first motion vector, and a second differential motion vector that is a difference between the second motion vector and a predicted motion vector of the second motion vector. step; Reconstructing the first motion vector using the decoded first differential motion vector and the predicted motion vector of the first motion vector; And reconstructing the second motion vector using the decoded second differential motion vector and the predicted motion vector of the second motion vector, wherein the resolution of the first motion vector and the second motion vector The resolution is characterized by different from each other.
전술한 목적을 달성하기 위한 본 발명의 다른 실시예에 따른 움직임 벡터 부호화 방법은, 부호화할 현재 블록의 인터 예측 모드를 선택하는 단계; 상기 인터 예측 모드가 단방향단순예측모드인지 또는 단방향복합예측모드인지 또는 양방향예측모드인지 여부에 따라, 상기 현재 블록의 인터 예측에 이용되는 적어도 하나의 움직임 벡터의 해상도를 선택하는 단계; 및 상기 선택된 움직임 벡터의 해상도에 따라 상기 적어도 하나의 움직임 벡터를 부호화하는 단계;를 포함하는 것을 특징으로 한다.According to another aspect of the present invention, there is provided a motion vector encoding method comprising: selecting an inter prediction mode of a current block to be encoded; Selecting the resolution of at least one motion vector used for inter prediction of the current block according to whether the inter prediction mode is a unidirectional simple prediction mode, a unidirectional complex prediction mode, or a bidirectional prediction mode; And encoding the at least one motion vector according to the resolution of the selected motion vector.
전술한 목적을 달성하기 위한 본 발명의 다른 실시예에 따른 움직임 벡터 복호화 방법은, 복호할 현재 블록의 인터 예측 모드를 선택하는 단계; 상기 인터 예측 모드가 단방향단순예측모드인지 또는 단방향복합예측모드인지 또는 양방향예측모드인지 여부에 따라, 상기 현재 블록의 인터 예측에 이용되는 적어도 하나의 움직임 벡터의 해상도를 선택하는 단계; 및 상기 선택된 움직임 벡터의 해상도에 따라 상기 적어도 하나의 움직임 벡터를 복호화하는 단계;를 포함하는 것을 특징으로 한다.According to another aspect of the present invention, there is provided a motion vector decoding method comprising: selecting an inter prediction mode of a current block to be decoded; Selecting the resolution of at least one motion vector used for inter prediction of the current block according to whether the inter prediction mode is a unidirectional simple prediction mode, a unidirectional complex prediction mode, or a bidirectional prediction mode; And decoding the at least one motion vector according to the resolution of the selected motion vector.
이상에서 설명한 바와 같이 본 발명의 실시예에 의하면, 움직임 벡터의 정밀도를 적응적으로 결정하여 움직임 벡터를 부호화하고 부호화된 움직임 벡터를 복호함으로써 영상의 압축 효율과 재생 영상의 화질을 향상시킬 수 있다.As described above, according to the exemplary embodiment of the present invention, the compression efficiency of the image and the image quality of the reproduced image can be improved by adaptively determining the precision of the motion vector, encoding the motion vector, and decoding the encoded motion vector.
또한, 본 발명은 차분 움직임 벡터의 부호화에 필요한 비트 수를 줄일 수 있다.In addition, the present invention can reduce the number of bits required for encoding the differential motion vector.
또한, 본 발명은 고정밀도의 움직임 벡터를 이용한 움직임 보상을 통해 재생 영상의 화질을 향상시키고, 영상의 잔차 신호를 부호화하는데 필요한 비트 수를 줄여 영상의 압축 효율을 향상시킬 수 있다.In addition, the present invention can improve the compression efficiency of an image by improving the image quality of a reproduced image and reducing the number of bits necessary for encoding a residual signal of the image through motion compensation using a high precision motion vector.
또한, 움직임 벡터의 정밀도를 나타내는 정보를 효율적으로 부호화함으로써 움직임 벡터의 정밀도를 나타내는 정보의 부호화에 필요한 데이터량을 줄일 수 있다.In addition, by efficiently encoding information indicating the precision of the motion vector, the amount of data necessary for encoding the information indicating the precision of the motion vector can be reduced.
도 1은 본 발명에 따른, 각각의 인터 예측 모드에 따른 움직임 벡터의 해상도 및 움직임 벡터의 해상도 플래그의 전송 여부에 관한 구현의 조합 예시들을 설명하기 위한 도면이고,FIG. 1 is a diagram for explaining combination examples of an implementation relating to a resolution of a motion vector and a resolution flag of a motion vector according to each inter prediction mode according to the present invention.
도 2는 본 발명에 따른, 각각의 인터 예측 모드에 따른 움직임 벡터의 해상도 및 움직임 벡터의 해상도 플래그의 전송 여부에 관한 다른 구현의 조합 예시들을 설명하기 위한 도면이다.FIG. 2 is a diagram for explaining combination examples of other implementations related to the resolution of a motion vector and a resolution flag of the motion vector according to each inter prediction mode according to the present invention.
이하, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present invention will be described in detail through exemplary drawings. In adding reference numerals to the components of each drawing, it should be noted that the same reference numerals are assigned to the same components as much as possible even though they are shown in different drawings. In addition, in describing the present invention, when it is determined that the detailed description of the related well-known configuration or function may obscure the gist of the present invention, the detailed description thereof will be omitted.
또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다.In addition, in describing the component of this invention, terms, such as 1st, 2nd, A, B, (a), (b), can be used. These terms are only for distinguishing the components from other components, and the nature, order or order of the components are not limited by the terms. If a component is described as being "connected", "coupled" or "connected" to another component, that component may be directly connected or connected to that other component, but between components It will be understood that may be "connected", "coupled" or "connected".
이하에서 후술할 영상 부호화 장치(Video Encoding Apparatus), 영상 복호화 장치(Video Decoding Apparatus)는 개인용 컴퓨터(PC: Personal Computer), 노트북 컴퓨터, 개인 휴대 단말기(PDA: Personal Digital Assistant), 휴대형 멀티미디어 플레이어(PMP: Portable Multimedia Player), 플레이스테이션 포터블(PSP: PlayStation Portable), 무선 통신 단말기(Wireless Communication Terminal), TV(Television) 등일 수 있으며, 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, 영상을 부호화하거나 복호화하기 위한 각종 프로그램과 데이터를 저장하기 위한 메모리, 프로그램을 실행하여 연산 및 제어하기 위한 마이크로프로세서 등을 구비하는 다양한 장치를 의미한다.A video encoding apparatus (Video Encoding Apparatus), a video decoding apparatus (Video Decoding Apparatus) to be described later, a personal computer (PC), a notebook computer, a personal digital assistant (PDA), a portable multimedia player (PMP) : Portable Multimedia Player (PSP), PlayStation Portable (PSP: PlayStation Portable), Wireless Communication Terminal (Wireless Communication Terminal), TV (Television) and the like, communication device for communication with various devices or wired or wireless communication network, etc. The present invention refers to various devices including various programs for encoding or decoding an image, a memory for storing data, and a microprocessor for executing and operating a program.
이하, 본 발명에 따른 움직임 벡터 부호화 및 복호화의 실시예들이 설명된다. Hereinafter, embodiments of motion vector encoding and decoding according to the present invention will be described.
(제1 실시예) ( First embodiment)
이하, 본 발명의 제1 실시예에 따른 움직임 벡터 부호화/복호화 장치 및 방법에 대해 설명한다.Hereinafter, a motion vector encoding / decoding apparatus and method according to the first embodiment of the present invention will be described.
본 발명에 따르면, 움직임 벡터는 다양한 해상도를 가질 수 있다. 본 발명의 제1 실시예에 따른 움직임 벡터는 1/4 화소 해상도와 1/8 해상도를 가질 수 있다. 본 발명의 제1 실시예에 따른 움직임 벡터 부호화 장치는 움직임 벡터의 해상도를 복호화 장치에 알릴 필요가 있는 경우, 현재 블록의 움직임 벡터의 해상도를 나타내는 움직임 벡터 해상도 플래그를 생성하여 전송할 수 있다.According to the present invention, the motion vector may have various resolutions. The motion vector according to the first embodiment of the present invention may have 1/4 pixel resolution and 1/8 resolution. When the motion vector encoding apparatus needs to inform the decoding apparatus of the resolution of the motion vector, the motion vector encoding apparatus according to the first embodiment of the present invention may generate and transmit a motion vector resolution flag indicating the resolution of the motion vector of the current block.
본 실시예에 따르면, 움직임 벡터 해상도 플래그는 차분 움직임 벡터 또는 예측 움직임 벡터의 해상도가 아니라 현재 블록의 움직임 벡터의 해상도를 나타낸다.According to this embodiment, the motion vector resolution flag indicates the resolution of the motion vector of the current block, not the differential motion vector or the prediction motion vector.
본 실시예에 따르면, 현재 블록과 관련된 움직임 벡터, 즉 현재 블록의 인터 예측에 이용되는 움직임 벡터를 복수개를 전송 할 수 있다. 또한, 각각의 움직임 벡터마다 움직임 벡터 해상도 플래그를 전송할 수 있다. 또는 현재 블록 단위로 움직임 벡터 해상도 플래그를 전송할 수 있다. 예를 들어, 현재 블록이 움직임 벡터 해상도가 1/4이고 (2/4, 1/4), (-1/4, 1/4) 두 개의 움직임 벡터가 전송 될 수 있다. 두 개의 움직임 벡터를 이용하여 각각의 움직임 보상 블록을 생성하고, 두 개의 움직임 보상 블록의 평균을 이용하여 현재 블록의 예측 블록을 생성한다. 이때, 두 개의 움직임 보상 블록의 평균을 산출할 때 가중치를 이용하여 산출할 수도 있다.According to the present embodiment, a plurality of motion vectors associated with the current block, that is, motion vectors used for inter prediction of the current block, may be transmitted. In addition, a motion vector resolution flag may be transmitted for each motion vector. Alternatively, the motion vector resolution flag may be transmitted in the current block unit. For example, the current block has a motion vector resolution of 1/4 and two motion vectors of (2/4, 1/4) and (-1/4, 1/4) may be transmitted. Each motion compensation block is generated using two motion vectors, and a prediction block of the current block is generated using the average of the two motion compensation blocks. In this case, the average of two motion compensation blocks may be calculated using weights.
한편, 현재 블록의 인터예측에 이용되는 복수개의 움직임 벡터가 전송되는 경우, 복수개의 움직임 벡터가 전송되는 모드임을 부호화 한다. 따라서, 복호화기는 현재 블록의 모드가 복수개의 움직임 벡터가 존재하는 모드인 경우, 복수개의 움직임 벡터를 복호화한다.Meanwhile, when a plurality of motion vectors used for inter prediction of the current block are transmitted, it is encoded that the plurality of motion vectors are transmitted. Therefore, when the mode of the current block is a mode in which a plurality of motion vectors exist, the decoder decodes the plurality of motion vectors.
본 실시예에 따르면, 복수개의 움직임 벡터를 이용하여 다른 해상도의 블록을 만들어 낼 수 있다. 예를 들어, 현재 블록의 인터예측에 이용되는 움직임 벡터가 2개 이고, 각각의 움직임 벡터가 (0, 1/4), (1/4, 1)인 경우 상기 두 개의 움직임 벡터를 이용하여 각각의 움직임 보상 블록을 생성하고, 상기 두 개의 움직임 보상 블록들을 선형내삽(bi-linear interpolation)하면, (1/8, 5/8) 위치의 움직임 보상 블록을 생성할 수 있다. 따라서, 부호화기는 1/8화소 단위의 해상도를 이용하여 움직임 벡터를 부호화하지 않고, 해당 위치를 산출할 수 있는 움직임 벡터 두 개로 부호화 할 수 있다. 이러한 경우, 움직임 벡터 해상도는 1/4화소 해상도로 고정되고, 움직임 벡터 해상도 플래그는 부호화할 필요가 없다. 또한, 복수개의 움직임 벡터의 참조 영상은 같을 수도 있고, 다를 수도 있다. According to the present exemplary embodiment, blocks having different resolutions may be generated using a plurality of motion vectors. For example, if there are two motion vectors used for inter prediction of the current block and each motion vector is (0, 1/4) or (1/4, 1), the two motion vectors are used. By generating a motion compensation block of, and bi-linear interpolation of the two motion compensation blocks, a motion compensation block of position (1/8, 5/8) can be generated. Therefore, the encoder may encode the motion vector using two motion vectors capable of calculating the corresponding position without encoding the motion vector using the resolution of 1/8 pixel unit. In this case, the motion vector resolution is fixed at 1/4 pixel resolution, and the motion vector resolution flag does not need to be encoded. In addition, the reference images of the plurality of motion vectors may be the same or different.
다른 대안으로서, 현재 블록의 인터예측에 복수개의 움직임 벡터를 이용하는 경우, 상기 복수의 움직임 벡터의 해상도를 동일하게 고정시키지 않고 각각의 움직임 벡터의 해상도를 다르게 할 수도 있다. 예를 들어 움직임 벡터 1은 (1/4, 1)이고, 움직임 벡터 2는 (1/8, 3/4)인 경우 전술한 바와 유사하게 움직임 보상을 수행하면 (3/16, 7/8) 위치의 움직임 보상 블록을 생성할 수 있다. 이 때, 움직임 벡터 1은 1/4화소 단위의 해상도로 고정하고 따라서 움직임 벡터 해상도 플래그는 부호화하지 않는다. 움직임 벡터 2는 움직임 벡터 해상도를 적응적으로 부호화 하고, 그 해상도를 나타내는 움직임 벡터 해상도 플래그를 부호화 한다. 또는 그 반대로 움직임 벡터 1의 해상도는 적응적으로 부호화하고 움직임 벡터 2의 해상도는 소정 값으로 고정할 수도 있다. 또는, 현재 블록의 인터예측에 2개 이상의 움직임 벡터를 이용하는 경우, 움직임 벡터마다 그 해상도를 적응적으로 선택하여 부호화 할 수도 있다. 한편, 복호화기는 통상 부호화기의 동작의 역동작을 수행한다. 그리고 움직임 벡터 해상도의 결정 및 해상도 플래그의 이용에 관하여는 부호화기와 복호화기 간에 미리 약속되어 있다. 이 약속에 따라 복호화기는 움직임 벡터 해상도가 고정되어 있는 경우, 그 고정된 해상도를 미리 알고 있으며, 움직임 벡터 해상도 플래그가 부호화기로부터 전송되는 경우에는 상기 움직임 벡터 해상도 플래그를 이용하여 움직임 벡터를 복호한다.As another alternative, when using a plurality of motion vectors for inter prediction of the current block, the resolution of each motion vector may be different without fixing the resolution of the plurality of motion vectors equally. For example, if the motion vector 1 is (1/4, 1) and the motion vector 2 is (1/8, 3/4), the motion compensation is performed similarly to the above description (3/16, 7/8). The motion compensation block of the position may be generated. At this time, the motion vector 1 is fixed at a resolution of 1/4 pixels, and thus the motion vector resolution flag is not encoded. The motion vector 2 adaptively encodes a motion vector resolution and encodes a motion vector resolution flag indicating the resolution. Alternatively, the resolution of motion vector 1 may be adaptively encoded and the resolution of motion vector 2 may be fixed to a predetermined value. Alternatively, when two or more motion vectors are used for inter prediction of the current block, the resolution may be adaptively selected and encoded for each motion vector. On the other hand, the decoder normally performs the reverse operation of the encoder. Determination of the motion vector resolution and use of the resolution flag are previously promised between the encoder and the decoder. According to this promise, when the motion vector resolution is fixed, the decoder knows the fixed resolution in advance, and when the motion vector resolution flag is transmitted from the encoder, the decoder decodes the motion vector using the motion vector resolution flag.
또한 본 실시예는 단방향단순예측모드와 단방향복합예측모드가 허용되는 P 픽쳐의 경우, 단방향복합예측모드를 이용하는 경우 역시 적용가능하다. In addition, the present embodiment is also applicable to the case of the P picture in which the unidirectional simple prediction mode and the unidirectional complex prediction mode are allowed, and when the unidirectional complex prediction mode is used.
한편, 본 실시예는 B 픽쳐에서 두장의 참조영상을 이용하는 양방향예측모드가 허용되는 인터예측모드에 적용 가능하다. 또한, B 픽쳐에서 한장의 참조영상을 이용하는 인터예측모드에도 당연히 단방향복합예측모드에 적용 가능하다.Meanwhile, the present embodiment is applicable to an inter prediction mode in which a bidirectional prediction mode using two reference images in a B picture is allowed. In addition, it is naturally applicable to the unidirectional complex prediction mode in the inter prediction mode using one reference picture in the B picture.
P 픽쳐의 단방향단순예측모드는 종래 P 픽처의 부호화 및 복호화에 이용되는 예측모드와 동일하다. 즉, 하나의 과거 참조 픽처와 하나의 움직임 벡터를 이용한 인터예측모드이다. 본 실시예에 따르면, P 픽쳐의 단방향복합예측모드는 하나의 과거 참조 픽처와 두 개의 움직임 벡터들을 이용한 인터예측모드이다. 하나의 과거 참조 픽처를 이용하여 두 개의 움직임 보상 블록을 생성한다는 점 외에 동작은 B 픽처의 양방향예측과 실질적으로 동일하다. 또한 B 픽쳐에서도 단방향복합예측모드가 가능하며, B 픽쳐의 단방향복합예측모드는 P 픽쳐의 단방향복합예측모드와 동일하다.The unidirectional simple prediction mode of a P picture is the same as the prediction mode used for encoding and decoding a conventional P picture. That is, it is an inter prediction mode using one past reference picture and one motion vector. According to the present embodiment, the unidirectional complex prediction mode of the P picture is an inter prediction mode using one past reference picture and two motion vectors. The operation is substantially the same as the bidirectional prediction of the B picture, except that two motion compensation blocks are generated using one past reference picture. The unidirectional compound prediction mode is also possible in the B picture, and the unidirectional compound prediction mode of the B picture is the same as the unidirectional compound prediction mode of the P picture.
(제2 실시예) ( 2nd Example)
이하, 본 발명의 제2 실시예에 따른 움직임 벡터 부호화/복호화 장치 및 방법에 대해 설명한다.Hereinafter, a motion vector encoding / decoding apparatus and method according to a second embodiment of the present invention will be described.
본 실시예에 따르면, 인터 예측 부호화에는 한 개의 움직임 벡터가 존재하는 단방향단순예측모드가 있고, 두 개의 움직임 벡터가 존재하는 단방향복합예측모드와 양방향예측모드가 있다. 블록마다 또는 임의의 영역마다 최적의 예측 모드가 결정되고 결정된 예측모드를 나타내는 정보를 부호화하게 된다. 또한 B 픽쳐인 경우 단방향단순예측모드, 단방향복합예측모드, 양방향예측 모드가 가능하다. 또한 P 픽쳐의 경우 단방향단순예측모드와 단방향복합예측모드가 가능하다. 또한, 양방향예측모드와 단방향복합예측모드는 두 개의 움직임 벡터를 이용하여 움직임 보상을 수행한 두 개의 참조 블록을 가중 평균 (weighted average)을 이용하여 하나의 참조 블록을 생성한다. 또는 두 개의 움직임 벡터의 평균을 취하여 실제 움직임 벡터를 얻은 후 상기 실제 움직임 벡터를 이용하여 움직임 보상을 수행하여 참조 블록을 생성할 수 있다. 예를 들어, 움직임 벡터 (1/4, 1)과 (1/8, 3/4)를 부호화하고, 움직임 보상 시에는 두 움직임 벡터를 이용하여 산출한 (3/16, 7/8)를 이용하여 움직임 보상을 수행하고 참조 블록을 생성한다.According to the present embodiment, there is a unidirectional simple prediction mode in which one motion vector exists, and a unidirectional complex prediction mode and a bidirectional prediction mode in which two motion vectors exist. An optimal prediction mode is determined for each block or for an arbitrary region, and information indicating the determined prediction mode is encoded. In the case of a B picture, a unidirectional simple prediction mode, a unidirectional complex prediction mode, and a bidirectional prediction mode are possible. In addition, in the case of a P picture, a unidirectional simple prediction mode and a unidirectional complex prediction mode are possible. In addition, the bidirectional prediction mode and the unidirectional complex prediction mode generate one reference block using a weighted average of two reference blocks on which motion compensation is performed using two motion vectors. Alternatively, a reference block may be generated by taking an average of two motion vectors to obtain an actual motion vector, and then performing motion compensation using the real motion vector. For example, motion vectors (1/4, 1) and (1/8, 3/4) are encoded, and (3/16, 7/8) calculated using two motion vectors for motion compensation. To perform motion compensation and generate a reference block.
본 실시예에 따르면, 예측 모드마다 각각의 움직임 벡터 해상도를 결정할 수 있다. According to this embodiment, each motion vector resolution may be determined for each prediction mode.
도 1은 본 발명에 따른, 각각의 인터 예측 모드에 따른 움직임 벡터의 해상도 및 움직임 벡터의 해상도 플래그의 전송 여부에 관한 구현예들을 설명하기 위한 도면이다.FIG. 1 is a diagram for describing implementations regarding whether a resolution of a motion vector and a resolution flag of a motion vector are transmitted according to each inter prediction mode according to the present invention.
도 1에는 단방향단순예측모드, 단방향복합예측모드, 양방향예측모드에서 사용될 수 있는 움직임 벡터의 해상도가 1/4화소 해상도 또는 1/8화소 해상도를 가지는 경우 및 각 경우에 있어 움직임 벡터의 해상도 플래그의 전송 여부에 관한 구현예들이 설명되어 있다.Fig. 1 shows the resolution flags of motion vectors that can be used in unidirectional simple prediction mode, unidirectional complex prediction mode, and bidirectional prediction mode with 1/4 pixel resolution or 1/8 pixel resolution and in each case. Implementations regarding transmission or not are described.
도 1을 참조하면, 단방향단순예측모드의 움직임 벡터인 경우, (1)움직임 벡터의 해상도가 1/4 화소로 고정되어 있고 따라서 해상도 플래그는 전송되지 않는 경우 및 (2)1/4 또는 1/8 화소 중 선택될 수 있고 따라서 해상도 플래그가 전송되는 경우의 두 가지 구현예가 설명되어 있다. Referring to FIG. 1, in the case of a motion vector in the unidirectional simple prediction mode, (1) the resolution of the motion vector is fixed at 1/4 pixel, and thus no resolution flag is transmitted and (2) 1/4 or 1 / Two implementations are described where a choice of 8 pixels can be selected and therefore a resolution flag is transmitted.
단방향복합예측모드와 양방향예측모드의 움직임 벡터 1 및 움직임 벡터 2의 경우, (1)움직임 벡터 1의 해상도가 1/4 화소로 고정되어 있고 따라서 해상도 플래그는 전송되지 않고, 움직임 벡터 2의 해상도는 1/4 또는 1/8 화소 중 선택될 수 있고 따라서 움직임 벡터 2의 해상도 플래그가 전송되는 경우, (2) 움직임 벡터 1 및 움직임 벡터 2의 해상도가 각각 1/4 또는 1/8 화소 중 선택될 수 있고 따라서 움직임 벡터 1의 해상도 플래그 및 움직임 벡터 2의 해상도 플래그가 모두 전송되는 경우, (3) 움직임 벡터 1의 해상도는 1/4 또는 1/8 화소 중 선택될 수 있고 따라서 움직임 벡터 1의 해상도 플래그가 전송되고, 움직임 벡터 2의 해상도가 1/4 화소로 고정되어 있고 따라서 움직임 벡터 2의 해상도 플래그는 전송되지 않는 경우, (4) 움직임 벡터 1 및 움직임 벡터 2의 해상도가 1/4 또는 1/8 화소 중 선택될 수 있고 움직임 벡터 1 및 움직임 벡터 2의 해상도를 나타내는 하나의 해상도 플래그가 전송되는 경우의 네 가지 구현예가 도 1에 표시되어 있다.In the case of the motion vector 1 and the motion vector 2 in the unidirectional complex prediction mode and the bidirectional prediction mode, (1) the resolution of the motion vector 1 is fixed to 1/4 pixel, and therefore the resolution flag is not transmitted and the resolution of the motion vector 2 is (1) When the resolution flag of motion vector 2 is transmitted, (2) the resolution of motion vector 1 and motion vector 2 may be selected among 1/4 or 1/8 pixels, respectively. And therefore both the resolution flag of motion vector 1 and the resolution flag of motion vector 2 are transmitted, (3) the resolution of motion vector 1 can be selected between 1/4 or 1/8 pixels and thus the resolution of motion vector 1 (4) Resolution of motion vector 1 and motion vector 2 when the flag is transmitted and the resolution of motion vector 2 is fixed to 1/4 pixel and therefore the resolution flag of motion vector 2 is not transmitted. Four implementations are shown in FIG. 1 where the degree can be selected from 1/4 or 1/8 pixels and one resolution flag is transmitted indicating the resolution of motion vector 1 and motion vector 2. FIG.
도 2는 본 발명에 따른, 각각의 인터 예측 모드에 따른 움직임 벡터의 해상도 및 움직임 벡터의 해상도 플래그의 전송 여부에 관한 다른 구현예들을 설명하기 위한 도면이다.FIG. 2 is a diagram for describing other implementations related to resolution of a motion vector and transmission of a resolution flag of a motion vector according to each inter prediction mode according to the present invention.
도 2를 참조하면, 단방향단순예측 모드의 움직임 벡터의 경우, (1)움직임 벡터의 해상도가 1/2 화소로 고정되어 있고 따라서 해상도 플래그는 전송되지 않는 경우 및 (2)1/2 또는 1/4 화소 중 선택될 수 있고 따라서 해상도 플래그가 전송되는 경우의 두 가지 구현예가 설명되어 있다. Referring to Fig. 2, in the case of the motion vector in the unidirectional simple prediction mode, (1) the resolution of the motion vector is fixed at 1/2 pixel and thus the resolution flag is not transmitted and (2) 1/2 or 1 / Two implementations have been described where four pixels can be selected and therefore a resolution flag is transmitted.
양방향예측 모드의 움직임 벡터 1 및 움직임 벡터 2의 경우, (1)움직임 벡터 1의 해상도가 1/4 화소로 고정되어 있고 따라서 해상도 플래그는 전송되지 않고, 움직임 벡터 2의 해상도는 1/2 또는 1/8 화소 중 선택될 수 있고 따라서 움직임 벡터 2의 해상도 플래그가 전송되는 경우, (2) 움직임 벡터 1의 해상도가 1/2 또는 1/8 화소 중 선택될 수 있고 따라서 움직임 벡터 1의 해상도 플래그가 전송되고, 움직임 벡터 2의 해상도는 1/2 또는 1/4 화소 중 선택될 수 있고 따라서 움직임 벡터 2의 해상도 플래그가 전송는 경우, (3) 움직임 벡터 1의 해상도는 1/2 또는 1/8 화소 중 선택될 수 있고 따라서 움직임 벡터 1의 해상도 플래그가 전송되고, 움직임 벡터 2의 해상도가 1/4 화소로 고정되어 있고 따라서 움직임 벡터 2의 해상도 플래그는 전송되지 않는 경우, (4) 움직임 벡터 1 및 움직임 벡터 2의 해상도가 1/4 또는 1/8 화소 중 선택될 수 있고 움직임 벡터 1 및 움직임 벡터 2의 해상도를 나타내는 하나의 해상도 플래그가 전송되는 경우의 네 가지 구현예가 도 2에 표시되어 있다.For the motion vector 1 and the motion vector 2 in the bidirectional prediction mode, (1) the resolution of the motion vector 1 is fixed at 1/4 pixel, so no resolution flag is transmitted, and the resolution of the motion vector 2 is 1/2 or 1 If / 8 pixels can be selected and thus the resolution flag of motion vector 2 is transmitted, (2) the resolution of motion vector 1 can be selected from 1/2 or 1/8 pixels, so the resolution flag of motion vector 1 is Is transmitted, the resolution of motion vector 2 can be selected from 1/2 or 1/4 pixels, so if the resolution flag of motion vector 2 is transmitted, (3) the resolution of motion vector 1 is 1/2 or 1/8 pixel (4) the motion vector when the resolution flag of the motion vector 1 is transmitted, and the resolution flag of the motion vector 2 is fixed to 1/4 pixel, and thus the resolution flag of the motion vector 2 is not transmitted. Four implementations in which the resolution of 1 and motion vector 2 can be selected among 1/4 or 1/8 pixels and one resolution flag representing the resolution of motion vector 1 and motion vector 2 are transmitted are shown in FIG. have.
한편, 본 발명의 일 실시예에 따르면, 움직임 벡터 해상도는 움직임 벡터 마다 또는 소정 영상 영역, 예컨대, 부호화/복호화의 단위에 해당하는 블록, 매크로블록, 슬라이스, 픽쳐 또는 시퀀스 단위로 결정 될 수 있다. 예를 들어 첫번째 슬라이스에 속하는 블록들을 인터예측하는 경우, 단방향단순예측 모드의 움직임 벡터의 해상도는 1/4 화소로 고정하고 따라서 해상도 플래그는 별도로 전송하지 않고, 양방향예측 모드의 움직임 벡터 1의 해상도는 1/4 화소로 고정하고 따라서 해상도 플래그는 전송되지 않고, 움직임 벡터 2의 해상도는 1/4 또는 1/8 화소 중 선택될 수 있고 따라서 움직임 벡터 2의 해상도 플래그는 복호기로 전송된다. 다음 슬라이스에 속하는 블록들을 인터예측하는 경우에는, 단방향단순예측 모드의 움직임 벡터의 해상도는 1/2 화소로 고정하고 따라서 해상도 플래그는 별도로 전송하지 않고, 양방향예측 모드의 움직임 벡터 1의 해상도는 1/4 화소로 고정하고 따라서 해상도 플래그는 전송되지 않고, 움직임 벡터 2의 해상도는 1/2 또는 1/8 화소 중 선택될 수 있고 따라서 움직임 벡터 2의 해상도 플래그는 복호기로 전송된다.Meanwhile, according to an embodiment of the present invention, the motion vector resolution may be determined for each motion vector or in a unit of a block, macroblock, slice, picture, or sequence corresponding to a predetermined image region, for example, a unit of encoding / decoding. For example, when inter prediction of blocks belonging to the first slice, the resolution of the motion vector in the unidirectional simple prediction mode is fixed to 1/4 pixel. Therefore, the resolution flag is not transmitted separately, and the resolution of the motion vector 1 in the bidirectional prediction mode is The resolution flag of the motion vector 2 can be selected between 1/4 or 1/8 pixels so that the resolution flag of the motion vector 2 is transmitted to the decoder. In the case of inter prediction of blocks belonging to the next slice, the resolution of the motion vector in the unidirectional simple prediction mode is fixed to 1/2 pixel, and thus the resolution flag is not transmitted separately, and the resolution of the motion vector 1 in the bidirectional prediction mode is 1 /. The resolution flag of motion vector 2 can be selected from 1/2 or 1/8 pixels so that the resolution flag of motion vector 2 is transmitted to the decoder.
또한, 움직임 벡터 해상도는 P 픽쳐와 B 픽쳐가 서로 다른 해상도 조합으로 결정될 수도 있다. 예를 들어 모든 P 픽처의 경우 도 3의 조합 예시 1번을 이용하여 부호화 및 복호화하고, 모든 B 픽처의 경우 도 3의 조합 예시 8을 이용하여 부호화 및 복호화 할 수 있다.In addition, the motion vector resolution may be determined by a resolution combination in which the P picture and the B picture are different from each other. For example, all P pictures may be encoded and decoded using the combination example 1 of FIG. 3, and all B pictures may be encoded and decoded using the combination example 8 of FIG. 3.
한편, 본 실시예는 P 픽쳐와 B 픽쳐에서 모두 적용 가능하다. P 픽쳐와 B 픽쳐에서 사용하는 예측모드별로 서로 다른 움직임벡터 해상도를 이용하는 것이 가능하다.On the other hand, the present embodiment can be applied to both the P picture and the B picture. It is possible to use different motion vector resolutions for each prediction mode used in the P picture and the B picture.
(제3 실시예)(Third Embodiment)
이하, 본 발명의 제3 실시예에 따른 움직임 벡터 부호화/복호화 장치 및 방법에 대해 설명한다.Hereinafter, a motion vector encoding / decoding apparatus and method according to a third embodiment of the present invention will be described.
본 발명에 따르면, 움직임 벡터는 다양한 해상도를 가질 수 있다.According to the present invention, the motion vector may have various resolutions.
본 실시예에 따르면, 인터 예측 부호화에는 움직임 벡터 해상도에 따라 한 개의 움직임 벡터가 존재하는 단방향단순예측모드가 있고, 두 개의 움직임 벡터가 존재하는 단방향복합예측모드와 양방향예측모드가 있다. 예를 들어, 움직임 벡터 해상도가 1/4인 경우 예측모드는 단방향단순예측모드를 사용하고, 움직임 벡터 해상도가 1/4 보다 높은 고해상도인 경우, 예컨데 1/8인 경우 예측모드는 단방향단순예측모드, 단방향복합예측모드, 양방향예측모드 중 최적의 예측 모드를 결정하여 부호화한다. 따라서 블록마다 또는 임의의 영역마다 최적의 움직임 벡터 해상도가 결정되고 결정된 움직임 벡터 해상도를 나타내는 정보를 부호화하고, 움직임 벡터 해상도에 따라 최적의 예측 모드가 결정되고 결정된 예측모드를 나타내는 정보를 부호화하게 된다. 또한 B 픽쳐인 경우 단방향단순예측모드, 단방향복합예측모드, 양방향예측 모드가 가능하다. 예를 들어, 움직임 벡터 해상도가 1/4인 경우 움직임 벡터 해상도 플래그는 1/4로 부호화하고 예측 모드는 단방향단순예측모드가 되고 예측모드는 부호화하지 않는다. 움직임 벡터 해상도가 1/4 보다 높은 고해상도인 경우, 예컨데 1/8인 경우 움직임 벡터 해상도 플래그는 1/8로 부호화하고 예측 모드는 단방향단순예측모드, 단방향복합예측모드, 양방향예측모드 중 최적의 예측 모드를 부호화 한다. 또한 P 픽쳐의 경우 단방향단순예측모드와 단방향복합예측모드가 가능하다. 예를 들어, 움직임 벡터 해상도가 1/4인 경우 움직임 벡터 해상도 플래그는 1/4로 부호화하고 예측 모드는 단방향단순예측모드가 되고 예측모드는 부호화하지 않는다. 움직임 벡터 해상도가 1/4보다 높은 고해상도인 경우, 예컨데 1/8인 경우 움직임 벡터 해상도 플래그는 1/8로 부호화하고 예측 모드는 단방향단순예측모드, 단방향복합예측모드 중 최적의 예측모드를 결정하고, 최적의 예측모드를 부호화한다.According to the present embodiment, inter prediction encoding includes a unidirectional simple prediction mode in which one motion vector exists according to the motion vector resolution, and a unidirectional complex prediction mode in which two motion vectors exist and a bidirectional prediction mode. For example, if the motion vector resolution is 1/4, the prediction mode uses unidirectional simple prediction mode, and if the motion vector resolution is higher than 1/4, the prediction mode is unidirectional simple prediction mode. The optimal prediction mode among the unidirectional complex prediction mode and the bidirectional prediction mode is determined and encoded. Accordingly, the optimal motion vector resolution is determined for each block or for an arbitrary region, and information representing the determined motion vector resolution is encoded, and the information indicating the determined prediction mode is encoded according to the motion vector resolution. In the case of a B picture, a unidirectional simple prediction mode, a unidirectional complex prediction mode, and a bidirectional prediction mode are possible. For example, when the motion vector resolution is 1/4, the motion vector resolution flag is encoded by 1/4, the prediction mode is a unidirectional simple prediction mode, and the prediction mode is not encoded. When the motion vector resolution is higher than 1/4, for example, 1/8, the motion vector resolution flag is encoded as 1/8, and the prediction mode is optimal prediction among unidirectional simple prediction mode, unidirectional complex prediction mode, and bidirectional prediction mode. Encode the mode. In addition, in the case of a P picture, a unidirectional simple prediction mode and a unidirectional complex prediction mode are possible. For example, when the motion vector resolution is 1/4, the motion vector resolution flag is encoded by 1/4, the prediction mode is a unidirectional simple prediction mode, and the prediction mode is not encoded. When the motion vector resolution is higher than 1/4, for example, 1/8, the motion vector resolution flag is encoded as 1/8, and the prediction mode determines the optimal prediction mode among unidirectional simple prediction mode and unidirectional complex prediction mode. The optimal prediction mode is encoded.
이 때, 움직임 벡터 해상도와 인터 예측 모드는 각각의 신택스로 부호화 할 수도 있다. 예를 들어, 각각의 신택스로 부호화 할 때 현재 최적의 움직임 벡터 해상도가 1/8이고 최적의 예측 모드가 단방향단순예측모드인 경우, 현재 블록의 움직임 벡터 해상도와 예측 모드를 부호화한다. 복호화기는 움직임 벡터 해상도를 복호화 한 후 움직임 벡터 해상도가 1/8 이므로 예측 모드를 단방향단순예측모드로 복호화한다. In this case, the motion vector resolution and the inter prediction mode may be encoded by respective syntax. For example, when encoding with each syntax, when the current optimal motion vector resolution is 1/8 and the optimal prediction mode is a unidirectional simple prediction mode, the motion vector resolution and the prediction mode of the current block are encoded. After decoding the motion vector resolution, the decoder decodes the prediction mode to unidirectional simple prediction mode because the motion vector resolution is 1/8.
도 3은 P 픽쳐의 경우 움직임 벡터 해상도와 인터 예측 모드를 하나의 신택스로 부호화 및 복호화 방법의 예시이다.3 shows an example of a method of encoding and decoding a motion vector resolution and an inter prediction mode in one syntax in the case of a P picture.
예를 들어, 현재 움직임 벡터 해상도가 1/8이고 예측모드가 단방향복합예측모드라면 '11'로 부호화하고, 예측모드가 단방향단순예측모드라면 '10'으로 부호화하고, 움직임 벡터 해상도가 1/4이라면 예측모드는 단방향단순예측모드이고, '0'으로 부호화한다. 만일, 단방향복합예측모드가 선택된 경우에는 도 1에 나타난 단방향복합예측모드 / 양방향예측모드의 조합들중에서 움직임 벡터 1과 2의 해상도가 선택될 수 있다.For example, if the current motion vector resolution is 1/8 and the prediction mode is unidirectional complex prediction mode, it is encoded as '11'. If the prediction mode is unidirectional simple prediction mode, it is encoded as '10', and the motion vector resolution is 1/4. In this case, the prediction mode is a unidirectional simple prediction mode, and is encoded as '0'. If the unidirectional complex prediction mode is selected, the resolutions of the motion vectors 1 and 2 may be selected among the combinations of the unidirectional complex prediction mode / bidirectional prediction mode shown in FIG. 1.
이 때, CAVLC로 부호화하는 경우 도 3의 bin을 그대로 부호화하고, CABAC으로 부호화하는 경우, 도 4~6을 참조하여 bin 별로 확률을 달리 두어 부호화할 수도 있다. In this case, when the CAVLC is encoded, the bin of FIG. 3 is encoded as it is, and when the CABAC is encoded, the probability may be encoded by different bins with reference to FIGS. 4 to 6.
도 5는 bin 1의 확률 조건을 나타내는 도면이고, 도 6은 bin 2의 확률 조건을 나타내는 도면이다.5 is a diagram illustrating a probability condition of bin 1, and FIG. 6 is a diagram illustrating a probability condition of bin 2.
예를 들어, 현재 블록의 움직임 벡터 해상도가 1/8이고, 예측 모드가 단방향단순예측 모드인 경우, 도 5를 참조하면, '10'의 bin 1인 '1'을 부호화할 때 블록 A와 B의 해상도를 이용하여 결정하는데 두 블록 모두 1/4인 경우에는 확률 모델 0(Context 0)을 이용하여 부호화한다. 도 6을 참조하면 '10'의 bin 2인 '0'을 부호화 할 때는 블록 A와 B의 예측 모드를 이용하여 확률 모델을 결정하는데 두 블록 모두 단반향복합예측모드가 아닌 경우 확률 모델 2(Context 2)를 이용하여 부호화한다.For example, when the motion vector resolution of the current block is 1/8 and the prediction mode is the unidirectional simple prediction mode, referring to FIG. 5, blocks A and B are encoded when encoding bin 1 of '10'. If the two blocks are 1/4, they are encoded using the probability model 0 (Context 0). Referring to FIG. 6, when encoding '0' which is bin 2 of '10', a probability model is determined using prediction modes of blocks A and B. If both blocks are not unidirectional complex prediction mode, probability model 2 (Context Encoding using 2).
도 7은 B 픽쳐의 경우 움직임 벡터 해상도와 인터 예측 모드를 하나의 신택스로 부호화 및 복호화한 방법의 예시이다.7 is an example of a method of encoding and decoding a motion vector resolution and an inter prediction mode with one syntax in the case of a B picture.
예를 들어, 현재 움직임 벡터 해상도가 1/8이고 예측모드가 양방향예측모드라면 '111'로 부호화하고, 예측모드가 단방향복합예측모드라면 '110'으로 부호화하고, 예측모드가 단방향단순예측모드라면 '10'으로 부호화하고, 움직임 벡터 해상도가 1/4이라면 예측모드는 단방향단순예측모드이고, '0'으로 부호화한다. 만일, 단방향복합예측모드나 양방향예측모드가 선택된 경우에는 도 1에 나타난 단방향복합예측모드 / 양방향예측모드의 조합들중에서 움직임 벡터 1과 2의 해상도가 선택될 수 있다.For example, if the current motion vector resolution is 1/8 and the prediction mode is the bidirectional prediction mode, it is encoded as '111'; if the prediction mode is the unidirectional complex prediction mode, it is encoded as '110', and if the prediction mode is the unidirectional simple prediction mode. If it is encoded as '10' and the motion vector resolution is 1/4, the prediction mode is unidirectional simple prediction mode, and is encoded as '0'. If the unidirectional complex prediction mode or the bidirectional prediction mode is selected, the resolutions of the motion vectors 1 and 2 may be selected among the combinations of the unidirectional complex prediction mode / bidirectional prediction mode shown in FIG. 1.
이 때, CAVLC로 부호화하는 경우 도 7의 bin을 그대로 부호화하고, CABAC으로 부호화하는 경우, 도 4~6과 도 8을 참조하여 bin 별로 확률을 달리 두어 부호화할 수도 있다. In this case, when the CAVLC is encoded, the bin of FIG. 7 is encoded as it is, and when the CABAC is encoded, the bin may be encoded with different probabilities for each bin with reference to FIGS. 4 to 6 and 8.
도 8은 bin 3의 확률 조건을 나타내는 도면이다.8 is a diagram illustrating a probability condition of bin 3.
도 8을 참조하면, 주변 블록의 예측모드에 따라 확률 조건을 달리하여 산술 부호화 할 수 있다. 예를 들어, 주변 블록인 블록 A와 B가 모두 양방향예측모드인 경우 확률 모델 0 (Context 0)을 이용하여 부호화하고, 블록 A와 B 중 하나가 양방향예측 모드 인 경우 확률 모델 1 (Context 1)을 이용하여 부호화하고, 블록 A와 B가 모두 양방향예측모드가 아닌 경우에는 확률 모델 2 (Context 2)를 이용하여 부호화한다.Referring to FIG. 8, arithmetic coding may be performed by varying a probability condition according to a prediction mode of a neighboring block. For example, if blocks A and B, which are neighboring blocks, are both bidirectional predictive modes, they are encoded using probability model 0 (Context 0), and if one of blocks A and B is bidirectional predictive mode, probability model 1 (Context 1) If both blocks A and B are not in the bidirectional prediction mode, they are encoded using the probability model 2 (Context 2).
또한, 양방향예측모드와 단방향복합예측모드는 두 개의 움직임 벡터를 이용하여 움직임 보상을 수행한 두 개의 참조 블록을 가중 평균 (weighted average)를 이용하여 하나의 참조 블록을 생성한다. 또는 두 개의 움직임 벡터의 평균을 취하여 실제 움직임 벡터를 얻은 후 상기 실제 움직임 벡터를 이용하여 움직임 보상을 수행하여 참조 블록을 생성할 수 있다. 예를 들어, 움직임 벡터 (1/4, 1)과 (1/8, 3/4)를 부호화하고, 움직임 보상 시에는 두 움직임 벡터를 이용하여 산출한 (3/16, 7/8)를 이용하여 움직임 보상을 수행하고 참조 블록을 생성한다.In addition, the bidirectional prediction mode and the unidirectional complex prediction mode generate one reference block using a weighted average of two reference blocks on which motion compensation is performed using two motion vectors. Alternatively, a reference block may be generated by taking an average of two motion vectors to obtain an actual motion vector, and then performing motion compensation using the real motion vector. For example, motion vectors (1/4, 1) and (1/8, 3/4) are encoded, and (3/16, 7/8) calculated using two motion vectors for motion compensation. To perform motion compensation and generate a reference block.
한편, 복호화기는 통상 부호화기의 동작의 역동작을 수행한다. 예측모드 결정 및 모드 정보의 이용에 관한 것과 움직임 벡터 해상도의 결정 및 해상도 플래그의 이용에 관하여는 부호화기와 복호화기 간에 미리 약속되어 있다. 이 약속에 따라 복호화기는 예측모드 정보를 복호한 후 예측모드에 따라 약속된 움직임 벡터 해상도를 복호할 수 있다. 예컨대 움직임 벡터 해상도가 고정되어 있는 경우, 그 고정된 해상도를 미리 알고 있으며, 움직임 벡터 해상도 플래그가 부호화기로부터 전송되는 경우에는 상기 움직임 벡터 해상도 플래그를 이용하여 움직임 벡터를 복호한다.On the other hand, the decoder normally performs the reverse operation of the encoder. Determination of prediction mode and use of mode information, determination of motion vector resolution and use of resolution flags are made in advance between the encoder and the decoder. According to this promise, the decoder can decode the prediction mode information and then decode the promised motion vector resolution according to the prediction mode. For example, when the motion vector resolution is fixed, the fixed resolution is known in advance, and when the motion vector resolution flag is transmitted from the encoder, the motion vector is decoded using the motion vector resolution flag.
이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the present invention, and those skilled in the art to which the present invention pertains may make various modifications and changes without departing from the essential characteristics of the present invention. Therefore, the embodiments disclosed in the present invention are not intended to limit the technical idea of the present invention but to describe the present invention, and the scope of the technical idea of the present invention is not limited by these embodiments. The protection scope of the present invention should be interpreted by the following claims, and all technical ideas within the equivalent scope should be interpreted as being included in the scope of the present invention.
이상에서 설명한 바와 같이 본 발명은 차분 움직임 벡터의 부호화에 필요한 비트 수를 줄일 수 있는 유용한 발명이다.As described above, the present invention is a useful invention that can reduce the number of bits required for encoding a differential motion vector.
CROSS-REFERENCE TO RELATED APPLICATIONCROSS-REFERENCE TO RELATED APPLICATION
본 특허출원은 2011년 01월 15일 한국에 출원한 특허출원번호 제 10-2011-0004298호 및 2011년 01월 17일 한국에 출원한 특허출원번호 제 10-2011-0004388 호에 대해 미국 특허법 119(a)조(35 U.S.C § 119(a))에 따라 우선권을 주장하면, 그 모든 내용은 참고문헌으로 본 특허출원에 병합된다. 아울러, 본 특허출원은 미국 이외에 국가에 대해서도 위와 동일한 이유로 우선권을 주장하면 그 모든 내용은 참고문헌으로 본 특허출원에 병합된다.This patent application is related to the patent application No. 10-2011-0004298 filed with Korea on January 15, 2011 and the patent application No. 10-2011-0004388 filed with Korea on January 17, 2011. If priority is claimed under section (a) (35 USC § 119 (a)), all of that is incorporated by reference into this patent application. In addition, if this patent application claims priority to a country other than the United States for the same reason, all its contents are incorporated into this patent application by reference.

Claims (10)

  1. 움직임 벡터 부호화 방법에 있어서,In the motion vector encoding method,
    부호화할 현재 블록과 관련된 제1 움직임 벡터와 제2 움직임 벡터를 결정하는 단계;Determining a first motion vector and a second motion vector associated with a current block to be encoded;
    상기 제1 움직임 벡터와 제2 움직임 벡터의 각각의 예측 움직임 벡터를 결정하는 단계;Determining a prediction motion vector of each of the first and second motion vectors;
    상기 제1 움직임 벡터와 상기 제1 움직임 벡터의 예측 움직임 벡터 간의 차분인 제1 차분 움직임 벡터 및 상기 제2 움직임 벡터와 상기 제2 움직임 벡터의 예측 움직임 벡터 간의 차분인 제2 차분 움직임 벡터를 산출하는 단계; 및Calculating a first differential motion vector that is a difference between the first motion vector and a predicted motion vector of the first motion vector, and a second differential motion vector that is a difference between the second motion vector and a predicted motion vector of the second motion vector. step; And
    상기 제1 차분 움직임 벡터와 상기 제2 차분 움직임 벡터를 부호화하는 단계;Encoding the first differential motion vector and the second differential motion vector;
    를 포함하고,상기 제1 움직임 벡터의 해상도와 상기 제2 움직임 벡터의 해상도는 서로 상이한 것을 특징으로 하는 움직임 벡터 부호화 방법.The motion vector encoding method of claim 1, wherein the resolution of the first motion vector and the resolution of the second motion vector are different from each other.
  2. 제1항에 있어서,The method of claim 1,
    상기 제1 움직임 벡터와 상기 제2 움직임 벡터 중 적어도 하나의 움직임 벡터의 해상도를 나타내는 움직임 벡터 해상도 플래그를 생성하는 단계;Generating a motion vector resolution flag indicating a resolution of at least one motion vector of the first motion vector and the second motion vector;
    를 더 포함하는 것을 특징으로 하는 움직임 벡터 부호화 방법.Motion vector encoding method further comprises.
  3. 제1항에 있어서,The method of claim 1,
    상기 제1 움직임 벡터와 상기 제2 움직임 벡터 중 하나의 움직임 벡터의 해상도는 고정되어 있고, 나머지 하나의 움직임 벡터의 해상도는 가변적인 것을 특징으로 하는 움직임 벡터 부호화 방법.The resolution of one motion vector of the first motion vector and the second motion vector is fixed, and the resolution of the other motion vector is variable.
  4. 움직임 벡터 복호화 방법에 있어서,In the motion vector decoding method,
    복호할 현재 블록과 관련된 제1 움직임 벡터와 제2 움직임 벡터의 각각의 예측 움직임 벡터를 결정하는 단계;Determining each predicted motion vector of the first motion vector and the second motion vector associated with the current block to be decoded;
    상기 제1 움직임 벡터와 상기 제1 움직임 벡터의 예측 움직임 벡터 간의 차분인 제1 차분 움직임 벡터 및 상기 제2 움직임 벡터와 상기 제2 움직임 벡터의 예측 움직임 벡터 간의 차분인 제2 차분 움직임 벡터를 복호하는 단계;Decoding a first differential motion vector that is a difference between the first motion vector and a predicted motion vector of the first motion vector, and a second differential motion vector that is a difference between the second motion vector and a predicted motion vector of the second motion vector. step;
    상기 복호된 제1 차분 움직임 벡터와 상기 제1 움직임 벡터의 예측 움직임 벡터를 이용하여 상기 제1 움직임 벡터를 복원하는 단계; 및Reconstructing the first motion vector using the decoded first differential motion vector and the predicted motion vector of the first motion vector; And
    상기 복호된 제2 차분 움직임 벡터와 상기 제2 움직임 벡터의 예측 움직임 벡터를 이용하여 상기 제2 움직임 벡터를 복원하는 단계;Reconstructing the second motion vector using the decoded second differential motion vector and the predicted motion vector of the second motion vector;
    를 포함하고,Including,
    상기 제1 움직임 벡터의 해상도와 상기 제2 움직임 벡터의 해상도는 서로 상이한 것을 특징으로 하는 움직임 벡터 복호화 방법.The motion vector decoding method of claim 1, wherein the resolution of the first motion vector and the resolution of the second motion vector are different from each other.
  5. 제4항에 있어서,The method of claim 4, wherein
    상기 제1 움직임 벡터와 상기 제2 움직임 벡터 중 적어도 하나의 움직임 벡터의 해상도를 나타내는 움직임 벡터 해상도 플래그를 복호하고,Decode a motion vector resolution flag indicating a resolution of at least one motion vector of the first and second motion vectors;
    상기 움직임 벡터 해상도 플래그를 이용하여 상기 제1 움직임 벡터와 상기 제2 움직임 벡터 중 적어도 하나의 움직임 벡터를 복원하는 것을 특징으로 하는 움직임 벡터 복호화 방법.And reconstructing at least one motion vector of the first motion vector and the second motion vector by using the motion vector resolution flag.
  6. 제4항에 있어서,The method of claim 4, wherein
    상기 제1 움직임 벡터와 상기 제2 움직임 벡터 중 하나의 움직임 벡터의 해상도는 고정되어 있고, 나머지 하나의 움직임 벡터의 해상도는 가변적이고,The resolution of one motion vector of the first motion vector and the second motion vector is fixed, and the resolution of the other motion vector is variable,
    상기 움직임 벡터 해상도 플래그는 상기 나머지 하나의 움직임 벡터의 해상도를 나타내는 것을 특징으로 하는 움직임 벡터 복호화 방법.The motion vector resolution flag indicates a resolution of the other motion vector.
  7. 움직임 벡터 부호화 방법에 있어서,In the motion vector encoding method,
    부호화할 현재 블록의 인터 예측 모드를 선택하는 단계;Selecting an inter prediction mode of a current block to be encoded;
    상기 인터 예측 모드가 단방향단순예측 모드인지 또는 단방향복합예측 모드인지 또는 양방향예측 모드인지 여부에 에 따라, 상기 현재 블록의 인터 예측에 이용되는 적어도 하나의 움직임 벡터의 해상도를 선택하는 단계; 및Selecting the resolution of at least one motion vector used for inter prediction of the current block according to whether the inter prediction mode is a unidirectional simple prediction mode, a unidirectional complex prediction mode, or a bidirectional prediction mode; And
    상기 선택된 움직임 벡터의 해상도에 따라 상기 적어도 하나의 움직임 벡터를 부호화하는 단계;를 포함하는 것을 특징으로 하는 움직임 벡터 부호화 방법.Encoding the at least one motion vector according to the resolution of the selected motion vector.
  8. 제7항에 있어서,The method of claim 7, wherein
    상기 인터 예측 모드가 단방향단순예측 모드인지 또는 단방향복합예측 모드인지 또는 양방향예측 모드인지 여부에 따라, 상기 현재 블록의 인터 예측에 이용되는 적어도 하나의 움직임 벡터의 해상도를 나타내는 해상도 플래그를 부호화하는 단계를 더 포함하는 것을 특징으로 하는 움직임 벡터 부호화 방법.Encoding a resolution flag indicating a resolution of at least one motion vector used for inter prediction of the current block according to whether the inter prediction mode is a unidirectional simple prediction mode, a unidirectional complex prediction mode, or a bidirectional prediction mode. Motion vector encoding method further comprises.
  9. 움직임 벡터 복호화 방법에 있어서,In the motion vector decoding method,
    복호할 현재 블록의 인터 예측 모드를 선택하는 단계;Selecting an inter prediction mode of the current block to be decoded;
    상기 인터 예측 모드가 단방향단순예측 모드인지 또는 단방향복합예측 모드인지 또는 양방향예측 모드인지 여부에 에 따라, 상기 현재 블록의 인터 예측에 이용되는 적어도 하나의 움직임 벡터의 해상도를 선택하는 단계; 및Selecting the resolution of at least one motion vector used for inter prediction of the current block according to whether the inter prediction mode is a unidirectional simple prediction mode, a unidirectional complex prediction mode, or a bidirectional prediction mode; And
    상기 선택된 움직임 벡터의 해상도에 따라 상기 적어도 하나의 움직임 벡터를 복호화하는 단계;를 포함하는 것을 특징으로 하는 움직임 벡터 복호화 방법.And decoding the at least one motion vector according to the resolution of the selected motion vector.
  10. 제9항에 있어서,The method of claim 9,
    상기 인터 예측 모드가 단방향단순예측 모드인지 또는 단방향복합예측 모드인지 또는 단방향복합예측 모드인지 또는 양방향예측 모드인지 여부에 따라, 상기 현재 블록의 인터 예측에 이용되는 적어도 하나의 움직임 벡터의 해상도를 나타내는 해상도 플래그의 복호하는 단계를 더 포함하는 것을 특징으로 하는 움직임 벡터 부호화 방법.A resolution indicating the resolution of at least one motion vector used for inter prediction of the current block according to whether the inter prediction mode is a unidirectional simple prediction mode, a unidirectional complex prediction mode, a unidirectional complex prediction mode, or a bidirectional prediction mode And decoding the flag.
PCT/KR2012/000361 2011-01-15 2012-01-16 Method and device for encoding/decoding motion vector WO2012096551A2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/942,081 US9648340B2 (en) 2011-01-15 2013-07-15 Method and device for encoding/decoding motion vector

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR10-2011-0004298 2011-01-15
KR20110004298 2011-01-15
KR10-2011-0004388 2011-01-17
KR1020110004388A KR101377528B1 (en) 2011-01-15 2011-01-17 Motion Vector Coding and Decoding Method and Apparatus

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/942,081 Continuation US9648340B2 (en) 2011-01-15 2013-07-15 Method and device for encoding/decoding motion vector

Publications (2)

Publication Number Publication Date
WO2012096551A2 true WO2012096551A2 (en) 2012-07-19
WO2012096551A3 WO2012096551A3 (en) 2012-11-22

Family

ID=46507605

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2012/000361 WO2012096551A2 (en) 2011-01-15 2012-01-16 Method and device for encoding/decoding motion vector

Country Status (1)

Country Link
WO (1) WO2012096551A2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10536701B2 (en) 2011-07-01 2020-01-14 Qualcomm Incorporated Video coding using adaptive motion vector resolution
CN111416982A (en) * 2019-01-04 2020-07-14 北京三星通信技术研究有限公司 Method and apparatus for encoding/decoding motion vector information

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040068854A (en) * 2002-01-09 2004-08-02 마쯔시다덴기산교 가부시키가이샤 Motion vector encoding method and motion vector decoding method
KR20100001078A (en) * 2008-06-26 2010-01-06 에스케이 텔레콤주식회사 Method and apparatus for encoding and decoding motion vector
KR20100086864A (en) * 2009-01-23 2010-08-02 에스케이 텔레콤주식회사 Motion vector coding method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040068854A (en) * 2002-01-09 2004-08-02 마쯔시다덴기산교 가부시키가이샤 Motion vector encoding method and motion vector decoding method
KR20100001078A (en) * 2008-06-26 2010-01-06 에스케이 텔레콤주식회사 Method and apparatus for encoding and decoding motion vector
KR20100086864A (en) * 2009-01-23 2010-08-02 에스케이 텔레콤주식회사 Motion vector coding method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10536701B2 (en) 2011-07-01 2020-01-14 Qualcomm Incorporated Video coding using adaptive motion vector resolution
CN111416982A (en) * 2019-01-04 2020-07-14 北京三星通信技术研究有限公司 Method and apparatus for encoding/decoding motion vector information

Also Published As

Publication number Publication date
WO2012096551A3 (en) 2012-11-22

Similar Documents

Publication Publication Date Title
WO2013070006A1 (en) Method and apparatus for encoding and decoding video using skip mode
WO2013002549A2 (en) Method and apparatus for coding/decoding image
WO2013005941A2 (en) Apparatus and method for coding and decoding an image
WO2011062392A2 (en) Method and apparatus for encoding/decoding a motion vector by selecting a set of predicted candidate motion vectors, and method and apparatus for image encoding/decoding using the same
WO2013062191A1 (en) Method and apparatus for image encoding with intra prediction mode
WO2009157669A2 (en) Intra prediction method and apparatus, and image encoding/decoding method and apparatus using same
WO2013062196A1 (en) Image decoding apparatus
WO2011004986A2 (en) Image encoding/decoding method and apparatus
KR101377528B1 (en) Motion Vector Coding and Decoding Method and Apparatus
WO2011052897A2 (en) Method and apparatus for motion vector encoding/decoding using spatial division, and method and apparatus for image encoding/decoding using same
WO2010087620A2 (en) Method and apparatus for encoding and decoding images by adaptively using an interpolation filter
US20200389661A1 (en) Method and apparatus for improved implicit transform selection
WO2016114539A1 (en) Method and device for encoding and decoding image
WO2013002550A2 (en) Method and apparatus for coding/decoding through high-speed coding unit mode decision
EP2617196A2 (en) Method and apparatus for hierarchical picture encoding and decoding
WO2011010857A2 (en) Method and apparatus for coding and decoding color channels in layered video coding and decoding
WO2018070556A1 (en) Method and apparatus for extracting intra prediction mode data of square or rectangular block
WO2012053796A2 (en) Apparatus and method for encoding/decoding a differential motion vector, and apparatus and method for encoding/decoding video using same
US20210289231A1 (en) Method, apparatus and medium for decoding or encoding
WO2018074626A1 (en) Video coding method and apparatus utilizing adaptive interpolation filter
WO2010074521A2 (en) Apparatus and method for converting image in an image processing system
WO2012033343A2 (en) Intra-prediction encoding/decoding apparatus and method for omitting the transmission of prediction mode information using characteristics of reference pixels
WO2018038316A1 (en) Method and device for transmitting block division information in image codec for security camera
EP3909248A1 (en) Improved most probable mode list generation scheme
EP3955569A1 (en) Image prediction method and apparatus, and computer-readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12734080

Country of ref document: EP

Kind code of ref document: A2

NENP Non-entry into the national phase in:

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 07-11-2013)

122 Ep: pct application non-entry in european phase

Ref document number: 12734080

Country of ref document: EP

Kind code of ref document: A2