JP2021002876A - Decoding method and encoding method - Google Patents

Decoding method and encoding method Download PDF

Info

Publication number
JP2021002876A
JP2021002876A JP2020167216A JP2020167216A JP2021002876A JP 2021002876 A JP2021002876 A JP 2021002876A JP 2020167216 A JP2020167216 A JP 2020167216A JP 2020167216 A JP2020167216 A JP 2020167216A JP 2021002876 A JP2021002876 A JP 2021002876A
Authority
JP
Japan
Prior art keywords
prediction
unit
syntax
information
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2020167216A
Other languages
Japanese (ja)
Inventor
昭行 谷沢
Akiyuki Tanizawa
昭行 谷沢
中條 健
Takeshi Nakajo
健 中條
太一郎 塩寺
Taiichiro Shiodera
太一郎 塩寺
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 JP2020167216A priority Critical patent/JP2021002876A/en
Publication of JP2021002876A publication Critical patent/JP2021002876A/en
Pending legal-status Critical Current

Links

Abstract

To provide a decoding method and a decoding device, capable of improving encoding efficiency.SOLUTION: A decoding method according to one embodiment includes receiving an input of encoded data including: a syntax that is called from a syntax at a level higher than a slice level and is used for weighted motion compensation and that describes a plurality of parameters obtained using a common index commonly used in a first reference image list and a second reference image list; and a syntax that is at a level higher than the slice level and that describes a syntax element including a maximum value that the common index can take. The decoding method further includes performing decoding processing, including the weighted motion compensation, using reference images and the plurality of parameters obtained using the common index with the maximum value as an upper limit.SELECTED DRAWING: Figure 1

Description

本発明の実施形態は、復号方法及び復号装置に関する。 Embodiments of the present invention relate to decoding methods and decoding devices.

近年、符号化効率を大幅に向上させた画像符号化方法が、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 coding method with significantly improved coding efficiency has been introduced by ITU-T (International).
In collaboration with the Telecommunication Union Telecommunication Standardization Sector) and ISO (International Organization for Standardization) / IEC (International Electrotechnical Commission), ITU-T REC. H. It is recommended as 264 and ISO / IEC 14496-10 (hereinafter referred to as "H.264").

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

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

特開2004−7377号公報Japanese Unexamined Patent Publication No. 2004-7377

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

実施形態の復号方法は、スライスレベルよりも上位のレベルの上位シンタクスから呼び出され、重み付き動き補償に利用される第1シンタクスであって、参照番号により特定される重み係数を含む複数パラメータを記述した前記第1シンタクスと、前記スライスレベルよりも上位のレベルの第2シンタクスであって、前記参照番号が取り得る値の最大値を含む第1シンタクス要素を記述した前記第2シンタクスと、単方向予測スライスおよび双方向予測スライスを含むスライスタイプを特定する第2シンタクス要素を記述した第3シンタクスと、を含む符号化データの入力を受け、前記符号化データから前記第1シンタクス要素および前記第2シンタクス要素を再生し、再生された前記第1シンタクス要素と前記第1シンタクスとから、前記最大値を上限として前記参照番号により前記複数パラメータを取得し、参照画像、特定された前記複数パラメータ、および、前記スライスタイプを用いる、前記重み付き動き補償を含む復号処理を実行する。 The decoding method of the embodiment is a first syntax that is called from a higher syntax at a level higher than the slice level and is used for weighted motion compensation, and describes a plurality of parameters including a weighting coefficient specified by a reference number. The first syntax described above, the second syntax at a level higher than the slice level, and the second syntax describing the first syntax element including the maximum value that the reference number can take, and the unidirectional Upon receiving input of encoded data including a third syntax describing a second syntax element that specifies a slice type including a predicted slice and a bidirectional predicted slice, the first syntax element and the second syntax element are input from the coded data. The syntax element is reproduced, and the plurality of parameters are acquired from the reproduced first syntax element and the first syntax by the reference number up to the maximum value, and the reference image, the identified plurality of parameters, and the specified plurality of parameters are obtained. , Performs a decoding process including the weighted motion compensation using the slice type.

第1実施形態の符号化装置の例を示すブロック図。The block diagram which shows the example of the coding apparatus of 1st Embodiment. 第1実施形態における画素ブロックの予測符号化順序例を示す説明図。The explanatory view which shows the predicted coding order example 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 prediction 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 prediction of the first embodiment. 第1実施形態の複数フレーム動き補償部の例を示すブロック図。The block diagram which shows the example of the multi-frame motion compensation part of 1st Embodiment. 第1実施形態における重み係数の固定小数点精度の例の説明図。The explanatory view 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 example of WP parameter information of 1st Embodiment. 第1実施形態のWPパラメータ情報例を示す図。The figure which shows the example of WP parameter information of 1st Embodiment. 第1実施形態の低遅延符号化構造における符号化順と表示順の例を示す図。The figure which shows the example of the coding order and the display order in the low delay coding structure of 1st Embodiment. 第1実施形態の低遅延符号化構造における参照画像と参照番号との関係の例を示す図。The figure which shows the example of the relationship between the reference image and the reference number in the low delay coding structure of 1st Embodiment. 第1実施形態のランダムアクセス符号化構造における符号化順と表示順の例を示す図。The figure which shows the example of the coding order and the display order in the random access coding structure of 1st Embodiment. 第1実施形態のランダムアクセス符号化構造における参照画像と参照番号との関係の例を示す図。The figure which shows the example of the relationship between the reference image and the reference number in the random access coding structure of 1st Embodiment. 第1実施形態の参照画像のリスト番号及び参照番号のスキャン順序の例を示す図。The figure which shows the list number of the reference image of 1st Embodiment, and the example of the scan order of a reference number. 第1実施形態における共通リスト変換後のWPパラメータ情報の例を簡略化して示した図。The figure which showed the example of the WP parameter information after common list conversion in 1st Embodiment simplified. 第1実施形態における共通リスト変換後のWPパラメータ情報の例を簡略化して示した図。The figure which showed the example of the WP parameter information after common list conversion in 1st Embodiment simplified. 第1実施形態のインデックス情報の生成処理例を示すフローチャート。The flowchart which shows the generation processing example of the index information of 1st 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 pred weight table syntax of 1st Embodiment. 変形例のシーケンスパラメータセットシンタクスの例を示す図。The figure which shows the example of the sequence parameter set syntax of the modification example. 変形例のアダプテーションパラメータセットシンタクスの例を示す図。The figure which shows the example of the adaptation parameter set syntax of the modification example. 変形例のプレッドウェイトテーブルシンタクスの例を示す図。The figure which shows the example of the pred 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 generation processing example of the index information of 2nd Embodiment. 第2実施形態のプレッドウェイトテーブルシンタクスの例を示す図。The figure which shows the example of the pred weight table syntax of 2nd Embodiment. 第3実施形態の符号化装置の構成例を示すブロック図。The block diagram which shows the structural example of the coding 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 the motion information candidate with respect to the coded pixel block of 3rd Embodiment. 第3実施形態の符号化画素ブロックに対する動き情報候補を導出するブロック位置の例を示す図。The figure which shows the example of the block position which derives the motion information candidate with respect to the coded pixel block of 3rd Embodiment. 第3実施形態の複数の動き情報候補の画素ブロック位置と画素ブロック位置インデクスとの関係の例を示す図。The figure which shows the example of the relationship between the pixel block position and the pixel block position index of a plurality of motion information candidates of 3rd Embodiment. 第3実施形態のMergeCandListへの格納処理例を示すフローチャート。The flowchart which shows the example of the storage process in MergeCandList of 3rd Embodiment. 第3実施形態の動き情報の格納リストの例を示す図。The figure which shows the example of the storage list of the motion information of 3rd Embodiment. 第3実施形態の動き情報の格納リストへの格納方法の例を示すフローチャート。The flowchart which shows the example of the storage method in the storage list of the motion information of 3rd Embodiment. 第3実施形態の双方向予測の組み合わせ例を示す図。The figure which shows the combination example of the bidirectional prediction of 3rd Embodiment. 第3実施形態のプレッドユニットシンタクスの例を示す図。The figure which shows the example of the pred unit syntax of 3rd Embodiment. 第3実施形態のMergeCandListへの格納処理の他の例を示すフローチャート。The flowchart which shows the other example of the storage process in 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. The coding device and decoding device of each of the following embodiments are LSI (Large-Scale Integration) chips and DSPs (Digital).
It can be realized by hardware such as Signal Processor) or FPGA (Field Programmable Gate Array). Further, the encoding device and the decoding device of each of the following embodiments can be realized by causing a computer to execute a program, that is, by software. In the following description, the term "image" can be appropriately read as a term such as "video", "pixel", "image signal", "picture", or "image data".

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

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

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

符号化装置100は、画素ブロックのブロックサイズ及び予測画像の生成方法の少なくともいずれかが異なる複数の予測モードを選択的に適用して予測符号化を行う。予測画像の生成方法は、大別すると、符号化対象フレーム内で予測を行うイントラ予測と、時間的に異なる1以上の参照フレームを用いて動き補償予測を行うインター予測との2種類である。なお、イントラ予測は、画面内予測又はフレーム内予測などとも称され、インター予測は、画面間予測、フレーム間予測、又は動き補償予測などとも称される。 The coding device 100 selectively applies a plurality of prediction modes in which at least one of the block size of the pixel block and the method of generating the prediction image is different to perform prediction coding. There are roughly two types of prediction image generation methods: intra-prediction, which makes predictions within a coded frame, and inter-prediction, which makes motion compensation predictions using one or more reference frames that differ in time. Intra-prediction is also referred to as in-screen prediction or in-frame prediction, and inter-prediction is also referred to as inter-screen 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 showing an example of the predicted coding order of the pixel blocks in the first embodiment. In the example shown in FIG. 2, the coding apparatus 100 performs predictive coding from the upper left to the lower right of the pixel block, and in the frame f to be coded, the left side of the pixel block c to be coded and the left side of the pixel block c. The encoded pixel block p is located on the upper side. In the following, for the sake of simplicity of description, the coding apparatus 100 shall perform predictive coding in the order shown in FIG. 2, but the order of predictive coding is not limited to this.

画素ブロックは、画像を処理する単位を示し、例えば、M×Nサイズのブロック(M及びNは自然数)、コーディングツリーブロック、マクロブロック、サブブロック、又は1
画素などが該当する。以降の説明では、基本的に、画素ブロックをコーディングツリーブロックの意味で使用するが、他の意味で使用する場合もある。例えば、プレディクションユニットの説明では、画素ブロックを、プレディクションユニットの画素ブロックの意味で使用する。また、ブロックはユニットなどの名称で呼ばれることもある。例えばコーディングブロックをコーディングユニットと呼ぶ。
A 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
Pixels etc. are applicable. In the following description, the pixel block is basically used in the meaning of a coding tree block, but it may be used in other meanings. For example, in the description of the prediction unit, the pixel block is used to mean the pixel block of the prediction unit. In addition, the block is sometimes 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 showing an example of the block size of the coding tree block in the first embodiment. The coding tree block is typically a 64x64 pixel block as shown in FIG. 3A. However, the present invention is not limited to this, and 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 does not have to be a square, and may be, for example, a pixel block of M × N size (M ≠ N).

図3B〜図3Dは、第1実施形態のコーディングツリーブロックの具体例を示す図である。図3Bは、ブロックサイズが64×64(N=32)のコーディングツリーブロックを示している。Nは、基準となるコーディングツリーブロックのサイズを表しており、分割された場合のサイズがN、分割されない場合のサイズが2Nと定義されている。図3Cは、図3Bのコーディングツリーブロックを四分木分割したコーディングツリーブロックを示している。コーディングツリーブロックは、図3Cに示すように、四分木構造を持つ。コーディングツリーブロックが分割された場合、分割後の4つの画素ブロックに対して、図3Cに示すように、Zスキャン順で番号が付される。 3B to 3D are diagrams showing specific examples of the coding tree block of the first embodiment. FIG. 3B shows a coding tree block with a block size of 64 × 64 (N = 32). N represents the size of the reference coding tree block, and the size when divided is N and the size when not divided is 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 the number of one quadtree. As a result, the coding tree block can be divided 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. 3D is 1. The coding tree block having the largest unit is called a large coding tree block, and the input image signal is encoded in the raster scan order in this unit.

以降の説明では、入力画像の符号化対象ブロック又はコーディングツリーブロックを予測対象ブロック又は予測画素ブロックと称することもある。なお、符号化単位は画素ブロックに限らず、フレーム、フィールド、スライス、ライン、及び画素の少なくともいずれかを用いることもできる。 In the following description, the coding 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 coding unit is not limited to the 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 shown in FIG. 1, the coding apparatus 100 predicts that the subtraction unit 101, the orthogonal conversion unit 102, the quantization unit 103, the inverse quantization unit 104, the inverse orthogonal conversion unit 105, and the addition unit 106. An image generation unit 107, an index setting unit 108, a motion evaluation unit 109, and a coding unit 110 are provided. The coding control unit 111 shown in FIG. 1 controls the coding device 100, and can be realized by, for example, a CPU (Central Processing Unit) or the like.

減算部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 conversion 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 a conversion coefficient. The orthogonal conversion unit 102 outputs the conversion coefficient and inputs it to the quantization unit 103.

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

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

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

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

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

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

予測パラメータ制御部204は、動き評価部109から入力される動き情報に基づいて、参照画像番号と予測パラメータとの複数の組み合わせをテーブルとして用意している。ここで、動き情報とは、動き補償予測で用いられる動きのズレ量を示す動きベクトルや参照画像番号、単方向/双方向予測などの予測モードに関する情報などを指す。予測パラメータは、動きベクトル及び予測モードに関する情報を指す。そして予測パラメータ制御部204は、入力画像に基づいて、予測画像の生成に用いる参照画像番号と予測パラメータとの組み合わせを選択して出力し、参照画像番号を参照画像セレクタ205に入力し、予
測パラメータを単方向動き補償部203に入力する。
The prediction parameter control unit 204 prepares a plurality of combinations of the reference image number and the prediction parameter as a table based on the movement information input from the motion evaluation unit 109. Here, the motion information refers to a motion vector indicating the amount of deviation of the motion used in the motion compensation prediction, a reference image number, information on a prediction mode such as unidirectional / bidirectional prediction, and the like. Prediction parameters refer to information about motion vectors and prediction modes. 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 inputs 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 that switches which output terminal of the frame memories FM1 to FMN of 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 the FM1 to the output end of the reference image selector 205, and if the reference image number is N-1, the reference image selector 205 refers to the output end of the FMN. Connect to the output end of the image selector 205. The reference image selector 205 outputs a reference image stored in the frame memory to which the output end is connected among the frame memories FM1 to FMN of the frame memory 206, and outputs the unidirectional motion compensation unit 203 and the motion evaluation unit 109. Enter in.

単方向予測動き補償部203は、予測パラメータ制御部204から入力された予測パラメータと参照画像セレクタ205から入力された参照画像に従って、動き補償予測処理を行い、単方向予測画像を生成する。 The unidirectional prediction motion compensation unit 203 performs motion compensation prediction processing according to the prediction parameters 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 showing an example of the relationship between the motion vectors of the motion compensation prediction in the bidirectional prediction of the first embodiment. In motion compensation prediction, interpolation processing is performed using the reference image, and a unidirectional prediction image is generated based on the amount of motion deviation from the pixel block of the coded target position between the created interpolation image and the input image. .. Here, the amount of deviation is a motion vector. As shown in FIG. 5, in the bidirectional prediction slice (B-slice), a prediction image is generated using two types of reference images and a set of motion vectors. As the interpolation process, an interpolation process having a 1/2 pixel accuracy, an interpolation process having a 1/4 pixel accuracy, or the like is used, and the value of the interpolated image is generated by performing the filtering process on the reference image. For example, H.A., which can perform interpolation processing up to 1/4 pixel accuracy for a luminance signal. In 264, the amount of deviation is expressed as four times the precision of the integer pixel.

単方向予測動き補償部203は、単方向予測画像を出力し、メモリ202に一時的に格納する。ここで、動き情報(予測パラメータ)が双方向予測を示す場合には、複数フレーム動き補償部201が2種類の単方向予測画像を用いて重み付き予測を行うため、単方向予測動き補償部203は、1つ目に対応する単方向予測画像をメモリ202に格納し、2つ目に対応する単法予測画像を複数フレーム動き補償部201に直接出力する。ここでは、1つ目に対応する単方向予測画像を第一予測画像とし、2つ目に対応する単方向予測画像を第二予測画像とする。 The unidirectional prediction motion compensation unit 203 outputs the 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, so that the unidirectional prediction motion compensation unit 203 Stores the first unidirectional prediction image in the memory 202, and directly outputs the second unidirectional prediction image to the multi-frame motion compensation unit 201. Here, the unidirectional prediction image corresponding to the first is referred to as the first prediction image, and the unidirectional prediction image corresponding to the second is referred to as the second prediction image.

なお、単方向動き補償部203を2つ用意し、それぞれが2つの単方向予測画像を生成するようにしてもよい。この場合、動き情報(予測パラメータ)が単方向予測を示すときには、単方向動き補償部203が、1つ目の単方向予測画像を第一予測画像として複数フレーム動き補償部201に直接出力すればよい。 In addition, 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, if the unidirectional motion compensation unit 203 directly outputs the first unidirectional prediction image as the first prediction image to the plurality of 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. , Performs weighted prediction to generate a prediction image. The multi-frame motion compensation unit 201 outputs a predicted image and inputs it 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 showing an example of the configuration of the multiple frame motion compensation unit 201 of 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 the 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.
It is input to 4 and 305, and the weight information is input to the weighted motion compensation unit 302.

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

詳細には、WPパラメータ制御部303は、動き評価部109からWPパラメータ情報が入力されると、WPパラメータ情報を第一WP適用フラグ、第二WP適用フラグ、及び重み情報に分離して出力し、第一WP適用フラグをWPセレクタ304に入力し、第二WP適用フラグをWPセレクタ305に入力し、重み情報を重み付き動き補償部302に入力する。 Specifically, when the WP parameter information is input from the motion evaluation unit 109, the WP parameter control unit 303 separates and outputs the WP parameter information into the first WP application flag, the second WP application flag, and the weight information. , 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. The WP selectors 304 and 305 connect their output ends to the default motion compensation unit 301 when their respective WP application flags are 0. 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, the WP selectors 304 and 305 connect their output ends to the weighted motion compensation unit 302 when their respective WP application flags are 1. Then, 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 average value processing based on the two unidirectional prediction images (first prediction image and second prediction image) input from the WP selectors 304 and 305, and generates a prediction image. Specifically, when the first WP application flag and the second WP application flag are 0, the default motion compensation unit 301 performs the average value processing based on the mathematical formula (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 mean value processing, and are determined by the internal calculation accuracy of the first predicted image and the second predicted image. Assuming that the bit accuracy of the predicted image is L and the bit accuracy of the first predicted image and the second predicted image is M (L ≦ M), shift2 is formulated by the mathematical formula (2) and offset2 is formulated by the mathematical formula (3). Will be 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 the formula (2) and offset2 = (1 << from the formula (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 to obtain the final prediction image based on the mathematical formula (4). calculate.

P[x,y]=Clip1((PLX[x,y]+offset1)>>(shift1)) …(4) P [x, y] = Clip1 ((PLX [x, y] + office1) >> (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, it is PL0 [x, y], and when the reference list is 1, it is PL1 [x, y]. Offset1 and shift1 are parameters of the rounding process and are determined by the internal calculation accuracy of the first predicted image. Assuming that the bit accuracy of the predicted image is L and the bit accuracy of the first predicted image is M, shift1 is formulated by the mathematical formula (5), and offset1 is formulated by the mathematical formula (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 precision of the predicted image is 8 and the bit precision of the first predicted image is 14, shift1 = 6 from the mathematical formula (5) and offset1 = (1 << 5) from the mathematical formula (6).

重み付き動き補償部302は、WPセレクタ304、305から入力された2つの単方向予測画像(第一予測画像及び第二予測画像)とWPパラメータ制御部303から入力された重み情報とを元に重み付き動き補償を行う。具体的には、重み付き動き補償部302は、第一WP適用フラグ及び第二WP適用フラグが1の場合、数式(7)に基づいて重み付き処理を行う。 The weighted motion compensation unit 302 is based on two unidirectional prediction images (first prediction image and second prediction image) input from the WP selectors 304 and 305 and weight information input from the WP parameter control unit 303. Perform 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 weighting processing based on the mathematical formula (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 coefficient corresponding to the first predicted image, w1C represents a weighting coefficient 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, they will be referred to as a first weighting coefficient, a second weighting coefficient, a first offset, and a second offset, respectively. logWDC is a parameter indicating the fixed-point accuracy 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 represented by C = Y, the Cr color difference signal is represented by C = Cr, and the Cb color difference component is represented by C = Cb.

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

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 the logWDC of the mathematical formula (7) with the logWD'C of the mathematical formula (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 the logWDC, the calculation accuracy is the same as that of shift2 of the mathematical formula (1). It is possible to realize batch rounding processing.

なお、動き情報(予測パラメータ)で示される予測モードが単方向予測である場合、重み付き動き補償部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 prediction image and the final prediction image based on the mathematical formula (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 coefficient 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, it is PL0 [x, y], w0C, and when the reference list is 1, it is PL1 [x, y], w1C.

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

丸め処理は、数式(7)のlogWDCを、数式(8)のlogWD’Cに置き換えることで実現できる。例えば、予測画像のビット精度が8であり、第一予測画像のビット精度が14である場合、logWDCを再設定することにより、数式(4)のshift1と同様の演算精度における一括丸め処理を実現することが可能となる。 The rounding process can be realized by replacing the logWDC of the mathematical formula (7) with the logWD'C of the mathematical formula (8). For example, when the bit accuracy of the predicted image is 8 and the bit accuracy of the first predicted image is 14, by resetting the logWDC, a batch rounding process with the same calculation accuracy as shift 1 of the mathematical formula (4) is realized. 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 fixed-point accuracy of the weighting coefficient in the first embodiment, and is a diagram showing an example of a change between a moving image having a change in brightness in the time direction and a gradation value. In the example shown in FIG. 7, the frame to be encoded is Frame (t), the frame immediately before in time is Frame (t-1), and the frame one frame after 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 as is clear from the formulas (7) and (9), it takes a value of 1.0 when there is no change in brightness. The fixed-point precision is a parameter that controls 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 adaptation flag, second weighting coefficient, and second offset information) corresponding to the second prediction image are not used, so they are set to predetermined initial values. It may have been.

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

動き評価部109は、例えば、予測対象画素ブロックの入力画像と同位置に対応する複数の参照画像を起点として差分値を計算することで誤差を算出し、この位置を分数精度でずらし、誤差最小のブロックを探すブロックマッチングなどの手法により、最適な動き情報を算出する。動き評価部109は、双方向予測の場合には、単方向予測で導出された動き情報を用いて、数式(1)及び数式(4)に示すようなデフォルト動き補償予測を含むブロックマッチングを行うことにより、双方向予測の動き情報を算出する。 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, and shifts this position with fractional accuracy to minimize the error. Optimal motion information is calculated by a method such as block matching. In the case of bidirectional prediction, the motion evaluation unit 109 uses the motion information derived by the unidirectional prediction to perform block matching including the default motion compensation prediction as shown in the mathematical formulas (1) and (4). By doing so, the motion information of the two-way prediction is calculated.

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

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

また、重み係数の固定小数点精度は、この傾きの精度を示す情報であり、動き評価部109は、参照画像の時間的な距離と画像明度の変化度から、最適な値を計算できる。例えば、図7において、Frame(t−1)〜Frame(t+1)間の重み係数が小数点精度で0.75である場合、1/4精度であれば、3/4が表現できるため、動き評価部109は、固定小数点精度を2(1<<2)に設定する。固定小数点精度の値は、重み係数を符号化した場合の符号量に影響を与えるため、符号量と予測精度を考慮して最適な値を選択すればよい。なお、固定小数点精度の値は、予め定めた固定値としてもよい。 Further, the fixed-point accuracy of the weighting coefficient is information indicating the accuracy of the inclination, 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 the image brightness. For example, in FIG. 7, when the weighting coefficient between Frame (t-1) and Frame (t + 1) is 0.75 with decimal point accuracy, 3/4 can be expressed with 1/4 accuracy, so motion evaluation is performed. The unit 109 sets the fixed-point precision to 2 (1 << 2). Since the fixed-point precision value affects the code amount when the weighting coefficient is encoded, the optimum value may be selected in consideration of the code amount and the prediction accuracy. 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 slopes do not match, the motion evaluation unit 109 can calculate the offset value by obtaining the 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 with a decimal point precision and the fixed-point precision is 1 (1 << 1), the weighting coefficient is 1. (That is, the decimal point precision of the weighting factor corresponds to 0.50) is likely to be set. In this case, since the decimal point accuracy of the weighting coefficient deviates from the optimum value of 0.60 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 one function of the coding device 100, but the motion evaluation unit 109 is not an essential configuration of the coding device 100, and for example, the motion evaluation unit 109 is coded. It may be a device outside the conversion device 100. In this case, the motion information and the WP parameter information calculated by the motion evaluation unit 109 may be loaded into the coding 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 outputs the index information to the index setting unit 108. input.

図8は、第1実施形態のインデックス設定部108の構成の一例を示すブロック図である。インデックス設定部108は、図8に示すように、参照画像確認部401と、インデックス生成部402とを、備える。 FIG. 8 is a block diagram showing an example of the configuration of the index setting unit 108 of the first embodiment. As shown 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 or not there is a WP parameter in which the reference numbers included in the two reference lists point to the same reference image. Then, the reference image confirmation unit 401 deletes the WP parameter pointing to the same reference image among the WP parameter information, outputs the deleted WP parameter information, and inputs it 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 parameters have been deleted from the reference image confirmation unit 401, maps the syntax elements described later, and generates the index information. The index generation unit 402 outputs index information and inputs it to the coding 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 showing an example of WP parameter information of the first embodiment. P-
An example of WP parameter information at the time of slice is as shown in FIG. 9A, and an example of 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 at the time of unidirectional prediction, and takes two values of 0 and 1 at the time of bidirectional prediction because two types of prediction can be used. The reference number is a value corresponding to 1 to N shown in the frame memory 206. Since the WP parameter information is held for each reference list and reference image, the information required at the time of B-slice is 2N, assuming that there are N reference images. 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 showing an example of a coding order and a display order (POC: Pcity Order Count) in the low delay coding structure of the first embodiment, and B-slice that can be a reference image is rB-. An example of the coded structure used as a slice is shown. In the low delay coding structure, the image cannot be read ahead, so the coding order and the display order are the same. Here, it is considered 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 showing an example of the relationship between the reference image and the reference number in the low delay coding structure of the first embodiment, and simplifies the relationship between the reference image and the reference number when the frame 4 is encoded. It is shown by the WP parameter information. In the example shown in FIG. 11, the order of the reference numbers in the reference list is the same in the list 0 and the list 1, which means that the reference images in the list 0 and the list 1 are the same.

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

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

参照画像確認部401は、冗長なWPパラメータ、即ち、2つの参照リストに含まれる参照番号が互いに同一の参照画像を指しているWPパラメータを削除するため、参照番号を並び替え、共通の新しいインデックスに変換する。 The reference image confirmation unit 401 rearranges the reference numbers to remove redundant WP parameters, that is, WP parameters in which the reference numbers included in the two reference lists point to the same reference image, 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 showing an example of the list numbers of the reference images of the first embodiment and the scanning order of the reference numbers. 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 scanning order shown in FIG. Specifically, the reference image confirmation unit 401 rearranges the two reference lists into a common list by reading the WP parameter information shown in FIGS. 9A and 9B in the scan order shown in FIG. 14, and redundant WP parameters. To delete. Here, the reference image confirmation unit 401 reads the WP parameter information according to the pseudo code shown in the mathematical expression (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 the list number corresponding to the scan number in FIG. common_scan_ref_idx () is a function that returns the reference number corresponding to the scan number in FIG. RefPicOrderCnt () is a function that returns the POC number corresponding to the list number and reference number. The POC number is a number indicating the display order of the reference images. However, if the POC number exceeds a predetermined maximum number, it is mapped to an initial value. For example, if the maximum value of the POC number is 255, the POC number corresponding to 256 is 0. CommonRefPicOrderCount () is a function that returns the POC number corresponding to the reference number of the common list (CommonList). InsertCommonRefPicOrderCount () is a function that inserts the POC number corresponding to the scan number into the common list (CommonList).

なお、図14に示すスキャン順序は一例であり、予め定めたスキャン順序であればこれ以外のスキャン順序を用いてもよい。また、数式(10)で示した疑似コードは一例であり、本処理の目的を実現できれば処理の追加や冗長な処理の削減も可能である。 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 by the mathematical formula (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パラメータ情報を簡略化して示している。 15 and 16 are diagrams showing a simplified example of WP parameter information after common list conversion in the first embodiment. FIG. 15 shows a 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 of is simplified and shown.

図17は、第1実施形態のインデックス設定部108で実行されるインデックス情報の生成処理の一例を示すフローチャートである。 FIG. 17 is a flowchart showing an example of the index information generation process 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 uses the WP parameter information shown in FIG. 9A as it is as an index generation unit. Output to 402. The index generation unit 402 maps the WP parameter information input from the reference image confirmation unit 401 to a predetermined syntax element described later, generates index information, 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 bidirectional prediction 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 uses the variable scan to acquire the variable list indicating the list number corresponding to the scan number (step S103), and acquires the 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 or not the 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 are the same (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 electrical_ref_flag to true (step S109). On the other hand, if 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 the value of the variable curridx is larger than num_of_common_active_ref_minus1 which is the value obtained by subtracting 1 from the maximum number of the common list (step S111), and is between num_of_common_active_ref_minus1 and below (No in step S111). ), The processing of steps S108 to 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 the confirmation of the common list and further confirms whether or not the flag electrical_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 electrical_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 of the POC number indicated by the variable refPOC, and determines that the POC indicated by the variable refPOC is not included. The number is added to the common list (step S113). On the other hand, when the flag electrical_ref_flag is true (No in step S112), the reference image confirmation unit 401 determines that the common list contains the same reference image as the reference image of the POC number indicated by the variable refPOC, and processes in 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 the value of the variable scan is greater than num_of_common_active_ref_minus1 which is the value obtained by subtracting 1 from the maximum number of the common list (step S115), and if it is num_of_common_active_ref_minus1 or less (in step S115). No), the process 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 after conversion to the common list to the index generation unit 402. The index generation unit 402 maps the WP parameter information input from the reference image confirmation unit 401 to a predetermined syntax element described later, generates index information, and outputs the index information.

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

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

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

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

シンタクス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. High-level syntax 501 contains syntax information for layers above the slice. A slice refers to a rectangular area or a continuous area contained in a frame or field. The slice level syntax 502 contains the information required to decode each slice. The coding tree level syntax 503 contains information necessary to decode each coding tree (ie, each coding tree block). Each of these parts contains more detailed syntax.

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

スライスレベルシンタクス502は、スライスヘッダーシンタクス507、プレッドウェイトテーブルシンタクス508、及びスライスデータシンタクス509などを含む。プレッドウェイトテーブルシンタクス508は、スライスヘッダーシンタクス507から呼び出される。 The slice level syntax 502 includes a slice header syntax 507, a pred weight table syntax 508, a slice data syntax 509, and the like. The pred 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 can 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 into quadtrees. Further, the transform unit syntax 511 is included in the coding tree unit syntax 510. The transform unit syntax 511 is called in each coding tree unit syntax 510 at the end of the quadtree. The transform unit syntax 511 describes information related to inverse orthogonal transformation, quantization, and the like. Information about weighted motion compensation predictions may be described in these syntaxes.

図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 showing an example of the picture parameter set syntax 505 of the first embodiment. The weighted_pred_flag is, for example, a syntax element indicating the validity or invalidity of the weighted compensation prediction of the first embodiment regarding P-slice. When weighted_pred_flag is 0, the weighted motion compensation prediction of the first embodiment in P-slice is invalid. Therefore, the WP application flag included in the WP parameter information is always set to 0, and the WP selectors 304 and 305 connect their respective output ends 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 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 first is for each local area inside the slice. One embodiment may specify the validity or invalidity of the weighted motion compensation prediction.

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実施形態の重み付き動き補償予測は有効となる。 The weighted_bipred_idc is, for example, a syntax element indicating the validity or invalidity of the weighted compensation prediction of the first embodiment regarding B-slice. When weighted_bipred_idc is 0, the weighted motion compensation prediction of the first embodiment in B-slice becomes invalid. Therefore, the WP application flag included in the WP parameter information is always set to 0, and the WP selectors 304 and 305 connect their respective output ends to the default motion compensation unit 301. On the other hand, when weighted_bipred_idc is 1, the weighted motion compensation prediction of the first embodiment in 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.), for each local region inside the slice, the first embodiment The validity or invalidity of the weighted motion compensation prediction may be specified.

図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 showing an example of the slice header syntax 507 of the first embodiment. slice_type indicates the slice type of the slice (I-slice, P-slice, B-slice, etc.). The 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 to update the number of valid reference images. 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 pred weight table syntax used for weighted motion compensation prediction, and when the above-mentioned 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 showing an example of the pred weight table syntax 508 of the first embodiment. luma_log2_weight_denom represents the fixed-point accuracy of the weighting coefficient of the luminance signal in the slice, and is a value corresponding to the logWDC of the equation (7) or the equation (9). chroma_log2_weight_denom represents the fixed-point accuracy of the weighting coefficient of the color difference signal in the slice, and is a value corresponding to the logWDC of the formula (7) or the formula (9). chroma_format_idc is an identifier representing a color space, and MONO_IDX is a value indicating a monochrome image. num_ref_common_active_minus1 indicates the value obtained by subtracting 1 from the number of reference images included in the common list in the slice, and is used in the formula (10). The maximum value of this value is the sum of the maximum values of the two reference images in 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 the WP adaptation flag in the luminance signal. When this flag is 1, the weighted motion compensation prediction of the luminance signal of the first embodiment is effective in the entire area within the slice. chroma_weight_common_flag indicates the WP adaptation flag in the color difference signal. When this flag is 1, the weighted motion compensation prediction of the color difference signal of the first embodiment is effective in the entire area within the slice. luma_weight_common [i] is the weighting coefficient of the i-th corresponding luminance signal managed in the common list. luma_offset_common [i] is the offset of the i-th corresponding luminance signal managed in the common list. These are the values corresponding to w0C, w1C, o0C, and o1C of the mathematical formula (7) or the mathematical formula (9), respectively. 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 the weighting coefficient of the i-th corresponding color difference signal managed in the common list. chroma_offset_common [i] [j] is the offset of the i-th corresponding color difference signal managed in the common list. These are the values corresponding to w0C, w1C, o0C, and o1C of the mathematical formula (7) or the mathematical formula (9), respectively. However, C = Cr or Cb. j indicates a component of a color difference component. For example, in the case of a YUV4: 2: 0 signal, j = 0 is a Cr component and j = 1 is a Cb component.

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

特に、重み係数及びオフセットは、参照画像毎に符号化する必要があるため、参照画像枚数の増加に従ってデコーダにシグナリングする情報量も増大するが、参照画像枚数が増加すると、参照リスト内に同一の参照画像を参照するケースが増えるため、共通リストで管理することにより大幅な符号量の削減効果が期待できる。 In particular, since the weighting coefficient 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, but when the number of reference images increases, they are the same in the reference list. Since the number of cases where the reference image is referred to increases, a significant reduction in the amount of code can be expected by managing with a common list.

(第1実施形態の変形例)
第1実施形態の変形例について説明する。第1実施形態の変形例では、インデックス生成部402が用いるシンタクス要素が第1実施形態のシンタクス要素と異なる。
(Modified example of the first embodiment)
A modified example of the first embodiment will be described. In the modified example of the first embodiment, the syntax element used by the index generation unit 402 is different from the syntax element 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 showing an example of the sequence parameter set syntax 504 of the modified example of the first embodiment. profile_idc is an identifier indicating information about the profile of the encoded data. level_idc is an identifier that indicates information about 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 that indicates the maximum number of reference images in a frame. The weighted_prediction_enabled_flag is, for example, a syntax element indicating the validity or invalidity of the weighted motion compensation prediction of the modified example with respect to the encoded data.

weighted_prediction_enabled_flagが0である場合、符号化データ内での変形例の重み付き動き補償予測は無効となる。従って、WPパラメータ情報に含まれるWP適用フラグは常に0に設定され、WPセレクタ304、305は、各々の出力端をデフォルト動き補償部301へ接続する。一方、weighted_prediction_enabled_flagが1である場合、符号化データ内全域で変形例の重み付き動き補償予測が有効となる。 If weighted_prediction_enabled_flag is 0, the weighted motion compensation prediction of the variant in the encoded data is invalid. Therefore, the WP application flag included in the WP parameter information is always set to 0, and the WP selectors 304 and 305 connect their respective output ends 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 in the entire coded 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 compensation prediction of the modified example may be specified for each local region inside the slice.

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

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 referring to this identifier, the lower slice can refer to any encoded aps_id. In this case, for example, by adding the same aps_id to the slice header syntax 507 of FIG. 20, it is possible to read the 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である場合、当該フレーム内全域で変形例の重み付き動き補償予測が有効となる。 The aps_weighted_prediction_flag is, for example, a syntax element indicating the validity or invalidity of the weighted motion compensation prediction of the modified example regarding P-slice in the frame. When aps_weighted_prediction_flag is 0, the weighted motion compensation prediction of the P-slice variant in the frame is invalid. Therefore, the WP application flag included in the WP parameter information is always set to 0, and the WP selectors 304 and 305 connect their respective output ends to the default motion compensation unit 301. On the other hand, when aps_weighted_prediction_flag is 1, the weighted motion compensation prediction of the modified example is effective in the entire area within 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 transformed for each local area inside the slice. You may want to specify the validity or invalidity of the weighted motion compensation prediction of the example prediction.

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, for example, a syntax element indicating the validity or invalidity of the weighted motion compensation prediction of the modified example regarding B-slice in the frame. If aps_weighted_bipred_idx is 0, the weighted motion compensation prediction of the P-slice variant in the frame is invalid. Therefore, the WP application flag included in the WP parameter information is always set to 0, and the WP selectors 304 and 305 connect their respective output ends to the default motion compensation unit 301. On the other hand, when aps_weighted_bipred_idx is 1, the weighted motion compensation prediction of the modified example is effective in the entire area within 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 transformed for each local area inside the slice. You may want to specify the validity or invalidity of the weighted motion compensation prediction of the example prediction.

pred_weight_table()は、重み付き動き補償予測に利用するプレッドウェイトテーブルシンタクスを示す関数であり、前述のaps_weighted_prediction_flagが1の場合、又はaps_weighted_bipred_idxが1の場合に、本関数が呼び出される。 pred_weight_table () is a function indicating the pred weight table syntax used for weighted motion compensation prediction, and this function is called when the above-mentioned 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 showing an example of the pread weight table syntax 508 of the modified example of the first embodiment. In the modified example of the first embodiment, in the syntax structure of FIG. 18, the pread weight table syntax 508 is called from the adaptation parameter set syntax 506. The difference from the pred weight table syntax 508 in FIG. 21 is that num_ref_common_active_minus1 has been changed to MAX_COMMON_REF_MINUS1. Since the number of reference images is described by the slice header syntax 507, it cannot be referred to by the adaptation parameter set syntax 506, which is an upper layer. Therefore, for example, the 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. In addition, a value that can take the maximum number of reference images may be set according to a predetermined profile or level. The 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 code of the WP parameter information when one frame is divided into a plurality of slices by adopting the structure in which the pred weight table syntax 508 is called from the adaptation parameter set syntax 506. The amount can be significantly 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 the necessary WP parameter information using aps_id depending on the situation. , The code amount can be reduced as compared with the configuration in which the WP parameter information is always encoded by the slice header syntax 507.

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

図25は、第2実施形態のインデックス設定部608の構成の一例を示すブロック図である。インデックス設定部608は、図25に示すように、再利用判定部601と、インデックス生成部602とを、備える。 FIG. 25 is a block diagram showing 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 collates the reference number of the list 1 with the reference number of the list 0, and determines whether or not to reuse the WP parameter information of the list 0 as the WP parameter information of the list 1. When the same reference image is included between two reference lists and the corresponding WP parameter information values are the same, encoding the same information not only in list 0 but also in list 1 increases the amount of code. Invite. Therefore, the reuse determination unit 601 reuses the WP parameter information in Listing 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 the list 0, and sets the reference number of the reference destination (list 0) as the reference information. On the other hand, the reuse determination unit 601 sets the reuse flag to 0 when the WP parameter information in the list 0 is not reused, and sets the WP parameter information corresponding to the reference number in the list 1 in the syntax.

再利用判定部601は、例えば、数式(11)に示す疑似コードに従って、リスト0のWPパラメータ情報をリスト1のWPパラメータ情報として再利用するかどうかを判定する。 The reuse determination unit 601 determines whether or not to reuse the WP parameter information in Listing 0 as the WP parameter information in Listing 1, for example, according to the pseudo code shown in the mathematical expression (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 List L1 indicates List 1. When RefWPTable () inputs the list number, reference number, and reference WP parameter, it flags whether the entered reference WP parameter matches the input list number and the WP parameter corresponding to the reference number. The function to return. When the value of the flag is 1, it means that both WP parameters match. In the pseudo code shown in the formula (11), the reference numbers in the list 1 are scanned in order, and when the reference images having the same POC number are present in the list 0, if the WP parameters are the same, the reuse flag is set. Set the indicated reuse_wp_flag to ture and the corresponding reference number in Listing 0 to reuse_ref_idx.

再利用判定部601は、再利用判定後の(再利用の設定を行った)WPパラメータ情報を出力し、インデックス生成部602に入力する。 The reuse determination unit 601 outputs the WP parameter information (which has been set for reuse) after the reuse determination, and inputs it 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 maps it to the syntax element described later to generate the index information. The syntax element that the index generation unit 602 maps is different from that of the first embodiment. The index generation unit 602 outputs the index information and inputs it to the coding unit 110.

図26は、第2実施形態のインデックス設定部608で実行されるインデックス情報の生成処理の一例を示すフローチャートである。 FIG. 26 is a flowchart showing an example of the index information generation process 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 uses the WP parameter information shown in FIG. 9A as it is as an index generation unit. Output to 602. The index generation unit 602 maps the WP parameter information input from the reuse determination unit 601 to a predetermined syntax element described later, generates index information, 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 bidirectional 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 in Listing 1.

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

続いて、再利用判定部601は、導出した変数refPOCが示すPOC番号と変数curridxが示す参照番号に対応する参照画像のPOC番号とが同一であり、かつ変数refIdxが示す参照番号に対応するWPパラメータと変数curridxが示す参照番号に対応するWPパラメータとが同一であるかを判断する(ステップS207)。 Subsequently, in the reuse determination unit 601, the 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 are the same, 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 determination unit 601 sets the flag reuse_wp_flag to true (step S208) and substitutes the value of the variable curridx into the variable reuse_ref_idx (step S208). Step S209). On the other hand, when both POC numbers or both WP parameters are not the same (No in step S207), the processes of steps S208 and S209 are not performed. It should be noted that the configuration may be such that the matching of the POC numbers is not confirmed.

続いて、再利用判定部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 the value of the variable curridx is larger than num_of_active_ref_l0_minus1 which is the value obtained by subtracting 1 from the maximum number of list 0 (step S211), and is between num_of_active_ref_l0_minus1 and less (No in step S211). ), The processing of steps S207 to 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 which is the value obtained by subtracting 1 from the maximum number in the list 1 (step S213), and is between num_of_active_ref_l1_minus1 and below (No in step S213). ), The processing of steps S203 to 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 maps the WP parameter information input from the reuse determination unit 601 to a predetermined syntax element described later, generates index information, 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 showing an example of the pred weight table syntax 506 of the second embodiment. Among the syntax elements shown in FIG. 27, those having the symbols l0 and l1 correspond to lists 0 and 1, respectively. Further, the syntax elements having the same prefix as in FIG. 21 are used as the same variable except that the reference list is handled differently, although there is a difference between the list 0 and the list 1 instead of the common list. For example, luma_weight_l0 [i] is a syntax element representing the i-th weighting factor of 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 that of 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 list 0 with the symbol l0. Next, the syntax elements for Listing 1 with the symbol l1 are 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. If reuse_wp_flag is 1, reuse_ref_idx is encoded without the weighting factors and offsets being encoded. reuse_ref_idx indicates which reference number of l0 corresponding to Listing 0 to use the WP parameter. For example, when reuse_ref_idx is 1, the WP parameter corresponding to the reference number 1 in the list 0 is copied to the WP parameter corresponding to the reference number i in the list 1. When reuse_wp_flag is 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, as in Listing 0.

以上のように第2実施形態では、インデックス設定部608は、WPパラメータ情報において、リスト0及びリスト1の2つの参照リスト内に互いに同一の参照画像を含む組み合わせがある場合、重複するWPパラメータを再利用することにより、WPパラメータ情報から重複する冗長なWPパラメータを削除してインデックス情報を生成する。従って、第2実施形態によれば、インデックス情報の符号量を削減することができる。 As described above, in the second embodiment, when the index setting unit 608 has a combination in the WP parameter information that includes the same reference image in the two reference lists of list 0 and list 1, duplicate WP parameters are set. By reusing, duplicate redundant WP parameters are deleted from the WP parameter information and index information is generated. 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 encoding the WP parameter information corresponding to the list 1, it is checked whether or not the same reference image is referred to in the list 0. However, when the same reference image is referred to and the WP parameters are also the same, the flag for reusing the WP parameters in Listing 0 is encoded, and the information indicating which reference number in Listing 0 corresponds to is encoded. To become. Since this information is much less than the amount of information regarding the weighting coefficient and the offset, the amount of code for the WP parameter information can be significantly reduced as compared with the case where the list 0 and the list 1 are encoded separately. ..

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

(第3実施形態)
第3実施形態について説明する。図28は、第3実施形態の符号化装置700の構成の一例を示すブロック図である。第3実施形態の符号化装置700は、動き情報メモリ701、動き情報取得部702、及び切替スイッチ703を更に備えている点で、第1実施形態の符号化装置100と相違する。以下では、第1実施形態との相違点の説明を主に行い、第1実施形態と同様の機能を有する構成要素については、第1実施形態と同様の名称・符号を付し、その説明を省略する。
(Third Embodiment)
The third embodiment will be described. FIG. 28 is a block diagram showing an example of the configuration of the coding device 700 of the third embodiment. The coding device 700 of the third embodiment is different from the coding device 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, the differences from the first embodiment will be mainly explained, and the components having the same functions as those of the first embodiment will be given the same names and codes as those of the first embodiment, and the explanations will be given. Omit.

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

図29は、第3実施形態の動き情報メモリ701の詳細例を示す図である。動き情報メモリ701は、図29に示すように、フレーム又はスライス単位で保持されており、同一フレーム上の動き情報を参照動き情報710として格納する空間方向参照動き情報メモリ701A、及び、既に符号化が終了したフレームの動き情報を参照動き情報710として格納する時間方向参照動き情報メモリ701Bを更に有する。時間方向参照動き情報メモリ701Bは、符号化対象フレームが予測に用いる参照フレームの数に応じて複数有しても構わない。 FIG. 29 is a diagram showing a detailed example of the motion information memory 701 of the third embodiment. As shown in FIG. 29, the motion information memory 701 is held in units of frames or slices, and the spatial direction reference motion information memory 701A that stores motion information on the same frame as reference motion information 710 and already encoded. Further has a time direction reference motion information memory 701B for storing the motion information of the frame at which the above is completed as the reference motion information 710. The time direction reference motion information memory 701B may have a plurality of reference frames depending on the number of reference frames used for prediction by the coded 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 time direction reference motion information memory 701B in predetermined area units (for example, 4 × 4 pixel block units). The reference motion information 710 further has information indicating whether the region is encoded by the inter-prediction described later or the intra-prediction described later. In addition, the pixel block (coding unit or prediction unit) is H.I. As in the skip mode defined by 264, the direct mode, or the merge mode described later, the value of the motion vector in the motion information is not encoded, and is inter-predicted using the motion information predicted from the encoded region. Even in this case, the motion information of the pixel block is retained as the reference motion information 710.

符号化対象のフレーム又はスライスの符号化処理が終了したら、当該フレームの空間方向参照動き情報メモリ701Aは、次に符号化処理を行うフレームに用いる時間方向参照動き情報メモリ701Bとしてその扱いが変更される。この際、時間方向参照動き情報メモリ701Bのメモリ容量を削減するために、動き情報を圧縮し、圧縮された動き情報を時間方向参照動き情報メモリ701Bに格納しても構わない。 When the coding process of the frame or slice to be encoded is completed, the spatial direction reference motion information memory 701A of the frame is changed to the time direction reference motion information memory 701B used for the frame to be encoded next. To. 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 reference motion information from the motion information memory 701 and outputs motion information B used for the coded pixel block. The 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 the prediction mode information described later, and generates a prediction image as motion information. Output to unit 107. The motion information A output from the motion evaluation unit 109 encodes the difference information from the predicted motion vector acquired from the predicted motion vector acquisition unit (not shown) and the 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 applied to the coded pixel block as it is by merging the motion information from the adjacent pixel blocks, and thus is related to other motion information. Coding of information (eg, motion vector difference information) is not required. Hereinafter, such a prediction mode will be referred to as a merge mode.

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

以下、動き情報取得部702の詳細について説明する。 The 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 as an input and outputs the motion information B to the changeover switch 703. 30A and 30B are diagrams showing an example of a block position for deriving a motion information candidate for the coded pixel block of the third embodiment. A to E in FIG. 30A indicate spatially adjacent pixel blocks for deriving motion information candidates to the coded 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 showing an example of the relationship between the pixel block positions of the plurality of motion information candidates of the third embodiment and the pixel block position index (idx). The block positions of the 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) in that order. ) If there is a pixel block, idx is sequentially assigned until the maximum number of motion information (N-1) stored in the merge mode storage list MergeCandList is reached.

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

まず、動き情報取得部702は、MergeCandListへの格納数numMergeCandを0で初期化する(ステップS301)。 First, the motion information acquisition unit 702 initializes the number of stored numMergeCands 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 the spatially adjacent blocks (for example, blocks A to E) are available (steps S302 and S303). In the case of Available (Yes in step S303), the motion information acquisition unit 702 stores the motion information of the space adjacent block in MergeCandList and increments numMergeCand (step S304). If 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 the spatially adjacent blocks (step S305), the motion information acquisition unit 702 determines whether or not the temporally adjacent blocks (for example, the block T) are available. (Step S306).

Availableである場合(ステップS306でYes)、動き情報取得部702は、MergeCandListに当該時間隣接ブロックTの動き情報を格納し、numMergeCandをインクリメントする(ステップS307)。Availableでない場合(ステップS306でNo)、動き情報取得部702は、ステップS307の処理を行わない。 In the case of 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 the numMergeCand (step S307). If 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 duplicate motion information in the MergeCandList and decrements the numMergeCand by the deleted number (step S308). In order to determine whether or not there is duplicate motion information in MergeCandList, it is determined whether the two types of motion information (motion vector mv, reference number refIdx) and WP parameter information in MergeCandList match, and all the information is If they match, remove 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 storage list of motion information according to the third embodiment. Specifically, FIG. 33 is a diagram showing motion information (motion vector mv) corresponding to each idx according to the table shown in FIG. 31 with N = 5. , Reference number refIdx) storage list (MergeCandList [idx]) is shown as an example. In FIG. 33, idx = 0 is the reference motion information of the list 0 (motion vector mv0L0, reference number refIdx0L0), idx = 1 is the reference motion information of the list 1 (motion vector mv1L1, reference number refIdx1L1), idx = 2- Reference numeral 4 stores both reference motion information (motion vector mv2L0, mv2L1, reference number refIdx2L0, refIdx2L1) of both list 0 and list 1.

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

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

符号化スライスがBスライスであって、空間・時間的に隣接する画素ブロックの参照動き情報をMergeCandList[]へ格納しても格納最大数(N)に達しなかった場合には、その時点でMergeCandList[]に格納されているリスト0及びリスト1の動き情報を相互に組み合
わせて、新たに双方向予測を生成しMergeCandList[]に格納する。
If the coded slice is a B slice and the maximum number of stored pixels (N) is not reached even if the reference motion information of spatially and temporally adjacent pixel blocks is stored in MergeCandList [], MergeCandList at that point. The motion information of List 0 and List 1 stored in [] is combined with each other to generate a new bidirectional prediction and store it in MergeCandList [].

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

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

続いて、動き情報取得部702は、新たに生成する双方向予測の組み合わせ(図35参照)を用いて、combIdxから変数l0CandIdx,変数l1CandIdxを導出する(ステップS402)。なお、combIdxから変数l0CandIdx,変数l1CandIdxを導出する組み合わせは、図36に示す例に限らず、重複しなければ任意の順序に並び替えても構わない。 Subsequently, the motion information acquisition unit 702 derives the variable l0CandIdx and the variable l1CandIdx from combIdx using the newly generated combination of bidirectional predictions (see FIG. 35) (step S402). The combination for deriving the variable l0CandIdx and the variable l1CandIdx from combIdx is not limited to the example shown in FIG. 36, and may be rearranged in any 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] in l0Cand. The reference number in l0Cand is called refIdxL0l0Cand, and the motion vector is called mvL0l0Cand. Similarly, the motion information acquisition unit 702 sets the reference motion information stored in the MergeCandList [l1CandIdx] in l1Cand. The reference number in l1Cand is referred to as refIdxL1l1Cand, and the motion vector is referred to as mvL1l1Cand (step S403). The combination of motion information for bidirectional prediction using l0Cand as the motion information in Listing 0 and L1Cand as the motion information in Listing 1 is called combCand.

続いて、動き情報取得部702は、条件式(12)〜(15)を用いて、l0Candとl1Candが参照するブロックを同一であるか否かを判定する(ステップS404)。 Subsequently, the motion information acquisition unit 702 determines whether or not the blocks referred to by the l0Cand and the l1Cand are the same by 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 that derives the POC (Picture Order Count) of the reference frame corresponding to the reference number refIdx in the reference list X (X = 0, 1). WpParam (refIdx, LX) is a function for deriving the 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 if the reference frame in Listing 0 and the reference frame in Listing 1 are not the same WP parameters (WP presence / absence WP_flag, weighting factor Weight, offset Offset), if they are exactly the same parameters. Returns No. As another example of WpParam (), it is not necessary to check the match of all parameters, and the judgment is made using only some data of the WP parameter, such as checking the match of only WP_flag and offset Offset with or without WP. You may.

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

mergeCandList[]内でl0Candとl1Candと同一の組み合わせがない場合(ステップS405でYes)、動き情報取得部702は、当該combCandをmergeCandListの最後尾に追加する(ステップS406)。具体的には、動き情報取得部702は、combCandをmergeCandList[numMergeCand]に代入し、numMergeCand及びcombCntをインクリメントする。 If there is no same 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 or not to end the storage in the mergeCandList [] by 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, and if any of the conditional expressions (16) to (18) is satisfied (No in step S408). ), Return to step S402.

以上が、符号化スライスがBスライスであって、空間・時間的に隣接する画素ブロックの参照動き情報をMergeCandList[]へ格納しても格納最大数(N)に達しなかった場合の処理の説明である。以上により、動き情報取得部702から動き情報Bが切替スイッチ703に出力される。 The above is an explanation of the processing when the coded slice is a B slice and the maximum number of stored pixels (N) is not reached even if the reference motion information of spatially and temporally adjacent pixel blocks is stored in MergeCandList []. Is. As a result, 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 showing an example of the pred unit syntax 512 of 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 coded pixel block (prediction unit) is in the merge mode, is encoded. Merge_flag indicates that the prediction unit is in merge mode when the value is 1, and indicates that the prediction unit uses intermode when the value is 0. In the case of Merge_flag, merge_idx, which is the information for specifying the pixel block position index (idx) described above, is encoded.

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

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

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

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

図37は、第3実施形態のMergeCandListへの格納処理の他の例を示すフローチャートである。図38に示すフローチャートは、ステップS507を除き、図32に示すフローチャートと同一である。 FIG. 37 is a flowchart showing another example of the storage process in the MergeCandList of 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, when the WP parameter in the reference frame of the time-adjacent block T and the WP parameter in the reference frame of the coded pixel block are different, the coded pixel of the blocks spatially adjacent to the block T A block having the same WP parameters 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 time-adjacent block T and the coded pixel block.

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

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

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

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

復号部801は、符号化データの復号のために、1フレーム又は1フィールド毎にシンタクスに基づいて解読を行う。復号部801は、各シンタクスの符号列を順次エントロピー復号し、予測モード、動きベクトル、及び参照番号などを含む動き情報、重み付き動き補償予測のためのインデックス情報、並びに量子化変換係数などの符号化対象ブロックの符号化パラメータを再生する。符号化パラメータとは、上記以外の変換係数に関する情報や量子化に関する情報などの復号に必要となる全てのパラメータである。復号部801は、動き情報、インデックス情報、及び量子化変換係数を出力し、量子化変換係数を逆量子化部802に入力し、インデックス情報をインデックス設定部806に入力し、動き情報を予測画像生成部805に入力する。 The decoding unit 801 performs decoding based on the syntax for each frame or field for decoding the encoded data. The decoding unit 801 sequentially entropy-decodes the code string of each syntax, and the motion information including the prediction mode, the motion vector, and the reference number, the index information for the weighted motion compensation prediction, and the code such as the quantization conversion coefficient. Reproduce the coding parameters of the block to be converted. The coding parameters are all parameters required for decoding, such as information on conversion coefficients and information on quantization other than the above. The decoding unit 801 outputs motion information, index information, and quantization conversion coefficient, inputs the quantization conversion coefficient to the inverse quantization unit 802, inputs index information to the index setting unit 806, and predicts motion information. 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 quantization conversion coefficient input from the decoding unit 801 to obtain a restoration conversion 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 quantization step size derived from the quantization information by the quantization conversion coefficient to obtain the restoration conversion coefficient. The inverse quantization unit 802 outputs the restoration conversion coefficient and inputs it to the inverse orthogonal conversion unit 803.

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

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

図39は、第4実施形態のインデックス設定部806の構成の一例を示すブロック図である。インデックス設定部806は、図39に示すように、参照画像確認部901と、WPパラメータ生成部902とを、備える。 FIG. 39 is a block diagram showing an example of the configuration of the index setting unit 806 of 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 or not the reference numbers included in the two reference lists point to the same reference image.

ここで、参照リスト内の参照番号は、例えば、H.264などで規定される方法により既に解読されている。このため、参照画像確認部901は、H.264などで規定されているDecoded Picture Buffer(DPB)の管理に従って、導出された参照リストと参照番号を用いて、同一の参照画像を指す組み合わせがあるかどうかを確認できる。なお、DPBの制御については、H.264などに記述されている方式でもよいし、別の方式であってもよい。ここでは、DPB制御により参照リストと参照番号が予め確定していればよい。 Here, the reference number in the reference list is, for example, H. It has already been deciphered by the method specified in 264 and the like. Therefore, the reference image confirmation unit 901 has a H. According to the management of the Decoded Picture Buffer (DPB) specified in 264 and the like, it is possible to confirm whether or not there is a combination pointing to the same reference image by using the derived reference list and reference number. Regarding the control of DPB, H. The method described in 264 or the like may be used, or another method may be used. Here, it is sufficient that the reference list and the reference number are 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 according to the pseudo code shown in the formula (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. Is output and input to the prediction image generation unit 805. Since the WP parameter information has already been described with reference to FIGS. 9A and 9B, the 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 to draw a reference list and a reference number in the scan, and fills the missing places with the WP parameter information.

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

なお、図14に示すスキャン順序は一例であり、予め定めたスキャン順序であればこれ以外のスキャン順序を用いてもよい。また、数式(10)で示した疑似コードは一例であり、本処理の目的を実現できれば処理の追加や冗長な処理の削減も可能である。 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 by the mathematical formula (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 prediction 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 perform the prediction image. To generate.

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

予測パラメータ制御部204は、復号部801から入力される動き情報に基づいて、参照画像番号と予測パラメータとの複数の組み合わせをテーブルとして用意している。ここで、動き情報とは、動き補償予測で用いられる動きのズレ量を示す動きベクトルや参照画像番号、単方向/双方向予測などの予測モードに関する情報などを指す。予測パラメータは、動きベクトル及び予測モードに関する情報を指す。そして予測パラメータ制御部204は、動き情報に基づいて、予測画像の生成に用いる参照画像番号と予測パラメータとの組み合わせを選択して出力し、参照画像番号を参照画像セレクタ205に入力し、予測パラメータを単方向動き補償部203に入力する。 The prediction parameter control unit 204 prepares a plurality of combinations of the reference image number and the prediction parameter as a table based on the motion information input from the decoding unit 801. Here, the motion information refers to a motion vector indicating the amount of motion deviation used in motion compensation prediction, a reference image number, information on a prediction mode such as unidirectional / bidirectional prediction, and the like. Prediction parameters refer to information about motion vectors and prediction modes. 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 motion information, inputs the reference image number to the reference image selector 205, and inputs 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 that switches which output terminal of the frame memories FM1 to FMN of 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 the FM1 to the output end of the reference image selector 205, and if the reference image number is N-1, the reference image selector 205 refers to the output end of the FMN. Connect to the output end of the image selector 205. The reference image selector 205 outputs a reference image stored in the frame memory to which the output end is connected among the frame memories FM1 to FMN of the frame memory 206, and inputs the reference image to the unidirectional motion compensation unit 203. In the decoding device 800, since the reference image is not used except for the prediction image generation unit 805, it is not necessary to output the reference image to the outside of the prediction image generation unit 805.

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

単方向予測動き補償部203は、単方向予測画像を出力し、メモリ202に一時的に格納する。ここで、動き情報(予測パラメータ)が双方向予測を示す場合には、複数フレーム動き補償部201が2種類の単方向予測画像を用いて重み付き予測を行うため、単方向予測動き補償部203は、1つ目に対応する単方向予測画像をメモリ202に格納し、2つ目に対応する単法予測画像を複数フレーム動き補償部201に直接出力する。ここでは、1つ目に対応する単方向予測画像を第一予測画像とし、2つ目に対応する単方向予測画像を第二予測画像とする。 The unidirectional prediction motion compensation unit 203 outputs the 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, so that the unidirectional prediction motion compensation unit 203 Stores the first unidirectional prediction image in the memory 202, and directly outputs the second unidirectional prediction image to the multi-frame motion compensation unit 201. Here, the unidirectional prediction image corresponding to the first is referred to as the first prediction image, and the unidirectional prediction image corresponding to the second is referred to as the second prediction image.

なお、単方向動き補償部203を2つ用意し、それぞれが2つの単方向予測画像を生成するようにしてもよい。この場合、動き情報(予測パラメータ)が単方向予測を示すときには、単方向動き補償部203が、1つ目の単方向予測画像を第一予測画像として複数フレーム動き補償部201に直接出力すればよい。 In addition, 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, if the unidirectional motion compensation unit 203 directly outputs the first unidirectional prediction image as the first prediction image to the plurality of 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. , Performs weighted prediction to generate a prediction image. The multi-frame motion compensation unit 201 outputs a predicted image and inputs it to the addition unit 804.

ここで、図6を参照しながら、複数フレーム動き補償部201の詳細について説明する。複数フレーム動き補償部201は、予測画像生成部107同様、デフォルト動き補償部301と、重み付き動き補償部302と、WPパラメータ制御部303と、WPセレクタ304、305とを、備える。 Here, the details of the plurality of frame motion compensation units 201 will be described with reference to FIG. Like 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 the 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 accuracy of the weighting factor, the first WP application flag corresponding to the first predicted image, the first weighting factor, and the first offset, and the second WP adaptation corresponding to the second predicted image. Contains information on flags, second weighting factors, 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 or not to perform weighted motion compensation prediction. The weight information includes information on the fixed-point accuracy of the weighting factors, the first weighting factor, the first offset, the second weighting factor, 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 and outputs the WP parameter information into the first WP application flag, the second WP application flag, and the weight information. , 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. The WP selectors 304 and 305 connect their output ends to the default motion compensation unit 301 when their respective WP application flags are 0. 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, the WP selectors 304 and 305 connect their output ends to the weighted motion compensation unit 302 when their respective WP application flags are 1. Then, 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 average value processing based on the two unidirectional prediction images (first prediction image and second prediction image) input from the WP selectors 304 and 305, and generates a prediction image. Specifically, when the first WP application flag and the second WP application flag are 0, the default motion compensation unit 301 performs the average value processing based on the mathematical formula (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 to obtain the final prediction image based on the mathematical formula (4). calculate.

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

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

また、動き情報(予測パラメータ)で示される予測モードが単方向予測である場合、重み付き動き補償部302は、第一予測画像のみを用いて、数式(9)に基づいて最終的な予測画像を算出する。 Further, 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 the final prediction image based on the mathematical formula (9). Is calculated.

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

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

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

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

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

(第4実施形態の変形例)
第4実施形態の変形例について説明する。第4実施形態の変形例では、復号部801が用いるシンタクス要素が第4実施形態のシンタクス要素と異なる。シーケンスパラメータセットシンタクス504については、符号化が復号である点を除き、図22を参照して既に説明しているため、説明を省略する。アダプテーションパラメータセットシンタクス506についても、符号化が復号である点を除き、図23を参照して既に説明しているため、説明を省略する。プレッドウェイトテーブルシンタクス508についても、符号化が復号である点を除き、図24を参照して既に説明しているため、説明を省略する。
(Modified example of the fourth embodiment)
A modified example of the fourth embodiment will be described. In the modified example 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 coding 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 coding is decoding, and thus the description thereof will be omitted. Since the pred weight table syntax 508 has already been described with reference to FIG. 24 except that the coding is decoding, the description thereof will be omitted.

以上のように第4実施形態の変形例によれば、プレッドウェイトテーブルシンタクス508をアダプテーションパラメータセットシンタクス506から呼び出す構造とすることにより、1フレームを複数のスライスに分割した際のWPパラメータ情報の符号量を大幅に削減することができる。 As described above, according to the modified example of the fourth embodiment, the code of the WP parameter information when one frame is divided into a plurality of slices by adopting the structure in which the pred weight table syntax 508 is called from the adaptation parameter set syntax 506. The amount can be significantly 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 first decoded, and the slice header syntax 507 calls the necessary WP parameter information using aps_id depending on the situation. , The code amount can be reduced as compared with the configuration in which the WP parameter information is always decoded by 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 the coded data encoded by the coding 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, the differences from the fourth embodiment will be mainly explained, and the components having the same functions as those of the fourth embodiment will be given the same names and codes as those of the fourth embodiment, and the explanations will be given. Omit.

図40は、第5実施形態のインデックス設定部1006の構成の一例を示すブロック図である。インデックス設定部1006は、図40に示すように、再利用判定部1001と、WPパラメータ生成部1002とを、備える。 FIG. 40 is a block diagram showing 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 or not to reuse the WP parameter in Listing 0. When reusing the WP parameter of the list 0, the WP parameter generation unit 1002 copies the WP parameter of the referenced list 0 to the WP parameter of the list 1 according to the information of which WP parameter of the list 0 to copy. The information regarding the reuse flag and the reference number indicating the reference destination is described in the syntax element, and the WP parameter generation unit 1002 restores the WP parameter information by interpreting the index information.

再利用判定部1001は、例えば、数式(11)に示す疑似コードに従って、リスト0
のWPパラメータを再利用するかどうかを確認する。
The reuse determination unit 1001 sets the list 0 according to, for example, the pseudo code shown in the mathematical expression (11).
Check if you want to reuse the WP parameters of.

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

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

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

(第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 the coded data encoded by the coding device of the third embodiment will be described. FIG. 41 is a block diagram showing 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, the differences from the fourth embodiment will be mainly explained, and the components having the same functions as those of the fourth embodiment will be given the same names and codes as those of the fourth embodiment, and the explanations will be given. Omit.

動き情報メモリ1101は、復号が終了した画素ブロックに適用された動き情報を参照動き情報として一時的に格納する。動き情報メモリ1101では、動き情報に対してサブサンプリングなどの圧縮処理を行って情報量を削減しても構わない。動き情報メモリ1101は、図29に示すように、フレーム又はスライス単位で保持されており、同一フレーム上の動き情報を参照動き情報710として格納する空間方向参照動き情報メモリ701A、及び既に復号が終了したフレームの動き情報を参照動き情報710として格納する時間方向参照動き情報メモリ701Bを更に有する。時間方向参照動き情報メモリ701Bは、復号対象フレームが予測に用いる参照フレームの数に応じて、複数有しても構わない。 The motion information memory 1101 temporarily stores the motion information applied to the pixel block for which decoding has been completed as reference motion information. In the motion information memory 1101, the motion information may be compressed by subsampling or the like to reduce the amount of information. As shown in FIG. 29, the motion information memory 1101 is held in units of frames or slices, and the spatial direction reference motion information memory 701A that stores motion information on the same frame as reference motion information 710, and decoding has already been completed. Further, the time direction reference motion information memory 701B for storing the motion information of the frame as the reference motion information 710 is provided. The time-direction reference motion information memory 701B may have a plurality of reference frames depending on 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 time direction reference motion information memory 701B in predetermined area units (for example, 4 × 4 pixel block units). The reference motion information 710 further has information indicating whether the region is encoded by the inter-prediction described later or the intra-prediction described later. In addition, the pixel block (coding unit or prediction unit) is H.I. When the value of the motion vector in the motion information is not decoded and inter-predicted using the motion information predicted from the decoded area, as in the skip mode, the direct mode, or the merge mode described later in 264. Also, the motion information of the pixel block is held as the reference motion information 710.

復号対象のフレーム又はスライスの復号処理が終了したら、当該フレームの空間方向参照動き情報メモリ701Aは、次に復号処理を行うフレームに用いる時間方向参照動き情報メモリ701Bとしてその扱いが変更される。この際、時間方向参照動き情報メモリ701Bのメモリ容量を削減するために、動き情報を圧縮し、圧縮された動き情報を時間方向参照動き情報メモリ701Bに格納しても構わない。 When the decoding process of the frame or slice to be decoded is completed, 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 reference motion information from the motion information memory 1101 and outputs motion information B used for the decoding 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, the description thereof will be omitted.

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

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

プレッドユニットシンタクス512については、符号化が復号である点を除き、図36を参照して既に説明しているため、説明を省略する。 Since the pred unit syntax 512 has already been described with reference to FIG. 36 except that the coding 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 will be omitted.

なお、MergeCandListへの格納処理の別の例として、時間隣接ブロックTの動き情報をMergeCandListに格納する際に、時間隣接ブロックTの参照フレームにおけるWPパラメータと復号画素ブロックの参照フレームにおけるWPパラメータが一致しているかを判定し、WPパラメータが一致している場合のみ、MergeCandListに格納するようにしてもよい。これは、時間隣接ブロックTの参照フレームにおけるWPパラメータと復号画素ブロックの参照フレームにおけるWPパラメータが異なる場合には、時間隣接ブロックTと復号画素ブロックで動き情報の相関が低下すると推測できるためである。 As another example of the storage process in the MergeCandList, when the motion information of the time adjacent block T is stored in the MergeCandList, the WP parameter in the reference frame of the time adjacent block T and the WP parameter in the reference frame of the decoded pixel block are one. It may be determined whether or not it is done, and only when the WP parameters match, it may be stored in the MergeCandList. This is because when the WP parameter in the reference frame of the time-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 is reduced between the time-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 time-adjacent block T and the WP parameter in the reference frame of the decoding pixel block are different, the decoding pixel block among the blocks spatially adjacent to the block T A block having the same WP parameters in the reference frame may be replaced with a block T. At this time, the correlation of motion information does not decrease between the time-adjacent block T and the decoded pixel block.

(変形例)
なお、第1〜第3実施形態を選択的に用いてもよい。つまり、予めいずれの方法を選択するかの情報を定めておき、双方向スライスが選択された場合に、第1実施形態の手法を用いるか第2実施形態の手法を用いるかを示す情報により、切り替えてもよい。例えば、図20に示すスライスヘッダーシンタクスに、これらの手法を切り替えるフラグを設定し、符号化状況に合わせて選択することも容易に可能である。また、特定のハードウェアの構成に合わせて予めいずれかの手法を用いるかを定めておいてもよい。第1〜第3実施形態の予測画像生成部及びインデックス設定部は、ハードウェア実装及びソフトウェア実装のいずれにも好適である。
(Modification example)
The first to third embodiments may be selectively used. That is, the information on which method to select is determined in advance, and when the bidirectional slice is selected, the information indicating whether to use the method of the first embodiment or the method of the second embodiment is used. You may switch. For example, it is possible to set a flag for switching between these methods in the slice header syntax shown in FIG. 20 and easily select the flag according to the coding situation. In addition, it may be determined in advance which method to use according to the configuration of a specific hardware. The prediction 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, the information on which method is to be selected is determined in advance, and when the bidirectional slice is selected, the information indicating whether to use the method of the fourth embodiment or the method of the fifth embodiment is used. You may switch. For example
It is also possible to set a flag for switching between these methods in the slice header syntax shown in FIG. 20 and easily select the flag according to the coding situation. In addition, it may be determined in advance which method to use according to the configuration of a specific hardware. 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実施形態で例示したシンタクステーブルの行間には、上記実施形態において規定していないシンタクス要素が挿入されてもよいし、その他の条件分岐に関する記述が含まれていてもよい。また、シンタクステーブルを複数のテーブルに分割したり、複数のシンタクステーブルを統合したりしてもよい。また、例示した各シンタクス要素の用語は、任意に変更可能である。 Further, a syntax element not specified in the above embodiment may be inserted between the rows of the syntax table illustrated in the first to sixth embodiments, or a description regarding 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. In addition, the terms of each of the illustrated syntactic elements can be changed arbitrarily.

また、第1実施形態の変形例は、第2実施形態に容易に適用できる。この場合、リスト0とリスト1に対応する参照画像の最大数を設定してもよいし、予め定めた最大数としてもよい。 Moreover, the modification of the first embodiment can be easily applied to the second 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 modified example 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, an example is described in which a frame is divided into rectangular blocks having a size of 16 × 16 pixels, and encoding / decoding is performed in order from the block on the upper left of the screen to the lower right (FIG. See 3A). However, the coding order and decoding order are not limited to this example. For example, coding and decoding may be performed in order from the lower right to the upper left, or coding and decoding may be performed so as to draw a spiral from the center of the screen toward the edge of the screen. Further, coding and decoding may be performed in order from the upper right to the lower left, or coding and decoding may be performed so as to draw a spiral from the edge of the screen toward the center of the screen. In this case, the positions of the adjacent pixel blocks that can be referred to change depending on the coding order, so the positions may be changed 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, the prediction target block sizes such as 4 × 4 pixel block, 8 × 8 pixel block, and 16 × 16 pixel block have been illustrated and described, 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. Further, it is not necessary to unify all block sizes in 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 amount of code 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 divided 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 in the color difference signal. However, when the prediction process differs between the luminance signal and the color difference signal, the same or different prediction methods may be used. If different prediction methods are used for the luminance signal and the color difference signal, the prediction method selected for the luminance signal can be encoded or decoded in the same manner as the luminance signal.

上記第1〜第6実施形態では、簡単化のために、輝度信号と色差信号における重み付き動き補償予測処理とを区別せず、色信号成分に関して包括的な説明を記述した。しかしながら、重み付き動き補償予測処理が輝度信号と色差信号との間で異なる場合には、同一ま
たは異なる重み付き動き補償予測処理が用いられてよい。輝度信号と色差信号との間で異なる重み付き動き補償予測処理が用いられるならば、色差信号に対して選択した重み付き動き補償予測処理を輝度信号と同様の方法で符号化又は復号できる。
In the first to sixth embodiments described above, for the sake of simplification, the luminance signal and the weighted motion compensation prediction processing in the color difference signal are not distinguished, and a comprehensive description of the color signal component is described. However, when the weighted motion compensation prediction processing differs between the luminance signal and the color difference signal, the same or different weighted motion compensation prediction processing may be used. If different weighted motion compensation prediction processes are used between the luminance signal and the color difference signal, 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, it is possible to insert a syntax element not specified in the present embodiment between the rows of the table shown in the syntax configuration, and other descriptions regarding conditional branching are included. It doesn't matter if it is. 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 highly efficient weighted motion compensation prediction processing while solving the problem of encoding redundant information when performing weighted motion compensation prediction. Therefore, according to each embodiment, the coding efficiency is improved, and the subjective image quality is also improved.

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

例えば、上記各実施形態の処理を実現するプログラムを、コンピュータで読み取り可能な記憶媒体に格納して提供することも可能である。記憶媒体としては、磁気ディスク、光ディスク(CD−ROM、CD−R、DVD等)、光磁気ディスク(MO等)、半導体メモリなど、プログラムを記憶でき、かつ、コンピュータが読み取り可能な記憶媒体であれば、その記憶形式は何れの形態であってもよい。 For example, it is also 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 storage medium such as a magnetic disk, an optical disk (CD-ROM, CD-R, DVD, etc.), a magneto-optical disk (MO, etc.), a semiconductor memory, etc., which can store a program and can be read by a computer. For example, the storage form may be any form.

また、上記各実施形態の処理を実現するプログラムを、インターネットなどのネットワークに接続されたコンピュータ(サーバ)上に格納し、ネットワーク経由でコンピュータ(クライアント)にダウンロードさせてもよい。 Further, the program that realizes 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 conversion unit 103 Quantization unit 104 Inverse quantization unit 105 Inverse orthogonal conversion unit 106 Addition unit 107 Prediction image generation unit 108, 608 Index setting unit 109 Motion evaluation unit 110 Coding Unit 111 Coding control unit 201 Multiple 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 judgment unit 701, 1101 Motion information memory 702, 1102 Motion information acquisition unit 703, 1103 Changeover switch 800, 1000, 1100 Decoding device 801 Decoding unit 802 Inverse quantization unit 803 Inverse orthogonal conversion unit 804 Addition unit 805 Prediction image generation unit 806, 1006 Index setting unit 807 Decoding control unit 902, 1002 WP parameter generation unit

Claims (2)

スライスレベルよりも上位のレベルの上位シンタクスから呼び出され、重み付き動き補償に利用される第1シンタクスであって、参照番号により特定される重み係数を含む複数パラメータを記述した前記第1シンタクスと、
前記スライスレベルよりも上位のレベルの第2シンタクスであって、前記参照番号が取り得る値の最大値を含む第1シンタクス要素を記述した前記第2シンタクスと、
前記重み付き動き補償の有効または無効を示す第2シンタクス要素を記述した第3シンタクスと、
を含む符号化データの入力を受け、
前記符号化データから前記第1シンタクス要素および前記第2シンタクス要素を再生し、
再生された前記第1シンタクス要素と前記第1シンタクスとから、前記最大値を上限として前記参照番号により前記複数パラメータを取得し、
前記第2シンタクス要素が前記重み付き動き補償の有効を示す場合に、参照画像および取得された前記複数パラメータを用いる、前記重み付き動き補償を含む復号処理を実行する、
復号方法。
The first syntax, which is called from a higher syntax at a level higher than the slice level and is used for weighted motion compensation, and describes a plurality of parameters including a weighting coefficient specified by a reference number, and the first syntax.
The second syntax, which is a second syntax at a level higher than the slice level and describes the first syntax element including the maximum value that the reference number can take, and the second syntax.
A third syntax that describes a second syntax element indicating the validity or invalidity of the weighted motion compensation, and
Receives input of encoded data including
The first syntax element and the second syntax element are reproduced from the coded data, and the first syntax element and the second syntax element are reproduced.
From the reproduced first syntax element and the first syntax, the plurality of parameters are acquired by the reference number with the maximum value as the upper limit.
When the second syntax element indicates the effectiveness of the weighted motion compensation, a decoding process including the weighted motion compensation is executed using the reference image and the acquired plurality of parameters.
Decryption method.
スライスレベルよりも上位のレベルの上位シンタクスから呼び出され、重み付き動き補償に利用される第1シンタクスであって、参照番号により特定される重み係数を含む複数パラメータを記述した前記第1シンタクスと、
前記スライスレベルよりも上位のレベルの第2シンタクスであって、前記参照番号が取り得る値の最大値を含む第1シンタクス要素を記述した前記第2シンタクスと、
前記重み付き動き補償の有効または無効を示す第2シンタクス要素を記述した第3シンタクスと、
を含む符号化データを符号化する、
符号化方法。
The first syntax, which is called from a higher syntax at a level higher than the slice level and is used for weighted motion compensation, and describes a plurality of parameters including a weighting coefficient specified by a reference number, and the first syntax.
The second syntax, which is a second syntax at a level higher than the slice level and describes the first syntax element including the maximum value that the reference number can take, and the second syntax.
A third syntax that describes a second syntax element indicating the validity or invalidity of the weighted motion compensation, and
Encode the encoded data, including
Coding method.
JP2020167216A 2020-10-01 2020-10-01 Decoding method and encoding method Pending JP2021002876A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020167216A JP2021002876A (en) 2020-10-01 2020-10-01 Decoding method and encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020167216A JP2021002876A (en) 2020-10-01 2020-10-01 Decoding method and encoding method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2019004993A Division JP6775039B2 (en) 2019-01-16 2019-01-16 Decoding method and decoding device

Publications (1)

Publication Number Publication Date
JP2021002876A true JP2021002876A (en) 2021-01-07

Family

ID=73994353

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020167216A Pending JP2021002876A (en) 2020-10-01 2020-10-01 Decoding method and encoding method

Country Status (1)

Country Link
JP (1) JP2021002876A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004007379A (en) * 2002-04-10 2004-01-08 Toshiba Corp Method for encoding moving image and method for decoding moving image
JP2004242276A (en) * 2002-08-08 2004-08-26 Matsushita Electric Ind Co Ltd Method for encoding and decoding moving image
JP2008252818A (en) * 2007-03-30 2008-10-16 Toshiba Corp Information processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004007379A (en) * 2002-04-10 2004-01-08 Toshiba Corp Method for encoding moving image and method for decoding moving image
JP2004242276A (en) * 2002-08-08 2004-08-26 Matsushita Electric Ind Co Ltd Method for encoding and decoding moving image
JP2008252818A (en) * 2007-03-30 2008-10-16 Toshiba Corp Information processor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
STEPHAN WENGER ET AL., ADAPTATION PARAMETER SET (APS), JPN6019025463, 21 July 2011 (2011-07-21), ISSN: 0004701961 *

Similar Documents

Publication Publication Date Title
AU2022221509B2 (en) Decoding device and decoding method
JP6775039B2 (en) Decoding method and decoding device
JP6105034B2 (en) Decoding method and decoding apparatus
JP2018007278A (en) Decoding method and decoder
JP2017085633A (en) Decoding method and decoder
JP2021002876A (en) Decoding method and encoding method
JP6903778B2 (en) Storage device, transmitter and receiver
JP7000498B2 (en) Storage device, transmitter and coding method
JP6744507B2 (en) Encoding method and decoding method
JP2018007279A (en) Decoding method and decoder
JP6235745B2 (en) Electronic device, decoding method and program
JP6235742B2 (en) Electronic device, decoding method and program
JP2014197852A (en) Decoding method and decoder

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201001

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210630

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210706

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210812

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211005

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211105

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20220208