JP6679778B2 - Image coding device, image coding method and program, image decoding device, image decoding method and program - Google Patents
Image coding device, image coding method and program, image decoding device, image decoding method and program Download PDFInfo
- Publication number
- JP6679778B2 JP6679778B2 JP2019030981A JP2019030981A JP6679778B2 JP 6679778 B2 JP6679778 B2 JP 6679778B2 JP 2019030981 A JP2019030981 A JP 2019030981A JP 2019030981 A JP2019030981 A JP 2019030981A JP 6679778 B2 JP6679778 B2 JP 6679778B2
- Authority
- JP
- Japan
- Prior art keywords
- quantization matrix
- image
- row
- column
- matrix
- 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
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明は画像符号化装置、画像符号化方法及びプログラム、画像復号装置、画像復号方法及びプログラムに関し、特に画像中の量子化マトリクスの符号化方法・復号方法に関する。 The present invention relates to an image encoding device, an image encoding method and program, an image decoding device, an image decoding method and program, and more particularly to an encoding method / decoding method for a quantization matrix in an image.
動画像の圧縮記録方法として、H.264/MPEG−4 AVC(以下H.264)が知られている。(非特許文献1)
H.264においてはscaling_list情報を符号化することにより、量子化マトリクスの各要素を任意の値に変更することができる。非特許文献1の7.3.2.1.1.1節の記載によれば、直前の要素に差分値であるdelta_scaleを加算することで量子化マトリクスの各要素は任意の値をとることができる。
As a compression recording method of a moving image, H.264 is used. H.264 / MPEG-4 AVC (hereinafter H.264) is known. (Non-patent document 1)
H. In H.264, each element of the quantization matrix can be changed to an arbitrary value by encoding the scaling_list information. According to the description in Section 7.3.2.1.1.1 of
H.264においては、二次元の量子化マトリクスの左上の低周波成分にあたる要素から右下の高周波成分にあたる要素の方向に量子化マトリクス内の各要素を走査する。例えば、図6(a)に示される二次元の量子化マトリクスを符号化する場合、図13(a)に示されるジグザグスキャンと呼ばれる走査方法を用いて図6(b)に示される一次元の行列に配置する。そして、行列内の符号化する要素と直前の要素との差分値を計算し、図6(d)に示される差分値の行列を得る。続いて、前述の差分値であるdelta_scaleとして、図5(a)に示されるsigned Exp−Golomb符号と呼ばれる方式を用いて符号化する。例えば、直前の要素と符号化する要素との差分が0であれば二値符号1を符号化し、差分が−2であれば二値符号00101を符号化する。
H. In H.264, each element in the quantization matrix is scanned in the direction from the element corresponding to the low frequency component in the upper left of the two-dimensional quantization matrix to the element corresponding to the high frequency component in the lower right. For example, when the two-dimensional quantization matrix shown in FIG. 6A is encoded, the one-dimensional quantization matrix shown in FIG. 6B is obtained by using the scanning method called zigzag scanning shown in FIG. Place in a matrix. Then, the difference value between the element to be coded in the matrix and the immediately preceding element is calculated, and the matrix of the difference values shown in FIG. 6D is obtained. Subsequently, the delta_scale which is the above-mentioned difference value is encoded using a method called a signed Exp-Golomb code shown in FIG. For example, if the difference between the immediately preceding element and the element to be encoded is 0, the
しかしながら、H.264で用いられているジグザグスキャンでは対角線方向に量子化マトリクスの各要素を走査するため、量子化マトリクスの特性によっては、量子化マトリクスの符号量が多くなってしまうという課題が生じていた。 However, H. In the zigzag scanning used in H.264, since each element of the quantization matrix is scanned in the diagonal direction, there is a problem that the code amount of the quantization matrix increases depending on the characteristics of the quantization matrix.
したがって、本発明は上述した課題を解決するためになされたものであり、高効率の量子化マトリクス符号化・復号を実現することを目的とする。 Therefore, the present invention has been made to solve the above-mentioned problems, and an object thereof is to realize highly efficient quantization matrix encoding / decoding.
上述の問題点を解決するため、本発明の画像符号化装置は以下の構成を有する。すなわち、画像データを符号化する符号化装置であって、符号化対象の画像データを量子化する際に用いる二次元配列で表すことが可能なn行n列(nは4以上の整数)の量子化マトリクスにおける各要素において所定の要素間の差分値を取得する取得手段、を有し、前記取得手段は、前記量子化マトリクスにおける(p+1)行1列目(pは2以上かつn−1以下の整数)に対応する要素と、前記量子化マトリクスにおける1行p列目に対応する要素との差分値を取得し、前記量子化マトリクスにおけるn行q列目(qは2以上かつn−1以下の整数)に対応する要素と、前記量子化マトリクスにおける(q−1)行n列目に対応する要素との差分値を取得し、前記量子化マトリクスにおけるn行n列目に対応する要素と、前記量子化マトリクスにおける(n−1)行n列目に対応する要素との差分値を取得する。 In order to solve the above problems, the image coding apparatus of the present invention has the following configuration. That is, an encoding device that encodes image data, and has n rows and n columns (n is an integer of 4 or more) that can be represented by a two-dimensional array used when quantizing image data to be encoded. An acquisition unit that acquires a difference value between predetermined elements in each element in the quantization matrix, the acquisition unit being the (p + 1) th row and the first column (p is 2 or more and n-1) in the quantization matrix. The difference value between the element corresponding to the following integer) and the element corresponding to the 1st row and the pth column in the quantization matrix is acquired, and the nth row and the qth column (q is 2 or more and n− The difference value between the element corresponding to the (q-1) row and the n-th column in the quantization matrix is acquired and corresponds to the n-th row and the n-th column in the quantization matrix. Elements and the quantization mat Obtaining a difference value between the element corresponding to the (n-1) th row and the n-th column in the box.
また、本発明の画像復号装置は以下の構成を有する。すなわち、ビットストリームから画像データを復号する画像復号装置であって、量子化係数から変換係数を導出する際に用いられる量子化マトリクスであって、n行n列(nは4以上の整数)の量子化マトリクスに含まれる各要素における所定の要素間の差分値を前記ビットストリームから復号する復号手段と、前記復号手段によって復号された複数の差分値における第1番目の差分値と所定の初期値とを加算して第1番目の要素を導出し、前記複数の差分値における第r番目(rは2以上の整数)の差分値と第r−1番目の要素とを加算して第r番目の要素を導出することにより、複数の要素を導出する第1の導出手段と、前記第1の導出手段によって導出された前記複数の要素それぞれを、二次元配列で表わすことが可能な前記量子化マトリクスにおける各要素に対応付ける対応付け手段とを有し、前記対応付け手段は、前記複数の要素の内の第1の要素を前記量子化マトリクスにおける1行p列目(pは2以上かつn−1以下の整数)の要素に対応させる場合、前記第1の要素の次の第2の要素を前記量子化マトリクスにおける(p+1)行1列目の要素に対応させ、前記複数の要素の内の第3の要素を前記量子化マトリクスにおける(q−1)行n列目(qは2以上かつn−1以下の整数)の要素に対応させる場合、前記第3の要素の次の第4の要素を前記量子化マトリクスにおけるn行q列目の要素に対応させ、前記複数の要素の内の最後から2番目の要素を前記量子化マトリクスにおける(n−1)行n列目の要素に対応させ、前記複数の要素の内の最後の要素を前記量子化マトリクスにおけるn行n列目の要素に対応させる。 Further, the image decoding device of the present invention has the following configuration. That is, an image decoding device for decoding image data from a bit stream, which is a quantization matrix used when deriving transform coefficients from quantized coefficients, having n rows and n columns (n is an integer of 4 or more) Decoding means for decoding a difference value between predetermined elements in each element included in the quantization matrix from the bit stream, a first difference value among a plurality of difference values decoded by the decoding means, and a predetermined initial value Is added to derive the first element, and the r-th (r is an integer of 2 or more) difference value in the plurality of difference values and the r-1th element are added to obtain the r-th element. By deriving a plurality of elements by deriving a plurality of elements, and the quantization capable of expressing each of the plurality of elements derived by the first deriving means in a two-dimensional array Ma Associating means for associating each element in the lix with the associating means, wherein the associating means associates the first element of the plurality of elements with the first row and the p-th column (p is 2 or more and n− An integer of 1 or less), the second element next to the first element is made to correspond to the element at the (p + 1) th row and the first column in the quantization matrix, and When the third element is made to correspond to the element of the (q-1) th row and the nth column (q is an integer of 2 or more and n-1 or less) in the quantization matrix, a fourth element next to the third element is assigned. The element corresponds to the element in the n-th row and the q-th column in the quantization matrix, and the penultimate element of the plurality of elements corresponds to the element in the (n-1) -th row and the n-th column in the quantization matrix. The last element of the plurality of elements To correspond to the n-th row and n-th column of elements in the Coca matrix.
本発明により、量子化マトリクス符号化のための符号量を削減し、高効率の符号化・復号が可能になる。 According to the present invention, it is possible to reduce the amount of code for quantization matrix coding and perform highly efficient coding / decoding.
以下、添付の図面を参照して、本願発明をその好適な実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。 Hereinafter, the present invention will be described in detail based on its preferred embodiments with reference to the accompanying drawings. The configurations shown in the following embodiments are merely examples, and the present invention is not limited to the illustrated configurations.
また、本発明では、本発明では、図13(b)に示される二次元のマトリクスの走査方法を水平スキャンと呼称し、図13(d)に示される二次元のマトリクスの走査方法を垂直スキャンと呼称する。 Further, in the present invention, in the present invention, the scanning method of the two-dimensional matrix shown in FIG. 13B is called horizontal scanning, and the scanning method of the two-dimensional matrix shown in FIG. 13D is vertical scan. I call it.
<実施形態1>
以下、本発明の実施形態を、図面を用いて説明する。図1は本実施形態の画像符号化装置を示すブロック図である。
<
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an image coding apparatus according to this embodiment.
図1において、101は入力画像を複数のブロックに分割するブロック分割部である。
In FIG. 1,
102はブロック分割部101で分割された各ブロックを、ブロック単位で予測を行い、予測方法を決定し、それに従って差分値算出を行い、予測誤差を算出する予測部である。静止画または動画の場合のイントラフレームではイントラ予測を行い、動画の場合は動き補償予測も行うものとする。イントラ予測は一般的には、周囲の画素データから予測値を算出するために、複数の参照方法の中から最適なものを予測方法として選択することで実現する。
103は各ブロックの予測誤差に対して直交変換を行う変換部であり、入力されたブロックサイズまたはそれを細分化したブロックサイズを単位に直交変換を行い、直交変換係数を算出する。以下では直交変換を行うブロックを変換ブロックと呼称する。直交変換に関しては特に限定しないが、離散コサイン変換やアダマール変換等を用いてもよい。また、本実施形態では説明のため、8×8画素のブロック単位の予測誤差を縦横2分割し、4×4画素の変換ブロック単位で直交変換を行うものとするが、変換ブロックの大きさ、形状はこれに限定されない。ブロックと同一の大きさの変換ブロックを用いて直交変換を行っても良いし、ブロックを縦横2分割よりもさらに細かい単位で分割した変換ブロックを用いて直交変換を行っても良い。
106は量子化マトリクスを生成し、格納する量子化マトリクス保持部である。格納される量子化マトリクスの生成方法については特に限定しないが、ユーザが量子化マトリクスを入力しても良いし、入力画像の特性から算出しても、初期値としてあらかじめ指定されたものを使用してももちろん良い。本実施形態では、図6(a)に示されるような4×4画素の変換ブロックに対応した二次元の量子化マトリクスが生成され、格納されるものとする。
A quantization
104は量子化マトリクス保持部106に格納された量子化マトリクスによって、前記直交変換係数を量子化する量子化部である。この量子化によって量子化係数を得ることができる。
A
105はこのようにして得られた量子化係数を、符号化して量子化係数符号データを生成する係数符号化部である。符号化の方法は特に限定しないが、ハフマン符号や算術符号などを用いることができる。
109は量子化マトリクス保持部106に格納された二次元の量子化マトリクスを走査して各要素の差分を計算し、一次元の行列に配置する量子化マトリクス走査部である。本特許では、この一次元の行列に配置された差分を差分行列と呼称する。
A quantization
107は量子化マトリクス走査部109によって一次元の行列となった差分行列を符号化して、量子化マトリクス符号データを生成する量子化マトリクス符号化部である。108はヘッダ情報や予測、変換に関する符号を生成するとともに、係数符号化部105で生成された量子化係数符号データおよび量子化マトリクス符号化部107で生成された量子化マトリクス符号データを統合する統合符号化部である。予測、変換に関する符号とは、例えば選択した予測方法や変換ブロックの分割の様子等の符号であるとする。
A quantization
上記画像符号化装置における画像の符号化動作を以下に説明する。本実施形態では動画像データをフレーム単位に入力する構成となっているが、1フレーム分の静止画像データを入力する構成としても構わない。また、本実施形態では、説明を容易にするため、イントラ予測符号化の処理のみを説明するが、これに限定されずインター予測符号化の処理においても適用可能である。本実施形態では説明のため、ブロック分割部101においては8×8画素のブロックに分割するものとして説明するが、これに限定されない。
An image encoding operation in the image encoding device will be described below. In the present embodiment, moving image data is input in frame units, but still image data for one frame may be input. Further, in the present embodiment, for the sake of simplicity of description, only the intra prediction coding process will be described, but the present invention is not limited to this and is also applicable to the inter prediction coding process. In the present embodiment, for the sake of explanation, the
次に、画像の符号化に先立ち、量子化マトリクスの要素の符号化を行う。最初に、量子化マトリクス保持部106は量子化マトリクスを生成する。符号化を行うブロックサイズに応じて、量子化マトリクスが決定される。量子化マトリクスの要素の決定方法はとくに限定しない。例えば、所定の初期値を用いても良いし、個別に設定しても良い。また、画像の特性に応じて設定生成されても構わない。
Next, the elements of the quantization matrix are encoded prior to encoding the image. First, the quantization
量子化マトリクス保持部106には、このようにして生成された量子化マトリクスが保持されている。図6(a)は4×4画素の変換ブロックに対応する量子化マトリクスの一例である。太枠の600は、量子化マトリクスを表している。説明を簡易にするため、4×4画素の変換ブロックに対応した16画素分の構成とし、太枠内の各正方形は要素を表しているものとする。本実施形態では、図6(a)に示された量子化マトリクスが二次元形状で保持されているものとするが、量子化マトリクス内の要素はもちろんこれに限定されない。例えば、本実施形態に加えて8×8画素の変換ブロックサイズも用いる場合には、8×8画素変換ブロックに対応する他の量子化マトリクスを保持することになる。
The quantization
量子化マトリクス走査部109は二次元形状で格納されている量子化マトリクスを量子化マトリクス保持部106から順に読み出し、各要素を走査して差分を計算し、一次元の行列に配置する。本実施形態では、図13(d)に示された垂直スキャンを用いるものとし、要素ごとに走査順に直前の要素との差分を計算するものするが、走査方法および差分の計算方法はこれに限定されない。図13(b)に示された水平スキャンを用いて、要素ごとに走査順に直前の要素との差分を計算しても良い。また図13(b)の走査方法を用いつつ、図13(c)に示されたように左端の要素の差分だけは上の要素との差分を計算し、それ以外は図13(b)同様直前の要素との差分を計算しても良い。また、図13(d)の走査方法を用いつつ、図13(e)に示されたように上端の要素の差分だけは左の要素との差分を計算し、それ以外は図13(d)同様直前の要素との差分を計算しても良い。本実施形態では、図6(a)に示される二次元形状の量子化マトリクスを図13(d)に示される垂直スキャンを用いて走査し、それぞれの要素と直前の要素との差分を計算して図6(e)に示される差分行列を生成するものとする。また、行列の最初の要素に対応する差分値は所定の初期値との差分を計算するものとし、本実施形態では初期値を8とするが、もちろんこれに限定されず、任意の値をとったり最初の要素の値そのものを用いたりしても良い。
The quantization
量子化マトリクス符号化部107は前記差分行列を量子化マトリクス走査部109から順に読み出し、符号化して量子化マトリクス符号データを生成する。本実施形態では、図5(a)に示される符号化テーブルを用いて符号化するものとするが、符号化テーブルはこれに限定されず、例えば図5(b)に示されるような符号化テーブルを用いても良い。
The quantization
図7は、図6(a)に示された量子化マトリクスを図13(a)、図13(d)の各走査方法を用いて差分行列を計算し、図5(a)の符号化テーブルで符号化した際の例を示している。図7の要素の行は図6(a)の量子化マトリクスの各要素を走査したものを示しており、差分値の行は所定の初期値8および直前の要素との差分値を示している。ジグザグスキャンの行は図13(a)で示された従来手法のジグザグスキャンを用いた場合の符号を示しており、合計68ビットが必要となる。一方、垂直スキャンの行は図13(d)で示された垂直スキャンを用いた場合の符号を示しており、合計60ビットが必要であり、本実施形態ではより少ない符号量で同一の量子化マトリクスを符号化できる。このようにして生成された量子化マトリクスの符号データは統合符号化部108に入力される。統合符号化部108では画像データの符号化に必要なヘッダ情報を符号化し、量子化マトリクスの符号データを統合する。
FIG. 7 shows the encoding matrix of FIG. 5A obtained by calculating the difference matrix of the quantization matrix shown in FIG. 6A using each scanning method of FIGS. 13A and 13D. An example when encoded with is shown. The row of elements in FIG. 7 shows a scan of each element of the quantization matrix of FIG. 6A, and the row of difference values shows the predetermined
続いて、画像データの符号化が行われる。1フレーム分の画像データはブロック分割部101に入力され、8×8画素のブロック単位に分割される。分割された画像データは予測部102に入力される。
Subsequently, the image data is encoded. The image data for one frame is input to the
予測部102ではブロック単位の予測が行われ、予測誤差が生成される。変換部103では、予測部102で生成された予測誤差を変換ブロックサイズに分割して直交変換を行い、直交変換係数を生成する。そして、直交変換係数を量子化部104に入力する。本実施形態では、8×8画素のブロック単位の予測誤差を4×4画素の変換ブロック単位に分割して直交変換を行うものとする。
The
図1に戻り、量子化部104では、変換部103から出力された直交変換係数を量子化マトリクス保持部106に格納されている量子化マトリクスを用いて量子化して量子化係数を生成する。生成された量子化係数は係数符号化部105に入力される。
Returning to FIG. 1, the
係数符号化部105では、量子化部104で生成された量子化係数を符号化し、量子化係数符号データを生成して統合符号化部108に出力する。統合符号化部108はブロック単位で予測、変換に関する符号を生成し、前記ヘッダの符号化データとともに、ブロック単位の符号、係数符号化部105で生成された量子化係数符号データを統合し、ビットストリームを生成し出力する。
The
図8(a)は実施形態1で出力されるビットストリームの一例である。シーケンスヘッダに量子化マトリクスの符号データが含まれ、各要素の符号化結果で構成されている。但し、符号化の位置はこれに限定されない。ピクチャヘッダ部やその他のヘッダ部に符号化される構成をとってももちろん構わない。また、1つのシーケンスの中で量子化マトリクスの変更を行う場合、量子化マトリクスを新たに符号化することで更新することも可能である。この際、全ての量子化マトリクスを書き換えても良いし、書き換える量子化マトリクスの走査方法と変換ブロックサイズを指定することでその一部を変更するようにすることも可能である。 FIG. 8A is an example of the bit stream output in the first embodiment. The sequence header includes the coded data of the quantization matrix, and is composed of the coding result of each element. However, the coding position is not limited to this. Of course, the picture header section and other header sections may be encoded. When the quantization matrix is changed in one sequence, it is possible to update it by newly encoding the quantization matrix. At this time, all the quantization matrices may be rewritten, or a part of them may be changed by designating the scanning method of the rewritten quantization matrix and the conversion block size.
図9は実施形態1に係る画像符号化装置における画像符号化処理を示すフローチャートである。まず、ステップS901にて、量子化マトリクス保持部106は量子化マトリクスを生成する。
FIG. 9 is a flowchart showing an image coding process in the image coding apparatus according to the first embodiment. First, in step S901, the quantization
ステップS902にて、量子化マトリクス走査部109はステップS901で生成された量子化マトリクスを走査して各要素の差分を算出し、差分行列を生成する。本実施形態では、図6(a)に示される量子化マトリクスを図13(d)に示される走査方法で走査し、図6(e)に示される差分行列を生成するものとするが、量子化マトリクスや走査方法はこれらに限定されない。
In step S902, the quantization
ステップS903にて、量子化マトリクス符号化部107はステップS902で生成された差分行列を符号化する。本実施形態では、量子化マトリクス符号化部107は図6(e)に示される差分行列を、図5(a)に示される符号化テーブルを用いて符号化されるものとするが、使用される符号化テーブルはこれに限定されない。
In step S903, the quantization
ステップS904にて、統合符号化部108はビットストリームのヘッダ部の符号化を行い出力する。ステップS905にて、ブロック分割部101は、フレーム単位の入力画像をブロック単位に分割する。ステップS906にて、予測部102はブロック単位の予測を行い、予測誤差を生成する。
In step S904, the
ステップS907にて、変換部103はステップS906で生成された予測誤差に対して変換ブロックサイズに分割して直交変換を行い、直交変換係数を生成する。ステップS908にて、量子化部104はステップS907で生成された直交変換係数を、ステップS901で生成されて量子化マトリクス保持部106に格納された量子化マトリクスを用いて量子化して量子化係数を生成する。
In step S907, the
ステップS909にて、係数符号化部105はステップS908で生成された量子化係数を符号化し、量子化係数符号データを生成する。ステップS910にて、画像符号化装置は、当該ブロック内の全ての変換ブロックの符号化が終了したか否かの判定を行い、終了していればステップS911に進み、終了していなければ次の変換ブロックを対象としてステップS907に戻る。
In step S909, the
ステップS911にて、画像符号化装置は、全てのブロックの符号化が終了したか否かの判定を行い、終了していれば全ての動作を停止して処理を終了し、そうでなければ次のブロックを対象としてステップS905に戻る。 In step S911, the image coding apparatus determines whether or not coding of all blocks is completed, and if completed, stops all operations and ends the processing. The process returns to step S905 for the block.
以上の構成と動作により、特にステップS902に示した量子化マトリクスを単方向走査して差分行列を算出する処理により、量子化マトリクスの符号量がより少ないビットストリームを生成することができる。 With the above configuration and operation, in particular, the bitstream having a smaller code amount of the quantization matrix can be generated by the processing of unidirectionally scanning the quantization matrix shown in step S902 to calculate the difference matrix.
なお、本実施形態においては、イントラ予測のみを用いるフレームを例にとって説明したが、インター予測を使用できるフレームにおいても対応できることは明らかである。 It should be noted that, in the present embodiment, a frame using only intra prediction has been described as an example, but it is obvious that a frame that can use inter prediction can also be applied.
さらに、本実施形態では説明のためにブロックを8×8画素、変換ブロックを4×4画素としたが、これに限定されない。例えば16×16画素や32×32画素などのブロックサイズへの変更が可能であり、また、ブロックの形状も正方形に限定されず、16×8画素などの長方形でも良い。 Furthermore, in the present embodiment, the blocks are 8 × 8 pixels and the conversion blocks are 4 × 4 pixels for the sake of explanation, but the present invention is not limited to this. For example, the block size can be changed to 16 × 16 pixels, 32 × 32 pixels, or the like, and the shape of the block is not limited to a square, and may be a rectangle of 16 × 8 pixels.
また、変換ブロックサイズはブロックサイズの縦横それぞれ半分としたが、同じ大きさでも構わないし、縦横それぞれ半分よりもさらに細かいサイズでももちろん構わない。 Further, although the conversion block size is half the block size in each of the vertical and horizontal directions, it may be the same size or may be a size smaller than the vertical and horizontal halves.
また、本実施形態では、差分行列を一旦生成して符号化する構成をとったが、量子化マトリクス符号化部107が量子化マトリクスから所定の走査方法を用いて直接差分値を算出して符号化する構成をとっても良い。その場合、量子化マトリクス走査部109は省略可能である。
In the present embodiment, the difference matrix is once generated and encoded. However, the quantization
また、直交変換係数の走査方法に応じて異なる量子化マトリクスを備えて適応する場合、直交変換係数の走査方法に応じて量子化マトリクスの要素の走査方法を決定しても良い。
また、本実施形態では量子化マトリクスが1つの場合について説明したが、これに限定されない。例えば、輝度・色度で異なる量子化マトリクスを設ける場合、共通の量子化マトリクス走査方法を用いても構わないし、個別に設けても構わない。
Further, when different quantization matrices are provided and adapted depending on the scanning method of the orthogonal transform coefficient, the scanning method of the elements of the quantization matrix may be determined according to the scanning method of the orthogonal transform coefficient.
Further, although the case where there is one quantization matrix has been described in the present embodiment, the present invention is not limited to this. For example, in the case of providing different quantization matrices depending on luminance and chromaticity, a common quantization matrix scanning method may be used or they may be provided individually.
<実施形態2>
図2は、本発明の実施形態2に係る画像復号装置の構成を示すブロック図である。本実施形態では、実施形態1で生成されたビットストリームの復号について説明する。
<
FIG. 2 is a block diagram showing the configuration of the image decoding apparatus according to the second embodiment of the present invention. In this embodiment, decoding of the bitstream generated in the first embodiment will be described.
図2において、201は入力されたビットストリームのヘッダ情報を復号し、ビットストリームから必要な符号を分離して後段へ出力する復号・分離部である。復号・分離部201は図1の統合符号化部108と逆の動作を行う。206はビットストリームのヘッダ情報から量子化マトリクス符号データを復号し、差分行列を生成する量子化マトリクス復号部である。
In FIG. 2, 201 is a decoding / separating unit that decodes the header information of the input bitstream, separates the necessary code from the bitstream, and outputs the code to the subsequent stage. The decoding /
208は量子化マトリクス復号部206で生成された差分行列を逆走査して量子化マトリクスを再生する量子化マトリクス逆走査部である。量子化マトリクス逆走査部208は図1の量子化マトリクス走査部109と逆の動作を行う。207は量子化マトリクス逆走査部208で再生された量子化マトリクスを格納しておく量子化マトリクス保持部である。
一方、202は復号・分離部201で分離された符号から量子化係数符号を復号し、量子化係数を再生する係数復号部である。203は量子化マトリクス保持部207に格納された量子化マトリクスを用いて量子化係数に逆量子化を行い、直交変換係数を再生する逆量子化部である。204は図1の変換部103の逆となる逆直交変換を行い、予測誤差を再生する逆変換部である。205は予測誤差と復号済みの画像データからブロックの画像データを再生する予測再構成部である。
On the other hand, 202 is a coefficient decoding unit that decodes the quantized coefficient code from the code separated by the decoding /
上記画像復号装置における画像の復号動作を以下に説明する。本実施形態では実施形態1で生成された動画像ビットストリームをフレーム単位で入力する構成となっているが、1フレーム分の静止画像ビットストリームを入力する構成としても構わない。また、本実施形態では説明を容易にするため、イントラ予測復号処理のみを説明するが、これに限定されずインター予測復号処理においても適用可能である。 The image decoding operation in the image decoding apparatus will be described below. In the present embodiment, the moving image bitstream generated in the first embodiment is input in frame units, but a still image bitstream for one frame may be input. Further, in the present embodiment, only the intra-prediction decoding process is described for ease of description, but the present invention is not limited to this and is also applicable to the inter-prediction decoding process.
図2において、入力された1フレーム分のビットストリームは復号・分離部201に入力され、画像を再生するのに必要なヘッダ情報が復号され、さらに後段で使用される符号が分離され出力される。ヘッダ情報に含まれる量子化マトリクス符号データは量子化マトリクス復号部206に入力され、一次元の差分行列が再生される。この時、本実施形態では、図5(a)に示される復号テーブルを用いて量子化マトリクスの各要素の差分値を復号し、差分行列が再生されるものとするが、使用される復号テーブルはこれに限定されない。再生された差分行列は量子化マトリクス逆走査部208に入力される。
In FIG. 2, the input bit stream for one frame is input to the decoding /
量子化マトリクス逆走査部208に入力された差分行列は、それぞれの差分値から量子化マトリクスの各要素を算出し、それを逆走査して二次元の量子化マトリクスを再生する。再生された量子化マトリクスは量子化マトリクス保持部207に入力され、格納される。また、復号・分離部201で分離された符号のうち、量子化係数符号データは係数復号部202に入力される。まず、係数復号部202は変換ブロックごとに量子化係数符号データを復号し、量子化係数を再生し、逆量子化部203に出力する。
The difference matrix input to the quantization matrix
逆量子化部203は、係数復号部202で再生された量子化係数および量子化マトリクス保持部207に格納されている量子化マトリクスを入力する。そして、前記量子化マトリクスを用いて逆量子化を行い、直交変換係数を再生し、逆変換部204に出力する。逆変換部204は、直交変換係数を入力し、図1の変換部103の逆となる逆直交変換を行い、予測誤差を再生し、予測再構成部205に出力する。予測再構成部205は、入力された予測誤差に復号済みの周囲の画素データから予測を行ってブロック単位の画像データを再生し、出力する。
The
図10は、実施形態2に係る画像復号装置における画像復号処理を示すフローチャートである。 FIG. 10 is a flowchart showing an image decoding process in the image decoding device according to the second embodiment.
まず、ステップS1001にて、復号・分離部201がヘッダ情報を復号し、符号を後段に出力するために分離する。ステップS1002にて、量子化マトリクス復号部206はヘッダ情報に含まれる量子化マトリクス符号データを、図5(a)に示される復号テーブルを用いて復号し、量子化マトリクス再生に必要な差分行列を生成する。ステップS1003にて、量子化マトリクス逆走査部208はステップS1002で生成された差分行列から量子化マトリクスの各要素を算出し、それを逆走査して二次元の量子化マトリクスを再生する。
First, in step S1001, the decoding /
ステップS1004にて、係数復号部202は変換ブロック単位で量子化係数符号データを復号し、量子化係数を再生する。ステップS1005にて、逆量子化部203はステップS1003で再生された量子化マトリクスを用いてステップS1004にて再生された量子化係数を逆量子化し、直交変換係数を再生する。ステップS1006にて、逆変換部204はステップS1005で再生された直交変換係数に対し、逆直交変換を行い、予測誤差を再生する。ステップS1007にて、画像復号装置は、当該ブロック内の全ての変換ブロックの復号が終了したか否かの判定を行い、終了していればステップS1008に進み、終了していなければ次の変換ブロックを対象としてステップS1004に戻る。
In step S1004, the
ステップS1008にて、予測再構成部205は復号済みの周囲の画素データから予測を行い、ステップS1006で再生された予測誤差に加算して、ブロックの復号画像を再生する。ステップS1009にて、画像復号装置は、全てのブロックの復号が終了したか否かの判定を行い、終了していれば全ての動作を停止して処理を終了し、そうでなければ次のブロックを対象として、ステップS1003に戻る。
In step S1008, the
以上の構成と動作により、実施形態1で生成された、量子化マトリクスの符号量がより少ないビットストリームの復号を行い、再生画像を得ることができる。また、実施形態1と同様にブロックのサイズ、変換ブロックのサイズ、ブロックの形状についてはこれに限定されない。 With the above configuration and operation, it is possible to perform decoding of the bit stream generated in the first embodiment, in which the code amount of the quantization matrix is smaller, and obtain a reproduced image. In addition, the block size, the conversion block size, and the block shape are not limited to the same as in the first embodiment.
また、本実施形態では、図5(a)に示される復号テーブルを用いて量子化マトリクスの各要素の差分値を復号したが、使用される復号テーブルはこれに限定されない。 Further, in the present embodiment, the difference value of each element of the quantization matrix is decoded using the decoding table shown in FIG. 5A, but the decoding table used is not limited to this.
また、1つのシーケンスのビットストリーム中で量子化マトリクス符号データが複数回含まれている場合、量子化マトリクスの更新をすることも可能である。復号・分離部201で量子化マトリクス符号データを検出し、量子化マトリクス復号部206で復号し差分行列を生成する。生成された差分行列を量子化マトリクス逆走査部208で逆走査して量子化マトリクスを再生する。そして、再生された量子化マトリクスのデータを量子化マトリクス保持部207の該当する量子化マトリクスに置き換える。この際、全ての量子化マトリクスを書き換えても良いし、書き換える量子化マトリクスを判別することでその一部を変更することも可能である。
Further, when the quantization matrix code data is included in the bit stream of one sequence a plurality of times, the quantization matrix can be updated. The decoding /
また、本実施形態では1フレーム分の符号データを蓄積してから処理を行う方式を例にとって説明したが、これに限定されない。例えば、ブロック単位や複数のブロックで構成されるスライス単位といった入力方法でも構わない。さらにはブロック等の構成ではなく、固定長のパケット等に分割されているものでも構わない。 Further, although the present embodiment has been described by taking the method of accumulating the code data for one frame and then performing the processing as an example, the present invention is not limited to this. For example, an input method such as a block unit or a slice unit composed of a plurality of blocks may be used. Further, the packet may be divided into fixed-length packets or the like instead of the block or the like.
また、本実施形態では、差分行列を一旦生成してから量子化マトリクスを再生する構成をとったが、量子化マトリクス復号部206が差分値を復号後、所定の走査方法を用いて直接量子化マトリクスを再生する構成をとっても良い。その場合、量子化マトリクス逆走査部208は省略可能である。
Further, in the present embodiment, although the configuration is such that the difference matrix is once generated and then the quantization matrix is reproduced, the quantization matrix decoding unit 206 decodes the difference value and then directly quantizes it using a predetermined scanning method. A structure for reproducing the matrix may be adopted. In that case, the quantization matrix
また、直交変換係数の走査方法に応じて異なる量子化マトリクスを備えて適応する場合、直交変換係数の走査方法に応じて量子化マトリクスの要素の走査方法を決定しても良い。 Further, when different quantization matrices are provided and adapted depending on the scanning method of the orthogonal transform coefficient, the scanning method of the elements of the quantization matrix may be determined according to the scanning method of the orthogonal transform coefficient.
<実施形態3>
図3は本実施形態の画像符号化装置を示すブロック図である。図3において、実施形態1の図1と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。
<
FIG. 3 is a block diagram showing the image coding apparatus of this embodiment. In FIG. 3, parts having the same functions as those in FIG. 1 of the first embodiment are given the same numbers, and description thereof will be omitted.
321は各量子化マトリクスをどのように走査するかを示す量子化マトリクス走査方法情報を生成する、走査制御情報生成部である。309は走査制御情報生成部321で生成された量子化マトリクス走査方法情報に基づいて走査方法を決定し、量子化マトリクス保持部106に格納された量子化マトリクスを走査して差分値を計算し、差分行列を生成する量子化マトリクス走査部である。
A scanning control
308は図1の統合符号化部108と同様に、ヘッダ情報や予測、変換に関する符号を生成する統合符号化部であり、前記統合符号化部108とは走査制御情報生成部321から量子化マトリクス走査方法情報を入力し、これを符号化することが異なる。
Similar to the
上記画像符号化装置における画像の符号化動作を以下に説明する。 An image encoding operation in the image encoding device will be described below.
符号化制御情報生成部321では、まず、各量子化マトリクスをどのように走査して差分値を算出するかを示す量子化マトリクス走査方法情報を生成する。本実施形態では、前記量子化マトリクス走査方法情報が0であれば、量子化マトリクスを図13(a)に示された走査方法を用いて走査し、各要素と走査順で直前の要素との差分値を算出して差分行列を生成するものとする。また、1であれば、量子化マトリクスを図13(b)に示された走査方法を用いて走査し、各要素と走査順で直前の要素との差分値を算出して差分行列を生成するものとする。また、2であれば、量子化マトリクスを図13(d)に示された走査方法を用いて走査し、各要素と走査順で直前の要素との差分値を算出して差分行列を生成するものとする。量子化マトリクスの各要素の走査方法および差分算出方法はこれらに限定されず、図13(a)、(b)、(d)に示されたもの以外の方法を用いても良く、例えば図13(c)、(e)に示された差分算出方法を用いても良い。また、前記量子化マトリクス走査方法情報と量子化マトリクスの走査方法との組合せはこれに限定されない。量子化マトリクス走査方法情報の生成方法については特に限定しないが、ユーザが入力しても良いし、固定値としてあらかじめ指定されたものを使用して良いし、量子化マトリクス保持部106に格納されている量子化マトリクスの特性から算出してももちろん良い。生成された量子化マトリクス走査方法情報は量子化マトリクス走査部309と統合符号化部308に入力される。
The coding control
量子化マトリクス走査部309では、入力された量子化マトリクス走査方法情報に基づいて、量子化マトリクス保持部106に格納された各量子化マトリクスを走査して差分値を算出し、差分行列を生成して量子化マトリクス符号化部107に出力する。
The quantization
統合符号化部308では、走査制御情報生成部321で生成された量子化マトリクス走査方法情報を符号化し、量子化マトリクス走査情報符号を生成し、ヘッダ情報等に組み込んで出力する。符号化の方法は特に限定しないが、ハフマン符号や算術符号などを用いることができる。図8(b)に量子化マトリクス走査情報符号を含むビットストリームの例を示す。量子化マトリクス符号化情報符号はシーケンス、ピクチャ等のヘッダのいずれに入れても構わないが、各量子化マトリクス符号データより前に存在する。
The
図11は実施形態3に係る画像符号化装置における画像符号化処理を示すフローチャートである。図11において、実施形態1の図9と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。 FIG. 11 is a flowchart showing the image coding process in the image coding apparatus according to the third embodiment. In FIG. 11, parts that perform the same functions as those in FIG. 9 of the first embodiment are given the same numbers and description thereof is omitted.
ステップS1151にて、走査制御情報生成部321は、後段のステップS1152における量子化マトリクス走査方法を決定し、量子化マトリクス走査方法情報を生成する。ステップS1152にて、量子化マトリクス走査部309は、ステップS1151で決定した量子化マトリクス走査方法に基づいて、ステップS901で生成された量子化マトリクスを走査して差分値を算出し、差分行列を生成する。ステップS1153にて、量子化マトリクス符号化部107は、ステップS1152で生成された差分行列を符号化する。ステップS1154では量子化マトリクス走査方法情報を符号化し、量子化マトリクス走査情報符号を生成し、他の符号と同様にヘッダ部に組み込み出力する。
In step S1151, the scan control
以上の構成と動作により、各量子化マトリクスが最適な走査方法で走査され、量子化マトリクスの符号量がより少ないビットストリームを生成することができる。なお、直交変換係数の走査方法に応じて異なる量子化マトリクスを備えて適応する場合、直交変換係数の走査方法に応じて量子化マトリクスの要素の走査方法を決定しても良い。それ以外の走査方法を用いる場合、そのことを示すフラグと使用する量子化マトリクス走査方法情報を符号化してもよい。 With the above configuration and operation, each quantization matrix is scanned by the optimum scanning method, and it is possible to generate a bitstream with a smaller code amount of the quantization matrix. When different quantization matrices are provided and adapted depending on the scanning method of the orthogonal transformation coefficient, the scanning method of the elements of the quantization matrix may be determined according to the scanning method of the orthogonal transformation coefficient. When another scanning method is used, a flag indicating that and a quantization matrix scanning method information to be used may be encoded.
また、本実施形態では量子化マトリクスが1つの場合について説明したが、これに限定されない。例えば、輝度・色度で異なる量子化マトリクスを設ける場合、共通の量子化マトリクス走査方法の情報を符号化して用いても構わないし、個別に設けて符号化しても構わない。 Further, although the case where there is one quantization matrix has been described in the present embodiment, the present invention is not limited to this. For example, when providing quantization matrices that differ in luminance and chromaticity, information of a common quantization matrix scanning method may be encoded and used, or may be individually provided and encoded.
また、走査制御情報生成部321は量子化マトリクス保持部106で生成された量子化マトリクスを参照して走査方法を生成しても構わない。前記のように複数の走査方法を予め用意しておいて、これらの中から選択して量子化マトリクス走査情報とすることもできるし、走査される要素の順番を別途符号化しても構わない。図13(a)であれば、1、2、6、7、3、5、8、13、4、9、12、14、10、11、15,16のような順番を符号化して送っても構わない。
Further, the scanning control
<実施形態4>
図4は本実施形態の画像復号装置を示すブロック図である。図4において、実施形態2の図2と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。本実施形態では、実施形態3で生成されたビットストリームの復号について説明する。
<
FIG. 4 is a block diagram showing the image decoding apparatus of this embodiment. In FIG. 4, parts that perform the same functions as those in FIG. 2 of the second embodiment are given the same numbers, and description thereof is omitted. In this embodiment, decoding of the bitstream generated in the third embodiment will be described.
401は入力されたビットストリームのヘッダ情報を復号し、ビットストリームから必要な符号を分離して後段へ出力する復号・分離部である。図2の復号・分離部201とはビットストリームのヘッダ情報から量子化マトリクス走査情報符号を分離して後段に出力することが異なる。
Reference numeral 401 is a decoding / separation unit that decodes the header information of the input bitstream, separates the necessary code from the bitstream, and outputs the code to the subsequent stage. 2 is different from the decoding /
421は復号・分離部401で分離された量子化マトリクス走査方法情報符号を復号し、量子化マトリクス走査方法の情報を再生する走査制御情報復号部である。408は量子化マトリクス復号部206で生成された差分行列を前記量子化マトリクス走査方法の情報に基づいて逆走査して量子化マトリクスを再生する量子化マトリクス逆走査部である。 A scanning control information decoding unit 421 decodes the quantization matrix scanning method information code separated by the decoding / separation unit 401 and reproduces the information of the quantization matrix scanning method. A quantization matrix reverse scanning unit 408 reproduces a quantization matrix by inversely scanning the difference matrix generated by the quantization matrix decoding unit 206 based on the information of the quantization matrix scanning method.
上記画像復号装置における画像の復号動作を以下に説明する。 The image decoding operation in the image decoding apparatus will be described below.
図4において、入力された1フレーム分のビットストリームは復号・分離部401に入力され、画像を再生するのに必要なヘッダ情報が復号され、さらに後段で使用される符号が分離され出力される。ヘッダ情報に含まれる量子化マトリクス走査方法情報符号は走査制御情報復号部421に入力され、量子化マトリクス走査方法の情報を再生する。そして、再生された量子化マトリクス走査方法の情報は量子化マトリクス逆走査部408に入力される。一方、ヘッダ情報に含まれる量子化マトリクス符号データは量子化マトリクス復号部206に入力される。 In FIG. 4, the input bit stream for one frame is input to the decoding / separation unit 401, the header information necessary for reproducing the image is decoded, and the code used in the subsequent stage is separated and output. . The quantization matrix scanning method information code included in the header information is input to the scanning control information decoding unit 421 to reproduce the quantization matrix scanning method information. Then, the reproduced quantization matrix scanning method information is input to the quantization matrix inverse scanning unit 408. On the other hand, the quantization matrix coded data included in the header information is input to the quantization matrix decoding unit 206.
量子化マトリクス復号部206は量子化マトリクス符号データを復号し、差分行列を再生する。再生された差分行列は量子化マトリクス逆走査部408に入力される。量子化マトリクス逆走査部408は、前記量子化マトリクス走査方法の情報に基づいて、量子化マトリクス復号部206から入力された差分行列を逆走査し、要素単位で差分を加算して、量子化マトリクスを再生する。再生された量子化マトリクスは量子化マトリクス保持部207に格納される。
The quantization matrix decoding unit 206 decodes the quantization matrix code data and reproduces the difference matrix. The reproduced difference matrix is input to the quantization matrix inverse scanning unit 408. The quantization matrix inverse scanning unit 408 inversely scans the difference matrix input from the quantization matrix decoding unit 206 based on the information of the quantization matrix scanning method, adds the difference in element units, and adds the quantization matrix. To play. The reproduced quantization matrix is stored in the quantization
図12は実施形態4に係る画像復号装置における画像復号処理を示すフローチャートである。実施形態2の図10と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。 FIG. 12 is a flowchart showing an image decoding process in the image decoding device according to the fourth embodiment. Portions having the same functions as those in FIG. 10 of the second embodiment are given the same numbers, and the description thereof will be omitted.
ステップS1001にて、復号・分離部401はヘッダ情報を復号する。ステップS1251にて、走査制御情報復号部421はヘッダ情報に含まれる量子化マトリクス走査方法情報符号を復号し、量子化マトリクス走査方法の情報を再生する。ステップS1253にて、量子化マトリクス逆走査部408は、ステップS1251で再生された量子化マトリクスの走査方法の情報を用いてステップS1252で再生された差分行列を逆走査し、量子化マトリクスを再生する。 In step S1001, the decoding / separation unit 401 decodes the header information. In step S1251, the scanning control information decoding unit 421 decodes the quantization matrix scanning method information code included in the header information and reproduces the quantization matrix scanning method information. In step S1253, the quantization matrix inverse scanning unit 408 inversely scans the difference matrix reproduced in step S1252 by using the information about the scanning method of the quantization matrix reproduced in step S1251, and reproduces the quantization matrix. .
以上の構成と動作により、実施形態3で生成された、各量子化マトリクスが最適な走査方法で走査され、量子化マトリクスの符号量がより少ないビットストリームの復号を行い、再生画像を得ることができる。 With the above configuration and operation, each quantization matrix generated in the third embodiment is scanned by the optimum scanning method, the bit stream having a smaller code amount of the quantization matrix is decoded, and the reproduced image can be obtained. it can.
なお、直交変換係数の走査方法に応じて異なる量子化マトリクスを備えて適応する場合、直交変換係数の走査方法に応じて量子化マトリクスの要素の走査方法を決定しても良い。それ以外の走査方法を用いる場合、そのことを示すフラグと使用する量子化マトリクス走査方法情報を符号化してもよい。 When different quantization matrices are provided and adapted depending on the scanning method of the orthogonal transformation coefficient, the scanning method of the elements of the quantization matrix may be determined according to the scanning method of the orthogonal transformation coefficient. When another scanning method is used, a flag indicating that and a quantization matrix scanning method information to be used may be encoded.
<実施形態5>
本実施形態では画像符号化装置は実施形態1の図1と同じ構成をとる。ただし、量子化マトリクス走査部109の動作が異なる。従って、量子化マトリクス走査部109以外の符号化に関しては実施形態1と同様であり、説明を省略する。
<Fifth Embodiment>
In this embodiment, the image coding apparatus has the same configuration as that of FIG. 1 of the first embodiment. However, the operation of the quantization
量子化マトリクス走査部109は二次元形状で格納されている量子化マトリクスを量子化マトリクス保持部106から順に読み出し、各要素と予測値との差分を計算し、計算された差分を走査して一次元の行列に配置する。実施形態1の量子化マトリクス走査部109とは差分の計算方法が異なる。
The quantization
本実施形態では、図16(c)に示されたように左および上の要素を参照して予測値を算出し、算出した予測値を図16(a)に示された水平スキャンを用いて走査して一次元の行列に配置するものとする。予測値の算出方法については、本実施形態では左の要素と上の要素のうち値が大きい方を予測値とするが、これに限定されず小さい方を予測値としても2つの要素の平均値を予測値としても良い。マトリクス内の上端の要素の符号化においては左の要素を予測値とし、左端の要素の符号化においては上の要素を予測値とする。また、マトリクスの最初の要素に対応する差分値は所定の初期値との差分を計算するものとし、本実施形態では初期値を8とするが、もちろんこれに限定されず、任意の値をとったり最初の要素の値そのものを用いたりしても良い。また、走査方法は水平スキャンに限定されず、図16(b)に示された垂直スキャンでも良く、単方向の走査方法であれば良い。 In the present embodiment, the predicted value is calculated by referring to the left and upper elements as shown in FIG. 16C, and the calculated predicted value is calculated using the horizontal scan shown in FIG. 16A. It shall be scanned and placed in a one-dimensional matrix. Regarding the calculation method of the predicted value, in the present embodiment, the one with the larger value of the left element and the upper element is set as the predicted value, but the present invention is not limited to this, and the smaller value is also the predicted value, and the average value of the two elements May be used as the predicted value. The left element is used as a prediction value when encoding the uppermost element in the matrix, and the upper element is used as the prediction value when encoding the leftmost element. Further, the difference value corresponding to the first element of the matrix is calculated as a difference from a predetermined initial value, and the initial value is set to 8 in the present embodiment, but it is not limited to this and may take an arbitrary value. The value of the first element itself may be used. The scanning method is not limited to the horizontal scanning, and may be the vertical scanning shown in FIG. 16B, as long as it is a unidirectional scanning method.
本実施形態における画像符号化処理を示すフローチャートは実施形態1の図9と同様である。ただし、ステップS902の動作が異なる。従って、ステップS902以外の符号化動作に関しては実施形態1と同様であり、説明を省略する。 The flowchart showing the image coding process in this embodiment is the same as that in FIG. 9 of the first embodiment. However, the operation of step S902 is different. Therefore, the encoding operation other than step S902 is the same as that of the first embodiment, and the description thereof is omitted.
ステップS902にて、量子化マトリックス走査部109はステップS901で生成された量子化マトリクスに対し、各要素の差分を算出し、算出された差分を走査して差分行列を生成する。本実施形態では、図17(a)に示された量子化マトリクスをステップS901で生成する場合を例にとって説明する。生成された量子化マトリクスは図16(c)に示される上または左の要素の最大値を予測値として図17(b)に示される二次元の差分値マトリクスを計算する。そして計算された差分値マトリクスを図16(a)に示される水平走査で走査し、図17(c)に示される差分行列を生成する。もちろん、差分値算出方法は上および左の要素を用いれば最大値に限定されず、最小値や平均値でも構わないし、走査方法は水平スキャンに限定されず、単方向の走査方法であれば良い。
In step S902, the quantization
図15は図17(a)に示された量子化マトリックスを図16(c)に示される上または左の要素の最大値を予測値として差分値を計算し、それを図16(a)の走査方法を用いて走査し、図5(a)の符号化テーブルで符号化した際の例を示している。図15の差分値の行は所定の初期値8および左または上の要素の最大値との差分値を水平スキャンしたものを示しており、図17(c)の差分行列と同等である。符号の行は差分値を図5(a)の符号化テーブルを用いて符号化した際の符号を示しており、合計50ビットが必要となる。これは図7に示されている従来手法の68ビットおよび実施形態1の60ビットよりもさらに少ない符号量で量子化マトリクスが符号化できることを示している。
FIG. 15 shows a difference value calculated from the quantization matrix shown in FIG. 17A with the maximum value of the upper or left element shown in FIG. An example in which scanning is performed using the scanning method and encoding is performed using the encoding table of FIG. The row of the difference value in FIG. 15 shows a value obtained by horizontally scanning the difference between the predetermined
以上の構成と動作により、量子化マトリクスの符号量がさらに少ないビットストリームを生成することができる。 With the above configuration and operation, it is possible to generate a bitstream in which the code amount of the quantization matrix is even smaller.
本実施形態では左と上の要素を用いて予測値を算出したが、これに限定されず、例えば左上の要素も用いても構わない。また、それ以外の要素を用いても構わない。その際にはその最大値、最小値、平均値に加えて中央値を用いても構わないしこれらに限定されない。 In the present embodiment, the predicted value is calculated using the left and upper elements, but the present invention is not limited to this, and the upper left element may be used, for example. Also, other elements may be used. At that time, the median value may be used in addition to the maximum value, the minimum value, and the average value, and the present invention is not limited thereto.
<実施形態6>
本実施形態では画像復号装置は実施形態2の図2と同じ構成をとる。ただし、量子化マトリクス逆走査部208の動作が異なる。従って、量子化マトリクス逆走査部208以外の復号に関しては実施形態2と同様であり、説明を省略する。また、本実施形態では実施形態6で生成されたビットストリームの復号について説明する。
<Sixth Embodiment>
In this embodiment, the image decoding apparatus has the same configuration as that of the second embodiment shown in FIG. However, the operation of the quantization matrix
量子化マトリクス逆走査部208は実施形態6の量子化マトリクス走査部109と逆の動作を行う。量子化マトリクス逆走査部208に入力された差分行列は、それぞれの差分値を逆走査して二次元の差分値マトリクスを再生し、それから量子化マトリクスの各要素を算出して二次元の量子化マトリクスを再生する。本実施形態では、差分行列を図16(a)に示される水平スキャンを用いて逆走査して二次元の差分値マトリクスを再生し、図16(c)に示されるように左または上の要素と差分値から量子化マトリクスの各要素を算出し、二次元の量子化マトリクスを再生する。逆走査方法は水平スキャンに限定されず、図16(b)に示された垂直スキャンでも良く、単方向の走査方法であれば良い。量子化マトリクスの各要素の算出方法については、本実施形態では左の要素と上の要素のうち値が大きい方を予測値とし、それと差分値との合計を量子化マトリクスの各要素とするが、これに限定されない。左の要素と上の要素のうち値が小さい方を予測値としても良いし、2つの要素の平均値を予測値としても良く、予測値と差分値との合計を量子化マトリクスの各要素の値とする。また、マトリクス内の上端の要素の再生においては左の要素を予測値とし、左端の要素の符号化においては上の要素を予測値とし、差分値との合計をもって要素の値とする。また、マトリクスの最初の要素に対応する差分値は所定の初期値との差分を計算するものとし、本実施形態では初期値を8とするが、もちろんこれに限定されず、任意の値をとったり最初の要素の値そのものを用いたりしても良い。また、走査方法は水平スキャンに限定されず、図16(b)に示された垂直スキャンでも良く、単方向の走査方法であれば良い。
The quantization matrix
本実施形態における画像復号処理を示すフローチャートは実施形態2の図10と同様である。ただし、ステップS1003の動作が異なる。従って、ステップS1003以外の復号動作に関しては実施形態2と同様であり、説明を省略する。 The flowchart showing the image decoding process in this embodiment is the same as that in FIG. 10 of the second embodiment. However, the operation of step S1003 is different. Therefore, the decoding operation other than step S1003 is the same as that of the second embodiment, and the description thereof is omitted.
ステップS1003にて、量子化マトリクス逆走査部208はステップS1002で生成された差分行列からそれぞれの差分値を逆走査して二次元の差分値マトリクスを再生し、それから量子化マトリクスの各要素を算出して二次元の量子化マトリクスを再生する。本実施形態では、実施形態6で示した図17(c)に示される差分行列を例にとって説明する。差分行列に対して、図16(a)に示される水平走査で逆走査し、図17(b)に示される二次元の差分値マトリクスを計算する。そして各要素の上または左の要素の大きい方を予測値として、各予測値と各差分値の合計を量子化マトリクスの各要素の値とする。逆走査方法は水平スキャンに限定されず単方向の逆走査方法であれば良く、量子化マトリクスの各要素の再生方法も左もしくは上の要素の小さい方や平均値を予測値として、差分値との合計を各要素の値としてももちろん良い。
In step S1003, the quantization matrix
以上の構成と動作により、実施形態6で生成された、量子化マトリクスの符号量がさらに少ないビットストリームの復号を行い、再生画像を得ることができる。 With the above configuration and operation, it is possible to perform decoding of the bit stream generated in the sixth embodiment with a smaller code amount of the quantization matrix, and obtain a reproduced image.
本実施形態では左と上の要素を用いて予測値を算出したが、これに限定されず、例えば左上の要素も用いても構わない。また、それ以外の要素を用いても構わない。その際にはその最大値、最小値、平均値に加えて中央値を用いても構わないしこれらに限定されない。 In the present embodiment, the predicted value is calculated using the left and upper elements, but the present invention is not limited to this, and the upper left element may be used, for example. Also, other elements may be used. At that time, the median value may be used in addition to the maximum value, the minimum value, and the average value, and the present invention is not limited thereto.
<実施形態7>
本実施形態では画像符号化装置は実施形態1の図1と同じ構成をとる。ただし、量子化マトリクス走査部109の動作が異なる。従って、量子化マトリクス走査部109以外の符号化に関しては実施形態1と同様であり、説明を省略する。
<
In this embodiment, the image coding apparatus has the same configuration as that of FIG. 1 of the first embodiment. However, the operation of the quantization
量子化マトリクス走査部109は二次元形状で格納されている量子化マトリクスを量子化マトリクス保持部106から順に読み出し、各要素と予測値との差分を計算し、計算された差分を走査して一次元の行列に配置する。実施形態1の量子化マトリクス走査部109とは差分の計算方法が異なる。
The quantization
本実施形態では、図18(a)に示されたような斜め方向の単方向スキャンを用いるものとし、要素ごとに走査順に直前の要素との差分を計算するものとするが、走査方法はこれに限定されない。図18(b)に示された図18(a)とは対角線で対称な斜め方向の単方向スキャンでも良く、単方向の走査方法であれば良い。 In the present embodiment, the diagonal unidirectional scan as shown in FIG. 18A is used, and the difference from the immediately preceding element is calculated for each element in the scanning order. Not limited to. 18A shown in FIG. 18B may be a diagonal unidirectional scan symmetrical with respect to a diagonal line, and a unidirectional scanning method may be used.
本実施形態における画像符号化処理を示すフローチャートは実施形態1の図9と同様である。ただし、ステップS902の動作が異なる。従って、ステップS902以外の符号化動作に関しては実施形態1と同様であり、説明を省略する。 The flowchart showing the image coding process in this embodiment is the same as that in FIG. 9 of the first embodiment. However, the operation of step S902 is different. Therefore, the encoding operation other than step S902 is the same as that of the first embodiment, and the description thereof is omitted.
ステップS902にて、量子化マトリクス走査部109はステップS901で生成された量子化マトリクスを走査して各要素の差分を算出し、差分行列を生成する。本実施形態では、図19(a)に示される量子化マトリクスを図18(a)に示される走査方法で走査し、図19(b)に示される差分行列を生成するものとするが、量子化マトリクスや走査方法はこれらに限定されない。
In step S902, the quantization
以上の構成と動作により、図13(a)に示されるジグザグスキャンを用いず図19(a)に示される斜め方向の走査方法を用いる符号化方法において、走査方法を共有することで、使用されるメモリを節約しながら同等の効率でビットストリームを生成できる。 With the above configuration and operation, the scanning method is shared by the encoding method using the diagonal scanning method shown in FIG. 19A without using the zigzag scanning shown in FIG. Bitstream can be generated with the same efficiency while saving memory.
また図20(a)〜(d)のように量子化マトリクスをいくつかの小マトリクスに分割して、小マトリクスの中で単方向の走査を行っても良い。このようにすることによって、4×4量子化マトリクスの走査方法をより大きな量子化マトリクスにも適用でき、その順番を表すメモリを省略することができる。 Alternatively, as shown in FIGS. 20A to 20D, the quantization matrix may be divided into some small matrices and unidirectional scanning may be performed in the small matrices. By doing so, the scanning method of the 4 × 4 quantization matrix can be applied to a larger quantization matrix, and the memory indicating the order can be omitted.
<実施形態8>
本実施形態では画像復号装置は実施形態2の図2と同じ構成をとる。ただし、量子化マトリクス逆走査部208の動作が異なる。従って、量子化マトリクス逆走査部208以外の復号に関しては実施形態2と同様であり、説明を省略する。また、本実施形態では実施形態7で生成されたビットストリームの復号について説明する。
<
In this embodiment, the image decoding apparatus has the same configuration as that of the second embodiment shown in FIG. However, the operation of the quantization matrix
量子化マトリクス逆走査部208は実施形態7の量子化マトリクス走査部109と逆の動作を行う。量子化マトリクス逆走査部208に入力された差分行列は、それぞれの差分値から量子化マトリクスの各要素を算出し、それを逆走査して二次元の量子化マトリクスを再生する。
The quantization matrix
本実施形態では、差分行列のそれぞれの差分値から量子化マトリクスの各要素を算出し、それを図18(a)に示される走査方法を用いて逆走査して二次元の量子化マトリクスを再生する。逆走査方法は図16(a)に示された方法に限定されず、図18(b)に示された図18(a)とは対角線で対称な斜め方向の単方向スキャンでも良く、単方向の逆走査方法であれば良い。 In the present embodiment, each element of the quantization matrix is calculated from each difference value of the difference matrix, and it is reverse-scanned using the scanning method shown in FIG. 18A to reproduce the two-dimensional quantization matrix. To do. The reverse scanning method is not limited to the method shown in FIG. 16A, and may be a diagonal unidirectional scan symmetrical with respect to FIG. 18A shown in FIG. 18B in a diagonal direction. The reverse scanning method may be used.
本実施形態における画像復号処理を示すフローチャートは実施形態2の図10と同様である。ただし、ステップS1003の動作が異なる。従って、ステップS1003以外の復号動作に関しては実施形態2と同様であり、説明を省略する。 The flowchart showing the image decoding process in this embodiment is the same as that in FIG. 10 of the second embodiment. However, the operation of step S1003 is different. Therefore, the decoding operation other than step S1003 is the same as that of the second embodiment, and the description thereof is omitted.
ステップS1003にて、量子化マトリクス逆走査部208はステップS1002で生成された差分行列から量子化マトリクスの各要素を算出し、それを逆走査して二次元の量子化マトリクスを再生する。本実施形態では、実施形態7で用いた図19(b)に示される差分行列から量子化マトリクスの各要素を算出し、算出されたそれぞれの要素を図18(a)に示される逆走査方法を用いて逆走査し、図19(a)に示された量子化マトリクスを再生する。使用される差分行列や逆走査方法はこれらに限定されない。
In step S1003, the quantization matrix
以上の構成と動作により、実施形態7で生成された、走査方法を共有することで使用されるメモリを節約しながら生成されたビットストリームの復号を行い、再生画像を得ることができる。 With the above configuration and operation, it is possible to decode the bit stream generated in the seventh embodiment while saving the memory used by sharing the scanning method, and obtain the reproduced image.
<実施形態9>
図1〜図4に示した各処理部はハードウェアでもって構成しているものとして上記実施形態では説明した。しかし、図1〜図4に示した各処理部で行なう処理をコンピュータプログラムでもって構成しても良い。
<
In the above embodiment, each processing unit shown in FIGS. 1 to 4 is described as being configured by hardware. However, the processing performed by each processing unit shown in FIGS. 1 to 4 may be configured by a computer program.
図14は、上記各実施形態に係る画像表示装置に適用可能なコンピュータのハードウェアの構成例を示すブロック図である。 FIG. 14 is a block diagram showing an example of the hardware configuration of a computer applicable to the image display device according to each of the above embodiments.
CPU1401は、RAM1402やROM1403に格納されているコンピュータプログラムやデータを用いてコンピュータ全体の制御を行うと共に、上記各実施形態に係る画像処理装置が行うものとして上述した各処理を実行する。即ち、CPU1401は、図1〜図4に示した各処理部として機能することになる。
The
RAM1402は、外部記憶装置1406からロードされたコンピュータプログラムやデータ、I/F(インターフェース)1407を介して外部から取得したデータなどを一時的に記憶するためのエリアを有する。更に、RAM1402は、CPU1401が各種の処理を実行する際に用いるワークエリアを有する。即ち、RAM1402は、例えば、フレームメモリとして割当てたり、その他の各種のエリアを適宜提供することができる。
The
ROM1403には、本コンピュータの設定データや、ブートプログラムなどが格納されている。操作部1404は、キーボードやマウスなどにより構成されており、本コンピュータのユーザが操作することで、各種の指示をCPU1401に対して入力することができる。出力部1405は、CPU1401による処理結果を出力する。また出力部1405は例えば液晶ディスプレイのような表示装置で構成して処理結果を表示することができる。
The
外部記憶装置1406は、ハードディスクドライブ装置に代表される、大容量情報記憶装置である。外部記憶装置1406には、OS(オペレーティングシステム)や、図1〜図4に示した各部の機能をCPU1401に実現させるためのコンピュータプログラムが保存されている。更には、外部記憶装置1406には、処理対象としての各画像データが保存されていても良い。
The external storage device 1406 is a large capacity information storage device represented by a hard disk drive device. The external storage device 1406 stores an OS (operating system) and a computer program for causing the
外部記憶装置1406に保存されているコンピュータプログラムやデータは、CPU1401による制御に従って適宜RAM1402にロードされ、CPU1401による処理対象となる。I/F1407には、LANやインターネット等のネットワーク、投影装置や表示装置などの他の機器を接続することができ、本コンピュータはこのI/F1407を介して様々な情報を取得したり、送出したりすることができる。1408は上述の各部を繋ぐバスである。
The computer programs and data stored in the external storage device 1406 are appropriately loaded into the
上述の構成からなる作動は前述のフローチャートで説明した作動をCPU1401が中心となってその制御を行う。
The operation having the above-described configuration is controlled mainly by the
<その他の実施形態>
本発明の目的は、前述した機能を実現するコンピュータプログラムのコードを記録した記憶媒体を、システムに供給し、そのシステムがコンピュータプログラムのコードを読み出し実行することによっても達成される。この場合、記憶媒体から読み出されたコンピュータプログラムのコード自体が前述した実施形態の機能を実現し、そのコンピュータプログラムのコードを記憶した記憶媒体は本発明を構成する。また、そのプログラムのコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した機能が実現される場合も含まれる。
<Other embodiments>
The object of the present invention is also achieved by supplying a storage medium storing a code of a computer program that realizes the above-described functions to a system, and the system reading and executing the code of the computer program. In this case, the computer program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the computer program code constitutes the present invention. Further, it includes a case where an operating system (OS) running on a computer performs some or all of actual processing based on the instructions of the code of the program, and the processing realizes the above-described functions. .
さらに、以下の形態で実現しても構わない。すなわち、記憶媒体から読み出されたコンピュータプログラムコードを、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込む。そして、そのコンピュータプログラムのコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行って、前述した機能が実現される場合も含まれる。 Further, it may be realized in the following forms. That is, the computer program code read from the storage medium is written in the memory provided in the function expansion card inserted in the computer or the function expansion unit connected to the computer. Then, based on the instructions of the code of the computer program, a case where the CPU or the like included in the function expansion card or the function expansion unit performs some or all of the actual processing to realize the above-described functions is also included.
本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明したフローチャートに対応するコンピュータプログラムのコードが格納されることになる。 When the present invention is applied to the storage medium, the storage medium stores the code of the computer program corresponding to the above-described flowchart.
Claims (13)
符号化対象の画像データを量子化する際に用いる二次元配列で表すことが可能なn行n列(nは4以上の整数)の量子化マトリクスにおける各要素において所定の要素間の差分値を取得する取得手段、
を有し、
前記取得手段は、
前記量子化マトリクスにおける(p+1)行1列目(pは2以上かつn−1以下の整数)に対応する要素と、前記量子化マトリクスにおける1行p列目に対応する要素との差分値を取得し、
前記量子化マトリクスにおけるn行q列目(qは2以上かつn−1以下の整数)に対応する要素と、前記量子化マトリクスにおける(q−1)行n列目に対応する要素との差分値を取得し、
前記量子化マトリクスにおけるn行n列目に対応する要素と、前記量子化マトリクスにおける(n−1)行n列目に対応する要素との差分値を取得する
ことを特徴とする画像符号化装置。 An encoding device for encoding image data,
For each element in a quantization matrix of n rows and n columns (n is an integer of 4 or more) that can be represented by a two-dimensional array used when quantizing image data to be encoded, a difference value between predetermined elements is calculated. Acquisition means to acquire,
Have
The acquisition means is
The difference value between the element corresponding to the (p + 1) th row and the 1st column (p is an integer of 2 or more and n-1 or less) in the quantization matrix and the element corresponding to the 1st row and the pth column of the quantization matrix is calculated. Acquired,
Difference between an element corresponding to the nth row and the qth column (q is an integer of 2 or more and n-1 or less) in the quantization matrix and an element corresponding to the (q-1) th row and the nth column in the quantization matrix Get the value,
An image coding apparatus, wherein a difference value between an element corresponding to the nth row and the nth column in the quantization matrix and an element corresponding to the (n-1) th row and the nth column in the quantization matrix is acquired. .
ことを特徴とする請求項1記載の画像符号化装置。 The image coding apparatus according to claim 1, wherein the number of rows in the quantization matrix is equal to the number of columns in the quantization matrix.
を有することを特徴とする請求項1又は2に記載の画像符号化装置。 The image coding apparatus according to claim 1, further comprising: a generation unit that generates header information indicating a size of the quantization matrix.
ことを特徴とする請求項1〜3のいずれか1項に記載の画像符号化装置。 The said acquisition means acquires the difference value of the element corresponding to the 1st row and 1st column in the said quantization matrix, and a predetermined initial value. The claim 1 characterized by the above-mentioned. Image coding device.
変換係数を生成するために、前記予測誤差を直交変換する予測手段と、
量子化係数を生成するために、前記量子化マトリクスを用いて、前記変換係数を量子化する量子化手段と、
を有し、
前記符号化手段は、前記量子化係数を符号化する。
ことを特徴とする請求項1〜4のいずれか1項に記載の画像符号化装置。 A prediction unit that performs a prediction process on an image to be encoded in order to generate a prediction error;
Prediction means for orthogonally transforming the prediction error to generate transform coefficients;
Quantizing means for quantizing the transform coefficient using the quantization matrix to generate a quantized coefficient;
Have
The encoding means encodes the quantized coefficient.
The image encoding device according to claim 1, wherein the image encoding device is an image encoding device.
量子化係数から変換係数を導出する際に用いられる量子化マトリクスであって、n行n列(nは4以上の整数)の量子化マトリクスに含まれる各要素における所定の要素間の差分値を前記ビットストリームから復号する復号手段と、
前記復号手段によって復号された複数の差分値における第1番目の差分値と所定の初期値とを加算して第1番目の要素を導出し、前記複数の差分値における第r番目(rは2以上の整数)の差分値と第r−1番目の要素とを加算して第r番目の要素を導出することにより、複数の要素を導出する第1の導出手段と、
前記第1の導出手段によって導出された前記複数の要素それぞれを、二次元配列で表わすことが可能な前記量子化マトリクスにおける各要素に対応付ける対応付け手段と
を有し、
前記対応付け手段は、
前記複数の要素の内の第1の要素を前記量子化マトリクスにおける1行p列目(pは2以上かつn−1以下の整数)の要素に対応させる場合、前記第1の要素の次の第2の要素を前記量子化マトリクスにおける(p+1)行1列目の要素に対応させ、
前記複数の要素の内の第3の要素を前記量子化マトリクスにおける(q−1)行n列目(qは2以上かつn−1以下の整数)の要素に対応させる場合、前記第3の要素の次の第4の要素を前記量子化マトリクスにおけるn行q列目の要素に対応させ、
前記複数の要素の内の最後から2番目の要素を前記量子化マトリクスにおける(n−1)行n列目の要素に対応させ、
前記複数の要素の内の最後の要素を前記量子化マトリクスにおけるn行n列目の要素に対応させる
ことを特徴とする画像復号装置。 An image decoding device for decoding image data from a bitstream,
A quantization matrix used when deriving a transform coefficient from a quantized coefficient, which is a difference value between predetermined elements in each element included in the quantization matrix of n rows and n columns (n is an integer of 4 or more). Decoding means for decoding from the bitstream,
The first difference value of the plurality of difference values decoded by the decoding means and a predetermined initial value are added to derive the first element, and the r-th (r is 2) of the plurality of difference values. First deriving means for deriving a plurality of elements by adding the difference value of (the above integer) and the r-1th element to derive the rth element,
Associating means for associating each of the plurality of elements derived by the first deriving means with each element in the quantization matrix that can be represented by a two-dimensional array,
The associating means is
When the first element of the plurality of elements is made to correspond to the element of the first row and the p-th column (p is an integer of 2 or more and n-1 or less) in the quantization matrix, the next element of the first element is The second element is made to correspond to the element in the (p + 1) th row and first column in the quantization matrix,
When the third element of the plurality of elements is made to correspond to the element of the (q-1) th row and the nth column (q is an integer of 2 or more and n-1 or less) in the quantization matrix, the third element The fourth element following the element is made to correspond to the element in the n-th row and the q-th column in the quantization matrix,
The penultimate element of the plurality of elements corresponds to the element at the (n-1) th row and nth column in the quantization matrix;
The image decoding device, wherein the last element of the plurality of elements is made to correspond to the element in the n-th row and the n-th column in the quantization matrix.
ことを特徴とする請求項6記載の画像復号装置。 The image decoding device according to claim 6, wherein the number of rows in the quantization matrix is equal to the number of columns in the quantization matrix.
ことを特徴とする請求項6又は7に記載の画像復号装置。 The image decoding device according to claim 6 or 7, wherein the size of the quantization matrix is based on information included in header information.
前記変換係数から予測誤差を導出する第3の導出手段と、
予測画像を導出するために復号済みの画素に基づいて予測を行い、前記予測画像と前記予測誤差に基づく画像を生成する画像生成手段と
を有することを特徴とする請求項6〜8のいずれか1項に記載の画像復号装置。 Second deriving means for deriving the transform coefficient from the quantized coefficient using the quantization matrix,
Third derivation means for deriving a prediction error from the conversion coefficient,
9. An image generation unit that performs prediction based on decoded pixels to derive a predicted image and that generates the predicted image and an image based on the prediction error. The image decoding device according to item 1.
符号化対象の画像データを量子化する際に用いる二次元配列で表すことが可能なn行n列(nは4以上の整数)の量子化マトリクスにおける各要素において所定の要素間の差分値を取得する取得工程、
を有し、
前記取得工程において、
前記量子化マトリクスにおける(p+1)行1列目(pは2以上かつn−1以下の整数)に対応する要素と、前記量子化マトリクスにおける1行p列目に対応する要素との差分値を取得し、
前記量子化マトリクスにおけるn行q列目(qは2以上かつn−1以下の整数)に対応する要素と、前記量子化マトリクスにおける(q−1)行n列目に対応する要素との差分値を取得し、
前記量子化マトリクスにおけるn行n列目に対応する要素と、前記量子化マトリクスにおける(n−1)行n列目に対応する要素との差分値を取得する
ことを特徴とする画像符号化方法。 A coding method for coding image data, comprising:
For each element in a quantization matrix of n rows and n columns (n is an integer of 4 or more) that can be represented by a two-dimensional array used when quantizing image data to be encoded, a difference value between predetermined elements is calculated. Acquisition process to acquire,
Have
In the acquisition step,
The difference value between the element corresponding to the (p + 1) th row and the 1st column (p is an integer of 2 or more and n-1 or less) in the quantization matrix and the element corresponding to the 1st row and the pth column of the quantization matrix is calculated. Acquired,
Difference between an element corresponding to the nth row and the qth column (q is an integer of 2 or more and n-1 or less) in the quantization matrix and an element corresponding to the (q-1) th row and the nth column in the quantization matrix Get the value,
An image coding method, wherein a difference value between an element corresponding to the nth row and the nth column in the quantization matrix and an element corresponding to the (n-1) th row and the nth column in the quantization matrix is obtained. .
量子化係数から変換係数を導出する際に用いられる量子化マトリクスであって、n行n列(nは4以上の整数)の量子化マトリクスに含まれる各要素における所定の要素間の差分値を前記ビットストリームから復号する復号工程と、
前記復号工程によって復号された複数の差分値における第1番目の差分値と所定の初期値とを加算して第1番目の要素を導出し、前記複数の差分値における第r番目(rは2以上の整数)の差分値と第r−1番目の要素とを加算して第r番目の要素を導出することにより、複数の要素を導出する第1の導出工程と、
前記第1の導出工程によって導出された前記複数の要素それぞれを、二次元配列で表わすことが可能な前記量子化マトリクスにおける各要素に対応付ける対応付け工程と
を有し、
前記対応付け工程において、
前記複数の要素の内の第1の要素を前記量子化マトリクスにおける1行p列目(pは2以上かつn−1以下の整数)の要素に対応させる場合、前記第1の要素の次の第2の要素を前記量子化マトリクスにおける(p+1)行1列目の要素に対応させ、
前記複数の要素の内の第3の要素を前記量子化マトリクスにおける(q−1)行n列目(qは2以上かつn−1以下の整数)の要素に対応させる場合、前記第3の要素の次の第4の要素を前記量子化マトリクスにおけるn行q列目の要素に対応させ、
前記複数の要素の内の最後から2番目の要素を前記量子化マトリクスにおける(n−1)行n列目の要素に対応させ、
前記複数の要素の内の最後の要素を前記量子化マトリクスにおけるn行n列目の要素に対応させる
ことを特徴とする画像復号方法。 An image decoding method for decoding image data from a bitstream,
A quantization matrix used when deriving a transform coefficient from a quantized coefficient, which is a difference value between predetermined elements in each element included in the quantization matrix of n rows and n columns (n is an integer of 4 or more). A decoding step of decoding from the bitstream,
The first difference value of the plurality of difference values decoded by the decoding process is added to a predetermined initial value to derive the first element, and the r-th (r is 2) of the plurality of difference values. A first deriving step of deriving a plurality of elements by deriving the r-th element by adding the difference value of (the above integer) and the (r-1) -th element,
An associating step of associating each of the plurality of elements derived by the first deriving step with each element in the quantization matrix that can be represented by a two-dimensional array,
In the associating step,
When the first element of the plurality of elements is made to correspond to the element of the first row and the p-th column (p is an integer of 2 or more and n-1 or less) in the quantization matrix, the next element of the first element is The second element is made to correspond to the element in the (p + 1) th row and first column in the quantization matrix,
When the third element of the plurality of elements is made to correspond to the element of the (q-1) th row and the nth column (q is an integer of 2 or more and n-1 or less) in the quantization matrix, the third element The fourth element following the element is made to correspond to the element in the n-th row and the q-th column in the quantization matrix,
The penultimate element of the plurality of elements corresponds to the element at the (n-1) th row and nth column in the quantization matrix;
The image decoding method, wherein the last element of the plurality of elements is made to correspond to the element in the n-th row and the n-th column in the quantization matrix.
Applications Claiming Priority (6)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011243942 | 2011-11-07 | ||
JP2011243942 | 2011-11-07 | ||
JP2012008199 | 2012-01-18 | ||
JP2012008199 | 2012-01-18 | ||
JP2012057424 | 2012-03-14 | ||
JP2012057424 | 2012-03-14 |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018052119A Division JP6490272B2 (en) | 2011-11-07 | 2018-03-20 | Image encoding device, image encoding method and program, image decoding device, image decoding method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019075836A JP2019075836A (en) | 2019-05-16 |
JP6679778B2 true JP6679778B2 (en) | 2020-04-15 |
Family
ID=58537617
Family Applications (4)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017016100A Active JP6312879B2 (en) | 2011-11-07 | 2017-01-31 | Image encoding device, image encoding method and program, image decoding device, image decoding method and program |
JP2018052119A Active JP6490272B2 (en) | 2011-11-07 | 2018-03-20 | Image encoding device, image encoding method and program, image decoding device, image decoding method and program |
JP2019030981A Active JP6679778B2 (en) | 2011-11-07 | 2019-02-22 | Image coding device, image coding method and program, image decoding device, image decoding method and program |
JP2019030980A Active JP6679777B2 (en) | 2011-11-07 | 2019-02-22 | Image coding device, image coding method and program, image decoding device, image decoding method and program |
Family Applications Before (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017016100A Active JP6312879B2 (en) | 2011-11-07 | 2017-01-31 | Image encoding device, image encoding method and program, image decoding device, image decoding method and program |
JP2018052119A Active JP6490272B2 (en) | 2011-11-07 | 2018-03-20 | Image encoding device, image encoding method and program, image decoding device, image decoding method and program |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019030980A Active JP6679777B2 (en) | 2011-11-07 | 2019-02-22 | Image coding device, image coding method and program, image decoding device, image decoding method and program |
Country Status (1)
Country | Link |
---|---|
JP (4) | JP6312879B2 (en) |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2679769B2 (en) * | 1992-11-16 | 1997-11-19 | 富士ゼロックス株式会社 | Image signal encoding device |
JPH06284412A (en) * | 1993-03-26 | 1994-10-07 | Sony Corp | Picture signal coding method and picture signal coder, picture signal decoding method and picture signal decoder and picture signal recording medium |
JP3234807B2 (en) * | 1997-02-08 | 2001-12-04 | 松下電器産業株式会社 | Decoding method |
WO2005072312A2 (en) * | 2004-01-20 | 2005-08-11 | Matsushita Electric Industrial Co., Ltd. | Picture coding method, picture decoding method, picture coding apparatus, picture decoding apparatus, and program thereof |
US10277915B2 (en) * | 2011-11-07 | 2019-04-30 | Qualcomm Incorporated | Signaling quantization matrices for video coding |
CN111064966B (en) * | 2012-04-16 | 2022-05-31 | 韩国电子通信研究院 | Image decoding method and image encoding method |
-
2017
- 2017-01-31 JP JP2017016100A patent/JP6312879B2/en active Active
-
2018
- 2018-03-20 JP JP2018052119A patent/JP6490272B2/en active Active
-
2019
- 2019-02-22 JP JP2019030981A patent/JP6679778B2/en active Active
- 2019-02-22 JP JP2019030980A patent/JP6679777B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP6490272B2 (en) | 2019-03-27 |
JP6312879B2 (en) | 2018-04-18 |
JP6679777B2 (en) | 2020-04-15 |
JP2017073837A (en) | 2017-04-13 |
JP2018121355A (en) | 2018-08-02 |
JP2019097208A (en) | 2019-06-20 |
JP2019075836A (en) | 2019-05-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6120490B2 (en) | Image encoding device, image encoding method and program, image decoding device, image decoding method and program | |
JP5871628B2 (en) | Image encoding device, image encoding method and program, image decoding device, image decoding method and program | |
JP2013038758A (en) | Image encoder, image encoding method, program, image decoder, image decoding method and program | |
JP2013038768A (en) | Image encoder, image encoding method, program, image decoder, image decoding method and program | |
JP2013146038A (en) | Image quantization apparatus, image quantization method, and program, and image inverse quantization apparatus, image inverse quantization method, and program | |
JP2013012887A (en) | Image encoding apparatus, image encoding method and program, image decoding apparatus, image decoding method and program | |
JP6679778B2 (en) | Image coding device, image coding method and program, image decoding device, image decoding method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190222 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200210 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20200218 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200318 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6679778 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |