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

Image encoding method and image decoding method Download PDF

Info

Publication number
JP7242811B2
JP7242811B2 JP2021185615A JP2021185615A JP7242811B2 JP 7242811 B2 JP7242811 B2 JP 7242811B2 JP 2021185615 A JP2021185615 A JP 2021185615A JP 2021185615 A JP2021185615 A JP 2021185615A JP 7242811 B2 JP7242811 B2 JP 7242811B2
Authority
JP
Japan
Prior art keywords
block
motion
motion information
information
available
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2021185615A
Other languages
Japanese (ja)
Other versions
JP2022043034A (en
Inventor
太一郎 塩寺
沙織 浅香
昭行 谷沢
健 中條
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
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 JP2021185615A priority Critical patent/JP7242811B2/en
Publication of JP2022043034A publication Critical patent/JP2022043034A/en
Priority to JP2023022709A priority patent/JP7399332B2/en
Application granted granted Critical
Publication of JP7242811B2 publication Critical patent/JP7242811B2/en
Priority to JP2023204699A priority patent/JP2024023525A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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, ITU-T Rec. 264). In H.264, prediction processing, transform processing, and entropy coding processing are performed in rectangular block units (eg, 16×16 pixel block units, 8×8 pixel block units, etc.). In the prediction process, a rectangular block to be coded (block to be coded) is subjected to motion compensation for prediction in the temporal direction by referring to an already coded 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 coded and a block referenced in a reference frame, and send the encoded information to the decoding side. Furthermore, when performing motion compensation using a plurality of reference frames, it is necessary to encode the reference frame number together with the motion information. Therefore, the amount of code related to motion information and reference frame numbers may increase.

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

特許第4020789号Patent No. 4020789 米国特許第7233621号U.S. Pat. No. 7,233,621

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

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

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

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

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

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

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

以下、必要に応じて図面を参照しながら、本発明の実施形態に係る画像符号化及び画像復号化の方法及び装置を説明する。なお、以下の実施形態では、同一の番号を付した部分については同様の動作を行うものとして、重ねての説明を省略する。 Hereinafter, image encoding and image decoding methods and apparatuses according to embodiments of the present invention will be described with reference to the drawings as necessary. It should be noted that, in the following embodiments, the same numbered parts are assumed to perform the same operation, and redundant description will be omitted.

(第1の実施形態)
図1は、本発明の第1の実施形態に係る画像符号化装置の構成を概略的に示している。この画像符号化装置は、図1に示されるように、画像符号化部100、符号化制御部150及び出力バッファ120を備えている。この画像符号化装置は、LSIチップなどのハードウェアにより実現されてもよく、或いは、コンピュータに画像符号化プログラムを実行させることにより実現されても構わない。
(First embodiment)
FIG. 1 schematically shows the configuration of an image coding apparatus according to the first embodiment of the invention. This image encoding apparatus comprises 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 implemented by hardware such as an LSI chip, or may be implemented 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 later in detail. The generated encoded data 14 is temporarily stored in the output buffer 120 and sent to a storage system (storage media) or a transmission system (communication line) (not shown) at output timings 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 generated code amount, 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 coding control information 50 includes prediction information, motion information 18, quantization parameter information, and the like. The prediction information includes prediction mode information and block size information. The motion information 18 includes motion vectors, reference frame numbers and prediction directions (unidirectional prediction, bidirectional prediction). The quantization parameter information includes quantization parameters 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 the 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.) into which the original image is divided. 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 the present embodiment, the encoding processing unit is a macroblock, and the encoding target pixel block (macroblock) corresponding to the input image signal 10 is simply referred to as the encoding target block. An image frame including an encoding target block, that is, an encoding target image frame is referred to as an encoding target frame.

このような符号化対象ブロックは、例えば、図2Aに示すような16×16画素ブロックであってもよく、図2Bに示すような64×64画素ブロックであっても構わない。また、符号化対象ブロックは、32×32画素ブロック、8×8画素ブロックなどであっても構わない。また、マクロブロックの形状は、図2A及び図2Bに示されるような正方形状の例に限らず、矩形状などの任意形状に設定されても構わない。さらに、上記処理単位は、マクロブロックのような画素ブロックに限らず、フレーム又はフィールドであっても構わない。 Such an encoding target block 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. Also, the encoding target block may be a 32×32 pixel block, an 8×8 pixel block, or the like. Moreover, the shape of the macroblock is not limited to the square shape shown in FIGS. 2A and 2B, and may be set to an arbitrary shape such as a rectangular shape. Furthermore, the processing unit is not limited to pixel blocks such as macroblocks, but may be frames or fields.

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

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

画像符号化部100において、入力画像信号10は、予測部101及び減算器102へ入力される。減算器102は、入力画像信号10を受け取るとともに、後述する予測部101から予測画像信号11を受け取る。減算器102は、入力画像信号10と予測画像信号11との差分を算出して、予測誤差画像信号12を生成する。 In the image encoding unit 100 , an input image signal 10 is input to a prediction unit 101 and a subtractor 102 . The subtractor 102 receives the input image signal 10 and also receives the predicted image signal 11 from the prediction unit 101, which will be described later. A subtractor 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 transform/quantization unit 103 receives the prediction error image signal 12 from the subtractor 102, performs transform processing on the received prediction error image signal 12, and generates transform coefficients. The transform processing is, for example, an orthogonal transform such as a discrete cosine transform (DCT). In another embodiment, the transform/quantization unit 103 may generate transform coefficients using methods such as wavelet transform and independent component analysis instead of discrete cosine transform. Further, the transform/quantization unit 103 quantizes the generated transform coefficients based on the quantization parameter given by the encoding control unit 150 . The quantized transform coefficients (transform coefficient information) 13 are output to the variable length coding unit 104 and the inverse quantization/inverse transform unit 105 .

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

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

予測部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 the available block information 30 from the available block acquisition unit 109, which will be described later. Furthermore, 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 prediction image signal 11 of the encoding target block, motion information 18 and selected block information 31 based on the reference image signal 17 , reference motion information 19 and available block information 30 . Specifically, the prediction unit 101 generates the motion information 18 and the selected block information 31 based on the available block information 30 and the reference motion information 19, and based on the motion information 18, the motion information selection unit 118 generates: A motion compensator 113 for generating the predicted image signal 11 is provided. Predicted image signal 11 is sent to subtractor 102 and adder 106 . The motion information 18 is stored in the motion information memory 108 for subsequent prediction processing for the coding target block. Also, the selected block information 31 is sent to the variable length coding section 104 . The prediction unit 101 will be described later in detail.

動き情報メモリ108には、動き情報18が参照動き情報19として一時的に格納される。図4には、動き情報メモリ108の構成の一例が示されている。図4に示されるように、動き情報メモリ108には、参照動き情報19がフレーム単位で保持されており、参照動き情報19が動き情報フレーム25を形成している。動き情報メモリ108には、符号化済みのブロックに関する動き情報18が順次入力され、その結果、動き情報メモリ108は、符号化時間の異なる複数の動き情報フレーム25を保持する。 The motion information memory 108 temporarily stores the motion information 18 as the reference motion information 19 . FIG. 4 shows an example of the configuration of the motion information memory 108. As shown in FIG. As shown in FIG. 4, the motion information memory 108 holds the reference motion information 19 in frame units, and the reference motion information 19 forms the motion information frame 25 . The motion information memory 108 is sequentially input with motion information 18 relating to encoded blocks, and as a result, the motion information memory 108 holds a plurality of motion information frames 25 with 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 (eg, 4×4 pixel block units). The motion vector block 28 shown in FIG. 4 represents a block of pixels of the same size as the block to be coded, the available block and the selected block, for example a 16×16 pixel block. A motion vector is assigned to the motion vector block 28 for each 4×4 pixel block, for example. Inter prediction processing using motion vector blocks is called motion vector block prediction processing. The reference motion information 19 held by the motion information memory 108 is read by the prediction unit 101 when the motion information 18 is generated. The motion information 18 possessed by the available block, which will be described later, refers to the reference motion information 19 held in the 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 holding the reference motion information 19 in units of 4×4 pixel blocks, and may hold the reference motion information 19 in units of other pixel blocks. For example, the pixel block unit for the reference motion information 19 may be one pixel, or may be a 2×2 pixel block. Also, the shape of the pixel block related to the reference motion information 19 is not limited to the square shape, and may be any shape.

図1の利用可能ブロック取得部109は、動き情報メモリ108から参照動き情報19を取得し、取得した参照動き情報19に基づいて、既に符号化が完了している複数のブロックから、予測部101の予測処理に利用することができる利用可能ブロックを選択する。選択された利用可能ブロックは、利用可能ブロック情報30として予測部101及び可変長符号化部104へ送られる。利用可能ブロックを選択するための候補となる符号化済みのブロックを、動き参照ブロックと称す。動き参照ブロック及び利用可能ブロックの選択方法については、後に詳細に説明する。 The available block acquisition unit 109 of FIG. Select available blocks that can be used for the prediction process of . The selected available block is sent as available block information 30 to the prediction section 101 and the variable length coding section 104 . A coded block that is a candidate for selecting an available block is called a motion reference block. The method of 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 coding unit 104 receives the selected block information 31 from the prediction unit 101, prediction information and coding parameters such as quantization parameters from the coding control unit 150, and receives the available block acquisition unit. It receives available block information 30 from 109 . The variable-length coding unit 104 performs entropy coding (e.g., equal-length coding, Huffman coding, arithmetic coding, etc.) on the quantized transform coefficients 13, selected block information 31, available block information 30, and coding parameters. ) to generate encoded data 14 . The coding parameters include selected block information 31 and prediction information as well as all parameters necessary for decoding, such as information on transform coefficients and information on quantization. The generated encoded data 14 is temporarily stored in the output buffer 120 and sent to a storage system or transmission system (not shown).

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

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

ステップS503で生成された変換係数情報13は、逆量子化・逆変換部105によって逆量子化され、逆変換処理が施されて、復号予測誤差信号15となる(ステップS505)。復号予測誤差信号15は、ステップS501で使用された参照画像信号17に加算され、局所復号画像信号16となり(ステップS506)、フレームメモリ107に参照画像信号として記憶される(ステップS507)。 The transform coefficient information 13 generated in step S503 is inversely quantized by the inverse quantization/inverse transforming unit 105, subjected to inverse transform processing, and becomes 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 local decoded image signal 16 (step S506), which 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 unit 100 described above will be described in more detail.
A plurality of prediction modes are prepared in the image encoding unit 100 of FIG. 1, and each prediction mode differs in the method of generating 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), and inter prediction (inter-frame prediction) in which a prediction image is generated using a reference image signal 17 relating to one or more encoded reference frames (reference fields). The prediction unit 101 selectively switches between intra prediction and inter prediction to generate a prediction image signal 11 of the encoding target block.

図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. FIG. In inter-prediction, as shown in FIG. 6A , a block in a reference frame one frame previous to which encoding has already been completed and at the same position as the encoding target block (also referred to as a prediction block) 23 from , the predicted image signal 11 is generated using the reference image signal 17 for the block 24 at the position spatially shifted according to the motion vector 18 a contained in the motion information 18 . That is, in generating the predicted image signal 11, the reference image signal 17 related to the block 24 in the reference frame, which is specified by the position (coordinates) of the encoding target block and the motion vector 18a included in the motion information 18, is used. . In inter-prediction, motion compensation with a small number of pixels accuracy (for example, 1/2 pixel accuracy or 1/4 pixel accuracy) is possible, and interpolation pixel values are generated by performing filtering processing on the reference image signal 17. be done. For example, H. H.264 allows interpolation processing up to 1/4 pixel accuracy for a luminance signal. When performing motion compensation with 1/4 pixel precision, the information amount 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 the predicted image signal 11 was generated is represented by a reference frame number. A reference frame number is included in the motion information 18 . The reference frame number can be changed for each area (picture, block, etc.). That is, different reference frames can be used for each pixel block. As an example, when the encoded reference frame one frame before is used for prediction, the reference frame number of this region is set to 0, and when the encoded reference frame two frames before is used for prediction, The reference frame number for this region is set to one. As another example, when the reference image signal 17 for only one frame is held in the 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 the encoding target block 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 motion compensation block size in units of macroblocks, and FIG. 7D shows the motion compensation block size in units of subblocks (pixel blocks of 8×8 pixels or less). As shown in FIG. 7A, when the encoding target block is 64×64 pixels, the motion compensation block may be a 64×64 pixel block, a 64×32 pixel block, a 32×64 pixel block, a 32×32 pixel block, or the like. can be selected. Also, as shown in FIG. 7B, when the encoding target block is 32×32 pixels, the motion compensation block is a 32×32 pixel block, a 32×16 pixel block, a 16×32 pixel block, or a 16×16 pixel block. Blocks and the like can be selected. Furthermore, as shown in FIG. 7C, when the encoding target block is 16×16 pixels, the motion compensation block is a 16×16 pixel block, a 16×8 pixel block, an 8×16 pixel block or an 8×8 pixel block. It can be set as a block or the like. Furthermore, as shown in FIG. 7D, if the block to be coded is 8×8 pixels, the motion compensation block can be an 8×8 pixel block, an 8×4 pixel block, a 4×8 pixel block or a 4×4 pixel block. A pixel block or the like 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 described above, since a small pixel block (for example, a 4×4 pixel block) in a reference frame used for inter prediction has motion information 18, according to the local properties of the input image signal 10, the optimal Motion compensated block shapes and motion vectors can be used. Also, the macroblocks and sub-macroblocks in FIGS. 7A to 7D can be arbitrarily combined. When the encoding target block is a 64×64 pixel block as shown in FIG. 7A, each block size shown in FIG. 7B is set for each of four 32×32 pixel blocks obtained by dividing the 64×64 pixel block. By selecting, blocks of 64×64 to 16×16 pixels can be used hierarchically. Similarly, when block sizes up to the block size shown in FIG. 7D can be selected, block sizes from 64×64 to 4×4 can be hierarchically used.

次に、図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 regions (blocks) in the encoding target frame and the reference frame according to a method determined by both the image encoding device in FIG. 1 and the image decoding device to be described later. be. FIG. 8A shows an example of placement 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 coded regions in the target frame and the reference frame. Specifically, four blocks A, B, C, and D adjacent to the left, upper, upper right, and upper left of the target block for encoding are selected as motion reference blocks from the target frame for encoding. 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 the block TA are selected as motion reference blocks. In this embodiment, the motion reference block selected from the encoding target frame is called a spatial motion reference block, and the motion reference block selected from the reference frame is called a temporal motion reference block. The symbol p attached to each motion reference block in FIG. 8A indicates the index of the motion reference block. The indices are numbered in the order of motion reference blocks in the temporal direction and the spatial direction, but this is not a limitation, and the order may not necessarily be as long as the indices do not overlap. For example, motion reference blocks in the temporal and spatial directions may be numbered in random 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. As shown in FIG. macroblocks, etc.). In this case, the relative position (dx, dy) from the upper left pixel e to each pixel a, b, c, d in the encoding target block is set as shown in FIG. 8C. Here, in the examples shown in FIGS. 8A and 8B, macroblocks are shown as being N×N pixel blocks.

また、図8Dに示されるように、符号化対象ブロックに隣接する全てのブロックA1~A4,B1,B2,C,Dが空間方向動き参照ブロックとして選択されても構わない。図8Dの例では、空間方向動き参照ブロックの数は8となる。 Also, as shown in FIG. 8D, all blocks A1 to A4, B1, B2, C, and D adjacent to the encoding target block may be selected as spatial direction 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)として、この中心ブロック及びその周囲のブロックが時間方向動き参照ブロックとして選択されても構わない。さらに、時間方向参照ブロックは、中心ブロックから等間隔に配置されていなくても構わない。 Furthermore, the temporal motion reference blocks may overlap each block TA-TE partially as shown in FIG. It doesn't matter if 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 necessarily limited to the block at the position (Collocate position) corresponding to the target block to be encoded and the blocks positioned therearound, and may be arranged at any position within the reference frame. It doesn't matter if it's a block with For example, a block in a reference frame identified by the position of the reference block and the motion information 18 of any encoded block adjacent to the target block to be encoded is defined as a center block (eg, block TA), and this The central block and its surrounding blocks may be selected as 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 positions of spatial and temporal motion reference blocks are determined in advance by the encoding device and the decoding device, how are the number and positions of the motion reference blocks set? I don't mind. Also, the size of the motion reference block does not necessarily have to be the same size as the encoding target block. For example, as shown in FIG. 8D, the size of the motion reference block may be larger or smaller than the encoding target block. Furthermore, the motion reference block is not limited to a square shape, and may be set to an arbitrary shape such as a rectangular shape. Also, the motion reference block may be set to any size.

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

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

図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 description 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). In addition, it is assumed that the usability determination processing for motion reference blocks with indices p from 0 to p−1 is completed, and 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 or not the motion reference block p has motion information 18, that is, whether or not 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 in an I slice that does not have motion information, or If all the small pixel blocks have been intra-prediction coded, the process proceeds to step S805. In step S805, the motion reference block p is determined as 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 proceeds to step S802. The available block acquisition unit 109 selects a motion reference block q (available block q) that has already been selected as a available block. Here, q is a value smaller than p. Subsequently, the available block obtaining unit 109 compares the motion information 18 of the motion reference block p with the motion information 18 of the available block q, and determines whether or not they have the same motion information (S803). . If it is determined that the motion information 18 of the motion reference block p is the same as the motion information 18 of the motion reference block q selected as a usable block, the process proceeds to step S805, where the motion reference block p is an unusable block. is determined.

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 that satisfy q<p, the process proceeds to step S804. . In step S804, the usable block acquisition unit 109 determines the motion reference block p as a usable 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 a usable block or an unusable block, the usable block obtaining unit 109 determines whether or not all the motion reference blocks have been subjected to the usable determination ( S806). If there is a motion reference block for which availability determination has not been performed, for example, if p<M−1, the process proceeds 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 processing ends.

上述した利用可能判定処理を実行することにより、各動き参照ブロックが利用可能ブロックであるか、又は利用不可能ブロックであるかが判定される。利用可能ブロック取得部109は、利用可能ブロックに関する情報を含む利用可能ブロック情報30を生成する。このように、動き参照ブロックの中から利用可能ブロックを選択することによって、利用可能ブロック情報30に関する情報量が低減され、結果として、符号化データ14の量を低減することができる。 By executing the above-described usability determination process, it is determined whether each motion reference block is a usable block or an unusable block. The available block acquisition unit 109 generates available block information 30 including information on available blocks. By selecting the available blocks from among the motion reference blocks in this way, 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 available block information 30 for the example of FIG. 10 is shown in FIG. As shown in FIG. 11, the available block information 30 includes motion reference block indices, availability and motion reference block names. In the example of FIG. 11, indexes p=0, 1, 5, 8 are available blocks, and the number of available blocks is four. The prediction unit 101 selects one optimal available block from these available blocks as a selected block, and outputs information (selected block information) 31 on the selected block. The selected block information 31 includes the number of available blocks and the index value of the selected available block. For example, if the number of available blocks is four, the corresponding selected block information 31 is encoded by the variable length encoding unit 104 using a code table with four entries at maximum.

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

図12Aから図12Eは、ステップS803の動き情報18の比較において、動き参照ブロックpの動き情報18と、利用可能ブロックqの動き情報18とが同一であると判定される例を示す。図12Aから図12Eには、各々、斜線が施された複数のブロックと、2つの白塗りのブロックとが示されている。図12Aから図12Eでは、説明を簡単にするために、斜線が施されたブロックを考慮せずに、これらの2つの白塗りのブロックの動き情報18を比較する場合を想定している。2つの白塗りのブロックの一方が、動き参照ブロックpであり、他方が既に利用可能と判定されている動き参照ブロックq(利用可能ブロックq)であるものとする。特に断りのない限り、2つの白色ブロックのいずれが動き参照ブロックpであっても構わない。 FIGS. 12A to 12E show examples in which the comparison of the motion information 18 in step S803 determines that the motion information 18 of the motion reference block p and the motion information 18 of the available block q are the same. 12A-12E each show a plurality of hatched blocks and two white blocks. 12A to 12E assume that the shaded blocks are not considered and the motion information 18 of these two white blocks are compared for the sake of simplicity. Let one of the two white blocks be the motion reference block p and the other be the motion reference block q already determined to be available (available block q). Unless otherwise specified, either 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 need not be the same.

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

図12Dは、動き参照ブロックp及び利用可能ブロックqがともに時間方向のブロックである例を示している。この場合、ブロックTB及びTEの動き情報18が同一であれば、動き情報18が同一であると判定される。 FIG. 12D shows an example where the motion reference block p and available block q are both temporal blocks. In this case, if the motion information 18 of the blocks TB and TE are 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 where motion reference block p and available block q are both temporal blocks. FIG. 12E shows a case where each of blocks TB and TE in the time direction is 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 in the block, and if the motion information 18 is the same for all the small blocks, the motion information 18 for the block TB and the motion information 18 for 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 where motion reference block p and available block q are both temporal blocks. FIG. 12F shows a case where the block TE 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 block TE. If all the motion information 18 of the block TE is the same motion information 18 and is the same as the motion information 18 that the block TD has, 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となる。 Thus, in step S803, it is determined whether or not 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 compared with the motion reference block p is 1, but when the number of available blocks q is 2 or more, the motion information of the motion reference block p 18 with the motion information 18 of each available block q. Further, when scaling, which will be 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 the motion vectors included in the motion information completely match. For example, if the norm of the difference between two motion vectors is within a predetermined range, it may be considered that the motion information of the motion reference block p and the motion information of the available block q are 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 section 101. As shown in FIG. As described above, the prediction unit 101 receives the available block information 30, the reference motion information 19 and the reference image signal 17, and outputs the predicted image signal 11, the motion information 18 and the selected block information 31. FIG. The motion information selection unit 118 includes a spatial direction motion information acquisition unit 110, a temporal direction motion information acquisition unit 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 spatial motion information acquisition unit 110 receives the available block information 30 and the reference motion information 19 regarding the spatial motion reference block. 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 index values of the available blocks. 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, each motion information output 18A representing the available block and its utilization. It contains the motion information 19 that the possible blocks have.

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

なお、時間方向動き情報取得部111は、各画素小ブロックが有する動き情報19に含まれる動きベクトルの平均値又は代表値を求め、動きベクトルの平均値又は代表値を動き情報18Bとして出力しても構わない。 Note that the temporal motion information acquisition unit 111 obtains the average value or representative value of the motion vectors included in the motion information 19 of each pixel small block, 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 usable block as a selection block based on the motion information 18A and 18B output from the spatial direction motion information acquisition section 110 and the temporal direction motion information acquisition section 111. and outputs the motion information 18 (or a group of motion information 18) corresponding to the selected block to the motion compensator 113 . Also, 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 the position of the selected block can be specified.

動き情報切替スイッチ112は、例えば、下記数式1に示すコスト式によって導出される符号化コストが最小になる利用可能ブロックを選択ブロックとして選択する。

Figure 0007242811000001
The motion information changeover switch 112 selects, as a selected block, an available block that minimizes the coding cost derived from, for example, the cost formula shown in Equation 1 below.
Figure 0007242811000001

ここで、Jは符号化コストを示し、Dは入力画像信号10と参照画像信号17との間の二乗誤差和を表す符号化歪みを示す。また、Rは仮符号化によって見積もられる符号量を示し、λは。量子化幅等によって定められるラグランジュ未定係数を示す。数式1に代えて、符号量R又は符号化歪みDのみを使用して、符号化コストJを算出してもよく、符号量R又は符号化歪みDを近似した値を使用して数式1のコスト関数を作成しても構わない。さらに、符号化歪みDは、二乗誤差和に限らず、予測誤差の絶対値和(SAD:sums of absolute difference)であっても構わない。符号量Rは、動き情報18に関する符号量のみを使用しても構わない。また、符号化コストが最小になる利用可能ブロックが選択ブロックとして選択される例に限定されず、符号化コストが最も小さい値以上のある範囲内の値を有する1つの利用可能ブロックが選択ブロックとして選択されても構わない。 where J denotes the coding cost and D denotes the coding distortion representing the sum of squared errors between the input image signal 10 and the reference image signal 17 . Also, R indicates the code amount estimated by provisional encoding, and λ. Indicates a Lagrangian undetermined coefficient determined by a quantization width or the like. Instead of Equation 1, the encoding cost J may be calculated using only the code amount R or the encoding distortion D, and the value approximated to the code amount R or the encoding distortion D is used to calculate the You can even create a cost function. Furthermore, the coding distortion D is not limited to the sum of squared errors, and may be the sum of absolute values (SAD: sums of absolute difference) of prediction errors. For the code amount R, only the code amount related to the motion information 18 may be used. In addition, it is not limited to the example in which the available block with the lowest coding cost is selected as the selected block. It does not 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 motion information group) of 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). and by applying the corresponding motion information 18 to each of these small pixel blocks, the predicted image signal 11 is obtained from the reference image signal 17 . The position of the block from which the predicted image signal 11 is obtained 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の倍数である場合、動きベクトルは、整数画素位置を指し示す。それ以外の場合、動きベクトルは、分数精度の補間位置に対応する予測位置を指し示す。

Figure 0007242811000002
Motion compensation processing for a block to be coded is described in H.264. A motion compensation process similar to H.264 can be used. Here, as an example, an interpolation method with quarter-pixel precision will be specifically described. In quarter-pixel precision interpolation, if each component of the motion vector is a multiple of 4, the motion vector points to integer pixel locations. Otherwise, the motion vector points to the predicted position corresponding to the fractional precision interpolated position.
Figure 0007242811000002

ここで、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で算出される。

Figure 0007242811000003
Here, x and y indicate vertical and horizontal indices indicating the starting position (for example, upper left vertex) of the block to be predicted, and x_pos and y_pos indicate corresponding prediction positions of the reference image signal 17 . (mv_x, mv_y) denotes a motion vector with quarter-pixel accuracy. Next, for the determined pixel positions, the pixel positions corresponding to the reference image signal 17 are supplemented or interpolated to generate predicted pixels. In FIG. An example of H.264 predicted pixel generation is shown. In FIG. 15, squares indicated by capital letters (diagonal squares) indicate pixels at integer positions, and hatched squares indicate interpolation pixels at 1/2 pixel positions. there is A white square indicates an interpolated pixel corresponding to a 1/4 pixel position. For example, in FIG. 15, interpolation processing of 1/2 pixels corresponding to positions of alphabets b and h is calculated by Equation 3 below.
Figure 0007242811000003

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

Figure 0007242811000004
Further, the interpolation processing of 1/4 pixels corresponding to the positions of the letters a and d in FIG. 15 is calculated by the following formula 4.
Figure 0007242811000004

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

なお、補間処理は、数式3及び数式4の例に限らず、他の補間係数を用いて生成されても構わない。また、補間係数は、符号化制御部150から与えられる固定の値を用いてもよく、或いは、前述の符号化コストに基づいて、フレーム毎に補間係数を最適化し、最適化された補間係数を用いて生成されても構わない。 Note that the interpolation processing 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 is optimized for each frame based on the encoding cost described above, and the optimized interpolation coefficient is used. 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画素ブロックより大きい単位で上記の予測処理を行っても構わない。 Further, in the present embodiment, the motion reference block is a motion vector block prediction process in units of macroblocks (for example, 16×16 pixel blocks). Prediction processing may be performed in 8×16 pixel block units, 8×8 pixel block units, 8×4 pixel block units, 4×8 pixel block units, or 4×4 pixel block units. In this case, information about motion vector blocks is derived on a pixel block basis. Also, the prediction process may be performed in units larger than 16×16 pixel blocks, such as 32×32 pixel blocks, 32×16 pixel blocks, and 64×64 pixel blocks.

動きベクトルブロック内の参照動きベクトルを、符号化対象ブロック内の小画素ブロックの動きベクトルとして代入する際には、(A)参照動きベクトルのマイナス値(反転ベクトル)を代入してもよく、或いは(B)小ブロックに対応する参照動きベクトルと、この参照動きベクトルに隣接する参照動きベクトルを用いた加重平均値若しくはメディアン値、最大値、最小値を代入しても構わない。 When substituting the reference motion vector in the motion vector block as the motion vector of the small pixel block in the 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 and a weighted average value or median value, maximum value, or 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 section 101. As shown in FIG. As shown in FIG. 16, first, a reference frame (motion reference frame) including a temporal reference motion block is acquired (step S1501). A motion reference frame is typically a reference frame having the shortest temporal distance from an encoding target frame, and is a temporally past reference frame. For example, the motion reference frame is the frame encoded immediately before the encoding target frame. In another example, any reference frame for which motion information 18 is stored in motion information memory 108 may be obtained as a 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 the selected block, for example, according to Equation 1 (step S1503). Subsequently, the motion compensation unit 113 copies the motion information of the selected selected block to the encoding target block (step S1504). At this time, if the selected block is a spatial direction reference block, the motion information 18 of this selected block is copied to the coding reference block, as shown in FIG. Also, when the selected block is a temporal direction reference block, the group of motion information 18 possessed by this selected block is copied to the encoding target block together with the position information. Next, the motion information 18 or the group of motion information 18 copied by the motion compensation unit 113 is used to perform motion compensation, 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 coding section 104 . The variable-length coding unit 104 includes a parameter coding unit 114, a transform coefficient coding unit 115, a selected block coding unit 116 and a multiplexing unit 117, as shown in FIG. The parameter encoding unit 114 encodes parameters required for decoding such as prediction mode information, block size information, quantization parameter information, etc., excluding transform coefficient information 13 and selected block information 31, to generate encoded data 14A. . The transform coefficient encoding unit 115 encodes the transform coefficient information 13 to generate encoded data 14B. Also, 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 the reference blocks and convert only the motion reference blocks that are available to syntax (stds_idx). In FIG. 19, 5 motion reference blocks out of 9 motion reference blocks are unavailable, so the syntax stds_idx is sequentially assigned from 0 to the 4 motion reference blocks excluding them. In this example, the selected block information to be encoded is selected from four available blocks instead of from nine, so the code amount (number of bins) to be assigned can be reduced 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 indicating syntax stds_idx and binary information (bin) of syntax stds_idx. As shown in FIG. 18, the smaller the number of motion reference blocks available, the smaller the average number of bins required to encode the syntax stds_idx. For example, if the number of available blocks is 4, the syntax stds_idx can be represented in 3 bits or less. The binary information (bin) of the syntax stds_idx may be binarized so that all stds_idx have the same number of bins for each number of usable blocks, and is binarized according to the binarization method determined by pre-learning. I don't mind. Alternatively, a plurality of binarization methods may be prepared and switched adaptively for each block to be encoded.

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

本実施形態では、符号化対象フレームより1フレーム前に符号化されたフレームを参照フレームとして参照する例を想定して説明しているが、選択ブロックが有する参照動き情報19中の動きベクトル及び参照フレーム番号を用いて、動きベクトルをスケーリング(又は、正規化)して、参照動き情報19が符号化対象ブロックへ適用されても構わない。 In the present 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 frame number may be used to scale (or normalize) the motion vector and the reference motion information 19 may be applied to the block to be coded.

このスケーリング処理について、図21を参照して具体的に説明する。図21に示すtcは、符号化対象フレームと動き参照フレームとの時間距離(POC(ディスプレイ順序を示す番号)距離)を示し、下記数式5により算出される。図21に示すtr[i]は、動き参照フレームと選択ブロックが参照するフレームiとの時間距離を示し、下記数式6により算出される。

Figure 0007242811000005
This scaling processing will be specifically described with reference to FIG. tc shown in FIG. 21 indicates the temporal distance (POC (display order number) distance) between the encoding target frame and the motion reference frame, and is calculated by Equation 5 below. 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 Equation 6 below.
Figure 0007242811000005

ここで、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 less than min, max if it is greater than max, and target otherwise. clip function. Also, 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が算出される。

Figure 0007242811000006
Assuming that the motion vector of the selected block is MVr=(MVr_x, MVr_y) and the motion vector to be applied to the encoding target block is MV=(MV_x, MV_y), the motion vector MV is calculated by Equation 7 below.
Figure 0007242811000006

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

また、動きベクトルのスケーリングに関する他の例を以下に説明する。
まず、スライス又はフレーム毎に、下記数式8に従って、動き参照フレームが取りうる全ての時間距離trに関してスケーリング係数(DistScaleFactor[i])を求める。スケーリング係数の数は、選択ブロックが参照するフレームの数、即ち、参照フレームの数と等しい。

Figure 0007242811000007
Other examples of motion vector scaling are also described below.
First, for each slice or frame, a scaling factor (DistScaleFactor[i]) is obtained for all possible temporal distances tr of the motion reference frames 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.
Figure 0007242811000007

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

符号化対象ブロック毎のスケーリングの際には、下記数式9を用いることにより、乗算、加算、シフト演算のみで動きベクトルMVを計算することができる。

Figure 0007242811000008
At the time of scaling for each block to be encoded, the motion vector MV can be calculated only by multiplication, addition, and shift operations by using Equation 9 below.
Figure 0007242811000008

このようなスケーリング処理を施した場合、予測部101とともに利用可能ブロック取得部109の処理に、スケーリング後の動き情報18を適用する。スケーリング処理を施した場合、符号化対象ブロックが参照する参照フレームは、動き参照フレームとなる。 When such scaling processing is performed, the post-scaling motion information 18 is applied to the processing of the available block acquisition unit 109 together with the prediction unit 101 . When the scaling process is performed, the reference frame referred to 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 unit 100. As shown in FIG. 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 upper layers above slices. The slice level syntax 904 holds the information needed for each slice, and the macroblock level syntax 907 holds the data needed for each macroblock shown in Figures 7A-7D.

各パートは、さらに詳細なシンタクスを含む。ハイレベルシンタクス901は、シーケンスパラメータセットシンタクス902及びピクチャパラメータセットシンタクス903などのシーケンス及びピクチャレベルのシンタクスを含む。スライスレベルシンタクス904は、スライスヘッダーシンタクス905及びスライスデータシンタクス906などを含む。さらに、マクロブロックレベルシンタクス907は、マクロブロックレイヤーシンタクス908及びマクロブロックプレディクションシンタクス909などを含む。 Each part contains more 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を符号化する。 Figures 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. Further, stds_idx indicates selected block information, and stds_idx is encoded using the code table corresponding to the number of usable 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 for encoding the selected block information after mb_type. If the mode indicated by mb_type is a specified size or a specified mode (TARGET_MODE) and if available_block_num is a value greater than 1, encode stds_idx. For example, the motion information of the selected block can be used when the block size is 64×64 pixels, 32×32 pixels, or 16×16 pixels, or when the stds_idx is encoded in the direct mode.

図23Bは、mb_typeの前に選択ブロック情報を符号化する場合のシンタクスを示している。available_block_numが1より大きい値の場合に、stds_idxを符号化する。また、available_block_num が0ならば、H.264に代表される従来の動き補償を行うのでmb_typeを符号化する。 FIG. 23B shows the syntax for encoding the selected block information 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 represented by H.264 is performed, mb_type is coded.

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

また、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をさらに割り当てられて符号化される。 Also, by using stds_idx information, mb_type information can be reduced. Figure 24A shows the H. 2 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, such as 16, 32, 64, representing the size of the block to be encoded, and M is half the value of N. Therefore, when mb_type is 4 to 21, it indicates that the encoding target block is a rectangular block. In addition, L0, L1, and Bi in FIG. 24A indicate unidirectional prediction (List0 direction only), unidirectional prediction (List1 direction only), and bidirectional prediction, respectively. When the encoding target block is a rectangular block, mb_type includes information indicating which of L0, L1, and Bi prediction is performed for each of the two rectangular blocks in the encoding target block. B_Sub means that the above processing is performed on each pixel block obtained by dividing a macroblock into four. For example, when the encoding target block is a 64×64 pixel macroblock, the encoding target block is further assigned mb_type for each of four 32×32 pixel blocks obtained by dividing this macroblock into four. become.

ここで、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 (the pixel block adjacent to the left side of the target block), the motion information of the pixel block adjacent to the left side of the target block is Since it is motion information, stds_idx is predicted for the encoding target block using horizontally long rectangular blocks indicated by mb_type=4, 6, 8, 10, 12, 14, 16, 18, and 20 in FIG. 24A. is equivalent to executing Also, 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. Equivalent to performing prediction on tall rectangular blocks indicated by 9, 11, 13, 15, 17, 19, 21. Therefore, by using stds_idx, it is possible to create a code table in which the columns of mb_type=4 to 21 in FIG. 24A are reduced as shown in FIG. 24B. Similarly, the H.264 shown in FIG. 24C. As for the code table corresponding to mb_type and mb_type at the time of P-slicing in H.264, it is possible to create a code table in which the number of mb_types is reduced 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スライスと同様であるために省略する。 Also, stds_idx information may be included in mb_type information for encoding. 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 the mode corresponding to stds_idx, and B_STDS_X is added by the number of available blocks (the number of available blocks is 3 in FIG. 25A). Similarly, another example of mb_type for P slices is shown in FIG. 25B. 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 (binning) 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 have to be consecutive and may be placed between each mb_type. Also, the binarization method (binning) may be designed based on pre-learned selection frequencies.

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

以上のように、本実施形態に係る画像符号化装置は、複数の動き参照ブロックから利用可能ブロックを選択し、選択した利用可能ブロックの数に応じて、符号化対象ブロックに適用する動き参照ブロックを特定するための情報を生成し、この情報を符号化している。従って、本実施形態に係る画像符号化装置によれば、動きベクトル情報に関する符号量を削減しながらも、符号化対象ブロックよりも細かな小画素ブロック単位で動き補償を行えるため、高い符号化効率を実現することができる。 As described above, the image coding apparatus according to the present embodiment selects usable blocks from a plurality of motion reference blocks, and selects motion reference blocks to be applied to the coding target block according to the number of selected usable blocks. is generated and the information is encoded. Therefore, according to the image coding apparatus according to the present embodiment, while reducing the amount of code related to motion vector information, motion compensation can be performed in units of small pixel blocks that are finer than the coding target block, resulting in high coding 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 the second embodiment of the present invention. In the second embodiment, mainly the parts and operations different from those in the first embodiment will be described. As shown in FIG. 26, the image coding unit 200 according to this embodiment differs from the first embodiment in the configurations of the prediction unit 201 and the variable length coding unit 204. FIG. The prediction unit 201 includes a first prediction unit 101 and a second prediction unit 202 as shown in FIG. . The first prediction unit 101 has the same configuration as the prediction unit 101 (FIG. 1) according to the first embodiment, and uses the motion information 18 of the selected block to perform motion compensation according to a prediction method (first prediction method). , to generate the predicted image signal 11 . The second prediction unit 202 performs motion compensation on the encoding target block using one motion vector. A prediction image signal 11 is generated according to a prediction method (second prediction method) such as H.264. The second prediction section 202 uses the input image signal 10 and the reference image signal 17 from the frame memory to generate the predicted image signal 11B.

図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 section 202. As shown in FIG. 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, a motion information acquisition unit 205 that is provided with a motion compensator 113 (FIG. 1) that generates a predicted image signal 11A using . The motion information acquisition unit 205 obtains a motion vector to be assigned to the encoding target block based on the input image signal 10 and the reference image signal 17, for example, by block matching. As an evaluation criterion for matching, a value obtained by accumulating the difference 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 use a value obtained by converting the difference between the predicted image signal 11 and the input image signal 10 to determine the optimum motion vector. Also, the optimum motion vector may be determined by considering the size of the motion vector and the code amount 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 the outside of the image coding apparatus, or may be executed hierarchically for each pixel precision. Alternatively, the motion information given by the encoding control unit 150 may be used as the output 21 of the motion information acquisition unit 205 without performing search processing.

図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 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 obtain the coding cost according to, for example, Equation 1, and selects the predicted image so that the coding cost becomes smaller. Either one of the signals 11A and 11B is selected and output as the predicted image signal 11. FIG. Furthermore, the prediction method changeover switch 203 is a prediction changeover switch that indicates whether the output prediction 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 multiplexed with the encoded data 14 after being encoded by the variable length encoding unit 204 .

図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 the variable length coding section 204. As shown in FIG. The variable-length coding unit 204 shown in FIG. 29 has a motion information coding unit 217 in addition to the configuration of the variable-length coding unit 104 shown in FIG. Also, unlike the selected block coding unit 116 in FIG. 18, the selected block coding unit 216 in FIG. 29 codes the prediction switching information 32 to generate the coded data 14D. When the first prediction unit 101 executes the prediction process, the selected block coding unit 216 further codes the available block information 30 and the selected block information 31 . The coded available block information 30 and selected block information 31 are included in the coded data 14D. When the second prediction unit 202 executes the prediction process, the motion information encoding unit 217 encodes the motion information 18 to generate the encoded data 14E. The selected block encoding unit 216 and the motion information encoding unit 217 each perform prediction processing based on the prediction switching information 32 indicating whether or not the predicted image has been generated by motion compensation prediction using the motion information of the selected block. It is determined which one 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 the 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, 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 when this is a value greater than 1, selected block coding section 216 codes 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 target block in motion compensation prediction. 202 is selected. If the number of available blocks is greater than 1 and stds_flag is 1, it indicates that motion information possessed by the selected block was used for motion compensated prediction. Also, if stds_flag is 0, H.264 is processed without using the motion information of the selected block. As with H.264, the information of the motion information 18 is coded directly or a predicted difference value. Furthermore, stds_idx indicates selected block information, and the code table corresponding to the number of usable 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 for encoding the selected block information after mb_type. The stds_flag and stds_idx are coded only when the mode indicated by mb_type is a defined size or a defined mode. For example, stds_flag and stds_idx are encoded when the motion information of the selected block is available when the block size is 64×64, 32×32, 16×16, or when in direct mode.

図30Bは、mb_typeの前に選択ブロック情報を符号化する場合のシンタクスを示している。例えばstds_flagが1である場合、mb_typeは符号化される必要はない。stds_flagが0である場合、mb_typeは符号化される。 FIG. 30B shows the syntax for encoding the selected block information before mb_type. For example, if stds_flag is 1, mb_type need not 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 coding apparatus 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 as to reduce the coding cost. The second prediction unit 202 is selectively switched to compress and encode the input image signal. Therefore, in the image coding apparatus according to the second embodiment, the coding efficiency is improved as compared with the image coding apparatus 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 apparatus comprises an image decoding section 300, a decoding control section 350 and an output buffer 308, as shown in FIG. The image decoding section 300 is controlled by a decoding control section 350 . An 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 apparatus of FIG. 31 has a complementary relationship with the encoding process by the image encoding process of FIG. The image decoding device in FIG. 31 may be implemented by hardware such as an LSI chip, or may be implemented 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. I have. In the image decoding unit 300 , encoded data 80 from a storage system or a transmission system (not shown) is input to a coded sequence decoding unit 301 . This coded data 80 corresponds to, for example, the coded data 14 sent in a multiplexed state from the image coding apparatus of FIG.

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

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

本実施形態において、復号化パラメータは、変換係数33、選択ブロック情報61及び予測情報を含み、変換係数に関する情報、量子化に関する情報などの復号の際に必要になるあらゆるパラメータを含む。予測情報、変換係数に関する情報、及び量子化に関する情報は、制御情報71として復号化制御部350へ入力される。復号化制御部350は、予測情報及び量子化パラメータなどの復号化に必要なパラメータを含む復号化制御情報70を、画像復号化部300の各部に与える。 In this embodiment, the decoding parameters include transform coefficients 33, selected block information 61 and prediction information, and include all parameters necessary for decoding such as transform coefficient information and quantization information. The prediction information, the information about transform coefficients, and the information about quantization are input to decoding control section 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は、復号化されなくても構わない。 Further, the encoded string decoding unit 301 simultaneously decodes the encoded data 80 to obtain prediction information and selected block information 61, as will be described later. Motion information 38, including motion vectors and reference frame numbers, need not be decoded.

符号化列復号化部301によって解読された変換係数33は、逆量子化・逆変換部302へ送られる。符号化列復号化部301によって解読された量子化に関する種々の情報、即ち、量子化パラメータ及び量子化マトリクスは、復号化制御部350に与えられ、逆量子化する際に逆量子化・逆変換部302にロードされる。逆量子化・逆変換部302は、ロードされた量子化に関する情報に従って、変換係数33を逆量子化し、続いて逆変換処理(例えば、逆離散コサイン変換など)を施して、予測誤差信号34を得る。図31の逆量子化・逆変換部302による逆変換処理は、図1の変換・量子化部による変換処理の逆変換である。例えば、画像符号化装置(図1)によりウェーブレット変換が施される場合、逆量子化・逆変換部302は、対応する逆量子化及び逆ウェーブレット変換を実行する。 The transform coefficients 33 decoded by the coded sequence decoding unit 301 are sent to the inverse quantization/inverse transform unit 302 . Various information related to quantization decoded by the coded sequence decoding unit 301, that is, the quantization parameter and the quantization matrix are given to the decoding control unit 350, and are subjected to inverse quantization/inverse transform when performing inverse quantization. is loaded into section 302 . The inverse quantization/inverse transform unit 302 performs inverse quantization on the transform coefficients 33 according to the loaded quantization information, and then performs inverse transform processing (for example, inverse discrete cosine transform) to obtain a prediction error signal 34. obtain. The inverse transform processing by the inverse quantization/inverse transform unit 302 in FIG. 31 is the inverse transform of the transform processing by the transform/quantization unit in FIG. For example, when wavelet transform is performed by the image coding apparatus (FIG. 1), the inverse quantization/inverse transform unit 302 executes 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 unit 302 is input to the adder 303 . The adder 303 adds the prediction error signal 34 and the prediction image signal 35 generated by the prediction unit 305 (to be described later) to generate the decoded image signal 36 . The generated decoded image signal 36 is output from the image decoding unit 300 , temporarily stored in the output buffer 308 , and then output according to the output timing managed by the decoding control unit 350 . Also, this decoded image signal 36 is stored in the frame memory 304 as the reference image signal 37 . The reference image signal 37 is sequentially read from the frame memory 304 frame by frame or field by field, and input to the prediction section 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. FIG. The operation of the available block acquisition unit 307 is the same as 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. As shown in FIG. The motion information memory 306 holds a plurality of motion information frames 26 with different encoding times. The motion information 38 or group of motion information 38 whose decoding has been completed 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 by the motion information memory 306 is read and referred to 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 usable blocks according to this embodiment will be described. A motion reference block is a candidate block that is selected according to a predetermined method by the above-described image coding apparatus and image decoding apparatus from areas that have already been decoded. FIG. 8A shows an example of 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 decoding target frame in FIG. 8A are blocks adjacent to the left, upper, upper right, and upper left of the decoding target block. In this embodiment, a motion reference block selected from a decoding target frame that includes the decoding target block is referred to as a spatial direction motion reference block. A motion reference block TA in a reference frame is a pixel block at the same position as a block to be decoded in the reference frame. Selected as a reference block. A motion reference block selected from pixel blocks in a reference frame is called a temporal motion reference block. A frame in which a temporal motion reference block is located is called a motion reference frame.

空間方向動き参照ブロックは、図8Aに示される例に限らず、図8B示すように、復号化対象ブロックに隣接する画素a,b,c,dが属する画素ブロックが、空間方向動き参照ブロックとして選択されても構わない。この場合、復号化対象ブロック内の左上画素に対する画素a,b,c,dの相対位置(dx,dy)は、図8Cに示される。 The spatial motion reference block is not limited to the example shown in FIG. 8A. As shown in FIG. It does not 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である。 Also, as shown in FIG. 8D, all pixel blocks A1 to A4, B1, B2, C, and D adjacent to the decoding target block may be selected as spatial direction motion reference blocks. In FIG. 8D, the number of spatial motion reference blocks is eight.

また、時間方向動き参照ブロックTA~TEは、図8Eに示すように、互いに部分的に重なり合っていてもよく、図8Fに示すように、各々が互いに離れていても構わない。また、時間方向動き参照ブロックは、必ずしもCollocate位置のブロック及びその周囲に位置する必要はなく、動き参照フレーム内であればいずれの位置の画素ブロックであっても構わない。例えば、復号化対象ブロックに隣接する既に復号化済みのブロックの動き情報を利用して、動き情報に含まれる動きベクトルが指し示す参照ブロックを動き参照ブロックの中心(例えば、ブロックTA)として選択しても構わない。さらに、時間方向の参照ブロックは、等間隔に配置されていなくても構わない。 Also, 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. Also, the temporal motion reference block does not necessarily have to be positioned at or around the block at the Collocate position, and may be a pixel block at any position within the motion reference frame. For example, using the motion information of already-decoded blocks adjacent to the decoding target block, the reference block indicated by the 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 need not be arranged at regular intervals.

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

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

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

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

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

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

図12Aから図12Eは、ステップS803の動き情報38の比較において、動き参照ブロックpの動き情報38と、利用可能ブロックqの動き情報38とが同一であると判定される例を示す。図12Aから図12Eには、各々、斜線が施された複数のブロックと、2つの白塗りのブロックとが示されている。図12Aから図12Eでは、説明を簡単にするために、斜線が施されたブロックを考慮せずに、これらの2つの白塗りのブロックの動き情報38を比較する場合を想定している。2つの白塗りのブロックの一方が、動き参照ブロックpであり、他方が既に利用可能と判定されている動き参照ブロックq(利用可能ブロックq)であるものとする。特に断りのない限り、2つの白色ブロックのいずれが動き参照ブロックpであっても構わない。 FIGS. 12A to 12E show examples in which the comparison of the motion information 38 in step S803 determines that the motion information 38 of the motion reference block p and the motion information 38 of the available block q are the same. 12A-12E each show a plurality of hatched blocks and two white blocks. FIGS. 12A-12E assume, for simplicity of explanation, that the motion information 38 of these two white blocks are compared without considering the shaded blocks. Let one of the two white blocks be the motion reference block p and the other be the motion reference block q already determined to be available (available block q). Unless otherwise specified, either 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 are the same, it is determined that the motion information 38 is the same. At this time, the sizes of blocks A and B need not be the same.

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

図12Dは、動き参照ブロックp及び利用可能ブロックqがともに時間方向のブロックである例を示している。この場合、ブロックTB及びTEの動き情報38が同一であれば、動き情報38が同一であると判定される。 FIG. 12D shows an example where the motion reference block p and available block q are both temporal blocks. In this case, if the motion information 38 of the blocks TB and TE are 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 where motion reference block p and available block q are both temporal blocks. FIG. 12E shows a case where each of blocks TB and TE in the time direction is divided into a plurality of small blocks, each of which has a plurality of small blocks having motion information 38 . In this case, the motion information 38 is compared for each small block in the block, and if the motion information 38 is the same for all the small blocks, the motion information 38 for the block TB and the motion information 38 for 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 where motion reference block p and available block q are both temporal blocks. FIG. 12F shows a case where the block TE 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 block TE. If all the motion information 38 of the block TE is the same motion information 38 and is the same as the motion information 38 that the block TD has, 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となる。 Thus, in step S803, it is determined whether or not 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 compared with the motion reference block p is 1, but when the number of available blocks q is 2 or more, the motion information of the motion reference block p 38 with motion information 38 for each available block q. Further, when scaling, which will be 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 the motion vectors included in the motion information completely match. For example, if the norm of the difference between two motion vectors is within a predetermined range, it may be considered that the motion information of the motion reference block p and the motion information of the available block q are substantially the same.

図32は、符号化列復号化部301をより詳細に示すブロック図である。符号化列復号化部301は、図32に示されるように、符号化データ80をシンタクス単位に分離する分離部320、変換係数を復号化する変換係数復号化部322、選択ブロック情報を復号化する選択ブロック復号化部323、並びに、予測ブロックサイズ及び量子化に関するパラメータなどを復号化するパラメータ復号化部321を備えている。 FIG. 32 is a block diagram showing the coded sequence decoding unit 301 in more detail. As shown in FIG. 32, the coded sequence decoding unit 301 includes a separation unit 320 that separates the encoded data 80 into syntax units, a transform coefficient decoding unit 322 that decodes transform coefficients, and a selected block information decoder. and a parameter decoding unit 321 for decoding 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 the encoded data 80A including parameters related to the predicted block size and quantization from the separation unit, decodes the encoded data 80A, and generates the control information 71. FIG. The transform coefficient decoding unit 322 receives the encoded transform coefficients 80B from the separation unit 320, decodes the encoded transform coefficients 80B, and obtains the transform coefficient information 33. FIG. The selected block decoding unit 323 receives the encoded data 80C and the available block information 60 regarding the selected block and outputs the 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 described in detail with reference to FIG.
The prediction unit 305 includes a motion information selection unit 314 and a motion compensation unit 313, as shown in FIG. A selector switch 312 is provided. The prediction unit 305 basically has the same configuration and functions 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, the selected block information 61, the reference motion information 39 and the reference image signal 37, and outputs the predicted image signal 35 and the motion information 38. FIG. A spatial direction motion information acquisition unit 310 and a temporal direction motion information acquisition unit 311 have the same functions as the spatial direction motion information acquisition unit 110 and the temporal direction motion information acquisition unit 111 described in the first embodiment, respectively. 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 indices of each available block located in the spatial direction. The time direction 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 indices of each available block located in the time direction. 38B.

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

動き補償部313の動きベクトルのスケーリング機能においては、第1の実施形態に説明したものと同様であるので説明を省略する。 The motion vector scaling function of the motion compensator 313 is the same as that described in the first embodiment, so 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 unit 300. As shown in FIG. 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 upper layers above slices. The slice level syntax 904 holds the information needed for each slice, and the macroblock level syntax 907 holds the data needed for each macroblock shown in Figures 7A-7D.

各パートは、さらに詳細なシンタクスを含む。ハイレベルシンタクス901は、シーケンスパラメータセットシンタクス902及びピクチャパラメータセットシンタクス903などのシーケンス及びピクチャレベルのシンタクスを含む。スライスレベルシンタクス904は、スライスヘッダーシンタクス905及びスライスデータシンタクス906などを含む。さらに、マクロブロックレベルシンタクス907は、マクロブロックレイヤーシンタクス908及びマクロブロックプレディクションシンタクス909などを含む。 Each part contains more 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を符号化する。 Figures 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, decoding of selected block information is required. Further, stds_idx indicates selected block information, and stds_idx is encoded using the code table corresponding to the number of usable 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 for decoding the selected block information after mb_type. If the prediction mode indicated by mb_type is a specified size or a specified mode (TARGET_MODE), and if available_block_num is a value greater than 1, stds_idx is decoded. For example, the motion information of the selected block can be used when the block size is 64×64 pixels, 32×32 pixels, or 16×16 pixels, or when the stds_idx is encoded in the direct mode.

図23Bは、mb_typeの前に選択ブロック情報を復号化する場合のシンタクスを示している。available_block_numが1より大きい値の場合に、stds_idxを復号化する。また、available_block_num が0ならば、H.264に代表される従来の動き補償を行うのでmb_typeを符号化する。 FIG. 23B shows the syntax for decoding the selected block information 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 represented by H.264 is performed, mb_type is coded.

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

以上のように、本実施形態に係る画像復号化装置は、前述した第1の実施形態に係る画像符号化装置によって符号化された画像を復号化している。従って、本実施形態に係る画像復号化は、比較的小さな符号化データから高画質な復号画像を再生することができる。 As described above, the image decoding apparatus according to this embodiment decodes the image encoded by the image encoding apparatus according to the first embodiment. 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 comprises an image decoding section 400, a decoding control section 350 and an output buffer 308, as shown in FIG. An image decoding device according to the fourth embodiment corresponds to the image encoding device according to the second embodiment. In the fourth embodiment, mainly the parts and operations different from those in the third embodiment will be 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) for performing motion compensation using motion information of a selected block, and H.264. A prediction 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 the coded sequence decoding unit 401 in more detail. The coded sequence decoding unit 401 shown in FIG. 35 includes a motion information decoding unit 424 in addition to the configuration of the coded sequence decoding unit 301 shown in FIG. Also, unlike the selected block decoding unit 323 shown in FIG. 32, the selected block decoding unit 423 shown in FIG. The prediction switching information 62 indicates which of the first and second prediction schemes the prediction unit 101 in the image coding apparatus of FIG. 1 used. When the prediction switching information 62 indicates that the prediction unit 101 uses the first prediction scheme, that is, when the decoding target block is encoded by the first prediction scheme, the selected block decoding unit 423 performs encoding Selected block information 61 is obtained by decoding selected block information in data 80C. When the prediction switching information 62 indicates that the prediction unit 101 uses the second prediction method, that is, when the decoding target block is encoded by the second prediction method, the selected block decoding unit 423 converts the selected block information , the motion information decoding unit 424 decodes 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 predictor 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 switch 411 . The second prediction unit 410 performs motion compensation prediction similar to the motion compensation unit 313 in FIG. 35B. The first prediction section 305 is the same as the prediction section 305 described in the third embodiment, and generates a prediction image signal 35B. Also, the prediction method 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. It is output as the predicted image signal 35 of the prediction unit 405 . At the same time, the prediction method switch 411 sends the motion information used by the selected first prediction unit 305 or second prediction unit 410 to the motion information memory 306 as the motion information 38 .

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

図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 when this is a value greater than 1, selected block decoding section 423 decodes selected block information in encoded data 80C. Also, stds_flag is a flag indicating whether or not the motion information of the selected block is used as the motion information of the block to be decoded in motion compensated prediction. 410 is selected. If the number of available blocks is greater than 1 and stds_flag is 1, it indicates that motion information possessed by the selected block was used for motion compensated prediction. Also, if stds_flag is 0, H.264 is processed without using the motion information of the selected block. In the same way as H.264, information of motion information is coded directly or a difference value obtained by prediction. Furthermore, stds_idx indicates selected block information, and the code table corresponding to the number of usable 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 for decoding the selected block information after mb_type. The stds_flag and stds_idx are decoded only when the prediction mode indicated by mb_type is a defined block size or a defined mode. For example, if the block size is 64x64, 32x32, 16x16, or in direct mode, decode stds_flag and stds_idx.

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

以上のように、本実施形態に係る画像復号化装置は、前述した第2の実施形態に係る画像符号化装置によって符号化された画像を復号化している。従って、本実施形態に係る画像復号化は、比較的小さな符号化データから高画質な復号画像を再生することができる。 As described above, the image decoding apparatus according to this embodiment decodes the image encoded by the image encoding apparatus 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, and can be embodied by modifying constituent elements without departing from the scope of the present invention at the implementation stage. Further, various inventions can be formed by appropriate combinations of the plurality of constituent elements disclosed in the above embodiments. For example, some components may be deleted from all 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 by modifying the first to fourth embodiments described above as follows.

(1)第1から第4の実施形態では、処理対象フレームを16×16画素ブロックなどの矩形ブロックに分割し、図4に示したような画面左上の画素ブロックから右下の画素ブロックに向かう順序で、符号化又は復号化する場合を例にとって説明しているが、符号化又は復号化順序は、この例に制限されることはない。例えば、符号化又は復号化順序は、画面右下から左上に向かう順序でもよく、右上から左下に向かう順序でも構わない。また、符号化又は復号化順序は、画面の中央部から周辺部に渦巻状に向かう順序であってもよく、画面の周辺部から中心部に向かう順序であっても構わない。 (1) In the first to fourth embodiments, the frame to be processed is divided into rectangular blocks such as 16×16 pixel blocks, and the pixel block moves from the upper left pixel block to the lower right pixel block as shown in FIG. Although the case of encoding or decoding in 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 the order from the lower right to the upper left of the screen, or may be the order from the upper right to the lower left. Also, 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, an example is explained in which the luminance signal and the color difference signal are not divided, but are limited to one of the color signal components. However, different prediction processes may be used, or the same prediction process may be used for luminance and color difference signals. If a different prediction process is used, the selected prediction method for the chrominance signal is encoded/decoded in the same way as for the luma signal.

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

本発明に係る画像符号化/復号化方法は、符号化効率を向上させることができることから、産業上の利用可能性を有している。 INDUSTRIAL APPLICABILITY The image encoding/decoding method according to the present invention can improve encoding efficiency, and thus 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 Prediction error image signal 13 Quantized transform coefficient 14 Encoded data 15 Decoded prediction 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 ... coding 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 unit, 101... prediction unit, 102 Subtractor 103 Transform/quantization unit 104 Variable-length coding unit 105 Inverse quantization/inverse transformation unit 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 coding unit 115 Transform coefficient coding unit 116 117 Multiplexer 118 Motion information selector 120 Output buffer 150 Encoding controller 200 Image encoder 201 Predictor 202 Second predictor , 203 ... prediction method changeover switch, 204 ... variable length coding unit, 205 ... motion information acquisition unit, 216 ... selected block coding unit, 217 ... motion information coding unit, 300 ... image decoding unit, 301 ... coding Column decoding unit 301 Code sequence decoding unit 302 Inverse quantization/inverse transform 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 unit 311... Time direction motion information acquisition unit 312... Motion information changeover switch 313... Motion compensation unit 314... Information selection unit 320... Separation unit 321... Parameter Decoding unit 322 Transform coefficient decoding unit 323 Selected block decoding unit 350 Decoding control unit 400 Image decoding unit 401 Encoded sequence decoding unit 405 Prediction unit 410 Second prediction section 411 ... prediction method changeover switch 423 ... selected block decoding section 424 ... information decoding section , 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 (3)

対象ブロックに対して予め定められた位置関係にある複数の候補ブロックが利用可能か否かを前記位置関係に応じて予め定められた順番に従って判定する判定部と、
前記利用可能と判定された候補ブロックの中から選択ブロックを選択する選択部と、
前記利用可能と判定された候補ブロックの数が1を超える場合に、前記利用可能と判定された候補ブロックの数に応じた符号規則に基づいて、前記選択ブロックを特定する識別情報を符号化し、前記利用可能と判定された候補ブロックの数が1である場合に、前記識別情報を符号化しない符号化部と、
前記選択ブロックに対応する動き情報に基づいて、前記対象ブロックの予測画像を生成する予測部と、
を備え、
前記判定部は、前記複数の候補ブロックのうちの2番目以降に判定を行う候補ブロックについて、前記候補ブロックが動き情報を有し、かつ、該動き情報が既に利用可能と判定された候補ブロックに対応する動き情報と一致しない場合に利用可能な候補ブロックと判定する、画像符号化装置。
a determination unit that determines whether or not a plurality of candidate blocks having a predetermined positional relationship with respect to a target block are available in accordance with a predetermined order according to the positional relationship;
a selection unit that selects a selection block from among the candidate blocks determined to be available;
when the number of candidate blocks determined to be available exceeds 1, encoding identification information specifying the selected block based on a coding rule according to the number of candidate blocks determined to be available; an encoding unit that does not encode the identification information when the number of candidate blocks determined to be usable is 1;
a prediction unit that generates a predicted image of the target block based on the motion information corresponding to the selected block;
with
The determining unit selects, among the plurality of candidate blocks, candidate blocks to be determined second and subsequent ones as candidate blocks that have motion information and that the motion information is already available. An image encoding device that determines a usable candidate block when it does not match corresponding motion information.
対象ブロックに対して予め定められた位置関係にある複数の候補ブロックが利用可能か否かを前記位置関係に応じて予め定められた順番に従って判定することと、
前記利用可能と判定された候補ブロックの中から選択ブロックを選択することと、
前記利用可能と判定された候補ブロックの数が1を超える場合に、前記利用可能と判定された候補ブロックの数に応じた符号規則に基づいて、前記選択ブロックを特定する識別情報を符号化し、前記利用可能と判定された候補ブロックの数が1である場合に、前記識別情報を符号化しないことと、
前記選択ブロックに対応する動き情報に基づいて、前記対象ブロックの予測画像を生成することと、
を備え、
前記判定することは、前記複数の候補ブロックのうちの2番目以降に判定を行う候補ブロックについて、前記候補ブロックが動き情報を有し、かつ、該動き情報が既に利用可能と判定された候補ブロックに対応する動き情報と一致しない場合に利用可能な候補ブロックと判定することを含む、画像符号化方法。
Determining whether or not a plurality of candidate blocks having a predetermined positional relationship with respect to the target block are available according to a predetermined order according to the positional relationship;
selecting a selection block from among the determined available candidate blocks;
when the number of candidate blocks determined to be available exceeds 1, encoding identification information specifying the selected block based on a coding rule according to the number of candidate blocks determined to be available; not encoding the identification information if the number of candidate blocks determined to be available is one;
generating a predicted image of the target block based on motion information corresponding to the selected block;
with
The step of determining includes determining that the candidate block has motion information and that the motion information is already available for the second and subsequent candidate blocks to be determined among the plurality of candidate blocks. A method of coding an image, comprising: determining an available candidate block if it does not match motion information corresponding to .
対象ブロックに対して予め定められた位置関係にある複数の候補ブロックが利用可能か否かを前記位置関係に応じて予め定められた順番に従って判定する判定手段、
前記利用可能と判定された候補ブロックの中から選択ブロックを選択する選択手段、
前記利用可能と判定された候補ブロックの数が1を超える場合に、前記利用可能と判定された候補ブロックの数に応じた符号規則に基づいて、前記選択ブロックを特定する識別情報を符号化し、前記利用可能と判定された候補ブロックの数が1である場合に、前記識別情報を符号化しない符号化手段、及び
前記選択ブロックに対応する動き情報に基づいて、前記対象ブロックの予測画像を生成する予測手段としてコンピュータを機能させるためのプログラムであって、
前記判定手段は、前記複数の候補ブロックのうちの2番目以降に判定を行う候補ブロックについて、前記候補ブロックが動き情報を有し、かつ、該動き情報が既に利用可能と判定された候補ブロックに対応する動き情報と一致しない場合に利用可能な候補ブロックと判定する、プログラム。
determination means for determining whether or not a plurality of candidate blocks having a predetermined positional relationship with respect to the target block are available in accordance with a predetermined order according to the positional relationship;
selecting means for selecting a selected block from among the candidate blocks determined to be available;
when the number of candidate blocks determined to be available exceeds 1, encoding identification information specifying the selected block based on a coding rule according to the number of candidate blocks determined to be available; An encoding unit that does not encode the identification information when the number of candidate blocks determined to be usable is 1, and generating a predicted image of the target block based on motion information corresponding to the selected block. A program for causing a computer to function as a means of predicting
The determination means selects a candidate block for which the second and subsequent candidate blocks among the plurality of candidate blocks are determined to have motion information and for which the motion information is already available. A program that determines an available candidate block if it does not match the corresponding motion information.
JP2021185615A 2019-10-21 2021-11-15 Image encoding method and image decoding method Active JP7242811B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
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

Applications Claiming Priority (3)

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

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2020186014A Division JP6980889B2 (en) 2019-10-21 2020-11-06 Image coding method and image decoding method

Related Child 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 (2)

Publication Number Publication Date
JP2022043034A JP2022043034A (en) 2022-03-15
JP7242811B2 true JP7242811B2 (en) 2023-03-20

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 After (2)

Application Number Title Priority Date Filing Date
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

Country Status (1)

Country Link
JP (3) JP7242811B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004241880A (en) 2003-02-04 2004-08-26 Sony Corp Apparatus and method for image processing, recording medium, and program
WO2011034148A1 (en) 2009-09-18 2011-03-24 シャープ株式会社 Encoder apparatus, decoder apparatus, moving image encoder apparatus, moving image decoder apparatus, and encoding data
JP2013517734A (en) 2010-01-19 2013-05-16 サムスン エレクトロニクス カンパニー リミテッド Method and apparatus for encoding / decoding motion vectors based on reduced predicted motion vector candidates

Family Cites Families (9)

* 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
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
EP2530937B1 (en) 2009-06-18 2015-03-18 Kabushiki Kaisha Toshiba Video encoding apparatus and video decoding apparatus
KR101522850B1 (en) 2010-01-14 2015-05-26 삼성전자주식회사 Method and apparatus for encoding/decoding motion vector

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004241880A (en) 2003-02-04 2004-08-26 Sony Corp Apparatus and method for image processing, recording medium, and program
WO2011034148A1 (en) 2009-09-18 2011-03-24 シャープ株式会社 Encoder apparatus, decoder apparatus, moving image encoder apparatus, moving image decoder apparatus, and encoding data
JP2013517734A (en) 2010-01-19 2013-05-16 サムスン エレクトロニクス カンパニー リミテッド Method and apparatus for encoding / decoding motion vectors based on reduced predicted motion vector candidates

Also Published As

Publication number Publication date
JP2022043034A (en) 2022-03-15
JP2024023525A (en) 2024-02-21
JP7399332B2 (en) 2023-12-15
JP2023056019A (en) 2023-04-18

Similar Documents

Publication Publication Date Title
JP5368631B2 (en) Image encoding method, apparatus, and program
JP6242984B2 (en) Video encoding device
JP5479648B1 (en) Image encoding method and image decoding method
JP5444497B2 (en) Image encoding method and image decoding method
JP7242811B2 (en) Image encoding method and image decoding method
JP5571262B2 (en) Image encoding method and image decoding method
JP6795666B2 (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
JP6961781B2 (en) Image coding 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
JP2014131293A (en) Image encoding method and image decoding method
JP2014131295A (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: 20211115

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221212

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20230105

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230207

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230308

R151 Written notification of patent or utility model registration

Ref document number: 7242811

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151