[go: up one dir, main page]

JP2914326B2 - Transformation encoding of digital signal enabling reversible transformation - Google Patents

Transformation encoding of digital signal enabling reversible transformation

Info

Publication number
JP2914326B2
JP2914326B2 JP27731296A JP27731296A JP2914326B2 JP 2914326 B2 JP2914326 B2 JP 2914326B2 JP 27731296 A JP27731296 A JP 27731296A JP 27731296 A JP27731296 A JP 27731296A JP 2914326 B2 JP2914326 B2 JP 2914326B2
Authority
JP
Japan
Prior art keywords
reversible
discrete cosine
quantization
cosine transform
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.)
Expired - Lifetime
Application number
JP27731296A
Other languages
Japanese (ja)
Other versions
JPH10108186A (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.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP27731296A priority Critical patent/JP2914326B2/en
Priority to US08/917,085 priority patent/US6167161A/en
Publication of JPH10108186A publication Critical patent/JPH10108186A/en
Application granted granted Critical
Publication of JP2914326B2 publication Critical patent/JP2914326B2/en
Priority to US09/692,475 priority patent/US6415060B1/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Complex Calculations (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ディジタル信号の
変換符号化に関し、特に画像信号の符号化方式に関す
る。
[0001] 1. Field of the Invention [0002] The present invention relates to conversion coding of digital signals, and more particularly to a coding method of image signals.

【0002】[0002]

【従来の技術】離散コサイン変換に基づくディジタル信
号の可逆符号化方式として、例えば本発明者による特願
平7−249962号(発明の名称:「可逆変換を可能
にするディジタル信号の変換符号化方式」、本願出願時
未公開)や、同じく、本発明者による平成8年8月23
日付け特許出願(発明の名称:「可逆変換を可能にする
ディジタル信号の変換符号化方式」)等の先行出願に記
載される技術がある。
2. Description of the Related Art As a reversible encoding method for digital signals based on discrete cosine transform, for example, Japanese Patent Application No. 7-249962 (title of the invention: "Conversion encoding method for digital signals enabling reversible transformation" , Unpublished at the time of filing of the present application), and also by the present inventor on August 23, 1996.
There is a technology described in a prior application such as a dated patent application (title of the invention: "transformation encoding method of digital signal enabling reversible transformation").

【0003】これらは、離散コサイン変換を修正し、可
逆な変換を可能にしたものである。これらの方式の特徴
は2つあり、その1つは、離散コサイン変換を整数行列
による線形変換で近似すること、もう1つは、可逆な量
子化によって変換係数間に含まれる冗長性を除去するこ
とである。
[0003] These are modifications of the discrete cosine transform to enable a reversible transform. These schemes have two features, one of which is to approximate a discrete cosine transform by a linear transform by an integer matrix, and the other is to remove redundancy included between transform coefficients by reversible quantization. That is.

【0004】以下に、この方式による、8元の可逆離散
コサイン変換の原理を説明する。本来の8元離散コサイ
ン変換は、原信号ベクトル(x0,x1,…,x7)を次
式(1)に従って、変換係数(X0,X1,…,X7)に変換
するものである。
[0004] The principle of the 8-ary reversible discrete cosine transform according to this method will be described below. The original 8-ary discrete cosine transform converts the original signal vector (x 0 , x 1 ,..., X 7 ) into a conversion coefficient (X 0 , X 1 ,..., X 7 ) according to the following equation (1). It is.

【0005】[0005]

【数2】 (Equation 2)

【0006】ここに、c1,…,c7は次式(2)で与え
られる。
Here, c 1 ,..., C 7 are given by the following equation (2).

【0007】[0007]

【数3】 (Equation 3)

【0008】前記特許出願記載の8元可逆離散コサイン
変換では、上式(1)で表される8元離散コサイン変換
を次式(3)の変換で近似する。
In the 8-ary reversible discrete cosine transform described in the patent application, the 8-ary discrete cosine transform represented by the above equation (1) is approximated by the following equation (3).

【0009】[0009]

【数4】 (Equation 4)

【0010】ここに、a1,…,a7は自然数である。この
1,…,a7は、離散コサイン変換の各行ベクトルを定数
倍し、整数に丸め込むことで得られる。
Here, a 1 ,..., A 7 are natural numbers. A 1 ,..., A 7 are obtained by multiplying each row vector of the discrete cosine transform by a constant and rounding it to an integer.

【0011】上式(3)で得られる(X0,…,X7)は、
定数倍されていることを除いて、本来の離散コサイン変
換係数に近い値となる。そして、(X0,…,X7)は整数
値であるため、可逆な符号化が可能である。
(X 0 ,..., X 7 ) obtained by the above equation (3) is
Except for being multiplied by a constant, the value is close to the original discrete cosine transform coefficient. Since (X 0 ,..., X 7 ) are integer values, lossless encoding is possible.

【0012】ただし、上式(3)で得られる変換係数X
0,…,X7は互いに独立でなく、ベクトル信号としては冗
長性を有する。変換行列の行列式の絶対値をDとする
と、変換領域でとり得る点の密度は1/Dとなる。すな
わち変換領域では、全整数ベクトルのうちでとり得る点
は全体の1/Dであり、残りの1−1/Dは、実際には
とり得ない無駄な点である。この無駄な点をも符号化の
対象とすることは、圧縮符号化の効率を下げる原因とな
る。
However, the conversion coefficient X obtained by the above equation (3)
0, ..., X 7 are not independent of each other, as a vector signal having redundancy. Assuming that the absolute value of the determinant of the transformation matrix is D, the density of points that can be taken in the transformation domain is 1 / D. That is, in the conversion domain, the points that can be taken out of all the integer vectors are 1 / D of the whole, and the remaining 1-1 / Ds are useless points that cannot be actually taken. Making this useless point a target of encoding causes a reduction in the efficiency of compression encoding.

【0013】そこで、この冗長性を取り除くために、可
逆な符号化を行う。ただし、8次元空間で直接可逆な量
子化を定義することは困難であるため、上式(3)を高
速算法に従って分解する。そして、得られる個々の部分
変換の変換結果に対して可逆な量子化を行う。
Therefore, in order to remove this redundancy, lossless encoding is performed. However, since it is difficult to directly define reversible quantization in an eight-dimensional space, the above equation (3) is decomposed according to a fast algorithm. Then, lossless quantization is performed on the conversion results of the obtained individual partial conversions.

【0014】上式(3)の変換は、次のように分解でき
る。
The conversion of the above equation (3) can be decomposed as follows.

【0015】[0015]

【数5】 (Equation 5)

【0016】但し、上式(10)では、a4=1とし
た。これは、上式(10)の行列は、a4のみからな
り、a4=1としても問題が無いためである。
However, in the above equation (10), a 4 = 1. This matrix of the equation (10) includes only a a 4, because even there is no problem as a 4 = 1.

【0017】このように、8つの2×2行列変換と1つ
の4×4行列変換に分解できる。
In this way, it can be decomposed into eight 2 × 2 matrix transformations and one 4 × 4 matrix transformation.

【0018】冗長性は、上式(4)から上式(12)ま
での個々の変換において生じる。例えば、上式(4)の
変換の場合は、変換行列の行列式の絶対値は2であるた
め、変換結果として、実際にとりえる整数ベクトルは、
全体の1/2だけである。このような冗長性を、個々の
変換毎に取り除く。
Redundancy occurs in the individual transforms from equations (4) to (12). For example, in the case of the conversion of the above equation (4), since the absolute value of the determinant of the conversion matrix is 2, the integer vector that can be actually obtained as a conversion result is
Only 1/2 of the whole. Such redundancy is removed for each individual transform.

【0019】このために、図15に示すように、変換毎
にその変換結果を可逆に量子化する(図15の各変換器
の後段に配置される可逆量子化Q参照)。
For this purpose, as shown in FIG. 15, the conversion result is reversibly quantized for each conversion (see reversible quantization Q arranged at the subsequent stage of each converter in FIG. 15).

【0020】可逆量子化では、整数格子点を変換して得
られる変換点を、その構造の周期性を利用して量子化す
る。式(4)から(12)までの変換のうち、2×2行
列による変換の場合は、変換行列の行列式の絶対値を
D、整数ベクトルを変換して得られる変換点の座標を
(Y1,Y2)とすると、変換点(Y1,Y2)全体の構造
は、各軸方向に周期Dを持つ。そこで、次式(13)で
定められる領域、
In the reversible quantization, a transform point obtained by transforming an integer lattice point is quantized using the periodicity of the structure. In the case of the conversion using the 2 × 2 matrix among the conversions of Expressions (4) to (12), the absolute value of the determinant of the conversion matrix is D, and the coordinates of the conversion point obtained by converting the integer vector are (Y 1 , Y 2 ), the entire structure of the conversion point (Y 1 , Y 2 ) has a period D in each axis direction. Therefore, the area defined by the following equation (13):

【0021】[0021]

【数6】 (Equation 6)

【0022】(但し、N1、N2はDの倍数であり、これ
らのことを以後、「量子化周期」と呼ぶ)を基本領域と
して、この領域内にある変換点の量子化値を、予め人為
的に定義しておく。そして定義した変換点と量子化値の
対応関係を、表(以後この表のことを「量子化対応表」
と呼ぶ)に記述して保持しておき、次に述べるように、
この表を用いて量子化する。
(Where N 1 and N 2 are multiples of D, and these are hereinafter referred to as “quantization periods”), and a quantization value of a transformation point within this region is defined as It is artificially defined in advance. The correspondence between the defined transformation points and the quantized values is shown in a table (hereinafter, this table is referred to as a "quantization correspondence table").
), And as described below,
Quantization is performed using this table.

【0023】実際の量子化の手順は以下の通りである。
はじめに、変換点の座標Y1、Y2を、それぞれ量子化周
期N1、N2で割ったときの商b1、b2と剰余r1、r2
求める。すると、この剰余(r1,r2)は、上式(1
3)に示す基本領域内に含まれる。
An actual quantization procedure is as follows.
First , quotients b 1 , b 2 and remainders r 1 , r 2 when the coordinates Y 1 , Y 2 of the transformation point are divided by the quantization periods N 1 , N 2 are obtained. Then, the remainder (r 1 , r 2 ) is calculated by the above equation (1)
It is included in the basic area shown in 3).

【0024】次に、上で定義した量子化対応表を用いて
(r1,r2)の量子化値(q1,q2)(以後局所量子化と
呼ぶ)を求める。そして、商b1、b2と局所量子化値q
1、q2から(Y1,Y2)の量子化値(Yq1,Yq2)を、
式(14)により算出する。
Next, determine the using a quantization correspondence table defined above (r 1, r 2) quantized values (q 1, q 2) (hereinafter referred to as local quantization). Then, the quotients b 1 and b 2 and the local quantization value q
1, from the q 2 (Y 1, Y 2 ) quantization values of the (Y q1, Y q2),
It is calculated by equation (14).

【0025】[0025]

【数7】 (Equation 7)

【0026】ここに、M1、M2は自然数で、それぞれq
1、q2のダイナミックレンジを表す。このM1、M2は、
量子化値のスケールではかったときの基本領域の大きさ
を表しており、次に述べる逆量子化の周期を表す(この
ため、以後M1、M2のことを「逆量子化周期」と呼ぶこ
とにする)。
Here, M 1 and M 2 are natural numbers, and q
1 and q 2 represent the dynamic range. These M 1 and M 2 are
The scale of the quantized value represents the size of the basic region when it is scaled, and represents the period of inverse quantization described below (for this reason, hereinafter, M 1 and M 2 are referred to as “inverse quantization period”). I will call it).

【0027】次に、2×2行列変換の逆量子化について
述べる。逆量子化も量子化と同様の手順で行うことがで
きる。
Next, the inverse quantization of the 2 × 2 matrix transformation will be described. Inverse quantization can be performed in the same procedure as quantization.

【0028】まず、量子化値Yq1、Yq2をそれぞれ前述
の逆量子化周期M1、M2で割り、商b′1、b′2と剰余
q′1、q′2を求める。
Firstly, divided by the quantization value Y q1, inverse quantization period described above Y q2 respectively M 1, M 2, obtains the quotient b '1, b' 2 and a remainder q '1, q' 2.

【0029】次に、量子化対応表とは逆の対応関係を記
述した表(以後「逆量子化対応表」と呼ぶ)を参照し
て、(q′1,q′2)に対応する(r′1,r′2)を求め
る。そして、逆量子化値(Y1,Y2)を次式(15)に
より算出する。
Next, with reference to a table describing a correspondence relationship opposite to the quantization correspondence table (hereinafter referred to as an “inverse quantization correspondence table”), (q ′ 1 , q ′ 2 ) is corresponded ( r ′ 1 , r ′ 2 ). Then, the inverse quantization value (Y 1 , Y 2 ) is calculated by the following equation (15).

【0030】[0030]

【数8】 (Equation 8)

【0031】以上が2×2行列変換の量子化、逆量子化
である。
The above is the quantization and inverse quantization of the 2 × 2 matrix conversion.

【0032】上式(12)に示す4×4行列の変換で得
られる(X1,X7,X3,X5)の量子化では、以下の関係
を利用する。すなわち、(X1,X7)が定まると、ある
整数ベクトル(s3,s5)が定まり、(X3,X5)の取り
得る値は、次式(16)に制限されることを利用する。
In the quantization of (X 1 , X 7 , X 3 , X 5 ) obtained by the conversion of the 4 × 4 matrix shown in the above equation (12), the following relationship is used. That is, when (X 1 , X 7 ) is determined, a certain integer vector (s 3 , s 5 ) is determined, and the possible values of (X 3 , X 5 ) are limited to the following equation (16). Use.

【0033】[0033]

【数9】 (Equation 9)

【0034】ここに、g、hは、上式(12)のa1
3、a5、a7より、次式(17)と表される整数であ
る。
Here, g and h are a 1 ,
From a 3 , a 5 , and a 7 , it is an integer represented by the following equation (17).

【0035】[0035]

【数10】 (Equation 10)

【0036】このように、ある(X1,X7)が定まった
ときに変換係数(X3,X5)の取り得る値全体の構造
は、ベクトル(h,g)、(−g,h)で定まる格子構造
が、整数ベクトル(s3,s5)(以後「代表元」と呼
ぶ)の分だけずれた構造となる。このような関係が成り
立つことを利用して、(X1,X7)と(X3,X5)を個別
に量子化する。
As described above, when a certain (X 1 , X 7 ) is determined, the structure of the entire possible value of the conversion coefficient (X 3 , X 5 ) is represented by the vector (h, g), (-g, h ) Is a structure shifted by the integer vector (s 3 , s 5 ) (hereinafter referred to as “representative element”). Utilizing such a relationship, (X 1 , X 7 ) and (X 3 , X 5 ) are individually quantized.

【0037】変換係数X1,X7については、幅k1、k7
(k1,k7は自然数)で線形量子化して量子化値
q1,Xq7を求める。このときに同時に量子化残差(r
1,r7)も求めておく。一方、変換係数(X3,X5)につ
いては、上式(16)の関係を利用して量子化する。こ
の量子化では、(X3,X5)を、大局的な格子構造を表
す(p3,p5)=(X3−s3,X5−s5)(以後大局信号
と呼ぶ)の部分と局所的信号成分を表す(s3,s5
(以後「代表元」と呼ぶ)の部分に分けて量子化する。
For the conversion coefficients X 1 and X 7 , the widths k 1 and k 7
( Where k 1 and k 7 are natural numbers) are linearly quantized to obtain quantized values X q1 and X q7 . At this time, the quantization residual (r
1 , r 7 ) is also determined. On the other hand, the transform coefficients (X 3 , X 5 ) are quantized using the relationship of the above equation (16). In this quantization, (X 3 , X 5 ) is represented by (p 3 , p 5 ) = (X 3 −s 3 , X 5 −s 5 ) representing a global lattice structure (hereinafter referred to as a global signal). (S 3 , s 5 ) representing parts and local signal components
(Hereinafter referred to as “representative element”) and quantized.

【0038】大局信号(p3,p5)の量子化は、上記特
願平7−249962号の方式と、上記平成8年8月2
3日付け特許出願の方式とでは異なる。
The quantization of the global signal (p 3 , p 5 ) is performed by the method disclosed in Japanese Patent Application No. Hei 7-249962 and the method disclosed in
This is different from the three-day patent application method.

【0039】上記特願平7−249962号では、前述
の2×2行列変換の可逆量子化と同様に量子化し、上記
平成8年8月23日付特許出願では、線形量子化して大
局量子化値(pq3,pq5)を得ている。このうち上記平
成8年8月23日付特許出願の方が、本来の離散コサイ
ン変換係数との差を小さくできる。
In the Japanese Patent Application No. 7-249962, quantization is performed in the same manner as the above-mentioned reversible quantization of 2 × 2 matrix transformation. In the above-mentioned patent application filed on Aug. 23, 1996, linear quantization is applied to the global quantization value. (P q3 , p q5 ). Among them, the above-mentioned patent application filed on Aug. 23, 1996 can reduce the difference from the original discrete cosine transform coefficient.

【0040】一方、代表元(s3,s5)の量子化は、上
記いずれの先行特許出願においても、量子化を定義した
表を用いて行う。ただし、(s3,s5)から量子化値
(sq3,sq5)を直接求めるのではなく、前述の量子化
残差(r1,r7)から、(r1,r7)と(sq3,sq5)の
対応関係を記述した表を用いて量子化値(sq3,sq5
を求める。このようにして求まった大局量子化値
(pq3,pq5)と局所量子化値(sq3,sq5)を組み合わ
せて、量子化値(Xq3,Xq5)を算出する。
On the other hand, the quantization of the representative elements (s 3 , s 5 ) is performed using a table defining the quantization in any of the above-mentioned prior patent applications. However, (s 3, s 5) instead of obtaining the quantized value (s q3, s q5) directly from the quantized residual of the aforementioned (r 1, r 7), and (r 1, r 7) (s q3, s q5) quantization value using a table describing the correspondence between (s q3, s q5)
Ask for. The global quantization values (p q3 , p q5 ) and the local quantization values (s q3 , s q5 ) thus obtained are combined to calculate the quantization values (X q3 , X q5 ).

【0041】4×4行列変換の逆量子化は、次のように
行う。量子化値(Xq1,Xq7)の逆量子化では、まず線
形逆量子化する。
The inverse quantization of the 4 × 4 matrix conversion is performed as follows. In the inverse quantization of the quantization values (X q1 , X q7 ), first, linear inverse quantization is performed.

【0042】次に、これに量子化残差(r1,r7)を加
えて変換係数(X1,X7)を算出する。量子化残差
(r1,r7)は、(Xq3,Xq5)の逆量子化で求まる局所
量子化値(sq3,sq5)から表を用いて求める。
Next, the transform coefficients (X 1 , X 7 ) are calculated by adding the quantization residuals (r 1 , r 7 ) to this. The quantization residuals (r 1 , r 7 ) are obtained from a local quantization value (s q3 , s q5 ) obtained by inverse quantization of (X q3 , X q5 ) using a table.

【0043】これに対し、量子化値(Xq3,Xq5)の逆
量子化では、まずこれを大局量子化値(pq3,pq5)と
局所量子化値(sq3,sq5)に分離する。
On the other hand, in the inverse quantization of the quantization values (X q3 , X q5 ), first, they are converted into global quantization values (p q3 , p q5 ) and local quantization values (s q3 , s q5 ). To separate.

【0044】次に、大局量子化値(pq3,pq5)から、
上記特願平7−249962号では表を用いて、上記平
成8年8月23日付特許出願では、上式(16)の逆変
換を用いて大局信号(p3,p5)を求める。
Next, from the global quantization values (p q3 , p q5 ),
In the above-mentioned Japanese Patent Application No. 7-249962, a table is used, and in the above-mentioned patent application filed on August 23, 1996, the global signal (p 3 , p 5 ) is obtained by using the inverse transform of the above equation (16).

【0045】一方、局所量子化値(sq3,sq5)から
は、量子化で用いたものとは逆の対応関係を記述した表
を用いて、量子化残差(r1,r7)を求める。この量子
化残差(r1,r7)から、上述のように(X1,X7)が求
まり、(X1,X7)から表を参照して代表元(s3,s5
が求まる。最後に、この(s3,s5)を前述の大局信号
(p3,p5)に加えて、変換係数(X3,X5)を求める。
以上で逆量子化は完了する。
On the other hand, from the local quantization values (s q3 , s q5 ), the quantization residuals (r 1 , r 7 ) are obtained using a table describing the inverse relationship to that used in the quantization. Ask for. From the quantization residual (r 1 , r 7 ), (X 1 , X 7 ) is obtained as described above, and the representative element (s 3 , s 5 ) is obtained by referring to the table from (X 1 , X 7 ).
Is found. Finally, the transform coefficients (X 3 , X 5 ) are obtained by adding the (s 3 , s 5 ) to the global signal (p 3 , p 5 ).
Thus, the inverse quantization is completed.

【0046】以上説明した2×2、あるいは4×4行列
変換の可逆量子化を、図15に示すように、式(4)か
ら式(12)までの各変換後に行うことで、変換結果に
含まれる冗長性を除くことが可能となる。
The lossless quantization of the 2 × 2 or 4 × 4 matrix conversion described above is performed after each conversion from Expressions (4) to (12) as shown in FIG. It is possible to eliminate the included redundancy.

【0047】この結果、符号化効率を劣化させることな
く可逆な符号化を実現できる。なお、量子化周期Ni
逆量子化周期Miの値を適切に調節することで、最終的
に得られる8元可逆離散コサイン変換の変換係数を本来
の離散コサイン変換のそれに近づけることができる。
As a result, lossless encoding can be realized without deteriorating the encoding efficiency. Note that the quantization period N i ,
By appropriately adjusting the value of the inverse quantization cycle M i , it is possible to make the finally obtained transform coefficient of the eight-way invertible discrete cosine transform close to that of the original discrete cosine transform.

【0048】[0048]

【発明が解決しようとする課題】しかしながら、上記先
行出願に記載された8元可逆離散コサイン変換において
は、従来方式の8元離散コサイン変換との互換性が十分
でないという問題点がある。すなわち、上記した8元可
逆離散コサイン変換を用いて符号化した信号を、従来方
式の8元離散コサイン逆変換を用いて復号した場合、あ
るいは、その逆の場合に得られる再生信号の品質が十分
でなかった。
However, the 8-ary reversible discrete cosine transform described in the above-mentioned prior application has a problem that compatibility with the conventional 8-ary discrete cosine transform is not sufficient. That is, when the signal coded using the 8-ary reversible discrete cosine transform described above is decoded using the inverse 8-ary discrete cosine transform of the conventional method, or the quality of the reproduced signal obtained in the reverse case is sufficient. Was not.

【0049】その理由は、上記した先行出願における8
元可逆離散コサイン変換の変換係数と、本来の8元離散
コサイン変換の変換係数のダイナミックレンジに差があ
るためである。
The reason is that 8
This is because there is a difference between the dynamic coefficient of the transform coefficient of the original reversible discrete cosine transform and the transform coefficient of the original 8-ary discrete cosine transform.

【0050】上述したように、先行出願に係る8元可逆
離散コサイン変換においては、量子化周期や逆量子化周
期といったパラメータをうまく合わせることで、得られ
る変換係数が本来の8元離散コサイン変換係数に近づけ
るようにしていた。しかし、これには限界があり、得ら
れる変換係数のダイナミックレンジは、本来の8元離散
コサイン変換係数から少しずれる、という問題があっ
た。
As described above, in the 8-ary reversible discrete cosine transform according to the prior application, the transform coefficients obtained by properly matching the parameters such as the quantization cycle and the inverse quantization cycle can be used as the original 8-ary discrete cosine transform coefficients. Was approaching. However, there is a limit to this, and there is a problem that the dynamic range of the obtained transform coefficients slightly deviates from the original 8-ary discrete cosine transform coefficients.

【0051】したがって、本発明は、上記事情に鑑みて
なされたものであって、その目的は、可逆な離散コサイ
ン変換の変換係数を本来の離散コサイン変換係数に近づ
けることで、従来方式の離散コサイン変換と、可逆な離
散コサイン変換と、の互換性を高める、画像符号化方式
を提供することにある。より詳細には、本発明の目的
は、8元可逆離散コサイン変換を用いて符号化した信号
を、従来の8元離散コサイン変換を用いて復号したとき
に、得られる再生信号の品質を向上させる、ようにした
画像符号化方式を提供することにある。
Accordingly, the present invention has been made in view of the above circumstances, and an object of the present invention is to make the transform coefficient of the reversible discrete cosine transform close to the original discrete cosine transform coefficient, thereby achieving the discrete cosine transform of the conventional method. It is an object of the present invention to provide an image coding method that enhances compatibility between a transform and a reversible discrete cosine transform. More specifically, an object of the present invention is to improve the quality of a reproduced signal obtained when a signal encoded using an 8-ary reversible discrete cosine transform is decoded using a conventional 8-ary discrete cosine transform. It is another object of the present invention to provide an image coding method as described above.

【0052】[0052]

【課題を解決するための手段】前記目的を達成するた
め、本願第1の発明は、画像信号を符号化する方式であ
って、画像信号に対して可逆な離散コサイン変換を行っ
て変換係数を求める手段と、JPEG互換用量子化テー
ブルを記憶しておく手段と、変換係数とJPEG互換用
量子化テーブルを可変長符号化して、符号化された信号
を出力する手段を有することを特徴とする。
In order to achieve the above object, the first invention of the present application is a method for encoding an image signal, and performs a reversible discrete cosine transform on the image signal to obtain a transform coefficient. Means for obtaining, a means for storing a quantization table for JPEG compatibility, and means for performing variable length coding on the transform coefficients and the quantization table for JPEG compatibility and outputting a coded signal. .

【0053】従来の可逆離散コサイン変換を用いた画像
符号化方式では、量子化テーブルを利用していなかっ
た。本願第1の発明においては、この量子化テーブルを
用いることで、離散コサイン変換に基づく画像符号化の
国際標準であるJPEG(Joint Photographic Coding
Experts Group)との互換性を向上させている。
The conventional image coding method using the reversible discrete cosine transform does not use a quantization table. In the first invention of this application, by using this quantization table, JPEG (Joint Photographic Coding), which is an international standard for image coding based on discrete cosine transform, is used.
Experts Group).

【0054】また本願第1の発明は、固定の量子化テー
ブルを蓄えておく記憶装置を用意するだけで簡単に実現
できるという利点を有する。
The first invention of the present application has an advantage that it can be easily realized only by preparing a storage device for storing a fixed quantization table.

【0055】本願第2の発明は、動画像信号を符号化す
る方式であって、過去に符号化された画像と符号化対象
画像との間で、動き推定を行って動きベクトルを求める
手段と、動きベクトルを用いて動き補償を行って、過去
に符号化された画像から予測画像を作成する手段と、予
測画像を符号化対象画像から減じ、予測誤差画像を作成
する手段と、予測誤差画像に対して可逆な離散コサイン
変換を行って、変換係数を算出する手段と、MPEG
(Motion Picture Experts Group)互換用量子化マトリ
クスを記憶しておく手段と、変換係数とMPEG互換用
量子化マトリクスと動きベクトルを可変長符号化して、
その結果を出力する手段と、を有することを特徴とす
る。
The second invention of the present application is a method for encoding a moving image signal, comprising means for estimating a motion between a previously encoded image and an image to be encoded to obtain a motion vector. Means for performing motion compensation using a motion vector to generate a predicted image from a previously coded image, means for subtracting the predicted image from the image to be coded, and generating a predicted error image, Means for performing a reversible discrete cosine transform on, and calculating a transform coefficient;
(Motion Picture Experts Group) means for storing a quantization matrix for compatibility, variable length coding of a transform coefficient, a quantization matrix for MPEG compatibility and a motion vector,
Means for outputting the result.

【0056】本願第2の発明も本願第1の発明と同様
に、従来は用いていなかった量子化マトリクスを用いる
ことで、動画像符号化の国際標準であるMPEGとの互
換性を向上させている。本願第2の発明も、上記本願第
1の発明と同様に、固定の量子化マトリクス値を蓄えて
おく記憶装置を用意するだけで簡単に実現できるという
利点を有する。
Similarly to the first invention of the present application, the second invention of the present application improves the compatibility with MPEG, which is an international standard for video coding, by using a quantization matrix that has not been used conventionally. I have. The second invention of the present application also has an advantage that it can be easily realized simply by preparing a storage device for storing a fixed quantization matrix value, similarly to the first invention of the present application.

【0057】また本願第3の発明は、画像信号を符号化
する方式であって、画像信号に可逆な離散コサイン変換
を行って、可逆離散コサイン変換係数を求める手段と、
画像信号に離散コサイン変換を行って、離散コサイン変
換係数を求める手段と、可逆離散コサイン変換係数の逆
量子化値と、離散コサイン変換係数の差が小さくなるよ
うなJPEG互換用量子化テーブルを算出して出力する
手段と、可逆離散コサイン変換係数と、JPEG互換用
量子化テーブルを可変長符号化して符号化された信号を
出力する手段と、を有することを特徴とする。
The third invention of the present application is a system for encoding an image signal, which performs a reversible discrete cosine transform on the image signal to obtain a reversible discrete cosine transform coefficient.
Means for performing a discrete cosine transform on an image signal to obtain a discrete cosine transform coefficient, and calculating a JPEG compatible quantization table that reduces the difference between the inverse quantized value of the reversible discrete cosine transform coefficient and the discrete cosine transform coefficient And a means for outputting a lossless discrete cosine transform coefficient and a signal encoded by performing variable length encoding on a quantization table for JPEG compatibility.

【0058】本願第3の発明においては、適切な量子化
テーブルの値を逐次算出することで、固定の量子化テー
ブルを用いる場合に比べ、JPEGとの互換性を適応的
に向上できる。
In the third aspect of the present invention, the compatibility with JPEG can be adaptively improved by sequentially calculating an appropriate quantization table value, as compared with the case where a fixed quantization table is used.

【0059】本願第4の発明は、動画像信号を符号化す
る方式であって、過去に符号化された画像と、符号化対
象画像との間で動き推定を行って、動きベクトルを求め
る手段と、動きベクトルを用いて動き補償を行って、過
去に符号化された画像から第1の予測画像を作成する手
段と、第1の予測画像を符号化対象画像から減じて、第
1の予測誤差画像を作成する手段と、第1の予測誤差画
像に対して可逆な離散コサイン変換を行って、可逆離散
コサイン変換係数を算出する手段と、後述する第2の予
測画像を符号化対象画像から減じて、第2の予測誤差画
像を作成する手段と、第2の予測誤差信号に対して離散
コサイン変換を行って、離散コサイン変換係数を算出す
る手段と、可逆離散コサイン変換係数の逆量子化値と、
離散コサイン変換係数の差が小さくなるようなMPEG
互換用量子化マトリクスを算出して出力するとともに、
MPEG互換用量子化マトリクスを用いた時の可逆離散
コサイン変換係数の逆量子化値を出力する手段と、逆量
子化値に対して、離散コサイン逆変換を行って、予測誤
差再生画像を算出する手段と、予測誤差再生画像に第2
の予測画像を加算して、再生画像を作成する手段と、動
きベクトルを用いて動き補償を行って、再生画像から第
2の予測画像を作成する手段と、を有することを特徴と
する。
The fourth invention of the present application is a system for encoding a moving image signal, which is a means for estimating a motion between a previously encoded image and an image to be encoded to obtain a motion vector. Means for performing motion compensation using a motion vector to generate a first predicted image from an image encoded in the past, and subtracting the first predicted image from the image to be encoded to obtain a first predicted image. Means for creating an error image; means for performing a reversible discrete cosine transform on the first prediction error image to calculate a reversible discrete cosine transform coefficient; Means for generating a second prediction error image, performing discrete cosine transform on the second prediction error signal to calculate a discrete cosine transform coefficient, and inverse quantization of the reversible discrete cosine transform coefficient. Value and
MPEG that reduces the difference between discrete cosine transform coefficients
Calculates and outputs the compatible quantization matrix,
Means for outputting an inverse quantized value of a reversible discrete cosine transform coefficient when using a quantization matrix for MPEG compatibility, and inverse discrete cosine transform for the inverse quantized value to calculate a prediction error reproduced image Means and the second
And a means for adding a predicted image to generate a reproduced image, and a means for performing motion compensation using a motion vector to generate a second predicted image from the reproduced image.

【0060】本願第4の発明も、上記本願第3の発明と
同様に、固定の量子化マトリクスを用いる場合に比べ、
MPEGとの互換性を適応的に向上できる。
In the fourth invention of the present application, as in the third invention of the present application, compared with the case of using a fixed quantization matrix,
Compatibility with MPEG can be adaptively improved.

【0061】本願第5の発明は、上記本願第3の発明ま
たは上記本願第4の発明の画像符号化方式の好ましい一
形態であって、これらのJPEG/MPEG互換用量子
化テーブル/マトリクスを算出する手段において、可逆
離散コサイン変換係数をJPEG/MPEG互換用量子
化テーブル/マトリクスの値に基づいて逆量子化して、
逆量子化値を求める手段と、離散コサイン変換係数と、
逆量子化値との差の二乗平均を、係数毎に算出する手段
と、二乗平均に基づいて、JPEG/MPEG互換用量
子化テーブル/マトリクスの値を修正して出力する手段
と、を有することを特徴とする。
A fifth aspect of the present invention is a preferred embodiment of the image encoding system of the third aspect of the present invention or the fourth aspect of the present invention, and calculates the JPEG / MPEG compatible quantization table / matrix. Means for inversely quantizing the reversible discrete cosine transform coefficients based on the values of a quantization table / matrix for JPEG / MPEG compatibility,
Means for determining an inverse quantization value, discrete cosine transform coefficients,
Means for calculating the mean square of the difference from the inverse quantization value for each coefficient, and means for correcting and outputting the value of the JPEG / MPEG compatible quantization table / matrix based on the mean square It is characterized by.

【0062】本願第5の発明では、可逆離散コサイン変
換係数と本来の離散コサイン変換係数の差を、総合的に
最小化する量子化テーブル/マトリクスを逐次算出でき
る。この方式で求まる量子化テーブル/マトリクスは、
これを用いると復号画質がもっとも良くなるという点
で、最適なものである。
According to the fifth aspect of the present invention, it is possible to sequentially calculate a quantization table / matrix that totally minimizes the difference between the reversible discrete cosine transform coefficient and the original discrete cosine transform coefficient. The quantization table / matrix obtained by this method is
This is optimal in that the decoding image quality is best when this is used.

【0063】さらに本願第6の発明は、上記第3または
上記第4の発明の画像符号化方式の一形態であって、こ
れらのJPEG/MPEG互換用量子化テーブル/マト
リクスを算出する手段において、可逆離散コサイン変換
係数Xq(i,j)から、逆量子化で整数化する前の値を
量子化テーブル/マトリクスで割ったものに相当する値
を求め、これをX′(i,j)とする手段と、離散コサ
イン変換係数XT(i,j)に、可逆離散コサイン変換係
数Xq(i,j)の値に応じて、微小数を加減算した値を
X′T(i,j)とする手段と、X′(i,j)とX′
T(i,j)に関する2次のモーメントに基づく演算によ
って、量子化テーブル/マトリクスを算出し、出力する
手段と、量子化テーブル/マトリクスを用いて、可逆離
散コサイン変換係数を逆量子化し、逆量子化値を出力す
る手段と、を有することを特徴とする。
Further, the sixth invention of the present application is an embodiment of the image coding system of the third or fourth invention, wherein the means for calculating the JPEG / MPEG compatible quantization table / matrix includes: From the reversible discrete cosine transform coefficient X q (i, j), a value equivalent to a value obtained by dividing a value before being converted to an integer by inverse quantization by a quantization table / matrix is obtained, and this is calculated as X ′ (i, j) And a value obtained by adding or subtracting a minute number to or from the discrete cosine transform coefficient X T (i, j) according to the value of the reversible discrete cosine transform coefficient X q (i, j) is represented by X ′ T (i, j). ), X ′ (i, j) and X ′
Means for calculating and outputting a quantization table / matrix by an operation based on a second moment related to T (i, j), and inversely quantizing the reversible discrete cosine transform coefficient using the quantization table / matrix, Means for outputting a quantized value.

【0064】本願第6の発明では、近似計算を導入する
ことで、量子化テーブル/マトリクス算出に要する処理
量を大幅に低減できる。
In the sixth aspect of the present invention, the processing amount required for the quantization table / matrix calculation can be significantly reduced by introducing the approximate calculation.

【0065】本願第7の発明は、上記第3または上記第
4の発明の画像符号化方式の一形態であって、これらの
JPEG/MPEG互換用量子化テーブル/マトリクス
を算出する手段において、第5の発明のJPEG/MP
EG互換用量子化テーブル/マトリクスを算出する手段
と、第6の発明のJPEG/MPEG互換用量子化テー
ブル/マトリクスを算出する手段と、を有することを特
徴とする。
The seventh invention of the present application is an aspect of the image coding system according to the third or fourth invention, wherein the means for calculating the JPEG / MPEG compatible quantization table / matrix includes: JPEG / MP of invention 5
It is characterized by having means for calculating a quantization table / matrix for EG compatibility and means for calculating a quantization table / matrix for JPEG / MPEG compatibility of the sixth invention.

【0066】本願第7の発明では、上記第5の発明と上
記第6の発明を適宜組み合わせることで、処理量を抑え
て、最適なものに非常に近い量子化テーブル/マトリク
スの算出を可能にする。
In the seventh invention of the present application, by appropriately combining the fifth invention and the sixth invention, it is possible to suppress the processing amount and calculate a quantization table / matrix very close to the optimum one. I do.

【0067】本願第8の発明は、8×8のブロックの二
次元信号に対して垂直方向、水平方向に可逆な8元離散
コサイン変換を行って、変換係数を求める変換方式であ
って、直流成分を算出するときに経由する、行列
The eighth invention of the present application is a conversion method for performing a reversible 8-ary discrete cosine transform in the vertical and horizontal directions on a two-dimensional signal of an 8 × 8 block to obtain a transform coefficient. The matrix through which the components are calculated

【0068】[0068]

【数11】 [Equation 11]

【0069】に基づく6段の可逆量子化のうち、いずれ
か3段と残りの3段とで用いる量子化対応表を変えるこ
とで、可逆離散コサイン変換の直流成分と、本来の離散
コサイン変換の直流成分と、のダイナミックレンジ差を
なくすことを特徴とする。
The DC component of the reversible discrete cosine transform and the original discrete cosine transform are changed by changing the quantization correspondence table used for any three of the six reversible quantizations based on the above. It is characterized by eliminating the dynamic range difference between the DC component.

【0070】本願第8の発明では、8×8可逆離散コサ
イン変換係数と本来の8×8離散コサイン変換係数の直
流成分とのダイナミックレンジ差を完全に補償できるた
め、可逆離散コサイン変換を用いて符号化した画像を、
離散コサイン逆変換を用いて復号した場合の画質を大幅
に改善できる。
In the eighth invention of the present application, since the dynamic range difference between the 8 × 8 reversible discrete cosine transform coefficient and the DC component of the original 8 × 8 discrete cosine transform coefficient can be completely compensated for, the reversible discrete cosine transform is used. The encoded image is
The image quality when decoding is performed using the inverse discrete cosine transform can be greatly improved.

【0071】[0071]

【発明の実施の形態】本発明の実施の形態について図面
を参照して以下に説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0072】[0072]

【実施の形態1】図1は、本願第1の発明の一実施の形
態の構成を示すブロック図である。図1を参照して、可
逆離散コサイン変換回路1は、画像をブロック毎に可逆
離散コサイン変換して、変換係数を出力する。可変長符
号化器2は、可逆離散コサイン変換回路1の出力と、J
PEG互換用量子化テーブルと、を可変長符号化し、そ
の結果を出力する。
Embodiment 1 FIG. 1 is a block diagram showing a configuration of an embodiment of the first invention of the present application. Referring to FIG. 1, a reversible discrete cosine transform circuit 1 performs reversible discrete cosine transform on an image for each block and outputs transform coefficients. The variable length encoder 2 outputs the output of the reversible discrete cosine transform circuit 1 and J
The variable-length encoding is performed on the quantization table for PEG compatibility and the result is output.

【0073】次に、このJPEG互換用量子化テーブル
の値の算出手法について説明する。
Next, a method of calculating the value of the quantization table for JPEG compatibility will be described.

【0074】量子化テーブルとは、離散コサイン変換係
数毎に量子化幅を変えるために用いるテーブルであり、
静止画像符号化の国際標準であるJPEGで採用されて
いる。このテーブルの各値は、その位置にある変換係数
の量子化幅を決定する。すなわち、量子化テーブルのi
行j列(i=0,…,7、j=0,…,7)の値をW(i,
j)で表すことにすると、JPEG(拡張方式)におい
ては、変換係数の(i,j)成分(ただし、(i,j)≠
(0,0))の量子化値Xq(i,j)と逆量子化値X
(i,j)の関係は、次式(18)、(19)に示す通
りである。
The quantization table is a table used to change the quantization width for each discrete cosine transform coefficient.
It is adopted by JPEG, which is an international standard for still image coding. Each value in this table determines the quantization width of the transform coefficient at that position. That is, i of the quantization table
The value of row j column (i = 0,..., 7; j = 0,.
j), in JPEG (extended system), the (i, j) component of the transform coefficient (where (i, j) ≠
(0,0)) and the inverse quantized value X q (i, j)
The relationship of (i, j) is as shown in the following equations (18) and (19).

【0075】[0075]

【数12】 (Equation 12)

【0076】ここに、sは量子化スケールと呼ばれるパ
ラメータであり、i、jは依存しない。また、Sign
(y)は、次式(20)で表される値をとる。
Here, s is a parameter called a quantization scale, and i and j do not depend. Also, Sign
(Y) takes a value represented by the following equation (20).

【0077】[0077]

【数13】 (Equation 13)

【0078】上式(18)、及び(19)よりわかるよ
うに、この逆量子化によって、Xq(0,0)以外の変換
係数の値は約W(i,j)s/16倍される。
As can be seen from the above equations (18) and (19), the values of the transform coefficients other than X q (0,0) are multiplied by about W (i, j) s / 16 by this inverse quantization. You.

【0079】このように、復号器では、量子化された変
換係数値Xq(i,j)は、離散コサイン逆変換を行う前
に、逆量子化によって伸縮される。そして、その倍率
を、量子化テーブルによって変換係数ごとに自由に設定
できる。従って、可逆離散コサイン変換の変換係数を、
従来の離散コサイン逆変換により復号する場合に、復号
器で離散コサイン逆変換する前に、量子化テーブル値W
(i,j)を用いて、可逆離散コサイン変換の変換係数
のダイナミックレンジを補正すれば、復号画質を改善で
きる。
As described above, in the decoder, the quantized transform coefficient value X q (i, j) is scaled by inverse quantization before performing the inverse discrete cosine transform. Then, the magnification can be freely set for each transform coefficient by using a quantization table. Therefore, the transform coefficient of the reversible discrete cosine transform is
When decoding by the conventional inverse discrete cosine transform, the quantization table value W
If the dynamic range of the transform coefficient of the reversible discrete cosine transform is corrected using (i, j), the decoded image quality can be improved.

【0080】次に、可逆離散コサイン変換の変換係数
と、本来の離散コサイン変換係数と、のダイナミックレ
ンジの差について述べた後、量子化テーブルの値を算出
する手法について具体的に述べる。
Next, after describing the difference in the dynamic range between the transform coefficient of the reversible discrete cosine transform and the original discrete cosine transform coefficient, a method of calculating the value of the quantization table will be specifically described.

【0081】前述の通り、可逆離散コサイン変換の変換
係数と、本来の離散コサイン変換係数と、では、ダイナ
ミックレンジに差がある。これは、次に述べるように、
整数行列による線形変換によって拡大される割合と、表
を用いた可逆量子化で縮小される割合が、完全には一致
しない、ために生じる。
As described above, there is a difference in the dynamic range between the transform coefficient of the reversible discrete cosine transform and the original discrete cosine transform coefficient. This, as described below,
This occurs because the ratio of expansion by linear transformation using an integer matrix does not completely match the ratio of reduction by lossless quantization using a table.

【0082】可逆離散コサイン変換では、本来の離散コ
サイン変換を整数行列線形変換で近似する際に、変換基
底を拡大するため、得られる結果も拡大される。
In the reversible discrete cosine transform, when the original discrete cosine transform is approximated by an integer matrix linear transform, the transform base is enlarged, so that the obtained result is also enlarged.

【0083】これとは逆に、可逆量子化では、量子化後
の値は、量子化前に比べ、ダイナミックレンジが圧縮さ
れる。
On the contrary, in the reversible quantization, the value after quantization has a smaller dynamic range than that before quantization.

【0084】この圧縮によって、拡大された分が、ちょ
うど相殺されれば、ダイナミックレンジ差は生じない
が、一般には、この拡大と縮小の割合が完全には一致し
ないため、可逆離散コサイン変換の変換係数は、本来の
離散コサイン変換係数との間にダイナミックレンジ差を
有する。この差は、図15に示す2×2、4×4の各部
分変換で生じる。
If the expansion is just canceled by the compression, there is no dynamic range difference. However, in general, the ratio of the expansion and the reduction does not completely match. The coefficients have a dynamic range difference from the original discrete cosine transform coefficients. This difference occurs in each of the 2 × 2 and 4 × 4 partial transforms shown in FIG.

【0085】本来の8元離散コサイン変換は、図16に
示すように、分解できるが、この部分変換の差とは、具
体的には、図15と図16で対応する変換器で得られる
変換結果のダイナミックレンジ差、すなわち、変換器1
60と変換器180、変換器161と変換器181、変
換器162と変換器182、変換器163と変換器18
3、変換器164と変換器184、変換器165と変換
器185、変換器166と変換器186、変換器167
と変換器187、変換器168と変換器188で得られ
る変換結果のダイナミックレンジ差のことを意味する。
The original 8-ary discrete cosine transform can be decomposed as shown in FIG. 16, but the difference between the partial transforms is specifically determined by the transform obtained by the corresponding converter in FIG. 15 and FIG. The resulting dynamic range difference, ie, converter 1
60 and converter 180, converter 161 and converter 181, converter 162 and converter 182, converter 163 and converter 18
3, converter 164 and converter 184, converter 165 and converter 185, converter 166 and converter 186, converter 167
And the dynamic range difference between the conversion results obtained by the converter 187 and the converter 168 and the converter 188.

【0086】そして、最終的に得られる変換係数のダイ
ナミックレンジの差は、途中で経由した部分変換で生じ
る差を重畳したものとなる。
The difference in the dynamic range of the finally obtained transform coefficient is obtained by superimposing the difference caused by the partial transform that is passed on the way.

【0087】次に、このダイナミックレンジの差を算出
し、それに基づいて量子化マトリクス値を決定する手法
について述べる。
Next, a method of calculating the difference between the dynamic ranges and determining the quantization matrix value based on the difference will be described.

【0088】まず、2×2行列変換の場合について、可
逆離散コサイン変換のダイナミックレンジを求める。こ
の2×2行列によって、整数ベクトルを変換して得られ
る変換点の座標を(Y1,Y2)とし、変換行列の行ベク
トルの大きさをLとする。このとき、Y1、Y2の値は、
本来の離散コサイン変換のそれに対してL倍となる。こ
れは、図16に示す本来の離散コサイン変換の各部分変
換では、変換前後でベクトルの大きさが変化しないのに
対し、可逆離散コサイン変換の場合には、変換結果(Y
1,Y2)の大きさは、変換前のベクトルの大きさのL倍
となるためである。
First, in the case of the 2 × 2 matrix conversion, the dynamic range of the reversible discrete cosine transform is obtained. The coordinates of the conversion points obtained by converting the integer vector using the 2 × 2 matrix are (Y 1 , Y 2 ), and the size of the row vector of the conversion matrix is L. At this time, the values of Y 1 and Y 2 are
It becomes L times that of the original discrete cosine transform. This is because, in each partial transform of the original discrete cosine transform shown in FIG. 16, the magnitude of the vector does not change before and after the transform, whereas in the case of the reversible discrete cosine transform, the transform result (Y
This is because the magnitude of ( 1 , Y 2 ) is L times the magnitude of the vector before conversion.

【0089】一方、線形変換後の可逆量子化において
は、量子化周期を(N1,N2)、逆量子化周期を(M1,
2)とすると、Y1、Y2の値は、それぞれ約M1/N1
倍、約M2/N2倍に圧縮される。従って、可逆量子化後
に得られるY1、Y2の量子化値は、本来の離散コサイン
変換の場合に比べて約M1L/N1倍、約M2L/N2倍と
なる。
On the other hand, in the reversible quantization after the linear transformation, the quantization cycle is (N 1 , N 2 ) and the inverse quantization cycle is (M 1 ,
M 2 ), the values of Y 1 and Y 2 are respectively about M 1 / N 1
Approximately M 2 / N 2 times. Therefore, the quantized values of Y 1 and Y 2 obtained after the reversible quantization are about M 1 L / N 1 times and about M 2 L / N 2 times as compared with the case of the original discrete cosine transform.

【0090】次に、上式(12)に示す4×4行列変換
の場合について説明する。
Next, the case of the 4 × 4 matrix conversion shown in the above equation (12) will be described.

【0091】この場合は、行ベクトルの大きさをLとす
ると、上式(12)の変換で得られる(X1,X7,X3,X
5)は、本来の離散コサイン変換の場合に比べ、約L倍
になる。
In this case, assuming that the magnitude of the row vector is L, (X 1 , X 7 , X 3 , X
5 ) is about L times larger than the original discrete cosine transform.

【0092】一方、可逆量子化においては、上記平成8
年8月23日付け特許出願に記載の方式では、変換係数
(X1,X7)はそれぞれ幅k1、k7で線形量子化され、
変換係数(X3,X5)については、その大局信号部分は
幅L3、L5で線形量子化される。
On the other hand, in the reversible quantization,
In the method described in the patent application filed on Aug. 23, 2008, the transform coefficients (X 1 , X 7 ) are linearly quantized with widths k 1 and k 7 , respectively.
As for the transform coefficients (X 3 , X 5 ), the global signal portion is linearly quantized with widths L 3 and L 5 .

【0093】従って、この量子化で、X1、X7は、それ
ぞれ1/k1倍、1/k7倍に、X3、X5はそれぞれ1/
3倍、1/L5倍に圧縮される。このため、量子化後に
得られる(X1,X7,X3,X5)の量子化値は、本来の離
散コサイン変換の場合に比べ、それぞれ約L/k1倍、
L/k7倍、L/L3倍、L/L5倍となる。なお、4×
4可逆量子化として、上記特願平7−249962号記
載の方式を用いる場合には、次式(21)の行列
Therefore, in this quantization, X 1 and X 7 are respectively 1 / k 1 times and 1 / k 7 times, and X 3 and X 5 are respectively 1 / k.
L 3-fold, it is compressed to 1 / L 5-fold. For this reason, the quantized values of (X 1 , X 7 , X 3 , X 5 ) obtained after the quantization are approximately L / k 1 times, respectively, as compared with the case of the original discrete cosine transform.
L / k is 7 times, L / L is 3 times, and L / L is 5 times. 4x
(4) When the method described in Japanese Patent Application No. 7-249962 is used as the reversible quantization, the matrix of the following equation (21) is used.

【0094】[0094]

【数14】 [Equation 14]

【0095】による可逆量子化の量子化周期、逆量子化
周期をそれぞれ(N1 (2),N2 (2))、(M1 (2),M2 (2)
とすると、次式(22)とすることで、上述したこと
は、そのまま成り立つ。
The quantization cycle and the inverse quantization cycle of the reversible quantization according to (N 1 (2) , N 2 (2) ), (M 1 (2) , M 2 (2) ), respectively.
Then, by using the following equation (22), the above holds true.

【0096】[0096]

【数15】 (Equation 15)

【0097】ここに、m3、m5は、X3、X5の局所量子
化値のダイナミックレンジである。
Here, m 3 and m 5 are the dynamic ranges of the local quantization values of X 3 and X 5 .

【0098】このように算出される2×2、4×4変換
の変換結果のダイナミックレンジに基づいて、最終的に
得られる変換係数のダイナミックレンジを計算する。こ
こでは、同じ行列による変換では、同じ量子化対応表を
用いて量子化するものとして、このダイナミックレンジ
を算出する。
The dynamic range of the finally obtained conversion coefficient is calculated based on the dynamic range of the conversion result of the 2 × 2, 4 × 4 conversion calculated as described above. Here, in the conversion using the same matrix, the dynamic range is calculated assuming that quantization is performed using the same quantization correspondence table.

【0099】次式(23)、(24)で与えられる、図
15の行列
The matrix of FIG. 15 given by the following equations (23) and (24)

【0100】[0100]

【数16】 (Equation 16)

【0101】に関する可逆量子化での量子化周期を、そ
れぞれ、(N1 (0),N2 (0))、(N1 (1),N2 (1))とし、
逆量子化周期をそれぞれ(M1 (0),M2 (0))、(M1 (1),
2 (1))とする。
The quantization periods in the reversible quantization for (N 1 (0) , N 2 (0) ) and (N 1 (1) , N 2 (1) ) are as follows:
The inverse quantization periods are (M 1 (0) , M 2 (0) ), (M 1 (1) ,
M 2 (1) ).

【0102】このとき、8元可逆離散コサイン変換の変
換係数Xqi(i=0,…,7)のダイナミックレンジを、
β(i)とすると、本来の離散コサイン変換のそれを
「1」とした場合には、β(i)の値は、次式(25)
から(32)までのようになる。
At this time, the dynamic range of the transform coefficient X qi (i = 0,..., 7) of the 8-ary reversible discrete cosine transform is
If β (i) is assumed to be “1” in the original discrete cosine transform, the value of β (i) is expressed by the following equation (25).
To (32).

【0103】[0103]

【数17】 [Equation 17]

【0104】ここに、L(1)、Lは、それぞれ次式(3
3)、(34)で与えられ、上式(24)、(12)の
変換行列の行ベクトルの大きさをそれぞれ表している。
Here, L (1) and L are respectively expressed by the following equations (3)
3) and (34), and represent the magnitudes of the row vectors of the transformation matrices of the above equations (24) and (12), respectively.

【0105】[0105]

【数18】 (Equation 18)

【0106】さらに、8×8可逆離散コサイン変換の変
換係数の場合には、変換係数の(i,j)成分Xq(i,
j)のダイナミックレンジをβ(i,j)とすると、こ
れは、本来の8×8離散コサイン変換のダイナミックレ
ンジを「1」とするとき、式(25)から(32)まで
のβ(i)を用いて、次式(35)と表せる。
Further, in the case of the transform coefficient of the 8 × 8 reversible discrete cosine transform, the (i, j) component X q (i,
Assuming that the dynamic range of j) is β (i, j), when the dynamic range of the original 8 × 8 discrete cosine transform is “1”, β (i, j) in Expressions (25) to (32) is obtained. ) Can be expressed as the following equation (35).

【0107】[0107]

【数19】 [Equation 19]

【0108】もし、水平方向と垂直方向でβ(i)の値
が互いに異なるならば、水平方向、垂直方向のβ(i)
を、それぞれβh(i)、βv(i)として、β(i,
j)は次式(36)で表される。
If the values of β (i) are different from each other in the horizontal direction and the vertical direction, β (i) in the horizontal and vertical directions
As β h (i) and β v (i), respectively,
j) is represented by the following equation (36).

【0109】[0109]

【数20】 (Equation 20)

【0110】次に、このようにして求まる各変換係数の
ダイナミックレンジβ(i,j)より、量子化テーブル
値W(i,j)を決定する手法について説明する。
Next, a method of determining the quantization table value W (i, j) from the dynamic range β (i, j) of each transform coefficient thus obtained will be described.

【0111】前述のように、量子化値Xq(i,j)のダ
イナミックレンジは、復号の際に、逆量子化によってW
(i,j)s/16倍になる。よって、ダイナミックレ
ンジを補正するためには、次式(37)となるように量
子化テーブル値W(i,j)を決定すればよい。
As described above, the dynamic range of the quantized value X q (i, j) is set to W
(I, j) s / 16 times. Therefore, in order to correct the dynamic range, the quantization table value W (i, j) may be determined so as to satisfy the following equation (37).

【0112】[0112]

【数21】 (Equation 21)

【0113】量子化テーブル値W(i,j)は整数であ
ることを考慮すると、W(i,j)は次式(38)によ
って決定する。
Considering that the quantization table value W (i, j) is an integer, W (i, j) is determined by the following equation (38).

【0114】[0114]

【数22】 (Equation 22)

【0115】ここに、rnd(x)は、xの小数点以下を
四捨五入した値を返す関数である。もし、上式(38)
の値が、量子化テーブルの取り得る値の範囲外である場
合には、その値にもっとも近い、範囲内の整数を量子化
テーブル値とする。
Here, rnd (x) is a function that returns a value obtained by rounding off the decimal part of x. If the above equation (38)
Is outside the range of possible values of the quantization table, the integer within the range closest to the value is set as the quantization table value.

【0116】[0116]

【実施の形態2】図2は、本願第2の発明の実施の形態
の構成を示すブロック図である。ここで可逆離散コサイ
ン変換回路1については図1に示した前記実施の形態と
同様とされる。
Embodiment 2 FIG. 2 is a block diagram showing a configuration of an embodiment of the second invention of the present application. Here, the reversible discrete cosine transform circuit 1 is the same as in the embodiment shown in FIG.

【0117】図2を参照して、動き推定回路5は、過去
に符号化された画像を蓄える記憶装置(不図示)を有し
ており、この記憶装置に蓄えられた画像と、現在の符号
化対象画像の間で動き推定を行い、動きベクトルを出力
する。
Referring to FIG. 2, motion estimation circuit 5 has a storage device (not shown) for storing previously coded images, and stores the image stored in this storage device and the current code. Motion estimation is performed between images to be converted, and a motion vector is output.

【0118】予測器4は、動き推定回路5で求まった動
きベクトルに基づいて、動き推定の参照画像に対して動
き補償を行い、予測画像を作成する。そして、この予測
画像を出力する。
The predictor 4 performs motion compensation on a reference image for motion estimation based on the motion vector obtained by the motion estimating circuit 5 to create a predicted image. Then, the prediction image is output.

【0119】加算器3は、符号化対象となる入力画像か
ら予測器4の出力である予測画像を減じ、予測誤差画像
を作成する。
The adder 3 subtracts the predicted image output from the predictor 4 from the input image to be encoded, and creates a prediction error image.

【0120】可変長符号化器6は、可逆離散コサイン変
換回路1の出力である変換係数と、動き推定回路1から
出力される動きベクトル、MPEG互換用量子化マトリ
クスを可変長符号化して、その結果を出力する。
The variable-length encoder 6 performs variable-length encoding on the transform coefficient output from the reversible discrete cosine transform circuit 1, the motion vector output from the motion estimating circuit 1, and the quantization matrix for MPEG compatibility. Output the result.

【0121】次に、図2に示したこの実施の形態の回路
の動作について説明する。
Next, the operation of the circuit of this embodiment shown in FIG. 2 will be described.

【0122】まず、動き推定回路5において、符号化対
象画像と既に符号化された画像との間で動き推定が行わ
れ、マクロブロックごとに動きベクトルが算出される。
そして、予測器4において、求まった動きベクトルに基
づいて、既に符号化された画像から予測画像が作られ
る。この予測画像は、加算器3において符号化対象画像
から減じられ、予測誤差画像が求まる。ただし、この予
測誤差画像において、イントラブロックについては、予
測誤差ではなく、原信号値が入る。
First, in the motion estimation circuit 5, motion estimation is performed between the image to be coded and the already coded image, and a motion vector is calculated for each macroblock.
Then, the predictor 4 generates a predicted image from the already encoded image based on the obtained motion vector. This predicted image is subtracted from the encoding target image in the adder 3 to obtain a prediction error image. However, in this prediction error image, the original signal value is entered for the intra block instead of the prediction error.

【0123】この予測誤差画像は、可逆離散コサイン変
換回路1において、ブロックごとに可逆離散コサイン変
換が行われ、変換係数が算出される。この変換係数と、
動きベクトルと、予め定められたMPEG互換用量子化
マトリクスは、可変長符号化器6において、可変長符号
化される。
This predictive error image is subjected to a reversible discrete cosine transform for each block in a reversible discrete cosine transform circuit 1 to calculate a transform coefficient. This conversion factor,
The motion vector and a predetermined quantization matrix for MPEG compatibility are subjected to variable-length encoding in a variable-length encoder 6.

【0124】次に、この量子化マトリクス値について説
明する。
Next, the quantization matrix value will be described.

【0125】量子化マトリクスとは、離散コサイン変換
係数毎に量子化幅を変えるために用いられる行列であ
り、動画像符号化の国際標準であるMPEGで採用され
ている。基本的には、JPEGで用いる量子化テーブル
と同様であり、この行列の各成分は、その位置にある変
換係数の量子化幅を決定する。
The quantization matrix is a matrix used to change the quantization width for each discrete cosine transform coefficient, and is employed in MPEG which is an international standard for moving picture coding. Basically, it is the same as the quantization table used in JPEG, and each component of this matrix determines the quantization width of the transform coefficient at that position.

【0126】量子化マトリクスの(i,j)成分をW
(i,j)(i=0,…,7、j=0,…,7)で表すこと
にすると、イントラブロック直流成分以外の変換係数に
関しては、その(i,j)成分の量子化値Xq(i,j)
と逆量子化値X(i,j)の関係は、次式(39)、
(40)に示す通りである。
The (i, j) component of the quantization matrix is represented by W
When expressed by (i, j) (i = 0,..., 7; j = 0,..., 7), for the transform coefficients other than the intra-block DC component, the quantization value of the (i, j) component X q (i, j)
And the inverse quantization value X (i, j) are expressed by the following equation (39):
This is as shown in (40).

【0127】[0127]

【数23】 (Equation 23)

【0128】ここに、sは量子化スケールと呼ばれるパ
ラメータであり、i、jには依存しない。また、Sign
(y)は上式(20)で表される値、またkは次式(4
1)で表される値である。
Here, s is a parameter called a quantization scale, and does not depend on i and j. Also, Sign
(Y) is the value represented by the above equation (20), and k is the following equation (4)
This is the value represented by 1).

【0129】[0129]

【数24】 (Equation 24)

【0130】上式(39)、(40)よりわかるよう
に、この逆量子化により、変換係数の値は約W(i,
j)s/16倍される。この点に着目し、JPEG互換
用量子化テーブルを求めるのと同一の手法により、MP
EG互換用量子化マトリクスを求める。すなわち、上式
(35)により求まる各変換係数のダイナミックレンジ
β(i,j)から、上式(38)に従って、量子化マト
リクス値W(i,j)を決定する。
As can be seen from the above equations (39) and (40), the value of the transform coefficient is about W (i,
j) Multiplied by s / 16. Focusing on this point, the same method as that for obtaining the quantization table for JPEG compatibility is used.
Obtain a quantization matrix for EG compatibility. That is, the quantization matrix value W (i, j) is determined according to the above equation (38) from the dynamic range β (i, j) of each transform coefficient obtained by the above equation (35).

【0131】[0131]

【実施の形態3】図3は、本願第3の発明の一実施の形
態の構成を示すブロック図である。ここで、可逆離散コ
サイン変換回路1、可変長符号化器2については、図1
に示した前記第1の実施の形態と同じである。
Third Embodiment FIG. 3 is a block diagram showing a configuration of an embodiment of the third invention of the present application. Here, the reversible discrete cosine transform circuit 1 and the variable length encoder 2 are shown in FIG.
Is the same as that of the first embodiment shown in FIG.

【0132】図3を参照して、離散コサイン変換回路1
1は、画像をブロックごとに離散コサイン変換して、変
換係数を出力する。JPEG/MPEG互換用量子化テ
ーブル/マトリクス生成装置12は、可逆離散コサイン
変換回路1と離散コサイン変換回路11からそれぞれ出
力される変換係数値に基づいて量子化テーブル/マトリ
クスを生成し、その値を出力する。このJPEG/MP
EG互換用量子化テーブル/マトリクス生成装置12と
しては、例えば上記した第5、第6、第7のもの発明を
用いる、ことができる。
Referring to FIG. 3, discrete cosine transform circuit 1
1 performs discrete cosine transform of the image for each block and outputs a transform coefficient. The JPEG / MPEG compatible quantization table / matrix generation device 12 generates a quantization table / matrix based on the transform coefficient values output from the reversible discrete cosine transform circuit 1 and the discrete cosine transform circuit 11, respectively, and Output. This JPEG / MP
As the EG compatible quantization table / matrix generation device 12, for example, the fifth, sixth, and seventh inventions described above can be used.

【0133】次に、図3に示した実施の形態の回路の動
作について説明する。
Next, the operation of the circuit of the embodiment shown in FIG. 3 will be described.

【0134】画像信号が可逆離散コサイン変換回路1に
て可逆離散コサイン変換されるまでは、図1に示した実
施の形態と同様とされる。図3を参照して、この実施の
形態においては、これと同時に、離散コサイン変換回路
11において、画像信号をブロック毎に離散コサイン変
換する。
The process until the image signal is subjected to the reversible discrete cosine transform by the reversible discrete cosine transform circuit 1 is the same as that of the embodiment shown in FIG. Referring to FIG. 3, in this embodiment, at the same time, discrete cosine transform circuit 11 performs discrete cosine transform on the image signal for each block.

【0135】そして可逆離散コサイン変換係数と離散コ
サイン変換係数との値から、JPEG/MPEG互換用
量子化テーブル/マトリクス生成装置12において、量
子化テーブル/マトリクス値が算出される。
Then, a quantization table / matrix value is calculated in the JPEG / MPEG compatible quantization table / matrix generation device 12 from the values of the reversible discrete cosine transform coefficient and the discrete cosine transform coefficient.

【0136】量子化テーブル/マトリクス値は、復号器
側で得られる可逆離散コサイン変換係数の逆量子化値
と、本来の離散コサイン変換係数との差を小さくするよ
うに決定される。より具体的には、量子化テーブル/マ
トリクスを算出する期間(例えばピクチャ)内で、両者
の平均値の差を小さくするような量子化テーブル/マト
リクス値を、各(i,j)成分ごとに算出する。そし
て、可変長符号化器2において、可逆離散コサイン変換
係数、動きベクトル、量子化テーブル/マトリクス値は
可変長符号化される。
The quantization table / matrix value is determined so as to reduce the difference between the inverse quantized value of the reversible discrete cosine transform coefficient obtained on the decoder side and the original discrete cosine transform coefficient. More specifically, in a period (for example, a picture) for calculating the quantization table / matrix, a quantization table / matrix value that reduces the difference between the average values of the two is assigned to each (i, j) component. calculate. Then, in the variable length encoder 2, the lossless discrete cosine transform coefficient, the motion vector, and the quantization table / matrix value are subjected to variable length encoding.

【0137】[0137]

【実施の形態4】図4は、本願第4の発明の一実施の形
態の構成を示すブロック図である。図4を参照すると、
可逆離散コサイン変換回路1、加算器3、予測器4、動
き推定回路5、可変長符号化器6については、図2に示
した前記実施の形態と同様のものとされている。また、
離散コサイン変換回路11は、図3に示した前記実施の
形態3と同様のものとされている。
Fourth Embodiment FIG. 4 is a block diagram showing a configuration of an embodiment of the fourth invention of the present application. Referring to FIG.
The reversible discrete cosine transform circuit 1, the adder 3, the predictor 4, the motion estimating circuit 5, and the variable length encoder 6 are the same as those in the embodiment shown in FIG. Also,
The discrete cosine transform circuit 11 is the same as that of the third embodiment shown in FIG.

【0138】図4を参照して、JPEG/MPEG互換
用量子化テーブル/マトリクス生成装置25は、基本的
には、図3に示したものと同じであるが、量子化テーブ
ル/マトリクス値だけでなく、この値を用いて可逆離散
コサイン変換係数を逆量子化したときの逆量子化値も同
時に出力する。
Referring to FIG. 4, a JPEG / MPEG compatible quantization table / matrix generation device 25 is basically the same as that shown in FIG. 3, except that only the quantization table / matrix values are used. Instead, the inverse quantized value obtained when the reversible discrete cosine transform coefficient is inversely quantized using this value is output at the same time.

【0139】離散コサイン逆変換回路21は、離散コサ
イン逆変換をブロック毎に行い、その結果である予測誤
差再生画像を出力する。
The inverse discrete cosine transform circuit 21 performs an inverse discrete cosine transform on a block-by-block basis, and outputs a prediction error reproduced image as a result.

【0140】第1加算器24は、予測誤差再生画像を、
後述する第2の予測画像に加えて再生画像を作成する。
The first adder 24 converts the prediction error reproduced image into
A reproduced image is created in addition to a second predicted image described later.

【0141】予測器22は、第1加算器24から出力さ
れる再生画像を保持しておき、既に復号された画像か
ら、動き推定回路5で求まる動きベクトルに基づいて、
第2の予測画像を作成する。
The predictor 22 holds the reproduced image output from the first adder 24, and, based on the motion vector obtained by the motion estimating circuit 5, from the already decoded image.
A second predicted image is created.

【0142】第2加算器23は、符号化対象画像から第
2の予測画像を減じて、第2の予測誤差画像を作成す
る。
The second adder 23 creates a second prediction error image by subtracting the second prediction image from the image to be encoded.

【0143】次に、図4に示した実施の形態の回路の動
作について説明する。
Next, the operation of the circuit of the embodiment shown in FIG. 4 will be described.

【0144】動き推定回路5で動きベクトルを求め、予
測器4で予測画像を作成し、加算器3で予測誤差画像を
作成して、可逆離散コサイン変換回路1においてこれを
可逆離散コサイン変換するところまでは、図2に示した
前記実施の形態2と同じである。
A motion estimation circuit 5 obtains a motion vector, a predictor 4 prepares a predicted image, an adder 3 prepares a prediction error image, and the reversible discrete cosine transform circuit 1 performs a reversible discrete cosine transform. Up to this point, the configuration is the same as that of the second embodiment shown in FIG.

【0145】また、JPEG/MPEG互換用量子化テ
ーブル/マトリクス生成装置25で量子化マトリクス値
を求めるのは、基本的には、図3を参照して説明した前
記実施の形態と同じである。但し、図4に示すこの実施
の形態の場合には、量子化マトリクスだけではなく、そ
の量子化マトリクス値を用いたときの逆量子化値も同時
に求める。
The quantization matrix value obtained by the JPEG / MPEG compatible quantization table / matrix generation device 25 is basically the same as that of the embodiment described with reference to FIG. However, in the case of this embodiment shown in FIG. 4, not only the quantization matrix but also the inverse quantization value when the quantization matrix value is used is obtained at the same time.

【0146】この逆量子化値は、離散コサイン逆変換回
路21において、本来の離散コサイン逆変換される。こ
れにより、通常の離散コサイン逆変換を用いて復号した
ときに、復号側で得られると想定される予測誤差再生画
像が求まる。そして第1加算器24において、この予測
誤差再生画像に対して第2の予測画像が加算されて、再
生画像が作成される。この再生画像は、通常の離散コサ
イン逆変換を用いて復号したときに、復号側で得られる
と想定される再生画像に相当する。
The inversely quantized value is subjected to the inverse discrete cosine transform in the inverse discrete cosine transform circuit 21. As a result, when decoding is performed using the ordinary inverse discrete cosine transform, a prediction error reproduced image which is assumed to be obtained on the decoding side is obtained. Then, in the first adder 24, a second predicted image is added to the predicted error reproduced image to generate a reproduced image. This reproduced image corresponds to a reproduced image that is assumed to be obtained on the decoding side when decoding is performed using a normal discrete cosine inverse transform.

【0147】予測器22では、動き推定回路5で得られ
る動きベクトルを用いて動き推定を行うことで、以前に
復号された再生画像から第2の予測画像が作成される。
第2の予測画像は、第2加算器23において、符号化対
象画像から減じられて第2の予測誤差画像が求まる。
[0147] The predictor 22 performs motion estimation using the motion vector obtained by the motion estimation circuit 5, thereby generating a second predicted image from the previously decoded reproduced image.
The second prediction image is subtracted from the encoding target image in the second adder 23 to obtain a second prediction error image.

【0148】この第2の予測誤差画像は、離散コサイン
変換回路11において離散コサイン変換される。これに
より、復号器側で得られるべき予測誤差画像の離散コサ
イン変換係数が得られる。よって、可逆離散コサイン変
換係数を逆量子化した値が、これに近い値になるよう
に、量子化テーブル/マトリクスを決めればよい。
This second prediction error image is subjected to discrete cosine transform in the discrete cosine transform circuit 11. Thereby, a discrete cosine transform coefficient of the prediction error image to be obtained on the decoder side is obtained. Therefore, the quantization table / matrix may be determined so that the value obtained by inversely quantizing the reversible discrete cosine transform coefficient is close to the value.

【0149】そこで、この離散コサイン変換係数を、J
PEG/MPEG互換用量子化テーブル/マトリクス生
成装置の入力として用いる。
Therefore, this discrete cosine transform coefficient is expressed as J
Used as input to the quantization table / matrix generation device for PEG / MPEG compatibility.

【0150】[0150]

【実施の形態5】図5は、本願第5の発明の一実施の形
態を説明するための図であり、JPEG/MPEG互換
用量子化テーブル/マトリクス生成装置の構成の一例を
示すブロック図である。
[Fifth Embodiment] FIG. 5 is a diagram for explaining an embodiment of the fifth invention of the present application, and is a block diagram showing an example of the configuration of a quantization table / matrix generation device for JPEG / MPEG compatibility. is there.

【0151】図5を参照すると、逆量子化器30は、M
PEGまたはJPEGの逆量子化方法に従って、可逆離
散コサイン変換係数を逆量子化して出力する。係数ごと
のMSE算出回路31は、離散コサイン変換係数と、逆
量子化器30の出力である逆量子化値と、の差の二乗平
均を、各変換係数ごとに算出して出力する。
With reference to FIG. 5, the inverse quantizer 30
According to the inverse quantization method of PEG or JPEG, the reversible discrete cosine transform coefficient is inversely quantized and output. The MSE calculation circuit 31 for each coefficient calculates the square mean of the difference between the discrete cosine transform coefficient and the inverse quantized value output from the inverse quantizer 30 for each transform coefficient, and outputs the result.

【0152】量子化テーブル/マトリクス修正装置32
は、逆量子化器30に対して量子化テーブル/マトリク
ス値を与え、その結果として得られる係数毎のMSE
(MeanSquare Error)算出回路31の出力を調べる。
Quantization table / matrix correction device 32
Gives the quantization table / matrix values to the inverse quantizer 30 and the resulting MSE for each coefficient
(MeanSquare Error) Check the output of the calculation circuit 31.

【0153】そして、その値が最小となる量子化マトリ
クス値を求める。これを各変換係数に対して行う。
Then, a quantization matrix value whose value is minimized is obtained. This is performed for each transform coefficient.

【0154】最終的には、係数ごとのMSE算出回路3
1の出力を最小化する量子化テーブル/マトリクスの値
が出力される。
Finally, the MSE calculation circuit 3 for each coefficient
The value of the quantization table / matrix that minimizes the output of 1 is output.

【0155】次に、図5に示した実施の形態の回路の動
作について説明する。
Next, the operation of the circuit of the embodiment shown in FIG. 5 will be described.

【0156】可逆離散コサイン変換の変換係数の(i,
j)成分をXq(i,j)、その逆量子化値をX(i,
j)で表し、離散コサイン変換係数の(i,j)成分を
T(i,j)で表すことにする。可逆離散コサイン変換
係数Xq(i,j)は、逆量子化器30において、量子化
テーブル/マトリクス修正装置32から入力される量子
化テーブル/マトリクス値W(i,j)を用いて逆量子
化される。この逆量子化は、JPEGの場合には、上式
(18)、(19)に従って行われ、MPEGの場合に
は、上式(39)、(40)に従って行われる。この結
果、逆量子化値X(i,j)が得られる。
The transform coefficients (i,
j) component is X q (i, j), and its dequantized value is X (i, j).
j), and the (i, j) component of the discrete cosine transform coefficient is represented by X T (i, j). The reversible discrete cosine transform coefficient X q (i, j) is inversely quantized by the inverse quantizer 30 using the quantization table / matrix value W (i, j) input from the quantization table / matrix correction device 32. Be transformed into This inverse quantization is performed according to the above equations (18) and (19) in the case of JPEG, and is performed according to the above equations (39) and (40) in the case of MPEG. As a result, an inverse quantization value X (i, j) is obtained.

【0157】係数毎のMSE算出回路では、この逆量子
化値X(i,j)と離散コサイン変換係数XT(i,j)
から、次式(42)を計算して、各(i,j)ごとに、
e(i,j)の二乗平均値mse(i,j)を算出して出力
する。
In the MSE calculating circuit for each coefficient, the inverse quantized value X (i, j) and the discrete cosine transform coefficient X T (i, j)
Then, the following equation (42) is calculated, and for each (i, j),
The mean square value mse (i, j) of e (i, j) is calculated and output.

【0158】[0158]

【数25】 (Equation 25)

【0159】この平均は、量子化マトリクスを算出する
周期(例えばピクチャ)内に含まれるブロックについ
て、同じ(i,j)に関してとったものである。mse
(i,j)は、量子化テーブル/マトリクス修正装置3
2に入力される。
This average is obtained for the same (i, j) for blocks included in a cycle (for example, a picture) for calculating the quantization matrix. mse
(I, j) is the quantization table / matrix correction device 3
2 is input.

【0160】量子化テーブル/マトリクス修正装置32
では、このmse(i,j)を最小にするW(i,j)の値
とその最小値を保持している。そして、あるW(i,
j)の値に対して求まったmse(i,j)が、既に求め
られているmse(i,j)の最小値よりも小さい場合に
は、最小値を更新し、この最小値と、これを与えるW
(i,j)の値を保持する。
Quantization table / matrix correction device 32
Holds the value of W (i, j) that minimizes this mse (i, j) and its minimum value. Then, a certain W (i,
If the value of mse (i, j) obtained for the value of j) is smaller than the already obtained minimum value of mse (i, j), the minimum value is updated. Give W
Holds the value of (i, j).

【0161】これを全ての量子化テーブル/マトリクス
の候補値に対して行い、mse(i,j)を最小化するW
(i,j)の値を求める。
This is performed on all the quantization table / matrix candidate values, and Wse for minimizing mse (i, j) is obtained.
Find the value of (i, j).

【0162】以上の処理を各(i,j)に対して行う。
そして、最終的には、mse(i,j)の最小値を与える
W(i,j)の値を出力する。
The above processing is performed for each (i, j).
Then, finally, the value of W (i, j) giving the minimum value of mse (i, j) is output.

【0163】この実施の形態では、本来の離散コサイン
変換係数XT(i,j)と逆量子化値X(i,j)の差を
係数毎に比較し、その2乗平均を最小化する量子化テー
ブル/マトリクスを求める。このため、ダイナミックレ
ンジ差に起因する差だけでなく、それ以外の要因で生じ
る差もあわせて、総合的に差を最小化できる。
In this embodiment, the difference between the original discrete cosine transform coefficient X T (i, j) and the inverse quantization value X (i, j) is compared for each coefficient, and the mean square is minimized. Find the quantization table / matrix. For this reason, not only the difference caused by the dynamic range difference but also the difference caused by other factors can be minimized comprehensively.

【0164】したがって、前記第1、第2の実施の形態
のように、固定の量子化テーブル/マトリクスを用いる
場合に比べ、可逆離散コサイン変換を用いて符号化した
画像を従来の離散コサイン逆変換を用いて復号した時の
画質は向上する。
Therefore, as compared with the case where the fixed quantization table / matrix is used as in the first and second embodiments, the image coded using the reversible discrete cosine transform is converted to the conventional discrete cosine inverse transform. The image quality at the time of decoding using is improved.

【0165】[0165]

【実施の形態6】図6は、本願第6の発明の一実施の形
態を説明するための図であり、JPEG/MPEG互換
用量子化テーブル/マトリクス生成装置の構成の一例を
示すブロック図である。
Embodiment 6 FIG. 6 is a diagram for explaining an embodiment of the sixth invention of the present application, and is a block diagram showing an example of the configuration of a quantization table / matrix generation device for JPEG / MPEG compatibility. is there.

【0166】この実施の形態においては、近似計算によ
り準最適な量子化テーブル/マトリクス値を算出する。
ここでは、JPEGの場合には、上式(19)の逆量子
化値を、次式(43)で近似し、MPEGの場合には、
上式(40)を次式(44)で近似する。
In this embodiment, a sub-optimal quantization table / matrix value is calculated by approximation calculation.
Here, in the case of JPEG, the inverse quantization value of the above equation (19) is approximated by the following equation (43), and in the case of MPEG,
The above equation (40) is approximated by the following equation (44).

【0167】[0167]

【数26】 (Equation 26)

【0168】ここで、Xq(i,j)の符号に応じて、±
0.5加算するのは、上式(19)、(40)からわか
るように、JPEG、MPEGの逆量子化では、最後に
値を整数化する際に、小数点以下を四捨五入するのでは
なく、小数点以下の値を切り捨てる、あるいは切り上げ
ることによって、整数化することによる。
Here, according to the sign of X q (i, j), ±
As can be seen from the above equations (19) and (40), 0.5 is added in the inverse quantization of JPEG and MPEG. By rounding down or rounding up or down the value after the decimal point.

【0169】図10は、これを模式的に示したものであ
る。図10において、階段状のグラフf(y)は、上式
(19)、(40)を図示したものであり、整数化前後
の値の関係を示している。これを、同図において直線で
示した関数(次式(45))で近似する。
FIG. 10 schematically shows this. In FIG. 10, a step-like graph f (y) illustrates the above equations (19) and (40), and shows the relationship between values before and after the conversion into integers. This is approximated by a function (the following equation (45)) represented by a straight line in FIG.

【0170】[0170]

【数27】 [Equation 27]

【0171】この近似で得られる逆量子化値X(i,
j)は、上式(43)、(44)のものと、等価であ
る。
The inverse quantization value X (i, i,
j) is equivalent to the above equations (43) and (44).

【0172】この近似によって、上式(42)のe
(i,j)は、量子化テーブル/マトリクス値W(i,
j)の1次関数となる。このため、e(i,j)の二乗
平均値mse(i,j)は、W(i,j)の2次関数となる
ため、これを最小化する量子化テーブル/マトリクス値
W(i,j)を解析的に求められる。
By this approximation, e of the above equation (42) is obtained.
(I, j) is the quantization table / matrix value W (i, j)
j) is a linear function. Therefore, the root mean square value mse (i, j) of e (i, j) is a quadratic function of W (i, j), and the quantization table / matrix value W (i, j) for minimizing the quadratic function. j) is obtained analytically.

【0173】量子化テーブル/マトリクス値W(i,
j)は整数であることを考慮してこの値を求めると、J
PEGの場合には、次式(46)、MPEGの場合には
次式(47)となる。
Quantization table / matrix value W (i,
Considering that j) is an integer, when this value is obtained, J
The following equation (46) is used for PEG, and the following equation (47) is used for MPEG.

【0174】[0174]

【数28】 [Equation 28]

【0175】ここで、rnd(x)はxの小数点以下を四
捨五入した値を返す関数、Σは、量子化テーブル/マト
リクスを算出する周期(例えばピクチャ)内で、同一の
(i,j)に対して、和を求めることを意味する。な
お、もし、上式(46)、(47)の値が量子化テーブ
ル/マトリクス値の取り得る値の範囲外である場合に
は、取り得る範囲内でもっとも近い整数値を量子化テー
ブル/マトリクス値とする。
Here, rnd (x) is a function that returns a value obtained by rounding off the decimal part of x, and Σ is the same (i, j) within the cycle (for example, picture) for calculating the quantization table / matrix. On the other hand, it means finding the sum. If the values of the above equations (46) and (47) are out of the range of possible values of the quantization table / matrix value, the nearest integer value within the possible range is set to the quantization table / matrix. Value.

【0176】図6を参照して、この実施の形態に係る、
JPEG/MPEG互換用量子化テーブル/マトリクス
算出回路の構成例を示したものである。
Referring to FIG. 6, according to this embodiment,
2 shows a configuration example of a quantization table / matrix calculation circuit for JPEG / MPEG compatibility.

【0177】図6を参照すると、X′(i,j)算出回
路40は、可逆離散コサイン変換係数Xq(i,j)を逆
量子化する過程で得られるX′(i,j)を算出する。
このX′(i,j)は、逆量子化において整数化する前
の値を量子化テーブル/マトリクス値で割った値に相当
する。具体的には、このX′(i,j)は、JPEGの
場合には上式(18)より、次式(48)となり、
[0177] With reference to FIG. 6, X '(i, j ) calculating circuit 40, a reversible DCT coefficients X q (i, j) obtained in the process of dequantizing X' (i, j) the calculate.
This X '(i, j) corresponds to a value obtained by dividing a value before being converted into an integer in the inverse quantization by a quantization table / matrix value. Specifically, in the case of JPEG, X '(i, j) is given by the following equation (48) from the above equation (18).

【0178】[0178]

【数29】 (Equation 29)

【0179】MPEGの場合には、上式(39)より、
次式(49)となる。
In the case of MPEG, from the above equation (39),
The following equation (49) is obtained.

【0180】[0180]

【数30】 [Equation 30]

【0181】X′T(i,j)算出回路41は、Xq(i,
j)が正のときは、XT(i,j)に0.5を加えた値
を、Xq(i,j)が負のときは、XT(i,j)から0.
5を減じた値を、Xq(i,j)が0のときは、XT(i,
j)そのものをX′T(i,j)とする回路である。
The X ' T (i, j) calculation circuit 41 calculates X q (i, j)
When j) is positive, X T (i, a value obtained by adding 0.5 to j), when X q (i, j) is negative, X T (i, j) from 0.
When X q (i, j) is 0, the value obtained by subtracting 5 is X T (i, j).
j) is a circuit in which X ′ T (i, j) is used.

【0182】量子化テーブル/マトリクス算出回路42
は、X′(i,j)算出回路40の出力X′(i,j)
と、X′T(i,j)算出回路41の出力X′T(i,j)
とから、次式(50)の値を算出して、量子化テーブル
/マトリクス値W(i,j)として出力する。
Quantization table / matrix calculation circuit 42
Is the output X '(i, j) of the X' (i, j) calculation circuit 40.
And the output X ′ T (i, j) of the X ′ T (i, j) calculation circuit 41
Then, the value of the following equation (50) is calculated and output as a quantization table / matrix value W (i, j).

【0183】[0183]

【数31】 (Equation 31)

【0184】ここで、rnd(x)はxの小数点以下を四
捨五入した値を返す関数である。式(50)で得られる
値は、上式(46)または上式(47)に示す量子化テ
ーブル/マトリクス値と同じになる。なお、図6の逆量
子化器30については、図5に示したものと同じであ
る。
Here, rnd (x) is a function that returns a value obtained by rounding off the decimal part of x. The value obtained by equation (50) is the same as the quantization table / matrix value shown in equation (46) or (47). The inverse quantizer 30 in FIG. 6 is the same as that shown in FIG.

【0185】次に、図6に示した実施の形態の回路の動
作について述べる。
Next, the operation of the circuit of the embodiment shown in FIG. 6 will be described.

【0186】この回路の入力の1つである可逆離散コサ
イン変換係数Xq(i,j)は、X′(i,j)算出回路
40において、X′(i,j)に変換される。一方、離
散コサイン変換係数XT(i,j)は、X′T(i,j)算
出回路41において、Xq(i,j)の符号に基づいて、
X′T(i,j)に変換される。
The reversible discrete cosine transform coefficient X q (i, j), which is one of the inputs to this circuit, is converted to X ′ (i, j) in the X ′ (i, j) calculation circuit 40. On the other hand, the discrete cosine transform coefficient X T (i, j) is calculated by the X ′ T (i, j) calculation circuit 41 based on the sign of X q (i, j).
X ′ T (i, j).

【0187】そして、量子化テーブル/マトリクス算出
回路42において、このX′(i,j)、X′T(i,
j)から、上式(50)に示す量子化テーブル/マトリ
クス値W(i,j)が算出される。この計算は、各(i,
j)に対して行われる。また、この式で求まる値が量子
化テーブル/マトリクス値の取り得る値の範囲外である
場合には、前述の通り、範囲内の最も近い整数を量子化
テーブル/マトリクス値として出力する。
Then, in the quantization table / matrix calculation circuit, the X ′ (i, j) and X ′ T (i, j)
From j), the quantization table / matrix value W (i, j) shown in the above equation (50) is calculated. This calculation is performed for each (i,
j). If the value obtained by this equation is out of the range of possible values of the quantization table / matrix value, the closest integer in the range is output as the quantization table / matrix value as described above.

【0188】そして、逆量子化器30において、量子化
テーブル/マトリクス値W(i,j)の値を用いて、可
逆離散コサイン変換係数Xq(i,j)が逆量子化され、
逆量子化値が出力される。
Then, in the inverse quantizer 30, the reversible discrete cosine transform coefficient X q (i, j) is inversely quantized using the value of the quantization table / matrix value W (i, j).
An inverse quantization value is output.

【0189】この実施の形態の特徴は、直接的な計算に
よって、上記第5の実施の形態に近い結果が得られるこ
とである。上記第5の実施の形態では、各量子化テーブ
ル/マトリクス値に対してe(i,j)を計算して、最
適な量子化テーブル/マトリクス値を算出する。このた
め処理量はかなり大きくなる。これに対して、この第6
の実施の形態では、逆量子化の式を一部近似して量子化
テーブル/マトリクス値を直接的に算出することで、演
算量を低減できる。
The feature of this embodiment is that a result close to that of the fifth embodiment can be obtained by direct calculation. In the fifth embodiment, e (i, j) is calculated for each quantization table / matrix value to calculate an optimal quantization table / matrix value. Therefore, the processing amount becomes considerably large. In contrast, this sixth
In the embodiment, the amount of calculation can be reduced by directly calculating the quantization table / matrix value by partially approximating the inverse quantization expression.

【0190】[0190]

【実施の形態7】図7は、本願第7の発明の一実施の形
態を説明するための図であり、JPEG/MPEG互換
用量子化テーブル/マトリクス生成装置の構成の一例を
示すブロック図である。この実施の形態は、基本的に
は、図5及び図6に示した実施の形態の回路を組み合わ
せた構成とされている。
Embodiment 7 FIG. 7 is a diagram for explaining an embodiment of the seventh invention of the present application, and is a block diagram showing an example of the configuration of a quantization table / matrix generation device for JPEG / MPEG compatibility. is there. This embodiment basically has a configuration in which the circuits of the embodiments shown in FIGS. 5 and 6 are combined.

【0191】図7を参照して、第1のJPEG/MPE
G互換用量子化テーブル/マトリクス生成装置50は、
図6に示したものと同じもので、可逆離散コサイン変換
係数と離散コサイン変換係数から量子化テーブル/マト
リクスを算出し、出力する。
Referring to FIG. 7, the first JPEG / MPE
The G-compatible quantization table / matrix generation device 50
A quantization table / matrix is calculated from the reversible discrete cosine transform coefficient and the discrete cosine transform coefficient, and is output.

【0192】第2のJPEG/MPEG互換用量子化テ
ーブル/マトリクス生成装置51は、基本的には、図5
に示したものと同じもので、可逆離散コサイン変換係数
と離散コサイン変換係数から量子化テーブル/マトリク
スを算出し、出力する。但し、第2のJPEG/MPE
G互換用量子化テーブル/マトリクス生成装置51で
は、第1のJPEG/MPEG互換用量子化テーブル/
マトリクス生成装置50で求まった量子化テーブル/マ
トリクス値に基づいて、候補を限定した上で、量子化テ
ーブル/マトリクスを算出する。これと同時に、可逆離
散コサイン変換係数の逆量子化値を求める。
The second JPEG / MPEG compatible quantization table / matrix generation device 51 basically has the structure shown in FIG.
The quantization table / matrix is calculated from the reversible discrete cosine transform coefficient and the discrete cosine transform coefficient, and is output. However, the second JPEG / MPE
The G-compatible quantization table / matrix generation device 51 uses the first JPEG / MPEG-compatible quantization table / matrix.
Based on the quantization table / matrix values obtained by the matrix generation device 50, the quantization table / matrix is calculated after limiting the candidates. At the same time, an inverse quantization value of the reversible discrete cosine transform coefficient is obtained.

【0193】この実施の形態の特徴は、前記第6の実施
の形態によって求まる量子化マトリクス値に基づき、候
補を限定した上で、前記第5の実施の形態と同様にして
量子化マトリクスを求める点にある。こうすることで、
この実施の形態においては、前記第5の実施の形態に比
べると、少ない処理量で、前記第5の実施の形態とほと
んど同じ結果を得ることが可能となる。
The feature of this embodiment is that the quantization matrix is obtained in the same manner as in the fifth embodiment, after limiting the candidates based on the quantization matrix value obtained in the sixth embodiment. On the point. By doing this,
In this embodiment, it is possible to obtain almost the same result as in the fifth embodiment with a smaller amount of processing than in the fifth embodiment.

【0194】[0194]

【実施の形態8】図8及び図9は、本願第8の発明の一
実施の形態の構成を示すブロック図である。図8は、水
平方向に行う8元可逆離散コサイン変換回路、図9は、
垂直方向に行う8元可逆離散コサイン変換回路を示して
いる。なお、図8及び図9は図面作成の都合で分図され
たものである。
Eighth Embodiment FIGS. 8 and 9 are block diagrams showing a configuration of an eighth embodiment of the present invention. FIG. 8 is a diagram showing an 8-ary reversible discrete cosine transform circuit for performing a horizontal operation, and FIG.
8 shows an octal reversible discrete cosine transform circuit performed in the vertical direction. FIGS. 8 and 9 are separated for convenience of drawing.

【0195】図8を参照すると、変換器200から変換
器213までは、入力を上式(23)の行列にて線形変
換した後、可逆量子化する回路である。このうち、変換
器200から変換器209の可逆量子化では、量子化周
期を(N1,N2)とし、逆量子化周期を(M1,M2)とす
る。
Referring to FIG. 8, converters 200 to 213 are circuits for performing a reversible quantization after linearly converting the input by the matrix of the above equation (23). Among these, in the reversible quantization from the converter 200 to the converter 209, the quantization cycle is (N 1 , N 2 ) and the inverse quantization cycle is (M 1 , M 2 ).

【0196】一方、変換器210から変換器213の可
逆量子化では、量子化周期を(N′1,N′2)とし、逆
量子化周期を(M′1,M′2)とする。これらを区別す
るために、図8では、変換器200から変換器209ま
での可逆量子化をQで表し、変換器210から変換器2
13までの可逆量子化をQ′で表すことにする。
[0196] On the other hand, the reversible quantization of transducer 213 from the transducer 210, and the quantization period and (N '1, N' 2 ), the inverse quantization period and (M '1, M' 2 ). In order to distinguish between them, in FIG. 8, the lossless quantization from the converter 200 to the converter 209 is represented by Q, and the conversion from the converter 210 to the converter 2
The reversible quantization up to 13 is represented by Q '.

【0197】次に、図8(a)に示した構成について説
明する。入力信号をx(i,j)(i=0,…,7,j=
0,…,7)とし、これを水平方向に8元可逆離散コサイ
ン変換して得られる結果をXh(i,j)とし、Xh(i,
j)を垂直方向に8元可逆離散コサイン変換して得られ
る結果をXq(i,j)とする。
Next, the configuration shown in FIG. 8A will be described. The input signal is represented by x (i, j) (i = 0,..., 7, j =
0, ..., and 7), which was the result obtained by 8-way reversible discrete cosine transform in the horizontal direction X h (i, j) and, X h (i,
Let Xq (i, j) be the result obtained by performing an 8-ary reversible discrete cosine transform on j) in the vertical direction.

【0198】変換器200は、入力信号(x(i,0),
x(i,7))を変換して、その結果を(u0,u4)とし
て出力する。変換器201は、入力信号(x(i,1),
x(i,6))を変換して、その結果を(u2,u6)とし
て出力する。変換器202は、入力信号(x(i,3),
x(i,4))を変換して、その結果を(u1,u5)とし
て出力する。変換器203は、入力信号(x(i,2),
x(i,5))を変換して、その結果を(u3,u7)とし
て出力する。
The converter 200 receives the input signal (x (i, 0),
x (i, 7)) and outputs the result as (u 0 , u 4 ). The converter 201 receives the input signal (x (i, 1),
x (i, 6)) and outputs the result as (u 2 , u 6 ). The converter 202 receives the input signal (x (i, 3),
x (i, 4)) and outputs the result as (u 1 , u 5 ). The converter 203 receives the input signal (x (i, 2),
x (i, 5)) and outputs the result as (u 3 , u 7 ).

【0199】変換器210は、(u0,u1)を変換し
て、その結果を(v0,v1)として出力する。変換器2
11は、(u2,u3)を変換して、その結果を(v2,
3)として出力する。
The converter 210 converts (u 0 , u 1 ) and outputs the result as (v 0 , v 1 ). Converter 2
11 transforms (u 2 , u 3 ) and converts the result to (v 2 , u 3 ).
v 3 ).

【0200】変換器212は、(v0,v2)を変換し
て、その結果を(Xh(i,0),Xh(i,4))として
出力する。変換器214は、(v1,v3)を上式(2
4)の行列で変換した後、可逆量子化して、その結果を
(Xh(i,2),Xh(i,6))として出力する。
The converter 212 converts (v 0 , v 2 ) and outputs the result as (X h (i, 0), X h (i, 4)). The converter 214 converts (v 1 , v 3 ) into the above equation (2)
After conversion by the matrix of 4), lossless quantization is performed, and the result is output as (X h (i, 2), X h (i, 6)).

【0201】変換器215は、(u4,u5,u6,u7
を、上式(12)に示す4×4行列で線形変換した後、
可逆量子化して、その結果を(Xh(i,1),Xh(i,
7),Xh(i,3),Xh(i,5))として出力する。
The converter 215 calculates (u 4 , u 5 , u 6 , u 7 )
Is linearly transformed by a 4 × 4 matrix shown in the above equation (12),
Reversible quantization is performed, and the result is expressed as (X h (i, 1), X h (i,
7), output as X h (i, 3), X h (i, 5)).

【0202】以上が、水平方向に対して8元可逆離散コ
サイン変換を行う回路である。この回路によって、各i
=0,…,7に対して変換を行うことで、水平方向に8元
可逆離散コサイン変換した結果であるXh(i,j)が得
られる。
The above is the circuit for performing the 8-ary reversible discrete cosine transform in the horizontal direction. With this circuit, each i
= 0, ..., by performing conversion on 7, X h (i, j ) is the result of 8-way reversible discrete cosine transform in the horizontal direction is obtained.

【0203】次に、図9に示した構成について説明す
る。
Next, the configuration shown in FIG. 9 will be described.

【0204】変換器204は、入力信号(Xh(0,
j),Xh(7,j))を変換して、その結果を(u′0,
u′4)として出力する。変換器205は、入力信号
(Xh(1,j),Xh(6,j))を変換して、その結果
を(u′2,u′6)として出力する。変換器206は、
入力信号(Xh(3,j),Xh(4,j))を変換して、
その結果を(u′1,u′5)として出力する。変換器2
07は、入力信号(Xh(2,j),Xh(5,j))を変
換して、その結果を(u′3,u′7)として出力する。
The converter 204 receives the input signal (X h (0,
j), X h (7, j)) and transform the result to (u ′ 0 ,
u ′ 4 ). The converter 205 converts the input signal (X h (1, j), X h (6, j)) and outputs the result as (u ′ 2 , u ′ 6 ). The converter 206
Convert the input signal (X h (3, j), X h (4, j))
The result is output as (u ′ 1 , u ′ 5 ). Converter 2
07 converts the input signal (X h (2, j), X h (5, j)) and outputs the result as (u ′ 3 , u ′ 7 ).

【0205】変換器208は、(u′0,u′1)を変換
して、その結果を(v′0,v′1)として出力する。変
換器209は、(u′2,u′3)を変換して、その結果
を(v′2,v′3)として出力する。
The converter 208 converts (u ′ 0 , u ′ 1 ) and outputs the result as (v ′ 0 , v ′ 1 ). The converter 209 converts (u ' 2 , u' 3 ) and outputs the result as (v ' 2 , v' 3 ).

【0206】変換器213は、(v′0,v′2)を変換
して、その結果を(Xq(0,j),Xq(4,j))とし
て出力する。変換器216は、(v′1,v′3)を上式
(24)の行列で変換した後、可逆量子化して、その結
果を(Xq(2,j),Xq(6,j))として出力する。
The converter 213 converts (v ′ 0 , v ′ 2 ) and outputs the result as (X q (0, j), X q (4, j)). Transformer 216 transforms (v ′ 1 , v ′ 3 ) with the matrix of the above equation (24), performs reversible quantization, and converts the result to (X q (2, j), X q (6, j) )).

【0207】変換器217は、(u′4,u′5,u′6,
u′7)を上式(12)に示す4×4行列で線形変換し
た後、可逆量子化して、その結果を(Xq(1,j),Xq
(7,j),Xq(3,j),Xq(5,j))として出力す
る。以上が垂直方向に対して8元可逆離散コサイン変換
を行う回路である。この回路によって各j=0,…,7に
対して変換を行うことで、8×8可逆離散コサイン変換
の変換係数Xq(i,j)が得られる。
The converter 217 outputs (u ′ 4 , u ′ 5 , u ′ 6 ,
u ′ 7 ) is linearly transformed by a 4 × 4 matrix shown in the above equation (12), then reversibly quantized, and the result is expressed as (X q (1, j), X q
(7, j), X q (3, j), X q (5, j)). The above is the circuit for performing the 8-ary reversible discrete cosine transform in the vertical direction. The conversion is performed on each of j = 0,..., 7 by this circuit to obtain a conversion coefficient X q (i, j) of the 8 × 8 reversible discrete cosine transform.

【0208】次に、図8に示した水平及び垂直方向の8
元可逆離散コサイン変換回路により得られる、変換係数
の直流成分Xq(0,0)のダイナミックレンジβ(0,
0)について述べる。本来の離散コサイン変換の直流成
分のダイナミックレンジを1としたときのβ(0,0)
の値は、次式(51)のようになる。
Next, the horizontal and vertical directions shown in FIG.
Dynamic range β (0,0) of the DC component X q (0,0) of the transform coefficient obtained by the original reversible discrete cosine transform circuit
0) will be described. Β (0,0) when the dynamic range of the DC component of the original discrete cosine transform is 1
Is as shown in the following equation (51).

【0209】[0209]

【数32】 (Equation 32)

【0210】このβ(0,0)が1であれば、可逆離散
コサイン変換と本来の離散コサイン変換とで、直流成分
のダイナミックレンジに差がなくなる。β(0,0)=
1となるためには、N1、N′1、M1、M′1の値が、次
式(52)を満たせばよい。
If β (0,0) is 1, there is no difference in the dynamic range of the DC component between the reversible discrete cosine transform and the original discrete cosine transform. β (0,0) =
In order to be 1 , the values of N 1 , N ′ 1 , M 1 , and M ′ 1 need only satisfy the following expression (52).

【0211】[0211]

【数33】 [Equation 33]

【0212】この条件は、例えば、N1、N2、M1、M2
の間に次式(53)が成り立つ時、N′1、M′1を次式
(54)とすることで満たされる。
The conditions are, for example, N 1 , N 2 , M 1 , M 2
When the following equation (53) is satisfied during the above, it is satisfied by setting N ′ 1 and M ′ 1 to the following equation (54).

【0213】[0213]

【数34】 (Equation 34)

【0214】上式(53)において、左辺のM12は、
基本領域内の量子化点の個数に相当し、右辺のN12
2は、基本領域内の変換点の個数に相当する。すなわ
ち、変換点と量子化点とが、1対1に対応する場合に、
この条件は満たされる。
In the above equation (53), M 1 M 2 on the left side is
It corresponds to the number of quantization points in the basic region, and N 1 N 2 /
2 corresponds to the number of conversion points in the basic area. That is, when the transformation point and the quantization point correspond one-to-one,
This condition is satisfied.

【0215】また、上式(54)を実現するためには、
簡単には、可逆量子化への入力を逆にするだけでよい。
すなわち、図8に示した、変換器200から209まで
を、図13(a)に示す構成とするとき、変換器210
から213までは、図13(b)に示す構成とする。こ
の場合には、新たな量子化対応表は不要であるという利
点がある。
In order to realize the above equation (54),
Simply, the input to the reversible quantization need only be reversed.
That is, when the converters 200 to 209 shown in FIG. 8 are configured as shown in FIG.
13 to 213 have the configuration shown in FIG. In this case, there is an advantage that a new quantization correspondence table is unnecessary.

【0216】このように、β(0,0)=1となるよう
に量子化周期、逆量子周期の値を選ぶことが可能なた
め、8×8可逆離散コサイン変換と本来の8×8離散コ
サイン変換との直流成分のダイナミックレンジ差を完全
に補償できる。
As described above, since the values of the quantization period and the inverse quantum period can be selected so that β (0,0) = 1, the 8 × 8 reversible discrete cosine transform and the original 8 × 8 discrete cosine transform are performed. The dynamic range difference between the DC component and the cosine transform can be completely compensated.

【0217】前述したことからもわかるように、この直
流成分のダイナミックレンジ差を完全に補償するために
必要とされることは、量子化周期と逆量子化周期とが、
上式(52)の条件を満たすこと、である。
As can be seen from the above, what is required to completely compensate for the dynamic range difference of the DC component is that the quantization cycle and the inverse quantization cycle are:
That is, the condition of the above equation (52) is satisfied.

【0218】よって、8×8可逆離散コサイン変換の直
流成分Xq(0,0)を算出する際に経由する、上式(2
3)の行列に基づく、6段の可逆量子化のうち、どの3
段の可逆量子化において、量子化周期をN′1、N′2
逆量子化周期をM′1、M′2とするのかには依存しな
い。従って、直流成分のダイナミックレンジ差を完全に
補償する回路は、図8に示した以外にも存在し、その数
は、全部で63=20通りとなる。
Therefore, when calculating the DC component X q (0,0) of the 8 × 8 reversible discrete cosine transform, the above equation (2)
Which of three lossless quantizations based on the matrix of 3)
In the reversible quantization of the stage, the quantization period is set to N ′ 1 , N ′ 2 ,
It does not depend on whether the inverse quantization period is M ′ 1 or M ′ 2 . Therefore, there are circuits other than those shown in FIG. 8 for completely compensating for the dynamic range difference of the DC component, and the number of circuits is 6 C 3 = 20 in total.

【0219】このように、直流成分のダイナミックレン
ジ差を完全に補償することで、離散コサイン変換の直流
成分は、本来の離散コサイン変換のそれにかなり近づ
く。このため、可逆離散コサイン変換を用いて符号化し
た画像を従来の離散コサイン逆変換によって復号したと
きの画質は、大幅に改善される。
As described above, by completely compensating for the dynamic range difference of the DC component, the DC component of the discrete cosine transform is considerably close to that of the original discrete cosine transform. Therefore, the image quality when an image encoded using the reversible discrete cosine transform is decoded by the conventional inverse discrete cosine transform is greatly improved.

【0220】[0220]

【実施例】上記した本発明の実施の形態について更に詳
細に説明すべく、本発明の実施例について以下に説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to describe the above-mentioned embodiment of the present invention in more detail, an embodiment of the present invention will be described below.

【0221】まず、本発明の一実施例として、8×8可
逆離散コサイン変換について説明する。8×8可逆離散
コサイン変換は、8×8のブロックに区切った2次元信
号に対して、水平方向と垂直方向に8元可逆離散コサイ
ン変換を行うことで実現できる。この8元可逆離散コサ
イン変換としては、上記平成8年8月23日付け特許出
願記載の方式を用いて、各定数値を以下のように設定す
る。
First, an 8 × 8 reversible discrete cosine transform will be described as an embodiment of the present invention. The 8 × 8 reversible discrete cosine transform can be realized by performing an 8-ary reversible discrete cosine transform on a two-dimensional signal divided into 8 × 8 blocks in the horizontal and vertical directions. As the octal reversible discrete cosine transform, each constant value is set as follows using the method described in the patent application filed on August 23, 1996.

【0222】まず、a2、a6、a1、a3、a5、a7の値
は、それぞれ12、5、5、4、3、1とする。そし
て、次式(55)の行列
First, the values of a 2 , a 6 , a 1 , a 3 , a 5 , and a 7 are 12, 5 , 5 , 4 , 3 , and 1 , respectively. Then, the matrix of the following equation (55)

【0223】[0223]

【数35】 (Equation 35)

【0224】の可逆量子化の量子化周期を、(N1 (0),
2 (0))=(10,14)、逆量子化周期を(M1 (0),M
2 (0))=(7,10)とする。また、次式(56)の行
The quantization cycle of the reversible quantization of (N 1 (0) ,
N 2 (0) ) = (10,14), and set the inverse quantization period to (M 1 (0) , M
2 (0) ) = (7,10). Also, the matrix of the following equation (56)

【0225】[0225]

【数36】 [Equation 36]

【0226】の可逆量子化では、量子化周期を
(N1 (1),N2 (1))=(139,139)、逆量子化周期
を(M1 (1),M2 (1))=(13,13)とする。
In the reversible quantization of (1) , the quantization period is (N 1 (1) , N 2 (1) ) = (139, 139), and the inverse quantization period is (M 1 (1) , M 2 (1) ) = (13,13).

【0227】4×4可逆量子化では、以後特にことわら
ない時は、変換係数X1、X7の線形量子化幅k1、k7
ともに7とし、大局信号を線形量子化するときの量子化
幅L3、L5を、ともに、2593/379とする。
[0227] In the 4 × 4 lossless quantization, when not otherwise stated Thereafter, the transform coefficients X 1, linear quantization width k 1, k 7 together 7 X 7, when linearly quantizing the global signal The quantization widths L 3 and L 5 are both set to 2593/379.

【0228】そして、局所量子化は、図11(a)に示
す領域内の代表元(s3,s5)に対して、図11(b)
に示す局所量子化値を割り当てることで定義する。
Then, the local quantization is performed on the representative elements (s 3 , s 5 ) in the area shown in FIG.
Is defined by assigning the local quantization value shown in.

【0229】次に、本願第1および第2の発明の実施例
について説明する。本願第1および第2の発明の実施例
においては、固定の量子化テーブル/マトリクス値を用
いるが、この値は、次のように求められる。
Next, examples of the first and second aspects of the present invention will be described. In the first and second embodiments of the present invention, a fixed quantization table / matrix value is used, and this value is obtained as follows.

【0230】まず、上式(25)から(32)までと、
上式(35)に従って、8×8可逆離散コサイン変換の
変換係数のダイナミックレンジβ(i,j)を計算す
る。この結果を表1に示す。
First, from the above equations (25) to (32),
According to the above equation (35), the dynamic range β (i, j) of the transform coefficient of the 8 × 8 reversible discrete cosine transform is calculated. Table 1 shows the results.

【0231】次に上式(38)により、量子化テーブル
/マトリクスが求められる。ここでは、量子化スケール
をs=1とした。この結果得られるテーブル/マトリク
スは、次式(57)となる。
Next, a quantization table / matrix is obtained by the above equation (38). Here, the quantization scale is set to s = 1. The resulting table / matrix is given by the following equation (57).

【0232】[0232]

【数37】 (37)

【0233】[0233]

【表1】 [Table 1]

【0234】次に、4×4可逆量子化でのX1、X7の量
子化幅k1、k7の値をかえたときの例を示す。k1、k7
の値を変えることは、量子化テーブル/マトリクスを用
いることではじめて可能となる。従来の可逆離散コサイ
ン変換による符号化では量子化テーブル/マトリクスを
用いていなかったため、その変換係数のダイナミックレ
ンジを本来の離散コサイン変換係数のそれに近づける必
要があった。なぜなら、このダイナミックレンジがずれ
ると、互換性に大きな影響を与えるためである。このた
め、各パラメータ値の選択に自由度はほとんどなく、X
1、X7の量子化幅k1、k7の値は7でなければならなか
った。
Next, an example in which the values of the quantization widths k 1 and k 7 of X 1 and X 7 in 4 × 4 reversible quantization are changed. k 1 , k 7
Can only be changed by using a quantization table / matrix. In the conventional coding using the reversible discrete cosine transform, no quantization table / matrix is used, so that the dynamic range of the transform coefficient needs to be close to that of the original discrete cosine transform coefficient. The reason is that if the dynamic range deviates, the compatibility is greatly affected. Therefore, there is little freedom in selecting each parameter value, and X
1 , the values of the quantization widths k 1 and k 7 of X 7 had to be 7.

【0235】これに対して、本実施例においては、量子
化テーブル/マトリクスを用いるため、この値の決定に
自由度が生じる。
On the other hand, in this embodiment, since the quantization table / matrix is used, the degree of freedom in determining this value is increased.

【0236】ここでは、その一例として、k1=k7=9
の場合について示す。このとき、L3=2593/54
1、L5=2593/519として、図11(a)の領
域内の代表元(s3,s5)に対して、図12に示すよう
な局所量子化値を割り当てると、量子化後に残存する冗
長性を、k1=k7=7のときよりも少なくできる。この
結果、符号化効率は向上する。
Here, as one example, k 1 = k 7 = 9
It shows about the case of. At this time, L 3 = 2593/54
If the local quantization values as shown in FIG. 12 are assigned to the representative elements (s 3 , s 5 ) in the area of FIG. 11A assuming that 1, L 5 = 2593/519, Redundancy can be made smaller than when k 1 = k 7 = 7. As a result, the coding efficiency is improved.

【0237】k1=k7=7の場合と同様に量子化テーブ
ル/マトリクスを求めると、次式(58)のようにな
る。この量子化テーブル/マトリクスを用いることで、
1=k7=9の場合でも、十分な互換性を保てるように
なる。
When the quantization table / matrix is obtained in the same manner as in the case where k 1 = k 7 = 7, the following expression (58) is obtained. By using this quantization table / matrix,
Even when k 1 = k 7 = 9, sufficient compatibility can be maintained.

【0238】[0238]

【数38】 (38)

【0239】次に、本願第5の発明の一実施例について
説明する。この実施例では、上式(42)に示すe
(i,j)の二乗平均を最小化するような量子化テーブ
ル/マトリクスを求める。この平均は、量子化テーブル
/マトリクスを算出する周期ごとにとる。ここでは、フ
レーム単位で求めることにする。
Next, an embodiment of the fifth invention of the present application will be described. In this embodiment, e
A quantization table / matrix that minimizes the mean square of (i, j) is obtained. This average is taken for each cycle of calculating the quantization table / matrix. Here, it is determined on a frame basis.

【0240】例えば、k1=k7=7の場合に、画像“フ
ラワーガーデン”の第1フレームの輝度値に対して、量
子化テーブル/マトリクスを求めると、次式(59)と
なる。この式を、上式(57)の量子化テーブル/マト
リクスと比べると、半数以上の値は一致するが、一部の
値は少し異なる。これは、ダイナミックレンジのずれ以
外で生じる差をも含めて、可逆離散コサイン変換の変換
係数と本来の離散コサイン変換係数の差を、総合的に最
小化したためである。
For example, when k 1 = k 7 = 7, when the quantization table / matrix is obtained for the luminance value of the first frame of the image “flower garden”, the following equation (59) is obtained. When this equation is compared with the quantization table / matrix of the above equation (57), more than half the values match, but some values are slightly different. This is because the difference between the transform coefficient of the reversible discrete cosine transform and the original discrete cosine transform coefficient, including the difference generated due to the deviation of the dynamic range, is totally minimized.

【0241】これにより、従来の離散コサイン変換との
互換性が、上式(57)の量子化テーブル/マトリクス
を用いる場合よりも向上する。
As a result, the compatibility with the conventional discrete cosine transform is improved as compared with the case where the quantization table / matrix of the above equation (57) is used.

【0242】[0242]

【数39】 [Equation 39]

【0243】次に、本願第6の発明の一実施例について
述べる。本実施例では、上式(46)または上式(4
7)に従って量子化テーブル/マトリクスを計算する。
ここでも、量子化テーブル/マトリクスをフレームごと
に算出する。上記第5の発明の実施例と同様にして、k
1=k7=7として、画像“フラワーガーデン”の第1フ
レームの輝度値について量子化テーブル/マトリクスを
求めると、次式(60)のようになる。
Next, an embodiment of the sixth invention of the present application will be described. In this embodiment, the above equation (46) or the above equation (4)
Calculate the quantization table / matrix according to 7).
Here, the quantization table / matrix is calculated for each frame. In the same manner as in the fifth embodiment, k
When 1 = k 7 = 7 and the quantization table / matrix is obtained for the luminance value of the first frame of the image “flower garden”, the following expression (60) is obtained.

【0244】[0244]

【数40】 (Equation 40)

【0245】上式(60)からわかるように、近似とは
いっても、半数以上の値については、上式(59)の値
と一致し、そうでない値についても±2の範囲で異なる
程度である。
As can be seen from the above equation (60), although approximation is made, more than half of the values match the values of the above equation (59), and other values are different in the range of ± 2. is there.

【0246】次に、本願第7の発明の一実施例について
説明する。この実施例では、まず、上記第6の発明の手
法により、量子化テーブル/マトリクス値を求め、その
前後の値を候補とする。そして、上記第5の発明と同様
に、その候補中で、上式(42)のe(i,j)の二乗
平均を最小化する量子化テーブル/マトリクス値を求め
る。上式(59)と上式(60)の比較からわかるよう
に、上記第5の発明の実施例と上記第6の発明の実施例
で得られる結果は、それほど大きく違わないため、量子
化テーブル/マトリクスの候補値を、上記第6の発明の
実施例で得られる値、およびその値±1とする。
Next, an embodiment of the seventh invention of the present application will be described. In this embodiment, first, a quantization table / matrix value is obtained by the method of the sixth invention, and values before and after the quantization table / matrix are set as candidates. Then, as in the fifth aspect, a quantization table / matrix value for minimizing the mean square of e (i, j) in the above equation (42) is obtained from the candidates. As can be seen from the comparison between the above equations (59) and (60), the results obtained in the fifth embodiment and the sixth embodiment are not so different from each other. The / matrix candidate values are the value obtained in the sixth embodiment of the present invention and the value ± 1.

【0247】また、ここでも、量子化マトリクスをフレ
ームごとに算出する。上記第5、第6の発明の実施例と
同様にして、k1=k7=7として、画像“フラワーガー
デン”の第1フレームの輝度値に対して求めた量子化マ
トリクスは、次式(61)のようになる。
Also, here, the quantization matrix is calculated for each frame. Similarly to the fifth and sixth embodiments of the present invention, the quantization matrix obtained for the luminance value of the first frame of the image “flower garden” with k 1 = k 7 = 7 is given by the following equation ( 61).

【0248】[0248]

【数41】 [Equation 41]

【0249】これから、上式(59)とほとんど同じ量
子化マトリクスが得られることがわかる。なお、演算量
に関しては、探索範囲の減少により、上記第5の発明に
比べると大幅に低減される。
From this, it can be seen that a quantization matrix almost the same as the above equation (59) can be obtained. It should be noted that the amount of calculation is significantly reduced as compared with the fifth aspect of the present invention due to the reduced search range.

【0250】次に、本願第8の発明の一実施例について
説明する。本願第8の発明では、8×8可逆離散コサイ
ン変換において、直流成分算出の過程で経由する6段の
可逆量子化のうち、3段については、量子化周期を(N
1,N2)、逆量子化周期を(M1,M2)とし、残りの3段
については、量子化周期を(N′1,N′2)、逆量子化
周期を(M′1,M′2)とする。
Next, an embodiment of the eighth invention of the present application will be described. In the eighth invention of the present application, in the 8 × 8 reversible discrete cosine transform, among the six reversible quantizations that are passed in the process of calculating the DC component, the quantization period is set to (N
1 , N 2 ), the dequantization period is (M 1 , M 2 ), the quantization period is (N ′ 1 , N ′ 2 ) and the dequantization period is (M ′ 1 ) for the remaining three stages. , M ' 2 ).

【0251】そして、これらの値が、上式(52)を満
たすとき、直流成分のダイナミックレンジ差は完全に補
償される。
When these values satisfy the above equation (52), the dynamic range difference of the DC component is completely compensated.

【0252】この条件は、前述の通り、上式(53)を
満たすN1、N2、M1、M2に対して、N′1、N′2
M′1、M′2を上式(54)に示すようにすることで、
満たされる。ここでは、上式(53)を満たす値とし
て、次式(62)を用いる。
As described above, this condition is such that N ′ 1 , N ′ 2 , N 1 , N 2 , M 1 , and M 2 satisfy the above equation (53).
By making M ′ 1 and M ′ 2 as shown in the above equation (54),
It is filled. Here, the following equation (62) is used as a value satisfying the above equation (53).

【0253】[0253]

【数42】 (Equation 42)

【0254】ほかに、上式(53)を満たす値として
は、次式(63)に示すようなものがある。
Other values satisfying the above equation (53) include those shown in the following equation (63).

【0255】[0255]

【数43】 [Equation 43]

【0256】あるいは、上式(62)、(63)の値の
倍数、N1とN2、M1とM2を入れ換えたものなども考え
られるが、量子化対応表の大きさが小さくて済む点で式
(62)の値がよい。また、直流成分の算出で経由する
6段の可逆量子化のどこで、量子化周期、逆量子化周期
を逆にするかは、前述の通り20通り考えられるが、こ
の実施例では、図8に従った。
[0256] Alternatively, the above equation (62), a multiple of the value of (63), N 1 and N 2, M 1 and is also considered, such as those interchanged M 2, a small size of the quantization correspondence table The value of the equation (62) is good in terms of ending. In addition, where the quantization period and the inverse quantization period are reversed in the six-stage reversible quantization via the calculation of the DC component can be considered as described above, there are 20 possible cases. Followed.

【0257】本願第8の発明の実施例の作用効果を確認
した結果を以下に説明する。
The result of confirming the operation and effect of the eighth embodiment of the present invention will be described below.

【0258】画像“フラワーガーデン”の第1フレーム
の輝度値に対して、本願第8の発明の実施例として、8
×8可逆離散コサイン変換の直流成分と、本来の8×8
離散コサイン変換の直流成分の差の分布を示したもの
が、図14である。図14では、同時にダイナミックレ
ンジの差を補償しない、従来の8×8可逆離散コサイン
変換に関する結果も載せてある。
The brightness value of the first frame of the image “Flower Garden” is set to 8 as an embodiment of the eighth invention of the present application.
DC component of × 8 reversible discrete cosine transform and original 8 × 8
FIG. 14 shows the distribution of the difference between the DC components of the discrete cosine transform. FIG. 14 also shows a result regarding a conventional 8 × 8 reversible discrete cosine transform that does not simultaneously compensate for a difference in dynamic range.

【0259】図14から、本願第8の発明の実施例によ
って、直流成分の差が大幅に低減していることがわか
る。この差の二乗平均値は、従来の場合は664.94
だったものが、第8の発明の場合には、0.96にまで
低減した。
FIG. 14 shows that the difference between the DC components is significantly reduced by the embodiment of the eighth invention. The mean square value of this difference is 664.94 in the conventional case.
However, in the case of the eighth invention, it was reduced to 0.96.

【0260】次に、上述の各発明の実施例を用いて行っ
た、互換性に関する実験結果を示す。符号化では可逆離
散コサイン変換を用い、復号では従来の離散コサイン変
換を用いたときの復号画像の誤差について調べた。画像
は“フラワーガーデン”(720×480、4:2:2
フォーマット)150フレームを用いた。符号化は、基
本的にはMPEG−2のアルゴリズムに従い、MPEG
−2のアルゴリズムで離散コサイン変換を行う部分を、
上述の可逆離散コサイン変換にかえて符号化した。
Next, the results of experiments on compatibility performed using the above-described embodiments of the present invention will be described. In the coding, the lossless discrete cosine transform was used, and in the decoding, the error of the decoded image when the conventional discrete cosine transform was used was examined. The image is “Flower Garden” (720 × 480, 4: 2: 2
Format) 150 frames were used. The encoding basically follows the MPEG-2 algorithm,
-2 to perform the discrete cosine transform with the algorithm
The encoding was performed in place of the above-described reversible discrete cosine transform.

【0261】また、可逆離散コサイン変換により得られ
た変換係数をさらに量子化することはせず、量子化幅は
1としてある。このとき、発生符号量の点では、MPE
G−2の仕様を満たしていない。
The transform coefficients obtained by the reversible discrete cosine transform are not further quantized, and the quantization width is set to 1. At this time, in terms of the generated code amount, the MPE
It does not meet the specifications of G-2.

【0262】復号では、従来の離散コサイン逆変換を用
いる通常のMPEG−2のアルゴリズムを用いた。な
お、コア画像(IまたはPピクチャ)の間隔はM=3、
画像グループ(GOP)内のフレーム数はN=15とし
た。
In the decoding, a normal MPEG-2 algorithm using a conventional inverse discrete cosine transform is used. Note that the interval between core images (I or P pictures) is M = 3,
The number of frames in the image group (GOP) was N = 15.

【0263】これにより得られる復号画像の、原画像に
対する平均二乗誤差を、150フレーム分にわたって平
均したものを表2に示す。ここでは、従来方式と、本願
第2、第5、第6、第7の発明の方式に関して、本願第
8の発明と組み合わせて用いた場合とそうでない場合に
ついて調べた結果を示している。
Table 2 shows the average square error of the decoded image obtained with respect to the original image over 150 frames. Here, the results obtained by examining the conventional system and the systems of the second, fifth, sixth, and seventh inventions of the present invention in a case where they are used in combination with the eighth invention of the present application and cases in which they are not used are shown.

【0264】まず、第8の発明の方式と組み合わせた場
合とそうでない場合を比べると、第8の発明の方式を用
いることで、大幅に復号画質が改善されることがわか
る。
First, a comparison between the case in which the method is combined with the method of the eighth invention and the case in which the method is not combined shows that the use of the method of the eighth invention significantly improves the decoded image quality.

【0265】次に、従来方式と、本願第2、第5、第
6、第7の発明を比べると、第2、第5、第6、第7の
発明の方式は、どれも従来方式に比べ大幅に復号画質が
改善されていることがわかる。
Next, comparing the conventional system with the second, fifth, sixth, and seventh inventions of the present application, the systems of the second, fifth, sixth, and seventh inventions are all different from the conventional system. It can be seen that the decoded image quality is significantly improved.

【0266】また、本願第2、第5、第6、第7の発明
の方式で比べた場合には、固定の量子化マトリクスを用
いる第2の発明に比べ、量子化マトリクスを逐次計算す
る方式の第5、第6、第7の発明では、改善が見られる
ことがわかる。
In comparison with the second, fifth, sixth, and seventh aspects of the present invention, the scheme of sequentially calculating the quantization matrix is different from that of the second aspect of the present invention using a fixed quantization matrix. In the fifth, sixth, and seventh aspects of the present invention, it can be seen that an improvement is seen.

【0267】さらに、この第5、第6、第7の発明の方
式で比べた場合には、最も演算量を必要とするが最適な
量子化マトリクスを求める第5の発明が、最も復号画質
がよい。近似計算により量子化マトリクスを算出する第
6の方式でも、かなりよい結果が得られており、第5と
第6の方式を組み合わせて演算量を低減させる第7の方
式では、第5の発明と同程度の良好な結果が得られるこ
とがわかる。
Further, when the methods of the fifth, sixth and seventh aspects are compared, the fifth aspect of the invention which requires the most computational amount but finds the optimal quantization matrix has the highest decoding image quality. Good. The sixth method of calculating the quantization matrix by approximation calculation has also obtained quite good results, and the seventh method of reducing the amount of calculation by combining the fifth and sixth methods has the same features as the fifth invention. It can be seen that the same good results can be obtained.

【0268】以上のことは、本願第2、第5、第6、第
7の発明を、第8の発明と組み合せて符号化した場合に
ついてもいえる。
The above can be said for the case where the second, fifth, sixth, and seventh inventions of the present application are coded in combination with the eighth invention.

【0269】以上のことから、量子化マトリクスの使
用、直流成分のダイナミックレンジ差の補償により、従
来方式に比べて復号画質が大幅に改善されることがわか
る。
From the above, it can be understood that the use of the quantization matrix and the compensation of the dynamic range difference of the DC component greatly improve the decoded image quality as compared with the conventional method.

【0270】[0270]

【表2】 [Table 2]

【0271】[0271]

【発明の効果】以上説明した通り、本発明によれば、量
子化マトリクスを利用することで、可逆離散コサイン変
換と本来の離散コサイン変換のダイナミックレンジ差を
補正できる、という効果を奏する。
As described above, according to the present invention, it is possible to correct the dynamic range difference between the reversible discrete cosine transform and the original discrete cosine transform by using the quantization matrix.

【0272】また、量子化マトリクスでは補正できない
直流成分については、その算出に関与する6段の2×2
可逆量子化のうち、3段については、残りの3段とは異
なる可逆量子化を行うことで、ダイナミックレンジを補
正することにある。この結果、可逆離散コサイン変換と
従来の離散コサイン変換の互換性が向上する。すなわ
ち、可逆離散コサイン変換を用いて符号化した画像を、
従来の離散コサイン逆変換を用いて復号した場合でも、
従来方式よりも高画質を確保できる。
For a DC component that cannot be corrected by the quantization matrix, the 6 × 2 × 2
In the three stages of the reversible quantization, the dynamic range is corrected by performing reversible quantization different from the remaining three stages. As a result, compatibility between the reversible discrete cosine transform and the conventional discrete cosine transform is improved. That is, an image encoded using the reversible discrete cosine transform is
Even when decoding using the conventional inverse discrete cosine transform,
Higher image quality than the conventional method can be secured.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本願第1の発明に係る符号化器の一実施形態を
示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of an encoder according to the first invention of the present application.

【図2】本願第2の発明に係る符号化器の一実施形態を
示すブロック図である。
FIG. 2 is a block diagram showing an embodiment of an encoder according to the second invention of the present application.

【図3】本願第3の発明に係る符号化器の一実施形態を
示すブロック図である。
FIG. 3 is a block diagram showing an embodiment of an encoder according to the third invention of the present application.

【図4】本願第4の発明に係る符号化器の一実施形態を
示すブロック図である。
FIG. 4 is a block diagram showing an embodiment of an encoder according to a fourth invention of the present application.

【図5】本願第5の発明に係る符号化器における、JP
EG/MPEG互換用量子化テーブル/マトリクス生成
装置の一実施形態の回路構成を示す図である。
FIG. 5 shows JP in the encoder according to the fifth invention of the present application.
FIG. 2 is a diagram illustrating a circuit configuration of an embodiment of an EG / MPEG compatible quantization table / matrix generation device.

【図6】本願第6の発明に係る符号化器における、JP
EG/MPEG互換用量子化テーブル/マトリクス生成
装置の一実施形態の回路構成を示すである。
FIG. 6 shows JP in the encoder according to the sixth invention of the present application.
2 is a diagram illustrating a circuit configuration of an embodiment of a quantization table / matrix generation device for EG / MPEG compatibility.

【図7】本願第7の発明に係る符号化器における、JP
EG/MPEG互換用量子化テーブル/マトリクス生成
装置の一実施形態の回路構成を示す図である。
FIG. 7 shows a JP in the encoder according to the seventh invention of the present application.
FIG. 2 is a diagram illustrating a circuit configuration of an embodiment of an EG / MPEG compatible quantization table / matrix generation device.

【図8】本願第8の発明である8×8可逆離散コサイン
変換回路において、水平方向8元可逆離散コサイン変換
を行う部分の一実施形態の回路構成を示す図である。
FIG. 8 is a diagram showing a circuit configuration of an embodiment of a portion for performing an 8-ary reversible discrete cosine transform in a horizontal direction in an 8 × 8 reversible discrete cosine transform circuit according to an eighth invention of the present application.

【図9】本願第8の発明である8×8可逆離散コサイン
変換回路において、垂直方向8元可逆離散コサイン変換
を行う部分の一実施形態の回路構成を示す図である。
FIG. 9 is a diagram showing a circuit configuration of an embodiment of a portion for performing a vertical 8-way reversible discrete cosine transform in an 8 × 8 reversible discrete cosine transform circuit according to an eighth invention of the present application.

【図10】本願第6の発明に係る符号化器の、JPEG
/MPEG互換用量子化テーブル/マトリクス生成装置
において、MPEG、JPEGの量子化特性を近似する
のに用いる関数を示す図である。
FIG. 10 shows the JPEG of the encoder according to the sixth invention of the present application.
FIG. 6 is a diagram illustrating functions used to approximate the quantization characteristics of MPEG and JPEG in the / MPEG compatible quantization table / matrix generation device.

【図11】(a)は、8元可逆離散コサイン変換回路の
4×4行列変換に基づく可逆量子化において、代表元
(s3,s5)の存在領域の一例を示す図である。(b)
は、8元可逆離散コサイン変換回路の4×4行列変換に
基づく可逆量子化において、代表元(s3,s5)の存在
範囲が図11(a)のときの、この量子化値の存在範囲
の一例を示す図である。
FIG. 11A is a diagram illustrating an example of a region where a representative element (s 3 , s 5 ) exists in reversible quantization based on 4 × 4 matrix transformation of an 8-ary reversible discrete cosine transform circuit. (B)
In the reversible quantization based on the 4 × 4 matrix transform of the 8-ary reversible discrete cosine transform circuit, the existence of this quantized value when the existence range of the representative element (s 3 , s 5 ) is as shown in FIG. It is a figure showing an example of a range.

【図12】8元可逆離散コサイン変換回路の4×4行列
変換に基づく可逆量子化において、代表元(s3,s5
の存在範囲が図11(a)のときの、この量子化値の存
在範囲の一例を示す図である。
FIG. 12 illustrates a representative element (s 3 , s 5 ) in the reversible quantization based on the 4 × 4 matrix transform of the 8-ary reversible discrete cosine transform circuit.
FIG. 12 is a diagram showing an example of the existence range of the quantization value when the existence range of is shown in FIG.

【図13】(a)は、本願第8の発明における行列に基
づく線形変換と可逆量子化の一実施形態の回路構成を示
す図である。(b)は、第8の発明における行列に基づ
く線形変換と可逆量子化の一実施形態の回路構成を示す
図である。
FIG. 13A is a diagram showing a circuit configuration of an embodiment of a linear transformation and a lossless quantization based on a matrix in the eighth invention of the present application. (B) is a figure which shows the circuit structure of one Embodiment of the linear transformation based on a matrix and lossless quantization in 8th invention.

【図14】本願第8の発明と従来方式とで、可逆離散コ
サイン変換係数と本来の離散コサイン変換係数の直流成
分差に関する分布の例を示したグラフである。
FIG. 14 is a graph showing an example of a distribution of a DC component difference between a reversible discrete cosine transform coefficient and an original discrete cosine transform coefficient in the eighth invention of the present application and the conventional method.

【図15】8元可逆離散コサイン変換の構成例を示す図
である。
FIG. 15 is a diagram illustrating a configuration example of an 8-ary reversible discrete cosine transform.

【図16】本来の8元離散コサイン変換の構成例を示す
図である。
FIG. 16 is a diagram illustrating a configuration example of an original 8-ary discrete cosine transform.

【符号の説明】[Explanation of symbols]

1 可逆離散コサイン変換回路 2 可変長符号化器 3 加算器 4 予測器 5 動き推定回路 11 離散コサイン変換回路 12 JPEG/MPEG互換用量子化テーブル/マト
リクス生成装置 21 離散コサイン逆変換回路 22 予測器 23 加算器 24 加算器 25 JPEG/MPEG互換用量子化テーブル/マト
リクス生成装置 30 逆量子化器 31 係数毎のMSE算出回路 32 係数毎の量子化テーブル/マトリクス修正装置 40 X′(i,j)算出回路 41 X′T(i,j)算出回路 42 量子化テーブル/マトリクス算出回路 50 第1のJPEG/MPEG互換用量子化テーブル
/マトリクス生成装置 51 第2のJPEG/MPEG互換用量子化テーブル
/マトリクス生成装置 160〜168 変換器 180〜188 変換器 200〜217 変換器
REFERENCE SIGNS LIST 1 reversible discrete cosine transform circuit 2 variable length encoder 3 adder 4 predictor 5 motion estimating circuit 11 discrete cosine transform circuit 12 quantization table / matrix generation device for JPEG / MPEG compatibility 21 discrete cosine inverse transform circuit 22 predictor 23 Adder 24 Adder 25 JPEG / MPEG compatible quantization table / matrix generation device 30 Inverse quantizer 31 MSE calculation circuit for each coefficient 32 Quantization table / matrix correction device for each coefficient 40 X ′ (i, j) calculation Circuit 41 X ′ T (i, j) calculation circuit 42 Quantization table / matrix calculation circuit 50 First quantization table / matrix generation device for JPEG / MPEG compatibility 51 Second quantization table / matrix for JPEG / MPEG compatibility Generator 160-168 Converter 180-188 Converter 200-2 17 Converter

Claims (8)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】画像信号を符号化する方式であって、 前記画像信号に対して可逆な離散コサイン変換を行って
変換係数を求める手段と、 JPEG互換用量子化テーブルを記憶しておく手段と、 前記変換係数と前記JPEG互換用量子化テーブルとを
可変長符号化して符号化された信号を出力する手段と、 を含むことを特徴とする画像信号符号化方式。
1. A method for encoding an image signal, comprising: means for performing a reversible discrete cosine transform on the image signal to obtain a transform coefficient; and means for storing a JPEG compatible quantization table. Means for performing variable-length coding on the transform coefficients and the quantization table for JPEG compatibility and outputting a coded signal.
【請求項2】動画像信号を符号化する方式であって、 過去に符号化された画像と符号化対象画像との間で、動
き推定を行って動きベクトルを求める手段と、 前記動きベクトルを用いて動き補償を行って、前記過去
に符号化された画像から予測画像を作成する手段と、 前記予測画像を前記符号化対象画像から減じ予測誤差画
像を作成する手段と、 前記予測誤差画像に対して可逆な離散コサイン変換を行
って、変換係数を算出する手段と、 MPEG互換用量子化マトリクスを記憶しておく手段
と、 前記変換係数と前記MPEG互換用量子化マトリクスと
前記動きベクトルを可変長符号化し、その結果を出力す
る手段と、 を含むことを特徴とする動画像信号符号化方式。
2. A method for encoding a moving image signal, comprising: means for estimating a motion vector between a previously encoded image and an image to be encoded to obtain a motion vector; Means for performing motion compensation using a means for creating a predicted image from the previously coded image; means for subtracting the predicted image from the image to be encoded to create a predicted error image; and Means for performing a reversible discrete cosine transform to calculate a transform coefficient; means for storing an MPEG-compatible quantization matrix; and changing the transform coefficient, the MPEG-compatible quantization matrix, and the motion vector. Means for performing long coding and outputting the result.
【請求項3】画像信号を符号化する方式であって、 前記画像信号に可逆な離散コサイン変換を行って可逆離
散コサイン変換係数を求める手段と、 前記画像信号に離散コサイン変換を行って離散コサイン
変換係数を求める手段と、 前記可逆離散コサイン変換係数の逆量子化値と前記離散
コサイン変換係数との差が小さくなるようなJPEG互
換用量子化テーブルを算出して出力する手段と、 前記可逆離散コサイン変換係数と前記JPEG互換用量
子化テーブルとを可変長符号化して符号化された信号を
出力する手段と、 を含むことを特徴とする画像信号符号化方式。
3. A method for encoding an image signal, comprising: means for performing a reversible discrete cosine transform on the image signal to obtain a reversible discrete cosine transform coefficient; and performing a discrete cosine transform on the image signal. Means for calculating a transform coefficient; means for calculating and outputting a JPEG compatible quantization table that reduces the difference between the inverse quantized value of the reversible discrete cosine transform coefficient and the discrete cosine transform coefficient; Means for performing variable length coding on the cosine transform coefficient and the JPEG compatible quantization table and outputting a coded signal.
【請求項4】動画像信号を符号化する方式であって、 過去に符号化された画像と符号化対象画像との間で動き
推定を行って、動きベクトルを求める手段と、 前記動きベクトルを用いて動き補償を行って、前記過去
に符号化された画像から第1の予測画像を作成する手段
と、 前記第1の予測画像を前記符号化対象画像から減じて第
1の予測誤差画像を作成する手段と、 前記第1の予測誤差画像に対して可逆な離散コサイン変
換を行い可逆離散コサイン変換係数を算出する手段と、 第2の予測画像を前記符号化対象画像から減じて第2の
予測誤差画像を作成する手段と、 前記第2の予測誤差信号に対して離散コサイン変換を行
って、離散コサイン変換係数を算出する手段と、 前記可逆離散コサイン変換係数の逆量子化値と前記離散
コサイン変換係数との差が小さくなるようなMPEG互
換用量子化マトリクスを算出して出力するとともに、前
記MPEG互換用量子化マトリクスを用いた時の前記可
逆離散コサイン変換係数の逆量子化値を出力する手段
と、 前記逆量子化値に対して離散コサイン逆変換を行って、
予測誤差再生画像を算出する手段と、 前記予測誤差再生画像に前記第2の予測画像を加算して
再生画像を作成する手段と、 前記動きベクトルを用いて動き補償を行って前記再生画
像から第2の予測画像を作成する手段と、 を含むことを特徴とする動画像信号符号化方式。
4. A method for encoding a moving image signal, comprising: performing motion estimation between an image encoded in the past and an image to be encoded to determine a motion vector; Means for creating a first predicted image from the previously coded image by performing motion compensation using the first predicted image; subtracting the first predicted image from the image to be coded; Means for creating, means for performing a reversible discrete cosine transform on the first prediction error image to calculate a reversible discrete cosine transform coefficient, and a second predictive image subtracted from the encoding target image to obtain a second predictive image. Means for creating a prediction error image; means for performing a discrete cosine transform on the second prediction error signal to calculate a discrete cosine transform coefficient; and an inverse quantization value of the reversible discrete cosine transform coefficient and the discrete Cosine strange Calculates and outputs a quantization matrix for MPEG compatibility such that the difference from the conversion coefficient becomes small, and outputs an inverse quantization value of the reversible discrete cosine transform coefficient when the quantization matrix for MPEG compatibility is used. Means, performing an inverse discrete cosine transform on the inverse quantized value,
Means for calculating a predicted error reproduced image; means for adding the second predicted image to the predicted error reproduced image to create a reproduced image; and performing motion compensation using the motion vector to perform 2. A moving image signal encoding method, comprising: means for creating a second predicted image.
【請求項5】請求項3又は4記載の前記JPEG/MP
EG互換用量子化テーブル/マトリクスを算出する手段
が、 前記可逆離散コサイン変換係数を、JPEG/MPEG
互換用量子化テーブル/マトリクスの値に基づいて逆量
子化して、逆量子化値を求める手段と、 前記離散コサイン変換係数と、前記逆量子化値との差の
二乗平均を、係数毎に算出する手段と、 前記二乗平均に基づいて、前記JPEG/MPEG互換
用量子化テーブル/マトリクスの値を修正して出力する
手段と、 を含むことを特徴とする請求項3または請求項4記載の
画像信号符号化方式。
5. The JPEG / MP according to claim 3 or 4, wherein
The means for calculating the quantization table / matrix for EG compatibility converts the reversible discrete cosine transform coefficients into JPEG / MPEG
Means for inversely quantizing based on the values of the compatible quantization table / matrix to obtain an inversely quantized value; and calculating a mean square of a difference between the discrete cosine transform coefficient and the inversely quantized value for each coefficient. 5. The image according to claim 3, further comprising: a unit that corrects and outputs a value of the quantization table / matrix for JPEG / MPEG compatibility based on the root mean square. 6. Signal encoding method.
【請求項6】請求項3または請求項4記載の前記JPE
G/MPEG互換用量子化テーブル/マトリクスを算出
する手段が、 前記可逆離散コサイン変換係数Xq(i,j)から、逆量
子化で整数化する前の値を量子化テーブル/マトリクス
で割ったものに相当する値を求め、これをX′(i,
j)とする手段と、 前記離散コサイン変換係数XT(i,j)に、前記可逆離
散コサイン変換係数Xq(i,j)の値に応じて、微小数
を加減算した値をX′T(i,j)とする手段と、 前記X′(i,j)と前記X′T(i,j)に関する2次
のモーメントに基づく演算によって、量子化テーブル/
マトリクスを算出し、出力する手段と、 前記量子化テーブル/マトリクスを用いて、前記可逆離
散コサイン変換係数を逆量子化し、逆量子化値を出力す
る手段と、 を含むことを特徴とする請求項3または請求項4記載の
画像信号符号化方式。
6. The JPE according to claim 3 or claim 4.
The means for calculating the G / MPEG compatible quantization table / matrix divides the value before being converted into an integer by inverse quantization from the lossless discrete cosine transform coefficient X q (i, j) by the quantization table / matrix. A value corresponding to the value X '(i, i,
means for the j), the discrete cosine transform coefficients X T (i, a j), the reversible discrete cosine transform coefficients X q (i, depending on the value of j), a value obtained by subtracting the number of minute X 'T (I, j), and a calculation based on the second moment about X ′ (i, j) and X ′ T (i, j),
Means for calculating and outputting a matrix, and means for inversely quantizing the lossless discrete cosine transform coefficient using the quantization table / matrix and outputting an inversely quantized value. The image signal encoding method according to claim 3 or 4.
【請求項7】前記JPEG/MPEG互換用量子化テー
ブル/マトリクスを算出する手段が、 請求項5記載の前記JPEG/MPEG互換用量子化テ
ーブル/マトリクスを算出する手段と、 請求項6記載の前記JPEG/MPEG互換用量子化テ
ーブル/マトリクスを算出する手段と、 を有することを特徴とする請求項3または請求項4記載
の画像符号化方式。
7. The means for calculating the JPEG / MPEG compatible quantization table / matrix, the means for calculating the JPEG / MPEG compatible quantization table / matrix, and the means according to claim 6. 5. The image encoding method according to claim 3, further comprising: means for calculating a quantization table / matrix for JPEG / MPEG compatibility.
【請求項8】8×8ブロックの二次元信号に対して水平
方向、及び垂直方向に可逆な8元離散コサイン変換を行
って8×8ブロック可逆離散コサイン変換係数を算出す
装置であって水平方向の可逆離散コサイン変換と垂直方向の可逆離散
コサイン変換の一方を行う第1サブユニットと、他方を
行う第2サブユニットと、を備え、 前記第1サブユニットは、前記8×8ブロック二次元信
号から第m行(または第m列)を取り出して、8元被変
換ベクトル信号(x(0),x(1),...,x(7))を構成し、こ
れに8元可逆離散コサイン変換を行って8元変換ベクト
ル信号(X(0),X(1),...,X(7))を算出し、前記8元変
換ベクトル信号を8×8ブロック一方向可逆離散コサイ
ン変換係数の第m行(または第m列)とし、これをm=
1から8までの各行(または各列)に対して行い、前記
8×8ブロック一方向可逆離散コサイン変換係数を算出
前記第2サブユニットは、前記8×8ブロック一方向可
逆離散コサイン変換係数から第n列(または第n行)を
取り出して、8元被変換ベクトル信号(x′(0),x′
(1),...,x′(7))を構成し、これに8元可逆離散コサイ
ン変換を行って8元変換ベクトル信号(X′(0),X′
(1),...,X′(7))を算出し、前記8×8ブロック可逆離
散コサイン変換係数の第n列(または第n行)とし、こ
れをn=1から8までの各列(または各行)に対して行
い、前記8×8ブロック可逆離散コサイン変換係数を算
出し前記第1、及び第2のサブユニットは前記8元被変換ベクトル信号の要素信号x(0)とx(7)か
らなる2元ベクトル信号(x(0),x(7))に、第1の行列 で定まる行列変換を行い、可逆量子化を行って第1の2
元ベクトル信号(u0,u4)を出力する第1の2元可逆変
換手段と前記8元被変換ベクトル信号の要素信号x(1)とx(6)か
らなる2元ベクトル信号(x(1),x(6))に、前記第1の
行列で定まる行列変換を行い、可逆量子化を行って第2
の2元ベクトル信号(u2,u6)を出力する第2の2元可
逆変換手段と前記8元被変換ベクトル信号の要素信号x(3)とx(4)か
らなる2元ベクトル信号(x(3),x(4))に、前記第1の
行列で定まる行列変換を行い、可逆量子化を行って第3
の2元ベクトル信号(u1,u5)を出力する第3の2元可
逆変換手段と前記8元被変換ベクトル信号の要素信号x(2)とx(5)か
らなる2元ベクトル信号(x(2),x(5))に、前記第1の
行列で定まる行列変換を行い、可逆量子化を行って第4
の2元ベクトル信号(u3,u7)を出力する第4の2元可
逆変換手段と前記第1の2元ベクトル信号の要素信号u0と前記第3
の2元ベクトル信号の要素信号u1からなる2元ベクトル
信号(u0,u1)に、前記第1の行列で定まる行列変換を
行い、可逆量子化を行って第5の2元ベクトル信号(v
0,v1)を出力する第5の2元可逆変換手段と前記第2の2元ベクトル信号の要素信号u2と前記第4
の2元ベクトル信号の要素信号u3からなる2元ベクト
ル信号(u2,u3)に、前記第1の行列で定まる行列変換
を行い、可逆量子化を行って第6の2元ベクトル信号
(v2,v3)を出力する第6の2元可逆変換手段と前記第5の2元ベクトル信号の要素信号v0と前記第6
の2元ベクトル信号の要素信号v2からなる2元ベクト
ル信号(v0,v2)に、前記第1の行列で定まる行列変換
を行い、可逆量子化を行って前記8元変換ベクトル信号
の要素信号からなる第7の2元ベクトル信号(X(0),X
(4))を出力する第7の2元可逆変換手段と前記第5の2元ベクトル信号の要素信号v1と前記第6の
2元ベクトル信号の要素信号v3からなる2元ベクトル信
号(v1,v3)に、整数a2,a6からなる第2の行列 で定まる行列変換を行い、可逆量子化を行って前記8元
変換ベクトル信号の要素信号からなる第8の2元ベクト
ル信号(X(2),X(6))を出力する第8の2元可逆変換手
段と前記第1の2元ベクトル信号の要素信号u4と前記第3の
2元ベクトル信号の要素信号u5と前記第2の2元ベクト
ル信号の要素信号u6と前記第4の2元ベクトル信号の要
素信号u7からなる4元ベクトル信号(u4,u5,u6,u7)に、
整数a1, a3, a5,a7からなる第3の行列 で定まる行列変換を行い、可逆量子化を行って前記8元
変換ベクトル信号の要素信号からなる4元ベクトル信号
(X(1),X(7),X(3),X(5))を出力する4元可逆変換手
段と、を備え前記第1、及び第2のサブユニットの各々において、前
記8×8ブロック可逆離散コサイン変換係数の直流成分
信号の算出に関与する可逆変換を前記第1の2元可逆変換手段と前記第2の2元可逆変換
手段と前記第3の2元可逆変換手段と前記第4の2元可
逆変換手段とからなる第1段の可逆変換手段と前記第5の2元可逆変換手段と前記第6の2元可逆変換
手段とからなる第2段の可逆変換手段と前記第7の2元可逆変換手段からなる第3段の可逆変換
手段とし前記第1サブユニットの前記第1段、前記第2段、前記
第3段、及び、前記第2サブユニットの前記第1段、前
記第2段、前記第3段の6段の可逆変換手段の中で 、い
ずれか3段と、残りの3段とで、前記可逆量子化で用い
る量子化対応表を変えることで、可逆離散コサイン変換
の直流成分と本来の離散コサイン変換の直流成分とのダ
イナミックレンジ差をなくすことを特徴とする、可逆離
散コサイン変換係数算出装置
8. A horizontal circuit for a two-dimensional signal of 8 × 8 blocks.
An apparatus for calculating an 8 × 8 block reversible discrete cosine transform coefficient by performing an eight-way discrete cosine transform that is reversible in a direction and a vertical direction , wherein the reversible discrete cosine transform in the horizontal direction and the reversible discrete cosine transform in the vertical direction are performed. Discrete
A first subunit that performs one of the cosine transforms and the other
And a second sub-unit for performing the 8 × 8 block two-dimensional signal transmission.
Extract the m-th row (or m-th column) from the
, X (0), x (1), ..., x (7)
Perform an 8-ary reversible discrete cosine transform on the
(X (0), X (1),..., X (7))
8 × 8 block unidirectional reversible discrete cos
And the m-th row (or m-th column) of the
For each row (or each column) from 1 to 8,
Calculates 8x8 block one-way reversible discrete cosine transform coefficient
And the second subunit is capable of one direction of the 8 × 8 block.
The nth column (or nth row) is calculated from the inverse discrete cosine transform coefficient.
Take out the 8-ary transformed vector signal (x '(0), x'
(1), ..., x '(7)), and this
Octant conversion vector signal (X '(0), X'
(1),..., X ′ (7)).
Let the nth column (or nth row) of the scattered cosine transform coefficient be
This is a row for each column (or each row) from n = 1 to 8.
The 8 × 8 block reversible discrete cosine transform coefficient is calculated.
And the first and second subunits determine whether the elementary signals x (0) and x (7) of the 8-ary transformed vector signal
A binary matrix signal (x (0), x (7)) Is performed, and a reversible quantization is performed to obtain the first 2
A first binary reversible transformation that outputs a source vector signal (u0, u4)
Means for converting the elementary signals x (1) and x (6) of the 8-ary converted vector signal.
To the binary vector signal (x (1), x (6))
Performs a matrix transformation defined by a matrix, performs reversible quantization, and
Output a binary vector signal (u2, u6)
An inverse transforming means for determining whether the elementary signals x (3) and x (4) of the 8-ary transformed vector signal
To the binary vector signal (x (3), x (4))
Performs a matrix transformation determined by a matrix, performs reversible quantization, and
Output a binary vector signal (u1, u5)
An inverse transforming means for determining whether the elementary signals x (2) and x (5)
To the binary vector signal (x (2), x (5))
Matrix transformation determined by the matrix is performed, lossless quantization is performed, and the fourth
Output a binary vector signal (u3, u7)
Inverting means, and an element signal u0 of the first binary vector signal and the third
Vector consisting of the element signal u1 of the binary vector signal of
A matrix transformation defined by the first matrix is applied to the signal (u0, u1).
And a reversible quantization is performed to obtain a fifth binary vector signal (v
0, v1), and a second binary reversible conversion means for outputting the elementary signal u2 of the second binary vector signal and the fourth
Vector consisting of the elementary signal u3 of the binary vector signal of
Matrix conversion determined by the first matrix into the signal (u2, u3)
And a lossless quantization is performed to obtain a sixth binary vector signal.
a sixth binary reversible conversion means for outputting (v2, v3); an element signal v0 of the fifth binary vector signal;
Vector consisting of the elementary signal v2 of the binary vector signal of
Matrix conversion determined by the first matrix into the signal (v0, v2)
And the reversible quantization is performed to obtain the 8-ary transformed vector signal.
A seventh binary vector signal (X (0), X
(4)) a seventh binary reversible conversion means for outputting the elementary signal v1 of the fifth binary vector signal and the sixth binary reversible
Binary vector signal consisting of elementary signal v3 of binary vector signal
(V1, v3), the second matrix consisting of integers a2, a6 Performs a matrix transformation defined by
Eighth binary vector consisting of element signals of the transformed vector signal
Eighth binary reversible converter that outputs the X-ray signals (X (2), X (6))
A stage , an element signal u4 of the first binary vector signal and the third
The elementary signal u5 of the binary vector signal and the second binary vector
Of the elementary signal u6 and the fourth binary vector signal
A quaternary vector signal (u4, u5, u6, u7) consisting of the raw signal u7,
Third matrix of integers a1, a3, a5, a7 Performs a matrix transformation defined by
A quaternary vector signal composed of the element signals of the transformed vector signal
(X (1), X (7), X (3), X (5))
And a step in each of the first and second subunits.
DC component of the 8 × 8 block reversible discrete cosine transform coefficient
The reversible conversion involved in the calculation of the signal, the first said two-way reversible converter of the second two-way reversible transform
Means, said third binary reversible transform means, and said fourth binary reversible means
A first-stage reversible conversion unit including an inverse conversion unit , the fifth binary reversible conversion unit, and the sixth binary reversible conversion unit
Means and a third-stage reversible transform comprising the seventh binary reversible transform means.
Means, the first stage, the second stage, the
A third stage, and the first stage before the second subunit,
The quantization correspondence table used in the reversible quantization is changed between any three of the six reversible transform means of the second and third steps and the remaining three steps. A reversible discrete cosine transform coefficient calculating device , characterized in that a dynamic range difference between a DC component of the reversible discrete cosine transform and a DC component of the original discrete cosine transform is eliminated.
JP27731296A 1996-08-23 1996-09-27 Transformation encoding of digital signal enabling reversible transformation Expired - Lifetime JP2914326B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP27731296A JP2914326B2 (en) 1996-09-27 1996-09-27 Transformation encoding of digital signal enabling reversible transformation
US08/917,085 US6167161A (en) 1996-08-23 1997-08-25 Lossless transform coding system having compatibility with lossy coding
US09/692,475 US6415060B1 (en) 1996-08-23 2000-10-20 Lossless transform coding system having compatibility with lossy coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27731296A JP2914326B2 (en) 1996-09-27 1996-09-27 Transformation encoding of digital signal enabling reversible transformation

Publications (2)

Publication Number Publication Date
JPH10108186A JPH10108186A (en) 1998-04-24
JP2914326B2 true JP2914326B2 (en) 1999-06-28

Family

ID=17581792

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27731296A Expired - Lifetime JP2914326B2 (en) 1996-08-23 1996-09-27 Transformation encoding of digital signal enabling reversible transformation

Country Status (1)

Country Link
JP (1) JP2914326B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3132456B2 (en) 1998-03-05 2001-02-05 日本電気株式会社 Hierarchical image coding method and hierarchical image decoding method
GB0110748D0 (en) * 2001-05-02 2001-06-27 Apical Ltd Image enhancement methods and apparatus therefor
US7188132B2 (en) 2001-12-25 2007-03-06 Canon Kabushiki Kaisha Hadamard transformation method and apparatus

Also Published As

Publication number Publication date
JPH10108186A (en) 1998-04-24

Similar Documents

Publication Publication Date Title
US6873655B2 (en) Codec system and method for spatially scalable video data
KR101672607B1 (en) Coding apparatus, decoding apparatus, coding method, decoding method, and computer-readable storage medium
US6650708B1 (en) Video signal encoding apparatus
JP5073004B2 (en) Image coding apparatus, image coding method, image decoding apparatus, and image decoding method
JPH11275592A (en) Moving image code stream converter and its method
JP2006246474A (en) Prediction image generation method and apparatus using single coding mode for all color components, and image and video encoding and decoding methods and apparatuses using the same
JP2004096757A (en) Interpolation method and its apparatus for move compensation
JP2005507587A (en) Spatial scalable compression
KR101442608B1 (en) A method and apparatus for efficiently encoding / decoding an image
US20230421815A1 (en) Transformations for signal enhancement coding
US8194748B2 (en) Apparatus for scalable encoding/decoding of moving image and method thereof
JP2007274479A (en) Image encoding device and image decoding device
KR100763179B1 (en) Method for compressing/Reconstructing motion vector of unsynchronized picture and apparatus thereof
JP3797209B2 (en) Image information encoding method and apparatus, image information decoding method and apparatus, and program
JP2007143176A (en) Motion vector compression method
JPH1155678A (en) Inter-block interpolation prediction coder, decoder, coding method and decoding method
JPH10136376A (en) Inter-block prediction coding/decoding device and its method
KR20090119434A (en) Image encoding and decoding method and apparatus
JP2006279573A (en) Encoder and encoding method, and decoder and decoding method
JP2005318296A (en) Method, device, and program for encoding dynamic image
JPH11251919A (en) Memory required amount reduction method
JP2003289544A (en) Equipment and method for coding image information, equipment and method for decoding image information, and program
JP2914326B2 (en) Transformation encoding of digital signal enabling reversible transformation
JP2003348596A (en) Image processor and image processing method, recording medium, and program
JPH11513873A (en) Apparatus and method for selecting a coding mode in a block-based coding system

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990316