Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7547598B2 - Image encoding method and image decoding method - Google Patents
[go: Go Back, main page]

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

Image encoding method and image decoding method Download PDF

Info

Publication number
JP7547598B2
JP7547598B2 JP2023204699A JP2023204699A JP7547598B2 JP 7547598 B2 JP7547598 B2 JP 7547598B2 JP 2023204699 A JP2023204699 A JP 2023204699A JP 2023204699 A JP2023204699 A JP 2023204699A JP 7547598 B2 JP7547598 B2 JP 7547598B2
Authority
JP
Japan
Prior art keywords
block
motion
information
motion information
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2023204699A
Other languages
Japanese (ja)
Other versions
JP2024023525A (en
Inventor
太一郎 塩寺
沙織 浅香
昭行 谷沢
健 中條
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2023204699A priority Critical patent/JP7547598B2/en
Publication of JP2024023525A publication Critical patent/JP2024023525A/en
Priority to JP2024137017A priority patent/JP7681776B2/en
Application granted granted Critical
Publication of JP7547598B2 publication Critical patent/JP7547598B2/en
Priority to JP2025078171A priority patent/JP7802993B2/en
Priority to JP2026000586A priority patent/JP2026053717A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

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

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

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

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

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

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

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

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

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

本発明によれば、符号化効率を向上させることができる。 The present invention can improve coding efficiency.

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

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

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

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

符号化制御部150は、発生符号量のフィードバック制御、量子化制御、予測モード制御及びエントロピー符号化制御といった画像符号化部100の符号化処理全般を制御する。具体的には、符号化制御部150は、符号化制御情報50を画像符号化部100に与え、画像符号化部100からフィードバック情報51を適宜受け取る。符号化制御情報50には、予測情報、動き情報18及び量子化パラメータ情報などが含まれる。予測情報は、予測モード情報及びブロックサイズ情報を含む。動き情報18は、動きベクトル、参照フレーム番号及び予測方向(単方向予測、双方向予測)を含む。量子化パラメータ情報は、量子化幅(量子化ステップサイズ)等の量子化パラメータ及び量子化マトリクスを含む。フィードバック情報51は、画像符号化部100による発生符号量を含み、例えば、量子化パラメータを決定するのに使用される。 The coding control unit 150 controls the overall coding process of the image coding unit 100, such as feedback control of the amount of generated code, quantization control, prediction mode control, and entropy coding control. Specifically, the coding control unit 150 provides coding control information 50 to the image coding unit 100 and appropriately receives feedback information 51 from the image coding unit 100. 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 a motion vector, a reference frame number, and a prediction direction (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 generated code by the image coding 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 (e.g., macroblocks, subblocks, one pixel, etc.) obtained by dividing the original image. For this reason, the input image signal 10 is sequentially input to the image encoding unit 100 in units of pixel blocks obtained by dividing the original image. In this embodiment, the encoding process unit is a macroblock, and the pixel block (macroblock) to be encoded that corresponds to the input image signal 10 is simply referred to as the encoding target block. In addition, an image frame that includes the encoding target block, i.e., the image frame to be encoded, is referred to as the encoding target frame.

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

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

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

画像符号化部100において、入力画像信号10は、予測部101及び減算器102へ入力される。減算器102は、入力画像信号10を受け取るとともに、後述する予測部101から予測画像信号11を受け取る。減算器102は、入力画像信号10と予測画像信号11との差分を算出して、予測誤差画像信号12を生成する。 In the image encoding unit 100, the input image signal 10 is input to the prediction unit 101 and the subtractor 102. The subtractor 102 receives the input image signal 10 and also receives a predicted image signal 11 from the prediction unit 101, which will be described later. The subtractor 102 calculates the difference between the input image signal 10 and the predicted image signal 11 to generate a prediction 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, and performs a transform process on the received prediction error image signal 12 to generate transform coefficients. The transform process is, for example, an orthogonal transform such as a discrete cosine transform (DCT). In other embodiments, the transform/quantization unit 103 may generate transform coefficients using techniques such as a wavelet transform and independent component analysis instead of the discrete cosine transform. Furthermore, the transform/quantization unit 103 quantizes the generated transform coefficients based on a quantization parameter provided by the coding 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 and inverse transform unit 105 inverse quantizes the quantized transform coefficients 13 according to the quantization parameters provided by the encoding control unit 150, i.e., the same quantization parameters as those of the transform and quantization unit 103. Next, the inverse quantization and inverse transform unit 105 performs inverse transform on the inverse quantized transform coefficients to generate a decoded prediction error signal 15. The inverse transform process by the inverse quantization and inverse transform unit 105 corresponds to the inverse transform process of the transform process by the transform and quantization unit 103. For example, the inverse transform process is an inverse discrete cosine transform (IDCT) or an 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 and inverse transform unit 105, and further receives the predicted image signal 11 from the prediction unit 101. The adder 106 adds the decoded prediction error signal 15 and the predicted image signal 11 to generate a locally decoded image signal 16. The generated locally decoded image signal 16 is stored in the frame memory 107 as a reference image signal 17. The reference image signal 17 stored in the frame memory 107 is read out and referred to by the prediction unit 101 when encoding a subsequent block to be encoded.

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

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

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

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

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

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

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

なお、インター予測では、図6Aに示されるような1フレーム前の参照フレームを使用する例に限らず、図6Bに示されるように、いずれの符号化済みの参照フレームが使用されても構わない。時間位置が異なる複数の参照フレームに関する参照画像信号17が保持されている場合、どの時間位置の参照画像信号17から予測画像信号11を生成したかを示す情報は、参照フレーム番号で表わされる。参照フレーム番号は、動き情報18に含まれる。参照フレーム番号は、領域単位(ピクチャ、ブロック単位など)で変更することができる。即ち、画素ブロック毎に異なる参照フレームが使用されることができる。一例として、符号化済みの1フレーム前の参照フレームを予測に使用した場合、この領域の参照フレーム番号は、0に設定され、符号化済みの2フレーム前の参照フレームを予測に使用した場合、この領域の参照フレーム番号は、1に設定される。他の例として、1フレーム分だけの参照画像信号17がフレームメモリ107に保持されている(参照フレームの数が1である)場合、参照フレーム番号は、常に0に設定される。 Note that in inter prediction, the example is not limited to the use of the reference frame of one frame before as shown in FIG. 6A, and any coded reference frame may be used as shown in FIG. 6B. When reference image signals 17 relating to multiple reference frames at different time positions are held, information indicating which time position of the reference image signal 17 the predicted image signal 11 was generated from is represented by a reference frame number. The reference frame number is included in the motion information 18. The reference frame number can be changed in area units (pictures, blocks, etc.). That is, a different reference frame can be used for each pixel block. As an example, when a coded reference frame of one frame before is used for prediction, the reference frame number of this area is set to 0, and when a coded reference frame of two frames before is used for prediction, the reference frame number of this area is set to 1. As another example, when only one frame of reference image signals 17 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 multiple motion compensation blocks. That is, the encoding target block may be divided into multiple small pixel blocks, and motion compensation may be performed for each small pixel block. Figures 7A to 7C show the size of a motion compensation block in units of a macroblock, and Figure 7D shows the size of a motion compensation block in units of a subblock (a pixel block of 8x8 pixels or less). As shown in Figure 7A, when the encoding target block is 64x64 pixels, a 64x64 pixel block, a 64x32 pixel block, a 32x64 pixel block, or a 32x32 pixel block may be selected as the motion compensation block. Also, as shown in Figure 7B, when the encoding target block is 32x32 pixels, a 32x32 pixel block, a 32x16 pixel block, a 16x32 pixel block, or a 16x16 pixel block may be selected as the motion compensation block. Furthermore, as shown in FIG. 7C, if the block to be coded is 16×16 pixels, the motion compensation block can be set to a 16×16 pixel block, a 16×8 pixel block, an 8×16 pixel block, an 8×8 pixel block, etc. Furthermore, as shown in FIG. 7D, if the block to be coded is 8×8 pixels, the motion compensation block can be selected to be an 8×8 pixel block, an 8×4 pixel block, a 4×8 pixel block, or a 4×4 pixel block, etc.

前述したように、インター予測に使用する参照フレーム内の小画素ブロック(例えば、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 the small pixel blocks (e.g., 4x4 pixel blocks) in the reference frame used for inter prediction have motion information 18, the optimal shape and motion vector of the motion compensation block can be used according to the local characteristics of the input image signal 10. In addition, the macroblocks and sub-macroblocks in Figures 7A to 7D can be combined arbitrarily. If the block to be coded is a 64x64 pixel block as shown in Figure 7A, blocks of 64x64 to 16x16 pixels can be used hierarchically by selecting each block size shown in Figure 7B for each of the four 32x32 pixel blocks obtained by dividing the 64x64 pixel block. Similarly, if block sizes up to those shown in Figure 7D can be selected, block sizes of 64x64 to 4x4 can be used hierarchically.

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

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

また、図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 block to be coded may be selected as spatial motion reference blocks. In the example of FIG. 8D, the number of spatial motion reference blocks is 8.

さらに、時間方向動き参照ブロックは、図8Eに示されるように、各ブロックTA~TEの一部が重なり合っていてもよく、図8Fに示されるように、各ブロックTA~TEが離れて配置されていても構わない。図8Eでは、時間方向動き参照ブロックTA及びTBが重なりあっている部分が斜線で示されている。さらにまた、時間方向動き参照ブロックは、必ずしも符号化対象ブロックに対応する位置(Collocate位置)のブロック及びその周囲に位置するブロックである例に限らず、参照フレーム内のいずれの位置に配置されているブロックであっても構わない。例えば、参照ブロックの位置、及び符号化対象ブロックに隣接するいずれかの符号化済みのブロックが有する動き情報18で特定される、参照フレーム内のブロックを中心ブロック(例えば、ブロックTA)として、この中心ブロック及びその周囲のブロックが時間方向動き参照ブロックとして選択されても構わない。さらに、時間方向参照ブロックは、中心ブロックから等間隔に配置されていなくても構わない。 Furthermore, the time-direction motion reference blocks may be arranged such that the blocks TA to TE overlap each other as shown in FIG. 8E, or may be arranged so that the blocks TA to TE are spaced apart as shown in FIG. 8F. In FIG. 8E, the overlapping portions of the time-direction motion reference blocks TA and TB are indicated by diagonal lines. Furthermore, the time-direction motion reference block is not necessarily limited to a block at a position (Collocate position) corresponding to the block to be coded and a block located around it, but may be a block located at any position in the reference frame. For example, a block in the reference frame specified by the position of the reference block and the motion information 18 of any coded block adjacent to the block to be coded may be set as a central block (e.g., block TA), and this central block and its surrounding blocks may be selected as the time-direction motion reference block. Furthermore, the time-direction reference blocks may not be arranged at equal intervals from the central block.

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

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

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

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

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

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

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

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

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

なお、図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 motion reference block p is an intra-prediction coded block, the available block acquisition unit 109 may determine that the motion reference block p is an unavailable block. In other words, the process may proceed to step S802 only if all of the blocks in the temporal motion reference block p are coded using inter-prediction.

図12Aから図12Eは、ステップS803の動き情報18の比較において、動き参照ブロックpの動き情報18と、利用可能ブロックqの動き情報18とが同一であると判定される例を示す。図12Aから図12Eには、各々、斜線が施された複数のブロックと、2つの白塗りのブロックとが示されている。図12Aから図12Eでは、説明を簡単にするために、斜線が施されたブロックを考慮せずに、これらの2つの白塗りのブロックの動き情報18を比較する場合を想定している。2つの白塗りのブロックの一方が、動き参照ブロックpであり、他方が既に利用可能と判定されている動き参照ブロックq(利用可能ブロックq)であるものとする。特に断りのない限り、2つの白色ブロックのいずれが動き参照ブロックpであっても構わない。 Figures 12A to 12E show an example in which the motion information 18 of the motion reference block p and the motion information 18 of the available block q are determined to be the same in the comparison of the motion information 18 in step S803. Each of Figures 12A to 12E shows a number of shaded blocks and two white blocks. For ease of explanation, Figures 12A to 12E assume that the motion information 18 of these two white blocks is compared without taking the shaded blocks into account. One of the two white blocks is assumed to be the motion reference block p, and the other is assumed to be the motion reference block q that has already been 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のサイズが同一である必要はない。 Figure 12A shows an example in which both the motion reference block p and the available block q are spatial direction blocks. In the example of Figure 12A, if the motion information 18 of blocks A and B is the same, it is determined that the motion information 18 is the same. In this case, the sizes of blocks A and B do not need to be the same.

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

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

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

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

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

このようにして、ステップS803では、動き参照ブロックpの動き情報18と利用可能ブロックqの動き情報18とが同一であるか否かが判定される。図12Aから図12Fの例では、動き参照ブロックpと比較する利用可能ブロックqの数を1として説明したが、利用可能ブロックqの数が2以上の場合においては、動き参照ブロックpの動き情報18と、各々の利用可能ブロックqの動き情報18とを比較しても構わない。また、後述するスケーリングを適用する場合、スケーリング後の動き情報18が上記説明の動き情報18となる。 In this way, in step S803, it is determined whether the motion information 18 of the motion reference block p and the motion information 18 of the available block q are the same. In the examples of Figures 12A to 12F, the number of available blocks q to be compared with the motion reference block p is described as 1, but if the number of available blocks q is 2 or more, the motion information 18 of the motion reference block p may be compared with the motion information 18 of each available block q. Furthermore, 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 identical 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 the two motion vectors is within a predetermined range, the motion information of the motion reference block p and the motion information of the available block q may be considered to be substantially identical.

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

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

時間方向動き情報取得部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 available block information 30 and reference motion information 19 related to 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 motion information 18B. The temporal motion reference block is divided into a plurality of small pixel blocks, and each small pixel block has motion information 19. As shown in FIG. 14, the motion information 18B output by the temporal motion information acquisition unit 111 includes a group of motion information 19 of each small pixel block in the available block. When the motion information 18B includes a group of motion information 19, motion compensation prediction can be performed on the encoding target block in units of small pixel blocks into which the encoding target block is divided. When the information shown in FIG. 11 is input as available block information 30, the time direction motion information acquisition unit 111 generates two motion information outputs 18B, and each motion information output includes a group of available blocks and motion information 19 that the available blocks have.

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

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

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

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

動き補償部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 a group of motion information) of the selected block selected by the motion information selection unit 118. 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 (e.g., 4×4 pixel blocks) and applies the corresponding motion information 18 to each of these small pixel blocks to obtain the predicted image signal 11 from the reference image signal 17. The position of the block from which the predicted image signal 11 is obtained is 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, for example.

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

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

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

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

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

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

動きベクトルブロック内の参照動きベクトルを、符号化対象ブロック内の小画素ブロックの動きベクトルとして代入する際には、(A)参照動きベクトルのマイナス値(反転ベクトル)を代入してもよく、或いは(B)小ブロックに対応する参照動きベクトルと、この参照動きベクトルに隣接する参照動きベクトルを用いた加重平均値若しくはメディアン値、最大値、最小値を代入しても構わない。 When substituting a reference motion vector in a motion vector block as a motion vector for a small pixel block in the block to be coded, (A) the negative value (inverse vector) of the reference motion vector may be substituted, or (B) a weighted average, median, maximum, or minimum value of the reference motion vector corresponding to the small block and the 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を出力する。 Figure 16 shows an outline of the operation of the prediction unit 101. As shown in Figure 16, first, a reference frame (motion reference frame) including a time-direction reference motion block is acquired (step S1501). The motion reference frame is typically a reference frame that is the shortest in time distance from the encoding target frame and is a reference frame that is temporally past. For example, the motion reference frame is a frame that was encoded immediately before the encoding target frame. In another example, any reference frame whose motion information 18 is stored in the motion information memory 108 may be acquired as the motion reference frame. Next, the spatial direction motion information acquisition unit 110 and the time direction motion information acquisition unit 111 each acquire the available block information 30 output from the available block acquisition unit 109 (step S1502). Next, the motion information changeover switch 112 selects one of the available blocks as a selected block according to, for example, Equation 1 (step S1503). Next, 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 reference block, the motion information 18 of the selected block is copied to the coding reference block as shown in FIG. 17. Also, if the selected block is a temporal reference block, a group of motion information 18 of the selected block is copied to the coding target block together with position information. Next, motion compensation is performed using the motion information 18 or the group of motion information 18 copied by the motion compensation unit 113, and the predicted image signal 11 and the motion information 18 used for the motion compensation prediction are output.

図18は、可変長符号化部104のより詳細な構成を示している。可変長符号化部104は、図18に示されるように、パラメータ符号化部114、変換係数符号化部115、選択ブロック符号化部116及び多重化部117を備えている。パラメータ符号化部114は、変換係数情報13及び選択ブロック情報31を除く、予測モード情報、ブロックサイズ情報、量子化パラメータ情報などの復号に必要になるパラメータを符号化し、符号化データ14Aを生成する。変換係数符号化部115は、変換係数情報13を符号化して、符号化データ14Bを生成する。また、選択ブロック符号化部116は、利用可能ブロック情報30を参照して、選択ブロック情報31を符号化し、符号化データ14Cを生成する。 Figure 18 shows a more detailed configuration of the variable length coding unit 104. As shown in Figure 18, 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. The parameter coding unit 114 codes parameters required for decoding, such as prediction mode information, block size information, and quantization parameter information, excluding the transform coefficient information 13 and the selected block information 31, to generate coded data 14A. The transform coefficient coding unit 115 codes the transform coefficient information 13 to generate coded data 14B. The selected block coding unit 116 codes the selected block information 31 with reference to the available block information 30, to generate coded 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. 19, among a plurality of predefined motion reference blocks, unavailable motion reference blocks are excluded, and only available motion reference blocks are converted into syntax (stds_idx). In FIG. 19, five of the nine motion reference blocks are unavailable, so the syntax stds_idx is assigned in order starting from 0 to the four remaining motion reference blocks excluding these. In this example, the selected block information to be coded is selected from four available blocks, rather than nine, so the amount of code (number of bins) to be assigned is smaller 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値化方法が用意され、符号化対象ブロック毎に適用的に切り替えられても構わない。 Figure 20 shows an example of a code table showing the syntax stds_idx and the binary information (bin) of the syntax stds_idx. As shown in Figure 18, the fewer the number of available motion reference blocks, the lower 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 has the same number of bins for each number of available blocks, or may be binarized according to a binarization method determined by pre-learning. In addition, multiple binarization methods may be prepared and switched appropriately for each block to be encoded.

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

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

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

ここで、curPOCは符号化対象フレームのPOC(Picture Order Count)を示し、colPOCは動き参照フレームのPOCを示し、refPOCは選択ブロックが参照するフレームiのPOCを示している。また、Clip(min,max,target)はtargetがminより小さい値になる場合にはminを出力し、maxより大きい値になる場合にはmaxを出力し、それ以外の場合にはtargetを出力するクリップ関数である。また、DiffPicOrderCnt(x,y)は2つのPOCの差分を計算する関数である。 Here, curPOC indicates the POC (Picture Order Count) of the frame to be coded, colPOC indicates the POC of the motion reference frame, and refPOC indicates the POC of frame i referenced by the selected block. Also, Clip(min, max, target) is a clip function that outputs min if target is a value smaller than min, outputs max if target is a value larger than max, and outputs target in all other cases. 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が算出される。
If the motion vector of the selected block is MVr=(MVr_x, MVr_y) and the motion vector to be applied to the current block to be coded is MV=(MV_x, MV_y), the motion vector MV is calculated by the following Equation 7.

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

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

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

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

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

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

各パートは、さらに詳細なシンタクスを含む。ハイレベルシンタクス901は、シーケンスパラメータセットシンタクス902及びピクチャパラメータセットシンタクス903などのシーケンス及びピクチャレベルのシンタクスを含む。スライスレベルシンタクス904は、スライスヘッダーシンタクス905及びスライスデータシンタクス906などを含む。さらに、マクロブロックレベルシンタクス907は、マクロブロックレイヤーシンタクス908及びマクロブロックプレディクションシンタクス909などを含む。 Each part includes 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 and slice data syntax 906. Furthermore, macroblock level syntax 907 includes macroblock layer syntax 908 and macroblock prediction syntax 909.

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

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

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

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

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

ここで、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, when the selected block indicated by stds_idx is Spatial Left (a pixel block adjacent to the left side of the encoding target block), the motion information of the pixel block adjacent to the left side of the encoding target block is used as the motion information of the encoding target block, so stds_idx has the same meaning as performing prediction on the encoding target block using the horizontally long rectangular blocks indicated by mb_type=4,6,8,10,12,14,16,18,20 in FIG. 24A. Also, when the selected block indicated by stds_idx is Spatial Up, the motion information adjacent to the upper side of the encoding target block is used as the motion information of the encoding target block, so stds_idx has the same meaning as performing prediction on the vertically long rectangular blocks indicated by mb_type=5,7,9,11,13,15,17,19,21 in FIG. 24A. Therefore, by using stds_idx, it is possible to create a code table with the columns of mb_type=4 to 21 in FIG. 24A reduced, as shown in FIG. 24B. Similarly, for the mb_type and the code table corresponding to the mb_type for P slices in H.264 shown in FIG. 24C, it is possible to create a code table with a reduced number of mb_types as shown in FIG. 24D.

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

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

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

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

(第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 coding device according to the second embodiment of the present invention. In the second embodiment, the parts and operations different from those of the first embodiment will be mainly described. As shown in FIG. 26, the image coding unit 200 according to this embodiment is different from the first embodiment in the configuration of the prediction unit 201 and the variable-length coding unit 204. As shown in FIG. 27, the prediction unit 201 includes a first prediction unit 101 and a second prediction unit 202, and selectively switches between the first and second prediction units 101 and 202 to generate a predicted image signal 11. The first prediction unit 101 has the same configuration as the prediction unit 101 according to the first embodiment (FIG. 1), and generates a predicted image signal 11 according to a prediction method (first prediction method) that performs motion compensation using the motion information 18 of the selected block. The second prediction unit 202 generates a predicted image signal 11 according to a prediction method (second prediction method) such as H.264 that performs motion compensation using one motion vector for the block to be coded. The second prediction unit 202 generates a predicted image signal 11B using the input image signal 10 and a reference image signal 17 from the frame memory.

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

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

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

図29は、可変長符号化部204の構成を概略的に示している。図29に示した可変長符号化部204は、図18に示した可変長符号化部104の構成に加えて、動き情報符号化部217を備えている。また、図29の選択ブロック符号化部216は、図18の選択ブロック符号化部116と異なり、予測切替情報32を符号化して、符号化データ14Dを生成する。予測処理を第1予測部101が実行した場合には、選択ブロック符号化部216は、利用可能ブロック情報30及び選択ブロック情報31をさらに符号化する。符号化された利用可能ブロック情報30及び選択ブロック情報31は、符号化データ14Dに含まれる。予測処理を第2予測部202が実行した場合には、動き情報符号化部217が動き情報18を符号化し、符号化データ14Eを生成する。選択ブロック符号化部216及び動き情報符号化部217は、各々、予測画像が選択ブロックの動き情報を用いた動き補償予測により生成されたかどうかを示す予測切替情報32に基づいて、予測処理を第1予測部101及び第2予測部202のどちらが実行されたかを判定する。 Figure 29 shows a schematic configuration of the variable-length coding unit 204. The variable-length coding unit 204 shown in Figure 29 includes a motion information coding unit 217 in addition to the configuration of the variable-length coding unit 104 shown in Figure 18. The selection block coding unit 216 in Figure 29 differs from the selection block coding unit 116 in Figure 18 in that it codes the prediction switching information 32 to generate the coded data 14D. When the first prediction unit 101 performs the prediction process, the selection block coding unit 216 further codes the available block information 30 and the selected block information 31. The coded available block information 30 and the selected block information 31 are included in the coded data 14D. When the second prediction unit 202 performs the prediction process, the motion information coding unit 217 codes the motion information 18 to generate the coded data 14E. The selected block coding unit 216 and the motion information coding unit 217 each determine whether the prediction process was performed by the first prediction unit 101 or the second prediction unit 202, based on prediction switching information 32, which indicates whether the predicted image was generated by motion compensation prediction using the motion information of the selected block.

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

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

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

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

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

(第3の実施形態)
図31は、第3の実施形態に係る画像復号化装置を概略的に示している。この画像復号化装置は、図31に示されるように、画像復号化部300、復号化制御部350及び出力バッファ308を備えている。画像復号化部300は、復号化制御部350により制御される。第3の実施形態に係る画像復号化装置は、第1の実施形態に係る画像符号化装置に対応する。即ち、図31の画像復号化装置による復号処理は、図1の画像符号化処理による符号化処理と相補的な関係を有している。図31の画像復号化装置は、LSIチップなどのハードウェアにより実現されてもよく、或いは、コンピュータに画像復号化プログラムを実行させることにより実現されても構わない。
Third Embodiment
FIG. 31 is a schematic diagram of an image decoding device according to the third embodiment. As shown in FIG. 31, this image decoding device includes an image decoding unit 300, a decoding control unit 350, and an output buffer 308. The image decoding unit 300 is controlled by the decoding control unit 350. The image decoding device according to the third embodiment corresponds to the image coding device according to the first embodiment. That is, the decoding process by the image decoding device of FIG. 31 has a complementary relationship with the coding process by the image coding process of FIG. 1. The image decoding device of FIG. 31 may be realized by hardware such as an LSI chip, or may be realized 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 of FIG. 31 includes a coded sequence decoding unit 301, an inverse quantization and inverse transformation unit 302, an adder 303, a frame memory 304, a prediction unit 305, a motion information memory 306, and an available block acquisition unit 307. In the image decoding unit 300, coded data 80 from a storage system or transmission system (not shown) is input to the 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 device of FIG. 1.

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

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

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

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

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

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

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

動き情報メモリ306は、予測部305から動き情報38を受け取り、参照動き情報39として一時的に格納する。動き情報メモリ306は、予測部305から出力された動き情報38を参照動き情報39として一時保存する。図4は、動き情報メモリ306の一例を示す。動き情報メモリ306は、符号化時間の異なる複数の動き情報フレーム26を保持している。復号化が終了した動き情報38又は動き情報38の群は、参照動き情報39として復号化時間に対応した動き情報フレーム26に保存される。動き情報フレーム26では、参照動き情報39は、例えば4×4画素ブロック単位で保存されている。動き情報メモリ306が保持している参照動き情報39は、予測部305によって、復号化対象ブロックの動き情報38を生成する際に読み出され参照される。 The motion information memory 306 receives the motion information 38 from the prediction unit 305 and temporarily stores it as reference motion information 39. The motion information memory 306 temporarily saves the motion information 38 output from the prediction unit 305 as reference motion information 39. FIG. 4 shows an example of the motion information memory 306. The motion information memory 306 holds a plurality of motion information frames 26 with different encoding times. The motion information 38 or a group of motion information 38 for which 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 in units of, for example, 4×4 pixel blocks. The reference motion information 39 held in 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, the motion reference block and available block according to this embodiment will be described. The motion reference block is a candidate block selected from an already decoded area according to a method predetermined by the image encoding device and image decoding device described above. 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 frame to be decoded and five motion reference blocks in the reference frame. The motion reference blocks A, B, C, and D in the frame to be decoded in FIG. 8A are adjacent blocks to the left, top, top right, and top left of the block to be decoded. In this embodiment, the motion reference block selected from the frame to be decoded that includes the block to be decoded is called a spatial motion reference block. In addition, the motion reference block TA in the reference frame is a pixel block in the same position as the block to be decoded in the reference frame, and pixel blocks TB, TC, TD, and TE that are adjacent to this motion reference block TA are selected as the motion reference block. The motion reference block selected from the pixel blocks in the reference frame is called a temporal motion reference block. In addition, the frame in which the time-direction motion reference block is located is called the 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. 8B, a pixel block to which pixels a, b, c, and d adjacent to the block to be decoded belong may be selected as the spatial motion reference block. In this case, the relative positions (dx, dy) of pixels a, b, c, and d with respect to the top 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 block to be decoded may be selected as spatial motion reference blocks. In FIG. 8D, the number of spatial motion reference blocks is 8.

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

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

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

次に、利用可能ブロック取得部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 in the first embodiment, and acquires reference motion information 39 from the motion information memory 306, and outputs available block information 60, which is information indicating available or unavailable blocks for each motion reference 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. 9. 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, if the temporal motion reference block is a block in an I slice without motion information, or if all small pixel blocks in the temporal motion reference block have been intra-prediction decoded, the process proceeds to step S805. In step S805, this motion reference block p is determined to be an unavailable block.

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

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

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

図12Aから図12Eは、ステップS803の動き情報38の比較において、動き参照ブロックpの動き情報38と、利用可能ブロックqの動き情報38とが同一であると判定される例を示す。図12Aから図12Eには、各々、斜線が施された複数のブロックと、2つの白塗りのブロックとが示されている。図12Aから図12Eでは、説明を簡単にするために、斜線が施されたブロックを考慮せずに、これらの2つの白塗りのブロックの動き情報38を比較する場合を想定している。2つの白塗りのブロックの一方が、動き参照ブロックpであり、他方が既に利用可能と判定されている動き参照ブロックq(利用可能ブロックq)であるものとする。特に断りのない限り、2つの白色ブロックのいずれが動き参照ブロックpであっても構わない。 Figures 12A to 12E show an example in which the motion information 38 of the motion reference block p and the motion information 38 of the available block q are determined to be the same in the comparison of the motion information 38 in step S803. Each of Figures 12A to 12E shows a number of shaded blocks and two white blocks. For ease of explanation, Figures 12A to 12E assume that the motion information 38 of these two white blocks is compared without taking the shaded blocks into account. One of the two white blocks is assumed to be the motion reference block p, and the other is assumed to be the motion reference block q that has already been 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のサイズが同一である必要はない。 Figure 12A shows an example in which both the motion reference block p and the available block q are spatial direction blocks. In the example of Figure 12A, if the motion information 38 of blocks A and B is the same, it is determined that the motion information 38 is the same. In this case, the sizes of blocks A and B do not need to be the same.

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

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

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

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

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

このようにして、ステップS803では、動き参照ブロックpの動き情報38と利用可能ブロックqの動き情報38とが同一であるか否かが判定される。図12Aから図12Fの例では、動き参照ブロックpと比較する利用可能ブロックqの数を1として説明したが、利用可能ブロックqの数が2以上の場合においては、動き参照ブロックpの動き情報38と、各々の利用可能ブロックqの動き情報38とを比較しても構わない。また、後述するスケーリングを適用する場合、スケーリング後の動き情報38が上記説明の動き情報38となる。 In this way, in step S803, it is determined whether the motion information 38 of the motion reference block p and the motion information 38 of the available block q are the same. In the examples of Figures 12A to 12F, the number of available blocks q to be compared with the motion reference block p is 1, but if the number of available blocks q is 2 or more, the motion information 38 of the motion reference block p may be compared with the motion information 38 of each available block q. Furthermore, 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 identical 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 the two motion vectors is within a predetermined range, the motion information of the motion reference block p and the motion information of the available block q may be considered to be substantially identical.

図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 coded data 80 into syntax units, a transform coefficient decoding unit 322 that decodes transform coefficients, a selection block decoding unit 323 that decodes selection block information, and a parameter decoding unit 321 that decodes prediction block size, quantization-related parameters, and the like.

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

次に、図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.
33, the prediction unit 305 includes a motion information selection unit 314 and a motion compensation unit 313, and the motion information selection unit 314 includes a spatial motion information acquisition unit 310, a temporal motion information acquisition unit 311, and a motion information changeover switch 312. 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 as input, and outputs the predicted image signal 35 and the motion information 38. The spatial motion information acquisition unit 310 and the temporal motion information acquisition unit 311 have the same functions as the spatial motion information acquisition unit 110 and the temporal motion information acquisition unit 111 described in the first embodiment, respectively. The spatial motion information acquisition unit 310 uses the available block information 60 and the reference motion information 39 to generate motion information 38A including the motion information and index of each available block located in the spatial direction. The temporal motion information acquisition unit 311 uses the available block information 60 and the reference motion information 39 to generate motion information (or a group of motion information) 38B including the motion information and index of each available block located in the temporal direction.

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

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

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

各パートは、さらに詳細なシンタクスを含む。ハイレベルシンタクス901は、シーケンスパラメータセットシンタクス902及びピクチャパラメータセットシンタクス903などのシーケンス及びピクチャレベルのシンタクスを含む。スライスレベルシンタクス904は、スライスヘッダーシンタクス905及びスライスデータシンタクス906などを含む。さらに、マクロブロックレベルシンタクス907は、マクロブロックレイヤーシンタクス908及びマクロブロックプレディクションシンタクス909などを含む。 Each part includes 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 and slice data syntax 906. Furthermore, macroblock level syntax 907 includes macroblock layer syntax 908 and macroblock prediction syntax 909.

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

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

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

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

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

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

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

図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を得る。 Figure 35 is a block diagram showing the coded sequence decoding unit 401 in more detail. The coded sequence decoding unit 401 shown in Figure 35 includes a motion information decoding unit 424 in addition to the configuration of the coded sequence decoding unit 301 shown in Figure 32. The selected block decoding unit 423 shown in Figure 35 differs from the selected block decoding unit 323 shown in Figure 32 in that it decodes the coded data 80C related to the selected block to obtain prediction switching information 62. The prediction switching information 62 indicates whether the prediction unit 101 in the image coding device of Figure 1 used the first or second prediction method. When the prediction switching information 62 indicates that the prediction unit 101 used the first prediction method, that is, when the block to be decoded is coded using the first prediction method, the selected block decoding unit 423 decodes the selected block information in the coded data 80C to obtain selected block information 61. If the prediction switching information 62 indicates that the prediction unit 101 used the second prediction method, i.e., if the block to be decoded is coded using the second prediction method, the selected block decoding unit 423 does not decode the selected block information, and the motion information decoding unit 424 decodes the coded motion information 80D to obtain 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に送る。 Figure 36 is a block diagram showing the prediction unit 405 in more detail. The prediction unit 405 shown in Figure 34 includes a first prediction unit 305, a second prediction unit 410, and a prediction method changeover switch 411. The second prediction unit 410 performs motion compensation prediction similar to that of the motion compensation unit 313 in Figure 33 using the motion information 40 decoded by the coded sequence decoding unit 401 and the reference image signal 37, and generates a predicted image signal 35B. The first prediction unit 305 is the same as the prediction unit 305 described in the third embodiment, and generates a predicted image signal 35B. In addition, the prediction method changeover switch 411 selects either the predicted image signal 35B from the second prediction unit 410 or the predicted image signal 35A from the first prediction unit 305 based on the prediction changeover information 62, and outputs it as the predicted image signal 35 of the prediction unit 405. At the same time, the prediction method changeover 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 motion information 38.

次に、本実施の形態に関するシンタクス構造について、第3の実施形態と異なる点を主に説明する。 Next, we will explain the syntax structure of this embodiment, focusing on 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 if this value is greater than 1, the selected block decoding unit 423 decodes the selected block information in the encoded data 80C. stds_flag is a flag indicating whether the motion information of the selected block was used as the motion information of the block to be decoded in the motion compensation prediction, that is, a flag indicating whether the prediction method changeover switch 411 selected the first prediction unit 305 or the second prediction unit 410. If the number of available blocks is greater than 1 and stds_flag is 1, it indicates that the motion information of the selected block was used for the motion compensation prediction. If stds_flag is 0, the motion information of the selected block is not used, and the motion information is directly or predicted differential value is encoded as in H.264. Furthermore, stds_idx indicates the selected block information, and the code table according to the number of available blocks is as described above.

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

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

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

なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除しても構わない。さらに、異なる実施形態にわたる構成要素を適宜組み合わせても構わない。 The present invention is not limited to the above-described embodiment as it is, and in the implementation stage, the components can be modified and embodied without departing from the gist of the invention. In addition, various inventions can be formed by appropriately combining the multiple components disclosed in the above-described embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, components from different embodiments may be appropriately combined.

この一例として、上述した第1から第4の実施形態を次のように変形しても同様の効果が得られる。 As an example, the same effect 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, a frame to be processed is divided into rectangular blocks such as 16x16 pixel blocks, and encoding or decoding is performed in an order from the pixel block in the upper left of the screen to the pixel block in the lower right as shown in FIG. 4, but the encoding or decoding order is not limited to this example. For example, the encoding or decoding order may be from the lower right to the upper left of the screen, or from the upper right to the lower left. The encoding or decoding order may also be in a spiral order from the center to the periphery of the screen, or from the periphery to the center of the screen.

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

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

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

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...prediction 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...encoding control information, 51...feedback information, 60...available block information, 61...selected block information, 62...prediction measurement switching information, 70...decoding control information, 71...control information, 80...encoded data, 100...image encoding unit, 101...prediction unit, 102...subtractor, 103...transformation and quantization unit, 104...variable length encoding unit, 105...inverse quantization and inverse transformation unit, 106...adder, 107...frame memory, 108...information memory, 109...available block acquisition unit, 110...spatial direction motion information acquisition unit, 111...temporal direction motion information acquisition unit, 112...information changeover switch, 113...motion compensation unit, 114...parameter encoding unit, 115...transformation coefficient encoding unit, 116...selected block encoding unit, 117...multiplexing unit, 118...motion information selection unit, 120...output buffer, 150...encoding control unit, 200...image encoding unit, 201... prediction unit, 202... second prediction unit, 203... prediction method changeover switch, 204... variable length coding unit, 205... motion information acquisition unit, 216... selected block coding unit, 217... motion information coding unit, 300... image decoding unit, 301... coded sequence decoding unit, 301... coded sequence decoding unit, 302... inverse quantization and 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... temporal 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... conversion unit, Transform coefficient decoding unit, 323...selected block decoding unit, 350...decoding control unit, 400...image decoding unit, 401...coded sequence decoding unit, 405...prediction unit, 410...second prediction unit, 411...prediction method changeover switch, 423...selected block decoding unit, 424...information decoding unit, 901...high level syntax, 902...sequence parameter set syntax, 903...picture parameter set syntax, 904...slice level syntax, 905...slice header syntax, 906...slice data syntax, 907...macroblock level syntax, 908...macroblock layer syntax, 909...macroblock prediction syntax.

Claims (1)

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

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2023204699A JP7547598B2 (en) 2019-10-21 2023-12-04 Image encoding method and image decoding method
JP2024137017A JP7681776B2 (en) 2019-10-21 2024-08-16 Image encoding method and image decoding method
JP2025078171A JP7802993B2 (en) 2019-10-21 2025-05-08 Image encoding method and image decoding method
JP2026000586A JP2026053717A (en) 2019-10-21 2026-01-05 Image encoding method and image decoding method

Applications Claiming Priority (5)

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

Related Parent Applications (1)

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

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2024137017A Division JP7681776B2 (en) 2019-10-21 2024-08-16 Image encoding method and image decoding method

Publications (2)

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

Family

ID=69619522

Family Applications (9)

Application Number Title Priority Date Filing Date
JP2019191781A Active JP6795666B2 (en) 2019-10-21 2019-10-21 Image coding method and image decoding method
JP2020186015A Active JP6961781B2 (en) 2019-10-21 2020-11-06 Image coding method and image decoding method
JP2020186014A Active JP6980889B2 (en) 2019-10-21 2020-11-06 Image coding method and image decoding method
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 Active JP7547598B2 (en) 2019-10-21 2023-12-04 Image encoding method and image decoding method
JP2024137017A Active JP7681776B2 (en) 2019-10-21 2024-08-16 Image encoding method and image decoding method
JP2025078171A Active JP7802993B2 (en) 2019-10-21 2025-05-08 Image encoding method and image decoding method
JP2026000586A Pending JP2026053717A (en) 2019-10-21 2026-01-05 Image encoding method and image decoding method

Family Applications Before (5)

Application Number Title Priority Date Filing Date
JP2019191781A Active JP6795666B2 (en) 2019-10-21 2019-10-21 Image coding method and image decoding method
JP2020186015A Active JP6961781B2 (en) 2019-10-21 2020-11-06 Image coding method and image decoding method
JP2020186014A Active JP6980889B2 (en) 2019-10-21 2020-11-06 Image coding method and image decoding method
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

Family Applications After (3)

Application Number Title Priority Date Filing Date
JP2024137017A Active JP7681776B2 (en) 2019-10-21 2024-08-16 Image encoding method and image decoding method
JP2025078171A Active JP7802993B2 (en) 2019-10-21 2025-05-08 Image encoding method and image decoding method
JP2026000586A Pending JP2026053717A (en) 2019-10-21 2026-01-05 Image encoding method and image decoding method

Country Status (1)

Country Link
JP (9) JP6795666B2 (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004040785A (en) 2002-06-03 2004-02-05 Microsoft Corp Time and space prediction of bidirectional prediction (b) picture, and moving vector prediction of plural picture reference moving compensations
JP2004056823A (en) 2002-07-16 2004-02-19 Samsung Electronics Co Ltd Motion vector encoding / decoding method and apparatus
JP2004104159A (en) 2002-07-03 2004-04-02 Ntt Docomo Inc Variable length code generation device, variable length decoding device, variable length code generation method, and variable length decoding method
JP2004165703A (en) 2002-09-20 2004-06-10 Toshiba Corp Moving picture encoding method and decoding method
JP2004208259A (en) 2002-04-19 2004-07-22 Matsushita Electric Ind Co Ltd Motion vector calculation method
JP2008278091A (en) 2007-04-27 2008-11-13 Hitachi Ltd Moving image recording method and apparatus
JP2010010950A (en) 2008-06-25 2010-01-14 Toshiba Corp Image coding/decoding method and apparatus
WO2010146696A1 (en) 2009-06-18 2010-12-23 株式会社 東芝 Dynamic image encoding device and dynamic image decoding device
WO2011087321A2 (en) 2010-01-14 2011-07-21 Samsung Electronics Co., Ltd. Method and apparatus for encoding and decoding motion vector
WO2011090314A2 (en) 2010-01-19 2011-07-28 Samsung Electronics Co., Ltd. Method and apparatus for encoding and decoding motion vector based on reduced motion vector predictor candidates

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4536325B2 (en) 2003-02-04 2010-09-01 ソニー株式会社 Image processing apparatus and method, recording medium, and program
JPWO2011034148A1 (en) 2009-09-18 2013-02-14 シャープ株式会社 Encoding device, decoding device, moving image encoding device, moving image decoding device, and encoded data

Patent Citations (10)

* 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 calculation method
JP2004040785A (en) 2002-06-03 2004-02-05 Microsoft Corp Time and space prediction of bidirectional prediction (b) picture, and moving vector prediction of plural picture reference moving compensations
JP2004104159A (en) 2002-07-03 2004-04-02 Ntt Docomo Inc Variable length code generation device, variable length decoding device, variable length code generation method, and variable length decoding method
JP2004056823A (en) 2002-07-16 2004-02-19 Samsung Electronics Co Ltd Motion vector encoding / decoding method and apparatus
JP2004165703A (en) 2002-09-20 2004-06-10 Toshiba Corp Moving picture encoding method and decoding method
JP2008278091A (en) 2007-04-27 2008-11-13 Hitachi Ltd Moving image recording method and apparatus
JP2010010950A (en) 2008-06-25 2010-01-14 Toshiba Corp Image coding/decoding method and apparatus
WO2010146696A1 (en) 2009-06-18 2010-12-23 株式会社 東芝 Dynamic image encoding device and dynamic image decoding device
WO2011087321A2 (en) 2010-01-14 2011-07-21 Samsung Electronics Co., Ltd. Method and apparatus for encoding and decoding motion vector
WO2011090314A2 (en) 2010-01-19 2011-07-28 Samsung Electronics Co., Ltd. Method and apparatus for encoding and decoding motion vector based on reduced motion vector predictor candidates

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Takeshi Chujoh et al.,Description of video coding technology proposal by TOSHIBA,Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11,JCTVC-A117r1,1st Meeting: Dresden, DE,2010年04月,pp.1-6

Also Published As

Publication number Publication date
JP6961781B2 (en) 2021-11-05
JP7802993B2 (en) 2026-01-20
JP7399332B2 (en) 2023-12-15
JP2021036704A (en) 2021-03-04
JP2023056019A (en) 2023-04-18
JP7242811B2 (en) 2023-03-20
JP2026053717A (en) 2026-03-25
JP2024023525A (en) 2024-02-21
JP2022043034A (en) 2022-03-15
JP2021036703A (en) 2021-03-04
JP6795666B2 (en) 2020-12-02
JP2025111812A (en) 2025-07-30
JP7681776B2 (en) 2025-05-22
JP2020025308A (en) 2020-02-13
JP6980889B2 (en) 2021-12-15
JP2024157009A (en) 2024-11-06

Similar Documents

Publication Publication Date Title
JP5368631B2 (en) Image encoding method, apparatus, and program
JP5479648B1 (en) Image encoding method and image decoding method
JP7547598B2 (en) Image encoding method and image decoding method
JP5444497B2 (en) Image encoding method and image decoding method
JP2014131293A (en) Image encoding method and image decoding method
JP5571262B2 (en) Image encoding method and image decoding method
JP6609004B2 (en) Image encoding method and image decoding method
JP6367452B2 (en) Image encoding method and image decoding method
JP6370977B2 (en) Image encoding method and image decoding method
JP6271694B2 (en) Image encoding method and image decoding method
JP6196341B2 (en) Image encoding method and image decoding method
JP5659314B1 (en) Image encoding method and image decoding method
JP5509398B1 (en) Image encoding method and image decoding method
JP5571229B2 (en) Image encoding method and image decoding method
CN103227922B (en) Picture decoding method and picture decoding apparatus
JP2014131295A (en) Image encoding method and image decoding method
CN103826130B (en) Picture decoding method and picture decoding apparatus
JP2015053729A (en) Image encoding method, and image decoding method
CN103813168A (en) Image coding method and image coding device
CN103813164A (en) Image decoding method and image decoding device
CN103747252A (en) Image decoding method and image decoding device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20231204

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: 20240806

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240828

R150 Certificate of patent or registration of utility model

Ref document number: 7547598

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150