JP5925855B2 - Image decoding apparatus, method and program, first program and second program, server system, and download control method - Google Patents

Image decoding apparatus, method and program, first program and second program, server system, and download control method Download PDF

Info

Publication number
JP5925855B2
JP5925855B2 JP2014189256A JP2014189256A JP5925855B2 JP 5925855 B2 JP5925855 B2 JP 5925855B2 JP 2014189256 A JP2014189256 A JP 2014189256A JP 2014189256 A JP2014189256 A JP 2014189256A JP 5925855 B2 JP5925855 B2 JP 5925855B2
Authority
JP
Japan
Prior art keywords
prediction
unit
transformation
matrix
transform
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
JP2014189256A
Other languages
Japanese (ja)
Other versions
JP2015029318A (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 JP2014189256A priority Critical patent/JP5925855B2/en
Publication of JP2015029318A publication Critical patent/JP2015029318A/en
Application granted granted Critical
Publication of JP5925855B2 publication Critical patent/JP5925855B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明の実施形態は、動画像の符号化及び復号化における直交変換及び逆直交変換に関する。   Embodiments described herein relate generally to orthogonal transformation and inverse orthogonal transformation in encoding and decoding of moving images.

近年、大幅に符号化効率を向上させた画像符号化方法がITU−TとISO/IECとの共同で、ITU−T REC. H.264及びISO/IEC 14496−10(以下、「H.264」という。)として勧告されている。H.264では、対象画素ブロックに適用される予測方法に関わらず、対象画素ブロックの予測誤差に対する直交変換及び逆直交変換として離散コサイン変換(DCT)及び逆離散コサイン変換(IDCT)が夫々行われる。   In recent years, an image encoding method with greatly improved encoding efficiency has been jointly developed by ITU-T and ISO / IEC. H. H.264 and ISO / IEC 14496-10 (hereinafter referred to as “H.264”). H. In H.264, regardless of the prediction method applied to the target pixel block, discrete cosine transform (DCT) and inverse discrete cosine transform (IDCT) are performed as orthogonal transform and inverse orthogonal transform for the prediction error of the target pixel block, respectively.

H.264の拡張として、画面内予測(イントラ予測)において規定されている9種類の予測モードの夫々について個別の変換基底を用いて直交変換及び逆直交変換を行うことにより、符号化効率を向上させることが想定される。   H. As an extension of H.264, encoding efficiency is improved by performing orthogonal transform and inverse orthogonal transform using individual transform bases for each of nine types of prediction modes defined in intra prediction (intra prediction). Is assumed.

M. Karczewicz, “Improved intra coding”, ITU-T SG16/Q.6, VCEG Document, VCEG-AF15, April 2007.M. Karczewicz, “Improved intra coding”, ITU-T SG16 / Q.6, VCEG Document, VCEG-AF15, April 2007.

しかしながら、複数種類の予測モードの夫々について個別の変換基底を用いて直交変換及び逆直交変換を行うことは、実装上の困難を伴う。例えば、ハードウェア実装のためには、H.264において必要とされるDCT及びIDCTのための専用ハードウェアに加えて、上記複数種類の予測方向の夫々について個別の直交変換及び逆直交変換のための専用ハードウェアを設ける必要がある。これら専用ハードウェアの追加によって、回路規模が増大する。   However, performing orthogonal transform and inverse orthogonal transform using individual transform bases for each of a plurality of types of prediction modes involves difficulty in implementation. For example, H. In addition to the dedicated hardware for DCT and IDCT required in H.264, it is necessary to provide dedicated hardware for individual orthogonal transform and inverse orthogonal transform for each of the above-described multiple types of prediction directions. The addition of these dedicated hardware increases the circuit scale.

ソフトウェア実装に関して、DCT行列に加えて複数種類の予測方向の夫々について個別の変換行列をメモリから適宜ロードしたり、適宜キャッシュメモリに保持したりすることが可能である。この場合には、所望の直交変換及び逆直交変換を汎用乗算器によって実現できるものの、メモリバンド幅の増加によるコスト増またはキャッシュメモリサイズの増加によるコスト増が問題となる。   Regarding software implementation, in addition to the DCT matrix, individual transformation matrices for each of a plurality of types of prediction directions can be appropriately loaded from a memory, or appropriately held in a cache memory. In this case, although desired orthogonal transformation and inverse orthogonal transformation can be realized by a general-purpose multiplier, there is a problem of cost increase due to increase in memory bandwidth or cost increase due to increase in cache memory size.

従って、実施形態は、符号化効率を向上可能な直交変換または逆直交変換を提供することを目的とする。   Therefore, an object of the embodiment is to provide orthogonal transform or inverse orthogonal transform that can improve coding efficiency.

実施形態によれば、画像復号化装置は、蓄積部と、復号化部と、セット部と、変換部と、加算部とを備える。蓄積部は、他の装置から通信回線を介して出力された符号化データを蓄積する。復号化部は、蓄積された符号化データから復号化対象の変換係数を復号化する。セット部は、予測画像生成方法に応じて予め定められた関係に基づいて、復号化対象の予測モードに対応する垂直変換行列と水平変換行列との組み合わせを2種類のみの行列を用いて設定する。変換部は、設定された垂直変換行列と水平変換行列とを用いて、変換係数に対して垂直変換及び水平変換を行って予測誤差を得る。加算部は、予測誤差に基づいて復号画像を生成する。組み合わせは、第1の変換行列同士の組み合わせと、第1の変換行列とは異なる第2の変換行列同士の組み合わせとのうちいずれか一方である。第2の変換行列同士の組み合わせは、Diagonal down right、Vertical rightおよびHorizontal down方向にそれぞれ対応する複数のイントラ予測モードに設定される。   According to the embodiment, the image decoding apparatus includes a storage unit, a decoding unit, a set unit, a conversion unit, and an addition unit. The accumulation unit accumulates encoded data output from another device via a communication line. The decoding unit decodes the transform coefficient to be decoded from the accumulated encoded data. The set unit sets a combination of a vertical transformation matrix and a horizontal transformation matrix corresponding to a prediction mode to be decoded using only two types of matrices based on a predetermined relationship according to a predicted image generation method. . The conversion unit obtains a prediction error by performing vertical conversion and horizontal conversion on the conversion coefficient using the set vertical conversion matrix and horizontal conversion matrix. The adder generates a decoded image based on the prediction error. The combination is one of a combination of first conversion matrices and a combination of second conversion matrices different from the first conversion matrix. A combination of the second transformation matrices is set to a plurality of intra prediction modes respectively corresponding to the diagonal down right, vertical right, and horizontal down directions.

第1の実施形態に係る画像符号化装置を例示するブロック図。1 is a block diagram illustrating an image encoding device according to a first embodiment. 第1の実施形態に係る直交変換部を例示するブロック図。The block diagram which illustrates the orthogonal transformation part concerning a 1st embodiment. 第1の実施形態に係る逆直交変換部を例示するブロック図。FIG. 3 is a block diagram illustrating an inverse orthogonal transform unit according to the first embodiment. 第1の実施形態に係る、予測モードと垂直変換インデックス及び水平変換インデックスとの対応を例示するテーブル図。The table figure which illustrates a response | compatibility with prediction mode, a vertical conversion index, and a horizontal conversion index based on 1st Embodiment. 第1の実施形態に係る、垂直変換インデックスと1D変換行列との対応を例示するテーブル図。The table figure which illustrates a response | compatibility with the vertical conversion index and 1D conversion matrix based on 1st Embodiment. 第1の実施形態に係る、水平変換インデックスと1D変換行列との対応を例示するテーブル図。The table figure which illustrates a response | compatibility with the horizontal conversion index and 1D conversion matrix based on 1st Embodiment. 第1の実施形態に係る、変換インデックスと垂直変換インデックス及び水平変換インデックスとの対応を例示するテーブル図。The table figure which illustrates a response | compatibility with a conversion index, a vertical conversion index, and a horizontal conversion index based on 1st Embodiment. 図4A及び図4Dを統合したテーブル図。The table figure which integrated FIG. 4A and 4D. 第1の実施形態に係る係数順制御部を例示するブロック図。The block diagram which illustrates the coefficient order control part concerning a 1st embodiment. 第1の実施形態に係る係数順制御部を例示するブロック図。The block diagram which illustrates the coefficient order control part concerning a 1st embodiment. 画素ブロックの予測符号化順の説明図。Explanatory drawing of the prediction encoding order of a pixel block. 画素ブロックサイズの一例の説明図。Explanatory drawing of an example of pixel block size. 画素ブロックサイズの別の例の説明図。Explanatory drawing of another example of pixel block size. 画素ブロックサイズの別の例の説明図。Explanatory drawing of another example of pixel block size. イントラ予測モードの説明図。Explanatory drawing of intra prediction mode. 予測対象画素と参照画素との配置関係の説明図。Explanatory drawing of the arrangement | positioning relationship between a prediction object pixel and a reference pixel. イントラ予測モード1の説明図。Explanatory drawing of the intra prediction mode 1. FIG. イントラ予測モード4の説明図。Explanatory drawing of the intra prediction mode 4. FIG. ジグザグスキャンの説明図。Explanatory drawing of a zigzag scan. ジグザグスキャンの説明図。Explanatory drawing of a zigzag scan. ジグザグスキャンを利用した2D−1D変換を示すテーブル図。The table figure which shows 2D-1D conversion using a zigzag scan. 予測モード毎の個別の2D−1D変換を例示するテーブル図。The table figure which illustrates individual 2D-1D conversion for every prediction mode. 図1の画像符号化装置が符号化対象ブロックに対して行う処理を例示するフローチャート。3 is a flowchart illustrating processing performed by the image encoding device in FIG. 1 on an encoding target block. 図1の画像符号化装置が符号化対象ブロックに対して行う処理を例示するフローチャート。3 is a flowchart illustrating processing performed by the image encoding device in FIG. 1 on an encoding target block. シンタクス構造の説明図。Explanatory drawing of a syntax structure. スライスヘッダーシンタクスの説明図。Explanatory drawing of a slice header syntax. コーディングツリーユニットシンタクスの説明図。Explanatory drawing of coding tree unit syntax. トランスフォームユニットシンタクスの説明図。Explanatory drawing of a transform unit syntax. 9種類の予測方向の夫々について個別の変換基底を用いて直交変換を行う直交変換部を例示するブロック図。The block diagram which illustrates the orthogonal transformation part which performs orthogonal transformation using each conversion base about each of nine types of prediction directions. 第2の実施形態に係る直交変換部を例示するブロック図。The block diagram which illustrates the orthogonal transformation part concerning a 2nd embodiment. 第2の実施形態に係る逆直交変換部を例示するブロック図。The block diagram which illustrates the inverse orthogonal transformation part which concerns on 2nd Embodiment. 第2の実施形態に係る、予測モードと垂直変換インデックス及び水平変換インデックスとの対応を例示するテーブル図。The table figure which illustrates a response | compatibility with prediction mode, a vertical conversion index, and a horizontal conversion index based on 2nd Embodiment. 第2の実施形態に係る、垂直変換インデックスと1D変換行列との対応を例示するテーブル図。The table figure which illustrates a response | compatibility with the vertical conversion index and 1D conversion matrix based on 2nd Embodiment. 第2の実施形態に係る、水平変換インデックスと1D変換行列との対応を例示するテーブル図。The table figure which illustrates a response | compatibility with a horizontal conversion index and 1D conversion matrix based on 2nd Embodiment. 第2の実施形態に係る、変換インデックスと垂直変換インデックス及び水平変換インデックスとの対応を例示するテーブル図。The table figure which illustrates a response | compatibility with a conversion index, a vertical conversion index, and a horizontal conversion index based on 2nd Embodiment. 図18A及び図18Dを統合したテーブル図。The table figure which integrated FIG. 18A and FIG. 18D. 第3の実施形態に係る直交変換部を例示するブロック図。The block diagram which illustrates the orthogonal transformation part concerning a 3rd embodiment. 第3の実施形態に係る逆直交変換部を例示するブロック図。The block diagram which illustrates the inverse orthogonal transformation part concerning a 3rd embodiment. 第3の実施形態に係る、予測モードと垂直変換インデックス及び水平変換インデックスとの対応を例示するテーブル図。The table figure which illustrates a response | compatibility with prediction mode, a vertical conversion index, and a horizontal conversion index based on 3rd Embodiment. 第3の実施形態に係る、垂直変換インデックスと1D変換行列との対応を例示するテーブル図。The table figure which illustrates a response | compatibility with the vertical conversion index and 1D conversion matrix based on 3rd Embodiment. 第3の実施形態に係る、水平変換インデックスと1D変換行列との対応を例示するテーブル図。The table figure which illustrates a response | compatibility with the horizontal conversion index and 1D conversion matrix based on 3rd Embodiment. 第3の実施形態に係る、変換インデックスと垂直変換インデックス及び水平変換インデックスとの対応を例示するテーブル図。The table figure which illustrates a correspondence with a conversion index, a vertical conversion index, and a horizontal conversion index concerning a 3rd embodiment. 図21A及び図21Dを統合したテーブル図。The table figure which integrated FIG. 21A and FIG. 21D. 第4の実施形態に係る画像復号化装置を例示するブロック図。The block diagram which illustrates the picture decoding device concerning a 4th embodiment. 第4の実施形態に係る係数順制御部を例示するブロック図。The block diagram which illustrates the coefficient order control part concerning a 4th embodiment. 第4の実施形態に係る係数順制御部を例示するブロック図。The block diagram which illustrates the coefficient order control part concerning a 4th embodiment.

以下、図面を参照して、各実施形態について説明する。尚、以降の説明において、「画像」という用語は、「画像信号」、「画像データ」などの用語として適宜読み替えることができる。
(第1の実施形態)
第1の実施形態は、画像符号化装置に関する。本実施形態に係る画像符号化装置に対応する画像復号化装置は、第4の実施形態において説明する。この画像符号化装置は、LSI(Large-Scale Integration)チップやDSP(Digital Signal Processor)、FPGA(Field Programmable Gate Array)などのハードウェアにより実現可能である。また、この画像符号化装置は、コンピュータに画像符号化プログラムを実行させることによっても実現可能である。
Hereinafter, each embodiment will be described with reference to the drawings. In the following description, the term “image” can be appropriately replaced with terms such as “image signal” and “image data”.
(First embodiment)
The first embodiment relates to an image encoding device. An image decoding apparatus corresponding to the image encoding apparatus according to the present embodiment will be described in a fourth embodiment. This image encoding device can be realized by hardware such as an LSI (Large-Scale Integration) chip, a DSP (Digital Signal Processor), or an FPGA (Field Programmable Gate Array). The image encoding apparatus can also be realized by causing a computer to execute an image encoding program.

図1に示すように、本実施形態に係る画像符号化装置は、減算部101、直交変換部102、量子化部103、逆量子化部104、逆直交変換部105、加算部106、参照画像メモリ107、イントラ予測部108、インター予測部109、予測選択部110、予測選択スイッチ111、1D(1次元)変換行列セット部112、係数順制御部113、エントロピー符号化部114、出力バッファ115及び符号化制御部116を有する。   As shown in FIG. 1, the image coding apparatus according to the present embodiment includes a subtraction unit 101, an orthogonal transformation unit 102, a quantization unit 103, an inverse quantization unit 104, an inverse orthogonal transformation unit 105, an addition unit 106, and a reference image. A memory 107, an intra prediction unit 108, an inter prediction unit 109, a prediction selection unit 110, a prediction selection switch 111, a 1D (one-dimensional) transform matrix set unit 112, a coefficient order control unit 113, an entropy encoding unit 114, an output buffer 115, An encoding control unit 116 is included.

図1の画像符号化装置は、入力画像118を構成する各フレームまたは各フィールドを複数の画素ブロックに分割し、これら分割した画素ブロックに対して予測符号化を行って、符号化データ130を出力する。以降の説明では、簡単化のために、図6Aに示されるように左上から右下に向かって画素ブロックの予測符号化が行われることを仮定する。図6Aでは、符号化処理対象のフレームfにおいて、符号化対象画素ブロックcよりも左側及び上側に符号化済み画素ブロックpが位置している。   The image coding apparatus in FIG. 1 divides each frame or each field constituting the input image 118 into a plurality of pixel blocks, performs predictive coding on the divided pixel blocks, and outputs coded data 130. To do. In the following description, for the sake of simplicity, it is assumed that pixel blocks are predictively encoded from the upper left to the lower right as shown in FIG. 6A. In FIG. 6A, the encoded pixel block p is located on the left side and the upper side of the encoding target pixel block c in the encoding processing target frame f.

ここで、画素ブロックは、例えば、コーディングツリーユニット、マクロブロック、サブブロック、1画素などを指す。尚、以降の説明では、画素ブロックをコーディングツリーユニットの意味で基本的に使用するが、説明を適宜読み替えることにより画素ブロックを別の意味で解釈することも可能である。コーディングツリーユニットは、典型的には、例えば図6Bに示す16×16画素ブロックであるが、図6Cに示す32×32画素ブロック、図6Dに示す64×64画素ブロックであってもよいし、図示しない8×8画素ブロック、4×4画素ブロックであってもよい。コーディングツリーユニットは必ずしも正方形である必要はない。以下、入力画像118の符号化対象ブロックもしくはコーディングツリーユニットを「予測対象ブロック」と称することもある。また、符号化単位には、コーディングツリーユニットのような画素ブロックに限らず、フレームまたはフィールド、或いはこれらの組み合わせを用いることができる。   Here, the pixel block indicates, for example, a coding tree unit, a macro block, a sub block, and one pixel. In the following description, the pixel block is basically used in the meaning of the coding tree unit, but the pixel block can be interpreted in another meaning by appropriately replacing the description. The coding tree unit is typically a 16 × 16 pixel block shown in FIG. 6B, for example, but may be a 32 × 32 pixel block shown in FIG. 6C, or a 64 × 64 pixel block shown in FIG. 6D, It may be an 8 × 8 pixel block (not shown) or a 4 × 4 pixel block. The coding tree unit need not necessarily be square. Hereinafter, the encoding target block or coding tree unit of the input image 118 may be referred to as a “prediction target block”. In addition, the encoding unit is not limited to a pixel block such as a coding tree unit, and a frame, a field, or a combination thereof can be used.

図1の画像符号化装置は、符号化制御部116から入力される符号化パラメータに基づいて、画素ブロックに対するイントラ予測(画面内予測、フレーム内予測などとも称される)またはインター予測(画面間予測、フレーム間予測などとも称される)を行って、予測画像127を生成する。この画像符号化装置は、画素ブロック(入力画像118)と予測画像127との間の予測誤差119を直交変換及び量子化し、エントロピー符号化を行って符号化データ130を生成して出力する。   The image encoding apparatus in FIG. 1 performs intra prediction (also referred to as intra-frame prediction, intra-frame prediction, etc.) or inter prediction (inter-screen prediction) on a pixel block based on the encoding parameter input from the encoding control unit 116. Prediction image 127 is generated by performing prediction (also referred to as prediction, inter-frame prediction). This image encoding apparatus orthogonally transforms and quantizes the prediction error 119 between the pixel block (input image 118) and the predicted image 127, performs entropy encoding, and generates and outputs encoded data 130.

図1の画像符号化装置は、ブロックサイズ及び予測画像127の生成方法の異なる複数の予測モードを選択的に適用して符号化を行う。予測画像127の生成方法は、大別すると、符号化対象フレーム内で予測を行うイントラ予測と、時間的に異なる1つまたは複数の参照フレームを用いて予測を行うインター予測との2種類である。本実施形態では、イントラ予測を用いて予測画像を生成する場合の直交変換及び逆直交変換について詳細に説明する。   The image encoding device in FIG. 1 performs encoding by selectively applying a plurality of prediction modes having different block sizes and generation methods of the predicted image 127. The generation method of the predicted image 127 can be broadly divided into two types: intra prediction in which prediction is performed within the encoding target frame and inter prediction in which prediction is performed using one or a plurality of reference frames that are temporally different. . In the present embodiment, an orthogonal transform and an inverse orthogonal transform when generating a predicted image using intra prediction will be described in detail.

以下、図1の画像符号化装置に含まれる各要素を説明する。
減算器101は、入力画像118の符号化対象ブロックから、対応する予測画像127を減算して予測誤差119を得る。減算器101は、予測誤差119を直交変換部102に入力する。
Hereinafter, each element included in the image encoding device in FIG. 1 will be described.
The subtracter 101 subtracts the corresponding predicted image 127 from the encoding target block of the input image 118 to obtain a prediction error 119. The subtractor 101 inputs the prediction error 119 to the orthogonal transform unit 102.

直交変換部102は、減算器101からの予測誤差119に対して直交変換を行い、変換係数120を得る。尚、直交変換部102の詳細は後述される。直交変換部102は、変換係数120を量子化部103に入力する。   The orthogonal transform unit 102 performs orthogonal transform on the prediction error 119 from the subtractor 101 to obtain a transform coefficient 120. Details of the orthogonal transform unit 102 will be described later. The orthogonal transform unit 102 inputs the transform coefficient 120 to the quantization unit 103.

量子化部103は、直交変換部102からの変換係数に対して量子化を行い、量子化変換係数121を得る。具体的には、量子化部103は、符号化制御部116によって指定される量子化パラメータ、量子化マトリクスなどの量子化情報に従って量子化を行う。量子化パラメータは、量子化の細かさを示す。量子化マトリクスは、量子化の細かさを変換係数の成分毎に重み付けするために使用される。量子化部103は、量子化変換係数121を係数順制御部113及び逆量子化部104に入力する。   The quantization unit 103 performs quantization on the transform coefficient from the orthogonal transform unit 102 to obtain a quantized transform coefficient 121. Specifically, the quantization unit 103 performs quantization according to quantization information such as a quantization parameter and a quantization matrix specified by the encoding control unit 116. The quantization parameter indicates the fineness of quantization. The quantization matrix is used for weighting the fineness of quantization for each component of the transform coefficient. The quantization unit 103 inputs the quantized transform coefficient 121 to the coefficient order control unit 113 and the inverse quantization unit 104.

係数順制御部113は、2次元(2D)表現である量子化変換係数121を、1次元(1D)表現である量子化変換係数列117に変換し、エントロピー符号化部114に入力する。尚、係数制御部113の詳細は後述される。   The coefficient order control unit 113 converts the quantized transform coefficient 121 that is a two-dimensional (2D) representation into a quantized transform coefficient sequence 117 that is a one-dimensional (1D) representation, and inputs the quantized transform coefficient sequence 117 to the entropy encoding unit 114. Details of the coefficient control unit 113 will be described later.

エントロピー符号化部114は、係数制御部113からの量子化変換係数列117、予測選択部110からの予測情報126、符号化制御部116によって指定される量子化情報などの様々な符号化パラメータに対してエントロピー符号化(例えば、ハフマン符号化、算術符号化など)を行い、符号化データを生成する。尚、符号化パラメータとは、予測情報126、変換係数に関する情報、量子化に関する情報、などの復号に必要となるパラメータである。符号化パラメータは、符号化制御部116の内部メモリ(図示しない)に保持され、予測対象ブロックを符号化する際に隣接する既に符号化済みの画素ブロックの符号化パラメータを用いることが可能である。例えば、H.264のイントラ予測では符号化済みの隣接ブロックの予測モード情報から、予測対象ブロックの予測モードの予測値を導出することが可能である。   The entropy encoding unit 114 applies various encoding parameters such as the quantized transform coefficient sequence 117 from the coefficient control unit 113, the prediction information 126 from the prediction selection unit 110, and the quantization information specified by the encoding control unit 116. Entropy coding (for example, Huffman coding, arithmetic coding, etc.) is performed on the data to generate coded data. The encoding parameter is a parameter necessary for decoding, such as prediction information 126, information on transform coefficients, information on quantization, and the like. The encoding parameter is held in an internal memory (not shown) of the encoding control unit 116, and it is possible to use the encoding parameter of an already encoded pixel block adjacent when encoding the prediction target block. . For example, H.M. In the H.264 intra prediction, the prediction value of the prediction mode of the prediction target block can be derived from the prediction mode information of the encoded adjacent block.

エントロピー符号化部114によって生成された符号化データは、例えば多重化を経て出力バッファ115に一時的に蓄積され、符号化制御部116が管理する適切な出力タイミングに従って符号化データ130として出力される。符号化データ130は、例えば、図示しない蓄積系(蓄積メディア)または伝送系(通信回線)へ出力される。   The encoded data generated by the entropy encoding unit 114 is temporarily accumulated in the output buffer 115 through multiplexing, for example, and output as encoded data 130 according to an appropriate output timing managed by the encoding control unit 116. . The encoded data 130 is output to a storage system (storage medium) or a transmission system (communication line) (not shown), for example.

逆量子化部104は、量子化部103からの量子化変換係数121に対して逆量子化を行い、復元変換係数122を得る。具体的には、逆量子化部104は、量子化部103において使用された量子化情報に従って逆量子化を行う。量子化部103において使用された量子化情報は、符号化制御部116の内部メモリからロードされる。逆量子化部104は、復元変換係数122を逆直交変換部105に入力する。   The inverse quantization unit 104 performs inverse quantization on the quantized transform coefficient 121 from the quantization unit 103 to obtain a restored transform coefficient 122. Specifically, the inverse quantization unit 104 performs inverse quantization according to the quantization information used in the quantization unit 103. The quantization information used in the quantization unit 103 is loaded from the internal memory of the encoding control unit 116. The inverse quantization unit 104 inputs the restored transform coefficient 122 to the inverse orthogonal transform unit 105.

逆直交変換部105は、逆量子化部104からの復元変換係数122に対して、直交変換部102において行われた直交変換に対応する逆直交変換を行い、復元予測誤差123を得る。尚、逆直交変換部105の詳細は後述される。逆直交変換部105は、復元予測誤差123を加算部106に入力する。   The inverse orthogonal transform unit 105 performs inverse orthogonal transform corresponding to the orthogonal transform performed in the orthogonal transform unit 102 on the reconstructed transform coefficient 122 from the inverse quantization unit 104 to obtain a reconstructed prediction error 123. Details of the inverse orthogonal transform unit 105 will be described later. The inverse orthogonal transform unit 105 inputs the restoration prediction error 123 to the addition unit 106.

加算部106は、復元予測誤差123と、対応する予測画像127とを加算し、局所復号画像124を生成する。局所復号画像124は、参照画像メモリ107に保存される。参照画像メモリ107に保存された局所復号画像124は、参照画像125としてイントラ予測部108及びインター予測部109によって必要に応じて参照される。   The adding unit 106 adds the restored prediction error 123 and the corresponding predicted image 127 to generate a local decoded image 124. The locally decoded image 124 is stored in the reference image memory 107. The locally decoded image 124 stored in the reference image memory 107 is referred to as the reference image 125 by the intra prediction unit 108 and the inter prediction unit 109 as necessary.

イントラ予測部108は、参照画像メモリ107に保存されている参照画像125を利用してイントラ予測を行う。例えば、H.264では、予測対象ブロックに隣接する符号化済みの参照画素値を利用して、垂直方向、水平方向などの予測方向に沿って画素補填(コピーまたは補間)を行うことによってイントラ予測画像を生成する。図7AにH.264におけるイントラ予測の予測方向を示す。また、図7BにH.264における参照画素と符号化対象画素との配置関係を示す。図7Cはモード1(水平予測)の予測画像生成方法を示しており、図7Dはモード4(対角右下予測;図4AのIntra_NxN_Diagonal_Down_Right)の予測画像生成方法を示している。   The intra prediction unit 108 performs intra prediction using the reference image 125 stored in the reference image memory 107. For example, H.M. In H.264, an intra prediction image is generated by performing pixel interpolation (copying or interpolation) along a prediction direction such as a vertical direction or a horizontal direction using an encoded reference pixel value adjacent to a prediction target block. . In FIG. The prediction direction of intra prediction in H.264 is shown. In FIG. The arrangement | positioning relationship between the reference pixel and encoding object pixel in H.264 is shown. FIG. 7C shows a predicted image generation method in mode 1 (horizontal prediction), and FIG. 7D shows a predicted image generation method in mode 4 (diagonal lower right prediction; Intra_NxN_Diagonal_Down_Right in FIG. 4A).

尚、イントラ予測部108は、予め定められた補間方法を用いて画素値を補間してから、予め定められた予測方向に補間画素値をコピーしてもよい。H.264のイントラ予測の予測方向を例示したが、予測方向を更に細かく規定することにより17種類、33種類などの任意の数の予測モードを使用するに拡張することも可能である。具体的には、H.264では22.5度毎の予測角度が規定されているが、例えば11.25度毎の予測角度を規定すれば、DC予測を含めて17種類の予測モードを使用できる。また、5.625度毎の予測角度を規定すれば、DC予測を含めて33種類の予測モードを使用できる。また、予測角度を等間隔に配置するのではなく、第1の基準点から水平および垂直に移動させた第2の基準点を結ぶ直線によって予測方向の角度を表してもよい。以上のように予測モードの拡張は容易に可能であり、本実施形態は予測モードの数に関わらず適用可能である。   The intra prediction unit 108 may copy the interpolated pixel value in a predetermined prediction direction after interpolating the pixel value using a predetermined interpolation method. H. Although the prediction direction of the H.264 intra prediction is illustrated, the prediction direction can be extended to use any number of prediction modes such as 17 types and 33 types by further specifying the prediction direction. Specifically, H.C. H.264 defines a prediction angle for every 22.5 degrees. For example, if a prediction angle for every 11.25 degrees is defined, 17 types of prediction modes including DC prediction can be used. Further, if a prediction angle for every 5.625 degrees is defined, 33 types of prediction modes including DC prediction can be used. Further, instead of arranging the prediction angles at equal intervals, the angle in the prediction direction may be represented by a straight line connecting the second reference points moved horizontally and vertically from the first reference point. As described above, the prediction mode can be easily expanded, and this embodiment can be applied regardless of the number of prediction modes.

インター予測部109は、参照画像メモリ107に保存されている参照画像125を利用してインター予測を行う。具体的には、インター予測部109は、予測対象ブロックと参照画像125との間でブロックマッチング処理を行って動きのズレ量(動きベクトル)を導出する。インター予測部109は、この動きベクトルに基づいて補間処理(動き補償)を行ってインター予測画像を生成する。H.264では、1/4画素精度までの補間処理が可能である。導出された動きベクトルは予測情報126の一部としてエントロピー符号化される。   The inter prediction unit 109 performs inter prediction using the reference image 125 stored in the reference image memory 107. Specifically, the inter prediction unit 109 performs block matching processing between the prediction target block and the reference image 125 to derive a motion shift amount (motion vector). The inter prediction unit 109 performs an interpolation process (motion compensation) based on the motion vector to generate an inter prediction image. H. With H.264, interpolation processing up to 1/4 pixel accuracy is possible. The derived motion vector is entropy encoded as part of the prediction information 126.

選択スイッチ111は、イントラ予測部108の出力端またはインター予測部109の出力端を予測選択部110からの予測情報126に従って選択し、イントラ予測画像またはインター予測画像を予測画像127として減算部101及び加算部106に入力する。予測情報126がイントラ予測を示唆する場合には、選択スイッチ110はイントラ予測部108からのイントラ予測画像を予測画像127として取り込む。一方、予測情報126がインター予測を示唆する場合には、選択スイッチ110はインター予測部109からのインター予測画像を予測画像127として取り込む。   The selection switch 111 selects the output terminal of the intra prediction unit 108 or the output terminal of the inter prediction unit 109 according to the prediction information 126 from the prediction selection unit 110, and uses the subtraction unit 101 and the intra prediction image or the inter prediction image as the prediction image 127. The data is input to the adding unit 106. When the prediction information 126 suggests intra prediction, the selection switch 110 captures the intra prediction image from the intra prediction unit 108 as the prediction image 127. On the other hand, when the prediction information 126 suggests inter prediction, the selection switch 110 captures the inter prediction image from the inter prediction unit 109 as the prediction image 127.

予測選択部110は、符号化制御部116が制御する予測モードに従って、予測情報126を設定する機能を有する。前述のように、予測画像127の生成のためにイントラ予測またはインター予測が選択可能であるが、イントラ予測及びインター予測の夫々に複数のモードが更に選択可能である。符号化制御部116はイントラ予測及びインター予測の複数の予測モードのうち1つを最適な予測モードとして判定し、予測選択部110は判定された最適な予測モードに応じて予測情報126を設定する。   The prediction selection unit 110 has a function of setting the prediction information 126 according to the prediction mode controlled by the encoding control unit 116. As described above, intra prediction or inter prediction can be selected for generating the predicted image 127, but a plurality of modes can be further selected for each of intra prediction and inter prediction. The encoding control unit 116 determines one of a plurality of intra prediction modes and inter prediction modes as the optimal prediction mode, and the prediction selection unit 110 sets the prediction information 126 according to the determined optimal prediction mode. .

例えば、イントラ予測に関して、符号化制御部116から予測モード情報がイントラ予測部108に指定され、イントラ予測部108はこの予測モード情報に従って予測画像127を生成する。符号化制御部116は、予測モードの番号が小さい方から順に複数の予測モード情報を指定してもよいし、大きい方から順に複数の予測モード情報を指定してもよい。また、符号化制御部116は、入力画像の特性に従って予測モードを限定してもよい。符号化制御部116は、必ずしも全ての予測モードを指定する必要はなく符号化対象ブロックに対して少なくとも1つの予測モード情報を指定すればよい。   For example, regarding intra prediction, prediction mode information is designated by the encoding control unit 116 as the intra prediction unit 108, and the intra prediction unit 108 generates a prediction image 127 according to the prediction mode information. The encoding control unit 116 may specify a plurality of prediction mode information in order from the smallest prediction mode number, or may specify a plurality of prediction mode information in order from the largest. The encoding control unit 116 may limit the prediction mode according to the characteristics of the input image. The encoding control unit 116 need not always specify all prediction modes, but may specify at least one prediction mode information for the encoding target block.

例えば、符号化制御部116は、次の数式(1)に示すコスト関数を用いて最適な予測モードを判定する。   For example, the encoding control unit 116 determines an optimal prediction mode using a cost function expressed by the following formula (1).

Figure 0005925855
Figure 0005925855

数式(1)において、OHは予測情報126(例えば、動きベクトル情報、予測ブロックサイズ情報)に関する符号量を示し、SADは予測対象ブロックと予測画像127との間の差分絶対値和(即ち、予測誤差119の絶対値の累積和)を示す。また、λは量子化情報(量子化パラメータ)の値に基づいて決定されるラグランジュ未定乗数を示し、Kは符号化コストを示す。数式(1)を用いる場合には、符号化コストKを最小化する予測モードが発生符号量及び予測誤差の観点から最適な予測モードとして判定される。数式(1)の変形として、OHのみまたはSADのみから符号化コストを見積もってもよいし、SADにアダマール変換を施した値またはその近似値を利用して符号化コストを見積もってもよい。   In Equation (1), OH indicates a code amount related to the prediction information 126 (for example, motion vector information, prediction block size information), and SAD is a sum of absolute differences between the prediction target block and the prediction image 127 (that is, prediction). Accumulated sum of absolute values of error 119). Further, λ represents a Lagrange undetermined multiplier determined based on the value of quantization information (quantization parameter), and K represents an encoding cost. When Expression (1) is used, the prediction mode that minimizes the coding cost K is determined as the optimum prediction mode from the viewpoint of the generated code amount and the prediction error. As a modification of Equation (1), the encoding cost may be estimated from OH alone or SAD alone, or the encoding cost may be estimated using a value obtained by subjecting SAD to Hadamard transform or an approximation thereof.

また、図示しない仮符号化ユニットを用いることにより最適な予測モードを判定することも可能である。例えば、符号化制御部116は、次の数式(2)に示すコスト関数を用いて最適な予測モードを判定する。   It is also possible to determine an optimal prediction mode by using a temporary encoding unit (not shown). For example, the encoding control unit 116 determines the optimal prediction mode using the cost function shown in the following mathematical formula (2).

Figure 0005925855
Figure 0005925855

数式(2)において、Dは予測対象ブロックと局所復号画像との間の二乗誤差和(即ち、符号化歪)を示し、Rは予測対象ブロックと予測モードの予測画像127との間の予測誤差について仮符号化によって見積もられた符号量を示し、Jは符号化コストを示す。数式(2)の符号化コストJを導出する場合には予測モード毎に仮符号化処理及び局部復号化処理が必要なので、回路規模または演算量が増大する。反面、より正確な符号化歪と符号量とに基づいて符号化コストJが導出されるので、最適な予測モードを高精度に判定して高い符号化効率を維持しやすい。尚、数式(2)の変形として、RのみまたはDのみから符号化コストを見積もってもよいし、RまたはDの近似値を利用して符号化コストを見積もってもよい。また、符号化制御部116は、予測対象ブロックに関して事前に得られる情報(周囲の画素ブロックの予測モード、画像解析の結果など)に基づいて、数式(1)または数式(2)を用いた判定を行う予測モードの候補の数を、予め絞り込んでおいてもよい。   In Equation (2), D represents a square error sum (ie, encoding distortion) between the prediction target block and the local decoded image, and R represents a prediction error between the prediction target block and the prediction image 127 in the prediction mode. Indicates the amount of code estimated by provisional encoding, and J indicates the encoding cost. In order to derive the encoding cost J of Equation (2), provisional encoding processing and local decoding processing are required for each prediction mode, so that the circuit scale or the amount of calculation increases. On the other hand, since the encoding cost J is derived based on more accurate encoding distortion and code amount, it is easy to determine the optimal prediction mode with high accuracy and maintain high encoding efficiency. As a modification of Equation (2), the encoding cost may be estimated from only R or D, or the encoding cost may be estimated using an approximate value of R or D. In addition, the encoding control unit 116 makes a determination using Formula (1) or Formula (2) based on information obtained in advance regarding the prediction target block (prediction mode of surrounding pixel blocks, results of image analysis, and the like). The number of prediction mode candidates for performing may be narrowed down in advance.

符号化制御部116は、図1の画像符号化装置の各要素を制御する。具体的には、符号化制御部116は、上述の動作を含む符号化処理のための種々の制御を行う。
1D変換行列セット部112は、予測選択部110からの予測情報126に含まれる予測モード情報に基づいて1D変換行列セット情報129を生成し、直交変換部102及び逆直交変換部105に入力する。尚、1D変換行列セット情報129の詳細は後述される。
The encoding control unit 116 controls each element of the image encoding device in FIG. Specifically, the encoding control unit 116 performs various controls for the encoding process including the above-described operation.
The 1D transform matrix set unit 112 generates 1D transform matrix set information 129 based on the prediction mode information included in the prediction information 126 from the prediction selection unit 110 and inputs the 1D transform matrix set information 129 to the orthogonal transform unit 102 and the inverse orthogonal transform unit 105. Details of the 1D conversion matrix set information 129 will be described later.

以下、図2を用いて本実施形態に係る直交変換部102の詳細を説明する。
直交変換部102は、選択スイッチ201、垂直変換部202、転置部203、選択スイッチ204及び水平変換部205を有する。垂直変換部202は、1D直交変換部A206及び1D直交変換部B207を含む。水平変換部205は、1D直交変換部A208及び1D直交変換部B209を含む。尚、垂直変換部202及び水平変換部205の順序は、一例であり、これらは逆順であっても構わない。
Hereinafter, details of the orthogonal transform unit 102 according to the present embodiment will be described with reference to FIG.
The orthogonal transform unit 102 includes a selection switch 201, a vertical conversion unit 202, a transposition unit 203, a selection switch 204, and a horizontal conversion unit 205. The vertical transform unit 202 includes a 1D orthogonal transform unit A206 and a 1D orthogonal transform unit B207. The horizontal transform unit 205 includes a 1D orthogonal transform unit A208 and a 1D orthogonal transform unit B209. Note that the order of the vertical conversion unit 202 and the horizontal conversion unit 205 is an example, and these may be reversed.

1D直交変換部A206及び1D直交変換部A208は、入力される行列に対して1D変換行列Aを乗算する点で共通の機能を持ち、1D直交変換部B207及び1D直交変換部B209は、入力される行列に対して1D変換行列Bを乗算する点で共通の機能を持つ。従って、1D直交変換部A206及び1D直交変換部A208は、物理的に同一のハードウェアを時分割で使用することによっても実現可能である。また、1D直交変換部B207及び1D直交変換部B209も同様である。   The 1D orthogonal transform unit A206 and the 1D orthogonal transform unit A208 have a common function in that the input matrix is multiplied by the 1D transform matrix A, and the 1D orthogonal transform unit B207 and the 1D orthogonal transform unit B209 are input. It has a common function in that the 1D conversion matrix B is multiplied with the matrix. Therefore, the 1D orthogonal transform unit A206 and the 1D orthogonal transform unit A208 can also be realized by using physically identical hardware in a time division manner. The same applies to the 1D orthogonal transform unit B207 and the 1D orthogonal transform unit B209.

選択スイッチ201は、1D変換行列セット情報129に含まれる垂直変換インデックスに従って、予測誤差119を1D直交変換部A206及び1D直交変換部B207のうちのいずれか一方に導く。1D直交変換部A206は、入力された予測誤差(行列)119に対して1D変換行列Aを乗算して出力する。1D直交変換部B207は、入力された予測誤差119に対して1D変換行列Bを乗算して出力する。具体的には、1D直交変換部A206及び1D直交変換部B207(即ち、垂直変換部202)は、次の数式(3)に示す一次元の直交変換を行って、予測誤差119の垂直方向の相関を除去する。   The selection switch 201 guides the prediction error 119 to one of the 1D orthogonal transform unit A206 and the 1D orthogonal transform unit B207 according to the vertical transform index included in the 1D transform matrix set information 129. The 1D orthogonal transform unit A206 multiplies the input prediction error (matrix) 119 by the 1D transform matrix A and outputs the result. The 1D orthogonal transform unit B207 multiplies the input prediction error 119 by the 1D transform matrix B and outputs the result. Specifically, the 1D orthogonal transform unit A206 and the 1D orthogonal transform unit B207 (that is, the vertical transform unit 202) perform a one-dimensional orthogonal transform represented by the following equation (3), and the prediction error 119 in the vertical direction Remove correlation.

Figure 0005925855
Figure 0005925855

数式(3)において、Xは予測誤差119の行列(N×N)を示し、Vは1D変換行列A及び1D変換行列B(いずれもN×N)を包括的に示しており、Yは1D直交変換部A206及び1D直交変換部B207の出力行列(N×N)を示す。具体的には、変換行列Vは、行列Xの垂直方向の相関を除去するために設計された変換基底を行ベクトルとし縦に並べたN×Nの変換行列である。但し、後述するように、1D変換行列A及び1D変換行列Bは、異なる方法で設計され、異なる性質を持つ。尚、1D変換行列A及び1D変換行列Bは、設計された各変換基底をスカラ倍して整数化したものを使用することも可能である。   In Equation (3), X represents a matrix (N × N) of the prediction error 119, V represents a 1D conversion matrix A and a 1D conversion matrix B (both N × N), and Y represents 1D The output matrix (NxN) of orthogonal transformation part A206 and 1D orthogonal transformation part B207 is shown. Specifically, the transformation matrix V is an N × N transformation matrix in which transformation bases designed to remove the correlation in the vertical direction of the matrix X are arranged in the vertical direction as row vectors. However, as described later, the 1D conversion matrix A and the 1D conversion matrix B are designed by different methods and have different properties. As the 1D conversion matrix A and the 1D conversion matrix B, it is also possible to use an integer obtained by multiplying each designed conversion base by a scalar.

ここで、予測誤差119がM×Nで表現される矩形ブロックである場合、直交変換を行うブロックサイズもまたM×Nであってもよい。   Here, when the prediction error 119 is a rectangular block expressed by M × N, the block size for performing orthogonal transform may also be M × N.

転置部203は、垂直変換部202の出力行列(Y)の転置を行って、選択スイッチ204に与える。但し、転置部203は、一例であって、対応するハードウェアを必ずしも用意しなくてもよい。例えば、垂直変換部202による1D直交変換を実行した結果(垂直変換部202の出力行列の各要素)を保持しておき、水平変換部205による1D直交変換を実行するときに適切な順序で読み出せば、転置部203に対応するハードウェアを用意しなくても出力行列(Y)の転置を実行できる。   The transposition unit 203 transposes the output matrix (Y) of the vertical conversion unit 202 and supplies it to the selection switch 204. However, the transposition unit 203 is an example, and corresponding hardware may not necessarily be prepared. For example, the result of executing the 1D orthogonal transform by the vertical transform unit 202 (each element of the output matrix of the vertical transform unit 202) is stored and read in an appropriate order when the 1D orthogonal transform is performed by the horizontal transform unit 205. If output, the transposition of the output matrix (Y) can be performed without preparing hardware corresponding to the transposition unit 203.

選択スイッチ204は、1D変換行列セット情報129に含まれる水平変換インデックスに従って、転置部203からの入力行列を1D直交変換部A208及び1D直交変換部B209のうちのいずれか一方に導く。1D直交変換部A208は、入力行列に対して1D変換行列Aを乗算して出力する。1D直交変換部B209は、入力行列に対して1D変換行列Bを乗算して出力する。具体的には、1D直交変換部A208及び1D直交変換部B209(即ち、水平変換部205)は、次の数式(4)に示す一次元の直交変換を行って、予測誤差の水平方向の相関を除去する。   The selection switch 204 guides the input matrix from the transposition unit 203 to one of the 1D orthogonal transform unit A 208 and the 1D orthogonal transform unit B 209 according to the horizontal transform index included in the 1D transform matrix set information 129. The 1D orthogonal transform unit A208 multiplies the input matrix by the 1D transform matrix A and outputs the result. The 1D orthogonal transform unit B209 multiplies the input matrix by the 1D transform matrix B and outputs the result. Specifically, the 1D orthogonal transform unit A 208 and the 1D orthogonal transform unit B 209 (that is, the horizontal transform unit 205) perform a one-dimensional orthogonal transform represented by the following formula (4) to correlate the prediction error in the horizontal direction. Remove.

Figure 0005925855
Figure 0005925855

数式(4)において、Hは1D変換行列A及び1D変換行列B(いずれもN×N)を包括的に示しており、Zは1D直交変換部A208及び1D直交変換部B209の出力行列(N×N)を示しており、これは変換係数120を指す。具体的には、変換行列Hは、行列Yの水平方向の相関を除去するために設計された変換基底を行ベクトルとし縦に並べたN×Nの変換行列である。先の説明と重複するが、1D変換行列A及び1D変換行列Bは、異なる方法で設計され、異なる性質を持つ。また、1D変換行列A及び1D変換行列Bは、設計された各変換基底をスカラ倍して整数化したものを使用することも可能である。   In Equation (4), H comprehensively represents the 1D transformation matrix A and the 1D transformation matrix B (both N × N), and Z represents the output matrix (N of the 1D orthogonal transformation unit A208 and the 1D orthogonal transformation unit B209). XN), which refers to the conversion factor 120. Specifically, the transformation matrix H is an N × N transformation matrix in which transformation bases designed to remove the correlation in the horizontal direction of the matrix Y are vertically arranged as row vectors. Although overlapping with the previous description, the 1D transformation matrix A and the 1D transformation matrix B are designed in different ways and have different properties. Further, the 1D conversion matrix A and the 1D conversion matrix B may be obtained by converting each designed conversion base into an integer by scalar multiplication.

以上のように、直交変換部102は、予測誤差(行列)119に対して、1D変換行列セット部112から入力された1D変換行列セット情報129に従って直交変換を行い、変換係数(行列)120を生成する。尚、H.264を考慮すると、直交変換部102には、図示しないDCT部が含まれてもよいし、1D変換行列Aと1D変換行列BのいずれかをDCTのための行列に置き換えてもよい。例えば、1D変換行列BはDCTのための変換行列であってもよい。更に、直交変換部102は、DCTに加えて、アダマール変換、後述するカルーネン・レーベ変換、離散サイン変換などの種々の直交変換を実現してもよい。   As described above, the orthogonal transform unit 102 performs orthogonal transform on the prediction error (matrix) 119 according to the 1D transform matrix set information 129 input from the 1D transform matrix set unit 112, and converts the transform coefficient (matrix) 120 into the transform coefficient (matrix) 120. Generate. H. In consideration of H.264, the orthogonal transform unit 102 may include a DCT unit (not shown), or one of the 1D transform matrix A and the 1D transform matrix B may be replaced with a matrix for DCT. For example, the 1D transformation matrix B may be a transformation matrix for DCT. Further, the orthogonal transform unit 102 may implement various orthogonal transforms such as Hadamard transform, Karhunen-Loeve transform, and discrete sine transform, which will be described later, in addition to DCT.

ここで、1D変換行列Aと1D変換行列Bとの性質の差異について説明する。H.264などでサポートされるイントラ予測モードには、予測対象ブロックの左側及び上側の一方または両方の隣接ライン上の参照画素群を予測方向に沿ってコピーまたは補間後にコピーして予測画像を生成するものがある。すなわち、このイントラ予測モードでは、予測方向に従って参照画素群の中の少なくとも一つの参照画素が選択され、参照画素のコピーまたは参照画素からの補間により、予測画像が生成される。係るイントラ予測モードは、画像の空間的相関を利用するので、参照画素からの距離が大きくなるにつれて予測精度が低下する傾向にある。即ち、参照画素からの距離に応じて予測誤差の絶対値が増大し易い。尚、係る傾向は、予測方向によらず同様である。より具体的には、予測対象ブロックの左隣接ライン上の参照画素群のみが参照(参照画素の画素値のコピーまたは参照画素からの補間)されるイントラ予測モード(例えば、図7Aのモード1及びモード8)に関して、予測誤差は水平方向に係る傾向を示す。予測対象ブロックに上隣接ライン上の参照画素群のみを参照するイントラ予測モード(例えば、図7Aのモード0、モード3及びモード7)に関して、予測誤差は垂直方向に係る傾向を示す。更に、予測対象ブロックの左隣接ライン及び上隣接ライン上の参照画素群が参照される予測モード(例えば、図7Aのモード4、モード5及びモード6)に関して、予測誤差は水平方向及び垂直方向に係る傾向を示す。概括すれば、予測画像の生成のために利用する参照画素群のラインと直交する方向に係る傾向を示すといえる。   Here, the difference in properties between the 1D conversion matrix A and the 1D conversion matrix B will be described. H. In the intra prediction mode supported by H.264, the prediction pixel is generated by copying the reference pixel group on one or both adjacent lines on the left side and the upper side of the prediction target block along the prediction direction or after interpolation. There is. That is, in this intra prediction mode, at least one reference pixel in the reference pixel group is selected according to the prediction direction, and a predicted image is generated by copying the reference pixel or interpolating from the reference pixel. Since the intra prediction mode uses the spatial correlation of images, the prediction accuracy tends to decrease as the distance from the reference pixel increases. That is, the absolute value of the prediction error is likely to increase according to the distance from the reference pixel. This tendency is the same regardless of the prediction direction. More specifically, an intra prediction mode in which only the reference pixel group on the left adjacent line of the prediction target block is referred (copying of the pixel value of the reference pixel or interpolation from the reference pixel) (for example, mode 1 in FIG. 7A and For mode 8), the prediction error shows a trend in the horizontal direction. In the intra prediction mode (for example, mode 0, mode 3, and mode 7 in FIG. 7A) in which only the reference pixel group on the upper adjacent line is referred to the prediction target block, the prediction error shows a tendency in the vertical direction. Furthermore, with respect to a prediction mode in which reference pixel groups on the left adjacent line and the upper adjacent line of the prediction target block are referred to (for example, mode 4, mode 5 and mode 6 in FIG. 7A), the prediction error is in the horizontal direction and the vertical direction. This trend is shown. In summary, it can be said that the tendency is related to the direction orthogonal to the line of the reference pixel group used for generating the predicted image.

1D変換行列Aは、1D変換行列Bに比べて、上記直交する方向(垂直方向または水平方向)について1D直交変換を行う際の係数集密度が高くなる(即ち、量子化変換係数121における非零係数の割合が小さくなる)ように共通の変換基底を予め設計することによって生成される。一方、1D変換行列Bは、このような性質を持たない汎用的な変換行列を設計することによって生成される。例えば、汎用的な変換はDCTである。1D変換行列Aを用いて、上記直交する方向について1D直交変換を行えば、イントラ予測の予測誤差の変換効率が向上し、ひいては符号化効率が向上する。例えば、モード0(垂直方向予測)の予測誤差119は、垂直方向には上記傾向を示す一方、水平方向には上記傾向を示さない。故に、垂直変換部202において1D変換行列Aを用いて1D直交変換を行い、水平変換部205において1D変換行列Bを用いて1D直交変換を行うことにより、効率的な直交変換を実現できる。   Compared to the 1D transformation matrix B, the 1D transformation matrix A has higher coefficient density when performing 1D orthogonal transformation in the orthogonal direction (vertical direction or horizontal direction) (that is, non-zero in the quantized transformation coefficient 121). It is generated by designing a common transformation base in advance so that the ratio of the coefficients becomes small. On the other hand, the 1D transformation matrix B is generated by designing a general-purpose transformation matrix having no such property. For example, a generic conversion is DCT. If 1D orthogonal transformation is performed in the orthogonal direction using the 1D transformation matrix A, the conversion efficiency of prediction errors in intra prediction is improved, and thus the coding efficiency is improved. For example, the prediction error 119 of mode 0 (vertical prediction) shows the above tendency in the vertical direction, but does not show the above tendency in the horizontal direction. Therefore, efficient orthogonal transformation can be realized by performing 1D orthogonal transformation using the 1D transformation matrix A in the vertical transformation unit 202 and performing 1D orthogonal transformation using the 1D transformation matrix B in the horizontal transformation unit 205.

以下、図3を用いて本実施形態に係る逆直交変換部105の詳細を説明する。
逆直交変換部105は、選択スイッチ301、垂直逆変換部302、転置部303、選択スイッチ304及び水平逆変換部305を有する。垂直逆変換部302は、1D逆直交変換部A306及び1D逆直交変換部B307を含む。水平逆変換部305は、1D逆直交変換部A308及び1D直交変換部B309を含む。尚、垂直逆変換部302及び水平逆変換部305の順序は、一例であり、これらは逆順であっても構わない。
Hereinafter, the details of the inverse orthogonal transform unit 105 according to the present embodiment will be described with reference to FIG.
The inverse orthogonal transform unit 105 includes a selection switch 301, a vertical inverse transform unit 302, a transposition unit 303, a selection switch 304, and a horizontal inverse transform unit 305. The vertical inverse transform unit 302 includes a 1D inverse orthogonal transform unit A306 and a 1D inverse orthogonal transform unit B307. The horizontal inverse transform unit 305 includes a 1D inverse orthogonal transform unit A308 and a 1D orthogonal transform unit B309. The order of the vertical inverse transform unit 302 and the horizontal inverse transform unit 305 is an example, and these may be reversed.

1D逆直交変換部A306及び1D逆直交変換部A308は、入力される行列に対して前述の1D変換行列Aの転置行列を乗算する点で共通の機能を持ち、1D逆直交変換部B307及び1D逆直交変換部B309は、入力される行列に対して前述の1D変換行列Bの転置行列を乗算する点で共通の機能を持つ。従って、1D逆直交変換部A306及び1D逆直交変換部A308は、物理的に同一のハードウェアを時分割で使用することによっても実現可能である。また、1D逆直交変換部B307及び1D逆直交変換部B309も同様である。   The 1D inverse orthogonal transform unit A306 and the 1D inverse orthogonal transform unit A308 have a common function in that the input matrix is multiplied by the transposed matrix of the 1D transform matrix A described above, and the 1D inverse orthogonal transform units B307 and 1D. The inverse orthogonal transform unit B309 has a common function in that the input matrix is multiplied by the transposed matrix of the 1D transform matrix B described above. Therefore, the 1D inverse orthogonal transform unit A306 and the 1D inverse orthogonal transform unit A308 can also be realized by using physically identical hardware in a time division manner. The same applies to the 1D inverse orthogonal transform unit B307 and the 1D inverse orthogonal transform unit B309.

選択スイッチ301は、1D変換行列セット情報129に含まれる垂直変換インデックスに従って、復元変換係数122を1D逆直交変換部A306及び1D逆直交変換部B307のうちのいずれか一方に導く。1D逆直交変換部A306は、入力された復元変換係数122(行列形式)に対して1D変換行列Aの転置行列を乗算して出力する。1D逆直交変換部B307は、入力された復元変換係数122に対して1D変換行列Bの転置行列を乗算して出力する。具体的には、1D逆直交変換部A306及び1D逆直交変換部B307(即ち、垂直逆変換部302)は、次の数式(5)に示す一次元の逆直交変換を行う。   The selection switch 301 guides the restoration transform coefficient 122 to one of the 1D inverse orthogonal transform unit A306 and the 1D inverse orthogonal transform unit B307 according to the vertical transform index included in the 1D transform matrix set information 129. The 1D inverse orthogonal transform unit A306 multiplies the input transform transform coefficient 122 (matrix format) by the transposed matrix of the 1D transform matrix A and outputs the result. The 1D inverse orthogonal transform unit B307 multiplies the input restored transform coefficient 122 by the transposed matrix of the 1D transform matrix B and outputs the result. Specifically, the 1D inverse orthogonal transform unit A306 and the 1D inverse orthogonal transform unit B307 (that is, the vertical inverse transform unit 302) perform one-dimensional inverse orthogonal transform represented by the following equation (5).

Figure 0005925855
Figure 0005925855

数式(5)において、Z'は復元変換係数122の行列(N×N)を示し、Vは1D変換行列A及び1D変換行列B(いずれもN×N)の転置行列を包括的に示しており、Y'は1D逆直交変換部A306及び1D逆直交変換部B307の出力行列(N×N)を示す。 In Equation (5), Z 'represents a matrix of the restored transform coefficients 122 (N × N), V T is generically indicates a transposed matrix of 1D transform matrix A and 1D transformation matrix B (both N × N) Y ′ represents an output matrix (N × N) of the 1D inverse orthogonal transform unit A306 and the 1D inverse orthogonal transform unit B307.

転置部303は、垂直逆変換部302の出力行列(Y')の転置を行って、選択スイッチ304に与える。但し、転置部303は、一例であって、対応するハードウェアを必ずしも用意しなくてもよい。例えば、垂直逆変換部302による1D逆直交変換を実行した結果(垂直逆変換部302の出力行列の各要素)を保持しておき、水平逆変換部305による1D逆直交変換を実行するときに適切な順序で読み出せば、転置部303に対応するハードウェアを用意しなくても出力行列(Y')の転置を実行できる。   The transposition unit 303 transposes the output matrix (Y ′) of the vertical inverse transform unit 302 and gives the result to the selection switch 304. However, the transposition unit 303 is an example, and corresponding hardware may not necessarily be prepared. For example, when the 1D inverse orthogonal transform performed by the vertical inverse transform unit 302 is stored (each element of the output matrix of the vertical inverse transform unit 302) and the 1D inverse orthogonal transform is performed by the horizontal inverse transform unit 305. If read in an appropriate order, transposition of the output matrix (Y ′) can be executed without preparing hardware corresponding to the transposition unit 303.

選択スイッチ304は、1D変換行列セット情報129に含まれる水平変換インデックスに従って、転置部303からの入力行列を1D逆直交変換部A308及び1D逆直交変換部B309のうちのいずれか一方に導く。1D逆直交変換部A308は、入力行列に対して1D変換行列Aの転置行列を乗算して出力する。1D逆直交変換部B309は、入力行列に対して1D変換行列Bの転置行列を乗算して出力する。具体的には、1D逆直交変換部A308及び1D逆直交変換部B309(即ち、水平逆変換部305)は、次の数式(6)に示す一次元の逆直交変換を行う。   The selection switch 304 guides the input matrix from the transposition unit 303 to one of the 1D inverse orthogonal transform unit A308 and the 1D inverse orthogonal transform unit B309 according to the horizontal transform index included in the 1D transform matrix set information 129. The 1D inverse orthogonal transform unit A308 multiplies the input matrix by the transposed matrix of the 1D transform matrix A and outputs the result. The 1D inverse orthogonal transform unit B309 multiplies the input matrix by the transposed matrix of the 1D transform matrix B and outputs the result. Specifically, the 1D inverse orthogonal transform unit A308 and the 1D inverse orthogonal transform unit B309 (that is, the horizontal inverse transform unit 305) perform one-dimensional inverse orthogonal transform represented by the following equation (6).

Figure 0005925855
Figure 0005925855

数式(6)において、Hは1D変換行列A及び1D変換行列B(いずれもN×N)の転置行列を包括的に示しており、X'は1D逆直交変換部A308及び1D逆直交変換部B309の出力行列(N×N)を示しており、これは復元予測誤差123を指す。 In Equation (6), H T is 1D transform matrix are generically indicates the transposed matrix of A and 1D transformation matrix B (both N × N), X 'is 1D inverse orthogonal transform unit A308 and 1D inverse orthogonal transform The output matrix (N × N) of the part B309 is shown, which indicates the restoration prediction error 123.

以上のように、逆直交変換部105は、復元変換係数(行列)122に対して、1D変換行列セット部112から入力された1D変換行列セット情報129に従って逆直交変換を行い、復元予測誤差(行列)123を生成する。尚、H.264を考慮すると、逆直交変換部105には、図示しないIDCT部が含まれてもよいし、1D変換行列Aと1D変換行列BのいずれかをDCTのための行列に置き換えてもよい。例えば、1D変換行列BがDCTのための行列であってもよい。更に、逆直交変換部105は、IDCTに加えて、直交変換部102と調和するようにアダマール変換、後述するカルーネン・レーベ変換、離散サイン変換などの種々の直交変換に対応する逆直交変換を実現してもよい。   As described above, the inverse orthogonal transform unit 105 performs inverse orthogonal transform on the reconstructed transform coefficient (matrix) 122 in accordance with the 1D transform matrix set information 129 input from the 1D transform matrix set unit 112, and reconstructed prediction error ( Matrix) 123 is generated. H. In consideration of H.264, the inverse orthogonal transform unit 105 may include an IDCT unit (not shown), or one of the 1D transform matrix A and the 1D transform matrix B may be replaced with a matrix for DCT. For example, the 1D transformation matrix B may be a matrix for DCT. Further, in addition to the IDCT, the inverse orthogonal transform unit 105 realizes inverse orthogonal transforms corresponding to various orthogonal transforms such as Hadamard transform, Karhunen-Loeve transform, and discrete sine transform, which will be described later, in harmony with the orthogonal transform unit 102. May be.

以下、1D変換行列セット部112が生成する、本実施形態に係る1D変換行列セット情報129の詳細を説明する。
1D変換行列セット情報129は、垂直直交変換及び垂直逆直交変換のために使用される変換行列を選択するための垂直変換インデックスと、水平直交変換及び水平逆直交変換のために使用される変換行列を選択するための水平変換インデックスとを直接的または間接的に示す。例えば、1D変換行列セット情報129は、図4Dに示す変換インデックス(TransformIdx)で表現することができる。図4Dのテーブルを参照すれば、変換インデックスから垂直変換インデックス(Vertical Transform Idx)及び水平変換インデックス(Horizontal Transform Idx)を導出できる。
Hereinafter, details of the 1D conversion matrix set information 129 according to the present embodiment generated by the 1D conversion matrix set unit 112 will be described.
The 1D transformation matrix set information 129 includes a vertical transformation index for selecting a transformation matrix used for vertical orthogonal transformation and vertical inverse orthogonal transformation, and a transformation matrix used for horizontal orthogonal transformation and horizontal inverse orthogonal transformation. The horizontal transformation index for selecting is directly or indirectly indicated. For example, the 1D transformation matrix set information 129 can be expressed by a transformation index (TransformIdx) illustrated in FIG. 4D. With reference to the table of FIG. 4D, a vertical transformation index (Vertical Transform Idx) and a horizontal transformation index (Horizontal Transform Idx) can be derived from the transformation index.

図4Bに示すように、垂直変換インデックスが「0」であれば、垂直直交変換または垂直逆直交変換のために前述の1D変換行列A(1D_Transform_Matrix_A)またはその転置行列が選択される。一方、垂直変換インデックスが「1」であれば、垂直直交変換または垂直逆直交変換のために前述の1D変換行列B(1D_Transform_Matrix_B)またはその転置行列が選択される。   As shown in FIG. 4B, if the vertical transformation index is “0”, the 1D transformation matrix A (1D_Transform_Matrix_A) or its transposed matrix is selected for vertical orthogonal transformation or vertical inverse orthogonal transformation. On the other hand, if the vertical transformation index is “1”, the aforementioned 1D transformation matrix B (1D_Transform_Matrix_B) or its transposed matrix is selected for vertical orthogonal transformation or vertical inverse orthogonal transformation.

図4Cに示すように、水平変換インデックスが「0」であれば、水平直交変換または水平逆直交変換のために前述の1D変換行列A(1D_Transform_Matrix_A)またはその転置行列が選択される。一方、水平変換インデックスが「1」であれば、水平直交変換または水平逆直交変換のために前述の1D変換行列B(1D_Transform_Matrix_B)またはその転置行列が選択される。   As shown in FIG. 4C, if the horizontal transformation index is “0”, the 1D transformation matrix A (1D_Transform_Matrix_A) or its transposed matrix is selected for horizontal orthogonal transformation or horizontal inverse orthogonal transformation. On the other hand, if the horizontal transformation index is “1”, the aforementioned 1D transformation matrix B (1D_Transform_Matrix_B) or its transposed matrix is selected for horizontal orthogonal transformation or horizontal inverse orthogonal transformation.

また、各(イントラ)予測モードのインデックス(IntraNxNPredModeIndex)と、その名称(Name of IntraNxNPredMode)と、対応する垂直変換インデックス及び水平変換インデックスを図4Aに例示する。尚、図4Aにおいて、「NxN」は予測対象ブロックのサイズを表している(N=4,8,16など)。予測対象ブロックのサイズは、「MxN」(即ち、正方形以外の矩形)に拡張することもできる。
ここで、図4Aと図4Dを統合した、各予測モードのインデックスとその名称と、対応する変換インデックスを図4Eに例示する。
FIG. 4A illustrates an index (IntraNxNPredModeIndex) of each (intra) prediction mode, its name (Name of IntraNxNPredMode), and a corresponding vertical conversion index and horizontal conversion index. In FIG. 4A, “NxN” represents the size of the prediction target block (N = 4, 8, 16, etc.). The size of the prediction target block can be expanded to “MxN” (that is, a rectangle other than a square).
Here, FIG. 4E illustrates an index of each prediction mode, a name thereof, and a corresponding conversion index obtained by integrating FIGS. 4A and 4D.

1D変換行列セット部112は、予測情報126に含まれる予測モード情報から予測モードのインデックスを検出し、対応する1D変換行列セット情報129を生成する。尚、図4A、図4B、図4C、図4D及び図4Eに示す各種テーブルは一例であり、1D変換行列セット部112はこれらのテーブルの一部または全部を使用することなく1D変換行列セット情報129を生成してよい。   The 1D transformation matrix set unit 112 detects a prediction mode index from the prediction mode information included in the prediction information 126, and generates corresponding 1D transformation matrix set information 129. Note that the various tables shown in FIGS. 4A, 4B, 4C, 4D, and 4E are examples, and the 1D conversion matrix set unit 112 uses the 1D conversion matrix set information without using some or all of these tables. 129 may be generated.

例えば、TrasnformIdxが0を示す場合、Vertical Transform indexが0を、Horizontal Transform indexが0を示すことを意味する。つまり、垂直直交変換には1D変換行列Aを、水平直交変換には1D変換行列Aを使用することを意味する。また、垂直逆直交変換には1D変換行列Aの転置行列を、水平逆直交変換には1D変換行列Aの転置行列を使用することを意味する。   For example, when the TransformIdx indicates 0, it means that the Vertical Transform index indicates 0 and the Horizontal Transform index indicates 0. That is, it means that the 1D conversion matrix A is used for the vertical orthogonal transformation, and the 1D conversion matrix A is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of 1D transformation matrix A is used for vertical inverse orthogonal transformation, and a transposed matrix of 1D transformation matrix A is used for horizontal inverse orthogonal transformation.

TrasnformIdxが1を示す場合、Vertical Transform indexが0を、Horizontal Transform indexが1を示すことを意味する。つまり、垂直直交変換には1D変換行列Aを、水平直交変換には1D変換行列Bを使用することを意味する。また、垂直逆直交変換には1D変換行列Aの転置行列を、水平逆直交変換には1D変換行列Bの転置行列を使用することを意味する。   When the TransformIdx indicates 1, it means that the Vertical Transform index indicates 0 and the Horizontal Transform index indicates 1. That is, it means that the 1D conversion matrix A is used for the vertical orthogonal transformation, and the 1D transformation matrix B is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of 1D transformation matrix A is used for vertical inverse orthogonal transformation, and a transposed matrix of 1D transformation matrix B is used for horizontal inverse orthogonal transformation.

TrasnformIdxが2を示す場合、Vertical Transform indexが1を、Horizontal Transform indexが0を示すことを意味する。つまり、垂直直交変換には1D変換行列Bを、水平直交変換には1D変換行列Aを使用することを意味する。また、垂直逆直交変換には1D変換行列Bの転置行列を、水平逆直交変換には1D変換行列Aの転置行列を使用することを意味する。   When the TransformIdx indicates 2, it means that the Vertical Transform index indicates 1, and the Horizontal Transform index indicates 0. That is, it means that the 1D transformation matrix B is used for the vertical orthogonal transformation and the 1D transformation matrix A is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of 1D transformation matrix B is used for vertical inverse orthogonal transformation, and a transposed matrix of 1D transformation matrix A is used for horizontal inverse orthogonal transformation.

TrasnformIdxが3を示す場合、Vertical Transform indexが1をHorizontal Transform indexが1を示すことを意味する。つまり、垂直直交変換には1D変換行列Bを、水平直交変換には1D変換行列Bを使用することを意味する。また、垂直逆直交変換には1D変換行列Bの転置行列を、水平逆直交変換には1D変換行列Bの転置行列を使用することを意味する。   When TransformIdx indicates 3, it means that Vertical Transform index indicates 1, and Horizontal Transform index indicates 1. That is, it means that the 1D transformation matrix B is used for the vertical orthogonal transformation, and the 1D transformation matrix B is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of 1D transformation matrix B is used for vertical inverse orthogonal transformation, and a transposed matrix of 1D transformation matrix B is used for horizontal inverse orthogonal transformation.

図4Aに示すテーブルは、前述の各イントラ予測モードの傾向を考慮して1D変換行列セット情報129を割り当てている。即ち、予測誤差の垂直方向に上記傾向を示す予測モードには、Vertical Transform indexに0が、水平方向に上記傾向を示すモードには、Horizontal Transform indexに0が割り当られている。一方、上記傾向を示さない方向には、夫々1が割り当られている。各予測モードの垂直方向及び水平方向を上記傾向の有無に従って2つのクラスに分類し、垂直方向及び水平方向の夫々について適応的に1D変換行列Aまたは1D変換行列Bを適用することにより、各予測モードに一律にDCTなどの固定的な直交変換を施す場合に比べて、高い変換効率が達成される。   In the table shown in FIG. 4A, 1D transformation matrix set information 129 is assigned in consideration of the tendency of each intra prediction mode described above. In other words, 0 is assigned to the Vertical Transform index in the prediction mode that shows the above-mentioned tendency in the vertical direction of the prediction error, and 0 is assigned to the Horizontal Transform index in the mode that shows the above-mentioned tendency in the horizontal direction. On the other hand, 1 is assigned to each direction in which the above tendency is not exhibited. By classifying the vertical direction and horizontal direction of each prediction mode into two classes according to the presence or absence of the above-mentioned trends, each prediction mode is applied by adaptively applying the 1D conversion matrix A or 1D conversion matrix B to each of the vertical direction and the horizontal direction. High conversion efficiency is achieved as compared with a case where fixed orthogonal transform such as DCT is uniformly applied to the mode.

以下、係数順制御部113の詳細を説明する。
係数順制御部113は、2次元表現である量子化変換係数121の各要素を所定の順序に従って配列することにより、1次元表現である量子化変換係数列117に変換する。一例として、係数順制御部113は、予測モードに関わらず共通の2D−1D変換を行うことができる。具体的には、係数制御部113は、H.264と同様にジグザグスキャンを利用できる。ジグザグスキャンは、図8Aに示すような順序で量子化変換係数121の各要素を配列して、図8Bに示すような量子化変換係数列117に変換する。図8A及び図8Bにおいて、(i,j)は各要素の量子化変換係数(行列)121中の座標(位置情報)を示す。また、図8Cは、ジグザグスキャンを利用した2D−1D変換(4×4画素ブロックの場合)を示している。具体的には、図8Cは、ジグザグスキャンを利用して2D−1D変換された量子化変換係数列117の係数順(スキャン順)を示すインデックス(idx)と、対応する量子化変換係数121の要素(cij)とを示している。尚、図8Cにおいて、cijは、量子化変換係数(行列)121中の座標(i,j)の要素を示している。
Details of the coefficient order control unit 113 will be described below.
The coefficient order control unit 113 converts each element of the quantized transform coefficient 121 that is a two-dimensional representation into a quantized transform coefficient sequence 117 that is a one-dimensional representation by arranging the elements in a predetermined order. As an example, the coefficient order control unit 113 can perform common 2D-1D conversion regardless of the prediction mode. Specifically, the coefficient control unit 113 includes the H.264 standard. Similar to H.264, zigzag scanning can be used. In the zigzag scan, the respective elements of the quantized transform coefficients 121 are arranged in the order shown in FIG. 8A and converted into a quantized transform coefficient string 117 as shown in FIG. 8B. 8A and 8B, (i, j) indicates the coordinates (position information) in the quantized transform coefficient (matrix) 121 of each element. FIG. 8C shows 2D-1D conversion using a zigzag scan (in the case of a 4 × 4 pixel block). Specifically, FIG. 8C shows an index (idx) indicating the coefficient order (scan order) of the quantized transform coefficient sequence 117 subjected to 2D-1D conversion using zigzag scanning, and the corresponding quantized transform coefficient 121. Element (cij) is shown. In FIG. 8C, cij indicates an element of coordinates (i, j) in the quantized transform coefficient (matrix) 121.

別の例として、係数順制御部113は、予測モード毎の個別の2D−1D変換を行うことができる。このような動作を行う係数順制御部113は、図5Aに例示されている。この係数順制御部113は、選択スイッチ501と、9種類の予測モード毎の個別の2D−1D変換部502,・・・,510とを含む。選択スイッチ501は、予測情報126に含まれる予測モード情報(例えば、図4Aの予測モードのインデックス)に従って量子化変換係数121を、予測モードに応じた2D−1D変換部(502,・・・,510のうちいずれか1つ)に導く。例えば、予測モードインデックスが0であれば、選択スイッチ501は量子化変換係数121を2D−1D変換部502に導く。図5Aにおいて、各予測モードと2D−1D変換部とは1対1に対応しており、量子化変換係数121は予測モードに応じた1つの2D−1D変換部に導かれる。図9は、各2D−1D変換部502,・・・,510が行う2D−1D変換(4×4画素ブロックの場合)を例示する。尚、図9に示されるような予測モード毎の2D−1D変換の具体的な設計手法は、後述される。各予測モードに対応する2D−1D変換部によって2D−1D変換された量子化変換係数列117の係数順(スキャン順)を示すインデックス(idx)と、対応する量子化変換係数121の要素(cij)とを示している。尚、図9において、cijは、量子化変換係数(行列)121中の座標(i,j)の要素を示している。また、図9において、各予測モードは、その名称によって表されているが、予測モードインデックスとの対応は図4Aに示す通りである。このように、予測モード毎の個別の2D−1D変換を適用すれば、例えば予測モード毎の量子化変換係数121における非零係数の発生傾向に適合した順序で係数がスキャンされるので符号化効率が向上する。   As another example, the coefficient order control unit 113 can perform individual 2D-1D conversion for each prediction mode. The coefficient order control unit 113 that performs such an operation is illustrated in FIG. 5A. The coefficient order control unit 113 includes a selection switch 501 and individual 2D-1D conversion units 502,..., 510 for each of nine types of prediction modes. The selection switch 501 converts the quantized transform coefficient 121 according to the prediction mode information included in the prediction information 126 (for example, the index of the prediction mode in FIG. 4A), and the 2D-1D conversion unit (502,. Any one of 510). For example, if the prediction mode index is 0, the selection switch 501 guides the quantized transform coefficient 121 to the 2D-1D transform unit 502. In FIG. 5A, each prediction mode and the 2D-1D conversion unit have a one-to-one correspondence, and the quantized transform coefficient 121 is guided to one 2D-1D conversion unit corresponding to the prediction mode. FIG. 9 illustrates 2D-1D conversion (in the case of a 4 × 4 pixel block) performed by each 2D-1D conversion unit 502,. A specific design method for 2D-1D conversion for each prediction mode as shown in FIG. 9 will be described later. An index (idx) indicating the coefficient order (scan order) of the quantized transform coefficient sequence 117 subjected to 2D-1D conversion by the 2D-1D transform unit corresponding to each prediction mode, and an element (cij) of the corresponding quantized transform coefficient 121 ). In FIG. 9, cij represents an element of coordinates (i, j) in the quantized transform coefficient (matrix) 121. Further, in FIG. 9, each prediction mode is represented by its name, but the correspondence with the prediction mode index is as shown in FIG. 4A. As described above, when the individual 2D-1D transform for each prediction mode is applied, for example, the coefficients are scanned in an order suitable for the generation tendency of the non-zero coefficient in the quantized transform coefficient 121 for each prediction mode. Will improve.

尚、簡単化のために4×4画素ブロックに関する例を示したが、8×8画素ブロック、16×16画素ブロックなどに関しても同様に、予測モード毎の個別の2D−1D変換を規定できる。また、画素ブロックがM×Nで表現される矩形ブロックであるならば、2D−1D変換を行うブロックサイズとしてM×Nを用いることもできる。この場合には、矩形ブロックに関して、予測モード毎に図9に例示されるような個別の2D−1D変換を規定すればよい。   For simplification, an example related to a 4 × 4 pixel block is shown, but individual 2D-1D conversion for each prediction mode can be defined similarly for an 8 × 8 pixel block, a 16 × 16 pixel block, and the like. Further, if the pixel block is a rectangular block expressed by M × N, M × N can be used as a block size for performing 2D-1D conversion. In this case, regarding the rectangular block, individual 2D-1D conversion as exemplified in FIG. 9 may be defined for each prediction mode.

更に別の例として、係数順制御部113は、2D−1D変換におけるスキャン順を動的に更新してもよい。このような動作を行う係数順制御部113は、図5Bに例示される。この係数順制御部113は、選択スイッチ501と、9種類の予測モード毎の個別の2D−1D変換部502,・・・,510と、発生頻度カウント部511と、係数順更新部512とを含む。選択スイッチ501は、図5Aに関して説明した通りである。9種類の予測モード毎の個別の2D−1D変換部502,・・・,510は、そのスキャン順が係数順更新部512によって更新される点で図5Aとは異なる。   As yet another example, the coefficient order control unit 113 may dynamically update the scan order in the 2D-1D conversion. The coefficient order control unit 113 that performs such an operation is illustrated in FIG. 5B. The coefficient order control unit 113 includes a selection switch 501, individual 2D-1D conversion units 502,..., 510 for each of nine types of prediction modes, an occurrence frequency counting unit 511, and a coefficient order updating unit 512. Including. The selection switch 501 is as described with reference to FIG. 5A. The individual 2D-1D conversion units 502,..., 510 for each of the nine types of prediction modes differ from FIG. 5A in that the scan order is updated by the coefficient order update unit 512.

発生頻度カウント部511は、予測モード毎に、量子化変換係数列117の各要素における非零係数の発生回数のヒストグラムを作成する。発生頻度カウント部511は、作成したヒストグラム513を係数順更新部512に入力する。   The occurrence frequency counting unit 511 creates a histogram of the number of occurrences of non-zero coefficients in each element of the quantized transform coefficient sequence 117 for each prediction mode. The occurrence frequency counting unit 511 inputs the created histogram 513 to the coefficient order updating unit 512.

係数順更新部512は、予め定められたタイミングで、ヒストグラム513に基づいて係数順の更新を行う。上記タイミングは、例えば、コーディングツリーユニットの符号化処理が終了したタイミング、コーディングツリーユニット内の1ライン分の符号化処理が終了したタイミングなどである。   The coefficient order update unit 512 updates the coefficient order based on the histogram 513 at a predetermined timing. The timing is, for example, the timing when the coding process of the coding tree unit is finished, the timing when the coding process for one line in the coding tree unit is finished, or the like.

具体的には、係数順更新部512は、ヒストグラム513を参照して、非零係数の発生回数が閾値以上にカウントされた要素を持つ予測モードに関して係数順の更新を行う。例えば、係数順更新部512は、非零係数の発生が16回以上カウントされた要素を持つ予測モードに関して更新を行う。このような発生回数に閾値を設けることによって、係数順の更新が大域的に実施されるので、局所的な最適解に収束しにくくなる。   Specifically, the coefficient order update unit 512 refers to the histogram 513, and updates the coefficient order for the prediction mode having an element in which the number of occurrences of non-zero coefficients is counted more than a threshold. For example, the coefficient order update unit 512 updates the prediction mode having an element in which the occurrence of a non-zero coefficient is counted 16 times or more. By providing a threshold value for the number of occurrences, the coefficient order is updated globally, so that it is difficult to converge to a local optimum solution.

係数順更新部512は、更新対象となる予測モードに関して、非零係数の発生頻度の降順に要素をソーティングする。ソーティングは、例えばバブルソート、クイックソートなどの既存のアルゴリズムによって実現できる。そして、係数順更新部512は、ソーティングされた要素の順序を示す係数順更新情報514を、更新対象となる予測モードに対応する2D−1D変換部に入力する。   The coefficient order update unit 512 sorts the elements in descending order of the occurrence frequency of the non-zero coefficient regarding the prediction mode to be updated. Sorting can be realized by existing algorithms such as bubble sort and quick sort. Then, the coefficient order update unit 512 inputs coefficient order update information 514 indicating the order of the sorted elements to the 2D-1D conversion unit corresponding to the prediction mode to be updated.

係数順更新情報514が入力されると、2D−1D変換部は更新後のスキャン順に従って2D−1D変換を行う。尚、スキャン順を動的に更新する場合には、各2D−1D変換部の初期スキャン順を予め定めておく必要がある。例えば、ジグザグスキャンまたは図9に例示したスキャン順が、初期スキャン順として利用できる。   When the coefficient order update information 514 is input, the 2D-1D conversion unit performs 2D-1D conversion in accordance with the updated scan order. When the scan order is dynamically updated, the initial scan order of each 2D-1D conversion unit needs to be determined in advance. For example, the zigzag scan or the scan order illustrated in FIG. 9 can be used as the initial scan order.

このように、動的にスキャン順を更新することにより、予測画像の性質、量子化情報(量子化パラメータ)などの影響に応じて、量子化変換係数121における非零係数の発生傾向が変化する場合にも、安定的に高い符号化効率を期待できる。具体的には、エントロピー符号化部114におけるランレングス符号化の発生符号量を抑制できる。   In this way, by dynamically updating the scan order, the tendency of occurrence of non-zero coefficients in the quantized transform coefficients 121 changes according to the influence of the properties of the predicted image, quantization information (quantization parameters), and the like. Even in this case, high encoding efficiency can be expected stably. Specifically, the generated code amount of run-length encoding in the entropy encoding unit 114 can be suppressed.

尚、簡単化のためにH.264を例示して予測モードが9種類の場合を説明したが、予測モードが17種類、33種類などに拡張された場合にも、拡張された各予測モードに対応する2D−1D変換部を追加すれば予測モード毎の個別の2D−1D変換を行うことができる。   For simplification, H.C. In the example of H.264, there are 9 types of prediction modes. However, when the prediction modes are expanded to 17 types, 33 types, etc., a 2D-1D conversion unit corresponding to each expanded prediction mode is added. Then, individual 2D-1D conversion for each prediction mode can be performed.

以下、図10A及び図10Bを用いて、図1の画像符号化装置が符号化対象ブロック(コーディングツリーユニット)に対して行う処理を説明する。尚、図10A及び図10Bの例では、本実施形態に係る直交変換及び逆直交変換(即ち、1D変換行列セット情報129に基づく適応的な直交変換及び逆直交変換)が有効であることを前提としている。しかしながら、後述するようにシンタクスによって本実施形態に係る直交変換及び逆直交変換が無効となることが規定されてもよい。   Hereinafter, processing performed by the image coding apparatus in FIG. 1 for a coding target block (coding tree unit) will be described with reference to FIGS. 10A and 10B. In the examples of FIGS. 10A and 10B, it is assumed that the orthogonal transformation and inverse orthogonal transformation (that is, adaptive orthogonal transformation and inverse orthogonal transformation based on the 1D transformation matrix set information 129) according to the present embodiment are effective. It is said. However, as described later, it may be specified that the orthogonal transform and the inverse orthogonal transform according to the present embodiment are invalidated by the syntax.

入力画像118が符号化対象ブロック単位で図1の画像符号化装置に入力されると、符号化対象ブロックの符号化処理が開始する(ステップS601)。イントラ予測部108及びインター予測部109は、参照画像メモリ107に保存されている参照画像125を用いて、イントラ予測画像及びインター予測画像を生成する(ステップS602)。符号化制御部116は前述の符号化コストなどの観点から最適な予測モードを判定し、予測情報126を生成する(ステップS603)。予測情報126は、予測選択部110から前述のように各要素に入力される。ステップS603において生成された予測情報126がイントラ予測を示唆するのであれば処理はステップS605に進み、インター予測を示唆するのであれば処理はステップS605’に進む。   When the input image 118 is input to the image encoding apparatus in FIG. 1 in units of encoding target blocks, the encoding target block encoding process starts (step S601). The intra prediction unit 108 and the inter prediction unit 109 generate an intra prediction image and an inter prediction image using the reference image 125 stored in the reference image memory 107 (step S602). The encoding control unit 116 determines the optimal prediction mode from the viewpoint of the above-described encoding cost and generates the prediction information 126 (step S603). The prediction information 126 is input from the prediction selection unit 110 to each element as described above. If the prediction information 126 generated in step S603 indicates intra prediction, the process proceeds to step S605. If the prediction information 126 indicates inter prediction, the process proceeds to step S605 '.

ステップS605では、減算部101が符号化対象ブロックから(イントラ)予測画像127を減算して予測誤差119を生成し、処理はステップS606に進む。一方、ステップS605’でも同様に、減算部101が符号化対象ブロックから(インター)予測画像127を減算して予測誤差119を生成し、処理はステップS614’に進む。   In step S605, the subtraction unit 101 generates the prediction error 119 by subtracting the (intra) prediction image 127 from the encoding target block, and the process proceeds to step S606. On the other hand, in step S605 'as well, the subtracting unit 101 subtracts the (inter) predicted image 127 from the encoding target block to generate a prediction error 119, and the process proceeds to step S614'.

ステップS606では、1D変換行列セット部112が、ステップS603において生成された予測情報126に含まれる予測モード情報を抽出する。1D変換行列セット部112は、抽出した予測モード情報に基づいて(例えば、図4Aのテーブルを参照して)1D変換行列セット情報129を生成する(ステップS607)。1D変換行列セット部112は、1D変換行列セット情報129を直交変換部102及び逆直交変換部105に入力する。   In step S606, the 1D conversion matrix setting unit 112 extracts prediction mode information included in the prediction information 126 generated in step S603. The 1D transformation matrix set unit 112 generates 1D transformation matrix set information 129 based on the extracted prediction mode information (for example, referring to the table of FIG. 4A) (step S607). The 1D transform matrix set unit 112 inputs 1D transform matrix set information 129 to the orthogonal transform unit 102 and the inverse orthogonal transform unit 105.

直交変換部102内の選択スイッチ201は、1D変換行列セット情報129に基づいて1D直交変換部A206または1D直交変換部B207を選択する(ステップS608、ステップS609及びステップS610)。一方、直交変換部102内の選択スイッチ204は、1D変換行列セット情報129に基づいて1D直交変換部A208または1D直交変換部B209を選択する(ステップS611、ステップS612及びステップS613)。その後、処理はステップS614に進む。   The selection switch 201 in the orthogonal transform unit 102 selects the 1D orthogonal transform unit A206 or the 1D orthogonal transform unit B207 based on the 1D transform matrix set information 129 (steps S608, S609, and S610). On the other hand, the selection switch 204 in the orthogonal transform unit 102 selects the 1D orthogonal transform unit A208 or the 1D orthogonal transform unit B209 based on the 1D transform matrix set information 129 (steps S611, S612, and S613). Thereafter, the process proceeds to step S614.

例えば、1D変換行列セット情報129の一例である変換インデックス(TransformIdx)が0の場合、選択スイッチ201は垂直変換部202内の1D直交変換部A206を選択し(ステップS609)、選択スイッチ204は水平変換部205内の1D直交変換部A208を選択する(ステップS612)。TransformIdxが1の場合、選択スイッチ201は垂直変換部202内の1D直交変換部A206を選択し(ステップS609)、選択スイッチ204は水平変換部205内の1D直交変換部B209を選択する(ステップS613)。TransformIdxが2の場合、選択スイッチ201は垂直変換部202内の1D直交変換部B207を選択し(ステップS610)、選択スイッチ204は水平変換部205内の1D直交変換部A208を選択する(ステップS612)。TransformIdxが3の場合、選択スイッチ201は垂直変換部202内の1D直交変換部B207を選択し(ステップS610)、選択スイッチ204は水平変換部205内の1D直交変換部B209を選択する(ステップS613)。   For example, when the transformation index (TransformIdx) that is an example of the 1D transformation matrix set information 129 is 0, the selection switch 201 selects the 1D orthogonal transformation unit A206 in the vertical transformation unit 202 (step S609), and the selection switch 204 is horizontal. The 1D orthogonal transform unit A208 in the transform unit 205 is selected (step S612). When TransformIdx is 1, the selection switch 201 selects the 1D orthogonal transform unit A206 in the vertical transform unit 202 (step S609), and the selection switch 204 selects the 1D orthogonal transform unit B209 in the horizontal transform unit 205 (step S613). ). When TransformIdx is 2, the selection switch 201 selects the 1D orthogonal transform unit B207 in the vertical transform unit 202 (step S610), and the selection switch 204 selects the 1D orthogonal transform unit A208 in the horizontal transform unit 205 (step S612). ). When TransformIdx is 3, the selection switch 201 selects the 1D orthogonal transform unit B207 in the vertical transform unit 202 (step S610), and the selection switch 204 selects the 1D orthogonal transform unit B209 in the horizontal transform unit 205 (step S613). ).

ステップS614では、直交変換部102が予測誤差119に対して、ステップS608,・・・,ステップS613による設定に応じた垂直変換及び水平変換を夫々行って、変換係数120を生成する。続いて、量子化部103がステップS614において生成された変換係数120に量子化を行って量子化変換係数121を生成し(ステップS615)、処理はステップS616に進む。   In step S614, the orthogonal transform unit 102 performs vertical transform and horizontal transform on the prediction error 119 according to the settings in step S608,..., Step S613, respectively, to generate the transform coefficient 120. Subsequently, the quantization unit 103 quantizes the transform coefficient 120 generated in step S614 to generate a quantized transform coefficient 121 (step S615), and the process proceeds to step S616.

一方、ステップS614’では、直交変換部102が予測誤差119に対して、例えばDCTなどの固定的な直交変換を行って、変換係数120を生成する。続いて、量子化部103がステップS614’において生成された変換係数120に量子化を行って量子化変換係数121を生成し(ステップS615’)、処理はステップS617’に進む。尚、ステップS614’において行われる直交変換は、図示しないDCT部などによって実現されてもよいし、1D直交変換部B207及び1D直交変換部B209によって実現されてもよい。   On the other hand, in step S <b> 614 ′, the orthogonal transform unit 102 performs a fixed orthogonal transform such as DCT on the prediction error 119 to generate a transform coefficient 120. Subsequently, the quantization unit 103 quantizes the transform coefficient 120 generated in step S614 'to generate a quantized transform coefficient 121 (step S615'), and the process proceeds to step S617 '. Note that the orthogonal transform performed in step S614 'may be realized by a DCT unit (not shown) or the like, or may be realized by the 1D orthogonal transform unit B207 and the 1D orthogonal transform unit B209.

ステップS616では、係数順制御部113が、ステップS603において生成された予測情報126に含まれる予測モード情報に基づいてスキャン順(即ち、図5A及び図5Bの例であれば、選択スイッチ501の接続先)を設定し、処理はステップS617に進む。但し、係数制御部113が予測モードに関わらず共通の2D−1D変換を行うのであれば、ステップS616は省略可能である。   In step S616, the coefficient order control unit 113 scans based on the prediction mode information included in the prediction information 126 generated in step S603 (that is, the connection of the selection switch 501 in the example of FIGS. 5A and 5B). First) is set, and the process proceeds to step S617. However, if the coefficient control unit 113 performs common 2D-1D conversion regardless of the prediction mode, step S616 can be omitted.

ステップS617では、係数順制御部113が量子化変換係数121に対して、ステップS616における設定に応じた2D−1D変換を行って量子化変換係数列117を生成する。続いて、エントロピー符号化部114が、この量子化変換係数列117を含む符号化パラメータをエントロピー符号化する(ステップS618)。符号化データ130は、符号化制御部116によって管理される適切なタイミングで出力される。一方、逆量子化部104は量子化変換係数121に逆量子化を行って復元変換係数122を生成し(ステップS619)、処理はステップS620に進む。   In step S617, the coefficient order control unit 113 performs 2D-1D conversion on the quantized transform coefficient 121 according to the setting in step S616 to generate a quantized transform coefficient sequence 117. Subsequently, the entropy encoding unit 114 performs entropy encoding on the encoding parameter including the quantized transform coefficient sequence 117 (step S618). The encoded data 130 is output at an appropriate timing managed by the encoding control unit 116. On the other hand, the inverse quantization unit 104 performs inverse quantization on the quantized transform coefficient 121 to generate a restored transform coefficient 122 (step S619), and the process proceeds to step S620.

ステップS617’では、係数順制御部113が量子化変換係数121に対して、例えばジグザグスキャンまたは図9のIntra_NxN_DCに対応する2D−1D変換などの固定的な2D−1D変換を行って量子化変換係数列117を生成する。続いて、エントロピー符号化部114が、この量子化変換係数列117を含む符号化パラメータをエントロピー符号化する(ステップS618’)。符号化データ130は、符号化制御部116によって管理される適切なタイミングで出力される。一方、逆量子化部104は量子化変換係数121に逆量子化を行って復元変換係数122を生成し(ステップS619’)、処理はステップS626’に進む。   In step S617 ′, the coefficient order control unit 113 performs a fixed 2D-1D conversion such as a zigzag scan or a 2D-1D conversion corresponding to Intra_NxN_DC in FIG. A coefficient sequence 117 is generated. Subsequently, the entropy encoding unit 114 performs entropy encoding on the encoding parameter including the quantized transform coefficient sequence 117 (step S618 '). The encoded data 130 is output at an appropriate timing managed by the encoding control unit 116. On the other hand, the inverse quantization unit 104 performs inverse quantization on the quantized transform coefficient 121 to generate the restored transform coefficient 122 (step S619 '), and the process proceeds to step S626'.

逆直交変換部105内の選択スイッチ301は、1D変換行列セット情報129に基づいて1D逆直交変換部A306または1D逆直交変換部B307を選択する(ステップS620、ステップS621及びステップS622)。一方、逆直交変換部105内の選択スイッチ304は、1D変換行列セット情報129に基づいて1D逆直交変換部A308または1D逆直交変換部B309を選択する(ステップS623、ステップS624及びステップS625)。その後、処理はステップS626に進む。   The selection switch 301 in the inverse orthogonal transform unit 105 selects the 1D inverse orthogonal transform unit A306 or the 1D inverse orthogonal transform unit B307 based on the 1D transform matrix set information 129 (step S620, step S621, and step S622). On the other hand, the selection switch 304 in the inverse orthogonal transform unit 105 selects the 1D inverse orthogonal transform unit A308 or the 1D inverse orthogonal transform unit B309 based on the 1D transform matrix set information 129 (steps S623, S624, and S625). Thereafter, the process proceeds to step S626.

例えば、1D変換行列セット情報129の一例である変換インデックス(TransformIdx)が0の場合、選択スイッチ301は垂直逆変換部302内の1D逆直交変換部A306を選択し(ステップS621)、選択スイッチ304は水平逆変換部305内の1D逆直交変換部A308を選択する(ステップS624)。TransformIdxが1の場合、選択スイッチ301は垂直逆変換部302内の1D逆直交変換部A306を選択し(ステップS621)、選択スイッチ304は水平逆変換部305内の1D逆直交変換部B309を選択する(ステップS625)。TransformIdxが2の場合、選択スイッチ301は垂直逆変換部302内の1D逆直交変換部B307を選択し(ステップS622)、選択スイッチ304は水平逆変換部305内の1D逆直交変換部A308を選択する(ステップS624)。TransformIdxが3の場合、選択スイッチ301は垂直逆変換部302内の1D逆直交変換部B307を選択し(ステップS622)、選択スイッチ304は水平逆変換部305内の1D逆直交変換部B309を選択する(ステップS625)。   For example, when the transform index (TransformIdx), which is an example of the 1D transform matrix set information 129, is 0, the selection switch 301 selects the 1D inverse orthogonal transform unit A306 in the vertical inverse transform unit 302 (step S621), and the selection switch 304 Selects the 1D inverse orthogonal transform unit A308 in the horizontal inverse transform unit 305 (step S624). When TransformIdx is 1, the selection switch 301 selects the 1D inverse orthogonal transform unit A306 in the vertical inverse transform unit 302 (step S621), and the selection switch 304 selects the 1D inverse orthogonal transform unit B309 in the horizontal inverse transform unit 305. (Step S625). When TransformIdx is 2, the selection switch 301 selects the 1D inverse orthogonal transform unit B307 in the vertical inverse transform unit 302 (step S622), and the selection switch 304 selects the 1D inverse orthogonal transform unit A308 in the horizontal inverse transform unit 305. (Step S624). When TransformIdx is 3, the selection switch 301 selects the 1D inverse orthogonal transform unit B307 in the vertical inverse transform unit 302 (step S622), and the selection switch 304 selects the 1D inverse orthogonal transform unit B309 in the horizontal inverse transform unit 305. (Step S625).

ステップS626では、逆直交変換部105が復元変換係数122に対して、ステップS620,・・・,ステップS625による設定に応じた垂直逆変換及び水平逆変換を夫々行って復元予測誤差123を生成し、処理はステップS627に進む。ステップS626’では、逆直交変換部105が復元変換係数122に対して、例えばIDCTなどの逆直交変換を行って復元予測誤差123を生成し、処理はステップS627に進む。尚、ステップS626’において行われる固定的な逆直交変換は、図示しないIDCT部などによって実現されてもよいし、1D逆直交変換部B307及び1D逆直交変換部B309によって実現されてもよい。   In step S626, the inverse orthogonal transform unit 105 performs the vertical inverse transform and the horizontal inverse transform according to the settings in step S620,..., Step S625 on the restored transform coefficient 122 to generate the restored prediction error 123. The process proceeds to step S627. In step S626 ', the inverse orthogonal transform unit 105 performs inverse orthogonal transform such as IDCT on the reconstructed transform coefficient 122 to generate a reconstructed prediction error 123, and the process proceeds to step S627. Note that the fixed inverse orthogonal transform performed in step S626 'may be realized by an IDCT unit (not shown) or the like, or may be realized by the 1D inverse orthogonal transform unit B307 and the 1D inverse orthogonal transform unit B309.

ステップS627において、加算部106はステップS626またはステップS626’において生成された復元予測誤差123と予測画像127と加算して局所復号画像124を生成し、この局所復号画像124が参照画像として参照画像メモリ107に保存され、符号化対象ブロックの符号化処理が終了する(ステップS628)。   In step S627, the adding unit 106 adds the reconstructed prediction error 123 generated in step S626 or step S626 ′ and the predicted image 127 to generate a local decoded image 124. The local decoded image 124 is used as a reference image as a reference image memory. In step S628, the encoding process of the block to be encoded is completed.

以下、前述の1D変換行列A及び1D変換行列Bの設計手法について説明する。H.264の4×4画素ブロック及び8×8画素ブロックでは、夫々9種類の予測モードが定義されており、16x16画素ブロックでは4種類の予測モードが定義されている。   Hereinafter, a design method of the above-described 1D conversion matrix A and 1D conversion matrix B will be described. H. In the H.264 4 × 4 pixel block and the 8 × 8 pixel block, nine types of prediction modes are defined, and in the 16 × 16 pixel block, four types of prediction modes are defined.

まず、各予測モードの予測誤差119を夫々生成する。各予測モードの予測誤差119のうち、参照画素からの距離が大きくなるにつれて予測誤差の絶対値が大きくなるという前述の傾向を垂直方向または水平方向に示すものを夫々収集する。そして、この傾向を示す方向を縦に設定して予測誤差119を横に並べた行列に対して特異値分解を行うことにより、係る行列の垂直方向の相関を除去する1D直交基底を設計する。この1D直交基底を行ベクトルとし縦に並べて1D変換行列Aが生成される。   First, a prediction error 119 for each prediction mode is generated. Of the prediction errors 119 in each prediction mode, those indicating the above-mentioned tendency that the absolute value of the prediction error increases as the distance from the reference pixel increases in the vertical direction or the horizontal direction are collected. Then, by setting the direction indicating this tendency vertically and performing singular value decomposition on the matrix in which the prediction errors 119 are arranged horizontally, a 1D orthogonal basis for removing the correlation in the vertical direction of the matrix is designed. A 1D conversion matrix A is generated by vertically arranging the 1D orthogonal bases as row vectors.

一方、係る傾向を示さない方向を縦に設定して予測誤差119を横に並べた行列に対して、特異値分解を行うことにより、係る行列の垂直方向の相関を除去する1D直交基底を生成する。この1D直交基底を行ベクトルとし縦に並べて1D変換行列Bが生成される。尚、この1D変換行列Bは、単にDCTのための行列で代用することも可能である。簡単化のために4×4画素ブロックに関する設計を例示したが、8×8画素ブロック及び16×16画素ブロックのための1D変換行列も同様に設計可能である。また、説明した設計手法は一例であり、前述の予測残差の性質を考慮して適宜設計を行う余地がある。   On the other hand, a singular value decomposition is performed on a matrix in which prediction directions 119 are set vertically and a prediction error 119 is arranged horizontally, thereby generating a 1D orthogonal basis for removing the vertical correlation of the matrix. To do. A 1D conversion matrix B is generated by vertically arranging the 1D orthogonal bases as row vectors. The 1D conversion matrix B can be simply replaced with a matrix for DCT. Although a design for a 4 × 4 pixel block is illustrated for simplicity, 1D transformation matrices for 8 × 8 pixel blocks and 16 × 16 pixel blocks can be designed as well. The described design method is an example, and there is room for appropriate design in consideration of the properties of the prediction residual described above.

以下、図9に例示されるような予測モード毎の2D−1D変換(スキャン順)の具体的な設計手法について説明する。予測モード毎のスキャン順は、量子化部103によって生成される量子化変換係数121に基づいて設計される。例えば、4×4画素ブロックに関する設計では、複数の訓練画像を用意して9種類の各予測モードの予測残差119を夫々生成する。この予測残差119の各々に対して数式(3)及び数式(4)に示す直交変換を行って変換係数120を生成し、更にこれを量子化する。量子化変換係数121に対して、4×4画素ブロック内の各要素について非零係数の発生回数を累積加算する。この累積加算は全ての訓練画像に対して行われ、4×4画素ブロックの16個の要素毎に非零係数の発生頻度を示すヒストグラムが作成される。このヒストグラムに基づいて、発生頻度の高い要素から昇順にインデックス0〜15が与えられる。このようなインデックスの割り当てが、全ての予測モードについて個別に行われる。割り当てられたインデックスの順序が、各予測モードに対応するスキャン順として使用される。   Hereinafter, a specific design method of 2D-1D conversion (scan order) for each prediction mode as exemplified in FIG. 9 will be described. The scan order for each prediction mode is designed based on the quantized transform coefficient 121 generated by the quantization unit 103. For example, in the design related to a 4 × 4 pixel block, a plurality of training images are prepared and the prediction residuals 119 of each of the nine types of prediction modes are generated. Each of the prediction residuals 119 is subjected to orthogonal transformation shown in Equation (3) and Equation (4) to generate a transform coefficient 120, which is further quantized. The number of occurrences of non-zero coefficients is cumulatively added to each quantized transform coefficient 121 for each element in the 4 × 4 pixel block. This cumulative addition is performed on all training images, and a histogram indicating the frequency of occurrence of non-zero coefficients is created for every 16 elements of the 4 × 4 pixel block. Based on this histogram, indexes 0 to 15 are given in ascending order from the element with the highest occurrence frequency. Such index assignment is performed individually for all prediction modes. The order of the assigned indexes is used as the scan order corresponding to each prediction mode.

簡単化のために4×4画素ブロックに関する設計を例示したが、8×8画素ブロック及び16×16画素ブロックのスキャン順も同様に設計可能である。また、予測モードが17種類、33種類及び任意の数に拡張しても同様の手法で設計可能である。尚、スキャン順を動的に更新する手法については、図5Bに関して説明した通りである。   For the sake of simplicity, the design related to the 4 × 4 pixel block is illustrated, but the scan order of the 8 × 8 pixel block and the 16 × 16 pixel block can be similarly designed. Further, even if the prediction modes are expanded to 17 types, 33 types, and an arbitrary number, the design can be performed by the same method. The method for dynamically updating the scan order is as described with reference to FIG. 5B.

以下、図1の画像符号化装置が利用するシンタクスについて説明する。
シンタクスは、画像符号化装置が動画像データを符号化する際の符号化データ(例えば、図1の符号化データ130)の構造を示している。この符号化データを復号化する際に、同じシンタクス構造を参照して画像復号化装置がシンタクス解釈を行う。図1の画像符号化装置が利用するシンタクス700を図11に例示する。
Hereinafter, the syntax used by the image encoding device in FIG. 1 will be described.
The syntax indicates the structure of encoded data (for example, encoded data 130 in FIG. 1) when the image encoding apparatus encodes moving image data. When decoding this encoded data, the image decoding apparatus interprets the syntax with reference to the same syntax structure. FIG. 11 illustrates a syntax 700 used by the image coding apparatus in FIG.

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

ハイレベルシンタクス701は、シーケンスパラメータセットシンタクス704及びピクチャパラメータセットシンタクス705などの、シーケンス及びピクチャレベルのシンタクスを含む。スライスレベルシンタクス702は、スライスヘッダーシンタクス706及びスライスデータシンタクス707などを含む。コーディングツリーレベルシンタクス703は、コーディングツリーユニットシンタクス708及びプレディクションユニットシンタクス709などを含む。   High level syntax 701 includes sequence and picture level syntax, such as sequence parameter set syntax 704 and picture parameter set syntax 705. The slice level syntax 702 includes a slice header syntax 706, a slice data syntax 707, and the like. The coding tree level syntax 703 includes a coding tree unit syntax 708, a prediction unit syntax 709, and the like.

コーディングツリーユニットシンタクス708は、四分木構造を持つことができる。具体的には、コーディングツリーユニットシンタクス708のシンタクス要素として、更にコーディングツリーユニットシンタクス708を再帰呼び出しすることができる。即ち、1つのコーディングツリーユニットを四分木で細分化することができる。また、コーディングツリーユニットシンタクス708内にはトランスフォームユニットシンタクス710が含まれている。トランスフォームユニットシンタクス710は、四分木の最末端の各コーディングツリーユニットシンタクス708において呼び出される。トランスフォームユニットシンタクス710は、逆直交変換及び量子化などに関わる情報が記述されている。   The coding tree unit syntax 708 may have a quadtree structure. Specifically, the coding tree unit syntax 708 can be recursively called as a syntax element of the coding tree unit syntax 708. That is, one coding tree unit can be subdivided with a quadtree. The coding tree unit syntax 708 includes a transform unit syntax 710. The transform unit syntax 710 is invoked at each coding tree unit syntax 708 at the extreme end of the quadtree. The transform unit syntax 710 describes information related to inverse orthogonal transformation and quantization.

図12は、本実施形態に係るスライスヘッダーシンタクス706を例示する。図12に示されるslice_directional_unified_transform_flagは、例えば、当該スライスに関して本実施形態に係る直交変換及び逆直交変換の有効/無効を示すシンタクス要素である。   FIG. 12 illustrates a slice header syntax 706 according to this embodiment. The slice_directive_unified_transform_flag shown in FIG. 12 is a syntax element indicating, for example, validity / invalidity of orthogonal transformation and inverse orthogonal transformation according to the present embodiment for the slice.

slice_directional_unified_transform_flagが0である場合、当該スライス内での本実施形態に係る直交変換及び逆直交変換は無効である。故に、直交変換部102及び逆直交変換部105は、DCT及びIDCTなどの固定的な直交変換及び逆直交変換を行う。この固定的な直交変換及び逆直交変換は、1D直交変換部B207、1D直交変換部B209、1D逆直交変換部307及び1D逆直交変換部309によって(即ち、1D変換行列Bによって)行われてもよいし、図示しないDCT部及びIDCT部によって行われてもよい。また、係数順制御部113でも固定的な2D−1D変換(例えば、ジグザグスキャン)が行われる。この固定的な2D−1D変換は、2D−1D変換部(モード2)504によって行われてもよいし、図示しない2D−1D変換部によって行われてもよい。   When slice_directive_unified_transform_flag is 0, the orthogonal transform and inverse orthogonal transform according to the present embodiment in the slice are invalid. Therefore, the orthogonal transform unit 102 and the inverse orthogonal transform unit 105 perform fixed orthogonal transform and inverse orthogonal transform such as DCT and IDCT. This fixed orthogonal transform and inverse orthogonal transform are performed by the 1D orthogonal transform unit B207, the 1D orthogonal transform unit B209, the 1D inverse orthogonal transform unit 307, and the 1D inverse orthogonal transform unit 309 (that is, by the 1D transform matrix B). Alternatively, it may be performed by a DCT unit and an IDCT unit (not shown). The coefficient order control unit 113 also performs fixed 2D-1D conversion (for example, zigzag scanning). This fixed 2D-1D conversion may be performed by the 2D-1D conversion unit (mode 2) 504, or may be performed by a 2D-1D conversion unit (not shown).

一例として、slice_directional_unified_transform_flagが1である場合には、当該スライス内全域で本実施形態に係る直交変換及び逆直交変換が有効となる。即ち、当該スライス内全域で図10A及び図10Bに関して説明した符号化フローチャートに従って符号化処理が行われる。即ち、選択スイッチ201は、1D変換行列セット情報129に基づいて1D直交変換部A206または1D直交変換部B207を選択する。選択スイッチ204は、1D変換行列セット情報129に基づいて1D直交変換部A208または1D直交変換部B209を選択する。また、選択スイッチ301は、1D変換行列セット情報129に基づいて1D逆直交変換部A306または1D逆直交変換部B307を選択する。選択スイッチ304は、1D変換行列セット情報129に基づいて1D逆直交変換部A308または1D逆直交変換部B309を選択する。更に、選択スイッチ501は、予測情報126に含まれる予測モード情報に従って、2D−1D変換部502,・・・,510のいずれかを選択する。   As an example, when slice_directive_unified_transform_flag is 1, the orthogonal transformation and inverse orthogonal transformation according to the present embodiment are effective in the entire area in the slice. That is, the encoding process is performed in the entire area in the slice according to the encoding flowchart described with reference to FIGS. 10A and 10B. That is, the selection switch 201 selects the 1D orthogonal transform unit A206 or the 1D orthogonal transform unit B207 based on the 1D transform matrix set information 129. The selection switch 204 selects the 1D orthogonal transform unit A208 or the 1D orthogonal transform unit B209 based on the 1D transform matrix set information 129. The selection switch 301 selects the 1D inverse orthogonal transform unit A306 or the 1D inverse orthogonal transform unit B307 based on the 1D transform matrix set information 129. The selection switch 304 selects the 1D inverse orthogonal transform unit A308 or the 1D inverse orthogonal transform unit B309 based on the 1D transform matrix set information 129. Further, the selection switch 501 selects one of the 2D-1D conversion units 502,..., 510 according to the prediction mode information included in the prediction information 126.

また、別の例として、slice_directional_unified_transform_flagが1である場合には、より下位のレイヤ(コーディングツリーユニット、トランスフォームユニットなど)のシンタクスにおいて当該スライス内部の局所領域毎に本実施形態に係る直交変換及び逆直交変換の有効/無効が規定されてもよい。   As another example, when slice_directional_unified_transform_flag is 1, the orthogonal transform and inverse according to this embodiment are performed for each local region in the slice in the syntax of a lower layer (coding tree unit, transform unit, etc.). Validity / invalidity of orthogonal transformation may be defined.

図13は、本実施形態に係るコーディングツリーユニットシンタクス708を例示する。図13に示されるctb_directional_unified_transform_flagは、当該コーディングツリーユニットに関して本実施形態に係る直交変換及び逆直交変換の有効/無効を示すシンタクス要素である。また、図13に示されるpred_modeはプレディクションユニットシンタクス709に含まれるシンタクス要素の1つであり、当該コーディングツリーユニットもしくはマクロブロック内の符号化タイプを示している。MODE_INTRAは、符号化タイプがイントラ予測であることを示す。ctb_directional_unified_transform_flagは、前述のslice_directional_unified_transform_flagが1であって、かつ、コーディングツリーユニットの符号化タイプがイントラ予測の時にのみ符号化される。   FIG. 13 illustrates a coding tree unit syntax 708 according to this embodiment. Ctb_directive_unified_transform_flag shown in FIG. 13 is a syntax element indicating validity / invalidity of orthogonal transform and inverse orthogonal transform according to the present embodiment with respect to the coding tree unit. Further, pred_mode shown in FIG. 13 is one of syntax elements included in the prediction unit syntax 709, and indicates the coding type in the coding tree unit or macroblock. MODE_INTRA indicates that the encoding type is intra prediction. ctb_directive_unified_transform_flag is encoded only when the above-mentioned slice_directional_unified_transform_flag is 1 and the coding type of the coding tree unit is intra prediction.

ctb_directional_unified_transform_flagが0である場合、当該コーディングツリーユニット内での本実施形態に係る直交変換及び逆直交変換は無効である。故に、直交変換部102及び逆直交変換部105は、DCT及びIDCTなどの固定的な直交変換及び逆直交変換を行う。この固定的な直交変換及び逆直交変換は、1D直交変換部B207、1D直交変換部B209、1D逆直交変換部307及び1D逆直交変換部309によって(即ち、1D変換行列Bによって)行われてもよいし、図示しないDCT部及びIDCT部によって行われてもよい。また、係数順制御部113でも固定的な2D−1D変換(例えば、ジグザグスキャン)が行われる。この固定的な2D−1D変換は、2D−1D変換部(モード2)504によって行われてもよいし、図示しない2D−1D変換部によって行われてもよい。   When ctb_directive_unified_transform_flag is 0, the orthogonal transform and the inverse orthogonal transform according to the present embodiment in the coding tree unit are invalid. Therefore, the orthogonal transform unit 102 and the inverse orthogonal transform unit 105 perform fixed orthogonal transform and inverse orthogonal transform such as DCT and IDCT. This fixed orthogonal transform and inverse orthogonal transform are performed by the 1D orthogonal transform unit B207, the 1D orthogonal transform unit B209, the 1D inverse orthogonal transform unit 307, and the 1D inverse orthogonal transform unit 309 (that is, by the 1D transform matrix B). Alternatively, it may be performed by a DCT unit and an IDCT unit (not shown). The coefficient order control unit 113 also performs fixed 2D-1D conversion (for example, zigzag scanning). This fixed 2D-1D conversion may be performed by the 2D-1D conversion unit (mode 2) 504, or may be performed by a 2D-1D conversion unit (not shown).

一方、ctb_directional_unified_transform_flagが1である場合、当該コーディングツリーユニット内で本実施形態に係る直交変換及び逆直交変換が有効となり、図10A及び図10Bで説明した符号化フローチャートに従って符号化処理が行われる。即ち、選択スイッチ201は、1D変換行列セット情報129に基づいて1D直交変換部A206または1D直交変換部B207を選択する。選択スイッチ204は、1D変換行列セット情報129に基づいて1D直交変換部A208または1D直交変換部B209を選択する。また、選択スイッチ301は、1D変換行列セット情報129に基づいて1D逆直交変換部A306または1D逆直交変換部B307を選択する。選択スイッチ304は、1D変換行列セット情報129に基づいて1D逆直交変換部A308または1D逆直交変換部B309を選択する。更に、選択スイッチ501は、予測情報126に含まれる予測モード情報に従って、2D−1D変換部502,・・・,510のいずれかを選択する。   On the other hand, when ctb_directive_unified_transform_flag is 1, the orthogonal transform and the inverse orthogonal transform according to the present embodiment are valid in the coding tree unit, and the encoding process is performed according to the encoding flowchart described in FIGS. 10A and 10B. That is, the selection switch 201 selects the 1D orthogonal transform unit A206 or the 1D orthogonal transform unit B207 based on the 1D transform matrix set information 129. The selection switch 204 selects the 1D orthogonal transform unit A208 or the 1D orthogonal transform unit B209 based on the 1D transform matrix set information 129. The selection switch 301 selects the 1D inverse orthogonal transform unit A306 or the 1D inverse orthogonal transform unit B307 based on the 1D transform matrix set information 129. The selection switch 304 selects the 1D inverse orthogonal transform unit A308 or the 1D inverse orthogonal transform unit B309 based on the 1D transform matrix set information 129. Further, the selection switch 501 selects one of the 2D-1D conversion units 502,..., 510 according to the prediction mode information included in the prediction information 126.

図13の例のように、コーディングツリーユニットシンタクス708において、本実施形態に係る直交変換及び逆直交変換の有効/無効を規定するフラグを符号化すると、このフラグを符号化しない場合に比べて情報量(符号量)は増大する。しかしながら、このフラグを符号化することにより、局所領域(即ち、コーディングツリーユニット)毎に最適な直交変換を行うことが可能となる。   In the coding tree unit syntax 708, as shown in the example of FIG. 13, when a flag specifying validity / invalidity of orthogonal transformation and inverse orthogonal transformation according to the present embodiment is encoded, information is encoded compared to a case where this flag is not encoded. The amount (code amount) increases. However, by encoding this flag, it is possible to perform optimal orthogonal transform for each local region (ie, coding tree unit).

図14は、本実施形態に係るトランスフォームユニットシンタクス710を例示する。図14に示されるtu_directional_unified_transform_flagは、当該トランスフォームユニットに関して本実施形態に係る直交変換及び逆直交変換の有効/無効を示すシンタクス要素である。また、図14に示されるpred_modeはプレディクションユニットシンタクス709に含まれるシンタクス要素の1つであり、当該コーディングツリーユニットもしくはマクロブロック内の符号化タイプを示している。MODE_INTRAは、符号化タイプがイントラ予測であることを示す。tu_directional_unified_transform_flagはslice_directional_unified_transform_flagが1であって、かつ、コーディングツリーユニットの符号化タイプがイントラ予測の時にのみ符号化される。   FIG. 14 illustrates a transform unit syntax 710 according to this embodiment. A tu_directive_unified_transform_flag shown in FIG. 14 is a syntax element indicating validity / invalidity of the orthogonal transform and the inverse orthogonal transform according to the present embodiment with respect to the transform unit. Further, pred_mode shown in FIG. 14 is one of syntax elements included in the prediction unit syntax 709, and indicates the coding type in the coding tree unit or macroblock. MODE_INTRA indicates that the encoding type is intra prediction. Tu_directive_unified_transform_flag is encoded only when slice_directive_unified_transform_flag is 1 and the coding type of the coding tree unit is intra prediction.

tu_directional_unified_transform_flagが0である場合、当該トランスフォームユニット内での本実施形態に係る直交変換及び逆直交変換は無効である。故に、直交変換部102及び逆直交変換部105は、DCT及びIDCTなどの固定的な直交変換及び逆直交変換を行う。この固定的な直交変換及び逆直交変換は、1D直交変換部B207、1D直交変換部B209、1D逆直交変換部307及び1D逆直交変換部309によって(即ち、1D変換行列Bによって)行われてもよいし、図示しないDCT部及びIDCT部によって行われてもよい。また、係数順制御部113でも固定的な2D−1D変換(例えば、ジグザグスキャン)が行われる。この固定的な2D−1D変換は、2D−1D変換部(モード2)504によって行われてもよいし、図示しない2D−1D変換部によって行われてもよい。   When tu_directive_unified_transform_flag is 0, the orthogonal transform and inverse orthogonal transform according to the present embodiment in the transform unit are invalid. Therefore, the orthogonal transform unit 102 and the inverse orthogonal transform unit 105 perform fixed orthogonal transform and inverse orthogonal transform such as DCT and IDCT. This fixed orthogonal transform and inverse orthogonal transform are performed by the 1D orthogonal transform unit B207, the 1D orthogonal transform unit B209, the 1D inverse orthogonal transform unit 307, and the 1D inverse orthogonal transform unit 309 (that is, by the 1D transform matrix B). Alternatively, it may be performed by a DCT unit and an IDCT unit (not shown). The coefficient order control unit 113 also performs fixed 2D-1D conversion (for example, zigzag scanning). This fixed 2D-1D conversion may be performed by the 2D-1D conversion unit (mode 2) 504, or may be performed by a 2D-1D conversion unit (not shown).

一方、tu_directional_unified_transform_flagが1である場合、当該トランスフォームユニット内での本実施形態に係る直交変換及び逆直交変換が有効となり、図10A及び図10Bで説明した符号化フローチャートに従って符号化処理が行われる。即ち、選択スイッチ201は、1D変換行列セット情報129に基づいて1D直交変換部A206または1D直交変換部B207を選択する。選択スイッチ204は、1D変換行列セット情報129に基づいて1D直交変換部A208または1D直交変換部B209を選択する。また、選択スイッチ301は、1D変換行列セット情報129に基づいて1D逆直交変換部A306または1D逆直交変換部B307を選択する。選択スイッチ304は、1D変換行列セット情報129に基づいて1D逆直交変換部A308または1D逆直交変換部B309を選択する。更に、選択スイッチ501は、予測情報126に含まれる予測モード情報に従って、2D−1D変換部502,・・・,510のいずれかを選択する。   On the other hand, when tu_directional_unified_transform_flag is 1, the orthogonal transform and inverse orthogonal transform according to the present embodiment in the transform unit are valid, and the encoding process is performed according to the encoding flowchart described in FIGS. 10A and 10B. That is, the selection switch 201 selects the 1D orthogonal transform unit A206 or the 1D orthogonal transform unit B207 based on the 1D transform matrix set information 129. The selection switch 204 selects the 1D orthogonal transform unit A208 or the 1D orthogonal transform unit B209 based on the 1D transform matrix set information 129. The selection switch 301 selects the 1D inverse orthogonal transform unit A306 or the 1D inverse orthogonal transform unit B307 based on the 1D transform matrix set information 129. The selection switch 304 selects the 1D inverse orthogonal transform unit A308 or the 1D inverse orthogonal transform unit B309 based on the 1D transform matrix set information 129. Further, the selection switch 501 selects one of the 2D-1D conversion units 502,..., 510 according to the prediction mode information included in the prediction information 126.

図14の例のように、トランスフォームユニットシンタクス710において、本実施形態に係る直交変換及び逆直交変換の有効/無効を規定するフラグを符号化すると、このフラグを符号化しない場合に比べて情報量(符号量)は増大する。しかしながら、このフラグを符号化することにより、局所領域(即ち、トランスフォームユニット)毎に最適な直交変換を行うことが可能となる。   As in the example of FIG. 14, in the transform unit syntax 710, when the flag that defines the validity / invalidity of the orthogonal transform and the inverse orthogonal transform according to the present embodiment is encoded, the information is compared with the case where the flag is not encoded. The amount (code amount) increases. However, by encoding this flag, it is possible to perform optimal orthogonal transform for each local region (that is, transform unit).

尚、図12、図13及び図14に例示するシンタクステーブルの行間には、本実施形態において規定していないシンタクス要素が挿入されてもよいし、その他の条件分岐に関する記述が含まれていてもよい。また、シンタクステーブルを複数のテーブルに分割したり、複数のシンタクステーブルを統合したりしてもよい。また、例示した各シンタクス要素の用語は、任意に変更可能である。   It should be noted that syntax elements not defined in this embodiment may be inserted between the rows of the syntax tables illustrated in FIGS. 12, 13, and 14, or other conditional branch descriptions may be included. Good. Further, the syntax table may be divided into a plurality of tables, or a plurality of syntax tables may be integrated. Moreover, the term of each illustrated syntax element can be changed arbitrarily.

以上説明したように、本実施形態に係る画像符号化装置は、参照画素からの距離が大きくなるにつれて予測精度が低下するというイントラ予測の傾向を利用する。この画像符号化装置は、各予測モードの垂直方向及び水平方向を上記傾向の有無に従って2つのクラスに分類し、垂直方向及び水平方向の夫々について適応的に1D変換行列Aまたは1D変換行列Bを適用する。1D変換行列Aは、参照画素群のラインに直交する方向(垂直方向または水平方向)について1D直交変換を行う際の係数集密度が高くなる(即ち、量子化変換係数121における非零係数の割合が小さくなる)ように共通の変換基底を予め設計することによって生成される。一方、1D変換行列Bは、このような性質を持たない汎用的な変換行列を設計することによって生成される。例えば、汎用的な変換はDCTである。故に、本実施形態に係る画像符号化装置によれば、各予測モードに一律にDCTなどの固定的な直交変換を施す場合に比べて、高い変換効率が達成される。   As described above, the image encoding apparatus according to the present embodiment uses the tendency of intra prediction that the prediction accuracy decreases as the distance from the reference pixel increases. This image encoding apparatus classifies the vertical direction and horizontal direction of each prediction mode into two classes according to the presence or absence of the above-described tendency, and adaptively assigns the 1D conversion matrix A or 1D conversion matrix B to each of the vertical direction and horizontal direction. Apply. The 1D transform matrix A has high coefficient density when performing 1D orthogonal transform in the direction (vertical direction or horizontal direction) orthogonal to the line of the reference pixel group (that is, the ratio of non-zero coefficients in the quantized transform coefficient 121) Is generated in advance by designing a common transformation base so that On the other hand, the 1D transformation matrix B is generated by designing a general-purpose transformation matrix having no such property. For example, a generic conversion is DCT. Therefore, according to the image coding apparatus according to the present embodiment, high conversion efficiency is achieved as compared with a case where fixed orthogonal transform such as DCT is uniformly applied to each prediction mode.

また、本実施形態に係る直交変換部102及び逆直交変換部105は、ハードウェア実装及びソフトウェア実装のいずれにも好適である。
数式(3)乃至数式(6)は固定行列の乗算を表しているので、直交変換部及び逆直交変換部をハードウェア実装する場合には、乗算器よりもむしろハードワイヤードロジックによって構成されることが想定される。
Further, the orthogonal transform unit 102 and the inverse orthogonal transform unit 105 according to the present embodiment are suitable for both hardware implementation and software implementation.
Since Equations (3) to (6) represent multiplication of a fixed matrix, when the orthogonal transform unit and the inverse orthogonal transform unit are implemented by hardware, they are configured by hard-wired logic rather than a multiplier. Is assumed.

仮に、9種類のイントラ予測モードの夫々について専用の変換基底を用いて直交変換及び逆直交変換を行うとすれば、9個の2D直交変換部または図15に示すように18(=9×2)個の1D直交変換部を用意する必要がある。これら9個の2D直交変換部または18個の1D直交変換部は、夫々異なる変換行列を乗算するので、結果的に、H.264で必要なDCTのための専用ハードウェアに加えて、追加で9個の2D直交変換部または18個の1D直交変換部のための専用ハードウェアを設けることとなり、回路規模が増大する。   If orthogonal transform and inverse orthogonal transform are performed using a dedicated transform basis for each of the nine types of intra prediction modes, nine 2D orthogonal transform units or 18 (= 9 × 2) as shown in FIG. ) 1D orthogonal transform units must be prepared. These 9 2D orthogonal transform units or 18 1D orthogonal transform units multiply each by a different transform matrix. In addition to dedicated hardware for DCT required by H.264, additional dedicated hardware for nine 2D orthogonal transform units or 18 1D orthogonal transform units is provided, which increases the circuit scale.

一方、本実施形態に係る直交変換部及び逆直交変換部は、図2及び図3に示す通り、2個(垂直(逆)変換部及び水平(逆)変換部を時分割で共有する場合)の1D直交変換部と、行列の転置を行う回路との組み合わせによって4種類の2次元の直交変換を実行する。故に、本実施形態に係る直交変換部及び逆直交変換部によれば、ハードウェア実装における回路規模の増加を大幅に抑制できる。   On the other hand, as shown in FIGS. 2 and 3, two orthogonal transform units and inverse orthogonal transform units according to the present embodiment are used (when the vertical (inverse) transform unit and the horizontal (inverse) transform unit are shared in a time division manner). The four types of two-dimensional orthogonal transforms are executed by a combination of the 1D orthogonal transform unit and a circuit for transposing the matrix. Therefore, according to the orthogonal transformation part and the inverse orthogonal transformation part which concern on this embodiment, the increase in the circuit scale in hardware mounting can be suppressed significantly.

また、ソフトウェア実装に関して、仮に9種類のイントラ予測モードの夫々について専用の変換基底を用いて直交変換及び逆直交変換を行うとすれば、9個の2D直交変換行列または18(=9×2)個の1D直交変換行列をメモリに保持しておき、これら変換行列を予測モード毎に呼び出して汎用乗算機を用いて直交変換を実現することが想定される。故に、変換行列を保存するためのメモリサイズの増加によるコスト増を招いたり、変換の度に変換行列をメモリにロードすることによるメモリバンド幅の増加に繋がったりするおそれがある。   Further, regarding software implementation, if orthogonal transform and inverse orthogonal transform are performed using dedicated transform bases for each of the nine types of intra prediction modes, nine 2D orthogonal transform matrices or 18 (= 9 × 2) It is assumed that 1D orthogonal transformation matrices are stored in a memory, and these transformation matrices are called for each prediction mode to implement orthogonal transformation using a general-purpose multiplier. Therefore, there is a possibility that the cost increases due to an increase in the memory size for storing the transformation matrix, or that the memory bandwidth is increased by loading the transformation matrix into the memory for each transformation.

一方、本実施形態に係る直交変換部及び逆直交変換部は、図2及び図3に示す通り、2個の1D直交変換行列を利用した垂直変換及び水平変換を組み合わせることにより4種類の2次元の直交変換を実行する。故に、本実施形態に係る直交変換部及び逆直交変換部によれば、ソフトウェア実装におけるメモリサイズの増加を大幅に抑制できる。   On the other hand, the orthogonal transform unit and the inverse orthogonal transform unit according to the present embodiment combine four types of two-dimensional by combining vertical transform and horizontal transform using two 1D orthogonal transform matrices as shown in FIGS. The orthogonal transformation of is performed. Therefore, according to the orthogonal transformation part and the inverse orthogonal transformation part which concern on this embodiment, the increase in the memory size in software mounting can be suppressed significantly.

また、本実施形態において説明したように予測モード毎に個別のスキャン順を用意することは、符号化効率の向上に寄与する。量子化変換係数121は要素毎に非零係数の発生傾向が偏る性質を持つ。係る非零係数の発生傾向は、イントラ予測の予測方向毎に異なる。更に、予測方向が同一であれば、異なる入力画像118の画素ブロックを符号化した場合にも、非零係数の発生傾向は類似する。故に、係数順制御部113は、量子化係数121のうち非零係数の発生確率が高い要素から順に1次元の量子化変換係数列122に変換することによって、量子化変換係数列122において零係数が高確率で密集する。即ち、エントロピー符号化部114におけるランレングス符号化による発生符号量を削減できる。係数順制御部113は、図5A及び図5Bに関して説明した通り、予測モード毎に予め学習されたスキャン順を固定的に利用してもよいし、符号化処理中に動的にスキャン順を更新して利用してもよい。予測モード毎に最適化されたスキャン順を利用すれば、例えばH.264と比較して演算量の大幅な増加を引き起こすことなく、量子化変換係数列122に基づく発生符号量を削減できる。   Also, as described in the present embodiment, preparing an individual scan order for each prediction mode contributes to an improvement in coding efficiency. The quantized transform coefficient 121 has a property that the generation tendency of non-zero coefficients is biased for each element. The occurrence tendency of such non-zero coefficients differs for each prediction direction of intra prediction. Furthermore, if the prediction directions are the same, the non-zero coefficient generation tendency is similar even when pixel blocks of different input images 118 are encoded. Therefore, the coefficient order control unit 113 converts the zero coefficient in the quantized transform coefficient sequence 122 by transforming the quantized transform coefficient sequence 122 into the one-dimensional quantized transform coefficient sequence 122 in order from the element having the highest non-zero coefficient occurrence probability. Are dense with high probability. That is, it is possible to reduce the amount of generated code by run length encoding in the entropy encoding unit 114. As described with reference to FIGS. 5A and 5B, the coefficient order control unit 113 may use the scan order learned in advance for each prediction mode, or dynamically update the scan order during the encoding process. You may use it. If the scan order optimized for each prediction mode is used, for example, H.264 is used. Compared with H.264, the amount of generated code based on the quantized transform coefficient sequence 122 can be reduced without causing a significant increase in the amount of computation.

(第2の実施形態)
第2の実施形態に係る画像符号化装置は、前述の第1の実施形態に係る画像符号化装置と直交変換及び逆直交変換の詳細において異なる。以降の説明では、本実施形態において第1の実施形態と同一部分には同一符号を付して示し、異なる部分を中心に説明する。本実施形態に係る画像符号化装置に対応する画像復号化装置は、第5の実施形態において説明する。
(Second Embodiment)
The image encoding device according to the second embodiment differs from the image encoding device according to the first embodiment described above in the details of orthogonal transform and inverse orthogonal transform. In the following description, the same parts as those in the first embodiment are denoted by the same reference numerals in the present embodiment, and different parts will be mainly described. An image decoding apparatus corresponding to the image encoding apparatus according to the present embodiment will be described in a fifth embodiment.

本実施形態に係る画像符号化装置は、図2に例示した直交変換部102の代わりに、図16に例示する直交変換部102を含む。図16の直交変換部102は、選択スイッチ801、垂直変換部802、転置部203、選択スイッチ804及び水平変換部805を有する。垂直変換部802は、1D直交変換部C806、1D直交変換部D807及び1D直交変換部E808を含む。水平変換部805は、1D直交変換部C809、1D直交変換部D810及び1D直交変換部E811を含む。尚、垂直変換部802及び水平変換部805の順序は、一例であり、これらは逆順であっても構わない。   The image encoding apparatus according to the present embodiment includes an orthogonal transform unit 102 illustrated in FIG. 16 instead of the orthogonal transform unit 102 illustrated in FIG. 16 includes a selection switch 801, a vertical conversion unit 802, a transposition unit 203, a selection switch 804, and a horizontal conversion unit 805. The vertical transform unit 802 includes a 1D orthogonal transform unit C806, a 1D orthogonal transform unit D807, and a 1D orthogonal transform unit E808. The horizontal transform unit 805 includes a 1D orthogonal transform unit C809, a 1D orthogonal transform unit D810, and a 1D orthogonal transform unit E811. Note that the order of the vertical conversion unit 802 and the horizontal conversion unit 805 is an example, and these may be reversed.

1D直交変換部C806及び1D直交変換部C809は、入力される行列に対して1D変換行列Cを乗算する点で共通の機能を持つ。1D直交変換部D807及び1D直交変換部D810は、入力される行列に対して1D変換行列Dを乗算する点で共通の機能を持つ。1D直交変換部E808及び1D直交変換部E811は、入力される行列に対して1D変換行列Eを乗算する点で共通の機能を持つ。   The 1D orthogonal transform unit C806 and the 1D orthogonal transform unit C809 have a common function in that the input matrix is multiplied by the 1D transform matrix C. The 1D orthogonal transform unit D807 and the 1D orthogonal transform unit D810 have a common function in that the input matrix is multiplied by the 1D transform matrix D. The 1D orthogonal transform unit E808 and the 1D orthogonal transform unit E811 have a common function in that the input matrix is multiplied by the 1D transform matrix E.

以下、本実施形態に係る1D変換行列C、1D変換行列D及び1D変換行列Eについて説明する。
前述のように、予測誤差119は参照画素からの距離が大きくなるにつれて絶対値が大きくなる傾向を持つ。係る傾向は予測方向に関わらず同様であるが、DC予測モードの予測画素119は垂直方向及び水平方向のいずれにも係る傾向を示すとはいえない。本実施形態では、DC予測モードに関して後述する1D変換行列Eを利用する。一方、DC予測モード以外の予測モードについては、前述の第1の実施形態と同様に上記傾向の有無に応じて夫々1D変換行列C及び1D変換行列Dを適応的に利用する。
Hereinafter, the 1D conversion matrix C, the 1D conversion matrix D, and the 1D conversion matrix E according to the present embodiment will be described.
As described above, the prediction error 119 tends to increase in absolute value as the distance from the reference pixel increases. Although the tendency is the same regardless of the prediction direction, it cannot be said that the prediction pixel 119 in the DC prediction mode shows a tendency related to either the vertical direction or the horizontal direction. In the present embodiment, a 1D conversion matrix E described later with respect to the DC prediction mode is used. On the other hand, for prediction modes other than the DC prediction mode, the 1D conversion matrix C and the 1D conversion matrix D are adaptively used according to the presence or absence of the above-described tendency, as in the first embodiment.

具体的には、1D変換行列Cは、前述の1D変換行列Aと同じ設計手法によって生成することができる。また、1D変換行列Dは、前述の1D変換行列Bと類似の設計手法によって生成することができる。即ち、1D変換行列Dは、DC予測モードを除外したうえで、前述の1D変換行列Bの設計手法を実施すれば生成できる。   Specifically, the 1D conversion matrix C can be generated by the same design method as the 1D conversion matrix A described above. The 1D conversion matrix D can be generated by a design method similar to the 1D conversion matrix B described above. That is, the 1D transformation matrix D can be generated by performing the above-described design method for the 1D transformation matrix B after excluding the DC prediction mode.

1D変換行列Eは、DCTのための行列であってもよい。或いは、1D変換行列Eは、1D変換行列Dに比べて、DC予測モードの予測誤差119に対して垂直方向及び水平方向で1D直交変換を行う際の係数集密度が高くなる(即ち、量子化変換係数121における非零係数の割合が小さくなる)ように共通の変換基底を予め設計することによって生成されてもよい。   The 1D transformation matrix E may be a matrix for DCT. Alternatively, the 1D transform matrix E has higher coefficient density when performing 1D orthogonal transform in the vertical and horizontal directions with respect to the prediction error 119 in the DC prediction mode, compared to the 1D transform matrix D (ie, quantization). It may be generated by designing a common transformation base in advance so that the ratio of non-zero coefficients in the transformation coefficient 121 becomes smaller.

本実施形態に係る画像符号化装置は、図3に例示した逆直交変換部105の代わりに、図17に例示する逆直交変換部105を含む。図17の逆直交変換部105は、選択スイッチ901、垂直逆変換部902、転置部303、選択スイッチ904及び水平逆変換部905を有する。垂直逆変換部902は、1D逆直交変換部C906、1D逆直交変換部D907及び1D逆直交変換部E908を含む。水平逆変換部905は、1D逆直交変換部C909、1D逆直交変換部D910及び1D逆直交変換部E911を含む。尚、垂直逆変換部902及び水平逆変換部905の順序は、一例であり、これらは逆順であっても構わない。   The image encoding apparatus according to the present embodiment includes an inverse orthogonal transform unit 105 illustrated in FIG. 17 instead of the inverse orthogonal transform unit 105 illustrated in FIG. The inverse orthogonal transform unit 105 in FIG. 17 includes a selection switch 901, a vertical inverse transform unit 902, a transposition unit 303, a selection switch 904, and a horizontal inverse transform unit 905. The vertical inverse transform unit 902 includes a 1D inverse orthogonal transform unit C906, a 1D inverse orthogonal transform unit D907, and a 1D inverse orthogonal transform unit E908. The horizontal inverse transform unit 905 includes a 1D inverse orthogonal transform unit C909, a 1D inverse orthogonal transform unit D910, and a 1D inverse orthogonal transform unit E911. Note that the order of the vertical inverse transform unit 902 and the horizontal inverse transform unit 905 is an example, and these may be reversed.

1D逆直交変換部C906及び1D逆直交変換部C909は、入力される行列に対して1D変換行列Cの転置行列を乗算する点で共通の機能を持つ。1D逆直交変換部D907及び1D逆直交変換部D910は、入力される行列に対して1D変換行列Dの転置行列を乗算する点で共通の機能を持つ。1D逆直交変換部E908及び1D逆直交変換部E911は、入力される行列に対して1D変換行列Eの転置行列を乗算する点で共通の機能を持つ。   The 1D inverse orthogonal transform unit C906 and the 1D inverse orthogonal transform unit C909 have a common function in that an input matrix is multiplied by a transposed matrix of the 1D transform matrix C. The 1D inverse orthogonal transform unit D907 and the 1D inverse orthogonal transform unit D910 have a common function in that the input matrix is multiplied by the transposed matrix of the 1D transform matrix D. The 1D inverse orthogonal transform unit E908 and the 1D inverse orthogonal transform unit E911 have a common function in that the input matrix is multiplied by the transposed matrix of the 1D transform matrix E.

以下、1D変換行列セット部112が生成する、本実施形態に係る1D変換行列セット情報129の詳細を説明する。
1D変換行列セット情報129は、垂直直交変換及び垂直逆直交変換のために使用される変換行列を選択するための垂直変換インデックスと、水平直交変換及び水平逆直交変換のために使用される変換行列を選択するための水平変換インデックスとを直接的または間接的に示す。例えば、1D変換行列セット情報129は、図18Dに示す変換インデックス(TransformIdx)で表現することができる。図18Dのテーブルを参照すれば、変換インデックスから垂直変換インデックス(Vertical Transform Idx)及び水平変換インデックス(Horizontal Transform Idx)を導出できる。
Hereinafter, details of the 1D conversion matrix set information 129 according to the present embodiment generated by the 1D conversion matrix set unit 112 will be described.
The 1D transformation matrix set information 129 includes a vertical transformation index for selecting a transformation matrix used for vertical orthogonal transformation and vertical inverse orthogonal transformation, and a transformation matrix used for horizontal orthogonal transformation and horizontal inverse orthogonal transformation. The horizontal transformation index for selecting is directly or indirectly indicated. For example, the 1D transformation matrix set information 129 can be expressed by a transformation index (TransformIdx) illustrated in FIG. 18D. With reference to the table in FIG. 18D, a vertical transformation index (Vertical Transform Idx) and a horizontal transformation index (Horizontal Transform Idx) can be derived from the transformation index.

図18Bに示すように、垂直変換インデックスが「0」であれば、垂直直交変換または垂直逆直交変換のために前述の1D変換行列C(1D_Transform_Matrix_C)またはその転置行列が選択される。一方、垂直変換インデックスが「1」であれば、垂直直交変換または垂直逆直交変換のために前述の1D変換行列D(1D_Transform_Matrix_D)またはその転置行列が選択される。更に、垂直変換インデックスが「2」であれば、垂直直交変換または垂直逆直交変換のために前述の1D変換行列E(1D_transform_Matrix_E)またはその転置行列が選択される。   As shown in FIG. 18B, if the vertical transformation index is “0”, the 1D transformation matrix C (1D_Transform_Matrix_C) or its transposed matrix is selected for vertical orthogonal transformation or vertical inverse orthogonal transformation. On the other hand, if the vertical transformation index is “1”, the aforementioned 1D transformation matrix D (1D_Transform_Matrix_D) or its transposed matrix is selected for vertical orthogonal transformation or vertical inverse orthogonal transformation. Further, if the vertical transformation index is “2”, the 1D transformation matrix E (1D_transform_Matrix_E) or its transposed matrix is selected for vertical orthogonal transformation or vertical inverse orthogonal transformation.

図18Cに示すように、水平変換インデックスが「0」であれば、水平直交変換または水平逆直交変換のために前述の1D変換行列C(1D_Transform_Matrix_C)またはその転置行列が選択される。一方、水平変換インデックスが「1」であれば、水平直交変換または水平逆直交変換のために前述の1D変換行列D(1D_Transform_Matrix_D)またはその転置行列が選択される。更に、水平変換インデックスが「2」であれば、水平直交変換または水平逆直交変換のために前述の1D変換行列E(1D_Transform_Matrix_E)またはその転置行列が選択される。   As shown in FIG. 18C, if the horizontal transformation index is “0”, the 1D transformation matrix C (1D_Transform_Matrix_C) or its transposed matrix is selected for horizontal orthogonal transformation or horizontal inverse orthogonal transformation. On the other hand, if the horizontal transformation index is “1”, the aforementioned 1D transformation matrix D (1D_Transform_Matrix_D) or its transposed matrix is selected for horizontal orthogonal transformation or horizontal inverse orthogonal transformation. Furthermore, if the horizontal transformation index is “2”, the 1D transformation matrix E (1D_Transform_Matrix_E) or its transposed matrix is selected for horizontal orthogonal transformation or horizontal inverse orthogonal transformation.

また、各(イントラ)予測モードのインデックス(IntraNxNPredModeIndex)と、その名称(Name of IntraNxNPredMode)と、対応する垂直変換インデックス及び水平変換インデックスを図18Aに例示する。尚、図18Aにおいて、「NxN」は予測対象ブロックのサイズを表している(N=4,8,16など)。予測対象ブロックのサイズは、「MxN」(即ち、正方形以外の矩形)に拡張することもできる。
ここで、図18Aと図18Dを統合した、各予測モードのインデックスとその名称と、対応する変換インデックスを図18Eに例示する。
Further, FIG. 18A illustrates an index (IntraNxNPredModeIndex) of each (intra) prediction mode, its name (Name of IntraNxNPredMode), and a corresponding vertical conversion index and horizontal conversion index. In FIG. 18A, “NxN” represents the size of the prediction target block (N = 4, 8, 16, etc.). The size of the prediction target block can be expanded to “MxN” (that is, a rectangle other than a square).
Here, FIG. 18E illustrates an index of each prediction mode, its name, and a corresponding conversion index obtained by integrating FIGS. 18A and 18D.

1D変換行列セット部112は、予測情報126に含まれる予測モード情報から予測モードのインデックスを検出し、対応する1D変換行列セット情報129を生成する。尚、図18A、図18B、図18C、図18D及び図18Eに示す各種テーブルは一例であり、1D変換行列セット部112はこれらのテーブルの一部または全部を使用することなく1D変換行列セット情報129を生成してよい。   The 1D transformation matrix set unit 112 detects a prediction mode index from the prediction mode information included in the prediction information 126, and generates corresponding 1D transformation matrix set information 129. Note that the various tables shown in FIGS. 18A, 18B, 18C, 18D, and 18E are examples, and the 1D conversion matrix set unit 112 uses the 1D conversion matrix set information without using some or all of these tables. 129 may be generated.

例えば、TrasnformIdxが0を示す場合、Vertical Transform indexが0を、Horizontal Transform indexが0を示すことを意味する。つまり、垂直直交変換には1D変換行列Cを、水平直交変換には1D変換行列Cを使用することを意味する。また、垂直逆直交変換には1D変換行列Cの転置行列を、水平逆直交変換には1D変換行列Cの転置行列を使用することを意味する。   For example, when the TransformIdx indicates 0, it means that the Vertical Transform index indicates 0 and the Horizontal Transform index indicates 0. That is, it means that the 1D transformation matrix C is used for the vertical orthogonal transformation and the 1D transformation matrix C is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of 1D transformation matrix C is used for vertical inverse orthogonal transformation, and a transposed matrix of 1D transformation matrix C is used for horizontal inverse orthogonal transformation.

TrasnformIdxが1を示す場合、Vertical Transform indexが0を、Horizontal Transform indexが1を示すことを意味する。つまり、垂直直交変換には1D変換行列Cを、水平直交変換には1D変換行列Dを使用することを意味する。また、垂直逆直交変換には1D変換行列Cの転置行列を、水平逆直交変換には1D変換行列Dの転置行列を使用することを意味する。   When the TransformIdx indicates 1, it means that the Vertical Transform index indicates 0 and the Horizontal Transform index indicates 1. That is, it means that the 1D transformation matrix C is used for the vertical orthogonal transformation, and the 1D transformation matrix D is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of 1D transformation matrix C is used for vertical inverse orthogonal transformation, and a transposed matrix of 1D transformation matrix D is used for horizontal inverse orthogonal transformation.

TrasnformIdxが2を示す場合、Vertical Transform indexが1を、Horizontal Transform indexが0を示すことを意味する。つまり、垂直直交変換には1D変換行列Dを、水平直交変換には1D変換行列Cを使用することを意味する。また、垂直逆直交変換には1D変換行列Dの転置行列を、水平逆直交変換には1D変換行列Cを使用することを意味する。   When the TransformIdx indicates 2, it means that the Vertical Transform index indicates 1, and the Horizontal Transform index indicates 0. That is, it means that the 1D transformation matrix D is used for the vertical orthogonal transformation, and the 1D transformation matrix C is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of the 1D transformation matrix D is used for the vertical inverse orthogonal transformation, and a 1D transformation matrix C is used for the horizontal inverse orthogonal transformation.

TrasnformIdxが3を示す場合、Vertical Transform indexが2をHorizontal Transform indexが2を示すことを意味する。つまり、垂直直交変換には1D変換行列Eを、水平直交変換には1D変換行列Eを使用することを意味する。また、垂直逆直交変換には1D変換行列Eの転置行列を、水平逆直交変換には1D変換行列Eの転置行列を使用することを意味する。   When TransformIdx indicates 3, it means that Vertical Transform index indicates 2 and Horizontal Transform index indicates 2. That is, it means that the 1D transformation matrix E is used for the vertical orthogonal transformation and the 1D transformation matrix E is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of 1D transformation matrix E is used for vertical inverse orthogonal transformation, and a transposed matrix of 1D transformation matrix E is used for horizontal inverse orthogonal transformation.

ここで、予測対象ブロックがM×Nで表現される矩形ブロックである場合、直交変換を行うブロックサイズもまたM×Nであってもよい。   Here, when the prediction target block is a rectangular block represented by M × N, the block size for performing orthogonal transform may also be M × N.

図18Aに示すテーブルは、前述の各イントラ予測モードの傾向を考慮して1D変換行列セット情報129を割り当てている。即ち、DC予測モードには、Vertical Transform index及びHorizontal Transofrm indexに共に2を割り当てている。故に、DC予測モードについて前述の1D変換行列Eまたはその転置行列を用いて垂直方向及び水平方向の直交変換または逆直交変換が行われ、高い変換効率が達成される。   In the table shown in FIG. 18A, 1D transformation matrix set information 129 is assigned in consideration of the tendency of each intra prediction mode described above. That is, in the DC prediction mode, 2 is assigned to both the Vertical Transform index and the Horizontal Transform index. Therefore, in the DC prediction mode, orthogonal transformation or inverse orthogonal transformation in the vertical direction and the horizontal direction is performed using the above-described 1D transformation matrix E or its transposed matrix, and high transformation efficiency is achieved.

DC予測モードを除く予測モードに関して、予測誤差の垂直方向に上記傾向を示すならばVertical Transform indexに0が、水平方向に上記傾向を示すならばHorizontal Transform indexに0が割り当られている。一方、上記傾向を示さない方向には、夫々1が割り当られている。DC予測モードを除く予測モードに関して、各予測モードの垂直方向及び水平方向を上記傾向の有無に従って2つのクラスに分類し、垂直方向及び水平方向の夫々について適応的に1D変換行列Cまたは1D変換行列Dを適用することにより、高い変換効率が達成される。   Regarding prediction modes other than the DC prediction mode, 0 is assigned to the Vertical Transform index if the tendency is shown in the vertical direction of the prediction error, and 0 is assigned to the Horizontal Transform index if the tendency is shown in the horizontal direction. On the other hand, 1 is assigned to each direction in which the above tendency is not exhibited. Regarding prediction modes other than the DC prediction mode, the vertical direction and the horizontal direction of each prediction mode are classified into two classes according to the presence or absence of the above-described tendency, and the 1D conversion matrix C or 1D conversion matrix is adaptively applied to each of the vertical direction and the horizontal direction. By applying D, high conversion efficiency is achieved.

以上説明したように、本実施形態に係る画像符号化装置は、第1の実施形態と同様に参照画素からの距離が大きくなるにつれて予測精度が低下するというイントラ予測の傾向を利用しつつ、DC予測を区別して直交変換及び逆直交変換を適用する。この画像符号化装置は、各予測モードの垂直方向及び水平方向を上記傾向の有無に従って2つのクラスに分類し、垂直方向及び水平方向の夫々について適応的に1D変換行列Cまたは1D変換行列Dを適用する。この画像符号化装置は、DC予測モードには1D変換行列Eを適用する。1D変換行列Cは、参照画素群のラインに直交する方向(垂直方向または水平方向)について1D直交変換を行う際の係数集密度が高くなる(即ち、量子化変換係数121における非零係数の割合が小さくなる)ように共通の変換基底を予め設計することによって生成される。1D変換行列Dは、DC予測モードを除外したうえで、このような性質を持たない汎用的な変換行列を設計することによって生成される。1D変換行列Eは、DCTのための行列であってもよい。或いは、1D変換行列Eは、DC予測モードの予測誤差119に対して垂直方向及び水平方向で1D直交変換を行う際の係数集密度が高くなる(即ち、量子化変換係数121における非零係数の割合が小さくなる)ように共通の変換基底を予め設計することによって生成される。故に、本実施形態に係る画像符号化装置によれば、各予測モードに一律にDCTなどの固定的な直交変換を施す場合に比べて、高い変換効率が達成される。   As described above, the image coding apparatus according to this embodiment uses the tendency of intra prediction that the prediction accuracy decreases as the distance from the reference pixel increases as in the first embodiment, Differentiate predictions and apply orthogonal and inverse orthogonal transforms. This image encoding apparatus classifies the vertical direction and horizontal direction of each prediction mode into two classes according to the presence or absence of the above-described tendency, and adaptively sets the 1D conversion matrix C or 1D conversion matrix D for each of the vertical direction and the horizontal direction. Apply. This image encoding apparatus applies the 1D transformation matrix E to the DC prediction mode. The 1D transform matrix C has higher coefficient density when performing 1D orthogonal transform in the direction (vertical direction or horizontal direction) orthogonal to the line of the reference pixel group (that is, the ratio of non-zero coefficients in the quantized transform coefficient 121) Is generated in advance by designing a common transformation base so that The 1D transformation matrix D is generated by designing a general-purpose transformation matrix that does not have such a property after excluding the DC prediction mode. The 1D transformation matrix E may be a matrix for DCT. Alternatively, the 1D transform matrix E has a high coefficient density when performing 1D orthogonal transform in the vertical and horizontal directions with respect to the prediction error 119 in the DC prediction mode (that is, the non-zero coefficient of the quantized transform coefficient 121). It is generated by pre-designing a common transformation basis so that the ratio becomes smaller. Therefore, according to the image coding apparatus according to the present embodiment, high conversion efficiency is achieved as compared with a case where fixed orthogonal transform such as DCT is uniformly applied to each prediction mode.

(第3の実施形態)
第3の実施形態に係る画像符号化装置は、前述の第1の実施形態及び第2の実施形態に係る画像符号化装置と直交変換及び逆直交変換の詳細において異なる。以降の説明では、本実施形態において第1の実施形態または第2の実施形態と同一部分には同一符号を付して示し、異なる部分を中心に説明する。本実施形態に係る画像符号化装置に対応する画像復号化装置は、第6の実施形態において説明する。
(Third embodiment)
The image encoding device according to the third embodiment differs from the image encoding devices according to the first and second embodiments described above in details of orthogonal transform and inverse orthogonal transform. In the following description, the same reference numerals are given to the same parts as those in the first embodiment or the second embodiment in the present embodiment, and different parts will be mainly described. An image decoding apparatus corresponding to the image encoding apparatus according to the present embodiment will be described in a sixth embodiment.

本実施形態に係る画像符号化装置は、図2に例示した直交変換部102の代わりに、図19に例示する直交変換部102を含む。図19の直交変換部102は、選択スイッチ1201、垂直変換部1202、転置部203、選択スイッチ1204及び水平変換部1205を有する。垂直変換部1202は、1D直交変換部F1206、1D直交変換部G1207及び1D直交変換部H1208を含む。水平変換部1205は、1D直交変換部F1209、1D直交変換部G1210及び1D直交変換部H1211を含む。尚、垂直変換部1202及び水平変換部1205の順序は、一例であり、これらは逆順であっても構わない。   The image encoding apparatus according to the present embodiment includes an orthogonal transform unit 102 illustrated in FIG. 19 instead of the orthogonal transform unit 102 illustrated in FIG. 19 includes a selection switch 1201, a vertical conversion unit 1202, a transposition unit 203, a selection switch 1204, and a horizontal conversion unit 1205. The vertical transform unit 1202 includes a 1D orthogonal transform unit F1206, a 1D orthogonal transform unit G1207, and a 1D orthogonal transform unit H1208. The horizontal transformation unit 1205 includes a 1D orthogonal transformation unit F1209, a 1D orthogonal transformation unit G1210, and a 1D orthogonal transformation unit H1211. Note that the order of the vertical conversion unit 1202 and the horizontal conversion unit 1205 is an example, and these may be reversed.

1D直交変換部F1206及び1D直交変換部F1209は、入力される行列に対して1D変換行列Fを乗算する点で共通の機能を持つ。1D直交変換部G1207及び1D直交変換部G1210は、入力される行列に対して1D変換行列Gを乗算する点で共通の機能を持つ。1D直交変換部H1208及び1D直交変換部H1211は、入力される行列に対して1D変換行列Hを乗算する点で共通の機能を持つ。   The 1D orthogonal transform unit F1206 and the 1D orthogonal transform unit F1209 have a common function in that the input matrix is multiplied by the 1D transform matrix F. The 1D orthogonal transform unit G1207 and the 1D orthogonal transform unit G1210 have a common function in that the input matrix is multiplied by the 1D transform matrix G. The 1D orthogonal transform unit H1208 and the 1D orthogonal transform unit H1211 have a common function in that the input matrix is multiplied by the 1D transform matrix H.

以下、本実施形態に係る1D変換行列F、1D変換行列G及び1D変換行列Hについて説明する。
前述のように、予測誤差119は参照画素からの距離が大きくなるにつれて絶対値が大きくなる傾向を持つ。係る傾向は予測方向に関わらず同様であるが、イントラ予測モードには予測対象ブロックの左隣接ライン上の参照画素群のみまたは上隣接ライン上の参照画素群のみを参照(参照画素値のコピーまたは参照画素値からの補間)する予測モードもあれば、予測対象ブロックの左隣接ライン及び上隣接ライン上の参照画素群を参照する予測モードもある。1ライン上の参照画素群のみを参照する予測モードと、2ライン上の参照画素群を参照する予測モードとでは、上記傾向の現れ方に差が生じるといえる。従って、本実施形態では、1ライン上の参照画素群のみを参照する予測モードと、2ライン上の参照画素群を参照する予測モードとを区別して直交変換及び逆直交変換を行う。具体的には、2ライン上の参照画素群を参照する予測モードについては、後述する1D変換行列Hを利用する。一方、1ライン上の参照画素群のみを参照する予測モードについては、前述の第1の実施形態と同様に上記傾向の有無に応じて夫々1D変換行列F及び1D変換行列Gを適応的に利用する。
Hereinafter, the 1D conversion matrix F, the 1D conversion matrix G, and the 1D conversion matrix H according to the present embodiment will be described.
As described above, the prediction error 119 tends to increase in absolute value as the distance from the reference pixel increases. This tendency is the same regardless of the prediction direction, but in the intra prediction mode, only the reference pixel group on the left adjacent line of the prediction target block or only the reference pixel group on the upper adjacent line is referenced (a copy of the reference pixel value or There is a prediction mode in which interpolation is performed from a reference pixel value), and there is also a prediction mode in which reference pixel groups on the left adjacent line and the upper adjacent line of the prediction target block are referred to. It can be said that there is a difference in the appearance of the above-described tendency between the prediction mode that refers only to the reference pixel group on one line and the prediction mode that refers to the reference pixel group on two lines. Therefore, in this embodiment, orthogonal transformation and inverse orthogonal transformation are performed by distinguishing between a prediction mode that refers only to a reference pixel group on one line and a prediction mode that refers to a reference pixel group on two lines. Specifically, for a prediction mode that refers to a reference pixel group on two lines, a 1D conversion matrix H described later is used. On the other hand, for the prediction mode in which only the reference pixel group on one line is referred to, the 1D conversion matrix F and the 1D conversion matrix G are adaptively used according to the presence or absence of the above-described tendency, as in the first embodiment. To do.

具体的には、1D変換行列Fは、前述の1D変換行列Aと類似の設計手法によって生成することができる。即ち、1D変換行列Fは、2ライン上の参照画素群を参照する予測モード(例えば、図7Aのモード4、モード5及びモード6)を除外したうえで、前述の1D変換行列Aの設計手法を実施すれば生成できる。また、1D変換行列Gは、前述の1D変換行列Bと同一の設計手法によって生成することができる。或いは、1D変換行列Gは、DCTのための行列であってよい。   Specifically, the 1D conversion matrix F can be generated by a design technique similar to the 1D conversion matrix A described above. That is, the 1D transformation matrix F excludes a prediction mode (for example, mode 4, mode 5 and mode 6 in FIG. 7A) that refers to a reference pixel group on two lines, and then designs the 1D transformation matrix A described above. Can be generated. Further, the 1D conversion matrix G can be generated by the same design method as the 1D conversion matrix B described above. Alternatively, the 1D transformation matrix G may be a matrix for DCT.

1D変換行列Hは、2ライン上の参照画素群を参照する予測モードの予測誤差119に対して垂直方向及び水平方向で1D直交変換を行う際の係数集密度が高くなる(即ち、量子化変換係数121における非零係数の割合が小さくなる)ように共通の変換基底を予め設計することによって生成することができる。   The 1D transform matrix H has high coefficient density when performing 1D orthogonal transform in the vertical direction and the horizontal direction on the prediction error 119 of the prediction mode that refers to the reference pixel group on two lines (that is, quantization transform). The common conversion base can be generated in advance so that the ratio of the non-zero coefficient in the coefficient 121 is reduced).

本実施形態に係る画像符号化装置は、図3に例示した逆直交変換部105の代わりに、図20に例示する逆直交変換部105を含む。図20の逆直交変換部105は、選択スイッチ1301、垂直逆変換部1302、転置部303、選択スイッチ1304及び水平逆変換部1305を有する。垂直逆変換部1302は、1D逆直交変換部F1306、1D逆直交変換部G1307及び1D逆直交変換部H1308を含む。水平逆変換部1305は、1D逆直交変換部F1309、1D逆直交変換部G1310及び1D逆直交変換部H1311を含む。尚、垂直逆変換部1302及び水平逆変換部1305の順序は、一例であり、これらは逆順であっても構わない。   The image encoding apparatus according to the present embodiment includes an inverse orthogonal transform unit 105 illustrated in FIG. 20 instead of the inverse orthogonal transform unit 105 illustrated in FIG. The inverse orthogonal transform unit 105 in FIG. 20 includes a selection switch 1301, a vertical inverse transform unit 1302, a transposition unit 303, a selection switch 1304, and a horizontal inverse transform unit 1305. The vertical inverse transform unit 1302 includes a 1D inverse orthogonal transform unit F1306, a 1D inverse orthogonal transform unit G1307, and a 1D inverse orthogonal transform unit H1308. The horizontal inverse transform unit 1305 includes a 1D inverse orthogonal transform unit F1309, a 1D inverse orthogonal transform unit G1310, and a 1D inverse orthogonal transform unit H1311. Note that the order of the vertical inverse transform unit 1302 and the horizontal inverse transform unit 1305 is an example, and these may be reversed.

1D逆直交変換部F1306及び1D逆直交変換部F1309は、入力される行列に対して1D変換行列Fの転置行列を乗算する点で共通の機能を持つ。1D逆直交変換部G1307及び1D逆直交変換部G1310は、入力される行列に対して1D変換行列Gの転置行列を乗算する点で共通の機能を持つ。1D逆直交変換部H1308及び1D逆直交変換部H1311は、入力される行列に対して1D変換行列Hの転置行列を乗算する点で共通の機能を持つ。   The 1D inverse orthogonal transform unit F1306 and the 1D inverse orthogonal transform unit F1309 have a common function in that an input matrix is multiplied by a transposed matrix of the 1D transform matrix F. The 1D inverse orthogonal transform unit G1307 and the 1D inverse orthogonal transform unit G1310 have a common function in that the input matrix is multiplied by the transposed matrix of the 1D transform matrix G. The 1D inverse orthogonal transform unit H1308 and the 1D inverse orthogonal transform unit H1311 have a common function in that an input matrix is multiplied by a transposed matrix of the 1D transform matrix H.

以下、1D変換行列セット部112が生成する、本実施形態に係る1D変換行列セット情報129の詳細を説明する。
1D変換行列セット情報129は、垂直直交変換及び垂直逆直交変換のために使用される変換行列を選択するための垂直変換インデックスと、水平直交変換及び水平逆直交変換のために使用される変換行列を選択するための水平変換インデックスとを直接的または間接的に示す。例えば、1D変換行列セット情報129は、図21Dに示す変換インデックス(TransformIdx)で表現することができる。図21Dのテーブルを参照すれば、変換インデックスから垂直変換インデックス(Vertical Transform Idx)及び水平変換インデックス(Horizontal Transform Idx)を導出できる。
Hereinafter, details of the 1D conversion matrix set information 129 according to the present embodiment generated by the 1D conversion matrix set unit 112 will be described.
The 1D transformation matrix set information 129 includes a vertical transformation index for selecting a transformation matrix used for vertical orthogonal transformation and vertical inverse orthogonal transformation, and a transformation matrix used for horizontal orthogonal transformation and horizontal inverse orthogonal transformation. The horizontal transformation index for selecting is directly or indirectly indicated. For example, the 1D transformation matrix set information 129 can be expressed by a transformation index (TransformIdx) illustrated in FIG. 21D. With reference to the table of FIG. 21D, a vertical transformation index (Vertical Transform Idx) and a horizontal transformation index (Horizontal Transform Idx) can be derived from the transformation index.

図21Bに示すように、垂直変換インデックスが「0」であれば、垂直直交変換または垂直逆直交変換のために前述の1D変換行列F(1D_Transform_Matrix_F)またはその転置行列が選択される。一方、垂直変換インデックスが「1」であれば、垂直直交変換または垂直逆直交変換のために前述の1D変換行列G(1D_Transform_Matrix_G)またはその転置行列が選択される。更に、垂直変換インデックスが「2」であれば、垂直直交変換または垂直逆直交変換のために前述の1D変換行列H(1D_transform_Matrix_H)またはその転置行列が選択される。   As shown in FIG. 21B, if the vertical transform index is “0”, the 1D transform matrix F (1D_Transform_Matrix_F) or its transposed matrix is selected for the vertical orthogonal transform or the vertical inverse orthogonal transform. On the other hand, if the vertical transformation index is “1”, the aforementioned 1D transformation matrix G (1D_Transform_Matrix_G) or its transposed matrix is selected for vertical orthogonal transformation or vertical inverse orthogonal transformation. Furthermore, if the vertical transformation index is “2”, the 1D transformation matrix H (1D_transform_Matrix_H) or its transposed matrix is selected for vertical orthogonal transformation or vertical inverse orthogonal transformation.

図21Cに示すように、水平変換インデックスが「0」であれば、水平直交変換または水平逆直交変換のために前述の1D変換行列F(1D_Transform_Matrix_F)またはその転置行列が選択される。一方、水平変換インデックスが「1」であれば、水平直交変換または水平逆直交変換のために前述の1D変換行列G(1D_Transform_Matrix_G)またはその転置行列が選択される。更に、水平変換インデックスが「2」であれば、水平直交変換または水平逆直交変換のために前述の1D変換行列H(1D_Transform_Matrix_H)またはその転置行列が選択される。   As shown in FIG. 21C, if the horizontal transformation index is “0”, the 1D transformation matrix F (1D_Transform_Matrix_F) or its transposed matrix is selected for horizontal orthogonal transformation or horizontal inverse orthogonal transformation. On the other hand, if the horizontal transformation index is “1”, the aforementioned 1D transformation matrix G (1D_Transform_Matrix_G) or its transposed matrix is selected for horizontal orthogonal transformation or horizontal inverse orthogonal transformation. Furthermore, if the horizontal transformation index is “2”, the 1D transformation matrix H (1D_Transform_Matrix_H) or its transposed matrix is selected for horizontal orthogonal transformation or horizontal inverse orthogonal transformation.

また、各(イントラ)予測モードのインデックス(IntraNxNPredModeIndex)と、その名称(Name of IntraNxNPredMode)と、対応する垂直変換インデックス及び水平変換インデックスを図21Aに例示する。尚、図21Aにおいて、「NxN」は予測対象ブロックのサイズを表している(N=4,8,16など)。予測対象ブロックのサイズは、「MxN」(即ち、正方形以外の矩形)に拡張することもできる。
ここで、図21Aと図21Dを統合した、各予測モードのインデックスとその名称と、対応する変換インデックスを図21Eに例示する。
Further, FIG. 21A illustrates an index (IntraNxNPredModeIndex) of each (intra) prediction mode, its name (Name of IntraNxNPredMode), and a corresponding vertical conversion index and horizontal conversion index. In FIG. 21A, “NxN” represents the size of the prediction target block (N = 4, 8, 16, etc.). The size of the prediction target block can be expanded to “MxN” (that is, a rectangle other than a square).
Here, FIG. 21E illustrates an index of each prediction mode, a name thereof, and a corresponding conversion index obtained by integrating FIGS. 21A and 21D.

1D変換行列セット部112は、予測情報126に含まれる予測モード情報から予測モードのインデックスを検出し、対応する1D変換行列セット情報129を生成する。尚、図21A、図21B、図21C、図21D及び図21Eに示す各種テーブルは一例であり、1D変換行列セット部112はこれらのテーブルの一部または全部を使用することなく1D変換行列セット情報129を生成してよい。   The 1D transformation matrix set unit 112 detects a prediction mode index from the prediction mode information included in the prediction information 126, and generates corresponding 1D transformation matrix set information 129. Note that the various tables shown in FIGS. 21A, 21B, 21C, 21D, and 21E are examples, and the 1D conversion matrix set unit 112 uses the 1D conversion matrix set information without using some or all of these tables. 129 may be generated.

例えば、TrasnformIdxが0を示す場合、Vertical Transform indexが2を、Horizontal Transform indexが2を示すことを意味する。つまり、垂直直交変換には1D変換行列Hを、水平直交変換には1D変換行列Hを使用することを意味する。また、垂直逆直交変換には1D変換行列Hの転置行列を、水平逆直交変換には1D変換行列Hの転置行列を使用することを意味する。   For example, when TransformIdx indicates 0, it means that Vertical Transform index indicates 2, and Horizonal Transform index indicates 2. That is, it means that the 1D transformation matrix H is used for the vertical orthogonal transformation and the 1D transformation matrix H is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of 1D transformation matrix H is used for vertical inverse orthogonal transformation, and a transposed matrix of 1D transformation matrix H is used for horizontal inverse orthogonal transformation.

TrasnformIdxが1を示す場合、Vertical Transform indexが0を、Horizontal Transform indexが1を示すことを意味する。つまり、垂直直交変換には1D変換行列Fを、水平直交変換には1D変換行列Gを使用することを意味する。また、垂直逆直交変換には1D変換行列Fの転置行列を、水平逆直交変換には1D変換行列Gの転置行列を使用することを意味する。   When the TransformIdx indicates 1, it means that the Vertical Transform index indicates 0 and the Horizontal Transform index indicates 1. That is, it means that the 1D transformation matrix F is used for the vertical orthogonal transformation and the 1D transformation matrix G is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of 1D transformation matrix F is used for vertical inverse orthogonal transformation, and a transposed matrix of 1D transformation matrix G is used for horizontal inverse orthogonal transformation.

TrasnformIdxが2を示す場合、Vertical Transform indexが1を、Horizontal Transform indexが0を示すことを意味する。つまり、垂直直交変換には1D変換行列Gを、水平直交変換には1D変換行列Fを使用することを意味する。また、垂直逆直交変換には1D変換行列Gの転置行列を、水平逆直交変換には1D変換行列Fを使用することを意味する。   When the TransformIdx indicates 2, it means that the Vertical Transform index indicates 1, and the Horizontal Transform index indicates 0. That is, it means that the 1D transformation matrix G is used for the vertical orthogonal transformation, and the 1D transformation matrix F is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of the 1D transformation matrix G is used for the vertical inverse orthogonal transformation, and a 1D transformation matrix F is used for the horizontal inverse orthogonal transformation.

TrasnformIdxが3を示す場合、Vertical Transform indexが1をHorizontal Transform indexが1を示すことを意味する。つまり、垂直直交変換には1D変換行列Gを、水平直交変換には1D変換行列Gを使用することを意味する。また、垂直逆直交変換には1D変換行列Gの転置行列を、水平逆直交変換には1D変換行列Gの転置行列を使用することを意味する。   When TransformIdx indicates 3, it means that Vertical Transform index indicates 1, and Horizontal Transform index indicates 1. That is, it means that the 1D conversion matrix G is used for the vertical orthogonal transformation, and the 1D conversion matrix G is used for the horizontal orthogonal transformation. Further, it means that a transposed matrix of the 1D transformation matrix G is used for the vertical inverse orthogonal transformation, and a transposed matrix of the 1D transformation matrix G is used for the horizontal inverse orthogonal transformation.

ここで、予測対象ブロックがM×Nで表現される矩形ブロックである場合、直交変換を行うブロックサイズもまたM×Nであってもよい。   Here, when the prediction target block is a rectangular block represented by M × N, the block size for performing orthogonal transform may also be M × N.

図21Aに示すテーブルは、前述の各イントラ予測モードの傾向を考慮して1D変換行列セット情報129を割り当てている。即ち、2ライン上の参照画素群を参照する予測モードには、Vertical Transform index及びHorizontal Transofrm indexに共に2を割り当てている。故に、2ライン上の参照画素群を参照する予測モードについて前述の1D変換行列Hまたはその転置行列を用いて垂直方向及び水平方向の直交変換または逆直交変換が行われ、高い変換効率が達成される。   In the table shown in FIG. 21A, 1D transformation matrix set information 129 is assigned in consideration of the tendency of each intra prediction mode described above. That is, 2 is assigned to both the vertical transform index and the horizontal transform index in the prediction mode for referencing the reference pixel group on two lines. Therefore, for the prediction mode that refers to the reference pixel group on two lines, the orthogonal transformation or inverse orthogonal transformation in the vertical direction and the horizontal direction is performed using the 1D transformation matrix H or its transpose matrix, and high transformation efficiency is achieved. The

2ライン上の参照画素群を参照する予測モードを除く予測モードに関して、予測誤差の垂直方向に上記傾向を示すならば、Vertical Transform indexに0が、水平方向に上記傾向を示すならば、Horizontal Transform indexに0が割り当てられている。一方、上記傾向を示さない方向には、夫々1が割り当てられている。2ライン上の参照画素群を参照する予測モードを除く予測モードに関して、各予測モードの垂直方向及び水平方向を上記傾向の有無に従って2つのクラスに分類し、垂直方向及び水平方向の夫々について適応的に1D変換行列Fまたは1D変換行列Gを適用することにより、高い変換効率が達成される。   For prediction modes other than the prediction mode that refers to the reference pixel group on two lines, if the tendency is shown in the vertical direction of the prediction error, 0 is in the vertical transform index, and if the tendency is shown in the horizontal direction, the horizonal transform is shown. 0 is assigned to the index. On the other hand, 1 is assigned to each direction that does not show the above tendency. Regarding prediction modes other than the prediction mode that refers to the reference pixel group on two lines, the vertical direction and horizontal direction of each prediction mode are classified into two classes according to the presence or absence of the above-mentioned tendency, and adaptive in each of the vertical direction and the horizontal direction. By applying the 1D conversion matrix F or the 1D conversion matrix G to the above, high conversion efficiency is achieved.

以上説明したように、本実施形態に係る画像符号化装置は、第1の実施形態と同様に参照画素からの距離が大きくなるにつれて予測精度が低下するというイントラ予測の傾向を利用しつつ、各予測モードを参照画素群のライン数によって区別して直交変換及び逆直交変換を適用する。この画像符号化装置は、2ライン上の参照画素群を参照する予測モードを除く予測モードに関して、垂直方向及び水平方向を上記傾向の有無に従って2つのクラスに分類し、垂直方向及び水平方向の夫々について適応的に1D変換行列Fまたは1D変換行列Gを適用する。一方、この画像符号化装置は、2ライン上の参照画素群を参照する各予測モードには1D変換行列Hを適用する。1D変換行列Fは、1ライン上の参照画素群のみを参照する各予測モードに関して、参照画素群のラインに直交する方向(垂直方向または水平方向)について1D直交変換を行う際の係数集密度が高くなる(即ち、量子化変換係数121における非零係数の割合が小さくなる)ように共通の変換基底を予め設計することによって生成される。一方、1D変換行列Gは、このような性質を持たない汎用的な変換行列を設計することによって生成される。更に、1D変換行列Hは、2ライン上の参照画素群を参照する各予測モードの予測誤差119に対して垂直方向及び水平方向で1D直交変換を行う際の係数集密度が高くなる(即ち、量子化変換係数121における非零係数の割合が小さくなる)ように共通の変換基底を予め設計することによって生成される。故に、本実施形態に係る画像符号化装置によれば、各予測モードに一律にDCTなどの固定的な直交変換を施す場合に比べて、高い変換効率が達成される。   As described above, the image encoding apparatus according to the present embodiment uses the tendency of intra prediction that the prediction accuracy decreases as the distance from the reference pixel increases, as in the first embodiment. The prediction mode is distinguished by the number of lines of the reference pixel group, and orthogonal transformation and inverse orthogonal transformation are applied. This image encoding apparatus classifies the vertical direction and the horizontal direction into two classes according to the presence or absence of the above-described tendency with respect to the prediction mode except the prediction mode that refers to the reference pixel group on two lines, and each of the vertical direction and the horizontal direction. The 1D transformation matrix F or the 1D transformation matrix G is applied adaptively. On the other hand, this image encoding apparatus applies the 1D transformation matrix H to each prediction mode that refers to reference pixel groups on two lines. The 1D transformation matrix F has a coefficient density when performing 1D orthogonal transformation in a direction (vertical direction or horizontal direction) orthogonal to the line of the reference pixel group with respect to each prediction mode in which only the reference pixel group on one line is referred to. It is generated by designing a common transform base in advance so as to be high (that is, the ratio of non-zero coefficients in the quantized transform coefficient 121 is small). On the other hand, the 1D transformation matrix G is generated by designing a general-purpose transformation matrix having no such property. Further, the 1D transform matrix H has a high coefficient density when performing 1D orthogonal transform in the vertical direction and the horizontal direction with respect to the prediction error 119 of each prediction mode referring to the reference pixel group on two lines (that is, It is generated by designing a common transform base in advance so that the ratio of the non-zero coefficient in the quantized transform coefficient 121 becomes smaller. Therefore, according to the image coding apparatus according to the present embodiment, high conversion efficiency is achieved as compared with a case where fixed orthogonal transform such as DCT is uniformly applied to each prediction mode.

第1乃至第3の実施形態では、2種類または3種類の1D変換行列を夫々用意し、予測モードに応じて垂直変換(または垂直逆変換)及び水平変換(または水平逆変換)のための1D変換行列を選択する。しかしながら、前述の2種類または3種類の1D変換行列は、例示であり、更に多くの変換行列を用意して符号化効率を向上させることも可能である。例えば、第2の実施形態と第3の実施形態とを組み合わせて4種類の1D変換行列を用意することも可能である。但し、用意する変換行列の種類の増加に伴って更なるハードウェアなどが必要となるので、変換行列の種類の増加に伴うデメリットと符号化効率とのバランスを考慮することが望ましい。   In the first to third embodiments, two or three types of 1D conversion matrices are prepared, and 1D for vertical conversion (or vertical reverse conversion) and horizontal conversion (or horizontal reverse conversion) according to the prediction mode. Select a transformation matrix. However, the above-described two or three types of 1D transformation matrices are examples, and it is possible to prepare more transformation matrices to improve the encoding efficiency. For example, it is possible to prepare four types of 1D conversion matrices by combining the second embodiment and the third embodiment. However, since additional hardware is required as the types of transformation matrices to be prepared increase, it is desirable to consider the balance between the disadvantages associated with the increase in types of transformation matrices and the coding efficiency.

(第4の実施形態)
第4の実施形態は、画像復号化装置に関する。本実施形態に係る画像復号化装置に対応する画像符号化装置は、第1の実施形態において説明した通りである。即ち、本実施形態に係る画像復号化装置は、例えば第1の実施形態に係る画像符号化装置によって生成された符号化データを復号化する。
(Fourth embodiment)
The fourth embodiment relates to an image decoding apparatus. The image coding apparatus corresponding to the image decoding apparatus according to the present embodiment is as described in the first embodiment. That is, the image decoding apparatus according to the present embodiment decodes encoded data generated by the image encoding apparatus according to the first embodiment, for example.

図22に示すように、本実施形態に係る画像復号化装置は、入力バッファ401、エントロピー復号化部402、係数順制御部403、逆量子化部404、逆直交変換部405、加算部406、参照画像メモリ407、イントラ予測部408、インター予測部409、選択スイッチ410、1D変換行列セット部411及び出力バッファ412を含む。   As shown in FIG. 22, the image decoding apparatus according to the present embodiment includes an input buffer 401, an entropy decoding unit 402, a coefficient order control unit 403, an inverse quantization unit 404, an inverse orthogonal transform unit 405, an addition unit 406, A reference image memory 407, an intra prediction unit 408, an inter prediction unit 409, a selection switch 410, a 1D transformation matrix setting unit 411, and an output buffer 412 are included.

図22の画像復号化装置は、入力バッファ401に蓄積される符号化データ414を復号し、復号画像419を出力バッファ412に蓄積して出力画像425として出力する。符号化データ414は、例えば図1の画像符号化装置などから出力され、図示しない蓄積系または伝送系を経て、入力バッファ401に一時的に蓄積される。   The image decoding apparatus in FIG. 22 decodes the encoded data 414 stored in the input buffer 401, stores the decoded image 419 in the output buffer 412, and outputs it as an output image 425. The encoded data 414 is output from, for example, the image encoding device in FIG. 1 and the like, and is temporarily stored in the input buffer 401 via a storage system or a transmission system (not shown).

エントロピー復号化部402は、符号化データ414の復号化のために、1フレームまたは1フィールド毎にシンタクスに基づいて解読を行う。エントロピー復号化部402は、各シンタクスの符号列を順次エントロピー復号化し、予測モード情報421を含む予測情報424、量子化変換係数列415などの符号化対象ブロックの符号化パラメータを再生する。符号化パラメータとは、予測情報424、変換係数に関する情報、量子化に関する情報、などの復号に必要となるパラメータである。量子化変換係数列415は、係数順制御部403へ入力される。また、予測情報424に含まれる予測モード情報421も同様に、係数順制御部403へ入力される。予測情報424は、1D変換行列セット部411及び選択スイッチ410に入力される。   The entropy decoding unit 402 performs decoding based on the syntax for each frame or field for decoding the encoded data 414. The entropy decoding unit 402 sequentially entropy-decodes the code string of each syntax, and reproduces the encoding parameters of the encoding target block such as the prediction information 424 including the prediction mode information 421 and the quantized transform coefficient string 415. The encoding parameter is a parameter necessary for decoding such as prediction information 424, information on transform coefficients, information on quantization, and the like. The quantized transform coefficient sequence 415 is input to the coefficient order control unit 403. Similarly, the prediction mode information 421 included in the prediction information 424 is also input to the coefficient order control unit 403. The prediction information 424 is input to the 1D conversion matrix setting unit 411 and the selection switch 410.

係数順制御部403は、1次元表現である量子化変換係数列415を、2次元表現である量子化変換係数416に変換し、逆量子化部404に入力する。尚、係数制御部403の詳細は後述される。   The coefficient order control unit 403 converts the quantized transform coefficient sequence 415 that is a one-dimensional representation into a quantized transform coefficient 416 that is a two-dimensional representation, and inputs the quantized transform coefficient sequence 415 to the inverse quantization unit 404. Details of the coefficient control unit 403 will be described later.

逆量子化部404は、係数順制御部403からの量子化変換係数416に逆量子化を行って、復元変換係数417を得る。具体的には、逆量子化部404は、エントロピー復号化部402によって復号化された量子化に関する情報に従って逆量子化を行う。逆量子化部404は、復元変換係数417を逆直交変換部405に入力する。   The inverse quantization unit 404 performs inverse quantization on the quantized transform coefficient 416 from the coefficient order control unit 403 to obtain a restored transform coefficient 417. Specifically, the inverse quantization unit 404 performs inverse quantization according to the information related to quantization decoded by the entropy decoding unit 402. The inverse quantization unit 404 inputs the restored transform coefficient 417 to the inverse orthogonal transform unit 405.

逆直交変換部405は、逆量子化部404からの復元変換係数417に対して、符号化側において行われた直交変換に対応する逆直交変換を行い、復元予測誤差418を得る。逆直交変換部405は、復元予測誤差418を加算部406に入力する。   The inverse orthogonal transform unit 405 performs an inverse orthogonal transform corresponding to the orthogonal transform performed on the encoding side on the restored transform coefficient 417 from the inverse quantization unit 404 to obtain a restored prediction error 418. The inverse orthogonal transform unit 405 inputs the restoration prediction error 418 to the addition unit 406.

具体的には、本実施形態に係る逆直交変換部405は、図3の逆直交変換部105と実質的に同一または類似の要素なのでその詳細な説明を省略する。特に、本実施形態に係る逆直交変換部405は、図3の逆直交変換部105と共通の1D変換行列A及び1D変換行列Bを利用する。尚、図3における復元変換係数122、1D変換行列セット情報129及び復元予測誤差123は、本実施形態における復元変換係数417、1D変換行列セット情報422及び復元予測誤差信号418に夫々対応している。   Specifically, since the inverse orthogonal transform unit 405 according to the present embodiment is substantially the same as or similar to the inverse orthogonal transform unit 105 of FIG. 3, detailed description thereof is omitted. In particular, the inverse orthogonal transform unit 405 according to the present embodiment uses the 1D transform matrix A and the 1D transform matrix B common to the inverse orthogonal transform unit 105 of FIG. Note that the restored transform coefficient 122, 1D transform matrix set information 129, and the restored prediction error 123 in FIG. 3 respectively correspond to the restored transform coefficient 417, 1D transform matrix set information 422, and the restored prediction error signal 418 in the present embodiment. .

加算部406は、復元予測誤差418と、対応する予測画像423とを加算し、復号画像419を生成する。復号画像419は、出力画像425のために出力バッファ412に一時的に蓄積されると共に、参照画像420のために参照画像メモリ407にも保存される。参照画像メモリ407に保存された復号画像419は、参照画像420としてイントラ予測部408及びインター予測部409によって必要に応じてフレーム単位またはフィールド単位で参照される。出力バッファ412に一時的に蓄積された復号画像419は、復号化制御部413によって管理される出力タイミングに従って出力される。   The adding unit 406 adds the restored prediction error 418 and the corresponding predicted image 423 to generate a decoded image 419. The decoded image 419 is temporarily stored in the output buffer 412 for the output image 425 and also stored in the reference image memory 407 for the reference image 420. The decoded image 419 stored in the reference image memory 407 is referred to by the intra prediction unit 408 and the inter prediction unit 409 as the reference image 420 in units of frames or fields as necessary. The decoded image 419 temporarily stored in the output buffer 412 is output according to the output timing managed by the decoding control unit 413.

イントラ予測部408、インター予測部409及び選択スイッチ410は、図1のイントラ予測部108、インター予測部109及び選択スイッチ111と実質的に同一または類似の要素なのでその詳細な説明を省略する。復号化制御部413は、図22の画像復号化装置の各要素を制御する。具体的には、復号化制御部413は、上述の動作を含む復号化処理のための種々の制御を行う。   The intra prediction unit 408, the inter prediction unit 409, and the selection switch 410 are substantially the same as or similar to the intra prediction unit 108, the inter prediction unit 109, and the selection switch 111 in FIG. The decoding control unit 413 controls each element of the image decoding device in FIG. Specifically, the decoding control unit 413 performs various controls for the decoding process including the above-described operation.

1D変換行列セット部411は、エントロピー復号化部402からの予測情報424に含まれる予測モード情報に基づいて1D変換行列セット情報422を生成し、逆直交変換部405に入力する。   The 1D transform matrix set unit 411 generates 1D transform matrix set information 422 based on the prediction mode information included in the prediction information 424 from the entropy decoding unit 402 and inputs the 1D transform matrix set information 422 to the inverse orthogonal transform unit 405.

具体的には、本実施形態に係る1D変換行列セット部411は、第1の実施形態に係る1D変換行列セット部112と実質的に同一または類似の要素なのでその詳細な説明を省略する。即ち、本実施形態に係る1D変換行列セット部411は、例えば図4A、図4B、図4C、図4D及び図4Eのテーブルを利用して、1D変換行列セット情報422を生成する。尚、第1の実施形態における予測情報126及び1D変換行列セット情報129は、本実施形態における予測情報424及び1D変換行列セット情報422に夫々対応している。
また、図22の画像復号化装置は、図11、図12、図13及び図14に関して説明したシンタクスと同一または類似のシンタクスを利用するのでその詳細な説明を省略する。
Specifically, the 1D transformation matrix set unit 411 according to the present embodiment is substantially the same as or similar to the 1D transformation matrix set unit 112 according to the first embodiment, and thus detailed description thereof is omitted. That is, the 1D conversion matrix set unit 411 according to the present embodiment generates 1D conversion matrix set information 422 using, for example, the tables of FIGS. 4A, 4B, 4C, 4D, and 4E. Note that the prediction information 126 and the 1D transformation matrix set information 129 in the first embodiment correspond to the prediction information 424 and the 1D transformation matrix set information 422 in the present embodiment, respectively.
The image decoding apparatus in FIG. 22 uses the same or similar syntax as the syntax described with reference to FIGS. 11, 12, 13, and 14, and thus detailed description thereof is omitted.

以下、係数順制御部403の詳細を説明する。
係数順制御部403は、1次元表現である量子化変換係数列415の各要素を所定の順序(即ち、符号化側と対応する順序)に従って配列することにより、2次元表現である量子化変換係数416に変換する。一例として、符号化側において予測モードに関わらず共通の2D−1D変換が行われているならば、係数順制御部403は予測モードに関わらず共通の1D−2D変換を行うことができる。具体的には、係数制御部403は、H.264と同様に逆ジグザグスキャンを利用できる。逆ジグザグスキャンは、前述のジグザグスキャンに対応する1D−2D変換である
別の例として、符号化側において予測モード毎の個別の2D−1D変換が行われているならば、係数順制御部403もまた予測モード毎の個別の1D−2D変換を行うことができる。このような動作を行う係数順制御部403は、図23Aに例示されている。この係数順制御部403は、選択スイッチ1001と、9種類の予測モード毎の個別の1D−2D変換部1002,・・・,1010とを含む。選択スイッチ1001は、予測情報424に含まれる予測モード情報(例えば、図4Aの予測モードのインデックス)に従って量子化変換係数列415を、予測モードに応じた1D−2D変換部(1002,・・・,1010のうちいずれか1つ)に導く。例えば、予測モードインデックスが0であれば、選択スイッチ1001は量子化変換係数列415を1D−2D変換部1002に導く。図23Aにおいて、各予測モードと1D−2D変換部とは1対1に対応しており、量子化変換係数列415は予測モードに応じた1つの1D−2D変換部に導かれ、量子化変換係数416に変換される。
Details of the coefficient order control unit 403 will be described below.
The coefficient order control unit 403 arranges the elements of the quantized transform coefficient sequence 415 that is a one-dimensional representation according to a predetermined order (that is, the order that corresponds to the encoding side), and thereby the quantized transform that is a two-dimensional representation. Convert to coefficient 416. As an example, if the common 2D-1D conversion is performed regardless of the prediction mode on the encoding side, the coefficient order control unit 403 can perform the common 1D-2D conversion regardless of the prediction mode. Specifically, the coefficient control unit 403 includes the H.264 standard. Similar to H.264, reverse zigzag scanning can be used. Inverse zigzag scanning is 1D-2D conversion corresponding to the above-described zigzag scanning. As another example, if individual 2D-1D conversion for each prediction mode is performed on the encoding side, the coefficient order control unit 403 Can also perform individual 1D-2D conversion for each prediction mode. The coefficient order control unit 403 that performs such an operation is illustrated in FIG. 23A. The coefficient order control unit 403 includes a selection switch 1001 and individual 1D-2D conversion units 1002, ..., 1010 for each of nine types of prediction modes. The selection switch 1001 converts the quantized transform coefficient sequence 415 according to the prediction mode information (for example, the prediction mode index in FIG. 4A) included in the prediction information 424, and the 1D-2D conversion unit (1002,. , 1010). For example, if the prediction mode index is 0, the selection switch 1001 guides the quantized transform coefficient sequence 415 to the 1D-2D transform unit 1002. In FIG. 23A, each prediction mode and the 1D-2D conversion unit have a one-to-one correspondence, and the quantized transform coefficient sequence 415 is guided to one 1D-2D transform unit corresponding to the prediction mode, and the quantized transform is performed. Converted to a coefficient 416.

更に別の例として、符号化側において2D−1D変換におけるスキャン順が動的に更新されるならば、係数順制御部403もまた1D−2D変換におけるスキャン順を符号化側と対応するように動的に更新してもよい。このような動作を行う係数順制御部403は、図23Bに例示されている。この係数順制御部403は、選択スイッチ1001と、9種類の予測モード毎の個別の1D−2D変換部1002,・・・,1010と、発生頻度カウント部1011と、係数順更新部1012とを含む。選択スイッチ1001は、図23Aに関して説明した通りである。9種類の予測モード毎の個別の1D−2D変換部1002,・・・,1010は、そのスキャン順が係数順更新部1012によって更新される点で図23Aとは異なる。   As yet another example, if the scan order in the 2D-1D conversion is dynamically updated on the encoding side, the coefficient order control unit 403 also causes the scan order in the 1D-2D conversion to correspond to the encoding side. It may be updated dynamically. The coefficient order control unit 403 that performs such an operation is illustrated in FIG. 23B. The coefficient order control unit 403 includes a selection switch 1001, individual 1D-2D conversion units 1002,..., 1010 for each of nine types of prediction modes, an occurrence frequency counting unit 1011, and a coefficient order update unit 1012. Including. The selection switch 1001 is as described with reference to FIG. 23A. The individual 1D-2D conversion units 1002,..., 1010 for each of the nine types of prediction modes differ from FIG. 23A in that the scan order is updated by the coefficient order update unit 1012.

発生頻度カウント部1011は、予測モード毎に、量子化変換係数416の各要素における非零係数の発生回数のヒストグラムを作成する。発生頻度カウント部1011は、作成したヒストグラム1013を係数順更新部1012に入力する。   The occurrence frequency counting unit 1011 creates a histogram of the number of occurrences of non-zero coefficients in each element of the quantized transform coefficient 416 for each prediction mode. The occurrence frequency counting unit 1011 inputs the created histogram 1013 to the coefficient order updating unit 1012.

係数順更新部1012は、予め定められたタイミングで、ヒストグラム1013に基づいて係数順の更新を行う。上記タイミングは、例えば、コーディングツリーユニットの復号化処理が終了したタイミング、コーディングツリーユニット内の1ライン分の復号化処理が終了したタイミングなどである。   The coefficient order update unit 1012 updates the coefficient order based on the histogram 1013 at a predetermined timing. The timing is, for example, the timing when the decoding process of the coding tree unit is completed, the timing when the decoding process for one line in the coding tree unit is completed, or the like.

具体的には、係数順更新部1012は、ヒストグラム1013を参照して、非零係数の発生回数が閾値以上にカウントされた要素を持つ予測モードに関して係数順の更新を行う。例えば、係数順更新部1012は、非零係数の発生が16回以上カウントされた要素を持つ予測モードに関して更新を行う。このような発生回数に閾値を設けることによって、係数順の更新が大域的に実施されるので、局所的な最適解に収束しにくくなる。   Specifically, the coefficient order update unit 1012 refers to the histogram 1013 and updates the coefficient order for a prediction mode having an element in which the number of occurrences of non-zero coefficients is counted above a threshold. For example, the coefficient order update unit 1012 updates the prediction mode having an element in which the occurrence of a non-zero coefficient is counted 16 times or more. By providing a threshold value for the number of occurrences, the coefficient order is updated globally, so that it is difficult to converge to a local optimum solution.

係数順更新部1012は、更新対象となる予測モードに関して、非零係数の発生頻度の降順に要素をソーティングする。ソーティングは、例えばバブルソート、クイックソートなどの既存のアルゴリズムによって実現できる。そして、係数順更新部1012は、ソーティングされた要素の順序を示す係数順更新情報1014を、更新対象となる予測モードに対応する1D−2D変換部に入力する。   The coefficient order update unit 1012 sorts the elements in descending order of the occurrence frequency of the non-zero coefficient with respect to the prediction mode to be updated. Sorting can be realized by existing algorithms such as bubble sort and quick sort. Then, the coefficient order update unit 1012 inputs coefficient order update information 1014 indicating the order of the sorted elements to the 1D-2D conversion unit corresponding to the prediction mode to be updated.

係数順更新情報1014が入力されると、1D−2D変換部は更新後のスキャン順に従って1D−2D変換を行う。尚、スキャン順を動的に更新する場合には、各1D−2D変換部の符号化側と対応する初期スキャン順を予め定めておく必要がある。   When the coefficient order update information 1014 is input, the 1D-2D conversion unit performs 1D-2D conversion according to the updated scan order. Note that when the scan order is dynamically updated, it is necessary to determine in advance the initial scan order corresponding to the encoding side of each 1D-2D conversion unit.

尚、簡単化のためにH.264を例示して予測モードが9種類の場合を説明したが、予測モードが17種類、33種類などに拡張された場合にも、拡張された各予測モードに対応する1D−2D変換部を追加すれば予測モード毎の個別の1D−2D変換を行うことができる。   For simplification, H.C. H.264 has been described as an example of nine prediction modes. However, when the prediction mode is expanded to 17 types, 33 types, etc., a 1D-2D conversion unit corresponding to each expanded prediction mode is added. Then, individual 1D-2D conversion for each prediction mode can be performed.

以上説明したように、本実施形態に係る画像復号化装置は、前述の第1の実施形態に係る画像符号化装置と同一または類似の逆直交変換部を持つ。故に、本実施形態に係る画像復号化装置によれば、前述の第1の実施形態に係る画像符号化装置と同一または類似の効果が得られる。   As described above, the image decoding apparatus according to the present embodiment has the same or similar inverse orthogonal transform unit as the image encoding apparatus according to the first embodiment described above. Therefore, according to the image decoding apparatus according to the present embodiment, the same or similar effects as those of the image encoding apparatus according to the first embodiment described above can be obtained.

(第5の実施形態)
第5の実施形態に係る画像復号化装置は、前述の第4の実施形態に係る画像復号化装置と逆直交変換の詳細において異なる。以降の説明では、本実施形態において第4の実施形態と同一部分には同一符号を付して示し、異なる部分を中心に説明する。本実施形態に係る画像復号化装置に対応する画像符号化装置は、第2の実施形態において説明した通りである。
(Fifth embodiment)
The image decoding apparatus according to the fifth embodiment differs from the image decoding apparatus according to the above-described fourth embodiment in the details of inverse orthogonal transform. In the following description, in this embodiment, the same parts as those in the fourth embodiment are denoted by the same reference numerals, and different parts will be mainly described. The image coding apparatus corresponding to the image decoding apparatus according to the present embodiment is as described in the second embodiment.

本実施形態に係る逆直交変換部405は、図17の逆直交変換部105と実質的に同一または類似の要素なのでその詳細な説明を省略する。特に、本実施形態に係る逆直交変換部405は、図17の逆直交変換部105と共通の1D変換行列C、1D変換行列D及び1D変換行列Eを利用する。尚、図17における復元変換係数122、1D変換行列セット情報129及び復元予測誤差123は、本実施形態における復元変換係数417、1D変換行列セット情報422及び復元予測誤差信号418に夫々対応している。   Since the inverse orthogonal transform unit 405 according to the present embodiment is substantially the same as or similar to the inverse orthogonal transform unit 105 of FIG. 17, detailed description thereof is omitted. In particular, the inverse orthogonal transform unit 405 according to the present embodiment uses the 1D transform matrix C, the 1D transform matrix D, and the 1D transform matrix E common to the inverse orthogonal transform unit 105 in FIG. Note that the restored transform coefficient 122, 1D transform matrix set information 129, and the restored prediction error 123 in FIG. 17 correspond to the restored transform coefficient 417, 1D transform matrix set information 422, and the restored prediction error signal 418 in the present embodiment, respectively. .

本実施形態に係る1D変換行列セット部411は、第2の実施形態に係る1D変換行列セット部112と実質的に同一または類似の要素なのでその詳細な説明を省略する。即ち、本実施形態に係る1D変換行列セット部411は、例えば図18A、図18B、図18C図18D及び図18Eのテーブルを利用して、1D変換行列セット情報422を生成する。尚、第2の実施形態における予測情報126及び1D変換行列セット情報129は、本実施形態における予測情報424及び1D変換行列セット情報422に夫々対応している。   Since the 1D transformation matrix set unit 411 according to the present embodiment is substantially the same as or similar to the 1D transformation matrix set unit 112 according to the second embodiment, detailed description thereof is omitted. That is, the 1D conversion matrix set unit 411 according to the present embodiment generates 1D conversion matrix set information 422 using, for example, the tables of FIGS. 18A, 18B, 18C, 18D, and 18E. Note that the prediction information 126 and the 1D transformation matrix set information 129 in the second embodiment correspond to the prediction information 424 and the 1D transformation matrix set information 422 in the present embodiment, respectively.

以上説明したように、本実施形態に係る画像復号化装置は、前述の第2の実施形態に係る画像符号化装置と同一または類似の逆直交変換部を持つ。故に、本実施形態に係る画像復号化装置によれば、前述の第2の実施形態に係る画像符号化装置と同一または類似の効果が得られる。   As described above, the image decoding apparatus according to the present embodiment has the same or similar inverse orthogonal transform unit as the image encoding apparatus according to the second embodiment described above. Therefore, according to the image decoding apparatus according to the present embodiment, the same or similar effects as those of the image encoding apparatus according to the second embodiment described above can be obtained.

(第6の実施形態)
第6の実施形態に係る画像復号化装置は、前述の第4の実施形態及び第5の実施形態に係る画像復号化装置と逆直交変換の詳細において異なる。以降の説明では、本実施形態において第4の実施形態または第5の実施形態と同一部分には同一符号を付して示し、異なる部分を中心に説明する。本実施形態に係る画像復号化装置に対応する画像符号化装置は、第3の実施形態において説明した通りである。
(Sixth embodiment)
The image decoding device according to the sixth embodiment differs from the image decoding devices according to the fourth embodiment and the fifth embodiment described above in details of inverse orthogonal transform. In the following description, in this embodiment, the same parts as those in the fourth or fifth embodiment are denoted by the same reference numerals, and different parts will be mainly described. The image encoding device corresponding to the image decoding device according to the present embodiment is as described in the third embodiment.

本実施形態に係る逆直交変換部405は、図20の逆直交変換部105と実質的に同一または類似の要素なのでその詳細な説明を省略する。特に、本実施形態に係る逆直交変換部405は、図20の逆直交変換部105と共通の1D変換行列F、1D変換行列G及び1D変換行列Hを利用する。尚、図20における復元変換係数122、1D変換行列セット情報129及び復元予測誤差123は、本実施形態における復元変換係数417、1D変換行列セット情報422及び復元予測誤差信号418に夫々対応している。   Since the inverse orthogonal transform unit 405 according to the present embodiment is substantially the same as or similar to the inverse orthogonal transform unit 105 of FIG. 20, detailed description thereof is omitted. In particular, the inverse orthogonal transform unit 405 according to the present embodiment uses the 1D transform matrix F, the 1D transform matrix G, and the 1D transform matrix H that are common to the inverse orthogonal transform unit 105 in FIG. Note that the restored transform coefficient 122, 1D transform matrix set information 129, and the restored prediction error 123 in FIG. 20 respectively correspond to the restored transform coefficient 417, 1D transform matrix set information 422, and the restored prediction error signal 418 in the present embodiment. .

本実施形態に係る1D変換行列セット部411は、第3の実施形態に係る1D変換行列セット部112と実質的に同一または類似の要素なのでその詳細な説明を省略する。即ち、本実施形態に係る1D変換行列セット部411は、例えば図21A、図21B、図21C、図21D及び図21Eのテーブルを利用して、1D変換行列セット情報422を生成する。尚、第3の実施形態における予測情報126及び1D変換行列セット情報129は、本実施形態における予測情報424及び1D変換行列セット情報422に夫々対応している。   Since the 1D conversion matrix set unit 411 according to the present embodiment is substantially the same as or similar to the 1D conversion matrix set unit 112 according to the third embodiment, detailed description thereof is omitted. That is, the 1D conversion matrix set unit 411 according to the present embodiment generates 1D conversion matrix set information 422 using, for example, the tables of FIGS. 21A, 21B, 21C, 21D, and 21E. Note that the prediction information 126 and the 1D transformation matrix set information 129 in the third embodiment correspond to the prediction information 424 and the 1D transformation matrix set information 422 in the present embodiment, respectively.

以上説明したように、本実施形態に係る画像復号化装置は、前述の第3の実施形態に係る画像符号化装置と同一または類似の逆直交変換部を持つ。故に、本実施形態に係る画像復号化装置によれば、前述の第3の実施形態に係る画像符号化装置と同一または類似の効果が得られる。   As described above, the image decoding apparatus according to this embodiment has the same or similar inverse orthogonal transform unit as that of the image encoding apparatus according to the third embodiment described above. Therefore, according to the image decoding apparatus according to the present embodiment, the same or similar effects as those of the image encoding apparatus according to the third embodiment described above can be obtained.

第4乃至第6の実施形態では、2種類または3種類の1D変換行列を夫々用意し、予測モードに応じて垂直逆変換及び水平逆変換のための1D変換行列を選択する。しかしながら、前述の2種類または3種類の1D変換行列は、例示であり、更に多くの変換行列を用意して符号化効率を向上させることも可能である。例えば、第5の実施形態と第6の実施形態とを組み合わせて4種類の1D変換行列を用意することも可能である。但し、用意する変換行列の種類の増加に伴って更なるハードウェアなどが必要となるので、変換行列の種類の増加に伴うデメリットと符号化効率とのバランスを考慮することが望ましい。   In the fourth to sixth embodiments, two or three types of 1D conversion matrices are prepared, and a 1D conversion matrix for vertical inverse transformation and horizontal inverse transformation is selected according to the prediction mode. However, the above-described two or three types of 1D transformation matrices are examples, and it is possible to prepare more transformation matrices to improve the encoding efficiency. For example, it is possible to prepare four types of 1D conversion matrices by combining the fifth embodiment and the sixth embodiment. However, since additional hardware is required as the types of transformation matrices to be prepared increase, it is desirable to consider the balance between the disadvantages associated with the increase in types of transformation matrices and the coding efficiency.

以下、各実施形態の変形例を列挙して紹介する。
第1乃至第6の実施形態において、フレームを16×16画素サイズなどの矩形ブロックに分割し、画面左上のブロックから右下に向かって順に符号化/復号化を行う例について説明している(図6Aを参照)。しかしながら、符号化順序及び復号化順序はこの例に限定されない。例えば、右下から左上に向かって順に符号化及び復号化が行われてもよいし、画面中央から画面端に向かって渦巻を描くように符号化及び復号化が行われてもよい。更に、右上から左下に向かって順に符号化及び復号化が行われてもよいし、画面端から画面中央に向かって渦巻きを描くように符号化及び復号化が行われてもよい。
Hereinafter, modifications of each embodiment will be listed and introduced.
In the first to sixth embodiments, an example is described in which a frame is divided into rectangular blocks of 16 × 16 pixel size and the like, and encoding / decoding is performed in order from the upper left block to the lower right side of the screen ( (See FIG. 6A). However, the encoding order and the decoding order are not limited to this example. For example, encoding and decoding may be performed sequentially from the lower right to the upper left, or encoding and decoding may be performed so as to draw a spiral from the center of the screen toward the screen end. Furthermore, encoding and decoding may be performed sequentially from the upper right to the lower left, or encoding and decoding may be performed so as to draw a spiral from the screen end toward the center of the screen.

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

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

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

以上説明したように、各実施形態は、ハードウェア実装及びソフトウェア実装における困難性を緩和しつつ、高効率な直交変換及び逆直交変換を実現する。故に、各実施形態によれば、符号化効率が向上し、ひいては主観画質も向上する。   As described above, each embodiment realizes highly efficient orthogonal transformation and inverse orthogonal transformation while alleviating the difficulty in hardware implementation and software implementation. Therefore, according to each embodiment, the encoding efficiency is improved, and the subjective image quality is also improved.

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

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

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

101・・・減算部
102・・・直交変換部
103・・・量子化部
104・・・逆量子化部
105・・・逆直交変換部
106・・・加算部
107・・・参照画像メモリ
108・・・イントラ予測部
109・・・インター予測部
110・・・予測選択部
111・・・選択スイッチ
112・・・1D変換行列セット部
113・・・係数順制御部
114・・・エントロピー符号化部
115・・・出力バッファ
116・・・符号化制御部
117・・・量子化変換係数列
118・・・入力画像
119・・・予測誤差
120・・・変換係数
121・・・量子化変換係数
122・・・復元変換係数
123・・・復元予測誤差
124・・・局所復号画像
125・・・参照画像
126・・・予測情報
127・・・予測画像
129・・・1D変換行列セット情報
130・・・符号化データ
201,204,801,804,1101,1104,1201,1204・・・選択スイッチ
202,802,1102,1202・・・垂直変換部
206,・・・,209,806,・・・,811,1206,・・・,1211・・・1D直交変換部
203,1103・・・転置部
205,805,1105,1205・・・水平変換部
301,304,901,904,1301,1304・・・選択スイッチ
302,902,1302・・・垂直逆変換部
303・・・転置部
305,905,1305・・・水平逆変換部
306,・・・,309,906,・・・,911,1306,・・・,1311・・・1D逆直交変換部
401・・・入力バッファ
402・・・エントロピー復号化部
403・・・係数順制御部
404・・・逆量子化部
405・・・逆直交変換部
406・・・加算部
407・・・参照画像メモリ
408・・・イントラ予測部
409・・・インター予測部
410・・・選択スイッチ
411・・・1D変換行列セット部
412・・・出力バッファ
413・・・復号化制御部
414・・・符号化データ
415・・・量子化変換係数列
416・・・量子化変換係数
417・・・復元変換係数
418・・・復元予測誤差
419・・・復号画像
420・・・参照画像
421・・・予測モード情報
422・・・1D変換行列セット情報
423・・・予測画像
424・・・予測情報
425・・・出力画像
501・・・選択スイッチ
502,・・・,510・・・2D−1D変換部
511・・・発生頻度カウント部
512・・・係数順更新部
513・・・ヒストグラム
514・・・係数順更新情報
700・・・シンタクス
701・・・ハイレベルシンタクス
702・・・スライスレベルシンタクス
703・・・コーディングツリーレベルシンタクス
704・・・シーケンスパラメータセットシンタクス
705・・・ピクチャパラメータセットシンタクス
706・・・スライスヘッダーシンタクス
707・・・スライスデータシンタクス
708・・・コーディングツリーユニットシンタクス
709・・・プレディクションユニットシンタクス
710・・・トランスフォームユニットシンタクス
1001・・・選択スイッチ
1002,・・・,1010・・・1D−2D変換部
1011・・・発生頻度カウント部
1012・・・係数順更新部
1013・・・ヒストグラム
1014・・・係数順更新情報
DESCRIPTION OF SYMBOLS 101 ... Subtraction part 102 ... Orthogonal transformation part 103 ... Quantization part 104 ... Dequantization part 105 ... Inverse orthogonal transformation part 106 ... Addition part 107 ... Reference image memory 108 ... Intra prediction unit 109 ... Inter prediction unit 110 ... Prediction selection unit 111 ... Selection switch 112 ... 1D transform matrix set unit 113 ... Coefficient order control unit 114 ... Entropy coding Unit 115 ... output buffer 116 ... encoding control unit 117 ... quantized transform coefficient sequence 118 ... input image 119 ... prediction error 120 ... transform coefficient 121 ... quantized transform coefficient 122: Restoration conversion coefficient 123: Restoration prediction error 124 ... Local decoded image 125 ... Reference image 126 ... Prediction information 127 ... Prediction image 129 ... 1D variation Matrix set information 130 ... Encoded data 201, 204, 801, 804, 1101, 1104, 1201, 1204 ... Selection switch 202, 802, 1102, 1202 ... Vertical conversion unit 206, ..., 209 , 806,..., 811, 1206,..., 1211... 1D orthogonal transform unit 203, 1103, transpose unit 205, 805, 1105, 1205, horizontal transform unit 301, 304, 901,. 904, 1301, 1304 ... selection switch 302, 902, 1302 ... vertical reverse conversion unit 303 ... transposition unit 305, 905, 1305 ... horizontal reverse conversion unit 306, ..., 309, 906 ..., 911, 1306, ..., 1311 ... 1D inverse orthogonal transform unit 401 ... input buffer 402 ... entry P-decoding unit 403 ... Coefficient order control unit 404 ... Inverse quantization unit 405 ... Inverse orthogonal transformation unit 406 ... Addition unit 407 ... Reference image memory 408 ... Intra prediction unit 409 .. Inter prediction unit 410 ... selection switch 411 ... 1D transform matrix set unit 412 ... output buffer 413 ... decoding control unit 414 ... encoded data 415 ... quantized transform coefficient sequence 416: quantized transform coefficient 417: restored transform coefficient 418 ... restored prediction error 419 ... decoded image 420 ... reference image 421 ... prediction mode information 422 ... 1D transform matrix set information 423 ... Predicted image 424 ... Predicted information 425 ... Output image 501 ... Selection switch 502, ..., 510 ... 2D-1D converter 511 ... Occurrence frequency counting unit 512... Coefficient order update unit 513... Histogram 514... Coefficient order update information 700 ... Syntax 701 ... High level syntax 702 ... Slice level syntax 703 ... Coding tree Level syntax 704 ... Sequence parameter set syntax 705 ... Picture parameter set syntax 706 ... Slice header syntax 707 ... Slice data syntax 708 ... Coding tree unit syntax 709 ... Prediction unit syntax 710 ··· Transform unit syntax 1001 ··· Selection switch 1002, ···, 1010 ··· 1D-2D converter 1011 ··· Frequency counter 1012 ··· Coefficient order update section 1013 ... histogram 1014 ... coefficient order update information

Claims (15)

他の装置から通信回線を介して出力された符号化データを蓄積する蓄積部と、
蓄積された前記符号化データから復号化対象の変換係数を復号化する復号化部と、
予測画像生成方法に応じて予め定められた関係に基づいて、前記復号化対象の予測モードに対応する垂直変換行列と水平変換行列との組み合わせを2種類のみの行列を用いて設定するセット部と、
設定された前記垂直変換行列と前記水平変換行列とを用いて、前記変換係数に対して垂直変換及び水平変換を行って予測誤差を得る変換部と、
前記予測誤差に基づいて復号画像を生成する加算部と
を具備し、
前記組み合わせは、第1の変換行列同士の組み合わせと、前記第1の変換行列とは異なる第2の変換行列同士の組み合わせとあり、
前記第2の変換行列同士の組み合わせは、Diagonal down right、Vertical rightおよびHorizontal down方向にそれぞれ対応する複数のイントラ予測モードに設定される、
ことを特徴とする画像復号化装置。
An accumulator that accumulates encoded data output from another device via a communication line;
A decoding unit for decoding transform coefficients to be decoded from the stored encoded data;
A set unit configured to set a combination of a vertical transformation matrix and a horizontal transformation matrix corresponding to the prediction mode to be decoded using only two types of matrices based on a predetermined relationship according to a predicted image generation method; ,
Using the set vertical transformation matrix and the horizontal transformation matrix, an inverse transformation unit that obtains a prediction error by performing vertical inverse transformation and horizontal inverse transformation on the transformation coefficient;
An adder that generates a decoded image based on the prediction error, and
The combination is a combination between a first transformation matrix, there is a combination between different second transformation matrix from the first transformation matrix,
The combination of the second transformation matrices is set to a plurality of intra prediction modes respectively corresponding to Diagonal down right, Vertical right and Horizontal down directions.
An image decoding apparatus characterized by that.
他の装置から通信回線を介して出力された符号化データを蓄積部に蓄積させることと、
蓄積された前記符号化データから復号化対象の変換係数を復号化することと、
予測画像生成方法に応じて予め定められた関係に基づいて、前記復号化対象の予測モードに対応する垂直変換行列と水平変換行列との組み合わせを2種類のみの行列を用いて設定することと、
設定された前記垂直変換行列と前記水平変換行列とを用いて、前記変換係数に対して垂直変換及び水平変換を行って予測誤差を得ることと、
前記予測誤差に基づいて復号画像を生成することと
を具備し、
前記組み合わせは、第1の変換行列同士の組み合わせと、前記第1の変換行列とは異なる第2の変換行列同士の組み合わせとあり、
前記第2の変換行列同士の組み合わせは、Diagonal down right、Vertical rightおよびHorizontal down方向にそれぞれ対応する複数のイントラ予測モードに設定される、
ことを特徴とする画像復号化方法。
Storing the encoded data output from the other device via the communication line in the storage unit;
Decoding transform coefficients to be decoded from the stored encoded data;
Setting a combination of a vertical transformation matrix and a horizontal transformation matrix corresponding to the prediction mode to be decoded using only two types of matrices based on a predetermined relationship according to a predicted image generation method;
Using the set vertical transformation matrix and the horizontal transformation matrix to obtain a prediction error by performing vertical inverse transformation and horizontal inverse transformation on the transformation coefficient;
Generating a decoded image based on the prediction error, and
The combination is a combination between a first transformation matrix, there is a combination between different second transformation matrix from the first transformation matrix,
The combination of the second transformation matrices is set to a plurality of intra prediction modes respectively corresponding to Diagonal down right, Vertical right and Horizontal down directions.
An image decoding method characterized by the above.
コンピュータを、
他の装置から通信回線を介して出力された符号化データを蓄積部に蓄積させる蓄積手段、
蓄積された前記符号化データから復号化対象の変換係数を復号化する手段、
予測画像生成方法に応じて予め定められた関係に基づいて、前記復号化対象の予測モードに対応する垂直変換行列と水平変換行列との組み合わせを2種類のみの行列を用いて設定する手段、
設定された前記垂直変換行列と前記水平変換行列とを用いて、前記変換係数に対して垂直変換及び水平変換を行って予測誤差を得る手段、
前記予測誤差に基づいて復号画像を生成する手段
として機能させ、
前記組み合わせは、第1の変換行列同士の組み合わせと、前記第1の変換行列とは異なる第2の変換行列同士の組み合わせとあり、
前記第2の変換行列同士の組み合わせは、Diagonal down right、Vertical rightおよびHorizontal down方向にそれぞれ対応する複数のイントラ予測モードに設定される、
ことを特徴とする画像復号化プログラム。
Computer
Storage means for storing encoded data output from other devices via a communication line in a storage unit;
Means for decoding transform coefficients to be decoded from the stored encoded data;
Means for setting a combination of a vertical transformation matrix and a horizontal transformation matrix corresponding to the prediction mode to be decoded using only two types of matrices based on a predetermined relationship according to a predicted image generation method;
Means for obtaining a prediction error by performing vertical inverse transformation and horizontal inverse transformation on the transformation coefficient using the set vertical transformation matrix and horizontal transformation matrix;
Function as a means for generating a decoded image based on the prediction error,
The combination is a combination between a first transformation matrix, there is a combination between different second transformation matrix from the first transformation matrix,
The combination of the second transformation matrices is set to a plurality of intra prediction modes respectively corresponding to Diagonal down right, Vertical right and Horizontal down directions.
An image decoding program characterized by the above.
他の装置から通信回線を介して出力された符号化データを蓄積する蓄積部と、
蓄積された前記符号化データから、所定の予測方向に応じた予測処理または予測方向を持たない予測処理により符号化された復号化対象ブロックの変換係数を復号化する復号化部と、
前記復号化対象ブロックの予測処理により予測画像を生成する予測部と、
前記変換係数に対して、2種類のみの行列を用いて、第1の変換行列を垂直変換及び水平変換に用いる第1の変換処理と、前記第1の変換行列とは異なる第2の変換行列を垂直変換及び水平変換に用いる第2の変換処理とを含む複数の変換処理のうち前記予測画像の生成方法に対応したいずれかの変換処理を適用して予測誤差を得る変換部と、
前記予測画像と前記予測誤差とに基づいて復号画像を生成する加算部と
を具備し、
前記第2の変換処理は、Diagonal down right、Vertical rightおよびHorizontal down方向に応じた予測処理によりそれぞれ符号化された複数の復号化対象ブロックの変換係数に対して適用される、
画像復号化装置。
An accumulator that accumulates encoded data output from another device via a communication line;
A decoding unit that decodes, from the accumulated encoded data, a transform coefficient of a decoding target block encoded by a prediction process according to a predetermined prediction direction or a prediction process without a prediction direction;
A prediction unit that generates a prediction image by prediction processing of the decoding target block;
A first conversion process that uses only two types of matrixes for the conversion coefficient and uses the first conversion matrix for vertical inverse conversion and horizontal inverse conversion, and a second conversion process different from the first conversion matrix. Inverse transformation that obtains a prediction error by applying any one of the plurality of transformation processes including a second transformation process that uses the transformation matrix for vertical inverse transformation and horizontal inverse transformation according to the prediction image generation method. And
An adder that generates a decoded image based on the prediction image and the prediction error;
The second transform process is applied to transform coefficients of a plurality of decoding target blocks encoded by prediction processes according to Diagonal down right, Vertical right, and Horizontal down directions, respectively.
Image decoding device.
他の装置から通信回線を介して出力された符号化データを蓄積部に蓄積させることと、
蓄積された前記符号化データから、所定の予測方向に応じた予測処理または予測方向を持たない予測処理により符号化された復号化対象ブロックの変換係数を復号化することと、
前記復号化対象ブロックの予測処理により予測画像を生成することと、
前記変換係数に対して、2種類のみの行列を用いて、第1の変換行列を垂直変換及び水平変換に用いる第1の変換処理と、前記第1の変換行列とは異なる第2の変換行列を垂直変換及び水平変換に用いる第2の変換処理とを含む複数の変換処理のうち前記予測画像の生成方法に対応したいずれかの変換処理を適用して予測誤差を得ることと、
前記予測画像と前記予測誤差とに基づいて復号画像を生成することと
を具備し、
前記第2の変換処理は、Diagonal down right、Vertical rightおよびHorizontal down方向に応じた予測処理によりそれぞれ符号化された複数の復号化対象ブロックの変換係数に対して適用される、
画像復号化方法。
Storing the encoded data output from the other device via the communication line in the storage unit;
Decoding the transform coefficient of the decoding target block encoded by the prediction process according to a predetermined prediction direction or the prediction process having no prediction direction from the accumulated encoded data;
Generating a prediction image by prediction processing of the decoding target block;
A first conversion process that uses only two types of matrixes for the conversion coefficient and uses the first conversion matrix for vertical inverse conversion and horizontal inverse conversion, and a second conversion process different from the first conversion matrix. Obtaining a prediction error by applying any one of the plurality of conversion processes including the second conversion process using the conversion matrix for the vertical reverse conversion and the horizontal reverse conversion, corresponding to the prediction image generation method. ,
Generating a decoded image based on the prediction image and the prediction error, and
The second transform process is applied to transform coefficients of a plurality of decoding target blocks encoded by prediction processes according to Diagonal down right, Vertical right, and Horizontal down directions, respectively.
Image decoding method.
コンピュータを
他の装置から通信回線を介して出力された符号化データを蓄積部に蓄積させる蓄積手段、
蓄積された前記符号化データから、所定の予測方向に応じた予測処理または予測方向を持たない予測処理により符号化された復号化対象ブロックの変換係数を復号化する手段、
前記復号化対象ブロックの予測処理により予測画像を生成する手段、
前記変換係数に対して、2種類のみの行列を用いて、第1の変換行列を垂直変換及び水平変換に用いる第1の変換処理と、前記第1の変換行列とは異なる第2の変換行列を垂直変換及び水平変換に用いる第2の変換処理とを含む複数の変換処理のうち前記予測画像の生成方法に対応したいずれかの変換処理を適用して予測誤差を得る手段、
前記予測画像と前記予測誤差とに基づいて復号画像を生成する手段
として機能させ、
前記第2の変換処理は、Diagonal down right、Vertical rightおよびHorizontal down方向に応じた予測処理によりそれぞれ符号化された複数の復号化対象ブロックの変換係数に対して適用される、
画像復号化プログラム。
Storage means for storing encoded data output from another device via a communication line in a storage unit,
Means for decoding transform coefficients of a decoding target block encoded by a prediction process according to a predetermined prediction direction or a prediction process having no prediction direction from the stored encoded data;
Means for generating a prediction image by prediction processing of the decoding target block;
A first conversion process that uses only two types of matrixes for the conversion coefficient and uses the first conversion matrix for vertical inverse conversion and horizontal inverse conversion, and a second conversion process different from the first conversion matrix. Means for obtaining a prediction error by applying any one of the conversion processes corresponding to the prediction image generation method among a plurality of conversion processes including a second conversion process using a conversion matrix for a vertical inverse transform and a horizontal inverse transform;
Function as means for generating a decoded image based on the prediction image and the prediction error;
The second transform process is applied to transform coefficients of a plurality of decoding target blocks encoded by prediction processes according to Diagonal down right, Vertical right, and Horizontal down directions, respectively.
Image decoding program.
逆ジグザグスキャンにより前記復号化対象の1次元の変換係数から2次元の変換係数を得て、前記2次元の変換係数に対する変換により得られる予測誤差に基づいて復号画像を生成する手段をさらに具備する、請求項1又は請求項4に記載の画像復号化装置。   Means for obtaining a two-dimensional transform coefficient from the one-dimensional transform coefficient to be decoded by inverse zigzag scanning and generating a decoded image based on a prediction error obtained by transforming the two-dimensional transform coefficient; The image decoding device according to claim 1 or 4. 逆ジグザグスキャンにより前記復号化対象の1次元の変換係数から2次元の変換係数を得て、前記2次元の変換係数に対する変換により得られる予測誤差に基づいて復号画像を生成することをさらに具備する、請求項2又は請求項5に記載の画像復号化方法。   The method further comprises obtaining a two-dimensional transform coefficient from the one-dimensional transform coefficient to be decoded by inverse zigzag scanning, and generating a decoded image based on a prediction error obtained by transforming the two-dimensional transform coefficient. The image decoding method according to claim 2 or 5. コンピュータを、
逆ジグザグスキャンにより前記復号化対象の1次元の変換係数から2次元の変換係数を得て、前記2次元の変換係数に対する変換により得られる予測誤差に基づいて復号画像を生成する手段としてさらに機能させる、
請求項3又は請求項6に記載の画像復号化プログラム。
Computer
It further functions as means for obtaining a two-dimensional transform coefficient from the one-dimensional transform coefficient to be decoded by inverse zigzag scanning, and generating a decoded image based on a prediction error obtained by transforming the two-dimensional transform coefficient. ,
The image decoding program according to claim 3 or 6.
前記変換部はハードウェア実装である、請求項1,請求項4および請求項7の何れか一項に記載の画像復号化装置。 The image decoding device according to claim 1, wherein the inverse transform unit is implemented by hardware. 前記変換部はソフトウェア実装である、請求項1,請求項4および請求項7の何れか一項に記載の画像復号化装置。 The image decoding device according to claim 1, wherein the inverse transform unit is software-implemented. コンピュータに所定動作を実行させるための第1のプログラムおよび第2のプログラムであって、
前記第1のプログラムは、請求項3、請求項6及び請求項9の何れか一項に記載の画像復号化プログラムであり、
前記第2のプログラムは、コンピュータに、入力された映像信号に符号化処理を施して蓄積媒体に保存させるための画像符号化プログラムである、
第1のプログラムおよび第2のプログラム。
A first program and a second program for causing a computer to execute a predetermined operation,
The first program is an image decoding program according to any one of claims 3, 6, and 9.
The second program is an image encoding program for causing a computer to perform an encoding process on an input video signal and store it in a storage medium.
A first program and a second program.
前記画像符号化プログラムの符号化処理は、入力した映像信号のブロックに対する予測処理により得られる予測誤差信号に直交変換処理を施して変換係数を得て、ジグザグスキャンを用いて変換係数を並び換える処理を含む、請求項12に記載の第1のプログラムおよび第2のプログラム。   The encoding process of the image encoding program is a process of performing orthogonal transform processing on a prediction error signal obtained by prediction processing on a block of an input video signal to obtain transform coefficients, and rearranging the transform coefficients using a zigzag scan The first program and the second program according to claim 12, comprising: 格納部に格納されたプログラムをコンピュータにネットワーク経由でダウンロードさせるネットワーク接続手段を具備し、
前記プログラムは、請求項3、請求項6および請求項9のいずれか1項に記載の画像復号化プログラム、または、請求項12および請求項13のいずれか1項に記載の第1のプログラムおよび第2のプログラム、を含む、
サーバシステム。
Network connection means for causing a computer to download the program stored in the storage unit via a network;
The program is an image decoding program according to any one of claims 3, 6, and 9, or a first program according to any one of claims 12 and 13. Including a second program,
Server system.
ネットワークと接続する接続手段を備えたサーバシステムにおけるダウンロード制御方法であって、
請求項3、請求項6および請求項9のいずれか1項に記載の画像復号化プログラム、または、請求項12および請求項13のいずれか1項に記載の第1のプログラムおよび第2のプログラム、を含むプログラムを、前記ネットワーク経由でコンピュータにダウンロードさせる、ダウンロード制御方法。
A download control method in a server system having a connection means for connecting to a network,
The image decoding program according to any one of claims 3, 6, and 9, or the first program and the second program according to any one of claims 12 and 13. A download control method for causing a computer to download a program including
JP2014189256A 2014-09-17 2014-09-17 Image decoding apparatus, method and program, first program and second program, server system, and download control method Active JP5925855B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014189256A JP5925855B2 (en) 2014-09-17 2014-09-17 Image decoding apparatus, method and program, first program and second program, server system, and download control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014189256A JP5925855B2 (en) 2014-09-17 2014-09-17 Image decoding apparatus, method and program, first program and second program, server system, and download control method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014085602A Division JP5622954B2 (en) 2014-04-17 2014-04-17 Image decoding apparatus, method and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2015075390A Division JP6042478B2 (en) 2015-04-01 2015-04-01 Image decoding device

Publications (2)

Publication Number Publication Date
JP2015029318A JP2015029318A (en) 2015-02-12
JP5925855B2 true JP5925855B2 (en) 2016-05-25

Family

ID=52492683

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014189256A Active JP5925855B2 (en) 2014-09-17 2014-09-17 Image decoding apparatus, method and program, first program and second program, server system, and download control method

Country Status (1)

Country Link
JP (1) JP5925855B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2900998B2 (en) * 1997-07-31 1999-06-02 日本ビクター株式会社 Block interpolation predictive encoding apparatus, decoding apparatus, encoding method and decoding method
US8488668B2 (en) * 2007-06-15 2013-07-16 Qualcomm Incorporated Adaptive coefficient scanning for video coding
JP2009272727A (en) * 2008-04-30 2009-11-19 Toshiba Corp Transformation method based on directivity of prediction error, image-encoding method and image-decoding method
JP5622954B2 (en) * 2014-04-17 2014-11-12 株式会社東芝 Image decoding apparatus, method and program

Also Published As

Publication number Publication date
JP2015029318A (en) 2015-02-12

Similar Documents

Publication Publication Date Title
JP5259879B2 (en) Image encoding method and image decoding method
EP2744212A1 (en) Adaptive transformation of residual blocks depending on the intra prediction mode
WO2012035640A1 (en) Moving picture encoding method and moving picture decoding method
JP5908619B2 (en) Moving picture coding apparatus and moving picture decoding apparatus
JP5622954B2 (en) Image decoding apparatus, method and program
JP5537695B2 (en) Image decoding apparatus, method and program
JP5535361B2 (en) Image coding apparatus, method and program
AU2015201843B2 (en) Image encoding method and image decoding method
JP6042478B2 (en) Image decoding device
JP5526277B2 (en) Moving picture decoding apparatus, method and program
JP6310034B2 (en) Decoding device, decoding method, and decoding program
JP5925855B2 (en) Image decoding apparatus, method and program, first program and second program, server system, and download control method
JP2013070419A (en) Video encoding device and video decoding device
JP5432412B1 (en) Moving picture coding apparatus and moving picture decoding apparatus
RU2631992C2 (en) Method of encoding image and method of decoding image
JP5597782B2 (en) Moving picture coding apparatus and moving picture decoding apparatus
JP5525650B2 (en) Moving picture decoding apparatus, method and program
JP5323209B2 (en) Moving picture coding apparatus and moving picture decoding apparatus
JP2014197890A (en) Moving image encoder and moving image decoder

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141217

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150113

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160205

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160420

R151 Written notification of patent or utility model registration

Ref document number: 5925855

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151