JP2024023525A - Image encoding method and image decoding method - Google Patents

Image encoding method and image decoding method Download PDF

Info

Publication number
JP2024023525A
JP2024023525A JP2023204699A JP2023204699A JP2024023525A JP 2024023525 A JP2024023525 A JP 2024023525A JP 2023204699 A JP2023204699 A JP 2023204699A JP 2023204699 A JP2023204699 A JP 2023204699A JP 2024023525 A JP2024023525 A JP 2024023525A
Authority
JP
Japan
Prior art keywords
block
motion
information
motion information
blocks
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
JP2023204699A
Other languages
Japanese (ja)
Inventor
太一郎 塩寺
沙織 浅香
昭行 谷沢
健 中條
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from JP2019191781A external-priority patent/JP6795666B2/en
Priority claimed from JP2020186014A external-priority patent/JP6980889B2/en
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2023204699A priority Critical patent/JP2024023525A/en
Publication of JP2024023525A publication Critical patent/JP2024023525A/en
Pending legal-status Critical Current

Links

Abstract

【課題】符号化効率の高い画像符号化及び画像復号化方法を提供する。【解決手段】画像符号化方法は、動き情報を有する符号化済みの画素ブロックの中から、少なくとも1つの動き参照ブロックを選択する第1ステップと、符号化対象ブロックに適用する動き情報の候補を有する画素ブロックであって、互いに異なる動き情報を有する少なくとも1つの利用可能ブロックを、前記動き参照ブロックの中から選択する第2ステップと、前記利用可能ブロックの中から、1つの選択ブロックを選択する第3ステップと、前記選択ブロックの動き情報を使用して、前記符号化対象ブロックの予測画像を生成する第4ステップと、前記予測画像と原画像との間の予測誤差を符号化する第5ステップと、前記利用可能ブロックの数に応じて予め定められた符号表を参照して、前記選択ブロックを特定する選択情報を符号化する第6ステップと、を具備する。【選択図】なしThe present invention provides an image encoding and image decoding method with high encoding efficiency. An image encoding method includes a first step of selecting at least one motion reference block from encoded pixel blocks having motion information, and selecting motion information candidates to be applied to a block to be encoded. a second step of selecting at least one available pixel block having mutually different motion information from among the motion reference blocks; and selecting one selection block from the available blocks. a third step; a fourth step of generating a predicted image of the block to be encoded using the motion information of the selected block; and a fifth step of encoding a prediction error between the predicted image and the original image. and a sixth step of encoding selection information specifying the selected block with reference to a code table predetermined according to the number of available blocks. [Selection diagram] None

Description

本発明は、動画像及び静止画像のための符号化及び復号化方法に関する。 The present invention relates to encoding and decoding methods for moving and still images.

近年、大幅に符号化効率を向上させた動画像符号化方法が、ITU-TとISO/IECとの共同で、ITU-T Rec. H.264及びISO/IEC 14496-10(以下、H.264という)として勧告されている。H.264では、予測処理、変換処理及びエントロピー符号化処理は、矩形ブロック単位(例えば、16×16画素ブロック単位、8×8画素ブロック単位等)で行われる。予測処理においては、符号化対象の矩形ブロック(符号化対象ブロック)に対して、既に符号化済みのフレーム(参照フレーム)を参照して、時間方向の予測を行う動き補償が行われる。このような動き補償では、符号化対象ブロックと参照フレーム内において参照されるブロックとの空間的シフト情報としての動きベクトルを含む動き情報を符号化して復号化側に送る必要がある。さらに、複数の参照フレームを用いて動き補償を行う場合、動き情報とともに参照フレーム番号も符号化する必要がある。このため、動き情報及び参照フレーム番号に関する符号量が増大する場合がある。 In recent years, a video coding method that has significantly improved coding efficiency has been developed jointly by ITU-T and ISO/IEC, and has been published in ITU-T Rec. H.264 and ISO/IEC 14496-10 (hereinafter referred to as H.264). 264). In H.264, prediction processing, conversion processing, and entropy encoding processing are performed in rectangular block units (eg, 16 x 16 pixel block units, 8 x 8 pixel block units, etc.). In the prediction process, motion compensation is performed on a rectangular block to be encoded (block to be encoded) to perform temporal prediction with reference to an already encoded frame (reference frame). In such motion compensation, it is necessary to encode motion information including a motion vector as spatial shift information between a block to be encoded and a block referenced in a reference frame and send it to the decoding side. Furthermore, when performing motion compensation using a plurality of reference frames, it is necessary to encode the reference frame number along with the motion information. Therefore, the amount of code related to motion information and reference frame numbers may increase.

動き補償予測において動きベクトルを求める方法の一例としては、既に符号化済みのブロックに割り当てられている動きベクトルから、符号化対象ブロックに割り当てるべき動きベクトルを導出し、導出した動きベクトルに基づいて予測画像を生成するダイレクトモードがある(特許文献1及び特許文献2参照)。ダイレクトモードでは、動きベクトルを符号化しないことから、動き情報の符号量を低減することができる。ダイレクトモードは、例えばH.264/AVCに採用されている。 An example of how to obtain a motion vector in motion compensated prediction is to derive a motion vector to be assigned to a block to be encoded from motion vectors assigned to blocks that have already been encoded, and then make predictions based on the derived motion vector. There is a direct mode for generating images (see Patent Document 1 and Patent Document 2). In the direct mode, since motion vectors are not encoded, the code amount of motion information can be reduced. Direct mode is used, for example, in H.264/AVC.

特許第4020789号Patent No. 4020789 米国特許第7233621号US Patent No. 7233621

ダイレクトモードでは、符号化対象ブロックに隣接する符号化済みのブロックの動きベクトルのメディアン値から動きベクトルを算出するという固定された方法で、符号化対象ブロックの動きベクトルを予測生成する。このため、動きベクトル算出の自由度が低い。 In the direct mode, a motion vector of a block to be coded is predicted and generated using a fixed method of calculating a motion vector from the median value of motion vectors of encoded blocks adjacent to the block to be coded. Therefore, the degree of freedom in calculating motion vectors is low.

動きベクトル算出の自由度を上げるために、複数の符号化済みブロックの中から1つを選択して符号化対象ブロックに動きベクトルを割り当てる方法が提案されている。この方法では、選択した符号化済みのブロックを復号側が特定することができるように、選択したブロックを特定する選択情報が常に送信されなければならない。従って、複数の符号化済みブロックの中から1つを選択して符号化対象ブロックに割り当てるべき動きベクトルを決定する場合、選択情報に関する符号量が増加される問題がある。 In order to increase the degree of freedom in calculating motion vectors, a method has been proposed in which one is selected from a plurality of encoded blocks and a motion vector is assigned to the block to be encoded. In this method, selection information specifying the selected block must always be transmitted so that the decoding side can specify the selected encoded block. Therefore, when one of a plurality of coded blocks is selected and a motion vector to be assigned to the block to be coded is determined, there is a problem in that the amount of codes related to the selection information is increased.

本発明は、上記問題点を解決するためになされたものであり、符号化効率の高い画像符号化及び画像復号化方法を提供することを目的とする。 The present invention was made to solve the above problems, and an object of the present invention is to provide an image encoding and image decoding method with high encoding efficiency.

本発明の一実施形態に係る画像符号化方法は、動き情報を有する符号化済みの画素ブロックの中から、少なくとも1つの動き参照ブロックを選択する第1ステップと、符号化対象ブロックに適用する動き情報の候補を有する画素ブロックであって、互いに異なる動き情報を有する少なくとも1つの利用可能ブロックを、前記動き参照ブロックの中から選択する第2ステップと、前記利用可能ブロックの中から、1つの選択ブロックを選択する第3ステップと、前記選択ブロックの動き情報を使用して、前記符号化対象ブロックの予測画像を生成する第4ステップと、前記予測画像と原画像との間の予測誤差を符号化する第5ステップと、前記利用可能ブロックの数に応じて予め定められた符号表を参照して、前記選択ブロックを特定する選択情報を符号化する第6ステップと、を具備する。 An image encoding method according to an embodiment of the present invention includes a first step of selecting at least one motion reference block from encoded pixel blocks having motion information, and a motion applied to the block to be encoded. a second step of selecting at least one available pixel block having information candidates and having mutually different motion information from among the motion reference blocks; and selecting one from the available blocks. a third step of selecting a block; a fourth step of generating a predicted image of the block to be coded using the motion information of the selected block; and a step of coding a prediction error between the predicted image and the original image. and a sixth step of encoding selection information specifying the selected block with reference to a code table predetermined according to the number of available blocks.

本発明の他の実施形態に係る画像復号化方法は、動き情報を有する復号化済みの画素ブロックの中から、少なくとも1つの動き参照ブロックを選択する第1ステップと、復号化対象ブロックに適用する動き情報の候補を有する画素ブロックであって、互いに異なる動き情報を有する少なくとも1つの利用可能ブロックを、前記動き参照ブロックの中から選択する第2ステップと、前記利用可能ブロックの数に応じて予め定められた符号表を参照して、入力された符号化データを復号化することにより、選択ブロックを特定するための選択情報を求める第3ステップと、前記選択情報に従って、前記利用可能ブロックの中から1つの選択ブロックを選択する第4ステップと、前記選択ブロックの動き情報を使用して、前記復号化対象ブロックの予測画像を生成する第5ステップと、前記符号化データから前記復号化対象ブロックの予測残差を復号化する第6ステップと、前記予測画像と前記予測残差から復号画像を求める第7ステップと、を具備する。 An image decoding method according to another embodiment of the present invention includes a first step of selecting at least one motion reference block from decoded pixel blocks having motion information, and applying the method to a block to be decoded. a second step of selecting at least one available pixel block having motion information candidates and having mutually different motion information from among the motion reference blocks; a third step of obtaining selection information for identifying a selected block by decoding the input coded data with reference to a predetermined code table; a fourth step of selecting one selected block from the selected block; a fifth step of generating a predicted image of the block to be decoded using the motion information of the selected block; and a seventh step of obtaining a decoded image from the predicted image and the prediction residual.

本発明によれば、符号化効率を向上させることができる。 According to the present invention, encoding efficiency can be improved.

第1の実施形態に係る画像符号化装置の構成を概略的に示すブロック図である。FIG. 1 is a block diagram schematically showing the configuration of an image encoding device according to a first embodiment. 図1に示した画像復号化部の符号化の処理単位であるマクロブロックのサイズの一例を示す図である。FIG. 2 is a diagram illustrating an example of the size of a macroblock, which is a processing unit of encoding by the image decoding unit illustrated in FIG. 1; 図1に示した画像復号化部の符号化の処理単位であるマクロブロックのサイズの他の例を示す図である。FIG. 2 is a diagram showing another example of the size of a macroblock, which is a processing unit of encoding by the image decoding unit shown in FIG. 1; 図1に示した画像符号化部が符号化対象フレーム内の画素ブロックを符号化する順序を示す図である。FIG. 2 is a diagram showing the order in which the image encoding unit shown in FIG. 1 encodes pixel blocks in a frame to be encoded. 図1に示した動き情報メモリが保持する動き情報フレームの一例を示す図である。2 is a diagram showing an example of a motion information frame held by the motion information memory shown in FIG. 1. FIG. 図1の入力画像信号を処理する手順の一例を示すフローチャートである。2 is a flowchart illustrating an example of a procedure for processing the input image signal of FIG. 1. FIG. 図1の動き補償部が実行するインター予測処理の一例を示す図である。2 is a diagram illustrating an example of inter prediction processing executed by the motion compensation unit in FIG. 1. FIG. 図1の動き補償部が実行するインター予測処理の他の例を示す図である。2 is a diagram showing another example of inter prediction processing executed by the motion compensation unit in FIG. 1. FIG. インター予測処理に使用される動き補償ブロックのサイズの一例を示す図である。FIG. 3 is a diagram illustrating an example of the size of a motion compensation block used in inter prediction processing. インター予測処理に使用される動き補償ブロックのサイズの他の例を示す図である。FIG. 7 is a diagram illustrating another example of the size of a motion compensation block used in inter prediction processing. インター予測処理に使用される動き補償ブロックのサイズのさらに他の例を示す図である。FIG. 7 is a diagram illustrating still another example of the size of a motion compensation block used in inter prediction processing. インター予測処理に使用される動き補償ブロックのサイズの他の例を示す図である。FIG. 7 is a diagram illustrating another example of the size of a motion compensation block used in inter prediction processing. 空間方向及び時間方向動き参照ブロックの配置の一例を示す図である。FIG. 3 is a diagram illustrating an example of the arrangement of spatial and temporal motion reference blocks. 空間方向動き参照ブロックの配置の他の例を示す図である。FIG. 7 is a diagram illustrating another example of the arrangement of spatial direction motion reference blocks. 図8Bに示した符号化対象ブロックに対する空間方向動き参照ブロックの相対位置を示す図である。8B is a diagram showing the relative position of a spatial direction motion reference block with respect to the encoding target block shown in FIG. 8B. FIG. 時間方向動き参照ブロックの配置の他の例を示す図である。FIG. 7 is a diagram showing another example of the arrangement of temporal motion reference blocks. 時間方向動き参照ブロックの配置のさらに他の例を示す図である。FIG. 7 is a diagram showing still another example of the arrangement of temporal motion reference blocks. 時間方向動き参照ブロックの配置のさらにまた他の例を示す図である。FIG. 7 is a diagram showing still another example of the arrangement of temporal motion reference blocks. 図1の利用可能ブロック取得部が動き参照ブロックの中から利用可能ブロックを選択する方法の一例を示すフローチャートである。2 is a flowchart illustrating an example of a method by which the available block acquisition unit of FIG. 1 selects an available block from motion reference blocks. 図8に示した動き参照ブロックの中から、図9の方法に従って選択された利用可能ブロックの一例を示す図である。9 is a diagram showing an example of available blocks selected from among the motion reference blocks shown in FIG. 8 according to the method of FIG. 9; FIG. 図1の利用可能ブロック取得部が出力する利用可能ブロック情報の一例を示す図である。FIG. 2 is a diagram illustrating an example of available block information output by the available block acquisition unit of FIG. 1. FIG. 図1の利用可能ブロック取得部によるブロック間の動き情報の同一性判定の一例を示す図である。FIG. 2 is a diagram illustrating an example of determination of the identity of motion information between blocks by the available block acquisition unit of FIG. 1; 図1の利用可能ブロック取得部によるブロック間の動き情報の同一性判定の他の例を示す図である。FIG. 3 is a diagram illustrating another example of determining the identity of motion information between blocks by the available block acquisition unit of FIG. 1; 図1の利用可能ブロック取得部によるブロック間の動き情報の同一性判定のさらに他の例を示す図である。FIG. 3 is a diagram illustrating still another example of determining the identity of motion information between blocks by the available block acquisition unit of FIG. 1; 図1の利用可能ブロック取得部によるブロック間の動き情報の同一性判定の他の例を示す図である。FIG. 3 is a diagram illustrating another example of determining the identity of motion information between blocks by the available block acquisition unit of FIG. 1; 図1の利用可能ブロック取得部によるブロック間の動き情報の同一性判定のさらに他の例を示す図である。FIG. 3 is a diagram illustrating still another example of determining the identity of motion information between blocks by the available block acquisition unit of FIG. 1; 図1の利用可能ブロック取得部によるブロック間の動き情報の同一性判定の他の例を示す図である。FIG. 3 is a diagram illustrating another example of determining the identity of motion information between blocks by the available block acquisition unit of FIG. 1; 図1の予測部の構成を概略的に示すブロック図である。2 is a block diagram schematically showing the configuration of a prediction unit in FIG. 1. FIG. 図13の時間方向動き情報取得部が出力する動き情報の群を示す図である。14 is a diagram showing a group of motion information output by the temporal motion information acquisition unit of FIG. 13. FIG. 図13の動き補償部による動き補償処理において利用可能な少数画素精度の補間処理を説明する説明図である。FIG. 14 is an explanatory diagram illustrating interpolation processing with small-pixel accuracy that can be used in motion compensation processing by the motion compensation unit in FIG. 13; 図13の予測部の動作の一例を示すフローチャートである。14 is a flowchart illustrating an example of the operation of the prediction unit in FIG. 13. 図13の動き補償部が時間方向動き参照ブロックの動き情報を符号化対象ブロックにコピーする様子を示す図である。14 is a diagram illustrating how the motion compensation unit in FIG. 13 copies motion information of a temporal motion reference block to a block to be encoded. FIG. 図1の可変長符号化部の構成を概略的に示すブロック図である。FIG. 2 is a block diagram schematically showing the configuration of a variable length encoder in FIG. 1. FIG. 利用可能ブロック情報に応じてシンタクスを生成する例を示す図である。FIG. 6 is a diagram illustrating an example of generating syntax according to available block information. 利用可能ブロック情報に対応する選択ブロック情報シンタクスの2値化の例を示す図である。FIG. 6 is a diagram illustrating an example of binarization of selected block information syntax corresponding to available block information. 動き情報のスケーリングを説明する説明図である。FIG. 3 is an explanatory diagram illustrating scaling of motion information. 実施形態に従うシンタクス構造を示す図である。FIG. 3 is a diagram illustrating a syntax structure according to an embodiment. 第1の実施形態に従うマクロブロックレイヤーシンクタスの一例を示す図である。FIG. 3 is a diagram illustrating an example of a macroblock layer syntax according to the first embodiment. 第1の実施形態に従うマクロブロックレイヤーシンクタスの他の例を示す図である。FIG. 7 is a diagram illustrating another example of macroblock layer syntax according to the first embodiment. H.264におけるBスライス時のmb_type及びmb_typeに対応する符号表を示す図である。H. 3 is a diagram showing mb_type and a code table corresponding to mb_type at the time of B slice in H.264. FIG. 実施形態に係る符号表の一例を示す図である。FIG. 3 is a diagram showing an example of a code table according to the embodiment. H.264におけるPスライス時のmb_type及びmb_typeに対応する符号表を示す図である。H. FIG. 2 is a diagram showing mb_type and a code table corresponding to mb_type at the time of P slice in H.264. 実施形態に係る符号表の他の例を示す図である。FIG. 7 is a diagram showing another example of the code table according to the embodiment. 実施形態に従って、Bスライスにおけるmb_type及びmb_typeに対応する符号表の一例を示す図である。FIG. 6 is a diagram illustrating an example of mb_type and a code table corresponding to mb_type in a B slice according to an embodiment. 実施形態に従って、Pスライスにおけるmb_type及びmb_typeに対応する符号表の他の例を示す図である。FIG. 7 is a diagram illustrating another example of mb_type in a P slice and a code table corresponding to mb_type according to the embodiment. 第2の実施形態に係る画像符号化装置の構成を概略的に示すブロック図である。FIG. 2 is a block diagram schematically showing the configuration of an image encoding device according to a second embodiment. 図26の予測部の構成を概略的に示すブロック図である。27 is a block diagram schematically showing the configuration of the prediction unit in FIG. 26. FIG. 図27の第2予測部の構成を概略的に示すブロック図である。28 is a block diagram schematically showing the configuration of a second prediction unit in FIG. 27. FIG. 図26の可変長符号化部の構成を概略的に示すブロック図である。FIG. 27 is a block diagram schematically showing the configuration of a variable length encoding section in FIG. 26. FIG. 第2の実施形態に従うマクロブロックレイヤーシンタクスの一例を示す図である。FIG. 7 is a diagram illustrating an example of macroblock layer syntax according to the second embodiment. 第2の実施形態に従うマクロブロックレイヤーシンタクスの他の例を示す図である。FIG. 7 is a diagram illustrating another example of macroblock layer syntax according to the second embodiment. 第3の実施形態に係る画像復号化装置を概略的に示すブロック図である。FIG. 3 is a block diagram schematically showing an image decoding device according to a third embodiment. 図31に示した符号化列復号化部をより詳細に示すブロック図である。FIG. 32 is a block diagram showing the encoded sequence decoding section shown in FIG. 31 in more detail. 図31に示した予測部をより詳細に示すブロック図である。FIG. 32 is a block diagram showing the prediction unit shown in FIG. 31 in more detail. 第4の実施形態に係る画像復号化装置を概略的に示すブロック図である。FIG. 3 is a block diagram schematically showing an image decoding device according to a fourth embodiment. 図33に示した符号化列復号化部をより詳細に示すブロック図である。FIG. 34 is a block diagram showing the encoded sequence decoding section shown in FIG. 33 in more detail. 図33に示した予測部をより詳細に示すブロック図である。FIG. 34 is a block diagram showing the prediction unit shown in FIG. 33 in more detail.

以下、必要に応じて図面を参照しながら、本発明の実施形態に係る画像符号化及び画像復号化の方法及び装置を説明する。なお、以下の実施形態では、同一の番号を付した部分については同様の動作を行うものとして、重ねての説明を省略する。 DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an image encoding and image decoding method and apparatus according to an embodiment of the present invention will be described with reference to the drawings as necessary. Note that in the following embodiments, portions with the same numbers perform similar operations, and redundant explanation will be omitted.

(第1の実施形態)
図1は、本発明の第1の実施形態に係る画像符号化装置の構成を概略的に示している。この画像符号化装置は、図1に示されるように、画像符号化部100、符号化制御部150及び出力バッファ120を備えている。この画像符号化装置は、LSIチップなどのハードウェアにより実現されてもよく、或いは、コンピュータに画像符号化プログラムを実行させることにより実現されても構わない。
(First embodiment)
FIG. 1 schematically shows the configuration of an image encoding device according to a first embodiment of the present invention. This image encoding device includes an image encoding section 100, an encoding control section 150, and an output buffer 120, as shown in FIG. This image encoding device may be realized by hardware such as an LSI chip, or may be realized by causing a computer to execute an image encoding program.

画像符号化部100には、動画像又は静止画像である原画像(入力画像信号)10が、例えば原画像を分割した画素ブロック単位で、入力される。画像符号化部100は、後に詳細に説明するように、入力画像信号10を圧縮符号化して、符号化データ14を生成する。生成された符号化データ14は、出力バッファ120に一時的に格納され、符号化制御部150が管理する出力タイミングで、図示しない蓄積系(蓄積メディア)又は伝送系(通信回線)へ送出される。 An original image (input image signal) 10, which is a moving image or a still image, is input to the image encoding unit 100, for example, in units of pixel blocks obtained by dividing the original image. The image encoding unit 100 compresses and encodes the input image signal 10 to generate encoded data 14, as will be described in detail later. The generated encoded data 14 is temporarily stored in the output buffer 120, and is sent to a storage system (storage medium) or a transmission system (communication line) (not shown) at an output timing managed by the encoding control unit 150. .

符号化制御部150は、発生符号量のフィードバック制御、量子化制御、予測モード制御及びエントロピー符号化制御といった画像符号化部100の符号化処理全般を制御する。具体的には、符号化制御部150は、符号化制御情報50を画像符号化部100に与え、画像符号化部100からフィードバック情報51を適宜受け取る。符号化制御情報50には、予測情報、動き情報18及び量子化パラメータ情報などが含まれる。予測情報は、予測モード情報及びブロックサイズ情報を含む。動き情報18は、動きベクトル、参照フレーム番号及び予測方向(単方向予測、双方向予測)を含む。量子化パラメータ情報は、量子化幅(量子化ステップサイズ)等の量子化パラメータ及び量子化マトリクスを含む。フィードバック情報51は、画像符号化部100による発生符号量を含み、例えば、量子化パラメータを決定するのに使用される。 The encoding control unit 150 controls overall encoding processing of the image encoding unit 100, such as feedback control of the amount of generated code, quantization control, prediction mode control, and entropy encoding control. Specifically, the encoding control unit 150 provides encoding control information 50 to the image encoding unit 100 and receives feedback information 51 from the image encoding unit 100 as appropriate. The encoding control information 50 includes prediction information, motion information 18, quantization parameter information, and the like. Prediction information includes prediction mode information and block size information. The motion information 18 includes a motion vector, a reference frame number, and a prediction direction (unidirectional prediction, bidirectional prediction). The quantization parameter information includes a quantization parameter such as a quantization width (quantization step size) and a quantization matrix. The feedback information 51 includes the amount of code generated by the image encoding unit 100, and is used, for example, to determine a quantization parameter.

画像符号化部100は、原画像を分割した画素ブロック(例えば、マクロブロック、サブブロック、1画素など)を単位として、入力画像信号10を符号化する。このため、入力画像信号10は、原画像を分割した画素ブロック単位で画像符号化部100へ順次に入力される。本実施形態では、符号化の処理単位をマクロブロックとし、入力画像信号10に対応する、符号化対象である画素ブロック(マクロブロック)を単に符号化対象ブロックと称す。また、符号化対象ブロックを含む画像フレーム、即ち、符号化対象の画像フレームを符号化対象フレームと称す。 The image encoding unit 100 encodes the input image signal 10 in units of pixel blocks (for example, macroblocks, subblocks, one pixel, etc.) obtained by dividing the original image. Therefore, the input image signal 10 is sequentially input to the image encoding unit 100 in units of pixel blocks obtained by dividing the original image. In this embodiment, the encoding processing unit is a macroblock, and the pixel block (macroblock) that is the encoding target and corresponds to the input image signal 10 is simply referred to as the encoding target block. Further, an image frame including a block to be encoded, that is, an image frame to be encoded is referred to as a frame to be encoded.

このような符号化対象ブロックは、例えば、図2Aに示すような16×16画素ブロックであってもよく、図2Bに示すような64×64画素ブロックであっても構わない。また、符号化対象ブロックは、32×32画素ブロック、8×8画素ブロックなどであっても構わない。また、マクロブロックの形状は、図2A及び図2Bに示されるような正方形状の例に限らず、矩形状などの任意形状に設定されても構わない。さらに、上記処理単位は、マクロブロックのような画素ブロックに限らず、フレーム又はフィールドであっても構わない。 Such a block to be encoded may be, for example, a 16×16 pixel block as shown in FIG. 2A, or a 64×64 pixel block as shown in FIG. 2B. Further, the encoding target block may be a 32x32 pixel block, an 8x8 pixel block, or the like. Further, the shape of the macroblock is not limited to the square example shown in FIGS. 2A and 2B, but may be set to any shape such as a rectangle. Further, the processing unit is not limited to a pixel block such as a macroblock, but may be a frame or a field.

なお、符号化対象フレーム内の各画素ブロックに対する符号化処理は、いかなる順序で実行されても構わない。本実施形態では、説明を簡単にするために、図3に示すように、符号化対象フレームの左上の画素ブロックから右下の画素ブロックに向かって一行毎に、即ち、ラスタスキャン順に、画素ブロックに対して符号化処理が実行されるものとする。 Note that the encoding process for each pixel block within the encoding target frame may be performed in any order. In this embodiment, in order to simplify the explanation, as shown in FIG. It is assumed that encoding processing is performed on .

図1に示した画像符号化部100は、予測部101、減算器102、変換・量子化部103、可変長符号化部104、逆量子化・逆変換部105、加算器106、フレームメモリ107、動き情報メモリ108及び利用可能ブロック取得部109を備えている。 The image encoding unit 100 shown in FIG. , a motion information memory 108 and an available block acquisition unit 109.

画像符号化部100において、入力画像信号10は、予測部101及び減算器102へ入力される。減算器102は、入力画像信号10を受け取るとともに、後述する予測部101から予測画像信号11を受け取る。減算器102は、入力画像信号10と予測画像信号11との差分を算出して、予測誤差画像信号12を生成する。 In the image encoding unit 100, the input image signal 10 is input to the prediction unit 101 and the subtracter 102. Subtractor 102 receives input image signal 10 and also receives predicted image signal 11 from prediction unit 101, which will be described later. The subtracter 102 calculates the difference between the input image signal 10 and the predicted image signal 11 to generate a predicted error image signal 12.

変換・量子化部103は、減算器102から予測誤差画像信号12を受け取り、受け取った予測誤差画像信号12に対して変換処理を施して、変換係数を生成する。変換処理は、例えば、離散コサイン変換(DCT:Discrete Cosine Transform)等の直交変換である。他の実施形態では、変換・量子化部103は、離散コサイン変換に代えて、ウェーブレット変換及び独立成分解析などの手法を利用して、変換係数を生成しても構わない。さらに、変換・量子化部103は、符号化制御部150によって与えられた量子化パラメータに基づいて、生成した変換係数を量子化する。量子化された変換係数(変換係数情報)13は、可変長符号化部104及び逆量子化・逆変換部105へ出力される。 The conversion/quantization unit 103 receives the prediction error image signal 12 from the subtracter 102, performs a conversion process on the received prediction error image signal 12, and generates conversion coefficients. The transformation process is, for example, orthogonal transformation such as discrete cosine transform (DCT). In other embodiments, the transform/quantization unit 103 may generate transform coefficients using techniques such as wavelet transform and independent component analysis instead of discrete cosine transform. Further, the transformation/quantization unit 103 quantizes the generated transformation coefficients based on the quantization parameter given by the encoding control unit 150. The quantized transform coefficients (transform coefficient information) 13 are output to variable length encoding section 104 and inverse quantization/inverse transform section 105 .

逆量子化・逆変換部105は、符号化制御部150によって与えられた量子化パラメータ、即ち、変換・量子化部103と同じ量子化パラメータに従って、量子化された変換係数13を逆量子化する。続いて、逆量子化・逆変換部105は、逆量子化された変換係数に対して逆変換を施して、復号予測誤差信号15を生成する。逆量子化・逆変換部105による逆変換処理は、変換・量子化部103による変換処理の逆変換処理に一致する。例えば、逆変換処理は、逆離散コサイン変換(IDCT:Inverse Discrete Cosine Transform)又は逆ウェーブレット変換などである。 The dequantization/inverse transform unit 105 dequantizes the quantized transform coefficients 13 according to the quantization parameter given by the encoding control unit 150, that is, the same quantization parameter as the transform/quantization unit 103. . Subsequently, the inverse quantization/inverse transform unit 105 performs inverse transform on the dequantized transform coefficients to generate a decoded prediction error signal 15. The inverse transformation process by the inverse quantization/inverse transformation unit 105 corresponds to the inverse transformation process of the transformation process by the transformation/quantization unit 103. For example, the inverse transform process is an inverse discrete cosine transform (IDCT), an inverse wavelet transform, or the like.

加算器106は、逆量子化・逆変換部105から復号予測誤差信号15を受け取り、さらに、予測部101から予測画像信号11を受け取る。加算器106は、復号予測誤差信号15と予測画像信号11とを加算して、局所復号画像信号16を生成する。生成された局所復号画像信号16は、フレームメモリ107に参照画像信号17として格納される。フレームメモリ107に格納されている参照画像信号17は、その後の符号化対象ブロックを符号化する際に、予測部101によって読み出されて参照される。 Adder 106 receives decoded prediction error signal 15 from inverse quantization/inverse transform section 105 and further receives predicted image signal 11 from prediction section 101 . Adder 106 adds decoded prediction error signal 15 and predicted image signal 11 to generate locally decoded image signal 16. The generated locally decoded image signal 16 is stored in the frame memory 107 as a reference image signal 17. The reference image signal 17 stored in the frame memory 107 is read out and referenced by the prediction unit 101 when encoding a subsequent block to be encoded.

予測部101は、フレームメモリ107から参照画像信号17を受け取るとともに、後述する利用可能ブロック取得部109から利用可能ブロック情報30を受け取る。さらに、予測部101は、後述する動き情報メモリ108から参照動き情報19を受け取る。予測部101は、参照画像信号17、参照動き情報19及び利用可能ブロック情報30に基づいて、符号化対象ブロックの予測画像信号11、動き情報18及び選択ブロック情報31を生成する。具体的には、予測部101は、利用可能ブロック情報30及び参照動き情報19に基づいて、動き情報18及び選択ブロック情報31を生成する動き情報選択部118、並びに、動き情報18に基づいて、予測画像信号11を生成する動き補償部113を備えている。予測画像信号11は、減算器102及び加算器106へ送られる。動き情報18は、その後の符号化対象ブロックに対する予測処理のために、動き情報メモリ108に格納される。また、選択ブロック情報31は、可変長符号化部104へ送られる。予測部101については、後に詳細に説明する。 The prediction unit 101 receives the reference image signal 17 from the frame memory 107, and also receives available block information 30 from the available block acquisition unit 109, which will be described later. Further, the prediction unit 101 receives reference motion information 19 from a motion information memory 108, which will be described later. The prediction unit 101 generates a predicted image signal 11, motion information 18, and selected block information 31 of the block to be encoded based on the reference image signal 17, reference motion information 19, and available block information 30. Specifically, the prediction unit 101 includes a motion information selection unit 118 that generates motion information 18 and selected block information 31 based on the available block information 30 and reference motion information 19; A motion compensation unit 113 that generates a predicted image signal 11 is provided. Predicted image signal 11 is sent to subtracter 102 and adder 106. The motion information 18 is stored in the motion information memory 108 for subsequent prediction processing on the block to be encoded. Further, the selected block information 31 is sent to the variable length encoding section 104. The prediction unit 101 will be explained in detail later.

動き情報メモリ108には、動き情報18が参照動き情報19として一時的に格納される。図4には、動き情報メモリ108の構成の一例が示されている。図4に示されるように、動き情報メモリ108には、参照動き情報19がフレーム単位で保持されており、参照動き情報19が動き情報フレーム25を形成している。動き情報メモリ108には、符号化済みのブロックに関する動き情報18が順次入力され、その結果、動き情報メモリ108は、符号化時間の異なる複数の動き情報フレーム25を保持する。 The motion information 18 is temporarily stored in the motion information memory 108 as reference motion information 19. FIG. 4 shows an example of the configuration of the motion information memory 108. As shown in FIG. 4, the motion information memory 108 holds reference motion information 19 in units of frames, and the reference motion information 19 forms a motion information frame 25. Motion information 18 regarding encoded blocks is sequentially input to the motion information memory 108, and as a result, the motion information memory 108 holds a plurality of motion information frames 25 having different encoding times.

参照動き情報19は、所定のブロック単位(例えば、4×4画素ブロック単位)で動き情報フレーム25内に保持される。図4に示す動きベクトルブロック28は、符号化対象ブロック、利用可能ブロック及び選択ブロックなどと同じサイズの画素ブロックを示し、例えば、16×16画素ブロックである。動きベクトルブロック28には、例えば4×4画素ブロック毎に、動きベクトルが割り当てられている。動きベクトルブロックを利用したインター予測処理を、動きベクトルブロック予測処理と称する。動き情報メモリ108が保持する参照動き情報19は、予測部101によって、動き情報18を生成する際に読み出される。後述するような利用可能ブロックが有する動き情報18とは、動き情報メモリ108中の利用可能ブロックが位置する領域に保持された参照動き情報19を指す。 The reference motion information 19 is held in the motion information frame 25 in predetermined block units (for example, 4×4 pixel block units). The motion vector block 28 shown in FIG. 4 is a pixel block of the same size as the encoding target block, the available block, the selected block, etc., and is, for example, a 16×16 pixel block. A motion vector is assigned to the motion vector block 28, for example, for each 4×4 pixel block. Inter prediction processing using motion vector blocks is referred to as motion vector block prediction processing. The reference motion information 19 held in the motion information memory 108 is read by the prediction unit 101 when generating the motion information 18. Motion information 18 possessed by an available block as described later refers to reference motion information 19 held in an area in the motion information memory 108 where the available block is located.

なお、動き情報メモリ108は、4×4画素ブロック単位で参照動き情報19を保持する例に限らず、他の画素ブロック単位で参照動き情報19を保持しても構わない。例えば、参照動き情報19に関する画素ブロック単位は、1画素であってもよく、2×2画素ブロックであっても構わない。また、参照動き情報19に関する画素ブロックの形状は、正方形状の例に限らず、任意形状とすることができる。 Note that the motion information memory 108 is not limited to the example in which the reference motion information 19 is held in units of 4×4 pixel blocks, and may be held in units of other pixel blocks. For example, the pixel block unit regarding the reference motion information 19 may be one pixel or may be a 2×2 pixel block. Furthermore, the shape of the pixel block related to the reference motion information 19 is not limited to the square example, but can be any shape.

図1の利用可能ブロック取得部109は、動き情報メモリ108から参照動き情報19を取得し、取得した参照動き情報19に基づいて、既に符号化が完了している複数のブロックから、予測部101の予測処理に利用することができる利用可能ブロックを選択する。選択された利用可能ブロックは、利用可能ブロック情報30として予測部101及び可変長符号化部104へ送られる。利用可能ブロックを選択するための候補となる符号化済みのブロックを、動き参照ブロックと称す。動き参照ブロック及び利用可能ブロックの選択方法については、後に詳細に説明する。 The available block acquisition unit 109 in FIG. 1 acquires reference motion information 19 from the motion information memory 108, and based on the acquired reference motion information 19, the prediction unit 109 selects blocks that have already been encoded. Select available blocks that can be used for prediction processing. The selected available blocks are sent as available block information 30 to the prediction unit 101 and the variable length encoding unit 104. Encoded blocks that are candidates for selecting available blocks are referred to as motion reference blocks. A method for selecting motion reference blocks and available blocks will be described in detail later.

可変長符号化部104は、変換係数情報13に加えて、予測部101から選択ブロック情報31を、符号化制御部150から予測情報及び量子化パラメータなどの符号化パラメータを、利用可能ブロック取得部109から利用可能ブロック情報30を受け取る。可変長符号化部104は、量子化された変換係数13、選択ブロック情報31、利用可能ブロック情報30及び符号化パラメータをエントロピー符号化(例えば、等長符号化、ハフマン符号化又は算術符号化など)して、符号化データ14を生成する。符号化パラメータは、選択ブロック情報31及び予測情報とともに、変換係数に関する情報、量子化に関する情報などの復号の際に必要になるあらゆるパラメータを含む。生成された符号化データ14は、出力バッファ120に一時的に格納され、図示しない蓄積系又は伝送系へ送出される。 In addition to the transform coefficient information 13, the variable length encoding unit 104 receives selected block information 31 from the prediction unit 101, prediction information and encoding parameters such as quantization parameters from the encoding control unit 150, and receives the encoding parameters such as prediction information and quantization parameters from the available block acquisition unit. The available block information 30 is received from 109. The variable length encoding unit 104 performs entropy encoding (for example, equal length encoding, Huffman encoding, arithmetic encoding, etc.) on the quantized transform coefficients 13, selected block information 31, available block information 30, and encoding parameters. ) to generate encoded data 14. The encoding parameters include selected block information 31 and prediction information, as well as all parameters necessary for decoding, such as information regarding transform coefficients and information regarding quantization. The generated encoded data 14 is temporarily stored in an output buffer 120 and sent to a storage system or a transmission system (not shown).

図5は、入力画像信号10の処理手順を示している。図5に示されるように、まず、予測画像信号11が予測部101によって生成される(ステップS501)。ステップS501の予測画像信号11の生成においては、後述する利用可能ブロックのうちの1つが選択ブロックとして選択され、選択ブロック情報31、選択ブロックが有する動き情報及び参照画像信号17を用いて、予測画像信号11が作成される。予測画像信号11と入力画像信号10との差分が減算器102により計算され、予測誤差画像信号12が生成される(ステップS502)。 FIG. 5 shows a processing procedure for the input image signal 10. As shown in FIG. 5, first, the predicted image signal 11 is generated by the prediction unit 101 (step S501). In the generation of the predicted image signal 11 in step S501, one of the available blocks to be described later is selected as a selected block, and the predicted image signal is A signal 11 is created. The difference between the predicted image signal 11 and the input image signal 10 is calculated by the subtracter 102, and a predicted error image signal 12 is generated (step S502).

続いて、予測誤差画像信号12に対して変換・量子化部103により直交変換及び量子化が施され、変換係数情報13が生成される(ステップS503)。変換係数情報13及び選択ブロック情報31は、可変長符号化部104に送られ、可変長符号化が施され、符号化データ14が生成される(ステップS504)。また、ステップS504では、選択ブロック情報31に応じて、利用可能ブロックの数と等しい数のエントリーをコード表に持つように符号表が切り替えられ、選択ブロック情報31が可変長符号化される。符号化データのビットストリーム20は、図示しない蓄積系あるいは伝送路へ送出される。 Subsequently, the prediction error image signal 12 is subjected to orthogonal transformation and quantization by the transformation/quantization unit 103 to generate transformation coefficient information 13 (step S503). The transform coefficient information 13 and the selected block information 31 are sent to the variable length encoding unit 104, where they are subjected to variable length encoding to generate encoded data 14 (step S504). Further, in step S504, the code table is switched according to the selected block information 31 so that the code table has the same number of entries as the number of available blocks, and the selected block information 31 is variable-length coded. The encoded data bit stream 20 is sent to a storage system or transmission path (not shown).

ステップS503で生成された変換係数情報13は、逆量子化・逆変換部105によって逆量子化され、逆変換処理が施されて、復号予測誤差信号15となる(ステップS505)。復号予測誤差信号15は、ステップS501で使用された参照画像信号17に加算され、局所復号画像信号16となり(ステップS506)、フレームメモリ107に参照画像信号として記憶される(ステップS507)。 The transform coefficient information 13 generated in step S503 is dequantized by the dequantization/inverse transform unit 105 and subjected to an inverse transform process to become a decoded prediction error signal 15 (step S505). The decoded prediction error signal 15 is added to the reference image signal 17 used in step S501 to become the locally decoded image signal 16 (step S506), and is stored in the frame memory 107 as a reference image signal (step S507).

次に、上述した画像符号化部100の各構成をより詳細に説明する。
図1の画像符号化部100には、複数の予測モードが用意されており、各予測モードは、予測画像信号11の生成方法及び動き補償ブロックサイズが互いに異なる。予測部101が予測画像信号11を生成する方法としては、具体的には大きく分けて、符号化対象フレーム(又は、フィールド)に関する参照画像信号17を用いて予測画像を生成するイントラ予測(フレーム内予測)と、1以上の符号化済みの参照フレーム(参照フィールド)に関する参照画像信号17を用いて予測画像を生成するインター予測(フレーム間予測)とがある。予測部101は、イントラ予測及びインター予測を選択的に切り替えて、符号化対象ブロックの予測画像信号11を生成する。
Next, each configuration of the image encoding section 100 described above will be explained in more detail.
The image encoding unit 100 in FIG. 1 is provided with a plurality of prediction modes, and each prediction mode differs in the generation method of the predicted image signal 11 and the motion compensation block size. Specifically, the method by which the prediction unit 101 generates the predicted image signal 11 can be broadly divided into intra prediction (intra-frame prediction) in which a predicted image is generated using the reference image signal 17 regarding the frame (or field) to be encoded. prediction) and inter prediction (interframe prediction) in which a predicted image is generated using a reference image signal 17 regarding one or more encoded reference frames (reference fields). The prediction unit 101 selectively switches between intra prediction and inter prediction to generate a predicted image signal 11 of the current block to be encoded.

図6Aは、動き補償部113によるインター予測の一例を示している。インター予測では、図6Aに示されるように、既に符号化が完了している1フレーム前の参照フレーム内のブロックであって、符号化対象ブロックと同じ位置のブロック(予測ブロックともいう)23から、動き情報18に含まれる動きベクトル18aに応じて空間的にシフトした位置のブロック24に関する参照画像信号17を使用して、予測画像信号11が生成される。即ち、予測画像信号11の生成では、符号化対象ブロックの位置(座標)、及び動き情報18に含まれる動きベクトル18aで特定される、参照フレーム内のブロック24に関する参照画像信号17が使用される。インター予測では、少数画素精度(例えば、1/2画素精度又は1/4画素精度)の動き補償が可能であり、参照画像信号17に対してフィルタリング処理を行うことによって、補間画素の値が生成される。例えば、H.264では、輝度信号に対して1/4画素精度までの補間処理が可能である。1/4画素精度の動き補償を行う場合、動き情報18の情報量は、整数画素精度の4倍となる。 FIG. 6A shows an example of inter prediction by the motion compensation unit 113. In inter prediction, as shown in FIG. 6A, a block (also referred to as a prediction block) 23, which is a block in the previous reference frame that has already been encoded and is located at the same position as the block to be encoded, is used. , the predicted image signal 11 is generated using the reference image signal 17 regarding the block 24 at a position spatially shifted according to the motion vector 18a included in the motion information 18. That is, in generating the predicted image signal 11, the reference image signal 17 regarding the block 24 in the reference frame, which is specified by the position (coordinates) of the block to be encoded and the motion vector 18a included in the motion information 18, is used. . In inter prediction, motion compensation with small pixel precision (for example, 1/2 pixel precision or 1/4 pixel precision) is possible, and interpolated pixel values are generated by filtering the reference image signal 17. be done. For example, H. In H.264, interpolation processing of up to 1/4 pixel accuracy is possible for luminance signals. When performing motion compensation with 1/4 pixel precision, the amount of information of the motion information 18 is four times the integer pixel precision.

なお、インター予測では、図6Aに示されるような1フレーム前の参照フレームを使用する例に限らず、図6Bに示されるように、いずれの符号化済みの参照フレームが使用されても構わない。時間位置が異なる複数の参照フレームに関する参照画像信号17が保持されている場合、どの時間位置の参照画像信号17から予測画像信号11を生成したかを示す情報は、参照フレーム番号で表わされる。参照フレーム番号は、動き情報18に含まれる。参照フレーム番号は、領域単位(ピクチャ、ブロック単位など)で変更することができる。即ち、画素ブロック毎に異なる参照フレームが使用されることができる。一例として、符号化済みの1フレーム前の参照フレームを予測に使用した場合、この領域の参照フレーム番号は、0に設定され、符号化済みの2フレーム前の参照フレームを予測に使用した場合、この領域の参照フレーム番号は、1に設定される。他の例として、1フレーム分だけの参照画像信号17がフレームメモリ107に保持されている(参照フレームの数が1である)場合、参照フレーム番号は、常に0に設定される。 Note that inter prediction is not limited to the example of using the reference frame one frame before as shown in FIG. 6A, and any encoded reference frame may be used as shown in FIG. 6B. . When reference image signals 17 relating to a plurality of reference frames at different temporal positions are held, information indicating from which temporal position the reference image signal 17 is used to generate the predicted image signal 11 is represented by a reference frame number. The reference frame number is included in the motion information 18. The reference frame number can be changed in area units (picture, block units, etc.). That is, different reference frames can be used for each pixel block. As an example, if the coded reference frame one frame before is used for prediction, the reference frame number of this area is set to 0, and if the coded reference frame two frames before is used for prediction, The reference frame number for this area is set to 1. As another example, when only one frame worth of reference image signal 17 is held in frame memory 107 (the number of reference frames is 1), the reference frame number is always set to 0.

さらに、インター予測では、複数の動き補償ブロックの中から符号化対象ブロックに適したブロックサイズを選択することができる。即ち、符号化対象ブロックが複数の小画素ブロックに分割され、小画素ブロック毎に動き補償が行われても構わない。図7Aから図7Cは、マクロブロック単位の動き補償ブロックのサイズを示し、図7Dは、サブブロック(8×8画素以下の画素ブロック)単位の動き補償ブロックのサイズを示す。図7Aに示されるように、符号化対象ブロックが64×64画素である場合、動き補償ブロックとして、64×64画素ブロック、64×32画素ブロック、32×64画素ブロック又は32×32画素ブロックなどが選択されることができる。また、図7Bに示されるように、符号化対象ブロックが32×32画素である場合、動き補償ブロックとして、32×32画素ブロック、32×16画素ブロック、16×32画素ブロック又は16×16画素ブロックなどが選択されることができる。さらに、図7Cに示されるように、符号化対象ブロックが16×16画素である場合、動き補償ブロックは、16×16画素ブロック、16×8画素ブロック、8×16画素ブロック又は8×8画素ブロックなどに設定されることができる。さらにまた、図7Dに示されるように、符号化対象ブロックが8×8画素である場合、動き補償ブロックは、8×8画素ブロック、8×4画素ブロック、4×8画素ブロック又は4×4画素ブロックなどが選択されることができる。 Furthermore, in inter prediction, a block size suitable for a block to be coded can be selected from among a plurality of motion compensation blocks. That is, the encoding target block may be divided into a plurality of small pixel blocks, and motion compensation may be performed for each small pixel block. 7A to 7C show the size of the motion compensation block in units of macroblocks, and FIG. 7D shows the size of the motion compensation block in units of subblocks (pixel blocks of 8×8 pixels or less). As shown in FIG. 7A, when the encoding target block is 64 x 64 pixels, the motion compensation block may be a 64 x 64 pixel block, a 64 x 32 pixel block, a 32 x 64 pixel block, or a 32 x 32 pixel block. can be selected. Further, as shown in FIG. 7B, when the encoding target block is 32 x 32 pixels, the motion compensation block is a 32 x 32 pixel block, a 32 x 16 pixel block, a 16 x 32 pixel block, or a 16 x 16 pixel block. Blocks etc. can be selected. Furthermore, as shown in FIG. 7C, when the encoding target block is 16 x 16 pixels, the motion compensation block is a 16 x 16 pixel block, a 16 x 8 pixel block, an 8 x 16 pixel block, or an 8 x 8 pixel block. It can be set as a block, etc. Furthermore, as shown in FIG. 7D, when the encoding target block is 8x8 pixels, the motion compensation block is an 8x8 pixel block, an 8x4 pixel block, a 4x8 pixel block, or a 4x4 pixel block. Pixel blocks, etc. can be selected.

前述したように、インター予測に使用する参照フレーム内の小画素ブロック(例えば、4×4画素ブロック)が動き情報18を有しているので、入力画像信号10の局所的な性質に従って、最適な動き補償ブロックの形状及び動きベクトルを利用することができる。また、図7Aから図7Dのマクロブロック及びサブマクロブロックは、任意に組み合わせることができる。符号化対象ブロックが図7Aに示されるような64×64画素ブロックである場合、64×64画素ブロックを分割した4つの32×32画素ブロックの各々に対して、図7Bに示す各ブロックサイズを選択することで、階層的に64×64~16×16画素のブロックを利用することができる。同様にして、図7Dに示されるブロックサイズまで選択可能とする場合、階層的に64×64~4×4のブロックサイズを利用することができる。 As mentioned above, since the small pixel block (for example, 4x4 pixel block) in the reference frame used for inter prediction has motion information 18, the optimal The shape and motion vector of the motion compensation block can be used. Furthermore, the macroblocks and submacroblocks in FIGS. 7A to 7D can be combined arbitrarily. If the block to be encoded is a 64 x 64 pixel block as shown in Fig. 7A, each block size shown in Fig. 7B is set for each of the four 32 x 32 pixel blocks obtained by dividing the 64 x 64 pixel block. By selecting, blocks of 64×64 to 16×16 pixels can be used hierarchically. Similarly, if it is possible to select up to the block size shown in FIG. 7D, block sizes from 64×64 to 4×4 can be used hierarchically.

次に、図8Aから図8Fを参照して、動き参照ブロックについて説明する。
動き参照ブロックは、図1の画像符号化装置及び後述する画像復号化装置の両方によって取り決められた方法に従って、符号化対象フレーム及び参照フレーム内の符号化済みの領域(ブロック)の中から選択される。図8Aは、符号化対象ブロックの位置に応じて選択される動き参照ブロックの配置の一例を示している。図8Aの例では、9つの動き参照ブロックA~D及びTA~TEが符号化対象フレーム及び参照フレーム内の符号化済みの領域から選択される。具体的には、符号化対象フレームからは、符号化対象ブロックの左、上、右上、左上に隣接する4つのブロックA,B,C,Dが動き参照ブロックとして選択され、参照フレームからは、符号化対象ブロックと同一位置のブロックTA、並びにこのブロックTAの右、下、左及び上に隣接する4つの画素ブロックTB,TC,TD,TEが動き参照ブロックとして選択される。本実施形態では、符号化対象フレームから選択された動き参照ブロックを空間方向動き参照ブロックと称し、参照フレームから選択された動き参照ブロックを時間方向動き参照ブロックと称す。図8Aの各動き参照ブロックに付与されている記号pは、動き参照ブロックのインデクスを示す。このインデクスは、時間方向、空間方向の動き参照ブロックの順にナンバリングされているが、これに限らず、インデクスが重複しなければ、必ずしもこの順序でなくても構わない。例えば、時間方向及び空間方向の動き参照ブロックは、順序がばらばらにナンバリングされていても構わない。
Next, motion reference blocks will be described with reference to FIGS. 8A to 8F.
The motion reference block is selected from encoded areas (blocks) in the encoding target frame and the reference frame according to a method agreed upon by both the image encoding device in FIG. 1 and the image decoding device described later. Ru. FIG. 8A shows an example of the arrangement of motion reference blocks selected according to the position of the encoding target block. In the example of FIG. 8A, nine motion reference blocks A to D and TA to TE are selected from encoded regions in the current frame and the reference frame. Specifically, from the encoding target frame, four blocks A, B, C, and D adjacent to the left, above, upper right, and upper left of the encoding target block are selected as motion reference blocks, and from the reference frame, A block TA at the same position as the block to be encoded and four pixel blocks TB, TC, TD, and TE adjacent to the right, bottom, left, and top of this block TA are selected as motion reference blocks. In this embodiment, the motion reference block selected from the encoding target frame is referred to as a spatial motion reference block, and the motion reference block selected from the reference frame is referred to as a temporal motion reference block. The symbol p given to each motion reference block in FIG. 8A indicates the index of the motion reference block. The indexes are numbered in the order of the motion reference blocks in the temporal direction and the spatial direction, but the order is not limited to this and does not necessarily have to be in this order as long as the indexes do not overlap. For example, the motion reference blocks in the temporal and spatial directions may be numbered out of order.

なお、空間方向動き参照ブロックは、図8Aに示す例に限らず、図8Bに示すように、符号化対象ブロックに隣接する画素a,b,c,dが属するブロック(例えば、マクロブロック又はサブマクロブロック等)であっても構わない。この場合、符号化対象ブロック内の左上画素eから各画素a,b,c,dへの相対位置(dx,dy)は、図8Cに示されるように、設定される。ここで、図8A及び図8Bに示される例では、マクロブロックは、N×N画素ブロックであるものとして示されている。 Note that the spatial direction motion reference block is not limited to the example shown in FIG. 8A, but as shown in FIG. macroblock, etc.). In this case, the relative positions (dx, dy) from the upper left pixel e to each pixel a, b, c, d in the encoding target block are set as shown in FIG. 8C. Here, in the examples shown in FIGS. 8A and 8B, the macroblock is shown as being an N×N pixel block.

また、図8Dに示されるように、符号化対象ブロックに隣接する全てのブロックA1~A4,B1,B2,C,Dが空間方向動き参照ブロックとして選択されても構わない。図8Dの例では、空間方向動き参照ブロックの数は8となる。 Further, as shown in FIG. 8D, all blocks A1 to A4, B1, B2, C, and D adjacent to the current block to be encoded may be selected as spatial motion reference blocks. In the example of FIG. 8D, the number of spatial motion reference blocks is eight.

さらに、時間方向動き参照ブロックは、図8Eに示されるように、各ブロックTA~TEの一部が重なり合っていてもよく、図8Fに示されるように、各ブロックTA~TEが離れて配置されていても構わない。図8Eでは、時間方向動き参照ブロックTA及びTBが重なりあっている部分が斜線で示されている。さらにまた、時間方向動き参照ブロックは、必ずしも符号化対象ブロックに対応する位置(Collocate位置)のブロック及びその周囲に位置するブロックである例に限らず、参照フレーム内のいずれの位置に配置されているブロックであっても構わない。例えば、参照ブロックの位置、及び符号化対象ブロックに隣接するいずれかの符号化済みのブロックが有する動き情報18で特定される、参照フレーム内のブロックを中心ブロック(例えば、ブロックTA)として、この中心ブロック及びその周囲のブロックが時間方向動き参照ブロックとして選択されても構わない。さらに、時間方向参照ブロックは、中心ブロックから等間隔に配置されていなくても構わない。 Further, in the temporal motion reference blocks, as shown in FIG. 8E, the blocks TA to TE may partially overlap, or as shown in FIG. 8F, the blocks TA to TE may be arranged apart from each other. It doesn't matter if you stay there. In FIG. 8E, the portion where the temporal motion reference blocks TA and TB overlap is indicated by diagonal lines. Furthermore, the temporal motion reference block is not limited to the block at the position corresponding to the block to be encoded (Collocate position) and the blocks located around it, but may be located at any position within the reference frame. It doesn't matter if it's a block with For example, if a block in the reference frame, which is specified by the position of the reference block and the motion information 18 of any encoded block adjacent to the block to be encoded, is set as the center block (for example, block TA), The center block and the blocks around it may be selected as the temporal motion reference blocks. Furthermore, the temporal reference blocks do not have to be arranged at equal intervals from the center block.

上述したいずれの場合においても、符号化装置及び復号化装置で空間方向及び時間方向動き参照ブロックの数及び位置を予め取り決めておけば、動き参照ブロックの数及び位置は、どのように設定されても構わない。また、動き参照ブロックのサイズは、必ずしも符号化対象ブロックと同じサイズである必要はない。例えば、図8Dに示されるように、動き参照ブロックのサイズが符号化対象ブロックより大きくてもよく、小さくても構わない。さらに、動き参照ブロックは、正方形状に限らず、長方形状等の任意形状に設定されても構わない。また、動き参照ブロックは、いかなるサイズに設定されても構わない。 In any of the above cases, if the number and position of motion reference blocks in the spatial and temporal directions are determined in advance by the encoding device and the decoding device, the number and position of the motion reference blocks can be set in any way. I don't mind. Furthermore, the size of the motion reference block does not necessarily have to be the same size as the current block to be encoded. For example, as shown in FIG. 8D, the size of the motion reference block may be larger or smaller than the encoding target block. Further, the motion reference block is not limited to a square shape, and may be set to any shape such as a rectangular shape. Further, the motion reference block may be set to any size.

また、動き参照ブロック及び利用可能ブロックは、時間方向及び空間方向のいずれか一方のみに配置されていても構わない。また、Pスライス、Bスライスといったスライスの種類に従って、時間方向の動き参照ブロック及び利用可能ブロックを配置しても構わないいし、空間方向の動き参照ブロック及び利用可能ブロックを配置しても構わない。 Further, the motion reference block and the available block may be arranged only in either the temporal direction or the spatial direction. Further, motion reference blocks and available blocks in the temporal direction may be arranged according to slice types such as P slices and B slices, or motion reference blocks and available blocks in the spatial direction may be arranged.

図9は、利用可能ブロック取得部109が動き参照ブロックの中から利用可能ブロックを選択する方法を示している。利用可能ブロックは、符号化対象ブロックへ動き情報を適用可能なブロックであり、互いに異なる動き情報を有している。利用可能ブロック取得部109は、参照動き情報19を参照して、図9に示す方法に従って、動き参照ブロックが各々利用可能ブロックであるか否かを判定し、利用可能ブロック情報30を出力する。 FIG. 9 shows a method in which the available block acquisition unit 109 selects available blocks from among the motion reference blocks. The available blocks are blocks to which motion information can be applied to the encoding target block, and have mutually different motion information. The available block acquisition unit 109 refers to the reference motion information 19, determines whether each motion reference block is an available block according to the method shown in FIG. 9, and outputs the available block information 30.

図9に示されるように、まず、インデクスpがゼロである動き参照ブロックが選択される(S800)。図9の説明では、インデクスpが0からM-1(Mは、動き参照ブロックの数を示す。)まで順番に動き参照ブロックを処理する場合を想定している。また、インデクスpが0からp-1までの動き参照ブロックに対する利用可能判定処理が終了し、利用可能か否かを判定する対象となっている動き参照ブロックのインデクスがpであるものとして説明する。 As shown in FIG. 9, first, a motion reference block whose index p is zero is selected (S800). In the explanation of FIG. 9, it is assumed that motion reference blocks are processed in order from index p 0 to M-1 (M indicates the number of motion reference blocks). Furthermore, the description will be made assuming that the usability determination process for motion reference blocks with index p from 0 to p-1 has been completed, and that the index of the motion reference block whose usability is to be determined is p. .

利用可能ブロック取得部109は、動き参照ブロックpが動き情報18を有しているか否か、即ち、少なくとも1つの動きベクトルが割り当てられているか否かを判定する(S801)。動き参照ブロックpが動きベクトルを有していない場合、即ち、時間方向動き参照ブロックpが、動き情報を有していないIスライス内のブロックであるか、或いは、時間方向動き参照ブロックp内の全ての小画素ブロックがイントラ予測符号化されたものである場合、ステップS805に進む。ステップS805において、動き参照ブロックpは、利用不可能ブロックと判定される。 The available block acquisition unit 109 determines whether the motion reference block p has motion information 18, that is, whether at least one motion vector is assigned (S801). If the motion reference block p does not have a motion vector, that is, the temporal motion reference block p is a block within an I slice that does not have motion information, or If all small pixel blocks have been intra-predictively encoded, the process advances to step S805. In step S805, the motion reference block p is determined to be an unavailable block.

ステップS801において動き参照ブロックpが動き情報を有している場合、ステップS802に進む。利用可能ブロック取得部109は、既に利用可能ブロックに選択されている動き参照ブロックq(利用可能ブロックq)を選定する。ここで、qは、pよりも小さい値である。続いて、利用可能ブロック取得部109は、動き参照ブロックpの動き情報18と、利用可能ブロックqの動き情報18とを比較して、同一の動き情報を有するか否かを判定する(S803)。動き参照ブロックpの動き情報18と利用可能ブロックに選択されている動き参照ブロックqの動き情報18とが同一であると判定された場合、ステップS805に進み、動き参照ブロックpが利用不可能ブロックと判定される。 If the motion reference block p has motion information in step S801, the process advances to step S802. The available block acquisition unit 109 selects a motion reference block q (available block q) that has already been selected as an available block. Here, q is a value smaller than p. Next, the available block acquisition unit 109 compares the motion information 18 of the motion reference block p and the motion information 18 of the available block q, and determines whether they have the same motion information (S803). . If it is determined that the motion information 18 of the motion reference block p and the motion information 18 of the motion reference block q selected as an available block are the same, the process advances to step S805, and the motion reference block p is an unavailable block. It is determined that

q<pを満たす全ての利用可能ブロックqに対して、ステップS803で動き参照ブロックpの動き情報18と、利用可能ブロックqの動き情報18とが同一でないと判定された場合、ステップS804に進む。ステップS804において、利用可能ブロック取得部109は、動き参照ブロックpを利用可能ブロックとして判定する。 If it is determined in step S803 that the motion information 18 of the motion reference block p and the motion information 18 of the available block q are not the same for all available blocks q satisfying q<p, the process advances to step S804. . In step S804, the available block acquisition unit 109 determines the motion reference block p as an available block.

動き参照ブロックpが利用可能ブロック又は利用不可能ブロックであると判定されると、利用可能ブロック取得部109は、全ての動き参照ブロックに対して利用可能判定が実行されたか否かを判定する(S806)。利用可能判定が実行されていない動き参照ブロックが存在する場合、例えば、p<M-1である場合、ステップS807に進む。続いて、利用可能ブロック取得部109は、インデクスpを1インクリメントして(ステップS807)、ステップS801からステップS806を再度実行する。ステップS806で全ての動き参照ブロックに対して利用可能判定が実行されると、利用可能判定処理は、終了となる。 When it is determined that the motion reference block p is an available block or an unusable block, the available block acquisition unit 109 determines whether the availability determination has been performed for all motion reference blocks ( S806). If there is a motion reference block for which the availability determination has not been performed, for example, if p<M-1, the process advances to step S807. Subsequently, the available block acquisition unit 109 increments the index p by 1 (step S807), and executes steps S801 to S806 again. When the usability determination is executed for all motion reference blocks in step S806, the usability determination process ends.

上述した利用可能判定処理を実行することにより、各動き参照ブロックが利用可能ブロックであるか、又は利用不可能ブロックであるかが判定される。利用可能ブロック取得部109は、利用可能ブロックに関する情報を含む利用可能ブロック情報30を生成する。このように、動き参照ブロックの中から利用可能ブロックを選択することによって、利用可能ブロック情報30に関する情報量が低減され、結果として、符号化データ14の量を低減することができる。 By executing the availability determination process described above, it is determined whether each motion reference block is an available block or an unavailable block. The available block acquisition unit 109 generates available block information 30 including information regarding available blocks. In this way, by selecting an available block from among the motion reference blocks, the amount of information regarding the available block information 30 is reduced, and as a result, the amount of encoded data 14 can be reduced.

図8Aに示した動き参照ブロックに対して、利用可能判定処理を実行した結果の一例を図10に示す。図10では、2つの空間方向動き参照ブロック(p=0,1)及び2つの時間方向動き参照ブロック(p=5,8)が利用可能ブロックであると判定されている。図10の例に関する利用可能ブロック情報30の一例を図11に示す。図11に示されるように、利用可能ブロック情報30は、動き参照ブロックのインデクス、利用可能性及び動き参照ブロック名称を含む。図11の例では、インデクスp=0,1,5,8が利用可能ブロックであり、利用可能ブロック数は4である。予測部101は、これらの利用可能ブロックの中から最適な1つ利用可能ブロックを選択ブロックとして選択し、選択ブロックに関する情報(選択ブロック情報)31を出力する。選択ブロック情報31は、利用可能ブロックの数及び選択された利用可能ブロックのインデクス値を含む。例えば、利用可能ブロックの数が4である場合、応じた選択ブロック情報31は、最大のエントリーが4である符号表を用いて、可変長符号化部104によって符号化される。 FIG. 10 shows an example of the result of performing the usability determination process on the motion reference block shown in FIG. 8A. In FIG. 10, two spatial motion reference blocks (p=0, 1) and two temporal motion reference blocks (p=5, 8) are determined to be available blocks. An example of the available block information 30 regarding the example of FIG. 10 is shown in FIG. As shown in FIG. 11, the available block information 30 includes motion reference block index, availability, and motion reference block name. In the example of FIG. 11, indexes p=0, 1, 5, and 8 are available blocks, and the number of available blocks is 4. The prediction unit 101 selects an optimal available block from among these available blocks as a selected block, and outputs information 31 regarding the selected block (selected block information). The selected block information 31 includes the number of available blocks and the index value of the selected available block. For example, when the number of available blocks is 4, the corresponding selected block information 31 is encoded by the variable length encoding unit 104 using a code table with a maximum of 4 entries.

なお、図9のステップS801において、時間方向動き参照ブロックp内のブロックのうちの少なくとも1つがイントラ予測符号化されたブロックであった場合、利用可能ブロック取得部109は、動き参照ブロックpを利用不可能ブロックと判定しても構わない。即ち、時間方向動き参照ブロックp内の全てのブロックがインター予測で符号化されている場合のみ、ステップS802に進むようにしても構わない。 Note that in step S801 in FIG. 9, if at least one of the blocks in the temporal motion reference block p is an intra-prediction encoded block, the available block acquisition unit 109 uses the motion reference block p. It does not matter if it is determined to be an impossible block. That is, the process may proceed to step S802 only when all blocks in the temporal motion reference block p have been encoded by inter prediction.

図12Aから図12Eは、ステップS803の動き情報18の比較において、動き参照ブロックpの動き情報18と、利用可能ブロックqの動き情報18とが同一であると判定される例を示す。図12Aから図12Eには、各々、斜線が施された複数のブロックと、2つの白塗りのブロックとが示されている。図12Aから図12Eでは、説明を簡単にするために、斜線が施されたブロックを考慮せずに、これらの2つの白塗りのブロックの動き情報18を比較する場合を想定している。2つの白塗りのブロックの一方が、動き参照ブロックpであり、他方が既に利用可能と判定されている動き参照ブロックq(利用可能ブロックq)であるものとする。特に断りのない限り、2つの白色ブロックのいずれが動き参照ブロックpであっても構わない。 12A to 12E show an example in which the motion information 18 of the motion reference block p and the motion information 18 of the available block q are determined to be the same in the comparison of the motion information 18 in step S803. 12A to 12E each show a plurality of blocks shaded with diagonal lines and two blocks painted white. In FIGS. 12A to 12E, in order to simplify the explanation, it is assumed that the motion information 18 of these two white blocks is compared without considering the shaded block. It is assumed that one of the two white blocks is a motion reference block p, and the other is a motion reference block q (available block q) that has already been determined to be available. Unless otherwise specified, it does not matter which of the two white blocks may be the motion reference block p.

図12Aは、動き参照ブロックp及び利用可能ブロックqの両方が空間方向のブロックである例を示している。図12Aの例では、ブロックA及びBの動き情報18が同一であれば、動き情報18が同一であると判定される。このとき、ブロックA及びBのサイズが同一である必要はない。 FIG. 12A shows an example where both the motion reference block p and the available block q are spatial blocks. In the example of FIG. 12A, if the motion information 18 of blocks A and B are the same, it is determined that the motion information 18 is the same. At this time, the sizes of blocks A and B do not need to be the same.

図12Bは、動き参照ブロックp及び利用可能ブロックqの一方が空間方向のブロックAであり、他方が時間方向のブロックTBである例を示している。図12Bでは、時間方向のブロックTB内に動き情報を有するブロックが1つある。時間方向のブロックTBの動き情報18と空間方向のブロックAの動き情報18とが同一であれば、動き情報18が同一であると判定される。このとき、ブロックA及びTBのサイズが同一である必要はない。 FIG. 12B shows an example in which one of the motion reference block p and the available block q is a block A in the spatial direction, and the other is a block TB in the temporal direction. In FIG. 12B, there is one block having motion information in the block TB in the time direction. If the motion information 18 of the block TB in the temporal direction and the motion information 18 of the block A in the spatial direction are the same, it is determined that the motion information 18 is the same. At this time, the sizes of blocks A and TB do not need to be the same.

図12Cは、動き参照ブロックp及び利用可能ブロックqの一方が空間方向のブロックAであり、他方が時間方向のブロックTBである他の例を示している。図12Cは、時間方向のブロックTBが複数の小ブロックに分割されていて、動き情報18を有する小ブロックが複数ある場合を示している。図12Cの例では、動き情報18を有する全てのブロックが同じ動き情報18を有し、その動き情報18が空間方向のブロックAの動き情報18と同一であれば、動き情報18が同一であると判定される。このとき、ブロックA及びTBのサイズが同一である必要はない。 FIG. 12C shows another example in which one of the motion reference block p and the available block q is a block A in the spatial direction, and the other is a block TB in the temporal direction. FIG. 12C shows a case where the block TB in the time direction is divided into a plurality of small blocks, and there are a plurality of small blocks having motion information 18. In the example of FIG. 12C, if all blocks having motion information 18 have the same motion information 18 and the motion information 18 is the same as the motion information 18 of block A in the spatial direction, then the motion information 18 is the same. It is determined that At this time, the sizes of blocks A and TB do not need to be the same.

図12Dは、動き参照ブロックp及び利用可能ブロックqがともに時間方向のブロックである例を示している。この場合、ブロックTB及びTEの動き情報18が同一であれば、動き情報18が同一であると判定される。 FIG. 12D shows an example in which the motion reference block p and the available block q are both blocks in the time direction. In this case, if the motion information 18 of blocks TB and TE is the same, it is determined that the motion information 18 is the same.

図12Eは、動き参照ブロックp及び利用可能ブロックqがともに時間方向のブロックである他の例を示している。図12Eは、時間方向のブロックTB及びTEが各々複数の小ブロックに分割されていて、各々に動き情報18を有する小ブロックが複数ある場合を示している。この場合、ブロック内の小ブロック毎に動き情報18を比較して、全ての小ブロックに対し動き情報18が同一であれば、ブロックTBの動き情報18とブロックTEの動き情報18とが同一であると判定される。 FIG. 12E shows another example in which the motion reference block p and the available block q are both blocks in the time direction. FIG. 12E shows a case where blocks TB and TE in the time direction are each divided into a plurality of small blocks, and there are a plurality of small blocks each having motion information 18. In this case, the motion information 18 is compared for each small block within the block, and if the motion information 18 is the same for all small blocks, the motion information 18 of the block TB and the motion information 18 of the block TE are the same. It is determined that there is.

図12Fは、動き参照ブロックp及び利用可能ブロックqがともに時間方向のブロックであるさらに他の例を示している。図12Fは、時間方向のブロックTEが複数の小ブロックに分割されていて、ブロックTEに動き情報18を有する小ブロックが複数ある場合を示している。ブロックTEの全ての動き情報18が同一の動き情報18であり、且つ、ブロックTDが有する動き情報18と同一である場合、ブロックTDとTEの動き情報18が同一であると判定される。 FIG. 12F shows yet another example in which the motion reference block p and the available block q are both blocks in the time direction. FIG. 12F shows a case where the block TE in the time direction is divided into a plurality of small blocks, and the block TE includes a plurality of small blocks having motion information 18. If all the motion information 18 of the block TE is the same motion information 18 and the same as the motion information 18 of the block TD, it is determined that the motion information 18 of the blocks TD and TE are the same.

このようにして、ステップS803では、動き参照ブロックpの動き情報18と利用可能ブロックqの動き情報18とが同一であるか否かが判定される。図12Aから図12Fの例では、動き参照ブロックpと比較する利用可能ブロックqの数を1として説明したが、利用可能ブロックqの数が2以上の場合においては、動き参照ブロックpの動き情報18と、各々の利用可能ブロックqの動き情報18とを比較しても構わない。また、後述するスケーリングを適用する場合、スケーリング後の動き情報18が上記説明の動き情報18となる。 In this way, in step S803, it is determined whether the motion information 18 of the motion reference block p and the motion information 18 of the available block q are the same. In the examples of FIGS. 12A to 12F, the number of available blocks q to be compared with the motion reference block p is 1. However, in the case where the number of available blocks q is 2 or more, the motion information of the motion reference block p 18 may be compared with the motion information 18 of each available block q. Furthermore, when scaling described later is applied, the motion information 18 after scaling becomes the motion information 18 described above.

なお、動き参照ブロックpの動き情報と利用可能ブロックqの動き情報とが同一であるという判定は、動き情報に含まれる各動きベクトルが完全に一致する場合に限定されることはない。例えば、2つの動きベクトルの差のノルムが所定の範囲内であれば、動き参照ブロックpの動き情報と利用可能ブロックqの動き情報とが実質的に同一であるとみなしても構わない。 Note that the determination that the motion information of the motion reference block p and the motion information of the available block q are the same is not limited to the case where each motion vector included in the motion information completely matches. For example, if the norm of the difference between two motion vectors is within a predetermined range, the motion information of the motion reference block p and the motion information of the available block q may be considered to be substantially the same.

図13は、予測部101のより詳細な構成を示している。この予測部101は、前述したように、利用可能ブロック情報30、参照動き情報19及び参照画像信号17を入力として、予測画像信号11、動き情報18及び選択ブロック情報31を出力する。動き情報選択部118は、図13に示されるように、空間方向動き情報取得部110、時間方向動き情報取得部111及び動き情報切替スイッチ112を備えている。 FIG. 13 shows a more detailed configuration of the prediction unit 101. As described above, the prediction unit 101 receives the available block information 30, reference motion information 19, and reference image signal 17 as input, and outputs the predicted image signal 11, motion information 18, and selected block information 31. The motion information selection section 118 includes a spatial motion information acquisition section 110, a temporal motion information acquisition section 111, and a motion information changeover switch 112, as shown in FIG.

空間方向動き情報取得部110には、利用可能ブロック情報30、及び空間方向動き参照ブロックに関する参照動き情報19が入力される。空間方向動き情報取得部110は、空間方向に位置する各利用可能ブロックが有する動き情報及び利用可能ブロックのインデクス値を含む動き情報18Aを出力する。図11に示した情報が利用可能ブロック情報30として入力される場合、空間方向動き情報取得部110は、2つの動き情報出力18Aを生成し、各動き情報出力18Aは、利用可能ブロック及びこの利用可能ブロックが有する動き情報19を含む。 The available block information 30 and the reference motion information 19 regarding the spatial motion reference block are input to the spatial motion information acquisition unit 110 . The spatial direction motion information acquisition unit 110 outputs motion information 18A including motion information of each available block located in the spatial direction and an index value of the available block. When the information shown in FIG. 11 is input as the available block information 30, the spatial direction motion information acquisition unit 110 generates two motion information outputs 18A, and each motion information output 18A includes information about available blocks and their usage. Contains motion information 19 possessed by possible blocks.

時間方向動き情報取得部111には、利用可能ブロック情報30及び時間方向動き参照ブロックに関する参照動き情報19が入力される。時間方向動き情報取得部111は、利用可能ブロック情報30で特定される利用可能な時間方向動き参照ブロックが有する動き情報19及び利用可能ブロックのインデクス値を動き情報18Bとして出力する。時間方向動き参照ブロックは複数の小画素ブロックに分割されていて、各小画素ブロックが動き情報19を有している。時間方向動き情報取得部111が出力する動き情報18Bは、図14に示すように、利用可能ブロック内の各小画素ブロックが有する動き情報19の群を含む。動き情報18Bが動き情報19の群を含む場合、符号化対象ブロックを分割した小画素ブロック単位で、符号化対象ブロックに対して動き補償予測を実行することができる。図11に示した情報が利用可能ブロック情報30として入力される場合、時間方向動き情報取得部111は、2つの動き情報出力18Bを生成し、各動き情報出力は、利用可能ブロック及びこの利用可能ブロックが有する動き情報19の群を含む。 The available block information 30 and the reference motion information 19 regarding the temporal motion reference block are input to the temporal motion information acquisition unit 111 . The temporal motion information acquisition unit 111 outputs the motion information 19 of the available temporal motion reference block specified by the available block information 30 and the index value of the available block as motion information 18B. The temporal motion reference block is divided into a plurality of small pixel blocks, and each small pixel block has motion information 19. As shown in FIG. 14, the motion information 18B output by the temporal motion information acquisition unit 111 includes a group of motion information 19 possessed by each small pixel block within the available block. When the motion information 18B includes a group of motion information 19, motion compensation prediction can be performed on the current block to be encoded in units of small pixel blocks obtained by dividing the current block to be encoded. When the information shown in FIG. 11 is input as the available block information 30, the temporal motion information acquisition unit 111 generates two motion information outputs 18B, and each motion information output includes an available block and this available block information. Contains a group of motion information 19 that the block has.

なお、時間方向動き情報取得部111は、各画素小ブロックが有する動き情報19に含まれる動きベクトルの平均値又は代表値を求め、動きベクトルの平均値又は代表値を動き情報18Bとして出力しても構わない。 Note that the temporal motion information acquisition unit 111 calculates the average value or representative value of the motion vectors included in the motion information 19 that each pixel small block has, and outputs the average value or representative value of the motion vectors as the motion information 18B. I don't mind.

図13の動き情報切替スイッチ112は、空間方向動き情報取得部110及び時間方向動き情報取得部111から出力される動き情報18A及び18Bに基づいて、適切な1つの利用可能ブロックを選択ブロックとして選択し、選択ブロックに対応する動き情報18(又は、動き情報18の群)を動き補償部113に出力する。また、動き情報切替スイッチ112は、選択ブロックに関する選択ブロック情報31を出力する。選択ブロック情報31は、インデクスp又は動き参照ブロックの名称などを含み、単に選択情報とも称される。選択ブロック情報31は、インデクスp及び動き参照ブロックの名称に限定されず、選択ブロックの位置を特定することができれば、いかなる情報であっても構わない。 The motion information changeover switch 112 in FIG. 13 selects one appropriate available block as the selected block based on the motion information 18A and 18B output from the spatial motion information acquisition section 110 and the temporal motion information acquisition section 111. Then, motion information 18 (or a group of motion information 18) corresponding to the selected block is output to the motion compensation unit 113. Further, the motion information changeover switch 112 outputs selected block information 31 regarding the selected block. The selected block information 31 includes the index p or the name of the motion reference block, and is also simply referred to as selection information. The selected block information 31 is not limited to the index p and the name of the motion reference block, and may be any information as long as it can specify the position of the selected block.

動き情報切替スイッチ112は、例えば、下記数式1に示すコスト式によって導出される符号化コストが最小になる利用可能ブロックを選択ブロックとして選択する。
The motion information changeover switch 112 selects, for example, an available block whose encoding cost, which is derived from the cost formula shown in Equation 1 below, is the minimum as the selected block.

ここで、Jは符号化コストを示し、Dは入力画像信号10と参照画像信号17との間の二乗誤差和を表す符号化歪みを示す。また、Rは仮符号化によって見積もられる符号量を示し、λは。量子化幅等によって定められるラグランジュ未定係数を示す。数式1に代えて、符号量R又は符号化歪みDのみを使用して、符号化コストJを算出してもよく、符号量R又は符号化歪みDを近似した値を使用して数式1のコスト関数を作成しても構わない。さらに、符号化歪みDは、二乗誤差和に限らず、予測誤差の絶対値和(SAD:sums of absolute difference)であっても構わない。符号量Rは、動き情報18に関する符号量のみを使用しても構わない。また、符号化コストが最小になる利用可能ブロックが選択ブロックとして選択される例に限定されず、符号化コストが最も小さい値以上のある範囲内の値を有する1つの利用可能ブロックが選択ブロックとして選択されても構わない。 Here, J represents the encoding cost, and D represents the encoding distortion representing the sum of squared errors between the input image signal 10 and the reference image signal 17. Further, R indicates the code amount estimated by temporary encoding, and λ is. It shows the Lagrangian undetermined coefficient determined by the quantization width, etc. Instead of formula 1, the encoding cost J may be calculated using only the code amount R or encoding distortion D, or by using a value that approximates the code amount R or encoding distortion D. You may also create a cost function. Furthermore, the encoding distortion D is not limited to the sum of square errors, but may be the sum of absolute differences (SAD) of prediction errors. As the code amount R, only the code amount related to the motion information 18 may be used. Furthermore, the selection block is not limited to the example in which the available block with the minimum encoding cost is selected as the selected block, but one available block having a value within a certain range that is greater than or equal to the minimum encoding cost is selected as the selected block. It doesn't matter if it is selected.

動き補償部113は、動き情報選択部118が選択した選択ブロックが有する動き情報(又は、動き情報の群)に基づいて、参照画像信号17が予測画像信号11として取り出される画素ブロックの位置を導出する。動き補償部113に動き情報の群が入力された場合、動き補償部113は、参照画像信号17が予測画像信号11として取り出される画素ブロックを小画素ブロック(例えば、4×4画素ブロック)に分割し、かつ、これら小画素ブロックの各々に、対応する動き情報18を適用することによって、参照画像信号17から予測画像信号11を取得する。予測画像信号11が取得されるブロックの位置は、例えば図4Aに示されるように、小画素ブロックから、動き情報18に含まれる動きベクトル18aに応じて空間方向にシフトした位置となる。 The motion compensation unit 113 derives the position of the pixel block from which the reference image signal 17 is extracted as the predicted image signal 11 based on the motion information (or group of motion information) possessed by the selected block selected by the motion information selection unit 118. do. When a group of motion information is input to the motion compensation unit 113, the motion compensation unit 113 divides the pixel block from which the reference image signal 17 is extracted as the predicted image signal 11 into small pixel blocks (for example, 4×4 pixel blocks). Then, the predicted image signal 11 is obtained from the reference image signal 17 by applying the corresponding motion information 18 to each of these small pixel blocks. The position of the block from which the predicted image signal 11 is acquired is, for example, a position shifted in the spatial direction from the small pixel block according to the motion vector 18a included in the motion information 18, as shown in FIG. 4A.

符号化対象ブロックに対する動き補償処理は、H.264の動き補償処理と同様のものを使用することができる。ここでは、一例として、1/4画素精度の補間手法を具体的に説明する。1/4画素精度の補間では、動きベクトルの各成分が4の倍数である場合、動きベクトルは、整数画素位置を指し示す。それ以外の場合、動きベクトルは、分数精度の補間位置に対応する予測位置を指し示す。
Motion compensation processing for the current block to be encoded is performed using H. A motion compensation process similar to that of H.264 can be used. Here, as an example, a 1/4 pixel precision interpolation method will be specifically described. For quarter-pixel precision interpolation, if each component of the motion vector is a multiple of four, the motion vector points to an integer pixel location. Otherwise, the motion vector points to a predicted position that corresponds to an interpolated position with fractional precision.

ここで、x及びyは、予測対象ブロックの先頭位置(例えば、左上頂点)を示す垂直及び水平方向のインデクスを示し、x_pos及びy_posは、参照画像信号17の対応する予測位置を示す。(mv_x,mv_y)は、1/4画素精度を持つ動きベクトルを示す。次に、割り出した画素位置に対して、参照画像信号17の対応する画素位置の補填又は補間処理によって予測画素を生成する。図15に、H.264の予測画素生成の一例が示されている。図15において大文字のアルファベットで示される正方形(斜線が施された正方形)は、整数位置の画素を示しており、網掛けで表示されている正方形は、1/2画素位置の補間画素を示している。また、白塗りで表示された正方形は1/4画素位置に対応する補間画素を示している。例えば、図15において、アルファベットb、hの位置に対応する1/2画素の補間処理は、下記数式3で算出される。
Here, x and y indicate vertical and horizontal indexes indicating the starting position (for example, the upper left vertex) of the prediction target block, and x_pos and y_pos indicate the corresponding predicted position of the reference image signal 17. (mv_x, mv_y) indicates a motion vector with 1/4 pixel precision. Next, a predicted pixel is generated by supplementing or interpolating the corresponding pixel position of the reference image signal 17 with respect to the determined pixel position. In FIG. 15, H. An example of H.264 predicted pixel generation is shown. In FIG. 15, squares indicated by capital letters (shaded squares) indicate pixels at integer positions, and squares indicated by shading indicate interpolated pixels at 1/2 pixel position. There is. Moreover, the square displayed in white indicates the interpolation pixel corresponding to the 1/4 pixel position. For example, in FIG. 15, the interpolation process for 1/2 pixels corresponding to the positions of alphabets b and h is calculated using Equation 3 below.

ここで、数式3及び下記数式4に示されるアルファベット(例えば、b,h,C1等)は、図16において同じアルファベットを付与された画素の画素値を示す。また、「>>」は、右シフト演算を示し、「>> 5」は、32で除算することに相当する。即ち、1/2画素位置の補間画素は、6タップFIR(Finite Impulse Response)フィルタ(タップ係数:(1,-5,20,20,-5,1)/32)を用いて算出される。 Here, the alphabets (for example, b, h, C1, etc.) shown in Equation 3 and Equation 4 below indicate the pixel values of pixels assigned the same alphabet in FIG. Further, ">>" indicates a right shift operation, and ">> 5" corresponds to division by 32. That is, the interpolation pixel at the 1/2 pixel position is calculated using a 6-tap FIR (Finite Impulse Response) filter (tap coefficients: (1, -5, 20, 20, -5, 1)/32).

また、図15でアルファベットa、dの位置に対応する1/4画素の補間処理は、下記数式4で算出される。
Further, the interpolation process for 1/4 pixels corresponding to the positions of alphabets a and d in FIG. 15 is calculated using the following formula 4.

このように、1/4画素位置の補間画素は、2タップの平均値フィルタ(タップ係数:(1/2,1/2))を用いて算出される。4つの整数画素位置の中間に存在するアルファベットjに対応する1/2画素の補間処理は、垂直方向6タップ及び水平方向6タップの両方向を用いて生成される。説明した以外の画素位置に対しても同様の方法で、補間画素値が生成される。 In this way, the interpolated pixel at the 1/4 pixel position is calculated using a 2-tap average value filter (tap coefficients: (1/2, 1/2)). The interpolation process for the 1/2 pixel corresponding to the alphabet j existing in the middle of the four integer pixel positions is generated using both 6 taps in the vertical direction and 6 taps in the horizontal direction. Interpolated pixel values are generated for pixel positions other than those described in the same manner.

なお、補間処理は、数式3及び数式4の例に限らず、他の補間係数を用いて生成されても構わない。また、補間係数は、符号化制御部150から与えられる固定の値を用いてもよく、或いは、前述の符号化コストに基づいて、フレーム毎に補間係数を最適化し、最適化された補間係数を用いて生成されても構わない。 Note that the interpolation process is not limited to the examples of Equations 3 and 4, and may be generated using other interpolation coefficients. Further, the interpolation coefficient may be a fixed value given from the encoding control unit 150, or the interpolation coefficient may be optimized for each frame based on the aforementioned encoding cost, and the optimized interpolation coefficient may be used. It may be generated using

また、本実施形態では、動き参照ブロックがマクロブロック(例えば、16×16画素ブロック)単位での動きベクトルブロック予測処理に関する処理について述べたが、マクロブロックに限らず、16×8画素ブロック単位、8×16画素ブロック単位、8×8画素ブロック単位、8×4画素ブロック単位、4×8画素ブロック単位又は4×4画素ブロック単位で予測処理が実行されても構わない。この場合、動きベクトルブロックに関する情報は、画素ブロック単位で導出される。また、32×32画素ブロック単位、32×16画素ブロック単位、64×64画素ブロック単位など、16×16画素ブロックより大きい単位で上記の予測処理を行っても構わない。 In addition, in this embodiment, the motion reference block is a process related to motion vector block prediction processing in units of macroblocks (for example, 16 x 16 pixel blocks), but is not limited to macroblocks, but in units of 16 x 8 pixel blocks, The prediction process may be performed in units of 8×16 pixel blocks, in units of 8×8 pixel blocks, in units of 8×4 pixel blocks, in units of 4×8 pixel blocks, or in units of 4×4 pixel blocks. In this case, information regarding motion vector blocks is derived for each pixel block. Further, the above prediction process may be performed in units larger than 16 x 16 pixel blocks, such as in units of 32 x 32 pixel blocks, units of 32 x 16 pixel blocks, and units of 64 x 64 pixel blocks.

動きベクトルブロック内の参照動きベクトルを、符号化対象ブロック内の小画素ブロックの動きベクトルとして代入する際には、(A)参照動きベクトルのマイナス値(反転ベクトル)を代入してもよく、或いは(B)小ブロックに対応する参照動きベクトルと、この参照動きベクトルに隣接する参照動きベクトルを用いた加重平均値若しくはメディアン値、最大値、最小値を代入しても構わない。 When substituting a reference motion vector in a motion vector block as a motion vector of a small pixel block in a block to be encoded, (A) a negative value (inverted vector) of the reference motion vector may be substituted, or (B) A reference motion vector corresponding to a small block, a weighted average value or a median value, a maximum value, and a minimum value using reference motion vectors adjacent to this reference motion vector may be substituted.

図16は、予測部101の動作を概略的に示している。図16に示されるように、まず、時間方向参照動きブロックを含む参照フレーム(動き参照フレーム)を取得する(ステップS1501)。動き参照フレームは、典型的には、符号化対象フレームと時間的距離が最も小さい参照フレームであって、時間的に過去の参照フレームである。例えば、動き参照フレームは、符号化対象フレームの直前に符号化されたフレームである。他の例では、動き情報メモリ108に動き情報18が保存されているいずれの参照フレームが動き参照フレームとして取得されても構わない。次に、空間方向動き情報取得部110及び時間方向動き情報取得部111は、各々、利用可能ブロック取得部109から出力された利用可能ブロック情報30を取得する(ステップS1502)。次に、動き情報切替スイッチ112は、例えば数式1に従って、利用可能ブロックの中から1つを選択ブロックとして選択する(ステップS1503)。続いて、動き補償部113は、選択された選択ブロックが有する動き情報を符号化対象ブロックにコピーする(ステップS1504)。このとき、選択ブロックが空間方向参照ブロックである場合には、図17に示されるように、この選択ブロックが有する動き情報18が符号化参照ブロックへコピーされる。また、選択ブロックが時間方向参照ブロックである場合には、この選択ブロックが有する動き情報18の群が位置情報とともに符号化対象ブロックへコピーされる。次に、動き補償部113によってコピーされた動き情報18又は動き情報18の群を用いて、動き補償を実行し、予測画像信号11及び動き補償予測に用いた動き情報18を出力する。 FIG. 16 schematically shows the operation of the prediction unit 101. As shown in FIG. 16, first, a reference frame (motion reference frame) including a temporal reference motion block is obtained (step S1501). The motion reference frame is typically a reference frame having the smallest temporal distance from the encoding target frame, and is a reference frame in the temporal past. For example, the motion reference frame is a frame encoded immediately before the frame to be encoded. In other examples, any reference frame whose motion information 18 is stored in the motion information memory 108 may be acquired as the motion reference frame. Next, the spatial direction motion information acquisition unit 110 and the temporal direction motion information acquisition unit 111 each acquire the available block information 30 output from the available block acquisition unit 109 (step S1502). Next, the motion information changeover switch 112 selects one of the available blocks as a selection block, for example, according to Equation 1 (step S1503). Subsequently, the motion compensation unit 113 copies the motion information of the selected block to the encoding target block (step S1504). At this time, if the selected block is a spatial reference block, as shown in FIG. 17, the motion information 18 of this selected block is copied to the encoded reference block. Further, when the selected block is a temporal reference block, the group of motion information 18 included in this selected block is copied to the encoding target block together with the position information. Next, motion compensation is performed using the motion information 18 or a group of motion information 18 copied by the motion compensation unit 113, and the predicted image signal 11 and the motion information 18 used for motion compensation prediction are output.

図18は、可変長符号化部104のより詳細な構成を示している。可変長符号化部104は、図18に示されるように、パラメータ符号化部114、変換係数符号化部115、選択ブロック符号化部116及び多重化部117を備えている。パラメータ符号化部114は、変換係数情報13及び選択ブロック情報31を除く、予測モード情報、ブロックサイズ情報、量子化パラメータ情報などの復号に必要になるパラメータを符号化し、符号化データ14Aを生成する。変換係数符号化部115は、変換係数情報13を符号化して、符号化データ14Bを生成する。また、選択ブロック符号化部116は、利用可能ブロック情報30を参照して、選択ブロック情報31を符号化し、符号化データ14Cを生成する。 FIG. 18 shows a more detailed configuration of variable length encoding section 104. The variable length encoding section 104 includes a parameter encoding section 114, a transform coefficient encoding section 115, a selected block encoding section 116, and a multiplexing section 117, as shown in FIG. The parameter encoding unit 114 encodes parameters necessary for decoding, such as prediction mode information, block size information, and quantization parameter information, excluding the transform coefficient information 13 and selected block information 31, and generates encoded data 14A. . The transform coefficient encoding unit 115 encodes the transform coefficient information 13 to generate encoded data 14B. Furthermore, the selected block encoding unit 116 refers to the available block information 30, encodes the selected block information 31, and generates encoded data 14C.

利用可能ブロック情報30が、図19に示すように、インデクスとインデクスに対応する動き参照ブロックの利用可能性とを含む場合、予め設定された複数の動き参照ブロックのうち、利用不可能である動き参照ブロックを除外して、利用可能である動き参照ブロックのみをシンタクス(stds_idx)に変換する。図19では、9つの動き参照ブロックのうちの5つの動き参照ブロックが利用不可能であるので、これらを除外した4つの動き参照ブロックに対して、シンタクスstds_idxが0から順番に割り当てられる。この例では、符号化すべき選択ブロック情報は、9つから選択するのではなく、4つの利用可能ブロックから選択することになるので、割り当てる符号量(bin数)は、平均的に少なく済む。 When the available block information 30 includes an index and the availability of a motion reference block corresponding to the index, as shown in FIG. Exclude reference blocks and convert only available motion reference blocks to syntax (stds_idx). In FIG. 19, five of the nine motion reference blocks are unavailable, so the syntax stds_idx is sequentially assigned from 0 to the four motion reference blocks excluding these blocks. In this example, the selected block information to be encoded is not selected from nine blocks but from four available blocks, so the amount of code (number of bins) to be allocated is small on average.

図20は、シンタクスstds_idx及びシンタクスstds_idxの2値情報(bin)を示す符号表の一例を示す。図18に示されるように、利用可能な動き参照ブロックの数が少なければ少ないほど、シンタクスstds_idxの符号化に必要な平均のbin数は、低減される。例えば、利用可能ブロックの数が4である場合、シンタクスstds_idxは、3ビット以下で表わすことができる。シンタクスstds_idxの2値情報(bin)は、利用可能ブロック数毎に全てのstds_idxが同じbin数となるよう2値化されてもよく、事前学習によって定められた2値化方法に従って2値化されても構わない。また、複数の2値化方法が用意され、符号化対象ブロック毎に適用的に切り替えられても構わない。 FIG. 20 shows an example of a code table showing syntax stds_idx and binary information (bin) of syntax stds_idx. As shown in FIG. 18, the fewer the number of available motion reference blocks, the lower the average number of bins required for encoding the syntax stds_idx. For example, if the number of available blocks is 4, the syntax stds_idx can be represented with 3 bits or less. Binary information (bin) of syntax stds_idx may be binarized so that all stds_idx have the same number of bins for each number of available blocks, and may be binarized according to a binarization method determined by prior learning. I don't mind. Further, a plurality of binarization methods may be prepared and switched appropriately for each block to be encoded.

これらの符号化部114、115、116には、エントロピー符号化(例えば等長符号化、ハフマン符号化若しくは算術符号化など)が適用されることができ、生成された符号化データ14A、14B、14Cは、多重化部117によって多重化されて出力される。 Entropy encoding (for example, equal-length encoding, Huffman encoding, or arithmetic encoding) can be applied to these encoding units 114, 115, and 116, and the generated encoded data 14A, 14B, 14C is multiplexed by the multiplexer 117 and output.

本実施形態では、符号化対象フレームより1フレーム前に符号化されたフレームを参照フレームとして参照する例を想定して説明しているが、選択ブロックが有する参照動き情報19中の動きベクトル及び参照フレーム番号を用いて、動きベクトルをスケーリング(又は、正規化)して、参照動き情報19が符号化対象ブロックへ適用されても構わない。 In this embodiment, an example is described in which a frame encoded one frame before the encoding target frame is referred to as a reference frame. The reference motion information 19 may be applied to the block to be encoded by scaling (or normalizing) the motion vector using the frame number.

このスケーリング処理について、図21を参照して具体的に説明する。図21に示すtcは、符号化対象フレームと動き参照フレームとの時間距離(POC(ディスプレイ順序を示す番号)距離)を示し、下記数式5により算出される。図21に示すtr[i]は、動き参照フレームと選択ブロックが参照するフレームiとの時間距離を示し、下記数式6により算出される。
This scaling process will be specifically explained with reference to FIG. 21. tc shown in FIG. 21 indicates the time distance (POC (number indicating display order) distance) between the encoding target frame and the motion reference frame, and is calculated by the following equation 5. tr[i] shown in FIG. 21 indicates the time distance between the motion reference frame and the frame i referred to by the selected block, and is calculated by the following equation 6.

ここで、curPOCは符号化対象フレームのPOC(Picture Order Count)を示し、colPOCは動き参照フレームのPOCを示し、refPOCは選択ブロックが参照するフレームiのPOCを示している。また、Clip(min,max,target)はtargetがminより小さい値になる場合にはminを出力し、maxより大きい値になる場合にはmaxを出力し、それ以外の場合にはtargetを出力するクリップ関数である。また、DiffPicOrderCnt(x,y)は2つのPOCの差分を計算する関数である。 Here, curPOC indicates the POC (Picture Order Count) of the encoding target frame, colPOC indicates the POC of the motion reference frame, and refPOC indicates the POC of the frame i referenced by the selected block. Also, Clip (min, max, target) outputs min if target is smaller than min, max if it is larger than max, and outputs target otherwise. This is the clip function that does this. Furthermore, DiffPicOrderCnt(x,y) is a function that calculates the difference between two POCs.

選択ブロックの動きベクトルをMVr=(MVr_x,MVr_y)とし、符号化対象ブロックへ適用する動きベクトルをMV=(MV_x,MV_y)とすると、下記数式7により動きベクトルMVが算出される。
Assuming that the motion vector of the selected block is MVr=(MVr_x, MVr_y) and the motion vector applied to the block to be encoded is MV=(MV_x, MV_y), the motion vector MV is calculated using Equation 7 below.

ここで、Abs(x)はxの絶対値を取り出す関数を示す。このようにして、動きベクトルのスケーリングでは、選択ブロックに割り当てられている動きベクトルMVrが符号化対象フレームと動き第1参照フレームとの間の動きベクトルMVに変換される。 Here, Abs(x) indicates a function that extracts the absolute value of x. In this way, in motion vector scaling, the motion vector MVr assigned to the selected block is converted into a motion vector MV between the encoding target frame and the first motion reference frame.

また、動きベクトルのスケーリングに関する他の例を以下に説明する。
まず、スライス又はフレーム毎に、下記数式8に従って、動き参照フレームが取りうる全ての時間距離trに関してスケーリング係数(DistScaleFactor[i])を求める。スケーリング係数の数は、選択ブロックが参照するフレームの数、即ち、参照フレームの数と等しい。
Further, other examples regarding scaling of motion vectors will be described below.
First, for each slice or frame, a scaling factor (DistScaleFactor[i]) is determined for all possible temporal distances tr of the motion reference frame according to Equation 8 below. The number of scaling factors is equal to the number of frames referenced by the selected block, ie, the number of reference frames.

数式8に示すtxの計算については、予めテーブル化しておいても構わない。 The calculation of tx shown in Equation 8 may be made into a table in advance.

符号化対象ブロック毎のスケーリングの際には、下記数式9を用いることにより、乗算、加算、シフト演算のみで動きベクトルMVを計算することができる。
When scaling each block to be encoded, by using Equation 9 below, the motion vector MV can be calculated using only multiplication, addition, and shift operations.

このようなスケーリング処理を施した場合、予測部101とともに利用可能ブロック取得部109の処理に、スケーリング後の動き情報18を適用する。スケーリング処理を施した場合、符号化対象ブロックが参照する参照フレームは、動き参照フレームとなる。 When such scaling processing is performed, the motion information 18 after scaling is applied to the processing of the available block acquisition unit 109 together with the prediction unit 101 . When scaling processing is performed, the reference frame referenced by the encoding target block becomes a motion reference frame.

図22は、画像符号化部100におけるシンタクス構造を示している。図22に示されるように、シンタクスは、主に3つのパート、即ち、ハイレベルシンタクス901、スライスレベルシンタクス904及びマクロブロックレベルシンタクス907を含む。ハイレベルシンタクス901は、スライス以上の上位レイヤのシンタクス情報を保持している。スライスレベルシンタクス904は、スライス毎に必要な情報を保持し、マクロブロックレベルシンタクス907は、図7Aから図7Dに示されるマクロブロック毎に必要とされるデータを保持している。 FIG. 22 shows the syntax structure in the image encoding section 100. As shown in FIG. 22, the syntax mainly includes three parts: high-level syntax 901, slice-level syntax 904, and macroblock-level syntax 907. The high-level syntax 901 holds syntax information of layers higher than slices. The slice level syntax 904 holds information necessary for each slice, and the macroblock level syntax 907 holds data required for each macroblock shown in FIGS. 7A to 7D.

各パートは、さらに詳細なシンタクスを含む。ハイレベルシンタクス901は、シーケンスパラメータセットシンタクス902及びピクチャパラメータセットシンタクス903などのシーケンス及びピクチャレベルのシンタクスを含む。スライスレベルシンタクス904は、スライスヘッダーシンタクス905及びスライスデータシンタクス906などを含む。さらに、マクロブロックレベルシンタクス907は、マクロブロックレイヤーシンタクス908及びマクロブロックプレディクションシンタクス909などを含む。 Each part includes further detailed syntax. High-level syntax 901 includes sequence and picture level syntax such as sequence parameter set syntax 902 and picture parameter set syntax 903. Slice level syntax 904 includes slice header syntax 905, slice data syntax 906, and the like. Furthermore, macroblock level syntax 907 includes macroblock layer syntax 908, macroblock prediction syntax 909, and the like.

図23A及び図23Bは、マクロブロックレイヤーシンタクスの例を示している。図23A及び図23Bに示すavailable_block_numは、利用可能ブロックの数を示しており、これが1より大きい値の場合は、選択ブロック情報の符号化が必要となる。さらに、stds_idxは、選択ブロック情報を示しており、前述した利用可能ブロック数に応じた符号表を用いてstds_idxを符号化する。 23A and 23B show examples of macroblock layer syntax. available_block_num shown in FIGS. 23A and 23B indicates the number of available blocks, and if this is a value greater than 1, encoding of selected block information is required. Furthermore, stds_idx indicates selected block information, and stds_idx is encoded using the code table according to the number of available blocks described above.

図23Aは、mb_typeの後に選択ブロック情報を符号化する場合のシンタクスを示している。mb_typeが示すモードが定められたサイズや定められたモード(TARGET_MODE)の場合で、かつavailable_block_numが1より大きい値の場合に、stds_idxを符号化する。例えば、選択ブロックの動き情報が利用可能となるのが、ブロックサイズが64×64画素、32×32画素、16×16画素の場合や、ダイレクトモードの場合にstds_idxを符号化する。 FIG. 23A shows the syntax when the selected block information is encoded after mb_type. If the mode indicated by mb_type is a defined size or mode (TARGET_MODE), and available_block_num is a value greater than 1, stds_idx is encoded. For example, stds_idx is encoded when the motion information of the selected block becomes available when the block size is 64 x 64 pixels, 32 x 32 pixels, or 16 x 16 pixels, or when the direct mode is used.

図23Bは、mb_typeの前に選択ブロック情報を符号化する場合のシンタクスを示している。available_block_numが1より大きい値の場合に、stds_idxを符号化する。また、available_block_num が0ならば、H.264に代表される従来の動き補償を行うのでmb_typeを符号化する。 FIG. 23B shows the syntax when the selected block information is encoded before mb_type. If available_block_num is greater than 1, encode stds_idx. Also, if available_block_num is 0, H. Since conventional motion compensation such as H.264 is performed, mb_type is encoded.

なお、図23A及び図23Bに示す表の行間には、本発明で規定していないシンタクス要素が挿入されることも可能であるし、それ以外の条件分岐に関する記述が含まれていても構わない。或いは、シンタクステーブルを複数のテーブルに分割、統合することも可能である。また、必ずしも同一の用語を用いる必要は無く、利用する形態によって任意に変更しても構わない。更に、当該マクロブロックレイヤーシンタクスに記述されている各々のシンタクスエレメントは、後述するマクロブロックデータシンタクスに明記されるように変更しても構わない。 Note that syntax elements not specified in the present invention may be inserted between the rows of the tables shown in FIGS. 23A and 23B, and descriptions regarding other conditional branches may also be included. . Alternatively, it is also possible to divide and integrate the syntax table into multiple tables. Furthermore, it is not necessary to use the same terms, and they may be arbitrarily changed depending on the form of use. Furthermore, each syntax element described in the macroblock layer syntax may be changed as specified in the macroblock data syntax described later.

また、stds_idxの情報を利用することでmb_typeの情報を削減することが可能である。図24Aは、H.264におけるBスライス時のmb_type及びmb_typeに対応する符号表である。図24Aに示されるNは、16,32,64などの、符号化対象ブロックのサイズを表す値であり、MはNの半分の値である。従って、mb_typeが4~21である場合、符号化対象ブロックは長方形ブロックであることを示している。また、図24AのL0,L1,Biは、夫々単方向予測(List0方向のみ)、単方向予測(List1方向のみ)、双方向予測を示している。符号化対象ブロックが長方形ブロックである場合、mb_typeは、符号化対象ブロック内の2つの長方形ブロックの各々に対して、L0,L1,Biのいずれの予測が行われたかを示す情報を含む。また、B_Subは、マクロブロックを4分割した画素ブロックの各々に対して上記処理を行うことを意味する。例えば、符号化対象ブロックが64×64画素マクロブロックである場合、符号化対象ブロックは、このマクロブロックを4分割して得られる4つの32×32画素ブロック毎に、mb_typeをさらに割り当てられて符号化される。 Furthermore, by using the stds_idx information, it is possible to reduce the mb_type information. FIG. 24A shows H. This is a code table corresponding to mb_type and mb_type at the time of B slice in H.264. N shown in FIG. 24A is a value representing the size of the block to be encoded, such as 16, 32, or 64, and M is a half value of N. Therefore, when mb_type is 4 to 21, it indicates that the block to be encoded is a rectangular block. Further, L0, L1, and Bi in FIG. 24A indicate unidirectional prediction (only in the List0 direction), unidirectional prediction (only in the List1 direction), and bidirectional prediction, respectively. When the block to be encoded is a rectangular block, mb_type includes information indicating which of L0, L1, and Bi prediction has been performed for each of the two rectangular blocks in the block to be encoded. Further, B_Sub means that the above processing is performed on each of the pixel blocks obtained by dividing the macroblock into four. For example, if the block to be encoded is a 64x64 pixel macroblock, the block to be encoded is divided into four 32x32 pixel blocks, each of which is further assigned an mb_type and coded. be converted into

ここで、stds_idxが示す選択ブロックがSpatial Left(符号化対象ブロックの左側に隣接する画素ブロック)である場合には、符号化対象ブロックの左側に隣接する画素ブロックの動き情報を符号化対象ブロックの動き情報とするので、stds_idxは、図24Aのmb_type=4,6,8,10,12,14,16,18,20が示す横長の長方形ブロックを使用して、符号化対象ブロックに対して予測を実行することと等しい意味を持つ。また、stds_idxが示す選択ブロックがSpatial Upの場合には、符号化対象ブロックの上側に隣接する動き情報を符号化対象ブロックの動き情報とするので、stds_idxは、図24Aのmb_type=5,7,9,11,13,15,17,19,21が示す縦長の長方形ブロックで予測を実行することと等しい意味を持つ。従って、stds_idxを利用することにより、図24Bに示すような図24Aのmb_type=4~21の欄を削減した符号表を作成することが可能である。同様に、図24Cに示すH.264におけるPスライス時のmb_type及びmb_typeに対応する符号表に関しても、図24Dに示すようなmb_typeの数を削減した符号表を作成することが可能である。 Here, if the selected block indicated by stds_idx is Spatial Left (pixel block adjacent to the left side of the block to be encoded), the motion information of the pixel block adjacent to the left side of the block to be encoded is Since it is motion information, stds_idx is predicted for the block to be encoded using the horizontally long rectangular blocks indicated by mb_type=4,6,8,10,12,14,16,18,20 in Figure 24A. It has the same meaning as executing. Furthermore, when the selected block indicated by stds_idx is Spatial Up, the motion information adjacent to the upper side of the block to be encoded is used as the motion information of the block to be encoded, so stds_idx is set to mb_type=5,7, This has the same meaning as performing prediction on the vertically long rectangular blocks indicated by 9, 11, 13, 15, 17, 19, and 21. Therefore, by using stds_idx, it is possible to create a code table such as shown in FIG. 24B in which the columns of mb_type=4 to 21 in FIG. 24A are removed. Similarly, H. Regarding the code table corresponding to mb_type and mb_type at the time of P slice in H.264, it is possible to create a code table with a reduced number of mb_types as shown in FIG. 24D.

また、stds_idxの情報をmb_typeの情報に含めて符号化しても構わない。図25Aは、stds_idxの情報をmb_typeの情報に含めた場合の符号表であって、Bスライスにおけるmb_type及びmb_typeに対応する符号表の一例を示している。図25AのB_STDS_X(X=0,1,2)は、stds_idxに相当するモードを示し、利用可能ブロック数の分だけB_STDS_Xが追加される(図25Aでは、利用可能ブロック数は3である)。同様にPスライスに関するmb_typeの他の例を図25Bに示す。図25Bの説明は、Bスライスと同様であるために省略する。 Furthermore, stds_idx information may be included in mb_type information and encoded. FIG. 25A is a code table when stds_idx information is included in mb_type information, and shows an example of a code table corresponding to mb_type and mb_type in a B slice. B_STDS_X (X=0, 1, 2) in FIG. 25A indicates a mode corresponding to stds_idx, and B_STDS_X is added by the number of available blocks (in FIG. 25A, the number of available blocks is 3). Similarly, another example of mb_type regarding P slice is shown in FIG. 25B. The description of FIG. 25B is omitted because it is the same as the B slice.

mb_typeの順序及び2値化方法(bin化)は、図25A及び図25Bに示す例に限られず、他の順序及び2値化方法に従ってmb_typeが符号化されても構わない。B_STDS_X及びP_STDS_Xは、連続している必要はなく、各mb_typeの間に配置されていても構わない。また、2値化方法(bin化)は、予め学習された選択頻度に基づいて設計しても構わない。 The order and binarization method (binization) of mb_type are not limited to the examples shown in FIGS. 25A and 25B, and mb_type may be encoded according to other orders and binarization methods. B_STDS_X and P_STDS_X do not need to be consecutive, and may be placed between each mb_type. Further, the binarization method (binization) may be designed based on the selection frequency learned in advance.

本実施形態では、マクロブロックを複数個まとめて動き補償予測を行う拡張マクロブロックにおいても、本発明は適応可能である。また、本実施形態では、符号化のスキャン順についてはどのような順序でも構わない。例えば、ラインスキャン又はZスキャンなどに対しても、本発明は適応可能である。 In this embodiment, the present invention is also applicable to extended macroblocks in which motion compensation prediction is performed on a plurality of macroblocks. Furthermore, in this embodiment, the encoding scan order may be in any order. For example, the present invention is also applicable to line scan or Z scan.

以上のように、本実施形態に係る画像符号化装置は、複数の動き参照ブロックから利用可能ブロックを選択し、選択した利用可能ブロックの数に応じて、符号化対象ブロックに適用する動き参照ブロックを特定するための情報を生成し、この情報を符号化している。従って、本実施形態に係る画像符号化装置によれば、動きベクトル情報に関する符号量を削減しながらも、符号化対象ブロックよりも細かな小画素ブロック単位で動き補償を行えるため、高い符号化効率を実現することができる。 As described above, the image encoding device according to the present embodiment selects an available block from a plurality of motion reference blocks, and applies a motion reference block to the encoding target block according to the number of selected available blocks. The system generates information to identify the object and encodes this information. Therefore, according to the image encoding device according to the present embodiment, motion compensation can be performed in units of small pixel blocks, which are smaller than the target block to be encoded, while reducing the amount of code related to motion vector information, resulting in high encoding efficiency. can be realized.

(第2の実施形態)
図26は、本発明の第2の実施形態に係る画像符号化装置を示している。第2の実施形態では、第1の実施形態と異なる部分及び動作について主に説明する。本実施形態に係る画像符号化部200は、図26に示されるように、第1の実施形態とは予測部201及び可変長符号化部204の構成が異なる。予測部201は、図27に示すように、第1予測部101及び第2予測部202を備え、これら第1及び第2予測部101、202を選択的に切り替えて予測画像信号11を生成する。第1予測部101は、第1の実施形態に係る予測部101(図1)と同じ構成を有し、選択ブロックが有する動き情報18を用いて動き補償する予測方式(第1予測方式)に従って、予測画像信号11を生成する。第2予測部202は、符号化対象ブロックに対して、1つの動きベクトルを用いて動き補償する、H.264のような予測方式(第2予測方式)に従って、予測画像信号11を生成する。第2予測部202は、入力画像信号10及びフレームメモリからの参照画像信号17を使用して、予測画像信号11Bを生成する。
(Second embodiment)
FIG. 26 shows an image encoding device according to a second embodiment of the present invention. In the second embodiment, parts and operations that are different from the first embodiment will be mainly described. As shown in FIG. 26, the image encoding unit 200 according to this embodiment differs from the first embodiment in the configurations of a prediction unit 201 and a variable length encoding unit 204. As shown in FIG. 27, the prediction unit 201 includes a first prediction unit 101 and a second prediction unit 202, and generates the predicted image signal 11 by selectively switching between the first and second prediction units 101 and 202. . The first prediction unit 101 has the same configuration as the prediction unit 101 (FIG. 1) according to the first embodiment, and follows a prediction method (first prediction method) that performs motion compensation using motion information 18 of the selected block. , generates a predicted image signal 11. The second prediction unit 202 performs motion compensation on the block to be encoded using one motion vector. The predicted image signal 11 is generated according to a prediction method such as H.264 (second prediction method). The second prediction unit 202 generates a predicted image signal 11B using the input image signal 10 and the reference image signal 17 from the frame memory.

図28は、第2予測部202の構成を概略的に示している。第2予測部202は、図28に示されるように、入力画像信号10及び参照画像信号17を使用して動き情報21を生成する動き情報取得部205、並びに、参照画像信号17及び動き情報21を使用して予測画像信号11Aを生成する動き補償部113(図1)を備えている。この動き情報取得部205は、入力画像信号10及び参照画像信号17に基づいて、例えばブロックマッチングによって、符号化対象ブロックに割り当てるべき動きベクトルを求める。マッチングの評価基準としては、入力画像信号10とマッチング後の補間画像との差分を画素毎に累積した値を用いる。 FIG. 28 schematically shows the configuration of the second prediction unit 202. As shown in FIG. 28, the second prediction unit 202 includes a motion information acquisition unit 205 that generates motion information 21 using the input image signal 10 and the reference image signal 17, and a motion information acquisition unit 205 that generates the motion information 21 using the input image signal 10 and the reference image signal 17; The motion compensation unit 113 (FIG. 1) generates the predicted image signal 11A using the motion compensation unit 113 (FIG. 1). The motion information acquisition unit 205 obtains a motion vector to be assigned to a block to be encoded based on the input image signal 10 and the reference image signal 17, for example, by block matching. As a matching evaluation criterion, a value obtained by accumulating the differences between the input image signal 10 and the interpolated image after matching for each pixel is used.

なお、動き情報取得部205は、予測画像信号11と入力画像信号10との差分を変換した値を使用して、最適な動きベクトルを決定しても構わない。また、動きベクトルの大きさ、並びに、動きベクトル及び参照フレーム番号の符号量を考慮して、或いは、数式1を使用して最適な動きベクトルが決定されても構わない。マッチング方法は、画像符号化装置の外部から提供される探索範囲情報に基づいて実行されてもよく、画素精度毎に階層的に実行されても構わない。また、探索処理を行わず、符号化制御部150によって与えられた動き情報を動き情報取得部205の出力21としても構わない。 Note that the motion information acquisition unit 205 may determine the optimal motion vector using a value obtained by converting the difference between the predicted image signal 11 and the input image signal 10. Further, the optimal motion vector may be determined by taking into consideration the size of the motion vector and the amount of code of the motion vector and the reference frame number, or by using Equation 1. The matching method may be executed based on search range information provided from outside the image encoding device, or may be executed hierarchically for each pixel precision. Alternatively, the motion information provided by the encoding control section 150 may be used as the output 21 of the motion information acquisition section 205 without performing the search process.

図27の予測部101は、第1予測部101からの予測画像信号11A及び第2予測部202からの予測画像信号11Bのいずれか一方を選択して出力する予測方法切替スイッチ203をさらに備えている。例えば、予測方法切替スイッチ203は、予測画像信号11A及び11B毎に、入力画像信号10を使用して、例えば数式1に従って、符号化コストを求め、符号化コストがより小さくなるように、予測画像信号11A及び11Bのいずれか一方を選択して予測画像信号11として出力する。さらに、予測方法切替スイッチ203は、動き情報18及び選択ブロック情報31とともに、出力した予測画像信号11が第1予測部101及び第2予測部202のいずれかから出力されたものかを示す予測切替情報32も出力する。出力された動き情報18は、可変長符号化部204によって符号化された後、符号化データ14に多重化される。 The prediction unit 101 in FIG. 27 further includes a prediction method changeover switch 203 that selects and outputs either the predicted image signal 11A from the first prediction unit 101 or the predicted image signal 11B from the second prediction unit 202. There is. For example, the prediction method changeover switch 203 uses the input image signal 10 for each of the predicted image signals 11A and 11B to determine the encoding cost according to Equation 1, and selects the predicted image so that the encoding cost is smaller. Either one of the signals 11A and 11B is selected and output as the predicted image signal 11. Further, the prediction method changeover switch 203 is a prediction switch that indicates whether the outputted predicted image signal 11 is output from either the first prediction unit 101 or the second prediction unit 202 together with the motion information 18 and the selected block information 31. Information 32 is also output. The output motion information 18 is encoded by the variable length encoding section 204 and then multiplexed into the encoded data 14.

図29は、可変長符号化部204の構成を概略的に示している。図29に示した可変長符号化部204は、図18に示した可変長符号化部104の構成に加えて、動き情報符号化部217を備えている。また、図29の選択ブロック符号化部216は、図18の選択ブロック符号化部116と異なり、予測切替情報32を符号化して、符号化データ14Dを生成する。予測処理を第1予測部101が実行した場合には、選択ブロック符号化部216は、利用可能ブロック情報30及び選択ブロック情報31をさらに符号化する。符号化された利用可能ブロック情報30及び選択ブロック情報31は、符号化データ14Dに含まれる。予測処理を第2予測部202が実行した場合には、動き情報符号化部217が動き情報18を符号化し、符号化データ14Eを生成する。選択ブロック符号化部216及び動き情報符号化部217は、各々、予測画像が選択ブロックの動き情報を用いた動き補償予測により生成されたかどうかを示す予測切替情報32に基づいて、予測処理を第1予測部101及び第2予測部202のどちらが実行されたかを判定する。 FIG. 29 schematically shows the configuration of variable length encoding section 204. The variable length encoding section 204 shown in FIG. 29 includes a motion information encoding section 217 in addition to the configuration of the variable length encoding section 104 shown in FIG. Further, the selected block encoding unit 216 in FIG. 29, unlike the selected block encoding unit 116 in FIG. 18, encodes the prediction switching information 32 to generate encoded data 14D. When the first prediction unit 101 executes the prediction process, the selected block encoding unit 216 further encodes the available block information 30 and the selected block information 31. The encoded available block information 30 and selected block information 31 are included in the encoded data 14D. When the second prediction unit 202 executes the prediction process, the motion information encoding unit 217 encodes the motion information 18 and generates encoded data 14E. The selected block encoding unit 216 and the motion information encoding unit 217 each perform a prediction process based on prediction switching information 32 indicating whether the predicted image is generated by motion compensated prediction using motion information of the selected block. It is determined which of the first prediction unit 101 and the second prediction unit 202 has been executed.

多重化部117は、パラメータ符号化部114、変換係数符号化部115、選択ブロック符号化部216及び動き情報符号化部から符号化データ14A,B,D,Eを受け取り、受け取った符号化データ14A,B,D,Eを多重化する。 The multiplexing unit 117 receives encoded data 14A, B, D, and E from the parameter encoding unit 114, the transform coefficient encoding unit 115, the selected block encoding unit 216, and the motion information encoding unit, and converts the received encoded data 14A, B, D, and E are multiplexed.

図30A及び図30Bは、各々、本実施形態に係るマクロブロックレイヤーシンタクスの例を示している。図30Aに示されるavailable_block_numは、利用可能ブロックの数を示し、これが1より大きい値の場合、選択ブロック符号化部216は、選択ブロック情報31を符号化する。また、stds_flagは、動き補償予測において選択ブロックの動き情報を符号化対象ブロックの動き情報として使用したか否かを示すフラグ、即ち、予測方法切替スイッチ203が第1予測部101及び第2予測部202のどちらを選択したかを示すフラグである。利用可能ブロックの数が1より大きく、かつ、stds_flagが1である場合、選択ブロックが有する動き情報を動き補償予測に使用したことを示す。また、stds_flagが0の場合、選択ブロックが有する動き情報を利用せずに、H.264と同様に動き情報18の情報を直接もしくは予測した差分値を符号化する。さらに、stds_idxは、選択ブロック情報を示しており、利用可能ブロック数に応じた符号表は、前述したとおりである。 30A and 30B each show an example of macroblock layer syntax according to this embodiment. available_block_num shown in FIG. 30A indicates the number of available blocks, and if this is a value larger than 1, the selected block encoding unit 216 encodes the selected block information 31. In addition, stds_flag is a flag indicating whether or not the motion information of the selected block is used as the motion information of the encoding target block in motion compensation prediction, that is, the prediction method changeover switch 203 is This is a flag indicating which one of 202 has been selected. If the number of available blocks is greater than 1 and stds_flag is 1, this indicates that motion information possessed by the selected block is used for motion compensated prediction. Furthermore, when stds_flag is 0, H. Similar to H.264, the difference value obtained by directly or predicting the information of the motion information 18 is encoded. Furthermore, stds_idx indicates selected block information, and the code table corresponding to the number of available blocks is as described above.

図30Aは、mb_typeの後に選択ブロック情報を符号化する場合のシンタクスを示している。mb_typeが示すモードが定められたサイズや定められたモードの場合にのみ、stds_flag及びstds_idxを符号化する。例えば、選択ブロックの動き情報が利用可能となるのが、ブロックサイズが64×64、32×32、16×16の場合や、ダイレクトモードの場合に、stds_flag及びstds_idxを符号化する。 FIG. 30A shows the syntax when the selected block information is encoded after mb_type. stds_flag and stds_idx are encoded only when the mode indicated by mb_type is a specified size or a specified mode. For example, stds_flag and stds_idx are encoded when the motion information of the selected block becomes available when the block size is 64x64, 32x32, or 16x16, or when the direct mode is used.

図30Bは、mb_typeの前に選択ブロック情報を符号化する場合のシンタクスを示している。例えばstds_flagが1である場合、mb_typeは符号化される必要はない。stds_flagが0である場合、mb_typeは符号化される。 FIG. 30B shows the syntax when the selected block information is encoded before mb_type. For example, if stds_flag is 1, mb_type does not need to be encoded. If stds_flag is 0, mb_type is encoded.

以上のように、第2の実施形態に係る画像符号化装置は、符号化コストが小さくなるように、第1の実施形態に係る第1予測部101と、H.264等の予測方式を利用する第2予測部202とを、選択的に切り替えて、入力画像信号を圧縮符号化している。従って、第2の実施形態に係る画像符号化装置においては、第1の実施形態の画像符号化装置より符号化効率が向上している。 As described above, the image encoding device according to the second embodiment uses the first prediction unit 101 according to the first embodiment and a prediction method such as H.264 so that the encoding cost is reduced. The input image signal is compressed and encoded by selectively switching the second prediction unit 202 to compress and encode the input image signal. Therefore, in the image encoding device according to the second embodiment, the encoding efficiency is improved compared to the image encoding device according to the first embodiment.

(第3の実施形態)
図31は、第3の実施形態に係る画像復号化装置を概略的に示している。この画像復号化装置は、図31に示されるように、画像復号化部300、復号化制御部350及び出力バッファ308を備えている。画像復号化部300は、復号化制御部350により制御される。第3の実施形態に係る画像復号化装置は、第1の実施形態に係る画像符号化装置に対応する。即ち、図31の画像復号化装置による復号処理は、図1の画像符号化処理による符号化処理と相補的な関係を有している。図31の画像復号化装置は、LSIチップなどのハードウェアにより実現されてもよく、或いは、コンピュータに画像復号化プログラムを実行させることにより実現されても構わない。
(Third embodiment)
FIG. 31 schematically shows an image decoding device according to the third embodiment. This image decoding device includes an image decoding section 300, a decoding control section 350, and an output buffer 308, as shown in FIG. Image decoding section 300 is controlled by decoding control section 350. The image decoding device according to the third embodiment corresponds to the image encoding device according to the first embodiment. That is, the decoding process by the image decoding device in FIG. 31 has a complementary relationship with the encoding process by the image encoding process in FIG. 1. The image decoding device shown in FIG. 31 may be realized by hardware such as an LSI chip, or by causing a computer to execute an image decoding program.

図31の画像復号化装置は、符号化列復号化部301、逆量子化・逆変換部302、加算器303、フレームメモリ304、予測部305、動き情報メモリ306及び利用可能ブロック取得部307を備えている。画像復号化部300において、図示しない蓄積系又は伝送系からの符号化データ80は、符号化列復号化部301に入力される。この符号化データ80は、例えば、図1の画像符号化装置から多重化された状態で送出された符号化データ14に対応する。 The image decoding device in FIG. 31 includes a coded sequence decoding section 301, an inverse quantization/inverse transformation section 302, an adder 303, a frame memory 304, a prediction section 305, a motion information memory 306, and an available block acquisition section 307. We are prepared. In the image decoding section 300, encoded data 80 from a storage system or a transmission system (not shown) is input to a coded string decoding section 301. This encoded data 80 corresponds to, for example, the encoded data 14 sent out in a multiplexed state from the image encoding device of FIG. 1.

本実施形態では、復号化対象である画素ブロック(例えば、マクロブロック)を単に復号化対象ブロックと称す。また、復号化対象ブロックを含む画像フレームを復号化対象フレームと称す。 In this embodiment, a pixel block (for example, a macroblock) that is a decoding target is simply referred to as a decoding target block. Further, an image frame including a block to be decoded is referred to as a frame to be decoded.

符号化列復号化部301では、1フレーム又は1フィールド毎に、シンタクスに基づいて、構文解析による解読が行われる。具体的には、符号化列復号化部301は、各シンタクスの符号列を順次、可変長復号化し、変換係数情報33、選択ブロック情報61、並びにブロックサイズ情報及び予測モード情報などの予測情報を含む、復号化対象ブロックに関する符号化パラメータなどを復号する。 The coded string decoding unit 301 performs decoding by syntax analysis for each frame or field based on the syntax. Specifically, the coded string decoding unit 301 sequentially performs variable length decoding on the coded strings of each syntax, and obtains prediction information such as transform coefficient information 33, selected block information 61, block size information, and prediction mode information. The encoding parameters related to the block to be decoded, including the decoding target block, are decoded.

本実施形態において、復号化パラメータは、変換係数33、選択ブロック情報61及び予測情報を含み、変換係数に関する情報、量子化に関する情報などの復号の際に必要になるあらゆるパラメータを含む。予測情報、変換係数に関する情報、及び量子化に関する情報は、制御情報71として復号化制御部350へ入力される。復号化制御部350は、予測情報及び量子化パラメータなどの復号化に必要なパラメータを含む復号化制御情報70を、画像復号化部300の各部に与える。 In this embodiment, the decoding parameters include the transform coefficients 33, selected block information 61, and prediction information, and include all parameters necessary for decoding, such as information regarding transform coefficients and information regarding quantization. The prediction information, information regarding transform coefficients, and information regarding quantization are input to the decoding control unit 350 as control information 71. The decoding control unit 350 provides each unit of the image decoding unit 300 with decoding control information 70 including parameters necessary for decoding such as prediction information and quantization parameters.

さらに、符号化列復号化部301は、後に説明するように、符号化データ80を同時に復号化して、予測情報及び選択ブロック情報61を得る。動きベクトル及び参照フレーム番号を含む動き情報38は、復号化されなくても構わない。 Furthermore, the coded stream decoding unit 301 simultaneously decodes the coded data 80 to obtain prediction information and selected block information 61, as will be described later. The motion information 38 including the motion vector and reference frame number does not need to be decoded.

符号化列復号化部301によって解読された変換係数33は、逆量子化・逆変換部302へ送られる。符号化列復号化部301によって解読された量子化に関する種々の情報、即ち、量子化パラメータ及び量子化マトリクスは、復号化制御部350に与えられ、逆量子化する際に逆量子化・逆変換部302にロードされる。逆量子化・逆変換部302は、ロードされた量子化に関する情報に従って、変換係数33を逆量子化し、続いて逆変換処理(例えば、逆離散コサイン変換など)を施して、予測誤差信号34を得る。図31の逆量子化・逆変換部302による逆変換処理は、図1の変換・量子化部による変換処理の逆変換である。例えば、画像符号化装置(図1)によりウェーブレット変換が施される場合、逆量子化・逆変換部302は、対応する逆量子化及び逆ウェーブレット変換を実行する。 The transform coefficients 33 decoded by the coded string decoding section 301 are sent to the inverse quantization/inverse transform section 302 . Various information related to quantization, that is, quantization parameters and quantization matrices decoded by the encoded sequence decoding unit 301, are given to the decoding control unit 350, and are dequantized and inversely transformed when dequantizing. 302. The inverse quantization/inverse transform unit 302 inversely quantizes the transform coefficients 33 according to the loaded quantization information, and then performs inverse transform processing (for example, inverse discrete cosine transform) to generate a prediction error signal 34. obtain. The inverse transformation process by the inverse quantization/inverse transformation unit 302 in FIG. 31 is the inverse transformation of the transformation process by the transformation/quantization unit in FIG. 1. For example, when a wavelet transform is performed by the image encoding device (FIG. 1), the inverse quantization/inverse transform unit 302 performs the corresponding inverse quantization and inverse wavelet transform.

逆量子化・逆変換部302によって復元された予測誤差信号34は、加算器303へ入力される。加算器303は、予測誤差信号34と、後述する予測部305で生成された予測画像信号35と加算して、復号画像信号36を生成する。生成された復号画像信号36は、画像復号化部300から出力されて、出力バッファ308に一旦蓄積された後、復号化制御部350が管理する出力タイミングに従って、出力される。また、この復号画像信号36は、フレームメモリ304に参照画像信号37として格納される。参照画像信号37は、フレームメモリ304から、フレーム毎或いはフィールド毎に順次読み出され、予測部305へ入力される。 The prediction error signal 34 restored by the inverse quantization/inverse transform section 302 is input to the adder 303. The adder 303 adds the prediction error signal 34 and a predicted image signal 35 generated by a prediction unit 305, which will be described later, to generate a decoded image signal 36. The generated decoded image signal 36 is outputted from the image decoding section 300, temporarily stored in the output buffer 308, and then outputted according to the output timing managed by the decoding control section 350. Further, this decoded image signal 36 is stored in the frame memory 304 as a reference image signal 37. The reference image signal 37 is sequentially read out frame by frame or field by field from the frame memory 304 and input to the prediction unit 305 .

利用可能ブロック取得部307は、後述する動き情報メモリ306から参照動き情報39を受け取り、利用可能ブロック情報60を出力する。利用可能ブロック取得部307の動作は、第1の実施形態で説明した利用可能ブロック取得部109(図1)と同様である。 The available block acquisition unit 307 receives reference motion information 39 from a motion information memory 306, which will be described later, and outputs available block information 60. The operation of the available block acquisition unit 307 is similar to that of the available block acquisition unit 109 (FIG. 1) described in the first embodiment.

動き情報メモリ306は、予測部305から動き情報38を受け取り、参照動き情報39として一時的に格納する。動き情報メモリ306は、予測部305から出力された動き情報38を参照動き情報39として一時保存する。図4は、動き情報メモリ306の一例を示す。動き情報メモリ306は、符号化時間の異なる複数の動き情報フレーム26を保持している。復号化が終了した動き情報38又は動き情報38の群は、参照動き情報39として復号化時間に対応した動き情報フレーム26に保存される。動き情報フレーム26では、参照動き情報39は、例えば4×4画素ブロック単位で保存されている。動き情報メモリ306が保持している参照動き情報39は、予測部305によって、復号化対象ブロックの動き情報38を生成する際に読み出され参照される。 The motion information memory 306 receives the motion information 38 from the prediction unit 305 and temporarily stores it as reference motion information 39. The motion information memory 306 temporarily stores the motion information 38 output from the prediction unit 305 as reference motion information 39. FIG. 4 shows an example of the motion information memory 306. The motion information memory 306 holds a plurality of motion information frames 26 having different encoding times. The motion information 38 or a group of motion information 38 that has been decoded is stored as reference motion information 39 in the motion information frame 26 corresponding to the decoding time. In the motion information frame 26, the reference motion information 39 is stored, for example, in units of 4×4 pixel blocks. The reference motion information 39 held in the motion information memory 306 is read out and referenced by the prediction unit 305 when generating the motion information 38 of the block to be decoded.

次に、本実施形態に係る動き参照ブロック及び利用可能ブロックを説明する。動き参照ブロックは、既に復号化済みの領域の中から前述の画像符号化装置及び画像復号化装置によって予め定められた方法に従って選択される候補ブロックである。図8Aは、利用可能ブロックに関する一例を示している。図8Aでは、復号化対象フレーム内の4つの動き参照ブロック及び参照フレーム内の5つの動き参照ブロックの、合計9つの動き参照ブロックが配置されている。図8Aの復号化対象フレーム内の動き参照ブロックA,B,C,Dは、復号化対象ブロックに対して、左、上、右上、左上に隣接するブロックである。本実施形態では、復号化対象ブロックを含む復号化対象フレームの中から選択された動き参照ブロックを、空間方向動き参照ブロックと称す。また、参照フレーム内の動き参照ブロックTAは、参照フレーム内の、復号化対象ブロックと同じ位置の画素ブロックであり、この動き参照ブロックTAに接している画素ブロックTB,TC,TD,TEが動き参照ブロックとして選択される。参照フレーム内の画素ブロックの中から選択された動き参照ブロックを、時間方向動き参照ブロックと称す。また、時間方向動き参照ブロックが位置するフレームを動き参照フレームと称す。 Next, motion reference blocks and available blocks according to this embodiment will be explained. The motion reference block is a candidate block selected from the already decoded area by the above-described image encoding device and image decoding device according to a predetermined method. FIG. 8A shows an example regarding available blocks. In FIG. 8A, a total of nine motion reference blocks are arranged, including four motion reference blocks in the decoding target frame and five motion reference blocks in the reference frame. Motion reference blocks A, B, C, and D in the frame to be decoded in FIG. 8A are blocks adjacent to the block to be decoded on the left, above, upper right, and upper left. In this embodiment, a motion reference block selected from a frame to be decoded that includes a block to be decoded is referred to as a spatial direction motion reference block. Further, the motion reference block TA in the reference frame is a pixel block in the same position as the decoding target block in the reference frame, and the pixel blocks TB, TC, TD, and TE that are in contact with this motion reference block TA move. Selected as reference block. A motion reference block selected from among the pixel blocks in the reference frame is referred to as a temporal motion reference block. Further, a frame in which a temporal motion reference block is located is referred to as a motion reference frame.

空間方向動き参照ブロックは、図8Aに示される例に限らず、図8B示すように、復号化対象ブロックに隣接する画素a,b,c,dが属する画素ブロックが、空間方向動き参照ブロックとして選択されても構わない。この場合、復号化対象ブロック内の左上画素に対する画素a,b,c,dの相対位置(dx,dy)は、図8Cに示される。 The spatial direction motion reference block is not limited to the example shown in FIG. 8A, but as shown in FIG. 8B, the pixel block to which pixels a, b, c, and d adjacent to the decoding target block belong is used as the spatial direction motion reference block. It doesn't matter if it is selected. In this case, the relative positions (dx, dy) of pixels a, b, c, and d with respect to the upper left pixel in the block to be decoded are shown in FIG. 8C.

また、図8Dに示されるように、復号化対象ブロックに隣接するすべての画素ブロックA1~A4,B1,B2,C,Dが、空間方向動き参照ブロックとして選択されても構わない。図8Dでは、空間方向動き参照ブロックの数は8である。 Furthermore, as shown in FIG. 8D, all pixel blocks A1 to A4, B1, B2, C, and D adjacent to the block to be decoded may be selected as spatial motion reference blocks. In FIG. 8D, the number of spatial motion reference blocks is eight.

また、時間方向動き参照ブロックTA~TEは、図8Eに示すように、互いに部分的に重なり合っていてもよく、図8Fに示すように、各々が互いに離れていても構わない。また、時間方向動き参照ブロックは、必ずしもCollocate位置のブロック及びその周囲に位置する必要はなく、動き参照フレーム内であればいずれの位置の画素ブロックであっても構わない。例えば、復号化対象ブロックに隣接する既に復号化済みのブロックの動き情報を利用して、動き情報に含まれる動きベクトルが指し示す参照ブロックを動き参照ブロックの中心(例えば、ブロックTA)として選択しても構わない。さらに、時間方向の参照ブロックは、等間隔に配置されていなくても構わない。 Furthermore, the temporal motion reference blocks TA to TE may partially overlap each other, as shown in FIG. 8E, or may be separated from each other, as shown in FIG. 8F. Further, the temporal motion reference block does not necessarily have to be located at the block at the collocate position and its surroundings, but may be a pixel block at any position within the motion reference frame. For example, by using motion information of already decoded blocks adjacent to the block to be decoded, a reference block pointed to by a motion vector included in the motion information is selected as the center of the motion reference block (for example, block TA). I don't mind. Furthermore, the reference blocks in the time direction do not have to be arranged at equal intervals.

上述したような動き参照ブロックを選択する方法においては、画像復号化装置及び画像復号化装置の両方で空間方向及び時間方向動き参照ブロックの数及び位置に関する情報を共有していれば、動き参照ブロックがいずれの数及び位置から選択されても構わない。また、動き参照ブロックのサイズは、必ずしも復号化対象ブロックと同じサイズである必要はない。例えば図8Dに示すように、動き参照ブロックのサイズが復号化対象ブロックのサイズよりも大きくてもよく、小さくてもよく、任意のサイズであっても構わない。また、動き参照ブロックの形状は、正方形状に限らず、長方形状であっても構わない。 In the method for selecting motion reference blocks as described above, if both the image decoding device and the image decoding device share information regarding the number and position of motion reference blocks in the spatial and temporal directions, the motion reference blocks can be selected. may be selected from any number and position. Further, the size of the motion reference block does not necessarily have to be the same size as the block to be decoded. For example, as shown in FIG. 8D, the size of the motion reference block may be larger or smaller than the size of the block to be decoded, or may be any size. Further, the shape of the motion reference block is not limited to a square shape, but may be a rectangular shape.

次に、利用可能ブロックについて説明する。利用可能ブロックは、動き参照ブロックの中から選択された画素ブロックであって、復号化対象ブロックへ動き情報を適用可能な画素ブロックである。利用可能ブロックは、互いに異なる動き情報を有している。利用可能ブロックは、例えば図8Aに示されるような復号化対象フレーム及び参照フレーム内の合計9つの動き参照ブロックに対して、図9に示す利用可能ブロック判定処理を実行することによって、選択される。図10は、図9に示す利用可能ブロック判定処理を実行した結果を示している。図10では、斜線を施された画素ブロックが利用不可能ブロックを示し、白塗りのブロックが利用可能ブロックを示す。即ち、空間方向動き参照ブロックの中から2つ、時間方向動き参照ブロックの中から2つの、合計4つが利用可能ブロックとして判定されている。予測部305内の動き情報選択部314は、選択ブロック復号化部323から受け取った選択ブロック情報61に従って、時間及び空間方向に配置されているこれらの利用可能ブロックの中から最適な1つ利用可能ブロックを選択ブロックとして選択する。 Next, available blocks will be explained. The available block is a pixel block selected from among the motion reference blocks, and is a pixel block for which motion information can be applied to the block to be decoded. The available blocks have different motion information. The available blocks are selected, for example, by executing the available block determination process shown in FIG. 9 on a total of nine motion reference blocks in the decoding target frame and reference frame as shown in FIG. 8A. . FIG. 10 shows the result of executing the available block determination process shown in FIG. 9. In FIG. 10, hatched pixel blocks indicate unavailable blocks, and white blocks indicate usable blocks. That is, two out of the spatial motion reference blocks and two out of the temporal motion reference blocks, a total of four blocks, are determined to be available blocks. The motion information selection unit 314 in the prediction unit 305 selects an optimal one available from among these available blocks arranged in the temporal and spatial directions, according to the selected block information 61 received from the selected block decoding unit 323. Select the block as the selected block.

次に、利用可能ブロック取得部307について説明する。利用可能ブロック取得部307は、第1の実施形態の利用可能ブロック取得部109と同一の機能を持ち、参照動き情報39を動き情報メモリ306から取得し、動き参照ブロック毎に利用可能ブロック又は利用不可能ブロックを示す情報である利用可能ブロック情報60を出力する。 Next, the available block acquisition unit 307 will be explained. The available block acquisition unit 307 has the same function as the available block acquisition unit 109 of the first embodiment, and acquires the reference motion information 39 from the motion information memory 306, and acquires the available block or usage information for each motion reference block. Available block information 60, which is information indicating impossible blocks, is output.

利用可能ブロック取得部307の動作を図9のフローチャートを参照して説明する。まず、利用可能ブロック取得部307は、動き参照ブロック(インデクスp)が動き情報を有するか否かを判定する(ステップS801)。即ち、ステップS801では、動き参照ブロックp内の少なくとも1つの小画素ブロックが動き情報を有しているか否かが判定される。動き参照ブロックpが動き情報を有していないと判定された場合、即ち、時間方向動き参照ブロックが動き情報のないIスライス内のブロックあるか、或いは、時間方向動き参照ブロック内の全ての小画素ブロックがイントラ予測復号化されている場合、ステップS805に進む。ステップS805において、この動き参照ブロックpは、利用不可能ブロックと判定される。 The operation of the available block acquisition unit 307 will be explained with reference to the flowchart of FIG. First, the available block acquisition unit 307 determines whether the motion reference block (index p) has motion information (step S801). That is, in step S801, it is determined whether at least one small pixel block within the motion reference block p has motion information. If it is determined that the motion reference block p does not have motion information, that is, the temporal motion reference block is a block in an I slice without motion information, or all the small temporal motion reference blocks in the temporal motion reference block are If the pixel block has been intra-predictively decoded, the process advances to step S805. In step S805, this motion reference block p is determined to be an unavailable block.

ステップS801で動き参照ブロックpが動き情報を有すと判定された場合、利用可能ブロック取得部307は、既に利用可能ブロックと判定されている動き参照ブロックq(利用可能ブロックqと称す)を選定する(ステップS802)。ここで、qはpより小さい値である。続いて、利用可能ブロック取得部307は、全てのqに対して、この動き参照ブロックpの動き情報と、利用可能ブロックqの動き情報とを比較して、動き参照ブロックpが利用可能ブロックqと同一の動き情報を有しているか否かを判定する(S803)。動き参照ブロックpが利用可能ブロックqと同一の動きベクトルを有している場合、ステップS805に進み、ステップS805において、この動き参照ブロックpは、利用可能ブロック取得部307によって、利用不可能ブロックと判定される。動き参照ブロックpが全ての利用可能ブロックqと異なる動き情報を有している場合、ステップS804において、この動き参照ブロックpは、利用可能ブロック取得部307によって、利用可能ブロックと判定される。 If it is determined in step S801 that the motion reference block p has motion information, the available block acquisition unit 307 selects a motion reference block q (referred to as available block q) that has already been determined to be an available block. (Step S802). Here, q is a value smaller than p. Next, the available block acquisition unit 307 compares the motion information of the motion reference block p with the motion information of the available block q for all q, and determines that the motion reference block p is the available block q. It is determined whether it has the same motion information as (S803). If the motion reference block p has the same motion vector as the available block q, the process advances to step S805, and in step S805, the motion reference block p is classified as an unavailable block by the available block acquisition unit 307. It will be judged. If the motion reference block p has different motion information from all available blocks q, in step S804, the motion reference block p is determined to be an available block by the available block acquisition unit 307.

上述した利用可能ブロック判定処理を全ての動き参照ブロックに対して実行することにより、動き参照ブロック毎に利用可能ブロックか利用不可能ブロックかが判定され、利用可能ブロック情報60が生成される。利用可能ブロック情報60の一例が、図11に示されている。利用可能ブロック情報60は、図11に示されるように、動き参照ブロックのインデクスp及び利用可能性を含む。図11では、利用可能ブロック情報60は、インデクスpが0,1,5及び8である動き参照ブロックが利用可能ブロックとして選択されたことを示し、利用可能ブロックの数は4である。 By executing the above-described available block determination process on all motion reference blocks, it is determined whether each motion reference block is an available block or an unusable block, and available block information 60 is generated. An example of the available block information 60 is shown in FIG. The available block information 60 includes the index p and availability of the motion reference block, as shown in FIG. In FIG. 11, the available block information 60 indicates that motion reference blocks with indexes p of 0, 1, 5, and 8 are selected as available blocks, and the number of available blocks is 4.

なお、図9のステップS801において、時間方向動き参照ブロックp内のブロックのうちの少なくとも1つがイントラ予測符号化されたブロックであった場合、利用可能ブロック取得部307は、動き参照ブロックpを利用不可能ブロックと判定しても構わない。即ち、時間方向動き参照ブロックp内の全てのブロックがインター予測で符号化されている場合のみ、ステップS802に進むようにしても構わない。 Note that in step S801 in FIG. 9, if at least one of the blocks in the temporal motion reference block p is an intra-prediction encoded block, the available block acquisition unit 307 uses the motion reference block p. It does not matter if it is determined to be an impossible block. That is, the process may proceed to step S802 only when all blocks in the temporal motion reference block p have been encoded by inter prediction.

図12Aから図12Eは、ステップS803の動き情報38の比較において、動き参照ブロックpの動き情報38と、利用可能ブロックqの動き情報38とが同一であると判定される例を示す。図12Aから図12Eには、各々、斜線が施された複数のブロックと、2つの白塗りのブロックとが示されている。図12Aから図12Eでは、説明を簡単にするために、斜線が施されたブロックを考慮せずに、これらの2つの白塗りのブロックの動き情報38を比較する場合を想定している。2つの白塗りのブロックの一方が、動き参照ブロックpであり、他方が既に利用可能と判定されている動き参照ブロックq(利用可能ブロックq)であるものとする。特に断りのない限り、2つの白色ブロックのいずれが動き参照ブロックpであっても構わない。 12A to 12E show an example in which the motion information 38 of the motion reference block p and the motion information 38 of the available block q are determined to be the same in the comparison of the motion information 38 in step S803. 12A to 12E each show a plurality of blocks shaded with diagonal lines and two blocks painted white. In FIGS. 12A to 12E, in order to simplify the explanation, it is assumed that the motion information 38 of these two white blocks is compared without considering the shaded block. It is assumed that one of the two white blocks is a motion reference block p, and the other is a motion reference block q (available block q) that has already been determined to be available. Unless otherwise specified, it does not matter which of the two white blocks may be the motion reference block p.

図12Aは、動き参照ブロックp及び利用可能ブロックqの両方が空間方向のブロックである例を示している。図12Aの例では、ブロックA及びBの動き情報38が同一であれば、動き情報38が同一であると判定される。このとき、ブロックA及びBのサイズが同一である必要はない。 FIG. 12A shows an example where both the motion reference block p and the available block q are spatial blocks. In the example of FIG. 12A, if the motion information 38 of blocks A and B is the same, it is determined that the motion information 38 is the same. At this time, the sizes of blocks A and B do not need to be the same.

図12Bは、動き参照ブロックp及び利用可能ブロックqの一方が空間方向のブロックAであり、他方が時間方向のブロックTBである例を示している。図12Bでは、時間方向のブロックTB内に動き情報を有するブロックが1つある。時間方向のブロックTBの動き情報38と空間方向のブロックAの動き情報38とが同一であれば、動き情報38が同一であると判定される。このとき、ブロックA及びTBのサイズが同一である必要はない。 FIG. 12B shows an example in which one of the motion reference block p and the available block q is a block A in the spatial direction, and the other is a block TB in the temporal direction. In FIG. 12B, there is one block having motion information in the block TB in the time direction. If the motion information 38 of the block TB in the temporal direction and the motion information 38 of the block A in the spatial direction are the same, it is determined that the motion information 38 is the same. At this time, the sizes of blocks A and TB do not need to be the same.

図12Cは、動き参照ブロックp及び利用可能ブロックqの一方が空間方向のブロックAであり、他方が時間方向のブロックTBである他の例を示している。図12Cは、時間方向のブロックTBが複数の小ブロックに分割されていて、動き情報38を有する小ブロックが複数ある場合を示している。図12Cの例では、動き情報38を有する全てのブロックが同じ動き情報38を有し、その動き情報38が空間方向のブロックAの動き情報38と同一であれば、動き情報38が同一であると判定される。このとき、ブロックA及びTBのサイズが同一である必要はない。 FIG. 12C shows another example in which one of the motion reference block p and the available block q is a block A in the spatial direction, and the other is a block TB in the temporal direction. FIG. 12C shows a case where the block TB in the time direction is divided into a plurality of small blocks, and there are a plurality of small blocks having motion information 38. In the example of FIG. 12C, if all blocks having motion information 38 have the same motion information 38 and the motion information 38 is the same as the motion information 38 of block A in the spatial direction, then the motion information 38 is the same. It is determined that At this time, the sizes of blocks A and TB do not need to be the same.

図12Dは、動き参照ブロックp及び利用可能ブロックqがともに時間方向のブロックである例を示している。この場合、ブロックTB及びTEの動き情報38が同一であれば、動き情報38が同一であると判定される。 FIG. 12D shows an example in which the motion reference block p and the available block q are both blocks in the time direction. In this case, if the motion information 38 of blocks TB and TE is the same, it is determined that the motion information 38 is the same.

図12Eは、動き参照ブロックp及び利用可能ブロックqがともに時間方向のブロックである他の例を示している。図12Eは、時間方向のブロックTB及びTEが各々複数の小ブロックに分割されていて、各々に動き情報38を有する小ブロックが複数ある場合を示している。この場合、ブロック内の小ブロック毎に動き情報38を比較して、全ての小ブロックに対し動き情報38が同一であれば、ブロックTBの動き情報38とブロックTEの動き情報38とが同一であると判定される。 FIG. 12E shows another example in which the motion reference block p and the available block q are both blocks in the time direction. FIG. 12E shows a case where blocks TB and TE in the time direction are each divided into a plurality of small blocks, and there are a plurality of small blocks each having motion information 38. In this case, the motion information 38 is compared for each small block within the block, and if the motion information 38 is the same for all small blocks, the motion information 38 of the block TB and the motion information 38 of the block TE are the same. It is determined that there is.

図12Fは、動き参照ブロックp及び利用可能ブロックqがともに時間方向のブロックであるさらに他の例を示している。図12Fは、時間方向のブロックTEが複数の小ブロックに分割されていて、ブロックTEに動き情報38を有する小ブロックが複数ある場合を示している。ブロックTEの全ての動き情報38が同一の動き情報38であり、且つ、ブロックTDが有する動き情報38と同一である場合、ブロックTDとTEの動き情報38が同一であると判定される。 FIG. 12F shows yet another example in which the motion reference block p and the available block q are both blocks in the time direction. FIG. 12F shows a case where the block TE in the time direction is divided into a plurality of small blocks, and the block TE includes a plurality of small blocks having motion information 38. If all the motion information 38 of the block TE is the same motion information 38 and the same as the motion information 38 of the block TD, it is determined that the motion information 38 of the blocks TD and TE are the same.

このようにして、ステップS803では、動き参照ブロックpの動き情報38と利用可能ブロックqの動き情報38とが同一であるか否かが判定される。図12Aから図12Fの例では、動き参照ブロックpと比較する利用可能ブロックqの数を1として説明したが、利用可能ブロックqの数が2以上の場合においては、動き参照ブロックpの動き情報38と、各々の利用可能ブロックqの動き情報38とを比較しても構わない。また、後述するスケーリングを適用する場合、スケーリング後の動き情報38が上記説明の動き情報38となる。 In this way, in step S803, it is determined whether the motion information 38 of the motion reference block p and the motion information 38 of the available block q are the same. In the examples of FIGS. 12A to 12F, the number of available blocks q to be compared with the motion reference block p is 1. However, in the case where the number of available blocks q is 2 or more, the motion information of the motion reference block p 38 may be compared with the motion information 38 of each available block q. Furthermore, when scaling described later is applied, the motion information 38 after scaling becomes the motion information 38 described above.

なお、動き参照ブロックpの動き情報と利用可能ブロックqの動き情報とが同一であるという判定は、動き情報に含まれる各動きベクトルが完全に一致する場合に限定されることはない。例えば、2つの動きベクトルの差のノルムが所定の範囲内であれば、動き参照ブロックpの動き情報と利用可能ブロックqの動き情報とが実質的に同一であるとみなしても構わない。 Note that the determination that the motion information of the motion reference block p and the motion information of the available block q are the same is not limited to the case where each motion vector included in the motion information completely matches. For example, if the norm of the difference between two motion vectors is within a predetermined range, the motion information of the motion reference block p and the motion information of the available block q may be considered to be substantially the same.

図32は、符号化列復号化部301をより詳細に示すブロック図である。符号化列復号化部301は、図32に示されるように、符号化データ80をシンタクス単位に分離する分離部320、変換係数を復号化する変換係数復号化部322、選択ブロック情報を復号化する選択ブロック復号化部323、並びに、予測ブロックサイズ及び量子化に関するパラメータなどを復号化するパラメータ復号化部321を備えている。 FIG. 32 is a block diagram showing encoded sequence decoding section 301 in more detail. As shown in FIG. 32, the coded stream decoding unit 301 includes a separating unit 320 that separates coded data 80 into syntax units, a transform coefficient decoding unit 322 that decodes transform coefficients, and a decodes selected block information. and a parameter decoding unit 321 that decodes parameters related to predicted block size and quantization.

パラメータ復号化部321は、分離部から、予測ブロックサイズ及び量子化に関するパラメータを含む符号化データ80Aを受け取り、符号化データ80Aを復号化して制御情報71を生成する。変換係数復号化部322は、分離部320から、符号化されている変換係数80Bを受け取り、この符号化されている変換係数80Bを復号化し、変換係数情報33を得る。選択ブロック復号化部323は、選択ブロックに関する符号化データ80C及び利用可能ブロック情報60を入力として、選択ブロック情報61を出力する。入力の利用可能ブロック情報60は、図11に示すように、動き参照ブロック毎の利用可能性を示す。 The parameter decoding unit 321 receives encoded data 80A including parameters regarding the predicted block size and quantization from the separation unit, decodes the encoded data 80A, and generates control information 71. The transform coefficient decoding unit 322 receives the encoded transform coefficient 80B from the separating unit 320, decodes the encoded transform coefficient 80B, and obtains the transform coefficient information 33. The selected block decoding unit 323 receives the encoded data 80C regarding the selected block and the available block information 60, and outputs selected block information 61. The input available block information 60 indicates the availability of each motion reference block, as shown in FIG.

次に、図33を参照して、予測部305を詳細に説明する。
予測部305は、図33に示すように、動き情報選択部314及び動き補償部313を備え、動き情報選択部314は、空間方向動き情報取得部310、時間方向動き情報取得部311及び動き情報切替スイッチ312を備える。予測部305は、基本的には、第1の実施形態で説明した予測部101と同一の構成及び機能を持つ。
Next, the prediction unit 305 will be explained in detail with reference to FIG. 33.
As shown in FIG. 33, the prediction unit 305 includes a motion information selection unit 314 and a motion compensation unit 313, and the motion information selection unit 314 includes a spatial motion information acquisition unit 310, a temporal motion information acquisition unit 311, and a motion information A changeover switch 312 is provided. The prediction unit 305 basically has the same configuration and function as the prediction unit 101 described in the first embodiment.

予測部305は、利用可能ブロック情報60、選択ブロック情報61、参照動き情報39及び参照画像信号37を入力として、予測画像信号35及び動き情報38を出力する。空間方向動き情報取得部310及び時間方向動き情報取得部311は、夫々第1の実施形態で説明した空間方向動き情報取得部110及び時間方向動き情報取得部111と同一の機能を持つ。空間方向動き情報取得部310は、利用可能ブロック情報60及び参照動き情報39を使用して、空間方向に位置する各利用可能ブロックの動き情報及びインデクスを含む動き情報38Aを生成する。時間方向動き情報取得部311は、利用可能ブロック情報60及び参照動き情報39を使用して、時間方向に位置する各利用可能ブロックの動き情報及びインデクスを含む動き情報(又は、動き情報の群)38Bを生成する。 The prediction unit 305 receives the available block information 60, selected block information 61, reference motion information 39, and reference image signal 37 as input, and outputs a predicted image signal 35 and motion information 38. The spatial direction motion information acquisition section 310 and the temporal direction motion information acquisition section 311 have the same functions as the spatial direction motion information acquisition section 110 and the temporal direction motion information acquisition section 111, respectively, described in the first embodiment. The spatial direction motion information acquisition unit 310 uses the available block information 60 and the reference motion information 39 to generate motion information 38A including motion information and an index of each available block located in the spatial direction. The temporal motion information acquisition unit 311 uses the available block information 60 and the reference motion information 39 to obtain motion information (or a group of motion information) including motion information and an index of each available block located in the temporal direction. Generate 38B.

動き情報切替スイッチ312では、選択ブロック情報61に従って、空間方向動き情報取得部310からの動き情報38A及び時間方向動き情報取得部311からの動き情報(又は、動き情報の群)38Bの中から1つを選択し、動き情報38を得る。選択された動き情報38は、動き補償部313及び動き情報メモリ306へ送られる。動き補償部313は、選択された動き情報38に従って、第1の実施形態で説明した動き補償部113と同様に動き補償予測を行い、予測画像信号35を生成する。 The motion information changeover switch 312 selects one of the motion information 38A from the spatial motion information acquisition section 310 and the motion information (or group of motion information) 38B from the temporal motion information acquisition section 311 according to the selection block information 61. Select one to obtain motion information 38. The selected motion information 38 is sent to the motion compensation section 313 and the motion information memory 306. The motion compensation unit 313 performs motion compensation prediction in accordance with the selected motion information 38 in the same manner as the motion compensation unit 113 described in the first embodiment, and generates a predicted image signal 35.

動き補償部313の動きベクトルのスケーリング機能においては、第1の実施形態に説明したものと同様であるので説明を省略する。 The motion vector scaling function of the motion compensation unit 313 is the same as that described in the first embodiment, so the description thereof will be omitted.

図22は、画像復号化部300におけるシンタクス構造を示している。図22に示されるように、シンタクスは、主に3つのパート、即ち、ハイレベルシンタクス901、スライスレベルシンタクス904及びマクロブロックレベルシンタクス907を含む。ハイレベルシンタクス901は、スライス以上の上位レイヤのシンタクス情報を保持している。スライスレベルシンタクス904は、スライス毎に必要な情報を保持し、マクロブロックレベルシンタクス907は、図7Aから図7Dに示されるマクロブロック毎に必要とされるデータを保持している。 FIG. 22 shows the syntax structure in the image decoding section 300. As shown in FIG. 22, the syntax mainly includes three parts: high-level syntax 901, slice-level syntax 904, and macroblock-level syntax 907. The high-level syntax 901 holds syntax information of layers higher than slices. The slice level syntax 904 holds information necessary for each slice, and the macroblock level syntax 907 holds data required for each macroblock shown in FIGS. 7A to 7D.

各パートは、さらに詳細なシンタクスを含む。ハイレベルシンタクス901は、シーケンスパラメータセットシンタクス902及びピクチャパラメータセットシンタクス903などのシーケンス及びピクチャレベルのシンタクスを含む。スライスレベルシンタクス904は、スライスヘッダーシンタクス905及びスライスデータシンタクス906などを含む。さらに、マクロブロックレベルシンタクス907は、マクロブロックレイヤーシンタクス908及びマクロブロックプレディクションシンタクス909などを含む。 Each part includes further detailed syntax. High-level syntax 901 includes sequence and picture level syntax such as sequence parameter set syntax 902 and picture parameter set syntax 903. Slice level syntax 904 includes slice header syntax 905, slice data syntax 906, and the like. Furthermore, macroblock level syntax 907 includes macroblock layer syntax 908, macroblock prediction syntax 909, and the like.

図23A及び図23Bは、マクロブロックレイヤーシンタクスの例を示している。図23A及び図23Bに示すavailable_block_numは、利用可能ブロックの数を示しており、これが1より大きい値の場合は、選択ブロック情報の復号化が必要となる。さらに、stds_idxは、選択ブロック情報を示しており、前述した利用可能ブロック数に応じた符号表を用いてstds_idxを符号化する。 23A and 23B show examples of macroblock layer syntax. available_block_num shown in FIGS. 23A and 23B indicates the number of available blocks, and if this is a value greater than 1, it is necessary to decode the selected block information. Furthermore, stds_idx indicates selected block information, and stds_idx is encoded using the code table according to the number of available blocks described above.

図23Aは、mb_typeの後に選択ブロック情報を復号化する場合のシンタクスを示している。mb_typeが示す予測モードが定められたサイズや定められたモード(TARGET_MODE)の場合で、かつavailable_block_numが1より大きい値の場合に、stds_idxを復号化する。例えば、選択ブロックの動き情報が利用可能となるのが、ブロックサイズが64×64画素、32×32画素、16×16画素の場合や、ダイレクトモードの場合にstds_idxを符号化する。 FIG. 23A shows the syntax when the selected block information is decoded after mb_type. When the prediction mode indicated by mb_type is a defined size or a defined mode (TARGET_MODE), and available_block_num is a value greater than 1, stds_idx is decoded. For example, stds_idx is encoded when the motion information of the selected block becomes available when the block size is 64 x 64 pixels, 32 x 32 pixels, or 16 x 16 pixels, or when the direct mode is used.

図23Bは、mb_typeの前に選択ブロック情報を復号化する場合のシンタクスを示している。available_block_numが1より大きい値の場合に、stds_idxを復号化する。また、available_block_num が0ならば、H.264に代表される従来の動き補償を行うのでmb_typeを符号化する。 FIG. 23B shows the syntax when the selected block information is decoded before mb_type. If available_block_num is greater than 1, decode stds_idx. Also, if available_block_num is 0, H. Since conventional motion compensation such as H.264 is performed, mb_type is encoded.

図23A及び図23Bに示す表の行間には、本発明で規定していないシンタクス要素が挿入されることも可能であるし、それ以外の条件分岐に関する記述が含まれていても構わない。或いは、シンタクステーブルを複数のテーブルに分割、統合することも可能である。また、必ずしも同一の用語を用いる必要は無く、利用する形態によって任意に変更しても構わない。更に、当該マクロブロックレイヤーシンタクスに記述されている各々のシンタクスエレメントは、後述するマクロブロックデータシンタクスに明記されるように変更しても構わない。 Syntax elements not defined by the present invention may be inserted between the rows of the tables shown in FIGS. 23A and 23B, and descriptions regarding other conditional branches may also be included. Alternatively, it is also possible to divide and integrate the syntax table into multiple tables. Furthermore, it is not necessary to use the same terms, and they may be arbitrarily changed depending on the form of use. Furthermore, each syntax element described in the macroblock layer syntax may be changed as specified in the macroblock data syntax described later.

以上のように、本実施形態に係る画像復号化装置は、前述した第1の実施形態に係る画像符号化装置によって符号化された画像を復号化している。従って、本実施形態に係る画像復号化は、比較的小さな符号化データから高画質な復号画像を再生することができる。 As described above, the image decoding device according to this embodiment decodes the image encoded by the image encoding device according to the first embodiment described above. Therefore, the image decoding according to this embodiment can reproduce a high-quality decoded image from relatively small encoded data.

(第4の実施形態)
図34は、第4の実施形態に係る画像復号化装置を概略的に示している。画像復号化装置は、図34に示されるように、画像復号化部400、復号化制御部350及び出力バッファ308を備える。第4の実施形態に係る画像復号化装置は、第2の実施形態に係る画像符号化装置に対応する。第4の実施形態では、第3の実施形態と異なる部分及び動作について主に説明する。本実施形態に係る画像復号化部400は、図34に示されるように、第3の実施形態とは符号化列復号化部401及び予測部405が異なる。
(Fourth embodiment)
FIG. 34 schematically shows an image decoding device according to the fourth embodiment. The image decoding device includes an image decoding section 400, a decoding control section 350, and an output buffer 308, as shown in FIG. The image decoding device according to the fourth embodiment corresponds to the image encoding device according to the second embodiment. In the fourth embodiment, parts and operations that are different from the third embodiment will be mainly described. As shown in FIG. 34, the image decoding unit 400 according to this embodiment differs from the third embodiment in a coded sequence decoding unit 401 and a prediction unit 405.

本実施の形態の予測部405は、選択ブロックが有する動き情報を用いて動き補償する予測方式(第1予測方式)と、H.264のような、復号化対象ブロックに対して1つの動きベクトルを用いて動き補償する予測方式(第2予測方式)と、を選択的に切り替えて、予測画像信号35を生成する。 The prediction unit 405 of this embodiment uses a prediction method (first prediction method) that performs motion compensation using motion information possessed by a selected block, and an H. The predicted image signal 35 is generated by selectively switching between a prediction method (second prediction method) such as H.264 that performs motion compensation using one motion vector for a block to be decoded.

図35は、符号化列復号化部401をより詳細に示すブロック図である。図35に示す符号化列復号化部401は、図32に示す符号化列復号化部301の構成に加えて、動き情報復号化部424を備えている。また、図35に示した選択ブロック復号化部423は、図32に示した選択ブロック復号化部323と異なり、選択ブロックに関する符号化データ80Cを復号化して、予測切替情報62を得る。予測切替情報62は、図1の画像符号化装置内の予測部101が第1及び第2予測方式のどちらを使用したかを示す。予測部101が第1予測方式を使用したことを予測切替情報62が示す場合、即ち、復号化対象ブロックが第1予測方式で符号化されている場合、選択ブロック復号化部423は、符号化データ80C中の選択ブロック情報を復号化して、選択ブロック情報61を得る。予測部101が第2予測方式を使用したことを予測切替情報62が示す場合、即ち、復号化対象ブロックが第2予測方式で符号化されている場合、選択ブロック復号化部423は選択ブロック情報を復号化せずに、動き情報復号化部424が符号化されている動き情報80Dを復号化し、動き情報40を得る。 FIG. 35 is a block diagram showing encoded sequence decoding section 401 in more detail. Coded stream decoding section 401 shown in FIG. 35 includes a motion information decoding section 424 in addition to the configuration of coded stream decoding section 301 shown in FIG. Further, the selected block decoding unit 423 shown in FIG. 35 differs from the selected block decoding unit 323 shown in FIG. 32 in that it decodes the encoded data 80C regarding the selected block to obtain prediction switching information 62. The prediction switching information 62 indicates which of the first and second prediction methods is used by the prediction unit 101 in the image encoding device of FIG. When the prediction switching information 62 indicates that the prediction unit 101 used the first prediction method, that is, when the block to be decoded is encoded using the first prediction method, the selected block decoding unit 423 uses the first prediction method. The selected block information in the data 80C is decoded to obtain the selected block information 61. When the prediction switching information 62 indicates that the prediction unit 101 has used the second prediction method, that is, when the block to be decoded is encoded using the second prediction method, the selected block decoding unit 423 uses the selected block information. The motion information decoding unit 424 decodes the encoded motion information 80D without decoding the encoded motion information 80D to obtain the motion information 40.

図36は、予測部405をより詳細に示すブロック図である。図34に示した予測部405は、第1予測部305、第2予測部410及び予測方法切替スイッチ411を備えている。第2予測部410は、符号化列復号化部401によって復号化された動き情報40及び参照画像信号37を用いて、図33の動き補償部313と同様の動き補償予測を行い、予測画像信号35Bを生成する。第1予測部305は、第3の実施形態で説明した予測部305と同じであり、予測画像信号35Bを生成する。また、予測方法切替スイッチ411は、予測切替情報62に基づいて、第2予測部410からの予測画像信号35B及び第1予測部305からの予測画像信号35Aのうちのいずれか一方を選択して予測部405の予測画像信号35として出力する。同時に、予測方法切替スイッチ411は、選択された第1予測部305若しくは第2予測部410で用いられた動き情報を動き情報38として動き情報メモリ306に送る。 FIG. 36 is a block diagram showing the prediction unit 405 in more detail. The prediction unit 405 shown in FIG. 34 includes a first prediction unit 305, a second prediction unit 410, and a prediction method changeover switch 411. The second prediction unit 410 uses the motion information 40 decoded by the coded sequence decoding unit 401 and the reference image signal 37 to perform motion compensation prediction similar to the motion compensation unit 313 in FIG. Generate 35B. The first prediction unit 305 is the same as the prediction unit 305 described in the third embodiment, and generates a predicted image signal 35B. Further, the prediction method changeover switch 411 selects either one of the predicted image signal 35B from the second prediction unit 410 and the predicted image signal 35A from the first prediction unit 305 based on the prediction switching information 62. The prediction unit 405 outputs the predicted image signal 35. At the same time, the prediction method changeover switch 411 sends the motion information used in the selected first prediction section 305 or second prediction section 410 to the motion information memory 306 as motion information 38.

次に、本実施の形態に関するシンタクス構造について、第3の実施形態と異なる点を主に説明する。 Next, regarding the syntax structure of this embodiment, differences from the third embodiment will be mainly explained.

図30A及び図30Bは、各々、本実施形態に係るマクロブロックレイヤーシンタクスの例を示している。図30Aに示されるavailable_block_numは、利用可能ブロックの数を示し、これが1より大きい値の場合、選択ブロック復号化部423は、符号化データ80C中の選択ブロック情報を復号化する。また、stds_flagは、動き補償予測において選択ブロックの動き情報を復号化対象ブロックの動き情報として使用したか否かを示すフラグ、即ち、予測方法切替スイッチ411が第1予測部305及び第2予測部410のどちらを選択したかを示すフラグである。利用可能ブロックの数が1より大きく、かつ、stds_flagが1である場合、選択ブロックが有する動き情報を動き補償予測に使用したことを示す。また、stds_flagが0の場合、選択ブロックが有する動き情報を利用せずに、H.264と同様に動き情報の情報を直接もしくは予測した差分値を符号化する。さらに、stds_idxは、選択ブロック情報を示しており、利用可能ブロック数に応じた符号表は、前述したとおりである。 30A and 30B each show an example of macroblock layer syntax according to this embodiment. available_block_num shown in FIG. 30A indicates the number of available blocks, and if this is a value greater than 1, the selected block decoding unit 423 decodes the selected block information in the encoded data 80C. In addition, stds_flag is a flag indicating whether or not the motion information of the selected block is used as the motion information of the decoding target block in motion compensation prediction, that is, the prediction method changeover switch 411 is 410 is selected. If the number of available blocks is greater than 1 and stds_flag is 1, this indicates that motion information possessed by the selected block is used for motion compensated prediction. Furthermore, when stds_flag is 0, H. Similar to H.264, the difference value obtained by directly or predicting motion information is encoded. Furthermore, stds_idx indicates selected block information, and the code table corresponding to the number of available blocks is as described above.

図30Aは、mb_typeの後に選択ブロック情報を復号化する場合のシンタクスを示している。mb_typeが示す予測モードが定められたブロックサイズや定められたモードの場合にのみ、stds_flag及びstds_idxを復号化する。例えば、ブロックサイズが64×64、32×32、16×16である場合、或いは、ダイレクトモードの場合、stds_flag及びstds_idxを復号化する。 FIG. 30A shows the syntax when the selected block information is decoded after mb_type. stds_flag and stds_idx are decoded only when the prediction mode indicated by mb_type has a defined block size or a defined mode. For example, if the block size is 64x64, 32x32, or 16x16, or in direct mode, stds_flag and stds_idx are decoded.

図30Bは、mb_typeの前に選択ブロック情報を復号化する場合のシンタクスを示している。例えばstds_flagが1である場合、mb_typeは復号化される必要はない。stds_flag が0である場合、mb_typeは復号化される。 FIG. 30B shows the syntax when the selected block information is decoded before mb_type. For example, if stds_flag is 1, mb_type does not need to be decoded. If stds_flag is 0, mb_type is decoded.

以上のように、本実施形態に係る画像復号化装置は、前述した第2の実施形態に係る画像符号化装置によって符号化された画像を復号化している。従って、本実施形態に係る画像復号化は、比較的小さな符号化データから高画質な復号画像を再生することができる。 As described above, the image decoding device according to the present embodiment decodes the image encoded by the image encoding device according to the second embodiment described above. Therefore, the image decoding according to this embodiment can reproduce a high-quality decoded image from relatively small encoded data.

なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除しても構わない。さらに、異なる実施形態にわたる構成要素を適宜組み合わせても構わない。 It should be noted that the present invention is not limited to the above-described embodiments as they are, but can be implemented by modifying the constituent elements within the scope of the invention at the implementation stage. Moreover, various inventions can be formed by appropriately combining the plurality of components disclosed in the above embodiments. For example, some components may be deleted from all the components shown in the embodiments. Furthermore, components of different embodiments may be combined as appropriate.

この一例として、上述した第1から第4の実施形態を次のように変形しても同様の効果が得られる。 As an example of this, similar effects can be obtained even if the first to fourth embodiments described above are modified as follows.

(1)第1から第4の実施形態では、処理対象フレームを16×16画素ブロックなどの矩形ブロックに分割し、図4に示したような画面左上の画素ブロックから右下の画素ブロックに向かう順序で、符号化又は復号化する場合を例にとって説明しているが、符号化又は復号化順序は、この例に制限されることはない。例えば、符号化又は復号化順序は、画面右下から左上に向かう順序でもよく、右上から左下に向かう順序でも構わない。また、符号化又は復号化順序は、画面の中央部から周辺部に渦巻状に向かう順序であってもよく、画面の周辺部から中心部に向かう順序であっても構わない。 (1) In the first to fourth embodiments, the processing target frame is divided into rectangular blocks such as 16 x 16 pixel blocks, and the processing starts from the upper left pixel block of the screen to the lower right pixel block as shown in FIG. Although the case where encoding or decoding is performed in this order is described as an example, the encoding or decoding order is not limited to this example. For example, the encoding or decoding order may be from the lower right to the upper left of the screen, or from the upper right to the lower left. Further, the encoding or decoding order may be a spiral order from the center of the screen to the periphery, or may be an order from the periphery to the center of the screen.

(2)第1から第4の実施形態では、輝度信号と色差信号とを分割せず、一方の色信号成分に限定した場合を例にとって説明している。しかしながら、輝度信号及び色差信号に対して、異なる予測処理を使用してもよく、或いは、同一の予測処理を使用しても構わない。異なる予測処理を使用する場合、色差信号に対して選択した予測方法を、輝度信号と同様の方法で符号化/復号化する。 (2) In the first to fourth embodiments, the case where the luminance signal and the color difference signal are not divided but limited to one color signal component is explained as an example. However, different prediction processing may be used for the luminance signal and the color difference signal, or the same prediction processing may be used. When using different prediction processes, the prediction method selected for the chrominance signal is encoded/decoded in the same manner as for the luminance signal.

その他、本発明の要旨を逸脱しない範囲で種々の偏見を施しても同様に実施可能であることはいうまでもない。 It goes without saying that the present invention can also be implemented in the same manner by applying various biases without departing from the gist of the present invention.

本発明に係る画像符号化/復号化方法は、符号化効率を向上させることができることから、産業上の利用可能性を有している。 Since the image encoding/decoding method according to the present invention can improve encoding efficiency, it has industrial applicability.

10…入力画像信号、11…予測画像信号、12…予測誤差画像信号、13…量子化変換係数、14…符号化データ、15…復号予測誤差信号、16…局所復号画像信号、17…参照画像信号、18…動き情報、20…ビットストリーム、21…動き情報、25,26…情報フレーム、30…利用可能ブロック情報、31…選択ブロック情報、32…予測切替情報、33…変換係数情報、34…予測誤差信号、35…予測画像信号、36…復号画像信号、37…参照画像信号、38…動き情報、39…参照動き情報、40…動き情報、50…符号化制御情報、51…フィードバック情報、60…利用可能ブロック情報、61…選択ブロック情報、62…予測切替情報、70…復号化制御情報、71…制御情報、80…符号化データ、100…画像符号化部、101…予測部、102…減算器、103…変換・量子化部、104…可変長符号化部、105…逆量子化・逆変換部、106…加算器、107…フレームメモリ、108…情報メモリ、109…利用可能ブロック取得部、110…空間方向動き情報取得部、111…時間方向動き情報取得部、112…情報切替スイッチ、113…動き補償部、114…パラメータ符号化部、115…変換係数符号化部、116…選択ブロック符号化部、117…多重化部、118…動き情報選択部、120…出力バッファ、150…符号化制御部、200…画像符号化部、201…予測部、202…第2予測部、203…予測方法切替スイッチ、204…可変長符号化部、205…動き情報取得部、216…選択ブロック符号化部、217…動き情報符号化部、300…画像復号化部、301…符号化列復号化部、301…符号列復号部、302…逆量子化・逆変換部、303…加算器、304…フレームメモリ、305…予測部、306…情報メモリ、307…利用可能ブロック取得部、308…出力バッファ、310…空間方向動き情報取得部、311…時間方向動き情報取得部、312…動き情報切替スイッチ、313…動き補償部、314…情報選択部、320…分離部、321…パラメータ復号化部、322…変換係数復号化部、323…選択ブロック復号化部、350…復号化制御部、400…画像復号化部、401…符号化列復号化部、405…予測部、410…第2予測部、411…予測方法切替スイッチ、423…選択ブロック復号化部、424…情報復号化部、901…ハイレベルシンタクス、902…シーケンスパラメータセットシンタクス、903…ピクチャパラメータセットシンタクス、904…スライスレベルシンタクス、905…スライスヘッダーシンタクス、906…スライスデータシンタクス、907…マクロブロックレベルシンタクス、908…マクロブロックレイヤーシンタクス、909…マクロブロックプレディクションシンタクス。 10... Input image signal, 11... Predicted image signal, 12... Predicted error image signal, 13... Quantized transform coefficient, 14... Encoded data, 15... Decoded predicted error signal, 16... Locally decoded image signal, 17... Reference image Signal, 18... Motion information, 20... Bit stream, 21... Motion information, 25, 26... Information frame, 30... Available block information, 31... Selected block information, 32... Prediction switching information, 33... Transform coefficient information, 34 ...Prediction error signal, 35...Prediction image signal, 36...Decoded image signal, 37...Reference image signal, 38...Motion information, 39...Reference motion information, 40...Motion information, 50...Encoding control information, 51...Feedback information , 60... Available block information, 61... Selected block information, 62... Prediction switching information, 70... Decoding control information, 71... Control information, 80... Encoded data, 100... Image encoding section, 101... Prediction section, 102...Subtractor, 103...Transformation/quantization section, 104...Variable length encoding section, 105...Dequantization/inverse transformation section, 106...Adder, 107...Frame memory, 108...Information memory, 109...Available Block acquisition unit, 110... Spatial motion information acquisition unit, 111... Temporal motion information acquisition unit, 112... Information changeover switch, 113... Motion compensation unit, 114... Parameter encoding unit, 115... Transform coefficient encoding unit, 116 ...Selected block encoding unit, 117…Multiplexing unit, 118…Motion information selection unit, 120…Output buffer, 150…Encoding control unit, 200…Image encoding unit, 201…Prediction unit, 202…Second prediction unit , 203... Prediction method changeover switch, 204... Variable length encoding section, 205... Motion information acquisition section, 216... Selected block encoding section, 217... Motion information encoding section, 300... Image decoding section, 301... Encoding Sequence decoding unit, 301... Code stream decoding unit, 302... Inverse quantization/inverse transformation unit, 303... Adder, 304... Frame memory, 305... Prediction unit, 306... Information memory, 307... Available block acquisition unit, 308... Output buffer, 310... Spatial direction motion information acquisition section, 311... Temporal direction motion information acquisition section, 312... Motion information changeover switch, 313... Motion compensation section, 314... Information selection section, 320... Separation section, 321... Parameter Decoding unit, 322... Transform coefficient decoding unit, 323... Selected block decoding unit, 350... Decoding control unit, 400... Image decoding unit, 401... Encoded string decoding unit, 405... Prediction unit, 410... Second prediction unit, 411... Prediction method changeover switch, 423... Selected block decoding unit, 424... Information decoding unit, 901... High level syntax, 902... Sequence parameter set syntax, 903... Picture parameter set syntax, 904... Slice Level syntax, 905...Slice header syntax, 906...Slice data syntax, 907...Macroblock level syntax, 908...Macroblock layer syntax, 909...Macroblock prediction syntax.

Claims (1)

符号化データを送信する回路を備え、
前記符号化データは、対象ブロックの予測モードに関するモード情報と、選択ブロックを特定する識別情報と、を含み、
前記識別情報は、前記モード情報が所定の情報を示す場合に、前記対象ブロックに対して予め定められた位置関係にある複数の候補ブロックが利用可能か否かを前記位置関係に応じて予め定められた順番に従って判定することと、前記利用可能と判定された候補ブロックの中から、動き情報が前記対象ブロックの動き情報として使用される1つのブロックを前記選択ブロックとして選択することと、により、生成され、
前記複数の候補ブロックは、前記対象ブロックの左上に隣接するブロック及び前記対象ブロックの上に隣接するブロックを含み、
前記判定することは、前記対象ブロックの上に隣接する前記ブロックの判定よりも後に前記対象ブロックの左上に隣接する前記ブロックの判定を行い、候補ブロックが既に利用可能と判定された候補ブロックに対応する動き情報と一致しない動き情報を有する場合に前記候補ブロックを利用可能と判定することを含む、
送信装置。
Equipped with a circuit for transmitting encoded data,
The encoded data includes mode information regarding the prediction mode of the target block and identification information that specifies the selected block,
When the mode information indicates predetermined information, the identification information determines whether or not a plurality of candidate blocks having a predetermined positional relationship with respect to the target block are available, which is predetermined according to the positional relationship. and selecting one block whose motion information is used as motion information of the target block as the selected block from among the candidate blocks determined to be available. generated,
The plurality of candidate blocks include a block adjacent to the upper left of the target block and a block adjacent to the upper left of the target block,
The determining includes determining the block adjacent to the upper left of the target block after determining the block adjacent to the top of the target block, so that the candidate block corresponds to a candidate block that has already been determined to be available. determining that the candidate block is usable if the candidate block has motion information that does not match motion information that is
Transmitting device.
JP2023204699A 2019-10-21 2023-12-04 Image encoding method and image decoding method Pending JP2024023525A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023204699A JP2024023525A (en) 2019-10-21 2023-12-04 Image encoding method and image decoding method

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP2019191781A JP6795666B2 (en) 2019-10-21 2019-10-21 Image coding method and image decoding method
JP2020186014A JP6980889B2 (en) 2019-10-21 2020-11-06 Image coding method and image decoding method
JP2021185615A JP7242811B2 (en) 2019-10-21 2021-11-15 Image encoding method and image decoding method
JP2023022709A JP7399332B2 (en) 2019-10-21 2023-02-16 Image encoding method and image decoding method
JP2023204699A JP2024023525A (en) 2019-10-21 2023-12-04 Image encoding method and image decoding method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2023022709A Division JP7399332B2 (en) 2019-10-21 2023-02-16 Image encoding method and image decoding method

Publications (1)

Publication Number Publication Date
JP2024023525A true JP2024023525A (en) 2024-02-21

Family

ID=87761056

Family Applications (3)

Application Number Title Priority Date Filing Date
JP2021185615A Active JP7242811B2 (en) 2019-10-21 2021-11-15 Image encoding method and image decoding method
JP2023022709A Active JP7399332B2 (en) 2019-10-21 2023-02-16 Image encoding method and image decoding method
JP2023204699A Pending JP2024023525A (en) 2019-10-21 2023-12-04 Image encoding method and image decoding method

Family Applications Before (2)

Application Number Title Priority Date Filing Date
JP2021185615A Active JP7242811B2 (en) 2019-10-21 2021-11-15 Image encoding method and image decoding method
JP2023022709A Active JP7399332B2 (en) 2019-10-21 2023-02-16 Image encoding method and image decoding method

Country Status (1)

Country Link
JP (3) JP7242811B2 (en)

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004208259A (en) 2002-04-19 2004-07-22 Matsushita Electric Ind Co Ltd Motion vector calculating method
US20040001546A1 (en) 2002-06-03 2004-01-01 Alexandros Tourapis Spatiotemporal prediction for bidirectionally predictive (B) pictures and motion vector prediction for multi-picture reference motion compensation
JP4138391B2 (en) 2002-07-03 2008-08-27 株式会社エヌ・ティ・ティ・ドコモ Variable length code generation device, variable length decoding device, variable length code generation method, and variable length decoding method
KR100774296B1 (en) 2002-07-16 2007-11-08 삼성전자주식회사 Method and apparatus for encoding and decoding motion vectors
JP3977716B2 (en) 2002-09-20 2007-09-19 株式会社東芝 Video encoding / decoding method and apparatus
JP4536325B2 (en) * 2003-02-04 2010-09-01 ソニー株式会社 Image processing apparatus and method, recording medium, and program
JP4788649B2 (en) 2007-04-27 2011-10-05 株式会社日立製作所 Moving image recording method and apparatus
JP4977094B2 (en) 2008-06-25 2012-07-18 株式会社東芝 Image coding method
SI3448031T1 (en) 2009-06-18 2021-03-31 Kabushiki Kaisha Toshiba Video decoding apparatus and video decoding method
JPWO2011034148A1 (en) * 2009-09-18 2013-02-14 シャープ株式会社 Encoding device, decoding device, moving image encoding device, moving image decoding device, and encoded data
KR101522850B1 (en) 2010-01-14 2015-05-26 삼성전자주식회사 Method and apparatus for encoding/decoding motion vector
KR101768207B1 (en) * 2010-01-19 2017-08-16 삼성전자주식회사 Method and apparatus for encoding/decoding motion vector based on reduced motion vector predictor candidates

Also Published As

Publication number Publication date
JP2022043034A (en) 2022-03-15
JP7242811B2 (en) 2023-03-20
JP2023056019A (en) 2023-04-18
JP7399332B2 (en) 2023-12-15

Similar Documents

Publication Publication Date Title
JP5368631B2 (en) Image encoding method, apparatus, and program
US20230276067A1 (en) Method for generating prediction block in amvp mode
JP6321749B2 (en) Video encoding device
JP2010135864A (en) Image encoding method, device, image decoding method, and device
JP5479648B1 (en) Image encoding method and image decoding method
JP5444497B2 (en) Image encoding method and image decoding method
JP7399332B2 (en) Image encoding method and image decoding method
JP6795666B2 (en) Image coding method and image decoding method
JP5571262B2 (en) Image encoding method and image decoding method
JP6961781B2 (en) Image coding method and image decoding method
JP6980889B2 (en) Image coding method and image decoding method
JP6609004B2 (en) Image encoding method and image decoding method
JP6367452B2 (en) Image encoding method and image decoding method
JP6370977B2 (en) Image encoding method and image decoding method
JP6271694B2 (en) Image encoding method and image decoding method
JP6196341B2 (en) Image encoding method and image decoding method
JP5659314B1 (en) Image encoding method and image decoding method
JP5509398B1 (en) Image encoding method and image decoding method
JP5571229B2 (en) Image encoding method and image decoding method
JP2014131295A (en) Image encoding method and image decoding method
JP2014131293A (en) Image encoding method and image decoding method
JP2015053729A (en) Image encoding method, and image decoding method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20231204