JP2015111910A - Video decoding device, video decoding method, and video decoding program - Google Patents

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

Info

Publication number
JP2015111910A
JP2015111910A JP2015016820A JP2015016820A JP2015111910A JP 2015111910 A JP2015111910 A JP 2015111910A JP 2015016820 A JP2015016820 A JP 2015016820A JP 2015016820 A JP2015016820 A JP 2015016820A JP 2015111910 A JP2015111910 A JP 2015111910A
Authority
JP
Japan
Prior art keywords
motion vector
prediction
prediction block
list
block
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2015016820A
Other languages
Japanese (ja)
Inventor
博哉 中村
Hiroya Nakamura
博哉 中村
西谷 勝義
Katsuyoshi Nishitani
勝義 西谷
福島 茂
Shigeru Fukushima
茂 福島
上田 基晴
Motoharu Ueda
基晴 上田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JVCKenwood Corp
Original Assignee
JVCKenwood Corp
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
Application filed by JVCKenwood Corp filed Critical JVCKenwood Corp
Priority to JP2015016820A priority Critical patent/JP2015111910A/en
Publication of JP2015111910A publication Critical patent/JP2015111910A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a video decoding device, a video decoding method, a video decoding program, a receiving device, a receiving method and a receiving program, which reduces an entire coded amount by compression of coded information in an image coding method using motion-compensating prediction.SOLUTION: A video decoding device comprises: a prediction motion vector candidate creation part 220 creates a plurality of prediction motion vector candidates by prediction from a decoded block adjacent to a decoding target block in the same picture with the decoding target block, and any of decoded blocks located at the position the same as and at the position around the decoding target block in a picture different from the picture of the decoding target block. When a prediction motion vector is predicted from a motion vector which crosses the decoding target image from a time direction predicted from the decoded block at the position the same as or around the decoding target block in the picture different from the picture of the decoding target block on a time axis, the priority of the prediction motion vector from the time direction is raised and registered in a prediction motion vector candidate list.

Description

本発明は、動画像復号技術に関し、特に動き補償予測を利用した動画像復号技術に関す
る。
The present invention relates to a moving picture decoding technique, and more particularly to a moving picture decoding technique using motion compensated prediction.

動画像の圧縮符号化方式の代表的なものとして、MPEG−4 AVC/H.264の
規格がある。MPEG−4 AVC/H.264では、ピクチャを複数の矩形ブロックに
分割し、すでに符号化・復号したピクチャを参照ピクチャとし、参照ピクチャからの動き
を予測する動き補償が用いられている。この動き補償により動きを予測する手法をインタ
ー予測と呼ぶ。MPEG−4 AVC/H.264でのインター予測では、複数のピクチ
ャを参照ピクチャとして用いることができ、これらの複数の参照ピクチャから最も適した
参照ピクチャをブロック毎に選択して動き補償を行う。そこで、それぞれの参照ピクチャ
には参照インデックスが割り当てられ、この参照インデックスにより、参照ピクチャを特
定する。なお、Bピクチャでは、符号化・復号済みの参照ピクチャから最大で2枚を選択
してインター予測に用いることができる。それらの2枚の参照ピクチャからの予測をそれ
ぞれ主に前方向の予測として使われるL0予測(リスト0予測)、主に後方向の予測とし
て使われるL1予測(リスト1予測)として区別している。
As a typical moving image compression encoding method, MPEG-4 AVC / H. There are H.264 standards. MPEG-4 AVC / H. In H.264, motion compensation is used in which a picture is divided into a plurality of rectangular blocks, a picture that has already been encoded / decoded is used as a reference picture, and motion from the reference picture is predicted. A technique for predicting motion by this motion compensation is called inter prediction. MPEG-4 AVC / H. In the inter prediction in H.264, a plurality of pictures can be used as reference pictures, and the most suitable reference picture is selected for each block from the plurality of reference pictures to perform motion compensation. Therefore, a reference index is assigned to each reference picture, and the reference picture is specified by this reference index. Note that, for B pictures, a maximum of two reference pictures that have been encoded and decoded can be selected and used for inter prediction. The predictions from these two reference pictures are distinguished as L0 prediction (list 0 prediction) mainly used as forward prediction and L1 prediction (list 1 prediction) mainly used as backward prediction.

さらに、L0予測とL1予測の2つのインター予測を同時に用いる双予測も定義されて
いる。双予測の場合は、双方向の予測を行い、L0予測、L1予測のそれぞれのインター
予測された信号に重み付け係数を掛け算し、オフセット値を加算して重畳し、最終的なイ
ンター予測信号を生成する。重み付け予測に用いる重み付け係数及びオフセット値はピク
チャ単位で各リストの参照ピクチャ毎に代表的な値が設定され、符号化される。インター
予測に関する符号化情報には、ブロック毎に、L0予測とL1予測、双予測を区別する予
測モード、ブロック毎の参照リスト毎に、参照ピクチャを特定する参照インデックス、ブ
ロックの移動方向・移動量を表す動きベクトルがあり、これらの符号化情報を符号化・復
号する。
Furthermore, bi-prediction using two inter predictions of L0 prediction and L1 prediction at the same time is also defined. In the case of bi-prediction, bi-directional prediction is performed, the inter-predicted signals of L0 prediction and L1 prediction are multiplied by a weighting coefficient, an offset value is added and superimposed, and a final inter prediction signal is generated. To do. As weighting coefficients and offset values used for weighted prediction, representative values are set for each reference picture in each list and encoded. The encoding information related to inter prediction includes, for each block, a prediction mode for distinguishing between L0 prediction and L1 prediction and bi-prediction, a reference index for specifying a reference picture for each reference list for each block, and a moving direction and a moving amount of the block. There is a motion vector that expresses and encodes and decodes the encoded information.

動き補償を行う動画像符号化方式では、各ブロックで生成される動きベクトルの符号量
を削減する為に、動きベクトルに対して予測処理が行われる。MPEG−4 AVC/H
.264では、符号化対象の動きベクトルが周囲の隣接ブロックの動きベクトルと強い相
関があることを利用して、周囲の隣接ブロックからの予測を行うことにより予測動きベク
トルを算出し、符号化対象の動きベクトルと予測動きベクトルとの差分である差分動きベ
クトルを算出し、その差分動きベクトルを符号化することによって符号量を削減している
In a moving picture coding system that performs motion compensation, a prediction process is performed on a motion vector in order to reduce the amount of code of the motion vector generated in each block. MPEG-4 AVC / H
. In H.264, using the fact that the motion vector to be encoded has a strong correlation with the motion vectors of neighboring neighboring blocks, a prediction motion vector is calculated by performing prediction from neighboring neighboring blocks, and the coding target motion vector is calculated. A difference motion vector that is a difference between the motion vector and the predicted motion vector is calculated, and the difference motion vector is encoded to reduce the amount of codes.

具体的には、図48(a)に示されるように、周囲の隣接ブロックA,B,Cの動きベ
クトルから中央値を算出して予測動きベクトルとし、動きベクトルとその予測動きベクト
ルとの差分をとることで動きベクトルの符号量を削減している(非特許文献1)。但し、
図48(b)のように符号化対象ブロックと隣接ブロックとの形状が異なる場合は、左隣
に複数の隣接ブロックがある時はその中の一番上のブロックを、上に複数の隣接ブロック
がある時はその中の一番左のブロックを予測ブロックとし、図48(c)、(d)のよう
に符号化対象ブロックが16×8画素或いは8×16画素で分割される場合は、周囲の隣
接ブロックの動きベクトルの中央値を取るのではなく、動き補償ブロックの配置に応じて
図48(c)、(d)の白抜き矢印で示されるように分割された領域毎に参照先の予測ブ
ロックを決定し、決定された予測ブロックの動きベクトルから予測を実施する。
Specifically, as shown in FIG. 48 (a), a median value is calculated from the motion vectors of neighboring blocks A, B, and C in the vicinity to obtain a predicted motion vector, and the difference between the motion vector and the predicted motion vector As a result, the amount of code of the motion vector is reduced (Non-Patent Document 1). However,
When the shape of the encoding target block and the adjacent block are different as shown in FIG. 48 (b), when there are a plurality of adjacent blocks on the left side, the top block among them is displayed, and the plurality of adjacent blocks on the top. When there is a block, the leftmost block is a prediction block, and when the encoding target block is divided into 16 × 8 pixels or 8 × 16 pixels as shown in FIGS. 48 (c) and 48 (d), Rather than taking the median of the motion vectors of neighboring neighboring blocks, the reference destination is determined for each of the divided areas as indicated by the white arrows in FIGS. 48 (c) and 48 (d) according to the arrangement of the motion compensation blocks. Prediction blocks are determined, and prediction is performed from the motion vectors of the determined prediction blocks.

ISO/IEC 14496-10 Information technology -- Coding of audio-visual objects -- Part 10: Advanced Video CodingISO / IEC 14496-10 Information technology-Coding of audio-visual objects-Part 10: Advanced Video Coding

しかし、非特許文献1に記載された方法では、予測ベクトルは一つしか得られないため
、画像によっては予測動きベクトルの予測精度が低下し、符号化効率が良くならない場合
もあった。
However, in the method described in Non-Patent Document 1, since only one prediction vector is obtained, the prediction accuracy of the prediction motion vector may be lowered depending on the image, and the encoding efficiency may not be improved.

このような状況下、本発明者らは、動き補償予測を使用する画像符号化方式において、
符号化情報をより一層圧縮し、全体の符号量を削減する必要性を認識するに至った。
Under such circumstances, the present inventors in an image coding scheme using motion compensation prediction,
We have come to recognize the need to further compress the encoded information and reduce the overall code amount.

本発明はこうした状況に鑑みてなされたものであり、その目的は、予測動きベクトルの
候補を算出することにより、差分動きベクトルの符号量の削減を図って符号化効率を向上
させる動画像復号技術を提供することにある。また、別の目的は、符号化情報の候補を算
出することにより、符号化情報の符号量の削減を図って符号化効率を向上させる動画像復
号技術を提供することにある。
The present invention has been made in view of such a situation, and an object of the present invention is to provide a moving picture decoding technique for improving the coding efficiency by calculating the prediction motion vector candidates and thereby reducing the code amount of the difference motion vector. Is to provide. Another object is to provide a moving picture decoding technique that improves encoding efficiency by calculating encoding information candidates to reduce the amount of encoded information.

本発明は、動画像の各ピクチャを分割したブロック単位で前記動画像が符号化された符号化ビット列を復号する動画像復号装置であって、復号対象予測ブロックと同一ピクチャ内の前記復号対象予測ブロックと隣接する復号済みの予測ブロックの動きベクトルから、1つ以上の予測動きベクトルの候補を導出し、導出した予測動きベクトルの候補を予測動きベクトル候補リストに登録する予測動きベクトル候補生成部を備え、前記予測動きベクトル候補生成部は、設定された数の予測動きベクトルの候補を得るために、前記復号済みの予測ブロックの内のどの予測ブロックの動きベクトルが予測動きベクトルの候補を導出するための動きベクトルとなるかの判定を行う際、左側の隣接ブロックグループ、及び上側の隣接ブロックグループの隣接ブロックグループ毎に所定順の各予測ブロックに対して、条件1.復号対象予測ブロックで導出対象としている予測動きベクトルの参照リストと同じ参照リストで、同じ参照ピクチャの動きベクトルが存在する、条件2.復号対象予測ブロックで導出対象としている予測動きベクトルの参照リストとは異なる参照リストで、同じ参照ピクチャの動きベクトルが存在する、条件3.復号対象予測ブロックで導出対象としている予測動きベクトルの参照リストと同じ参照リストで、異なる参照ピクチャの動きベクトルが存在する、条件4.復号対象予測ブロックで導出対象としている予測動きベクトルの参照リストとは異なる参照リストで、異なる参照ピクチャの動きベクトルが存在する、の各条件の判定を、まず、条件1,2についてその条件1,2の優先順序で各予測ブロックに対して行い、次に条件3,4についてその条件3,4の優先順序で各予測ブロックに対して行うことを特徴とする動画像復号装置を提供する。   The present invention is a moving picture decoding apparatus for decoding a coded bit string obtained by coding the moving picture in block units obtained by dividing each picture of the moving picture, and the decoding target prediction in the same picture as the decoding target prediction block A prediction motion vector candidate generation unit for deriving one or more prediction motion vector candidates from a motion vector of a decoded prediction block adjacent to the block and registering the derived prediction motion vector candidates in a prediction motion vector candidate list; The prediction motion vector candidate generation unit derives a motion vector predictor of which motion vector of which prediction block of the decoded prediction blocks is obtained in order to obtain a set number of motion vector predictor candidates When determining whether or not the motion vector is the next adjacent block group on the left side and the adjacent block group on the upper side For a given order of the prediction block for each block group, condition 1. Condition 2. A motion vector of the same reference picture exists in the same reference list as the reference list of the motion vector predictor to be derived in the decoding target prediction block. Condition 3, in which a motion vector of the same reference picture exists in a reference list different from the reference list of the motion vector predictor to be derived in the decoding target prediction block. Condition 4. A motion vector of a different reference picture exists in the same reference list as the reference list of the motion vector predictor to be derived in the decoding target prediction block. The determination of each condition that a motion vector of a different reference picture exists in a reference list different from the reference list of the motion vector predictor to be derived in the decoding target prediction block is as follows. There is provided a moving picture decoding apparatus characterized in that the processing is performed for each prediction block in the priority order of 2, and then the conditions 3 and 4 are performed for each prediction block in the priority order of the conditions 3 and 4.

なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、記録媒
体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効で
ある。
It should be noted that any combination of the above-described constituent elements and a conversion of the expression of the present invention between a method, an apparatus, a system, a recording medium, a computer program, etc. are also effective as an aspect of the present invention.

本発明によれば、複数の予測動きベクトルを算出し、それら複数の予測動きベクトルの
中から最適な予測動きベクトルを選択し、差分動きベクトルの発生符号量を削減させて、
符号化効率を向上させることができる。また、本発明によれば、複数の符号化情報の候補
を算出し、それら複数の符号化情報の中から最適な動き情報を選択し、伝送する符号化情
報の発生符号量を削減させて、符号化効率を向上させることができる。
According to the present invention, a plurality of predicted motion vectors are calculated, an optimal predicted motion vector is selected from the plurality of predicted motion vectors, the generated code amount of the difference motion vector is reduced,
Encoding efficiency can be improved. Further, according to the present invention, a plurality of encoding information candidates are calculated, optimal motion information is selected from the plurality of encoding information, and the generated code amount of the encoded information to be transmitted is reduced, Encoding efficiency can be improved.

実施の形態に係る動きベクトルの予測方法を実行する動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoder which performs the motion vector prediction method which concerns on embodiment. 実施の形態に係る動きベクトルの予測方法を実行する動画像復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image decoding apparatus which performs the motion vector prediction method which concerns on embodiment. 符号化ブロックを説明する図である。It is a figure explaining an encoding block. 予測ブロックの形状の種類を説明する図である。It is a figure explaining the kind of shape of a prediction block. 予測ブロックグループを説明する図である。It is a figure explaining a prediction block group. 予測ブロックグループを説明する図である。It is a figure explaining a prediction block group. 予測ブロックグループを説明する図である。It is a figure explaining a prediction block group. 予測ブロックグループを説明する図である。It is a figure explaining a prediction block group. 予測ブロックグループを説明する図である。It is a figure explaining a prediction block group. 動きベクトルの予測方法に関するスライスレベルでのビットストリームのシンタックスを説明する図である。It is a figure explaining the syntax of the bit stream in the slice level regarding the prediction method of a motion vector. 動きベクトルの予測方法に関する予測ブロックレベルでのビットストリームのシンタックスを説明する図である。It is a figure explaining the syntax of the bit stream in the prediction block level regarding the prediction method of a motion vector. 図1の差分動きベクトル算出部の詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure of the difference motion vector calculation part of FIG. 図2の動きベクトル算出部の詳細な構成を示すブロック図である。FIG. 3 is a block diagram illustrating a detailed configuration of a motion vector calculation unit in FIG. 2. 図1の差分動きベクトル算出部の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the difference motion vector calculation part of FIG. 図2の動きベクトル算出部の動作を説明するフローチャートである。3 is a flowchart illustrating an operation of a motion vector calculation unit in FIG. 2. 動きベクトルの予測方法を説明するフローチャートである。It is a flowchart explaining the prediction method of a motion vector. 予測動きベクトルの候補算出方法を説明するフローチャートである。It is a flowchart explaining the prediction motion vector candidate calculation method. 予測動きベクトルの候補算出方法を説明するフローチャートである。It is a flowchart explaining the prediction motion vector candidate calculation method. 予測動きベクトルの候補算出方法を説明するフローチャートである。It is a flowchart explaining the prediction motion vector candidate calculation method. 予測動きベクトルの候補算出方法を説明するフローチャートである。It is a flowchart explaining the prediction motion vector candidate calculation method. 予測動きベクトルの候補算出方法を説明するフローチャートである。It is a flowchart explaining the prediction motion vector candidate calculation method. 動きベクトルのスケーリング方法を説明するフローチャートである。It is a flowchart explaining the scaling method of a motion vector. 動きベクトルのスケーリングを説明する図である。It is a figure explaining scaling of a motion vector. 予測動きベクトルの候補算出方法を説明するフローチャートである。It is a flowchart explaining the prediction motion vector candidate calculation method. 予測動きベクトルの候補算出方法を説明するフローチャートである。It is a flowchart explaining the prediction motion vector candidate calculation method. 予測動きベクトルの候補算出方法を説明するフローチャートである。It is a flowchart explaining the prediction motion vector candidate calculation method. 予測動きベクトルの候補算出方法を説明するフローチャートである。It is a flowchart explaining the prediction motion vector candidate calculation method. 予測動きベクトルの候補算出方法を説明するフローチャートである。It is a flowchart explaining the prediction motion vector candidate calculation method. 予測動きベクトルの候補算出方法を説明するフローチャートである。It is a flowchart explaining the prediction motion vector candidate calculation method. 予測動きベクトル候補リストへの予測動きベクトルの候補の登録方法を説明するフローチャートである。It is a flowchart explaining the registration method of the candidate of a motion vector predictor to a motion vector predictor candidate list. 予測動きベクトル候補リストへの予測動きベクトルの候補の登録方法を説明するフローチャートである。It is a flowchart explaining the registration method of the candidate of a motion vector predictor to a motion vector predictor candidate list. 予測動きベクトル候補リストへの予測動きベクトルの候補の登録方法を説明するフローチャートである。It is a flowchart explaining the registration method of the candidate of a motion vector predictor to a motion vector predictor candidate list. 予測動きベクトル候補リストへの予測動きベクトルの候補の登録方法を説明するフローチャートである。It is a flowchart explaining the registration method of the candidate of a motion vector predictor to a motion vector predictor candidate list. 予測動きベクトル候補リストへの予測動きベクトルの候補の登録方法を説明するフローチャートである。It is a flowchart explaining the registration method of the candidate of a motion vector predictor to a motion vector predictor candidate list. 予測動きベクトル候補リストへの予測動きベクトルの候補の登録方法を説明するフローチャートである。It is a flowchart explaining the registration method of the candidate of a motion vector predictor to a motion vector predictor candidate list. 予測動きベクトル候補リストへの予測動きベクトルの候補の登録方法を説明するフローチャートである。It is a flowchart explaining the registration method of the candidate of a motion vector predictor to a motion vector predictor candidate list. マージ・モードでの周辺の予測ブロックを説明する図である。It is a figure explaining the surrounding prediction block in merge mode. 図1のインター予測情報推定部の詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure of the inter prediction information estimation part of FIG. 図2のインター予測情報推定部の詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure of the inter prediction information estimation part of FIG. マージ・モードの動作を説明するフローチャートである。It is a flowchart explaining operation | movement of merge mode. マージ・モードの動作を説明するフローチャートである。It is a flowchart explaining operation | movement of merge mode. マージ・モードの動作を説明するフローチャートである。It is a flowchart explaining operation | movement of merge mode. マージ・モードの動作を説明するフローチャートである。It is a flowchart explaining operation | movement of merge mode. マージ・モードの動作を説明するフローチャートである。It is a flowchart explaining operation | movement of merge mode. マージ・モードの動作を説明するフローチャートである。It is a flowchart explaining operation | movement of merge mode. マージ・モードの動作を説明するフローチャートである。It is a flowchart explaining operation | movement of merge mode. マージ・モードの動作を説明するフローチャートである。It is a flowchart explaining operation | movement of merge mode. 従来の予測動きベクトルの算出方法を説明する図である。It is a figure explaining the calculation method of the conventional prediction motion vector.

実施の形態では、動画像の符号化に関し、特にピクチャを矩形ブロックに分割し、ピク
チャ間でブロック単位に動き補償を行う動画像符号化における符号化効率を向上させる為
に、符号化済みの周囲のブロックの動きベクトルから複数の予測動きベクトルを算出し、
符号化対象のブロックの動きベクトルと選択された予測動きベクトルとの差分ベクトルを
算出して符号化することによって符号量を削減する。あるいは、符号化済みの周囲のブロ
ックの符号化情報を利用することにより、符号化対象ブロックの符号化情報を推定するこ
とによって符号量を削減する。また、動画像の復号の場合は、復号済みの周囲のブロック
の動きベクトルから複数の予測動きベクトルを算出し、符号化ストリームから復号された
差分ベクトルと選択された予測動きベクトルとから復号対象のブロックの動きベクトルを
算出して復号する。あるいは、復号済みの周囲のブロックの符号化情報を利用することに
より、復号対象ブロックの符号化情報を推定する。
In the embodiment, with regard to video encoding, in particular, in order to improve encoding efficiency in video encoding in which a picture is divided into rectangular blocks and motion compensation is performed in units of blocks between pictures, A plurality of predicted motion vectors from the motion vector of the block,
The amount of code is reduced by calculating and encoding a difference vector between the motion vector of the block to be encoded and the selected predicted motion vector. Alternatively, the amount of code is reduced by estimating the encoding information of the encoding target block by using the encoding information of the surrounding blocks that have already been encoded. Also, in the case of decoding a moving image, a plurality of predicted motion vectors are calculated from the motion vectors of the peripheral blocks that have been decoded, and a decoding target is calculated from the difference vector decoded from the encoded stream and the selected predicted motion vector. The motion vector of the block is calculated and decoded. Alternatively, the encoding information of the decoding target block is estimated by using the encoding information of the peripheral blocks that have been decoded.

図1は実施の形態に係る動画像符号化装置の構成を示すブロック図である。実施の形態
の動画像符号化装置は、画像メモリ101、動きベクトル検出部102、差分動きベクト
ル算出部103、インター予測情報推定部104、動き補償予測部105、予測方法決定
部106、残差信号生成部107、直交変換・量子化部108、第1の符号化ビット列生
成部109、第2の符号化ビット列生成部110、多重化部111、逆量子化・逆直交変
換部112、復号画像信号重畳部113、符号化情報格納メモリ114、および復号画像
メモリ115を備える。
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 an image memory 101, a motion vector detection unit 102, a difference motion vector calculation unit 103, an inter prediction information estimation unit 104, a motion compensation prediction unit 105, a prediction method determination unit 106, a residual signal. Generation unit 107, orthogonal transform / quantization unit 108, first encoded bit string generation unit 109, second encoded bit string generation unit 110, multiplexing unit 111, inverse quantization / inverse orthogonal transform unit 112, decoded image signal A superimposing unit 113, an encoded information storage memory 114, and a decoded image memory 115 are provided.

画像メモリ101は、撮影/表示時間順に供給された符号化対象の画像信号を一時格納
する。画像メモリ101は、格納された符号化対象の画像信号を、所定の画素ブロック単
位で、動きベクトル検出部102、予測方法決定部106、および残差信号生成部107
に供給する。その際、撮影/表示時間順に格納された画像は、符号化順序に並べ替えられ
て、画素ブロック単位で、画像メモリ101から出力される。
The image memory 101 temporarily stores image signals to be encoded supplied in the order of shooting / display time. The image memory 101 stores the image signal to be encoded in a predetermined pixel block unit, a motion vector detection unit 102, a prediction method determination unit 106, and a residual signal generation unit 107.
To supply. At this time, the images stored in the order of shooting / display time are rearranged in the encoding order and output from the image memory 101 in units of pixel blocks.

動きベクトル検出部102は、画像メモリ101から供給される画像信号と復号画像メ
モリ115から供給される復号画像(参照ピクチャ)間でブロックマッチング等により各
予測ブロックサイズ、各予測モードごとの動きベクトルを各予測ブロック単位で検出し、
検出された動きベクトルを動き補償予測部105、差分動きベクトル算出部103、およ
び予測方法決定部106に供給する。ここで、予測ブロックは動き補償を行う単位であり
、詳細については後述する。
The motion vector detection unit 102 calculates a motion vector for each prediction block size and each prediction mode by block matching or the like between the image signal supplied from the image memory 101 and the decoded image (reference picture) supplied from the decoded image memory 115. Detect for each prediction block,
The detected motion vector is supplied to the motion compensation prediction unit 105, the difference motion vector calculation unit 103, and the prediction method determination unit 106. Here, the prediction block is a unit for performing motion compensation, and details thereof will be described later.

差分動きベクトル算出部103は、符号化情報格納メモリ114に記憶されている既に
符号化された画像信号の符号化情報を用いて、複数の予測動きベクトルの候補を算出して
後述するMVPリストに登録し、MVPリストに登録された複数の予測動きベクトルの候
補の中から最適な予測動きベクトルを選択し、動きベクトル検出部102が検出した動き
ベクトルと予測動きベクトルから差分動きベクトルを算出し、算出された差分動きベクト
ルを予測方法決定部106に供給する。
The difference motion vector calculation unit 103 calculates a plurality of motion vector predictor candidates using the encoded information of the already encoded image signal stored in the encoded information storage memory 114, and puts it in an MVP list to be described later. Registering, selecting an optimal motion vector predictor from a plurality of motion vector predictor candidates registered in the MVP list, calculating a motion vector difference from the motion vector detected by the motion vector detection unit 102 and the motion vector predictor, The calculated difference motion vector is supplied to the prediction method determination unit 106.

これらの符号化情報に加えて、後述するように予測ブロックごとに重みづけ予測に用い
る重み付けパラメータを切り替える場合は、選択された予測ブロックの重み付け予測の重
み付けパラメータ(動き補償画像信号に乗算する重みづけ係数値及び加算する重み付けオ
フセット値)も予測方法決定部106に供給する。
In addition to the encoded information, when switching the weighting parameter used for weighted prediction for each prediction block as will be described later, the weighting parameter for weighted prediction of the selected prediction block (weighting to multiply the motion compensation image signal) The coefficient value and the weighting offset value to be added) are also supplied to the prediction method determination unit 106.

さらに、MVPリストに登録された予測動きベクトルの候補から選択された予測動きベ
クトルを特定するMVPインデックスを予測方法決定部106に供給する。差分動きベク
トル算出部103の詳細な構成と動作は後述する。
Further, the prediction method determination unit 106 is supplied with an MVP index that identifies a prediction motion vector selected from prediction motion vector candidates registered in the MVP list. The detailed configuration and operation of the difference motion vector calculation unit 103 will be described later.

インター予測情報推定部104は、マージモードのインター予測情報を推定する。マー
ジモードとは、当該予測ブロックの予測モード、参照インデックス(参照リストに登録さ
れている複数の参照画像から動き補償予測に利用する参照画像を特定するための情報)、
動きベクトル等のインター予測情報を符号化するのではなく、符号化済みの隣接するイン
ター予測された予測ブロック、あるいは異なる画像のインター予測された予測ブロックの
インター予測情報を利用するモードである。符号化情報格納メモリ114に記憶されてい
る既に符号化された予測ブロックの符号化情報を用いて、複数のマージの候補(インター
予測情報の候補)を算出て後述するマージ候補リストに登録し、マージ候補リストに登録
された複数のマージ候補の中から最適なマージ候補を選択し、選択されたマージ候補の予
測モード、参照インデックス、動きベクトル等のインター予測情報を動き補償予測部10
5に供給するとともに、選択されたマージ候補を特定するマージインデックスを予測方法
決定部106に供給する。これらの符号化情報に加えて、後述するように予測ブロックご
とに重み付けパラメータを切り替える場合は、選択されたマージ候補の重み付け予測の重
み付けパラメータも動き補償予測部105に供給する。さらに、選択されたマージ候補を
特定するマージインデックスを予測方法決定部106に供給する。なお、これらの符号化
情報に加えて、選択された符号化済みの予測ブロックの量子化の量子化パラメータ等の符
号化情報も予測値として利用することができ、予測する場合は予測する符号化情報を予測
方法決定部106に供給する。インター予測情報推定部104の詳細な構成と動作は後述
する。
The inter prediction information estimation unit 104 estimates inter prediction information in merge mode. The merge mode is a prediction mode of the prediction block, a reference index (information for specifying a reference image used for motion compensation prediction from a plurality of reference images registered in the reference list),
In this mode, inter prediction information such as a motion vector is not encoded, but inter prediction information of an adjacent inter-predicted prediction block that has been encoded or an inter-predicted prediction block of a different image is used. Using the encoding information of the already encoded prediction block stored in the encoding information storage memory 114, a plurality of merge candidates (inter prediction information candidates) are calculated and registered in a merge candidate list described later, The optimum merge candidate is selected from a plurality of merge candidates registered in the merge candidate list, and the inter prediction information such as the prediction mode, the reference index, and the motion vector of the selected merge candidate is detected by the motion compensation prediction unit 10.
5 and a merge index for specifying the selected merge candidate is supplied to the prediction method determination unit 106. In addition to the encoded information, when switching the weighting parameter for each prediction block as described later, the weighting parameter for the weighted prediction of the selected merge candidate is also supplied to the motion compensation prediction unit 105. Further, a merge index that identifies the selected merge candidate is supplied to the prediction method determination unit 106. In addition to these pieces of coding information, coding information such as quantization parameters for quantization of the selected coded prediction block can also be used as a predicted value. Information is supplied to the prediction method determination unit 106. The detailed configuration and operation of the inter prediction information estimation unit 104 will be described later.

動き補償予測部105は、動きベクトル検出部102およびインター予測情報推定部1
04により検出された動きベクトルを用いて参照ピクチャから動き補償予測により予測画
像信号を生成し、予測画像信号を予測方法決定部106に供給する。なお、主に前方向の
予測として使われるL0予測、及び主に後方向の予測として使われるL1予測では、片方
向の予測を行う。双予測の場合は、双方向の予測を行い、主に前方向の予測として使われ
るL0予測、主に後方向の予測として使われるL1予測のそれぞれのインター予測された
信号に適応的に重み係数を掛け算し、オフセット値を加算て重畳し、最終的な予測画像信
号を生成する。なお、重み付け予測に用いる重み付け係数、オフセット値から成る重み付
けパラメータはピクチャ単位で切り替えてもよいし、スライス単位で切り替えてもよいし
、予測ブロック単位で切り替えてもよい。この重み付けパラメータは、ピクチャ単位また
はスライス単位で切り替える場合、ピクチャ単位またはスライス単位で各リストの参照ピ
クチャ毎に代表的な値が設定されて符号化される。予測ブロック単位で切り替える場合、
予測ブロック単位に重み付けパラメータが設定されて符号化される。
The motion compensation prediction unit 105 includes a motion vector detection unit 102 and an inter prediction information estimation unit 1.
A prediction image signal is generated by motion compensation prediction from the reference picture using the motion vector detected in 04, and the prediction image signal is supplied to the prediction method determination unit 106. In the L0 prediction mainly used as the forward prediction and the L1 prediction mainly used as the backward prediction, the unidirectional prediction is performed. In the case of bi-prediction, bi-directional prediction is performed, and a weighting factor is adaptively applied to each inter-predicted signal of L0 prediction mainly used as forward prediction and L1 prediction mainly used as backward prediction. Are multiplied, offset values are added and superimposed, and a final predicted image signal is generated. Note that the weighting parameters including weighting coefficients and offset values used for weighted prediction may be switched in units of pictures, may be switched in units of slices, or may be switched in units of prediction blocks. When the weighting parameter is switched in units of pictures or slices, a representative value is set and encoded for each reference picture in each list in units of pictures or slices. When switching by prediction block,
Weighting parameters are set for each prediction block and encoded.

予測方法決定部106は差分動きベクトルの符号量、動き補償予測信号と画像信号との
間の歪量等を評価することにより、複数の予測方法の中から、最適な予測ブロックサイズ
(予測ブロックサイズについては図4を参照して後述する)、予測モード、マージモード
か否か等の予測方法を決定し、決定された予測方法を示す情報、及び決定された予測方法
に応じた差分動きベクトル等を含む符号化情報を第1の符号化ビット列生成部109に供
給する。なお、必要に応じて重み付け予測を行う際に用いる重み付けパラメータ、量子化
/逆量子化を行う際に用いる量子化パラメータの符号化情報の予測値も第1の符号化ビッ
ト列生成部109に供給する。
The prediction method determination unit 106 evaluates the code amount of the difference motion vector, the amount of distortion between the motion compensated prediction signal and the image signal, and the like, so that an optimum prediction block size (prediction block size) is selected from a plurality of prediction methods. 4 will be described later with reference to FIG. 4), a prediction method such as prediction mode, merge mode or the like is determined, information indicating the determined prediction method, a difference motion vector corresponding to the determined prediction method, and the like Is supplied to the first encoded bit string generation unit 109. It should be noted that the weighted parameter used when performing weighted prediction and the predicted value of the encoded information of the quantization parameter used when performing quantization / inverse quantization are supplied to the first encoded bit string generation unit 109 as necessary. .

さらに、予測方法決定部106は、決定された予測方法を示す情報、及び決定された予
測方法に応じた動きベクトル等を含む符号化情報を符号化情報格納メモリ114に格納す
る。なお、必要に応じて予測方法決定部106から供給される重み付け予測の重み付けパ
ラメータを符号化情報格納メモリ114に格納する。予測方法決定部106は、決定され
た予測モードに応じた動き補償予測画像信号を残差信号生成部107と復号画像信号重畳
部113に与える。
Furthermore, the prediction method determination unit 106 stores, in the encoded information storage memory 114, information indicating the determined prediction method and encoded information including a motion vector corresponding to the determined prediction method. Note that the weighting parameter for weighted prediction supplied from the prediction method determination unit 106 is stored in the encoded information storage memory 114 as necessary. The prediction method determination unit 106 provides a motion compensated prediction image signal corresponding to the determined prediction mode to the residual signal generation unit 107 and the decoded image signal superimposition unit 113.

残差信号生成部107は、符号化する画像信号と予測信号との引き算を行い残差信号を
生成し、直交変換・量子化部108に与える。
直交変換・量子化部108は、残差信号に対して量子化パラメータに応じて直交変換及
び量子化を行い直交変換・量子化された残差信号を生成し、第2の符号化ビット列生成部
110と逆量子化・逆直交変換部112に供給する。さらに、直交変換・量子化部108
は、量子化パラメータを符号化情報格納メモリ114に格納する。
The residual signal generation unit 107 generates a residual signal by subtracting the image signal to be encoded and the prediction signal, and supplies the residual signal to the orthogonal transform / quantization unit 108.
The orthogonal transform / quantization unit 108 performs orthogonal transform and quantization on the residual signal in accordance with the quantization parameter to generate an orthogonal transform / quantized residual signal, and a second encoded bit string generation unit 110 and the inverse quantization / inverse orthogonal transform unit 112. Further, the orthogonal transform / quantization unit 108
Stores the quantization parameter in the encoded information storage memory 114.

第1の符号化ビット列生成部109は、シーケンス、ピクチャ、スライス、符号化ブロ
ック単位の情報に加えて、予測ブロック毎に予測方法決定部106によって決定された予
測方法に応じた符号化情報を符号化する。具体的には、インター予測かどうかを判別する
パラメータ、インター予測の場合、マージモードかどうかを判別するパラメータ、マージ
モードの場合はマージ・インデックス、マージモードでない場合は予測モード、MVPイ
ンデックス、差分動きベクトルに関する情報等の符号化情報を後述する規定のシンタック
ス規則に従って符号化して第1の符号化ビット列を生成し、多重化部111に供給する。
なお、マージモードの場合、後述するマージ候補リストに登録されるマージ候補が1つの
場合、マージ・インデックスmergeIdxは0と特定できるので、符号化しない。同
様に、マージモードでない場合、後述するMVPリストに登録される予測動きベクトルの
候補が1つの場合、MVPインデックスmergeIdxは0と特定できるので、符号化
しない。
The first encoded bit string generation unit 109 encodes encoded information according to the prediction method determined by the prediction method determination unit 106 for each prediction block, in addition to information on a sequence, a picture, a slice, and an encoded block unit. Turn into. Specifically, a parameter for determining whether or not inter prediction is used, a parameter for determining whether or not the mode is merge mode in the case of inter prediction, a merge index in the case of merge mode, a prediction mode, MVP index, and difference motion in the case of not being in merge mode Encoding information such as vector information is encoded in accordance with a prescribed syntax rule described later to generate a first encoded bit string, which is supplied to the multiplexing unit 111.
In the merge mode, when there is one merge candidate registered in the merge candidate list described later, the merge index mergeIdx can be specified as 0, and is not encoded. Similarly, when the mode is not the merge mode, if there is one candidate motion vector registered in the MVP list, which will be described later, the MVP index mergeIdx can be specified as 0, so that it is not encoded.

ここで、MVPインデックスを符号化する際、MVPリストにおいて優先順位が高い(
すなわちインデックス番号が小さい)MVPインデックスほど符号長が短い符号を割り当
てて可変長符号化する。同様に、マージ・インデックスを符号化する際、マージリストに
おいて優先順位が高い(すなわちインデックス番号が小さい)マージ・インデックスほど
符号長が短い符号を割り当てて可変長符号化する。
Here, when encoding the MVP index, the MVP list has a high priority (
In other words, a code having a shorter code length is assigned to the MVP index (which has a smaller index number) and variable length coding is performed. Similarly, when encoding a merge index, a variable index is assigned by assigning a code having a shorter code length to a merge index having a higher priority in the merge list (that is, a smaller index number).

なお、重み付け予測を予測ブロック単位で適応的に切り替える場合は、マージモードで
ない場合に予測方法決定部106から供給される重み付け予測の重み付けパラメータも符
号化する。量子化の量子化パラメータ符号化情報の予測値と実際に用いる値との差分を符
号化する。
When adaptively switching weighted prediction in units of prediction blocks, the weighting parameter for weighted prediction supplied from the prediction method determination unit 106 when not in the merge mode is also encoded. The difference between the predicted value of the quantization parameter encoding information for quantization and the value actually used is encoded.

第2の符号化ビット列生成部110は、直交変換及び量子化された残差信号を規定のシ
ンタックス規則に従ってエントロピー符号化して第2の符号化ビット列を生成し、多重化
部111に供給する。多重化部111で、第1の符号化ビット列と第2の符号化ビット列
を規定のシンタックス規則に従って多重化し、ビットストリームを出力する。
The second encoded bit string generation unit 110 generates a second encoded bit string by entropy-encoding the orthogonally transformed and quantized residual signal according to a prescribed syntax rule, and supplies the second encoded bit string to the multiplexing unit 111. The multiplexing unit 111 multiplexes the first encoded bit string and the second encoded bit string in accordance with a prescribed syntax rule, and outputs a bit stream.

逆量子化・逆直交変換部112は、直交変換・量子化部108から供給された直交変換
・量子化された残差信号を逆量子化及び逆直交変換して残差信号を算出し、復号画像信号
重畳部113に供給する。復号画像信号重畳部113は、予測方法決定部106による決
定に応じた予測信号と逆量子化・逆直交変換部112で逆量子化及び逆直交変換された残
差信号を重畳して復号画像を生成し、復号画像メモリ115に格納する。なお、復号画像
に対して符号化によるブロック歪等の歪を減少させるフィルタリング処理を施して、復号
画像メモリ115に格納されることもある。その場合、必要に応じてALFやデブロッキ
ングフィルタ等のポストフィルタの情報を識別するフラグ等の予測された符号化情報を符
号化情報格納メモリ114に格納する。
The inverse quantization / inverse orthogonal transform unit 112 calculates a residual signal by performing inverse quantization and inverse orthogonal transform on the orthogonal transform / quantized residual signal supplied from the orthogonal transform / quantization unit 108 to perform decoding. This is supplied to the image signal superimposing unit 113. The decoded image signal superimposing unit 113 superimposes the prediction signal according to the determination by the prediction method determining unit 106 and the residual signal that has been inversely quantized and inverse orthogonal transformed by the inverse quantization / inverse orthogonal transform unit 112 to generate a decoded image. Generated and stored in the decoded image memory 115. The decoded image may be stored in the decoded image memory 115 after filtering processing for reducing distortion such as block distortion due to encoding. In that case, predicted encoded information such as a flag for identifying information of a post filter such as ALF or a deblocking filter is stored in the encoded information storage memory 114 as necessary.

図2は図1の動画像符号化装置に対応した実施の形態に係る動画像復号装置の構成を
示すブロックである。実施の形態の動画像復号装置は、分離部201、第1符号化ビット
列復号部202、第2符号化ビット列復号部203、動きベクトル算出部204、インタ
ー予測情報推定部205、動き補償予測部206、逆量子化・逆直交変換部207、復号
画像信号重畳部208、符号化情報格納メモリ209、および復号画像メモリ210を備
える。
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 separation unit 201, a first encoded bit string decoding unit 202, a second encoded bit string decoding unit 203, a motion vector calculation unit 204, an inter prediction information estimation unit 205, and a motion compensation prediction unit 206. , An inverse quantization / inverse orthogonal transform unit 207, a decoded image signal superimposing unit 208, an encoded information storage memory 209, and a decoded image memory 210.

図2の動画像復号装置の復号処理は、図1の動画像符号化装置の内部に設けられている
復号処理に対応するものであるから、図2の動き補償予測部206、逆量子化・逆直交変
換部207、復号画像信号重畳部208、符号化情報格納メモリ209、および復号画像
メモリ210の各構成は、図1の動画像符号化装置の動き補償予測部105、逆量子化・
逆直交変換部112、復号画像信号重畳部113、符号化情報格納メモリ114、および
復号画像メモリ115の各構成とそれぞれ対応する機能を有する。
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 the motion compensation prediction unit 206 in FIG. The configurations of the inverse orthogonal transform unit 207, the decoded image signal superimposing unit 208, the encoded information storage memory 209, and the decoded image memory 210 are the motion compensated prediction unit 105 of the moving image encoding device in FIG.
Each of the configurations of the inverse orthogonal transform unit 112, the decoded image signal superimposing unit 113, the encoded information storage memory 114, and the decoded image memory 115 has a corresponding function.

分離部201に供給されるビットストリームは規定のシンタックスの規則に従って分離
し、分離された符号化ビット列が第1符号化ビット列復号部202、第2符号化ビット列
復号部203に供給される。
The bit stream supplied to the separation unit 201 is separated according to a rule of a prescribed syntax, and the separated encoded bit string is supplied to the first encoded bit string decoding unit 202 and the second encoded bit string decoding unit 203.

第1符号化ビット列復号部202は、供給された符号化ビット列を復号して、シーケン
ス、ピクチャ、スライス、符号化ブロック単位の情報、及び、予測ブロック単位の符号化
情報を得る。具体的には、インター予測かどうかを判別するパラメータ、インター予測か
どうかを判別するパラメータ、マージモードの場合はマージ・インデックス、マージモー
ドでない場合は予測モード、MVPインデックス、差分動きベクトル等に関する符号化情
報を後述する規定のシンタックス規則に従って復号し、符号化情報を動きベクトル算出部
204またはインター予測情報推定部205と動き補償予測部206に与えるとともに符
号化情報格納メモリ209に格納する。なお、マージモードの場合、後述するマージ候補
リストに登録されるマージ候補が1つの場合、マージ・インデックスmergeIdxは
0と特定できるので、符号化ビット列には符号化されておらず、mergeIdxを0と
する。したがって、マージモードの場合、第1符号化ビット列復号部202では、インタ
ー予測情報推定部205で算出されたマージ候補リストに登録されるマージ候補の数が供
給される。同様に、マージモードでない場合、後述するMVPリストに登録される予測動
きベクトルの候補が1つの場合、MVPインデックスmvpIdxは0と特定できるので
、符号化されておらず、mvpIdxを0とする。したがって、マージモードでない場合
、第1符号化ビット列復号部202では、動きベクトル算出部204で算出されたMVP
リストに登録される予測動きベクトル候補の数が供給される。
The first encoded bit string decoding unit 202 decodes the supplied encoded bit string to obtain sequence, picture, slice, encoded block unit information, and predicted block unit encoded information. Specifically, a parameter for determining whether or not inter prediction, a parameter for determining whether or not inter prediction, a merge index in the merge mode, a prediction mode, an MVP index, a difference motion vector, etc. in the non-merge mode The information is decoded according to a prescribed syntax rule to be described later, and the encoded information is supplied to the motion vector calculation unit 204 or the inter prediction information estimation unit 205 and the motion compensation prediction unit 206 and stored in the encoded information storage memory 209. In the merge mode, if there is one merge candidate registered in the merge candidate list, which will be described later, the merge index mergeIdx can be specified as 0, so the encoded bit string is not encoded, and mergeIdx is set to 0. To do. Therefore, in the merge mode, the first encoded bit string decoding unit 202 is supplied with the number of merge candidates registered in the merge candidate list calculated by the inter prediction information estimation unit 205. Similarly, when the mode is not the merge mode, when there is one candidate motion vector registered in the MVP list described later, the MVP index mvpIdx can be specified as 0, so it is not encoded, and mvpIdx is set to 0. Therefore, when not in the merge mode, the first encoded bit string decoding unit 202 uses the MVP calculated by the motion vector calculation unit 204.
The number of motion vector predictor candidates registered in the list is supplied.

第2符号化ビット列復号部203は、供給された符号化ビット列を復号して直交変換・
量子化された残差信号を算出し、直交変換・量子化された残差信号を逆量子化・逆直交変
換部207に与える。
The second encoded bit string decoding unit 203 decodes the supplied encoded bit string to perform orthogonal transform /
The quantized residual signal is calculated, and the orthogonal transform / quantized residual signal is supplied to the inverse quantization / inverse orthogonal transform unit 207.

動きベクトル算出部204は、復号対象の予測ブロックがマージモードでない時に、符
号化情報格納メモリ209に記憶されている既に復号された画像信号の符号化情報を用い
て、複数の予測動きベクトルの候補を算出して後述するMVPリストに登録し、MVPリ
ストに登録された複数の予測動きベクトルの候補の中から、第1符号化ビット列復号部2
02で復号され供給される符号化情報に応じた予測動きベクトルを選択し、第1符号化ビ
ット列復号部202で復号された差分ベクトルと選択された予測動きベクトルから動きベ
クトルを算出し、動き補償予測部206に供給するとともに、符号化情報格納メモリ20
9に供給する。さらに、動きベクトル算出部204で算出されたMVPリストに登録され
る予測動きベクトル候補の数を第1符号化ビット列復号部202に供給する。動きベクト
ル算出部204の詳細な構成と動作は後述する。
When the prediction block to be decoded is not in the merge mode, the motion vector calculation unit 204 uses the encoded information of the already decoded image signal stored in the encoded information storage memory 209 to generate a plurality of prediction motion vector candidates. Is calculated and registered in an MVP list, which will be described later, and a first encoded bit string decoding unit 2 is selected from a plurality of motion vector predictor candidates registered in the MVP list.
A prediction motion vector corresponding to the encoded information that is decoded and supplied in 02 is selected, a motion vector is calculated from the difference vector decoded by the first encoded bit string decoding unit 202 and the selected prediction motion vector, and motion compensation is performed. The encoded information storage memory 20 is supplied to the prediction unit 206.
9 is supplied. Furthermore, the number of predicted motion vector candidates registered in the MVP list calculated by the motion vector calculation unit 204 is supplied to the first encoded bit string decoding unit 202. The detailed configuration and operation of the motion vector calculation unit 204 will be described later.

インター予測情報推定部205は、復号対象の予測ブロックがマージモードの時に、マ
ージモードのインター予測情報を推定する。符号化情報格納メモリ114に記憶されてい
る既に復号された予測ブロックの符号化情報を用いて、複数のマージの候補を算出して後
述するマージ候補リストに登録し、マージ候補リストに登録された複数のマージ候補の中
から第1符号化ビット列復号部202で復号され供給されるマージインデックスに対応し
たマージ候補を選択し、選択されたマージ候補の予測モード、参照インデックス、予測動
きベクトル等のインター予測情報を動き補償予測部206に供給するとともに、符号化情
報格納メモリ209に格納する。さらに、インター予測情報推定部205で算出されたマ
ージ候補リストに登録されるマージ候補の数を第1符号化ビット列復号部202に供給す
る。これらの符号化情報に加えて、後述するように予測ブロックごとに重み付けパラメー
タを切り替える場合は、選択されたマージ候補の重み付け予測の重み付けパラメータも動
き補償予測部206に供給する。なお、選択された符号化済みの予測ブロックのこれらの
符号化情報に加えて、量子化の量子化パラメータのインター予測情報以外の符号化情報も
予測値として利用することができ、予測する場合は予測する符号化情報を予測方法決定部
106に供給することもできる。インター予測情報推定部205の詳細な構成と動作は後
述する。
The inter prediction information estimation unit 205 estimates the inter prediction information in the merge mode when the prediction block to be decoded is in the merge mode. A plurality of merge candidates are calculated and registered in a merge candidate list, which will be described later, using the encoded information of the already decoded prediction block stored in the encoded information storage memory 114, and registered in the merge candidate list. A merge candidate corresponding to the merge index decoded and supplied by the first encoded bit string decoding unit 202 is selected from a plurality of merge candidates, and the selected merge candidate prediction mode, reference index, prediction motion vector, etc. are selected. The prediction information is supplied to the motion compensation prediction unit 206 and stored in the encoded information storage memory 209. Further, the number of merge candidates registered in the merge candidate list calculated by the inter prediction information estimation unit 205 is supplied to the first encoded bit string decoding unit 202. In addition to the encoded information, when switching the weighting parameter for each prediction block as described later, the weighting parameter for the weighted prediction of the selected merge candidate is also supplied to the motion compensated prediction unit 206. In addition to the encoded information of the selected encoded prediction block, encoded information other than the inter prediction information of the quantization parameter of quantization can also be used as a prediction value. Coding information to be predicted can also be supplied to the prediction method determination unit 106. The detailed configuration and operation of the inter prediction information estimation unit 205 will be described later.

動き補償予測部206は、動きベクトル算出部204で算出された動きベクトルを用い
て参照ピクチャから動き補償予測により予測画像信号を生成し、予測画像信号を復号画像
信号重畳部208に供給する。なお、両予測の場合は、L0予測、L1予測の2つの動き
補償予測画像信号に適応的に重み係数を掛け算して重畳し、最終的な予測画像信号を生成
する。
The motion compensation prediction unit 206 generates a prediction image signal by motion compensation prediction from the reference picture using the motion vector calculated by the motion vector calculation unit 204, and supplies the prediction image signal to the decoded image signal superimposition unit 208. In the case of bi-prediction, a weighted coefficient is adaptively multiplied and superimposed on the two motion compensated prediction image signals of L0 prediction and L1 prediction to generate a final prediction image signal.

逆量子化・逆直交変換部207は、第1符号化ビット列復号部202で復号された直交
変換・量子化された残差信号に対して逆直交変換及び逆量子化を行い、逆直交変換・逆量
子化された残差信号を得る。
The inverse quantization / inverse orthogonal transform unit 207 performs inverse orthogonal transform and inverse quantization on the orthogonal transform / quantized residual signal decoded by the first encoded bit string decoding unit 202, and performs inverse orthogonal transform / An inverse quantized residual signal is obtained.

復号画像信号重畳部208は、動き補償予測部206で動き補償予測された予測画像信
号と、逆量子化・逆直交変換部207により逆直交変換・逆量子化された残差信号とを重
畳することにより、復号画像信号を復号し、復号画像メモリ210に格納する。復号画像
メモリ210に格納する際には、復号画像に対して符号化によるブロック歪等を減少させ
るフィルタリング処理を施して、復号画像メモリ210に格納されることもある。
The decoded image signal superimposing unit 208 superimposes the predicted image signal subjected to motion compensation prediction by the motion compensation prediction unit 206 and the residual signal subjected to inverse orthogonal transform / inverse quantization by the inverse quantization / inverse orthogonal transform unit 207. As a result, the decoded image signal is decoded and stored in the decoded image memory 210. When stored in the decoded image memory 210, the decoded image may be stored in the decoded image memory 210 after filtering processing for reducing block distortion or the like due to encoding is performed on the decoded image.

実施の形態に係る動きベクトルの予測方法は、図1の動画像符号化装置の差分動きベク
トル算出部103及び図2の動画像復号装置の動きベクトル算出部204において実施さ
れる。
The motion vector prediction method according to the embodiment is implemented in the difference motion vector calculation unit 103 of the video encoding device in FIG. 1 and the motion vector calculation unit 204 of the video decoding device in FIG.

動きベクトルの予測方法の実施例を説明する前に、本実施例において使用する用語を定
義する。
Before describing an embodiment of a motion vector prediction method, terms used in this embodiment will be defined.

(符号化ブロックについて)
実施の形態では、図3に示されるように、画面内を任意の同一サイズの正方の矩形の単
位にて均等分割する。この単位をツリーブロックと定義し、画像内での符号化/復号対象
ブロック(符号化においては符号化対象ブロック、復号においては復号対象ブロック)を
特定するためのアドレス管理の基本単位とする。ツリーブロックは画面内のテクスチャに
応じて、符号化処理を最適にすべく、必要に応じてツリーブロック内を階層的に4分割し
て、ブロックサイズの小さいブロックにすることが出来る。このブロックを符号化ブロッ
クと定義し、符号化及び復号を行う際の処理の基本単位とする。ツリーブロックは最大サ
イズの符号化ブロックでもある。符号化ブロックをこれ以上4分割出来ない最小のサイズ
となる符号化ブロックを最小符号化ブロックと呼ぶこととする。
(About coding block)
In the embodiment, as shown in FIG. 3, the inside of the screen is equally divided into square units of any same size. This unit is defined as a tree block, and is used as a basic unit of address management for specifying an encoding / decoding target block (an encoding target block in encoding and a decoding target block in decoding) in an image. The tree block can be divided into four hierarchically in the tree block according to the texture in the screen, and the block can be made smaller in block size if necessary. This block is defined as a coding block, which is a basic unit of processing when performing coding and decoding. The tree block is also the maximum size coding block. An encoded block having a minimum size that cannot be further divided into four is referred to as a minimum encoded block.

(予測ブロックについて)
画面内をブロックに分割して動き補償を行う場合、動き補償のブロックサイズをより小
さくした方が、よりきめ細かい予測を行うことが出来ることから、いくつかのブロック形
状、およびサイズの中から最適なものを選択して、符号化ブロック内部を分割して動き補
償を行う仕組みを取り入れている。この動き補償を行う単位を予測ブロックと呼ぶ。図4
に示すように、符号化ブロック内部を分割せず1つの予測ブロックとみなしたもの(図4
(a))を2Nx2N分割、水平方向に2分割し、2つの予測ブロックとしたもの(図4
(b))を2NxN分割、垂直方向に分割し、2つの予測ブロックとしたもの(図4(c
)をNx2N分割、水平と垂直の均等分割により2つの予測ブロックとしたもの(図4(
d)をNxN分割とそれぞれ定義する。
(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 it is optimal among several block shapes and sizes A mechanism is adopted in which motion compensation is performed by selecting an object and dividing the inside of the coding block. A unit for performing this motion compensation is called a prediction block. FIG.
As shown in FIG. 4, the encoded block is regarded as one prediction block without being divided (FIG. 4).
(A)) is divided into 2N × 2N and divided horizontally into two prediction blocks (FIG. 4).
(B)) is divided into 2N × N and vertically divided into two prediction blocks (FIG. 4 (c)
) Into two prediction blocks by N × 2N division and horizontal and vertical equal division (FIG. 4 (
d) is defined as N × N division, respectively.

符号化ブロック内部において、各予測ブロックを特定する為に、0から開始する番号を
、符号化ブロック内部に存在する予測ブロックに対して割り当てる。この番号を予測ブロ
ックインデックスpuPartIdxと定義する。図4の符号化ブロックの各予測ブロッ
クの中に記述された数字は、その予測ブロックの予測ブロックインデックスpuPart
Idxを表す。
In order to identify each prediction block within the coding block, a number starting from 0 is assigned to the prediction block existing inside the coding block. This number is defined as the predicted block index puPartIdx. The number described in each prediction block of the encoded block in FIG. 4 is the prediction block index puPart of the prediction block.
Represents Idx.

(予測ブロックグループについて)
複数の予測ブロックで構成されるグループを予測ブロックグループと定義する。図5は
符号化/復号対象の予測ブロックと同一ピクチャ内でその符号化/復号対象の予測ブロッ
クに隣接する予測ブロックグループを説明する図である。図9は符号化/復号対象の予測
ブロックと時間的に異なるピクチャにおいて、符号化/復号対象の予測ブロックと同一位
置あるいはその近傍の位置に存在する既に符号化/復号済みの予測ブロックグループを説
明する図である。図5、図6、図7、図8、図9を用いて本発明の予測ブロックグループ
について説明する。
(About prediction block groups)
A group composed of a plurality of prediction blocks is defined as a prediction block group. FIG. 5 is a diagram illustrating a prediction block group adjacent to a prediction block to be encoded / decoded within the same picture as a prediction block to be encoded / decoded. FIG. 9 illustrates an already encoded / decoded prediction block group that exists at the same position as or near the prediction block to be encoded / decoded in a picture temporally different from the prediction block to be encoded / decoded. It is a figure to do. The prediction block group of the present invention will be described with reference to FIGS. 5, 6, 7, 8, and 9.

符号化/復号対象の予測ブロックと同一ピクチャ内でその符号化/復号対象の予測ブロ
ックの左側に隣接する予測ブロックA1、符号化/復号対象の予測ブロックの左下に隣接
する予測ブロックA0、および符号化/復号対象の予測ブロックの左上に隣接する予測ブ
ロックA2(後述の予測ブロックB2と同じ)で構成される第1の予測ブロックグループ
を左側に隣接する予測ブロックグループと定義する。
A prediction block A1 adjacent to the left side of the prediction block to be encoded / decoded within the same picture as the prediction block to be encoded / decoded, a prediction block A0 adjacent to the lower left of the prediction block to be encoded / decoded, and a code A first prediction block group composed of a prediction block A2 adjacent to the upper left of the prediction block to be encoded / decoded (same as a prediction block B2 described later) is defined as a prediction block group adjacent to the left side.

なお、図6に示すように、符号化/復号対象の予測ブロックの左側に隣接する予測ブロ
ックのサイズが符号化/復号対象の予測ブロックより大きい場合にも、前記条件に従い、
左側に隣接する予測ブロックAがその符号化/復号対象の予測ブロックの左側に隣接して
いれば予測ブロックA1とし、符号化/復号対象の予測ブロックの左下に隣接していれば
予測ブロックA0とし、符号化/復号対象の予測ブロックの左上に隣接していれば予測ブ
ロックA2とする。
In addition, as shown in FIG. 6, even when the size of the prediction block adjacent to the left side of the prediction block to be encoded / decoded is larger than the prediction block to be encoded / decoded,
When the prediction block A adjacent to the left side is adjacent to the left side of the prediction block to be encoded / decoded, the prediction block A1 is used. If it is adjacent to the upper left of the prediction block to be encoded / decoded, the prediction block is A2.

なお、図7に示すように、符号化/復号対象の予測ブロックの左側に隣接する予測ブロ
ックのサイズが符号化/復号対象の予測ブロックより小さく、複数存在する場合には、そ
の中で最も下の予測ブロックA10だけを左側に隣接する予測ブロックA1として左側に
隣接する予測ブロックグループに含ませる。ただし、その中で最も上の予測ブロックA1
2だけを左側に隣接する予測ブロックA1として左側に隣接する予測ブロックグループに
含ませることもできるし、最も下の予測ブロックA10と最も上の予測ブロックA12を
共に左側に隣接する予測ブロックグループに含ませてもよいし、左側に隣接するすべての
予測ブロックA10、A11、A12を左側に隣接する予測ブロックグループに含ませて
もよい。符号化/復号対象の予測ブロックと同一ピクチャ内でその符号化/復号対象の予
測ブロックの上側に隣接する予測ブロックB1、符号化/復号対象の予測ブロックの右上
に隣接する予測ブロックB0、および符号化/復号対象の予測ブロックの左上に隣接する
予測ブロックB2(予測ブロックA2と同じ)で構成される第2の予測ブロックグループ
を上側に隣接する予測ブロックグループと定義する。
In addition, as shown in FIG. 7, when the size of the prediction block adjacent to the left side of the prediction block to be encoded / decoded is smaller than the prediction block to be encoded / decoded, and there are a plurality of prediction blocks, the lowest is among them. Only the prediction block A10 is included in the prediction block group adjacent to the left side as the prediction block A1 adjacent to the left side. However, the highest prediction block A1 among them
2 may be included in the prediction block group adjacent to the left side as the prediction block A1 adjacent to the left side, and the lowest prediction block A10 and the top prediction block A12 are both included in the prediction block group adjacent to the left side. Alternatively, all the prediction blocks A10, A11, A12 adjacent on the left side may be included in the prediction block group adjacent on the left side. A prediction block B1 adjacent to the upper side of the prediction block to be encoded / decoded within the same picture as the prediction block to be encoded / decoded, a prediction block B0 adjacent to the upper right of the prediction block to be encoded / decoded, and a code A second prediction block group composed of a prediction block B2 (same as the prediction block A2) adjacent to the upper left of the prediction block to be coded / decoded is defined as a prediction block group adjacent to the upper side.

なお、図8に示すように、符号化/復号対象の予測ブロックの上側に隣接する予測ブロ
ックのサイズが符号化/復号対象の予測ブロックより大きい場合にも、前記条件に従い、
上側に隣接する予測ブロックBがその符号化/復号対象の予測ブロックの上側に隣接して
いれば予測ブロックB1とし、符号化/復号対象の予測ブロックの右上に隣接していれば
予測ブロックB0とし、符号化/復号対象の予測ブロックの左上に隣接していれば予測ブ
ロックB2とする。
As shown in FIG. 8, even when the size of the prediction block adjacent to the upper side of the prediction block to be encoded / decoded is larger than the prediction block to be encoded / decoded,
When the prediction block B adjacent to the upper side is adjacent to the upper side of the prediction block to be encoded / decoded, the prediction block B1 is used. If it is adjacent to the upper left of the prediction block to be encoded / decoded, the prediction block is B2.

なお、図7に示すように、符号化/復号対象の予測ブロックの上側に隣接する予測ブロ
ックのサイズが小さく、複数存在する場合には、その中で最も右の予測ブロックB10だ
けを上側に隣接する予測ブロックB1として上側に隣接する予測ブロックグループに含ま
せる。ただし、その中で最も左の予測ブロックB12だけを上側に隣接する予測ブロック
B1として上側に隣接する予測ブロックグループに含ませることもできるし、最も右の予
測ブロックB10と最も左の予測ブロックB12を共に左側に隣接する予測ブロックグル
ープに含ませてもよいし、上側に隣接する予測ブロックをすべて上側に隣接する予測ブロ
ックグループに含ませてもよい。
In addition, as shown in FIG. 7, when the size of the prediction block adjacent to the upper side of the prediction block to be encoded / decoded is small and there are a plurality of prediction blocks, only the rightmost prediction block B10 is adjacent to the upper side. The prediction block B1 to be included is included in the prediction block group adjacent on the upper side. However, only the leftmost prediction block B12 may be included in the prediction block group adjacent to the upper side as the prediction block B1 adjacent to the upper side, or the rightmost prediction block B10 and the leftmost prediction block B12 may be included. Both may be included in the prediction block group adjacent on the left side, or all prediction blocks adjacent on the upper side may be included in the prediction block group adjacent on the upper side.

なお、右上に隣接する予測ブロックA2/B2に関しては、左側に隣接する予測ブロッ
クグループにも左側に隣接する予測ブロックグループにも含まれ、左側に隣接する予測ブ
ロックグループについて説明する場合は、予測ブロックA2、上側に隣接する予測ブロッ
クグループについて説明する場合は、予測ブロックB2とする。
Note that the prediction block A2 / B2 adjacent to the upper right is included in both the prediction block group adjacent to the left side and the prediction block group adjacent to the left side. When the prediction block group adjacent to A2 and the upper side is described, it is assumed to be the prediction block B2.

本方式においては、左上に隣接する予測ブロックを左側に隣接する予測ブロックグルー
プと上側に隣接する予測ブロックグループの双方に所属させることで、予測動きベクトル
の候補を探す機会を増やしている。並列処理を行う場合は、最大処理量は増加しないが、
直列処理での処理量の削減を重視する場合には、左上に隣接する予測ブロックはどちらか
一方のグループにだけに所属させてもよい。
In this method, the prediction block adjacent to the upper left belongs to both the prediction block group adjacent to the left side and the prediction block group adjacent to the upper side, thereby increasing the chance of searching for a motion vector predictor candidate. When performing parallel processing, the maximum processing amount does not increase,
When importance is attached to the reduction of the processing amount in serial processing, the prediction block adjacent to the upper left may belong to only one of the groups.

図9に示すように、符号化/復号対象の予測ブロックと時間的に異なるピクチャにおい
て、符号化/復号対象の予測ブロックと同一位置あるいはその近傍の位置に存在する既に
符号化/復号済みの予測ブロックグループT0,T1,T2,T3,およびT4で構成さ
れる第3の予測ブロックグループを異なる時間の予測ブロックグループと定義する。
As shown in FIG. 9, in a picture temporally different from a prediction block to be encoded / decoded, a prediction that has already been encoded / decoded and exists at the same position as or near the prediction block to be encoded / decoded. A third prediction block group composed of block groups T0, T1, T2, T3, and T4 is defined as a prediction block group at different times.

(参照リストについて)
符号化及び復号の際には参照リストLX毎の参照インデックスから参照ピクチャを指定
して参照する。L0とL1の2つ用意されていて、Xには0或いは1が入る。参照リスト
L0に登録されている参照ピクチャを参照するインター予測をL0予測(Pred_L0
)と呼び、参照リストL1に登録されている参照ピクチャを参照する動き補償予測をL1
予測(Pred_L1)と呼ぶ。主としてL0予測は前方向予測に、L1予測は後方向予
測として使用され、PスライスではL0予測のみ、BスライスではL0予測、L1予測、
L0予測とL1予測を平均または重み付け加算する両予測(Pred_BI)が使用出来
る。以降の処理において出力に添え字LXが付いている値に対しては、L0予測、L1予
測ごとに処理を行うことを前提とする。
(About reference list)
At the time of encoding and decoding, a reference picture is designated and referred from a reference index for each reference list LX. L0 and L1 are prepared, and X is 0 or 1. Inter prediction that refers to a reference picture registered in the reference list L0 is L0 prediction (Pred_L0).
), And motion compensated prediction that refers to reference pictures registered in the reference list L1 is L1.
This is called prediction (Pred_L1). L0 prediction is mainly used for forward prediction, L1 prediction is used for backward prediction, only L0 prediction is used for P slices, L0 prediction, L1 prediction for B slices,
Both predictions (Pred_BI) for averaging or weighted addition of L0 prediction and L1 prediction can be used. In the subsequent processing, it is assumed that the value with the subscript LX in the output is processed for each L0 prediction and L1 prediction.

(POCについて)
POCは符号化される画像に関連付けられる変数とし、出力順序で1ずつ増加する値が
設定されるものとする。POCの値によって、同じ画像であるかを判別したり、出力順序
での前後関係を判別したり、画像間の距離を判別したりすることができる。例えば、2つ
の画像のPOCが同じ値を持つ場合、同一の画像であると判断できる。2つの画像のPO
Cが違う値を持つ場合、POCの値が小さい画像のほうが、先に出力される画像であると
判断でき、2つの画像のPOCの差がフレーム間距離を示す。
(About POC)
POC is a variable associated with an image to be encoded, and a value that increases by 1 in the output order is set. Depending on the POC value, it is possible to determine whether the images are the same, to determine the context in the output order, or to determine the distance between images. For example, when the POC of two images have the same value, it can be determined that they are the same image. 2 images PO
When C has a different value, it can be determined that the image with the smaller POC value is the image output first, and the difference between the POCs of the two images indicates the inter-frame distance.

実施の形態による動きベクトルの予測方法を図面を用いて説明する。動きベクトルの予
測方法は、符号化ブロックを構成する予測ブロック単位に、符号化及び復号の処理の何れ
でも実施される。動き補償による画像間符号化(インター予測)が選択された場合に、符
号化の場合、符号化対象の動きベクトルから符号化する差分動きベクトルを算出する時に
用いる符号化済みの動きベクトルを利用して予測動きベクトルを算出する際、復号の場合
、復号対象の動きベクトルを算出する時に用いる復号済みの動きベクトルを利用して予測
動きベクトルを算出する際に実施される。
A motion vector prediction method according to an embodiment will be described with reference to the drawings. The motion vector prediction method is performed in any of the encoding and decoding processes for each prediction block constituting the encoding block. When inter-picture coding by motion compensation (inter prediction) is selected, in the case of coding, an encoded motion vector used when calculating a differential motion vector to be coded from a motion vector to be coded is used. When the prediction motion vector is calculated, in the case of decoding, the prediction motion vector is calculated using the decoded motion vector used when calculating the motion vector to be decoded.

(シンタックスについて)
まず、本実施例に係る動きベクトルの予測方法を備える動画像符号化装置により符号化
される動画像のビットストリームの符号化および復号の共通規則であるシンタックスにつ
いて説明する。
(About syntax)
First, a syntax that is a common rule for encoding and decoding a bit stream of a moving image encoded by a moving image encoding device including the motion vector prediction method according to the present embodiment will be described.

図10は本発明により生成されるビットストリームのスライス単位でスライスヘッダー
に記述される第1のシンタックスパターンを示す。スライス単位で動き補償による画像間
予測(インター予測)を行う場合、即ちスライスタイプがP(片方向予測)或いはB(両
方向予測)の場合に、インター予測のマージモードでない予測ブロックにおいて、同一ピ
クチャ内で隣接する周囲の予測ブロックの動きベクトルだけでなく、時間方向で異なるピ
クチャの中の処理対象の予測ブロックと同一位置あるいは近傍の予測ブロックの動きベク
トルを利用して動きベクトルの予測を行うかどうかを示し、インター予測のマージモード
の予測ブロックにおいて、同一ピクチャ内で隣接する周囲の予測ブロックの符号化情報だ
けでなく、時間方向で異なるピクチャの中の処理対象の予測ブロックと同一位置あるいは
近傍の予測ブロックの符号化情報も利用してインター予測を行うかどうかを示す第1のフ
ラグmv_competition_temporal_flagが設置される。
FIG. 10 shows a first syntax pattern described in the slice header in units of slices of the bitstream generated according to the present invention. When performing inter-picture prediction (inter prediction) by motion compensation in units of slices, that is, when the slice type is P (unidirectional prediction) or B (bidirectional prediction), in a prediction block that is not in inter prediction merge mode, Whether to perform motion vector prediction using the motion vector of the prediction block at the same position or nearby as the processing target prediction block in the picture that is different in the time direction as well as the motion vector of the neighboring prediction block in In the prediction block in the inter prediction merge mode, not only the coding information of neighboring neighboring prediction blocks in the same picture, but also the same position or the vicinity of the prediction block to be processed in a picture different in the time direction Indicates whether to perform inter prediction using the coding information of the prediction block 1 flag mv_competition_temporal_flag is installed.

更に、mv_competition_temporal_flagが真(1)の場合
は、インター予測のマージモードでない予測ブロックにおいて、時間方向で異なるピクチ
ャの中の処理対象の予測ブロックと同一位置または近傍の予測ブロックの動きベクトルの
候補が優先順位を上げて後述するMVPリストに登録されるかどうかを示し、インター予
測のマージモードの予測ブロックにおいて、時間方向で異なるピクチャの中の処理対象の
予測ブロックと同一位置あるいは近傍のマージ候補が優先順位を上げて後述するマージ候
補リストに登録されるかどうかを示す第2のフラグmv_temporal_high_
priority_flagが設置される。この値は後述の判定処理を簡略化にするため
に真(1)または偽(0)に固定してもよいが、符号化効率を向上させるためフレーム毎
に適応的に変更することでより符号量を削減する。
Furthermore, when mv_competition_temporal_flag is true (1), motion vector candidates of a prediction block at the same position or in the vicinity of a prediction block to be processed in a picture that is different in the temporal direction have priority in a prediction block that is not in inter prediction merge mode. Indicates whether or not to be registered in the MVP list to be described later, and in the prediction block in the inter prediction merge mode, the merge candidate at the same position or in the vicinity of the prediction block to be processed in the picture that is different in the time direction has priority A second flag mv_temporal_high_ indicating whether or not to be registered in a merge candidate list to be described later
priority_flag is installed. This value may be fixed to true (1) or false (0) in order to simplify the determination process described later, but it is more coded by changing adaptively for each frame in order to improve coding efficiency. Reduce the amount.

符号化/復号対象ピクチャと最も近い参照ピクチャとの間の距離が近い場合は、mv_
temporal_high_priority_flagを真(1)とし、符号化/復
号対象画像と参照ピクチャとの間の距離が遠い場合は、偽(0)と設定することで、後述
するMVPインデックス、またはマージ・インデックスの符号量を削減することができる
。この距離が比較的小さい場合は異なる時間からのMVPの候補またはマージの候補が候
補として比較的相応しいと判断できるからである。例えば、フレームレートが30Hzの
場合、符号化/復号対象ピクチャと最も近い参照ピクチャとの間の距離がXフレーム以内
(X=1〜3程度)の場合、mv_temporal_high_priority_f
lagを真(1)とし、符号化/復号対象画像と参照ピクチャとの間の距離がXフレーム
より大きい場合は、偽(0)と設定することで、後述するMVPインデックス、またはマ
ージ・インデックスの符号量を削減することができる。この距離が小さい場合は距離が大
きい場合よりもインター予測の信頼性が高く、候補として相応しいと判断する。この閾値
Xはシーケンスの内容に応じて変更することで、より符号量を削減することができる。動
きが大きく複雑なシーケンスの場合、閾値Xを小さくすることで、時間方向のMVP候補
やマージ候補の優先順位を下げることにより、符号化効率を向上することができる。また
は、符号化処理過程での統計量を基に優先順位を制御することもできる。符号処理時に符
号化済みの選択数をそれぞれカウントし、時間方向で異なるピクチャの中の処理対象の予
測ブロックと同一位置の予測ブロックの動きベクトルの候補またはマージ候補が同一ピク
チャ内で左または上に隣接する周囲の予測ブロックの動きベクトルよりも多い場合、後に
続く符号化対象画像のmv_temporal_high_priority_flag
を真(1)とし、少ない場合、符号化/復号対象画像と参照ピクチャとの間の距離が遠い
場合は、偽(0)と設定することで、後述するMVPインデックス、またはマージ・イン
デックスの符号量を削減することができる。
When the distance between the encoding / decoding target picture and the nearest reference picture is short, mv_
When temporal_high_priority_flag is set to true (1) and the distance between the encoding / decoding target image and the reference picture is far, by setting it to false (0), the code amount of the MVP index or merge index described later is set. Can be reduced. This is because if this distance is relatively small, it can be determined that MVP candidates or merge candidates from different times are relatively suitable as candidates. For example, when the frame rate is 30 Hz, when the distance between the encoding / decoding target picture and the nearest reference picture is within X frames (X = 1 to 3), mv_temporal_high_priority_f
When lag is true (1) and the distance between the encoding / decoding target image and the reference picture is larger than the X frame, by setting it to false (0), an MVP index or a merge index described later is set. The amount of codes can be reduced. When this distance is small, the inter prediction reliability is higher than when the distance is large, and it is determined that the distance is suitable. By changing this threshold value X according to the contents of the sequence, the code amount can be further reduced. In the case of a complex sequence with large motion, encoding efficiency can be improved by lowering the priority of the MVP candidates and merge candidates in the time direction by reducing the threshold value X. Alternatively, the priority order can be controlled based on statistics in the course of the encoding process. The number of selected selections at the time of the encoding process is counted, and the motion vector candidate or merge candidate of the prediction block at the same position as the processing target prediction block in the picture that is different in the time direction is left or above in the same picture. If there are more motion vectors than neighboring surrounding prediction blocks, mv_temporal_high_priority_flag of the subsequent encoding target image
Is true (1), and in the case where the distance between the encoding / decoding target image and the reference picture is long, by setting false (0), the code of the MVP index or the merge index described later is set. The amount can be reduced.

さらに、スライスタイプがBの場合は、時間方向の予測動きベクトルの候補、またはマ
ージ候補を算出する際に用いる時間方向で異なるピクチャcolPicが処理対象の予測
ブロックが含まれるピクチャのL0の参照リスト或いはL1の参照リストのどちらに登録
されている参照画像を使用するかを示す第3フラグcollocated_from_l
0_flagが設置される。
Further, when the slice type is B, a reference list of L0s of pictures including a prediction block to be processed that includes a picture colPic that is different in the temporal direction used in calculating a temporal motion vector predictor candidate or a merge candidate. A third flag collocated_from_l indicating which of the reference images registered in the L1 reference list is to be used
0_flag is set.

さらに、スライスタイプがP(片方向予測)或いはB(両方向予測)の場合は、後述す
るMVPリスト、またはマージ候補リスト内の登録順序を予測ブロックごとに適応的に変
更するか否かを示す第4フラグmv_list_adaptive_idx_flagが
設置される。
Further, when the slice type is P (one-way prediction) or B (bi-directional prediction), the first indicates whether to change the registration order in the MVP list or merge candidate list described later for each prediction block. Four flags mv_list_adaptive_idx_flag are set.

なお、以上のシンタックス要素はピクチャー単位で設定されるシンタックス要素を記述
するピクチャー・パラメータ・セットに設置してもよい。
The above syntax elements may be installed in a picture parameter set describing syntax elements set in units of pictures.

また、第1のフラグmv_competition_temporal_flag、第
2のフラグmv_temporal_high_priority_flag、第3フラ
グcollocated_from_l0_flag、第4フラグmv_list_ad
aptive_idx_flagは、それぞれマージモードでない動きベクトル予測用と
、マージモード用で独立した別個のフラグを用意して、それぞれ独立で制御することもで
きる。
Also, the first flag mv_competition_temporal_flag, the second flag mv_temporal_high_priority_flag, the third flag collocated_from_l0_flag, and the fourth flag mv_list_ad
The independent_idx_flag can be controlled independently by preparing separate flags for motion vector prediction that are not in the merge mode and for merge mode, respectively.

図11は予測ブロック単位に記述されるシンタックスパターンを示す。予測ブロックの
予測モードPredModeの値が画像間予測(インター予測)を示すMODE_INT
ERの場合、マージ・モードかどうかを示すmerge_flag[x0][y0]が設
置される。ここで、x0、y0は輝度信号の画面内での予測ブロックの左上の画素の位置
を示すインデックスであり、merge_flag[x0][y0]は画面内の(x0,
y0)に位置する予測ブロックのマージ・モードかどうかを示すフラグである。
FIG. 11 shows a syntax pattern described in units of prediction blocks. MODE_INT in which the value of the prediction mode PredMode of the prediction block indicates inter-picture prediction (inter prediction)
In the case of ER, merge_flag [x0] [y0] indicating whether or not the merge mode is set. Here, x0 and y0 are indexes indicating the position of the upper left pixel of the prediction block in the screen of the luminance signal, and merge_flag [x0] [y0] is (x0,
This is a flag indicating whether or not the prediction block located at y0) is in merge mode.

次に、merge_flag[x0][y0]が1の場合、マージモードであることを
示し、NumMergeCandが1つを超える場合に、参照する予測動きベクトルの候
補のリストであるマージリストのインデックスのシンタックス要素merge_idx[
x0][y0]が設置される。ここで、x0、y0は画面内での予測ブロックの左上の画
素の位置を示すインデックスであり、merge_idx[x0][y0]は画面内の(
x0,y0)に位置する予測ブロックのマージ・インデックスである。関数NumMer
geCandはマージ候補の数を表し、後述にて説明される。このマージリストのインデ
ックスのシンタックス要素merge_idx[x0][y0]がマージ候補の数Num
MergeCandが1より大きい場合にだけ符号化されるのは、予測動きベクトルの候
補の総数が1つであれば、その1つがマージ候補となるので、merge_idx[x0
][y0]を伝送せずとも参照するマージ候補が確定する為である。
Next, when merge_flag [x0] [y0] is 1, it indicates merge mode. When NumMergeCand exceeds 1, syntax of index of merge list that is a list of predicted motion vector candidates to be referred to. Element merge_idx [
x0] [y0] is installed. Here, x0 and y0 are indices indicating the position of the upper left pixel of the prediction block in the screen, and merge_idx [x0] [y0] is (
This is the merge index of the prediction block located at x0, y0). Function NumMer
geCand represents the number of merge candidates and will be described later. The merge list index syntax element merge_idx [x0] [y0] is the number of merge candidates Num.
Only when MergeCand is larger than 1, if the total number of motion vector predictor candidates is 1, one of them becomes a merge candidate, so merge_idx [x0
This is because the merge candidate to be referred to is determined without transmitting [y0].

一方、merge_flag[x0][y0]が0の場合、マージモードでないことを
示し、スライスタイプがBの場合、インター予測モードを識別するシンタックス要素in
ter_pred_flag[x0][y0]が設置される。参照リストLX(X=0ま
たは1)ごとに、参照ピクチャを特定するための参照ピクチャインデックスのシンタック
ス要素ref_idx_lX[x0][y0]、動きベクトル検出にて求められた予測ブ
ロックの動きベクトルと予測動きベクトルとの差分動きベクトルのシンタックス要素mv
d_lX[x0][y0][j]が設置される。ここで、Xは0或いは1で予測方向を示
し、配列のインデックスx0は予測ブロックのx座標、y0は予測ブロックのy座標、j
は差分動きベクトルの成分を表し、j=0はx成分を、j=1はy成分を表す。次に、予
測動きベクトルの候補の総数が1つを超える場合に、参照する予測動きベクトルの候補の
リストであるMVPリストのインデックスのシンタックス要素mvp_idx_lX[x
0][y0]が設置される。ここで、x0、y0は画面内での予測ブロックの左上の画素
の位置を示すインデックスであり、mvp_idx_lX[x0][y0]は画面内の(
x0,y0)に位置する予測ブロックのリストLXのMVPインデックスである。添え字
LXは参照リストを表し、L0とL1の2つ用意されていて、Xには0或いは1が入る。
関数NumMVPCand(LX)は、予測方向LX(Xは0或いは1)で予測ブロック
の予測動きベクトルの候補の総数を算出する関数を表し、後述にて説明される。このMV
Pリストのインデックスmvp_idx_lX[x0][y0]は動きベクトルの予測方
法により予測動きベクトルの候補の総数NumMVPCand(LX)が1より大きい場
合に符号化される。予測動きベクトルの候補の総数が1つであれば、その1つが予測動き
ベクトルとなるので、mvp_idx_lX[x0][y0]を伝送せずとも参照する予
測動きベクトルの候補が確定する為である。
On the other hand, when merge_flag [x0] [y0] is 0, it indicates that it is not the merge mode, and when the slice type is B, a syntax element in that identifies the inter prediction mode.
ter_pred_flag [x0] [y0] is installed. For each reference list LX (X = 0 or 1), a reference picture index syntax element ref_idx_lX [x0] [y0] for specifying a reference picture, a motion vector and a prediction of a prediction block obtained by motion vector detection Syntax element mv of difference motion vector with motion vector
d_lX [x0] [y0] [j] is installed. Here, X is 0 or 1, indicating the prediction direction, the array index x0 is the x coordinate of the prediction block, y0 is the y coordinate of the prediction block, j
Represents a differential motion vector component, j = 0 represents an x component, and j = 1 represents a y component. Next, when the total number of motion vector predictor candidates exceeds 1, the syntax element mvp_idx_lX [x of the index of the MVP list that is a list of motion vector predictor candidates to be referred to
0] [y0] are installed. Here, x0 and y0 are indices indicating the position of the upper left pixel of the prediction block in the screen, and mvp_idx_lX [x0] [y0] is ((
This is the MVP index of the list LX of predicted blocks located at x0, y0). The subscript LX represents a reference list, and two L0 and L1 are prepared, and 0 or 1 is entered in X.
The function NumMVPCand (LX) represents a function for calculating the total number of motion vector predictor candidates for the prediction block in the prediction direction LX (X is 0 or 1), and will be described later. This MV
The index mvp_idx_lX [x0] [y0] of the P list is encoded when the total number of predicted motion vector candidates NumMVPCand (LX) is larger than 1 by the motion vector prediction method. This is because if the total number of prediction motion vector candidates is one, one of them becomes a prediction motion vector, and therefore the reference motion vector candidate to be referred to is determined without transmitting mvp_idx_lX [x0] [y0].

(符号化における動きベクトルの予測)
上述のシンタックスに基づき、動画像のビットストリームを符号化する動画像符号化装
置において、実施の形態に係る動きベクトルの予測方法の動作を説明する。動きベクトル
の予測方法は、スライス単位で動き補償による画像間予測を行う場合、即ちスライスタイ
プがPスライス(片方向予測スライス)或いはBスライス(両方向予測スライス)の場合
で、更に、スライスの中の予測ブロックの予測モードが画像間予測(MODE_INTE
R)の予測ブロックに適用される。
(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. The motion vector prediction method is a case where inter-picture prediction is performed by motion compensation in units of slices, that is, when the slice type is a P slice (unidirectional prediction slice) or a B slice (bidirectional prediction slice). The prediction mode of the prediction block is inter-picture prediction (MODE_INTE
Applied to the prediction block of R).

図12は、図1の動画像符号化装置の差分動きベクトル算出部103の詳細な構成を示
す図である。図12の太枠線で囲まれる部分は差分動きベクトル算出部103を示してい
る。
FIG. 12 is a diagram showing a detailed configuration of the differential motion vector calculation unit 103 of the moving picture encoding device of FIG. A portion surrounded by a thick frame line in FIG. 12 indicates the differential motion vector calculation unit 103.

更に、その内部の太点線で囲まれる部分は後述する動きベクトルの予測方法の動作部を
示しており、実施の形態の動画像符号化装置と対応する動画像復号装置にも同様に設置さ
れ、符号化と復号で矛盾しない同一の判定結果を得られるようにしている。以下、この図
を用いて、符号化における動きベクトルの予測方法を説明する。
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.

差分動きベクトル算出部103は、予測動きベクトル候補生成部120、予測動きベク
トル登録部121、予測動きベクトル候補同一判定部122、予測動きベクトル候補符号
量算出部123、予測動きベクトル選択部124、および動きベクトル減算部125を含
む。
この差分動きベクトル算出部103での差分動きベクトル算出処理は、符号化対象ブロ
ックで選択されたインター予測方法で用いる動きベクトルの差分動きベクトルをそれぞれ
算出する。具体的には符号化対象ブロックがL0予測の場合、L0の動きベクトルの差分
動きベクトルを算出し、符号化対象ブロックがL1予測の場合、L1の動きベクトルの差
分動きベクトルを算出する。符号化対象ブロックが双予測の場合、L0予測とL1予測が
共に行われ、L0の動きベクトルの差分動きベクトル、およびL1の動きベクトルの差分
動きベクトルをそれぞれ算出する。
The difference motion vector calculation unit 103 includes a prediction motion vector candidate generation unit 120, a prediction motion vector registration unit 121, a prediction motion vector candidate identity determination unit 122, a prediction motion vector candidate code amount calculation unit 123, a prediction motion vector selection unit 124, and A motion vector subtraction unit 125 is included.
In the difference motion vector calculation process in the difference motion vector calculation unit 103, a difference motion vector of the motion vector used in the inter prediction method selected in the encoding target block is calculated. Specifically, when the encoding target block is L0 prediction, a differential motion vector of the L0 motion vector is calculated, and when the encoding target block is L1 prediction, a differential motion vector of the L1 motion vector is calculated. When the encoding target block is bi-predicted, both L0 prediction and L1 prediction are performed, and a differential motion vector of the L0 motion vector and a differential motion vector of the L1 motion vector are calculated.

予測動きベクトル候補生成部120は、参照リスト(L0、L1)毎に、上側に隣接す
る予測ブロックグループ(符号化対象の予測ブロックと同一ピクチャ内でその予測ブロッ
クの左側に隣接する予測ブロックグループ:図5のA0,A1,A2)、左側に隣接する
予測ブロックグループ(符号化対象の予測ブロックと同一ピクチャ内でその予測ブロック
の上側に隣接する予測ブロックグループ:図5のB0,B1,B2)、異なる時間の予測
ブロックグループ(符号化対象の予測ブロックと時間的に異なるピクチャ内でその予測ブ
ロックと同一位置あるいはその近傍の位置に存在する既に符号化済みの予測ブロックグル
ープ:図9のT0,T1,T2,T3)の3つの予測ブロックグループから、各予測ブロ
ックグループごとに1つの動きベクトルmvLXA、mvLXB、mvLXColをそれ
ぞれ算出し、予測動きベクトル候補とし、予測動きベクトル登録部121に供給する。以
下、mvLXA及びmvLXBを空間的な動きベクトル、mvLXColを時間的な動き
ベクトルと呼ぶ。この予測動きベクトル候補の算出に際しては、符号化情報格納メモリ1
14に格納されている符号化済みの予測ブロックの予測モード、参照リスト毎の参照イン
デックス、参照ピクチャのPOC、動きベクトル等の符号化情報を用いる。
For each reference list (L0, L1), the motion vector predictor candidate generation unit 120 has a prediction block group adjacent to the upper side (prediction block group adjacent to the left side of the prediction block in the same picture as the prediction block to be encoded: A0, A1, A2 in FIG. 5), a prediction block group adjacent to the left side (prediction block group adjacent to the upper side of the prediction block in the same picture as the prediction block to be encoded: B0, B1, B2 in FIG. 5) , A prediction block group at a different time (a prediction block group that has already been encoded and exists at the same position as or near the prediction block in a picture temporally different from the prediction block to be encoded: T0 in FIG. One motion for each prediction block group from the three prediction block groups T1, T2, T3) Vector mvLXA, MvLXB, calculated respectively MvLXCol, the predicted motion vector candidates, and supplies the predicted motion vector register unit 121. Hereinafter, mvLXA and mvLXB are called spatial motion vectors, and mvLXCol is called a temporal motion vector. When calculating the predicted motion vector candidates, the encoded information storage memory 1
14, encoding information such as a prediction mode of an encoded prediction block stored in 14, a reference index for each reference list, a POC of a reference picture, and a motion vector are used.

これらの予測動きベクトルの候補mvLXA、mvLXB、mvLXColは符号化対
象画像のPOCと参照ピクチャのPOCとの関係に応じてスケーリングすることにより算
出されることもある。
These predicted motion vector candidates mvLXA, mvLXB, and mvLXCol may be calculated by scaling according to the relationship between the POC of the image to be encoded and the POC of the reference picture.

予測動きベクトル候補生成部120は、各予測ブロックグループ毎に、所定の順序で、
それぞれの予測ブロックグループ内の予測ブロックに対して、後述の条件判定を行い、最
初に条件に合致した予測ブロックの動きベクトルを選択し、予測動きベクトルの候補mv
LXA、mvLXB、mvLXColとする。
The motion vector predictor candidate generation unit 120 is in a predetermined order for each prediction block group,
For each prediction block in each prediction block group, a condition determination described later is performed, and a motion vector of a prediction block that first matches the condition is selected, and a predicted motion vector candidate mv
Let LXA, mvLXB, mvLXCol.

左側に隣接する予測ブロックグループから予測動きベクトルを算出する際には、左側に
隣接する予測ブロックグループの下から上の順序(図5のA0からA0,A1,A2の順
序)で、上側に隣接する予測ブロックグループから予測動きベクトルを算出する際には、
上側に隣接する予測ブロックグループの右から左の順序(図5のB0からB0,B1,B
2の順序)で、異なる時間の予測ブロックグループから予測動きベクトルを算出する際に
は、図9のT0からT0,T1,T2,T3の順序で、各予測ブロックに対して、後述の
条件判定を行い、最初に条件に合致した予測ブロックの動きベクトルを選択し、予測動き
ベクトルの候補をそれぞれmvLXA、mvLXB、mvLXColとする。
When calculating a motion vector predictor from the prediction block group adjacent to the left side, the prediction block group adjacent to the left side is adjacent to the upper side in the order from the bottom to the top (order A0 to A0, A1, A2 in FIG. 5). When calculating a prediction motion vector from a prediction block group to be
The order from the right to the left of the prediction block group adjacent to the upper side (B0 to B0, B1, B1 in FIG. 5)
2), when the motion vector predictor is calculated from the prediction block groups at different times, the condition determination described later is performed for each prediction block in the order of T0 to T0, T1, T2, and T3 in FIG. First, the motion vector of the prediction block that matches the condition is selected, and the prediction motion vector candidates are set to mvLXA, mvLXB, and mvLXCol, respectively.

即ち、左側の隣接予測ブロックグループでは、一番下の予測ブロックが最も優先順位が
高く、下から上に向かって優先順位が付けられており、上側の隣接予測ブロックグループ
では、一番右の予測ブロックが最も優先順位が高く、右から左に向かって優先順位が付け
られている。異なる時間の予測ブロックグループでは、T0の予測ブロックが最も優先順
位が高く、T0,T1,T2,T3の順に優先順位が付けられている。この予測ブロック
の位置による優先順位を優先順位Aとする。
That is, in the left adjacent prediction block group, the lowest prediction block has the highest priority, and the priority is given from the bottom to the top. In the upper adjacent prediction block group, the rightmost prediction block Blocks have the highest priority and are prioritized from right to left. In the prediction block group at different times, the prediction block of T0 has the highest priority, and the priority is given in the order of T0, T1, T2, and T3. The priority order based on the position of this prediction block is defined as priority order A.

(空間予測ブロックの条件判定のループの説明)
左側の隣接予測ブロックグループ、及び上側の隣接予測ブロックグループの各隣接予測
ブロックに対しては下記の条件判定1、2、3、4の優先順序でそれぞれの条件判定が適
用される。ただし、後述する方法5のみ例外として、条件判定1、3、2、4の優先順序
でそれぞれの条件判定が適用される。
条件判定1:符号化/復号対象の予測ブロックの差分動きベクトル算出対象の動きベク
トルと同じ参照リストで、同じ参照インデックス、すなわち参照フレームを用いた予測が
隣接予測ブロックでも行われている。
条件判定2:符号化/復号対象の予測ブロックの差分動きベクトル算出対象の動きベク
トルとは異なる参照リストであるが、同じ参照フレームを用いた予測が隣接予測ブロック
で行われている。
条件判定3:符号化/復号対象の予測ブロックの差分動きベクトル算出対象の動きベク
トルと同じ参照リストで、異なる参照フレームを用いた予測が隣接予測ブロックで行われ
ている。
条件判定4:符号化/復号対象の予測ブロックの差分動きベクトル算出対象の動きベク
トルとは異なる参照リストで、異なる参照フレームを用いた予測が隣接予測ブロックで行
われている。
(Explanation of loop for condition judgment of spatial prediction block)
The respective condition determinations are applied to the adjacent prediction blocks of the left adjacent prediction block group and the upper adjacent prediction block group in the following priority order of the condition determinations 1, 2, 3, and 4. However, with the exception of method 5 described later, the respective condition determinations are applied in the priority order of condition determinations 1, 3, 2, and 4.
Condition determination 1: Prediction using the same reference index, that is, a reference frame, is performed in the adjacent prediction block with the same reference list as the motion vector of the difference motion vector calculation target of the prediction block of the encoding / decoding target.
Condition determination 2: Although the reference list is different from the motion vector of the difference motion vector calculation target of the prediction block to be encoded / decoded, prediction using the same reference frame is performed in the adjacent prediction block.
Condition determination 3: Prediction using the same reference list as the motion vector of the difference motion vector calculation target of the prediction block of the encoding / decoding target and using a different reference frame is performed in the adjacent prediction block.
Condition determination 4: Prediction using a different reference frame in a reference list that is different from a motion vector that is a difference motion vector calculation target of a prediction block that is an encoding / decoding target is performed in an adjacent prediction block.

この優先順位を優先順位Bとする。これらの条件のいずれかに一致した場合、当該予測
ブロックには条件に合致する動きベクトルは存在すると判断し、後に続く条件判定は行わ
ない。なお、条件判定1または条件判定2の条件に合致した場合、該当する隣接予測ブロ
ックの動きベクトルは同じ参照フレームに対応するものであるので、そのまま予測動きベ
クトルの候補とするが、条件判定3または条件判定4の条件に合致した場合、該当する隣
接予測ブロックの動きベクトルは異なる参照フレームに対応するものであるので、その動
きベクトルを基にスケーリングにより算出して予測動きベクトルの候補とする。なお、各
隣接予測ブロックの条件判定を並列ではなく、直列に処理する場合、2番目に行う予測ブ
ロックグループの条件判定においては(左側の隣接予測ブロックグループの条件判定が先
の場合、上側の隣接予測ブロックグループの条件判定では)、当該予測ブロックグループ
の予測動きベクトルの候補が前の予測ブロックグループで決定した予測動きベクトルの候
補と同じ値になる場合、その予測動きベクトルの候補を採用せず、次の条件判定に移って
もよい。このように次の条件判定を行うことで、予測動きベクトルの候補の減少を防ぐこ
とが出来る。
This priority order is defined as priority order B. If any of these conditions is met, it is determined that there is a motion vector that matches the condition in the prediction block, and the subsequent condition determination is not performed. Note that when the condition of condition determination 1 or condition determination 2 is met, the motion vector of the corresponding adjacent prediction block corresponds to the same reference frame, so that it is used as a predicted motion vector candidate as it is. If the condition of condition determination 4 is met, the motion vector of the corresponding adjacent prediction block corresponds to a different reference frame. Therefore, the motion vector is calculated by scaling based on the motion vector as a candidate for the motion vector predictor. In addition, when the condition determination of each adjacent prediction block is processed in series instead of in parallel, in the condition determination of the second prediction block group to be performed second (if the condition determination of the left adjacent prediction block group is first, the upper adjacent In the condition determination of the prediction block group), when the motion vector predictor candidate of the prediction block group has the same value as the motion vector predictor candidate determined in the previous prediction block group, the motion vector predictor candidate is not adopted. The next condition determination may be performed. By performing the following condition determination in this way, it is possible to prevent a decrease in predicted motion vector candidates.

空間予測ブロックのスキャンのループの仕方として、上記の4つの条件判定の進め方に
よって、下記の4通りの方法を設定することができる。それぞれの方法によって予測ベク
トルの相応しさと最大処理量が異なり、それらを考慮してこれらの方法から選択し設定す
る。方法1についてのみ、図17〜21のフローチャートを用いて詳しく後述するが、他
の方法2〜4についても、当業者であれば方法2〜4を実施する手順については方法1を
実施する手順に準じて適宜設計できる事項であるから、詳しい説明を省略する。なお、こ
こでは動画像符号化装置における空間予測ブロックのスキャンのループ処理を説明するが
、同様の処理は動画像復号装置においても可能であることはいうまでもない。
As a scanning loop of the spatial prediction block, the following four methods can be set according to the above-described four condition determination methods. The appropriateness of the prediction vector and the maximum processing amount differ depending on each method, and these are selected and set in consideration of them. Only method 1 will be described later in detail with reference to the flowcharts of FIGS. 17 to 21, but for other methods 2 to 4 as well, those skilled in the art will follow the procedure for performing method 1 for the procedure of performing methods 2 to 4. Since this is a matter that can be designed accordingly, detailed description is omitted. In addition, although the loop process of the scan of the spatial prediction block in a moving image encoder is demonstrated here, it cannot be overemphasized that a similar process is also possible in a moving image decoder.

方法1:
4つの条件判定のうち予測ブロック毎に1つの条件判定を行い、条件を満たさなければ
、隣の予測ブロックの条件判定に移る。予測ブロック毎に条件判定を4周したら終了。
具体的には以下の優先順序で条件判定を行う。(ただし、NはAまたはB)
1.予測ブロックN0の条件判定1(同じ参照リスト、同じ参照フレーム)
2.予測ブロックN1の条件判定1(同じ参照リスト、同じ参照フレーム)
3.予測ブロックN2の条件判定1(同じ参照リスト、同じ参照フレーム)
4.予測ブロックN0の条件判定2(異なる参照リスト、同じ参照フレーム)
5.予測ブロックN1の条件判定2(異なる参照リスト、同じ参照フレーム)
6.予測ブロックN2の条件判定2(異なる参照リスト、同じ参照フレーム)
7.予測ブロックN0の条件判定3(同じ参照リスト、異なる参照フレーム)
8.予測ブロックN1の条件判定3(同じ参照リスト、異なる参照フレーム)
9.予測ブロックN2の条件判定3(同じ参照リスト、異なる参照フレーム)
10.予測ブロックN0の条件判定4(異なる参照リスト、異なる参照フレーム)
11.予測ブロックN1の条件判定4(異なる参照リスト、異なる参照フレーム)
12.予測ブロックN2の条件判定4(異なる参照リスト、異なる参照フレーム)
方法1によれば、同じ参照フレームを用いたスケーリングされない予測動きベクトルが
選ばれやすいので、差分動きベクトルの符号量が小さくなる可能性が高くなるという効果
がある。
Method 1:
Of the four condition determinations, one condition determination is performed for each prediction block. If the condition is not satisfied, the process proceeds to the condition determination for the adjacent prediction block. The process ends after four rounds of condition determination for each prediction block.
Specifically, the condition determination is performed in the following priority order. (However, N is A or B)
1. Condition determination 1 of the prediction block N0 (same reference list, same reference frame)
2. Condition determination 1 of the prediction block N1 (same reference list, same reference frame)
3. Prediction block N2 condition determination 1 (same reference list, same reference frame)
4). Prediction block N0 condition determination 2 (different reference list, same reference frame)
5. Prediction block N1 condition determination 2 (different reference list, same reference frame)
6). Prediction block N2 condition determination 2 (different reference list, same reference frame)
7). Prediction block N0 condition determination 3 (same reference list, different reference frames)
8). Condition determination 3 of the prediction block N1 (same reference list, different reference frames)
9. Prediction block N2 condition decision 3 (same reference list, different reference frames)
10. Prediction block N0 condition determination 4 (different reference list, different reference frame)
11. Prediction block N1 condition determination 4 (different reference list, different reference frame)
12 Prediction block N2 condition determination 4 (different reference list, different reference frame)
According to the method 1, since an unscaled predicted motion vector using the same reference frame is easily selected, there is an effect that a possibility that the code amount of the difference motion vector becomes small is increased.

方法2:
同じ予測フレームを用いたスケーリングされない予測動きベクトルの判定を優先し、4
つの条件判定のうち予測ブロック毎に2つの条件判定を行い、条件を満たさなければ、隣
の予測ブロックの条件判定に移る。最初の周回では条件判定1と条件判定2の条件判定を
行い、次の予測ブロックの周回では条件判定3と条件判定4の条件判定を行う。
具体的には以下の優先順序で条件判定を行う。(ただし、NはAまたはB)
1.予測ブロックN0の条件判定1(同じ参照リスト、同じ参照フレーム)
2.予測ブロックN0の条件判定2(異なる参照リスト、同じ参照フレーム)
3.予測ブロックN1の条件判定1(同じ参照リスト、同じ参照フレーム)
4.予測ブロックN1の条件判定2(異なる参照リスト、同じ参照フレーム)
5.予測ブロックN2の条件判定1(同じ参照リスト、同じ参照フレーム)
6.予測ブロックN2の条件判定2(異なる参照リスト、同じ参照フレーム)
7.予測ブロックN0の条件判定3(同じ参照リスト、異なる参照フレーム)
8.予測ブロックN0の条件判定4(異なる参照リスト、異なる参照フレーム)
9.予測ブロックN1の条件判定3(同じ参照リスト、異なる参照フレーム)
10.予測ブロックN1の条件判定4(異なる参照リスト、異なる参照フレーム)
11.予測ブロックN2の条件判定3(同じ参照リスト、異なる参照フレーム)
12.予測ブロックN2の条件判定4(異なる参照リスト、異なる参照フレーム)
方法2によれば、方法1と同様に、同じ参照フレームを用いたスケーリングされない予
測動きベクトルが選ばれやすいので、差分動きベクトルの符号量が小さくなる可能性が高
くなるという効果がある。また、条件判定の周回数が最大2回となるので、ハードウェア
への実装を考慮した際に予測ブロックの符号化情報へのメモリアクセス回数が方法1に比
べて少なくなり、複雑性が低減される。
Method 2:
Prioritize unscaled motion vector prediction using the same prediction frame
Of the two condition determinations, two condition determinations are performed for each prediction block. If the conditions are not satisfied, the process proceeds to the condition determination for the adjacent prediction block. Condition determination 1 and condition determination 2 are performed in the first round, and condition determination 3 and condition determination 4 are performed in the next round of prediction blocks.
Specifically, the condition determination is performed in the following priority order. (However, N is A or B)
1. Condition determination 1 of the prediction block N0 (same reference list, same reference frame)
2. Prediction block N0 condition determination 2 (different reference list, same reference frame)
3. Condition determination 1 of the prediction block N1 (same reference list, same reference frame)
4). Prediction block N1 condition determination 2 (different reference list, same reference frame)
5. Prediction block N2 condition determination 1 (same reference list, same reference frame)
6). Prediction block N2 condition determination 2 (different reference list, same reference frame)
7). Prediction block N0 condition determination 3 (same reference list, different reference frames)
8). Prediction block N0 condition determination 4 (different reference list, different reference frame)
9. Condition determination 3 of the prediction block N1 (same reference list, different reference frames)
10. Prediction block N1 condition determination 4 (different reference list, different reference frame)
11. Prediction block N2 condition decision 3 (same reference list, different reference frames)
12 Prediction block N2 condition determination 4 (different reference list, different reference frame)
According to the method 2, similarly to the method 1, an unscaled predicted motion vector using the same reference frame is easily selected, so that there is an effect that the possibility that the code amount of the difference motion vector becomes small increases. In addition, since the maximum number of rounds for condition determination is two, the number of memory accesses to the encoded information of the prediction block is smaller than that in Method 1 when considering implementation in hardware, and complexity is reduced. The

方法3:
最初の周回では予測ブロック毎に条件判定1の条件判定を行い条件を満たさなければ、
隣の予測ブロックの条件判定に移る。次の周回では予測ブロック毎に条件判定2、条件判
定3条件判定4順序で条件判定を行ってから隣に移る。
具体的には以下の優先順序で条件判定を行う。(ただし、NはAまたはB)
1.予測ブロックN0の条件判定1(同じ参照リスト、同じ参照フレーム)
2.予測ブロックN1の条件判定1(同じ参照リスト、同じ参照フレーム)
3.予測ブロックN2の条件判定1(同じ参照リスト、同じ参照フレーム)
4.予測ブロックN0の条件判定2(異なる参照リスト、同じ参照フレーム)
5.予測ブロックN0の条件判定3(同じ参照リスト、異なる参照フレーム)
6.予測ブロックN0の条件判定4(異なる参照リスト、異なる参照フレーム)
7.予測ブロックN1の条件判定2(異なる参照リスト、同じ参照フレーム)
8.予測ブロックN1の条件判定3(同じ参照リスト、異なる参照フレーム)
9.予測ブロックN1の条件判定4(異なる参照リスト、異なる参照フレーム)
10.予測ブロックN2の条件判定2(異なる参照リスト、同じ参照フレーム)
11.予測ブロックN2の条件判定3(同じ参照リスト、異なる参照フレーム)
12.予測ブロックN2の条件判定4(異なる参照リスト、異なる参照フレーム)
方法3によれば、同じ参照リストで同じ参照フレームを用いたスケーリングされない予
測動きベクトルが選ばれやすいので、差分動きベクトルの符号量が小さくなる可能性が高
くなるという効果がある。また、条件判定の周回数が最大2回となるので、ハードウェア
への実装を考慮した際に予測ブロックの符号化情報へのメモリアクセス回数が方法1に比
べて少なくなり、複雑性が低減される。
Method 3:
In the first round, if the condition determination of condition determination 1 is performed for each prediction block and the condition is not satisfied,
It moves to the condition judgment of the adjacent prediction block. In the next lap, condition determination is performed in order of condition determination 2, condition determination 3 and condition determination 4 for each prediction block, and then the process proceeds to the next.
Specifically, the condition determination is performed in the following priority order. (However, N is A or B)
1. Condition determination 1 of the prediction block N0 (same reference list, same reference frame)
2. Condition determination 1 of the prediction block N1 (same reference list, same reference frame)
3. Prediction block N2 condition determination 1 (same reference list, same reference frame)
4). Prediction block N0 condition determination 2 (different reference list, same reference frame)
5. Prediction block N0 condition determination 3 (same reference list, different reference frames)
6). Prediction block N0 condition determination 4 (different reference list, different reference frame)
7). Prediction block N1 condition determination 2 (different reference list, same reference frame)
8). Condition determination 3 of the prediction block N1 (same reference list, different reference frames)
9. Prediction block N1 condition determination 4 (different reference list, different reference frame)
10. Prediction block N2 condition determination 2 (different reference list, same reference frame)
11. Prediction block N2 condition decision 3 (same reference list, different reference frames)
12 Prediction block N2 condition determination 4 (different reference list, different reference frame)
According to the method 3, since an unscaled predicted motion vector using the same reference frame in the same reference list is easily selected, there is an effect that the possibility that the code amount of the difference motion vector becomes small increases. In addition, since the maximum number of rounds for condition determination is two, the number of memory accesses to the encoded information of the prediction block is smaller than that in Method 1 when considering implementation in hardware, and complexity is reduced. The

方法4:
同じ予測ブロックの条件判定を優先し、1つの予測ブロック内で4つの条件判定を行い
、すべての条件に合致しない場合、当該予測ブロックには条件に合致する動きベクトルは
存在しないものと判断し、次の予測ブロックの条件判定を行う。
具体的には以下の優先順序で条件判定を行う。(ただし、NはAまたはB)
1.予測ブロックN0の条件判定1(同じ参照リスト、同じ参照フレーム)
2.予測ブロックN0の条件判定2(異なる参照リスト、同じ参照フレーム)
3.予測ブロックN0の条件判定3(同じ参照リスト、異なる参照フレーム)
4.予測ブロックN0の条件判定4(異なる参照リスト、異なる参照フレーム)
5.予測ブロックN1の条件判定1(同じ参照リスト、同じ参照フレーム)
6.予測ブロックN1の条件判定2(異なる参照リスト、同じ参照フレーム)
7.予測ブロックN1の条件判定3(同じ参照リスト、異なる参照フレーム)
8.予測ブロックN1の条件判定4(異なる参照リスト、異なる参照フレーム)
9.予測ブロックN2の条件判定1(同じ参照リスト、同じ参照フレーム)
10.予測ブロックN2の条件判定2(異なる参照リスト、同じ参照フレーム)
11.予測ブロックN2の条件判定3(同じ参照リスト、異なる参照フレーム)
12.予測ブロックN2の条件判定4(異なる参照リスト、異なる参照フレーム)
方法4によれば、条件判定の周回数が最大でも1回となるので、ハードウェアへの実装
を考慮した際に予測ブロックの符号化情報へのメモリアクセス回数が方法1、方法2、方
法3に比べて少なくなり、複雑性が低減される。
Method 4:
Priority is given to condition determination of the same prediction block, and four condition determinations are performed within one prediction block. If all the conditions are not met, it is determined that there is no motion vector matching the condition in the prediction block. The condition of the next prediction block is determined.
Specifically, the condition determination is performed in the following priority order. (However, N is A or B)
1. Condition determination 1 of the prediction block N0 (same reference list, same reference frame)
2. Prediction block N0 condition determination 2 (different reference list, same reference frame)
3. Prediction block N0 condition determination 3 (same reference list, different reference frames)
4). Prediction block N0 condition determination 4 (different reference list, different reference frame)
5. Condition determination 1 of the prediction block N1 (same reference list, same reference frame)
6). Prediction block N1 condition determination 2 (different reference list, same reference frame)
7). Condition determination 3 of the prediction block N1 (same reference list, different reference frames)
8). Prediction block N1 condition determination 4 (different reference list, different reference frame)
9. Prediction block N2 condition determination 1 (same reference list, same reference frame)
10. Prediction block N2 condition determination 2 (different reference list, same reference frame)
11. Prediction block N2 condition decision 3 (same reference list, different reference frames)
12 Prediction block N2 condition determination 4 (different reference list, different reference frame)
According to method 4, the number of rounds for condition determination is at most one, so that the number of memory accesses to the encoded information of the prediction block is considered as method 1, method 2, and method 3 when implementation in hardware is taken into consideration. And complexity is reduced.

方法5:
方法4と同様に、同じ予測ブロックの条件判定を優先し、1つの予測ブロック内で4つ
の条件判定を行い、すべての条件に合致しない場合、当該予測ブロックには条件に合致す
る動きベクトルは存在しないものと判断し、次の予測ブロックの条件判定を行う。ただし
、予測ブロック内の条件判定においては、方法4は同じ参照フレームであることをより優
先しているが、方法5は同じ参照リストであることを優先する。
具体的には以下の優先順序で条件判定を行う。(ただし、NはAまたはB)
1.予測ブロックN0の条件判定1(同じ参照リスト、同じ参照フレーム)
2.予測ブロックN0の条件判定3(同じ参照リスト、異なる参照フレーム)
3.予測ブロックN0の条件判定2(異なる参照リスト、同じ参照フレーム)
4.予測ブロックN0の条件判定4(異なる参照リスト、異なる参照フレーム)
5.予測ブロックN1の条件判定1(同じ参照リスト、同じ参照フレーム)
6.予測ブロックN1の条件判定3(同じ参照リスト、異なる参照フレーム)
7.予測ブロックN1の条件判定2(異なる参照リスト、同じ参照フレーム)
8.予測ブロックN1の条件判定4(異なる参照リスト、異なる参照フレーム)
9.予測ブロックN2の条件判定1(同じ参照リスト、同じ参照フレーム)
10.予測ブロックN2の条件判定3(同じ参照リスト、異なる参照フレーム)
11.予測ブロックN2の条件判定2(異なる参照リスト、同じ参照フレーム)
12.予測ブロックN2の条件判定4(異なる参照リスト、異なる参照フレーム)
方法5によれば、さらに、方法4に比べて予測ブロックの参照リストの参照回数を減ら
すことができ、メモリへのアクセス回数、条件判定等の処理量を削減することにより複雑
性を低減することができる。また、方法4と同様に、条件判定の周回数が最大でも1回と
なるので、ハードウェアへの実装を考慮した際に予測ブロックの符号化情報へのメモリア
クセス回数が方法1、方法2、方法3に比べて少なくなり、複雑性が低減される。
Method 5:
As in method 4, prioritizing condition determination for the same prediction block, if four condition determinations are made within one prediction block and all the conditions are not met, there is a motion vector that matches the conditions in the prediction block. It is determined that it does not, and the condition of the next prediction block is determined. However, in the condition determination in the prediction block, method 4 gives priority to the same reference frame, but method 5 gives priority to the same reference list.
Specifically, the condition determination is performed in the following priority order. (However, N is A or B)
1. Condition determination 1 of the prediction block N0 (same reference list, same reference frame)
2. Prediction block N0 condition determination 3 (same reference list, different reference frames)
3. Prediction block N0 condition determination 2 (different reference list, same reference frame)
4). Prediction block N0 condition determination 4 (different reference list, different reference frame)
5. Condition determination 1 of the prediction block N1 (same reference list, same reference frame)
6). Condition determination 3 of the prediction block N1 (same reference list, different reference frames)
7). Prediction block N1 condition determination 2 (different reference list, same reference frame)
8). Prediction block N1 condition determination 4 (different reference list, different reference frame)
9. Prediction block N2 condition determination 1 (same reference list, same reference frame)
10. Prediction block N2 condition decision 3 (same reference list, different reference frames)
11. Prediction block N2 condition determination 2 (different reference list, same reference frame)
12 Prediction block N2 condition determination 4 (different reference list, different reference frame)
According to the method 5, the reference block reference count can be reduced as compared with the method 4, and the complexity can be reduced by reducing the number of times of access to the memory and the amount of processing such as condition determination. Can do. Similarly to method 4, the number of rounds for condition determination is at most 1. Therefore, when considering implementation in hardware, the number of times of memory access to the encoded information of the prediction block is method 1, method 2, Compared to method 3, the complexity is reduced.

次に、予測動きベクトル登録部121は予測動きベクトルの候補mvLXA、mvLX
B、mvLXColの優先順位を評価し、優先順位に応じた順番でMVPリストmvpL
istLXに格納する。このMVPリストmvpListLXに格納する手順については
後ほど詳細に説明する。
Next, the motion vector predictor registration unit 121 predicts motion vector candidates mvLXA and mvLX.
B, evaluate the priority of mvLXCol, and MVP list mvpL in the order according to the priority
Store in istLX. The procedure for storing in the MVP list mvpListLX will be described in detail later.

次に、予測動きベクトル候補同一判定部122は、MVPリストmvpListLXに
格納された予測動きベクトルの候補の中から同一の動きベクトルの値をもつものを判定し
、同一の動きベクトル値をもつと判定された予測動きベクトルの候補について一つを残し
てそれ以外をMVPリストmvpListLXから削除して、予測動きベクトルの候補が
重複しないようにし、MVPリストmvpListLXを更新する。予測動きベクトル候
補同一判定部122は、更新されたMVPリストmvpListLXを予測動きベクトル
候補符号量算出部123と予測動きベクトル選択部124に与える。
Next, the motion vector predictor candidate determination unit 122 determines the motion vector predictor candidates having the same motion vector value from the motion vector predictor candidates stored in the MVP list mvpListLX, and determines that they have the same motion vector value. The MVP list mvpListLX is updated by leaving one of the predicted motion vector candidates and deleting the others from the MVP list mvpListLX so that the predicted motion vector candidates do not overlap. The motion vector predictor candidate identity determination unit 122 provides the updated MVP list mvpListLX to the motion vector predictor candidate code amount calculation unit 123 and the motion vector predictor selection unit 124.

一方、図1の動きベクトル検出部102にて予測ブロック毎に動きベクトルmvが検出
される。その動きベクトルmvは更新されたMVPリストmvpListLXの予測動き
ベクトルの候補とともに予測動きベクトル候補符号量算出部123に入力される。
On the other hand, the motion vector detection unit 102 in FIG. 1 detects a motion vector mv for each prediction block. The motion vector mv is input to the predicted motion vector candidate code amount calculation unit 123 together with the predicted motion vector candidates of the updated MVP list mvpListLX.

予測動きベクトル候補符号量算出部123は、動きベクトルmvとMVPリストmvp
ListLXの中に格納された各予測動きベクトルの候補mvpListLX[i]との
差分であるそれぞれの差分動きベクトルを算出し、それら差分動きベクトルを符号化した
ときの符号量をMVPリストmvpListLXの要素ごとに算出し、予測動きベクトル
選択部124に供給する。
The motion vector predictor candidate code amount calculation unit 123 calculates the motion vector mv and the MVP list mvp.
Each difference motion vector that is a difference from each prediction motion vector candidate mvpListLX [i] stored in ListLX is calculated, and the code amount when the difference motion vector is encoded is calculated for each element of the MVP list mvpListLX. And supplied to the motion vector predictor selection unit 124.

予測動きベクトル選択部124は、MVPリストmvpListLXに登録された各要
素の中で、予測動きベクトルの候補毎の符号量が最小となる予測動きベクトルの候補mv
pListLX[i]を予測動きベクトルmvpとして選択し、MVPリストmvpLi
stLXの中で最小の発生符号量となる予測動きベクトルの候補が複数存在する場合には
、MVPリストmvpListLXの中のインデックスiが小さい番号で表される予測動
きベクトルの候補mvpListLX[i]を最適予測動きベクトルmvpとして選択す
る。選択された予測動きベクトルmvpを動きベクトル減算部125に供給する。さらに
、その選択された予測動きベクトルmvpに対応するMVPリスト中のインデックスiを
LX(X=0または1)のMVPインデックスmvp_idxとして出力する。
The predicted motion vector selection unit 124, among the elements registered in the MVP list mvpListLX, the predicted motion vector candidate mv that minimizes the code amount for each predicted motion vector candidate.
pListLX [i] is selected as the predicted motion vector mvp, and the MVP list mvpLi
When there are a plurality of motion vector predictor candidates having the smallest generated code amount in stLX, the motion vector candidate mvpListLX [i] represented by a small index i in the MVP list mvpListLX is optimal. Select as the predicted motion vector mvp. The selected predicted motion vector mvp is supplied to the motion vector subtraction unit 125. Further, the index i in the MVP list corresponding to the selected prediction motion vector mvp is output as the MVP index mvp_idx of LX (X = 0 or 1).

なお、予測動きベクトル選択部124は必要に応じてmvp_idxが指し示すMVP
リスト中の予測ブロックで用いられた符号化情報も図1の予測方法決定部106に出力す
る。ここで出力する符号化情報は、重み付け予測の重み付けパラメータ、量子化の量子化
パラメータ等が含まれる。
Note that the motion vector predictor selection unit 124 selects the MVP indicated by mvp_idx as necessary.
The encoded information used in the prediction block in the list is also output to the prediction method determination unit 106 in FIG. The encoding information output here includes a weighting parameter for weighted prediction, a quantization parameter for quantization, and the like.

最後に動きベクトル減算部125は、動きベクトルmvから選択された予測動きベクト
ルmvpを減産することにより差分動きベクトルmvdを算出し、差分動きベクトルmv
dを出力する。
mvd=mv−mvp
Finally, the motion vector subtraction unit 125 calculates the differential motion vector mvd by reducing the production of the predicted motion vector mvp selected from the motion vector mv, and the differential motion vector mvd
d is output.
mvd = mv−mvp

図1に戻り、動き補償予測部105は、復号画像メモリ115に格納されている復号画
像を参照して動きベクトル検出部102から供給される動きベクトルmvに応じて動き補
償を行い、動き補償予測信号を得て、予測方法決定部106に供給する。
Returning to FIG. 1, the motion compensation prediction unit 105 refers to the decoded image stored in the decoded image memory 115, performs motion compensation according to the motion vector mv supplied from the motion vector detection unit 102, and performs motion compensation prediction. A signal is obtained and supplied to the prediction method determination unit 106.

予測方法決定部106は、予測方法を決定する。それぞれの予測モードごとに符号量と
符号化歪を算出し、最も少ない発生符号量と符号化歪となる予測ブロックサイズと予測モ
ードが決定される。差分動きベクトル算出部103の動きベクトル減算部125から供給
された差分動きベクトルmvdと予測動きベクトル選択部124から供給された予測動き
ベクトルを表すインデックスmvp_idxの符号化が行われ、動き情報の符号量を算出
する。さらに、動き補償予測部105から供給される動き補償予測信号と、画像メモリ1
01から供給される符号化対象の画像信号との予測残差信号を符号化した予測残差信号の
符号量を算出する。動き情報の符号量と予測残差信号の符号量とが加算された総発生符号
量を算出し、第1の評価値とする。
The prediction method determination unit 106 determines a prediction method. The code amount and the coding distortion are calculated for each prediction mode, and the prediction block size and the prediction mode for the smallest generated code amount and coding distortion are determined. The difference motion vector mvd supplied from the motion vector subtraction unit 125 of the difference motion vector calculation unit 103 and the index mvp_idx representing the prediction motion vector supplied from the prediction motion vector selection unit 124 are encoded, and the code amount of the motion information Is calculated. Furthermore, the motion compensation prediction signal supplied from the motion compensation prediction unit 105 and the image memory 1
The code amount of the prediction residual signal obtained by encoding the prediction residual signal with the image signal to be encoded supplied from 01 is calculated. The total generated code amount obtained by adding the code amount of the motion information and the code amount of the prediction residual signal is calculated and used as the first evaluation value.

また、こうした差分画像を符号化後に、歪量評価の為に復号し、符号化により生じる元
画像との誤差を表す比率として符号化歪が算出される。これら総発生符号量と符号化歪と
を動き補償毎に比較することで、最も少ない発生符号量と符号化歪となる予測ブロックサ
イズと予測モードが決定される。決定された予測ブロックサイズの予測モードに応じた動
きベクトルmvに対して、上述した動きベクトルの予測方法が行われ、予測動きベクトル
を表すインデックスが、予測ブロック単位の第2のシンタックスパターンで表されるフラ
グmvp_idx_lX[i]として符号化される。尚、ここで算出される発生符号量は
、符号化過程をシミュレートしたものであることが望ましいが、簡便に近似したり、概算
することも可能である。
Also, after encoding such a difference image, the difference image is decoded for distortion amount 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 prediction block size and the prediction mode that generate the least generated code amount and the coding distortion are determined. The motion vector prediction method described above is performed on the motion vector mv corresponding to the prediction mode of the determined prediction block size, and the index representing the prediction motion vector is represented by a second syntax pattern in units of prediction blocks. Is encoded as a flag mvp_idx_lX [i]. The generated code amount calculated here is preferably a simulation of the encoding process, but can be approximated or approximated easily.

(復号における動きベクトルの予測)
上述のシンタックスに基づき、符号化された動画像のビットストリームを復号する動画
像復号装置において、本発明に係る動きベクトルの予測方法の動作を説明する。
(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.

最初に、第1符号化ビット列復号部202にて復号されるビットストリームの各フラグ
について説明する。図10は本発明の動画像符号化装置により生成され、第1符号化ビッ
ト列復号部202により復号されるビットストリームのスライス単位でスライスヘッダー
に記述される第1のシンタックスパターンである。ビットストリームのスライスヘッダー
の中に記述されているフラグから、スライスタイプがP或いはBの場合、インター予測の
マージモードでない予測ブロックにおいて、同一ピクチャ内で隣接する周囲の予測ブロッ
クの動きベクトルだけでなく、時間方向で異なるピクチャの中の処理対象の予測ブロック
と同一位置あるいは近傍の予測ブロックの動きベクトルを利用して動きベクトルの予測を
行うかどうかを示し、インター予測のマージモードの予測ブロックにおいて、同一ピクチ
ャ内で隣接する周囲の予測ブロックの符号化情報だけでなく、時間方向で異なるピクチャ
の中の処理対象の予測ブロックと同一位置あるいは近傍の予測ブロックの符号化情報も利
用してインター予測を行うかどうかを示す第1のフラグmv_competition_
temporal_flagを復号し、mv_competition_tempora
l_flagが真(1)の場合は、インター予測のマージモードでない予測ブロックにお
いて、同一ピクチャ内で隣接する周囲の予測ブロックの動きベクトルだけでなく、時間方
向に異なるピクチャで処理対象の予測ブロックと同一位置または近傍の予測ブロックを利
用して動きベクトルの予測が行われ、インター予測のマージモードの予測ブロックにおい
て、同一ピクチャ内で隣接する周囲の予測ブロックの符号化情報だけでなく、時間方向に
異なるピクチャで処理対象の予測ブロックと同一位置または近傍の予測ブロックの符号化
情報も利用してインター予測が行われる。更に、mv_competition_tem
poral_flagが真(1)の場合は、インター予測のマージモードでない予測ブロ
ックにおいて、時間方向で異なるピクチャの中の処理対象の予測ブロックと同一位置の予
測ブロックの動きベクトルの候補が優先順位を上げて後述するマージ候補リストに登録さ
れるかどうかを示す第2のフラグmv_temporal_high_priority
_flagを復号して判定し、真(1)の場合は、時間方向に異なるピクチャで処理対象
の予測ブロックと同一位置の予測ブロックの動きベクトルやマージ候補が優先順位を上げ
て、MVPリストやマージ候補リストにそれぞれ登録される。
First, each flag of the bit stream decoded by the first encoded bit string decoding unit 202 will be described. FIG. 10 shows a first syntax pattern described in the slice header in units of slices of the bit stream generated by the moving picture encoding apparatus of the present invention and decoded by the first encoded bit string decoding unit 202. From the flags described in the slice header of the bitstream, when the slice type is P or B, not only the motion vector of the neighboring prediction block adjacent in the same picture in the prediction block that is not in the inter prediction merge mode. , Indicating whether or not to perform motion vector prediction using the motion vector of the prediction block at the same position or in the vicinity of the prediction block to be processed in different pictures in the time direction, and in the prediction block in the inter prediction merge mode, Inter prediction is performed using not only the encoding information of neighboring prediction blocks in the same picture but also the encoding information of the prediction block at the same position or in the vicinity of the processing target prediction block in a picture that is different in the time direction. First flag mv_competit indicating whether to perform on_
Decode temporal_flag, mv_competition_tempora
When l_flag is true (1), in a prediction block that is not in the inter prediction merge mode, not only the motion vectors of neighboring prediction blocks adjacent in the same picture, but also the same as the prediction block to be processed in a different picture in the time direction Motion vectors are predicted using position or neighboring prediction blocks, and in the prediction block in the inter prediction merge mode, not only the encoding information of neighboring prediction blocks adjacent in the same picture but also the time direction differs. Inter-prediction is also performed using the coding information of a prediction block at the same position or in the vicinity of the prediction block to be processed in the picture. Furthermore, mv_competition_tem
When the portal_flag is true (1), motion vector candidates of the prediction block in the same position as the processing target prediction block in the picture different in time direction in the prediction block that is not in the inter prediction merge mode increase the priority. Second flag mv_temporal_high_priority indicating whether to be registered in a merge candidate list to be described later
_Flag is decoded and determined. If true (1), the motion vector or merge candidate of the prediction block at the same position as the processing target prediction block in the temporally different picture increases the priority, and the MVP list or merge Each is registered in the candidate list.

さらに、スライスタイプがBの場合は、時間方向の予測動きベクトルの候補、またはマ
ージ候補を算出する際に用いる時間方向で異なるピクチャcolPicが処理対象の予測
ブロックが含まれるピクチャのL0の参照リスト或いはL1の参照リストのどちらに登録
されている参照画像を使用するかを示す第3フラグcollocated_from_l
0_flagを復号し、処理対象の予測ブロックが含まれるピクチャの参照ピクチャのリ
ストのうちL0或いはL1のどちらを使用するか判別する。
Further, when the slice type is B, a reference list of L0s of pictures including a prediction block to be processed that includes a picture colPic that is different in the temporal direction used in calculating a temporal motion vector predictor candidate or a merge candidate. A third flag collocated_from_l indicating which of the reference images registered in the L1 reference list is to be used
0_flag is decoded to determine whether to use L0 or L1 in the reference picture list of the picture including the prediction block to be processed.

さらに、スライスタイプがP或いはBの場合は、後述するMVPリスト、またはマージ
候補リスト内の登録順序を予測ブロックごとに適応的に変更するか否かを示す第4フラグ
mv_list_adaptive_idx_flagを復号し、MVPリスト、または
マージ候補リスト内の登録順序を予測ブロックごとに適応的に変更するか判別する。
Further, when the slice type is P or B, the MVP list described later or the fourth flag mv_list_adaptive_idx_flag indicating whether or not the registration order in the merge candidate list is adaptively changed for each prediction block is decoded, and the MVP list Alternatively, it is determined whether the registration order in the merge candidate list is adaptively changed for each prediction block.

なお、以上のシンタックス要素はピクチャー単位で設定されるシンタックス要素を記述
するピクチャー・パラメータ・セットに設置してもよい。
The above syntax elements may be installed in a picture parameter set describing syntax elements set in units of pictures.

また、第1のフラグmv_competition_temporal_flag、第
2のフラグmv_temporal_high_priority_flag、第3フラ
グcollocated_from_l0_flag、第4フラグmv_list_ad
aptive_idx_flagは、それぞれマージモードでない動きベクトル予測用と
、マージモード用で独立した別個のフラグを用意して、それぞれ独立で制御することもで
きる。
Also, the first flag mv_competition_temporal_flag, the second flag mv_temporal_high_priority_flag, the third flag collocated_from_l0_flag, and the fourth flag mv_list_ad
The independent_idx_flag can be controlled independently by preparing separate flags for motion vector prediction that are not in the merge mode and for merge mode, respectively.

図11は本発明の動画像符号化装置により生成され、第1符号化ビット列復号部202
により復号されるビットストリームの予測ブロック単位で記述される第2のシンタックス
パターンである。予測ブロック単位に記述されるシンタックスパターンを示す。インター
予測の場合(予測ブロックがインター予測かどうかを示す予測モードPredModeが
インター予測を示すMODE_INTERの場合)、マージモードかどうかを示すmer
ge_flag[x0][y0]が復号される。ここで、x0、y0は画面内での予測ブ
ロックの左上の画素の位置を示すインデックスであり、merge_flag[x0][
y0]は画面内の(x0,y0)に位置する予測ブロックのマージ・モードかどうかを示
すフラグである。
FIG. 11 shows a first encoded bit string decoding unit 202 generated by the moving image encoding apparatus of the present invention.
This is a second syntax pattern described in units of prediction blocks of the bitstream decoded by the above. The syntax pattern described in a prediction block unit is shown. In the case of inter prediction (when the prediction mode PredMode indicating whether the prediction block is inter prediction is MODE_INTER indicating inter prediction), the mer indicating whether it is a merge mode or not.
ge_flag [x0] [y0] is decoded. Here, x0 and y0 are indexes indicating the position of the upper left pixel of the prediction block in the screen, and merge_flag [x0] [
y0] is a flag indicating whether or not the prediction block is in the merge mode located at (x0, y0) in the screen.

次に、merge_flag[x0][y0]が1の場合、マージモードの候補の総数
NumMergeCandが1つを超える場合に、参照する予測動きベクトルの候補のリ
ストであるマージリストのインデックスのシンタックス要素merge_idx[x0]
[y0]が復号される。ここで、x0、y0は画面内での予測ブロックの左上の画素の位
置を示すインデックスであり、merge_idx[x0][y0]は画面内の(x0,
y0)に位置する予測ブロックのマージ・インデックスである。
Next, when merge_flag [x0] [y0] is 1, when the total number of merge mode candidates NumMergeCand exceeds 1, the syntax element merge_idx of the index of the merge list that is a list of predicted motion vector candidates to be referred to. [X0]
[Y0] is decoded. Here, x0 and y0 are indices indicating the position of the upper left pixel of the prediction block in the screen, and merge_idx [x0] [y0] is (x0,
This is the merge index of the prediction block located at y0).

一方、merge_flag[x0][y0]が0の場合、参照リストLX(X=0ま
たは1)ごとに、動きベクトル検出にて求められた予測ブロックの動きベクトルと予測動
きベクトルとの差分動きベクトルのシンタックス要素mvd_lX[x0][y0][j
]が復号される。ここで、Xは0或いは1で予測方向を示し、配列のインデックスx0は
予測ブロックのx座標、y0は予測ブロックのy座標、jは差分動きベクトルの成分を表
し、j=0はx成分を、j=1はy成分を表す。次に、予測動きベクトルの候補の総数が
1つを超える場合に、参照する予測動きベクトルの候補のリストであるMVPリストのイ
ンデックスのシンタックス要素mvp_idx_lX[x0][y0]が復号される。こ
こで、x0、y0は画面内での予測ブロックの左上の画素の位置を示すインデックスであ
り、mvp_idx_lX[x0][y0]は画面内の(x0,y0)に位置する予測ブ
ロックのリストLXのMVPインデックスである。添え字LXは参照リストを表し、L0
とL1の2つ用意されていて、Xには0或いは1が入る。関数NumMVPCand(L
X)は、予測方向LX(Xは0或いは1)で予測ブロックの予測動きベクトルの候補の総
数を算出する関数を表し、後述にて説明される。このMVPリストのインデックスmvp
_idx_lX[x0][y0]は動きベクトルの予測方法により予測動きベクトルの候
補の総数NumMVPCand(LX)が1より大きい場合に復号される。予測動きベク
トルの候補の総数が1つであれば、その1つが予測動きベクトルとなるので、mvp_i
dx_lX[x0][y0]を伝送せずとも参照する予測動きベクトルの候補が確定する
為である。
On the other hand, when merge_flag [x0] [y0] is 0, for each reference list LX (X = 0 or 1), the motion vector difference between the motion vector of the predicted block obtained by motion vector detection and the motion vector predictor is calculated. Syntax element mvd_lX [x0] [y0] [j
] Is decrypted. Here, X is 0 or 1, indicating the prediction direction, the array index x0 is the x coordinate of the prediction block, y0 is the y coordinate of the prediction block, j is the component of the differential motion vector, and j = 0 is the x component. , J = 1 represents the y component. Next, when the total number of motion vector predictor candidates exceeds 1, the syntax element mvp_idx_lX [x0] [y0] of the index of the MVP list that is a list of motion vector predictor candidates to be referred to is decoded. Here, x0 and y0 are indices indicating the position of the upper left pixel of the prediction block in the screen, and mvp_idx_lX [x0] [y0] is a list of prediction blocks LX located at (x0, y0) in the screen. This is an MVP index. The subscript LX represents the reference list, L0
And L1 are prepared, and 0 or 1 is entered in X. Function NumMVPCand (L
X) represents a function for calculating the total number of motion vector predictor candidates of the prediction block in the prediction direction LX (X is 0 or 1), and will be described later. Index mvp of this MVP list
_Idx_lX [x0] [y0] is decoded when the total number of predicted motion vector candidates NumMVPCand (LX) is greater than 1 by the motion vector prediction method. If the total number of motion vector predictor candidates is 1, one of them becomes a motion vector predictor, so mvp_i
This is because the candidate motion vector to be referred to is determined without transmitting dx_lX [x0] [y0].

実施の形態に係る動きベクトルの予測方法が実施される場合、図2の動画像復号装置の
動きベクトル算出部204にて処理が行われる。図13は、実施の形態の動画像符号化装
置に対応する図2の動画像復号装置の動きベクトル算出部204の詳細な構成を示す図で
ある。図13の太枠線で囲まれる部分は動きベクトル算出部204を示している。更に、
その内部の太点線で囲まれる部分は後述する動きベクトルの予測方法の動作部を示してお
り、対応する動画像符号化装置にも同様に設置され、符号化と復号で矛盾しない同一の判
定結果を得られるようにしている。以下、この図を用いて、復号における動きベクトルの
予測方法を説明する。
When the motion vector prediction method according to the embodiment is performed, processing is performed by the motion vector calculation unit 204 of the video decoding device in FIG. FIG. 13 is a diagram illustrating a detailed configuration of the motion vector calculation unit 204 of the video decoding device of FIG. 2 corresponding to the video encoding device of the embodiment. A portion surrounded by a thick frame line in FIG. 13 indicates the motion vector calculation unit 204. Furthermore,
The part surrounded by the thick dotted line in the figure shows the operation part of the motion vector prediction method to be described later, and is also installed in the corresponding video encoding device in the same way, and the same determination result that is consistent between encoding and decoding So that you can get Hereinafter, a motion vector prediction method in decoding will be described with reference to FIG.

動きベクトル算出部204は、予測動きベクトル候補生成部220、予測動きベクトル
登録部221、予測動きベクトル候補同一判定部222、予測動きベクトル選択部223
及び動きベクトル加算部224を含む。
The motion vector calculation unit 204 includes a predicted motion vector candidate generation unit 220, a predicted motion vector registration unit 221, a predicted motion vector candidate identity determination unit 222, and a predicted motion vector selection unit 223.
And a motion vector adder 224.

動きベクトル算出部204の中の予測動きベクトル候補生成部220、予測動きベクト
ル登録部221及び予測動きベクトル候補同一判定部222は、符号化側の差分動きベク
トル算出部103の中の予測動きベクトル候補生成部120、予測動きベクトル登録部1
21及び予測動きベクトル候補同一判定部122とそれぞれ同じ動作をするように規定す
ることにより、符号化と復号で矛盾しない同一の予測動きベクトルの候補を符号化側及び
復号側で得ることができる。
The predicted motion vector candidate generation unit 220, the predicted motion vector registration unit 221 and the predicted motion vector candidate identity determination unit 222 in the motion vector calculation unit 204 are the predicted motion vector candidates in the differential motion vector calculation unit 103 on the encoding side. Generation unit 120, predicted motion vector registration unit 1
21 and the predicted motion vector candidate identity determination unit 122 are defined so as to perform the same operation, the same predicted motion vector candidates that are consistent in encoding and decoding can be obtained on the encoding side and the decoding side.

予測動きベクトル候補生成部220は、図12の符号化側の予測動きベクトル候補生成
部120と同一の処理を行う。予測動きベクトル候補生成部220は、復号して符号化情
報格納メモリ209に記録されていた、復号対象ブロックと同一ピクチャ内の復号対象ブ
ロックと隣接する復号済みの予測ブロック及び異なるピクチャ内の復号対象ブロックと同
一位置あるいはその近傍の位置に存在する復号済みの予測ブロック等の動きベクトルを符
号化情報格納メモリ209から読み出す。符号化情報格納メモリ209から読み出された
復号済みの他のブロックの動きベクトルから少なくとも1つ以上の予測動きベクトルの候
補mvLXA、mvLXB、mvLXColを生成し、予測動きベクトル登録部221に
供給する。これらの予測動きベクトルの候補mvLXA、mvLXB、mvLXColは
参照インデックスに応じてスケーリングすることにより算出されることもある。なお、予
測動きベクトル候補生成部220は、図12の符号化側の予測動きベクトル候補生成部1
20と同一の処理を行うので、図12の符号化側の予測動きベクトル候補生成部120で
説明した予測動きベクトルを算出するための方法1、2、3、4、5の条件判定は予測動
きベクトル候補生成部220でも適用できるものとし、ここでは詳細な説明は省略する。
The motion vector predictor candidate generation unit 220 performs the same processing as that of the motion vector predictor candidate generation unit 120 on the encoding side in FIG. The motion vector predictor candidate generation unit 220 decodes and records the decoded prediction block adjacent to the decoding target block in the same picture as the decoding target block and the decoding target in a different picture, which are recorded in the encoded information storage memory 209. A motion vector such as a decoded prediction block existing at the same position as the block or in the vicinity thereof is read from the encoded information storage memory 209. At least one or more motion vector candidates mvLXA, mvLXB, and mvLXCol are generated from the motion vectors of other decoded blocks read from the encoded information storage memory 209 and supplied to the motion vector predictor registration unit 221. These predicted motion vector candidates mvLXA, mvLXB, and mvLXCol may be calculated by scaling according to the reference index. Note that the motion vector predictor candidate generation unit 220 includes the motion vector predictor candidate generation unit 1 on the encoding side in FIG.
20, the condition determination of the methods 1, 2, 3, 4, and 5 for calculating the prediction motion vector described in the prediction-side motion vector candidate generation unit 120 on the encoding side in FIG. The vector candidate generation unit 220 can also be applied, and detailed description thereof is omitted here.

次に、予測動きベクトル登録部221は図12の符号化側の予測動きベクトル登録部1
21と同一の処理を行う。予測動きベクトル登録部221は、予測動きベクトルの候補m
vLXA、mvLXB、mvLXColの優先順位を評価し、優先順位に応じた順番でM
VPリストmvpListLXに格納する。このMVPリストmvpListLXに格納
する手順については後ほど詳細に説明する。
Next, the motion vector predictor registration unit 221 encodes the motion vector predictor registration unit 1 on the encoding side in FIG.
The same processing as 21 is performed. The motion vector predictor registration unit 221 uses the motion vector candidate m
Evaluate the priority order of vLXA, mvLXB, mvLXCol, and M in order according to the priority order
Store in the VP list mvpListLX. The procedure for storing in the MVP list mvpListLX will be described in detail later.

次に、予測動きベクトル候補同一判定部222は、図12の符号化側の予測動きベクト
ル候補同一判定部122と同一の処理を行う。予測動きベクトル候補同一判定部222は
、MVPリストmvpListLXに格納された予測動きベクトルの候補の中から同一の
動きベクトルの値をもつものを判定し、同一の動きベクトル値をもつと判定された予測動
きベクトルの候補について一つを残してそれ以外をMVPリストmvpListLXから
削除して、予測動きベクトルの候補が重複しないようにし、MVPリストmvpList
LXを更新する。更新されたMVPリストmvpListLXは予測動きベクトル選択部
223に与えられる。
Next, the motion vector predictor candidate identity determination unit 222 performs the same processing as the motion vector predictor candidate identity determination unit 122 on the encoding side in FIG. The predicted motion vector candidate identity determination unit 222 determines the prediction motion vector candidates stored in the MVP list mvpListLX having the same motion vector value, and the prediction determined to have the same motion vector value. MVP list mvpList is used so that the motion vector candidates are deleted from the MVP list mvpListLX while leaving only one motion vector candidate out of the MVP list mvpListLX.
Update LX. The updated MVP list mvpListLX is given to the motion vector predictor selection unit 223.

一方、第1符号化ビット列復号部202にて復号された差分動きベクトルmvdが動き
ベクトル加算部224に入力される。予測動きベクトルのインデックスを示すmvp_i
dxが符号化されている場合は、第1符号化ビット列復号部202にて復号された予測動
きベクトルのインデックスmvp_idxが予測動きベクトル選択部223に入力される
On the other hand, the differential motion vector mvd decoded by the first encoded bit string decoding unit 202 is input to the motion vector addition unit 224. Mvp_i indicating the index of the predicted motion vector
When dx is encoded, the index mvp_idx of the motion vector predictor decoded by the first encoded bit string decoder 202 is input to the motion vector selector 223.

このようにして予測動きベクトル選択部223には、MVPリストmvpListLX
の中に残った予測動きベクトルの候補と、予測動きベクトルのインデックスを示すmvp
_idxが符号化されていた場合は、復号された予測動きベクトルのインデックスmvp
_idxも入力される。
In this way, the predicted motion vector selection unit 223 receives the MVP list mvpListLX.
Mvp indicating the prediction motion vector candidate remaining in and the index of the prediction motion vector
If _idx has been encoded, the index mvp of the decoded motion vector predictor
_Idx is also input.

予測動きベクトル選択部223は、最初にMVPリストmvpListLXに残った予
測動きベクトルの候補が1つであるかどうかを判定し、1つの場合、MVPリストmvp
ListLXに残った予測動きベクトルの候補を予測動きベクトルmvpとして取り出す
。MVPリストmvpListLXの中に予測動きベクトルの候補が1つより多く残った
場合、第1符号化ビット列復号部202にて復号された予測動きベクトルのインデックス
mvp_idxが読み込まれ、読み込まれたインデックスmvp_idxに対応する予測
動きベクトルの候補をMVPリストmvpListLXから取り出す。取り出された予測
動きベクトルの候補を予測動きベクトルmvpとして動きベクトル加算部224に供給す
る。
The motion vector predictor selection unit 223 first determines whether there is one motion vector predictor candidate remaining in the MVP list mvpListLX. In the case of one motion vector, the MVP list mvp
Predicted motion vector candidates remaining in ListLX are extracted as predicted motion vectors mvp. When more than one candidate motion vector predictor remains in the MVP list mvpListLX, the index mvp_idx of the motion vector predictor decoded by the first encoded bit string decoding unit 202 is read and corresponds to the read index mvp_idx The predicted motion vector candidate to be extracted is extracted from the MVP list mvpListLX. The extracted motion vector predictor candidate is supplied to the motion vector adding unit 224 as a motion vector predictor mvp.

最後に動きベクトル加算部224は、第1符号化ビット列復号部202にて復号されて
供給される差分動きベクトルmvdと予測動きベクトルmvpを加算することにより動き
ベクトルmvを算出し、動きベクトルmvを出力する。
mv=mvp+mvd
Finally, the motion vector addition unit 224 calculates the motion vector mv by adding the difference motion vector mvd and the prediction motion vector mvp that are decoded and supplied by the first encoded bit string decoding unit 202, and obtains the motion vector mv. Output.
mv = mvp + mvd

以上のようにして、予測ブロック毎に動きベクトルが算出される。この動きベクトルを
使用して動き補償により予測画像が生成され、ビットストリームから復号された残差信号
と加算されることで復号画像が生成される。
As described above, a motion vector is calculated for each prediction block. 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.

動画像符号化装置の差分動きベクトル算出部103、動画像復号装置の動きベクトル算
出部204の処理手順について、それぞれ図14、図15のフローチャートを用いて説明
する。図14は動画像符号化装置による差分動きベクトル算出処理手順を示すフローチャ
ートであり、図15は動画像復号装置による動きベクトル算出処理手順を示すフローチャ
ートである。
Processing procedures of the difference motion vector calculation unit 103 of the moving image encoding device and the motion vector calculation unit 204 of the moving image decoding device will be described with reference to the flowcharts of FIGS. 14 and 15, respectively. FIG. 14 is a flowchart showing a difference motion vector calculation processing procedure by the moving image encoding device, and FIG. 15 is a flowchart showing a motion vector calculation processing procedure by the moving image decoding device.

まず、図14を参照して符号化側の処理手順を説明する。符号化側では、差分動きベク
トル算出部103の中の予測動きベクトル候補生成部120、予測動きベクトル登録部1
21、及び予測動きベクトル候補同一判定部122により、予測動きベクトルの候補を算
出し、MVPリストに算出した予測動きベクトルの候補を追加し、不要な予測動きベクト
ルの候補を削除することにより、MVPリストを構築する(S101)。
First, the processing procedure on the encoding side will be described with reference to FIG. On the encoding side, the motion vector predictor candidate generation unit 120 in the motion vector difference calculation unit 103, the motion vector registration unit 1
21 and the predicted motion vector candidate identity determination unit 122 calculate predicted motion vector candidates, add the calculated predicted motion vector candidates to the MVP list, and delete unnecessary predicted motion vector candidates. A list is constructed (S101).

続いて、予測動きベクトル候補符号量算出部123により、動きベクトルmvとMVP
リストmvpListLXの中に格納された各予測動きベクトルの候補mvpListL
X[i]との差分であるそれぞれの差分動きベクトルを算出し、それら差分動きベクトル
を符号化したときの符号量をMVPリストmvpListLXの要素ごとに算出し、予測
動きベクトル選択部124により、MVPリストmvpListLXに登録された各要素
の中で、予測動きベクトルの候補毎の符号量が最小となる予測動きベクトルの候補mvp
ListLX[i]を予測動きベクトルmvpとして選択し、MVPリストmvpLis
tLXの中で最小の発生符号量となる予測動きベクトルの候補が複数存在する場合には、
MVPリストmvpListLXの中のインデックスiが小さい番号で表される予測動き
ベクトルの候補mvpListLX[i]を最適予測動きベクトルmvpとして選択する
。選択された予測動きベクトルmvpを動きベクトル減算部125に供給する。さらに、
その選択された予測動きベクトルmvpに対応するMVPリスト中のインデックスiをL
X(X=0または1)のMVPインデックスmvp_idxとして出力する(S102)
Subsequently, the motion vector mv and MVP are calculated by the prediction motion vector candidate code amount calculation unit 123.
Candidate mvpListL for each predicted motion vector stored in the list mvpListLX
Each differential motion vector that is a difference from X [i] is calculated, a code amount when the differential motion vector is encoded is calculated for each element of the MVP list mvpListLX, and the predicted motion vector selection unit 124 performs MVP Among the elements registered in the list mvpListLX, a prediction motion vector candidate mvp having the smallest code amount for each prediction motion vector candidate
ListLX [i] is selected as the predicted motion vector mvp, and the MVP list mvpLis
When there are a plurality of motion vector predictor candidates that have the smallest generated code amount in tLX,
A predicted motion vector candidate mvpListLX [i] represented by a number with a small index i in the MVP list mvpListLX is selected as the optimum predicted motion vector mvp. The selected predicted motion vector mvp is supplied to the motion vector subtraction unit 125. further,
The index i in the MVP list corresponding to the selected predicted motion vector mvp is set to L
Output as the MVP index mvp_idx of X (X = 0 or 1) (S102)
.

続いて、動きベクトル減算部125は、動きベクトルmvとから選択された予測動きベ
クトルmvpとの差分を計算することにより差分動きベクトルmvdを算出し、差分動き
ベクトルmvdを出力する(S103)。
mvd=mv−mvp
Subsequently, the motion vector subtraction unit 125 calculates a difference motion vector mvd by calculating a difference between the motion vector mv and the predicted motion vector mvp selected, and outputs the difference motion vector mvd (S103).
mvd = mv−mvp

次に、図15を参照して復号側の処理手順を説明する。復号側でも前述したように符号
化側と同様に、動きベクトル算出部204の中の予測動きベクトル候補生成部220、予
測動きベクトル登録部221、及び予測動きベクトル候補同一判定部222により、予測
動きベクトルの候補を算出し、MVPリストに算出した予測動きベクトルの候補を追加し
、不要な予測動きベクトルの候補を削除することにより、MVPリストを構築する(S2
01)。
Next, the processing procedure on the decoding side will be described with reference to FIG. As described above, on the decoding side, similarly to the encoding side, the predicted motion vector candidate generation unit 220, the predicted motion vector registration unit 221 and the predicted motion vector candidate identity determination unit 222 in the motion vector calculation unit 204 perform prediction motion prediction. An MVP list is constructed by calculating vector candidates, adding the calculated motion vector candidates to the MVP list, and deleting unnecessary motion vector predictor candidates (S2).
01).

続いて、予測動きベクトル選択部223により、最初にMVPリストmvpListL
Xに残った予測動きベクトルの候補が1つであるかどうかを判定し、1つの場合、MVP
リストmvpListLXに残った予測動きベクトルの候補を予測動きベクトルmvpと
して取り出す。MVPリストmvpListLXの中に予測動きベクトルの候補が1つよ
り多く残った場合、第1符号化ビット列復号部202にて復号された予測動きベクトルの
インデックスmvp_idxが読み込まれ、読み込まれたインデックスmvp_idxに
対応する予測動きベクトルの候補をMVPリストmvpListLXから取り出す。(S
202)。
Subsequently, the predicted motion vector selection unit 223 first performs the MVP list mvpListL.
It is determined whether or not there is one candidate motion vector predictor remaining in X.
A candidate motion vector predictor remaining in the list mvpListLX is extracted as a motion vector predictor mvp. When more than one candidate motion vector predictor remains in the MVP list mvpListLX, the index mvp_idx of the motion vector predictor decoded by the first encoded bit string decoding unit 202 is read and corresponds to the read index mvp_idx The predicted motion vector candidate to be extracted is extracted from the MVP list mvpListLX. (S
202).

続いて、動きベクトル加算部224により、第1符号化ビット列復号部202にて復号
されて供給される差分動きベクトルmvdと予測動きベクトルmvpを加算することによ
り動きベクトルmvを算出し、動きベクトルmvを出力する。(図15のS203)。
mv=mvp+mvd
Subsequently, the motion vector adding unit 224 calculates the motion vector mv by adding the difference motion vector mvd decoded and supplied by the first encoded bit string decoding unit 202 and the predicted motion vector mvp, and the motion vector mv Is output. (S203 in FIG. 15).
mv = mvp + mvd

図14のS101、及び図15のS201で共通の予測動きベクトルの算出及びMVP
リスト構築方法の処理手順を図16のフローチャートを用いて詳細に説明する。
Calculation of prediction motion vector and MVP common to S101 of FIG. 14 and S201 of FIG.
The processing procedure of the list construction method will be described in detail with reference to the flowchart of FIG.

まず、動画像符号化装置及び動画像復号装置で共通する動きベクトルの予測方法につい
て説明する。
First, a motion vector prediction method common to the video encoding device and the video decoding device will be described.

(動きベクトルの予測方法)
実施の形態に係る予測動きベクトルの算出及びMVPリスト構築方法は予測ブロック単
位に図16に示される諸過程で参照リストLX(Xは0または1)毎に実施される。予測
モードPredModeがMODE_INTER(インター予測)で、インター予測方法
を示すフラグinter_pred_flag[x0][y0]が、Pred_L0(L
0予測)またはPred_BI(両予測)の時には、参照リストL0用の予測動きベクト
ルの候補を算出し、MVPリストを構築する。ここで、x0、y0は画面内での予測ブロ
ックの左上の画素の位置を示すインデックスであり、inter_pred_flag[
x0][y0]は画面内の(x0,y0)に位置する予測ブロックのインター予測方法を
示すフラグである。inter_pred_flag[x0][y0]が、Pred_L
1(L1予測)またはPred_BI(両予測)の時には、参照リストL1用の予測動き
ベクトルの候補を算出し、MVPリストを構築する。つまり、inter_pred_f
lag[x0][y0]が、Pred_BI(両予測)の時には、参照リストL0用と参
照リストL1用のそれぞれの予測動きベクトルの候補を算出してMVPリストを構築する
。図16は動画像符号化装置の差分動きベクトル算出部103及び動画像復号装置の動き
ベクトル算出部204とで共通する機能を有する予測動きベクトル候補生成部120及び
220、予測動きベクトル登録部121及び221、ならびに予測動きベクトル候補同一
判定部122及び222の処理の流れを表すフローチャートである。以下、諸過程を順を
追って説明する。
(Motion vector prediction method)
The prediction motion vector calculation and MVP list construction method according to the embodiment is performed for each reference list LX (X is 0 or 1) in various processes shown in FIG. The prediction mode PredMode is MODE_INTER (inter prediction), and a flag inter_pred_flag [x0] [y0] indicating an inter prediction method is set to Pred_L0 (L
0 prediction) or Pred_BI (both predictions), predictive motion vector candidates for the reference list L0 are calculated, and an MVP list is constructed. Here, x0 and y0 are indexes indicating the position of the upper left pixel of the prediction block in the screen, and inter_pred_flag [
x0] [y0] is a flag indicating the inter prediction method of the prediction block located at (x0, y0) in the screen. inter_pred_flag [x0] [y0] is Pred_L
When 1 (L1 prediction) or Pred_BI (bi-prediction), prediction motion vector candidates for the reference list L1 are calculated, and an MVP list is constructed. That is, inter_pred_f
When lag [x0] [y0] is Pred_BI (bi-prediction), prediction motion vector candidates for the reference list L0 and the reference list L1 are calculated to construct an MVP list. FIG. 16 shows motion vector predictor candidate generation units 120 and 220 having a function common to the motion vector calculation unit 103 of the video encoding device and the motion vector calculation unit 204 of the video decoding device, motion vector registration units 121 and 22 is a flowchart showing the flow of processing of 221 and predicted motion vector candidate identity determination units 122 and 222. Hereinafter, the processes will be described in order.

左側に隣接する予測ブロックからの予測動きベクトルの候補を算出し、利用できるかど
うかを示すフラグavailableFlagLXA、及び動きベクトルmvLXA、参
照ピクチャのPOCpocLXAを出力する(図16のS301)。なお、L0のときX
は0、L1のときXは1とする(以下同様)。続いて、上側に隣接する予測ブロックから
の予測動きベクトルの候補を算出し、利用できるかどうかを示すフラグavailabl
eFlagLXB、及び動きベクトルmvLXB、参照ピクチャのPOCpocLXBを
算出する(図16のS302)。図16のS301とS302の処理は共通であり、利用
できるかどうかを示すフラグavailableFlagLXN、及び動きベクトルmv
LXN、参照ピクチャのPOCpocLXN(NはAまたはB、以下同様)を算出する共
通の算出処理手順を図17〜22のフローチャートを用いて後ほど詳細に説明する。
Prediction motion vector candidates from the prediction block adjacent on the left side are calculated, and a flag availableFlagLXA indicating whether the motion vector can be used, a motion vector mvLXA, and POCpocLXA of the reference picture are output (S301 in FIG. 16). When L0, X
Is 0, and X is 1 when L1 (the same applies hereinafter). Subsequently, a flag available indicating whether a motion vector predictor candidate from the prediction block adjacent on the upper side can be calculated and used.
The eFlagLXB, the motion vector mvLXB, and the POCpocLXB of the reference picture are calculated (S302 in FIG. 16). The processing of S301 and S302 in FIG. 16 is common, and flag availableFlagLXN indicating whether or not the flag can be used, and motion vector mv
A common calculation processing procedure for calculating LXN and POCpocLXN (N is A or B, the same applies hereinafter) of a reference picture will be described in detail later with reference to flowcharts of FIGS.

続いて、時間の予測動きベクトルの候補を算出し、利用できるかどうかを示すフラグa
vailableFlagLXCol、及び動きベクトルmvLXCol、クロスしてい
るかどうかを示すフラグmvXCrossFlagを出力する(図16のS303)。こ
れらの算出処理手順を図24〜29と図22のフローチャートを用いて後ほど詳細に説明
する。
Subsequently, a flag a indicating whether or not a candidate for a predicted motion vector of time can be calculated and used.
The availableFlagLXCol, the motion vector mvLXCol, and the flag mvXCrossFlag indicating whether or not crossing are output (S303 in FIG. 16). These calculation processing procedures will be described in detail later with reference to FIGS. 24 to 29 and the flowchart of FIG.

続いて、MVPリストmvpListLXを作成し、予測ベクトルの候補mvLXN(
NはA、BまたはCol、以下同様)を追加する(図16のS304)。これらの算出処
理手順を図30〜36のフローチャートを用いて後ほど詳細に説明する。
Subsequently, an MVP list mvpListLX is created, and a prediction vector candidate mvLXN (
N adds A, B, or Col (the same applies hereinafter) (S304 in FIG. 16). These calculation processing procedures will be described in detail later using the flowcharts of FIGS.

続いて、MVPリストmvpListLX内で、複数の動きベクトルが同じ値を持って
いる場合に、最も小さい順番の動きベクトルを除いてその動きベクトルを取り除く(図1
6のS305)。
Subsequently, when a plurality of motion vectors have the same value in the MVP list mvpListLX, the motion vectors are removed except the smallest motion vector (FIG. 1).
6 S305).

続いて、図15に戻り、MVPリストmvpListLX内の要素の数NumMVPC
and(LX)が1の場合、最終的なMVPインデックスmvpIdxを0とし、そうで
ない場合には、mvpIdxをmvp_idx_LX[xP,yP]とする(図15のS
202)ここで、xP、yPは画面内での予測ブロックの左上の画素の位置を示すインデ
ックスであり、mvp_idx_lX[xP][yP]は画面内の(xP,yP)に位置
する予測ブロックのリストLX(L0またはL1)のMVPインデックスである。添え字
LXは参照リストを表し、L0とL1の2つ用意されていて、Xには0或いは1が入る。
Subsequently, returning to FIG. 15, the number of elements in the MVP list mvpListLX NumMVPC
When and (LX) is 1, the final MVP index mvpIdx is set to 0. Otherwise, mvpIdx is set to mvp_idx_LX [xP, yP] (S in FIG. 15).
202) Here, xP and yP are indices indicating the position of the upper left pixel of the prediction block in the screen, and mvp_idx_lX [xP] [yP] is a list of prediction blocks located at (xP, yP) in the screen This is the MVP index of LX (L0 or L1). The subscript LX represents a reference list, and two L0 and L1 are prepared, and 0 or 1 is entered in X.

続いて、LXのMVPリスト内のmvpIdx番目に登録されている動きベクトルmv
pListLX[mvpIdx]が最終的なリストLXの予測動きベクトルmvpLXに
割り当てられる(図15のS203)。
Subsequently, the mvpIdx-th registered motion vector mv in the LX MVP list
pListLX [mvpIdx] is assigned to the predicted motion vector mvpLX of the final list LX (S203 in FIG. 15).

[左側または上側に隣接する1つ以上の予測ブロックから予測動きベクトルの候補をそ
れぞれ導出(図16のS301、S302)]
この処理における入力は、符号化/復号対象の予測ブロックの先頭である左上の画素の
符号化/復号対象画像内での座標(xP,yP)、および符号化/復号対象の予測ブロッ
クの幅nPSWと高さnPSH、予測ブロックの参照リスト毎の参照インデックスref
IdxLX(Xは0或いは1)である。添え字LXは参照リストを表し、L0とL1の2
つ用意されていて、Xには0或いは1が入る。参照リストL0、L1は複数の参照ピクチ
ャの候補からブロック単位に任意のピクチャを参照して動き補償を行うために、複数の参
照ピクチャを管理するためのリストであり、参照インデックスrefIdxLXは参照ピ
クチャを指定するために参照リスト毎に各参照ピクチャに割り当てたインデックスである
[Deriving motion vector predictor candidates from one or more adjacent prediction blocks on the left or upper side (S301, S302 in FIG. 16)]
The input in this processing is the coordinates (xP, yP) in the encoding / decoding target image of the upper left pixel that is the head of the prediction block to be encoded / decoding, and the width nPSW of the prediction block to be encoded / decoded. And height nPSH, reference index ref for each reference list of prediction blocks
IdxLX (X is 0 or 1). The subscript LX represents a reference list, and L0 and L1 2
And 0 or 1 is entered in X. The reference lists L0 and L1 are lists for managing a plurality of reference pictures in order to perform motion compensation by referring to an arbitrary picture in block units from a plurality of reference picture candidates, and a reference index refIdxLX is a reference picture. An index assigned to each reference picture for each reference list for designation.

この処理における出力は左側または上側に隣接する予測ブロックの動きベクトルmvL
XN、および予測ブロックグループNの参照リストLXの符号化情報が有効か否かを示す
フラグavailableFlagLXNであり、添え字Xには参照リストを表す0若し
くは1、Nには隣接する予測ブロックグループの領域を表すA(左側)またはB(上側)
が入る。
The output in this process is the motion vector mvL of the prediction block adjacent on the left or upper side.
XN and a flag availableFlagLXN indicating whether or not the encoding information of the reference list LX of the prediction block group N is valid. A (left side) or B (upper side)
Enters.

図5、図6、図7、図8に示されるように、同一ピクチャ内の符号化ブロック内部を動
き補償する為に定義される予測ブロックの予測ブロック(図12中の処理対象の予測ブロ
ック)に隣接する周囲の予測ブロックから予測動きベクトルの候補を導出する。
As shown in FIGS. 5, 6, 7, and 8, a prediction block of a prediction block that is defined to compensate for motion within an encoded block in the same picture (a prediction block to be processed in FIG. 12). A motion vector predictor candidate is derived from the surrounding prediction blocks adjacent to.

図5は、処理対象の予測ブロックとそれに隣接する予測ブロックを示す。予測動きベク
トルの候補は、処理対象の予測ブロックの左側に隣接する予測ブロックAk(k=0,1
,2)から構成される予測ブロックグループA、上に隣接する予測ブロックBk(k=0
,1,2)から構成される予測ブロックグループBからそれぞれ予測動きベクトルの候補
を選出する。
FIG. 5 shows a prediction block to be processed and a prediction block adjacent thereto. A motion vector predictor candidate is a prediction block Ak (k = 0, 1) adjacent to the left side of the prediction block to be processed.
, 2) and a prediction block Bk (k = 0) adjacent to the prediction block group A.
, 1, 2), predictive motion vector candidates are selected from the predictive block group B consisting of each.

図17のフローチャートを用いて、図16のS301およびS302の処理手順である
左側および上側に隣接する予測ブロックグループNからの予測動きベクトルの候補mvL
XNの算出方法について説明する。添え字Xには参照リストを表す0若しくは1、Nには
隣接する予測ブロックグループの領域を表すA(左側)またはB(上側)が入る。
Using the flowchart in FIG. 17, prediction motion vector candidates mvL from the prediction block group N adjacent on the left and upper sides in the processing procedure of S301 and S302 in FIG. 16.
A method for calculating XN will be described. Subscript X contains 0 or 1 representing the reference list, and N represents A (left side) or B (upper side) representing the area of the adjacent prediction block group.

図17で、変数N=Aとして符号化/復号対象の予測ブロックの左側に隣接する1つ以
上の予測ブロックから予測動きベクトルの候補を、変数N=Bとして上側に隣接する1つ
以上の予測ブロックから予測動きベクトルの候補を、それぞれ以下の手順で算出する。
In FIG. 17, prediction motion vector candidates from one or more prediction blocks adjacent to the left side of the prediction block to be encoded / decoded as a variable N = A and one or more predictions adjacent to the upper side as a variable N = B Predicted motion vector candidates are calculated from the blocks according to the following procedure.

まず、符号化/復号対象の予測ブロックに隣接する予測ブロックを特定し、それぞれの
予測ブロックNk(k=0,1,2)が利用できる場合は符号化情報を取得する(S11
01、S1102、S1103)。符号化/復号対象の予測ブロックの左側に隣接する予
測ブロックグループ(N=A)の場合、左下に隣接する予測ブロックA0、左に隣接する
予測ブロックA1、左上に隣接する予測ブロックA2を特定して符号化情報を取得し、符
号化/復号対象の予測ブロックの上側に隣接する予測ブロックグループ(N=B)の場合
、右上に隣接する予測ブロックB0、上に隣接する予測ブロックB1、左上に隣接する予
測ブロックB2を特定して符号化情報を取得する(S1101、S1102、S1103
)。なお、隣接する予測ブロックNkが符号化/復号対象予測ブロックを含むスライスの
内側に位置する場合は利用でき、外側に位置する場合は利用できない。
First, a prediction block adjacent to a prediction block to be encoded / decoded is specified, and when each prediction block Nk (k = 0, 1, 2) can be used, encoding information is acquired (S11).
01, S1102, S1103). In the case of a prediction block group (N = A) adjacent to the left side of the prediction block to be encoded / decoded, the prediction block A0 adjacent to the lower left, the prediction block A1 adjacent to the left, and the prediction block A2 adjacent to the upper left are specified. In the case of a prediction block group (N = B) adjacent to the upper side of the prediction block to be encoded / decoded, the prediction block B0 adjacent to the upper right, the prediction block B1 adjacent to the upper, and the upper left Encoding information is acquired by specifying the adjacent prediction block B2 (S1101, S1102, S1103).
). It can be used when the adjacent prediction block Nk is located inside the slice including the prediction block to be encoded / decoded, and cannot be used when located outside.

次に、予測ブロックグループNから予測動きベクトルが選出されるか否かを示すフラグ
availableFlagLXNを0、予測ブロックグループNを代表する動きベクト
ルmvLXNを(0,0)、予測ブロックグループNを代表する動きベクトルがスケーリ
ングされていないことを示すフラグMvXNNonScaleを0に設定する(S110
4、S1105、S1106)。
Next, a flag availableFlagLXN indicating whether or not a prediction motion vector is selected from the prediction block group N is 0, a motion vector mvLXN representing the prediction block group N is (0, 0), and a motion representing the prediction block group N A flag MvXNNonScale indicating that the vector is not scaled is set to 0 (S110).
4, S1105, S1106).

続いて、図18に示すフローチャートの処理を行う(S1107)。予測ブロックグル
ープNの隣接予測ブロックN0、N1、N2の中で、符号化/復号対象予測ブロックで現
在対象としている参照リストLXと同じ参照リストLXで同じ参照インデックスの動きベ
クトルを持つ予測ブロックを探す。
Then, the process of the flowchart shown in FIG. 18 is performed (S1107). Search for a prediction block having the same reference index motion vector in the same reference list LX as the current reference list LX in the prediction block to be encoded / decoded among the adjacent prediction blocks N0, N1, and N2 of the prediction block group N. .

図18は図17のステップS1107の処理手順を示すフローチャートである。隣接す
る予測ブロックNk(k=0,1,2)に対して、kが0,1,2の順番にそれぞれ以下
の処理を行う(S1201〜S1210)。NがAの場合下から上、NがBの場合、右か
ら左に順番にそれぞれ以下の処理を行う。
FIG. 18 is a flowchart showing the processing procedure of step S1107 of FIG. The following processing is performed on adjacent prediction blocks Nk (k = 0, 1, 2) in the order of k, 0, 1, 2 (S1201 to S1210). When N is A, the following processing is performed in order from bottom to top, and when N is B, the processing is sequentially performed from right to left.

隣接する予測ブロックNkが利用でき(S1202のYES)、予測ブロックNkの符
号化モードPredModeがイントラ(MODE_INTRA)でなく(S1203の
YES)、隣接する予測ブロックNkのpredFlagLX(LX予測であるかどうか
を示すフラグ)が1である場合(S1204のYES)、隣接する予測ブロックNkの参
照インデックスrefIdxLX[xNk][yNk]と処理対象の予測ブロックのイン
デックスrefIdxLXを比較する(S1205)。両者の参照インデックスが同じ場
合(S1205のYES)、フラグavailableFlagLXNは1と設定し(S
1206)、mvLXNはmvLXN[xNk][yNk]と同じ値に設定し(S120
7)、refIdxNはrefIdxLX[xNk][yNk]と同じ値に設定し(S1
208)、ListNはLXと設定し(S1209)、スケーリングされていないことを
示すフラグMvXNNonScaleは1と設定する(S1210)。
Whether an adjacent prediction block Nk can be used (YES in S1202), and the coding mode PredMode of the prediction block Nk is not intra (MODE_INTRA) (YES in S1203), and whether predFlagLX (LX prediction) of the adjacent prediction block Nk is determined. When the flag shown is 1 (YES in S1204), the reference index refIdxLX [xNk] [yNk] of the adjacent prediction block Nk is compared with the index refIdxLX of the prediction block to be processed (S1205). If both reference indexes are the same (YES in S1205), the flag availableFlagLXN is set to 1 (S
1206), mvLXN is set to the same value as mvLXN [xNk] [yNk] (S120).
7) and refIdxN is set to the same value as refIdxLX [xNk] [yNk] (S1
208), ListN is set to LX (S1209), and a flag MvXNNonScale indicating that scaling is not performed is set to 1 (S1210).

本実施の形態においては、スケーリングされていないことを示すフラグMvXNNon
Scaleが1、即ちスケーリングされずに算出された動きベクトルmvLXNは、符号
化/復号対象の予測ブロックの動きベクトルと同じ参照ピクチャを参照している予測ブロ
ックの動きベクトルから予測された動きベクトルであり、符号化/復号対象の予測ブロッ
クの予測動きベクトルの候補として比較的相応しいと判断する。一方、フラグMvXCr
ossが0、即ちスケーリングすることによりに算出された動きベクトルmvLXNは、
符号化/復号対象の予測ブロックの動きベクトルとは異なる参照ピクチャを参照している
予測ブロックの動きベクトルから予測した動きベクトルであり、符号化/復号対象の予測
ブロックの予測動きベクトルの候補として比較的相応しくないと判断する。即ち、スケー
リングされていないことを示すフラグMvXNNonScaleを予測動きベクトルの候
補として相応しいかどうかの判断の指針のひとつとして用いる。
In the present embodiment, a flag MvXNNN indicating that scaling has not been performed.
The scale is 1, that is, the motion vector mvLXN calculated without scaling is a motion vector predicted from the motion vector of the prediction block referring to the same reference picture as the motion vector of the prediction block to be encoded / decoded. Therefore, it is determined that the prediction motion vector candidate of the prediction block to be encoded / decoded is relatively suitable. On the other hand, the flag MvXCr
The motion vector mvLXN calculated by scaling oss is 0, that is,
A motion vector predicted from a motion vector of a prediction block that refers to a reference picture different from the motion vector of the prediction block to be encoded / decoded, and compared as a motion vector candidate of the prediction block to be encoded / decoded Judge that it is not appropriate. That is, the flag MvXNNonScale indicating that the image has not been scaled is used as one of the guidelines for determining whether or not it is suitable as a predicted motion vector candidate.

一方、これらの条件に合致しない場合(S1202のNO,S1203のNO,S12
04のNO,またはS1205のNOの場合)、kを1増加し、次の隣接予測ブロックの
処理(S1202〜S1209)を行い、availableFlagLXNが1になる
か、N2の処理が終わるまで繰り返す。
On the other hand, if these conditions are not met (NO in S1202, NO in S1203, S12
In the case of NO in 04 or NO in S1205), k is incremented by 1, the next adjacent prediction block processing (S1202 to S1209) is performed, and this is repeated until the availableFlagLXN becomes 1 or the processing of N2 ends.

続いて、図17のフローチャートに戻り、availableFlagLXNが0のと
き(S1108のYES)、図19に示すフローチャートの処理を行う(S1109)。
予測ブロックグループNの隣接予測ブロックN0、N1、N2の中で、符号化/復号対象
予測ブロックで現在対象としている参照リストLXと反対の参照リストLY(Y=!X:
現在対象としている参照リストがL0のとき、反対の参照リストはL1、現在対象として
いる参照リストがL1のとき、反対の参照リストはL0)で同じ参照POCの動きベクト
ルを持つ予測ブロックを探す。
Next, returning to the flowchart of FIG. 17, when availableFlagLXN is 0 (YES in S1108), the process of the flowchart shown in FIG. 19 is performed (S1109).
Among the adjacent prediction blocks N0, N1, and N2 of the prediction block group N, the reference list LY (Y =! X:
When the current reference list is L0, the opposite reference list is L1, and when the current target reference list is L1, the opposite reference list is L0), and a prediction block having the same reference POC motion vector is searched.

図19は図17のステップS1109の処理手順を示すフローチャートである。隣接す
る予測ブロックNk(k=0,1,2)に対して、kが0,1,2の順番にそれぞれ以下
の処理を行う(S1301〜S1310)。NがAの場合下から上、NがBの場合、右か
ら左に順番にそれぞれ以下の処理を行う。
FIG. 19 is a flowchart showing the processing procedure of step S1109 of FIG. The following processing is performed on adjacent prediction blocks Nk (k = 0, 1, 2) in the order of k, 0, 1, 2 (S1301 to S1310). When N is A, the following processing is performed in order from bottom to top, and when N is B, the processing is sequentially performed from right to left.

隣接する予測ブロックNkが利用でき(S1302のYES)、予測ブロックNkの符
号化モードPredModeがイントラ(MODE_INTRA)でなく(S1303の
YES)、隣接する予測ブロックNkのpredFlagLY(LY予測であるかどうか
を示すフラグ)が1である場合(S1304のYES)、隣接する予測ブロックNkの現
在対象としている参照リストLXと反対の参照リストLYの参照ピクチャRefPicL
istY[refIdxLY[xNk][yNk]]のPOCRefPicOrderC
nt(currPic,refIdxLY[xNk][yNk],LY)と処理対象の予
測ブロックのLXの参照ピクチャRefPicListX[refIdxLX]のPOC
RefPicOrderCnt(currPic,refIdxLX,LX)を比較する
(S1305)。両者の参照ピクチャのPOCが同じ場合(S1305のYES)、フラ
グavailableFlagLXNは1と設定し(S1306)、mvLXNはmvL
XN[xNk][yNk]と同じ値に設定し(S1307)、refIdxNはrefI
dxLY[xNk][yNk]と同じ値に設定し(S1308)、ListNはLYと設
定し(S1309)、スケーリングされていないことを示すフラグMvXNNonSca
leは1と設定する(S1310)。
Whether or not the adjacent prediction block Nk is available (YES in S1302), the coding mode PredMode of the prediction block Nk is not intra (MODE_INTRA) (YES in S1303), and predFlagLY (LY prediction) of the adjacent prediction block Nk is determined. Is 1 (YES in S1304), the reference picture RefPicL of the reference list LY opposite to the current reference list LX of the adjacent prediction block Nk
POCRefPicOrderC of istY [refIdxLY [xNk] [yNk]]
nt (currPic, refIdxLY [xNk] [yNk], LY) and the POC of the reference picture RefPicListX [refIdxLX] of the LX of the prediction block to be processed
RefPicOrderCnt (currPic, refIdxLX, LX) is compared (S1305). If both reference pictures have the same POC (YES in S1305), the flag availableFlagLXN is set to 1 (S1306), and mvLXN is mvL.
XN [xNk] [yNk] is set to the same value (S1307), and refIdxN is refI.
It is set to the same value as dxLY [xNk] [yNk] (S1308), ListN is set to LY (S1309), and a flag MvXNNonSca indicating that scaling has not been performed.
le is set to 1 (S1310).

一方、これらの条件に合致しない場合(S1302のNO,S1303のNO,S13
04のNO,またはS1305のNOの場合)、kを1増加し、次の隣接予測ブロックの
処理(S1302〜S1309)を行い、availableFlagLXNが1になる
か、N2の処理が終わるまで繰り返す。
On the other hand, if these conditions are not met (NO in S1302, NO in S1303, S13
In the case of NO in 04 or NO in S1305), k is incremented by 1, the next adjacent prediction block processing (S1302 to S1309) is performed, and this is repeated until the availableFlagLXN becomes 1 or the processing of N2 ends.

続いて、図17のフローチャートに戻り、availableFlagLXNが0のと
き(S1110のYES)、図20に示すフローチャートの処理を行う(S1111)。
予測ブロックグループNの隣接予測ブロックN0、N1、N2の中で、符号化/復号対象
予測ブロックで現在対象としている参照リストLXと同じ参照リストLXで異なる参照P
OCの動きベクトルを持つ予測ブロックを探す。
Next, returning to the flowchart of FIG. 17, when availableFlagLXN is 0 (YES in S1110), the process of the flowchart shown in FIG. 20 is performed (S1111).
Among adjacent prediction blocks N0, N1, and N2 of the prediction block group N, different reference Ps in the same reference list LX as the reference list LX that is the current target in the prediction block to be encoded / decoded
Look for a prediction block with an OC motion vector.

図20は図17のステップS1111の処理手順を示すフローチャートである。隣接す
る予測ブロックNk(k=0,1,2)に対して、kが0,1,2の順番にそれぞれ以下
の処理を行う(S1401〜S1409)。NがAの場合下から上、NがBの場合、右か
ら左に順番にそれぞれ以下の処理を行う。
FIG. 20 is a flowchart showing the processing procedure of step S1111 of FIG. The following processing is performed on the adjacent prediction blocks Nk (k = 0, 1, 2) in the order of k, 0, 1, and 2 (S1401 to S1409). When N is A, the following processing is performed in order from bottom to top, and when N is B, the processing is sequentially performed from right to left.

隣接する予測ブロックNkが利用でき(S1402のYES)、予測ブロックNkの符
号化モードPredModeがイントラ(MODE_INTRA)でなく(S1403の
YES)、隣接する予測ブロックNkのpredFlagLX(LX予測であるかどうか
を示すフラグ)が1である場合(S1404のYES)、フラグavailableFl
agLXNは1と設定し(S1405)、mvLXNはmvLXN[xNk][yNk]
と同じ値に設定し(S1406)、refIdxNはrefIdxLX[xNk][yN
k]と同じ値に設定し(S1407)、ListNはLXと設定する(S1408)。
Whether an adjacent prediction block Nk can be used (YES in S1402), and the coding mode PredMode of the prediction block Nk is not intra (MODE_INTRA) (YES in S1403), and whether or not the predFlagLX (LX prediction) of the adjacent prediction block Nk is determined. Flag is 1 (YES in S1404), the flag availableFl
agLXN is set to 1 (S1405), and mvLXN is mvLXN [xNk] [yNk].
(S1406), refIdxN is set to refIdxLX [xNk] [yN
k] is set to the same value (S1407), and ListN is set to LX (S1408).

一方、これらの条件に合致しない場合(S1402のNO,S1403のNO,または
S1404のNOの場合)、kを1増加し、次の隣接予測ブロックの処理(S1402〜
S1408)を行い、availableFlagLXNが1になるか、N2の処理が終
わるまで繰り返す。
On the other hand, if these conditions are not met (NO in S1402, NO in S1403, or NO in S1404), k is incremented by 1 and the next adjacent prediction block is processed (S1402).
Step S1408) is repeated until the availableFlagLXN becomes 1 or the processing of N2 is completed.

続いて、図17のフローチャートに戻り、availableFlagLXNが0のと
き(S1112のYES)、図21に示すフローチャートの処理を行う(S1113)。
(予測ブロックグループNの隣接予測ブロックN0、N1、N2の中で、符号化/復号対
象予測ブロックで現在対象としている参照リストLXと反対の参照リストLY(Y=!X
:現在対象としている参照リストがL0のとき、反対の参照リストはL1、現在対象とし
ている参照リストがL1のとき、反対の参照リストはL0)で異なる参照POCの動きベ
クトルを持つ予測ブロックを探す)
Next, returning to the flowchart of FIG. 17, when availableFlagLXN is 0 (YES in S1112), the process of the flowchart shown in FIG. 21 is performed (S1113).
(A reference list LY (Y =! X opposite to the reference list LX currently targeted in the prediction block to be encoded / decoded among the adjacent prediction blocks N0, N1, and N2 of the prediction block group N)
When the current target reference list is L0, the opposite reference list is L1, and when the current target reference list is L1, the opposite reference list is L0), and a prediction block having a different reference POC motion vector is searched. )

図21は図17のステップS1113の処理手順を示すフローチャートである。隣接す
る予測ブロックNk(k=0,1,2)に対して、kが0,1,2の順番にそれぞれ以下
の処理を行う(S1501〜S1509)。NがAの場合下から上、NがBの場合、右か
ら左に順番にそれぞれ以下の処理を行う。
FIG. 21 is a flowchart showing the processing procedure of step S1113 of FIG. The following processing is performed on adjacent prediction blocks Nk (k = 0, 1, 2) in the order of k, 0, 1, 2 (S1501 to S1509). When N is A, the following processing is performed in order from bottom to top, and when N is B, the processing is sequentially performed from right to left.

隣接する予測ブロックNkが利用でき(S1502のYES)、予測ブロックNkの符
号化モードPredModeがイントラ(MODE_INTRA)でなく(S1503の
YES)、隣接する予測ブロックNkのpredFlagLY(LY予測であるかどうか
を示すフラグ)が1である場合(S1504のYES)、フラグavailableFl
agLXNは1と設定し(S1505)、mvLXNはmvLXN[xNk][yNk]
と同じ値に設定し(S1506)、refIdxNはrefIdxLY[xNk][yN
k]と同じ値に設定し(S1507)、ListNはLYと設定する(S1508)。
Whether an adjacent prediction block Nk can be used (YES in S1502) and the encoding mode PredMode of the prediction block Nk is not intra (MODE_INTRA) (YES in S1503), and whether predFlagLY (LY prediction) of the adjacent prediction block Nk is determined. Flag is 1 (YES in S1504), flag availableFl
agLXN is set to 1 (S1505), and mvLXN is mvLXN [xNk] [yNk].
(S1506), refIdxN is set to refIdxLY [xNk] [yN
k] is set to the same value (S1507), and ListN is set to LY (S1508).

一方、これらの条件に合致しない場合(S1502のNO,S1503のNO,または
S1504のNOの場合)、kを1増加し、次の隣接予測ブロックの処理(S1502〜
S1508)を行い、availableFlagLXNが1になるか、N2の処理が終
わるまで繰り返す。
On the other hand, if these conditions are not met (NO in S1502, NO in S1503, or NO in S1504), k is incremented by 1 and the next adjacent prediction block is processed (S1502).
S1508), and repeats until availableFlagLXN becomes 1 or the processing of N2 ends.

続いて、図17のフローチャートに戻り、availableFlagLXNが1のと
き(S1114のYES)、図22に示すmvLXNのスケーリング処理を行う(S11
15)。
Next, returning to the flowchart of FIG. 17, when availableFlagLXN is 1 (YES in S1114), the mvLXN scaling process shown in FIG. 22 is performed (S11).
15).

図22は図17のステップS1115の動きベクトルのスケーリング処理手順を示すフ
ローチャートである。図23は、動きベクトルの時間方向のスケーリングを具体例で説明
する図である。もし、参照する予測ブロックの参照リストListNの参照ピクチャRe
fPicListN[refIdxLN]のPOC RefPicOrderCnt(c
urrPic,refIdxN,ListN)がLXの参照ピクチャRefPicLis
tX[refIdxLX]のPOC RefPicOrderCnt(currPic,
refIdxLX,LX)と等しい場合(S1601のYES)、mvLXNをそのまま
の値とし(S1602)、そうでない場合(S1601のNO)、次式によりスケーリン
グ処理を行う。
mvLXN=tb/td*mvLXN
ただし、tdは現在の符号化/復号対象画像のPOC PicOrderCnt(cur
rPic)と、隣接予測ブロックの参照リストListNが参照する参照ピクチャRef
PicListN[refIdxN]のPOC RefPicOrderCnt(cur
rPic,refIdxN,ListN)の差である。
td=PicOrderCnt(currPic)−RefPicOrderCnt
(currPic,refIdxN,ListN)
tbは現在の符号化/復号対象画像のPOC PicOrderCnt(currPic
)と、現在の符号化/復号対象画像の参照リストLXが参照する参照ピクチャのPOCと
の差である。
tb=PicOrderCnt(currPic)−RefPicOrderCnt
(currPic,refIdxLX,LX)
FIG. 22 is a flowchart showing the motion vector scaling processing procedure in step S1115 of FIG. FIG. 23 is a diagram illustrating the scaling of the motion vector in the time direction as a specific example. If the reference picture Re of the reference list ListN of the prediction block to be referred to
POC RefPicOrderCnt (c of fPicListN [refIdxLN]
urPic, refIdxN, ListN) is a reference picture RefPicLis of LX
POC RefPicOrderCnt (currPic, tX [refIdxLX]
If it is equal to refIdxLX, LX) (YES in S1601), mvLXN is left as it is (S1602). Otherwise (NO in S1601), scaling processing is performed according to the following equation.
mvLXN = tb / td * mvLXN
Where td is the POC PicOrderCnt (cur of the current encoding / decoding target image
rPic) and the reference picture Ref referenced by the reference list ListN of the adjacent prediction block
POC RefPicOrderCnt (cur of PicListN [refIdxN]
rPic, refIdxN, ListN).
td = PicOrderCnt (currPic) −RefPicOrderCnt
(CurrPic, refIdxN, ListN)
tb is the POC PicOrderCnt (currPic of the current encoding / decoding target image.
) And the POC of the reference picture referenced by the reference list LX of the current encoding / decoding target image.
tb = PicOrderCnt (currPic) −RefPicOrderCnt
(CurrPic, refIdxLX, LX)

[時間方向の予測動きベクトルの候補を導出(図16のS303)]
この処理における入力は、符号化/復号対象の予測ブロックの先頭である左上の画素の
符号化/復号対象画像内での座標(xP,yP)、および符号化/復号対象の予測ブロッ
クの幅nPSWと高さnPSH、予測ブロックの参照リスト毎の参照インデックスref
IdxLX(Xは0或いは1)である。添え字LXは参照リストを表し、L0とL1の2
つ用意されていて、Xには0或いは1が入る。参照リストL0、L1は複数の参照ピクチ
ャの候補からブロック単位に任意のピクチャを参照して動き補償を行うために、複数の参
照ピクチャを管理するためのリストであり、参照インデックスrefIdxLXは参照ピ
クチャを指定するために参照リスト毎に各参照ピクチャに割り当てたインデックスである
[Derivation of predicted motion vector candidates in time direction (S303 in FIG. 16)]
The input in this processing is the coordinates (xP, yP) in the encoding / decoding target image of the upper left pixel that is the head of the prediction block to be encoded / decoding, and the width nPSW of the prediction block to be encoded / decoded. And height nPSH, reference index ref for each reference list of prediction blocks
IdxLX (X is 0 or 1). The subscript LX represents a reference list, and L0 and L1 2
And 0 or 1 is entered in X. The reference lists L0 and L1 are lists for managing a plurality of reference pictures in order to perform motion compensation by referring to an arbitrary picture in block units from a plurality of reference picture candidates, and a reference index refIdxLX is a reference picture. An index assigned to each reference picture for each reference list for designation.

この処理における出力は予測ブロックの予測ブロックと同位置の他ピクチャの予測ブロ
ックの動きベクトルmvLXCol、および予測ブロックグループColの参照リストL
Xの符号化情報が有効か否かを示すフラグavailableFlagLXColであり
、添え字Xには参照リストを表す0若しくは1が入る。
The output in this process is the motion vector mvLXCol of the prediction block of the other picture at the same position as the prediction block of the prediction block, and the reference list L of the prediction block group Col.
This is a flag availableFlagLXCol indicating whether or not the encoded information of X is valid, and the subscript X is set to 0 or 1 representing the reference list.

図24は図16のステップS303の処理手順を説明するフローチャートである。
まず、slice_typeとcollocated_from_l0_flagにより
、基準となるピクチャcolPicを算出する(図24のS2101)。
FIG. 24 is a flowchart for explaining the processing procedure of step S303 in FIG.
First, a reference picture colPic is calculated from slice_type and collocated_from_10_flag (S2101 in FIG. 24).

図25は図24のステップS2101の基準ピクチャcolPicの算出処理手順を説
明するフローチャートである。slice_typeがBで、図10の第3フラグcol
located_form_l0_flagが0の場合(図25のS2201のYES、
S2202のYES)、RefPicList1[0]、すなわち参照ピクチャリスト1
の参照インデックスが0のピクチャがcolPicとなる(図25のS2203)。そう
でない場合(図25のS2201のNO、S2202のNO、S2204のNO)、Re
fPicList0[0]、すなわち参照ピクチャリスト0の参照インデックスが0のピ
クチャがcolPicとなる(図25のS2205)。
FIG. 25 is a flowchart for explaining the calculation processing procedure of the reference picture colPic in step S2101 of FIG. The slice_type is B and the third flag col in FIG.
When located_form_10_flag is 0 (YES in S2201 in FIG. 25,
YES in S2202, RefPicList1 [0], ie, reference picture list 1
The picture whose reference index is 0 is colPic (S2203 in FIG. 25). Otherwise (NO in S2201, NO in S2202, NO in S2204 in FIG. 25), Re
fPicList0 [0], that is, the picture with the reference index 0 in the reference picture list 0 is colPic (S2205 in FIG. 25).

次に、図24のフローチャートに戻り、予測ブロックcolPuを算出し、符号化情報
を取得する(図24のS2102)。
Next, returning to the flowchart of FIG. 24, the prediction block colPu is calculated, and encoded information is acquired (S2102 of FIG. 24).

図26は図24のステップS2102の予測ブロックcolPuの算出処理手順を説明
するフローチャートである。
FIG. 26 is a flowchart for explaining the calculation processing procedure of the prediction block colPu in step S2102 of FIG.

まず、colPic内で処理対象の予測ブロックと同一位置の右下(外側)に位置する
予測ブロックをcolPuに設定する(図26のS2301)。この予測ブロックは図9
の予測ブロックT0に相当する。
First, the prediction block located in the lower right (outside) of the same position as the processing target prediction block in colPic is set to colPu (S2301 in FIG. 26). This prediction block is shown in FIG.
Corresponds to the prediction block T0.

次に、予測ブロックcolPuの符号化情報を取得する。予測ブロックcolPuのP
redModeがMODE_INTRAか、利用できない場合(図26のS2303、S
2304)、colPic内で処理対象の予測ブロックと同一位置の左上(内側)に位置
する予測ブロックをcolPuに設定する(図26のS2305)。この予測ブロックは
図9の予測ブロックT1に相当する。なお、図示していないが、予測ブロックcolPu
のPredModeがMODE_INTRAか、利用できない場合、図9の予測ブロック
T2、T3の順番に利用できるPredModeがMODE_INTRAでない予測ブロ
ックを探す。
Next, encoding information of the prediction block colPu is acquired. P of prediction block colPu
If redMode is MODE_INTRA or cannot be used (S2303, S2 in FIG. 26)
2304), the prediction block located in the upper left (inside) of the same position as the processing target prediction block in colPic is set to colPu (S2305 in FIG. 26). This prediction block corresponds to the prediction block T1 in FIG. Although not shown, the prediction block colPu
If the PredMode is MODE_INTRA or cannot be used, a prediction block whose PredMode that can be used in the order of the prediction blocks T2 and T3 in FIG. 9 is not MODE_INTRA is searched.

次に、図24のフローチャートに戻り、mvLXColとavailableFlag
LXColを算出する(図24のS2103)。
Next, returning to the flowchart of FIG. 24, mvLXCol and availableFlag
LXCol is calculated (S2103 in FIG. 24).

図27は図24のステップS2103のインター予測情報の算出処理を説明するフロー
チャートである。
FIG. 27 is a flowchart illustrating the inter prediction information calculation processing in step S2103 of FIG.

予測ブロックcolPuのPredModeがMODE_INTRAか、利用できない
場合(図27のS2401のNO、S2402のNO)、availableFlagL
XColを0、mvLXColを(0,0)とし(図27のS2403、S2404)、
処理を終了する。
If PredMode of the prediction block colPu is MODE_INTRA or cannot be used (NO in S2401 in FIG. 27, NO in S2402), availableFlagL
XCol is set to 0 and mvLXCol is set to (0, 0) (S2403 and S2404 in FIG. 27).
The process ends.

予測ブロックcolPuが利用できてPredModeがMODE_INTRAでない
場合(図27のS2401のYES、S2402のYES)、以下の手順でmvColと
refIdxColを算出する。
When the prediction block colPu is available and PredMode is not MODE_INTRA (YES in S2401 in FIG. 27, YES in S2402), mvCol and refIdxCol are calculated in the following procedure.

予測ブロックcolPuのL0予測フラグPredFlagL0[xPCol][yP
Col]が0の場合(図27のS2405のYES)、予測ブロックcolPuの予測モ
ードはPred_L1であるので、動きベクトルmvColと参照インデックスrefI
dxColは良予測ブロックcolPuのL1の動きベクトルであるMvL1[xPCo
l][yPCol]とL1の参照インデックスRefIdxL1[xPCol][yPC
ol]にそれぞれ設定する(図27のS2406、S2407)。
L0 prediction flag PredFlagL0 [xPCol] [yP of prediction block colPu
Col] is 0 (YES in S2405 in FIG. 27), since the prediction mode of the prediction block colPu is Pred_L1, the motion vector mvCol and the reference index refI
dxCol is MvL1 [xPCo which is the motion vector of L1 of the good prediction block colPu
l] [yPCol] and L1 reference index RefIdxL1 [xPCol] [yPC
ol] (S2406 and S2407 in FIG. 27).

さらに、設定された動きベクトルmvColが符号化/復号対象の予測ブロックを含む
ピクチャを横切っているかどうかを確認し、Mv1Crossを設定する(図27のS2
408)。
Further, it is confirmed whether or not the set motion vector mvCol crosses a picture including a prediction block to be encoded / decoded, and Mv1Cross is set (S2 in FIG. 27).
408).

次に図29を参照して動きベクトルMVのクロス判定を説明する。
図29はcolPuの動きベクトルmvColが符号化/復号対象の予測ブロックを含
むピクチャを横切って参照画像を指し示しているかどうかの確認処理を説明するフローチ
ャートである。基準ピクチャcolPicのPOC PicOrderCnt(colP
ic)が符号化/復号対象ピクチャのPOC PicOrderCnt(currPic
)よりも小さく、mvColが指し示す参照ピクチャのPOC RefPicOrder
Cnt(colPic,RefIdxColLX,LX)が符号化/復号対象ピクチャの
POC PicOrderCnt(currPic)よりも大きい場合(図27のS26
01のYES)、符号化/復号対象ピクチャを挟んで基準ピクチャcolPicが過去、
参照ピクチャが未来に位置するので、動きベクトルmvColが符号化/復号対象の予測
ブロックを含むピクチャを横切って参照画像を指し示していると判断し、MvXCros
sを1とする(図27のS2602)。そうではなく(図27のS2601のNO)、基
準ピクチャcolPicのPOC PicOrderCnt(colPic)が符号化/
復号対象ピクチャのPOC PicOrderCnt(currPic)よりも大きく、
mvColが指し示す参照ピクチャのPOC RefPicOrderCnt(colP
ic,RefIdxColLX,LX)が符号化/復号対象ピクチャのPOC PicO
rderCnt(currPic)よりも小さい場合(図27のS2603のYES)、
符号化/復号対象ピクチャを挟んで基準ピクチャcolPicが未来、参照ピクチャが過
去に位置するので、動きベクトルmvColが符号化/復号対象の予測ブロックを含むピ
クチャを横切って参照画像を指し示していると判断し、MvXCrossを1とする(図
27のS2602)。以上の条件に合致しない場合(図27のS2601のNO、S26
03のNO)、動きベクトルmvColが符号化/復号対象の予測ブロックを含むピクチ
ャを横切って参照画像を指し示していないと判断し、MvXCrossを0とする(図2
7のS2604)。
Next, cross determination of the motion vector MV will be described with reference to FIG.
FIG. 29 is a flowchart for explaining whether or not the motion vector mvCol of colPu points to a reference image across a picture including a prediction block to be encoded / decoded. Reference picture colPic POC PicOrderCnt (colP
ic) is the POC PicOrderCnt (currPic) of the picture to be encoded / decoded
) And the POC RefPicOrder of the reference picture pointed to by mvCol
When Cnt (colPic, RefIdxColLX, LX) is larger than POC PicOrderCnt (currPic) of the picture to be encoded / decoded (S26 in FIG. 27)
01 YES), the reference picture colPic is past in the past of the encoding / decoding target picture,
Since the reference picture is located in the future, it is determined that the motion vector mvCol points to the reference picture across the picture including the prediction block to be encoded / decoded, and MvXCros
s is set to 1 (S2602 in FIG. 27). Otherwise (NO in S2601 in FIG. 27), POC PicOrderCnt (colPic) of the reference picture colPic is encoded /
It is larger than POC PicOrderCnt (currPic) of the picture to be decoded,
POC RefPicOrderCnt (colP of the reference picture pointed to by mvCol
ic, RefIdxColLX, LX) is the POC PicO of the picture to be encoded / decoded.
When smaller than rderCnt (currPic) (YES in S2603 of FIG. 27),
Since the reference picture colPic is located in the future and the reference picture is located in the past across the picture to be encoded / decoded, it is determined that the motion vector mvCol points to the reference picture across the picture including the prediction block to be encoded / decoded. MvXCross is set to 1 (S2602 in FIG. 27). When the above conditions are not met (NO in S2601, S26 in FIG. 27)
03), it is determined that the motion vector mvCol does not point to the reference image across the picture including the prediction block to be encoded / decoded, and MvXCross is set to 0 (FIG. 2).
7 S2604).

再び図27に戻り、MvCrossをMv1Crossの値に設定する(図27のS2
409)。
Returning again to FIG. 27, MvCross is set to the value of Mv1Cross (S2 in FIG. 27).
409).

本実施の形態においては、フラグMvXCrossが1、即ち基準ピクチャcolPi
cのcolPuの動きベクトルmvColが符号化/復号対象の予測ブロックを含むピク
チャを横切って参照画像を指し示している場合、その動きベクトルmvColは、符号化
/復号対象の予測ブロックの予測動きベクトルの候補として比較的相応しいと判断する。
一方、フラグMvXCrossが0、即ち基準ピクチャcolPicのcolPuの動き
ベクトルmvColが符号化/復号対象の予測ブロックを含むピクチャを横切って参照画
像を指し示していない場合、その動きベクトルmvColは、符号化/復号対象の予測ブ
ロックの予測動きベクトルの候補として比較的相応しくないと判断する。即ち、フラグM
vXCrossを予測動きベクトルの候補として相応しいかどうかの判断の指針のひとつ
として用いる。予測ブロックcolPuのL1予測フラグPredFlagL1[xPC
ol][yPCol]が0でない場合(図27のS2410のYES)、予測ブロックc
olPuの予測モードはPred_BIであるので、2つの動きベクトルから、一方を選
択する(図27のS2415)。
In the present embodiment, the flag MvXCross is 1, that is, the reference picture colPi
When the motion vector mvCol of colPu of c points to a reference image across a picture including a prediction block to be encoded / decoded, the motion vector mvCol is a candidate for a predicted motion vector of the prediction block to be encoded / decoded. It is judged that it is relatively appropriate.
On the other hand, when the flag MvXCross is 0, that is, when the motion vector mvCol of colPu of the reference picture colPic does not point to the reference image across the picture including the prediction block to be encoded / decoded, It is determined that the motion vector candidate of the target prediction block is relatively unsuitable. That is, flag M
vXCross is used as one of the guidelines for determining whether or not it is suitable as a predicted motion vector candidate. L1 prediction flag PredFlagL1 [xPC of prediction block colPu
ol] [yPCol] is not 0 (YES in S2410 of FIG. 27), the prediction block c
Since the prediction mode of olPu is Pred_BI, one of the two motion vectors is selected (S2415 in FIG. 27).

図28は予測ブロックcolPuの予測モードがPred_BIのときの予測ブロック
のインター予測情報の取得処理方法を説明するフローチャートである。
FIG. 28 is a flowchart illustrating an inter prediction information acquisition processing method for a prediction block when the prediction mode of the prediction block colPu is Pred_BI.

動きベクトルmvColと参照インデックスrefIdxColは予測ブロックcol
PuのL0の動きベクトルであるMvL0[xPCol][yPCol]とL0の参照イ
ンデックスRefIdxL0[xPCol][yPCol]にそれぞれ設定する(図27
のS2411、S2412)。
The motion vector mvCol and the reference index refIdxCol are predicted blocks col
It is set to MvL0 [xPCol] [yPCol] which is the motion vector of Pu's L0 and the reference index RefIdxL0 [xPCol] [yPCol] of L0, respectively (FIG. 27).
S2411, S2412).

まず、RefIdxColLXにL0の参照インデックスRefIdxL0[xPCo
l][yPCol]を設定し(図28のS2502)、L0の動きベクトルが符号化/復
号対象の予測ブロックを含むピクチャを横切るかどうかを確認してMv0Crossを設
定する(図28のS2503)。さらに、RefIdxColLXにL1の参照インデッ
クスRefIdxL1[xPCol][yPCol]を設定し(図28のS2502)、
L1の動きベクトルが符号化/復号対象の予測ブロックを含むピクチャを横切るかどうか
を確認してMv1Crossを設定する(図28のS2503)。
First, reference index RefIdxL0 [xPCo of L0 is added to RefIdxColLX.
l] [yPCol] is set (S2502 in FIG. 28), and it is confirmed whether or not the motion vector of L0 crosses the picture including the prediction block to be encoded / decoded, and Mv0Cross is set (S2503 in FIG. 28). Furthermore, the reference index RefIdxL1 [xPCol] [yPCol] of L1 is set in RefIdxColLX (S2502 in FIG. 28),
It is confirmed whether or not the motion vector of L1 crosses a picture including a prediction block to be encoded / decoded, and Mv1Cross is set (S2503 in FIG. 28).

Mv0Crossが0でかつMv1Crossが1の場合(図28のS2505のYE
S)、または、Mv0CrossがMv1Crossと等しく、参照インデックスリスト
がL1の場合(図28のS2506のYES)、L1の方のインター予測情報を選択し、
動きベクトルmvCol、参照インデックスrefIdxCol、リストListCol
、MvCrossは、MvL1[xPCol][yPCol]、RefIdxColL1
及びL1、Mv0Crossにそれぞれ設定される。
When Mv0Cross is 0 and Mv1Cross is 1 (Y2E in S2505 in FIG. 28)
S), or when Mv0Cross is equal to Mv1Cross and the reference index list is L1 (YES in S2506 of FIG. 28), the L1 inter prediction information is selected,
Motion vector mvCol, reference index refIdxCol, list ListCol
, MvCross is MvL1 [xPCol] [yPCol], RefIdxColL1
And L1 and Mv0Cross, respectively.

そうでない場合(図28のS2505のNO、S2506のNO)、L0の方のインタ
ー予測情報を選択し、動きベクトルmvCol、参照インデックスrefIdxCol、
リストListCol、MvCrossは、MvL0[xPCol][yPCol]、R
efIdxColL0及びL0、Mv0Crossにそれぞれ設定される。
Otherwise (NO in S2505 in FIG. 28, NO in S2506), the L0 inter prediction information is selected, and the motion vector mvCol, the reference index refIdxCol,
The lists ListCol and MvCross are MvL0 [xPCol] [yPCol], R
Set to efIdxColL0, L0, and Mv0Cross, respectively.

図27に戻り、インター予測情報が取得できたらavailableFlagLXCo
lを1とする(図27のS2416)。
Returning to FIG. 27, when the inter prediction information is acquired, availableFlagLXCo
l is set to 1 (S2416 in FIG. 27).

次に、図24のフローチャートに戻り、availableFlagLXColが1の
場合(図24のS2104のYES)、必要に応じてmvLXColをスケーリングする
。このmvLXColのスケーリングには図22で説明した方法と同様の方法を用いる(
図24のS2105)。
Next, returning to the flowchart in FIG. 24, when availableFlagLXCol is 1 (YES in S2104 in FIG. 24), mvLXCol is scaled as necessary. For the scaling of this mvLXCol, a method similar to the method described in FIG. 22 is used (
S2105 in FIG.

[予測動きベクトルの候補をMVPリストに追加(図16のS304)]
図16のS301、S302、及びS303にて算出された予測動きベクトルの候補m
vLXN(N=A,B,Col)をMVPリストmvpListLXに追加するS304
)。図30はMVPリストへの予測動きベクトルの候補の追加処理手順を示すフローチャ
ートである。本方式では、優先順位をつけて、優先順位の高いものからMVPリストmv
pListLXに予測動きベクトルの候補を登録することで、MVPインデックスmvp
_idx_lX[x0][y0]の符号量を削減する。優先順位の高い要素をMVPリス
トの前方に配置することで、符号量を削減する。例えば、MVPリストmvpListL
Xの要素が3個の場合、MVPリストのインデックス0を「0」、インデックス1を「1
0」、インデックス2を「11」とすることで、インデックス0を表す符号量が1ビット
となり、インデックス0に発生頻度が高いと考えられる要素を登録することで、符号量を
削減する。
[Addition of motion vector predictor candidates to MVP list (S304 in FIG. 16)]
Predicted motion vector candidates m calculated in S301, S302, and S303 in FIG.
Add vLXN (N = A, B, Col) to the MVP list mvpListLX S304
). FIG. 30 is a flowchart showing a process for adding a motion vector predictor candidate to the MVP list. In this method, priorities are assigned, and the MVP list mv is assigned in descending order of priority.
By registering predicted motion vector candidates in pListLX, the MVP index mvp
The code amount of _idx_lX [x0] [y0] is reduced. The code amount is reduced by arranging the element having a higher priority in front of the MVP list. For example, MVP list mvpListL
When there are three elements of X, the index 0 of the MVP list is “0” and the index 1 is “1”.
By setting “0” and index 2 to “11”, the code amount representing index 0 becomes 1 bit, and by registering an element considered to occur frequently in index 0, the code amount is reduced.

MVPリストmvpListLXはリスト構造を成し、MVPリスト内部の所在を示す
インデックスと、インデックスに対応する予測動きベクトルの候補を要素として格納する
記憶領域が設けられている。インデックスの数字は0から開始され、MVPリストmvp
ListLXの記憶領域に、予測動きベクトルの候補が格納される。以降の処理では、M
VPリストmvpListLXに登録されたインデックスiの予測動きベクトルの候補は
、mvpListLX[i]で表すこととし、MVPリストmvpListLXとは配列
表記をすることで区別することとする。
The MVP list mvpListLX has a list structure, and is provided with a storage area for storing an index indicating the location in the MVP list and a predicted motion vector candidate corresponding to the index as elements. The index number starts from 0 and the MVP list mvp
Predicted motion vector candidates are stored in the ListLX storage area. In subsequent processing, M
A motion vector predictor candidate of index i registered in the VP list mvpListLX is represented by mvpListLX [i], and is distinguished from the MVP list mvpListLX by array notation.

スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_tempora
l_high_priority_flagが1で、mv_list_adaptive
_idx_flagが0の場合(S3101のYES、S3102のNO)、左または上
に隣接する予測ブロックからの予測動きベクトルの候補mvLXA,mvLXBよりも異
なる時間のピクチャの同一位置あるいはその近傍の予測ブロックからの予測動きベクトル
の候補mvLXColが優先され、図31で示すフローチャートの処理手順で、予測動き
ベクトルの候補がMVPリストに登録される(S3104)。
Flag mv_tempora encoded for each slice, sequence or picture
l_high_priority_flag is 1 and mv_list_adaptive
When _idx_flag is 0 (YES in S3101 and NO in S3102), prediction motion vector candidates from the prediction block adjacent to the left or above mvLXA, mvLXB from the same position of the picture at a time different from the prediction block or its neighboring prediction block The predicted motion vector candidate mvLXCol is prioritized, and the predicted motion vector candidate is registered in the MVP list in the processing procedure of the flowchart shown in FIG. 31 (S3104).

また、mv_temporal_high_priority_flagが0で、mv
_list_adaptive_idx_flagが0の場合(S3101のNO、S3
103のNO)、異なる時間のピクチャの同一位置あるいはその近傍の予測ブロックから
の予測動きベクトルの候補mvLXColよりも左または上に隣接する予測ブロックから
の予測動きベクトルの候補mvLXA,mvLXBが優先され、図32で示すフローチャ
ートの処理手順で、予測動きベクトルの候補がMVPリストに登録される(S3105)
In addition, mv_temporal_high_priority_flag is 0, mv
When _list_adaptive_idx_flag is 0 (NO in S3101, S3
103 NO), predicted motion vector candidates mvLXA and mvLXB from the prediction block adjacent to the left or above the predicted motion vector candidate mvLXCol from the prediction block at or near the same position of the pictures at different times are prioritized. 32 are registered in the MVP list in the processing procedure of the flowchart shown in FIG. 32 (S3105).
.

また、mv_temporal_high_priority_flagが1で、mv
_list_adaptive_idx_flagが1の場合(S3101のYES、S
3102のYES)、信頼性が高いと判断される予測動きベクトルの候補が優先されると
ともに、左または上に隣接する予測ブロックからの予測動きベクトルの候補mvLXA,
mvLXBよりも異なる時間のピクチャの同一位置あるいはその近傍の予測ブロックから
の予測動きベクトルの候補mvLXColが優先され、図33で示すフローチャートの処
理手順で、予測動きベクトルの候補がMVPリストに登録される(S3106)。
In addition, mv_temporal_high_priority_flag is 1 and mv
When _list_adaptive_idx_flag is 1 (YES in S3101, S
3102 YES), a motion vector candidate that is determined to be highly reliable is given priority, and a motion vector candidate mvLXA from a prediction block adjacent to the left or above is given.
Predicted motion vector candidates mvLXCol from the prediction block at or near the same position of a picture at a different time than mvLXB are prioritized, and the predicted motion vector candidates are registered in the MVP list by the processing procedure of the flowchart shown in FIG. (S3106).

また、mv_temporal_high_priority_flagが0で、mv
_list_adaptive_idx_flagが1の場合(S3101のNO、S3
103のYES)、信頼性が高いと判断される予測動きベクトルの候補が優先されるとと
もに、異なる時間のピクチャの同一位置あるいはその近傍の予測ブロックからの予測動き
ベクトルの候補mvLXColよりも左または上に隣接する予測ブロックからの予測動き
ベクトルの候補mvLXA,mvLXBが優先され、図34で示すフローチャートの処理
手順で、予測動きベクトルの候補がMVPリストに登録される(S3107)。
In addition, mv_temporal_high_priority_flag is 0, mv
When _list_adaptive_idx_flag is 1 (NO in S3101, S3
103), a motion vector candidate that is determined to have high reliability is prioritized, and left or above a motion vector candidate mvLXCol from the prediction block at the same position or its vicinity in a picture at a different time. Predicted motion vector candidates mvLXA and mvLXB from the prediction block adjacent to the image are prioritized, and predicted motion vector candidates are registered in the MVP list by the processing procedure of the flowchart shown in FIG. 34 (S3107).

前述のように、第2のフラグmv_temporal_high_priority_
flagの値は符号化効率を向上させるためフレームまたはスライス毎に適応的に変更し
て符号化される。符号化/復号対象ピクチャと最も近い参照ピクチャとの間の距離が近い
場合は、mv_temporal_high_priority_flagを真(1)と
し、符号化/復号対象画像と参照ピクチャとの間の距離が遠い場合は、偽(0)と設定す
ることで、MVPインデックスの符号量を削減することができる。この距離が比較的小さ
い場合は異なる時間からのMVPの候補が候補として比較的相応しいと判断する。例えば
、フレームレートが30Hzの場合、符号化/復号対象ピクチャと最も近い参照ピクチャ
との間の距離がXフレーム以内(X=1〜3程度)の場合、mv_temporal_h
igh_priority_flagを真(1)とし、符号化/復号対象画像と参照ピク
チャとの間の距離がXフレームより大きい場合は、偽(0)と設定することで、MVPイ
ンデックスの符号量を削減する。この閾値Xはシーケンスの内容に応じて設定することで
、より符号量を削減することができる。動きが大きく複雑なシーケンスの場合、閾値を小
さくすることで、時間方向のMVP候補の優先順位を下げることにより、符号化効率を向
上することができる。
As described above, the second flag mv_temporal_high_priority_
The flag value is adaptively changed for each frame or slice to improve the encoding efficiency. When the distance between the encoding / decoding target picture and the nearest reference picture is short, mv_temporal_high_priority_flag is set to true (1), and when the distance between the encoding / decoding target picture and the reference picture is far, false ( By setting 0), the code amount of the MVP index can be reduced. If this distance is relatively small, it is determined that MVP candidates from different times are relatively suitable as candidates. For example, when the frame rate is 30 Hz, when the distance between the encoding / decoding target picture and the nearest reference picture is within X frames (X = 1 to 3), mv_temporal_h
When the high_priority_flag is set to true (1) and the distance between the encoding / decoding target image and the reference picture is larger than the X frame, the code amount of the MVP index is reduced by setting it to false (0). By setting this threshold value X according to the contents of the sequence, the code amount can be further reduced. In the case of a complex sequence with large motion, encoding efficiency can be improved by lowering the priority of MVP candidates in the time direction by reducing the threshold.

図31は、スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_te
mporal_high_priority_flagが1で、mv_list_ada
ptive_idx_flagが0の場合(S3101のYES、S3102のNO)の
MVPリストmvpListLXへの予測動きベクトルの候補登録処理手順を示すフロー
チャートである。
FIG. 31 shows a flag mv_te encoded for each slice, sequence, or picture.
mporal_high_priority_flag is 1 and mv_list_ada
It is a flowchart which shows the candidate registration process procedure of the motion vector predictor to the MVP list mvpListLX when ptiv_idx_flag is 0 (YES in S3101, NO in S3102).

まず、availableFlagLXColが1の場合(S3201のYES)、M
VPリストmvpListLXの先頭にmvLXColを登録する(S3202)。
続いて、availableFlagLXAが1の場合(S3203のYES)、MV
PリストmvpListLXの最後にmvLXAを登録する(S3204)。
続いて、availableFlagLXBが1の場合(S3205のYES)、MV
PリストmvpListLXの最後にmvLXBを登録する(S3206)。
First, when availableFlagLXCol is 1 (YES in S3201), M
MvLXCol is registered at the head of the VP list mvpListLX (S3202).
Subsequently, when availableFlagLXA is 1 (YES in S3203), MV
The mvLXA is registered at the end of the P list mvpListLX (S3204).
Subsequently, when availableFlagLXB is 1 (YES in S3205), MV
The mvLXB is registered at the end of the P list mvpListLX (S3206).

図32は、スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_te
mporal_high_priority_flagが1で、mv_list_ada
ptive_idx_flagが0の場合(S3101のNO、S3103のNO)のM
VPリストmvpListLXへの予測動きベクトルの候補登録処理手順を示すフローチ
ャートである。
FIG. 32 shows a flag mv_te encoded for each slice, sequence, or picture.
mporal_high_priority_flag is 1 and mv_list_ada
M when ptiv_idx_flag is 0 (NO in S3101, NO in S3103)
It is a flowchart which shows the candidate registration process procedure of the motion vector predictor to VP list mvpListLX.

まず、availableFlagLXAが1の場合(S3301のYES)、MVP
リストmvpListLXの先頭にmvLXAを登録する(S3302)。
続いて、availableFlagLXBが1の場合(S3303のYES)、MV
PリストmvpListLXの最後にmvLXBを登録する(S3304)。
続いて、availableFlagLXColが1の場合(S3305のYES)、
MVPリストmvpListLXの最後にmvLXColを登録する(S3306)。
First, when availableFlagLXA is 1 (YES in S3301), MVP
MvLXA is registered at the head of the list mvpListLX (S3302).
Subsequently, when availableFlagLXB is 1 (YES in S3303), MV
The mvLXB is registered at the end of the P list mvpListLX (S3304).
Subsequently, when availableFlagLXCol is 1 (YES in S3305),
The mvLXCol is registered at the end of the MVP list mvpListLX (S3306).

図33は、スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_te
mporal_high_priority_flagが1で、mv_list_ada
ptive_idx_flagが1の場合(S3101のYES、S3102のYES)
のMVPリストmvpListLXへの予測動きベクトルの候補登録処理手順を示すフロ
ーチャートである。
FIG. 33 shows a flag mv_te encoded for each slice, sequence, or picture.
mporal_high_priority_flag is 1 and mv_list_ada
When ptive_idx_flag is 1 (YES in S3101, YES in S3102)
It is a flowchart which shows the candidate registration process procedure of the motion vector predictor to the MVP list mvpListLX.

まず、availableFlagLXColが1でかつMvCrossが1の場合(
S3401のYES、S3402のYES)、MVPリストmvpListLXの先頭に
mvLXColを登録する(S3403)。
続いて、availableFlagLXAが1でかつMvXANonScaleが1
の場合(S3404のYES、S3405のYES)、MVPリストmvpListLX
の最後にmvLXAを登録する(S3406)。
続いて、availableFlagLXBが1でかつMvXBNonScaleが1
の場合(S3407のYES、S3408のYES)、MVPリストmvpListLX
の最後にmvLXBを登録する(S3409)。
続いて、availableFlagLXColが1でかつMvCrossが0の場合
(S3410のYES、S3411のYES)、MVPリストmvpListLXの最後
にmvLXColを登録する(S3412)。
続いて、availableFlagLXAが1でかつMvXANonScaleが0
の場合(S3413のYES、S3414のYES)、MVPリストmvpListLX
の最後にmvLXAを登録する(S3415)。
続いて、availableFlagLXBが1でかつMvXBNonScaleが0
の場合(S3417のYES、S3416のYES)、MVPリストmvpListLX
の最後にmvLXBを登録する(S3418)。
First, when availableFlagLXCol is 1 and MvCross is 1 (
(YES in S3401, YES in S3402), mvLXCol is registered at the head of the MVP list mvpListLX (S3403).
Subsequently, availableFlagLXA is 1 and MvXANonScale is 1.
In the case of (YES in S3404, YES in S3405), the MVP list mvpListLX
MvLXA is registered at the end of (S3406).
Subsequently, availableFlagLXB is 1 and MvXBNonScale is 1.
In the case of (YES in S3407, YES in S3408), the MVP list mvpListLX
MvLXB is registered at the end of (S3409).
Subsequently, when availableFlagLXCol is 1 and MvCross is 0 (YES in S3410, YES in S3411), mvLXCol is registered at the end of the MVP list mvpListLX (S3412).
Then, availableFlagLXA is 1 and MvXANonScale is 0
In the case of (YES in S3413, YES in S3414), the MVP list mvpListLX
MvLXA is registered at the end of (S3415).
Subsequently, availableFlagLXB is 1 and MvXBNonScale is 0.
In the case of (YES in S3417, YES in S3416), the MVP list mvpListLX
MvLXB is registered at the end of (S3418).

図34は、スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_te
mporal_high_priority_flagが0で、mv_list_ada
ptive_idx_flagが1の場合(S3101のNO、S3103のYES)の
MVPリストmvpListLXへの予測動きベクトルの候補登録処理手順を示すフロー
チャートである。
FIG. 34 shows a flag mv_te encoded for each slice, sequence, or picture.
mporal_high_priority_flag is 0 and mv_list_ada
It is a flowchart which shows the candidate registration process procedure of the motion vector predictor to the MVP list mvpListLX when ptiv_idx_flag is 1 (NO in S3101, YES in S3103).

まず、availableFlagLXAが1でかつMvXANonScaleが1の
場合(S3501のYES、S3502のYES)、MVPリストmvpListLXの
先頭にmvLXAを登録する(S3503)。
続いて、availableFlagLXBが1でかつMvXBNonScaleが1
の場合(S3504のYES、S3505のYES)、MVPリストmvpListLX
の最後にmvLXBを登録する(S3506)。
続いて、availableFlagLXColが1でかつMvCrossが1の場合
(S3507のYES、S3508のYES)、MVPリストmvpListLXの最後
にmvLXColを登録する(S3509)。
続いて、availableFlagLXAが1でかつMvXANonScaleが0
の場合(S3510のYES、S3511のYES)、MVPリストmvpListLX
の最後にmvLXAを登録する(S3512)。
続いて、availableFlagLXBが1でかつMvXBNonScaleが0
の場合(S3513のYES、S3514のYES)、MVPリストmvpListLX
の最後にmvLXBを登録する(S3515)。
続いて、availableFlagLXColが1でかつMvCrossが0の場合
(S3516のYES、S3517のYES)、MVPリストmvpListLXの最後
にmvLXColを登録する(S3518)。
First, when availableFlagLXA is 1 and MvXANonScale is 1 (YES in S3501, YES in S3502), mvLXA is registered at the head of the MVP list mvpListLX (S3503).
Subsequently, availableFlagLXB is 1 and MvXBNonScale is 1.
In the case of (YES in S3504, YES in S3505), the MVP list mvpListLX
MvLXB is registered at the end of (S3506).
Subsequently, when availableFlagLXCol is 1 and MvCross is 1 (YES in S3507, YES in S3508), mvLXCol is registered at the end of the MVP list mvpListLX (S3509).
Then, availableFlagLXA is 1 and MvXANonScale is 0
In the case of (YES in S3510, YES in S3511), the MVP list mvpListLX
MvLXA is registered at the end of (S3512).
Subsequently, availableFlagLXB is 1 and MvXBNonScale is 0.
In the case of (YES in S3513, YES in S3514), the MVP list mvpListLX
MvLXB is registered at the end of (S3515).
Subsequently, when availableFlagLXCol is 1 and MvCross is 0 (YES in S3516, YES in S3517), mvLXCol is registered at the end of the MVP list mvpListLX (S3518).

図30のMVPリストmvpListLXへの予測動きベクトルの候補登録処理手順に
おいては、mv_temporal_high_priority_flagが1のとき
、時間的な動きベクトルmvLXColを優先的にMVPリストの前方に登録し、mv_
temporal_high_priority_flagが0のとき、空間的な動きベ
クトルmvLXA、mvLXBが優先的にMVPリストの前方に登録することで、符号量
を削減する。
In the candidate motion vector candidate registration processing procedure for the MVP list mvpListLX in FIG. 30, when mv_temporal_high_priority_flag is 1, the temporal motion vector mvLXCol is preferentially registered in front of the MVP list, and mv_
When temporal_high_priority_flag is 0, the spatial motion vectors mvLXA and mvLXB are preferentially registered ahead of the MVP list, thereby reducing the code amount.

図33、及び図34のMVPリストmvpListLXへの予測動きベクトルの候補登
録処理手順においては、フラグMvCrossが1、即ち符号化/復号対象の予測ブロッ
クを含むピクチャを横切って参照画像を指し示しているcolPuの動きベクトルmvC
olから算出された予測動きベクトルの候補が、フラグMvCrossが0、即ち符号化
/復号対象の予測ブロックを含むピクチャを横切らずに参照画像を指し示しているcol
Puの動きベクトルmvColから算出された予測動きベクトルの候補よりも符号化/復
号対象の動きベクトルと近い値を持つことが多く、差分動きベクトルの値が小さくなるこ
とが多いと判断し、予測ブロックColの予測動きベクトルを優先順位を上げてMVPリ
ストの前方に登録することで、符号量を削減する。即ち異なる時間の画像の予測ブロック
Colの符号化情報の値に応じて優先順位を変更してマージ候補リストに登録する順序を
変更ことで、符号量を削減する。
In the candidate motion vector candidate registration processing procedure in the MVP list mvpListLX in FIGS. 33 and 34, the flag MvCross is 1, that is, colPu pointing to the reference image across the picture including the prediction block to be encoded / decoded. Motion vector mvC
The predicted motion vector candidate calculated from ol indicates that the flag MvCross is 0, that is, indicates the reference image without crossing the picture including the prediction block to be encoded / decoded.
It is determined that the predicted motion vector candidate is often closer to the encoding / decoding target motion vector than the predicted motion vector candidate calculated from the Pu motion vector mvCol, and the difference motion vector value is often smaller. The amount of code is reduced by registering the predicted motion vector of Col in the front of the MVP list with a higher priority. That is, the code amount is reduced by changing the priority order according to the value of the encoding information of the prediction block Col of the image at different time and changing the order of registration in the merge candidate list.

また、予測ブロックN(NはAまたはB)において、MvXNNonScaleが1の
動きベクトルから予測された予測動きベクトルの候補がMvXNNonScaleが0の
動きベクトルから予測された予測動きベクトルの候補よりも符号化/復号対象の予測ブロ
ックの予測動きベクトルの候補として比較的相応しく、符号化/復号対象の動きベクトル
と近い値を持つことが多く、差分動きベクトルの値が小さくなることが多いと判断し、優
先的にMVPリストに登録することで、符号量を削減する。
In addition, in the prediction block N (N is A or B), a predicted motion vector candidate predicted from a motion vector whose MvXNNonScale is 1 is encoded / predicted from a predicted motion vector candidate predicted from a motion vector whose MvXNNonScale is 0. It is relatively suitable as a candidate for a motion vector predictor of a prediction block to be decoded, often has a value close to the motion vector to be encoded / decoded, and a difference motion vector value is often small. The code amount is reduced by registering in the MVP list.

なお、図33及び図34の代わりに、図35及び図36の処理手順で予測動きベクトル
の候補を登録することもできる。
In addition, instead of FIG. 33 and FIG. 34, motion vector predictor candidates can be registered by the processing procedures of FIG.

図35は、スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_te
mporal_high_priority_flagが1で、mv_list_ada
ptive_idx_flagが1の場合(S3101のYES、S3102のYES)
の第2のMVPリストmvpListLXへの予測動きベクトルの候補登録処理手順を示
すフローチャートである。
FIG. 35 shows a flag mv_te encoded for each slice, sequence, or picture.
mporal_high_priority_flag is 1 and mv_list_ada
When ptive_idx_flag is 1 (YES in S3101, YES in S3102)
It is a flowchart which shows the candidate registration process procedure of the motion vector predictor to the 2nd MVP list mvpListLX.

まず、availableFlagLXColが1でかつ異なる時間の予測ブロックグ
ループで右下の予測ブロックが選択された場合(S3601のYES、S3602のYE
S)、MVPリストmvpListLXの先頭にmvLXColを登録する(S3603
)。
続いて、availableFlagLXAが1でかつ左に隣接する予測ブロックグル
ープで左下または左の予測ブロックが選択された場合(S3604のYES、S3605
のYES)、MVPリストmvpListLXの最後にmvLXAを登録する(S360
6)。
続いて、availableFlagLXBが1でかつ上に隣接する予測ブロックグル
ープで右上または上の予測ブロックが選択された場合(S3607のYES、S3608
のYES)、MVPリストmvpListLXの最後にmvLXBを登録する(S360
9)。
続いて、availableFlagLXColが1でかつ異なる時間の予測ブロック
グループで中央の予測ブロックが選択された場合(S3610のYES、S3611のY
ES)、MVPリストmvpListLXの最後にmvLXColを登録する(S361
2)。
続いて、availableFlagLXAが1でかつ左に隣接する予測ブロックグル
ープで左上の予測ブロックが選択された場合(S3613のYES、S3614のYES
)、MVPリストmvpListLXの最後にmvLXAを登録する(S3615)。
続いて、availableFlagLXBが1でかつ上に隣接する予測ブロックグル
ープで左上の予測ブロックが選択された場合(S3617のYES、S3616のYES
)、MVPリストmvpListLXの最後にmvLXBを登録する(S3618)。
First, when availableFlagLXCol is 1 and a lower right prediction block is selected in a prediction block group at a different time (YES in S3601, YE in S3602).
S), mvLXCol is registered at the head of the MVP list mvpListLX (S3603).
).
Subsequently, when availableFlagLXA is 1 and the prediction block on the lower left or the left is selected in the prediction block group adjacent to the left (YES in S3604, S3605).
YES), mvLXA is registered at the end of the MVP list mvpListLX (S360).
6).
Subsequently, when the availableFlagLXB is 1 and the upper right or upper prediction block is selected in the prediction block group adjacent on the upper side (YES in S3607, S3608).
YES), mvLXB is registered at the end of the MVP list mvpListLX (S360).
9).
Subsequently, when the availableFlagLXCol is 1 and the central prediction block is selected from the prediction block groups at different times (YES in S3610, Y in S3611)
ES), mvLXCol is registered at the end of the MVP list mvpListLX (S361).
2).
Subsequently, when the availableFlagLXA is 1 and the prediction block on the upper left is selected in the prediction block group adjacent to the left (YES in S3613, YES in S3614)
), MvLXA is registered at the end of the MVP list mvpListLX (S3615).
Subsequently, when the availableFlagLXB is 1 and the upper left prediction block is selected in the prediction block group adjacent on the upper side (YES in S3617, YES in S3616)
), MvLXB is registered at the end of the MVP list mvpListLX (S3618).

図36は、スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_te
mporal_high_priority_flagが0で、mv_list_ada
ptive_idx_flagが1の場合(S3101のNO、S3103のYES)の
第2のMVPリストmvpListLXへの予測動きベクトルの候補登録処理手順を示す
フローチャートである。
FIG. 36 shows a flag mv_te encoded for each slice, sequence, or picture.
mporal_high_priority_flag is 0 and mv_list_ada
It is a flowchart which shows the candidate registration process procedure of the motion vector predictor to the 2nd MVP list mvpListLX when ptiv_idx_flag is 1 (NO in S3101, YES in S3103).

まず、availableFlagLXAが1でかつ左に隣接する予測ブロックグルー
プで左下または左の予測ブロックが選択された場合(S3701のYES、S3702の
YES)、MVPリストmvpListLXの先頭にmvLXAを登録する(S3703
)。
続いて、availableFlagLXBが1でかつ上に隣接する予測ブロックグル
ープで右上または上の予測ブロックが選択された場合(S3704のYES、S3705
のYES)、MVPリストmvpListLXの最後にmvLXBを登録する(S370
6)。
続いて、availableFlagLXColが1でかつ異なる時間の予測ブロック
グループで右下の予測ブロックが選択された場合(S3707のYES、S3708のY
ES)、MVPリストmvpListLXの最後にmvLXColを登録する(S370
9)。
続いて、availableFlagLXAが1でかつ左に隣接する予測ブロックグル
ープで左上の予測ブロックが選択された場合(S3710のYES、S3711のYES
)、MVPリストmvpListLXの最後にmvLXAを登録する(S3712)。
続いて、availableFlagLXBが1でかつ上に隣接する予測ブロックグル
ープで左上の予測ブロックが選択された場合(S3713のYES、S3714のYES
)、MVPリストmvpListLXの最後にmvLXBを登録する(S3715)。
続いて、availableFlagLXColが1でかつ異なる時間の予測ブロック
グループで中央の予測ブロックが選択された場合(S3716のYES、S3717のY
ES)、MVPリストmvpListLXの最後にmvLXColを登録する(S371
8)。
First, when availableFlagLXA is 1 and the lower left or left prediction block is selected in the prediction block group adjacent to the left (YES in S3701 and YES in S3702), mvLXA is registered at the head of the MVP list mvpListLX (S3703).
).
Subsequently, when availableFlagLXB is 1 and the upper right or upper prediction block is selected in the upper adjacent prediction block group (YES in S3704, S3705).
YES), mvLXB is registered at the end of the MVP list mvpListLX (S370).
6).
Subsequently, when the availableFlagLXCol is 1 and a lower right prediction block is selected in a prediction block group at different times (YES in S3707, Y in S3708)
ES), mvLXCol is registered at the end of the MVP list mvpListLX (S370).
9).
Subsequently, when availableFlagLXA is 1 and the upper left prediction block is selected in the prediction block group adjacent to the left (YES in S3710, YES in S3711)
), MvLXA is registered at the end of the MVP list mvpListLX (S3712).
Subsequently, when the availableFlagLXB is 1 and the upper left prediction block is selected in the prediction block group adjacent on the upper side (YES in S3713, YES in S3714)
), MvLXB is registered at the end of the MVP list mvpListLX (S3715).
Subsequently, when availableFlagLXCol is 1 and a central prediction block is selected in a prediction block group at a different time (YES in S3716, Y in S3717).
ES), mvLXCol is registered at the end of the MVP list mvpListLX (S371).
8).

図35、及び図36のMVPリストmvpListLXへの予測動きベクトルの候補登
録処理手順においては、異なる時間の予測ブロックグループにおいて、右下の予測ブロッ
クの動きベクトルから予測された予測動きベクトルの候補が異なる時間の予測ブロックグ
ループで中央の予測ブロックの動きベクトルから予測された予測動きベクトルの候補より
も符号化対象の動きベクトルと近い値を持つことが多く、差分動きベクトルの値が小さく
なることが多いと判断し、優先的にMVPリストに登録することで、符号量を削減する。
左に隣接する予測ブロックグループにおいて、左下または左の予測ブロックの動きベクト
ルから予測された予測動きベクトルの候補が左上の予測ブロックの動きベクトルから予測
された予測動きベクトルの候補よりも符号化対象の動きベクトルと近い値を持つことが多
く、差分動きベクトルの値が小さくなることが多いと判断し、優先的にMVPリストに登
録することで、符号量を削減する。上に隣接する予測ブロックグループにおいて、右上ま
たは上の予測ブロックの動きベクトルから予測された予測動きベクトルの候補が左上の予
測ブロックの動きベクトルから予測された予測動きベクトルの候補よりも符号化対象の動
きベクトルと近い値を持つことが多く、差分動きベクトルの値が小さくなることが多いと
判断し、優先的にMVPリストに登録することで、符号量を削減する。
In the prediction motion vector candidate registration processing procedure to the MVP list mvpListLX in FIG. 35 and FIG. 36, the prediction motion vector candidates predicted from the motion vector of the lower right prediction block are different in the prediction block groups at different times. In a temporal prediction block group, the motion vector is often closer to the encoding target motion vector than the predicted motion vector candidate predicted from the motion vector of the central prediction block, and the difference motion vector value is often smaller. The amount of code is reduced by preferentially registering it in the MVP list.
In the prediction block group adjacent to the left, the predicted motion vector candidate predicted from the motion vector of the lower left or left predicted block is encoded more than the predicted motion vector candidate predicted from the motion vector of the upper left predicted block. It is determined that the value is often close to the motion vector and the value of the difference motion vector is often small, and the code amount is reduced by preferentially registering it in the MVP list. In the prediction block group adjacent to the top, the motion vector candidate predicted from the motion vector of the upper right or upper prediction block is encoded more than the motion vector candidate predicted from the motion vector of the upper left prediction block. It is determined that the value is often close to the motion vector and the value of the difference motion vector is often small, and the code amount is reduced by preferentially registering it in the MVP list.

[MVPリストの中の同じの値を持つ予測動きベクトルの候補を削除(図16のS30
5)]
予測動きベクトルの候補のMVPリストmvpListLXの中で、同じ動きベクトル
の値を持つ予測動きベクトルの候補が存在する場合、MVPリストmvpListLXの
中で最も小さいインデックスを持つ予測動きベクトルの候補を除いて全て削除される。削
除処理の終了後、MVPリストmvpListLXの中は、削除された予測動きベクトル
の候補の格納領域が空いている為、インデックス0を基準にして、インデックスが小さい
予測動きベクトルの候補の順で詰めていく。例えば、インデックス1,4の予測動きベク
トルの候補が削除され、インデックス0,2及び3が残った場合、インデックス0はその
ままとして、インデックス2の予測動きベクトルの候補をインデックス1の格納領域に移
動し、インデックス3の予測動きベクトルの候補をインデックス2の格納領域に移動して
、MVPリストmvpListLXの中を更新する。
[Delete candidate motion vector having the same value in MVP list (S30 in FIG. 16)
5)]
If there are prediction motion vector candidates having the same motion vector value in the predicted motion vector candidate MVP list mvpListLX, all except the prediction motion vector candidate having the smallest index in the MVP list mvpListLX Deleted. After completion of the deletion process, the MVP list mvpListLX has a storage area for the deleted motion vector predictor candidates deleted, so that the index 0 is used as a reference and the motion vector motion vector candidates with smaller indexes are packed in order. Go. 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 contents of the MVP list mvpListLX are updated.

なお、ステップS301、S302、S303に関しては、処理順序を入れ替えること
もできるし、並列に処理することも可能である。
In addition, regarding steps S301, S302, and S303, the processing order can be changed and the processing can be performed in parallel.

次に、マージ・モードについて説明する。
これまで、動画像符号化装置の差分動きベクトル算出部103、及び動画像復号装置の
動きベクトル算出部204の予測動きベクトルの算出方法、及び予測動きベクトルリスト
の構築方法について述べたが、動画像符号化装置のインター予測情報推定部104、及び
動画像復号装置のインター予測情報推定部205のマージ・モードでも同様の処理を行う
Next, the merge mode will be described.
So far, the motion vector calculation unit 103 of the video encoding device and the motion vector calculation method 204 and the motion vector calculation method of the motion vector calculation unit 204 of the video decoding device have been described. The same processing is performed in the merge mode of the inter prediction information estimation unit 104 of the encoding device and the inter prediction information estimation unit 205 of the video decoding device.

前述したように、マージ・モードは当該予測ブロックの予測モード、参照リストインデ
ックス、動きベクトル等のインター予測情報を符号化/復号するのではなく、符号化済み
の隣接するインター予測された予測ブロック、あるいは異なる画像のインター予測された
予測ブロックのインター予測情報を利用するモードである。
As described above, the merge mode does not encode / decode inter prediction information such as a prediction mode, a reference list index, and a motion vector of the prediction block, but encodes adjacent inter-predicted prediction blocks, Or it is the mode which uses the inter prediction information of the prediction block by which the inter prediction of the different image was carried out.

図37はマージ・モードでの隣接する予測ブロックの位置を説明する図である。マージ
・モードは左に隣接する予測ブロックA、上に隣接する予測ブロックB、右上に隣接する
予測ブロックC、左下に隣接する予測ブロックDに加えて、図9を用いて説明した異なる
時間の同一位置あるいはその近傍の予測ブロックCol(T0〜T3のいずれか)の5つ
の予測ブロックを候補とする。動画像符号化装置のインター予測情報推定部104、及び
動画像復号装置のインター予測情報推定部205はそれらの5つの候補を符号化側と復号
側で共通の規定の順序でマージ候補リストに登録し、動画像符号化装置のインター予測情
報推定部104がマージ候補リストの要素を特定するマージ・インデックスを決定して第
1の符号化ビット列生成部を経由して符号化し、動画像復号装置のインター予測情報推定
部205は第1符号化ビット列復号部202で復号されたマージ・インデックスが供給さ
れて、そのマージ・インデックスに応じた予測ブロックをマージ候補リストから選択し、
その選択された予測ブロックの予測モード、参照インデックス、動きベクトル等のインタ
ー予測情報を用いて、動き補償予測を行う。
FIG. 37 is a diagram for explaining the positions of adjacent prediction blocks in the merge mode. In addition to the prediction block A adjacent to the left, the prediction block B adjacent to the upper right, the prediction block C adjacent to the upper right, and the prediction block D adjacent to the lower left, the merge mode is the same at different times described with reference to FIG. Five prediction blocks of the prediction block Col (any one of T0 to T3) at or near the position are candidates. The inter prediction information estimation unit 104 of the moving image encoding device and the inter prediction information estimation unit 205 of the moving image decoding device register these five candidates in the merge candidate list in a common order on the encoding side and the decoding side. Then, the inter prediction information estimation unit 104 of the moving image encoding device determines a merge index for specifying an element of the merge candidate list, encodes it via the first encoded bit string generation unit, and The inter prediction information estimation unit 205 is supplied with the merge index decoded by the first encoded bit string decoding unit 202, selects a prediction block corresponding to the merge index from the merge candidate list,
Motion compensation prediction is performed using inter prediction information such as a prediction mode, a reference index, and a motion vector of the selected prediction block.

図38は、図1の動画像符号化装置のインター予測情報推定部104の詳細な構成を示
す図である。また、図39は、図2の動画像復号装置のインター予測情報推定部205の
詳細な構成を示す図である。
FIG. 38 is a diagram illustrating a detailed configuration of the inter prediction information estimation unit 104 of the video encoding device in FIG. FIG. 39 is a diagram illustrating a detailed configuration of the inter prediction information estimation unit 205 of the video decoding device in FIG.

図38及び図39の太枠線で囲まれる部分はそれぞれ、インター予測情報推定部104
及びインター予測情報推定部205を示している。
The portions surrounded by the thick frame lines in FIGS. 38 and 39 are respectively the inter prediction information estimation unit 104.
And the inter prediction information estimation part 205 is shown.

更に、それらの内部の太点線で囲まれる部分は後述するインター予測情報推定方法の動
作部を示しており、実施の形態の動画像符号化装置と対応する動画像復号装置にも同様に
設置され、符号化と復号で矛盾しない同一の判定結果を得られるようにしている。
Furthermore, the part enclosed by the thick dotted line inside shows the operation | movement part of the inter prediction information estimation method mentioned later, and is similarly installed in the moving image decoding apparatus corresponding to the moving image encoding apparatus of embodiment. Thus, the same determination result consistent with encoding and decoding can be obtained.

インター予測情報推定部104は、マージ候補生成部130、マージ候補登録部131
、マージ候補同一判定部132、および符号化情報選択部133を含む。
The inter prediction information estimation unit 104 includes a merge candidate generation unit 130 and a merge candidate registration unit 131.
, A merge candidate identity determination unit 132, and an encoding information selection unit 133.

インター予測情報推定部205は、マージ候補生成部230、マージ候補登録部231
、マージ候補同一判定部232、および符号化情報選択部233を含む。
The inter prediction information estimation unit 205 includes a merge candidate generation unit 230 and a merge candidate registration unit 231.
, A merge candidate identity determination unit 232, and an encoded information selection unit 233.

図40は動画像符号化装置のインター予測情報推定部104及び動画像復号装置のイン
ター予測情報推定部205とで共通する機能を有するマージ候補の導出及びマージ候補リ
ストの構築処理の流れを表すフローチャートである。以下、諸過程を順を追って説明する
FIG. 40 is a flowchart showing the flow of merge candidate derivation and merge candidate list construction processing having functions common to the inter prediction information estimation unit 104 of the video encoding device and the inter prediction information estimation unit 205 of the video decoding device. It is. Hereinafter, the processes will be described in order.

動画像符号化装置のインター予測情報推定部104のマージ候補生成部130及び動画
像復号装置のインター予測情報推定部205のマージ候補生成部230では、周囲に隣接
する予測ブロックA,B,C,Dからのマージ候補となる予測ブロックをリスト毎に算出
し、利用できるかどうかを示すフラグavailableFlagN、及び動きベクトル
mvLXN、参照インデックスrefIdxLXN、LN予測が行われるかどうかを示す
LN予測フラグpredFlagLXNを出力する(N=A,B,C,D)(図40のS
401)。なお、L0のときXは0、L1のときXは1とする(以下同様)。利用できる
かどうかを示すフラグavailableFlagLXN、及び動きベクトルmvLXN
、参照インデックスrefIdxLXN、LN予測フラグpredFlagLXN(Nは
A,B,C,D、以下同様)を算出する共通の算出処理手順を図41のフローチャートを
用いて後ほど詳細に説明する。
In the merge candidate generation unit 130 of the inter prediction information estimation unit 104 of the video encoding device and the merge candidate generation unit 230 of the inter prediction information estimation unit 205 of the video decoding device, the neighboring prediction blocks A, B, C, A prediction block that is a merge candidate from D is calculated for each list, and a flag availableFlagN indicating whether or not it can be used, a motion vector mvLXN, a reference index refIdxLXN, and an LN prediction flag predFlagLXN indicating whether or not LN prediction is performed are output. (N = A, B, C, D) (S in FIG.
401). Note that X is 0 when L0 and X is 1 when L1 (the same applies hereinafter). A flag availableFlagLXN indicating whether or not it can be used, and a motion vector mvLXN
A common calculation processing procedure for calculating the reference index refIdxLXN and the LN prediction flag predFlagLXN (N is A, B, C, D, and so on) will be described in detail later with reference to the flowchart of FIG.

続いて、異なる時間のマージ候補を算出する。異なる時間のマージ候補の符号化情報を
用いてインター予測を行う場合は、双予測を行うために、L0とL1の2つ符号化情報を
算出する。まず、動画像符号化装置のインター予測情報推定部104のマージ候補生成部
130及び動画像復号装置のインター予測情報推定部205のマージ候補生成部230で
は、異なる時間のマージ候補の参照インデックスrefIdxLXColを決定し、出力
する(図40のS402)。ここでは、L0、L1それぞれにおいて、符号化済みの周囲
の予測ブロックの符号化情報を調べて中で最も多く発生している参照インデックスの値を
参照インデックスrefIdxLXColの値として設定する。最も多く発生している参
照インデックスが同数存在する場合は、参照インデックスの値が小さい方を参照インデッ
クスrefIdxLXColの値として設定し、参照インデックスが存在しない場合(周
囲の予測ブロックが利用できないか、イントラ予測モードの場合)、参照インデックスr
efIdxLXColの値を0とする。
Subsequently, merge candidates at different times are calculated. When performing inter prediction using coding information of merge candidates at different times, two pieces of coding information of L0 and L1 are calculated in order to perform bi-prediction. First, in the merge candidate generation unit 130 of the inter prediction information estimation unit 104 of the video encoding device and the merge candidate generation unit 230 of the inter prediction information estimation unit 205 of the video decoding device, reference indexes refIdxLXCol of merge candidates at different times are set. Determine and output (S402 in FIG. 40). Here, in each of L0 and L1, the encoding information of the encoded surrounding prediction blocks is examined, and the most frequently generated reference index value is set as the value of the reference index refIdxLXCol. When there are the same number of reference indexes that occur most frequently, the smaller reference index value is set as the value of the reference index refIdxLXCol, and when there is no reference index (the surrounding prediction block cannot be used or intra prediction is performed) Mode), reference index r
The value of efIdxLXCol is set to 0.

続いて、動画像符号化装置のインター予測情報推定部104のマージ候補生成部130
及び動画像復号装置のインター予測情報推定部205のマージ候補生成部230では、異
なる時間の画像からの予測動きベクトルの候補を算出し、利用できるかどうかを示すフラ
グavailableFlagCol、クロスしているかどうかを示すフラグmvCro
ssFlag、及び動きベクトルmvLXColを出力する(図40のS403)。これ
らの算出処理手順は図24〜29と図22のフローチャートを用いて説明したのと同様の
方法である。ただし、マージモードにおける図22によるMVのスケーリングにおいては
、ステップS402で算出した参照インデックスrefIdxLXColに応じて算出す
る。
Subsequently, the merge candidate generation unit 130 of the inter prediction information estimation unit 104 of the video encoding device.
In addition, the merge candidate generation unit 230 of the inter prediction information estimation unit 205 of the moving image decoding apparatus calculates prediction motion vector candidates from images at different times and can use the flag availableFlagCol indicating whether or not it can be used. Indicating flag mvCro
ssFlag and the motion vector mvLXCol are output (S403 in FIG. 40). These calculation processing procedures are the same methods as described with reference to the flowcharts of FIGS. However, in the MV scaling in FIG. 22 in the merge mode, the calculation is performed according to the reference index refIdxLXCol calculated in step S402.

続いて、動画像符号化装置のインター予測情報推定部104のマージ候補登録部131
及び動画像復号装置のインター予測情報推定部205のマージ候補登録部231では、マ
ージ候補リストmergeCandListを作成し、予測ベクトルの候補mvLXN(
NはA、B、C、DまたはCol、以下同様)を追加する(図40のS404)。これら
の登録処理手順を図42〜45のフローチャートを用いて後ほど詳細に説明する。
Subsequently, the merge candidate registration unit 131 of the inter prediction information estimation unit 104 of the video encoding device.
The merge candidate registration unit 231 of the inter prediction information estimation unit 205 of the video decoding device creates a merge candidate list mergeCandList, and generates a prediction vector candidate mvLXN (
N adds A, B, C, D, or Col (the same applies hereinafter) (S404 in FIG. 40). These registration processing procedures will be described in detail later using the flowcharts of FIGS.

続いて、動画像符号化装置のインター予測情報推定部104のマージ候補同一判定部1
32及び動画像復号装置のインター予測情報推定部205のマージ候補同一判定部232
では、マージ候補リストmergeCandList内で、マージ候補が同じ参照インデ
ックスの動きベクトルが同じ値を持っている場合に、最も小さい順番のマージ候補を除い
てその動きベクトルを取り除く(図40のS405)。
Subsequently, the merge candidate identity determination unit 1 of the inter prediction information estimation unit 104 of the video encoding device.
32 and the merge candidate identity determination unit 232 of the inter prediction information estimation unit 205 of the video decoding device.
Then, in the merge candidate list mergeCandList, when the motion vectors of the same reference index as the merge candidate have the same value, the motion vector is removed except for the smallest merge candidate (S405 in FIG. 40).

[周辺の予測ブロックからマージの候補を導出(図40のS401)]
図41のフローチャートを用いて、図40のS401の処理手順である周辺に隣接する
予測ブロックグループNからの予測ブロックNの算出方法について説明する。添え字Xに
は参照リストを表す0若しくは1、Nには隣接する予測ブロックグループの領域を表すA
(左側)、B(上側)、C(右上)またはD(左下)が入る。
[Deriving merge candidates from neighboring prediction blocks (S401 in FIG. 40)]
With reference to the flowchart of FIG. 41, the calculation method of the prediction block N from the prediction block group N adjacent to the periphery, which is the processing procedure of S401 of FIG. 40, will be described. The subscript X is 0 or 1 representing the reference list, and N is the A representing the area of the adjacent prediction block group.
(Left side), B (upper side), C (upper right) or D (lower left).

図40で、変数N=Aとして符号化/復号対象の予測ブロックの左側に隣接する予測ブ
ロックを、変数N=Bとして上側に隣接する予測ブロックを、変数N=Cとして右上側に
隣接する予測ブロックを、N=Dとして左下側に隣接する予測ブロックを調べて、から予
測動きベクトルの候補を、それぞれ以下の手順で算出する(S4101〜S4110)。
In FIG. 40, the prediction block adjacent to the left side of the prediction block to be encoded / decoded as variable N = A, the prediction block adjacent to the upper side as variable N = B, and the prediction adjacent to the upper right side as variable N = C The prediction block adjacent to the lower left side is examined with N = D, and the motion vector predictor candidates are calculated in the following procedure (S4101 to S4110).

まず、符号化/復号対象の予測ブロックに隣接する予測ブロックを特定し、それぞれの
予測ブロックNが利用できる場合は符号化情報を取得する(S4102)。
First, a prediction block adjacent to a prediction block to be encoded / decoded is specified, and when each prediction block N can be used, encoding information is acquired (S4102).

隣接する予測ブロックNが利用できないか(S4103のYES)、予測ブロックNの
符号化モードPredModeがイントラ(MODE_INTRA)である場合(S41
04のYES)、フラグavailableFlagNは0と設定し(S4105)、m
vLXNは(0,0)に設定する(S4106)。
If the adjacent prediction block N cannot be used (YES in S4103), or the encoding mode PredMode of the prediction block N is intra (MODE_INTRA) (S41)
04 YES), the flag availableFlagN is set to 0 (S4105), m
vLXN is set to (0, 0) (S4106).

一方、隣接する予測ブロックNが利用でき(S4103のNO)、予測ブロックNの符
号化モードPredModeがイントラ(MODE_INTRA)でない場合(S410
4のNO)、フラグavailableFlagNは1と設定し(S4107)、予測ブ
ロックNのインター予測情報を取得する。すなわち、予測ブロックNの動きベクトルmv
LXN、参照インデックスrefIdxLX[xN,yN]、LXからの予測を行うかど
うかを示すフラグpredFlagLX[xN,yN]がmvLXN、refIdxLX
N、predFlagLXNにそれぞれ割り当てられる(S4108、S4109、S4
110)。ここで、Xは0と1であり、L0とL1のインター予測情報を取得する。また
、重み付け予測が行われ、予測ブロック単位で重み付け係数が設定される場合は、重み付
け係数も取得する。さらに、インターレース符号化がおこなわれ、予測ブロック単位で、
フレームモードとフィールドモードが切り替わる場合は、フレーム/フィールドの切り替
えモードも取得する。さらに、インター予測情報以外の量子化パラメータ等を取得するこ
ともできる。
以上のステップS4102〜S4110の処理をN=A,B,C,Dについて繰り返す(
S4101〜S4111)。
On the other hand, when the adjacent prediction block N can be used (NO in S4103) and the encoding mode PredMode of the prediction block N is not intra (MODE_INTRA) (S410).
4), the flag availableFlagN is set to 1 (S4107), and the inter prediction information of the prediction block N is acquired. That is, the motion vector mv of the prediction block N
LXN, reference index refIdxLX [xN, yN], and flag predFlagLX [xN, yN] indicating whether to perform prediction from LX are mvLXN, refIdxLX
N and predFlagLXN (S4108, S4109, S4)
110). Here, X is 0 and 1, and inter prediction information of L0 and L1 is acquired. In addition, when weighted prediction is performed and a weighting coefficient is set for each prediction block, the weighting coefficient is also acquired. Furthermore, interlace coding is performed, and in units of prediction blocks,
When the frame mode and the field mode are switched, the frame / field switching mode is also acquired. Furthermore, quantization parameters other than the inter prediction information can be acquired.
The processes in steps S4102 to S4110 are repeated for N = A, B, C, and D (
S4101 to S4111).

[予測ブロックの候補をマージ候補リストに追加(図40のS404)]
図37、図9を用いて説明したマージ候補となる予測ブロックの候補をマージ候補リス
トに追加する方法について説明する。図42はマージ候補リストへのマージ候補となる予
測ブロックの候補の追加処理手順を示すフローチャートである。本方式では、優先順位を
つけて、優先順位の高いものからマージ候補リストmergeCandListに予測動
きベクトルの候補を登録することで、マージ・インデックスmerge_idx[x0]
[y0]の符号量を削減する。優先順位の高い要素をマージ候補リストの前方に配置する
ことで、符号量を削減する。例えば、マージ候補リストmergeCandListの要
素が5個の場合、マージ候補リストのインデックス0を「0」、インデックス1を「10
」、インデックス2を「110」、インデックス3を「1110」、インデックス4を「
11110」とすることで、インデックス0を表す符号量が1ビットとなり、インデック
ス0に発生頻度が高いと考えられる要素を登録することで、符号量を削減する。
[Add prediction block candidate to merge candidate list (S404 in FIG. 40)]
A method of adding the prediction block candidates to be merge candidates described with reference to FIGS. 37 and 9 to the merge candidate list will be described. FIG. 42 is a flowchart of a process procedure for adding prediction block candidates that are merge candidates to the merge candidate list. In this method, priorities are assigned and the motion vector candidates are registered in the merge candidate list mergeCandList in descending order of priority so that the merge index merge_idx [x0].
The code amount of [y0] is reduced. The amount of codes is reduced by placing elements with higher priorities in front of the merge candidate list. For example, if there are five elements in the merge candidate list mergeCandList, index 0 of the merge candidate list is “0” and index 1 is “10”.
", Index 2 is" 110 ", index 3 is" 1110 ", index 4 is"
By setting “11110”, the code amount indicating the index 0 becomes 1 bit, and the code amount is reduced by registering an element considered to have a high occurrence frequency in the index 0.

マージ候補リストmergeCandListはリスト構造を成し、マージ候補リスト
内部の所在を示すマージ・インデックスと、インデックスに対応する予測動きベクトルの
候補を要素として格納する記憶領域が設けられている。マージ・インデックスの数字は0
から開始され、マージ候補リストmergeCandListの記憶領域に、予測動きベ
クトルの候補が格納される。以降の処理では、マージ候補リストmergeCandLi
stに登録されたマージ・インデックスiのマージ候補となる予測ブロックは、merg
eCandList[i]で表すこととし、マージ候補リストmergeCandLis
tとは配列表記をすることで区別することとする。
The merge candidate list mergeCandList has a list structure, and is provided with a storage area for storing, as elements, a merge index indicating a location in the merge candidate list and a predicted motion vector candidate corresponding to the index. The merge index number is 0
The motion vector candidates are stored in the storage area of the merge candidate list mergeCandList. In subsequent processing, the merge candidate list mergeCandLi
The prediction block that is a merge candidate of the merge index i registered in st is merg
eCandList [i] and merge candidate list mergeCandLis
It is distinguished from t by array notation.

スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_tempora
l_high_priority_flagが1で、mv_list_adaptive
_idx_flagが0の場合(S4201のYES、S4202のNO)、右上または
左下に隣接する予測ブロックC,Dよりも異なる時間のピクチャの同一位置あるいはその
近傍の予測ブロックColが優先され、図43で示すフローチャートの処理手順で、マー
ジ候補となる予測ブロックがマージ候補リストに登録される(S4204)。
Flag mv_tempora encoded for each slice, sequence or picture
l_high_priority_flag is 1 and mv_list_adaptive
When _idx_flag is 0 (YES in S4201 and NO in S4202), the prediction block Col at the same position or in the vicinity of the picture at a different time is prioritized over the prediction blocks C and D adjacent in the upper right or lower left, and is shown in FIG. In the processing procedure of the flowchart, a prediction block that becomes a merge candidate is registered in the merge candidate list (S4204).

また、mv_temporal_high_priority_flagが0で、mv
_list_adaptive_idx_flagが0の場合(S4201のNO、S4
203のNO)、異なる時間のピクチャの同一位置あるいはその近傍の予測ブロックから
のマージ候補となる予測ブロックColよりも右上または左下に隣接する予測ブロックC
,Dが優先され、図44で示すフローチャートの処理手順で、マージ候補となる予測ブロ
ックがマージ候補リストに登録される(S4205)。
In addition, mv_temporal_high_priority_flag is 0, mv
When _list_adaptive_idx_flag is 0 (NO in S4201, S4
203 NO), the prediction block C adjacent to the upper right or lower left of the prediction block Col that becomes a merge candidate from the prediction block at or near the same position of pictures at different times.
, D is prioritized, and prediction blocks that are merge candidates are registered in the merge candidate list in the processing procedure of the flowchart shown in FIG. 44 (S4205).

また、mmv_list_adaptive_idx_flagが1の場合(S420
2のYES、S4203のYES)、信頼性が高いと判断されるマージ候補となる予測ブ
ロックが優先され、図45で示すフローチャートの処理手順で、マージ候補となる予測ブ
ロックがマージ候補リストに登録される(S4206)。
Also, when mmv_list_adaptive_idx_flag is 1 (S420)
2 YES, YES in S4203), the prediction block that becomes a merge candidate determined to have high reliability is given priority, and the prediction block that becomes a merge candidate is registered in the merge candidate list in the processing procedure of the flowchart shown in FIG. (S4206).

前述のように、第2のフラグmv_temporal_high_priority_
flagの値は符号化効率を向上させるためフレームまたはスライス毎に適応的に変更し
て符号化される。符号化/復号対象ピクチャと最も近い参照ピクチャとの間の距離が近い
場合は、mv_temporal_high_priority_flagを真(1)と
し、符号化/復号対象画像と参照ピクチャとの間の距離が遠い場合は、偽(0)と設定す
ることで、マージ・インデックスの符号量を削減することができる。この距離が比較的小
さい場合は異なる時間からのマージ候補が候補として比較的相応しいと判断する。例えば
、フレームレートが30Hzの場合、符号化/復号対象ピクチャと最も近い参照ピクチャ
との間の距離がXフレーム以内(X=1〜3程度)の場合、mv_temporal_h
igh_priority_flagを真(1)とし、符号化/復号対象画像と参照ピク
チャとの間の距離がXフレームより大きいの場合は、偽(0)と設定することで、マージ
・インデックスの符号量を削減する。この閾値Xはシーケンスの内容に応じて設定するこ
とで、より符号量を削減することができる。動きが大きく複雑なシーケンスの場合、閾値
を小さくすることで、時間方向のマージ候補の優先順位を下げることにより、符号化効率
を向上することができる。
As described above, the second flag mv_temporal_high_priority_
The flag value is adaptively changed for each frame or slice to improve the encoding efficiency. When the distance between the encoding / decoding target picture and the nearest reference picture is short, mv_temporal_high_priority_flag is set to true (1), and when the distance between the encoding / decoding target picture and the reference picture is far, false ( By setting 0), the code amount of the merge index can be reduced. If this distance is relatively small, it is determined that merge candidates from different times are relatively suitable as candidates. For example, when the frame rate is 30 Hz, when the distance between the encoding / decoding target picture and the nearest reference picture is within X frames (X = 1 to 3), mv_temporal_h
When the high_priority_flag is set to true (1) and the distance between the encoding / decoding target image and the reference picture is larger than the X frame, the code amount of the merge index is reduced by setting it to false (0). . By setting this threshold value X according to the contents of the sequence, the code amount can be further reduced. In the case of a complex sequence with a large motion, encoding efficiency can be improved by lowering the priority of merge candidates in the time direction by reducing the threshold.

図43は、スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_te
mporal_high_priority_flagが1で、mv_list_ada
ptive_idx_flagが0の場合(S4201のYES、S4202のNO)の
マージ候補リストmergeCandListへのマージ候補となる予測ブロックの登録
処理手順を示すフローチャートである。
FIG. 43 shows a flag mv_te encoded for each slice, sequence, or picture.
mporal_high_priority_flag is 1 and mv_list_ada
It is a flowchart which shows the registration process procedure of the prediction block used as the merge candidate to merge candidate list mergeCandList when ptiv_idx_flag is 0 (YES of S4201 and NO of S4202).

まず、availableFlagAが1の場合(S4301のYES)、マージ候補
リストmergeCandListの先頭に予測ブロックAをマージ候補として登録する
(S4302)。
続いて、availableFlagBが1の場合(S4303のYES)、マージ候
補リストmergeCandListの最後に予測ブロックBをマージ候補として登録す
る(S4304)。
続いて、availableFlagColが1の場合(S4305のYES)、マー
ジ候補リストmergeCandListの最後に予測ブロックColをマージ候補とし
て登録する(S4306)。
続いて、availableFlagCが1の場合(S4307のYES)、マージ候
補リストmergeCandListの最後に予測ブロックCをマージ候補として登録す
る(S4308)。
続いて、availableFlagDが1の場合(S4309のYES)、マージ候
補リストmergeCandListの最後に予測ブロックDをマージ候補として登録す
る(S4310)。
First, when availableFlagA is 1 (YES in S4301), the prediction block A is registered as a merge candidate at the head of the merge candidate list mergeCandList (S4302).
Subsequently, when availableFlagB is 1 (YES in S4303), the prediction block B is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4304).
Subsequently, when availableFlagCol is 1 (YES in S4305), the prediction block Col is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4306).
Subsequently, when availableFlagC is 1 (YES in S4307), the prediction block C is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4308).
Subsequently, when availableFlagD is 1 (YES in S4309), the prediction block D is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4310).

図44は、スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_te
mporal_high_priority_flagが1で、mv_list_ada
ptive_idx_flagが0の場合(S4201のNO、S4203のNO)のマ
ージ候補リストmergeCandListへのマージ候補となる予測ブロックの登録処
理手順を示すフローチャートである。
FIG. 44 shows a flag mv_te encoded for each slice, sequence, or picture.
mporal_high_priority_flag is 1 and mv_list_ada
It is a flowchart which shows the registration processing procedure of the prediction block used as the merge candidate to merge candidate list mergeCandList when ptiv_idx_flag is 0 (NO of S4201 and NO of S4203).

まず、availableFlagAが1の場合(S4401のYES)、マージ候補
リストmergeCandListの先頭に予測ブロックAをマージ候補として登録する
(S4402)。
続いて、availableFlagBが1の場合(S4403のYES)、マージ候
補リストmergeCandListの最後に予測ブロックBをマージ候補として登録す
る(S4404)。
続いて、availableFlagCが1の場合(S4405のYES)、マージ候
補リストmergeCandListの最後に予測ブロックCをマージ候補として登録す
る(S4406)。
続いて、availableFlagDが1の場合(S4407のYES)、マージ候
補リストmergeCandListの最後に予測ブロックDをマージ候補として登録す
る(S4408)。
続いて、availableFlagColが1の場合(S4409のYES)、マー
ジ候補リストmergeCandListの最後に予測ブロックColをマージ候補とし
て登録する(S4410)。
First, when availableFlagA is 1 (YES in S4401), the prediction block A is registered as a merge candidate at the head of the merge candidate list mergeCandList (S4402).
Subsequently, when availableFlagB is 1 (YES in S4403), the prediction block B is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4404).
Subsequently, when availableFlagC is 1 (YES in S4405), the prediction block C is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4406).
Subsequently, when availableFlagD is 1 (YES in S4407), the prediction block D is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4408).
Subsequently, when availableFlagCol is 1 (YES in S4409), the prediction block Col is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4410).

図45は、スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_te
mporal_high_priority_flagが0または1で、mv_list
_adaptive_idx_flagが1の場合(S4201のYES、S4202の
YES)のマージ候補リストmergeCandListへのマージ候補となる予測ブロ
ックの登録処理手順を示すフローチャートである。
FIG. 45 shows a flag mv_te encoded for each slice, sequence, or picture.
mpral_high_priority_flag is 0 or 1, and mv_list
It is a flowchart which shows the registration processing procedure of the prediction block used as a merge candidate to merge candidate list mergeCandList when _adaptive_idx_flag is 1 (YES of S4201 and YES of S4202).

まず、availableFlagAが1の場合(S4501のYES)、マージ候補
リストmergeCandListの先頭に予測ブロックAをマージ候補として登録する
(S4502)。
続いて、availableFlagBが1の場合(S4503のYES)、マージ候
補リストmergeCandListの最後に予測ブロックBをマージ候補として登録す
る(S4504)。
続いて、availableFlagColが1でかつMvXCrossが1の場合(
S4505のYES、S4506のYES)、マージ候補リストmergeCandLi
stの最後に予測ブロックColをマージ候補として登録する(S4507)。
続いて、availableFlagCが1の場合(S4508のYES)、マージ候
補リストmergeCandListの最後に予測ブロックCをマージ候補として登録す
る(S4509)。
続いて、availableFlagDが1の場合(S4510のYES)、マージ候
補リストmergeCandListの最後に予測ブロックDをマージ候補として登録す
る(S4511)。
続いて、availableFlagColが1でかつMvXCrossが0の場合(
S4511のYES、S4513のYES)、マージ候補リストmergeCandLi
stの最後に予測ブロックColをマージ候補として登録する(S4514)。
First, when availableFlagA is 1 (YES in S4501), the prediction block A is registered as a merge candidate at the head of the merge candidate list mergeCandList (S4502).
Subsequently, when availableFlagB is 1 (YES in S4503), the prediction block B is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4504).
Subsequently, when availableFlagCol is 1 and MvXCross is 1 (
YES in S4505, YES in S4506), merge candidate list mergeCandLi
The prediction block Col is registered as a merge candidate at the end of st (S4507).
Subsequently, when availableFlagC is 1 (YES in S4508), the prediction block C is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4509).
Subsequently, when availableFlagD is 1 (YES in S4510), the prediction block D is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4511).
Subsequently, when availableFlagCol is 1 and MvXCross is 0 (
YES in S4511, YES in S4513), merge candidate list mergeCandLi
The prediction block Col is registered as a merge candidate at the end of st (S4514).

図42のマージ候補リストmergeCandListへの予測動きベクトルの候補登
録処理手順においては、mv_temporal_high_priority_fla
gが1のとき、右上または左下に隣接する予測ブロックC,Dよりも時間的な予測ブロッ
クColを優先的にマージ候補リストの前方に登録し、mv_temporal_hig
h_priority_flagが0のとき、時間的な予測ブロックColよりも右上ま
たは左下に隣接する予測ブロックC,Dが優先的にマージ候補リストの前方に登録するこ
とで、マージインデックスの符号量を削減する。
In the candidate motion vector candidate registration processing procedure to the merge candidate list mergeCandList in FIG. 42, mv_temporal_high_priority_fla
When g is 1, the temporal prediction block Col is preferentially registered ahead of the merge candidate list over the prediction blocks C and D adjacent to the upper right or lower left, and mv_temporal_high
When h_priority_flag is 0, the prediction blocks C and D adjacent to the upper right or lower left of the temporal prediction block Col are preferentially registered ahead of the merge candidate list, thereby reducing the code amount of the merge index.

図45のマージ候補リストmergeCandListへの予測ブロックの候補登録処
理手順においては、フラグMvCrossが1、即ち符号化/復号対象の予測ブロックを
含むピクチャを横切って参照画像を指し示しているcolPuの動きベクトルmvCol
から算出された動きベクトルを用いるマージ候補が、フラグMvCrossが0、即ち符
号化/復号対象の予測ブロックを含むピクチャを横切らずに参照画像を指し示しているc
olPuの動きベクトルmvColから算出された動きベクトルを用いるマージ候補より
もマージ候補として相応しいと判断し、MvCrossが1のとき、時間的な予測ブロッ
クColの優先順位を上げてマージ候補リストの前方に登録し、MvCrossが0のと
き、時間的な予測ブロックColの優先順位を下げてマージ候補リストの後方に登録する
ことで、符号量を削減する。即ち異なる時間の画像の予測ブロックColの符号化情報の
値に応じて優先順位を変更してマージ候補リストに登録する順序を変更ことで、符号量を
削減する。
In the prediction block candidate registration procedure to the merge candidate list mergeCandList in FIG. 45, the flag MvCross is 1, that is, the motion vector mvCol of colPu pointing to the reference image across the picture including the prediction block to be encoded / decoded.
The merge candidate using the motion vector calculated from the above indicates that the flag MvCross is 0, that is, indicates the reference image without crossing the picture including the prediction block to be encoded / decoded.
It is determined that it is more suitable as a merge candidate than a merge candidate using a motion vector calculated from the motion vector mvCol of olPu. When MvCross is 0, the code amount is reduced by lowering the priority of the temporal prediction block Col and registering it behind the merge candidate list. That is, the code amount is reduced by changing the priority order according to the value of the encoding information of the prediction block Col of the image at different time and changing the order of registration in the merge candidate list.

なお、マージモードにおいて、左に隣接する予測ブロックA及び上に隣接する予測ブロ
ックBは符号化/復号対象の予測ブロックと一体となる動きになることが多いので、イン
ター予測情報が取得できる場合には、他の予測ブロックC,D,Colよりも優先的にマ
ージ候補リストの前方に登録する。
In the merge mode, the prediction block A adjacent to the left and the prediction block B adjacent to the upper side often move together with the prediction block to be encoded / decoded, so that inter prediction information can be acquired. Is registered ahead of the merge candidate list in preference to the other prediction blocks C, D, and Col.

なお、図45の代わりに、図46の処理手順でマージ候補を登録することもできる。   Instead of FIG. 45, merge candidates can be registered by the processing procedure of FIG.

図46は、スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_te
mporal_high_priority_flagが0または1で、mv_list
_adaptive_idx_flagが1の場合(S4202のYES、S4203の
YES)のマージ候補リストmergeCandListへのマージ候補となる予測ブロ
ックの登録処理手順を示すフローチャートである。
FIG. 46 shows a flag mv_te encoded for each slice, sequence, or picture.
mpral_high_priority_flag is 0 or 1, and mv_list
It is a flowchart which shows the registration process procedure of the prediction block used as a merge candidate to merge candidate list mergeCandList when _adaptive_idx_flag is 1 (YES of S4202, YES of S4203).

まず、availableFlagAが1で、predFlagL0AとpredFl
agL1Aが共に1の場合、(S4601のYES、S4602のYES)、マージ候補
リストmergeCandListの先頭に双予測の予測ブロックAをマージ候補として
登録する(S4603)。
続いて、availableFlagBが1で、predFlagL0BとpredF
lagL1Bが共に1の場合、(S4604のYES、S4605のYES)、マージ候
補リストmergeCandListの最後に双予測の予測ブロックBをマージ候補とし
て登録する(S4606)。
続いて、availableFlagAが1で、predFlagL0AとpredF
lagL1Aのどちらかが0の場合、(S4607のYES、S4608のYES)、マ
ージ候補リストmergeCandListの最後に双予測でない予測ブロックAをマー
ジ候補として登録する(S4609)。
続いて、availableFlagBが1で、predFlagL0BとpredF
lagL1Bのどちらかが0の場合、(S4610のYES、S4611のYES)、マ
ージ候補リストmergeCandListの最後に双予測でない予測ブロックBをマー
ジ候補として登録する(S4612)。
続いて、availableFlagCが1で、predFlagL0CとpredF
lagL1Cが共に1の場合、(S4613のYES、S4614のYES)、マージ候
補リストmergeCandListの最後に双予測の予測ブロックCをマージ候補とし
て登録する(S4615)。
続いて、availableFlagDが1で、predFlagL0DとpredF
lagL1Dが共に1の場合、(S4616のYES、S4617のYES)、マージ候
補リストmergeCandListの最後に双予測の予測ブロックDをマージ候補とし
て登録する(S4618)。
続いて、availableFlagColが1の場合(S4619のYES)、マー
ジ候補リストmergeCandListの最後に予測ブロックColをマージ候補とし
て登録する(S4620)。
続いて、availableFlagCが1で、predFlagL0CとpredF
lagL1Cのどちらかが0の場合、(S4621のYES、S4622のYES)、マ
ージ候補リストmergeCandListの最後に双予測でない予測ブロックCをマー
ジ候補として登録する(S4623)。
続いて、availableFlagDが1で、predFlagL0DとpredF
lagL1Dのどちらかが0の場合、(S4624のYES、S4625のYES)、マ
ージ候補リストmergeCandListの最後に双予測でない予測ブロックCをマー
ジ候補として登録する(S4626)。
First, availableFlagA is 1, predFlagL0A and predFl.
When both agL1A are 1 (YES in S4601 and YES in S4602), the bi-predictive prediction block A is registered as a merge candidate at the head of the merge candidate list mergeCandList (S4603).
Subsequently, availableFlagB is 1, predFlagL0B and predF
If both lagL1B are 1 (YES in S4604, YES in S4605), the bi-predictive prediction block B is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4606).
Then, availableFlagA is 1, predFlagL0A and predF
If either one of lagL1A is 0 (YES in S4607, YES in S4608), a prediction block A that is not bi-predicted is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4609).
Subsequently, availableFlagB is 1, predFlagL0B and predF
If either one of lagL1B is 0 (YES in S4610, YES in S4611), a prediction block B that is not bi-predicted is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4612).
Then, availableFlagC is 1, predFlagL0C and predF
If both lagL1C are 1 (YES in S4613, YES in S4614), the bi-predictive prediction block C is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4615).
Subsequently, availableFlagD is 1, predFlagL0D and predF
If both lagL1D are 1 (YES in S4616, YES in S4617), the bi-predictive prediction block D is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4618).
Subsequently, when availableFlagCol is 1 (YES in S4619), the prediction block Col is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4620).
Then, availableFlagC is 1, predFlagL0C and predF
If either one of lagL1C is 0 (YES in S4621 and YES in S4622), a prediction block C that is not bi-predicted is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4623).
Subsequently, availableFlagD is 1, predFlagL0D and predF
If either one of lagL1D is 0 (YES in S4624, YES in S4625), a prediction block C that is not bi-predicted is registered as a merge candidate at the end of the merge candidate list mergeCandList (S4626).

図46のマージ候補リストmergeCandListへの予測ブロックの候補登録処
理手順においては、周囲に隣接する予測ブロックN(NはA,B,C,D)の予測フラグ
predFlagL0NとpredFlagL1Nが共に1、即ち双予測を用いて動き補
償が行われているマージ候補が、周囲に隣接する予測ブロックN(NはA,B,C,D)
の予測フラグpredFlagL0NとpredFlagL1Nのどちらかが0、即ち双
予測でないL0予測、L1予測等の片方向予測を用いて動き補償が行われているマージ候
補よりもマージ候補として相応しいと判断し、双予測が行われるマージ候補の優先順位を
上げてマージ候補リストの前方に登録し、双予測が行われないマージ候補の優先順位を下
げてマージ候補リストの後方に登録することで、符号量を削減する。即ち周囲に隣接する
予測ブロックNの符号化情報の値に応じて優先順位を変更してマージ候補リストに登録す
る順序を変更ことで、符号量を削減する。
46, the prediction flags predFlagL0N and predFlagL1N of the prediction blocks N (N are A, B, C, and D) adjacent to each other, that is, bi-prediction, are included in the merge candidate list mergeCandList. Merge candidates for which motion compensation has been performed using the prediction blocks N (N is A, B, C, D) adjacent to each other.
The prediction flag predFlagL0N or predFlagL1N is 0, that is, it is determined to be more suitable as a merge candidate than a merge candidate for which motion compensation is performed using one-way prediction such as L0 prediction or L1 prediction that is not bi-prediction. The code amount is reduced by increasing the priority of merge candidates that are performed and registering them ahead of the merge candidate list, and decreasing the priority of merge candidates that are not subjected to bi-prediction and registering them behind the merge candidate list. . That is, the code amount is reduced by changing the order of registration in the merge candidate list by changing the priority order according to the encoding information value of the prediction block N adjacent to the surrounding.

なお、図45、図46の代わりに、図47の処理手順で符号化/復号対象画像とマージ
候補の参照画像との距離に応じて優先順位をつけてマージ候補を登録することもできる。
Instead of FIGS. 45 and 46, the merge candidates can be registered with priorities according to the distance between the encoding / decoding target image and the merge candidate reference image according to the processing procedure of FIG.

図47は、スライス、シーケンスまたはピクチャー毎に符号化されるフラグmv_te
mporal_high_priority_flagが0または1で、mv_list
_adaptive_idx_flagが1の場合(S4202のYES、S4203の
YES)のマージ候補リストmergeCandListへのマージ候補となる予測ブロ
ックの登録処理手順を示すフローチャートである。
FIG. 47 shows a flag mv_te encoded for each slice, sequence, or picture.
mpral_high_priority_flag is 0 or 1, and mv_list
It is a flowchart which shows the registration process procedure of the prediction block used as a merge candidate to merge candidate list mergeCandList when _adaptive_idx_flag is 1 (YES of S4202, YES of S4203).

まず、符号化/復号対象画像のPOCと予測ブロックAのインター予測で用いられる参
照ピクチャのPOCとの差分の絶対値を算出し、インター予測画像間距離distAとす
る(S4701)。同様に、符号化/復号対象画像のPOCと予測ブロックB、C、D、
Colのインター予測で用いられる参照ピクチャのPOCとの差分の絶対値をそれぞれ算
出し、インター予測画像間距離distB,distC,distD,distColと
する(S4701〜S4705)。予測ブロックN(N=A,B,C,DまたはCol)
が両予測の場合は、L0用のインター予測画像間距離とL1用のインター予測画像間距離
を算出し、小さい方を選択して、インター予測画像間距離distN(N=A,B,C,
DまたはCol)とする。予測ブロックN(N=A,B,C,DまたはCol)がL0予
測、またはL1予測の場合は、用いたL0用のインター予測画像間距離またはL1用のイ
ンター予測画像間距離を算出し、小さい方を選択して、インター予測画像間距離dist
N(N=A,B,C,DまたはCol)とする。
First, the absolute value of the difference between the POC of the encoding / decoding target picture and the POC of the reference picture used in the inter prediction of the prediction block A is calculated and set as the inter-predicted picture distance distA (S4701). Similarly, the POC of the encoding / decoding target image and the prediction blocks B, C, D,
The absolute values of the difference from the POC of the reference picture used in the inter prediction of Col are calculated, and are set as inter predicted image distances distB, distC, distD, distCol (S4701 to S4705). Predicted block N (N = A, B, C, D or Col)
Is a bi-prediction, the inter-prediction image distance for L0 and the inter-prediction image distance for L1 are calculated, the smaller one is selected, and the inter-prediction image distance distN (N = A, B, C,
D or Col). When the prediction block N (N = A, B, C, D or Col) is L0 prediction or L1 prediction, the inter-prediction image distance for L0 or the inter-prediction image distance for L1 used is calculated, Select the smaller one, and the inter-predicted image distance dist
N (N = A, B, C, D or Col).

なお、予測ブロックN(N=A,B,C,DまたはCol)が利用できない場合、及び
、イントラ予測の場合は、インター予測画像間距離distN(N=A,B,C,Dまた
はCol)をdistNがとりうる最大値に設定する。
In addition, when the prediction block N (N = A, B, C, D, or Col) cannot be used and in the case of intra prediction, the inter-prediction image distance distN (N = A, B, C, D, or Col) Is set to the maximum value that can be taken by distN.

続いて、算出した予測ブロックA,B,C,D,Colのインター予測画像間距離di
stA,distB,distC,distD,distColの値に応じて、マージ候
補リストmergeCandListにマージ候補A,B,C,D,Colを追加する(
S4706〜S4720)。
Subsequently, the inter-prediction image distance di of the calculated prediction blocks A, B, C, D, and Col.
Merge candidates A, B, C, D, and Col are added to the merge candidate list mergeCandList according to the values of stA, distB, distC, distD, and distCol (
S4706 to S4720).

まず、算出した予測ブロックA,Bのインター予測画像間距離distA,distB
の値の小さな予測ブロックから順次マージ候補リストmergeCandListにマー
ジ候補A,Bを追加する(S4706〜S4708)。
First, the inter prediction image distances distA and distB of the calculated prediction blocks A and B
Merge candidates A and B are sequentially added to the merge candidate list mergeCandList from a prediction block with a small value (S4706 to S4708).

予測ブロックAのインター予測画像間距離distAの値と予測ブロックBのインター
予測画像間距離distBの値を比較し(S4706)、distAがdistB以下の
場合、マージ候補リストmergeCandListに予測ブロックA,Bの順序で追加
する(S4707)。つまり、予測ブロックAを追加してからその後方に予測ブロックB
を追加する。distBの値がdistAの値より小さい場合、マージ候補リストmer
geCandListに予測ブロックB,Aの順序で追加する(S4708)。
The inter-prediction image distance distA value of the prediction block A is compared with the inter-prediction image distance distance distB of the prediction block B (S4706). They are added in order (S4707). That is, after adding the prediction block A, the prediction block B is added behind it.
Add When the value of distB is smaller than the value of distA, the merge candidate list mer
The prediction blocks B and A are added to the geCandList in the order (S4708).

続いて、算出した予測ブロックC,D,Colのインター予測画像間距離distC,
distD,Colの値の小さな予測ブロックから順次マージ候補リストmergeCa
ndListにマージ候補C,D,Colを追加する(S4709〜S4720)。
Subsequently, the inter-predicted image distance distC of the calculated prediction blocks C, D, and Col
The merge candidate list mergeCa sequentially from the prediction block with the smaller values of distD and Col
Merge candidates C, D, and Col are added to ndList (S4709 to S4720).

図47のマージ候補リストmergeCandListへの予測ブロックの候補登録処
理手順においては、符号化/復号対象の予測ブロックを含むピクチャとマージ候補の参照
ピクチャとの距離が小さいマージ候補が符号化/復号対象の予測ブロックを含むピクチャ
とマージ候補の参照ピクチャとの距離が大きいマージ候補よりもマージ候補として相応し
いと判断し、距離が小さいマージ候補の優先順位を距離が大きいマージ候補の優先順位よ
りも上げてマージ候補リストの前方に登録することで、符号量を削減する。即ち周囲に隣
接する予測ブロックNの符号化情報の値に応じて優先順位を変更してマージ候補リストに
登録する順序を変更ことで、符号量を削減する。
In the candidate registration process procedure of the prediction block to the merge candidate list mergeCandList in FIG. 47, the merge candidate having a small distance between the picture including the prediction block to be encoded / decoded and the reference picture of the merge candidate is encoded / decoded. The merge candidate is judged to be more suitable as a merge candidate than the merge candidate having a large distance between the picture including the prediction block and the reference picture of the merge candidate, and the priority of the merge candidate having a small distance is set higher than that of the merge candidate having the large distance By registering in front of the candidate list, the code amount is reduced. That is, the code amount is reduced by changing the order of registration in the merge candidate list by changing the priority order according to the encoding information value of the prediction block N adjacent to the surrounding.

なお、マージモードにおいて、マージ候補となる予測ブロックの符号化情報を確認し、
多いものから順番に優先順位を付けることもできる。
なお、マージモードにおいて、マージ候補となる予測ブロックの大きさを確認し、大き
いものから順番に優先順位を付けることもできる。
In the merge mode, confirm the encoding information of the prediction block that is a merge candidate,
You can also prioritize the order from the most.
In the merge mode, the size of a prediction block that is a merge candidate can be confirmed, and priorities can be assigned in order from the largest.

図38に戻り、動画像符号化装置のインター予測情報推定部104の符号化情報選択部
133では、マージ候補リストに登録されているマージ候補の中から、最適な候補を選択
し、マージ・インデックスおよびマージ・インデックスに対応する符号化情報を出力する
Returning to FIG. 38, the encoding information selection unit 133 of the inter prediction information estimation unit 104 of the moving image encoding apparatus selects an optimal candidate from the merge candidates registered in the merge candidate list, and merge index is selected. And encoding information corresponding to the merge index is output.

最適な候補の選択においては、予測方法決定部106と同様の方法を用いることができ
る。それぞれのマージ候補ごとに符号量と符号化歪を算出し、最も少ない発生符号量と符
号化歪となる符号化情報が決定される。それぞれのマージ候補毎にマージ・インデックス
merge_idxの符号化が行われ、符号化情報の符号量を算出する。さらに、それぞ
れのマージ候補毎に動き補償予測部105と同様の方法で各マージ候補の符号化情報に応
じて動き補償した動き補償予測信号と、画像メモリ101から供給される符号化対象の画
像信号との予測残差信号を符号化した予測残差信号の符号量を算出する。符号化情報(マ
ージ・インデックス)の符号量と予測残差信号の符号量とが加算された総発生符号量を算
出し、第1の評価値とする。
In selecting the optimum candidate, a method similar to that of the prediction method determination unit 106 can be used. A code amount and coding distortion are calculated for each merge candidate, and coding information that produces the least generated code amount and coding distortion is determined. The merge index merge_idx is encoded for each merge candidate, and the code amount of the encoded information is calculated. Furthermore, for each merge candidate, a motion compensated prediction signal that has been motion compensated according to the coding information of each merge candidate in the same manner as the motion compensation prediction unit 105, and an encoding target image signal supplied from the image memory 101 The code amount of the prediction residual signal obtained by encoding the prediction residual signal is calculated. A total generated code amount obtained by adding the code amount of the encoded information (merge index) and the code amount of the prediction residual signal is calculated and used as the first evaluation value.

また、こうした差分画像を符号化後に、歪量評価の為に復号し、符号化により生じる元
画像との誤差を表す比率として符号化歪が算出される。これら総発生符号量と符号化歪と
をマージ候補毎に比較することで、最も少ない発生符号量と符号化歪となる符号化情報が
決定される。決定された符号化情報に対応するマージ・インデックスが、予測ブロック単
位の第2のシンタックスパターンで表されるフラグmerge_idxとして符号化され
る。尚、ここで算出される発生符号量は、符号化過程をシミュレートしたものであること
が望ましいが、簡便に近似したり、概算することも可能である。
Also, after encoding such a difference image, the difference image is decoded for distortion amount 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 encoding distortion for each merge candidate, the encoding information that produces the least generated code amount and the encoding distortion is determined. The merge index corresponding to the determined encoding information is encoded as the flag merge_idx represented by the second syntax pattern in units of prediction blocks. The generated code amount calculated here is preferably a simulation of the encoding process, but can be approximated or approximated easily.

一方、図39において、動画像符号化装置のインター予測情報推定部205の符号化情
報選択部233では、マージ候補リストに登録されているマージ候補の中から、供給され
たマージインデックスに対応する符号化情報を選択し、動き補償予測部206に供給する
とともに、符号化情報格納メモリ209に格納する。
On the other hand, in FIG. 39, the encoding information selection unit 233 of the inter prediction information estimation unit 205 of the moving image encoding device selects a code corresponding to the supplied merge index from the merge candidates registered in the merge candidate list. Encoding information is selected and supplied to the motion compensation prediction unit 206 and stored in the encoding information storage memory 209.

以上述べたように、実施の形態の動きベクトルの予測方法によれば、ピクチャを矩形ブ
ロックに分割し、ピクチャ間でブロック単位に動き推定、補償を行う動画像符号化におけ
る動きベクトルの符号化効率を向上させる為に、既符号化済みの予測ブロックの動きベク
トルから予測を行い、処理対象のブロックの動きベクトルとその予測値との差分ベクトル
を符号化することによって符号量を削減することができる。その際、得られる複数の予測
動きベクトルは予測動きベクトルリストに優先順位が付けられて、登録されるが、本実施
例で説明したように、優先順位に応じて、登録順序を変更してもよいし、既定の順序で登
録した後、リスト内を優先順位に応じて、並び替えてもよく、本発明に含まれる。例えば
、予測動きベクトルリストのインデックス0に左側に隣接する第1の予測ブロックグルー
プAから算出した予測動きベクトル、インデックス1に上側に隣接する第2の予測ブロッ
クグループBから算出した予測動きベクトル、インデックス2に異なる時間の第3の予測
ブロックグループCから算出した予測動きベクトルを一旦登録し、その後、必要に応じて
、優先順位に従って並べ替える。
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 this, it is possible to reduce the amount of code by performing prediction from the motion vector of an already-encoded prediction block and encoding the difference vector between the motion vector of the block to be processed and its predicted value . At that time, the plurality of obtained motion vector predictors are registered with a priority order in the motion vector predictor list. However, as described in the present embodiment, the registration order may be changed according to the priority order. Alternatively, after registration in a predetermined order, the list may be rearranged according to the priority order, and is included in the present invention. For example, a predicted motion vector calculated from the first predicted block group A adjacent to the left side of the index 0 of the predicted motion vector list, a predicted motion vector calculated from the second predicted block group B adjacent to the upper side of the index 1, and an index The motion vector predictors calculated from the third prediction block group C at different times are temporarily registered in 2 and then rearranged according to the priority order as necessary.

さらに、実施の形態の動きベクトルの予測方法によれば、ピクチャを矩形ブロックに分
割し、ピクチャ間でブロック単位に動き推定、補償を行う動画像符号化における符号化情
報の符号化効率を向上させる為に、既符号化済みのブロックの符号化情報を利用すること
によって符号量を削減することができる。その際、得られる複数のマージ候補となる予測
ブロックはマージ候補リストに優先順位が付けられて、登録されるが、本実施例で説明し
たように、優先順位に応じて、登録順序を変更してもよいし、既定の順序で登録した後、
リスト内を優先順位に応じて、並び替えてもよく、発明に含まれる。例えば、マージ候補
リストのインデックスが0の位置にマージ候補A、インデックスが1の位置にマージ候補
B、インデックスが2の位置にマージ候補Col、インデックスが3の位置にマージ候補
C、インデックスが4の位置にマージ候補Dを一旦登録し、その後、必要に応じて、優先
順位に従って並べ替える。また、マージ候補リストに登録されるマージ候補の情報は、具
体的には、当該マージ候補のすべての符号化情報自体でもよいし、マージ候補の符号化情
報が参照できるメモリのポインタやアドレス情報であってもよい。
Furthermore, according to the motion vector prediction method of the embodiment, the picture is divided into rectangular blocks, and the coding efficiency of coding information in moving picture coding in which motion estimation and compensation are performed in units of blocks between pictures is improved. Therefore, the code amount can be reduced by using the encoding information of the already encoded block. At that time, the prediction blocks to be obtained as a plurality of merge candidates are registered with priorities added to the merge candidate list, but as described in the present embodiment, the registration order is changed according to the priorities. Or after registering in the default order,
The list may be rearranged according to the priority order, and is included in the invention. For example, the merge candidate list is index 0 with merge candidate A, index 1 with merge candidate B, index 2 with merge candidate Col, index 3 with merge candidate C, index 4 The merge candidates D are once registered at the positions, and then rearranged according to the priority order as necessary. Further, the merge candidate information registered in the merge candidate list may specifically be all the encoding information itself of the merge candidate, or may be a memory pointer or address information to which the merge candidate encoding information can be referred. There may be.

本発明の動画像符号化装置のさらに別の態様として、以下のものがある。   Still another aspect of the moving picture encoding apparatus of the present invention is as follows.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像を符号化す
る動画像符号化装置であって、
符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済み
のブロック、および符号化対象ブロックとは異なるピクチャ内の前記符号化対象ブロック
と同一または周辺の位置にある符号化済みのブロックのいずれかから予測して、複数の予
測動きベクトルの候補を生成する予測動きベクトル候補生成部を備え、
前記予測動きベクトル候補生成部は、各予測動きベクトルの候補を予測動きベクトル候
補リストに登録する際に、ピクチャまたはスライス単位で、優先順位を変更して予測動き
ベクトル候補リストに登録することを特徴とする動画像符号化装置。
A moving image encoding device that encodes the moving image using motion compensation in blocks obtained by dividing each picture of the moving image,
A coded block adjacent to the coding target block in the same picture as the coding target block, and a coded block at the same or a peripheral position as the coding target block in a picture different from the coding target block A prediction motion vector candidate generation unit that generates a plurality of prediction motion vector candidates by predicting from any of the blocks,
The motion vector predictor candidate generating unit, when registering each motion vector predictor candidate in the motion vector predictor candidate list, changes the priority in units of pictures or slices and registers it in the motion vector predictor candidate list. A video encoding device.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像を符号化す
る動画像符号化装置であって、
符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済み
のブロック、および符号化対象ブロックとは異なるピクチャ内の前記符号化対象ブロック
と同一または周辺の位置にある符号化済みのブロックのいずれかから予測して、複数の予
測動きベクトルの候補を生成する予測動きベクトル候補生成部を備え、
前記予測動きベクトル候補生成部は、各予測動きベクトルの候補を予測動きベクトル候
補リストに登録する際に、ブロック単位で、優先順位を変更して予測動きベクトル候補リ
ストに登録することを特徴とする動画像符号化装置。
A moving image encoding device that encodes the moving image using motion compensation in blocks obtained by dividing each picture of the moving image,
A coded block adjacent to the coding target block in the same picture as the coding target block, and a coded block at the same or a peripheral position as the coding target block in a picture different from the coding target block A prediction motion vector candidate generation unit that generates a plurality of prediction motion vector candidates by predicting from any of the blocks,
The predicted motion vector candidate generation unit is characterized in that when registering each predicted motion vector candidate in the predicted motion vector candidate list, the priority order is changed and registered in the predicted motion vector candidate list in units of blocks. Video encoding device.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像を符号化す
る動画像符号化装置であって、
符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済み
のブロック、および符号化対象ブロックとは異なるピクチャ内の前記符号化対象ブロック
と同一または周辺の位置にある符号化済みのブロックのいずれかのインター予測情報を含
む符号化情報から、複数のインター予測情報を含む符号化情報であるマージの候補を生成
するインター予測情報生成部を備え、
前記インター予測情報生成部は、各マージの候補を予測マージ候補リストに登録する際
に、ピクチャまたはスライス単位で、優先順位を変更してマージ候補リストに登録するこ
とを特徴とする動画像符号化装置。
A moving image encoding device that encodes the moving image using motion compensation in blocks obtained by dividing each picture of the moving image,
A coded block adjacent to the coding target block in the same picture as the coding target block, and a coded block at the same or a peripheral position as the coding target block in a picture different from the coding target block An inter prediction information generation unit that generates a merge candidate that is encoding information including a plurality of inter prediction information from encoding information including inter prediction information of any of the blocks of
The inter-prediction information generating unit, when registering each merge candidate in the prediction merge candidate list, changes the priority in units of pictures or slices and registers the merge candidates in the merge candidate list. apparatus.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像を符号化す
る動画像符号化装置であって、
符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済み
のブロック、および符号化対象ブロックとは異なるピクチャ内の前記符号化対象ブロック
と同一または周辺の位置にある符号化済みのブロックのいずれかのインター予測情報を含
む符号化情報から、複数のインター予測情報を含む符号化情報であるマージの候補を生成
するインター予測情報生成部を備え、
前記インター予測情報生成部は、各マージの候補を予測マージ候補リストに登録する際
に、ブロック単位で、優先順位を変更してマージ候補リストに登録することを特徴とする
動画像符号化装置。
A moving image encoding device that encodes the moving image using motion compensation in blocks obtained by dividing each picture of the moving image,
A coded block adjacent to the coding target block in the same picture as the coding target block, and a coded block at the same or a peripheral position as the coding target block in a picture different from the coding target block An inter prediction information generation unit that generates a merge candidate that is encoding information including a plurality of inter prediction information from encoding information including inter prediction information of any of the blocks of
The inter prediction information generation unit, when registering each merge candidate in the prediction merge candidate list, changes the priority in block units and registers the merge candidates in the merge candidate list.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像を符号化す
る動画像符号化装置であって、
符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済み
のブロック、および符号化対象ブロックとは異なるピクチャ内の前記符号化対象ブロック
と同一または周辺の位置にある符号化済みのブロックのいずれかのインター予測情報を含
む符号化情報から、複数のインター予測情報を含む符号化情報であるマージの候補を生成
するインター予測情報生成部を備え、
前記インター予測情報生成部は、各マージの候補をマージ候補リストに登録する際に、
空間方向からのマージの候補が双予測でインター予測されている場合、前記空間方向から
のマージ候補の優先順位を上げてマージ候補リストに登録することを特徴とする動画像符
号化装置。
A moving image encoding device that encodes the moving image using motion compensation in blocks obtained by dividing each picture of the moving image,
A coded block adjacent to the coding target block in the same picture as the coding target block, and a coded block at the same or a peripheral position as the coding target block in a picture different from the coding target block An inter prediction information generation unit that generates a merge candidate that is encoding information including a plurality of inter prediction information from encoding information including inter prediction information of any of the blocks of
When the inter prediction information generation unit registers each merge candidate in the merge candidate list,
An apparatus for encoding a moving picture, wherein when a merge candidate from the spatial direction is inter-predicted by bi-prediction, the priority of the merge candidate from the spatial direction is increased and registered in a merge candidate list.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像を符号化す
る動画像符号化装置であって、
符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済み
のブロック、および符号化対象ブロックとは異なるピクチャ内の前記符号化対象ブロック
と同一または周辺の位置にある符号化済みのブロックのいずれかのインター予測情報を含
む符号化情報から、複数のインター予測情報を含む符号化情報であるマージの候補を生成
するインター予測情報生成部を備え、
前記インター予測情報生成部は、各マージの候補をマージ候補リストに登録する際に、
符号化対象画像と参照画像との間の距離が短いマージの候補を他のマージの候補よりも優
先順位を上げてマージ候補リストに登録することを特徴とする動画像符号化装置。
A moving image encoding device that encodes the moving image using motion compensation in blocks obtained by dividing each picture of the moving image,
A coded block adjacent to the coding target block in the same picture as the coding target block, and a coded block at the same or a peripheral position as the coding target block in a picture different from the coding target block An inter prediction information generation unit that generates a merge candidate that is encoding information including a plurality of inter prediction information from encoding information including inter prediction information of any of the blocks of
When the inter prediction information generation unit registers each merge candidate in the merge candidate list,
A moving picture encoding apparatus, wherein a merge candidate having a short distance between an encoding target image and a reference image is registered in a merge candidate list with a higher priority than other merge candidates.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像を符号化す
る動画像符号化装置であって、
符号化対象ブロックと同一ピクチャ内の前記符号化対象ブロックと隣接する符号化済み
のブロック、および符号化対象ブロックとは異なるピクチャ内の前記符号化対象ブロック
と同一または周辺の位置にある符号化済みのブロックのいずれかから予測して、複数の予
測動きベクトルの候補を生成する予測動きベクトル候補生成部を備え、
前記予測動きベクトル候補生成部は、空間方向に予測ブロックをスキャンする際、左側
の隣接予測ブロックグループ、及び上側の隣接予測ブロックグループの各隣接予測ブロッ
クに対して、
1.符号化対象の予測ブロックで選択された符号化モードと同じ参照リストで、同じ参
照フレームの動きベクトルが存在するか否か、
2.符号化対象の予測ブロックで選択された符号化モードとは異なる参照リストで、同
じ参照フレームの動きベクトルが存在するか否か、
3.符号化対象の予測ブロックで選択された符号化モードと同じ参照リストで、異なる
参照フレームの動きベクトルが存在するか否か、および
4.符号化対象の予測ブロックで選択された符号化モードとは異なる参照リストで、異
なる参照フレームの動きベクトルが存在するか否か、
の優先順序で条件判定を行うことを特徴とする動画像符号化装置。
A moving image encoding device that encodes the moving image using motion compensation in blocks obtained by dividing each picture of the moving image,
A coded block adjacent to the coding target block in the same picture as the coding target block, and a coded block at the same or a peripheral position as the coding target block in a picture different from the coding target block A prediction motion vector candidate generation unit that generates a plurality of prediction motion vector candidates by predicting from any of the blocks,
When the prediction motion vector candidate generation unit scans a prediction block in a spatial direction, for each adjacent prediction block of the left adjacent prediction block group and the upper adjacent prediction block group,
1. Whether a motion vector of the same reference frame exists in the same reference list as the encoding mode selected in the prediction block to be encoded,
2. Whether a motion vector of the same reference frame exists in a reference list different from the encoding mode selected in the prediction block to be encoded,
3. 3. whether or not there is a motion vector of a different reference frame in the same reference list as the encoding mode selected in the prediction block to be encoded; Whether a motion vector of a different reference frame exists in a reference list different from the encoding mode selected in the prediction block to be encoded,
A moving picture coding apparatus characterized in that condition determination is performed in the priority order.

上記の空間方向の予測ブロックのスキャンにおいて、第1の条件判定が最初の予測ブロ
ックについて終了すると隣の予測ブロックに順次進めて同じ条件判定を行い、以降、第2
、第3、第4の条件判定のそれぞれについて予測ブロックを順次進めながら同じ条件判定
を行うことを特徴とする動画像符号化装置。
In the scan of the prediction block in the spatial direction, when the first condition determination is completed for the first prediction block, the same condition determination is performed by sequentially proceeding to the next prediction block.
A moving picture coding apparatus that performs the same condition determination while sequentially proceeding with the prediction block for each of the third and fourth condition determinations.

上記の空間方向の予測ブロックのスキャンにおいて、4つの条件判定のうち、第1と第
2の条件判定が最初の予測ブロックについて終了すると隣の予測ブロックに順次進めて同
じ条件判定を行い、次に、第3と第4の条件判定が最初の予測ブロックについて終了する
と隣の予測ブロックに順次進めて同じ条件判定を行うことを特徴とする動画像符号化装置
In the scan of the prediction block in the spatial direction, when the first and second condition determinations of the four condition determinations are finished for the first prediction block, the same condition determination is performed by sequentially proceeding to the next prediction block. When the third and fourth condition determinations are finished for the first prediction block, the moving picture coding apparatus is configured to sequentially advance to the next prediction block and perform the same condition determination.

上記の空間方向の予測ブロックのスキャンにおいて、4つの条件判定のうち、第1の条
件判定が最初の予測ブロックについて終了すると隣の予測ブロックに順次進めて同じ条件
判定を行い、次に、第2と第3と第4の条件判定が最初の予測ブロックについて終了する
と隣の予測ブロックに順次進めて同じ条件判定を行うことを特徴とする動画像符号化装置
In the scan of the prediction block in the spatial direction, among the four condition determinations, when the first condition determination is completed for the first prediction block, the same condition determination is performed by sequentially proceeding to the next prediction block, and then the second When the third and fourth condition determinations are finished for the first prediction block, the same condition determination is performed by sequentially proceeding to the next prediction block.

上記の空間方向の予測ブロックのスキャンにおいて、最初の予測ブロックについて4つ
の条件判定のいずれにも合致しない場合、当該予測ブロックには条件に合致する動きベク
トルは存在しないものと判断し、隣の予測ブロックに順次進めて4つの条件判定のいずれ
かに合致するかどうかの判定を行うことを特徴とする動画像符号化装置。
In the scan of the prediction block in the spatial direction, if none of the four condition determinations is satisfied for the first prediction block, it is determined that there is no motion vector that satisfies the condition in the prediction block, and the adjacent prediction A moving picture encoding apparatus characterized by proceeding sequentially to a block and determining whether or not any of four condition determinations is met.

本発明の動画像復号装置のさらに別の態様として、以下のものがある。   Still another aspect of the moving picture decoding apparatus of the present invention is as follows.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像が符号化さ
れた符号化ビット列を復号する動画像復号装置であって、
復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロ
ック、および復号対象ブロックとは異なるピクチャ内の前記復号対象ブロックと同一また
は周辺の位置にある復号済みのブロックのいずれかから予測して、複数の予測動きベクト
ルの候補を生成する予測動きベクトル候補生成部を備え、
前記予測動きベクトル候補生成部は、各予測動きベクトルの候補を予測動きベクトル候
補リストに登録する際に、ピクチャまたはスライス単位で、優先順位を変更して予測動き
ベクトル候補リストに登録することを特徴とする動画像復号装置。
A moving picture decoding apparatus for decoding a coded bit string obtained by coding the moving picture using motion compensation in units of blocks obtained by dividing each picture of the moving picture,
From a decoded block adjacent to the decoding target block in the same picture as the decoding target block, and a decoded block at the same or a peripheral position as the decoding target block in a picture different from the decoding target block A prediction motion vector candidate generation unit that predicts and generates a plurality of prediction motion vector candidates;
The motion vector predictor candidate generating unit, when registering each motion vector predictor candidate in the motion vector predictor candidate list, changes the priority in units of pictures or slices and registers it in the motion vector predictor candidate list. A video decoding device.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像が符号化さ
れた符号化ビット列を復号する動画像復号装置であって、
復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロ
ック、および復号対象ブロックとは異なるピクチャ内の前記復号対象ブロックと同一また
は周辺の位置にある復号済みのブロックのいずれかから予測して、複数の予測動きベクト
ルの候補を生成する予測動きベクトル候補生成部を備え、
前記予測動きベクトル候補生成部は、各予測動きベクトルの候補を予測動きベクトル候
補リストに登録する際に、ブロック単位で、優先順位を変更して予測動きベクトル候補リ
ストに登録することを特徴とする動画像復号装置。
A moving picture decoding apparatus for decoding a coded bit string obtained by coding the moving picture using motion compensation in units of blocks obtained by dividing each picture of the moving picture,
From a decoded block adjacent to the decoding target block in the same picture as the decoding target block, and a decoded block at the same or a peripheral position as the decoding target block in a picture different from the decoding target block A prediction motion vector candidate generation unit that predicts and generates a plurality of prediction motion vector candidates;
The predicted motion vector candidate generation unit is characterized in that when registering each predicted motion vector candidate in the predicted motion vector candidate list, the priority order is changed and registered in the predicted motion vector candidate list in units of blocks. Video decoding device.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像が符号化さ
れた符号化ビット列を復号する動画像復号装置であって、
復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロ
ック、および復号対象ブロックとは異なるピクチャ内の前記復号対象ブロックと同一また
は周辺の位置にある復号済みのブロックのいずれかのインター予測情報を含む符号化情報
から、複数のインター予測情報を含む符号化情報であるマージの候補を生成するインター
予測情報生成部を備え、
前記インター予測情報生成部は、各マージの候補を予測マージ候補リストに登録する際
に、ピクチャまたはスライス単位で、優先順位を変更してマージ候補リストに登録するこ
とを特徴とする動画像復号装置。
A moving picture decoding apparatus for decoding a coded bit string obtained by coding the moving picture using motion compensation in units of blocks obtained by dividing each picture of the moving picture,
Any of a decoded block adjacent to the decoding target block in the same picture as the decoding target block, and a decoded block at the same or a peripheral position as the decoding target block in a picture different from the decoding target block An inter prediction information generation unit that generates a merge candidate that is encoded information including a plurality of inter prediction information from encoded information including inter prediction information,
The inter-prediction information generating unit, when registering each merge candidate in the prediction merge candidate list, changes the priority in units of pictures or slices and registers the merge candidate list in the merge candidate list .

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像が符号化さ
れた符号化ビット列を復号する動画像復号装置であって、
復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロ
ック、および復号対象ブロックとは異なるピクチャ内の前記復号対象ブロックと同一また
は周辺の位置にある近隣の復号済みのブロックのいずれかのインター予測情報を含む符号
化情報から、複数のインター予測情報を含む符号化情報であるマージの候補を生成するイ
ンター予測情報生成部を備え、
前記インター予測情報生成部は、各マージの候補を予測マージ候補リストに登録する際
に、ブロック単位で、優先順位を変更してマージ候補リストに登録することを特徴とする
動画像復号装置。
A moving picture decoding apparatus for decoding a coded bit string obtained by coding the moving picture using motion compensation in units of blocks obtained by dividing each picture of the moving picture,
Any of a decoded block adjacent to the decoding target block in the same picture as the decoding target block, and a neighboring decoded block in the same or a peripheral position as the decoding target block in a picture different from the decoding target block An inter prediction information generating unit that generates a merge candidate that is encoded information including a plurality of inter prediction information from the encoded information including the inter prediction information;
The inter-prediction information generating unit, when registering each merge candidate in the prediction merge candidate list, changes the priority in block units and registers the merge candidates in the merge candidate list.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像が符号化さ
れた符号化ビット列を復号する動画像復号装置であって、
復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロ
ック、および復号対象ブロックとは異なるピクチャ内の前記復号対象ブロックと同一また
は周辺の位置にある復号済みのブロックのいずれかのインター予測情報を含む符号化情報
から、複数のインター予測情報を含む符号化情報であるマージの候補を生成するインター
予測情報生成部を備え、
前記インター予測情報生成部は、各マージの候補をマージ候補リストに登録する際に、
空間方向からのマージの候補が双予測でインター予測されている場合、前記空間方向から
のマージ候補の優先順位を上げてマージ候補リストに登録することを特徴とする動画像復
号装置。
A moving picture decoding apparatus for decoding a coded bit string obtained by coding the moving picture using motion compensation in units of blocks obtained by dividing each picture of the moving picture,
Any of a decoded block adjacent to the decoding target block in the same picture as the decoding target block, and a decoded block at the same or a peripheral position as the decoding target block in a picture different from the decoding target block An inter prediction information generation unit that generates a merge candidate that is encoded information including a plurality of inter prediction information from encoded information including inter prediction information,
When the inter prediction information generation unit registers each merge candidate in the merge candidate list,
A moving picture decoding apparatus, wherein when a merge candidate from a spatial direction is inter-predicted by bi-prediction, the priority of the merge candidate from the spatial direction is increased and registered in a merge candidate list.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像が符号化さ
れた符号化ビット列を復号する動画像復号装置であって、
復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロ
ック、および復号対象ブロックとは異なるピクチャ内の前記復号対象ブロックと同一また
は周辺の位置にある復号済みのブロックのいずれかのインター予測情報を含む符号化情報
から、複数のインター予測情報を含む符号化情報であるマージの候補を生成するインター
予測情報生成部を備え、
前記インター予測情報生成部は、各マージの候補をマージ候補リストに登録する際に、
符号化対象画像と参照画像との間の距離が短いマージの候補の優先順位を上げてマージ候
補リストに登録することを特徴とする動画像復号装置。
A moving picture decoding apparatus for decoding a coded bit string obtained by coding the moving picture using motion compensation in units of blocks obtained by dividing each picture of the moving picture,
Any of a decoded block adjacent to the decoding target block in the same picture as the decoding target block, and a decoded block at the same or a peripheral position as the decoding target block in a picture different from the decoding target block An inter prediction information generation unit that generates a merge candidate that is encoded information including a plurality of inter prediction information from encoded information including inter prediction information,
When the inter prediction information generation unit registers each merge candidate in the merge candidate list,
A moving picture decoding apparatus characterized by increasing a priority of a merge candidate having a short distance between an encoding target image and a reference image and registering it in a merge candidate list.

動画像の各ピクチャを分割したブロック単位で動き補償を用いて前記動画像が符号化さ
れた符号化ビット列を復号する動画像復号装置であって、
復号対象ブロックと同一ピクチャ内の前記復号対象ブロックと隣接する復号済みのブロ
ック、および復号対象ブロックとは異なるピクチャ内の前記復号対象ブロックと同一また
は周辺の位置にある復号済みのブロックのいずれかから予測して、複数の予測動きベクト
ルの候補を生成する予測動きベクトル候補生成部を備え、
前記予測動きベクトル候補生成部は、空間方向に予測ブロックをスキャンする際、左側
の隣接予測ブロックグループ、及び上側の隣接予測ブロックグループの各隣接予測ブロッ
クに対して、
1.復号対象の予測ブロックで選択された符号化モードと同じ参照リストで、同じ参照
フレームの動きベクトルが存在するか否か、
2.復号対象の予測ブロックで選択された符号化モードとは異なる参照リストで、同じ
参照フレームの動きベクトルが存在するか否か、
3.復号対象の予測ブロックで選択された符号化モードと同じ参照リストで、異なる参
照フレームの動きベクトルが存在するか否か、および
4.復号対象の予測ブロックで選択された符号化モードとは異なる参照リストで、異な
る参照フレームの動きベクトルが存在するか否か、
の優先順序で条件判定を行うことを特徴とする動画像復号装置。
A moving picture decoding apparatus for decoding a coded bit string obtained by coding the moving picture using motion compensation in units of blocks obtained by dividing each picture of the moving picture,
From a decoded block adjacent to the decoding target block in the same picture as the decoding target block, and a decoded block at the same or a peripheral position as the decoding target block in a picture different from the decoding target block A prediction motion vector candidate generation unit that predicts and generates a plurality of prediction motion vector candidates;
When the prediction motion vector candidate generation unit scans a prediction block in a spatial direction, for each adjacent prediction block of the left adjacent prediction block group and the upper adjacent prediction block group,
1. Whether a motion vector of the same reference frame exists in the same reference list as the encoding mode selected in the prediction block to be decoded,
2. Whether there is a motion vector of the same reference frame in a reference list different from the encoding mode selected in the prediction block to be decoded,
3. 3. whether there is a motion vector of a different reference frame in the same reference list as the encoding mode selected in the prediction block to be decoded; and Whether a motion vector of a different reference frame exists in a reference list different from the encoding mode selected in the prediction block to be decoded,
A moving picture decoding apparatus characterized in that condition determination is performed in the order of priority.

上記の空間方向の予測ブロックのスキャンにおいて、第1の条件判定が最初の予測ブロ
ックについて終了すると隣の予測ブロックに順次進めて同じ条件判定を行い、以降、第2
、第3、第4の条件判定のそれぞれについて予測ブロックを順次進めながら同じ条件判定
を行うことを特徴とする動画像復号装置。
In the scan of the prediction block in the spatial direction, when the first condition determination is completed for the first prediction block, the same condition determination is performed by sequentially proceeding to the next prediction block.
A moving picture decoding apparatus characterized by performing the same condition determination while sequentially advancing a prediction block for each of the third and fourth condition determinations.

上記の空間方向の予測ブロックのスキャンにおいて、4つの条件判定のうち、第1と第
2の条件判定が最初の予測ブロックについて終了すると隣の予測ブロックに順次進めて同
じ条件判定を行い、次に、第3と第4の条件判定が最初の予測ブロックについて終了する
と隣の予測ブロックに順次進めて同じ条件判定を行うことを特徴とする動画像復号装置。
In the scan of the prediction block in the spatial direction, when the first and second condition determinations of the four condition determinations are finished for the first prediction block, the same condition determination is performed by sequentially proceeding to the next prediction block. When the third and fourth condition determinations are finished for the first prediction block, the moving picture decoding apparatus is configured to sequentially advance to the next prediction block and perform the same condition determination.

上記の空間方向の予測ブロックのスキャンにおいて、4つの条件判定のうち、第1の条
件判定が最初の予測ブロックについて終了すると隣の予測ブロックに順次進めて同じ条件
判定を行い、次に、第2と第3と第4の条件判定が最初の予測ブロックについて終了する
と隣の予測ブロックに順次進めて同じ条件判定を行うことを特徴とする動画像復号装置。
In the scan of the prediction block in the spatial direction, among the four condition determinations, when the first condition determination is completed for the first prediction block, the same condition determination is performed by sequentially proceeding to the next prediction block, and then the second When the third and fourth condition determinations are finished for the first prediction block, the moving picture decoding apparatus is characterized by sequentially proceeding to the next prediction block and performing the same condition determination.

上記の空間方向の予測ブロックのスキャンにおいて、最初の予測ブロックについて4つ
の条件判定のいずれにも合致しない場合、当該予測ブロックには条件に合致する動きベク
トルは存在しないものと判断し、隣の予測ブロックに順次進めて4つの条件判定のいずれ
かに合致するかどうかの判定を行うことを特徴とする動画像復号装置。
In the scan of the prediction block in the spatial direction, if none of the four condition determinations is satisfied for the first prediction block, it is determined that there is no motion vector that satisfies the condition in the prediction block, and the adjacent prediction A moving picture decoding apparatus characterized by proceeding sequentially to a block and determining whether or not any of four condition determinations is met.

以上述べた実施の形態の動画像符号化装置が出力する動画像の符号化ストリームは、実
施の形態で用いられた符号化方法に応じて復号することができるように特定のデータフォ
ーマットを有しており、動画像符号化装置に対応する動画像復号装置がこの特定のデータ
フォーマットの符号化ストリームを復号することができる。
The moving image encoded stream output from the moving image encoding apparatus of the embodiment described above has a specific data format so that it can be decoded according to the encoding method used in the embodiment. Therefore, the moving picture decoding apparatus corresponding to the moving picture encoding apparatus can decode the encoded stream of this specific data format.

動画像符号化装置と動画像復号装置の間で符号化ストリームをやりとりするために、有
線または無線のネットワークが用いられる場合、符号化ストリームを通信路の伝送形態に
適したデータ形式に変換して伝送してもよい。その場合、動画像符号化装置が出力する符
号化ストリームを通信路の伝送形態に適したデータ形式の符号化データに変換してネット
ワークに送信する動画像送信装置と、ネットワークから符号化データを受信して符号化ス
トリームに復元して動画像復号装置に供給する動画像受信装置とが設けられる。
When a wired or wireless network is used to exchange an encoded stream between a moving image encoding device and a moving image decoding device, the encoded stream is converted into a data format suitable for the transmission form of the communication path. It may be transmitted. In that case, a video transmission apparatus that converts the encoded stream output from the video encoding apparatus into encoded data in a data format suitable for the transmission form of the communication channel and transmits the encoded data to the network, and receives the encoded data from the network Then, a moving image receiving apparatus that restores the encoded stream and supplies the encoded stream to the moving image decoding apparatus is provided.

動画像送信装置は、動画像符号化装置が出力する符号化ストリームをバッファするメモ
リと、符号化ストリームをパケット化するパケット処理部と、パケット化された符号化デ
ータをネットワークを介して送信する送信部とを含む。動画像受信装置は、パケット化さ
れた符号化データをネットワークを介して受信する受信部と、受信された符号化データを
バッファするメモリと、符号化データをパケット処理して符号化ストリームを生成し、動
画像復号装置に提供するパケット処理部とを含む。
The moving image transmitting apparatus is a memory that buffers the encoded stream output from the moving image encoding apparatus, a packet processing unit that packetizes the encoded stream, and transmission that transmits the packetized encoded data via the network. Part. The moving image receiving apparatus generates a coded stream by packetizing the received data, a receiving unit that receives the packetized coded data via a network, a memory that buffers the received coded data, and packet processing. And a packet processing unit provided to the video decoding device.

以上の符号化及び復号に関する処理は、ハードウェアを用いた伝送、蓄積、受信装置と
して実現することができるのは勿論のこと、ROM(リード・オンリ・メモリ)やフラッ
シュメモリ等に記憶されているファームウェアや、コンピュータ等のソフトウェアによっ
ても実現することができる。そのファームウェアプログラム、ソフトウェアプログラムを
コンピュータ等で読み取り可能な記録媒体に記録して提供することも、有線あるいは無線
のネットワークを通してサーバから提供することも、地上波あるいは衛星ディジタル放送
のデータ放送として提供することも可能である。
The above processing relating to encoding and decoding can be realized as a transmission, storage, and reception device using hardware, and is 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 recorded 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 第
1の符号化ビット列生成部、 110 第2の符号化ビット列生成部、 111 多重化
部、 112 逆量子化・逆直交変換部、 113 復号画像信号重畳部、 114 符
号化情報格納メモリ、 115 復号画像メモリ、 120 予測動きベクトル候補生成
部、 121 予測動きベクトル登録部、 122 予測動きベクトル候補同一判定部、
123 予測動きベクトル候補符号量算出部、 124 予測動きベクトル選択部、
125 動きベクトル減算部、 130 マージ候補生成部、 131 マージ候補登録
部、 132 マージ候補同一判定部、 133 符号化情報選択部、 201 分離部
、 202 第1符号化ビット列復号部、 203 第2符号化ビット列復号部、 20
4 動きベクトル算出部、 205 インター予測情報推定部、 206 補償予測部、
207 逆量子化・逆直交変換部、 208 復号画像信号重畳部、 209 符号化
情報格納メモリ、 210 復号画像メモリ、 220 予測動きベクトル候補生成部、
221 予測動きベクトル登録部、 222 予測動きベクトル候補同一判定部、 2
23 予測動きベクトル選択部、 224 動きベクトル加算部、 230 マージ候補
生成部、 231 マージ候補登録部、 232 マージ候補同一判定部、 233 符
号化情報選択部。
DESCRIPTION OF SYMBOLS 101 Image memory, 102 Motion vector detection part, 103 Difference motion vector calculation part, 104 Inter prediction information estimation part, 105 Motion compensation prediction part, 106 Prediction method determination part, 107 Residual signal generation part, 108 Orthogonal transformation and quantization part 109 first encoded bit string generation unit, 110 second encoded bit string generation unit, 111 multiplexing unit, 112 inverse quantization / inverse orthogonal transform unit, 113 decoded image signal superimposing unit, 114 encoded information storage memory, 115 decoded image memory, 120 prediction motion vector candidate generation unit, 121 prediction motion vector registration unit, 122 prediction motion vector candidate identity determination unit,
123 prediction motion vector candidate code amount calculation unit, 124 prediction motion vector selection unit,
125 motion vector subtraction unit, 130 merge candidate generation unit, 131 merge candidate registration unit, 132 merge candidate identity determination unit, 133 encoded information selection unit, 201 separation unit, 202 first encoded bit string decoding unit, 203 second encoding Bit string decoding unit, 20
4 motion vector calculation unit, 205 inter prediction information estimation unit, 206 compensation prediction unit,
207 inverse quantization / inverse orthogonal transform unit, 208 decoded image signal superimposing unit, 209 encoded information storage memory, 210 decoded image memory, 220 prediction motion vector candidate generation unit,
221 predicted motion vector registration unit, 222 predicted motion vector candidate identity determination unit, 2
23 prediction motion vector selection unit, 224 motion vector addition unit, 230 merge candidate generation unit, 231 merge candidate registration unit, 232 merge candidate identity determination unit, 233 encoding information selection unit.

Claims (1)

動画像の各ピクチャを分割したブロック単位で前記動画像が符号化された符号化ビット列を復号する動画像復号装置であって、
復号対象予測ブロックと同一ピクチャ内の前記復号対象予測ブロックと隣接する復号済みの予測ブロックの動きベクトルから、1つ以上の予測動きベクトルの候補を導出し、導出した予測動きベクトルの候補を予測動きベクトル候補リストに登録する予測動きベクトル候補生成部
を備え、
前記予測動きベクトル候補生成部は、設定された数の予測動きベクトルの候補を得るために、前記復号済みの予測ブロックの内のどの予測ブロックの動きベクトルが予測動きベクトルの候補を導出するための動きベクトルとなるかの判定を行う際、左側の隣接ブロックグループ、及び上側の隣接ブロックグループの隣接ブロックグループ毎に所定順の各予測ブロックに対して、
条件1.復号対象予測ブロックで導出対象としている予測動きベクトルの参照リストと同じ参照リストで、同じ参照ピクチャの動きベクトルが存在する、
条件2.復号対象予測ブロックで導出対象としている予測動きベクトルの参照リストとは異なる参照リストで、同じ参照ピクチャの動きベクトルが存在する、
条件3.復号対象予測ブロックで導出対象としている予測動きベクトルの参照リストと同じ参照リストで、異なる参照ピクチャの動きベクトルが存在する、
条件4.復号対象予測ブロックで導出対象としている予測動きベクトルの参照リストとは異なる参照リストで、異なる参照ピクチャの動きベクトルが存在する、
の各条件の判定を、まず、条件1,2についてその条件1,2の優先順序で各予測ブロックに対して行い、次に条件3,4についてその条件3,4の優先順序で各予測ブロックに対して行うことを特徴とする動画像復号装置。
A moving picture decoding apparatus for decoding a coded bit string obtained by coding the moving picture in block units obtained by dividing each picture of the moving picture,
One or more motion vector predictor candidates are derived from the motion vector of a decoded prediction block adjacent to the current prediction block to be decoded in the same picture as the current prediction block to be decoded, and the predicted motion vector candidate thus derived is predicted motion. A motion vector predictor candidate generation unit to be registered in the vector candidate list;
The motion vector predictor candidate generation unit is configured to derive motion vector predictor motion vectors from among the decoded prediction blocks to obtain motion vector predictor candidates in order to obtain a set number of motion vector predictor candidates. When determining whether to be a motion vector, for each prediction block in a predetermined order for each adjacent block group of the left adjacent block group and the upper adjacent block group,
Condition 1. A motion vector of the same reference picture exists in the same reference list as the reference list of the motion vector predictor to be derived in the prediction block to be decoded,
Condition 2. The motion vector of the same reference picture exists in a reference list different from the reference list of the motion vector predictor to be derived in the prediction block to be decoded,
Condition 3. There are motion vectors of different reference pictures in the same reference list as the reference list of the motion vector predictor to be derived in the decoding target prediction block.
Condition 4. A motion vector of a different reference picture exists in a reference list different from the reference list of the motion vector predictor to be derived in the decoding target prediction block,
First, the conditions 1 and 2 are determined for each prediction block in the priority order of the conditions 1 and 2, and then the conditions 3 and 4 are predicted in the priority order of the conditions 3 and 4. The moving picture decoding apparatus characterized by performing with respect to this.
JP2015016820A 2015-01-30 2015-01-30 Video decoding device, video decoding method, and video decoding program Pending JP2015111910A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015016820A JP2015111910A (en) 2015-01-30 2015-01-30 Video decoding device, video decoding method, and video decoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015016820A JP2015111910A (en) 2015-01-30 2015-01-30 Video decoding device, video decoding method, and video decoding program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2013043850A Division JP5692260B2 (en) 2013-03-06 2013-03-06 Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program

Publications (1)

Publication Number Publication Date
JP2015111910A true JP2015111910A (en) 2015-06-18

Family

ID=53526366

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015016820A Pending JP2015111910A (en) 2015-01-30 2015-01-30 Video decoding device, video decoding method, and video decoding program

Country Status (1)

Country Link
JP (1) JP2015111910A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339249A (en) * 2021-12-27 2022-04-12 安谋科技(中国)有限公司 Video decoding method, readable medium and electronic device thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012094661A2 (en) * 2011-01-07 2012-07-12 Texas Instruments Incorporated Method and apparatus for determining video motion vector
WO2012128540A2 (en) * 2011-03-21 2012-09-27 엘지전자 주식회사 Method for selecting motion vector predictor and device using same
JP5692260B2 (en) * 2013-03-06 2015-04-01 株式会社Jvcケンウッド Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012094661A2 (en) * 2011-01-07 2012-07-12 Texas Instruments Incorporated Method and apparatus for determining video motion vector
JP2014506068A (en) * 2011-01-07 2014-03-06 日本テキサス・インスツルメンツ株式会社 Method and apparatus for determining video motion vectors
WO2012128540A2 (en) * 2011-03-21 2012-09-27 엘지전자 주식회사 Method for selecting motion vector predictor and device using same
JP2014514811A (en) * 2011-03-21 2014-06-19 エルジー エレクトロニクス インコーポレイティド Motion vector predictor selection method and apparatus using motion vector predictor selection method
JP5692260B2 (en) * 2013-03-06 2015-04-01 株式会社Jvcケンウッド Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339249A (en) * 2021-12-27 2022-04-12 安谋科技(中国)有限公司 Video decoding method, readable medium and electronic device thereof
CN114339249B (en) * 2021-12-27 2023-12-05 安谋科技(中国)有限公司 Video decoding method, readable medium and electronic device thereof

Similar Documents

Publication Publication Date Title
KR101921789B1 (en) Moving image encoding device, moving image encoding method and moving image encoding program, as well as moving image decoding device, moving image decoding method and moving image decoding program
JP5692262B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
JP5252029B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
JP5692260B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
JP5477340B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
JP2015111910A (en) Video decoding device, video decoding method, and video decoding program
JP6288237B2 (en) Image encoding device, image encoding method, image encoding program, transmission device, transmission method, and transmission program
JP5692261B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
JP5692263B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
JP6226039B2 (en) Image decoding apparatus, image decoding method, image decoding program, receiving apparatus, receiving method, and receiving program
JP6135250B2 (en) Image coding apparatus, image coding method, and image coding program
JP5987615B2 (en) Image decoding apparatus, image decoding method, image decoding program, receiving apparatus, receiving method, and receiving program
JP6135251B2 (en) Image decoding apparatus, image decoding method, and image decoding program
JP2014072762A (en) Image decoding device, image decoding method and image decoding program

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20150717

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151208

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20160405