WO2012090397A1 - Video encoding device, video encoding method, and video encoding program, and video decoding device, video decoding method, and video decoding program - Google Patents

Video encoding device, video encoding method, and video encoding program, and video decoding device, video decoding method, and video decoding program Download PDF

Info

Publication number
WO2012090397A1
WO2012090397A1 PCT/JP2011/006797 JP2011006797W WO2012090397A1 WO 2012090397 A1 WO2012090397 A1 WO 2012090397A1 JP 2011006797 W JP2011006797 W JP 2011006797W WO 2012090397 A1 WO2012090397 A1 WO 2012090397A1
Authority
WO
WIPO (PCT)
Prior art keywords
motion vector
candidate
prediction
predicted
picture
Prior art date
Application number
PCT/JP2011/006797
Other languages
French (fr)
Japanese (ja)
Inventor
福島 茂
西谷 勝義
上田 基晴
徹 熊倉
Original Assignee
株式会社Jvcケンウッド
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 JP2011045649A external-priority patent/JP2012151818A/en
Priority claimed from JP2011045650A external-priority patent/JP2012151819A/en
Application filed by 株式会社Jvcケンウッド filed Critical 株式会社Jvcケンウッド
Publication of WO2012090397A1 publication Critical patent/WO2012090397A1/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/56Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search
    • 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

Definitions

  • a second difference motion vector is calculated from a prediction motion vector candidate different from the motion vector candidate, a code amount calculated from the first difference motion vector, a code amount calculated from the second difference motion vector, and A prediction motion vector candidate deletion unit (222) that deletes the prediction motion vector candidate based on the prediction motion vector candidate index, and a prediction that selects a prediction motion vector from the prediction motion vector candidates remaining after the deletion A motion vector determination unit (223).
  • the motion vector predictor selection unit 111 selects an optimal motion vector predictor for predicting the motion vector detected by the motion vector detection unit 101 using the motion information of the already encoded image stored in the memory 110. To do. The detailed configuration and operation of the predicted motion vector selection unit 111 will be described later.
  • the motion compensation unit 203 generates a predicted image using the decoded motion vector of the decoding target block.
  • the weighted prediction unit 204 adaptively multiplies the prediction image generated by the motion compensation unit 203 by a weighting coefficient to generate a final prediction image, and provides the result to the addition unit 205.
  • the first flag mv_competition_flag, the second flag mv_competition_temporal_flag, and the third flag collocated_from_l0_flag are set and encoded.
  • each flag of the bit stream decoded by the variable length decoding unit 201 will be described. It is determined from the flags described in the slice header of the bitstream whether or not to perform the motion vector prediction method for the prediction block in the slice.
  • the slice type is P or B
  • the flag mv_competition_flag is determined.
  • mv_competition_flag is true (1)
  • the motion vector prediction method according to the present invention is performed.
  • mv_competition_flag is false (0), the conventional method is used.
  • the motion vector predictor candidate deletion unit 222 receives the motion vector predictor candidates in the updated list mvpListLX and the differential motion vector mvd decoded by the variable length decoding unit 201, and performs a motion vector candidate deletion process. Delete some motion vector predictor candidates from the list mvpListLX.
  • FIG. 13 shows a partition to be processed and a partition adjacent to it.
  • nA represents the total number of partition groups adjacent to the left
  • nB represents the total number of partition groups adjacent immediately above.
  • the information of the partition Ak and the partition to be processed is compared (S106). If the coding mode of the partition Ak is not intra and the reference picture number of the partition to be processed is the same, the flag availableFlagLXA is set to 1 (S107).
  • the list mvpListLX is set by providing a memory inside a device such as a PC or a part of the memory as a storage area, or by assigning it as a storage area on the memory when executing a program.
  • the list mvpListLX has an array structure as shown in FIG. 16, and is provided with an index indicating the location in the list and a storage area for storing a candidate for a motion vector predictor corresponding to the index.
  • FIG. 22 (c) shows a case where the first provisional predicted motion vector is mvp3, and the difference motion vector mvd is added to calculate a provisional motion vector. Differences between the temporary motion vector and the prediction motion vector candidates mvp1 and mvp2 other than mvp3 are calculated, and difference motion vectors mvd1 and mvd2 are calculated. When mvd is compared with mvd1 and mvd2, since mvd1 and mvd2 are larger than mvd, the provisional motion vector predictor mvp3 is not determined to be deleted from the list mvpListLX.
  • the approximate code amount of the differential motion vector mvdLX (X is 0 or 1) of the partition to be processed is calculated.
  • the approximate code amount takes the absolute value of mvdLX, the position of the most significant bit of the absolute value is calculated as the generated code amount of mvdLX, and increases in proportion to the absolute value of mvdLX. That is, the code amount of the signed Golomb coding shown in FIG. 24 is calculated.
  • This approximate code amount is set as a reference value mvdBits used in the subsequent determination (S702).
  • a storage area for recording the deletion target index k is provided in the deletion processing, or a flag indicating whether or not to delete for each index in the list mvpListLX. You may add the memory area to store.
  • k is smaller than l, the provisional motion vector mvp is left in the list as it is, and the index l is updated.
  • An index other than the current index l and the index k of the temporary motion vector predictor is selected from the list mvpListLX and set as the next l (S712).
  • an optimal motion vector predictor is selected from the list mvpListLX from which the motion vector predictor candidates have been deleted.
  • the total number of motion vector predictor candidates remaining in the list mvpListLX is counted. If the total number is 1, the prediction motion vector remaining in the list mvpListLX becomes the optimal prediction motion vector, and the prediction motion vector is updated to the index 0 of the list mvpListLX by updating the prediction motion vector candidate in the list mvpListLX in S700.
  • the motion vector predictor candidate generation units 130 and 230 in order to reduce the value of the differential motion vector for encoding / transmitting, it is preferable to generate candidates having different values as motion vector predictor candidates. It is advantageous, and it is probabilistically less likely to generate candidates with the same value, so that 30% or more of the motion vector predictor candidates that are generated overlap with a special image such as a still image or pan scan. It's hard to think except in some cases. Therefore, in the second embodiment, it can be expected that the number of comparison processes of predicted motion vector candidates is smaller than that in the first embodiment, and the processing speed can be improved.
  • the prediction motion vector candidate identity determination units 121 and 221 are removed from the processing configuration from the first embodiment, and there is no processing for deleting a candidate having the same motion vector value from the prediction motion vector candidates in advance. Since the determination process for the motion vector predictor candidate is the same as that in the first embodiment, the description of the determination process is omitted.
  • FIG. 29 will be described as an example.
  • FIG. 29 shows an example in which the motion vector predictor candidates are mvp1 and mvp2.
  • FIG. 29A will be described as an example of the determination in the first and second embodiments.
  • a thin solid line indicates a boundary where the same generated code amount is obtained when the difference motion vector is added to mvp1 and mvp2, respectively, and mvp1 indicates a region where the generated code amount is smaller if mvp1 is left than the boundary and mvp2 indicates that it is right than the boundary. .
  • the determination is continued with the allocation code amount of the index of the list mvpListLX as it is.
  • the index mvp_idx_lx of the list mvpListLX selected as a candidate for the motion vector to be predicted is finally deleted from the list mvpListLX, and the motion vector predictor candidate to be deleted is deleted from the list mvpListLX.
  • the index of the list mvpListLX packed in the order of the candidate motion vector predictor with the smallest index is different from the code and code amount of the index mvp_idx_lx in the deletion process.
  • a new condition determination for selecting from the motion vectors of neighboring neighboring blocks is newly made when determining the optimal motion vector predictor from the motion vector predictor candidates.
  • the motion vector predictor candidates are reduced. Thereby, the code amount of the index representing the reference destination of the predicted motion vector can be reduced, and the encoding efficiency can be improved.
  • the above processing relating to encoding and decoding can be realized as a transmission, storage, and reception device using hardware, and is also stored in a ROM (Read Only Memory), a flash memory, or the like. It can also be realized by firmware or software such as a computer.
  • the firmware program and software program can be provided by recording them on a computer-readable recording medium, provided from a server through a wired or wireless network, or provided as a data broadcast of terrestrial or satellite digital broadcasting. Is also possible.

Abstract

A video encoding device for encoding, in block units, each picture in a video using a motion vector, wherein a predicted motion vector candidate generator (120) generates a plurality of predicted motion vector candidates from the motion vector of an adjacent encoded block within the same picture as a block to be encoded and a block at the same position in another encoded picture, and presents an index representing the candidate. A predicted motion vector candidate deletion unit (122) calculates a difference motion vector from the candidates of the predicted motion vector and the motion vector of the block to be encoded, and deletes a predicted motion vector candidate on the basis of an encoding amount calculated from the difference motion vector and of the index of the predicted motion vector candidate. A predicted motion vector determining unit (123) selects a predicted motion vector from candidates remaining after deletion.

Description

動画像符号化装置、動画像符号化方法及び動画像符号化プログラム、並びに動画像復号装置、動画像復号方法及び動画像復号プログラムMoving picture encoding apparatus, moving picture encoding method, moving picture encoding program, moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program
 本発明は、動画像の符号化及び復号技術に関し、特に動き補償予測を利用した動画像の符号化及び復号技術に関する。 The present invention relates to a moving picture encoding and decoding technique, and more particularly to a moving picture encoding and decoding technique using motion compensation prediction.
 MPEG(Moving Picture Experts Group)に代表される、ピクチャを矩形ブロックに分割し、ピクチャ間でブロック単位に動き推定、補償を行う動画像符号化方式では、各ブロックで生成される動きベクトルの符号量を削減する為に、動きベクトルに対して予測処理が行われる。MPEG-2では、マクロブロック単位に検出される動きベクトルは、直前に符号化されたマクロブロックの動きベクトルとの差分がとられ、その差分ベクトルを符号化することで、符号量を削減している。 In the moving picture coding method that divides a picture into rectangular blocks, represented by MPEG (Moving Picture Experts 、 Group), and performs motion estimation and compensation between blocks, the coding amount of the motion vector generated in each block In order to reduce the motion vector, a prediction process is performed on the motion vector. In MPEG-2, the motion vector detected in units of macroblocks is taken as a difference from the motion vector of the macroblock encoded immediately before, and the amount of code is reduced by encoding the difference vector. Yes.
 MPEG-4 AVC/H.264では、動きベクトルが周囲の隣接ブロックの動きベクトルと強い相関があることを利用して、周囲の隣接ブロックからの予測を行い、その差分ベクトルを符号化することによって符号量を削減している。具体的には、図31に示されるように、周囲の隣接ブロックの動きベクトルから中央値を算出し、その中央値との差分をとることで動きベクトルの予測を実現している。但し、図32のように符号化対象ブロックと隣接ブロックとの形状が異なる場合は、左隣に複数の隣接ブロックがある時はその中の一番上のブロックを、上に複数の隣接ブロックがある時はその中の一番左のブロックを予測ブロックとし、図33(a)、(b)のように符号化対象ブロックが2N×N画素或いはN×2N画素で分割される場合は、周囲の隣接ブロックの動きベクトルの中央値を取るのではなく、動き補償ブロックサイズに応じて図33(a)、(b)の白抜き矢印で示されるように分割された領域毎に参照先の予測ブロックを決定し、決定された予測ブロックの動きベクトルから予測を実施する。 MPEG-4 AVC / H. H.264 uses the fact that motion vectors have a strong correlation with the motion vectors of neighboring blocks, and performs prediction from neighboring blocks and encodes the difference vector to reduce the amount of code. . Specifically, as shown in FIG. 31, the median value is calculated from the motion vectors of neighboring neighboring blocks, and the motion vector prediction is realized by taking the difference from the median value. However, when the shape of the encoding target block and the adjacent block are different as shown in FIG. 32, when there are a plurality of adjacent blocks on the left, the top block among them is shown, and the plurality of adjacent blocks are on the top. In some cases, the leftmost block is the prediction block, and the encoding target block is divided into 2N × N pixels or N × 2N pixels as shown in FIGS. 33 (a) and 33 (b). Rather than taking the median of the motion vectors of adjacent blocks, the prediction of the reference destination is made for each of the divided areas as indicated by the white arrows in FIGS. 33 (a) and (b) according to the motion compensation block size. A block is determined, and prediction is performed from the motion vector of the determined prediction block.
 従来の動きベクトルの予測方法では、予測の為の動きベクトルが1つしかないので、予測が当たらないと、動きベクトルの差分が大きくなり、発生符号量が増加する課題があった。この課題を解決する為に、ISO/IEC及びITU-Tにおける動画像符号化の規格作業の中で新たな動きベクトルの予測手法が検討されている。この手法は、符号化済みの周囲の隣接ブロックの動きベクトルについて、それぞれを予測動きベクトルの候補として適用した場合の符号量を評価する基準とし、符号量が最も小さくなる動きベクトルを予測動きベクトルとして採用し、動きベクトルを採用した隣接ブロックに関する付加情報を符号化し伝送するものである。しかしながら、予測動きベクトルの候補を増やした結果、ブロック毎に予測動きベクトルの参照先を表すインデックスを符号化する必要があり、符号化効率を損ねることも考えられる。 In the conventional motion vector prediction method, since there is only one motion vector for prediction, there is a problem that if the prediction is not successful, the difference between the motion vectors increases and the generated code amount increases. In order to solve this problem, a new motion vector prediction method has been studied in the standard work of moving picture coding in ISO / IEC and ITU-T. This technique uses the motion vectors of neighboring neighboring blocks that have already been encoded as a reference for evaluating the amount of code when each is applied as a predicted motion vector candidate, and the motion vector with the smallest amount of code is used as the predicted motion vector. Adopting and transmitting additional information related to adjacent blocks employing motion vectors. However, as a result of increasing the number of motion vector predictor candidates, it is necessary to encode an index representing the reference destination of the motion vector predictor for each block, which may impair the coding efficiency.
 本発明はこうした状況に鑑みてなされたものであり、その目的は、予測動きベクトルの候補を減少させることにより、予測動きベクトルの参照先を表すインデックスの符号量の削減を図って符号化効率を向上させる技術を提供することにある。 The present invention has been made in view of such a situation, and an object of the present invention is to reduce the amount of prediction motion vector candidates, thereby reducing the code amount of the index representing the reference destination of the prediction motion vector and improving the encoding efficiency. It is to provide a technology for improvement.
 上記課題を解決するために、本発明のある態様の動画像符号化装置は、動画像の各ピクチャを分割したブロック単位で動きベクトルを用いて前記動画像を符号化する動画像符号化装置であって、符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済みのブロック及び符号化済みの別のピクチャ内の前記符号化対象ブロックと同一位置のブロックの少なくとも一方の動きベクトルから複数の予測動きベクトルの候補を生成し、前記予測動きベクトルの候補を表すインデックスを付与する予測動きベクトル候補生成部(120)と、前記符号化対象ブロックの動きベクトルと前記予測動きベクトルの候補から差分動きベクトルを計算し、前記差分動きベクトルから計算される符号量及び前記予測動きベクトルの候補のインデックスに基づいて前記予測動きベクトルの候補を削除する予測動きベクトル候補削除部(122)と、削除後に残存する予測動きベクトルの候補の中から予測動きベクトルを選択する予測動きベクトル判定部(123)とを備える。 In order to solve the above-described problem, a moving image encoding device according to an aspect of the present invention is a moving image encoding device that encodes the moving image using a motion vector in units of blocks obtained by dividing each picture of the moving image. A motion of at least one of a block adjacent to the block to be encoded in the same picture as the block to be encoded and a block at the same position as the block to be encoded in another encoded picture A motion vector predictor candidate generation unit (120) that generates a plurality of motion vector predictor candidates from a vector and assigns an index representing the motion vector predictor candidates; and a motion vector of the current block and a motion vector predictor A differential motion vector is calculated from the candidates, and the amount of code calculated from the differential motion vector and the prediction of the predicted motion vector A motion vector predictor candidate deletion unit (122) that deletes the motion vector predictor candidate based on the index of the motion vector, and a motion vector predictor determination unit (123) that selects a motion vector predictor from the motion vector predictor candidates remaining after the deletion. ).
 本発明の別の態様は、動画像符号化方法である。この方法は、動画像の各ピクチャを分割したブロック単位で動きベクトルを用いて前記動画像を符号化する動画像符号化方法であって、符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済みのブロック及び符号化済みの別のピクチャ内の前記符号化対象ブロックと同一位置のブロックの少なくとも一方の動きベクトルから複数の予測動きベクトルの候補を生成し、前記予測動きベクトルの候補を表すインデックスを付与する予測動きベクトル候補生成ステップと、前記符号化対象ブロックの動きベクトルと前記予測動きベクトルの候補から差分動きベクトルを計算し、前記差分動きベクトルから計算される符号量及び前記予測動きベクトルの候補のインデックスに基づいて前記予測動きベクトルの候補を削除する予測動きベクトル候補削除ステップと、削除後に残存する予測動きベクトルの候補の中から予測動きベクトルを選択する予測動きベクトル判定ステップとを備える。 Another aspect of the present invention is a video encoding method. This method is a moving image encoding method for encoding the moving image using a motion vector in units of blocks obtained by dividing each picture of the moving image, and the encoding target block in the same picture as the encoding target block A plurality of motion vector candidates from at least one motion vector of a block adjacent to the encoded block and a block in the same position as the target block in another encoded picture, and the predicted motion vector A motion vector predictor candidate generating step for assigning an index representing a candidate of the motion vector; a motion vector of the encoding target block; a motion vector difference from the motion vector predictor candidate; a code amount calculated from the motion vector difference; Delete the motion vector predictor candidates based on the motion vector candidate index That includes a predicted motion vector candidate deletion step, the predicted motion vector determination step of selecting a prediction motion vector from the candidate motion vector predictor remaining after deletion.
 本発明のある態様の動画像復号装置は、動画像の各ピクチャを分割したブロック単位で動きベクトルを用いて前記動画像が符号化されたビットストリームを復号する動画像復号装置であって、復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロック及び復号済みの別のピクチャ内の前記復号対象ブロックと同一位置のブロックの少なくとも一方の動きベクトルから複数の予測動きベクトルの候補を生成し、前記予測動きベクトルの候補を表すインデックスを付与する予測動きベクトル候補生成部(220)と、ビットストリームから復号された第1差分動きベクトルと予測動きベクトルの候補とを加算して仮の動きベクトルを生成し、前記仮の動きベクトルと前記仮の動きベクトルの生成に用いられた予測動きベクトルの候補とは異なる予測動きベクトルの候補とから第2差分動きベクトルを計算し、前記第1差分動きベクトルから計算される符号量、前記第2差分動きベクトルから計算される符号量、及び前記予測動きベクトルの候補のインデックスに基づいて前記予測動きベクトルの候補を削除する予測動きベクトル候補削除部(222)と、削除後に残存する予測動きベクトルの候補の中から予測動きベクトルを選択する予測動きベクトル判定部(223)とを備える。 A moving picture decoding apparatus according to an aspect of the present invention is a moving picture decoding apparatus that decodes a bitstream in which the moving picture is encoded using a motion vector in units of blocks obtained by dividing each picture of the moving picture. A plurality of motion vector predictor candidates from at least one motion vector of a decoded block adjacent to the decoding target block in the same picture as the target block and a block at the same position as the decoding target block in another decoded picture And a motion vector predictor candidate generation unit (220) for assigning an index representing the motion vector predictor candidate, and adding the first differential motion vector decoded from the bitstream and the motion vector predictor candidate Motion vectors, and the temporary motion vector and the preliminary motion vector used to generate the temporary motion vector. A second difference motion vector is calculated from a prediction motion vector candidate different from the motion vector candidate, a code amount calculated from the first difference motion vector, a code amount calculated from the second difference motion vector, and A prediction motion vector candidate deletion unit (222) that deletes the prediction motion vector candidate based on the prediction motion vector candidate index, and a prediction that selects a prediction motion vector from the prediction motion vector candidates remaining after the deletion A motion vector determination unit (223).
 本発明の別の態様は、動画像復号方法である。この方法は、動画像の各ピクチャを分割したブロック単位で動きベクトルを用いて前記動画像が符号化されたビットストリームを復号する動画像復号方法であって、復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロック及び復号済みの別のピクチャ内の前記復号対象ブロックと同一位置のブロックの少なくとも一方の動きベクトルから複数の予測動きベクトルの候補を生成し、前記予測動きベクトルの候補を表すインデックスを付与する予測動きベクトル候補生成ステップと、ビットストリームから復号された第1差分動きベクトルと予測動きベクトルの候補とを加算して仮の動きベクトルを生成し、前記仮の動きベクトルと前記仮の動きベクトルの生成に用いられた予測動きベクトルの候補とは異なる予測動きベクトルの候補とから第2差分動きベクトルを計算し、前記第1差分動きベクトルから計算される符号量、前記第2差分動きベクトルから計算される符号量、及び前記予測動きベクトルの候補のインデックスに基づいて前記予測動きベクトルの候補を削除する予測動きベクトル候補削除ステップと、削除後に残存する予測動きベクトルの候補の中から予測動きベクトルを選択する予測動きベクトル判定ステップとを備える。 Another aspect of the present invention is a video decoding method. This method is a moving image decoding method for decoding a bitstream in which the moving image is encoded using a motion vector in units of blocks obtained by dividing each picture of the moving image, and the method includes decoding the bit stream in the same picture as the decoding target block. A plurality of motion vector predictor candidates are generated from at least one motion vector of a decoded block adjacent to the decoding target block and a block at the same position as the decoding target block in another decoded picture, and the predicted motion vector A predicted motion vector candidate generating step for assigning an index representing a candidate for the first motion vector, and adding a first differential motion vector decoded from the bitstream and a predicted motion vector candidate to generate a temporary motion vector, The vector and the predicted motion vector candidate used to generate the temporary motion vector are different A second differential motion vector is calculated from the measured motion vector candidates, a code amount calculated from the first differential motion vector, a code amount calculated from the second differential motion vector, and the predicted motion vector candidates A prediction motion vector candidate deletion step of deleting the prediction motion vector candidate based on the index; and a prediction motion vector determination step of selecting a prediction motion vector from the prediction motion vector candidates remaining after the deletion.
 なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、記録媒体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。 It should be noted that an arbitrary combination of the above-described components and a conversion of the expression of the present invention between a method, an apparatus, a system, a recording medium, a computer program, and the like are also effective as an aspect of the present invention.
 本発明によれば、複数の予測動きベクトルの中から最適な動きベクトルを選択し、伝送する差分動きベクトルの発生符号量を削減させるとともに、予測動きベクトルの候補数を削減可能となる為、予測動きベクトルを表すインデックスに必要な符号量を削減させて、符号化効率を向上させることができる。 According to the present invention, it is possible to select an optimal motion vector from a plurality of motion vector predictors, reduce the amount of generated differential motion vector codes, and reduce the number of motion vector predictor candidates. Coding efficiency can be improved by reducing the amount of code necessary for an index representing a motion vector.
実施の形態に係る動きベクトルの予測方法を具備した動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoder which comprised the prediction method of the motion vector which concerns on embodiment. 実施の形態に係る動きベクトルの予測方法を具備した動画像復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image decoding apparatus which comprised the prediction method of the motion vector which concerns on embodiment. 実施の形態における符号化ブロックを説明する為の図である。It is a figure for demonstrating the encoding block in embodiment. 実施の形態における予測ブロックの形状の種類を説明する為の図である。It is a figure for demonstrating the kind of shape of the prediction block in embodiment. 実施の形態における動きベクトルの予測方法をスライスレベルで実行するか否かを決定するビットストリームのシンタックスパターンを示す図である。It is a figure which shows the syntax pattern of the bit stream which determines whether the motion vector prediction method in embodiment is performed at a slice level. 実施の形態における動きベクトルの予測方法を実行する場合に予測ブロックレベルで予測動きベクトルの候補を一意に決定するビットストリームのシンタックスパターンを示す図である。It is a figure which shows the syntax pattern of the bit stream which determines the candidate of a motion vector predictor uniquely at a prediction block level, when performing the motion vector prediction method in embodiment. 図1の動画像符号化装置の予測動きベクトル選択部の第1の実施例の動作を説明する為の詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure for demonstrating operation | movement of the 1st Example of the prediction motion vector selection part of the moving image encoder of FIG. 図1の動画像符号化装置の予測動きベクトル判定部の動作を説明する為のフローチャートである。3 is a flowchart for explaining the operation of a predicted motion vector determination unit of the video encoding device in FIG. 1. 図2の動画像復号装置の予測動きベクトル選択部の第1の実施例の動作を説明する為の詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure for demonstrating operation | movement of the 1st Example of the prediction motion vector selection part of the moving image decoding apparatus of FIG. 図2の動画像復号装置の予測動きベクトル判定部の動作を説明する為のフローチャートである。6 is a flowchart for explaining an operation of a predicted motion vector determination unit of the video decoding device in FIG. 2. 実施の形態における動きベクトルの予測方法の第1の実施例の動作を説明する為のフローチャートである。It is a flowchart for demonstrating operation | movement of the 1st Example of the prediction method of the motion vector in embodiment. 実施の形態における動きベクトルの予測方法の処理対象となるパーティションの位置を説明する為の図である。It is a figure for demonstrating the position of the partition used as the process target of the prediction method of the motion vector in embodiment. 実施の形態における動きベクトルの予測方法の処理対象となるパーティションの周辺を説明する為の図である。It is a figure for demonstrating the periphery of the partition used as the process target of the prediction method of the motion vector in embodiment. 実施の形態における動きベクトルの予測方法の周辺パーティションから予測動きベクトルの候補を選出する動作を説明するためのフローチャートである。It is a flowchart for demonstrating the operation | movement which selects the candidate of a motion vector predictor from the periphery partition of the motion vector prediction method in embodiment. 実施の形態における動きベクトルの予測方法の周辺パーティションの予測動きベクトルの候補から中央値を算出する動作を説明するためのフローチャートである。It is a flowchart for demonstrating the operation | movement which calculates a median from the prediction motion vector candidate of the periphery partition of the prediction method of the motion vector in embodiment. 実施の形態における動きベクトルの予測方法の予測動きベクトルの候補を格納しておくリストを説明する為の図である。It is a figure for demonstrating the list | wrist which stores the candidate of the prediction motion vector of the prediction method of the motion vector in embodiment. 実施の形態における動きベクトルの予測方法の時間方向の予測動きベクトルの候補を算出する為に場合分けをする動作を説明するためのフローチャートである。It is a flowchart for demonstrating the operation | movement which classifies in order to calculate the candidate of the motion vector prediction of the time direction of the motion vector prediction method in embodiment. 実施の形態における動きベクトルの予測方法の時間方向の予測動きベクトルの候補を算出するCase1の状態を説明する為の図である。It is a figure for demonstrating the state of Case1 which calculates the candidate of the prediction motion vector of the time direction of the prediction method of the motion vector in embodiment. 実施の形態における動きベクトルの予測方法の時間方向の予測動きベクトルの候補を算出するCase2の状態を説明する為の図である。It is a figure for demonstrating the state of Case2 which calculates the candidate of the motion vector predictor of the time direction of the motion vector prediction method in embodiment. 実施の形態における動きベクトルの予測方法の時間方向の予測動きベクトルの候補を算出するCase3の状態を説明する為の図である。It is a figure for demonstrating the state of Case3 which calculates the candidate of the prediction motion vector of the time direction of the prediction method of the motion vector in embodiment. 実施の形態における動きベクトルの予測方法の時間方向の予測動きベクトルの候補を算出する動作を説明するためのフローチャートである。It is a flowchart for demonstrating the operation | movement which calculates the candidate of the motion vector prediction of the time direction of the motion vector prediction method in embodiment. 実施の形態における動きベクトルの予測方法の予測動きベクトルの候補の削除の推移を説明する為の図である。It is a figure for demonstrating transition of the deletion of the candidate of a prediction motion vector of the prediction method of the motion vector in embodiment. 実施の形態における動きベクトルの予測方法の予測動きベクトルの候補の削除を説明するためのフローチャートである。It is a flowchart for demonstrating deletion of the prediction motion vector candidate of the motion vector prediction method in embodiment. 実施の形態における動きベクトルの予測方法により算出された差分動きベクトルの符号化に用いられる符号付き指数ゴロム符号化テーブルである。It is a signed exponential Golomb coding table used for coding the differential motion vector calculated by the motion vector prediction method in the embodiment. 実施の形態における動きベクトルの予測方法により予測動きベクトルのインデックスを表すTruncated Unaryの符号化テーブルである。It is a Truncated Unary encoding table that represents an index of a motion vector predictor by a motion vector prediction method according to the embodiment. 図1の動画像符号化装置の予測動きベクトル選択部の第2の実施例の動作を説明する為の詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure for demonstrating operation | movement of the 2nd Example of the prediction motion vector selection part of the moving image encoder of FIG. 図2の動画像復号装置の予測動きベクトル選択部の第2の実施例の動作を説明する為の詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure for demonstrating operation | movement of the 2nd Example of the prediction motion vector selection part of the moving image decoding apparatus of FIG. 実施の形態における動きベクトルの予測方法の第2の実施例の動作を説明する為のフローチャートである。It is a flowchart for demonstrating operation | movement of the 2nd Example of the prediction method of the motion vector in embodiment. 実施の形態における動きベクトルの予測方法の第3の実施例の符号量の境界のオフセットを説明する概念図である。It is a conceptual diagram explaining the offset of the code amount boundary of the 3rd Example of the prediction method of the motion vector in embodiment. 実施の形態における動きベクトルの予測方法の第3の実施例の為に図23に追加されるフローチャートである。It is a flowchart added to FIG. 23 for the 3rd Example of the prediction method of the motion vector in embodiment. 従来の周辺の隣接ブロックから予測動きベクトルの求め方を説明する図である。It is a figure explaining how to obtain a predicted motion vector from conventional neighboring blocks. 従来の隣接ブロックの形状が異なる場合の予測動きベクトルの求め方を説明する図である。It is a figure explaining the calculation method of the prediction motion vector in case the shape of the conventional adjacent block differs. 従来の符号化対象ブロックの形状が2N×N或いはN×2Nの場合の予測動きベクトルの求め方を説明する図である。It is a figure explaining how to obtain a prediction motion vector when the shape of a conventional encoding target block is 2N × N or N × 2N.
 本発明の実施の形態に係る動画像符号化装置及び動画像復号装置について図面を参照して説明する。 A moving picture encoding apparatus and moving picture decoding apparatus according to an embodiment of the present invention will be described with reference to the drawings.
 実施の形態では、動画像の符号化に関し、特にピクチャを矩形ブロックに分割し、ピクチャ間でブロック単位に動き推定、補償を行う動画像符号化における動きベクトルの符号化効率を向上させる為に、既符号化済みの周囲のブロック等の動きベクトルから予測を行い、処理対象のブロックの動きベクトルとその予測値との差分ベクトルを符号化することによって符号量を削減する動きベクトルの予測方法を用いる。 In the embodiment, in order to improve the efficiency of motion vector coding in moving image coding, in particular, for dividing moving pictures into rectangular blocks and performing motion estimation and compensation in units of blocks between pictures. Use a motion vector prediction method that performs prediction from motion vectors of already-encoded surrounding blocks and the like, and reduces the amount of code by encoding the difference vector between the motion vector of the block to be processed and its predicted value .
 図1は実施の形態に係る動画像符号化装置の構成を示すブロックである。実施の形態の動画像符号化装置は、動きベクトル検出部101、減算部102、直交変換・量子化部103、可変長符号化部104、逆量子化・逆直交変換部105、動き補償部106、重み付き予測部107、加算部108、デブロッキング・フィルタ部109、メモリ110、および予測動きベクトル選択部111を備える。 FIG. 1 is a block diagram showing a configuration of a moving picture encoding apparatus according to an embodiment. The moving image encoding apparatus according to the embodiment includes a motion vector detection unit 101, a subtraction unit 102, an orthogonal transform / quantization unit 103, a variable length encoding unit 104, an inverse quantization / inverse orthogonal transform unit 105, and a motion compensation unit 106. , A weighted prediction unit 107, an addition unit 108, a deblocking filter unit 109, a memory 110, and a prediction motion vector selection unit 111.
 動きベクトル検出部101は、ピクチャ間でブロック単位にマッチングを行い動きベクトルを検出し、検出された動きベクトルを予測動きベクトル選択部111に与える。 The motion vector detection unit 101 detects a motion vector by performing matching between pictures in units of blocks, and provides the detected motion vector to the predicted motion vector selection unit 111.
 予測動きベクトル選択部111は、メモリ110に記憶されている既に符号化された画像の動き情報を用いて、動きベクトル検出部101が検出した動きベクトルを予測するための最適な予測動きベクトルを選択する。予測動きベクトル選択部111の詳細な構成と動作は後述する。 The motion vector predictor selection unit 111 selects an optimal motion vector predictor for predicting the motion vector detected by the motion vector detection unit 101 using the motion information of the already encoded image stored in the memory 110. To do. The detailed configuration and operation of the predicted motion vector selection unit 111 will be described later.
 動き補償部106は、動きベクトル検出部101により検出された動きベクトルを用いて予測画像を生成する。重み付き予測部107は、動き補償部106により生成された予測画像に適応的に重み係数を掛け算して最終的な予測画像を生成し、減算部102と加算部108に与える。 The motion compensation unit 106 uses the motion vector detected by the motion vector detection unit 101 to generate a predicted image. The weighted prediction unit 107 adaptively multiplies the prediction image generated by the motion compensation unit 106 by a weighting coefficient to generate a final prediction image, and provides it to the subtraction unit 102 and the addition unit 108.
 減算部102は、符号化する画像と予測画像との引き算を行い残差信号を生成し、直交変換・量子化部103に与える。直交変換・量子化部103は、残差信号に対して直交変換及び量子化を行い変換信号を生成し、可変長符号化部104と逆量子化・逆直交変換部105に与える。可変長符号化部104は、直交変換及び量子化された残差信号をエントロピー符号化する。可変長符号化部104は、予測動きベクトル選択部111によって予測された動きベクトルに関する情報も符号化し、符号化画像と符号化された動きベクトルに関する情報とを含むビットストリームを出力する。 The subtraction unit 102 generates a residual signal by subtracting the image to be encoded and the predicted image, and supplies the residual signal to the orthogonal transform / quantization unit 103. The orthogonal transform / quantization unit 103 performs orthogonal transform and quantization on the residual signal, generates a transform signal, and supplies the transform signal to the variable length coding unit 104 and the inverse quantization / inverse orthogonal transform unit 105. The variable length coding unit 104 entropy codes the residual signal that has been orthogonally transformed and quantized. The variable length encoding unit 104 also encodes information related to the motion vector predicted by the prediction motion vector selection unit 111, and outputs a bit stream including an encoded image and information related to the encoded motion vector.
 逆量子化・逆直交変換部105は、直交変換・量子化部103から受け取った変換信号を逆量子化及び逆直交変換して元の残差信号に戻す。加算部108は、予測画像と残差信号を加算して復号画像を生成し、デブロッキング・フィルタ部109に与える。デブロッキング・フィルタ部109は、復号画像に対して符号化によるブロック歪を減少させる処理を施し、メモリ110に格納する。メモリ110は、復号画像や既に符号化された画像の情報を記憶する。 The inverse quantization / inverse orthogonal transform unit 105 performs inverse quantization and inverse orthogonal transform on the transform signal received from the orthogonal transform / quantization unit 103 to return to the original residual signal. The adding unit 108 adds the predicted image and the residual signal, generates a decoded image, and supplies the decoded image to the deblocking filter unit 109. The deblocking filter unit 109 performs a process of reducing block distortion due to encoding on the decoded image and stores it in the memory 110. The memory 110 stores information on decoded images and already encoded images.
 図2は図1の動画像符号化装置に対応した実施の形態に係る動画像復号装置の構成を示すブロックである。実施の形態の動画像復号装置は、可変長復号部201、逆量子化・逆直交変換部202、動き補償部203、重み付き予測部204、加算部205、デブロッキング・フィルタ部206、メモリ207、および予測動きベクトル選択部208を備える。 FIG. 2 is a block diagram showing a configuration of a moving picture decoding apparatus according to an embodiment corresponding to the moving picture encoding apparatus of FIG. The moving picture decoding apparatus according to the embodiment includes a variable length decoding unit 201, an inverse quantization / inverse orthogonal transform unit 202, a motion compensation unit 203, a weighted prediction unit 204, an addition unit 205, a deblocking filter unit 206, and a memory 207. , And a predicted motion vector selection unit 208.
 図2の動画像復号装置の復号処理は、図1の動画像符号化装置の内部に設けられている復号処理に対応するものであるから、図2の逆量子化・逆直交変換部202、動き補償部203、重み付き予測部204、加算部205、デブロッキング・フィルタ部206、メモリ207、および予測動きベクトル選択部208の各構成は、図1の動画像符号化装置の逆量子化・逆直交変換部105、動き補償部106、重み付き予測部107、加算部108、デブロッキング・フィルタ部109、メモリ110、および予測動きベクトル選択部111の各構成とそれぞれ対応する機能を有する。 The decoding process of the moving picture decoding apparatus in FIG. 2 corresponds to the decoding process provided in the moving picture encoding apparatus in FIG. 1, so that the inverse quantization / inverse orthogonal transform unit 202 in FIG. Each configuration of the motion compensation unit 203, the weighted prediction unit 204, the addition unit 205, the deblocking filter unit 206, the memory 207, and the predicted motion vector selection unit 208 is the same as the dequantization / decoding of the moving picture coding apparatus in FIG. The inverse orthogonal transform unit 105, the motion compensation unit 106, the weighted prediction unit 107, the addition unit 108, the deblocking filter unit 109, the memory 110, and the predicted motion vector selection unit 111 have functions corresponding to each configuration.
 可変長復号部201は、ビットストリームを復号して予測残差信号、動きベクトルに関する情報を出力し、予測残差信号を逆量子化・逆直交変換部202に与え、動きベクトルに関する情報を予測動きベクトル選択部208と動き補償部203に与える。 The variable length decoding unit 201 decodes the bit stream, outputs information on the prediction residual signal and the motion vector, provides the prediction residual signal to the inverse quantization / inverse orthogonal transform unit 202, and provides information on the motion vector as the prediction motion This is given to the vector selection unit 208 and the motion compensation unit 203.
 逆量子化・逆直交変換部202は、可変長復号部201で復号された予測残差信号に対して逆直交変換及び逆量子化を行う。加算部205は、逆量子化・逆直交変換部202により逆変換された予測残差成分と、重み付き予測部204により算出された予測画像とを加算することにより、画像信号を復号し、デブロッキング・フィルタ部206に与える。デブロッキング・フィルタ部206は、復号画像に対して符号化によるブロック歪を減少させる処理を施し、メモリ207に格納する。 The inverse quantization / inverse orthogonal transform unit 202 performs inverse orthogonal transform and inverse quantization on the prediction residual signal decoded by the variable length decoding unit 201. The addition unit 205 decodes the image signal by adding the prediction residual component inversely transformed by the inverse quantization / inverse orthogonal transformation unit 202 and the prediction image calculated by the weighted prediction unit 204, and decodes the image signal. This is applied to the blocking filter unit 206. The deblocking filter unit 206 performs a process of reducing block distortion due to encoding on the decoded image and stores it in the memory 207.
 予測動きベクトル選択部208は、メモリ207に記憶されている既に復号された画像の動き情報を用いて、復号対象ブロックの復号された動きベクトルを予測するための最適な予測動きベクトルを選択する。予測動きベクトル選択部208の詳細な構成と動作は後述する。 The predicted motion vector selection unit 208 uses the motion information of the already decoded image stored in the memory 207 to select an optimal predicted motion vector for predicting the decoded motion vector of the decoding target block. The detailed configuration and operation of the motion vector predictor selection unit 208 will be described later.
 動き補償部203は、復号対象ブロックの復号された動きベクトルを用いて予測画像を生成する。重み付き予測部204は、動き補償部203により生成された予測画像に適応的に重み係数を掛け算して最終的な予測画像を生成し、加算部205に与える。 The motion compensation unit 203 generates a predicted image using the decoded motion vector of the decoding target block. The weighted prediction unit 204 adaptively multiplies the prediction image generated by the motion compensation unit 203 by a weighting coefficient to generate a final prediction image, and provides the result to the addition unit 205.
 実施の形態に係る動きベクトルの予測方法は、図1の動画像符号化装置の予測動きベクトル選択部111及び図2の動画像復号装置の予測動きベクトル選択部208において実施される。 The motion vector prediction method according to the embodiment is implemented in the motion vector predictor selection unit 111 of the video encoding device of FIG. 1 and the motion vector predictor selection unit 208 of the video decoding device of FIG.
[実施例1]
 動きベクトルの予測方法の実施例を説明する前に、本実施例において使用する用語を説明しておく。
[Example 1]
Before describing an embodiment of a motion vector prediction method, terms used in the present embodiment will be described.
 (符号化ブロックについて)
 実施の形態では、図3に示されるように、画面内を同一サイズの正方の矩形ブロックにて均等分割する。このブロックを符号化ブロックと呼び、符号化及び復号を行う際の処理の基本となる。符号化ブロックは画面内のテクスチャに応じて、符号化処理を最適にすべく、符号化ブロック内を4分割して、ブロックサイズの小さい符号化ブロックにすることが出来る。図3で示される画面内を均等サイズで分割される符号化ブロックを最大符号化ブロックと呼び、その内部を符号化条件に応じて4分割したものを総じて符号化ブロックとする。符号化ブロックをこれ以上4分割出来ない最小のサイズとなる符号化ブロックを最小符号化ブロックと呼ぶこととする。
(About coding block)
In the embodiment, as shown in FIG. 3, the screen is equally divided into square rectangular blocks of the same size. This block is called a coding block and is the basis of processing when performing coding and decoding. According to the texture in the screen, the coding block can be divided into four blocks with a small block size in order to optimize the coding process. A coded block that is divided into equal screen sizes in the screen shown in FIG. 3 is called a maximum coded block, and the inside of which is divided into four according to the coding conditions is collectively called a coded block. An encoded block having a minimum size that cannot be further divided into four is referred to as a minimum encoded block.
 (予測ブロックについて)
 画面内をブロックに分割して動き補償を行う場合、動き補償のブロックサイズをより小さくした方が、よりきめ細かい予測を行うことが出来ることから、いくつかのブロックサイズの中から最適なものを選択して、ブロック内部を分割して動き補償を行う仕組みを取り入れている。この動き補償を行うブロックを予測ブロックと呼ぶ。予測ブロックは符号化ブロックと同一のサイズで表され、動き補償に応じて、予測ブロック内部を分割せず1ブロックとみなす場合を最大とし、水平或いは垂直方向に2分割したもの、水平と垂直の均等分割により4分割したものに分けられる。分割後のサイズに応じて、分割タイプに対応したモードが定義されており、図4に示される。
(About prediction block)
When motion compensation is performed by dividing the screen into blocks, the smaller the motion compensation block size, the more detailed prediction can be made, so select the optimal block size from several block sizes. Thus, a mechanism for performing motion compensation by dividing the inside of the block is adopted. A block that performs this motion compensation is called a prediction block. The prediction block is represented by the same size as the coding block, and according to the motion compensation, the prediction block is regarded as one block without being divided, and is divided into two in the horizontal or vertical direction. Divided into four parts by equal division. The mode corresponding to the division type is defined according to the size after the division, and is shown in FIG.
 (パーティションについて)
 予測ブロックを分割した個々の領域はパーティションと呼ばれる。予測ブロック内部において、パーティションを管理する為に、0から開始する番号を、予測ブロック内部に存在するパーティションに対してジグザグスキャン順に割り当てる。この番号はパーティション番号と呼ばれ、puPartIdxで表される。図4の予測ブロックのパーティションの中に記述された数字は、そのパーティションのパーティション番号を表す。
(About partitions)
Each area obtained by dividing the prediction block is called a partition. In order to manage the partitions in the prediction block, numbers starting from 0 are assigned to the partitions existing in the prediction block in the zigzag scan order. This number is called a partition number and is represented by puPartIdx. The number described in the partition of the prediction block in FIG. 4 represents the partition number of the partition.
 実施形態による動きベクトルの予測方法を図面を用いて説明する。動きベクトルの予測方法は、予測ブロックを構成するパーティション単位に、符号化及び復号の処理の何れでも実施される。符号化の場合、動き補償による画像間符号化が選択された場合に、予測ブロックのパーティション毎に算出された動きベクトルを効率良く符号化する為の予測動きベクトルとして、既に符号化された周囲の予測ブロックのパーティションの動きベクトルの中から選択する際、復号の場合、ビットストリームから復号した情報を利用して、動きベクトルを算出する際、実施される。 A motion vector prediction method according to an embodiment will be described with reference to the drawings. The motion vector prediction method is performed for both the encoding and decoding processes for each partition constituting the prediction block. In the case of coding, when inter-picture coding by motion compensation is selected, a motion vector calculated for each partition of the prediction block is used as a predicted motion vector for efficiently coding, When selecting from motion vectors of a partition of a prediction block, in the case of decoding, it is performed when calculating a motion vector using information decoded from a bit stream.
 (シンタックスについて)
 まず、本実施例に係る動きベクトルの予測方法を備える動画像符号化装置により符号化される動画像のビットストリームのシンタックスについて説明する。
(About syntax)
First, the syntax of a bit stream of a moving image that is encoded by a moving image encoding device including the motion vector prediction method according to the present embodiment will be described.
 図5は動画像のビットストリームのスライスヘッダーに記述される第1のシンタックスパターンを示す。スライス単位で動き補償による画像間予測を行う場合、即ちスライスタイプがP(前方向予測)或いはB(両予測)の場合に、本発明に係る動きベクトルの予測方法を適用するかどうかを示す第1フラグmv_competition_flagが設置される。mv_competition_flagが真(1)の場合は、同一ピクチャ内で隣接する周囲のパーティションの動きベクトルだけでなく、時間方向で異なるピクチャの中の処理対象のパーティションと同一位置のパーティションの動きベクトルを利用して予測と行うかどうかを示す第2フラグmv_competition_temporal_flagが設置される。更に、スライスタイプがBで且つmv_competition_flagが真(1)の場合は、処理対象のパーティションが含まれるピクチャの参照ピクチャのリストのうちL0予測或いはL1予測のどちらを使用するかを決定する第3フラグcollocated_from_l0_flagが設置される。 FIG. 5 shows the first syntax pattern described in the slice header of the moving image bit stream. When performing inter-picture prediction by motion compensation in units of slices, that is, when the slice type is P (forward prediction) or B (bi-prediction), this indicates whether to apply the motion vector prediction method according to the present invention. One flag mv_competition_flag is set. When mv_competition_flag is true (1), not only the motion vectors of neighboring partitions adjacent to each other in the same picture, but also the motion vector of the partition at the same position as the partition to be processed in a picture different in the time direction is used. A second flag mv_competition_temporal_flag indicating whether to perform prediction is set. Further, when the slice type is B and mv_competition_flag is true (1), the third flag for determining whether to use L0 prediction or L1 prediction from the reference picture list of the picture including the processing target partition collocated_from_l0_flag is installed.
 図6はスライスの中の予測ブロック単位に記述される第2のシンタックスパターンを示す。予測ブロックの予測モードが画像間予測(MODE_INTER)の場合、予測ブロック内のパーティション毎に、動きベクトル検出にて求められたパーティションの動きベクトルと予測動きベクトルとの差分動きベクトルmvd_lX[i][j]が設置される。ここで、Xは0或いは1で予測方向を示し、iは予測ブロックの中のパーティション番号、jは差分動きベクトルの成分を表し、j=0はx成分を、j=1はy成分を表す。次に、第1フラグmv_competition_flagが真(1)で且つ予測動きベクトルの候補の総数が1つを超える場合に、参照する予測動きベクトルの候補のリストのインデックスmvp_idx_lX[i]が設置される。NumMvpCand(LX,i)は、予測方向LX(Xは0或いは1)でパーティションiの予測動きベクトルの候補の総数を算出する関数を表し、後述にて説明される。このインデックスmvp_idx_lX[i]は動きベクトルの予測方法を実施しない、即ちmv_competition_flagが偽(0)の場合は符号化されず、ビットストリーム中に記述されない。mv_competition_flagが偽(0)の場合は従来通りの手法で算出されるので、インデックスmvp_idx_lX[i]により指定する必要が無い為である。また、動きベクトルの予測方法により予測動きベクトルの候補の総数NumMvpCand(LX,i)が1つの場合にも符号化されない。予測動きベクトルの候補の総数が1つであれば、その1つが予測動きベクトルとなるので、mvp_idx_lx[i]を伝送せずとも参照する予測動きベクトルの候補が確定する為である。 FIG. 6 shows a second syntax pattern described for each prediction block in the slice. When the prediction mode of the prediction block is inter-picture prediction (MODE_INTER), for each partition in the prediction block, a difference motion vector mvd_lX [i] [j between the motion vector of the partition obtained by motion vector detection and the prediction motion vector ] Is installed. Here, X indicates a prediction direction with 0 or 1, i indicates a partition number in the prediction block, j indicates a differential motion vector component, j = 0 indicates an x component, and j = 1 indicates a y component. . Next, when the first flag mv_competition_flag is true (1) and the total number of motion vector predictor candidates exceeds 1, the index mvp_idx_lX [i] of the list of motion vector predictor candidates to be referred to is set. NumMvpCand (LX, i) represents a function for calculating the total number of motion vector predictor candidates for the partition i in the prediction direction LX (X is 0 or 1), and will be described later. This index mvp_idx_lX [i] does not perform the motion vector prediction method, that is, when mv_competition_flag is false (0), it is not encoded and is not described in the bitstream. This is because when mv_competition_flag is false (0), it is calculated by the conventional method, and therefore, it is not necessary to specify the index mvp_idx_lX [i]. Further, even when the total number of predicted motion vector candidates NumMvpCand (LX, i) is one by the motion vector prediction method, it is not encoded. This is because if the total number of predicted motion vector candidates is one, one of them becomes a predicted motion vector, and therefore, the predicted motion vector candidate to be referred to is determined without transmitting mvp_idx_lx [i].
 (符号化における動きベクトルの予測)
 上述のシンタックスに基づき、動画像のビットストリームを符号化する動画像符号化装置において、実施の形態に係る動きベクトルの予測方法の動作を説明する。動きベクトルの予測方法は、スライス単位で動き補償による画像間予測を行う場合、即ちスライスタイプがP(前方向予測)或いはB(両予測)の場合で、更に、スライスの中の予測ブロックの予測モードが画像間予測(MODE_INTER)の予測ブロックのパーティションに適用される。
(Prediction of motion vector in encoding)
The operation of the motion vector prediction method according to the embodiment in the video encoding device that encodes a video bitstream based on the above-described syntax will be described. As a motion vector prediction method, when performing inter-picture prediction by motion compensation in units of slices, that is, when the slice type is P (forward prediction) or B (bi-prediction), prediction of a prediction block in a slice is further performed. The mode is applied to a partition of a prediction block of inter-picture prediction (MODE_INTER).
 図7は、図1の動画像符号化装置の予測動きベクトル選択部111の詳細な構成を示す図である。図7の太枠線で囲まれる部分は予測動きベクトル選択部111を示している。更に、その内部の太点線で囲まれる部分は後述する動きベクトルの予測方法の動作部を示しており、実施の形態の動画像符号化装置と対応する動画像復号装置にも同様に設置され、符号化と復号で矛盾しない同一の判定結果を得られるようにしている。以下、この図を用いて、符号化における動きベクトルの予測方法を説明する。 FIG. 7 is a diagram showing a detailed configuration of the motion vector predictor selection unit 111 of the video encoding device in FIG. A portion surrounded by a thick frame line in FIG. 7 indicates the motion vector predictor selection unit 111. Further, the part surrounded by a thick dotted line inside thereof shows an operation unit of a motion vector prediction method described later, and is similarly installed in a video decoding device corresponding to the video encoding device of the embodiment, The same determination result that does not contradict between encoding and decoding can be obtained. Hereinafter, a motion vector prediction method in encoding will be described with reference to FIG.
 予測動きベクトル選択部111は、予測動きベクトル候補生成部120、予測動きベクトル候補同一判定部121、予測動きベクトル候補削除部122、予測動きベクトル判定部123、減算部124、および予測動きベクトル選択部125を含む。 The predicted motion vector selection unit 111 includes a predicted motion vector candidate generation unit 120, a predicted motion vector candidate identity determination unit 121, a predicted motion vector candidate deletion unit 122, a predicted motion vector determination unit 123, a subtraction unit 124, and a predicted motion vector selection unit. 125 is included.
 予測動きベクトル候補生成部120は、符号化後に復号してメモリ110に記録されていた、符号化対象ブロックと同一ピクチャ内の符号化対象ブロックと隣接する符号化済みのパーティション及び符号化済みの異なるピクチャ内の符号化対象ブロックと同一位置に存在するパーティション等の動きベクトルをメモリ110から読み出す。 The motion vector predictor candidate generation unit 120 encodes the encoded partition adjacent to the encoding target block in the same picture as the encoding target block and the encoded different one, which are decoded and recorded in the memory 110 after encoding. A motion vector such as a partition existing at the same position as the encoding target block in the picture is read from the memory 110.
 予測動きベクトル候補生成部120は、このようにしてメモリ110から読み出された符号化済みの他のブロックの動きベクトルから少なくとも2つ以上の予測動きベクトルの候補mvpListLX[i](iはリストmvpListLXにふられたインデックス)を生成し、予測動きベクトルの候補を格納するリストmvpListLXに格納する。 The motion vector predictor candidate generation unit 120 thus generates at least two motion vector predictor candidates mvpListLX [i] (i is a list mvpListLX) from the motion vectors of other blocks that have been read out from the memory 110 in this way. Are stored in a list mvpListLX that stores prediction motion vector candidates.
 次に、予測動きベクトル候補同一判定部121は、リストmvpListLXに格納された予測動きベクトルの候補の中から同一の動きベクトルの値をもつものを判定し、同一の動きベクトル値をもつと判定された予測動きベクトルの候補について一つを残してそれ以外をリストmvpListLXから削除して、予測動きベクトルの候補が重複しないようにし、リストmvpListLXを更新する。予測動きベクトル候補同一判定部121は、更新されたリストmvpListLXを予測動きベクトル選択部125と予測動きベクトル候補削除部122に与える。 Next, the motion vector predictor candidate determination unit 121 determines a motion vector predictor candidate having the same motion vector value from the motion vector predictor candidates stored in the list mvpListLX, and determines that the motion vector value is the same. One of the predicted motion vector candidates is left, and the rest are deleted from the list mvpListLX so that the predicted motion vector candidates do not overlap, and the list mvpListLX is updated. The motion vector predictor candidate identity determination unit 121 provides the updated list mvpListLX to the motion vector predictor selection unit 125 and the motion vector predictor candidate deletion unit 122.
 一方、動きベクトル検出部101にて予測ブロックのパーティション毎に動きベクトルmvが検出される。動きベクトルmvは更新されたリストmvpListLXの予測動きベクトルの候補とともに予測動きベクトル選択部125に入力される。 On the other hand, the motion vector detection unit 101 detects the motion vector mv for each partition of the prediction block. The motion vector mv is input to the predicted motion vector selection unit 125 together with the predicted motion vector candidates of the updated list mvpListLX.
 予測動きベクトル選択部125は、動きベクトルmvとリストmvpListLXの中に格納された各予測動きベクトルの候補mvpListLX[i]との差分をとり、その差分を符号化したときの発生符号量が最小となる予測動きベクトルの候補mvpListLX[i]をmin_mvpとする。リストmvpListLXの中で最小の発生符号量となる予測動きベクトルの候補が複数存在する場合には、リストmvpListLXの中のインデックスiが小さい番号で表される予測動きベクトルの候補mvpListLX[i]を最適予測動きベクトルmin_mvpとする。予測動きベクトル選択部125は、選択された最適予測動きベクトルmin_mvpを記録しておく。 The motion vector predictor selection unit 125 takes the difference between the motion vector mv and each motion vector candidate mvpListLX [i] stored in the list mvpListLX, and the generated code amount is minimized when the difference is encoded. The predicted motion vector candidate mvpListLX [i] is defined as min_mvp. When there are a plurality of motion vector predictor candidates having the smallest generated code amount in the list mvpListLX, the motion vector candidate mvpListLX [i] represented by a smaller number in the index i in the list mvpListLX is optimal. The predicted motion vector is min_mvp. The predicted motion vector selection unit 125 records the selected optimal predicted motion vector min_mvp.
 予測動きベクトル選択部125は、選択された最適予測動きベクトルmin_mvpを予測動きベクトル判定部123に与える。予測動きベクトル選択部125は、選択されたmin_mvpと動きベクトルmvとの差分を算出し、差分動きベクトルmvdとして、予測動きベクトル候補削除部122に与える。 The predicted motion vector selection unit 125 gives the selected optimal predicted motion vector min_mvp to the predicted motion vector determination unit 123. The motion vector predictor selection unit 125 calculates the difference between the selected min_mvp and the motion vector mv, and provides the difference motion vector mvd to the motion vector predictor candidate deletion unit 122.
 予測動きベクトル候補削除部122は、更新されたリストmvpListLXの中の予測動きベクトルの候補と差分動きベクトルmvdを受け取り、予測動きベクトルの候補の削除処理により、リストmvpListLXから一部の予測動きベクトルの候補を削除する。 The motion vector predictor candidate deletion unit 122 receives the motion vector predictor candidates and the difference motion vector mvd in the updated list mvpListLX, and deletes some motion vector predictors from the list mvpListLX through the motion vector candidate deletion process. Delete a candidate.
 具体的には、予測動きベクトル候補削除部122は、予測動きベクトルの候補の一つを仮の予測動きベクトルと設定し、第1の差分動きベクトルmvdと仮の予測動きベクトルとを加算して仮の動きベクトルを生成し、その仮の動きベクトルと、仮の予測動きベクトルとは異なる予測動きベクトルの候補とから第2の差分動きベクトルを計算し、第1の差分動きベクトルmvdの符号量よりも第2の差分動きベクトルの符号量が小さい場合、仮の予測動きベクトルは真の予測動きベクトルではないと判定し、仮の予測動きベクトルとして設定された予測動きベクトルの候補を削除する。第1の差分動きベクトルmvdの符号量と第2の差分動きベクトルの符号量が同じであれば、予測動きベクトルの候補のインデックスの小さい方を選択し、他方を削除する。予測動きベクトルの候補の削除処理の詳細は後述する。 Specifically, the predicted motion vector candidate deletion unit 122 sets one of the predicted motion vector candidates as a temporary predicted motion vector, and adds the first differential motion vector mvd and the temporary predicted motion vector. A temporary motion vector is generated, a second differential motion vector is calculated from the temporary motion vector and a predicted motion vector candidate different from the temporary predicted motion vector, and the code amount of the first differential motion vector mvd If the code amount of the second differential motion vector is smaller than that, it is determined that the temporary motion vector predictor is not a true motion vector predictor, and the motion vector predictor candidate set as the temporary motion vector predictor is deleted. If the code amount of the first differential motion vector mvd and the code amount of the second differential motion vector are the same, the smaller one of the predicted motion vector candidate indexes is selected, and the other is deleted. Details of the motion vector candidate deletion process will be described later.
 予測動きベクトル候補削除部122は、候補削除処理の後、リストmvpListLXに残った予測動きベクトルの候補を予測動きベクトル判定部123に与える。 The motion vector predictor candidate deletion unit 122 provides the motion vector predictor determination unit 123 with motion vector motion vector candidates remaining in the list mvpListLX after the candidate deletion processing.
 このようにして予測動きベクトル判定部123には、リストmvpListLXの中に残った予測動きベクトルの候補と、予測動きベクトル選択部125にて選択された、差分動きベクトルの発生符号量が最小となる最適予測動きベクトルmin_mvpとが入力される。 In this way, the motion vector predictor determination unit 123 minimizes the prediction motion vector candidates remaining in the list mvpListLX and the generated code amount of the difference motion vector selected by the motion vector predictor selection unit 125. The optimal prediction motion vector min_mvp is input.
 図8は、予測動きベクトル判定部123の判定処理を示すフローチャートである。最初にリストmvpListLXに残った予測動きベクトルの候補が1つであるかどうかを判定する(S900)。1つの場合、リストmvpListLXに残った予測動きベクトルの候補を予測動きベクトルmvpとして出力し、終了する。リストmvpListLXの中に予測動きベクトルの候補が1つより多く残った場合には、記録しておいた最適予測動きベクトルの候補min_mvpと同じ値を持つ予測動きベクトルの候補をリストmvpListLXから検出する(S901)。検出された予測動きベクトルの候補に該当するリストmvpListLXのインデックスmvp_idxを検出し(S902)、予測動きベクトルの候補min_mvpを予測動きベクトルmvpとして、インデックスmvp_idxとともに出力する。 FIG. 8 is a flowchart showing the determination process of the predicted motion vector determination unit 123. First, it is determined whether or not there is one motion vector predictor candidate remaining in the list mvpListLX (S900). In one case, the motion vector predictor candidates remaining in the list mvpListLX are output as motion vector predictors mvp, and the process ends. When more than one predicted motion vector candidate remains in the list mvpListLX, a predicted motion vector candidate having the same value as the recorded optimal predicted motion vector candidate min_mvp is detected from the list mvpListLX ( S901). The index mvp_idx of the list mvpListLX corresponding to the detected motion vector predictor candidate is detected (S902), and the motion vector candidate min_mvp is output as the motion vector predictor mvp together with the index mvp_idx.
 最後に減算部124は、動きベクトルmvと選択された予測動きベクトルmvpとの差分を計算し、差分動きベクトルmvdを出力する。 Finally, the subtraction unit 124 calculates a difference between the motion vector mv and the selected predicted motion vector mvp, and outputs a difference motion vector mvd.
 こうして出力された差分動きベクトルmvdと必要であれば予測動きベクトルを表すインデックスmvp_idxの符号化が行われ、差分動きベクトルmvdとインデックスmvp_idxの発生符号量とともに、動きベクトルmvにより参照される予測画像との動き補償から算出される差分画像の発生符号量とが加算された総発生符号量が算出される。また、こうした差分画像を符号化後に、画質評価の為に復号し、符号化により生じる元画像との誤差を表す比率として符号化歪が算出される。これら総発生符号量と符号化歪とを動き補償毎に比較することで、最も少ない発生符号量と符号化歪となる予測ブロックサイズが決定される。決定された予測ブロックサイズに対する動きベクトルmvに対して、上述した動きベクトルの予測方法が行われ、予測動きベクトルを表すインデックスが、予測ブロック単位の第2のシンタックスパターンで表されるフラグmvp_idx_lX[i]として符号化される。尚、ここで算出される発生符号量は、符号化過程をシミュレートしたものであることが望ましいが、後述の説明で使用する図24、図25に示した符号量で代用し、簡便に近似したり、概算することも可能である。 The difference motion vector mvd output in this way and the index mvp_idx representing the prediction motion vector are encoded if necessary, and the prediction image referred to by the motion vector mv together with the generated code amount of the difference motion vector mvd and the index mvp_idx The total generated code amount is calculated by adding the generated code amount of the difference image calculated from the motion compensation. Also, after encoding such a differential image, it is decoded for image quality evaluation, and the encoding distortion is calculated as a ratio representing an error from the original image generated by the encoding. By comparing the total generated code amount and the coding distortion for each motion compensation, the smallest generated code amount and the predicted block size that provides the coding distortion are determined. The motion vector prediction method described above is performed on the motion vector mv for the determined prediction block size, and the index mvp_idx_lX [in which the index representing the prediction motion vector is represented by the second syntax pattern in units of prediction blocks is used. i]. The generated code amount calculated here is preferably a simulation of the encoding process, but the code amount shown in FIGS. Or approximate.
 以上のようにして、パーティション毎に差分動きベクトルと必要であれば予測動きベクトルを表すインデックスを用いて動きベクトルを予測する本実施の形態の予測方法を使用する場合には、スライスヘッダーに記載される第1フラグmv_competition_flag、第2フラグmv_competition_temporal_flag及び第3フラグcollocated_from_l0_flagが設定され、符号化される。 As described above, when using the prediction method of the present embodiment in which a motion vector is predicted using a differential motion vector for each partition and an index representing a predicted motion vector if necessary, it is described in the slice header. The first flag mv_competition_flag, the second flag mv_competition_temporal_flag, and the third flag collocated_from_l0_flag are set and encoded.
 (復号における動きベクトルの予測)
 上述のシンタックスに基づき、符号化された動画像のビットストリームを復号する動画像復号装置において、本発明に係る動きベクトルの予測方法の動作を説明する。
(Prediction of motion vector in decoding)
The operation of the motion vector prediction method according to the present invention in the video decoding device that decodes the encoded video bitstream based on the above-described syntax will be described.
 最初に、可変長復号部201にて復号されるビットストリームの各フラグについて説明する。ビットストリームのスライスヘッダーの中に記述されているフラグから、スライスの中の予測ブロックに対して動きベクトルの予測方法を実施するか否かを判定する。スライスタイプがP或いはBの場合、フラグmv_competition_flagを判定し、mv_competition_flagが真(1)の場合は本発明に係る動きベクトルの予測方法が実施され、mv_competition_flagが偽(0)の場合は従来通りの手法で算出される。更にmv_competition_flagが真(1)の場合は、フラグmv_competition_temporal_flagにより、時間方向に異なるピクチャで処理対象のパーティションと同一位置のパーティションの動きベクトルの導出が実施される。スライスタイプがBで、且つmv_competition_flagが真(1)の場合は、フラグcollocated_from_l0_flagにより、処理対象のパーティションが含まれるピクチャの参照ピクチャのリストのうちL0予測或いはL1予測のどちらを使用するか選択する。 First, each flag of the bit stream decoded by the variable length decoding unit 201 will be described. It is determined from the flags described in the slice header of the bitstream whether or not to perform the motion vector prediction method for the prediction block in the slice. When the slice type is P or B, the flag mv_competition_flag is determined. When mv_competition_flag is true (1), the motion vector prediction method according to the present invention is performed. When mv_competition_flag is false (0), the conventional method is used. Is calculated by Further, when mv_competition_flag is true (1), the motion vector of the partition at the same position as the processing target partition in the picture different in the time direction is implemented by the flag mv_competition_temporal_flag. When the slice type is B and mv_competition_flag is true (1), the flag allocated_from_10_flag is used to select whether to use L0 prediction or L1 prediction from the reference picture list of the picture including the partition to be processed.
 次に予測ブロックのシンタックスの中から、予測ブロックの中のパーティション毎に、参照する予測動きベクトルの候補のリストのインデックスmvp_idx_lX[i]が読み出される。ここで、Xは0或いは1であり、iは予測ブロックの中のパーティション番号を表す。 Next, the index mvp_idx_lX [i] of the list of predicted motion vector candidates to be referenced is read out from the prediction block syntax for each partition in the prediction block. Here, X is 0 or 1, and i represents the partition number in the prediction block.
 実施の形態に係る動きベクトルの予測方法が実施される場合、図2の動画像復号装置の予測動きベクトル選択部208にて処理が行われる。図9は、実施の形態の動画像符号化装置に対応する図2の動画像復号装置の予測動きベクトル選択部208の詳細な構成を示す図である。図9の太枠線で囲まれる部分は予測動きベクトル選択部208を示している。更に、その内部の太点線で囲まれる部分は後述する動きベクトルの予測方法の動作部を示しており、対応する動画像符号化装置にも同様に設置され、符号化と復号で矛盾しない同一の判定結果を得られるようにしている。以下、この図を用いて、復号における動きベクトルの予測方法を説明する。 When the motion vector prediction method according to the embodiment is performed, the process is performed by the predicted motion vector selection unit 208 of the video decoding device in FIG. FIG. 9 is a diagram illustrating a detailed configuration of the motion vector predictor selection unit 208 of the video decoding device in FIG. 2 corresponding to the video encoding device according to the embodiment. A portion surrounded by a thick frame line in FIG. 9 indicates the motion vector predictor selection unit 208. Further, the part surrounded by the thick dotted line inside shows the operation part of the motion vector prediction method described later, which is also installed in the corresponding moving picture coding apparatus in the same way and has the same consistency between coding and decoding. Judgment results are obtained. Hereinafter, a motion vector prediction method in decoding will be described with reference to FIG.
 予測動きベクトル選択部208は、予測動きベクトル候補生成部220、予測動きベクトル候補同一判定部221、予測動きベクトル候補削除部222、予測動きベクトル判定部223、および加算部224を含む。 The predicted motion vector selection unit 208 includes a predicted motion vector candidate generation unit 220, a predicted motion vector candidate identity determination unit 221, a predicted motion vector candidate deletion unit 222, a predicted motion vector determination unit 223, and an addition unit 224.
 予測動きベクトル候補生成部220は、復号してメモリ207に記録されていた、復号対象ブロックと同一ピクチャ内の復号対象ブロックと隣接する復号済みのパーティション及び復号済みの異なるピクチャ内の復号対象ブロックと同一位置に存在するパーティション等の動きベクトルをメモリ207から読み出す。 The motion vector predictor candidate generation unit 220 decodes and records the decoded target block in the same picture as the decoding target block and the decoded partition adjacent to the decoding target block and the decoding target block in a different decoded picture recorded in the memory 207. A motion vector such as a partition existing at the same position is read from the memory 207.
 予測動きベクトル候補生成部220は、このようにしてメモリ207から読み出された復号済みの他のブロックの動きベクトルから少なくとも2つ以上の予測動きベクトルの候補mvpListLX[i](iはリストmvpListLXにふられたインデックス)を生成し、予測動きベクトルの候補を格納するリストmvpListLXに格納する。 The motion vector predictor candidate generation unit 220 in this way reads at least two motion vector candidates mvpListLX [i] (i is a list mvpListLX) from the motion vectors of other decoded blocks read from the memory 207. And the stored index mvpListLX is stored.
 次に、予測動きベクトル候補同一判定部221は、リストmvpListLXに格納された予測動きベクトルの候補の中から同一の動きベクトルの値をもつものを判定し、同一の動きベクトル値をもつと判定された予測動きベクトルの候補について一つを残してそれ以外をリストmvpListLXから削除して、予測動きベクトルの候補が重複しないようにし、リストmvpListLXを更新する。予測動きベクトル候補同一判定部221は、更新されたリストmvpListLXを予測動きベクトル候補削除部222に与える。 Next, the motion vector predictor candidate determination unit 221 determines a motion vector predictor candidate having the same motion vector value from the motion vector predictor candidates stored in the list mvpListLX, and determines that the motion vector value is the same. One of the predicted motion vector candidates is left, and the rest are deleted from the list mvpListLX so that the predicted motion vector candidates do not overlap, and the list mvpListLX is updated. The motion vector predictor candidate identity determination unit 221 provides the updated list mvpListLX to the motion vector predictor candidate deletion unit 222.
 可変長復号部201にて復号された差分動きベクトルmvdが予測動きベクトル候補削除部222に入力される。予測動きベクトルのインデックスを示すmvp_idxが符号化されている場合は、可変長復号部201にて復号された予測動きベクトルのインデックスmvp_idxが予測動きベクトル判定部223に入力される。 The difference motion vector mvd decoded by the variable length decoding unit 201 is input to the predicted motion vector candidate deletion unit 222. When mvp_idx indicating the prediction motion vector index is encoded, the prediction motion vector index mvp_idx decoded by the variable length decoding unit 201 is input to the prediction motion vector determination unit 223.
 予測動きベクトル候補削除部222は、更新されたリストmvpListLXの中の予測動きベクトルの候補と可変長復号部201にて復号された差分動きベクトルmvdを受け取り、予測動きベクトルの候補の削除処理により、リストmvpListLXから一部の予測動きベクトルの候補を削除する。 The motion vector predictor candidate deletion unit 222 receives the motion vector predictor candidates in the updated list mvpListLX and the differential motion vector mvd decoded by the variable length decoding unit 201, and performs a motion vector candidate deletion process. Delete some motion vector predictor candidates from the list mvpListLX.
 具体的には、予測動きベクトル候補削除部222は、予測動きベクトルの候補の一つを仮の予測動きベクトルと設定し、復号された第1の差分動きベクトルmvdと仮の予測動きベクトルとを加算して仮の動きベクトルを生成し、その仮の動きベクトルと、仮の予測動きベクトルとは異なる予測動きベクトルの候補とから第2の差分動きベクトルを計算し、第1の差分動きベクトルmvdの符号量よりも第2の差分動きベクトルの符号量が小さい場合、仮の予測動きベクトルは真の予測動きベクトルではないと判定し、仮の予測動きベクトルとして設定された予測動きベクトルの候補を削除する。第1の差分動きベクトルmvdの符号量と第2の差分動きベクトルの符号量が同じであれば、予測動きベクトルの候補のインデックスの小さい方を選択し、他方を削除する。予測動きベクトルの候補の削除処理の詳細は後述する。 Specifically, the predicted motion vector candidate deletion unit 222 sets one of the predicted motion vector candidates as a temporary predicted motion vector, and uses the decoded first difference motion vector mvd and the temporary predicted motion vector. A temporary motion vector is generated by addition, a second differential motion vector is calculated from the temporary motion vector and a predicted motion vector candidate different from the temporary predicted motion vector, and the first differential motion vector mvd If the code amount of the second difference motion vector is smaller than the code amount of the tentative motion vector, it is determined that the temporary motion vector predictor is not a true motion vector predictor, delete. If the code amount of the first differential motion vector mvd and the code amount of the second differential motion vector are the same, the smaller one of the predicted motion vector candidate indexes is selected, and the other is deleted. Details of the motion vector candidate deletion process will be described later.
 予測動きベクトル候補削除部222は、候補削除処理の後、リストmvpListLXに残った予測動きベクトルの候補を予測動きベクトル判定部223に与える。 The motion vector predictor candidate deletion unit 222 gives the motion vector predictor determination unit 223 the motion vector predictor candidates remaining in the list mvpListLX after the candidate deletion processing.
 このようにして予測動きベクトル判定部223には、リストmvpListLXの中に残った予測動きベクトルの候補が入力され、予測動きベクトルのインデックスを示すmvp_idxが符号化されていた場合は、復号された予測動きベクトルのインデックスmvp_idxも入力される。 In this way, the motion vector predictor determination unit 223 receives the motion vector predictor candidates remaining in the list mvpListLX, and if mvp_idx indicating the motion vector predictor index is encoded, the predicted motion vector is decoded. A motion vector index mvp_idx is also input.
 図10は、予測動きベクトル判定部223の判定処理を示すフローチャートである。最初にリストmvpListLXに残った予測動きベクトルの候補が1つであるかどうかを判定する(S910)。1つの場合、リストmvpListLXに残った予測動きベクトルの候補を予測動きベクトルmvpとして出力する。リストmvpListLXの中に予測動きベクトルの候補が1つより多く残った場合、可変長復号部201にて復号された予測動きベクトルのインデックスmvp_idxが読み込まれる(S911)。読み込まれたインデックスmvp_idxに該当する予測動きベクトルの候補をリストmvpListLXから検出する(S912)。検出された予測動きベクトルの候補を予測動きベクトルmvpとして出力する。 FIG. 10 is a flowchart showing the determination process of the predicted motion vector determination unit 223. First, it is determined whether or not there is one candidate motion vector predictor remaining in the list mvpListLX (S910). In one case, the prediction motion vector candidates remaining in the list mvpListLX are output as the prediction motion vector mvp. When more than one motion vector candidate remains in the list mvpListLX, the motion vector index mvp_idx decoded by the variable length decoding unit 201 is read (S911). A motion vector predictor candidate corresponding to the read index mvp_idx is detected from the list mvpListLX (S912). The detected motion vector predictor candidate is output as a motion vector predictor mvp.
 最後に加算部224は、差分動きベクトルmvdと予測動きベクトルmvpとの加算を計算し、動きベクトルmvを出力する。 Finally, the addition unit 224 calculates the addition of the difference motion vector mvd and the predicted motion vector mvp, and outputs the motion vector mv.
 以上のようにして、パーティション毎に動きベクトルが算出される。この動きベクトルを使用して動き補償により予測画像が生成され、ビットストリームから復号された残差信号と加算されることで復号画像が生成される。 As described above, a motion vector is calculated for each partition. A prediction image is generated by motion compensation using this motion vector, and a decoded image is generated by adding the prediction image to the residual signal decoded from the bit stream.
 尚、予測動きベクトル選択部208の中の予測動きベクトル候補生成部220、予測動きベクトル候補同一判定部221及び予測動きベクトル候補削除部222は、符号化側の予測動きベクトル選択部111の中の予測動きベクトル候補生成部210、予測動きベクトル候補同一判定部211及び予測動きベクトル候補削除部212とそれぞれ同じである。 The predicted motion vector candidate generation unit 220, the predicted motion vector candidate identity determination unit 221 and the predicted motion vector candidate deletion unit 222 in the predicted motion vector selection unit 208 are included in the predicted motion vector selection unit 111 on the encoding side. The prediction motion vector candidate generation unit 210, the prediction motion vector candidate identity determination unit 211, and the prediction motion vector candidate deletion unit 212 are the same.
 (動きベクトルの予測方法)
 実施の形態に係る動きベクトルの予測方法はパーティション単位に図11(a)、図11(b)に示される諸過程で実施される。図11(a)は動画像符号化装置の予測動きベクトル選択部111及び動画像復号装置の予測動きベクトル選択部208とで共通する機能を有する予測動きベクトル候補生成部120及び220、予測動きベクトル候補同一判定部121及び221、ならびに予測動きベクトル候補削除部122及び222の処理の流れを表すフローチャートである。図11(b)は予測動きベクトル候補生成部120及び220による予測動きベクトル候補の生成の一例を示すフローチャートであり、図11(a)の[予測動きベクトルの候補を算出(S90)]の処理の詳細な流れを示すものである。以下、諸過程を順を追って説明する。
(Motion vector prediction method)
The motion vector prediction method according to the embodiment is performed in the various processes shown in FIGS. 11A and 11B in units of partitions. FIG. 11A shows prediction motion vector candidate generation units 120 and 220 having functions common to the prediction motion vector selection unit 111 of the video encoding device and the prediction motion vector selection unit 208 of the video decoding device, and prediction motion vectors. It is a flowchart showing the flow of processing of candidate identity determination units 121 and 221 and motion vector predictor candidate deletion units 122 and 222. FIG. 11B is a flowchart showing an example of generation of motion vector predictor candidates by the motion vector predictor candidate generation units 120 and 220, and processing of [Calculate motion vector predictor candidates (S90)] in FIG. This shows the detailed flow. Hereinafter, the processes will be described in order.
 [隣接する周囲のパーティションから予測動きベクトルの候補を導出(S100)]
 この処理における入力は、
・予測ブロックのパーティションのパーティション番号puPartIdx、および
・予測ブロックのパーティションの参照ピクチャ番号refIdxLX(Xは0或いは1)
であり、参照ピクチャ番号refIdxLXは、複数の参照ピクチャの候補からブロック単位に任意のピクチャを参照して動き補償を行うことから、参照ピクチャを指定するために各ピクチャに割り当てた識別番号である。
[Deriving Predicted Motion Vector Candidates from Adjacent Surrounding Partitions (S100)]
The input in this process is
The partition number puPartIdx of the partition of the prediction block, and the reference picture number refIdxLX of the partition of the prediction block (X is 0 or 1)
The reference picture number refIdxLX is an identification number assigned to each picture to designate a reference picture because motion compensation is performed by referring to an arbitrary picture block by block from a plurality of reference picture candidates.
 参照ピクチャ番号には参照するピクチャの復号順序或いは表示順序が割り当てられ、符号化及び復号の際には参照ピクチャ番号からピクチャの順序を指定して参照する。添え字LXは動き補償を行う予測方向を表し、Xには0或いは1が入る。主としてL0予測は前方向予測に、L1予測は後方向予測として使用され、PスライスではL0予測のみ、BスライスではL0、L1の両方の予測が使用出来る。以降の処理において出力に添え字LXが付いている値に対しては、予測ごとに処理を行うことを前提とし、特に説明しないこととする。 The reference picture number is assigned the decoding order or display order of the picture to be referred to, and the picture order is designated from the reference picture number for encoding and decoding. The subscript LX represents the prediction direction in which motion compensation is performed, and 0 or 1 is entered in X. L0 prediction is mainly used for forward prediction and L1 prediction is used for backward prediction. Only the L0 prediction can be used for the P slice, and both the L0 and L1 predictions can be used for the B slice. In the subsequent processing, values with a subscript LX in the output are assumed to be processed for each prediction and will not be described in particular.
 この処理における出力は
・周囲のパーティションの動きベクトルmvLXM、および
・周囲のパーティションが有効か否かを示すフラグavailableFlagLXM
であり、添え字Xには予測方向を表す0若しくは1、Mには隣接するパーティション群の領域を表すA,B若しくはCが入る。
The output in this processing is: • The motion vector mvLXM of the surrounding partition, and • The flag availableFlagLXM indicating whether or not the surrounding partition is valid
Subscript X is 0 or 1 indicating the prediction direction, and M is A, B or C indicating the area of the adjacent partition group.
 図12に示されるように、同一ピクチャ内の符号化ブロック内部を動き補償する為に定義される予測ブロックのパーティション(図12中の処理対象のパーティション)に隣接する周囲のパーティションから予測動きベクトルの候補を導出する。図12中の太点線の円内で表される領域を拡大したものが図13である。 As shown in FIG. 12, the prediction motion vector is calculated from the surrounding partition adjacent to the partition of the prediction block (partition to be processed in FIG. 12) defined for motion compensation within the coding block in the same picture. Derive candidates. FIG. 13 is an enlarged view of the area represented by the thick dotted circle in FIG.
 図13は、処理対象のパーティションとそれに隣接するパーティションを示す。予測動きベクトルの候補は、処理対象のパーティションの左側に隣接するパーティションAk(k=0,…,nA-1)から構成されるパーティション群A、真上に隣接するパーティションBk(k=0,…,nB-1)から構成されるパーティション群B、及びコーナーで隣接するパーティションC0,C1,C2から構成されるパーティション群Cの3つのパーティション群からそれぞれ予測動きベクトルの候補を選出する。ここで、nAは左に隣接するパーティション群の総数、nBは真上に隣接するパーティション群の総数を表す。 FIG. 13 shows a partition to be processed and a partition adjacent to it. Predicted motion vector candidates are a partition group A composed of a partition Ak (k = 0,..., NA-1) adjacent to the left side of the partition to be processed, and a partition Bk (k = 0,. , NB-1), and a motion vector predictor candidate are selected from each of the three partition groups, that is, the partition group B configured by nB-1) and the partition group C configured by the partitions C0, C1, and C2 adjacent at the corner. Here, nA represents the total number of partition groups adjacent to the left, and nB represents the total number of partition groups adjacent immediately above.
 最初に図14を用いて、左側に隣接するパーティション群Aからの予測動きベクトルの候補mvLXAの選出を説明する。 First, with reference to FIG. 14, the selection of a predicted motion vector candidate mvLXA from the partition group A adjacent on the left side will be described.
 図14の変数M=Aとして、以下の手順で処理する。 Suppose that variable M = A in FIG.
 まず、パーティション群Aの中のパーティション数nAがカウントされる(S101)。 First, the number of partitions nA in the partition group A is counted (S101).
 次に、パーティション群Aから予測動きベクトルが選出されるか否かを示すフラグavailableFlagLXAを0、パーティション群Aを代表する動きベクトルmvLXAを0、左側に隣接するパーティションを上から順にカウントするカウンタkを0に設定する(S102)。 Next, a flag availableFlagLXA indicating whether or not a motion vector predictor is selected from the partition group A is set to 0, a motion vector mvLXA representing the partition group A is set to 0, and a counter k that counts the left adjacent partitions in order from the top is set. It is set to 0 (S102).
 パーティション群Aを含む最大符号化ブロックの位置を検出する(S103)。 The position of the maximum coding block including the partition group A is detected (S103).
 最大符号化ブロックが有効でない場合、例えば処理対象のパーティションを含む最大符号化ブロックが画面左端に位置する場合、パーティション群Aを含む最大符号化ブロックは存在しないので、S102にて設定された初期状態のavailableFlagLXA、mvLXAを出力し、終了する(S104)。 When the maximum encoding block is not valid, for example, when the maximum encoding block including the partition to be processed is located at the left end of the screen, there is no maximum encoding block including the partition group A, so the initial state set in S102 The availableFlagLXA and mvLXA are output and the process ends (S104).
 一方、有効な場合は隣接するパーティション群AのパーティションAkの情報を取得する(S105)。 On the other hand, if it is valid, information on the partition Ak of the adjacent partition group A is acquired (S105).
 パーティションAkと処理対象のパーティションの情報を比較する(S106)。パーティションAkの符号化モードがイントラでなく、且つ処理対象のパーティションの参照ピクチャ番号が同じ場合、フラグavailableFlagLXAを1に設定する(S107)。 The information of the partition Ak and the partition to be processed is compared (S106). If the coding mode of the partition Ak is not intra and the reference picture number of the partition to be processed is the same, the flag availableFlagLXA is set to 1 (S107).
 フラグavailableFlagLXAの判定を行う(S108)。フラグavailableFlagLXAが1の場合、パーティションAkの動きベクトルをmvLXAに設定する(S109)。availableFlagLXAが0の場合、カウンタkを1加算して更新する(S110)。カウンタkがパーティション群Aの総数nAと同じになったら、処理を終了する。そうでない場合は、パーティション群Aの中で次のパーティションに対してS103以降の処理を継続する(S111)。 The flag availableFlagLXA is determined (S108). When the flag availableFlagLXA is 1, the motion vector of the partition Ak is set to mvLXA (S109). When availableFlagLXA is 0, the counter k is incremented by 1 and updated (S110). When the counter k becomes equal to the total number nA of the partition group A, the process is terminated. Otherwise, the processing after S103 is continued for the next partition in the partition group A (S111).
 上側に隣接するパーティション群Bから予測動きベクトルの候補mvLXBの選出する場合、パーティション群Aと同様の処理手順で選出可能である。 When selecting the motion vector candidate mvLXB from the partition group B adjacent on the upper side, it can be selected by the same processing procedure as the partition group A.
 S103及びS104にてパーティション群Bを含む最大符号化ブロックの位置を検出し、その最大符号化ブロックが有効か否かを判定する点、S110にてパーティション群Bは左端を0とし右に向かって順にカウンタkを更新していく点が異なっており、最終的にフラグavailableFlagLXB及びmvLXBを出力する。 In S103 and S104, the position of the maximum coding block including the partition group B is detected and it is determined whether or not the maximum coding block is valid. In S110, the partition group B sets the left end to 0 and moves to the right. The difference is that the counter k is updated in order, and finally the flags availableFlagLXB and mvLXB are output.
 処理対象のパーティションのコーナーで隣接するパーティションC0,C1,C2から構成されるパーティション群Cから予測動きベクトルの候補mvLXCの選出も同様である。 The same applies to the selection of a predicted motion vector candidate mvLXC from a partition group C composed of partitions C0, C1, and C2 adjacent at the corner of the partition to be processed.
 以上のようにして、各パーティション群A,B,Cに対するフラグavailableFlagLXMと予測動きベクトルの候補mvLXM(MはA,B,C)が出力される。 As described above, the flag availableFlagLXM and the predicted motion vector candidate mvLXM (M is A, B, C) for each partition group A, B, C are output.
 [予測動きベクトルの候補の中央値を導出(S200)]
 この処理の入力は
・周辺パーティションの動きベクトルmvLXM(MはA,B,C)、および
・フラグavailableFlagLXM(MはA,B,C)
であり、この処理の出力は予測動きベクトルの中央値mvLXMedである。
[Deriving median predicted motion vector candidates (S200)]
The input of this process is: • Motion vector mvLXM (M is A, B, C) of peripheral partition • Flag availableFlagLXM (M is A, B, C)
The output of this processing is the median value mvLXMed of the predicted motion vector.
 図15を用いて処理の流れを説明する。最初に、全てのフラグavailableFlagLXM(MはA,B,C)の判定が行われ(S201)、全てのフラグavailableFlagLXMが0の場合、mvLXMedは(0,0)に設定される(S202)。 The process flow will be described with reference to FIG. First, all the flags availableFlagLXM (M is A, B, C) are determined (S201). If all the flags availableFlagLXM are 0, mvLXMed is set to (0, 0) (S202).
 次に、availableFlagLXM(MはA,B,C)の中で1つだけが1である場合(S203)、そのavailableFlagLXMに該当する動きベクトルmvLXMを予測動きベクトルmvLXMedとする(S204)。 Next, when only one of the availableFlagLXM (M is A, B, C) is 1 (S203), the motion vector mvLXM corresponding to the availableFlagLXM is set as a predicted motion vector mvLXMed (S204).
 上記の条件でない場合、動きベクトルmvLXA,mvLXB及びmvLXCのx及びy成分ごとに中央値を算出し、予測動きベクトルの中央値mvLXMedとする(S205)。 Otherwise, the median value is calculated for each of the x and y components of the motion vectors mvLXA, mvLXB, and mvLXC, and is set as the median value mvLXMed of the predicted motion vector (S205).
 [予測動きベクトルの候補のリストを作成(S300)]
 S100及びS200にて生成された予測動きベクトルの候補mvLXM(M=A,B,C)及びmvLXMedは予測動きベクトルの候補のリストmvpListLXに格納される。リストmvpListLXは、PC等の装置内部のメモリ或いはメモリの一部を記憶領域として設けられたり、プログラム実行時にメモリ上に記憶領域として割り当てられることで設定される。リストmvpListLXは図16に示されるように配列構造を成し、リスト内部の所在を示すインデックスと、インデックスに対応する予測動きベクトルの候補を格納する記憶領域が設けられている。インデックスの数字は0から開始され、リストmvpListLXの記憶領域に、mvLXMed,mvLXA,mvLXB,mvLXCの順で予測動きベクトルの候補が格納される。尚、インデックス4の記憶領域には後述する時間方向の予測動きベクトルの候補が格納される。以降の処理では、リストmvpListLXに記録されたインデックスkの予測動きベクトルの候補は、mvpListLX[k]で表すこととし、リストmvpListLXとは配列表記をすることで区別することとする。
[Predicting motion vector candidate list (S300)]
The predicted motion vector candidates mvLXM (M = A, B, C) and mvLXMed generated in S100 and S200 are stored in the predicted motion vector candidate list mvpListLX. The list mvpListLX is set by providing a memory inside a device such as a PC or a part of the memory as a storage area, or by assigning it as a storage area on the memory when executing a program. The list mvpListLX has an array structure as shown in FIG. 16, and is provided with an index indicating the location in the list and a storage area for storing a candidate for a motion vector predictor corresponding to the index. The index number starts from 0, and motion vector candidates are stored in the storage area of the list mvpListLX in the order of mvLXMed, mvLXA, mvLXB, mvLXC. In addition, in the storage area of the index 4, a candidate for a motion vector predictor in the time direction to be described later is stored. In the subsequent processing, the motion vector predictor candidate of index k recorded in the list mvpListLX is represented by mvpListLX [k], and is distinguished from the list mvpListLX by array notation.
 [時間方向の予測動きベクトルの候補を導出(S400)]
 この処理における入力は
・予測ブロックのパーティションのパーティション番号puPartIdx、および
・予測ブロックのパーティションの参照ピクチャ番号refIdxLX(Xは0 或いは1)
であり、出力は
・予測ブロックのパーティションと同位置の他ピクチャのパーティションの動きベクトルmvLXCol、および
・予測ブロックのパーティションと同位置の他ピクチャのパーティションが有効か否かを示すフラグavailableFlagLXCol
である。
[Deriving candidate motion vector in time direction (S400)]
Inputs in this process are: the partition number puPartIdx of the partition of the prediction block, and the reference picture number refIdxLX of the partition of the prediction block (X is 0 or 1)
And the output is a motion vector mvLXCol of a partition of another picture at the same position as the partition of the prediction block, and a flag availableFlagLXCol indicating whether the partition of another picture at the same position as the partition of the prediction block is valid
It is.
 まず、処理対象のパーティションが含まれるスライスのスライス・タイプ及び処理対象のパーティションが含まれるピクチャの参照ピクチャのリストのうちL0予測或いはL1予測のどちらを使用するかを決定するフラグcollocated_from_l0_flagに基づき、導出処理が場合分けされる。図17に示されるように最初にスライス・タイプについて判定される(S401)。スライス・タイプがBでない場合、即ちPである場合はCase3の処理が行われる。スライス・タイプがBである場合は、更にフラグcollocated_from_l0_flagの値について判定される(S402)。 First, derivation based on the slice type of the slice including the processing target partition and the flag collocated_from_10_flag that determines whether to use L0 prediction or L1 prediction from the list of reference pictures of the picture including the processing target partition. Processing is divided into cases. As shown in FIG. 17, first, the slice type is determined (S401). When the slice type is not B, that is, when it is P, Case 3 processing is performed. If the slice type is B, the value of the flag correlated_from_10_flag is further determined (S402).
 collocated_from_l0_flag=1の場合、L0予測が使用されるCase1の処理が実行され、collocated_from_l0_flag=0の場合、L1予測が使用されるCase2の処理が実行される。 In the case of collocated_from_10_flag = 1, the Case1 process in which L0 prediction is used is executed, and in the case of collocated_from_10_flag = 0, the Case2 process in which L1 prediction is used is executed.
 図18で示される一例及び図21のフローチャートを用いて、Case1について説明する。図18で示されるように、処理対象のパーティションが含まれるピクチャをcurrentPicで表し、currentPicのL0予測で最も小さい参照ピクチャ番号の参照ピクチャをColPicとする(S411)。 Case 1 will be described using the example shown in FIG. 18 and the flowchart of FIG. As shown in FIG. 18, the picture including the partition to be processed is represented by currentPic, and the reference picture having the smallest reference picture number in the current picture L0 prediction is ColPic (S411).
 通常ColPicはピクチャの表示順序でcurrentPicの前方の一番近い参照ピクチャとなり、図18で示されるようにcurrentPicよりも過去の位置に設定される。 Ordinarily, ColPic is the closest reference picture in front of currentPic in the picture display order, and is set to a past position as compared to currentPic as shown in FIG.
 次に、処理対象のパーティションと同じ空間位置にある、ColPicのパーティションの位置情報を設定する。処理対象のパーティションと同じ最大符号化ブロックのアドレス、予測ブロックのインデックス及びパーティション番号がそれぞれ設定される(S412)。 Next, set the location information of the ColPic partition at the same spatial location as the partition to be processed. The address of the largest encoding block, the index of the prediction block, and the partition number that are the same as the partition to be processed are set (S412).
 処理対象のパーティションと同じ空間位置に設定されたColPicのパーティションの符号化モードに応じて処理を場合分けする(S413)。符号化モードがイントラの場合、時間方向の動きベクトルmvLXColの各x,y成分を0、フラグavailableFlagLXColを0として出力し、処理を終了する(S414)。符号化モードがイントラでない場合、LY予測の有効フラグpredFlagLYCol、LY予測の動きベクトルmvCol及び参照ピクチャ番号refIdxColが設定される(S415)。記号Yは記号Xと同様に予測方向を表し、ここでは処理対象のパーティションと同じ空間位置に設定されたColPicのパーティションのL1予測の動き情報が設定される、即ち
 predFlagL1Col=predFlagL1[puPartIdxCol]
 mvCol=mvL1[puPartIdxCol]
 refIdxCol=refIdxL1[puPartIdxCol]
がそれぞれ設定され、図18で示されるように、処理対象のパーティションと同じ空間位置に設定されたColPicのパーティションから参照ピクチャ番号refIdxColに該当するピクチャを参照ピクチャへの動きベクトルmvColが求められる。
The process is divided according to the encoding mode of the ColPic partition set in the same spatial position as the partition to be processed (S413). If the encoding mode is intra, the x and y components of the motion vector mvLXCol in the time direction are output as 0, and the flag availableFlagLXCol is output as 0, and the process ends (S414). If the coding mode is not intra, the LY prediction valid flag predFlagLYCol, the LY prediction motion vector mvCol, and the reference picture number refIdxCol are set (S415). The symbol Y represents the prediction direction in the same manner as the symbol X. Here, motion information of L1 prediction of the ColPic partition set in the same spatial position as the partition to be processed is set, that is, predFlagL1Col = predFlagL1 [puPartIdxCol].
mvCol = mvL1 [puPartIdxCol]
refIdxCol = refIdxL1 [puPartIdxCol]
As shown in FIG. 18, a motion vector mvCol for a picture corresponding to the reference picture number refIdxCol is obtained from the ColPic partition set at the same spatial position as the processing target partition.
 フラグpredFlagL1Colの判定を行う(S416)。predFlagL1Col=0の場合、即ちL1予測が存在しない場合、時間方向の動きベクトルmvLXColの各x,y成分を0、フラグavailableFlagLXColを0として出力し、処理を終了する(S414)。 The flag predFlagL1Col is determined (S416). When predFlagL1Col = 0, that is, when there is no L1 prediction, the x and y components of the motion vector mvLXCol in the time direction are output as 0, and the flag availableFlagLXCol is output as 0, and the process ends (S414).
 predFlagL1Col=1の場合、availableFlagLXColが1に設定され(S417)、mvColから時間方向の動きベクトルmvLXColが求められる。 When predFlagL1Col = 1, availableFlagLXCol is set to 1 (S417), and a motion vector mvLXCol in the time direction is obtained from mvCol.
 図18に示されるように、ColPicと参照ピクチャ番号refIdxColで示される参照ピクチャまでの距離をrdとし、一方、currentPic とcurrentPicの処理対象のパーティションの参照ピクチャ番号refIdxLXで示される参照ピクチャとの距離をrbX(Xは0或いは1)とする。ここで、距離rdとrbXとの比較を行う(S418)。rdとrbXが同じ場合、mvLXColをmvColとして出力し、終了する(S419)。rdとrbXが異なる場合、距離rdに対するrbXの倍率によって求めることが出来、次式で表される(S420)。 As shown in FIG. 18, the distance between the ColPic and the reference picture indicated by the reference picture number refIdxCol is rd, while the distance between the current picture and the reference picture indicated by the reference picture number refIdxLX of the partition to be processed by the currentPic is It is assumed that rbX (X is 0 or 1). Here, the distance rd and rbX are compared (S418). If rd and rbX are the same, mvLXCol is output as mvCol, and the process ends (S419). When rd and rbX are different, it can be obtained by the magnification of rbX with respect to distance rd, and is expressed by the following equation (S420).
 mvLXCol=mvCol×rbX/rd
 ここで、mvColと予測方向が同じ場合、mvLXColと正負符号は同じとなり、予測方向が逆向きの場合、mvLXColの正負符号は逆になる。
mvLXCol = mvCol × rbX / rd
Here, when the prediction direction is the same as mvCol, the sign of mvLXCol is the same as that of mvLXCol. When the prediction direction is reverse, the sign of mvLXCol is opposite.
 以上のようにして、時間方向の動きベクトルmvLXColが出力される。 As described above, the motion vector mvLXCol in the time direction is output.
 次に、図19を用いてCase2について説明する。図19で示されるように、Case1との違いはcurrentPicのL1予測で最も小さい参照ピクチャ番号の参照ピクチャをColPicとする点である。その為、Case2はCase1の場合に対して、currentPicを中心にして時間軸を反転することと同等となるだけで、基本的な考え方はCase1と同じである。 Next, Case 2 will be described with reference to FIG. As shown in FIG. 19, the difference from Case 1 is that the reference picture with the smallest reference picture number in the current Pic L1 prediction is ColPic. Therefore, Case 2 is the same as Case 1 except that Case 2 is equivalent to reversing the time axis centering on currentPic.
 具体的には、図21に示されるフローチャートにおいて、S415において、各変数の設定先が処理対象のパーティションと同じ空間位置に設定されたColPicのパーティションのL0予測の動き情報となる点、S420におけるピクチャ間距離の換算により出力されるmvLXColの正負符号がL0予測を正とする点が異なる。 Specifically, in the flowchart shown in FIG. 21, in S415, the setting destination of each variable becomes the L0 prediction motion information of the ColPic partition set at the same spatial position as the processing target partition, the picture in S420 The difference is that the sign of mvLXCol output by conversion of the inter-distance makes the L0 prediction positive.
 Case3はCase1及びCase2の事例とは異なり、L0予測のみの場合であり、図20に示されるように、currentPicよりも時間的に過去のピクチャのパーティションのL0予測の動きベクトルを使用して、mvLXColを求めるものである(この場合、Xは0のみとなる)。図21のフローチャートでは、S411においてcurrentPicのL0予測で最も小さい参照ピクチャ番号の参照ピクチャをColPicとする点、S415及において各変数の設定先が処理対象のパーティションと同じ空間位置に設定されたColPicのパーティションのL0予測の動き情報となる点、S420におけるピクチャ間距離の換算により出力されるmvLXColがL0予測のみとする点が異なるだけで、基本的な処理はCase1と同様である。 Case 3 is different from Case 1 and Case 2 in the case of only L0 prediction. As shown in FIG. 20, mvLXCol is used by using a motion vector of L0 prediction of a past picture partition temporally than currentPic. (In this case, X is only 0). In the flowchart of FIG. 21, the reference picture with the smallest reference picture number in the current Pic L0 prediction is set to ColPic in S411, and the setting destination of each variable is set to the same spatial position as the processing target partition in S415 and The basic process is the same as in Case 1 except that it becomes motion information for L0 prediction of the partition and that mvLXCol output by conversion of the inter-picture distance in S420 is only L0 prediction.
 以上のようにして、時間方向の動きベクトルmvLXColが求められ、予測動きベクトルの候補のリストmvpListLXのインデックス4の記憶領域にmvLXColが格納される。 As described above, the motion vector mvLXCol in the time direction is obtained, and mvLXCol is stored in the storage area of index 4 in the list of predicted motion vector candidates mvpListLX.
 [処理対象のパーティションのサイズに基づき、予測動きベクトルの候補を入れ換え(S500)]
 次の条件のうち1つでも当てはまれば、mvLXMedはmvpListLXの順序の中でmvLXNに置き換えられる。
・処理対象のパーティションを含む予測ブロックの符号化サイズがPART_2NxN、PART_2NxnU、PART_2NxnDのうち1つである場合:
 puPartIdxが0のパーティションの場合、mvLXN=mvLXBに設定される。それ以外のパーティションは、mvLXN=mvLXAに設定される。
・処理対象のパーティションを含む予測ブロックの符号化サイズがPART_Nx2N、PART_nLx2N、PART_nRx2Nのうち1つである場合:
 puPartIdxが0のパーティションの場合、mvLXN=mvLXAに設定される。それ以外のパーティションは、mvLXN=mvLXBに設定される。
[Replace the motion vector candidates based on the size of the partition to be processed (S500)]
If one of the following conditions is true, mvLXMed is replaced with mvLXN in the order of mvpListLX.
When the encoding size of the prediction block including the partition to be processed is one of PART_2NxN, PART_2NxnU, and PART_2NxnD:
In the case of a partition whose puPartIdx is 0, mvLXN = mvLXB is set. Other partitions are set to mvLXN = mvLXA.
When the encoding size of the prediction block including the partition to be processed is one of PART_Nx2N, PART_nLx2N, and PART_nRx2N:
In the case of a partition whose puPartIdx is 0, mvLXN = mvLXA is set. Other partitions are set to mvLXN = mvLXB.
 [リストの中の同じの値を持つ予測動きベクトルの候補を削除(S600)]
 予測動きベクトルの候補のリストmvpListLXの中で、同じ動きベクトルの値を持つ予測動きベクトルの候補が存在する場合、リストmvpListLXの中で最も小さいインデックスを持つ予測動きベクトルの候補を除いて全て削除される。削除処理の終了後、リストmvpListLXの中は、削除された予測動きベクトルの候補の格納領域が空いている為、インデックス0を基準にして、インデックスが小さい予測動きベクトルの候補の順で詰めていく。例えば、インデックス1,4の予測動きベクトルの候補が削除され、インデックス0,2及び3が残った場合、インデックス0はそのままとして、インデックス2の予測動きベクトルの候補をインデックス1の格納領域に移動し、インデックス3の予測動きベクトルの候補をインデックス2の格納領域に移動して、リストmvpListLXの中を更新する。
[Delete predicted motion vector candidates having the same value in the list (S600)]
If there are prediction motion vector candidates having the same motion vector value in the list of prediction motion vector candidates mvpListLX, all of them are deleted except for the prediction motion vector candidate having the smallest index in the list mvpListLX. The After the deletion process is completed, the list mvpListLX has a storage area for the deleted motion vector predictor candidates deleted, and therefore, the index 0 is used as a reference and the motion vector motion vector candidates with smaller indexes are packed in order. . For example, when the motion vector predictor candidates at indexes 1 and 4 are deleted and the indexes 0, 2 and 3 remain, the motion vector predictor candidates at index 2 are moved to the storage area for index 1 while index 0 remains unchanged. Then, the motion vector candidate of index 3 is moved to the storage area of index 2, and the list mvpListLX is updated.
 [差分動きベクトルに基づき、リストの中の予測動きベクトルの候補を削除(S700)]
 この処理の入力は
・予測動きベクトルの候補のリストmvpListLX、および
・差分動きベクトルmvdLX
であり、この処理の出力は修正された予測動きベクトルの候補のリストmvpListLXである。
[Delete predicted motion vector candidates in list based on differential motion vector (S700)]
The input of this process is: • list of predicted motion vector candidates mvpListLX, • differential motion vector mvdLX
And the output of this process is a list of modified motion vector predictor candidates mvpListLX.
 図22(a)~(c)を用いて、基本的な予測動きベクトルの候補の削除方法を説明する。ここでは、予測動きベクトルの候補のリストmvpListLXの中に3つの候補が残っていることとし、説明の便宜上、mvpListLXの3つの予測動きベクトルの候補をmvp1、mvp2及びmvp3とする。図22の実線矢印で示されるように、左から順に予測動きベクトルの候補mvp1、mvp2及びmvp3とする。 A basic prediction motion vector deletion method will be described with reference to FIGS. 22 (a) to 22 (c). Here, it is assumed that three candidates remain in the list of predicted motion vector candidates mvpListLX, and for the convenience of explanation, the three predicted motion vector candidates of mvpListLX are mvp1, mvp2, and mvp3. As indicated by the solid arrows in FIG. 22, the motion vector candidates mvp1, mvp2, and mvp3 are assumed in order from the left.
 最初に仮の予測動きベクトルを決める。図22(a)~(c)では3つの予測動きベクトルの候補を、それぞれ仮の予測動きベクトルとした場合の処理過程を示し、図22(a)はmvp1、図22(b)はmvp2、図22(c)はmvp3が最初の仮の予測動きベクトルとした場合である。 First, a temporary predicted motion vector is determined. 22 (a) to 22 (c) show processing steps when the three predicted motion vector candidates are assumed to be temporary predicted motion vectors, FIG. 22 (a) is mvp1, FIG. 22 (b) is mvp2, FIG. 22C shows a case where mvp3 is the first temporary predicted motion vector.
 図22(a)ではmvp1を仮の予測動きベクトルと設定する。図22(a)の中でmvp1を他の予測動きベクトルの候補と異なるように太実線矢印で表すこととし、以降も仮の予測動きベクトルとなる候補を太実線矢印で表す。仮の予測動きベクトルに差分動きベクトルmvdLX(図22(a)ではmvdと省略し、太点線矢印で表される)を加算すると、処理対象のパーティションの仮の動きベクトルが算出される。この仮の動きベクトルに対して、他の予測動きベクトルの候補mvp2及びmvp3との差分をとると、予測動きベクトルの候補mvp2及びmvp3の差分動きベクトルmvd2及びmvd3が算出される(図22では細点線矢印で表される)。 In FIG. 22 (a), mvp1 is set as a temporary predicted motion vector. In FIG. 22 (a), mvp1 is represented by a thick solid arrow so as to be different from other prediction motion vector candidates, and thereafter, a candidate that is a provisional motion vector predictor is represented by a thick solid arrow. When a difference motion vector mvdLX (abbreviated as mvd in FIG. 22A and represented by a thick dotted arrow) is added to the temporary predicted motion vector, a temporary motion vector of the partition to be processed is calculated. When the difference between the tentative motion vector and other prediction motion vector candidates mvp2 and mvp3 is taken, the difference motion vectors mvd2 and mvd3 of the prediction motion vector candidates mvp2 and mvp3 are calculated (in FIG. Represented by dotted arrows).
 ここで、処理対象のパーティションの差分動きベクトルmvdの符号量とmvd2及びmvd3の符号量を概算し、比較する。差分動きベクトルの符号量の概算は、差分動きベクトルの絶対値が大きい程符号量が多く発生する為、図22の中で示される差分動きベクトルの大きさを比較することで符号量の比較を行うことと同等とみなすことが出来、以下において矢印の大きさを概算符号量として説明することとする。 Here, the code amount of the differential motion vector mvd and the code amounts of mvd2 and mvd3 of the partition to be processed are estimated and compared. Since the larger the absolute value of the difference motion vector, the more the code amount is generated in the estimation of the code amount of the difference motion vector, the code amount is compared by comparing the size of the difference motion vector shown in FIG. It can be regarded as equivalent to what is performed, and the size of the arrow will be described below as an approximate code amount.
 仮の予測動きベクトルとして設定したmvp1が真の予測動きベクトルである場合、符号化の際に最小の符号量となる差分動きベクトルとしてmvdが選択される筈なので、mvdの符号量はmvd2及びmvd3の符号量よりも少ないことになる。即ち、mvdの符号量よりも少なくなる差分動きベクトルを発生させる予測動きベクトルの候補が1つでも存在すれば、仮の予測動きベクトルとして設定したmvp1は真の予測動きベクトルではないと判定され、リストmvpListLXから削除される。 If mvp1 set as a provisional motion vector predictor is a true motion vector predictor, mvd should be selected as the difference motion vector that is the minimum code amount during encoding, and the code amounts of mvd are mvd2 and mvd3. This is less than the code amount. That is, if there is at least one predicted motion vector candidate that generates a differential motion vector that is smaller than the code amount of mvd, it is determined that mvp1 set as a temporary predicted motion vector is not a true predicted motion vector, Deleted from the list mvpListLX.
 つまり、予測動きベクトルを選択する符号化側では、mvdの符号量が最小となるmvp候補を選択していると想定した場合の矛盾条件を利用して、mvp候補を削除する。図22(a)では、mvd2及びmvd3はmvdよりも小さくなるので、仮の予測動きベクトルとして設定したmvp1が真の予測動きベクトルではなく、リストmvpListLXから削除と判定される(図22(a)中にて削除と判定される予測動きベクトルの候補は○で表される)。mvp1は削除と判定されても、直ぐにリストmvpListLXから削除されず、他の予測動きベクトルの候補の判定の際に削除可能性を高めることができるため、リストmvpListLXに残したままにして、削除することを記憶しておき、全ての予測動きベクトルの候補の判定終了後に削除される。以降の予測動きベクトルの判定でも、この処理は適用されることとする。 That is, on the encoding side that selects the motion vector predictor, the mvp candidate is deleted by using the contradiction condition when it is assumed that the mvp candidate that minimizes the code amount of mvd is selected. In FIG. 22A, since mvd2 and mvd3 are smaller than mvd, it is determined that mvp1 set as the temporary predicted motion vector is not a true predicted motion vector but is deleted from the list mvpListLX (FIG. 22A). (The candidates for motion vector predictors that are determined to be deleted are indicated by ◯). Even if mvp1 is determined to be deleted, it is not immediately deleted from the list mvpListLX, and the possibility of deletion can be increased when determining other motion vector predictor candidates. Therefore, the mvp1 remains in the list mvpListLX and is deleted. This is stored, and is deleted after the determination of all prediction motion vector candidates. This process is also applied to the subsequent prediction motion vector determination.
 次に、仮の予測動きベクトルをmvp1以外の他のmvpListLXの予測動きベクトルの候補に設定し直す。図22(a)に示される予測動きベクトルの候補を左から優先して仮の予測動きベクトルとして設定することとし、この場合mvp2を次の仮の予測動きベクトルとして設定する。mvp2に差分動きベクトルmvdを加算して仮の動きベクトルが算出され、この仮の動きベクトルとmvp2以外の他の予測動きベクトルの候補mvp1及びmvp3との差分をとり、差分動きベクトルmvd1及びmvd3が新たに算出される。mvdをmvp1及びmvd3と比較すると、mvd1はmvdより大きいが、mvd3がmvdよりも小さいので、仮の予測動きベクトルmvp2は真の予測動きベクトルではなく、リストmvpListLXから削除と判定される。 Next, the provisional motion vector predictor is set again as a motion vector motion vector candidate for mvpListLX other than mvp1. The predicted motion vector candidate shown in FIG. 22A is set as a temporary predicted motion vector with priority from the left. In this case, mvp2 is set as the next temporary predicted motion vector. A difference motion vector mvd is added to mvp2 to calculate a provisional motion vector, and the difference between the provisional motion vector and other prediction motion vector candidates mvp1 and mvp3 other than mvp2 is obtained. The difference motion vectors mvd1 and mvd3 are Newly calculated. When mvd is compared with mvp1 and mvd3, mvd1 is larger than mvd, but mvd3 is smaller than mvd. Therefore, the provisional motion vector predictor mvp2 is not a true motion vector predictor and is determined to be deleted from the list mvpListLX.
 同様にして、mvp3を次の仮の予測動きベクトルとして設定し直し、mvp3に差分動きベクトルmvdを加算して仮の動きベクトルが算出され、この仮の動きベクトルとmvp3以外の他の予測動きベクトルの候補mvp1及びmvp2との差分をとり、差分動きベクトルmvd1及びmvd2が新たに算出される。mvdをmvp1及びmvd2と比較すると、mvdはmvd1及びmvd2よりも小さいので、仮の予測動きベクトルmvp3はリストmvpListLXから削除と判定されず、残ることとなる。結果として、リストmvpListLXの中でmvp1及びmvp2が削除と判定されているので、mvp3が予測動きベクトルとして選択される。 Similarly, mvp3 is reset as the next provisional predicted motion vector, and the difference motion vector mvd is added to mvp3 to calculate a provisional motion vector. The provisional motion vector and other predicted motion vectors other than mvp3 are calculated. The difference motion vectors mvd1 and mvd2 are calculated, and difference motion vectors mvd1 and mvd2 are newly calculated. When mvd is compared with mvp1 and mvd2, since mvd is smaller than mvd1 and mvd2, the provisional motion vector mvp3 is not determined to be deleted from the list mvpListLX and remains. As a result, since mvp1 and mvp2 are determined to be deleted in the list mvpListLX, mvp3 is selected as a motion vector predictor.
 図22(b)は最初の仮の予測動きベクトルをmvp2とした場合であり、差分動きベクトルmvdを加算して仮の動きベクトルが算出される。この仮の動きベクトルとmvp2以外の他の予測動きベクトルの候補mvp1及びmvp3との差分をとり、差分動きベクトルmvd1及びmvd3が算出される。mvdをmvd1及びmvd3と比較すると、mvd3がmvdより小さいので、仮の予測動きベクトルmvp2が削除と判定される。 FIG. 22 (b) shows a case where the first temporary predicted motion vector is mvp2, and the temporary motion vector is calculated by adding the difference motion vector mvd. Differences between the temporary motion vector and the prediction motion vector candidates mvp1 and mvp3 other than mvp2 are calculated, and difference motion vectors mvd1 and mvd3 are calculated. When mvd is compared with mvd1 and mvd3, since mvd3 is smaller than mvd, the provisional motion vector predictor mvp2 is determined to be deleted.
 次に、仮の予測動きベクトルをmvp2以外の他のmvpListLXの予測動きベクトルの候補に設定し直す。この場合、mvp3を仮の予測動きベクトルとして設定する。仮の予測動きベクトルmvp3に差分動きベクトルmvdを加算して仮の動きベクトルが算出され、この仮の動きベクトルとmvp3以外の他の予測動きベクトルの候補mvp1及びmvp2との差分をとり、差分動きベクトルmvd1及びmvd2が新たに算出される。mvdをmvd1及びmvd2と比較すると、mvdがmvd1及びmvd2よりも小さいので、仮の予測動きベクトルmvp3はリストmvpListLXから削除と判定されず残る。 Next, the tentative motion vector predictor is reset to a mvpListLX motion vector candidate other than mvp2. In this case, mvp3 is set as a temporary predicted motion vector. A difference motion vector mvd is added to the provisional predicted motion vector mvp3 to calculate a provisional motion vector, and a difference motion between the provisional motion vector and other prediction motion vector candidates mvp1 and mvp2 other than mvp3 is obtained. Vectors mvd1 and mvd2 are newly calculated. When mvd is compared with mvd1 and mvd2, since mvd is smaller than mvd1 and mvd2, the provisional predicted motion vector mvp3 is not determined to be deleted from the list mvpListLX and remains.
 同様にして、mvp1を仮の予測動きベクトルとして設定する。仮の予測動きベクトルmvp1に差分動きベクトルmvdを加算して仮の動きベクトルが算出され、この仮の動きベクトルとmvp1以外の他の予測動きベクトルの候補mvp2及びmvp3との差分をとり、差分動きベクトルmvd2及びmvd3が新たに算出される。mvdをmvd2及びmvd3と比較すると、mvd2及びmvd3がともにmvdよりも小さいので、仮の予測動きベクトルmvp1はリストmvpListLXから削除と判定される。mvp1及びmvp2は削除と判定されているので、リストmvpListLXから削除され、mvp3だけが残ることとなり、mvp3が予測動きベクトルとして選択される。 Similarly, mvp1 is set as a temporary predicted motion vector. A difference motion vector mvd is added to the provisional predicted motion vector mvp1 to calculate a provisional motion vector, and a difference between the provisional motion vector and other prediction motion vector candidates mvp2 and mvp3 other than mvp1 is obtained to obtain a difference motion. Vectors mvd2 and mvd3 are newly calculated. When mvd is compared with mvd2 and mvd3, both mvd2 and mvd3 are smaller than mvd, so it is determined that the provisional predicted motion vector mvp1 is deleted from the list mvpListLX. Since mvp1 and mvp2 are determined to be deleted, they are deleted from the list mvpListLX, leaving only mvp3, and mvp3 is selected as the predicted motion vector.
 図22(c)は最初の仮の予測動きベクトルをmvp3とした場合であり、差分動きベクトルmvdを加算して仮の動きベクトルが算出される。この仮の動きベクトルとmvp3以外の他の予測動きベクトルの候補mvp1及びmvp2との差分をとり、差分動きベクトルmvd1及びmvd2が算出される。mvdをmvd1及びmvd2と比較すると、mvd1及びmvd2はmvdよりも大きいので、仮の予測動きベクトルmvp3はリストmvpListLXから削除と判定されない。次に、仮の予測動きベクトルとしてリストmvpListLXのmvp1或いはmvp2を選択して同様な処理を行うと、図22(a)或いは図22(b)で説明した処理が行われ、結果として、mvp1及びmvp2が削除と判定され、リストmvpListLXから削除されて、mvp3だけが残り、予測動きベクトルとして選択される。 FIG. 22 (c) shows a case where the first provisional predicted motion vector is mvp3, and the difference motion vector mvd is added to calculate a provisional motion vector. Differences between the temporary motion vector and the prediction motion vector candidates mvp1 and mvp2 other than mvp3 are calculated, and difference motion vectors mvd1 and mvd2 are calculated. When mvd is compared with mvd1 and mvd2, since mvd1 and mvd2 are larger than mvd, the provisional motion vector predictor mvp3 is not determined to be deleted from the list mvpListLX. Next, when mvp1 or mvp2 of the list mvpListLX is selected as a temporary predicted motion vector and the same processing is performed, the processing described in FIG. 22A or 22B is performed, and as a result, mvp1 and mvp1 mvp2 is determined to be deleted, deleted from the list mvpListLX, and only mvp3 remains and is selected as a predicted motion vector.
 以上のようにして、mvpListLXの中の予測動きベクトルの候補の1つを順次仮の予測動きベクトルと設定して、mvdよりも小さい差分動きベクトルを発生させる他の予測動きベクトルの候補が存在する場合に、仮の予測動きベクトルとして設定した予測動きベクトルの候補を削除と判定し、全ての予測動きベクトルの候補に対する判定終了後に削除と判定された予測動きベクトルの候補をリストmvpListLXから削除する。 As described above, one of the motion vector predictor candidates in mvpListLX is sequentially set as a temporary motion vector predictor, and there are other motion vector predictor candidates that generate a difference motion vector smaller than mvd. In this case, the motion vector predictor candidates set as temporary motion vector predictors are determined to be deleted, and the motion vector predictor candidates determined to be deleted after the determination for all motion vector predictor candidates is deleted from the list mvpListLX.
 このように、符号化側で差分動きベクトルmvdの符号量が最小となる予測動きベクトルmvp候補を選択していると想定した場合の矛盾条件を利用すると、予測動きベクトルmvp候補を削減可能であり、予測動きベクトルmvpの選択情報を表すmvpインデックスの符号量を削減できる。 As described above, the prediction motion vector mvp candidates can be reduced by using the contradiction condition when it is assumed that the prediction motion vector mvp candidate that minimizes the code amount of the difference motion vector mvd is selected on the encoding side. In addition, it is possible to reduce the code amount of the mvp index representing the selection information of the predicted motion vector mvp.
 図22を例にした説明では、基準としたmvdと他の予測動きベクトルの候補から算出される差分動きベクトルとの明確な大小関係に基づき判定を行ったが、等しくなる場合についてはリストmvpListLXから削除と判定せず、残すようにした。実際の動画像符号化では、予測動きベクトルの候補として使用している隣接するパーティションの動きベクトルは強い相関があり、互いに近い値を持つことが多いので、mvdと他の予測動きベクトルの候補から算出される差分動きベクトルとが等しくなる頻度が少なくない。 In the explanation using FIG. 22 as an example, the determination is made based on a clear magnitude relationship between the reference mvd and the difference motion vector calculated from the other predicted motion vector candidates, but in the case where they are equal, from the list mvpListLX It was decided not to delete and leave. In actual video coding, motion vectors of adjacent partitions used as prediction motion vector candidates have a strong correlation and often have values close to each other. Therefore, mvd and other prediction motion vector candidates The calculated difference motion vector is often equal in frequency.
 このような場合、リストmvpListLXから予測動きベクトルの候補が削除と判定されず、複数の候補が残ることになるので、複数の候補から予測動きベクトルを選択する為に使用するフラグmvp_id_lxの使用頻度が多くなり、符号量が増加することになる。 In such a case, the candidate for the motion vector predictor is not determined to be deleted from the list mvpListLX, and a plurality of candidates remain, so the frequency of use of the flag mvp_id_lx used to select the motion vector predictor from the plurality of candidates is The number of codes increases and the amount of codes increases.
 そこで、実施の形態では、このような基準としたmvdと他の予測動きベクトルの候補から算出される差分動きベクトルとが等しくなる場合に、mvd及び他の予測動きベクトルの候補から算出される差分動きベクトルに該当するリストmvpListLXの予測動きベクトルの候補のインデックスに対して、判定基準を設け、予測動きベクトルの候補の削除判定を促すようにしている。具体的には、リストmvpListLXの中のインデックスの番号が小さい方を優先してmvpListLXに残すこととした、即ち、図16で示されるリストmvpListLXの配列で下位に位置する程、削除と判定される可能性が高くなる。 Therefore, in the embodiment, when mvd based on such a reference is equal to a difference motion vector calculated from other prediction motion vector candidates, a difference calculated from mvd and other prediction motion vector candidates is calculated. A determination criterion is provided for the index of a motion vector candidate in the list mvpListLX corresponding to the motion vector so as to prompt the deletion determination of the motion vector candidate. Specifically, it is determined that the smaller index number in the list mvpListLX is left in the mvpListLX with priority, that is, the lower the position in the list mvpListLX array shown in FIG. The possibility increases.
 インデックスの番号が小さい方を優先するのは、インデックスの小さい方がフラグmvp_id_lxの発生符号量が少なく、符号化効率を向上させることが出来る為である。つまり、予測動きベクトルを選択する符号化側では、mvd+mvp_idxの符号量が最小となる予測動きベクトルの候補を選択していると想定した場合の矛盾条件を利用して、予測動きベクトルの候補を削除する。 The reason why the smaller index number is given priority is that when the index is smaller, the generated code amount of the flag mvp_id_lx is smaller and the coding efficiency can be improved. In other words, the encoding side that selects the motion vector predictor deletes the motion vector predictor candidate by using a contradiction condition when it is assumed that a motion vector predictor candidate that minimizes the code amount of mvd + mvp_idx is selected. To do.
 以上の削除処理のフローチャートを図23に示す。 FIG. 23 shows a flowchart of the above deletion process.
 リストmvpListLXの中にある予測動きベクトルの候補の総数をカウントし、総数が1より多い場合は複数候補が存在するので、削除処理に進む。そうでない場合、即ち候補が1つに限定されるので、その候補を出力し終了する(S701)。 The total number of motion vector predictor candidates in the list mvpListLX is counted. If the total number is greater than 1, there are a plurality of candidates, and the process proceeds to the deletion process. If not, that is, the number of candidates is limited to one, and the candidates are output and the process ends (S701).
 次に、処理するパーティションの差分動きベクトルmvdLX(Xは0或いは1)の概算符号量を算出する。概算符号量は、mvdLXの絶対値をとり、その絶対値の最上位ビットの位置をmvdLXの発生符号量として算出され、mvdLXの絶対値に比例して大きくなる。つまり、図24に示す符号付きゴロム符号化の符号量を算出する。この概算符号量を以降の判定で使用する基準値mvdBitsとする(S702)。 Next, the approximate code amount of the differential motion vector mvdLX (X is 0 or 1) of the partition to be processed is calculated. The approximate code amount takes the absolute value of mvdLX, the position of the most significant bit of the absolute value is calculated as the generated code amount of mvdLX, and increases in proportion to the absolute value of mvdLX. That is, the code amount of the signed Golomb coding shown in FIG. 24 is calculated. This approximate code amount is set as a reference value mvdBits used in the subsequent determination (S702).
 リストmvpListLXの中の予測動きベクトルの候補から仮の予測動きベクトルを指定する。指定方法として様々な方法があるが、ここではリストmvpListLXのインデックス順を使用することとする。インデックスをkで表すこととして、k=0に初期設定する(S703)。 A temporary motion vector predictor is designated from predicted motion vector candidates in the list mvpListLX. There are various designation methods. Here, the index order of the list mvpListLX is used. Assuming that the index is represented by k, k = 0 is initially set (S703).
 リストmvpListLXの中の予測動きベクトルの候補から、インデックスk=0に該当する候補を読み出し、仮の予測動きベクトルmvpとする。即ち、mvpは次式にて表される。
 mvp=mvpListLX[k]=mvpListLX[0]
A candidate corresponding to the index k = 0 is read from the prediction motion vector candidates in the list mvpListLX, and is set as a provisional prediction motion vector mvp. That is, mvp is expressed by the following equation.
mvp = mvpListLX [k] = mvpListLX [0]
 処理するパーティションの仮の動きベクトルmvを算出する。仮の予測動きベクトルと処理するパーティションの差分動きベクトルとを加算することで算出され、次式で表される(S704)。
 mv=mvp+mvdLX
A temporary motion vector mv of the partition to be processed is calculated. It is calculated by adding the temporary predicted motion vector and the difference motion vector of the partition to be processed, and is expressed by the following equation (S704).
mv = mvp + mvdLX
 リストmvpListLXの中で、仮の予測動きベクトルとしたインデックスk以外の予測動きベクトルの候補のインデックスをl(≠k)とし、リストmvpListLXの中でkを除く最小のインデックスをlの初期値として設定する(S705)。 In the list mvpListLX, the index of the motion vector predictor candidate other than the index k as the temporary motion vector predictor is set to l (≠ k), and the minimum index excluding k in the list mvpListLX is set as the initial value of l. (S705).
 インデックスlに該当する予測動きベクトルの候補をリストmvpListLXから読み出す(S706)。予測動きベクトルの候補mvpCanは次式で表される。
 mvpCan=mvpListLX[l] (l≠k)
A motion vector predictor candidate corresponding to the index l is read from the list mvpListLX (S706). The predicted motion vector candidate mvpCan is expressed by the following equation.
mvpCan = mvpListLX [l] (l ≠ k)
 仮の動きベクトルと予測動きベクトルの候補mvpCanとの差分を求め、その差分の概算符号量を算出する(S707)。差分mvdCanは次式で表される。
  mvdCan=mv-mvpCan
A difference between the temporary motion vector and the predicted motion vector candidate mvpCan is obtained, and an approximate code amount of the difference is calculated (S707). The difference mvdCan is expressed by the following equation.
mvdCan = mv-mvpCan
 概算符号量は算出方法はS702と同様とし、差分の概算符号量mvdCanBitsを算出する。算出されたmvdCanBitsと基準値mvdBitsとの比較を行う(S708)。mvdCanBitsがmvdBitsと等しい場合はS710に進み、そうでない場合はS709に進む。 The calculation method of the approximate code amount is the same as that in S702, and the approximate code amount mvdCanBits of the difference is calculated. The calculated mvdCanBits is compared with the reference value mvdBits (S708). If mvdCanBits is equal to mvdBits, the process proceeds to S710. Otherwise, the process proceeds to S709.
 mvdCanBitsがmvdBitsと等しい場合は、概算符号量での比較が出来ない為、リストmvpListLXの予測動きベクトルのインデックスの比較を行う(S710)。mvdBitsに対応するインデックスはkであり、mvdCanBitsに対応するインデックスはlであるので、kとlとの比較を行う。インデックスkがlより大きい場合はkに該当する仮の予測動きベクトルmvpはリストmvpListLXから削除と判定されることになるので、この時のインデックスkを記録しておく(S711)。 When mvdCanBits is equal to mvdBits, since the comparison with the approximate code amount cannot be performed, the index of the motion vector predictor of the list mvpListLX is compared (S710). Since the index corresponding to mvdBits is k and the index corresponding to mvdCanBits is l, a comparison between k and l is performed. If the index k is greater than 1, the provisional motion vector mvp corresponding to k is determined to be deleted from the list mvpListLX, and the index k at this time is recorded (S711).
 削除対象のインデックスkの記録は、この削除処理の中に削除対象のインデックスkを記録しておく記憶領域を設けておいたり、リストmvpListLXの中のインデックス毎に削除するか否かを表すフラグを格納する記憶領域を追加してもよい。一方、kがlより小さい場合は仮の予測動きベクトルmvpはそのままリストに残しておき、インデックスlを更新する。現在のインデックスl及び仮の予測動きベクトルのインデックスk以外のインデックスをリストmvpListLXの中から選択し、次のlとして設定する(S712)。 For recording the deletion target index k, a storage area for recording the deletion target index k is provided in the deletion processing, or a flag indicating whether or not to delete for each index in the list mvpListLX. You may add the memory area to store. On the other hand, if k is smaller than l, the provisional motion vector mvp is left in the list as it is, and the index l is updated. An index other than the current index l and the index k of the temporary motion vector predictor is selected from the list mvpListLX and set as the next l (S712).
 mvdCanBitsがmvdBitsと等しくない場合はmvdCanBitsとmvdBitsとの大小関係の比較を行う(S709)。mvdCanBitsがmvdBitsよりも小さい場合、上述で説明したように、符号化時の予測動きベクトルの選択と矛盾が生じる為、仮の予測動きベクトルmvpはリストmvpListLXから削除と判定されることになるので、この時のインデックスkを記録しておく(S711)。一方、mvdCanBitsがmvdBitsより大きい場合は削除と判定せず、そのままリストに残しておき、インデックスlを更新する。現在のインデックスl及び仮の予測動きベクトルのインデックスk以外のインデックスをリストmvpListLXの中から選択し、次のlとして設定する(S712)。 When mvdCanBits is not equal to mvdBits, the magnitude relationship between mvdCanBits and mvdBits is compared (S709). When mvdCanBits is smaller than mvdBits, as described above, since there is a contradiction with the selection of the predicted motion vector at the time of encoding, the provisional predicted motion vector mvp is determined to be deleted from the list mvpListLX. The index k at this time is recorded (S711). On the other hand, when mvdCanBits is larger than mvdBits, it is not determined to be deleted, and is left in the list as it is, and the index l is updated. An index other than the current index l and the index k of the temporary motion vector predictor is selected from the list mvpListLX and set as the next l (S712).
 リストmvpListLXの中で、l=kを除く全ての予測動きベクトルの候補、即ち仮の予測動きベクトルを除く他の予測動きベクトルの候補と仮の予測動きベクトルとの比較処理の終了を判定する(S713)。リストmvpListLXの中で仮の予測ベクトルとの比較処理が終了していない予測動きベクトルの候補が存在する場合、更新したインデックスlに該当する予測動きベクトルの候補についてS706以降の処理を継続する。l≠kのインデックスの全ての予測動きベクトルの候補との比較処理が終了した場合、仮の予測動きベクトルのインデックスkを更新する。インデックスkは、現在の仮の予測動きベクトル以外の予測動きベクトルの候補のインデックスが選択される(S714)。ここでは、現在のインデックスkに1加算することで実現される。 In the list mvpListLX, all prediction motion vector candidates excluding l = k, that is, the end of the comparison process between the temporary prediction motion vector and the other prediction motion vector candidates excluding the temporary prediction motion vector are determined ( S713). If there is a motion vector predictor candidate that has not been compared with the temporary motion vector in the list mvpListLX, the processing from S706 onward is continued for the motion vector predictor candidate corresponding to the updated index l. When the comparison process with all prediction motion vector candidates of the index of l ≠ k is completed, the index k of the temporary prediction motion vector is updated. As the index k, an index of a motion vector predictor candidate other than the current temporary motion vector predictor is selected (S714). Here, it is realized by adding 1 to the current index k.
 更新されたインデックスkに対して、リストmvpListLXの中の全ての予測動きベクトルの候補を仮の予測動きベクトルとして比較処理を行った否かの判定する(S715)。全ての予測動きベクトルの候補に対して行っていない場合、更新したインデックスkにてS704以降の処理を継続する。 It is determined whether or not comparison processing has been performed on all of the predicted motion vector candidates in the list mvpListLX with respect to the updated index k as temporary predicted motion vectors (S715). If not performed for all prediction motion vector candidates, the processing after S704 is continued with the updated index k.
 全ての予測動きベクトルの候補に対して行った場合、リストmvpListLXの中の予測動きベクトルの候補が更新される(S716)。まず、リストmvpListLXの中で、削除と判定され記録されていたインデックスの予測動きベクトルの候補が削除される。次に、リストmvpListLXの中で、削除された予測動きベクトルの候補の空いた格納領域に、インデックス0を基準にして、インデックスが小さい予測動きベクトルの候補の順で詰めていく。例えば、インデックス0,2,3の予測動きベクトルの候補が削除され、インデックス1及び4が残った場合、まずインデックス1の予測動きベクトルの候補をインデックス0の格納領域に移動し、インデックス4の予測動きベクトルの候補をインデックス1の格納領域に移動する。以上のようにして、リストmvpListLXの中が更新される。 When the process is performed for all prediction motion vector candidates, the prediction motion vector candidates in the list mvpListLX are updated (S716). First, in the list mvpListLX, a predicted motion vector candidate of an index that has been determined to be deleted and has been recorded is deleted. Next, in the list mvpListLX, vacant storage areas of the deleted motion vector predictor candidates are packed in the order of motion vector predictor candidates having a smaller index with reference to index 0. For example, if the motion vector predictor candidates of indexes 0, 2, and 3 are deleted and indexes 1 and 4 remain, first, the motion vector predictor candidates of index 1 are moved to the storage area of index 0 and the prediction of index 4 is performed. The motion vector candidate is moved to the index 1 storage area. As described above, the list mvpListLX is updated.
 [リストの中の予測動きベクトルの候補数を確認(S800)]
 S700にて予測動きベクトルの候補が削除されたリストmvpListLXの中から、最適な予測動きベクトルを選択する。まず、リストmvpListLXの中に残った予測動きベクトルの候補の総数をカウントする。総数が1の場合、リストmvpListLXに残っている予測動きベクトルが候補が最適な予測動きベクトルとなり、S700にてリストmvpListLXの中で予測動きベクトルの候補の更新により、リストmvpListLXのインデックス0に予測動きベクトルが格納されている。そこで、予測動きベクトルのインデックスをmvp_idx_lxとして、mvp_idx_lx=0を設定する。インデックスmvp_idx_lxに該当するmvpListLX[mvp_idx_lx]を最適な予測動きベクトルとして出力する。
[Confirm number of motion vector candidates in list (S800)]
In S700, an optimal motion vector predictor is selected from the list mvpListLX from which the motion vector predictor candidates have been deleted. First, the total number of motion vector predictor candidates remaining in the list mvpListLX is counted. If the total number is 1, the prediction motion vector remaining in the list mvpListLX becomes the optimal prediction motion vector, and the prediction motion vector is updated to the index 0 of the list mvpListLX by updating the prediction motion vector candidate in the list mvpListLX in S700. Contains vectors. Therefore, mvp_idx_lx = 0 is set assuming that the index of the motion vector predictor is mvp_idx_lx. The mvpListLX [mvp_idx_lx] corresponding to the index mvp_idx_lx is output as an optimal motion vector predictor.
 総数が1ではない場合、リストmvpListLXの中には複数の予測動きベクトルの候補が残っていることとなり、これまでの処理では最適な予測動きベクトルとして選択出来なかったことになる。この場合、ビットストリームから復号された変数mvp_idx_lxをリストmvpListLXのインデックスとして、mvp_idx_lxに該当するリストmvpListLXのインデックスの予測動きベクトルの候補を予測動きベクトルとする。 If the total number is not 1, a plurality of motion vector predictor candidates remain in the list mvpListLX, and it has not been possible to select an optimal motion vector predictor in the process so far. In this case, a variable mvp_idx_lx decoded from the bitstream is used as an index of the list mvpListLX, and a predicted motion vector candidate of an index of the list mvpListLX corresponding to mvp_idx_lx is used as a predicted motion vector.
 ここで、mvp_idx_lxのエントロピー符号化について説明する。図25にTruncated Unaryを用いたmvp_idx_lxの符号割当を示す。この例では、mvp_idx_lxの最大数が5、つまりmvp_idx_lxの値の範囲が0~4の場合の例である。mvp_idx_lxの符号量は、値が1大きくなるほど1bitずつ増加する。但し、最大の値を持つmvp_idx_lxを伝送する場合は、最後の1bit伝送する必要がない為、1bit増加はしない。 Here, the entropy coding of mvp_idx_lx will be described. FIG. 25 shows code allocation of mvp_idx_lx using Truncated Unary. In this example, the maximum number of mvp_idx_lx is 5, that is, the value range of mvp_idx_lx is 0-4. The code amount of mvp_idx_lx increases by 1 bit as the value increases by one. However, when mvp_idx_lx having the maximum value is transmitted, it is not necessary to transmit the last 1 bit, and therefore, 1 bit is not increased.
 このように、mvp_idx_lxが増加するほど伝送する符号量が増えるため、mvdの符号量が同一の場合はmvp_idx_lxの番号が小さいmvpを選択した方が良いことが分かる。また、mvdの符号量、mvp_idx_lxの符号量共に差がつかない場合にも、mvpの候補を複数残すよりも、特定のルールにより候補を1つに絞るほうが効率が良いため、実施の形態のmvp_idx_lxの大小による候補削減は非常に有用である。 Thus, since the amount of code to be transmitted increases as mvp_idx_lx increases, it can be seen that it is better to select mvp having a smaller mvp_idx_lx number when the code amount of mvd is the same. Also, even when there is no difference between the code amount of mvd and the code amount of mvp_idx_lx, it is more efficient to narrow down one candidate according to a specific rule than to leave a plurality of mvp candidates, so mvp_idx_lx of the embodiment Candidate reduction by size is very useful.
 以上の処理により、最適な予測動きベクトルが算出される。 The optimal motion vector is calculated by the above processing.
[実施例2]
 動きベクトルの予測方法の実施例2を説明する。図26は図1で構成される動画像符号化装置の予測動きベクトル選択部111の詳細な構成を示す図であり、図27は図2で構成される動画像復号装置の予測動きベクトル選択部208の詳細な構成を示す図である。実施例1と実施例2との相違は、実施例1の予測動きベクトル選択部111及び208を構成していた予測動きベクトル候補同一判定部121及び221が実施例2には存在しないことである。
[Example 2]
A second embodiment of the motion vector prediction method will be described. FIG. 26 is a diagram illustrating a detailed configuration of the motion vector predictor 111 of the moving picture encoding apparatus configured in FIG. 1, and FIG. 27 is a motion vector selector of the motion picture decoding apparatus illustrated in FIG. FIG. The difference between the first embodiment and the second embodiment is that the predicted motion vector candidate identity determination units 121 and 221 that constitute the predicted motion vector selection units 111 and 208 of the first embodiment do not exist in the second embodiment. .
 実施例1における予測動きベクトル候補削除部122及び222では、予測動きベクトルの候補を削除判定する為に予測動きベクトルの候補を比較する場合に、予測動きベクトルの候補同士が同一の動きベクトルであると、概算符号量は同一の値となり、符号量での判定は出来ない。しかし、符号量での判定が出来ない場合、各予測動きベクトルの候補に割り当てられているリストmvpListLXのインデックスによって判定するようにしているので、比較する予測動きベクトルの候補の必ずどちらか一方が選択される。 In the motion vector predictor candidate deletion units 122 and 222 in the first embodiment, when motion vector predictor candidates are compared to determine whether motion vector motion vector candidates are deleted, motion vector predictor candidates are the same motion vector. And the approximate code amount becomes the same value, and determination by the code amount is not possible. However, if the code amount cannot be determined, the determination is made based on the index of the list mvpListLX assigned to each predicted motion vector candidate, so either one of the predicted motion vector candidates to be compared is always selected. Is done.
 実施例2では、予測動きベクトルの候補同士の比較処理が、実施例1の予測動きベクトル候補同一判定部121及び221と予測動きベクトル候補削除部122及び222とで重複している点に着目し、実施例1の予測動きベクトル候補同一判定部121及び221を予測動きベクトル選択部111及び208の処理構成から外すこととで、予測動きベクトル候補を最大限に絞り込むことを維持しつつ、処理速度向上と回路規模縮小の効果が期待出来る。 In the second embodiment, attention is paid to the point that the comparison processing between the motion vector predictor candidates overlaps between the motion vector predictor candidate determination units 121 and 221 and the motion vector predictor candidate deletion units 122 and 222 in the first embodiment. In addition, by removing the motion vector predictor candidate identification units 121 and 221 of the first embodiment from the processing configuration of the motion vector predictor selection units 111 and 208, the processing speed can be maintained while keeping the motion vector predictor candidates narrowed down to the maximum. The effect of improvement and circuit scale reduction can be expected.
 ここで、予測動きベクトル候補生成部130及び230がn個の予測動きベクトルの候補を生成したとする。実施例1の予測動きベクトル候補同一判定部121及び221では、予測動きベクトルの候補を比較する為の処理回数として、n個の中から2個の予測動きベクトルの候補を選ぶ組み合わせは=n(n-1)/2通りあるから、n(n-1)/2回を必要とする。ここで、Cは組み合わせを表す関数(combination)である。 Here, it is assumed that the motion vector predictor candidate generation units 130 and 230 generate n motion vector predictor candidates. In the motion vector predictor candidate identity determination units 121 and 221 according to the first embodiment, the combination of selecting two motion vector predictor candidates from n as the number of processes for comparing motion vector predictor candidates is n C 2. Since there are n = n (n−1) / 2 types, n (n−1) / 2 times are required. Here, C is a function representing a combination.
 更に、実施例1の予測動きベクトル候補同一判定部121及び221にて削除され更新された予測動きベクトルの候補数をm(m≦n)とすると、予測動きベクトル候補削除部122及び222では、予測動きベクトルの候補を比較する為の処理回数はm(m-1)となり、処理回数の総数は
 n(n-1)/2+m(m-1), 但しm≦n
で表される。
Furthermore, assuming that the number of motion vector predictor candidates deleted and updated by the motion vector predictor candidate determination units 121 and 221 in Example 1 is m (m ≦ n), the motion vector predictor candidate deletion units 122 and 222 The number of processings for comparing predicted motion vector candidates is m (m−1), and the total number of processings is n (n−1) / 2 + m (m−1), where m ≦ n
It is represented by
 一方、実施例2の予測動きベクトル候補削除部132及び232では、予測動きベクトルの候補を比較する為の処理回数はn(n-1)となる。 On the other hand, in the motion vector predictor candidate deletion units 132 and 232 according to the second embodiment, the number of processes for comparing motion vector predictor candidates is n (n−1).
 実施例1と実施例2との処理回数が等しくなるのは、実施例1の予測動きベクトル候補同一判定部121及び221で予測動きベクトルの候補総数のうち約1/20.5≒70%が削除されずに残る場合に相当する。即ち、n個の予測動きベクトルの候補の全体で約30%が重複することになる。 The number of processes in the first embodiment is equal to that in the second embodiment because the predicted motion vector candidate identity determining units 121 and 221 of the first embodiment have about 1/2 0.5 ≈70% of the total number of predicted motion vector candidates. Corresponds to the case where is left without being deleted. That is, about 30% of all n motion vector predictor candidates overlap.
 実施例2の予測動きベクトル候補生成部130及び230では、符号化・伝送する為の差分動きベクトルの値を小さくする為に、予測動きベクトルの候補としては異なる値を持つ候補を生成した方が有利であり、同一の値となる候補を生成することは確率的に少ないので、生成される予測動きベクトルの候補のうち、30%以上が重複することは静止画やパンスキャンのような特殊な場合を除いて考え難い。したがって、実施例2では、予測動きベクトルの候補の比較処理回数は、実施例1に比べて少なくなることが期待出来、処理速度を向上させることが可能となる。 In the motion vector predictor candidate generation units 130 and 230 according to the second embodiment, in order to reduce the value of the differential motion vector for encoding / transmitting, it is preferable to generate candidates having different values as motion vector predictor candidates. It is advantageous, and it is probabilistically less likely to generate candidates with the same value, so that 30% or more of the motion vector predictor candidates that are generated overlap with a special image such as a still image or pan scan. It's hard to think except in some cases. Therefore, in the second embodiment, it can be expected that the number of comparison processes of predicted motion vector candidates is smaller than that in the first embodiment, and the processing speed can be improved.
 また、符号化装置や復号装置をハードウェア化する場合には、処理のワーストケースを基準に回路を設計する必要があるため、実施例1でも、予測動きベクトル候補同一判定部121及び221の有無にかかわらず、n個の動きベクトル候補が予測動きベクトル候補削除部122及び222に入力されることを想定しなくてはいけない。つまり、本実施の形態のように予測動きベクトル候補削除部122及び222で各予測動きベクトルの候補に割り当てられているリストmvpListLXのインデックスを考慮して予測動きベクトル候補を削除している場合、予測動きベクトル候補同一判定部121及び221の存在意義はない。 In addition, when hardware is used for the encoding device and the decoding device, it is necessary to design a circuit based on the worst case of processing. Therefore, even in the first embodiment, the presence / absence of the motion vector predictor candidate determination units 121 and 221 is also determined. Regardless, it is assumed that n motion vector candidates are input to the motion vector predictor candidate deletion units 122 and 222. That is, when the motion vector predictor candidate is deleted in consideration of the index of the list mvpListLX assigned to each motion vector predictor candidate in the motion vector predictor candidate deletion units 122 and 222 as in the present embodiment, the prediction is performed. The presence of the motion vector candidate identity determination units 121 and 221 is not significant.
 もっとも、符号化装置や復号装置をハードウェア化せずに、ソフトウェアで処理する場合は、実施例1のように予測動きベクトル候補同一判定部121及び221による同一判定処理を、予測動きベクトル候補削除部122及び222による候補削除処理に先だって行っておくことは計算量の観点から有利になることもある。また、ハードウェア化した場合であっても、消費電力を考えると、計算量が少ない構成の方が有利であるから、実施例1のように予測動きベクトル候補同一判定部121及び221を設ける構成にも意味がある。したがって、実装形態の違いや、計算量、消費電力などの性能指標の観点の違いから、実施例1と実施例2はそれぞれに異なる長所を有し、どちらか一方が他方よりも優れているというものではないことに留意すべきである。 However, in the case where the processing is performed by software without making the encoding device and decoding device hardware, the same determination processing by the motion vector predictor candidate determination units 121 and 221 is performed as in the first embodiment, and the motion vector predictor candidate deletion is performed. It may be advantageous from the viewpoint of calculation amount to perform prior to candidate deletion processing by the units 122 and 222. In addition, even when hardware is used, a configuration with a small amount of calculation is more advantageous in view of power consumption. Therefore, a configuration in which the motion vector predictor candidate determination units 121 and 221 are provided as in the first embodiment. Is also meaningful. Therefore, Example 1 and Example 2 have advantages different from each other due to differences in mounting forms and performance indexes such as calculation amount and power consumption, and one of them is superior to the other. It should be noted that it is not a thing.
 実施例2では、実施例1から予測動きベクトル候補同一判定部121及び221を処理構成から外し、事前に予測動きベクトルの候補から同一の動きベクトルの値を持つ候補を削除する処理が無い点が異なるだけで、予測動きベクトルの候補の判定処理は実施例1と同様であるので、判定処理については説明を割愛する。 In the second embodiment, the prediction motion vector candidate identity determination units 121 and 221 are removed from the processing configuration from the first embodiment, and there is no processing for deleting a candidate having the same motion vector value from the prediction motion vector candidates in advance. Since the determination process for the motion vector predictor candidate is the same as that in the first embodiment, the description of the determination process is omitted.
 図28(a)は実施例2の予測動きベクトル候補生成部130及び230ならびに予測動きベクトル候補削除部132及び232の処理の流れを表すフローチャートである。図28(b)は実施例2の予測動きベクトル候補生成部130及び230による予測動きベクトル候補の生成の一例を示すフローチャートであり、図28(a)の[予測動きベクトルの候補を算出(S90)]の処理の詳細な流れを示すものである。図28(a)は、図11(a)の実施例1の場合と比べて、S600のリストの中の同じ値を持つ予測動きベクトルの候補を削除する処理がない点が異なり、それ以外の処理の流れは同じであり、図28(b)は、図11(b)の実施例1の場合と同じであるから、説明を省略する。 FIG. 28A is a flowchart showing the flow of processing of the motion vector predictor candidate generation units 130 and 230 and the motion vector candidate candidate deletion units 132 and 232 according to the second embodiment. FIG. 28B is a flowchart illustrating an example of the generation of motion vector predictor candidates by the motion vector predictor candidate generation units 130 and 230 according to the second embodiment, and [Calculation of motion vector predictor candidates (S90) in FIG. )] Is shown in detail. FIG. 28 (a) differs from the first embodiment of FIG. 11 (a) in that there is no processing for deleting a motion vector predictor candidate having the same value in the list of S600. The processing flow is the same, and FIG. 28B is the same as that in the first embodiment of FIG.
[実施例3]
 動きベクトルの予測方法の実施例3を説明する。実施例3は、動画像符号化装置の予測動きベクトル選択部125及び135、予測動きベクトル候補削除部122と、動画像復号装置の予測動きベクトル候補削除部222での予測動きベクトルの候補の比較判定方法が実施例1及び2とは異なる。
[Example 3]
A third embodiment of the motion vector prediction method will be described. The third embodiment compares the motion vector predictor candidates of the motion vector encoders 125 and 135, the motion vector predictor candidate deletion unit 122, and the motion vector predictor candidate motion vector candidate deletion unit 222 with the motion vector predictor candidates. The determination method is different from those in the first and second embodiments.
 最初に、予測動きベクトル選択部125及び135における相違を説明する。実施例1及び2における予測動きベクトル選択部125及び135では、動きベクトルmvとリストmvpListLXの中に格納された各予測動きベクトルの候補mvpListLX[i]との差分を算出し、その差分の発生符号量のみで比較していた。実際の符号化過程では差分動きベクトルと条件付きで予測動きベクトルのインデックスmvp_idx_lxが符号化され、伝送されるので、実施例3ではインデックスmvp_idx_lxの発生符号量も考慮することで、発生符号量が最小となる予測動きベクトルの候補を判定する。即ち、動きベクトルmvとリストmvpListLXの中に格納された各予測動きベクトルの候補mvpListLX[i]との差分の発生符号量とそのインデックスiの発生符号量を加算した総符号量が最小となる予測動きベクトルの候補をmin_mvpとして記録する。 First, the differences in the motion vector predictor selection units 125 and 135 will be described. In the motion vector selectors 125 and 135 in the first and second embodiments, the difference between the motion vector mv and each motion vector candidate mvpListLX [i] stored in the list mvpListLX is calculated, and the difference generation code Comparison was made by amount alone. In the actual encoding process, the motion vector index mvp_idx_lx is encoded and transmitted with the difference motion vector and conditions. In the third embodiment, the generated code amount is minimized by considering the generated code amount of the index mvp_idx_lx. A candidate for a predicted motion vector is determined. That is, the prediction that minimizes the total code amount obtained by adding the generated code amount of the difference between the motion vector mv and the candidate mvpListLX [i] of each predicted motion vector stored in the list mvpListLX and the generated code amount of the index i. A motion vector candidate is recorded as min_mvp.
 次に、動画像符号化装置の予測動きベクトル候補削除部122及び動画像復号装置の予測動きベクトル候補削除部222における相違を説明する。具体的には、動きベクトルの予測方法における差分動きベクトルに基づき、リストの中の予測動きベクトルの候補を削除(S700)する過程内での判定が異なる。 Next, differences between the motion vector predictor candidate deletion unit 122 of the video encoding device and the motion vector predictor candidate deletion unit 222 of the video decoding device will be described. Specifically, the determination in the process of deleting the motion vector predictor candidates in the list (S700) is different based on the difference motion vector in the motion vector prediction method.
 実施例1及び2における差分動きベクトルに基づくリストの中の予測動きベクトルの候補の削除では、予測動きベクトルの候補から任意に選択された1つの候補を仮の予測動きベクトルとして、その動きベクトルと差分動きベクトルmvdを加算することで仮の動きベクトル生成し、その仮の動きベクトルと他の予測動きベクトルの候補との差分を符号量に換算した値とmvdを符号量に換算した値で比較して、予測動きベクトルの削除を実施した。 In the deletion of predicted motion vector candidates in the list based on the difference motion vector in the first and second embodiments, one candidate arbitrarily selected from predicted motion vector candidates is used as a temporary predicted motion vector, and the motion vector A temporary motion vector is generated by adding the difference motion vector mvd, and a difference between the temporary motion vector and another predicted motion vector candidate is converted into a code amount and compared with a value obtained by converting mvd into a code amount. Then, the prediction motion vector was deleted.
 しかし、実際の符号化過程では差分動きベクトルと条件付きで予測動きベクトルのインデックスmvp_idx_lxが符号化され、伝送される。S700の削除処理により、予測動きベクトルの候補が1つに絞られた場合は、予測動きベクトルのインデックスmvp_idx_lxを符号化・伝送する必要がないが、2つ以上の候補が残る場合にはmvp_idx_lxが必要となる。 However, in the actual encoding process, the motion vector index mvp_idx_lx is encoded and transmitted with the difference motion vector and conditions. When the prediction motion vector candidates are narrowed down to one by the deletion process of S700, it is not necessary to encode and transmit the prediction motion vector index mvp_idx_lx, but when two or more candidates remain, mvp_idx_lx is Necessary.
 その為、上述の予測動きベクトル選択部125及び135と同様に、削除処理において、差分動きベクトルの符号量概算とともに予測動きベクトルのインデックスmvp_idx_lxの符号量を考慮することで厳密な比較が可能となり、予測精度の向上が図られる。 Therefore, as in the above-described prediction motion vector selection units 125 and 135, in the deletion process, it is possible to perform a strict comparison by considering the code amount of the motion vector index mvp_idx_lx together with the code amount estimation of the difference motion vector, The prediction accuracy is improved.
 図29を一例として説明する。図29は予測動きベクトルの候補をmvp1とmvp2とし、配置した例である。まず、実施例1及び2での判定の一例として図29(a)を説明する。細実線はmvp1及びmvp2にそれぞれ差分動きベクトルを加算した時に同じ発生符号量になる境界を示し、境界よりも左ならmvp1、境界より右ならmvp2の方が発生符号量が少ない領域を示している。 FIG. 29 will be described as an example. FIG. 29 shows an example in which the motion vector predictor candidates are mvp1 and mvp2. First, FIG. 29A will be described as an example of the determination in the first and second embodiments. A thin solid line indicates a boundary where the same generated code amount is obtained when the difference motion vector is added to mvp1 and mvp2, respectively, and mvp1 indicates a region where the generated code amount is smaller if mvp1 is left than the boundary and mvp2 indicates that it is right than the boundary. .
 図29(a)に示されるように、mvp1を仮の予測動きベクトルとしてmvdを加算しすると、mvdの発生符号量が境界を超えない位置に達したとする。mvp2からその位置に向けた差分動きベクトルmvp2の符号量はmvdのそれよりも多いことになり、この場合mvp1が削除されないことになる。mvp1及びmvp2のそれぞれの予測動きベクトルのリストmvpListLXのインデックスmvp1_idx及びmvp2_idxとし、次の関係mvp1_idx>mvp2_idxが成り立っている場合、予測動きベクトルの候補が複数残ることになり、mvp1を予測動きベクトルとして選択するには、インデックスの差分(mvp1_idx-mvp2_idx)相当の符号量がmvp_idx_lxとして必要となる。そこで、本実施例3では、このインデックスの差分相当の符号量を差分動きベクトルの符号量概算に考慮してより厳密な比較を行う。 As shown in FIG. 29A, when mvd is added using mvp1 as a provisional motion vector, it is assumed that the generated code amount of mvd has reached a position that does not exceed the boundary. The code amount of the differential motion vector mvp2 from mvp2 toward the position is larger than that of mvd, and in this case, mvp1 is not deleted. List of prediction motion vectors for mvp1 and mvp2 mvpListLX indexes mvp1_idx and mvp2_idx, and if the following relationship mvp1_idx> mvp2_idx holds, multiple prediction motion vector candidates remain, and mvp1 is selected as the prediction motion vector To achieve this, a code amount corresponding to the index difference (mvp1_idx−mvp2_idx) is required as mvp_idx_lx. Therefore, in the third embodiment, a stricter comparison is performed in consideration of the code amount corresponding to the difference of the index in the code amount estimation of the difference motion vector.
 図29(b)は図29(a)においてインデックスの符号化分を考慮した場合を示す。mvp1及びmvp2のインデックスがmvp1_idx>mvp2_idxの関係にある場合、mvp1を予測動きベクトルとして選択する場合、インデックスの差分(mvp1_idx-mvp2_idx)相当の符号量が加算されるので、従来中心にあった符号量の境界がmvp1寄りにオフセットされることになる。図29(b)では、オフセットされた境界を越えてmvp1に加算されたmvdの符号量がmvp2の領域を侵すことになり、この場合、mvp1は削除されることになる。 FIG. 29 (b) shows a case where the encoded part of the index is considered in FIG. 29 (a). If the indexes of mvp1 and mvp2 are in the relationship of mvp1_idx> mvp2_idx, when mvp1 is selected as the predicted motion vector, the code amount corresponding to the index difference (mvp1_idx−mvp2_idx) is added, so the code amount that has been in the center of the conventional art Will be offset closer to mvp1. In FIG. 29B, the code amount of mvd added to mvp1 beyond the offset boundary violates the area of mvp2, and in this case, mvp1 is deleted.
 以上のように、予測動きベクトルのインデックスにより発生する符号量差を考慮することで、予測動きベクトルの候補の削除の精度を高めることが可能となる。 As described above, by considering the code amount difference generated by the index of the motion vector predictor, it is possible to improve the accuracy of deletion of motion vector predictor candidates.
 図30は本実施例3を実現する為に、実施例1及び2における差分動きベクトルに基づき、リストの中の予測動きベクトルの候補を削除に追加するフローチャートを示す。まず、図23のフローチャートに対して、S707までの過程が同様に行われる。 FIG. 30 shows a flowchart for adding the predicted motion vector candidates in the list to the deletion based on the difference motion vectors in the first and second embodiments in order to realize the third embodiment. First, the processes up to S707 are similarly performed on the flowchart of FIG.
 次に、図30に示されるように、仮の予測動きベクトルmvpのインデックスkとk以外の予測動きベクトルの候補のインデックスをl(≠k)との差分を求め、符号量に概算し、オフセット値を算出する(S721)。予測動きベクトルのインデックスは、ユーナリー・バイナリゼーション符号化が用いられることが多いので、ここでもこの符号化を採用することとすると、インデックスの値自身が符号量となる。次に、算出されたオフセット値を差分の概算符号量mvdCanBitsに加算する(S722)。ここで、k>lの場合、オフセット値は負となるが、そのまま加算する。予測動きベクトルのインデックスを考慮して算出されたmvdCanBitsでmvdとの比較を行い、以降の過程は実施例1及び2と同様にして予測動きベクトルの候補の削除を行う。 Next, as shown in FIG. 30, the difference between the index k of the temporary motion vector predictor mvp and the motion vector predictor candidate index other than k is calculated as l (≠ k), approximated to the code amount, and offset. A value is calculated (S721). Since the index of the motion vector predictor often uses unary binarization coding, if this coding is also adopted here, the value of the index itself becomes the code amount. Next, the calculated offset value is added to the approximate code amount mvdCanBits of the difference (S722). Here, when k> l, the offset value is negative, but is added as it is. Comparison with mvd is performed using mvdCanBits calculated in consideration of the index of the predicted motion vector, and subsequent motion vector candidates are deleted in the same manner as in the first and second embodiments.
[実施例4]
 動きベクトルの予測方法の実施例4を説明する。実施例1~3とは、動きベクトルの予測方法における予測動きベクトルの候補を削除(S700)する過程内で予測動きベクトルの候補のリストmvpListLXの各リストのインデックスmvp_list_lxの符号量の割り当て方が異なる。
[Example 4]
A fourth embodiment of the motion vector prediction method will be described. The method of assigning the code amount of the index mvp_list_lx of each list of the predicted motion vector candidate list mvpListLX is different from the first to third embodiments in the process of deleting the predicted motion vector candidate in the motion vector prediction method (S700). .
 実施例1~3におけるリストmvpListLXのインデックスmvp_idx_lxの符号量の割り当て方は、図25で示されるように、リストmvpListLXの総リスト数に対して固定的な符号量がTruncated Unaryによって割り当てられる。図25の場合は総リスト数5であり、インデックスmvp_idx_lxは最大で4ビットの符号量となる。 In the method of assigning the code amount of the index mvp_idx_lx of the list mvpListLX in the first to third embodiments, as shown in FIG. 25, a fixed code amount is assigned by the Trunked Unary to the total number of lists of the list mvpListLX. In the case of FIG. 25, the total number of lists is 5, and the index mvp_idx_lx has a code amount of 4 bits at the maximum.
 実施例1~3における予測動きベクトルの候補の削除過程では、予測動きベクトルの候補が削除対象と判定されても、リストmvpListLXのインデックスの割り当て符号量はそのままとして判定を続けていた。しかし、最終的に削除過程が終了し、予測動くベクトルの候補として選択されるリストmvpListLXのインデックスmvp_idx_lxは、リストmvpListLXの中から削除対象の予測動きベクトルの候補を削除し、インデックス0を基準にして、インデックスが小さい予測動きベクトルの候補の順に詰められたリストmvpListLXのインデックスとなり、削除過程におけるインデックスmvp_idx_lxの符号及び符号量とは異なる。 In the process of deleting the motion vector predictor candidates in the first to third embodiments, even if the motion vector predictor candidate is determined to be deleted, the determination is continued with the allocation code amount of the index of the list mvpListLX as it is. However, the index mvp_idx_lx of the list mvpListLX selected as a candidate for the motion vector to be predicted is finally deleted from the list mvpListLX, and the motion vector predictor candidate to be deleted is deleted from the list mvpListLX. , The index of the list mvpListLX packed in the order of the candidate motion vector predictor with the smallest index is different from the code and code amount of the index mvp_idx_lx in the deletion process.
 そこで、実施例4では、予測動きベクトルの候補の削除過程において、リストmvpListLXの中で削除対象とされた予測動きベクトルの候補のリストを除き、リストmvpListLXに残ったリストのインデックスmvp_idx_lxに対して、新たに符号の割り当ての変更を行うこととする。 Therefore, in the fourth embodiment, in the process of deleting the motion vector predictor candidates, the list of motion vector candidates that are the deletion target in the list mvpListLX is excluded, and the index mvp_idx_lx of the list remaining in the list mvpListLX is determined. It is assumed that the code allocation is newly changed.
 例えば、図25のリストの中でインデックスmvp_idx_lxが2のリストにある予測動きベクトルの候補が削除対象と判定されたとする。削除対象と判定された予測動きベクトルのリストのインデックスは削除過程中に記録されているので、次の削除判定の前に、リストのインデックスに割り当てる符号を更新する。ここでは、インデックス2以外のリストmvpListLXに残ったリストのインデックスに対して符号を次のように割り当て直す。インデックスmvp_idx_lx=0,1,3,4の順に割り当て符号は”0”,”10”,”110”,”111”となり、最大でも3ビットで表されることになる。 For example, assume that a motion vector predictor candidate in the list having the index mvp_idx_lx of 2 in the list of FIG. Since the index of the list of predicted motion vectors determined to be deleted is recorded during the deletion process, the code assigned to the list index is updated before the next deletion determination. Here, the codes are reassigned to the indexes of the lists remaining in the list mvpListLX other than the index 2 as follows. The assigned codes are “0”, “10”, “110”, “111” in the order of the index mvp_idx_lx = 0, 1, 3, 4, and are represented by 3 bits at the maximum.
 以上のようにして、リストmvpListLXの中にある予測動きベクトルの候補毎に削除判定を行い、その都度インデックスmvp_idx_lxに対する符号割り当ての更新を繰り返す。削除判定毎にリストmvpListLXのインデックスmvp_idx_lxに対して、予測動きベクトルの候補の削除が反映された符号量が割り当てられるので、予測動きベクトルの候補の削除判定の正確性を向上させることが可能となる。 As described above, deletion determination is performed for each prediction motion vector candidate in the list mvpListLX, and the code allocation update for the index mvp_idx_lx is repeated each time. Since the code amount reflecting the deletion of the motion vector predictor candidate is assigned to the index mvp_idx_lx of the list mvpListLX for each deletion determination, it is possible to improve the accuracy of the motion vector candidate deletion determination. .
 以上述べたように、実施の形態の動きベクトルの予測方法によれば、ピクチャを矩形ブロックに分割し、ピクチャ間でブロック単位に動き推定、補償を行う動画像符号化における動きベクトルの符号化効率を向上させる為に、既符号化済みの周囲のブロック等の動きベクトルから予測を行い、処理対象のブロックの動きベクトルとその予測値との差分ベクトルを符号化することによって符号量を削減することができる。 As described above, according to the motion vector prediction method of the embodiment, the motion vector coding efficiency in moving picture coding in which a picture is divided into rectangular blocks, and motion estimation and compensation are performed in units of blocks between pictures. In order to improve the performance, prediction is performed from motion vectors of already-encoded surrounding blocks, and the amount of code is reduced by encoding the difference vector between the motion vector of the block to be processed and its predicted value. Can do.
 符号化対象ブロックの動きベクトルを最も効率良く予測符号化するために、予測動きベクトルの候補から最適な予測動きベクトルを判定する際、周囲の隣接ブロックの動きベクトルの中から選択する条件判定を新たに定義することで、予測動きベクトルの候補を削減する。これにより、予測動きベクトルの参照先を表すインデックスの符号量を削減することができ、符号化効率を向上させることができる。 In order to predictively encode the motion vector of the encoding target block with the highest efficiency, a new condition determination for selecting from the motion vectors of neighboring neighboring blocks is newly made when determining the optimal motion vector predictor from the motion vector predictor candidates. By defining the above, the motion vector predictor candidates are reduced. Thereby, the code amount of the index representing the reference destination of the predicted motion vector can be reduced, and the encoding efficiency can be improved.
 このように、実施の形態の動きベクトルの予測方法によれば、複数の予測動きベクトルの中から最適な動きベクトルを選択し、伝送する差分動きベクトルの発生符号量を削減させるとともに、予測動きベクトルの候補数を削減可能となる為、予測動きベクトルを表すインデックスの使用頻度を下げ、インデックスに必要な符号量を削減させて、符号化効率を向上させることができる。 As described above, according to the motion vector prediction method of the embodiment, an optimal motion vector is selected from a plurality of predicted motion vectors, the generated code amount of the differential motion vector to be transmitted is reduced, and the predicted motion vector is also reduced. Therefore, it is possible to reduce the frequency of use of an index representing a predicted motion vector, reduce the amount of code necessary for the index, and improve the coding efficiency.
 以上の符号化及び復号に関する処理は、ハードウェアを用いた伝送、蓄積、受信装置として実現することができるのは勿論のこと、ROM(リード・オンリ・メモリ)やフラッシュメモリ等に記憶されているファームウェアや、コンピュータ等のソフトウェアによっても実現することができる。そのファームウェアプログラム、ソフトウェアプログラムをコンピュータ等で読み取り可能な記録媒体に記録して提供することも、有線あるいは無線のネットワークを通してサーバから提供することも、地上波あるいは衛星ディジタル放送のデータ放送として提供することも可能である。 The above processing relating to encoding and decoding can be realized as a transmission, storage, and reception device using hardware, and is also stored in a ROM (Read Only Memory), a flash memory, or the like. It can also be realized by firmware or software such as a computer. The firmware program and software program can be provided by recording them on a computer-readable recording medium, provided from a server through a wired or wireless network, or provided as a data broadcast of terrestrial or satellite digital broadcasting. Is also possible.
 以上、本発明を実施の形態をもとに説明した。実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。 The present invention has been described based on the embodiments. The embodiments are exemplifications, and it will be understood by those skilled in the art that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are within the scope of the present invention. .
 101 動きベクトル検出部、 102 減算部、 103 直交変換・量子化部、 104 可変長符号化部、 105 逆量子化・逆直交変換部、 106 動き補償部、 107 重み付き予測部、 108 加算部、 109 デブロッキング・フィルタ部、 110 メモリ、 111 予測動きベクトル選択部 125、135 予測動きベクトル選択部、 120、130 予測動きベクトル候補生成部、 121 予測動きベクトル候補同一判定部、 122、132 予測動きベクトル候補削除部、 123、133 予測動きベクトル判定部、 124、134 減算部、 201 可変長復号部、 202 逆量子化・逆直交変換部、 203 動き補償部、 204 重み付き予測部、 205 加算部、 206 デブロッキング・フィルタ部、 207 メモリ、 208 予測動きベクトル選択部、 220、230 予測動きベクトル候補生成部、 221、232 予測動きベクトル候補同一判定部、 222 予測動きベクトル候補削除部、 223、233 予測動きベクトル判定部、 224、234 加算部。 101 motion vector detection unit, 102 subtraction unit, 103 orthogonal transform / quantization unit, 104 variable length coding unit, 105 inverse quantization / inverse orthogonal transform unit, 106 motion compensation unit, 107 weighted prediction unit, 108 addition unit, 109 deblocking filter unit, 110 memory, 111 prediction motion vector selection unit 125, 135 prediction motion vector selection unit, 120, 130 prediction motion vector candidate generation unit, 121 prediction motion vector candidate identity determination unit, 122, 132 prediction motion vector Candidate deletion unit, 123, 133 prediction motion vector determination unit, 124, 134 subtraction unit, 201 variable length decoding unit, 202 inverse quantization / inverse orthogonal transform unit, 203 motion compensation unit, 204 weighted prediction unit, 205 addition unit, 20 Deblocking filter unit, 207 memory, 208 prediction motion vector selection unit, 220, 230 prediction motion vector candidate generation unit, 221, 232 prediction motion vector candidate identity determination unit, 222 prediction motion vector candidate deletion unit, 223, 233 prediction motion Vector determination unit, 224, 234 addition unit.
 本発明は、動画像の符号化及び復号技術に関し、特に動き補償予測を利用した動画像の符号化及び復号技術に関する。 The present invention relates to a moving picture encoding and decoding technique, and more particularly to a moving picture encoding and decoding technique using motion compensation prediction.

Claims (10)

  1.  動画像の各ピクチャを分割したブロック単位で動きベクトルを用いて前記動画像を符号化する動画像符号化装置であって、
     符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済みのブロック及び符号化済みの別のピクチャ内の前記符号化対象ブロックと同一位置のブロックの少なくとも一方の動きベクトルから複数の予測動きベクトルの候補を生成し、前記予測動きベクトルの候補を表すインデックスを付与する予測動きベクトル候補生成部と、
     前記符号化対象ブロックの動きベクトルと前記予測動きベクトルの候補から差分動きベクトルを計算し、前記差分動きベクトルから計算される符号量及び前記予測動きベクトルの候補のインデックスに基づいて前記予測動きベクトルの候補を削除する予測動きベクトル候補削除部と、
     削除後に残存する予測動きベクトルの候補の中から予測動きベクトルを選択する予測動きベクトル判定部とを備えることを特徴とする動画像符号化装置。
    A moving image encoding apparatus that encodes the moving image using a motion vector in units of blocks obtained by dividing each picture of the moving image,
    A plurality of motion vectors from at least one motion vector of an encoded block adjacent to the encoding target block in the same picture as the encoding target block and a block at the same position as the encoding target block in another encoded picture A motion vector predictor candidate generating unit that generates a motion vector predictor candidate and assigns an index representing the motion vector predictor candidate;
    A difference motion vector is calculated from the motion vector of the encoding target block and the prediction motion vector candidate, and the prediction motion vector is calculated based on the code amount calculated from the difference motion vector and the index of the prediction motion vector candidate. A motion vector predictor candidate deletion unit for deleting candidates;
    A motion picture coding apparatus comprising: a motion vector predictor determining unit that selects a motion vector predictor from prediction motion vector candidates remaining after deletion.
  2.  前記予測動きベクトル候補削除部による前記予測動きベクトルの候補の削除に先だって、前記予測動きベクトル候補生成部にて生成された前記予測動きベクトルの候補の中から同一の値を持つ予測動きベクトルの候補を判定して削除する予測動きベクトル候補同一判定部をさらに備えることを特徴とする請求項1に記載の動画像符号化装置。 Prediction of predicted motion vector candidates having the same value from the predicted motion vector candidates generated by the predicted motion vector candidate generation unit prior to deletion of the predicted motion vector candidates by the predicted motion vector candidate deletion unit The moving picture encoding apparatus according to claim 1, further comprising: a predicted motion vector candidate identity determining unit that determines and deletes the motion vector candidate.
  3.  前記予測動きベクトル判定部は、前記差分動きベクトルの符号量が同じ前記予測動きベクトルの候補同士では、前記予測動きベクトルの候補のインデックスの大小比較により選択すべき予測動きベクトルの判定を行うことを特徴とする請求項1または2に記載の動画像符号化装置。 The predicted motion vector determination unit determines a predicted motion vector to be selected by comparing the sizes of the predicted motion vector candidates among the predicted motion vector candidates having the same code amount of the difference motion vector. The moving picture coding apparatus according to claim 1 or 2, characterized in that:
  4.  動画像の各ピクチャを分割したブロック単位で動きベクトルを用いて前記動画像を符号化する動画像符号化方法であって、
     符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済みのブロック及び符号化済みの別のピクチャ内の前記符号化対象ブロックと同一位置のブロックの少なくとも一方の動きベクトルから複数の予測動きベクトルの候補を生成し、前記予測動きベクトルの候補を表すインデックスを付与する予測動きベクトル候補生成ステップと、
     前記符号化対象ブロックの動きベクトルと前記予測動きベクトルの候補から差分動きベクトルを計算し、前記差分動きベクトルから計算される符号量及び前記予測動きベクトルの候補のインデックスに基づいて前記予測動きベクトルの候補を削除する予測動きベクトル候補削除ステップと、
     削除後に残存する予測動きベクトルの候補の中から予測動きベクトルを選択する予測動きベクトル判定ステップとを備えることを特徴とする動画像符号化方法。
    A moving image encoding method for encoding the moving image using a motion vector in units of blocks obtained by dividing each picture of the moving image,
    A plurality of motion vectors from at least one motion vector of an encoded block adjacent to the encoding target block in the same picture as the encoding target block and a block at the same position as the encoding target block in another encoded picture A motion vector predictor candidate generation step for generating a motion vector motion vector candidate and assigning an index representing the motion vector predictor candidate;
    A difference motion vector is calculated from the motion vector of the encoding target block and the prediction motion vector candidate, and the prediction motion vector is calculated based on the code amount calculated from the difference motion vector and the index of the prediction motion vector candidate. A predicted motion vector candidate deletion step of deleting the candidates;
    A motion picture encoding method comprising: a motion vector predicting step for selecting a motion vector predictor from motion vector predictor candidates remaining after deletion.
  5.  コンピュータに、動画像の各ピクチャを分割したブロック単位で動きベクトルを用いて前記動画像を符号化させるための動画像符号化プログラムであって、
     符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済みのブロック及び符号化済みの別のピクチャ内の前記符号化対象ブロックと同一位置のブロックの少なくとも一方の動きベクトルから複数の予測動きベクトルの候補を生成し、前記予測動きベクトルの候補を表すインデックスを付与する予測動きベクトル候補生成ステップと、
     前記符号化対象ブロックの動きベクトルと前記予測動きベクトルの候補から差分動きベクトルを計算し、前記差分動きベクトルから計算される符号量及び前記予測動きベクトルの候補のインデックスに基づいて前記予測動きベクトルの候補を削除する予測動きベクトル候補削除ステップと、
     削除後に残存する予測動きベクトルの候補の中から予測動きベクトルを選択する予測動きベクトル判定ステップとをコンピュータに実行させることを特徴とする動画像符号化プログラム。
    A moving image encoding program for causing a computer to encode the moving image using a motion vector in units of blocks obtained by dividing each picture of the moving image,
    A plurality of motion vectors from at least one motion vector of an encoded block adjacent to the encoding target block in the same picture as the encoding target block and a block at the same position as the encoding target block in another encoded picture A motion vector predictor candidate generation step for generating a motion vector motion vector candidate and assigning an index representing the motion vector predictor candidate;
    A difference motion vector is calculated from the motion vector of the encoding target block and the prediction motion vector candidate, and the prediction motion vector is calculated based on the code amount calculated from the difference motion vector and the index of the prediction motion vector candidate. A predicted motion vector candidate deletion step of deleting the candidates;
    A moving picture coding program that causes a computer to execute a predicted motion vector determination step of selecting a predicted motion vector from prediction motion vector candidates remaining after deletion.
  6.  動画像の各ピクチャを分割したブロック単位で動きベクトルを用いて前記動画像が符号化されたビットストリームを復号する動画像復号装置であって、
     復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロック及び復号済みの別のピクチャ内の前記復号対象ブロックと同一位置のブロックの少なくとも一方の動きベクトルから複数の予測動きベクトルの候補を生成し、前記予測動きベクトルの候補を表すインデックスを付与する予測動きベクトル候補生成部と、
     ビットストリームから復号された第1差分動きベクトルと予測動きベクトルの候補とを加算して仮の動きベクトルを生成し、前記仮の動きベクトルと前記仮の動きベクトルの生成に用いられた予測動きベクトルの候補とは異なる予測動きベクトルの候補とから第2差分動きベクトルを計算し、前記第1差分動きベクトルから計算される符号量、前記第2差分動きベクトルから計算される符号量、及び前記予測動きベクトルの候補のインデックスに基づいて前記予測動きベクトルの候補を削除する予測動きベクトル候補削除部と、
     削除後に残存する予測動きベクトルの候補の中から予測動きベクトルを選択する予測動きベクトル判定部とを備えることを特徴とする動画像復号装置。
    A moving picture decoding apparatus for decoding a bitstream in which the moving picture is encoded using a motion vector in units of blocks obtained by dividing each picture of the moving picture,
    A plurality of predicted motion vectors from at least one motion vector of a decoded block adjacent to the decoding target block in the same picture as the decoding target block and a block at the same position as the decoding target block in another decoded picture A motion vector predictor candidate generating unit that generates a candidate and assigns an index representing the motion vector predictor candidate;
    The first differential motion vector decoded from the bit stream and the predicted motion vector candidate are added to generate a temporary motion vector, and the predicted motion vector used to generate the temporary motion vector and the temporary motion vector A second difference motion vector is calculated from a prediction motion vector candidate different from the candidate of the first motion vector, a code amount calculated from the first difference motion vector, a code amount calculated from the second difference motion vector, and the prediction A motion vector predictor candidate deletion unit that deletes the motion vector predictor candidate based on a motion vector candidate index;
    A motion picture decoding apparatus comprising: a prediction motion vector determination unit that selects a prediction motion vector from prediction motion vector candidates remaining after deletion.
  7.  前記予測動きベクトル候補削除部による前記予測動きベクトルの候補の削除に先だって、前記予測動きベクトル候補生成部にて生成された前記予測動きベクトルの候補の中から同一の値を持つ予測動きベクトルの候補を判定して削除する予測動きベクトル候補同一判定部をさらに備えることを特徴とする請求項6に記載の動画像復号装置。 Prediction of predicted motion vector candidates having the same value from the predicted motion vector candidates generated by the predicted motion vector candidate generation unit prior to deletion of the predicted motion vector candidates by the predicted motion vector candidate deletion unit The moving picture decoding apparatus according to claim 6, further comprising a predicted motion vector candidate identity determining unit that determines and deletes the motion vector candidate.
  8.  前記予測動きベクトル判定部は、前記第1差分動きベクトルの符号量と前記第2差分動きベクトルの符号量とが同じとなる前記予測動きベクトルの候補同士では、前記予測動きベクトルの候補のインデックスの大小比較により選択すべき予測動きベクトルの判定を行うことを特徴とする請求項6または7に記載の動画像復号装置。 The predictive motion vector determination unit may determine an index of the predictive motion vector candidate between the predictive motion vector candidates in which the code amount of the first differential motion vector and the code amount of the second differential motion vector are the same. 8. The moving picture decoding apparatus according to claim 6, wherein a prediction motion vector to be selected is determined by size comparison.
  9.  動画像の各ピクチャを分割したブロック単位で動きベクトルを用いて前記動画像が符号化されたビットストリームを復号する動画像復号方法であって、
     復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロック及び復号済みの別のピクチャ内の前記復号対象ブロックと同一位置のブロックの少なくとも一方の動きベクトルから複数の予測動きベクトルの候補を生成し、前記予測動きベクトルの候補を表すインデックスを付与する予測動きベクトル候補生成ステップと、
     ビットストリームから復号された第1差分動きベクトルと予測動きベクトルの候補とを加算して仮の動きベクトルを生成し、前記仮の動きベクトルと前記仮の動きベクトルの生成に用いられた予測動きベクトルの候補とは異なる予測動きベクトルの候補とから第2差分動きベクトルを計算し、前記第1差分動きベクトルから計算される符号量、前記第2差分動きベクトルから計算される符号量、及び前記予測動きベクトルの候補のインデックスに基づいて前記予測動きベクトルの候補を削除する予測動きベクトル候補削除ステップと、
     削除後に残存する予測動きベクトルの候補の中から予測動きベクトルを選択する予測動きベクトル判定ステップとを備えることを特徴とする動画像復号方法。
    A moving picture decoding method for decoding a bitstream in which the moving picture is encoded using a motion vector in units of blocks obtained by dividing each picture of the moving picture,
    A plurality of predicted motion vectors from at least one motion vector of a decoded block adjacent to the decoding target block in the same picture as the decoding target block and a block at the same position as the decoding target block in another decoded picture A predicted motion vector candidate generating step of generating a candidate and assigning an index representing the predicted motion vector candidate;
    The first differential motion vector decoded from the bit stream and the predicted motion vector candidate are added to generate a temporary motion vector, and the predicted motion vector used to generate the temporary motion vector and the temporary motion vector A second difference motion vector is calculated from a prediction motion vector candidate different from the candidate of the first motion vector, a code amount calculated from the first difference motion vector, a code amount calculated from the second difference motion vector, and the prediction A motion vector predictor candidate deletion step for deleting the motion vector predictor candidate based on a motion vector candidate index;
    A motion picture decoding method comprising: a motion vector predictor determining step of selecting a motion vector predictor from motion vector motion vector candidates remaining after deletion.
  10.  コンピュータに、動画像の各ピクチャを分割したブロック単位で動きベクトルを用いて前記動画像が符号化されたビットストリームを復号するための動画像復号プログラムであって、
     復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロック及び復号済みの別のピクチャ内の前記復号対象ブロックと同一位置のブロックの少なくとも一方の動きベクトルから複数の予測動きベクトルの候補を生成し、前記予測動きベクトルの候補を表すインデックスを付与する予測動きベクトル候補生成ステップと、
     ビットストリームから復号された第1差分動きベクトルと予測動きベクトルの候補とを加算して仮の動きベクトルを生成し、前記仮の動きベクトルと前記仮の動きベクトルの生成に用いられた予測動きベクトルの候補とは異なる予測動きベクトルの候補とから第2差分動きベクトルを計算し、前記第1差分動きベクトルから計算される符号量、前記第2差分動きベクトルから計算される符号量、及び前記予測動きベクトルの候補のインデックスに基づいて前記予測動きベクトルの候補を削除する予測動きベクトル候補削除ステップと、
     削除後に残存する予測動きベクトルの候補の中から予測動きベクトルを選択する予測動きベクトル判定ステップとをコンピュータに実行させることを特徴とする動画像復号プログラム。
    A moving picture decoding program for decoding a bit stream in which the moving picture is encoded using a motion vector in units of blocks obtained by dividing each picture of the moving picture on a computer,
    A plurality of predicted motion vectors from at least one motion vector of a decoded block adjacent to the decoding target block in the same picture as the decoding target block and a block at the same position as the decoding target block in another decoded picture A predicted motion vector candidate generating step of generating a candidate and assigning an index representing the predicted motion vector candidate;
    The first differential motion vector decoded from the bit stream and the predicted motion vector candidate are added to generate a temporary motion vector, and the predicted motion vector used to generate the temporary motion vector and the temporary motion vector A second difference motion vector is calculated from a prediction motion vector candidate different from the candidate of the first motion vector, a code amount calculated from the first difference motion vector, a code amount calculated from the second difference motion vector, and the prediction A motion vector predictor candidate deletion step for deleting the motion vector predictor candidate based on a motion vector candidate index;
    A moving picture decoding program that causes a computer to execute a predicted motion vector determination step of selecting a predicted motion vector from prediction motion vector candidates remaining after deletion.
PCT/JP2011/006797 2010-12-28 2011-12-05 Video encoding device, video encoding method, and video encoding program, and video decoding device, video decoding method, and video decoding program WO2012090397A1 (en)

Applications Claiming Priority (8)

Application Number Priority Date Filing Date Title
JP2010-293264 2010-12-28
JP2010293263 2010-12-28
JP2010-293263 2010-12-28
JP2010293264 2010-12-28
JP2011-045649 2011-03-02
JP2011045649A JP2012151818A (en) 2010-12-28 2011-03-02 Video encoding device, video encoding method, and video encoding program
JP2011-045650 2011-03-02
JP2011045650A JP2012151819A (en) 2010-12-28 2011-03-02 Video decoding device, video decoding method, and video decoding program

Publications (1)

Publication Number Publication Date
WO2012090397A1 true WO2012090397A1 (en) 2012-07-05

Family

ID=46382541

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/006797 WO2012090397A1 (en) 2010-12-28 2011-12-05 Video encoding device, video encoding method, and video encoding program, and video decoding device, video decoding method, and video decoding program

Country Status (1)

Country Link
WO (1) WO2012090397A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016008423A1 (en) * 2014-07-18 2016-01-21 Mediatek Inc. Method and apparatus for assigning motion vector predictor to sub-block without performing associated iteration of sub-block motion vector predictor determination flow

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002010269A (en) * 2000-06-27 2002-01-11 Mitsubishi Electric Corp Method for detecting motion vector and device for coding moving pictures
JP2004241880A (en) * 2003-02-04 2004-08-26 Sony Corp Apparatus and method for image processing, recording medium, and program
JP2008283490A (en) * 2007-05-10 2008-11-20 Ntt Docomo Inc Moving image encoding device, method and program, and moving image decoding device, method and program
WO2010064396A1 (en) * 2008-12-03 2010-06-10 株式会社日立製作所 Moving picture decoding method and moving picture encoding method
WO2011048903A1 (en) * 2009-10-20 2011-04-28 シャープ株式会社 Video encoding device, video decoding device, and data structure
WO2011062082A1 (en) * 2009-11-17 2011-05-26 シャープ株式会社 Video encoder and video decoder
WO2011099463A1 (en) * 2010-02-09 2011-08-18 日本電信電話株式会社 Predictive coding method for motion vector, predictive decoding method for motion vector, video coding device, video decoding device, and programs therefor
WO2011099468A1 (en) * 2010-02-09 2011-08-18 日本電信電話株式会社 Predictive coding method for motion vector, predictive decoding method for motion vector, video coding device, video decoding device, and programs therefor
WO2011099428A1 (en) * 2010-02-09 2011-08-18 日本電信電話株式会社 Predictive coding method for motion vector, predictive decoding method for motion vector, video coding device, video decoding device, and programs therefor
WO2011099440A1 (en) * 2010-02-09 2011-08-18 日本電信電話株式会社 Predictive coding method for motion vector, predictive decoding method for motion vector, video coding device, video decoding device, and programs therefor

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002010269A (en) * 2000-06-27 2002-01-11 Mitsubishi Electric Corp Method for detecting motion vector and device for coding moving pictures
JP2004241880A (en) * 2003-02-04 2004-08-26 Sony Corp Apparatus and method for image processing, recording medium, and program
JP2008283490A (en) * 2007-05-10 2008-11-20 Ntt Docomo Inc Moving image encoding device, method and program, and moving image decoding device, method and program
WO2010064396A1 (en) * 2008-12-03 2010-06-10 株式会社日立製作所 Moving picture decoding method and moving picture encoding method
WO2011048903A1 (en) * 2009-10-20 2011-04-28 シャープ株式会社 Video encoding device, video decoding device, and data structure
WO2011062082A1 (en) * 2009-11-17 2011-05-26 シャープ株式会社 Video encoder and video decoder
WO2011099463A1 (en) * 2010-02-09 2011-08-18 日本電信電話株式会社 Predictive coding method for motion vector, predictive decoding method for motion vector, video coding device, video decoding device, and programs therefor
WO2011099468A1 (en) * 2010-02-09 2011-08-18 日本電信電話株式会社 Predictive coding method for motion vector, predictive decoding method for motion vector, video coding device, video decoding device, and programs therefor
WO2011099428A1 (en) * 2010-02-09 2011-08-18 日本電信電話株式会社 Predictive coding method for motion vector, predictive decoding method for motion vector, video coding device, video decoding device, and programs therefor
WO2011099440A1 (en) * 2010-02-09 2011-08-18 日本電信電話株式会社 Predictive coding method for motion vector, predictive decoding method for motion vector, video coding device, video decoding device, and programs therefor

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
FRANK BOSSEN ET AL.: "Simplified motion vector coding method", JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11 2ND MEETING, July 2010 (2010-07-01), GENEVA, CH *
JOEL JUNG ET AL.: "Competition- Based Scheme for Motion Vector Selection and Coding", ITU-TELECOMMUNICATIONS STANDARDIZATION SECTOR STUDY GROUP 16 QUESTION 6 VIDEO CODING EXPERTS GROUP (VCEG) 29TH MEETING, July 2006 (2006-07-01), KLAGENFURT, AUSTRIA *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016008423A1 (en) * 2014-07-18 2016-01-21 Mediatek Inc. Method and apparatus for assigning motion vector predictor to sub-block without performing associated iteration of sub-block motion vector predictor determination flow
US9894382B2 (en) 2014-07-18 2018-02-13 Mediatek Inc. Method and apparatus for assigning motion vector predictor to sub-block without performing associated iteration of sub-block motion vector predictor determination flow

Similar Documents

Publication Publication Date Title
KR102044250B1 (en) Method for video decoding and computer readable redording meduim thereof
KR102085183B1 (en) Method and apparatus for encoding and decoding motion information
JP7225381B2 (en) Method and apparatus for processing video signals based on inter-prediction
JP7271768B2 (en) Candidate list sharing method and apparatus using such method
KR101604461B1 (en) Method and apparatus for decoding motion an image
WO2012108701A2 (en) Method for storing motion information and method for inducing temporal motion vector predictor using same
WO2012090397A1 (en) Video encoding device, video encoding method, and video encoding program, and video decoding device, video decoding method, and video decoding program
JP2013038747A (en) Moving picture encoder, moving picture encoding method and moving picture encoding program
JP2013038748A (en) Moving picture decoder, moving picture decoding method and moving picture decoding program
JP2012151818A (en) Video encoding device, video encoding method, and video encoding program
JP2012151819A (en) Video decoding device, video decoding method, and video decoding program

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: 11853095

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11853095

Country of ref document: EP

Kind code of ref document: A1