JP6105034B2 - Decoding method and decoding apparatus - Google Patents

Decoding method and decoding apparatus Download PDF

Info

Publication number
JP6105034B2
JP6105034B2 JP2015246525A JP2015246525A JP6105034B2 JP 6105034 B2 JP6105034 B2 JP 6105034B2 JP 2015246525 A JP2015246525 A JP 2015246525A JP 2015246525 A JP2015246525 A JP 2015246525A JP 6105034 B2 JP6105034 B2 JP 6105034B2
Authority
JP
Japan
Prior art keywords
unit
prediction
information
image
list
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.)
Active
Application number
JP2015246525A
Other languages
Japanese (ja)
Other versions
JP2016036189A (en
Inventor
昭行 谷沢
昭行 谷沢
中條 健
健 中條
太一郎 塩寺
太一郎 塩寺
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2015246525A priority Critical patent/JP6105034B2/en
Publication of JP2016036189A publication Critical patent/JP2016036189A/en
Application granted granted Critical
Publication of JP6105034B2 publication Critical patent/JP6105034B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明の実施形態は、復号方法及び復号装置に関する。   Embodiments described herein relate generally to a decoding method and a decoding apparatus.

近年、符号化効率を大幅に向上させた画像符号化方法が、ITU−T(International
Telecommunication Union Telecommunication Standardization Sector)とISO(International Organization for Standardization)/IEC(International Electrotechnical Commission)との共同で、ITU−T REC. H.264及びISO/IEC 14496−10(以下、「H.264」という)として勧告されている。
In recent years, an image encoding method that greatly improves encoding efficiency has been developed by ITU-T (International
In collaboration with Telecommunication Union Telecommunication Standardization Sector) and ISO (International Organization for Standardization) / IEC (International Electrotechnical Commission), ITU-T REC. H. H.264 and ISO / IEC 14496-10 (hereinafter referred to as “H.264”).

H.264には、符号化済みの画像を参照画像に用いて分数精度の動き補償予測を行うことにより、時間方向の冗長性を削除し、高い符号化効率を実現するインター予測符号化方式が開示されている。   H. H.264 discloses an inter-prediction coding scheme that eliminates temporal redundancy and realizes high coding efficiency by performing fractional accuracy motion compensated prediction using a coded image as a reference image. ing.

また、ISO/IEC MPEG(Moving Picture Experts Group)−1,2,4におけるインター予測符号化方式よりも、フェードやディゾルブ効果を含む動画像を高効率に符号化する方式も提案されている。この方式では、時間方向における明度変化を予測する枠組みとして、輝度と2つの色差とを有する入力動画像に対して分数精度の動き補償予測を行う。そして、参照画像と、輝度及び2つの色差毎の重み係数と、輝度及び2つの色差毎のオフセットと、を含む組み合わせ示すインデックスを用いて、予測画像に重み係数を乗じ、オフセットを加算する。   Also, a scheme for encoding moving images including fade and dissolve effects with higher efficiency than the inter prediction encoding schemes in ISO / IEC MPEG (Moving Picture Experts Group) -1, 2, 4 has been proposed. In this method, as a framework for predicting a change in brightness in the time direction, fractional accuracy motion compensation prediction is performed on an input moving image having luminance and two color differences. Then, the prediction image is multiplied by the weighting factor using an index indicating a combination including the reference image, the weighting factor for each luminance and two color differences, and the offset for each luminance and two color differences, and the offset is added.

特開2004−7377号公報JP 2004-7377 A

しかしながら、上述したような従来技術では、双方向予測を選択可能な双方向予測スライスにおいて、参照画像が同一であるが参照画像番号が異なる2つのインデックスを用いて重み付き動き補償を行う際に、同一の値を持つインデックスを2回符号化する場合が発生し、符号化効率が低下する場合がある。本発明が解決しようとする課題は、符号化効率を向上できる復号方法及び復号装置を提供することである。   However, in the conventional technology as described above, when performing weighted motion compensation using two indexes having the same reference image but different reference image numbers in a bidirectional prediction slice in which bidirectional prediction can be selected, An index having the same value may be encoded twice, resulting in a decrease in encoding efficiency. The problem to be solved by the present invention is to provide a decoding method and a decoding apparatus capable of improving encoding efficiency.

実施形態の復号方法は、ライスレベルよりも上位のレベルのアダプテーションパラメータセットシンタクスから呼び出されるシンタクスであって、参照番号により特定される重み係数を含む複数パラメータを記述したプレッドウェイトテーブルシンタクスと、前記スライスレベルよりも上位のレベルのシンタクスであって、前記参照番号が取り得る値の最大数を特定するシンタクス要素を記述したシーケンスパラメータセットシンタクスと、を含む符号化データの入力を受け、前記シーケンスパラメータセットシンタクスから前記シンタクス要素を再生し、再生された前記シンタクス要素と前記プレッドウェイトテーブルシンタクスとから、前記最大数を上限として前記参照番号により前記複数パラメータを特定し、前記参照番号を用いて、第1参照画像リスト及び第2参照画像リストの中から参照画像を特定し、特定された参照画像および前記複数パラメータを用いた重み付き動き補償を含む復号処理を実行するThe method of decoding embodiment is a than the slice level is called from a higher-level adaptation parameter set syntax Resid Ntakusu, spreads weight table syntax that describes a plurality parameters including weighting coefficient specified by the reference number and the a sheet Ntakusu of higher level than the slice level, the input of the coded data including a sequence parameter set syntax that describes a specific be cie Ntakusu elements the maximum number of the reference number possible values receiving the reproduced pre-carboxymethyl Ntakusu elements from a sequence parameter set syntax, from said a reproduced before carboxymethyl Ntakusu element spreads weight table syntax, specifies a plurality parameter by the reference number the maximum number as an upper limit , using the reference number Identifying a reference image from the first reference picture list and the second reference picture list, it executes a decoding process including a weighted motion compensation using the reference image and the plurality parameters identified.

第1実施形態の符号化装置の例を示すブロック図。The block diagram which shows the example of the encoding apparatus of 1st Embodiment. 第1実施形態における画素ブロックの予測符号化順序例を示す説明図。Explanatory drawing which shows the example of the prediction encoding order of the pixel block in 1st Embodiment. 第1実施形態におけるコーディングツリーブロックのブロックサイズ例を示す図。The figure which shows the block size example of the coding tree block in 1st Embodiment. 第1実施形態のコーディングツリーブロックの具体例を示す図。The figure which shows the specific example of the coding tree block of 1st Embodiment. 第1実施形態のコーディングツリーブロックの具体例を示す図。The figure which shows the specific example of the coding tree block of 1st Embodiment. 第1実施形態のコーディングツリーブロックの具体例を示す図。The figure which shows the specific example of the coding tree block of 1st Embodiment. 第1実施形態の予測画像生成部の例を示すブロック図。The block diagram which shows the example of the estimated image generation part of 1st Embodiment. 第1実施形態の双方向予測における動き補償予測の動きベクトルの関係の例を示す図。The figure which shows the example of the relationship of the motion vector of the motion compensation prediction in the bidirectional | two-way prediction of 1st Embodiment. 第1実施形態の複数フレーム動き補償部の例を示すブロック図。The block diagram which shows the example of the multi-frame motion compensation part of 1st Embodiment. 第1実施形態における重み係数の固定小数点精度の例の説明図。Explanatory drawing of the example of the fixed point precision of the weighting coefficient in 1st Embodiment. 第1実施形態のインデックス設定部の例を示すブロック図。The block diagram which shows the example of the index setting part of 1st Embodiment. 第1実施形態のWPパラメータ情報例を示す図。The figure which shows the WP parameter information example of 1st Embodiment. 第1実施形態のWPパラメータ情報例を示す図。The figure which shows the WP parameter information example of 1st Embodiment. 第1実施形態の低遅延符号化構造における符号化順と表示順の例を示す図。The figure which shows the example of the encoding order in the low-delay encoding structure of 1st Embodiment, and a display order. 第1実施形態の低遅延符号化構造における参照画像と参照番号との関係の例を示す図。The figure which shows the example of the relationship between the reference image in the low delay coding structure of 1st Embodiment, and a reference number. 第1実施形態のランダムアクセス符号化構造における符号化順と表示順の例を示す図。The figure which shows the example of the encoding order in the random access encoding structure of 1st Embodiment, and a display order. 第1実施形態のランダムアクセス符号化構造における参照画像と参照番号との関係の例を示す図。The figure which shows the example of the relationship between the reference image in the random access encoding structure of 1st Embodiment, and a reference number. 第1実施形態の参照画像のリスト番号及び参照番号のスキャン順序の例を示す図。The figure which shows the example of the scanning order of the list number of the reference image of 1st Embodiment, and a reference number. 第1実施形態における共通リスト変換後のWPパラメータ情報の例を簡略化して示した図。The figure which simplified and showed the example of WP parameter information after common list conversion in 1st Embodiment. 第1実施形態における共通リスト変換後のWPパラメータ情報の例を簡略化して示した図。The figure which simplified and showed the example of WP parameter information after common list conversion in 1st Embodiment. 第1実施形態のインデックス情報の生成処理例を示すフローチャート。5 is a flowchart illustrating an example of index information generation processing according to the first embodiment. 第1実施形態のシンタクスの例を示す図。The figure which shows the example of the syntax of 1st Embodiment. 第1実施形態のピクチャパラメータセットシンタクスの例を示す図。The figure which shows the example of the picture parameter set syntax of 1st Embodiment. 第1実施形態のスライスヘッダーシンタクスの例を示す図。The figure which shows the example of the slice header syntax of 1st Embodiment. 第1実施形態のプレッドウェイトテーブルシンタクスの例を示す図。The figure which shows the example of the tread weight table syntax of 1st Embodiment. 変形例のシーケンスパラメータセットシンタクスの例を示す図。The figure which shows the example of the sequence parameter set syntax of a modification. 変形例のアダプテーションパラメータセットシンタクスの例を示す図。The figure which shows the example of the adaptation parameter set syntax of a modification. 変形例のプレッドウェイトテーブルシンタクスの例を示す図。The figure which shows the example of the tread weight table syntax of a modification. 第2実施形態のインデックス設定部の構成例を示すブロック図。The block diagram which shows the structural example of the index setting part of 2nd Embodiment. 第2実施形態のインデックス情報の生成処理例を示すフローチャート。The flowchart which shows the production | generation process example of the index information of 2nd Embodiment. 第2実施形態のプレッドウェイトテーブルシンタクスの例を示す図。The figure which shows the example of the tread weight table syntax of 2nd Embodiment. 第3実施形態の符号化装置の構成例を示すブロック図。The block diagram which shows the structural example of the encoding apparatus of 3rd Embodiment. 第3実施形態の動き情報メモリの詳細例を示す図。The figure which shows the detailed example of the motion information memory of 3rd Embodiment. 第3実施形態の符号化画素ブロックに対する動き情報候補を導出するブロック位置の例を示す図。The figure which shows the example of the block position which derives | leads-out the motion information candidate with respect to the encoding pixel block of 3rd Embodiment. 第3実施形態の符号化画素ブロックに対する動き情報候補を導出するブロック位置の例を示す図。The figure which shows the example of the block position which derives | leads-out the motion information candidate with respect to the encoding pixel block of 3rd Embodiment. 第3実施形態の複数の動き情報候補の画素ブロック位置と画素ブロック位置インデクスとの関係の例を示す図。The figure which shows the example of the relationship between the pixel block position of the some motion information candidate of 3rd Embodiment, and a pixel block position index. 第3実施形態のMergeCandListへの格納処理例を示すフローチャート。The flowchart which shows the example of a storage process to MergeCandList of 3rd Embodiment. 第3実施形態の動き情報の格納リストの例を示す図。The figure which shows the example of the storage list | wrist of the motion information of 3rd Embodiment. 第3実施形態の動き情報の格納リストへの格納方法の例を示すフローチャート。The flowchart which shows the example of the storage method to the storage list of the motion information of 3rd Embodiment. 第3実施形態の双方向予測の組み合わせ例を示す図。The figure which shows the example of a combination of the bidirectional | two-way prediction of 3rd Embodiment. 第3実施形態のプレッドユニットシンタクスの例を示す図。The figure which shows the example of the tread unit syntax of 3rd Embodiment. 第3実施形態のMergeCandListへの格納処理の他の例を示すフローチャート。The flowchart which shows the other example of the storing process to MergeCandList of 3rd Embodiment. 第4実施形態の復号装置の構成例を示すブロック図。The block diagram which shows the structural example of the decoding apparatus of 4th Embodiment. 第4実施形態のインデックス設定部の構成例を示すブロック図。The block diagram which shows the structural example of the index setting part of 4th Embodiment. 第5実施形態のインデックス設定部の構成例を示すブロック図。The block diagram which shows the structural example of the index setting part of 5th Embodiment. 第6実施形態の復号装置の構成例を示すブロック図。The block diagram which shows the structural example of the decoding apparatus of 6th Embodiment.

以下、添付図面を参照しながら、実施形態を詳細に説明する。以下の各実施形態の符号化装置及び復号装置は、LSI(Large-Scale Integration)チップ、DSP(Digital
Signal Processor)、又はFPGA(Field Programmable Gate Array)などのハードウェアにより実現できる。また、以下の各実施形態の符号化装置及び復号装置は、コンピュータにプログラムを実行させること、即ち、ソフトウェアにより実現させることもできる。なお、以降の説明において、「画像」という用語は、「映像」、「画素」、「画像信号」、「絵」、又は「画像データ」などの用語に適宜読み替えることができる。
Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. In each of the following embodiments, an encoding device and a decoding device include an LSI (Large-Scale Integration) chip, a DSP (Digital
It can be realized by hardware such as a signal processor (FPGA) or a field programmable gate array (FPGA). In addition, the encoding device and the decoding device of each of the following embodiments can be realized by software by causing a computer to execute a program. In the following description, the term “image” can be appropriately replaced with a term such as “video”, “pixel”, “image signal”, “picture”, or “image data”.

(第1実施形態)
第1実施形態では、動画像を符号化する符号化装置について説明する。
(First embodiment)
In the first embodiment, an encoding apparatus that encodes a moving image will be described.

図1は、第1実施形態の符号化装置100の構成の一例を示すブロック図である。   FIG. 1 is a block diagram illustrating an example of a configuration of the encoding device 100 according to the first embodiment.

符号化装置100は、入力画像を構成する各フレーム又は各フィールドを複数の画素ブロックに分割し、符号化制御部111から入力される符号化パラメータを用いて、分割した画素ブロックに対して予測符号化を行い、予測画像を生成する。そして符号化装置100は、複数の画素ブロックに分割した入力画像と予測画像とを減算して予測誤差を生成し、生成した予測誤差を直交変換及び量子化し、更にエントロピー符号化を行って符号化データを生成し、出力する。   The encoding apparatus 100 divides each frame or each field constituting the input image into a plurality of pixel blocks, and uses the encoding parameters input from the encoding control unit 111 to predict the encoded code for the divided pixel blocks. To generate a predicted image. The encoding apparatus 100 subtracts the input image divided into a plurality of pixel blocks and the prediction image to generate a prediction error, orthogonally transforms and quantizes the generated prediction error, and further performs entropy encoding to perform encoding. Generate and output data.

符号化装置100は、画素ブロックのブロックサイズ及び予測画像の生成方法の少なくともいずれかが異なる複数の予測モードを選択的に適用して予測符号化を行う。予測画像の生成方法は、大別すると、符号化対象フレーム内で予測を行うイントラ予測と、時間的に異なる1以上の参照フレームを用いて動き補償予測を行うインター予測との2種類である。なお、イントラ予測は、画面内予測又はフレーム内予測などとも称され、インター予測は、画面間予測、フレーム間予測、又は動き補償予測などとも称される。   The encoding apparatus 100 performs predictive encoding by selectively applying a plurality of prediction modes in which at least one of the block size of the pixel block and the prediction image generation method is different. The generation method of the prediction image is roughly classified into two types: intra prediction that performs prediction within the encoding target frame and inter prediction that performs motion compensation prediction using one or more reference frames that are temporally different. Note that intra prediction is also referred to as intra prediction or intra frame prediction, and inter prediction is also referred to as inter prediction, inter frame prediction, motion compensation prediction, or the like.

図2は、第1実施形態における画素ブロックの予測符号化順序の一例を示す説明図である。図2に示す例では、符号化装置100は、画素ブロックの左上から右下に向かって予測符号化を行っており、符号化処理対象のフレームfにおいて、符号化対象画素ブロックcよりも左側及び上側に符号化済み画素ブロックpが位置している。以下では、説明の簡単化のため、符号化装置100は、図2に示す順序で予測符号化を行うものとするが、予測符号化の順序はこれに限定されるものではない。   FIG. 2 is an explanatory diagram illustrating an example of a predictive coding order of pixel blocks in the first embodiment. In the example illustrated in FIG. 2, the encoding device 100 performs predictive encoding from the upper left to the lower right of the pixel block, and the left side of the encoding target pixel block c in the encoding target frame f and The encoded pixel block p is located on the upper side. Hereinafter, for simplification of description, the encoding apparatus 100 performs predictive encoding in the order shown in FIG. 2, but the order of predictive encoding is not limited to this.

画素ブロックは、画像を処理する単位を示し、例えば、M×Nサイズのブロック(M及びNは自然数)、コーディングツリーブロック、マクロブロック、サブブロック、又は1
画素などが該当する。以降の説明では、基本的に、画素ブロックをコーディングツリーブロックの意味で使用するが、他の意味で使用する場合もある。例えば、プレディクションユニットの説明では、画素ブロックを、プレディクションユニットの画素ブロックの意味で使用する。また、ブロックはユニットなどの名称で呼ばれることもある。例えばコーディングブロックをコーディングユニットと呼ぶ。
The pixel block indicates a unit for processing an image. For example, an M × N size block (M and N are natural numbers), a coding tree block, a macro block, a sub block, or 1
This applies to pixels. In the following description, the pixel block is basically used in the meaning of the coding tree block, but may be used in other meanings. For example, in the description of the prediction unit, a pixel block is used to mean a pixel block of the prediction unit. A block may be called by a name such as a unit. For example, a coding block is called a coding unit.

図3Aは、第1実施形態におけるコーディングツリーブロックのブロックサイズの一例を示す図である。コーディングツリーブロックは、典型的には、図3Aに示すような64×64の画素ブロックである。但し、これに限定されるものではなく、32×32の画素ブロック、16×16の画素ブロック、8×8の画素ブロック、又は4×4の画素ブロックなどであってもよい。また、コーディングツリーブロックは、正方形でなくてもよく、例えば、M×Nサイズ(M≠N)の画素ブロックであってもよい。   FIG. 3A is a diagram illustrating an example of a block size of a coding tree block according to the first embodiment. The coding tree block is typically a 64 × 64 pixel block as shown in FIG. 3A. However, the present invention is not limited to this, and it may be a 32 × 32 pixel block, a 16 × 16 pixel block, an 8 × 8 pixel block, a 4 × 4 pixel block, or the like. Further, the coding tree block may not be a square, and may be, for example, an M × N size (M ≠ N) pixel block.

図3B〜図3Dは、第1実施形態のコーディングツリーブロックの具体例を示す図である。図3Bは、ブロックサイズが64×64(N=32)のコーディングツリーブロックを示している。Nは、基準となるコーディングツリーブロックのサイズを表しており、分割された場合のサイズがN、分割されない場合のサイズが2Nと定義されている。図3Cは、図3Bのコーディングツリーブロックを四分木分割したコーディングツリーブロックを示している。コーディングツリーブロックは、図3Cに示すように、四分木構造を持つ。コーディングツリーブロックが分割された場合、分割後の4つの画素ブロックに対して、図3Cに示すように、Zスキャン順で番号が付される。   3B to 3D are diagrams illustrating specific examples of the coding tree block according to the first embodiment. FIG. 3B shows a coding tree block having a block size of 64 × 64 (N = 32). N represents the size of the reference coding tree block. The size when divided is defined as N, and the size when not divided is defined as 2N. FIG. 3C shows a coding tree block obtained by dividing the coding tree block of FIG. 3B into quadtrees. The coding tree block has a quadtree structure as shown in FIG. 3C. When the coding tree block is divided, the four pixel blocks after the division are numbered in the Z-scan order as shown in FIG. 3C.

なお、コーディングツリーブロックは、1つの四分木の番号内で更に四分木分割することができる。これにより、コーディングツリーブロックを階層的に分割することができる。この場合、分割の深さは、Depthで定義される。図3Dは、図3Bのコーディングツリーブロックを四分木分割したコーディングツリーブロックの1つを示し、ブロックサイズが32×32(N=16)となっている。図3Bに示すコーディングツリーブロックのDepthは0であり、図3Dに示すコーディングツリーブロックのDepthは、1である。なお、最もユニットが大きいコーディングツリーブロックは、ラージコーディングツリーブロックと呼ばれ、この単位で入力画像信号がラスタースキャン順に符号化される。   The coding tree block can be further divided into quadtrees within one quadtree number. Thereby, a coding tree block can be divided | segmented hierarchically. In this case, the depth of division is defined by Depth. FIG. 3D shows one of the coding tree blocks obtained by dividing the coding tree block of FIG. 3B into quadtrees, and the block size is 32 × 32 (N = 16). The Depth of the coding tree block shown in FIG. 3B is 0, and the Depth of the coding tree block shown in FIG. The coding tree block having the largest unit is called a large coding tree block, and the input image signal is encoded in this unit in the raster scan order.

以降の説明では、入力画像の符号化対象ブロック又はコーディングツリーブロックを予測対象ブロック又は予測画素ブロックと称することもある。なお、符号化単位は画素ブロックに限らず、フレーム、フィールド、スライス、ライン、及び画素の少なくともいずれかを用いることもできる。   In the following description, the encoding target block or coding tree block of the input image may be referred to as a prediction target block or a prediction pixel block. The encoding unit is not limited to a pixel block, and at least one of a frame, a field, a slice, a line, and a pixel can be used.

符号化装置100は、図1に示すように、減算部101と、直交変換部102と、量子化部103と、逆量子化部104と、逆直交変換部105と、加算部106と、予測画像生成部107と、インデックス設定部108と、動き評価部109と、符号化部110とを、備える。なお、図1に示す符号化制御部111は、符号化装置100を制御するものであり、例えば、CPU(Central Processing Unit)などにより実現できる。   As illustrated in FIG. 1, the encoding device 100 includes a subtraction unit 101, an orthogonal transformation unit 102, a quantization unit 103, an inverse quantization unit 104, an inverse orthogonal transformation unit 105, an addition unit 106, and a prediction The image generation unit 107, the index setting unit 108, the motion evaluation unit 109, and the encoding unit 110 are provided. Note that the encoding control unit 111 illustrated in FIG. 1 controls the encoding apparatus 100 and can be realized by, for example, a CPU (Central Processing Unit).

減算部101は、画素ブロックに分割された入力画像から対応する予測画像を減算して予測誤差を得る。減算部101は、予測誤差を出力し、直交変換部102に入力する。   The subtraction unit 101 subtracts the corresponding prediction image from the input image divided into pixel blocks to obtain a prediction error. The subtraction unit 101 outputs a prediction error and inputs it to the orthogonal transform unit 102.

直交変換部102は、減算部101から入力された予測誤差に対して、例えば、離散コサイン変換(DCT)又は離散サイン変換(DST)のような直交変換を行い、変換係数を得る。直交変換部102は、変換係数を出力し、量子化部103に入力する。   The orthogonal transform unit 102 performs orthogonal transform such as discrete cosine transform (DCT) or discrete sine transform (DST) on the prediction error input from the subtraction unit 101 to obtain transform coefficients. The orthogonal transform unit 102 outputs transform coefficients and inputs them to the quantization unit 103.

量子化部103は、直交変換部102から入力された変換係数に対して量子化処理を行い、量子化変換係数を得る。具体的には、量子化部103は、符号化制御部111によって指定される量子化パラメータや量子化マトリクスなどの量子化情報に従って量子化を行う。より詳細には、量子化部103は、変換係数を量子化情報によって導出される量子化ステップサイズで除算し、量子化変換係数を得る。量子化パラメータは、量子化の細かさを示す。量子化マトリクスは、量子化の細かさを変換係数の成分毎に重み付けするために使用される。量子化部103は、量子化変換係数を出力し、逆量子化部104及び符号化部110に入力する。   The quantization unit 103 performs a quantization process on the transform coefficient input from the orthogonal transform unit 102 to obtain a quantized transform coefficient. Specifically, the quantization unit 103 performs quantization according to quantization information such as a quantization parameter or a quantization matrix specified by the encoding control unit 111. More specifically, the quantization unit 103 divides the transform coefficient by the quantization step size derived from the quantization information to obtain a quantized transform coefficient. The quantization parameter indicates the fineness of quantization. The quantization matrix is used for weighting the fineness of quantization for each component of the transform coefficient. The quantization unit 103 outputs the quantized transform coefficient and inputs it to the inverse quantization unit 104 and the encoding unit 110.

逆量子化部104は、量子化部103から入力された量子化変換係数に対して逆量子化処理を行い、復元変換係数を得る。具体的には、逆量子化部104は、量子化部103において使用された量子化情報に従って逆量子化を行う。より詳細には、逆量子化部104は、量子化情報によって導出された量子化ステップサイズを量子化変換係数に乗算し、復元変換係数を得る。なお、量子化部103において使用された量子化情報は、符号化制御部111の図示せぬ内部メモリからロードされて利用される。逆量子化部104は、復元変換係数を出力し、逆直交変換部105に入力する。   The inverse quantization unit 104 performs inverse quantization processing on the quantized transform coefficient input from the quantization unit 103 to obtain a restored transform coefficient. Specifically, the inverse quantization unit 104 performs inverse quantization according to the quantization information used in the quantization unit 103. More specifically, the inverse quantization unit 104 multiplies the quantization transform coefficient by the quantization step size derived from the quantization information to obtain a restored transform coefficient. Note that the quantization information used in the quantization unit 103 is loaded from an internal memory (not shown) of the encoding control unit 111 and used. The inverse quantization unit 104 outputs the restored transform coefficient and inputs it to the inverse orthogonal transform unit 105.

逆直交変換部105は、逆量子化部104から入力された復元変換係数に対して、例えば、逆離散コサイン変換(IDCT)又は逆離散サイン変換(IDST)などのような逆直交変換を行い、復元予測誤差を得る。なお、逆直交変換部105が行う逆直交変換は、直交変換部102において行われた直交変換に対応する。逆直交変換部105は、復元予測誤差を出力し、加算部106に入力する。   The inverse orthogonal transform unit 105 performs inverse orthogonal transform such as inverse discrete cosine transform (IDCT) or inverse discrete sine transform (IDST) on the restored transform coefficient input from the inverse quantization unit 104, Get the restoration prediction error. Note that the inverse orthogonal transform performed by the inverse orthogonal transform unit 105 corresponds to the orthogonal transform performed by the orthogonal transform unit 102. The inverse orthogonal transform unit 105 outputs the reconstruction prediction error and inputs it to the addition unit 106.

加算部106は、逆直交変換部105から入力された復元予測誤差と対応する予測画像とを加算し、局所復号画像を生成する。加算部106は、局所復号画像を出力し、予測画像生成部107に入力する。   The adding unit 106 adds the restored prediction error input from the inverse orthogonal transform unit 105 and the corresponding predicted image to generate a locally decoded image. The adding unit 106 outputs the local decoded image and inputs it to the predicted image generation unit 107.

予測画像生成部107は、加算部106から入力された局所復号画像を参照画像としてメモリ(図1では図示省略)に蓄積し、メモリに蓄積した参照画像を出力し、動き評価部109に入力する。また予測画像生成部107は、動き評価部109から入力される動き情報及びWPパラメータ情報に基づいて重み付き動き補償予測を行い、予測画像を生成する。予測画像生成部107は、予測画像を出力し、減算部101及び加算部106に入力する。   The predicted image generation unit 107 stores the locally decoded image input from the addition unit 106 as a reference image in a memory (not shown in FIG. 1), outputs the reference image stored in the memory, and inputs the reference image to the motion evaluation unit 109. . Further, the predicted image generation unit 107 performs weighted motion compensation prediction based on the motion information and WP parameter information input from the motion evaluation unit 109, and generates a predicted image. The predicted image generation unit 107 outputs a predicted image and inputs it to the subtracting unit 101 and the adding unit 106.

図4は、第1実施形態の予測画像生成部107の構成の一例を示すブロック図である。予測画像生成部107は、図4に示すように、複数フレーム動き補償部201と、メモリ202と、単方向動き補償部203と、予測パラメータ制御部204と、参照画像セレクタ205と、フレームメモリ206と、参照画像制御部207と、を備える。   FIG. 4 is a block diagram illustrating an example of the configuration of the predicted image generation unit 107 of the first embodiment. As shown in FIG. 4, the predicted image generation unit 107 includes a multi-frame motion compensation unit 201, a memory 202, a unidirectional motion compensation unit 203, a prediction parameter control unit 204, a reference image selector 205, and a frame memory 206. And a reference image control unit 207.

フレームメモリ206は、参照画像制御部207の制御の下、加算部106から入力された局所復号画像を参照画像として格納する。フレームメモリ206は、参照画像を一時保持するための複数のメモリセットFM1〜FMN(N≧2)を有する。   The frame memory 206 stores the locally decoded image input from the addition unit 106 as a reference image under the control of the reference image control unit 207. The frame memory 206 has a plurality of memory sets FM1 to FMN (N ≧ 2) for temporarily storing reference images.

予測パラメータ制御部204は、動き評価部109から入力される動き情報に基づいて、参照画像番号と予測パラメータとの複数の組み合わせをテーブルとして用意している。ここで、動き情報とは、動き補償予測で用いられる動きのズレ量を示す動きベクトルや参照画像番号、単方向/双方向予測などの予測モードに関する情報などを指す。予測パラメータは、動きベクトル及び予測モードに関する情報を指す。そして予測パラメータ制御部204は、入力画像に基づいて、予測画像の生成に用いる参照画像番号と予測パラメータとの組み合わせを選択して出力し、参照画像番号を参照画像セレクタ205に入力し、予
測パラメータを単方向動き補償部203に入力する。
The prediction parameter control unit 204 prepares a plurality of combinations of reference image numbers and prediction parameters as a table based on the motion information input from the motion evaluation unit 109. Here, the motion information indicates a motion vector indicating a shift amount of motion used in motion compensation prediction, a reference image number, information on a prediction mode such as unidirectional / bidirectional prediction, and the like. The prediction parameter refers to information regarding a motion vector and a prediction mode. Then, the prediction parameter control unit 204 selects and outputs a combination of the reference image number and the prediction parameter used for generating the prediction image based on the input image, inputs the reference image number to the reference image selector 205, and outputs the prediction parameter. Is input to the unidirectional motion compensation unit 203.

参照画像セレクタ205は、フレームメモリ206が有するフレームメモリFM1〜FMNのいずれの出力端を接続するかを、予測パラメータ制御部204から入力された参照画像番号に従って切り替えるスイッチである。参照画像セレクタ205は、例えば、参照画像番号が0であれば、FM1の出力端を参照画像セレクタ205の出力端に接続し、参照画像番号がN−1であれば、FMNの出力端を参照画像セレクタ205の出力端に接続する。参照画像セレクタ205は、フレームメモリ206が有するフレームメモリFM1〜FMNのうち、出力端が接続されているフレームメモリに格納されている参照画像を出力し、単方向動き補償部203及び動き評価部109へ入力する。   The reference image selector 205 is a switch for switching which output terminal of the frame memories FM1 to FMN included in the frame memory 206 is connected according to the reference image number input from the prediction parameter control unit 204. For example, if the reference image number is 0, the reference image selector 205 connects the output end of FM1 to the output end of the reference image selector 205. If the reference image number is N-1, the reference image selector 205 refers to the output end of the FMN. Connected to the output terminal of the image selector 205. The reference image selector 205 outputs the reference image stored in the frame memory to which the output terminal is connected among the frame memories FM1 to FMN included in the frame memory 206, and the unidirectional motion compensation unit 203 and the motion evaluation unit 109. Enter.

単方向予測動き補償部203は、予測パラメータ制御部204から入力された予測パラメータと参照画像セレクタ205から入力された参照画像に従って、動き補償予測処理を行い、単方向予測画像を生成する。   The unidirectional prediction motion compensation unit 203 performs a motion compensation prediction process according to the prediction parameter input from the prediction parameter control unit 204 and the reference image input from the reference image selector 205, and generates a unidirectional prediction image.

図5は、第1実施形態の双方向予測における動き補償予測の動きベクトルの関係の一例を示す図である。動き補償予測では、参照画像を用いて補間処理が行われ、作成された補間画像と入力画像との符号化対象位置の画素ブロックからの動きのズレ量を元に単方向予測画像が生成される。ここで、ズレ量は、動きベクトルである。図5に示すように、双方向予測スライス(B−slice)では、2種類の参照画像と動きベクトルのセットを用いて予測画像が生成される。補間処理としては、1/2画素精度の補間処理や、1/4画素精度の補間処理などが用いられ、参照画像に対してフィルタリング処理が行われることによって、補間画像の値が生成される。例えば、輝度信号に対して1/4画素精度までの補間処理な可能なH.264では、ズレ量は整数画素精度の4倍で表現される。   FIG. 5 is a diagram illustrating an example of a motion vector relationship of motion compensation prediction in bidirectional prediction according to the first embodiment. In motion compensated prediction, interpolation processing is performed using a reference image, and a unidirectional prediction image is generated based on the amount of motion deviation from the pixel block at the encoding target position between the generated interpolation image and the input image. . Here, the amount of deviation is a motion vector. As shown in FIG. 5, in a bi-directional prediction slice (B-slice), a prediction image is generated using a set of two types of reference images and motion vectors. As the interpolation process, an interpolation process with 1/2 pixel accuracy, an interpolation process with 1/4 pixel accuracy, or the like is used, and the value of the interpolation image is generated by performing the filtering process on the reference image. For example, H.P. capable of performing interpolation processing up to 1/4 pixel accuracy on a luminance signal. In H.264, the shift amount is expressed by four times the integer pixel accuracy.

単方向予測動き補償部203は、単方向予測画像を出力し、メモリ202に一時的に格納する。ここで、動き情報(予測パラメータ)が双方向予測を示す場合には、複数フレーム動き補償部201が2種類の単方向予測画像を用いて重み付き予測を行うため、単方向予測動き補償部203は、1つ目に対応する単方向予測画像をメモリ202に格納し、2つ目に対応する単法予測画像を複数フレーム動き補償部201に直接出力する。ここでは、1つ目に対応する単方向予測画像を第一予測画像とし、2つ目に対応する単方向予測画像を第二予測画像とする。   The unidirectional prediction motion compensation unit 203 outputs a unidirectional prediction image and temporarily stores it in the memory 202. Here, when the motion information (prediction parameter) indicates bidirectional prediction, the multi-frame motion compensation unit 201 performs weighted prediction using two types of unidirectional prediction images, and thus the unidirectional prediction motion compensation unit 203. Stores the unidirectional predicted image corresponding to the first in the memory 202, and directly outputs the unidirectional predicted image corresponding to the second to the multi-frame motion compensation unit 201. Here, the first unidirectional prediction image corresponding to the first is the first prediction image, and the second unidirectional prediction image is the second prediction image.

なお、単方向動き補償部203を2つ用意し、それぞれが2つの単方向予測画像を生成するようにしてもよい。この場合、動き情報(予測パラメータ)が単方向予測を示すときには、単方向動き補償部203が、1つ目の単方向予測画像を第一予測画像として複数フレーム動き補償部201に直接出力すればよい。   Two unidirectional motion compensation units 203 may be prepared, and each may generate two unidirectional prediction images. In this case, when the motion information (prediction parameter) indicates unidirectional prediction, the unidirectional motion compensation unit 203 directly outputs the first unidirectional prediction image as the first prediction image to the multi-frame motion compensation unit 201. Good.

複数フレーム動き補償部201は、メモリ202から入力される第一予測画像、単方向予測動き補償部203から入力される第二予測画像、及び動き評価部109から入力されるWPパラメータ情報を用いて、重み付き予測を行って予測画像を生成する。複数フレーム動き補償部201は、予測画像を出力し、減算部101及び加算部106に入力する。   The multi-frame motion compensation unit 201 uses the first prediction image input from the memory 202, the second prediction image input from the unidirectional prediction motion compensation unit 203, and the WP parameter information input from the motion evaluation unit 109. Then, a prediction image is generated by performing weighted prediction. The multi-frame motion compensation unit 201 outputs a prediction image and inputs the prediction image to the subtraction unit 101 and the addition unit 106.

図6は、第1実施形態の複数フレーム動き補償部201の構成の一例を示すブロック図である。複数フレーム動き補償部201は、図6に示すように、デフォルト動き補償部301と、重み付き動き補償部302と、WPパラメータ制御部303と、WPセレクタ304、305とを、備える。   FIG. 6 is a block diagram illustrating an example of the configuration of the multi-frame motion compensation unit 201 according to the first embodiment. As shown in FIG. 6, the multi-frame motion compensation unit 201 includes a default motion compensation unit 301, a weighted motion compensation unit 302, a WP parameter control unit 303, and WP selectors 304 and 305.

WPパラメータ制御部303は、動き評価部109から入力されるWPパラメータ情報に基づいて、WP適用フラグ及び重み情報を出力し、WP適用フラグをWPセレクタ30
4、305に入力し、重み情報を重み付き動き補償部302に入力する。
The WP parameter control unit 303 outputs a WP application flag and weight information based on the WP parameter information input from the motion evaluation unit 109, and sets the WP application flag to the WP selector 30.
4 and 305, and weight information is input to the weighted motion compensation unit 302.

ここで、WPパラメータ情報は、重み係数の固定小数点精度、第一予測画像に対応する第一WP適用フラグ,第一重み係数,及び第一オフセット、並びに第二予測画像に対応する第二WP適応フラグ,第二重み係数,及び第二オフセットの情報を含む。WP適用フラグは、該当する参照画像及び信号成分毎に設定可能なパラメータであり、重み付き動き補償予測を行うかどうかを示す。重み情報は、重み係数の固定小数点精度、第一重み係数、第一オフセット、第二重み係数、及び第二オフセットの情報を含む。   Here, the WP parameter information includes the fixed-point precision of the weighting factor, the first WP application flag corresponding to the first predicted image, the first weighting factor, the first offset, and the second WP adaptation corresponding to the second predicted image. Contains information on flag, second weighting factor, and second offset. The WP application flag is a parameter that can be set for each corresponding reference image and signal component, and indicates whether to perform weighted motion compensation prediction. The weight information includes information on the fixed point precision of the weight coefficient, the first weight coefficient, the first offset, the second weight coefficient, and the second offset.

詳細には、WPパラメータ制御部303は、動き評価部109からWPパラメータ情報が入力されると、WPパラメータ情報を第一WP適用フラグ、第二WP適用フラグ、及び重み情報に分離して出力し、第一WP適用フラグをWPセレクタ304に入力し、第二WP適用フラグをWPセレクタ305に入力し、重み情報を重み付き動き補償部302に入力する。   Specifically, when WP parameter information is input from the motion evaluation unit 109, the WP parameter control unit 303 separates the WP parameter information into a first WP application flag, a second WP application flag, and weight information, and outputs them. The first WP application flag is input to the WP selector 304, the second WP application flag is input to the WP selector 305, and the weight information is input to the weighted motion compensation unit 302.

WPセレクタ304、305は、WPパラメータ制御部303から入力されたWP適用フラグに基づいて、各々の予測画像の接続端を切り替える。WPセレクタ304、305は、各々のWP適用フラグが0の場合、各々の出力端をデフォルト動き補償部301へ接続する。そしてWPセレクタ304、305は、第一予測画像及び第二予測画像を出力し、デフォルト動き補償部301に入力する。一方、WPセレクタ304、305は、各々のWP適用フラグが1の場合、各々の出力端を重み付き動き補償部302へ接続する。そしてWPセレクタ304、305は、第一予測画像及び第二予測画像を出力し、重み付き動き補償部302に入力する。   The WP selectors 304 and 305 switch the connection end of each predicted image based on the WP application flag input from the WP parameter control unit 303. When each WP application flag is 0, the WP selectors 304 and 305 connect each output terminal to the default motion compensation unit 301. Then, the WP selectors 304 and 305 output the first predicted image and the second predicted image and input them to the default motion compensation unit 301. On the other hand, when each WP application flag is 1, the WP selectors 304 and 305 connect each output terminal to the weighted motion compensation unit 302. The WP selectors 304 and 305 output the first predicted image and the second predicted image, and input them to the weighted motion compensation unit 302.

デフォルト動き補償部301は、WPセレクタ304、305から入力された2つの単方向予測画像(第一予測画像及び第二予測画像)を元に平均値処理を行い、予測画像を生成する。具体的には、デフォルト動き補償部301は、第一WP適用フラグ及び第二WP適用フラグが0の場合、数式(1)に基づいて平均値処理を行う。   The default motion compensation unit 301 performs an average value process based on the two unidirectional predicted images (first predicted image and second predicted image) input from the WP selectors 304 and 305 to generate a predicted image. Specifically, when the first WP application flag and the second WP application flag are 0, the default motion compensation unit 301 performs average value processing based on Expression (1).

P[x,y]=Clip1((PL0[x,y]+PL1[x,y]+offset2)>>(shift2)) …(1)   P [x, y] = Clip1 ((PL0 [x, y] + PL1 [x, y] + offset2) >> (shift2)) (1)

ここで、P[x,y]は予測画像、PL0[x,y]は第一予測画像、PL1[x,y]は第二予測画像である。offset2及びshift2は平均値処理における丸め処理のパラメータであり、第一予測画像及び第二予測画像の内部演算精度によって定まる。予測画像のビット精度をL、第一予測画像及び第二予測画像のビット精度をM(L≦M)とすると、shift2は数式(2)で定式化され、offset2は数式(3)で定式化される。   Here, P [x, y] is a predicted image, PL0 [x, y] is a first predicted image, and PL1 [x, y] is a second predicted image. offset2 and shift2 are parameters of the rounding process in the average value process, and are determined by the internal calculation accuracy of the first predicted image and the second predicted image. If the bit accuracy of the prediction image is L and the bit accuracy of the first prediction image and the second prediction image is M (L ≦ M), shift2 is formulated by Equation (2), and offset2 is formulated by Equation (3). Is done.

shift2=(M−L+1) …(2)   shift2 = (ML + 1) (2)

offset2=(1<<(shift2−1) …(3)   offset2 = (1 << (shift2-1) (3)

例えば、予測画像のビット精度が8であり、第一予測画像及び第二予測画像のビット精度が14である場合、数式(2)よりshift2=7、数式(3)よりoffset2=(1<<6)となる。   For example, when the bit accuracy of the predicted image is 8 and the bit accuracy of the first predicted image and the second predicted image is 14, shift2 = 7 from Equation (2), and offset2 = (1 << from Equation (3). 6).

なお、動き情報(予測パラメータ)で示される予測モードが単方向予測である場合、デフォルト動き補償部301は、第一予測画像のみを用いて、数式(4)に基づいて最終的な予測画像を算出する。   When the prediction mode indicated by the motion information (prediction parameter) is unidirectional prediction, the default motion compensation unit 301 uses only the first prediction image and calculates a final prediction image based on Expression (4). calculate.

P[x,y]=Clip1((PLX[x,y]+offset1)>>(shift1)) …(4)   P [x, y] = Clip1 ((PLX [x, y] + offset1) >> (shift1)) (4)

ここで、PLX[x,y]は単方向予測画像(第一予測画像)を示しており、Xは参照リストの0又は1のいずれかを示す識別子である。例えば、参照リストが0の場合はPL0[x,y]、参照リストが1の場合はPL1[x,y]となる。offset1及びshift1は丸め処理のパラメータであり、第一予測画像の内部演算精度によって定まる。予測画像のビット精度をL、第一予測画像のビット精度をMとすると、shift1は数式(5)で定式化され、offset1は数式(6)で定式化される。   Here, PLX [x, y] indicates a unidirectional prediction image (first prediction image), and X is an identifier indicating either 0 or 1 in the reference list. For example, when the reference list is 0, PL0 [x, y] is obtained, and when the reference list is 1, PL1 [x, y] is obtained. offset1 and shift1 are parameters of the rounding process, and are determined by the internal calculation accuracy of the first predicted image. When the bit accuracy of the predicted image is L and the bit accuracy of the first predicted image is M, shift1 is formulated by Equation (5), and offset1 is formulated by Equation (6).

shift1=(M−L) …(5)   shift1 = (ML) (5)

offset1=(1<<(shift1−1) …(6)   offset1 = (1 << (shift1-1) (6)

例えば、予測画像のビット精度が8であり、第一予測画像のビット精度が14である場合、数式(5)よりshift1=6、数式(6)よりoffset1=(1<<5)となる。   For example, when the bit accuracy of the predicted image is 8 and the bit accuracy of the first predicted image is 14, shift1 = 6 from Equation (5) and offset1 = (1 << 5) from Equation (6).

重み付き動き補償部302は、WPセレクタ304、305から入力された2つの単方向予測画像(第一予測画像及び第二予測画像)とWPパラメータ制御部303から入力された重み情報とを元に重み付き動き補償を行う。具体的には、重み付き動き補償部302は、第一WP適用フラグ及び第二WP適用フラグが1の場合、数式(7)に基づいて重み付き処理を行う。   The weighted motion compensation unit 302 is based on the two unidirectional prediction images (first prediction image and second prediction image) input from the WP selectors 304 and 305 and the weight information input from the WP parameter control unit 303. Performs weighted motion compensation. Specifically, when the first WP application flag and the second WP application flag are 1, the weighted motion compensation unit 302 performs the weighting process based on Expression (7).

P[x,y]=Clip1(((PL0[x,y]*w0C+PL1[x,y]*w1C+(1<<logWDC))>>(logWDC+1))+((o0C+o1C+1)>>1)) …(7)   P [x, y] = Clip1 (((PL0 [x, y] * w0C + PL1 [x, y] * w1C + (1 << logWDC)) >> (logWDC + 1)) + ((o0C + o1C + 1) >> 1)) (7)

ここで、w0Cは第一予測画像に対応する重み係数、w1Cは第二予測画像に対応する重み係数、o0Cは第一予測画像に対応するオフセット、o1Cは第二予測画像に対応するオフセットを表す。以後、それぞれを第一重み係数、第二重み係数、第一オフセット、第二オフセットと呼ぶ。logWDCはそれぞれの重み係数の固定小数点精度を示すパラメータである。変数Cは、信号成分を意味する。例えば、YUV空間信号の場合、輝度信号をC=Yとし、Cr色差信号をC=Cr、Cb色差成分をC=Cbと表す。   Here, w0C represents a weighting factor corresponding to the first predicted image, w1C represents a weighting factor corresponding to the second predicted image, o0C represents an offset corresponding to the first predicted image, and o1C represents an offset corresponding to the second predicted image. . Hereinafter, these are referred to as a first weighting factor, a second weighting factor, a first offset, and a second offset, respectively. logWDC is a parameter indicating the fixed-point precision of each weighting factor. The variable C means a signal component. For example, in the case of a YUV spatial signal, the luminance signal is C = Y, the Cr color difference signal is C = Cr, and the Cb color difference component is C = Cb.

なお、重み付き動き補償部302は、第一予測画像及び第二予測画像と予測画像との演算精度が異なる場合、固定小数点精度であるlogWDCを数式(8)のように制御することで丸め処理を実現する。   Note that the weighted motion compensation unit 302 performs rounding processing by controlling logWDC, which is fixed-point precision, as in Expression (8) when the calculation accuracy of the first predicted image, the second predicted image, and the predicted image is different. Is realized.

logWD’C=logWDC+offset1 …(8)   logWD'C = logWDC + offset1 (8)

丸め処理は、数式(7)のlogWDCを、数式(8)のlogWD’Cに置き換えることで実現できる。例えば、予測画像のビット精度が8であり、第一予測画像及び第二予測画像のビット精度が14である場合、logWDCを再設定することにより、数式(1)のshift2と同様の演算精度における一括丸め処理を実現することが可能となる。   The rounding process can be realized by replacing logWDC in Expression (7) with logWD′C in Expression (8). For example, when the bit accuracy of the predicted image is 8 and the bit accuracy of the first predicted image and the second predicted image is 14, by resetting logWDC, the calculation accuracy similar to shift2 in Equation (1) can be obtained. A batch rounding process can be realized.

なお、動き情報(予測パラメータ)で示される予測モードが単方向予測である場合、重み付き動き補償部302は、第一予測画像のみを用いて、数式(9)に基づいて最終的な予測画像を算出する。   When the prediction mode indicated by the motion information (prediction parameter) is unidirectional prediction, the weighted motion compensation unit 302 uses only the first predicted image and uses the final predicted image based on Equation (9). Is calculated.

P[x,y]=Clip1((PLX[x,y]*wXC+(1<<logWDC−1))>>(logWDC)) …(9)   P [x, y] = Clip1 ((PLX [x, y] * wXC + (1 << logWDC-1)) >> (logWDC)) (9)

ここで、PLX[x,y]は単方向予測画像(第一予測画像)を示し、wXCは単方向予測に対応する重み係数を示しており、Xは参照リストの0又は1のいずれかを示す識別子である。例えば、参照リストが0の場合はPL0[x,y]、w0C、参照リストが1の場合はPL1[x,y]、w1Cとなる。   Here, PLX [x, y] indicates a unidirectional prediction image (first prediction image), wXC indicates a weighting factor corresponding to unidirectional prediction, and X indicates either 0 or 1 in the reference list. It is an identifier to indicate. For example, when the reference list is 0, PL0 [x, y] and w0C are obtained, and when the reference list is 1, PL1 [x, y] and w1C are obtained.

なお、重み付き動き補償部302は、第一予測画像及び第二予測画像と予測画像との演算精度が異なる場合、固定小数点精度であるlogWDCを双方向予測時と同様に数式(8)のように制御することで丸め処理を実現する。   Note that the weighted motion compensation unit 302, when the calculation accuracy of the first prediction image, the second prediction image, and the prediction image is different, uses the log WDC, which is a fixed-point accuracy, as in Expression (8) as in the bidirectional prediction. Rounding processing is realized by controlling to.

丸め処理は、数式(7)のlogWDCを、数式(8)のlogWD’Cに置き換えることで実現できる。例えば、予測画像のビット精度が8であり、第一予測画像のビット精度が14である場合、logWDCを再設定することにより、数式(4)のshift1と同様の演算精度における一括丸め処理を実現することが可能となる。   The rounding process can be realized by replacing logWDC in Expression (7) with logWD′C in Expression (8). For example, when the bit accuracy of the predicted image is 8 and the bit accuracy of the first predicted image is 14, the round rounding process with the same calculation accuracy as that of shift1 of Expression (4) is realized by resetting logWDC It becomes possible to do.

図7は、第1実施形態における重み係数の固定小数点精度の一例の説明図であり、時間方向の明度変化がある動画像と階調値との変化の一例を示す図である。図7に示す例では、符号化対象フレームをFrame(t)とし、時間的に1つ前のフレームをFrame(t−1)、時間的に1つ後のフレームをFrame(t+1)としている。図7に示すように、白から黒に変化するフェード画像では、画像の明度(階調値)が時間とともに減少していく。重み係数は、図7における変化の度合いを意味しており、数式(7)及び数式(9)から明らかなように、明度変化がない場合に1.0の値を取る。固定小数点精度は、重み係数の小数点に対応する刻み幅を制御するパラメータであり、明度変化がない場合の重み係数は、1<<logWDCとなる。   FIG. 7 is an explanatory diagram of an example of the fixed-point precision of the weighting coefficient in the first embodiment, and is a diagram illustrating an example of a change between a moving image having a brightness change in the time direction and a gradation value. In the example shown in FIG. 7, the encoding target frame is Frame (t), the previous frame in time is Frame (t−1), and the next frame in time is Frame (t + 1). As shown in FIG. 7, in a fade image that changes from white to black, the brightness (gradation value) of the image decreases with time. The weighting coefficient means the degree of change in FIG. 7 and takes a value of 1.0 when there is no change in brightness, as is clear from Equation (7) and Equation (9). The fixed-point precision is a parameter for controlling the step size corresponding to the decimal point of the weighting coefficient, and the weighting coefficient when there is no change in brightness is 1 << logWDC.

なお、単方向予測の場合には、第二予測画像に対応する各種パラメータ(第二WP適応フラグ,第二重み係数,及び第二オフセットの情報)は利用されないため、予め定めた初期値に設定されていてもよい。   In the case of unidirectional prediction, various parameters (second WP adaptive flag, second weighting factor, and second offset information) corresponding to the second predicted image are not used, and are set to predetermined initial values. May be.

図1に戻り、動き評価部109は、入力画像と予測画像生成部107から入力された参照画像とに基づき複数フレーム間の動き評価を行い、動き情報及びWPパラメータ情報を出力し、動き情報を予測画像生成部107及び符号化部110に入力し、WPパラメータ情報を予測画像生成部107及びインデックス設定部108に入力する。   Returning to FIG. 1, the motion evaluation unit 109 performs motion evaluation between a plurality of frames based on the input image and the reference image input from the predicted image generation unit 107, outputs motion information and WP parameter information, and stores the motion information. The prediction image generation unit 107 and the encoding unit 110 are input, and the WP parameter information is input to the prediction image generation unit 107 and the index setting unit 108.

動き評価部109は、例えば、予測対象画素ブロックの入力画像と同位置に対応する複数の参照画像を起点として差分値を計算することで誤差を算出し、この位置を分数精度でずらし、誤差最小のブロックを探すブロックマッチングなどの手法により、最適な動き情報を算出する。動き評価部109は、双方向予測の場合には、単方向予測で導出された動き情報を用いて、数式(1)及び数式(4)に示すようなデフォルト動き補償予測を含むブロックマッチングを行うことにより、双方向予測の動き情報を算出する。   For example, the motion evaluation unit 109 calculates an error by calculating a difference value starting from a plurality of reference images corresponding to the same position as the input image of the prediction target pixel block, shifts the position with a fractional accuracy, and minimizes the error. Optimal motion information is calculated by a technique such as block matching for searching for a block. In the case of bidirectional prediction, the motion evaluation unit 109 performs block matching including default motion compensation prediction as shown in Equation (1) and Equation (4) using motion information derived by unidirectional prediction. Thus, motion information for bidirectional prediction is calculated.

この際、動き評価部109は、数式(7)及び数式(9)で示されるような重み付き動き補償予測を含むブロックマッチングを行うことにより、WPパラメータ情報を算出できる。なお、WPパラメータ情報の算出には、入力画像の明度勾配を用いて重み係数やオフセットを算出する方法や、符号化した際の予測誤差の累積による重み係数やオフセットの算出方法などを用いてもよい。またWPパラメータ情報は、符号化装置毎に予め定めた固定値を用いてもよい。   At this time, the motion evaluation unit 109 can calculate WP parameter information by performing block matching including weighted motion compensated prediction as represented by Equation (7) and Equation (9). Note that the WP parameter information may be calculated using a method of calculating a weighting factor or an offset using the brightness gradient of the input image, or a method of calculating a weighting factor or an offset by accumulating prediction errors when encoded. Good. The WP parameter information may be a fixed value determined in advance for each encoding device.

ここで、図7を参照しながら、時間的に明度変化のある動画像から、重み係数、重み係数の固定小数点精度、及びオフセットを算出する方法を説明する。前述したように、図7に示すような白から黒に変化するフェード画像では、画像の明度(階調値)が時間とともに減少していく。動き評価部109は、この傾きを計算することにより、重み係数を算出することができる。   Here, a method for calculating a weighting factor, a fixed point precision of the weighting factor, and an offset from a moving image having a temporal change in brightness will be described with reference to FIG. As described above, in a fade image that changes from white to black as shown in FIG. 7, the brightness (tone value) of the image decreases with time. The motion evaluation unit 109 can calculate a weighting coefficient by calculating this inclination.

また、重み係数の固定小数点精度は、この傾きの精度を示す情報であり、動き評価部109は、参照画像の時間的な距離と画像明度の変化度から、最適な値を計算できる。例えば、図7において、Frame(t−1)〜Frame(t+1)間の重み係数が小数点精度で0.75である場合、1/4精度であれば、3/4が表現できるため、動き評価部109は、固定小数点精度を2(1<<2)に設定する。固定小数点精度の値は、重み係数を符号化した場合の符号量に影響を与えるため、符号量と予測精度を考慮して最適な値を選択すればよい。なお、固定小数点精度の値は、予め定めた固定値としてもよい。   The fixed-point precision of the weighting coefficient is information indicating the precision of the slope, and the motion evaluation unit 109 can calculate an optimum value from the temporal distance of the reference image and the degree of change in image brightness. For example, in FIG. 7, when the weighting coefficient between Frame (t-1) and Frame (t + 1) is 0.75 in decimal point precision, 3/4 can be expressed with 1/4 precision. The unit 109 sets the fixed point precision to 2 (1 << 2). Since the value of the fixed-point precision affects the code amount when the weighting coefficient is encoded, an optimal value may be selected in consideration of the code amount and the prediction accuracy. Note that the fixed-point precision value may be a predetermined fixed value.

また、動き評価部109は、傾きが一致しない場合、一次関数の切片に対応する補正値(ズレ量)を求めることでオフセット値を算出できる。例えば、図7において、Frame(t−1)〜Frame(t+1)間の重み係数が小数点精度で0.60であり、固定小数点精度が1(1<<1)である場合、重み係数は1(つまり、重み係数の小数点精度0.50に該当)が設定される可能性が高い。この場合、重み係数の小数点精度は、最適な値である0.60から0.10ずれているため、動き評価部109は、この分の補正値を画素の最大値から計算し、オフセット値として設定する。画素の最大値が255である場合、動き評価部109は、25(255×0.1)などの値を設定すればよい。   Further, when the inclinations do not match, the motion evaluation unit 109 can calculate the offset value by obtaining a correction value (deviation amount) corresponding to the intercept of the linear function. For example, in FIG. 7, when the weighting coefficient between Frame (t−1) and Frame (t + 1) is 0.60 in decimal point precision and the fixed point precision is 1 (1 << 1), the weighting coefficient is 1 (That is, it corresponds to the decimal point precision 0.50 of the weighting coefficient) is set. In this case, since the decimal point accuracy of the weighting coefficient is deviated from 0.60, which is the optimum value, by 0.10, the motion evaluation unit 109 calculates the correction value for this amount from the maximum value of the pixel and uses it as an offset value. Set. When the maximum value of the pixel is 255, the motion evaluation unit 109 may set a value such as 25 (255 × 0.1).

なお第1実施形態では、符号化装置100の一機能として動き評価部109を例示しているが、動き評価部109は符号化装置100の必須の構成ではなく、例えば、動き評価部109を符号化装置100外の装置としてもよい。この場合、動き評価部109で算出された動き情報及びWPパラメータ情報を符号化装置100にロードするようにすればよい。   In the first embodiment, the motion evaluation unit 109 is illustrated as a function of the encoding device 100. However, the motion evaluation unit 109 is not an essential component of the encoding device 100. For example, the motion evaluation unit 109 is encoded. It is good also as an apparatus outside the converter 100. In this case, the motion information and WP parameter information calculated by the motion evaluation unit 109 may be loaded into the encoding device 100.

インデックス設定部108は、動き評価部109から入力されたWPパラメータ情報を受け取り、参照リスト(リスト番号)と参照画像(参照番号)とを確認して、インデックス情報を出力し、インデックス設定部108に入力する。   The index setting unit 108 receives the WP parameter information input from the motion evaluation unit 109, confirms the reference list (list number) and the reference image (reference number), outputs the index information, and sends it to the index setting unit 108. input.

図8は、第1実施形態のインデックス設定部108の構成の一例を示すブロック図である。インデックス設定部108は、図8に示すように、参照画像確認部401と、インデックス生成部402とを、備える。   FIG. 8 is a block diagram illustrating an example of the configuration of the index setting unit 108 of the first embodiment. As illustrated in FIG. 8, the index setting unit 108 includes a reference image confirmation unit 401 and an index generation unit 402.

参照画像確認部401は、動き評価部109から入力されたWPパラメータ情報を受け取り、2つの参照リストに含まれる参照番号が互いに同一の参照画像を指しているWPパラメータがあるかどうかを確認する。そして参照画像確認部401は、WPパラメータ情報のうち同一の参照画像を指しているWPパラメータを削除し、削除後のWPパラメータ情報を出力し、インデックス生成部402に入力する。   The reference image confirmation unit 401 receives the WP parameter information input from the motion evaluation unit 109 and confirms whether there is a WP parameter in which the reference numbers included in the two reference lists indicate the same reference image. The reference image confirmation unit 401 deletes the WP parameter indicating the same reference image from the WP parameter information, outputs the WP parameter information after the deletion, and inputs the WP parameter information to the index generation unit 402.

インデックス生成部402は、参照画像確認部401から冗長なWPパラメータが削除されたWPパラメータ情報を受け取り、後述するシンタクス要素にマッピングを行ってインデックス情報を生成する。インデックス生成部402は、インデックス情報を出力し、符号化部110に入力する。   The index generation unit 402 receives the WP parameter information from which the redundant WP parameter has been deleted from the reference image confirmation unit 401, performs mapping on syntax elements described later, and generates index information. The index generation unit 402 outputs index information and inputs it to the encoding unit 110.

図9A及び図9Bは、第1実施形態のWPパラメータ情報の一例を示す図である。P−
slice時のWPパラメータ情報の一例は、図9Aに示すとおりであり、B−slice時のWPパラメータ情報の一例は、図9A及び図9Bに示すとおりである。リスト番号は、予測方向を示す識別子であり、単方向予測時は0の値を取り、双方向予測時は2種類の予測を用いることができるため、0と1の2つの値を取る。参照番号は、フレームメモリ206に示される1〜Nに対応する値である。WPパラメータ情報は、参照リストと参照画像毎に保持されるため、B−slice時で必要な情報は、参照画像がN個とすると2N個となる。参照画像確認部401は、これらのWPパラメータ情報を再変換し、冗長なWPパラメータを削除する。
9A and 9B are diagrams illustrating examples of WP parameter information according to the first embodiment. P-
An example of the WP parameter information at the time of slice is as shown in FIG. 9A, and an example of the WP parameter information at the time of B-slice is as shown in FIGS. 9A and 9B. The list number is an identifier indicating the prediction direction, and takes a value of 0 when unidirectional prediction is used, and two values of 0 and 1 can be used when bidirectional prediction is used. The reference numbers are values corresponding to 1 to N indicated in the frame memory 206. Since the WP parameter information is held for each reference list and reference image, the information necessary for the B-slice is 2N when the number of reference images is N. The reference image confirmation unit 401 reconverts these WP parameter information and deletes redundant WP parameters.

図10は、第1実施形態の低遅延符号化構造における符号化順と表示順(POC:Pciture Order Count)の一例を示す図であり、参照画像となることが可能なB−sliceをrB−sliceとして用いた符号化構造の例を示している。低遅延符号化構造では、画像の先読みが出来ないため、符号化順と表示順が同一となる。ここでは、表示順でフレーム0〜3までが符号化済みとし、フレーム4を符号化することを考える。   FIG. 10 is a diagram illustrating an example of a coding order and a display order (POC: Pcorder Order Count) in the low-delay coding structure according to the first embodiment. A B-slice that can be a reference image is represented by rB- The example of the encoding structure used as slice is shown. In the low-delay coding structure, since the image cannot be prefetched, the coding order and the display order are the same. Here, it is assumed that frames 0 to 3 are already encoded in the display order, and frame 4 is encoded.

図11は、第1実施形態の低遅延符号化構造における参照画像と参照番号との関係の一例を示す図であり、フレーム4を符号化する場合の参照画像と参照番号との関係を簡略化したWPパラメータ情報で示している。図11に示す例では、参照リスト内の参照番号の順序がリスト0とリスト1とで同一となっており、リスト0とリスト1との参照画像が同一であることを意味している。   FIG. 11 is a diagram illustrating an example of a relationship between a reference image and a reference number in the low delay coding structure according to the first embodiment, and simplifies the relationship between the reference image and the reference number when the frame 4 is encoded. WP parameter information. In the example shown in FIG. 11, the order of reference numbers in the reference list is the same in list 0 and list 1, which means that the reference images in list 0 and list 1 are the same.

図12は、第1実施形態のランダムアクセス符号化構造における符号化順と表示順の一例を示す図であり、ここでは、表示順でフレーム0、2、4、8が符号化済みであり、フレーム1を符号化することを考える。   FIG. 12 is a diagram illustrating an example of the encoding order and the display order in the random access encoding structure of the first embodiment. Here, frames 0, 2, 4, and 8 have been encoded in the display order. Consider encoding frame 1.

図13は、第1実施形態のランダムアクセス符号化構造における参照画像と参照番号との関係の一例を示す図であり、フレーム1を符号化する場合の参照画像と参照番号との関係を簡略化したWPパラメータ情報で示している。図13に示す例では、参照リスト別の参照番号の順序はそれぞれ異なっているが、リスト0とリスト1とには、共通の4つの参照画像が含まれており、リスト0とリスト1との参照画像が同一であることを意味している。   FIG. 13 is a diagram illustrating an example of the relationship between the reference image and the reference number in the random access coding structure according to the first embodiment, and simplifies the relationship between the reference image and the reference number when encoding frame 1. WP parameter information. In the example illustrated in FIG. 13, the order of reference numbers for each reference list is different, but list 0 and list 1 include four common reference images. This means that the reference images are the same.

参照画像確認部401は、冗長なWPパラメータ、即ち、2つの参照リストに含まれる参照番号が互いに同一の参照画像を指しているWPパラメータを削除するため、参照番号を並び替え、共通の新しいインデックスに変換する。   The reference image confirmation unit 401 deletes redundant WP parameters, that is, WP parameters indicating the same reference images included in the two reference lists, so that the reference numbers are rearranged and a common new index Convert to

図14は、第1実施形態の参照画像のリスト番号及び参照番号のスキャン順序の一例を示す図である。参照画像確認部401は、図14に示すスキャン順で、2次元の参照リスト(2つの参照リスト)を1次元の共通リスト(1つの共通リスト)に変換する。具体的には、参照画像確認部401は、図14に示すスキャン順で、図9A及び図9Bに示すWPパラメータ情報を読み込むことにより、2つの参照リストを共通リストに並び替え、冗長なWPパラメータを削除する。ここでは、参照画像確認部401は、数式(10)に示す疑似コードに従って、WPパラメータ情報を読み込む。   FIG. 14 is a diagram illustrating an example of a reference image list number and a reference number scan order according to the first embodiment. The reference image confirmation unit 401 converts a two-dimensional reference list (two reference lists) into a one-dimensional common list (one common list) in the scan order shown in FIG. Specifically, the reference image confirmation unit 401 reads the WP parameter information shown in FIGS. 9A and 9B in the scan order shown in FIG. 14, rearranges the two reference lists into a common list, and redundant WP parameters. Is deleted. Here, the reference image confirmation unit 401 reads WP parameter information in accordance with the pseudo code shown in Equation (10).

for (scan=0; scan<=num_of_common_active_ref_minus1; scan++){
list = common_scan_list(scan)
ref_idx = common_scan_ref_idx(scan)
refPOC = RefPicOrderCount(list, ref_idx)
identical_ref_flag=false;
for (curridx=0; curridx<=num_of_common_active_ref_minus1; curridx++){
if( refPOC == CommonRefPicOrderCount(curridx) ){
identical_ref_flag=true;
}
}
if(!identical_ref_flag)
InsertCommonRefPicOrderCount(scan, refPOC);
} …(10)
for (scan = 0; scan <= num_of_common_active_ref_minus1; scan ++) {
list = common_scan_list (scan)
ref_idx = common_scan_ref_idx (scan)
refPOC = RefPicOrderCount (list, ref_idx)
identical_ref_flag = false;
for (curridx = 0; curridx <= num_of_common_active_ref_minus1; curridx ++) {
if (refPOC == CommonRefPicOrderCount (curridx)) {
identical_ref_flag = true;
}
}
if (! identical_ref_flag)
InsertCommonRefPicOrderCount (scan, refPOC);
} (10)

ここで、common_scan_list()は、図14のスキャン番号に対応するリスト番号を返す関数である。common_scan_ref_idx()は、図14のスキャン番号に対応する参照番号を返す関数である。RefPicOrderCnt()は、リスト番号及び参照番号に対応するPOC番号を返す関数である。POC番号は、参照画像の表示順を示す番号である。但し、POC番号は、予め定められた最大数を超える場合、初期値にマッピングされる。例えば、POC番号の最大値が255である場合、256に対応するPOC番号は0となる。CommonRefPicOrderCount()は、共通リスト(CommonList)の参照番号に対応するPOC番号を返す関数である。InsertCommonRefPicOrderCount()は、スキャン番号に対応するPOC番号を、共通リスト(CommonList)に挿入する関数である。   Here, common_scan_list () is a function that returns a list number corresponding to the scan number of FIG. common_scan_ref_idx () is a function that returns a reference number corresponding to the scan number of FIG. RefPicOrderCnt () is a function that returns a POC number corresponding to a list number and a reference number. The POC number is a number indicating the display order of reference images. However, when the POC number exceeds a predetermined maximum number, the POC number is mapped to an initial value. For example, when the maximum POC number is 255, the POC number corresponding to 256 is 0. CommonRefPicOrderCount () is a function that returns a POC number corresponding to the reference number of the common list (CommonList). InsertCommonRefPicOrderCount () is a function for inserting a POC number corresponding to a scan number into a common list (CommonList).

なお、図14に示すスキャン順序は一例であり、予め定めたスキャン順序であればこれ以外のスキャン順序を用いてもよい。また、数式(10)で示した疑似コードは一例であり、本処理の目的を実現できれば処理の追加や冗長な処理の削減も可能である。   Note that the scan order shown in FIG. 14 is an example, and any other scan order may be used as long as it is a predetermined scan order. Further, the pseudo code shown in Equation (10) is an example, and if the purpose of this processing can be realized, it is possible to add processing and reduce redundant processing.

図15及び図16は、第1実施形態における共通リスト変換後のWPパラメータ情報の一例を簡略化して示した図である。図15は、図11に示す参照リストのWPパラメータ情報を変換した共通リストのWPパラメータ情報を簡略化して示しており、図16は、図13に示す参照リストのWPパラメータ情報を変換した共通リストのWPパラメータ情報を簡略化して示している。   FIGS. 15 and 16 are diagrams showing a simplified example of WP parameter information after common list conversion in the first embodiment. 15 shows simplified WP parameter information of the common list obtained by converting the WP parameter information of the reference list shown in FIG. 11, and FIG. 16 shows a common list obtained by converting the WP parameter information of the reference list shown in FIG. The WP parameter information is simply shown.

図17は、第1実施形態のインデックス設定部108で実行されるインデックス情報の生成処理の一例を示すフローチャートである。   FIG. 17 is a flowchart illustrating an example of index information generation processing executed by the index setting unit 108 of the first embodiment.

参照画像確認部401は、WPパラメータ情報が入力されると、スライスタイプに従って処理を分岐する(ステップS101)。   When the WP parameter information is input, the reference image confirmation unit 401 branches the process according to the slice type (step S101).

スライスタイプが1つの参照リストのみを用いる単方向予測スライス(P−slice)である場合には(ステップS101でNo)、参照画像確認部401は、図9Aに示すWPパラメータ情報をそのままインデックス生成部402へ出力する。インデックス生成部402は、参照画像確認部401から入力されたWPパラメータ情報を後述する予め定められたシンタクス要素にマッピングしてインデックス情報を生成し、出力する。   When the slice type is a unidirectional prediction slice (P-slice) using only one reference list (No in step S101), the reference image confirmation unit 401 directly uses the WP parameter information illustrated in FIG. 9A as an index generation unit. Output to 402. The index generation unit 402 generates index information by mapping the WP parameter information input from the reference image confirmation unit 401 to a predetermined syntax element to be described later, and outputs the index information.

一方、スライスタイプが2つの参照リストを用いる双方向予測スライス(B−slice)である場合には(ステップS101でYes)、参照画像確認部401は、変数scanを0に初期化する(ステップS102)。変数scanは、図14のスキャン番号を示す。   On the other hand, when the slice type is a bi-predictive slice (B-slice) using two reference lists (Yes in step S101), the reference image confirmation unit 401 initializes the variable scan to 0 (step S102). ). The variable scan indicates the scan number in FIG.

続いて、参照画像確認部401は、変数scanを用いて、スキャン番号に対応するリスト番号を示す変数listを取得するとともに(ステップS103)、スキャン番号に対応する参照番号を示す変数refIdxを取得する(ステップS104)。   Subsequently, the reference image confirmation unit 401 acquires a variable list indicating a list number corresponding to the scan number by using the variable scan (step S103), and acquires a variable refIdx indicating the reference number corresponding to the scan number. (Step S104).

続いて、参照画像確認部401は、変数listが示すリスト番号及び変数refIdxが示す参
照番号に対応する参照画像のPOC番号を示す変数refPOCを導出する(ステップS105)。
Subsequently, the reference image confirmation unit 401 derives a variable refPOC indicating the POC number of the reference image corresponding to the list number indicated by the variable list and the reference number indicated by the variable refIdx (step S105).

続いて、参照画像確認部401は、フラグidentical_ref_flagをfalseに設定するとともに(ステップS106)、変数curridxを0に設定する(ステップS107)。フラグidentical_ref_flagは、共通リストに同一の参照画像があるか否かを示す。変数curridxは、共通リストの参照番号を示す。   Subsequently, the reference image confirmation unit 401 sets the flag “identical_ref_flag” to “false” (step S106), and sets the variable “curridx” to “0” (step S107). The flag “identical_ref_flag” indicates whether or not the same reference image exists in the common list. The variable curridx indicates the reference number of the common list.

続いて、参照画像確認部401は、導出した変数refPOCが示すPOC番号と変数curridxが示す参照番号に対応する参照画像のPOC番号とが同一であるかどうかを判断する(ステップS108)。   Subsequently, the reference image confirmation unit 401 determines whether the POC number indicated by the derived variable refPOC is the same as the POC number of the reference image corresponding to the reference number indicated by the variable curridx (step S108).

両POC番号が同一である場合(ステップS108でYes)、参照画像確認部401は、フラグidentical_ref_flagをtrueに設定する(ステップS109)。一方、両POC番号が同一でない場合(ステップS108でNo)、ステップS109の処理は行われない。   When both POC numbers are the same (Yes in Step S108), the reference image confirmation unit 401 sets the flag “identical_ref_flag” to true (Step S109). On the other hand, when both POC numbers are not the same (No in step S108), the process of step S109 is not performed.

続いて、参照画像確認部401は、変数curridxをインクリメントする(ステップS110)。   Subsequently, the reference image confirmation unit 401 increments the variable curridx (step S110).

続いて、参照画像確認部401は、変数curridxの値が共通リストの最大数から1を引いた値であるnum_of_common_active_ref_minus1より大きいかどうかを判断し(ステップS111)、num_of_common_active_ref_minus1以下の間(ステップS111でNo)、ステップS108〜ステップS110の処理を繰り返す。   Subsequently, the reference image confirmation unit 401 determines whether or not the value of the variable curridx is larger than num_of_common_active_ref_minus1 that is a value obtained by subtracting 1 from the maximum number of common lists (step S111), and during num_of_common_active_ref_minus1 or less (No in step S111) ), The process of step S108 to step S110 is repeated.

num_of_common_active_ref_minus1より大きくなると(ステップS111でYes)、参照画像確認部401は、共通リストの確認を完了し、フラグidentical_ref_flagがfalseかどうかを更に確認する(ステップS112)。   When it becomes larger than num_of_common_active_ref_minus1 (Yes in step S111), the reference image confirmation unit 401 completes confirmation of the common list, and further confirms whether the flag identification_ref_flag is false (step S112).

フラグidentical_ref_flagがfalseの場合(ステップS112でYes)、参照画像確認部401は、共通リストに変数refPOCが示すPOC番号の参照画像と同一の参照画像が含まれないと判断し、変数refPOCが示すPOC番号を共通リストに追加する(ステップS113)。一方、フラグidentical_ref_flagがtrueの場合(ステップS112でNo)、参照画像確認部401は、共通リストに変数refPOCが示すPOC番号の参照画像と同一の参照画像が含まれると判断し、ステップS113の処理は行わない。   When the flag “identical_ref_flag” is false (Yes in step S112), the reference image confirmation unit 401 determines that the common list does not include the same reference image as the reference image having the POC number indicated by the variable refPOC, and the POC indicated by the variable refPOC. The number is added to the common list (step S113). On the other hand, if the flag identifier_ref_flag is true (No in step S112), the reference image confirmation unit 401 determines that the same reference image as the reference image of the POC number indicated by the variable refPOC is included in the common list, and the process of step S113 Do not do.

続いて、参照画像確認部401は、変数scanをインクリメントする(ステップS114)。   Subsequently, the reference image confirmation unit 401 increments the variable scan (step S114).

続いて、参照画像確認部401は、変数scanの値が共通リストの最大数から1を引いた値であるnum_of_common_active_ref_minus1より大きいかどうかを判断し(ステップS115)、num_of_common_active_ref_minus1以下であれば(ステップS115でNo)、ステップS103に戻る。一方、num_of_common_active_ref_minus1より大きければ(ステップS115でYes)、参照画像確認部401は、共通リストに変換後のWPパラメータ情報をインデックス生成部402へ出力する。インデックス生成部402は、参照画像確認部401から入力されたWPパラメータ情報を後述する予め定められたシンタクス要素にマッピングしてインデックス情報を生成し、出力する。   Subsequently, the reference image confirmation unit 401 determines whether or not the value of the variable scan is larger than num_of_common_active_ref_minus1 that is a value obtained by subtracting 1 from the maximum number of common lists (step S115), and if it is less than or equal to num_of_common_active_ref_minus1 (in step S115) No), it returns to step S103. On the other hand, if it is larger than num_of_common_active_ref_minus1 (Yes in step S115), the reference image confirmation unit 401 outputs the WP parameter information converted into the common list to the index generation unit 402. The index generation unit 402 generates index information by mapping the WP parameter information input from the reference image confirmation unit 401 to a predetermined syntax element to be described later, and outputs the index information.

図1に戻り、符号化部110は、量子化部103から入力された量子化変換係数、動き評価部109から入力された動き情報、インデックス設定部108から入力されたインデ
ックス情報、及び符号化制御部111によって指定される量子化情報などの様々な符号化パラメータに対してエントロピー符号化を行い、符号化データを生成する。エントロピー符号化は、例えば、ハフマン符号化や算術符号化などが該当する。
Returning to FIG. 1, the encoding unit 110 receives the quantized transform coefficient input from the quantization unit 103, the motion information input from the motion evaluation unit 109, the index information input from the index setting unit 108, and the encoding control. Entropy encoding is performed on various encoding parameters such as quantization information specified by the unit 111 to generate encoded data. Entropy coding corresponds to, for example, Huffman coding or arithmetic coding.

符号化パラメータとは、予測方法などを示す予測情報、量子化変換係数に関する情報、及び量子化に関する情報などの復号に必要となるパラメータである。例えば、符号化制御部111が図示せぬ内部メモリを持ち、この内部メモリに符号化パラメータが保持され、画素ブロックを符号化する際に隣接する既に符号化済みの画素ブロックの符号化パラメータを用いるようにできる。例えば、H.264のイントラ予測では、符号化済みの隣接ブロックの予測情報から、画素ブロックの予測情報を導出することができる。   The encoding parameter is a parameter required for decoding, such as prediction information indicating a prediction method, information on quantization transform coefficients, information on quantization, and the like. For example, the encoding control unit 111 has an internal memory (not shown), the encoding parameters are held in the internal memory, and the encoding parameters of the adjacent already encoded pixel block are used when encoding the pixel block. You can For example, H.M. In the H.264 intra prediction, the prediction information of the pixel block can be derived from the prediction information of the encoded adjacent block.

符号化部110は、生成した符号化データを、符号化制御部111が管理する適切な出力タイミングに従って出力する。出力された符号化データは、例えば、図示せぬ多重化部などで様々な情報が多重化されて、図示せぬ出力バッファなどに一時的に蓄積された後に、例えば、図示せぬ蓄積系(蓄積メディア)又は伝送系(通信回線)へ出力される。   The encoding unit 110 outputs the generated encoded data according to an appropriate output timing managed by the encoding control unit 111. The output encoded data is, for example, multiplexed with various information such as a multiplexing unit (not shown) and temporarily stored in an output buffer (not shown). (Storage medium) or transmission system (communication line).

図18は、第1実施形態の符号化装置100が利用するシンタクス500の一例を示す図である。シンタクス500は、符号化装置100が入力画像(動画像データ)を符号化して生成した符号化データの構造を示している。符号化データを復号化する場合、後述の復号装置は、シンタクス500と同一のシンタクス構造を参照して動画像のシンタクス解釈を行う。   FIG. 18 is a diagram illustrating an example of the syntax 500 used by the encoding device 100 according to the first embodiment. A syntax 500 indicates a structure of encoded data generated by the encoding apparatus 100 by encoding an input image (moving image data). When decoding the encoded data, a decoding device described later refers to the same syntax structure as that of the syntax 500 and interprets the syntax of the moving image.

シンタクス500は、ハイレベルシンタクス501、スライスレベルシンタクス502及びコーディングツリーレベルシンタクス503の3つのパートを含む。ハイレベルシンタクス501は、スライスよりも上位のレイヤのシンタクス情報を含む。スライスとは、フレーム若しくはフィールドに含まれる矩形領域又は連続領域を指す。スライスレベルシンタクス502は、各スライスを復号化するために必要な情報を含む。コーディングツリーレベルシンタクス503は、各コーディングツリー(即ち、各コーディングツリーブロック)を復号するために必要な情報を含む。これら各パートは、更に詳細なシンタクスを含む。   The syntax 500 includes three parts: a high level syntax 501, a slice level syntax 502, and a coding tree level syntax 503. The high level syntax 501 includes syntax information of a layer higher than the slice. A slice refers to a rectangular area or a continuous area included in a frame or a field. The slice level syntax 502 includes information necessary for decoding each slice. The coding tree level syntax 503 includes information necessary for decoding each coding tree (ie, each coding tree block). Each of these parts includes more detailed syntax.

ハイレベルシンタクス501は、シーケンスパラメータセットシンタクス504、ピクチャパラメータセットシンタクス505、及びアダプテーションパラメータセットシンタクス506などのシーケンス及びピクチャレベルのシンタクスを含む。   The high level syntax 501 includes sequence and picture level syntaxes such as a sequence parameter set syntax 504, a picture parameter set syntax 505, and an adaptation parameter set syntax 506.

スライスレベルシンタクス502は、スライスヘッダーシンタクス507、プレッドウェイトテーブルシンタクス508、及びスライスデータシンタクス509などを含む。プレッドウェイトテーブルシンタクス508は、スライスヘッダーシンタクス507から呼び出される。   The slice level syntax 502 includes a slice header syntax 507, a breadweight table syntax 508, a slice data syntax 509, and the like. The tread weight table syntax 508 is called from the slice header syntax 507.

コーディングツリーレベルシンタクス503は、コーディングツリーユニットシンタクス510、トランスフォームユニットシンタクス511、及びプレディクションユニットシンタクス512などを含む。コーディングツリーユニットシンタクス510は、四分木構造を持つことができる。具体的には、コーディングツリーユニットシンタクス510のシンタクス要素として、更にコーディングツリーユニットシンタクス510を再帰呼び出しすることができる。即ち、1つのコーディングツリーブロックを四分木で細分化することができる。また、コーディングツリーユニットシンタクス510内にはトランスフォームユニットシンタクス511が含まれている。トランスフォームユニットシンタクス511は、四分木の最末端の各コーディングツリーユニットシンタクス510において呼び出される。トランスフォームユニットシンタクス511は、逆直交変換及び量子化などに関
わる情報が記述されている。これらのシンタクスには、重み付き動き補償予測に関する情報が記述されてもよい。
The coding tree level syntax 503 includes a coding tree unit syntax 510, a transform unit syntax 511, a prediction unit syntax 512, and the like. The coding tree unit syntax 510 may have a quadtree structure. Specifically, the coding tree unit syntax 510 can be recursively called as a syntax element of the coding tree unit syntax 510. That is, one coding tree block can be subdivided with a quadtree. The coding tree unit syntax 510 includes a transform unit syntax 511. The transform unit syntax 511 is called in each coding tree unit syntax 510 at the extreme end of the quadtree. The transform unit syntax 511 describes information related to inverse orthogonal transformation and quantization. In these syntaxes, information related to weighted motion compensation prediction may be described.

図19は、第1実施形態のピクチャパラメータセットシンタクス505の一例を示す図である。weighted_pred_flagは、例えば、P−sliceに関する第1実施形態の重み付き補償予測の有効又は無効を示すシンタクス要素である。weighted_pred_flagが0である場合、P−slice内での第1実施形態の重み付き動き補償予測は無効となる。従って、WPパラメータ情報に含まれるWP適用フラグは常に0に設定され、WPセレクタ304、305は、各々の出力端をデフォルト動き補償部301へ接続する。一方、weighted_pred_flagが1である場合、P−slice内での第1実施形態の重み付き動き補償予測は有効となる。   FIG. 19 is a diagram illustrating an example of the picture parameter set syntax 505 according to the first embodiment. The weighted_pred_flag is a syntax element indicating, for example, whether the weighted compensated prediction of the first embodiment related to P-slice is valid or invalid. When weighted_pred_flag is 0, the weighted motion compensation prediction of the first embodiment in the P-slice is invalid. Accordingly, the WP application flag included in the WP parameter information is always set to 0, and the WP selectors 304 and 305 connect the respective output terminals to the default motion compensation unit 301. On the other hand, when weighted_pred_flag is 1, the weighted motion compensation prediction of the first embodiment in the P-slice is valid.

なお、別の例として、weighted_pred_flagが1である場合には、より下位のレイヤ(スライスヘッダー、コーディングツリーブロック、トランスフォームユニット、及びプレディクションユニットなど)のシンタクスにおいて、スライス内部の局所領域毎に第1実施形態の重み付き動き補償予測の有効又は無効を規定するようにしてもよい。   As another example, when weighted_pred_flag is 1, in the syntax of lower layers (slice header, coding tree block, transform unit, prediction unit, etc.) The validity or invalidity of the weighted motion compensated prediction of one embodiment may be specified.

weighted_bipred_idcは、例えば、B−sliceに関する第1実施形態の重み付き補償予測の有効又は無効を示すシンタクス要素である。weighted_bipred_idcが0である場合、B−slice内での第1実施形態の重み付き動き補償予測は無効となる。従って、WPパラメータ情報に含まれるWP適用フラグは常に0に設定され、WPセレクタ304、305は、各々の出力端をデフォルト動き補償部301へ接続する。一方、weighted_bipred_idcが1である場合、B−slice内での第1実施形態の重み付き動き補償予測は有効となる。   For example, weighted_bipred_idc is a syntax element indicating whether the weighted compensated prediction of the first embodiment related to B-slice is valid or invalid. When weighted_bipred_idc is 0, the weighted motion compensated prediction of the first embodiment in the B-slice is invalid. Accordingly, the WP application flag included in the WP parameter information is always set to 0, and the WP selectors 304 and 305 connect the respective output terminals to the default motion compensation unit 301. On the other hand, when weighted_bipred_idc is 1, the weighted motion compensated prediction of the first embodiment in the B-slice is valid.

なお、別の例として、weighted_bipred_idcが1である場合には、より下位のレイヤ(スライスヘッダー、コーディングツリーブロック、及びトランスフォームユニットなど)のシンタクスにおいて、スライス内部の局所領域毎に第1実施形態の重み付き動き補償予測の有効又は無効を規定するようにしてもよい。   As another example, when weighted_bipred_idc is 1, in the syntax of lower layers (slice header, coding tree block, transform unit, etc.), the syntax of the first embodiment is determined for each local region inside the slice. The validity or invalidity of the weighted motion compensation prediction may be defined.

図20は、第1実施形態のスライスヘッダーシンタクス507の一例を示す図である。slice_typeはスライスのスライスタイプ(I−slice,P−slice,B−sliceなど)を示している。pic_parameter_set_idは、いずれのピクチャパラメータセットシンタクス505を参照するかを示す識別子である。num_ref_idx_active_override_flagは、有効な参照画像の数を更新するかどうかを示すフラグであり、本フラグが1の場合、参照リストの参照画像数を定義するnum_ref_idx_l0_active_minus1及びnum_ref_idx_l1_active_minus1が利用できる。pred_weight_table()は、重み付き動き補償予測に利用するプレッドウェイトテーブルシンタクスを示す関数であり、前述のweighted_pred_flagが1かつP−sliceの場合、及びweighted_bipred_idcが1かつB−sliceの場合に、本関数が呼び出される。   FIG. 20 is a diagram illustrating an example of the slice header syntax 507 according to the first embodiment. slice_type indicates the slice type (I-slice, P-slice, B-slice, etc.) of the slice. pic_parameter_set_id is an identifier indicating which picture parameter set syntax 505 is to be referred to. num_ref_idx_active_override_flag is a flag indicating whether or not the number of valid reference images is updated. When this flag is 1, num_ref_idx_l0_active_minus1 and num_ref_idx_l1_active_minus1 that define the number of reference images in the reference list can be used. pred_weight_table () is a function indicating the predicate weight table syntax used for weighted motion compensation prediction. When the above weighted_pred_flag is 1 and P-slice, and when weighted_bipred_idc is 1 and B-slice, this function is Called.

図21は、第1実施形態のプレッドウェイトテーブルシンタクス508の一例を示す図である。luma_log2_weight_denomは、スライスにおける輝度信号の重み係数の固定小数点精度を表しており、数式(7)又は数式(9)のlogWDCに対応する値である。chroma_log2_weight_denomは、スライスにおける色差信号の重み係数の固定小数点精度を表しており、数式(7)又は数式(9)のlogWDCに対応する値である。chroma_format_idcは、色空間を表す識別子であり、MONO_IDXはモノクロ映像を示す値である。num_ref_common_active_minus1は、スライスにおける共通リストに含まれる参照画像の数から1を引いた値を示し、数式(10)で用いられる。この値の最大値は、リスト0とリスト1の2つの参照画像枚数の最大値を足した値となる。   FIG. 21 is a diagram illustrating an example of the tread weight table syntax 508 according to the first embodiment. luma_log2_weight_denom represents the fixed-point precision of the weighting factor of the luminance signal in the slice, and is a value corresponding to the log WDC in Equation (7) or Equation (9). chroma_log2_weight_denom represents the fixed-point precision of the weight coefficient of the color difference signal in the slice, and is a value corresponding to the log WDC in Equation (7) or Equation (9). chroma_format_idc is an identifier representing a color space, and MONO_IDX is a value indicating a monochrome video. num_ref_common_active_minus1 indicates a value obtained by subtracting 1 from the number of reference images included in the common list in the slice, and is used in Expression (10). The maximum value of this value is a value obtained by adding the maximum values of the two reference image numbers of list 0 and list 1.

luma_weight_common_flagは、輝度信号におけるWP適応フラグを示している。本フラグが1の場合、スライス内全域で第1実施形態の輝度信号の重み付き動き補償予測が有効となる。chroma_weight_common_flagは、色差信号におけるWP適応フラグを示している。本フラグが1の場合、スライス内全域で第1実施形態の色差信号の重み付き動き補償予測が有効となる。luma_weight_common[i]は、共通リストで管理されたi番目に対応する輝度信号の重み係数である。luma_offset_common[i]は、共通リストで管理されたi番目に対応する輝度信号のオフセットである。これらは、それぞれ、数式(7)又は数式(9)のw0C、w1C、o0C、o1Cに対応する値である。但し、C=Yとする。   luma_weight_common_flag indicates a WP adaptation flag in the luminance signal. When this flag is 1, the weighted motion compensated prediction of the luminance signal of the first embodiment is effective over the entire slice. chroma_weight_common_flag indicates a WP adaptation flag in the color difference signal. When this flag is 1, the weighted motion compensation prediction of the chrominance signal of the first embodiment is effective over the entire slice. luma_weight_common [i] is a weighting factor of the luminance signal corresponding to the i-th managed in the common list. luma_offset_common [i] is an offset of the luminance signal corresponding to the i-th managed in the common list. These are values corresponding to w0C, w1C, o0C, and o1C, respectively, of Equation (7) or Equation (9). However, C = Y.

chroma_weight_common[i][j]は、共通リストで管理されたi番目に対応する色差信号の重み係数である。chroma_offset_common[i][j]は、共通リストで管理されたi番目に対応する色差信号のオフセットである。これらは、それぞれ、数式(7)又は数式(9)のw0C、w1C、o0C、o1Cに対応する値である。但し、C=Cr又はCbとする。jは色差成分のコンポーネントを示しており、例えばYUV4:2:0信号の場合、j=0がCr成分、j=1がCb成分であることを示す。   chroma_weight_common [i] [j] is a weight coefficient of the color difference signal corresponding to the i-th managed in the common list. chroma_offset_common [i] [j] is an offset of the color difference signal corresponding to the i-th managed in the common list. These are values corresponding to w0C, w1C, o0C, and o1C, respectively, of Equation (7) or Equation (9). However, C = Cr or Cb. j indicates a component of a color difference component. For example, in the case of a YUV 4: 2: 0 signal, j = 0 indicates a Cr component and j = 1 indicates a Cb component.

以上のように第1実施形態では、インデックス設定部108は、WPパラメータ情報において、リスト0及びリスト1の2つの参照リスト内に互いに同一の参照画像を含む組み合わせがある場合、2つの参照リストを共通リストへ変換することによって、WPパラメータ情報から重複する冗長なWPパラメータを削除してインデックス情報を生成する。従って、第1実施形態によれば、インデックス情報の符号量を削減することができる。   As described above, in the first embodiment, the index setting unit 108 includes two reference lists when there is a combination including the same reference image in the two reference lists of the list 0 and the list 1 in the WP parameter information. By converting to a common list, redundant redundant WP parameters are deleted from the WP parameter information to generate index information. Therefore, according to the first embodiment, the code amount of the index information can be reduced.

特に、重み係数及びオフセットは、参照画像毎に符号化する必要があるため、参照画像枚数の増加に従ってデコーダにシグナリングする情報量も増大するが、参照画像枚数が増加すると、参照リスト内に同一の参照画像を参照するケースが増えるため、共通リストで管理することにより大幅な符号量の削減効果が期待できる。   In particular, since the weighting factor and the offset need to be encoded for each reference image, the amount of information signaled to the decoder increases as the number of reference images increases. However, when the number of reference images increases, the same information is included in the reference list. Since the number of cases in which reference images are referred to increases, a large code amount reduction effect can be expected by managing the reference images.

(第1実施形態の変形例)
第1実施形態の変形例について説明する。第1実施形態の変形例では、インデックス生成部402が用いるシンタクス要素が第1実施形態のシンタクス要素と異なる。
(Modification of the first embodiment)
A modification of the first embodiment will be described. In the modification of the first embodiment, the syntax elements used by the index generation unit 402 are different from the syntax elements of the first embodiment.

図22は、第1実施形態の変形例のシーケンスパラメータセットシンタクス504の一例を示す図である。profile_idcは、符号化データのプロファイルに関する情報を示す識別子である。level_idcは、符号化データのレベルに関する情報を示す識別子である。seq_parameter_set_idは、いずれのシーケンスパラメータセットシンタクス504を参照するかを示す識別子である。num_ref_framesは、フレームにおける参照画像の最大枚数を示す変数である。weighted_prediction_enabled_flagは、例えば、符号化データに関して変形例の重み付き動き補償予測の有効又は無効を示すシンタクス要素である。   FIG. 22 is a diagram illustrating an example of a sequence parameter set syntax 504 according to a modification of the first embodiment. profile_idc is an identifier indicating information on a profile of encoded data. level_idc is an identifier indicating information on the level of encoded data. seq_parameter_set_id is an identifier indicating which sequence parameter set syntax 504 is to be referred to. num_ref_frames is a variable indicating the maximum number of reference images in a frame. The weighted_prediction_enabled_flag is a syntax element indicating, for example, whether the weighted motion compensated prediction of the modified example is valid or invalid with respect to the encoded data.

weighted_prediction_enabled_flagが0である場合、符号化データ内での変形例の重み付き動き補償予測は無効となる。従って、WPパラメータ情報に含まれるWP適用フラグは常に0に設定され、WPセレクタ304、305は、各々の出力端をデフォルト動き補償部301へ接続する。一方、weighted_prediction_enabled_flagが1である場合、符号化データ内全域で変形例の重み付き動き補償予測が有効となる。   When weighted_prediction_enabled_flag is 0, the weighted motion compensated prediction of the modified example in the encoded data is invalid. Accordingly, the WP application flag included in the WP parameter information is always set to 0, and the WP selectors 304 and 305 connect the respective output terminals to the default motion compensation unit 301. On the other hand, when weighted_prediction_enabled_flag is 1, the weighted motion compensation prediction of the modified example is valid over the entire encoded data.

なお、別の例として、weighted_prediction_enabled_flagが1である場合には、より下位のレイヤ(ピクチャパラメータセット、アダプテーションパラメータセット、スライスヘッダー、コーディングツリーブロック、トランスフォームユニット、及びプレディクションユニットなど)のシンタクスにおいて、スライス内部の局所領域毎に変形例の重み付
き動き補償予測の有効又は無効を規定するようにしてもよい。
As another example, when weighted_prediction_enabled_flag is 1, in the syntax of lower layers (picture parameter set, adaptation parameter set, slice header, coding tree block, transform unit, prediction unit, etc.) The validity or invalidity of the weighted motion compensated prediction of the modified example may be defined for each local region inside the slice.

図23は、第1実施形態の変形例のアダプテーションパラメータセットシンタクス506の一例を示す図である。アダプテーションパラメータセットシンタクス506は、符号化フレーム全体に影響を与えるパラメータを保持しており、上位ユニットとして独立に符号化される。例えば、H.264では、ハイレベルシンタクス501に該当するシンタクス要素をNALユニットとして符号化する。このため、アダプテーションパラメータセットシンタクス506は、スライスや画素ブロックに代表される下位情報のパラメータを保持するスライスレベルシンタクス502より下位のシンタクスと符号化ユニットが異なる。   FIG. 23 is a diagram illustrating an example of the adaptation parameter set syntax 506 according to a modification of the first embodiment. The adaptation parameter set syntax 506 holds parameters that affect the entire encoded frame, and is encoded independently as an upper unit. For example, H.M. In H.264, syntax elements corresponding to the high-level syntax 501 are encoded as NAL units. For this reason, the adaptation parameter set syntax 506 is different in syntax and encoding unit from the lower level syntax than the slice level syntax 502 that holds parameters of lower information represented by slices and pixel blocks.

aps_idは、いずれのアダプテーションパラメータセットシンタクス506を参照するかを示す識別子である。本識別子を参照することにより、下位のスライスは、符号化済みの任意のaps_idを参照することができる。この場合、例えば、図20のスライスヘッダーシンタクス507にも同様のaps_idを付加することによって、フレーム全体に影響を与えるパラメータを読み込むことが可能となる。   aps_id is an identifier indicating which adaptation parameter set syntax 506 is to be referred to. By referencing this identifier, the lower slice can refer to any encoded aps_id. In this case, for example, by adding a similar aps_id to the slice header syntax 507 in FIG. 20, it is possible to read parameters that affect the entire frame.

aps_weighted_prediction_flagは、例えば、フレームにおけるP−sliceに関する変形例の重み付き動き補償予測の有効又は無効を示すシンタクス要素である。aps_weighted_prediction_flagが0である場合、フレーム内におけるP−sliceでの変形例の重み付き動き補償予測は無効となる。従って、WPパラメータ情報に含まれるWP適用フラグは常に0に設定され、WPセレクタ304、305は、各々の出力端をデフォルト動き補償部301へ接続する。一方、aps_weighted_prediction_flagが1である場合、当該フレーム内全域で変形例の重み付き動き補償予測が有効となる。   aps_weighted_prediction_flag is a syntax element indicating whether the weighted motion compensated prediction of the modified example related to the P-slice in the frame is valid or invalid. When aps_weighted_prediction_flag is 0, the weighted motion compensation prediction of the modified example with P-slice in the frame is invalid. Accordingly, the WP application flag included in the WP parameter information is always set to 0, and the WP selectors 304 and 305 connect the respective output terminals to the default motion compensation unit 301. On the other hand, when aps_weighted_prediction_flag is 1, the weighted motion compensated prediction of the modified example is valid throughout the frame.

なお、別の例として、aps_weighted_prediction_flagが1である場合には、より下位のレイヤ(スライスヘッダー、コーディングツリーブロック、トランスフォームユニット、及びプレディクションユニットなど)のシンタクスにおいて、スライス内部の局所領域毎に変形例の予測の重み付き動き補償予測の有効又は無効を規定するようにしてもよい。   As another example, when aps_weighted_prediction_flag is 1, the syntax of lower layers (slice header, coding tree block, transform unit, prediction unit, etc.) is modified for each local region in the slice. The validity or invalidity of the weighted motion compensation prediction of the example prediction may be specified.

aps_weighted_bipred_idxは、例えば、フレームにおけるB−sliceに関する変形例の重み付き動き補償予測の有効又は無効を示すシンタクス要素である。aps_weighted_bipred_idxが0である場合、フレーム内におけるP−sliceでの変形例の重み付き動き補償予測は無効となる。従って、WPパラメータ情報に含まれるWP適用フラグは常に0に設定され、WPセレクタ304、305は、各々の出力端をデフォルト動き補償部301へ接続する。一方、aps_weighted_bipred_idxが1である場合、当該フレーム内全域で変形例の重み付き動き補償予測が有効となる。   aps_weighted_bipred_idx is a syntax element indicating whether the weighted motion compensation prediction of the modified example related to the B-slice in the frame is valid or invalid. When aps_weighted_bipred_idx is 0, the weighted motion compensation prediction of the modified example with P-slice in the frame is invalid. Accordingly, the WP application flag included in the WP parameter information is always set to 0, and the WP selectors 304 and 305 connect the respective output terminals to the default motion compensation unit 301. On the other hand, when aps_weighted_bipred_idx is 1, the weighted motion compensated prediction of the modified example is valid throughout the frame.

なお、別の例として、aps_weighted_bipred_idxが1である場合には、より下位のレイヤ(スライスヘッダー、コーディングツリーブロック、トランスフォームユニット、及びプレディクションユニットなど)のシンタクスにおいて、スライス内部の局所領域毎に変形例の予測の重み付き動き補償予測の有効又は無効を規定するようにしてもよい。   As another example, when aps_weighted_bipred_idx is 1, the syntax of lower layers (slice header, coding tree block, transform unit, prediction unit, etc.) is modified for each local region inside the slice. The validity or invalidity of the weighted motion compensation prediction of the example prediction may be specified.

pred_weight_table()は、重み付き動き補償予測に利用するプレッドウェイトテーブルシンタクスを示す関数であり、前述のaps_weighted_prediction_flagが1の場合、又はaps_weighted_bipred_idxが1の場合に、本関数が呼び出される。   pred_weight_table () is a function indicating a predicate weight table syntax used for weighted motion compensation prediction. This function is called when aps_weighted_prediction_flag is 1 or aps_weighted_bipred_idx is 1.

図24は、第1実施形態の変形例のプレッドウェイトテーブルシンタクス508の一例を示す図である。第1実施形態の変形例では、図18のシンタクス構造において、アダプテーションパラメータセットシンタクス506からプレッドウェイトテーブルシンタクス
508が呼び出される。図21のプレッドウェイトテーブルシンタクス508との違いは、num_ref_common_active_minus1が、MAX_COMMON_REF_MINUS1に変更されている点である。参照画像の枚数は、スライスヘッダーシンタクス507で記述されているため、上位レイヤであるアダプテーションパラメータセットシンタクス506では参照することが出来ない。このため、例えばシーケンスパラメータセットシンタクス504に記述されているnum_ref_framesの値から1を引いた値をMAX_COMMON_REF_MINUS1にセットする。また、予め定めたプロファイル又はレベルに応じて最大の参照画像枚数を取れる値を定めておいてもよい。なお、他のシンタクス要素は図21と同一である。
FIG. 24 is a diagram illustrating an example of a tread weight table syntax 508 according to a modification of the first embodiment. In the modification of the first embodiment, in the syntax structure of FIG. 18, the tread weight table syntax 508 is called from the adaptation parameter set syntax 506. A difference from the predicate weight table syntax 508 of FIG. 21 is that num_ref_common_active_minus1 is changed to MAX_COMMON_REF_MINUS1. Since the number of reference images is described in the slice header syntax 507, it cannot be referenced in the adaptation parameter set syntax 506 that is an upper layer. For this reason, for example, a value obtained by subtracting 1 from the value of num_ref_frames described in the sequence parameter set syntax 504 is set in MAX_COMMON_REF_MINUS1. Further, a value capable of obtaining the maximum number of reference images may be determined according to a predetermined profile or level. Other syntax elements are the same as those in FIG.

以上のように第1実施形態の変形例によれば、プレッドウェイトテーブルシンタクス508をアダプテーションパラメータセットシンタクス506から呼び出す構造とすることにより、1フレームを複数のスライスに分割した際のWPパラメータ情報の符号量を大幅に削減することができる。   As described above, according to the modification of the first embodiment, the WP parameter information code when one frame is divided into a plurality of slices is obtained by using the structure in which the preadweight table syntax 508 is called from the adaptation parameter set syntax 506. The amount can be greatly reduced.

例えば、利用する3種類の異なるWPパラメータ情報を持つアダプテーションパラメータセットシンタクス506を先に符号化しておき、スライスヘッダーシンタクス507が、状況に応じてaps_idを用いて、必要なWPパラメータ情報を呼び出すことにより、スライスヘッダーシンタクス507でWPパラメータ情報を常に符号化する構成よりも、符号量を削減できる。   For example, the adaptation parameter set syntax 506 having three different types of WP parameter information to be used is encoded first, and the slice header syntax 507 calls a necessary WP parameter information using aps_id according to the situation. The amount of codes can be reduced as compared with the configuration in which the WP parameter information is always encoded with the slice header syntax 507.

(第2実施形態)
第2実施形態について説明する。第2実施形態の符号化装置600では、インデックス設定部608の構成が第1実施形態の符号化装置100と相違する。以下では、第1実施形態との相違点の説明を主に行い、第1実施形態と同様の機能を有する構成要素については、第1実施形態と同様の名称・符号を付し、その説明を省略する。
(Second Embodiment)
A second embodiment will be described. In the encoding device 600 of the second embodiment, the configuration of the index setting unit 608 is different from that of the encoding device 100 of the first embodiment. In the following, differences from the first embodiment will be mainly described, and components having the same functions as those in the first embodiment will be given the same names and symbols as those in the first embodiment, and the description thereof will be made. Omitted.

図25は、第2実施形態のインデックス設定部608の構成の一例を示すブロック図である。インデックス設定部608は、図25に示すように、再利用判定部601と、インデックス生成部602とを、備える。   FIG. 25 is a block diagram illustrating an example of the configuration of the index setting unit 608 of the second embodiment. As shown in FIG. 25, the index setting unit 608 includes a reuse determination unit 601 and an index generation unit 602.

再利用判定部601は、リスト1の参照番号をリスト0の参照番号と照合し、リスト0のWPパラメータ情報をリスト1のWPパラメータ情報として再利用するかどうかを判定する。2つの参照リスト間で同一の参照画像が含まれており、かつ対応するWPパラメータ情報の値が同一である場合、リスト0だけでなく、リスト1でも同じ情報を符号化すると符号量の増大を招く。このため、再利用判定部601は、リスト0のWPパラメータ情報を再利用する。   The reuse determination unit 601 compares the reference number of list 1 with the reference number of list 0 and determines whether to reuse the WP parameter information of list 0 as the WP parameter information of list 1. When the same reference image is included between two reference lists and the values of the corresponding WP parameter information are the same, if the same information is encoded not only in list 0 but also in list 1, the amount of code increases. Invite. For this reason, the reuse determination unit 601 reuses the WP parameter information in the list 0.

具体的には、再利用判定部601は、リスト0のWPパラメータ情報を再利用する場合は再利用フラグを1とし、参照先(リスト0)の参照番号を参照情報として設定する。一方、再利用判定部601は、リスト0のWPパラメータ情報を再利用しない場合は再利用フラグを0とし、リスト1の参照番号に対応するWPパラメータ情報をシンタクスにセットする。   Specifically, the reuse determination unit 601 sets the reuse flag to 1 when reusing the WP parameter information in list 0, and sets the reference number of the reference destination (list 0) as reference information. On the other hand, the reuse determining unit 601 sets the reuse flag to 0 when not reusing the WP parameter information in list 0, and sets the WP parameter information corresponding to the reference number in list 1 in the syntax.

再利用判定部601は、例えば、数式(11)に示す疑似コードに従って、リスト0のWPパラメータ情報をリスト1のWPパラメータ情報として再利用するかどうかを判定する。   For example, the reuse determination unit 601 determines whether to reuse the WP parameter information in the list 0 as the WP parameter information in the list 1 according to the pseudo code shown in the equation (11).

for (refIdx=0; refidx<=num_of_active_ref_l1_minus1; refIdx++){
refPOC = RefPicOrderCnt(ListL1, refIdx)
refWP = RefWPTable(ListL1, refIdx)
reuse_wp_flag=false;
reuse_ref_idx=0;
for (curridx=0; curridx<= num_of_active_ref_l0_minus1; curridx++){
if( refPOC == RefPicOrderCnt(ListL0, curridx)
&& RefWPTable(ListL0, curridx,refWP) ){
reuse_wp_flag=true;
reuse_ref_idx=curridx;
}
}
} …(11)
for (refIdx = 0; refidx <= num_of_active_ref_l1_minus1; refIdx ++) {
refPOC = RefPicOrderCnt (ListL1, refIdx)
refWP = RefWPTable (ListL1, refIdx)
reuse_wp_flag = false;
reuse_ref_idx = 0;
for (curridx = 0; curridx <= num_of_active_ref_l0_minus1; curridx ++) {
if (refPOC == RefPicOrderCnt (ListL0, curridx)
&& RefWPTable (ListL0, curridx, refWP)) {
reuse_wp_flag = true;
reuse_ref_idx = curridx;
}
}
} (11)

ここで、ListL0は、リスト0を示し、ListL1はリスト1を示す。RefWPTable()は、リスト番号、参照番号、及び参照用WPパラメータを入力すると、入力された参照用WPパラメータが入力されたリスト番号及び参照番号に対応するWPパラメータと一致しているかどうかをフラグで返す関数である。フラグの値が1の場合は、両WPパラメータが一致していることを示す。数式(11)に示す疑似コードでは、リスト1の参照番号を順にスキャンし、リスト0の中に同一のPOC番号の参照画像が存在した場合に、WPパラメータが同一であれば、再利用フラグを示すreuse_wp_flagをtureに設定するとともに、リスト0の対応する参照番号をreuse_ref_idxに設定する。   Here, ListL0 indicates list 0, and ListL1 indicates list 1. When a list number, a reference number, and a reference WP parameter are input, RefWPTable () is a flag indicating whether or not the input reference WP parameter matches the WP parameter corresponding to the input list number and reference number. A function to return. A flag value of 1 indicates that both WP parameters match. In the pseudo code shown in Equation (11), when the reference numbers in list 1 are sequentially scanned and there are reference images with the same POC number in list 0, if the WP parameter is the same, the reuse flag is set. The reuse_wp_flag to be shown is set to “ture”, and the corresponding reference number in the list 0 is set to “reuse_ref_idx”.

再利用判定部601は、再利用判定後の(再利用の設定を行った)WPパラメータ情報を出力し、インデックス生成部602に入力する。   The reuse determination unit 601 outputs the WP parameter information after the reuse determination (reuse setting is performed) and inputs the WP parameter information to the index generation unit 602.

インデックス生成部602は、再利用判定部601から再利用判定後のWPパラメータ情報を受け取り、後述するシンタクス要素にマッピングを行ってインデックス情報を生成する。なお、インデックス生成部602がマッピングを行うシンタクス要素は、第1実施形態と異なる。インデックス生成部602は、インデックス情報を出力し、符号化部110に入力する。   The index generation unit 602 receives the WP parameter information after the reuse determination from the reuse determination unit 601 and performs mapping on syntax elements described later to generate index information. Note that the syntax elements to which the index generation unit 602 performs mapping are different from those in the first embodiment. The index generation unit 602 outputs index information and inputs it to the encoding unit 110.

図26は、第2実施形態のインデックス設定部608で実行されるインデックス情報の生成処理の一例を示すフローチャートである。   FIG. 26 is a flowchart illustrating an example of index information generation processing executed by the index setting unit 608 of the second embodiment.

再利用判定部601は、WPパラメータ情報が入力されると、スライスタイプに従って処理を分岐する(ステップS201)。   When the WP parameter information is input, the reuse determination unit 601 branches the process according to the slice type (step S201).

スライスタイプが1つの参照リストのみを用いる単方向予測スライス(P−slice)である場合には(ステップS201でNo)、再利用判定部601は、図9Aに示すWPパラメータ情報をそのままインデックス生成部602へ出力する。インデックス生成部602は、再利用判定部601から入力されたWPパラメータ情報を後述する予め定められたシンタクス要素にマッピングしてインデックス情報を生成し、出力する。   When the slice type is a unidirectional prediction slice (P-slice) using only one reference list (No in step S201), the reuse determination unit 601 directly uses the WP parameter information illustrated in FIG. 9A as an index generation unit. Output to 602. The index generation unit 602 generates index information by mapping the WP parameter information input from the reuse determination unit 601 to a predetermined syntax element to be described later, and outputs the index information.

一方、スライスタイプが2つの参照リストを用いる双方向予測スライス(B−slice)である場合には(ステップS201でYes)、再利用判定部601は、変数refIdcを0に初期化する(ステップS202)。変数refIdcは、リスト1の参照番号を示す。   On the other hand, when the slice type is a bi-directional prediction slice (B-slice) using two reference lists (Yes in step S201), the reuse determination unit 601 initializes the variable refIdc to 0 (step S202). ). The variable refIdc indicates the reference number of list 1.

続いて、再利用判定部601は、変数refIdxが示す参照番号に対応する参照画像のPOC番号を示す変数refPOCを導出するとともに(ステップS203)、変数refIdxが示す参照番号に対応するWPパラメータを導出する(ステップS204)。   Subsequently, the reuse determination unit 601 derives a variable refPOC indicating the POC number of the reference image corresponding to the reference number indicated by the variable refIdx (step S203), and derives a WP parameter corresponding to the reference number indicated by the variable refIdx. (Step S204).

続いて、再利用判定部601は、フラグreuse_wp_flagをfalseに設定するとともに(ス
テップS205)、変数curridxを0に設定する(ステップS206)。フラグreuse_wp_flagは、リスト0とリスト1のWPパラメータが同一であるか否かを示す。変数curridxは、リスト0の参照番号を示す。
Subsequently, the reuse determination unit 601 sets the flag reuse_wp_flag to false (step S205) and sets the variable curridx to 0 (step S206). The flag reuse_wp_flag indicates whether or not the WP parameters of list 0 and list 1 are the same. The variable curridx indicates the reference number of list 0.

続いて、再利用判定部601は、導出した変数refPOCが示すPOC番号と変数curridxが示す参照番号に対応する参照画像のPOC番号とが同一であり、かつ変数refIdxが示す参照番号に対応するWPパラメータと変数curridxが示す参照番号に対応するWPパラメータとが同一であるかを判断する(ステップS207)。   Subsequently, the reuse determination unit 601 has the same POC number indicated by the derived variable refPOC and the POC number of the reference image corresponding to the reference number indicated by the variable curridx, and the WP corresponding to the reference number indicated by the variable refIdx. It is determined whether the parameter and the WP parameter corresponding to the reference number indicated by the variable curridx are the same (step S207).

両POC番号及び両WPパラメータが同一である場合(ステップS207でYes)、再利用判定部601は、フラグreuse_wp_flagをtrueに設定するとともに(ステップS208)、変数reuse_ref_idxに変数curridxの値を代入する(ステップS209)。一方、両POC番号又は両WPパラメータが同一でない場合(ステップS207でNo)、ステップS208、S209の処理は行われない。なお、POC番号の一致を確認しない構成としてもよい。   When both POC numbers and both WP parameters are the same (Yes in Step S207), the reuse determining unit 601 sets the flag reuse_wp_flag to true (Step S208) and substitutes the value of the variable curridx for the variable reuse_ref_idx ( Step S209). On the other hand, if both POC numbers or both WP parameters are not the same (No in step S207), the processes in steps S208 and S209 are not performed. A configuration in which the POC number match is not confirmed may be used.

続いて、再利用判定部601は、変数curridxをインクリメントする(ステップS210)。   Subsequently, the reuse determination unit 601 increments the variable curridx (step S210).

続いて、再利用判定部601は、変数curridxの値がリスト0の最大数から1を引いた値であるnum_of_active_ref_l0_minus1より大きいかどうかを判断し(ステップS211)、num_of_active_ref_l0_minus1以下の間(ステップS211でNo)、ステップS207〜ステップS210の処理を繰り返す。   Subsequently, the reuse determination unit 601 determines whether or not the value of the variable curridx is larger than num_of_active_ref_l0_minus1 that is a value obtained by subtracting 1 from the maximum number in list 0 (step S211), and during num_of_active_ref_l0_minus1 or less (No in step S211) ), The process of step S207 to step S210 is repeated.

num_of_active_ref_l0_minus1より大きくなると(ステップS211でYes)、再利用判定部601は、リスト0の確認を完了し、変数refIdxをインクリメントする(ステップS212)。   When it becomes larger than num_of_active_ref_l0_minus1 (Yes in step S211), the reuse determination unit 601 completes the confirmation of the list 0 and increments the variable refIdx (step S212).

続いて、再利用判定部601は、変数refIdxの値がリスト1の最大数から1を引いた値であるnum_of_active_ref_l1_minus1より大きいかどうかを判断し(ステップS213)、num_of_active_ref_l1_minus1以下の間(ステップS213でNo)、ステップS203〜ステップS212の処理を繰り返す。   Subsequently, the reuse determination unit 601 determines whether the value of the variable refIdx is larger than num_of_active_ref_l1_minus1 that is a value obtained by subtracting 1 from the maximum number in the list 1 (step S213), and during num_of_active_ref_l1_minus1 or less (No in step S213) ), The process of step S203 to step S212 is repeated.

num_of_active_ref_l1_minus1より大きくとなると(ステップS213でYes)、再利用判定部601は、リスト1の確認を完了し、再利用判定後のWPパラメータ情報をインデックス生成部602へ出力する。インデックス生成部602は、再利用判定部601から入力されたWPパラメータ情報を後述する予め定められたシンタクス要素にマッピングしてインデックス情報を生成し、出力する。   When it becomes larger than num_of_active_ref_l1_minus1 (Yes in step S213), the reuse determination unit 601 completes the confirmation of the list 1, and outputs the WP parameter information after the reuse determination to the index generation unit 602. The index generation unit 602 generates index information by mapping the WP parameter information input from the reuse determination unit 601 to a predetermined syntax element to be described later, and outputs the index information.

図27は、第2実施形態のプレッドウェイトテーブルシンタクス506の一例を示す図である。図27に示すシンタクス要素のうち、l0、l1の記号があるものは、それぞれ、リスト0、1に対応する。また、接頭語が図21と同じシンタクス要素は、共通リストではなくリスト0又はリスト1の違いがあるが、参照リストの扱いが異なる以外は同一の変数として利用する。例えば、luma_weight_l0[i]は、参照リストl0における参照番号i番目の重み係数を表すシンタクス要素である。   FIG. 27 is a diagram illustrating an example of the tread weight table syntax 506 according to the second embodiment. Of the syntax elements shown in FIG. 27, those having symbols l0 and l1 correspond to lists 0 and 1, respectively. Also, syntax elements having the same prefix as in FIG. 21 are used as the same variable except that the list is different from the list 0 or list 1 but not the common list. For example, luma_weight_l0 [i] is a syntax element representing the i-th weight coefficient with the reference number in the reference list l0.

luma_log2_weight_denom及びchroma_log2_weight_denomは、第1実施形態と同じ構成となっている。まず、l0の記号のあるリスト0に対して、luma_weight_l0_flag、luma_weight_l0[i]、luma_offset_l0[i]、chroma_weight_l0_flag、chroma_weight_l0[i][j]、及びchroma_offset_l0[i][j]が定義されている。次に、l1の記号のあるリスト1に関するシン
タクス要素が定義されている。
luma_log2_weight_denom and chroma_log2_weight_denom have the same configuration as in the first embodiment. First, luma_weight_l0_flag, luma_weight_l0 [i], luma_offset_l0 [i], chroma_weight_l0_flag, chroma_weight_l0 [i] [j], and chroma_offset_l0 [i] [j] are defined for the list 0 having the symbol l0. Next, a syntax element relating to the list 1 having the symbol l1 is defined.

ここで、reuse_wp_flagは、リスト0に対応するl0のWPパラメータを再利用するかどうかを示すシンタクス要素である。reuse_wp_flagが1の場合、重み係数及びオフセットは符号化されずに、reuse_ref_idxが符号化される。reuse_ref_idxは、リスト0に対応するl0のどの参照番号に対応するWPパラメータを利用するかを示す。例えば、reuse_ref_idxが1である場合、リスト0の参照番号1に対応するWPパラメータがリスト1の参照番号iに対応するWPパラメータにコピーされる。reuse_wp_flagが0の場合、リスト0と同様、luma_weight_l1_flag、luma_weight_l1[i]、luma_offset_l1[i]、chroma_weight_l1_flag、chroma_weight_l1[i][j]、及びchroma_offset_l1[i][j]が符号化される。   Here, reuse_wp_flag is a syntax element indicating whether to reuse the WP parameter of l0 corresponding to list 0. When reuse_wp_flag is 1, reuse_ref_idx is encoded without encoding the weighting coefficient and the offset. reuse_ref_idx indicates which WP parameter corresponding to which reference number of l0 corresponding to list 0 is used. For example, when reuse_ref_idx is 1, the WP parameter corresponding to reference number 1 in list 0 is copied to the WP parameter corresponding to reference number i in list 1. When reuse_wp_flag is 0, as in list 0, luma_weight_l1_flag, luma_weight_l1 [i], luma_offset_l1 [i], chroma_weight_l1_flag, chroma_weight_l1 [i] [j], and chroma_offset_l1 [i] [j] are encoded.

以上のように第2実施形態では、インデックス設定部608は、WPパラメータ情報において、リスト0及びリスト1の2つの参照リスト内に互いに同一の参照画像を含む組み合わせがある場合、重複するWPパラメータを再利用することにより、WPパラメータ情報から重複する冗長なWPパラメータを削除してインデックス情報を生成する。従って、第2実施形態によれば、インデックス情報の符号量を削減することができる。   As described above, in the second embodiment, the index setting unit 608, when there is a combination including the same reference image in the two reference lists of list 0 and list 1 in the WP parameter information, By reusing, redundant redundant WP parameters are deleted from the WP parameter information to generate index information. Therefore, according to the second embodiment, the code amount of the index information can be reduced.

第2実施形態では、リスト0に対応するWPパラメータ情報は従来通り符号化し、リスト1に対応するWPパラメータ情報を符号化する際には、リスト0内で同じ参照画像を参照するかどうかをチェックし、同じ参照画像を参照し、WPパラメータも同一である場合には、リスト0のWPパラメータを再利用するフラグを符号化するとともに、リスト0のどの参照番号に対応するかを示す情報を符号化する。これらの情報は、重み係数及びオフセットに関する情報量よりも格段に少ない情報であるため、リスト0及びリスト1を別々に符号化する場合と比較して、WPパラメータ情報の符号量を大幅に削減できる。   In the second embodiment, the WP parameter information corresponding to the list 0 is encoded as before, and when the WP parameter information corresponding to the list 1 is encoded, it is checked whether or not the same reference image is referred to in the list 0. If the same reference image is referenced and the WP parameters are the same, a flag for reusing the WP parameter in list 0 is encoded, and information indicating which reference number in list 0 corresponds is encoded. Turn into. Since these pieces of information are much smaller than the information about weighting factors and offsets, the amount of code of WP parameter information can be greatly reduced as compared with the case where List 0 and List 1 are encoded separately. .

また、第2実施形態では、リスト0及びリスト1に含まれる参照番号が同一の参照画像を指しており、且つWPパラメータが異なる場合、異なるWPパラメータを設定することが可能である。つまり、参照リスト内に同一の参照画像を指す組み合わせがあった場合、第1実施形態では、強制的に同一のWPパラメータを設定し、第2実施形態では、WPパラメータが同一の場合のみ、同じWPパラメータの冗長な表現を削除する。   In the second embodiment, when the reference numbers included in the list 0 and the list 1 indicate the same reference image and the WP parameters are different, different WP parameters can be set. That is, when there is a combination indicating the same reference image in the reference list, in the first embodiment, the same WP parameter is forcibly set, and in the second embodiment, the same only when the WP parameter is the same. Remove redundant representation of WP parameters.

(第3実施形態)
第3実施形態について説明する。図28は、第3実施形態の符号化装置700の構成の一例を示すブロック図である。第3実施形態の符号化装置700は、動き情報メモリ701、動き情報取得部702、及び切替スイッチ703を更に備えている点で、第1実施形態の符号化装置100と相違する。以下では、第1実施形態との相違点の説明を主に行い、第1実施形態と同様の機能を有する構成要素については、第1実施形態と同様の名称・符号を付し、その説明を省略する。
(Third embodiment)
A third embodiment will be described. FIG. 28 is a block diagram illustrating an example of the configuration of the encoding apparatus 700 according to the third embodiment. The encoding apparatus 700 of the third embodiment is different from the encoding apparatus 100 of the first embodiment in that it further includes a motion information memory 701, a motion information acquisition unit 702, and a changeover switch 703. In the following, differences from the first embodiment will be mainly described, and components having the same functions as those in the first embodiment will be given the same names and symbols as those in the first embodiment, and the description thereof will be made. Omitted.

動き情報メモリ701は、符号化が終了した画素ブロックに適用された動き情報を、参照動き情報として一時的に格納する。動き情報メモリ701では、動き情報に対してサブサンプリングなどの圧縮処理を行い、情報量を削減しても構わない。   The motion information memory 701 temporarily stores the motion information applied to the pixel block that has been encoded as reference motion information. The motion information memory 701 may reduce the amount of information by performing compression processing such as sub-sampling on the motion information.

図29は、第3実施形態の動き情報メモリ701の詳細例を示す図である。動き情報メモリ701は、図29に示すように、フレーム又はスライス単位で保持されており、同一フレーム上の動き情報を参照動き情報710として格納する空間方向参照動き情報メモリ701A、及び、既に符号化が終了したフレームの動き情報を参照動き情報710として格納する時間方向参照動き情報メモリ701Bを更に有する。時間方向参照動き情報メモリ701Bは、符号化対象フレームが予測に用いる参照フレームの数に応じて複数有しても構わない。   FIG. 29 is a diagram illustrating a detailed example of the motion information memory 701 according to the third embodiment. As shown in FIG. 29, the motion information memory 701 is held in units of frames or slices, and stores spatial direction reference motion information memory 701A that stores motion information on the same frame as reference motion information 710, and has already been encoded. It further has a time direction reference motion information memory 701B for storing the motion information of the frame for which the processing is completed as reference motion information 710. A plurality of temporal direction reference motion information memories 701B may be provided depending on the number of reference frames used for prediction by the encoding target frame.

参照動き情報710は、所定の領域単位(例えば、4×4画素ブロック単位)で空間方向参照動き情報メモリ701A及び時間方向参照動き情報メモリ701B内に保持される。参照動き情報710は、その領域が後述するインター予測で符号化されたのか又は後述するイントラ予測で符号化されたのかを示す情報をさらに有する。また、画素ブロック(コーディングユニット又はプレディクションユニット)がH.264で規定されるスキップモード、ダイレクトモード又は後述するマージモードのように、動き情報内の動きベクトルの値が符号化されず、符号化済みの領域から予測された動き情報を用いてインター予測される場合においても、当該画素ブロックの動き情報が参照動き情報710として保持される。   The reference motion information 710 is held in the spatial direction reference motion information memory 701A and the temporal direction reference motion information memory 701B in a predetermined area unit (for example, 4 × 4 pixel block unit). The reference motion information 710 further includes information indicating whether the region is encoded by inter prediction described later or encoded by intra prediction described later. Also, the pixel block (coding unit or prediction unit) is H.264. As in skip mode, direct mode, or merge mode described later in H.264, motion vector values in motion information are not encoded, but are inter-predicted using motion information predicted from an encoded region. In this case, the motion information of the pixel block is held as the reference motion information 710.

符号化対象のフレーム又はスライスの符号化処理が終了したら、当該フレームの空間方向参照動き情報メモリ701Aは、次に符号化処理を行うフレームに用いる時間方向参照動き情報メモリ701Bとしてその扱いが変更される。この際、時間方向参照動き情報メモリ701Bのメモリ容量を削減するために、動き情報を圧縮し、圧縮された動き情報を時間方向参照動き情報メモリ701Bに格納しても構わない。   When the encoding process of the frame or slice to be encoded is completed, the handling of the spatial direction reference motion information memory 701A of the frame is changed as the temporal direction reference motion information memory 701B used for the frame to be encoded next. The At this time, in order to reduce the memory capacity of the time direction reference motion information memory 701B, the motion information may be compressed and the compressed motion information may be stored in the time direction reference motion information memory 701B.

動き情報取得部702は、動き情報メモリ701から参照動き情報が入力され、符号化画素ブロックに用いる動き情報Bを出力する。動き情報取得部702の詳細は後述する。   The motion information acquisition unit 702 receives the reference motion information from the motion information memory 701 and outputs motion information B used for the encoded pixel block. Details of the motion information acquisition unit 702 will be described later.

切替スイッチ703は、後述する予測モード情報に従って動き情報取得部702から出力される動き情報Bと動き評価部109から出力される動き情報Aの内、いずれかを選択して動き情報として予測画像生成部107に出力する。動き評価部109から出力される動き情報Aは、図示せぬ予測動きベクトル取得部から取得する予測動きベクトルとの差分情報や、予測動きベクトル取得位置情報を符号化する。このような予測モードを以降インターモードと称する。一方、予測モード情報に従って動き情報取得部702から出力される動き情報Bは、隣接する画素ブロックから動き情報をマージして、符号化画素ブロックに対してそのまま適用されるため、その他の動き情報に関する情報(例えば、動きベクトル差分情報)の符号化は不要である。以降、このような予測モードをマージモードと称する。   The changeover switch 703 selects either motion information B output from the motion information acquisition unit 702 or motion information A output from the motion evaluation unit 109 according to prediction mode information described later, and generates a predicted image as motion information. Output to the unit 107. The motion information A output from the motion evaluation unit 109 encodes difference information with a predicted motion vector acquired from a predicted motion vector acquisition unit (not shown) and predicted motion vector acquisition position information. Such a prediction mode is hereinafter referred to as an inter mode. On the other hand, the motion information B output from the motion information acquisition unit 702 according to the prediction mode information is merged with the motion information from adjacent pixel blocks and applied to the encoded pixel block as it is. It is not necessary to encode information (for example, motion vector difference information). Hereinafter, such a prediction mode is referred to as a merge mode.

予測モード情報は、符号化制御部111が制御する予測モードに従っており、切替スイッチ703の切替情報を含む。   The prediction mode information conforms to the prediction mode controlled by the encoding control unit 111 and includes switching information of the changeover switch 703.

以下、動き情報取得部702の詳細について説明する。   Details of the motion information acquisition unit 702 will be described below.

動き情報取得部702は、参照動き情報を入力として、動き情報Bを切替スイッチ703に出力する。図30A及び図30Bは、第3実施形態の符号化画素ブロックに対する動き情報候補を導出するブロック位置の一例を示す図である。図30AにおけるA〜Eは、符号化画素ブロックに動き情報候補を導出する空間的に隣接する画素ブロック、図30BにおけるTは、動き情報候補を導出する時間的に隣接する画素ブロックを示している。   The motion information acquisition unit 702 receives the reference motion information and outputs motion information B to the changeover switch 703. 30A and 30B are diagrams illustrating examples of block positions from which motion information candidates are derived with respect to the encoded pixel block according to the third embodiment. 30A indicate spatially adjacent pixel blocks for deriving motion information candidates to the encoded pixel block, and T in FIG. 30B indicates temporally adjacent pixel blocks for deriving motion information candidates. .

図31は、第3実施形態の複数の動き情報候補の画素ブロック位置と画素ブロック位置インデクス(idx)との関係の一例を示す図である。動き情報候補のブロック位置は、空間的に隣接するブロック位置(A〜E)、時間的に隣接する画素ブロック位置(T)の順序で並べられ、当該順序でAvailable(インター予測が適用されている)な画素ブロックがあれば、マージモードの格納リストMergeCandListへ格納する動き情報の最大数(N−1)に達するまで順次idxが割り当てられる。   FIG. 31 is a diagram illustrating an example of a relationship between a pixel block position and a pixel block position index (idx) of a plurality of motion information candidates according to the third embodiment. The block positions of motion information candidates are arranged in the order of spatially adjacent block positions (A to E) and temporally adjacent pixel block positions (T), and Available (inter prediction is applied). If there is a pixel block, idx is sequentially assigned until the maximum number (N−1) of motion information stored in the merge mode storage list MergeCandList is reached.

図32は、第3実施形態のMergeCandListへの格納処理の一例を示すフローチャートで
ある。
FIG. 32 is a flowchart illustrating an example of storage processing in the MergeCandList according to the third embodiment.

まず、動き情報取得部702は、MergeCandListへの格納数numMergeCandを0で初期化する(ステップS301)。   First, the motion information acquisition unit 702 initializes the number NumMergeCand stored in the MergeCandList to 0 (step S301).

続いて、動き情報取得部702は、全ての空間隣接ブロック(例えば、ブロックA〜E)に対して、Availableであるか否かを判定する(ステップS302、S303)。Availableである場合(ステップS303でYes)、動き情報取得部702は、MergeCandListに当該空間隣接ブロックの動き情報を格納し、numMergeCandをインクリメントする(ステップS304)。Availableでない場合(ステップS303でNo)、動き情報取得部702は、ステップS304の処理を行わない。   Subsequently, the motion information acquisition unit 702 determines whether or not all space adjacent blocks (for example, blocks A to E) are available (steps S302 and S303). If it is “Available” (Yes in Step S303), the motion information acquisition unit 702 stores the motion information of the space adjacent block in the MergeCandList and increments numMergeCand (Step S304). When it is not Available (No in Step S303), the motion information acquisition unit 702 does not perform the process of Step S304.

動き情報取得部702は、全ての空間隣接ブロックに対してステップS303、S304の処理を実行すると(ステップS305)、時間隣接ブロック(例えばブロックT)に対して、Availableであるか否かを判定する(ステップS306)。   When the motion information acquisition unit 702 executes the processes of steps S303 and S304 for all spatial adjacent blocks (step S305), the motion information acquisition unit 702 determines whether the temporal adjacent block (for example, block T) is available. (Step S306).

Availableである場合(ステップS306でYes)、動き情報取得部702は、MergeCandListに当該時間隣接ブロックTの動き情報を格納し、numMergeCandをインクリメントする(ステップS307)。Availableでない場合(ステップS306でNo)、動き情報取得部702は、ステップS307の処理を行わない。   If it is Available (Yes in Step S306), the motion information acquisition unit 702 stores the motion information of the time adjacent block T in the MergeCandList and increments numMergeCand (Step S307). When it is not Available (No in Step S306), the motion information acquisition unit 702 does not perform the process of Step S307.

続いて、動き情報取得部702は、MergeCandList内で重複する動き情報を削除し、削除した数だけnumMergeCandをデクリメントする(ステップS308)。MergeCandList内で重複する動き情報か否かを判定するために、MergeCandList内の2種類の動き情報(動きベクトルmv,参照番号refIdx)及びWPパラメータ情報が一致しているかを判定し、全ての情報が一致している場合には、一方をMergeCandList[]から削除する。   Subsequently, the motion information acquisition unit 702 deletes the motion information that overlaps in the MergeCandList, and decrements numMergeCand by the number of deleted (step S308). In order to determine whether or not there is overlapping motion information in MergeCandList, it is determined whether two types of motion information (motion vector mv, reference number refIdx) and WP parameter information in MergeCandList match, and all information is If they match, delete one from MergeCandList [].

図33は、第3実施形態の動き情報の格納リストの一例を示す図であり、詳細には、N=5として図31に示す表に従った、各idxに対応する動き情報(動きベクトルmv,参照番号refIdx)の格納リスト(MergeCandList[idx])の一例を示している。図33において、idx=0は、リスト0の参照動き情報(動きベクトルmv0L0,参照番号refIdx0L0)、idx=1は、リスト1の参照動き情報(動きベクトルmv1L1,参照番号refIdx1L1)、idx=2〜4は、リスト0及びリスト1の両方の参照動き情報(動きベクトルmv2L0,mv2L1,参照番号refIdx2L0,refIdx2L1)が格納されている。   FIG. 33 is a diagram showing an example of a motion information storage list according to the third embodiment. Specifically, assuming that N = 5, the motion information (motion vector mv corresponding to each idx) according to the table shown in FIG. , Reference number refIdx) is an example of a storage list (MergeCandList [idx]). In FIG. 33, idx = 0 is reference motion information of list 0 (motion vector mv0L0, reference number refIdx0L0), idx = 1 is reference motion information of list 1 (motion vector mv1L1, reference number refIdx1L1), idx = 2 to 2 4 stores reference motion information of both list 0 and list 1 (motion vectors mv2L0, mv2L1, reference numbers refIdx2L0, refIdx2L1).

符号化画素ブロックは、最大N種類のidxのうちいずれかを選択し、選択したidxに対応する画素ブロックの参照動き情報をMergeCandList[idx]から導出し、動き情報Bとして出力する。なお符号化画素ブロックは、参照動き情報が存在しない場合、ゼロベクトルを有する動き情報を、予測動き情報候補Bとして出力する。選択したidxの情報(後述するシンタクスmerge_idx)は予測モード情報に含まれ、符号化部110において符号化される。   The encoded pixel block selects one of the maximum N types of idx, derives reference motion information of the pixel block corresponding to the selected idx from MergeCandList [idx], and outputs it as motion information B. The encoded pixel block outputs motion information having a zero vector as a predicted motion information candidate B when there is no reference motion information. Information on the selected idx (a syntax merge_idx described later) is included in the prediction mode information, and is encoded by the encoding unit 110.

なお、空間及び時間的に隣接するブロックは図30A及び図30Bに限らず、既に符号化済みの領域であればいずれの位置でも構わない。また、上記リストの別の例として、MergeCandListへの格納最大数(N)や順序は、上述の限りではなく任意の順序・最大数を用いても構わない。   It should be noted that blocks adjacent in space and time are not limited to FIGS. 30A and 30B, and may be any positions as long as they are already encoded regions. As another example of the list, the maximum number (N) and order in the MergeCandList are not limited to the above, and any order / maximum number may be used.

符号化スライスがBスライスであって、空間・時間的に隣接する画素ブロックの参照動き情報をMergeCandList[]へ格納しても格納最大数(N)に達しなかった場合には、その時点でMergeCandList[]に格納されているリスト0及びリスト1の動き情報を相互に組み合
わせて、新たに双方向予測を生成しMergeCandList[]に格納する。
If the encoded slice is a B slice and the reference motion information of spatially and temporally adjacent pixel blocks is stored in MergeCandList [] but does not reach the maximum storage number (N), then MergeCandList The bi-directional prediction is newly generated by combining the motion information of list 0 and list 1 stored in [] with each other, and stored in MergeCandList [].

図34は、第3実施形態の動き情報の格納リストへの格納方法の一例を示すフローチャートである。   FIG. 34 is a flowchart illustrating an example of a method for storing motion information in a storage list according to the third embodiment.

まず、動き情報取得部702は、空間・時間的に隣接する画素ブロックからのMergeCandListへの格納数をnumInputMergeCandとし、現在の格納数を示す変数numMergeCandをnumInputMergeCandで初期化するとともに、変数combIdx及びcombCntを0で初期化する(ステップS401)。   First, the motion information acquisition unit 702 sets the number stored in the MergeCandList from spatially and temporally adjacent pixel blocks as numInputMergeCand, initializes the variable numMergeCand indicating the current stored number with numInputMergeCand, and sets the variables combIdx and combCnt. It is initialized with 0 (step S401).

続いて、動き情報取得部702は、新たに生成する双方向予測の組み合わせ(図35参照)を用いて、combIdxから変数l0CandIdx,変数l1CandIdxを導出する(ステップS402)。なお、combIdxから変数l0CandIdx,変数l1CandIdxを導出する組み合わせは、図36に示す例に限らず、重複しなければ任意の順序に並び替えても構わない。   Subsequently, the motion information acquisition unit 702 derives a variable l0CandIdx and a variable l1CandIdx from combIdx using a newly generated bidirectional prediction combination (see FIG. 35) (step S402). The combination for deriving the variable l0CandIdx and the variable l1CandIdx from the combIdx is not limited to the example shown in FIG. 36, and may be rearranged in an arbitrary order as long as they do not overlap.

続いて、動き情報取得部702は、MergeCandList[l0CandIdx]に格納されている参照動き情報(双方向予測の場合はリスト0及びリスト1の2種類)をl0Candに設定する。l0Candにおける参照番号をrefIdxL0l0Cand、動きベクトルをmvL0l0Candと称する。同様に、動き情報取得部702は、MergeCandList[l1CandIdx]に格納されている参照動き情報をl1Candに設定する。l1Candにおける参照番号をrefIdxL1l1Cand、動きベクトルをmvL1l1Candと称する(ステップS403)。リスト0の動き情報としてl0Cand、リスト1の動き情報としてL1Candを用いて双方向予測を行う動き情報の組み合わせをcombCandと称する。   Subsequently, the motion information acquisition unit 702 sets the reference motion information (two types of list 0 and list 1 in the case of bidirectional prediction) stored in MergeCandList [l0CandIdx] to l0Cand. The reference number in l0Cand is referred to as refIdxL0l0Cand, and the motion vector is referred to as mvL0l0Cand. Similarly, the motion information acquisition unit 702 sets the reference motion information stored in MergeCandList [l1CandIdx] to l1Cand. The reference number in l1Cand is referred to as refIdxL1l1Cand, and the motion vector is referred to as mvL1l1Cand (step S403). A combination of motion information that performs bidirectional prediction using l0Cand as the motion information of list 0 and L1Cand as the motion information of list 1 is referred to as combCand.

続いて、動き情報取得部702は、条件式(12)〜(15)を用いて、l0Candとl1Candが参照するブロックを同一であるか否かを判定する(ステップS404)。   Subsequently, the motion information acquisition unit 702 determines whether the blocks referenced by l0Cand and l1Cand are the same using the conditional expressions (12) to (15) (step S404).

l0Cand,l1CandがAvailableか? …(12)   Are l0Cand and l1Cand available? (12)

RefPicOrderCnt(refIdxL0l0Cand,L0)!=RefPicOrderCnt(refIdxL1l1Cand,L1) …(13)   RefPicOrderCnt (refIdxL0l0Cand, L0)! = RefPicOrderCnt (refIdxL1l1Cand, L1) (13)

mvL0l0Cand!=mvL1l1Cand …(14)   mvL0l0Cand! = mvL1l1Cand (14)

WpParam(refIdxL0l0Cand,L0)!=WpParam(refIdxL1l1Cand,L1) …(15)   WpParam (refIdxL0l0Cand, L0)! = WpParam (refIdxL1l1Cand, L1) (15)

RefPicOrderCnt(refIdx,LX)は、参照リストX(X=0,1)において、参照番号refIdxが対応する参照フレームのPOC(Picture Order Count)を導出する関数である。WpParam(refIdx,LX)は、参照リストX(X=0,1)において、参照番号refIdxが対応する参照フレームのWPパラメータ情報を導出する関数である。この関数は、リスト0の参照フレームとリスト1の参照フレームが、同一のWPパラメータ(WPの有無WP_flag、重み係数Weight、オフセットOffset)ではない場合はYes、完全に同一のパラメータである場合にはNoを返す。WpParam()の別の例として、全てのパラメータの一致を確認する必要はなく、WPの有無WP_flag及びオフセットOffsetのみの一致を確認するなど、WPパラメータの一部のデータのみを用いて判定を行ってもよい。   RefPicOrderCnt (refIdx, LX) is a function for deriving a POC (Picture Order Count) of a reference frame corresponding to the reference number refIdx in the reference list X (X = 0, 1). WpParam (refIdx, LX) is a function for deriving WP parameter information of the reference frame corresponding to the reference number refIdx in the reference list X (X = 0, 1). This function is Yes when the reference frame of list 0 and the reference frame of list 1 are not the same WP parameter (WP presence / absence WP_flag, weight coefficient Weight, offset Offset), and when the parameters are completely the same Returns No. As another example of WpParam (), it is not necessary to check the match of all parameters, but only using a part of the data of WP parameters, such as checking the match of WP presence / absence WP_flag and offset Offset only. May be.

条件式(12)を満たし、かつ条件式(13)〜(15)の何れかを満たす場合には(ステップS404でYes)、動き情報取得部702は、mergeCandList[]内でl0Candとl1Candと同一の組み合わせを用いる双方向予測があるか否かを判定する(ステップS405)。   When the conditional expression (12) is satisfied and any one of the conditional expressions (13) to (15) is satisfied (Yes in step S404), the motion information acquisition unit 702 is the same as l0Cand and l1Cand in mergeCandList []. It is determined whether or not there is bidirectional prediction using the combination (step S405).

mergeCandList[]内でl0Candとl1Candと同一の組み合わせがない場合(ステップS405でYes)、動き情報取得部702は、当該combCandをmergeCandListの最後尾に追加する(ステップS406)。具体的には、動き情報取得部702は、combCandをmergeCandList[numMergeCand]に代入し、numMergeCand及びcombCntをインクリメントする。   If there is no identical combination of l0Cand and l1Cand in mergeCandList [] (Yes in step S405), the motion information acquisition unit 702 adds the combCand to the end of the mergeCandList (step S406). Specifically, the motion information acquisition unit 702 substitutes combCand into mergeCandList [numMergeCand], and increments numMergeCand and combCnt.

続いて、動き情報取得部702は、combIdxをインクリメントする(ステップS407)。   Subsequently, the motion information acquisition unit 702 increments combIdx (step S407).

続いて、動き情報取得部702は、条件式(16)〜(18)を用いて、mergeCandList[]への格納を終了するか否かを判定する(ステップS408)。   Subsequently, the motion information acquisition unit 702 determines whether to end the storage in mergeCandList [] using the conditional expressions (16) to (18) (step S408).

combIdx == numInputMergeCand*(numInputMergeCand?1)) …(16)   combIdx == numInputMergeCand * (numInputMergeCand? 1)) (16)

numMergeCand == maxNumMergeCand …(17)   numMergeCand == maxNumMergeCand (17)

combCnt == N …(18)   combCnt == N (18)

条件式(16)〜(18)の何れかを満たす場合には(ステップS408でYes)、処理は終了となり、条件式(16)〜(18)の何れも満たす場合には(ステップS408でNo)、ステップS402へ戻る。   If any of the conditional expressions (16) to (18) is satisfied (Yes in step S408), the process ends. If any of the conditional expressions (16) to (18) are satisfied (No in step S408). ), The process returns to step S402.

以上が、符号化スライスがBスライスであって、空間・時間的に隣接する画素ブロックの参照動き情報をMergeCandList[]へ格納しても格納最大数(N)に達しなかった場合の処理の説明である。以上により、動き情報取得部702から動き情報Bが切替スイッチ703に出力される。   The above is a description of the processing when the coded slice is a B slice and the reference motion information of spatially and temporally adjacent pixel blocks has not reached the maximum storage number (N) even if it is stored in MergeCandList []. It is. As described above, the motion information B is output from the motion information acquisition unit 702 to the changeover switch 703.

図36は、第3実施形態のプレッドユニットシンタクス512の一例を示す図である。skip_flagは、プレディクションユニットシンタクスが属するコーディングユニットの予測モードがスキップモードであるか否かを示すフラグである。skip_flagが1である場合、予測モード情報以外のシンタクス(コーディングユニットシンタクス、プレディクションユニットシンタクス、トランスフォームユニットシンタクス)を符号化しないことを示す。skip_flagが0である場合、プレディクションユニットシンタクスが属するコーディングユニットの予測モードがスキップモードではないことを示す。   FIG. 36 is a diagram illustrating an example of the tread unit syntax 512 according to the third embodiment. skip_flag is a flag indicating whether or not the prediction mode of the coding unit to which the prediction unit syntax belongs is the skip mode. When skip_flag is 1, it indicates that syntaxes other than prediction mode information (coding unit syntax, prediction unit syntax, transform unit syntax) are not encoded. When skip_flag is 0, it indicates that the prediction mode of the coding unit to which the prediction unit syntax belongs is not the skip mode.

次に符号化画素ブロック(プレディクションユニット)がマージモードであるか否かを示すフラグであるmerge_flagが符号化される。Merge_flagは、値が1である場合、プレディクションユニットがマージモードであることを示し、値が0である場合、プレディクションユニットがインターモードを用いることを示す。Merge_flagの場合、前述の画素ブロック位置インデクス(idx)を特定する情報であるmerge_idxが符号化される。   Next, merge_flag which is a flag indicating whether or not the encoded pixel block (prediction unit) is in the merge mode is encoded. Merge_flag indicates that the prediction unit is in the merge mode when the value is 1, and indicates that the prediction unit uses the inter mode when the value is 0. In the case of Merge_flag, merge_idx, which is information specifying the above-described pixel block position index (idx), is encoded.

Merge_flagが1である場合、merge_flag、merge_idx以外のプレディクションユニットシンタクスは符号化する必要はなく、Merge_flagが0である場合、プレディクションユニットがインターモードであることを示す。   When Merge_flag is 1, it is not necessary to encode the prediction unit syntax other than merge_flag and merge_idx, and when Merge_flag is 0, it indicates that the prediction unit is in inter mode.

以上のように第3実施形態では、符号化装置700は、重み付き動き補償とマージモードを同時に適用するにあたって、空間・時間的に隣接する画素ブロックの参照動き情報をマージモードの格納リスト(MergeCandList)内の重複する動き情報を削除する際に、動きベクトル及び参照番号が一致しても、WPパラメータ情報が異なる場合に、MergeCandListから削除されてしまう問題を解消する。また、MergeCandListへ格納しても格納最大数(N)に達しなかった場合に、その時点でMergeCandListに格納されているリスト0及びリ
スト1の動き情報を相互に組み合わせて、新たに双方向予測を生成し、MergeCandList[]に格納する際に、双方向予測に用いる2種類の動き情報が同一のブロックを参照する問題を解消する。
As described above, in the third embodiment, when applying weighted motion compensation and the merge mode at the same time, the encoding apparatus 700 uses the merge mode storage list (MergeCandList) for the reference motion information of pixel blocks adjacent in space and time. When the overlapping motion information in () is deleted, even if the motion vector and the reference number match, if the WP parameter information is different, the problem of being deleted from the MergeCandList is solved. If the maximum number (N) of storage is not reached even if it is stored in MergeCandList, the motion information of list 0 and list 1 stored in MergeCandList at that time is combined with each other and a new bidirectional prediction is performed. When generating and storing in MergeCandList [], the problem that two types of motion information used for bidirectional prediction refer to the same block is solved.

双方向予測に用いる2種類の動き情報が同一のブロックを参照する場合には、双方向予測による予測値と単方向予測による予測値の値が一致する。一般に双方向予測の予測効率は単方向予測の予測効率より高いために、双方向予測に用いる2種類の動き情報が同一のブロックを参照しないことが望ましい。符号化装置700は、双方向予測に用いる2種類の動き情報が同一のブロックを参照するか否かを判定する際に、動きベクトル、参照番号から導出される参照フレーム番号位置(POC)の他に、重み付き動き補償のパラメータを判定項目に導入する。これにより、符号化装置700は、動きベクトルと参照フレーム番号位置(POC)が同一であっても、重み付き動き補償のパラメータの異なる2種類の動き情報は同一のブロックを参照しないと判定し、マージモードの格納リストに格納される双方向予測に用いる動き情報の予測効率を向上させることができる。   When two types of motion information used for bidirectional prediction refer to the same block, the prediction value by bidirectional prediction and the prediction value by unidirectional prediction match. Since the prediction efficiency of bidirectional prediction is generally higher than the prediction efficiency of unidirectional prediction, it is desirable that the two types of motion information used for bidirectional prediction do not refer to the same block. When determining whether or not the two types of motion information used for bidirectional prediction refer to the same block, the encoding apparatus 700, in addition to the motion vector and the reference frame number position (POC) derived from the reference number, In addition, a weighted motion compensation parameter is introduced as a determination item. Accordingly, the encoding apparatus 700 determines that two types of motion information with different weighted motion compensation parameters do not refer to the same block even if the motion vector and the reference frame number position (POC) are the same. The prediction efficiency of motion information used for bidirectional prediction stored in the merge mode storage list can be improved.

なお、MergeCandListへの格納処理の別の例として、時間隣接ブロックTの動き情報をMergeCandListに格納する際に、時間隣接ブロックTの参照フレームにおけるWPパラメータと符号化画素ブロックの参照フレームにおけるWPパラメータが一致しているかを判定し、WPパラメータが一致している場合のみ、MergeCandListに格納するようにしてもよい。これは、時間隣接ブロックTの参照フレームにおけるWPパラメータと符号化画素ブロックの参照フレームにおけるWPパラメータが異なる場合には、時間隣接ブロックTと符号化画素ブロックで動き情報の相関が低下すると推測できるためである。   As another example of the storing process in the MergeCandList, when the motion information of the temporally adjacent block T is stored in the MergeCandList, the WP parameter in the reference frame of the temporally adjacent block T and the WP parameter in the reference frame of the encoded pixel block are It may be determined whether or not they match, and may be stored in the MergeCandList only when the WP parameters match. This is because when the WP parameter in the reference frame of the temporally adjacent block T and the WP parameter in the reference frame of the encoded pixel block are different, it can be assumed that the correlation of motion information decreases in the temporally adjacent block T and the encoded pixel block. It is.

図37は、第3実施形態のMergeCandListへの格納処理の他の例を示すフローチャートである。図38に示すフローチャートは、ステップS507を除き、図32に示すフローチャートと同一である。   FIG. 37 is a flowchart illustrating another example of the storing process in the MergeCandList according to the third embodiment. The flowchart shown in FIG. 38 is the same as the flowchart shown in FIG. 32 except for step S507.

また、更に別の例として、時間隣接ブロックTの参照フレームにおけるWPパラメータと符号化画素ブロックの参照フレームにおけるWPパラメータが異なる場合には、ブロックTに空間的に隣接するブロックのうち、符号化画素ブロックの参照フレームにおけるWPパラメータが同一となるブロックをブロックTと置き換えてもよい。この時、時間隣接ブロックTと符号化画素ブロックで動き情報の相関は低下しない。   As yet another example, if the WP parameter in the reference frame of the temporally adjacent block T and the WP parameter in the reference frame of the encoded pixel block are different, the encoded pixel of the blocks spatially adjacent to the block T A block having the same WP parameter in the reference frame of the block may be replaced with the block T. At this time, the correlation of motion information does not decrease between the temporally adjacent block T and the encoded pixel block.

(第4実施形態)
第4実施形態では、第1実施形態の符号化装置で符号化された符号化データを復号する復号装置について説明する。
(Fourth embodiment)
In the fourth embodiment, a decoding device that decodes encoded data encoded by the encoding device of the first embodiment will be described.

図38は、第4実施形態の復号装置800の構成の一例を示すブロック図である。   FIG. 38 is a block diagram illustrating an example of the configuration of the decoding device 800 according to the fourth embodiment.

復号装置800は、図示せぬ入力バッファなどに蓄積された符号化データを復号画像に復号し、出力画像として図示せぬ出力バッファに出力する。符号化データは、例えば、図1の符号化装置100などから出力され、図示せぬ蓄積系、伝送系、又はバッファなどを経て、復号装置800に入力される。   The decoding device 800 decodes encoded data stored in an input buffer (not shown) into a decoded image and outputs the decoded image to an output buffer (not shown) as an output image. The encoded data is output from, for example, the encoding device 100 of FIG. 1 and the like, and is input to the decoding device 800 via a storage system, a transmission system, or a buffer (not shown).

復号装置800は、図38に示すように、復号部801と、逆量子化部802と、逆直交変換部803と、加算部804と、予測画像生成部805と、インデックス設定部806とを、備える。逆量子化部802、逆直交変換部803、加算部804、予測画像生成部805は、それぞれ、図1の逆量子化部104、逆直交変換部105、加算部106、予測画像生成部107、と実質的に同一又は類似の要素である。なお、図38に示す復号制御部807は、復号装置800を制御するものであり、例えば、CPUなどにより実現
できる。
As illustrated in FIG. 38, the decoding device 800 includes a decoding unit 801, an inverse quantization unit 802, an inverse orthogonal transform unit 803, an addition unit 804, a predicted image generation unit 805, and an index setting unit 806. Prepare. The inverse quantization unit 802, the inverse orthogonal transform unit 803, the addition unit 804, and the predicted image generation unit 805 are respectively the inverse quantization unit 104, the inverse orthogonal transform unit 105, the addition unit 106, the predicted image generation unit 107, FIG. Are substantially the same or similar elements. Note that the decoding control unit 807 shown in FIG. 38 controls the decoding device 800 and can be realized by, for example, a CPU.

復号部801は、符号化データの復号のために、1フレーム又は1フィールド毎にシンタクスに基づいて解読を行う。復号部801は、各シンタクスの符号列を順次エントロピー復号し、予測モード、動きベクトル、及び参照番号などを含む動き情報、重み付き動き補償予測のためのインデックス情報、並びに量子化変換係数などの符号化対象ブロックの符号化パラメータを再生する。符号化パラメータとは、上記以外の変換係数に関する情報や量子化に関する情報などの復号に必要となる全てのパラメータである。復号部801は、動き情報、インデックス情報、及び量子化変換係数を出力し、量子化変換係数を逆量子化部802に入力し、インデックス情報をインデックス設定部806に入力し、動き情報を予測画像生成部805に入力する。   The decoding unit 801 performs decoding based on the syntax for each frame or field in order to decode the encoded data. The decoding unit 801 sequentially entropy-decodes the code string of each syntax, and includes motion information including a prediction mode, a motion vector, a reference number, and the like, index information for weighted motion compensation prediction, and codes such as quantization transform coefficients The encoding parameter of the conversion target block is reproduced. The encoding parameters are all parameters necessary for decoding such as information related to transform coefficients other than the above and information related to quantization. The decoding unit 801 outputs the motion information, the index information, and the quantized transform coefficient, inputs the quantized transform coefficient to the inverse quantization unit 802, inputs the index information to the index setting unit 806, and converts the motion information into the predicted image. Input to the generation unit 805.

逆量子化部802は、復号部801から入力された量子化変換係数に対して逆量子化処理を行い、復元変換係数を得る。具体的には、逆量子化部802は、復号部801において使用された量子化情報に従って逆量子化を行う。より詳細には、逆量子化部802は、量子化情報によって導出された量子化ステップサイズを量子化変換係数に乗算し、復元変換係数を得る。逆量子化部802は、復元変換係数を出力し、逆直交変換部803に入力する。   The inverse quantization unit 802 performs an inverse quantization process on the quantized transform coefficient input from the decoding unit 801 to obtain a restored transform coefficient. Specifically, the inverse quantization unit 802 performs inverse quantization according to the quantization information used in the decoding unit 801. More specifically, the inverse quantization unit 802 multiplies the quantized transform coefficient by the quantization step size derived from the quantization information to obtain a restored transform coefficient. The inverse quantization unit 802 outputs the restored transform coefficient and inputs it to the inverse orthogonal transform unit 803.

逆直交変換部803は、逆量子化部802から入力された復元変換係数に対して、符号化側において行われた直交変換に対応する逆直交変換を行い、復元予測誤差を得る。逆直交変換部803は、復元予測誤差を出力し、加算部804に入力する。   The inverse orthogonal transform unit 803 performs inverse orthogonal transform corresponding to the orthogonal transform performed on the encoding side on the reconstructed transform coefficient input from the inverse quantization unit 802 to obtain a reconstructed prediction error. The inverse orthogonal transform unit 803 outputs the restoration prediction error and inputs it to the addition unit 804.

加算部804は、逆直交変換部803から入力された復元予測誤差と、対応する予測画像とを加算し、復号画像を生成する。加算部804は、復号画像を出力し、予測画像生成部805に入力する。また加算部804は、復号画像を出力画像として外部に出力する。出力画像は、その後図示せぬ外部の出力バッファなどに一時的に蓄積され、例えば、復号制御部807によって管理される出力タイミングに従って、図示せぬディスプレイやモニタなどの表示装置系又は映像デバイス系へ出力される。   The adding unit 804 adds the restored prediction error input from the inverse orthogonal transform unit 803 and the corresponding predicted image to generate a decoded image. The adding unit 804 outputs the decoded image and inputs the decoded image to the predicted image generation unit 805. The adding unit 804 outputs the decoded image to the outside as an output image. The output image is then temporarily stored in an external output buffer (not shown) or the like. For example, in accordance with the output timing managed by the decoding control unit 807, the output image is sent to a display device system or a video device system (not shown). Is output.

インデックス設定部806は、復号部801から入力されたインデックス情報を受け取り、参照リスト(リスト番号)と参照画像(参照番号)とを確認して、WPパラメータ情報を出力し、予測画像生成部805に入力する。   The index setting unit 806 receives the index information input from the decoding unit 801, confirms the reference list (list number) and the reference image (reference number), outputs WP parameter information, and outputs the WP parameter information to the predicted image generation unit 805. input.

図39は、第4実施形態のインデックス設定部806の構成の一例を示すブロック図である。インデックス設定部806は、図39に示すように、参照画像確認部901と、WPパラメータ生成部902とを、備える。   FIG. 39 is a block diagram illustrating an example of the configuration of the index setting unit 806 according to the fourth embodiment. As shown in FIG. 39, the index setting unit 806 includes a reference image confirmation unit 901 and a WP parameter generation unit 902.

参照画像確認部901は、復号部801からインデックス情報を受け取り、2つの参照リストに含まれる参照番号が互いに同一の参照画像を指しているかどうかを確認する。   The reference image confirmation unit 901 receives the index information from the decoding unit 801, and confirms whether the reference numbers included in the two reference lists indicate the same reference image.

ここで、参照リスト内の参照番号は、例えば、H.264などで規定される方法により既に解読されている。このため、参照画像確認部901は、H.264などで規定されているDecoded Picture Buffer(DPB)の管理に従って、導出された参照リストと参照番号を用いて、同一の参照画像を指す組み合わせがあるかどうかを確認できる。なお、DPBの制御については、H.264などに記述されている方式でもよいし、別の方式であってもよい。ここでは、DPB制御により参照リストと参照番号が予め確定していればよい。   Here, the reference numbers in the reference list are H.264, for example. H.264 has already been decoded. For this reason, the reference image confirmation unit 901 uses the H.264 standard. According to the management of the Decoded Picture Buffer (DPB) defined by H.264 or the like, it is possible to check whether there is a combination pointing to the same reference image using the derived reference list and reference number. Note that the DPB control is described in H.264. The method described in H.264 or the like may be used, or another method may be used. Here, the reference list and the reference number may be determined in advance by DPB control.

参照画像確認部901は、共通参照リストを作成し、図14に示すスキャン順で参照リ
ストと参照番号を確認する。なお、共通参照リストは、数式(10)に示す疑似コードに従って作成されている。
The reference image confirmation unit 901 creates a common reference list, and confirms the reference list and the reference number in the scan order shown in FIG. The common reference list is created in accordance with the pseudo code shown in Equation (10).

WPパラメータ生成部902は、参照画像確認部901で確認された参照リストと参照番号との関係を元に、作成された共通参照リストから、参照リストと参照番号に対応するWPパラメータ情報を生成して出力し、予測画像生成部805に入力する。WPパラメータ情報については、図9A及び図9Bを参照して既に説明しているため、説明を省略する。   The WP parameter generation unit 902 generates WP parameter information corresponding to the reference list and the reference number from the created common reference list based on the relationship between the reference list and the reference number confirmed by the reference image confirmation unit 901. Output to the predicted image generation unit 805. Since the WP parameter information has already been described with reference to FIGS. 9A and 9B, description thereof will be omitted.

WPパラメータ生成部902は、共通リストに従って、common_scan_list()関数及びcommon_scan_ref_idx()関数を用いて、スキャンで参照リストと参照番号を引き、抜けている場所にWPパラメータ情報を補填する。   The WP parameter generation unit 902 uses the common_scan_list () function and the common_scan_ref_idx () function according to the common list, subtracts the reference list and reference number by scanning, and supplements the WP parameter information in the missing place.

つまり、図15、図16の共通リストを、それぞれ、図11、図13へと復元し、これらの対応に基づいて、共通リストに対応するインデックス情報を、図9A及び図9Bに示されるWPパラメータ情報に割り当てる。   That is, the common lists of FIGS. 15 and 16 are restored to FIGS. 11 and 13, respectively, and based on these correspondences, the index information corresponding to the common lists is changed to the WP parameters shown in FIGS. 9A and 9B. Assign to information.

なお、図14に示すスキャン順序は一例であり、予め定めたスキャン順序であればこれ以外のスキャン順序を用いてもよい。また、数式(10)で示した疑似コードは一例であり、本処理の目的を実現できれば処理の追加や冗長な処理の削減も可能である。   Note that the scan order shown in FIG. 14 is an example, and any other scan order may be used as long as it is a predetermined scan order. Further, the pseudo code shown in Equation (10) is an example, and if the purpose of this processing can be realized, it is possible to add processing and reduce redundant processing.

図38に戻り、予測画像生成部805は、復号部801から入力された動き情報、インデックス設定部806から入力されたWPパラメータ情報、及び加算部804から入力された復号画像を用いて、予測画像を生成する。   Returning to FIG. 38, the predicted image generation unit 805 uses the motion information input from the decoding unit 801, the WP parameter information input from the index setting unit 806, and the decoded image input from the addition unit 804 to generate a predicted image. Is generated.

ここで、図4を参照しながら、予測画像生成部805の詳細について説明する。予測画像生成部805は、予測画像生成部107同様、複数フレーム動き補償部201と、メモリ202と、単方向動き補償部203と、予測パラメータ制御部204と、参照画像セレクタ205と、フレームメモリ206と、参照画像制御部207と、を備える。   Here, the details of the predicted image generation unit 805 will be described with reference to FIG. Like the predicted image generation unit 107, the predicted image generation unit 805 includes a multi-frame motion compensation unit 201, a memory 202, a unidirectional motion compensation unit 203, a prediction parameter control unit 204, a reference image selector 205, and a frame memory 206. And a reference image control unit 207.

フレームメモリ206は、参照画像制御部207の制御の下、加算部106から入力された復号画像を参照画像として格納する。フレームメモリ206は、参照画像を一時保持するための複数のメモリセットFM1〜FMN(N≧2)を有する。   The frame memory 206 stores the decoded image input from the addition unit 106 as a reference image under the control of the reference image control unit 207. The frame memory 206 has a plurality of memory sets FM1 to FMN (N ≧ 2) for temporarily storing reference images.

予測パラメータ制御部204は、復号部801から入力される動き情報に基づいて、参照画像番号と予測パラメータとの複数の組み合わせをテーブルとして用意している。ここで、動き情報とは、動き補償予測で用いられる動きのズレ量を示す動きベクトルや参照画像番号、単方向/双方向予測などの予測モードに関する情報などを指す。予測パラメータは、動きベクトル及び予測モードに関する情報を指す。そして予測パラメータ制御部204は、動き情報に基づいて、予測画像の生成に用いる参照画像番号と予測パラメータとの組み合わせを選択して出力し、参照画像番号を参照画像セレクタ205に入力し、予測パラメータを単方向動き補償部203に入力する。   The prediction parameter control unit 204 prepares a plurality of combinations of reference image numbers and prediction parameters as a table based on the motion information input from the decoding unit 801. Here, the motion information indicates a motion vector indicating a shift amount of motion used in motion compensation prediction, a reference image number, information on a prediction mode such as unidirectional / bidirectional prediction, and the like. The prediction parameter refers to information regarding a motion vector and a prediction mode. Then, the prediction parameter control unit 204 selects and outputs a combination of a reference image number and a prediction parameter used for generating a prediction image based on the motion information, inputs the reference image number to the reference image selector 205, and outputs the prediction parameter. Is input to the unidirectional motion compensation unit 203.

参照画像セレクタ205は、フレームメモリ206が有するフレームメモリFM1〜FMNのいずれの出力端を接続するかを、予測パラメータ制御部204から入力された参照画像番号に従って切り替えるスイッチである。参照画像セレクタ205は、例えば、参照画像番号が0であれば、FM1の出力端を参照画像セレクタ205の出力端に接続し、参照画像番号がN−1であれば、FMNの出力端を参照画像セレクタ205の出力端に接続する。参照画像セレクタ205は、フレームメモリ206が有するフレームメモリFM1〜FMNのうち、出力端が接続されているフレームメモリに格納されている参照画像を出
力し、単方向動き補償部203へ入力する。なお、復号装置800では、予測画像生成部805以外で参照画像は利用されないため、予測画像生成部805の外部へ参照画像を出力しなくてもよい。
The reference image selector 205 is a switch for switching which output terminal of the frame memories FM1 to FMN included in the frame memory 206 is connected according to the reference image number input from the prediction parameter control unit 204. For example, if the reference image number is 0, the reference image selector 205 connects the output end of FM1 to the output end of the reference image selector 205. If the reference image number is N-1, the reference image selector 205 refers to the output end of the FMN. Connected to the output terminal of the image selector 205. The reference image selector 205 outputs the reference image stored in the frame memory to which the output terminal is connected among the frame memories FM1 to FMN included in the frame memory 206, and inputs the reference image to the unidirectional motion compensation unit 203. Note that in the decoding device 800, since the reference image is not used except by the predicted image generation unit 805, the reference image does not have to be output to the outside of the predicted image generation unit 805.

単方向予測動き補償部203は、予測パラメータ制御部204から入力された予測パラメータと参照画像セレクタ205から入力された参照画像に従って、動き補償予測処理を行い、単方向予測画像を生成する。動き補償予測については、図5を参照して既に説明しているため、説明を省略する。   The unidirectional prediction motion compensation unit 203 performs a motion compensation prediction process according to the prediction parameter input from the prediction parameter control unit 204 and the reference image input from the reference image selector 205, and generates a unidirectional prediction image. Since motion compensation prediction has already been described with reference to FIG. 5, description thereof will be omitted.

単方向予測動き補償部203は、単方向予測画像を出力し、メモリ202に一時的に格納する。ここで、動き情報(予測パラメータ)が双方向予測を示す場合には、複数フレーム動き補償部201が2種類の単方向予測画像を用いて重み付き予測を行うため、単方向予測動き補償部203は、1つ目に対応する単方向予測画像をメモリ202に格納し、2つ目に対応する単法予測画像を複数フレーム動き補償部201に直接出力する。ここでは、1つ目に対応する単方向予測画像を第一予測画像とし、2つ目に対応する単方向予測画像を第二予測画像とする。   The unidirectional prediction motion compensation unit 203 outputs a unidirectional prediction image and temporarily stores it in the memory 202. Here, when the motion information (prediction parameter) indicates bidirectional prediction, the multi-frame motion compensation unit 201 performs weighted prediction using two types of unidirectional prediction images, and thus the unidirectional prediction motion compensation unit 203. Stores the unidirectional predicted image corresponding to the first in the memory 202, and directly outputs the unidirectional predicted image corresponding to the second to the multi-frame motion compensation unit 201. Here, the first unidirectional prediction image corresponding to the first is the first prediction image, and the second unidirectional prediction image is the second prediction image.

なお、単方向動き補償部203を2つ用意し、それぞれが2つの単方向予測画像を生成するようにしてもよい。この場合、動き情報(予測パラメータ)が単方向予測を示すときには、単方向動き補償部203が、1つ目の単方向予測画像を第一予測画像として複数フレーム動き補償部201に直接出力すればよい。   Two unidirectional motion compensation units 203 may be prepared, and each may generate two unidirectional prediction images. In this case, when the motion information (prediction parameter) indicates unidirectional prediction, the unidirectional motion compensation unit 203 directly outputs the first unidirectional prediction image as the first prediction image to the multi-frame motion compensation unit 201. Good.

複数フレーム動き補償部201は、メモリ202から入力される第一予測画像、単方向予測動き補償部203から入力される第二予測画像、及び動き評価部109から入力されるWPパラメータ情報を用いて、重み付き予測を行って予測画像を生成する。複数フレーム動き補償部201は、予測画像を出力し、加算部804に入力する。   The multi-frame motion compensation unit 201 uses the first prediction image input from the memory 202, the second prediction image input from the unidirectional prediction motion compensation unit 203, and the WP parameter information input from the motion evaluation unit 109. Then, a prediction image is generated by performing weighted prediction. The multi-frame motion compensation unit 201 outputs a prediction image and inputs the prediction image to the addition unit 804.

ここで、図6を参照しながら、複数フレーム動き補償部201の詳細について説明する。複数フレーム動き補償部201は、予測画像生成部107同様、デフォルト動き補償部301と、重み付き動き補償部302と、WPパラメータ制御部303と、WPセレクタ304、305とを、備える。   Here, the details of the multi-frame motion compensation unit 201 will be described with reference to FIG. Similar to the predicted image generation unit 107, the multi-frame motion compensation unit 201 includes a default motion compensation unit 301, a weighted motion compensation unit 302, a WP parameter control unit 303, and WP selectors 304 and 305.

WPパラメータ制御部303は、インデックス設定部806から入力されるWPパラメータ情報に基づいて、WP適用フラグ及び重み情報を出力し、WP適用フラグをWPセレクタ304、305に入力し、重み情報を重み付き動き補償部302に入力する。   The WP parameter control unit 303 outputs a WP application flag and weight information based on the WP parameter information input from the index setting unit 806, inputs the WP application flag to the WP selectors 304 and 305, and weights the weight information. Input to the motion compensation unit 302.

ここで、WPパラメータ情報は、重み係数の固定小数点精度、第一予測画像に対応する第一WP適用フラグ,第一重み係数,及び第一オフセット、並びに第二予測画像に対応する第二WP適応フラグ,第二重み係数,及び第二オフセットの情報を含む。WP適用フラグは、該当する参照画像及び信号成分毎に設定可能なパラメータであり、重み付き動き補償予測を行うかどうかを示す。重み情報は、重み係数の固定小数点精度、第一重み係数、第一オフセット、第二重み係数、及び第二オフセットの情報を含む。なおWPパラメータ情報は、第1実施形態と同様の情報を表す。   Here, the WP parameter information includes the fixed-point precision of the weighting factor, the first WP application flag corresponding to the first predicted image, the first weighting factor, the first offset, and the second WP adaptation corresponding to the second predicted image. Contains information on flag, second weighting factor, and second offset. The WP application flag is a parameter that can be set for each corresponding reference image and signal component, and indicates whether to perform weighted motion compensation prediction. The weight information includes information on the fixed point precision of the weight coefficient, the first weight coefficient, the first offset, the second weight coefficient, and the second offset. The WP parameter information represents the same information as in the first embodiment.

詳細には、WPパラメータ制御部303は、インデックス設定部806からWPパラメータ情報が入力されると、WPパラメータ情報を第一WP適用フラグ、第二WP適用フラグ、及び重み情報に分離して出力し、第一WP適用フラグをWPセレクタ304に入力し、第二WP適用フラグをWPセレクタ305に入力し、重み情報を重み付き動き補償部302に入力する。   Specifically, when the WP parameter information is input from the index setting unit 806, the WP parameter control unit 303 separates the WP parameter information into a first WP application flag, a second WP application flag, and weight information, and outputs them. The first WP application flag is input to the WP selector 304, the second WP application flag is input to the WP selector 305, and the weight information is input to the weighted motion compensation unit 302.

WPセレクタ304、305は、WPパラメータ制御部303から入力されたWP適用フラグに基づいて、各々の予測画像の接続端を切り替える。WPセレクタ304、305は、各々のWP適用フラグが0の場合、各々の出力端をデフォルト動き補償部301へ接続する。そしてWPセレクタ304、305は、第一予測画像及び第二予測画像を出力し、デフォルト動き補償部301に入力する。一方、WPセレクタ304、305は、各々のWP適用フラグが1の場合、各々の出力端を重み付き動き補償部302へ接続する。そしてWPセレクタ304、305は、第一予測画像及び第二予測画像を出力し、重み付き動き補償部302に入力する。   The WP selectors 304 and 305 switch the connection end of each predicted image based on the WP application flag input from the WP parameter control unit 303. When each WP application flag is 0, the WP selectors 304 and 305 connect each output terminal to the default motion compensation unit 301. Then, the WP selectors 304 and 305 output the first predicted image and the second predicted image and input them to the default motion compensation unit 301. On the other hand, when each WP application flag is 1, the WP selectors 304 and 305 connect each output terminal to the weighted motion compensation unit 302. The WP selectors 304 and 305 output the first predicted image and the second predicted image, and input them to the weighted motion compensation unit 302.

デフォルト動き補償部301は、WPセレクタ304、305から入力された2つの単方向予測画像(第一予測画像及び第二予測画像)を元に平均値処理を行い、予測画像を生成する。具体的には、デフォルト動き補償部301は、第一WP適用フラグ及び第二WP適用フラグが0の場合、数式(1)に基づいて平均値処理を行う。   The default motion compensation unit 301 performs an average value process based on the two unidirectional predicted images (first predicted image and second predicted image) input from the WP selectors 304 and 305 to generate a predicted image. Specifically, when the first WP application flag and the second WP application flag are 0, the default motion compensation unit 301 performs average value processing based on Expression (1).

なお、動き情報(予測パラメータ)で示される予測モードが単方向予測である場合、デフォルト動き補償部301は、第一予測画像のみを用いて、数式(4)に基づいて最終的な予測画像を算出する。   When the prediction mode indicated by the motion information (prediction parameter) is unidirectional prediction, the default motion compensation unit 301 uses only the first prediction image and calculates a final prediction image based on Expression (4). calculate.

重み付き動き補償部302は、WPセレクタ304、305から入力された2つの単方向予測画像(第一予測画像及び第二予測画像)とWPパラメータ制御部303から入力された重み情報とを元に重み付き動き補償を行う。具体的には、重み付き動き補償部302は、第一WP適用フラグ及び第二WP適用フラグが1の場合、数式(7)に基づいて重み付き処理を行う。   The weighted motion compensation unit 302 is based on the two unidirectional prediction images (first prediction image and second prediction image) input from the WP selectors 304 and 305 and the weight information input from the WP parameter control unit 303. Performs weighted motion compensation. Specifically, when the first WP application flag and the second WP application flag are 1, the weighted motion compensation unit 302 performs the weighting process based on Expression (7).

なお、重み付き動き補償部302は、第一予測画像及び第二予測画像と予測画像との演算精度が異なる場合、固定小数点精度であるlogWDCを数式(8)のように制御することで丸め処理を実現する。   Note that the weighted motion compensation unit 302 performs rounding processing by controlling logWDC, which is fixed-point precision, as in Expression (8) when the calculation accuracy of the first predicted image, the second predicted image, and the predicted image is different. Is realized.

また、動き情報(予測パラメータ)で示される予測モードが単方向予測である場合、重み付き動き補償部302は、第一予測画像のみを用いて、数式(9)に基づいて最終的な予測画像を算出する。   Also, when the prediction mode indicated by the motion information (prediction parameter) is unidirectional prediction, the weighted motion compensation unit 302 uses only the first prediction image and uses the final prediction image based on Equation (9). Is calculated.

なお、重み付き動き補償部302は、第一予測画像及び第二予測画像と予測画像との演算精度が異なる場合、固定小数点精度であるlogWDCを双方向予測時と同様に数式(8)のように制御することで丸め処理を実現する。   Note that the weighted motion compensation unit 302, when the calculation accuracy of the first prediction image, the second prediction image, and the prediction image is different, uses the log WDC, which is a fixed-point accuracy, as in Expression (8) as in the bidirectional prediction. Rounding processing is realized by controlling to.

重み係数の固定小数点精度については、図7を参照して既に説明しているため、説明を省略する。なお、単方向予測の場合には、第二予測画像に対応する各種パラメータ(第二WP適応フラグ,第二重み係数,及び第二オフセットの情報)は利用されないため、予め定めた初期値に設定されていてもよい。   The fixed-point precision of the weighting factor has already been described with reference to FIG. In the case of unidirectional prediction, various parameters (second WP adaptive flag, second weighting factor, and second offset information) corresponding to the second predicted image are not used, and are set to predetermined initial values. May be.

復号部801は、図18に示すシンタクス500を利用する。シンタクス500は、復号部801の復号対象の符号化データの構造を示している。シンタクス500については、図18を参照して既に説明しているため、説明を省略する。また、ピクチャパラメータセットシンタクス505については、符号化が復号である点を除き、図19を参照して既に説明しているため、説明を省略する。また、スライスヘッダーシンタクス507についても、符号化が復号である点を除き、図20を参照して既に説明しているため、説明を省略する。また、プレッドウェイトテーブルシンタクス508についても、符号化が復号である点を除き、図21を参照して既に説明しているため、説明を省略する。   Decoding section 801 uses syntax 500 shown in FIG. A syntax 500 indicates a structure of encoded data to be decoded by the decoding unit 801. The syntax 500 has already been described with reference to FIG. Also, the picture parameter set syntax 505 has already been described with reference to FIG. 19 except that encoding is decoding, and thus description thereof will be omitted. Also, the slice header syntax 507 has already been described with reference to FIG. 20 except that encoding is decoding, and thus description thereof will be omitted. Also, the treadweight table syntax 508 has already been described with reference to FIG. 21 except that the encoding is decoding, and thus the description thereof will be omitted.

以上のように第4実施形態では、復号化装置800は、双方向予測を選択可能な双方向予測スライスで、参照画像が同一であるが参照画像番号が異なる2つのインデックスを用いて重み付き動き補償を行う際に、同一の値を持つインデックスを2回復号することにより、符号化効率が低下する問題を解消する。   As described above, in the fourth embodiment, the decoding apparatus 800 is a bi-directional prediction slice in which bi-directional prediction can be selected, and weighted motion using two indexes having the same reference image but different reference image numbers. When the compensation is performed, the index having the same value is decoded twice, thereby solving the problem that the coding efficiency is lowered.

双方向予測スライスで所持する2つの参照リストとリスト毎に定められた参照番号を、共通リストと共通の参照番号に並び変えることにより、参照リスト内に同一の参照画像を指す参照番号の組み合わせが含まれないようになるので、復号化装置800は、冗長なインデックスの符号量を削減することができる。   By rearranging the two reference lists possessed by the bidirectional prediction slice and the reference numbers determined for each list into the common list and the common reference number, a combination of reference numbers indicating the same reference image in the reference list is obtained. Since it is not included, the decoding apparatus 800 can reduce the code amount of the redundant index.

(第4実施形態の変形例)
第4実施形態の変形例について説明する。第4実施形態の変形例では、復号部801が用いるシンタクス要素が第4実施形態のシンタクス要素と異なる。シーケンスパラメータセットシンタクス504については、符号化が復号である点を除き、図22を参照して既に説明しているため、説明を省略する。アダプテーションパラメータセットシンタクス506についても、符号化が復号である点を除き、図23を参照して既に説明しているため、説明を省略する。プレッドウェイトテーブルシンタクス508についても、符号化が復号である点を除き、図24を参照して既に説明しているため、説明を省略する。
(Modification of the fourth embodiment)
A modification of the fourth embodiment will be described. In the modification of the fourth embodiment, the syntax element used by the decoding unit 801 is different from the syntax element of the fourth embodiment. Since the sequence parameter set syntax 504 has already been described with reference to FIG. 22 except that the encoding is decoding, the description thereof will be omitted. The adaptation parameter set syntax 506 has already been described with reference to FIG. 23 except that the encoding is decoding, and thus the description thereof will be omitted. The treadweight table syntax 508 has already been described with reference to FIG. 24 except that the encoding is decoding, and thus the description thereof will be omitted.

以上のように第4実施形態の変形例によれば、プレッドウェイトテーブルシンタクス508をアダプテーションパラメータセットシンタクス506から呼び出す構造とすることにより、1フレームを複数のスライスに分割した際のWPパラメータ情報の符号量を大幅に削減することができる。   As described above, according to the modified example of the fourth embodiment, the structure of calling the preadweight table syntax 508 from the adaptation parameter set syntax 506 makes it possible to code the WP parameter information when one frame is divided into a plurality of slices. The amount can be greatly reduced.

例えば、利用する3種類の異なるWPパラメータ情報を持つアダプテーションパラメータセットシンタクス506を先に復号しておき、スライスヘッダーシンタクス507が、状況に応じてaps_idを用いて、必要なWPパラメータ情報を呼び出すことにより、スライスヘッダーシンタクス507でWPパラメータ情報を常に復号する構成よりも、符号量を削減できる。   For example, the adaptation parameter set syntax 506 having three different types of WP parameter information to be used is decoded first, and the slice header syntax 507 calls the necessary WP parameter information using aps_id according to the situation. The amount of codes can be reduced as compared with the configuration in which the WP parameter information is always decoded with the slice header syntax 507.

(第5実施形態)
第5実施形態では、第2実施形態の符号化装置で符号化された符号化データを復号する復号装置について説明する。第5実施形態の復号装置1000では、インデックス設定部1006の構成が第4実施形態の復号装置800と相違する。以下では、第4実施形態との相違点の説明を主に行い、第4実施形態と同様の機能を有する構成要素については、第4実施形態と同様の名称・符号を付し、その説明を省略する。
(Fifth embodiment)
In the fifth embodiment, a decoding device that decodes encoded data encoded by the encoding device of the second embodiment will be described. In the decoding device 1000 of the fifth embodiment, the configuration of the index setting unit 1006 is different from that of the decoding device 800 of the fourth embodiment. In the following, differences from the fourth embodiment will be mainly described, and components having the same functions as those in the fourth embodiment will be given the same names and symbols as those in the fourth embodiment, and the description thereof will be made. Omitted.

図40は、第5実施形態のインデックス設定部1006の構成の一例を示すブロック図である。インデックス設定部1006は、図40に示すように、再利用判定部1001と、WPパラメータ生成部1002とを、備える。   FIG. 40 is a block diagram illustrating an example of the configuration of the index setting unit 1006 of the fifth embodiment. As shown in FIG. 40, the index setting unit 1006 includes a reuse determination unit 1001 and a WP parameter generation unit 1002.

再利用判定部1001は、再利用フラグをチェックし、リスト0のWPパラメータを再利用するかどうかを確認する。WPパラメータ生成部1002は、リスト0のWPパラメータを再利用する場合、リスト0のどのWPパラメータをコピーするかの情報に従って、参照先のリスト0のWPパラメータをリスト1のWPパラメータにコピーする。再利用フラグと参照先を示す参照番号に関する情報は、シンタクス要素に記述されており、WPパラメータ生成部1002がインデックス情報を解釈することにより、WPパラメータ情報を復元する。   The reuse determination unit 1001 checks the reuse flag and confirms whether to reuse the WP parameter in list 0. When reusing the WP parameter in list 0, the WP parameter generation unit 1002 copies the WP parameter in list 0 as a reference destination to the WP parameter in list 1 according to information on which WP parameter in list 0 is to be copied. Information on the reuse flag and the reference number indicating the reference destination is described in the syntax element, and the WP parameter generation unit 1002 interprets the index information to restore the WP parameter information.

再利用判定部1001は、例えば、数式(11)に示す疑似コードに従って、リスト0
のWPパラメータを再利用するかどうかを確認する。
For example, the reuse determination unit 1001 can execute the list 0 according to the pseudo code shown in the mathematical formula (11).
Confirm whether to reuse the WP parameter.

プレッドウェイトテーブルシンタクス508については、符号化が復号である点を除き、図27を参照して既に説明しているため、説明を省略する。   The treadweight table syntax 508 has already been described with reference to FIG. 27 except that the encoding is decoding, and thus the description thereof will be omitted.

以上のように第5実施形態では、復号化装置1000は、双方向予測を選択可能な双方向予測スライスで、参照画像が同一であるが参照画像番号が異なる2つのインデックスを用いて重み付き動き補償を行う際に、同一の値を持つインデックスを2回復号することにより、符号化効率が低下する問題を解消する。   As described above, in the fifth embodiment, the decoding apparatus 1000 is a bi-directional prediction slice in which bi-directional prediction can be selected, and weighted motion using two indexes having the same reference image but different reference image numbers. When the compensation is performed, the index having the same value is decoded twice, thereby solving the problem that the coding efficiency is lowered.

復号化装置1000は、リスト0のインデックスを従来通り復号し、リスト1のインデックスを復号する際に、参照リスト内に同一の参照画像を指す参照番号の組み合わせが存在するか確認し、インデックスが同一の場合には、リスト1で用いるインデックスをリスト0で用いたインデックスで再利用することにより、同一のインデックスが2度復号されることを避け、冗長なインデックスの符号量を削減することができる。   The decoding apparatus 1000 decodes the index of the list 0 as usual, and when decoding the index of the list 1, checks whether a combination of reference numbers indicating the same reference image exists in the reference list, and the index is the same. In this case, by reusing the index used in the list 1 with the index used in the list 0, it is possible to avoid decoding the same index twice and reduce the code amount of the redundant index.

(第6実施形態)
第6実施形態では、第3実施形態の符号化装置で符号化された符号化データを復号する復号装置について説明する。図41は、第6実施形態の復号装置1100の構成の一例を示すブロック図である。第6実施形態の復号装置1100は、動き情報メモリ1101、動き情報取得部1102、及び切替スイッチ1103を更に備えている点で、第4実施形態の復号装置800と相違する。以下では、第4実施形態との相違点の説明を主に行い、第4実施形態と同様の機能を有する構成要素については、第4実施形態と同様の名称・符号を付し、その説明を省略する。
(Sixth embodiment)
In the sixth embodiment, a decoding device that decodes encoded data encoded by the encoding device of the third embodiment will be described. FIG. 41 is a block diagram illustrating an example of the configuration of the decoding device 1100 according to the sixth embodiment. The decoding device 1100 of the sixth embodiment is different from the decoding device 800 of the fourth embodiment in that it further includes a motion information memory 1101, a motion information acquisition unit 1102, and a changeover switch 1103. In the following, differences from the fourth embodiment will be mainly described, and components having the same functions as those in the fourth embodiment will be given the same names and symbols as those in the fourth embodiment, and the description thereof will be made. Omitted.

動き情報メモリ1101は、復号が終了した画素ブロックに適用された動き情報を参照動き情報として一時的に格納する。動き情報メモリ1101では、動き情報に対してサブサンプリングなどの圧縮処理を行って情報量を削減しても構わない。動き情報メモリ1101は、図29に示すように、フレーム又はスライス単位で保持されており、同一フレーム上の動き情報を参照動き情報710として格納する空間方向参照動き情報メモリ701A、及び既に復号が終了したフレームの動き情報を参照動き情報710として格納する時間方向参照動き情報メモリ701Bを更に有する。時間方向参照動き情報メモリ701Bは、復号対象フレームが予測に用いる参照フレームの数に応じて、複数有しても構わない。   The motion information memory 1101 temporarily stores motion information applied to the decoded pixel block as reference motion information. The motion information memory 1101 may reduce the amount of information by performing compression processing such as sub-sampling on the motion information. As shown in FIG. 29, the motion information memory 1101 is held in units of frames or slices. The spatial direction reference motion information memory 701A stores motion information on the same frame as reference motion information 710, and decoding has already been completed. It further has a time direction reference motion information memory 701B for storing the motion information of the frame as reference motion information 710. A plurality of temporal direction reference motion information memories 701B may be provided according to the number of reference frames used for prediction by the decoding target frame.

参照動き情報710は、所定の領域単位(例えば、4×4画素ブロック単位)で空間方向参照動き情報メモリ701A及び時間方向参照動き情報メモリ701B内に保持される。参照動き情報710は、その領域が後述するインター予測で符号化されたのか又は後述するイントラ予測で符号化されたのかを示す情報をさらに有する。また、画素ブロック(コーディングユニット又はプレディクションユニット)がH.264で規定されるスキップモード、ダイレクトモード又は後述するマージモードのように、動き情報内の動きベクトルの値が復号されず、復号済みの領域から予測された動き情報を用いてインター予測される場合においても、当該画素ブロックの動き情報が参照動き情報710として保持される。   The reference motion information 710 is held in the spatial direction reference motion information memory 701A and the temporal direction reference motion information memory 701B in a predetermined area unit (for example, 4 × 4 pixel block unit). The reference motion information 710 further includes information indicating whether the region is encoded by inter prediction described later or encoded by intra prediction described later. Also, the pixel block (coding unit or prediction unit) is H.264. When the motion vector value in the motion information is not decoded and is inter-predicted using the motion information predicted from the decoded region, as in the skip mode, the direct mode or the merge mode described later in H.264 Also, the motion information of the pixel block is held as reference motion information 710.

復号対象のフレーム又はスライスの復号処理が終了したら、当該フレームの空間方向参照動き情報メモリ701Aは、次に復号処理を行うフレームに用いる時間方向参照動き情報メモリ701Bとしてその扱いが変更される。この際、時間方向参照動き情報メモリ701Bのメモリ容量を削減するために、動き情報を圧縮し、圧縮された動き情報を時間方向参照動き情報メモリ701Bに格納しても構わない。   When the decoding process of the frame or slice to be decoded is completed, the handling of the spatial direction reference motion information memory 701A of the frame is changed as the time direction reference motion information memory 701B used for the frame to be decoded next. At this time, in order to reduce the memory capacity of the time direction reference motion information memory 701B, the motion information may be compressed and the compressed motion information may be stored in the time direction reference motion information memory 701B.

動き情報取得部1102は、動き情報メモリ1101から参照動き情報が入力され、復号画素ブロックに用いる動き情報Bを出力する。動き情報取得部1102の動作は、第3実施形態の動き情報取得部702と同一であるため、その説明を省略する。   The motion information acquisition unit 1102 receives the reference motion information from the motion information memory 1101 and outputs motion information B used for the decoded pixel block. Since the operation of the motion information acquisition unit 1102 is the same as that of the motion information acquisition unit 702 of the third embodiment, description thereof is omitted.

切替スイッチ1103は、後述する予測モード情報に従って動き情報取得部1102から出力される動き情報Bと復号部801から出力される動き情報Aの内、いずれかを選択して動き情報として予測画像生成部805に出力する。復号部801から出力される動き情報Aは、図示せぬ予測動きベクトル取得部から取得する予測動きベクトルとの差分情報や、予測動きベクトル取得位置情報を復号する。このような予測モードを以降インターモードと称する。一方、予測モード情報に従って動き情報取得部1102から出力される動き情報Bは、隣接する画素ブロックから動き情報をマージして、復号画素ブロックに対してそのまま適用されるため、その他の動き情報に関する情報(例えば、動きベクトル差分情報)の復号は不要である。以降、このような予測モードをマージモードと称する。   The change-over switch 1103 selects either the motion information B output from the motion information acquisition unit 1102 or the motion information A output from the decoding unit 801 in accordance with prediction mode information described later, and generates a prediction image generation unit as motion information. Output to 805. The motion information A output from the decoding unit 801 decodes difference information from a prediction motion vector acquired from a prediction motion vector acquisition unit (not shown) and prediction motion vector acquisition position information. Such a prediction mode is hereinafter referred to as an inter mode. On the other hand, the motion information B output from the motion information acquisition unit 1102 according to the prediction mode information is merged with the motion information from the adjacent pixel blocks and applied as it is to the decoded pixel block. Decoding of (for example, motion vector difference information) is not necessary. Hereinafter, such a prediction mode is referred to as a merge mode.

予測モード情報は、復号制御部807が制御する予測モードに従っており、切替スイッチ1103の切替情報を含む。   The prediction mode information conforms to the prediction mode controlled by the decoding control unit 807 and includes switching information of the changeover switch 1103.

プレッドユニットシンタクス512については、符号化が復号である点を除き、図36を参照して既に説明しているため、説明を省略する。   Since the tread unit syntax 512 has already been described with reference to FIG. 36 except that the encoding is decoding, the description thereof will be omitted.

第6実施形態の効果は、第3実施形態と同様であるため、その説明を省略する。   Since the effect of the sixth embodiment is the same as that of the third embodiment, the description thereof is omitted.

なお、MergeCandListへの格納処理の別の例として、時間隣接ブロックTの動き情報をMergeCandListに格納する際に、時間隣接ブロックTの参照フレームにおけるWPパラメータと復号画素ブロックの参照フレームにおけるWPパラメータが一致しているかを判定し、WPパラメータが一致している場合のみ、MergeCandListに格納するようにしてもよい。これは、時間隣接ブロックTの参照フレームにおけるWPパラメータと復号画素ブロックの参照フレームにおけるWPパラメータが異なる場合には、時間隣接ブロックTと復号画素ブロックで動き情報の相関が低下すると推測できるためである。   As another example of the storing process in the MergeCandList, when the motion information of the temporally adjacent block T is stored in the MergeCandList, the WP parameter in the reference frame of the temporally adjacent block T and the WP parameter in the reference frame of the decoded pixel block are the same. Only if the WP parameters match, it may be stored in the MergeCandList. This is because when the WP parameter in the reference frame of the temporally adjacent block T and the WP parameter in the reference frame of the decoded pixel block are different, it can be estimated that the correlation of motion information decreases in the temporally adjacent block T and the decoded pixel block. .

また、更に別の例として、時間隣接ブロックTの参照フレームにおけるWPパラメータと復号画素ブロックの参照フレームにおけるWPパラメータが異なる場合には、ブロックTに空間的に隣接するブロックのうち、復号画素ブロックの参照フレームにおけるWPパラメータが同一となるブロックをブロックTと置き換えてもよい。この時、時間隣接ブロックTと復号画素ブロックで動き情報の相関は低下しない。   As yet another example, when the WP parameter in the reference frame of the temporally adjacent block T and the WP parameter in the reference frame of the decoded pixel block are different, of the blocks spatially adjacent to the block T, A block having the same WP parameter in the reference frame may be replaced with the block T. At this time, the correlation of motion information does not decrease between the temporally adjacent block T and the decoded pixel block.

(変形例)
なお、第1〜第3実施形態を選択的に用いてもよい。つまり、予めいずれの方法を選択するかの情報を定めておき、双方向スライスが選択された場合に、第1実施形態の手法を用いるか第2実施形態の手法を用いるかを示す情報により、切り替えてもよい。例えば、図20に示すスライスヘッダーシンタクスに、これらの手法を切り替えるフラグを設定し、符号化状況に合わせて選択することも容易に可能である。また、特定のハードウェアの構成に合わせて予めいずれかの手法を用いるかを定めておいてもよい。第1〜第3実施形態の予測画像生成部及びインデックス設定部は、ハードウェア実装及びソフトウェア実装のいずれにも好適である。
(Modification)
Note that the first to third embodiments may be selectively used. That is, information on which method to select is determined in advance, and information indicating whether the method of the first embodiment or the method of the second embodiment is used when a bidirectional slice is selected, You may switch. For example, a flag for switching between these methods can be set in the slice header syntax shown in FIG. 20 and can be easily selected in accordance with the coding situation. Further, it may be determined in advance which method is used in accordance with a specific hardware configuration. The predicted image generation unit and the index setting unit of the first to third embodiments are suitable for both hardware implementation and software implementation.

また、第4〜第6実施形態を選択的に用いてもよい。つまり、予めいずれの方法を選択するかの情報を定めておき、双方向スライスが選択された場合に、第4実施形態の手法を用いるか第5実施形態の手法を用いるかを示す情報により、切り替えてもよい。例えば、
図20に示すスライスヘッダーシンタクスに、これらの手法を切り替えるフラグを設定し、符号化状況に合わせて選択することも容易に可能である。また、特定のハードウェアの構成に合わせて予めいずれかの手法を用いるかを定めておいてもよい。第4〜第6実施形態の予測画像生成部及びインデックス設定部は、ハードウェア実装及びソフトウェア実装のいずれにも好適である。
Further, the fourth to sixth embodiments may be selectively used. That is, information on which method to select is determined in advance, and information indicating whether to use the method of the fourth embodiment or the method of the fifth embodiment when the bidirectional slice is selected, You may switch. For example,
A flag for switching between these methods can be set in the slice header syntax shown in FIG. 20 and can be easily selected in accordance with the coding situation. Further, it may be determined in advance which method is used in accordance with a specific hardware configuration. The predicted image generation unit and the index setting unit of the fourth to sixth embodiments are suitable for both hardware implementation and software implementation.

また、第1〜第6実施形態で例示したシンタクステーブルの行間には、上記実施形態において規定していないシンタクス要素が挿入されてもよいし、その他の条件分岐に関する記述が含まれていてもよい。また、シンタクステーブルを複数のテーブルに分割したり、複数のシンタクステーブルを統合したりしてもよい。また、例示した各シンタクス要素の用語は、任意に変更可能である。   In addition, syntax elements not defined in the above embodiment may be inserted between the rows of the syntax tables exemplified in the first to sixth embodiments, or descriptions related to other conditional branches may be included. . Further, the syntax table may be divided into a plurality of tables, or a plurality of syntax tables may be integrated. Moreover, the term of each illustrated syntax element can be changed arbitrarily.

また、第1実施形態の変形例は、第2実施形態に容易に適用できる。この場合、リスト0とリスト1に対応する参照画像の最大数を設定してもよいし、予め定めた最大数としてもよい。   Moreover, the modification of 1st Embodiment is easily applicable to 2nd Embodiment. In this case, the maximum number of reference images corresponding to list 0 and list 1 may be set, or may be a predetermined maximum number.

また、第4実施形態の変形例は、第5実施形態に容易に適用できる。この場合、リスト0とリスト1に対応する参照画像の最大数を設定してもよいし、予め定めた最大数としてもよい。   Further, the modification of the fourth embodiment can be easily applied to the fifth embodiment. In this case, the maximum number of reference images corresponding to list 0 and list 1 may be set, or may be a predetermined maximum number.

上記第1〜第6実施形態では、フレームを16×16画素サイズなどの矩形ブロックに分割し、画面左上のブロックから右下に向かって順に符号化/復号を行う例について説明している(図3Aを参照)。しかしながら、符号化順序及び復号順序はこの例に限定されない。例えば、右下から左上に向かって順に符号化及び復号が行われてもよいし、画面中央から画面端に向かって渦巻を描くように符号化及び復号が行われてもよい。更に、右上から左下に向かって順に符号化及び復号が行われてもよいし、画面端から画面中央に向かって渦巻きを描くように符号化及び復号が行われてもよい。この場合、符号化順序によって参照できる隣接画素ブロックの位置が変わるので、適宜利用可能な位置に変更すればよい。   In the first to sixth embodiments described above, an example is described in which a frame is divided into rectangular blocks having a size of 16 × 16 pixels, and encoding / decoding is sequentially performed from the upper left block to the lower right side of the screen (see FIG. See 3A). However, the encoding order and the decoding order are not limited to this example. For example, encoding and decoding may be performed in order from the lower right to the upper left, or encoding and decoding may be performed so as to draw a spiral from the center of the screen toward the screen end. Furthermore, encoding and decoding may be performed in order from the upper right to the lower left, or encoding and decoding may be performed so as to draw a spiral from the screen end toward the center of the screen. In this case, since the position of the adjacent pixel block that can be referred to changes depending on the encoding order, the position may be changed to a usable position as appropriate.

上記第1〜第6実施形態では、4×4画素ブロック、8×8画素ブロック、16×16画素ブロックなどの予測対象ブロックサイズを例示して説明を行ったが、予測対象ブロックは均一なブロック形状でなくてもよい。例えば、予測対象ブロックサイズは、16×8画素ブロック、8×16画素ブロック、8×4画素ブロック、4×8画素ブロックなどであってもよい。また、1つのコーディングツリーブロック内で全てのブロックサイズを統一させる必要はなく、複数の異なるブロックサイズを混在させてもよい。1つのコーディングツリーブロック内で複数の異なるブロックサイズを混在させる場合、分割数の増加に伴って分割情報を符号化又は復号するための符号量も増加する。そこで、分割情報の符号量と局部復号画像または復号画像の品質との間のバランスを考慮して、ブロックサイズを選択することが望ましい。   In the first to sixth embodiments described above, the prediction target block size such as a 4 × 4 pixel block, an 8 × 8 pixel block, and a 16 × 16 pixel block has been described as an example, but the prediction target block is a uniform block. It does not have to be a shape. For example, the prediction target block size may be a 16 × 8 pixel block, an 8 × 16 pixel block, an 8 × 4 pixel block, a 4 × 8 pixel block, or the like. Moreover, it is not necessary to unify all the block sizes within one coding tree block, and a plurality of different block sizes may be mixed. When a plurality of different block sizes are mixed in one coding tree block, the code amount for encoding or decoding the division information increases as the number of divisions increases. Therefore, it is desirable to select the block size in consideration of the balance between the code amount of the division information and the quality of the locally decoded image or the decoded image.

上記第1〜第6実施形態では、簡単化のために、輝度信号と色差信号における予測処理とを区別せず、色信号成分に関して包括的な説明を記述した。しかしながら、予測処理が輝度信号と色差信号との間で異なる場合には、同一または異なる予測方法が用いられてよい。輝度信号と色差信号との間で異なる予測方法が用いられるならば、色差信号に対して選択した予測方法を輝度信号と同様の方法で符号化又は復号できる。   In the first to sixth embodiments, for the sake of simplification, a comprehensive description of the color signal component is described without distinguishing between the luminance signal and the prediction process for the color difference signal. However, when the prediction process is different between the luminance signal and the color difference signal, the same or different prediction methods may be used. If different prediction methods are used between the luminance signal and the color difference signal, the prediction method selected for the color difference signal can be encoded or decoded in the same manner as the luminance signal.

上記第1〜第6実施形態では、簡単化のために、輝度信号と色差信号における重み付き動き補償予測処理とを区別せず、色信号成分に関して包括的な説明を記述した。しかしながら、重み付き動き補償予測処理が輝度信号と色差信号との間で異なる場合には、同一ま
たは異なる重み付き動き補償予測処理が用いられてよい。輝度信号と色差信号との間で異なる重み付き動き補償予測処理が用いられるならば、色差信号に対して選択した重み付き動き補償予測処理を輝度信号と同様の方法で符号化又は復号できる。
In the first to sixth embodiments, for the sake of simplification, the luminance signal and the weighted motion compensation prediction process for the chrominance signal are not distinguished from each other, and the comprehensive explanation is described regarding the color signal component. However, when the weighted motion compensation prediction process is different between the luminance signal and the color difference signal, the same or different weighted motion compensation prediction process may be used. If a weighted motion compensation prediction process that is different between the luminance signal and the color difference signal is used, the weighted motion compensation prediction process selected for the color difference signal can be encoded or decoded in the same manner as the luminance signal.

上記第1〜第6実施形態では、シンタクス構成に示す表の行間には、本実施形態で規定していないシンタクス要素が挿入されることも可能であるし、それ以外の条件分岐に関する記述が含まれていても構わない。或いは、シンタクステーブルを複数のテーブルに分割、統合することも可能である。また、必ずしも同一の用語を用いる必要は無く、利用する形態によって任意に変更しても構わない。   In the first to sixth embodiments, syntax elements not defined in this embodiment can be inserted between the rows of the table shown in the syntax configuration, and other conditional branch descriptions are included. It does not matter. Alternatively, the syntax table can be divided and integrated into a plurality of tables. Moreover, it is not always necessary to use the same term, and it may be arbitrarily changed depending on the form to be used.

以上説明したように、各実施形態は、重み付き動き補償予測を行う際に冗長な情報を符号化する問題を解消しつつ、高効率な重み付き動き補償予測処理を実現する。故に、各実施形態によれば、符号化効率が向上し、ひいては主観画質も向上する。   As described above, each embodiment realizes a highly efficient weighted motion compensation prediction process while solving the problem of encoding redundant information when performing weighted motion compensation prediction. Therefore, according to each embodiment, the encoding efficiency is improved, and the subjective image quality is also improved.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

例えば、上記各実施形態の処理を実現するプログラムを、コンピュータで読み取り可能な記憶媒体に格納して提供することも可能である。記憶媒体としては、磁気ディスク、光ディスク(CD−ROM、CD−R、DVD等)、光磁気ディスク(MO等)、半導体メモリなど、プログラムを記憶でき、かつ、コンピュータが読み取り可能な記憶媒体であれば、その記憶形式は何れの形態であってもよい。   For example, it is possible to provide a program that realizes the processing of each of the above embodiments by storing it in a computer-readable storage medium. The storage medium may be a computer-readable storage medium such as a magnetic disk, optical disk (CD-ROM, CD-R, DVD, etc.), magneto-optical disk (MO, etc.), semiconductor memory, etc. For example, the storage format may be any form.

また、上記各実施形態の処理を実現するプログラムを、インターネットなどのネットワークに接続されたコンピュータ(サーバ)上に格納し、ネットワーク経由でコンピュータ(クライアント)にダウンロードさせてもよい。   Further, the program for realizing the processing of each of the above embodiments may be stored on a computer (server) connected to a network such as the Internet and downloaded to the computer (client) via the network.

100、600、700 符号化装置
101 減算部
102 直交変換部
103 量子化部
104 逆量子化部
105 逆直交変換部
106 加算部
107 予測画像生成部
108、608 インデックス設定部
109 動き評価部
110 符号化部
111 符号化制御部
201 複数フレーム動き補償部
202 メモリ
203 単方向動き補償部
204 予測パラメータ制御部
205 参照画像セレクタ
206 フレームメモリ
207 参照画像制御部
301 デフォルト動き補償部
302 重み付き動き補償部
303 WPパラメータ制御部
304、305 WPセレクタ
401、901 参照画像確認部
402、602 インデックス生成部
601、1001 再利用判定部
701、1101 動き情報メモリ
702、1102 動き情報取得部
703、1103 切替スイッチ
800、1000、1100 復号装置
801 復号部
802 逆量子化部
803 逆直交変換部
804 加算部
805 予測画像生成部
806、1006 インデックス設定部
807 復号制御部
902、1002 WPパラメータ生成部
100, 600, 700 Encoding device 101 Subtraction unit 102 Orthogonal transformation unit 103 Quantization unit 104 Inverse quantization unit 105 Inverse orthogonal transformation unit 106 Addition unit 107 Predictive image generation unit 108, 608 Index setting unit 109 Motion evaluation unit 110 Coding Unit 111 encoding control unit 201 multi-frame motion compensation unit 202 memory 203 unidirectional motion compensation unit 204 prediction parameter control unit 205 reference image selector 206 frame memory 207 reference image control unit 301 default motion compensation unit 302 weighted motion compensation unit 303 WP Parameter control unit 304, 305 WP selector 401, 901 Reference image confirmation unit 402, 602 Index generation unit 601, 1001 Reuse determination unit 701, 1101 Motion information memory 702, 1102 Motion information acquisition unit 703, 103 selector switch 800,1000,1100 decoder 801 decoding unit 802 inverse quantization unit 803 inverse orthogonal transform unit 804 adding unit 805 predicted image generation unit 806,1006 index setting unit 807 the decoding control unit 902,1002 WP parameter generator

Claims (2)

ライスレベルよりも上位のレベルのアダプテーションパラメータセットシンタクスから呼び出されるシンタクスであって、参照番号により特定される重み係数を含む複数パラメータを記述したプレッドウェイトテーブルシンタクスと、
前記スライスレベルよりも上位のレベルのシンタクスであって、前記参照番号が取り得る値の最大数を特定するシンタクス要素を記述したシーケンスパラメータセットシンタクスと、を含む符号化データの入力を受け、
前記シーケンスパラメータセットシンタクスから前記シンタクス要素を再生し、
再生された前記シンタクス要素と前記プレッドウェイトテーブルシンタクスとから、前記最大数を上限として前記参照番号により前記複数パラメータを特定し、
前記参照番号を用いて、第1参照画像リスト及び第2参照画像リストの中から参照画像を特定し、
特定された参照画像および前記複数パラメータを用いた重み付き動き補償を含む復号処理を実行する、
号方法。
A slice level than called from the adaptation parameter set syntax of higher levels Resid Ntakusu, and spreads the weight table syntax that describes a plurality parameters including weighting coefficient specified by reference numbers,
A sheet Ntakusu level higher than the slice level, receives the encoded data comprising, a sequence parameter set syntax that describes a specific be cie Ntakusu elements the maximum number of the reference number possible values ,
To play the previous carboxymethyl Ntakusu element from the sequence parameter set syntax,
And a regenerated before carboxymethyl Ntakusu element and the spreads weight table syntax, specifies a plurality parameter by the reference number the maximum number as an upper limit,
A reference image is identified from the first reference image list and the second reference image list using the reference number ,
Performing a decoding process including weighted motion compensation using the identified reference image and the plurality of parameters;
Decrypt method.
ライスレベルよりも上位のレベルのアダプテーションパラメータセットシンタクスから呼び出されるシンタクスであって、参照番号により特定される重み係数を含む複数パラメータを記述したプレッドウェイトテーブルシンタクスと、
前記スライスレベルよりも上位のレベルのシンタクスであって、前記参照番号が取り得る値の最大数を特定するシンタクス要素を記述したシーケンスパラメータセットシンタクスと、を含む符号化データの入力を受ける入力部と、
前記シーケンスパラメータセットシンタクスから前記シンタクス要素を再生する再生部と、
再生された前記シンタクス要素と前記プレッドウェイトテーブルシンタクスとから、前記最大数を上限として前記参照番号により前記複数パラメータを特定し、前記参照番号を用いて、第1参照画像リスト及び第2参照画像リストの中から参照画像を特定する特定部と、
特定された参照画像および前記複数パラメータを用いた重み付き動き補償を含む復号処理を実行する復号部と、を備える、
号装置。
A slice level than called from the adaptation parameter set syntax of higher levels Resid Ntakusu, and spreads the weight table syntax that describes a plurality parameters including weighting coefficient specified by reference numbers,
A sheet Ntakusu level higher than the slice level, receives an input of coded data including a sequence parameter set syntax that describes a specific be cie Ntakusu elements the maximum number of the reference number possible values An input section;
A reproducing unit for reproducing the pre-carboxymethyl Ntakusu element from the sequence parameter set syntax,
And a regenerated before carboxymethyl Ntakusu element and the spreads weight table syntax, specifies a plurality parameter by the reference number the maximum number as an upper limit, using the reference number, the first reference picture list and the second reference A specifying unit for specifying a reference image from the image list ;
A decoding unit that executes a decoding process including weighted motion compensation using the identified reference image and the plurality of parameters.
Decrypt apparatus.
JP2015246525A 2015-12-17 2015-12-17 Decoding method and decoding apparatus Active JP6105034B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015246525A JP6105034B2 (en) 2015-12-17 2015-12-17 Decoding method and decoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015246525A JP6105034B2 (en) 2015-12-17 2015-12-17 Decoding method and decoding apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014098965A Division JP2014197852A (en) 2014-05-12 2014-05-12 Decoding method and decoder

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2017000052A Division JP2017085633A (en) 2017-01-04 2017-01-04 Decoding method and decoder

Publications (2)

Publication Number Publication Date
JP2016036189A JP2016036189A (en) 2016-03-17
JP6105034B2 true JP6105034B2 (en) 2017-03-29

Family

ID=55523767

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015246525A Active JP6105034B2 (en) 2015-12-17 2015-12-17 Decoding method and decoding apparatus

Country Status (1)

Country Link
JP (1) JP6105034B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017085633A (en) * 2017-01-04 2017-05-18 株式会社東芝 Decoding method and decoder
US10110904B2 (en) 2011-10-17 2018-10-23 Kabushiki Kaisha Toshiba Encoding device, decoding device, encoding method, and decoding method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770338B (en) * 2020-07-22 2022-05-13 腾讯科技(深圳)有限公司 Method, device and equipment for determining index value of coding unit and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BR112014004797B1 (en) * 2011-10-17 2022-02-15 Kabushiki Kaisha Toshiba DECODING METHOD

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10110904B2 (en) 2011-10-17 2018-10-23 Kabushiki Kaisha Toshiba Encoding device, decoding device, encoding method, and decoding method
US10187642B2 (en) 2011-10-17 2019-01-22 Kabushiki Kaisha Toshiba Encoding device, decoding device, encoding method, and decoding method
US10412394B2 (en) 2011-10-17 2019-09-10 Kabushiki Kaisha Toshiba Encoding device, decoding device, encoding method, and decoding method
US10674161B2 (en) 2011-10-17 2020-06-02 Kabushiki Kaisha Toshiba Encoding device, decoding device, encoding method, and decoding method
US11323721B2 (en) 2011-10-17 2022-05-03 Kabushiki Kaisha Toshiba Encoding device, decoding device, encoding method, and decoding method
US11381826B2 (en) 2011-10-17 2022-07-05 Kabushiki Kaisha Toshiba Encoding device, decoding device, encoding method, and decoding method
US11483570B2 (en) 2011-10-17 2022-10-25 Kabushiki Kaisha Toshiba Encoding device, decoding device, encoding method, and decoding method
US11871007B2 (en) 2011-10-17 2024-01-09 Kabushiki Kaisha Toshiba Encoding device, decoding device, encoding method, and decoding method
JP2017085633A (en) * 2017-01-04 2017-05-18 株式会社東芝 Decoding method and decoder

Also Published As

Publication number Publication date
JP2016036189A (en) 2016-03-17

Similar Documents

Publication Publication Date Title
JP5592023B2 (en) Encoding method and encoding apparatus
JP6105034B2 (en) Decoding method and decoding apparatus
JP6775039B2 (en) Decoding method and decoding device
JP2018007278A (en) Decoding method and decoder
JP2017085633A (en) Decoding method and decoder
JP6088036B2 (en) Decoding method, decoding apparatus, and program
JP2018007279A (en) Decoding method and decoder
JP2021002876A (en) Decoding method and encoding method
JP6235745B2 (en) Electronic device, decoding method and program
JP6235742B2 (en) Electronic device, decoding method and program
JP2014197852A (en) Decoding method and decoder
JP2019009792A (en) Encoding method, decoding method and encoded data

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20151217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160906

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161129

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170104

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170131

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170301

R151 Written notification of patent or utility model registration

Ref document number: 6105034

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151