JP4730144B2 - Decoding device, inverse quantization method, and program thereof - Google Patents

Decoding device, inverse quantization method, and program thereof Download PDF

Info

Publication number
JP4730144B2
JP4730144B2 JP2006061480A JP2006061480A JP4730144B2 JP 4730144 B2 JP4730144 B2 JP 4730144B2 JP 2006061480 A JP2006061480 A JP 2006061480A JP 2006061480 A JP2006061480 A JP 2006061480A JP 4730144 B2 JP4730144 B2 JP 4730144B2
Authority
JP
Japan
Prior art keywords
value
quantization
distribution
function
probability density
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 - Fee Related
Application number
JP2006061480A
Other languages
Japanese (ja)
Other versions
JP2006304270A (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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2006061480A priority Critical patent/JP4730144B2/en
Publication of JP2006304270A publication Critical patent/JP2006304270A/en
Application granted granted Critical
Publication of JP4730144B2 publication Critical patent/JP4730144B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

本発明は、符号化処理により生成された符号データを復号化する復号化装置に関する。特に、本発明は、データの量子化を伴う符号化処理により生成された符号データを、逆量子化を行うことにより復号化する復号化装置に関する。   The present invention relates to a decoding device that decodes code data generated by an encoding process. In particular, the present invention relates to a decoding apparatus that decodes code data generated by an encoding process involving data quantization by performing inverse quantization.

例えば、非特許文献1は、JPEG標準を開示し、非特許文献2は、JPEG2000標準を開示する。
また、非特許文献3は、変換係数の頻度分布を合わせることによって、よく似たテクスチャを持つ画像を合成する手法を開示する。
また、特許文献1は、符号化時に予め実際の振幅値と量子化値との間の補正値を求めておき、復号時にその補正値を用いて補正する方法を開示する。
ITU−T勧告 T.81 ITU−T勧告 T.800 D. Heeger and J. Bergen, "Pyramid based texture analysis/synthesis," Computer Graphics, pp. 229-238, SIGGRAPH 95, 1995. 特開平7−248797号公報
For example, Non-Patent Document 1 discloses a JPEG standard and Non-Patent Document 2 discloses a JPEG 2000 standard.
Non-Patent Document 3 discloses a technique for synthesizing images having similar textures by matching the frequency distribution of transform coefficients.
Patent Document 1 discloses a method of obtaining a correction value between an actual amplitude value and a quantized value in advance at the time of encoding, and correcting using the correction value at the time of decoding.
ITU-T recommendation 81 ITU-T recommendation 800 D. Heeger and J. Bergen, "Pyramid based texture analysis / synthesis," Computer Graphics, pp. 229-238, SIGGRAPH 95, 1995. JP-A-7-248797

本発明は、上述した背景からなされたものであり、符号データをより適切に復号化する復号化装置を提供することを目的とする。   The present invention has been made from the above-described background, and an object thereof is to provide a decoding device that decodes code data more appropriately.

[復号化装置]
上記目的を達成するため、本発明にかかる復号化装置は、量子化インデクス値の頻度分布を生成する分布生成手段と、前記分布生成手段により生成された量子化インデクス頻度分布において、互いに隣接する2つの量子化インデクス値の頻度値を結ぶ一次関数を求め、この一次関数を用いて量子化インデクス値の確率密度関数の期待値を算出する期待値算出手段と、前記期待値算出手段により算出された期待値に基づいて、量子化インデクス値それぞれに対応する逆量子化値を補正する補正手段とを有する。
[Decryption device]
To achieve the above object, the decoding apparatus according to the present invention, the distribution generation means for generating a frequency distribution of quantization index values in the frequency distribution of the quantization index value generated by the distribution generation unit, adjacent Calculating a linear function connecting the frequency values of two quantized index values to be calculated and calculating an expected value of a probability density function of the quantized index value using the linear function, and calculating by the expected value calculating means Correction means for correcting the inverse quantized value corresponding to each quantized index value based on the expected value .

好適には、前記期待値算出手段は、注目量子化インデクス値について確率密度関数を決定する場合に、この注目量子化インデクス値の頻度値と、この注目量子化インデクス値と隣接する量子化インデクス値の頻度値との比、及び、前記注目量子化インデクス値の頻度値と前記隣接する量子化インデクス値の頻度値との差分に応じて、頻度分布を近似する一次関数を決定する。   Preferably, when the expected value calculation means determines the probability density function for the target quantization index value, the frequency value of the target quantization index value and the quantization index value adjacent to the target quantization index value A linear function that approximates the frequency distribution is determined in accordance with the ratio between the frequency value and the difference between the frequency value of the target quantization index value and the frequency value of the adjacent quantization index value.

好適には、前記期待値算出手段は、注目量子化インデクス値について確率密度関数を決定する場合に、この注目量子化インデクス値と、この注目量子化インデクス値に対応する量子化区間の最頻値とを用いて、前記頻度分布を近似する一次関数を決定する。 Preferably, when the probability value function is determined for the target quantization index value, the expectation value calculating means and the mode quantization value corresponding to the target quantization index value and the quantization interval corresponding to the target quantization index value Are used to determine a linear function that approximates the frequency distribution.

好適には、前記期待値算出手段は、注目量子化インデクス値について確率密度関数を決定する場合に、この注目量子化インデクス値の頻度値をh(q)とし、この注目量子化インデクス値の両隣の量子化インデクス値の頻度値をh(q−1)及びh(q+1)としたときに、中心の値をh(q) 2 {1/(h(q)+h(q-1))+1/(h(q)+h(q+1))}とし、この中心の値を用いて、前記頻度分布を近似する一次関数を決定する。 Preferably, when the probability value function is determined for the target quantization index value, the expected value calculation means sets the frequency value of the target quantization index value as h (q), and is adjacent to the target quantization index value. When the frequency values of the quantized index values of h (q-1) and h (q + 1) are h (q) 2 (1 / (h (q) + h (q-1)) + 1 / (h (q) + h (q + 1))}, and using this central value, a linear function approximating the frequency distribution is determined.

好適には、前記期待値算出手段は前記分布生成手段により生成された頻度分布を近似する分布関数を生成し、生成された分布関数を用いて、前記確率密度関数を生成する。 Preferably, the expected value calculation unit, said generating a distribution function approximating the generated frequency distribution by distribution generation unit, by using the generated distribution function, to generate the probability density function.

好適には、前記期待値算出手段は、量子化インデクス値の絶対値が既定値以下となる量子化区間について、前記分布関数を用いて前記確率密度関数を生成し、量子化インデクス値の絶対値が既定値よりも大きくなる量子化区間について、前記分布生成手段により生成された頻度分布を少なくとも1つの直線で近似する関数を用いて、前記確率密度関数を生成する。   Preferably, the expected value calculation means generates the probability density function using the distribution function for a quantization interval in which the absolute value of the quantized index value is equal to or less than a predetermined value, and the absolute value of the quantized index value For a quantization interval in which is greater than a predetermined value, the probability density function is generated using a function that approximates the frequency distribution generated by the distribution generation means with at least one straight line.

好適には、前記期待値算出手段は、前記分布関数を用いて生成される確率密度関数と、前記直線で近似する関数を用いて生成される確率密度関数とを互いに連続に接続する。   Preferably, the expected value calculating means continuously connects a probability density function generated using the distribution function and a probability density function generated using a function approximated by the straight line.

好適には、前記期待値算出手段は、前記分布生成手段により生成された頻度分布との面積差が既定値以下となるような分布関数を生成する。   Preferably, the expected value calculation unit generates a distribution function such that an area difference from the frequency distribution generated by the distribution generation unit is equal to or less than a predetermined value.

好適には、前記期待値算出手段は、前記分布生成手段により生成された頻度分布に基づいて、量子化インデクスの標準偏差を算出し、算出された標準偏差に基づいて、前記分布関数を生成する。   Preferably, the expected value calculation means calculates a standard deviation of the quantization index based on the frequency distribution generated by the distribution generation means, and generates the distribution function based on the calculated standard deviation. .

好適には、前記分布生成手段は、量子化インデクス値の頻度分布を示す標準偏差σを算出し、前記補正手段は、前記分布生成手段により算出された標準偏差σと、量子化区間の幅Dと、以下の2式:

Figure 0004730144
Figure 0004730144
とを用いて、補正値rを算出する。 Preferably, the distribution generation unit calculates a standard deviation σ indicating a frequency distribution of quantization index values, and the correction unit calculates the standard deviation σ calculated by the distribution generation unit and the width D of the quantization interval. And the following two formulas:
Figure 0004730144
Figure 0004730144
Are used to calculate the correction value r.

好適には、前記分布生成手段により生成された頻度分布に基づいて、量子化インデクスの確率密度関数の期待値を量子化区間毎に算出する期待値算出手段をさらに有し、前記補正手段は、前記期待値算出手段により算出された量子化区間毎の期待値に基づいて、量子化区間毎の個別補正値を算出し、算出された個別補正値と、それぞれの量子化区間に対応する量子化インデクスの数とに基づいて、適用すべき補正値を決定する。   Preferably, based on the frequency distribution generated by the distribution generation means, further comprising an expected value calculation means for calculating an expected value of a probability density function of a quantization index for each quantization section, and the correction means Based on the expected value for each quantization interval calculated by the expected value calculation means, an individual correction value for each quantization interval is calculated, and the calculated individual correction value and the quantization corresponding to each quantization interval The correction value to be applied is determined based on the number of indexes.

好適には、前記量子化インデクスは、変換符号化処理で生成される変換係数の種類に対応付けられており、前記分布生成手段は、変換係数の種類毎に、量子化インデクス値の頻度分布を生成し、前記分布生成手段により生成された頻度分布に基づいて、量子化インデクスの確率密度関数の期待値を、変換係数の種類毎に算出する期待値算出手段をさらに有し、前記補正手段は、前記期待値算出手段により算出された期待値に基づいて、変換係数の種類毎の個別補正値を算出し、算出された個別補正値と、それぞれの量子化区間に対応する量子化インデクスの数とに基づいて、適用すべき補正値を決定する。   Preferably, the quantization index is associated with a type of transform coefficient generated by the transform coding process, and the distribution generation unit calculates a frequency distribution of the quantization index value for each type of transform coefficient. An expectation value calculation means for generating the expected value of the probability density function of the quantization index for each type of transform coefficient based on the frequency distribution generated by the distribution generation means, and the correction means Based on the expected value calculated by the expected value calculation means, an individual correction value for each type of transform coefficient is calculated, and the calculated individual correction value and the number of quantization indexes corresponding to each quantization interval Based on the above, the correction value to be applied is determined.

好適には、前記分布生成手段により生成された頻度分布に基づいて、量子化インデクスの確率密度関数の期待値を量子化区間毎に算出する期待値算出手段をさらに有し、前記補正手段は、前記期待値算出手段により算出された量子化区間毎の期待値に基づいて、量子化区間毎の補正値を算出し、前記補正手段により算出された補正値のうち、逆量子化すべき量子化インデクスの量子化区間が一致する補正値を適用して、逆量子化値を算出する逆量子化値算出手段をさらに有する。   Preferably, based on the frequency distribution generated by the distribution generation means, further comprising an expected value calculation means for calculating an expected value of a probability density function of a quantization index for each quantization section, and the correction means A correction value for each quantization interval is calculated based on the expected value for each quantization interval calculated by the expected value calculation means, and the quantization index to be dequantized among the correction values calculated by the correction means The image processing apparatus further includes inverse quantization value calculation means for calculating an inverse quantization value by applying a correction value in which the quantization intervals coincide with each other.

好適には、前記量子化インデクスは、変換符号化処理で生成される変換係数の種類に対応付けられており、前記分布生成手段は、変換係数の種類毎に、量子化インデクス値の頻度分布を生成し、前記分布生成手段により生成された頻度分布に基づいて、量子化インデクスの確率密度関数の期待値を、変換係数の種類毎に算出する期待値算出手段をさらに有し、前記補正手段は、前記期待値算出手段により算出された期待値に基づいて、変換係数の種類毎の補正値を算出し、前記補正手段により算出された補正値のうち、逆量子化すべき量子化インデクスと変換係数の種類が一致する補正値を適用して、逆量子化値を算出する逆量子化値算出手段をさらに有する。   Preferably, the quantization index is associated with a type of transform coefficient generated by the transform coding process, and the distribution generation unit calculates a frequency distribution of the quantization index value for each type of transform coefficient. An expectation value calculation means for generating the expected value of the probability density function of the quantization index for each type of transform coefficient based on the frequency distribution generated by the distribution generation means, and the correction means Based on the expected value calculated by the expected value calculation means, a correction value for each type of transform coefficient is calculated, and among the correction values calculated by the correction means, the quantization index to be dequantized and the transform coefficient In addition, there is further provided an inverse quantization value calculation means for calculating an inverse quantization value by applying correction values having the same type.

好適には、前記分布生成手段は、量子化インデクスのヒストグラムを作成し、前記期待値算出手段は、前記分布生成手段により生成されたヒストグラムに基づいて、互いに隣接する量子化区間の境界位置の頻度値を算出し、算出された境界位置の頻度値を用いて、前記確率密度関数を生成し、前記互いに隣接する量子化区間の境界位置の頻度値は、これらの量子化区間の頻度値に関して対称となるように算出される。   Preferably, the distribution generation unit creates a quantization index histogram, and the expectation value calculation unit uses the histogram generated by the distribution generation unit to determine the frequency of the boundary positions of adjacent quantization sections. A frequency value is calculated, and the probability density function is generated using the calculated frequency values of the boundary positions, and the frequency values of the boundary positions of the adjacent quantization intervals are symmetric with respect to the frequency values of these quantization intervals Is calculated as follows.

好適には、前記期待値算出手段は、互いに隣り合う2つの量子化区間の頻度値をh(q)及びh(q−1)とした場合に、既定の関数F()を用いて、これらの量子化区間の境界位置の頻度値として、h(q)及びh(q−1)の間をF(h(q)):F(h(q−1))に内分する値を算出する。   Preferably, the expected value calculation means uses a predetermined function F () when the frequency values of two adjacent quantization intervals are h (q) and h (q-1). As a frequency value of the boundary position of the quantization interval, a value that internally divides between h (q) and h (q-1) into F (h (q)): F (h (q-1)) is calculated. To do.

好適には、前記期待値算出手段は、前記関数F()として、F(x)=x(nは定数)として表すことのできる関数を用いる。 Preferably, the expected value calculation means uses a function that can be expressed as F (x) = x n (n is a constant) as the function F ().

好適には、前記期待値算出手段は、連続する3つの量子化区間のうち、2番目の量子化区間の中間位置の確率密度関数値Iを算出する場合に、1番目の量子化区間と2番目の量子化区間との境界位置の確率密度関数値Aと、2番目の量子化区間と3番目の量子化区間との境界位置の確率密度関数値Bと、2番目の量子化区間の頻度値H(q)と、以下の式:I=2×H(q)−(A+B)/2とを用いて、確率密度関数値Iを算出する。 Preferably, the expected value calculation means calculates the probability density function value I at the intermediate position of the second quantization interval among the three consecutive quantization intervals, and the first quantization interval and 2 Probability density function value A at the boundary position with the first quantization interval, probability density function value B at the boundary position between the second quantization interval and the third quantization interval, and frequency of the second quantization interval The probability density function value I is calculated using the value H (q) and the following formula: I = 2 × H (q) − (A + B) / 2.

好適には、前記期待値算出手段は、算出された確率密度関数値が負の値となった場合に、この確率密度関数値を0として、期待値を算出する。   Preferably, when the calculated probability density function value becomes a negative value, the expected value calculating means sets the probability density function value as 0 and calculates an expected value.

[逆量子化方法]
また、本発明にかかる逆量子化方法は、量子化インデクス値の頻度分布を生成し、生成された量子化インデクス頻度分布において、互いに隣接する2つの量子化インデクス値の頻度値を結ぶ一次関数を求め、この一次関数を用いて量子化インデクス値の確率密度関数の期待値を算出し、算出された期待値に基づいて、量子化インデクス値それぞれに対応する逆量子化値を補正する。
[Inverse quantization method]
In addition, the inverse quantization method according to the present invention generates a frequency distribution of quantized index values, and connects the frequency values of two adjacent quantized index values in the generated frequency distribution of quantized index values. A function is obtained, the expected value of the probability density function of the quantized index value is calculated using this linear function, and the inverse quantized value corresponding to each quantized index value is corrected based on the calculated expected value .

[プログラム]
また、本発明にかかるプログラムは、量子化インデクス値の頻度分布を生成するステップと、生成された量子化インデクス頻度分布において、互いに隣接する2つの量子化インデクス値の頻度値を結ぶ一次関数を求め、この一次関数を用いて量子化インデクス値の確率密度関数の期待値を算出するステップと、算出された期待値に基づいて、量子化インデクス値それぞれに対応する逆量子化値を補正するステップとをコンピュータに実行させる。
[program]
The program according to the present invention, step a, the frequency distribution of the generated quantization index value, a linear function connecting the frequency values of the two quantization index values adjacent to each other to generate a frequency distribution of quantization index values And calculating the expected value of the probability density function of the quantized index value using this linear function, and correcting the inverse quantized value corresponding to each quantized index value based on the calculated expected value Causing the computer to execute the steps.

本発明の復号化装置によれば、符号データをより適切に復号化することができる。   According to the decoding device of the present invention, code data can be decoded more appropriately.

まず、本発明の理解を助けるために、その背景及び概略を説明する。
画像データ及び音声データなどは、データ量が膨大であるため、圧縮してデータ量を削減して保持、伝送等を行うことが一般的である。例えば、カラー原稿や写真を画像スキャナで電子化した場合に生成される多値画像データ、あるいは、ディジタルカメラで風景等の写真を撮った場合に生成される多値画像データは、JPEG、あるいは、JPEG2000等の非可逆符号化方式で圧縮することにより、より小さなデータ量とすることができる。
First, in order to help understanding of the present invention, its background and outline will be described.
Since image data, audio data, and the like have an enormous amount of data, it is common to compress, reduce, and hold and transmit data. For example, multi-value image data generated when a color document or photograph is digitized by an image scanner, or multi-value image data generated when a photograph of a landscape or the like is taken with a digital camera is JPEG or By compressing with an irreversible encoding method such as JPEG2000, a smaller amount of data can be obtained.

これらの非可逆符号化を行った場合、符号化歪が発生することが問題となっている。特に、JPEG方式を適用する場合には、復号化された画像(復号画像)のDCTブロック境界に発生するブロック歪(符号化歪)が問題となっている。   When such lossy encoding is performed, there is a problem that encoding distortion occurs. In particular, when the JPEG method is applied, block distortion (encoding distortion) occurring at the DCT block boundary of a decoded image (decoded image) is a problem.

まず、非可逆符号化の符号化歪がどのようなメカニズムで発生するかを説明する。
図1は、JPEG方式及びJPEG2000方式などの変換符号化方式の概略を説明する図であり、図1(A)は、符号化処理の概略を示し、図1(B)は、復号化処理の概略を示す。
図2は、変換符号化方式における量子化処理を説明する図である。なお、図2に示された変換係数T(c,i,j)及び量子化インデクスQ(c,i,j)は、変数c,i,jの関数である。また、変数cは、変換係数の種類を示すインデクスであり、例えば、8×8ブロックを用いたDCT変換であれば、64種類(8×8)存在する変換係数のいずれかを示す値(1〜64の整数など)であり、ウェーブレット変換であれば、1HH成分、1LH成分、1HL成分、2HH成分、2LH成分、2HL成分、・・・、NLLL成分のいずれかを示す値である。また、変数i,jは、各変換係数の位置を示す変数であり、例えば、DCT変換であれば、上からi番目、左からj番目のブロックのc番目の変換係数がT(c,i,j)と表され、ウェーブレット変換であれば、c番目の変換係数の、上からi番目、左からj番目のデータがT(c,i,j)と表される。
First, the mechanism by which encoding distortion of lossy encoding occurs will be described.
FIG. 1 is a diagram for explaining the outline of a transform coding system such as the JPEG system and the JPEG 2000 system. FIG. 1 (A) shows an outline of the encoding process, and FIG. 1 (B) shows the decoding process. An outline is shown.
FIG. 2 is a diagram for explaining a quantization process in the transform coding method. Note that the transform coefficient T (c, i, j) and the quantization index Q (c, i, j) shown in FIG. 2 are functions of the variables c, i, j. The variable c is an index indicating the type of transform coefficient. For example, in the case of DCT transform using 8 × 8 blocks, a value (1) indicating any of 64 types (8 × 8) of transform coefficients exists. In the case of wavelet transform, it is a value indicating one of 1HH component, 1LH component, 1HL component, 2HH component, 2LH component, 2HL component,..., NLLL component. The variables i and j are variables indicating the positions of the respective transform coefficients. For example, in the case of DCT transform, the c-th transform coefficient of the i-th block from the top and the j-th block from the left is T (c, i , J), and in the case of wavelet transform, the i-th data from the top and the j-th data from the left of the c-th transform coefficient are represented as T (c, i, j).

図1(A)に示すように、変換符号化方式の符号化処理では、入力画像Gに対して離散コサイン変換又はウェーブレット変換などの変換処理が施されて、入力画像Gの変換係数Tが生成され、この変換係数Tは、さらに量子化されて、量子化インデクスQとなる。量子化インデクスQは、エントロピ符号化(可逆符号化)されて、圧縮符号Fとなる。
ここで、量子化インデクスとは、量子化値を識別するための情報である。また、量子化値とは、一定の範囲(量子化区間)にある数値群が縮退する値であり、図2に例示するように、量子化区間「A−2」〜「A2」それぞれを代表する離散的な値(本例では、「−2×D(c)」〜「2×D(c)」)である。
As shown in FIG. 1A, in the coding process of the transform coding method, a transform process such as discrete cosine transform or wavelet transform is performed on the input image G to generate a transform coefficient T of the input image G. The transform coefficient T is further quantized to become a quantized index Q. The quantization index Q is entropy-encoded (losslessly encoded) to become a compression code F.
Here, the quantization index is information for identifying a quantization value. The quantized value is a value by which a group of numerical values in a certain range (quantization interval) is degenerated. As illustrated in FIG. 2, each of the quantization intervals “A-2” to “A2” is representative. Discrete values (in this example, “−2 × D (c)” to “2 × D (c)”).

このように生成された符号データ(圧縮符号F)は、図1(B)に示すように、エントロピ復号されて、量子化インデクスQとなる。この量子化インデクスQは、符号化時の量子化インデクスQと同じものである。
さらに、量子化インデクスQは、逆量子化され、変換係数(すなわち、逆量子化値)Rとなり、この変換係数Rが逆変換され、復号画像Hが生成される。
The code data (compression code F) generated in this way is entropy-decoded and becomes a quantized index Q as shown in FIG. This quantization index Q is the same as the quantization index Q at the time of encoding.
Further, the quantization index Q is inversely quantized to become a transform coefficient (that is, an inverse quantized value) R, and the transform coefficient R is inversely transformed to generate a decoded image H.

ここで、逆量子化値とは、量子化インデクス又は量子化値に基づいて生成され、復号データの復号化に用いられる値であり、例えば、JPEG方式又はJPEG2000方式の変換係数(量子化インデクスに対応付けられた変換係数)である。   Here, the dequantized value is a value generated based on the quantization index or the quantization value and used for decoding the decoded data. For example, a JPEG or JPEG2000 conversion coefficient (quantized index) is used. Associated conversion coefficients).

以上のプロセスにおいて、符号化歪が発生するのは、量子化を行う時である。元画像の変換係数Tと、量子化インデクスQとの精度を比較すると、一般に変換係数Tの精度が量子化インデクスQよりも高い。そのため、量子化インデクスQを用いて再現した変換係数Rは、もともとの変換係数Tとは異なったものとなる。これが符号化歪の原因である。   In the above process, coding distortion occurs when quantization is performed. Comparing the accuracy of the transform coefficient T of the original image and the quantization index Q, the accuracy of the transform coefficient T is generally higher than that of the quantization index Q. Therefore, the transform coefficient R reproduced using the quantization index Q is different from the original transform coefficient T. This is the cause of coding distortion.

次に、図2を参照して、量子化及び逆量子化をより詳細に説明する。
量子化は、各変換係数c毎に用意された量子化ステップ幅D(c)を用いて行う。量子化ステップ幅Dは、変換係数の種類cの関数である。例えば、JPEG方式であれば、量子化時に、以下の式で量子化インデクスQを算出する。
Next, quantization and inverse quantization will be described in more detail with reference to FIG.
The quantization is performed using a quantization step width D (c) prepared for each transform coefficient c. The quantization step width D is a function of the transform coefficient type c. For example, in the case of the JPEG method, the quantization index Q is calculated by the following equation at the time of quantization.

Q(c,i,j)=round(T(c,i,j)/D(c)) Q (c, i, j) = round (T (c, i, j) / D (c))

ここでround()は、入力値に最も近い整数を出力する関数である。
また、逆量子化時には、以下の式で逆量子化値Rを算出する。
Here, round () is a function that outputs an integer closest to the input value.
At the time of inverse quantization, the inverse quantization value R is calculated by the following equation.

R(c,i,j)=Q(c,i,j)×D(c) R (c, i, j) = Q (c, i, j) × D (c)

あるいは、JPEG2000方式であれば、以下の式(数1)により、量子化インデクスQ及び逆量子化値Rを算出する。   Alternatively, in the case of the JPEG2000 system, the quantization index Q and the inverse quantization value R are calculated by the following equation (Equation 1).

Q(c,i,j)=sign(T(c,i,j))×floor(|T(c,i,j)|/D(c))
Q(c,i,j)>0である場合に、R(c,i,j)=(Q(c,i,j)+r)×D(c)
Q(c,i,j)<0である場合に、R(c,i,j)=(Q(c,i,j)-r)×D(c)
Q(c,i,j)=0である場合に、R(c,i,j)=0
・・・(数1)
Q (c, i, j) = sign (T (c, i, j)) × floor (| T (c, i, j) | / D (c))
When Q (c, i, j)> 0, R (c, i, j) = (Q (c, i, j) + r) × D (c)
When Q (c, i, j) <0, R (c, i, j) = (Q (c, i, j) -r) × D (c)
When Q (c, i, j) = 0, R (c, i, j) = 0
... (Equation 1)

ここで、sign()は、正負の符号を出力する関数、floorは、小数点以下を0とする関数、||は、絶対値を示す記号である。
また、rは、0から1までの範囲にある数値であり、典型的にはr=0.5を用いる。ただし、JPEG2000方式では、下位ビットを符号化しない場合があるが、ここでは、最下位ビットまで全て符号化する場合を具体例として説明する。
Here, sign () is a function that outputs a positive / negative sign, floor is a function that makes the decimal part 0, and || is a symbol that indicates an absolute value.
R is a numerical value in the range from 0 to 1, and typically r = 0.5 is used. However, in the JPEG2000 system, there are cases where the lower bits are not encoded, but here, a case where all the least significant bits are encoded will be described as a specific example.

JPEG2000方式では、式(1)で示した補正値rを適切に設定すれば、より歪の小さな復号画像を得ることができる。このように、JPEG2000方式では、逆量子化値を量子化範囲の中心以外の値とすることで復号画質を向上させることができる。   In the JPEG2000 system, a decoded image with smaller distortion can be obtained by appropriately setting the correction value r shown in Equation (1). Thus, in the JPEG2000 system, the decoded image quality can be improved by setting the inverse quantization value to a value other than the center of the quantization range.

また、JPEG方式でも、同様の補正値rを導入することにより、復号画像の画質を向上させることができる。具体的には、以下の式(数2)を用いて、逆量子化値を算出する。   Also in the JPEG system, the image quality of a decoded image can be improved by introducing a similar correction value r. Specifically, the inverse quantization value is calculated using the following equation (Equation 2).

Q(c,i,j)>0である場合に、R(c,i,j)=(Q(c,i,j)+r-0.5)×D(c)
Q(c,i,j)<0である場合に、R(c,i,j)=(Q(c,i,j)-r+0.5)×D(c)
Q(c,i,j)=0である場合に、R(c,i,j)=0
・・・(数2)
R (c, i, j) = (Q (c, i, j) + r-0.5) × D (c) when Q (c, i, j)> 0
When Q (c, i, j) <0, R (c, i, j) = (Q (c, i, j) -r + 0.5) × D (c)
When Q (c, i, j) = 0, R (c, i, j) = 0
... (Equation 2)

このように、適切な補正値rを用いて、逆量子化値を算出することにより、より再現性の高い復号化処理が可能となる。   Thus, by calculating the inverse quantization value using the appropriate correction value r, a decoding process with higher reproducibility is possible.

次に、適切な補正値rの算出方法が問題となる。
図2は、変換符号化処理における量子化及び逆量子化を説明する図である。
図2に示すように、数直線x軸上に、変換係数T(元データ)が分布する。JPEG方式では、数直線xは、図2(A)に示されるように、A0、A1、…、A-1、A-2、…の領域(量子化区間)に分割される。
変換係数Tが、量子化区間A0の領域に存在している場合には、この変換係数Tに対応する量子化インデクスQは、0となる。同様に、変換係数Tが量子化区間Aqの領域に存在している場合には、この変換係数Tに対応する量子化インデクスQは、qとなる。
Next, an appropriate calculation method of the correction value r becomes a problem.
FIG. 2 is a diagram for explaining quantization and inverse quantization in transform coding processing.
As shown in FIG. 2, transform coefficients T (original data) are distributed on the number line x-axis. In the JPEG method, the number line x is divided into areas (quantization sections) of A0, A1,..., A-1, A-2,... As shown in FIG.
When the transform coefficient T is present in the quantization interval A0, the quantization index Q corresponding to the transform coefficient T is 0. Similarly, when the transform coefficient T exists in the region of the quantization interval Aq, the quantization index Q corresponding to this transform coefficient T is q.

また、JPEG2000方式では、図2(B)に示すように、変換係数Tが量子化区間Aqの領域に存在している場合には、この変換係数Tに対応する量子化インデクスQは、qとなる。
また、この量子化インデクスを逆量子化する場合には、図2(B)に示された逆量子化値を取る。
In the JPEG2000 system, as shown in FIG. 2B, when the transform coefficient T is present in the quantization section Aq, the quantization index Q corresponding to the transform coefficient T is q and Become.
Further, when the quantization index is inversely quantized, the inverse quantization value shown in FIG.

ここで、問題を単純化するために、量子化インデクスQがq値となる量子化区間Aq内のみに関して考察する。変換係数Tは、量子化区間Aq内に存在しているとする。
この場合に、図2(C)に示されるように、量子化区間領域Aqは、d1≦x<d2の範囲であるとする。このとき、d1≦T<d2である。
ここで、量子化区間Aqにおける変換係数Tの出現確率を示す確率密度関数fT(x)を考える。確率密度関数fT(x)は、d1≦x<d2の範囲で定義されており、値xの生起確率を示す。
また、確率密度関数fT(x)を量子化区間d1≦x<d2の全範囲で積分すると、その積分値が1となるように定義されている。
このような確率密度関数fT(x)が存在しているとき、量子化前の変換係数T(元データ)と、逆量子化値Rとの自乗誤差を最小とするような逆量子化値は、「Vector Quantization and Signal Compression, Kluwer Academic Publishers, 177〜178ページ」によれば、以下の式(数3)により算出される逆量子化値Rである。
Here, in order to simplify the problem, only the quantization interval Aq in which the quantization index Q has a q value will be considered. It is assumed that the transform coefficient T exists in the quantization interval Aq.
In this case, as shown in FIG. 2C, the quantization interval region Aq is assumed to be in a range of d1 ≦ x <d2. At this time, d1 ≦ T <d2.
Here, a probability density function fT (x) indicating the appearance probability of the transform coefficient T in the quantization interval Aq is considered. The probability density function fT (x) is defined in the range of d1 ≦ x <d2, and indicates the occurrence probability of the value x.
Further, the probability density function fT (x) is defined to be 1 when the integration is performed over the entire range of the quantization interval d1 ≦ x <d2.
When such a probability density function fT (x) exists, the inverse quantization value that minimizes the square error between the transform coefficient T (original data) before quantization and the inverse quantization value R is According to “Vector Quantization and Signal Compression, Kluwer Academic Publishers, pp. 177 to 178”, it is the inverse quantization value R calculated by the following equation (Equation 3).

Figure 0004730144
Figure 0004730144

上記の式(数3)により算出された値Rを、式(数1)あるいは式(数2)式に代入することで、自乗誤差を最小とする補正値rを決定することができる。
すなわち、元々の変換係数Tの確率密度関数を推定できればよい。
By substituting the value R calculated by the above equation (Equation 3) into the equation (Equation 1) or the equation (Equation 2), the correction value r that minimizes the square error can be determined.
That is, it is only necessary to estimate the probability density function of the original conversion coefficient T.

そこで、本実施形態における復号化装置2は、量子化インデクスQ(c,i,j)に基づいて、変換係数T(c,i,j)の確率密度を推定し、推定された確率密度に基づいて補正値rを決定する。
図3は、変換係数Tの頻度分布を例示する図である。
一般に、DCT係数あるいはウェーブレット変換係数は、図3(A)に例示されるような、ラプラス分布あるいは一般化ガウス分布をすると考えられている。このような分布をする確率変数を量子化するとき、量子化範囲は、図3(A)に示されるように分割される。このような場合、各量子化範囲内の確率密度は、図3(B)、(C)及び(D)に例示されるような形状を持つ。
本復号化装置2は、量子化インデクスQ(c,i,j)の頻度分布(例えば、ヒストグラム)を作成し、作成されたヒストグラムを用いて、変換係数Tの分布を推定する。
Therefore, the decoding device 2 in the present embodiment estimates the probability density of the transform coefficient T (c, i, j) based on the quantization index Q (c, i, j), and obtains the estimated probability density. Based on this, the correction value r is determined.
FIG. 3 is a diagram illustrating the frequency distribution of the conversion coefficient T.
In general, the DCT coefficient or the wavelet transform coefficient is considered to have a Laplace distribution or a generalized Gaussian distribution as exemplified in FIG. When quantizing a random variable having such a distribution, the quantization range is divided as shown in FIG. In such a case, the probability density within each quantization range has a shape illustrated in FIGS. 3B, 3C, and 3D.
The decoding apparatus 2 creates a frequency distribution (for example, a histogram) of the quantization index Q (c, i, j), and estimates the distribution of the transform coefficient T using the created histogram.

[実施形態]
以下、本発明の実施形態を説明する。
本実施形態では、JPEG2000方式により符号化された符号データを復号化する場合を具体例として説明する。なお、本実施形態で説明する復号化処理は、概略において、ITU-T勧告T.800に記載されているものと同様であるが、本発明にかかる逆量子化処理を適用する点で異なる。
[Embodiment]
Embodiments of the present invention will be described below.
In the present embodiment, a case where code data encoded by the JPEG2000 system is decoded will be described as a specific example. Note that the decoding process described in the present embodiment is roughly the same as that described in ITU-T recommendation T.800, but differs in that the inverse quantization process according to the present invention is applied.

[ハードウェア構成]
まず、本実施形態における復号化装置2のハードウェア構成を説明する。
図4は、本発明にかかる逆量子化方法が適応される復号化装置2のハードウェア構成を、制御装置20を中心に例示する図である。
図4に例示するように、復号化装置2は、CPU202及びメモリ204などを含む制御装置20、通信装置22、HDD・CD装置などの記録装置24、並びに、LCD表示装置あるいはCRT表示装置及びキーボード・タッチパネルなどを含むユーザインターフェース装置(UI装置)26から構成される。
復号化装置2は、例えば、復号化プログラム5(後述)がインストールされた汎用コンピュータであり、通信装置22又は記録装置24などを介して符号データを取得し、取得された符号データを復号化して出力する。
[Hardware configuration]
First, the hardware configuration of the decoding device 2 in this embodiment will be described.
FIG. 4 is a diagram illustrating a hardware configuration of the decoding apparatus 2 to which the inverse quantization method according to the present invention is applied, centering on the control apparatus 20.
As illustrated in FIG. 4, the decoding device 2 includes a control device 20 including a CPU 202 and a memory 204, a communication device 22, a recording device 24 such as an HDD / CD device, an LCD display device or a CRT display device, and a keyboard. A user interface device (UI device) 26 including a touch panel and the like is included.
The decoding device 2 is, for example, a general-purpose computer in which a decoding program 5 (described later) is installed. The decoding device 2 acquires code data via the communication device 22 or the recording device 24, and decodes the acquired code data. Output.

[復号化プログラム]
図5は、制御装置20(図4)により実行され、本発明にかかる逆量子化方法を実現する復号化プログラム5の機能構成を例示する図である。
図5に例示するように、復号化プログラム5は、エントロピ復号部40、逆量子化部50及び逆変換部60を有する。
また、逆量子化部50は、ヒストグラム取得部500、確率密度関数推定部510、補正値推定部540及び逆量子化値出力部550を有し、確率密度関数推定部510は、折れ線近似部520及び関数推定部530を含む。
[Decryption program]
FIG. 5 is a diagram illustrating a functional configuration of the decoding program 5 which is executed by the control device 20 (FIG. 4) and implements the inverse quantization method according to the present invention.
As illustrated in FIG. 5, the decoding program 5 includes an entropy decoding unit 40, an inverse quantization unit 50, and an inverse transform unit 60.
The inverse quantization unit 50 includes a histogram acquisition unit 500, a probability density function estimation unit 510, a correction value estimation unit 540, and an inverse quantization value output unit 550. The probability density function estimation unit 510 includes a polygonal line approximation unit 520. And a function estimation unit 530.

復号化プログラム5において、エントロピ復号部40は、入力された符号データを、エントロピ復号化して、逆量子化部50に出力する。
本例のエントロピ復号部40は、入力された符号データを復号化して、量子化インデクスQを生成し、生成された量子化インデクスを逆量子化部50に出力する。
In the decoding program 5, the entropy decoding unit 40 entropy-decodes the input code data and outputs it to the inverse quantization unit 50.
The entropy decoding unit 40 of the present example decodes the input code data, generates a quantization index Q, and outputs the generated quantization index to the inverse quantization unit 50.

逆量子化部50は、エントロピ復号部40から入力された量子化インデスクに基づいて、逆量子化値を生成し、生成された逆量子化値を逆変換部60に出力する。   The inverse quantization unit 50 generates an inverse quantization value based on the quantization index input from the entropy decoding unit 40, and outputs the generated inverse quantization value to the inverse transform unit 60.

逆変換部60は、逆量子化部50から入力された逆量子化値に基づいて、逆変換処理を行い、復号画像を生成する。   The inverse transform unit 60 performs an inverse transform process based on the inverse quantization value input from the inverse quantization unit 50 to generate a decoded image.

逆量子化部50において、ヒストグラム取得部500は、エントロピ復号部40から入力された量子化インデクスQ(c,i,j)に基づいて、各量子化インデクス値qに対するヒストグラムh(q)を取得する。
より具体的には、ヒストグラム取得部500は、入力された量子化インデクスQ(c,i,j)について、全てのc,i,jの組み合わせで各量子化インデクス値qとなる個数を計測して、量子化マトリクス値がqとなる量子化インデクスQの個数をh(q)とする。
In the inverse quantization unit 50, the histogram acquisition unit 500 acquires a histogram h (q) for each quantization index value q based on the quantization index Q (c, i, j) input from the entropy decoding unit 40. To do.
More specifically, the histogram acquisition unit 500 measures the number of quantization index values q for all combinations of c, i, j for the input quantization index Q (c, i, j). Thus, let h (q) be the number of quantization indexes Q whose quantization matrix value is q.

折れ線近似部520は、ヒストグラム取得部500により取得されたヒストグラム(頻度分布)を折れ線で近似して、折れ線関数を作成する。すなわち、折れ線近似部520は、ヒストグラム取得部500により取得されたヒストグラムを用いて、変換係数Tの確率密度関数を近似する。以降は、変換係数Tそのものの確率密度関数ではなく、変換係数Tを量子化ステップ幅D(c)で正規化した値であるT(c,i,j)/D(c)の確率密度関数を考える。
なお、例えば、折れ線近似部520は、
f(x)=h(q)(ただし、x≦1かつq≦x<q+1、あるいは、x≦-1かつq-1<x≦qのとき)
f(x)=h(0)(ただし、-1<x<1のとき)
とすると、T(c,i,j)/D(c)の確率密度関数を、f(x)/∫f(x)で近似してもよいが、このままでは階段状の不連続な確率密度関数であるため、実際の変換係数Tの確率密度とは異なると考えられる。そのため、本例の折れ線近似部520は、連続かつより妥当と考えられる確率密度関数を推定する。
The polygonal line approximation unit 520 creates a polygonal line function by approximating the histogram (frequency distribution) acquired by the histogram acquisition unit 500 with a polygonal line. That is, the polygonal line approximation unit 520 approximates the probability density function of the conversion coefficient T using the histogram acquired by the histogram acquisition unit 500. Thereafter, the probability density function of T (c, i, j) / D (c), which is not the probability density function of the transform coefficient T itself but the value obtained by normalizing the transform coefficient T with the quantization step width D (c). think of.
For example, the polygonal line approximation unit 520
f (x) = h (q) (when x ≦ 1 and q ≦ x <q + 1, or when x ≦ −1 and q-1 <x ≦ q)
f (x) = h (0) (when -1 <x <1)
Then, the probability density function of T (c, i, j) / D (c) may be approximated by f (x) / ∫f (x). Since it is a function, it is considered that the probability density of the actual conversion coefficient T is different. Therefore, the polygonal line approximation unit 520 of this example estimates a probability density function that is considered continuous and more appropriate.

本例の折れ線近似部520は、ヒストグラムh(q)から、連続する3つの量子化インデクス値qに対応するヒストグラム値h(q-1),h(q),h(q+1)を抽出し、抽出されたヒストグラム値h(q-1),h(q),h(q+1)を用いて、折れ線関数を作成する。
より具体的には、折れ線近似部520は、|q|>0の各qに対して、それに隣接するヒストグラム値h(q-1),h(q),h(q+1)を抽出する。
The polygonal line approximation unit 520 of this example extracts histogram values h (q−1), h (q), and h (q + 1) corresponding to three consecutive quantized index values q from the histogram h (q). Then, a polygonal line function is created using the extracted histogram values h (q−1), h (q), h (q + 1).
More specifically, the polygonal line approximation unit 520 extracts histogram values h (q−1), h (q), h (q + 1) adjacent to each q of | q |> 0. .

ここで、量子化インデクス値がqとなるx=T(c,i,j)/D(c)の範囲(すなわち、量子化インデクスqの量子化範囲)を
q>0のとき、M1(q)≦x<M2(q)、
q<0のとき、M1(q)<x≦M2(q)
とし、M1(q)とM2(q)の中点をM(q)とする。
なお、JPEG2000方式の場合は、
q=0のとき、M(q)=0、M1(q)=-1、M2(q)=1
q>0のとき、M(q)=1.5×q、M1(q)=q、M2(q)=q+1
q<0のとき、M(q)=1.5×q、M1(q)=q-1、M2(q)=q
となる。
Here, the range of x = T (c, i, j) / D (c) where the quantization index value is q (that is, the quantization range of the quantization index q) is
When q> 0, M1 (q) ≦ x <M2 (q),
When q <0, M1 (q) <x ≦ M2 (q)
Let M (q) be the midpoint between M1 (q) and M2 (q).
In the case of JPEG2000,
When q = 0, M (q) = 0, M1 (q) =-1, M2 (q) = 1
When q> 0, M (q) = 1.5 × q, M1 (q) = q, M2 (q) = q + 1
When q <0, M (q) = 1.5 × q, M1 (q) = q-1, M2 (q) = q
It becomes.

折れ線近似部520は、ヒストグラムで表された確率密度関数を、M1(q)からM2(q)までの範囲で折れ線近似する。
具体的には、座標(M(q-1),h(q-1))と座標(M(q),h(q))を結ぶ線分Aと、座標(M(q+1),h(q+1))と座標(M(q),h(q))を結ぶ線分Bとを考え、折れ線近似部520は、この二つの線分A,Bに相当する関数を用いて、M1(q)からM2(q)までの範囲を折れ線近似する。この折れ線近似関数を、Fq(x)と定義する。
これは、例えば、図6に示されるように、ヒストグラム値h(q-1),h(q),h(q+1)があった場合、各ヒストグラム値を結ぶ線分で確率密度を推定していることになる。
The polygonal line approximation unit 520 approximates the probability density function represented by the histogram in a polygonal line range from M1 (q) to M2 (q).
Specifically, a line segment A connecting the coordinates (M (q-1), h (q-1)) and the coordinates (M (q), h (q)) and the coordinates (M (q + 1), h (q + 1)) and the line segment B connecting the coordinates (M (q), h (q)), the broken line approximation unit 520 uses a function corresponding to these two line segments A and B. , The range from M1 (q) to M2 (q) is approximated by a polygonal line. This broken line approximation function is defined as Fq (x).
For example, as shown in FIG. 6, when there are histogram values h (q-1), h (q), and h (q + 1), the probability density is estimated by a line segment connecting the histogram values. Will be.

関数推定部530は、折れ線近似部520により作成された折れ線関数に基づいて、量子化インデクス値qに対応する部分確率密度関数fq(x)を生成する。
より具体的には、関数推定部530は、折れ線近似部520により生成された折れ線近似関数Fq(x)を、部分確率密度関数fq(x)に変換する。
ここで、量子化インデクス値qに対する部分確率密度関数fq(x)を、以下のように定義する。
上記線分Aと線分Bとで定義された確率密度関数Fq(x)は、M1(q)からM2(q)までの範囲で定義されている。ここで、M1(q)からM2(q)までの範囲を0から1までの範囲に変換できれば、0から1までの範囲をそのまま式(1)あるいは式(2)のr値に対応させることができる。このようにM1(q)からM2(q)までの範囲を0から1までの範囲に変換したものを、部分確率密度関数fq(x)とする。なお、式(1)あるいは式(2)に対応するため、q値が正の時と、q値が負の時では、逆の対応を取る。すなわち、部分確率密度関数fq(x)は、以下のように定義される。
The function estimation unit 530 generates a partial probability density function fq (x) corresponding to the quantization index value q based on the polygonal line function created by the polygonal line approximation unit 520.
More specifically, the function estimation unit 530 converts the polygonal line approximation function Fq (x) generated by the polygonal line approximation unit 520 into a partial probability density function fq (x).
Here, the partial probability density function fq (x) with respect to the quantization index value q is defined as follows.
The probability density function Fq (x) defined by the line segment A and the line segment B is defined in the range from M1 (q) to M2 (q). Here, if the range from M1 (q) to M2 (q) can be converted to the range from 0 to 1, the range from 0 to 1 should correspond to the r value in formula (1) or formula (2) as it is. Can do. The partial probability density function fq (x) is obtained by converting the range from M1 (q) to M2 (q) into the range from 0 to 1. In addition, in order to correspond to Formula (1) or Formula (2), when the q value is positive and when the q value is negative, the opposite correspondence is taken. That is, the partial probability density function fq (x) is defined as follows.

q>0の時、M1→0、M2→1の対応を取る。
fq(x)=Fq{(M2(q)-M1(q))x+M1(q)}
q<0の時、M1→1、M2→0の対応を取る。
fq(x)=Fq{(M1(q)-M2(q))x+M2(q)}
関数推定部530は、上記の変換式により、部分確率密度関数fq(x)を得る。
When q> 0, take M1 → 0, M2 → 1.
fq (x) = Fq {(M2 (q) -M1 (q)) x + M1 (q)}
When q <0, take M1 → 1 and M2 → 0.
fq (x) = Fq {(M1 (q) -M2 (q)) x + M2 (q)}
The function estimation unit 530 obtains the partial probability density function fq (x) by the above conversion formula.

補正値推定部540は、関数推定部530により生成された部分確率密度関数fq(x)を用いて、各量子化インデクス(各量子化区間)に対応する補正値rを算出する。
本例の補正値推定部540は、以下の式(数4)で演算を行い、補正値rを算出する。
The correction value estimation unit 540 uses the partial probability density function fq (x) generated by the function estimation unit 530 to calculate the correction value r corresponding to each quantization index (each quantization interval).
The correction value estimation unit 540 of this example calculates the correction value r by performing calculation according to the following equation (Equation 4).

Figure 0004730144
Figure 0004730144

すなわち、補正値推定部540は、全ての部分確率密度関数fq(x)をxが0〜1の範囲で全て加算して正規化することによって得られた確率密度関数を用いて、xの期待値を算出し、算出された期待値を補正値rとする。   That is, the correction value estimation unit 540 uses the probability density function obtained by normalizing all partial probability density functions fq (x) by adding all x in the range of 0 to 1, and then expecting x A value is calculated, and the calculated expected value is set as a correction value r.

逆量子化値出力部550は、補正値推定部540により算出された補正値rを用いて、適用すべき逆量子化値を算出し、算出された逆量子化値を逆変換部60に出力する。
本例の逆量子化値出力部550は、上記の式(数1)又は式(数2)に、補正値rを代入して、適用すべき逆量子化値を算出する。
The inverse quantization value output unit 550 calculates an inverse quantization value to be applied using the correction value r calculated by the correction value estimation unit 540, and outputs the calculated inverse quantization value to the inverse conversion unit 60. To do.
The inverse quantization value output unit 550 of this example calculates the inverse quantization value to be applied by substituting the correction value r into the above equation (Equation 1) or Equation (Equation 2).

以上説明したように、本実施形態における復号化装置2は、量子化インデクスのヒストグラムを折れ近似することにより、部分確率密度関数fq(x)を生成し、生成された確率密度関数fq(x)を用いて補正値rを算出する。   As described above, the decoding device 2 in the present embodiment generates the partial probability density function fq (x) by folding and approximating the histogram of the quantization index, and the generated probability density function fq (x). Is used to calculate the correction value r.

[変形例1]
上記実施形態では、ヒストグラム値をそのまま結ぶことにより、変換係数の確率密度関数を推定した。このような推定は、簡易であることが利点であるが、次に示すような問題もある。
まず、前提として、ヒストグラム値をそのまま階段状にして近似した確率密度推定関数の各量子化範囲内の面積と、推定後の確率密度関数の各量子化範囲内の面積が等しいことが良い推定方式であるとする。
改善すべき点は以下である。
(1)上記実施形態における折れ線近似では、図7(A)に例示する斜線部の面積分が加わるため、もともとの階段状の確率密度関数近似の面積よりも大きくなってしまう。これを、避けるためには、x=M(q)のときのFq(x)の値を、h(q)よりも小さくすればよいが、隣接ヒストグラム値h(q-1)とh(q)の値との差分が大きく、かつ、h(q)の値が小さいときは、補正に限界がある。
(2)隣接ヒストグラム値h(q-1)、h(q)、h(q+1)が単調増加あるいは単調減少では無い場合、図7(B)に例示する斜線部の面積分だけ引かれるため、もともとの階段状の確率密度関数近似の面積よりも小さくなってしまう。逆に、ヒストグラム値h(q-1)、h(q)、h(q+1)が谷形状の場合は、面積が大きくなってしまう。
そこで、第1の変形例では、上記実施形態よりも若干複雑ではあるが、これらの問題を解消する以下に示す折れ線近似を行うものである。
[Modification 1]
In the above embodiment, the probability density function of the conversion coefficient is estimated by connecting the histogram values as they are. Such estimation has the advantage of being simple, but has the following problems.
First, as a premise, an estimation method in which the area in each quantization range of the probability density estimation function approximated by stepping the histogram value as it is and the area in each quantization range of the estimated probability density function are good Suppose that
The points to be improved are as follows.
(1) In the polygonal line approximation in the above-described embodiment, the area of the shaded portion illustrated in FIG. 7A is added, so that it becomes larger than the area of the original stepwise probability density function approximation. To avoid this, the value of Fq (x) when x = M (q) should be smaller than h (q), but the adjacent histogram values h (q-1) and h (q ) Value is large and h (q) value is small, there is a limit to the correction.
(2) When the adjacent histogram values h (q-1), h (q), and h (q + 1) are not monotonously increasing or monotonically decreasing, they are subtracted by the area of the hatched portion illustrated in FIG. 7B. Therefore, the area becomes smaller than the area of the original step-like probability density function approximation. Conversely, when the histogram values h (q−1), h (q), and h (q + 1) are valley-shaped, the area becomes large.
Therefore, in the first modified example, although it is slightly more complicated than the above embodiment, the following polygonal line approximation that solves these problems is performed.

なお、本変形例における復号化プログラム5の構成は、上記実施形態のもの(図5)と実質的に同一であるが、折れ線近似部520の動作のみが異なる。
以下、折れ線近似部520の動作を説明する。
Note that the configuration of the decryption program 5 in this modification is substantially the same as that of the above embodiment (FIG. 5), but only the operation of the polygonal line approximation unit 520 is different.
Hereinafter, the operation of the broken line approximation unit 520 will be described.

本変形例の折れ線近似部520は、次の2点を実施する。
(第1点)量子化範囲の境界M1(q)とM2(q)における推定値Fq(M1(q))、Fq(M2(q))を、補正が可能な値にする。ここで、本変形例における補正とは、階段状の確率密度関数と、推定後の確率密度関数との面積を量子化範囲内でできるだけ等しくすることをいう。
(第2点)量子化範囲内のある点xにおける推定値Fq(x)を、できるだけ面積が変化しないように規定する。
The polygonal line approximation unit 520 of the present modification implements the following two points.
(First point) Estimated values Fq (M1 (q)) and Fq (M2 (q)) at boundaries M1 (q) and M2 (q) of the quantization range are set to values that can be corrected. Here, the correction in this modification means that the areas of the step-like probability density function and the estimated probability density function are made as equal as possible within the quantization range.
(Second point) The estimated value Fq (x) at a certain point x within the quantization range is defined so that the area does not change as much as possible.

具体的な折れ線近似方法を以下に示す。
(1)まず、折れ線近似部520は、図8(A)に例示するように、量子化範囲の境界M1(q)における推定値Fq(M1(q))を、Fq(M1(q))=h(q)とh(q-1)の間(すなわち、線分AB)をh(q):h(q-1)に内分する点として規定する。
具体的には、折れ線近似部520は、以下の演算により、推定値Fq(M1(q))を算出する。
Fq(M1(q))=2×h(q)×h(q-1)/(h(q)+h(q-1))
A specific polygonal line approximation method is shown below.
(1) First, the polygonal line approximation unit 520 converts the estimated value Fq (M1 (q)) at the boundary M1 (q) of the quantization range to Fq (M1 (q)) as illustrated in FIG. It is defined as a point that internally divides between h (q) and h (q-1) (that is, line segment AB) into h (q): h (q-1).
Specifically, the broken line approximation unit 520 calculates the estimated value Fq (M1 (q)) by the following calculation.
Fq (M1 (q)) = 2 × h (q) × h (q-1) / (h (q) + h (q-1))

同様に、折れ線近似部520は、量子化範囲の境界M2(q)における推定値Fq(M2(q))(すなわち、Fq(M2(q))=h(q)とh(q+1)の間をh(q):h(q+1)に内分する点)を、以下の演算により、算出する。
Fq(M2(q))=2×h(q)×h(q+1)/(h(q)+h(q+1))
Similarly, the polygonal line approximation unit 520 estimates Fq (M2 (q)) (that is, Fq (M2 (q)) = h (q) and h (q + 1) at the boundary M2 (q) of the quantization range. H (q): h (q + 1) is internally divided by the following calculation.
Fq (M2 (q)) = 2 × h (q) × h (q + 1) / (h (q) + h (q + 1))

このようにすることによって、
h(q-1)>h(q)のとき、Fq(M1(q))-h(q)<h(q)とできる。
あるいは、
h(q+1)>h(q)のとき、Fq(M2(q))-h(q)<h(q)とできる。
よって、Fq(M(q))の値を小さく設定することができるため、図7に例示するような斜線部が十分に補正可能となる。
By doing this,
When h (q-1)> h (q), Fq (M1 (q))-h (q) <h (q) can be established.
Or
When h (q + 1)> h (q), Fq (M2 (q))-h (q) <h (q) can be obtained.
Therefore, since the value of Fq (M (q)) can be set small, the shaded portion as illustrated in FIG. 7 can be sufficiently corrected.

(2)次に、折れ線近似部520は、量子化範囲M1(q)〜M2(q)の間を4つに分割する。すなわち、量子化範囲M1(q)〜M2(q)の間を1:3に内分する点(すなわち、図8(B)に例示する点C)を、M3(q)とし、3:1に内分する点(すなわち、図8(B)に例示する点D)をM4(q)とする。
M3(q)=M1(q)+(1/4)×(M2(q)-M1(q))
M4(q)=M1(q)+(3/4)×(M2(q)-M1(q))
である。ここで、
Fq(M3(q))=h(q)、Fq(M4(q))=h(q)
とする。
(2) Next, the broken line approximation unit 520 divides the quantization range M1 (q) to M2 (q) into four. That is, a point that internally divides the quantization range M1 (q) to M2 (q) into 1: 3 (that is, a point C illustrated in FIG. 8B) is defined as M3 (q), and 3: 1 A point that is internally divided (that is, a point D illustrated in FIG. 8B) is M4 (q).
M3 (q) = M1 (q) + (1/4) × (M2 (q) -M1 (q))
M4 (q) = M1 (q) + (3/4) × (M2 (q) -M1 (q))
It is. here,
Fq (M3 (q)) = h (q), Fq (M4 (q)) = h (q)
And

(3)次に、折れ線近似部520は、h(q-1),h(q),h(q+1)が単調増加あるいは単調減少ではないとき、上記で示した4点を用いて折れ線近似する。すなわち、図8(B)に例示するように、
点A:座標(M1(q),2×h(q)×h(q-1)/(h(q)+h(q-1))
点B:座標(M2(q),2×h(q)×h(q+1)/(h(q)+h(q+1))
点C:座標(M3(q),h(q))
点D:座標(M4(q),h(q))
点E:直線ACと直線BDの交点
とすると、折れ線近似は、線分AE及び線分BEで表す。
h(q-1),h(q),h(q+1)が単調増加あるいは単調減少のとき、点Fの座標(M(q),h(q))として、折れ線近似は、線分AF及び線分BFで表す。
すなわち、折れ線近似部520は、h(q-1),h(q),h(q+1)が単調増加あるいは単調減少である場合に、直線ACと直線BDが量子化範囲内で交点を持つとは限らないため、場合分けが必要となる。
以上のように折れ線近似することによって、階段状の確率密度関数と、推定後の確率密度関数との面積を量子化範囲内でより等しくすることができる。
(3) Next, when the h (q-1), h (q), and h (q + 1) are not monotonously increasing or monotonically decreasing, the polygonal line approximating unit 520 uses the four points shown above to form a polyline. Approximate. That is, as illustrated in FIG.
Point A: Coordinates (M1 (q), 2 × h (q) × h (q-1) / (h (q) + h (q-1))
Point B: Coordinates (M2 (q), 2 × h (q) × h (q + 1) / (h (q) + h (q + 1))
Point C: Coordinates (M3 (q), h (q))
Point D: Coordinates (M4 (q), h (q))
Point E: When the intersection of the straight line AC and the straight line BD is assumed, the broken line approximation is represented by a line segment AE and a line segment BE.
When h (q-1), h (q), and h (q + 1) are monotonically increasing or monotonically decreasing, as a coordinate of point F (M (q), h (q)), the polygonal line approximation is a line segment Expressed as AF and line segment BF.
That is, the polygonal line approximation unit 520 determines that the straight line AC and the straight line BD intersect each other within the quantization range when h (q-1), h (q), and h (q + 1) are monotonously increasing or monotonically decreasing. Because it does not always have, case classification is necessary.
By performing the polygonal line approximation as described above, the areas of the step-like probability density function and the estimated probability density function can be made more equal within the quantization range.

[変形例2]
上記第1の変形例では、直線ACと直線BDの交点を求める負荷が大きい。また、h(q-1),h(q),h(q+1)が単調増加あるいは単調減少かどうかの場合分けも負荷となる。
そこで、第2の変形例では、交点を求めずに、直線ACと直線BDそれぞれの、x=M(q)のときの値の平均値を用いて折れ線近似する。すなわち、
点A:座標(M1(q),2×h(q)×h(q-1)/(h(q)+h(q-1))
点B:座標(M2(q),2×h(q)×h(q+1)/(h(q)+h(q+1))
点G:座標(M(q),h(q)+{h(q)-2×h(q)×h(q-1)/(h(q)+h(q-1))})
とする。
すなわち、点Gを座標(M(q),2×h(q)2/(h(q)+h(q-1)))とし、同様に、点Hを座標(M(q),2×h(q)2/(h(q)+h(q+1)))とし、さらに、点Iを線分GHの中点とする。
この点Iの座標は、(M(q),h(q)2{1/(h(q)+h(q-1))+1/(h(q)+h(q+1))}となる。
このように点を定義したとき、本変形例における折れ線近似部520は、線分AI及び線分BIに相当する関数を用いて折れ線近似する。
[Modification 2]
In the first modification, the load for obtaining the intersection of the straight line AC and the straight line BD is large. In addition, the case of whether h (q-1), h (q), and h (q + 1) are monotonously increasing or monotonically decreasing is also a load.
Therefore, in the second modified example, a polygonal line approximation is performed using the average value of the values when x = M (q) of the straight line AC and the straight line BD without obtaining the intersection. That is,
Point A: Coordinates (M1 (q), 2 × h (q) × h (q-1) / (h (q) + h (q-1))
Point B: Coordinates (M2 (q), 2 × h (q) × h (q + 1) / (h (q) + h (q + 1))
Point G: Coordinates (M (q), h (q) + {h (q) -2 × h (q) × h (q-1) / (h (q) + h (q-1))})
And
That is, the point G is set as coordinates (M (q), 2 × h (q) 2 / (h (q) + h (q-1))), and similarly, the point H is set as coordinates (M (q), 2 Xh (q) 2 / (h (q) + h (q + 1))) and point I is the midpoint of the line segment GH.
The coordinates of this point I are (M (q), h (q) 2 {1 / (h (q) + h (q-1)) + 1 / (h (q) + h (q + 1)) }.
When the points are defined in this way, the polygonal line approximation unit 520 in the present modification performs polygonal line approximation using functions corresponding to the line segment AI and the line segment BI.

図9(A)は、ヒストグラムh(q-1),h(q),h(q+1)が山型の形状を示す場合に相当し、図9(B)は、ヒストグラムh(q-1),h(q),h(q+1)が単調増加の形状を示す場合に相当する。
いずれの場合も、折れ線近似部520は、以下のように、各点を定義して、線分AI及び線分BIに相当する関数で折れ線近似する。
点A:座標(M1(q),2×h(q)×h(q-1)/(h(q)+h(q-1))
点B:座標(M2(q),2×h(q)×h(q+1)/(h(q)+h(q+1))
点I:座標(M(q),h(q)2{1/(h(q)+h(q-1))+1/(h(q)+h(q+1))}
FIG. 9A corresponds to the case where the histograms h (q−1), h (q), and h (q + 1) show a mountain shape, and FIG. 9B shows the histogram h (q− 1), h (q), h (q + 1) corresponds to a monotonically increasing shape.
In either case, the polygonal line approximation unit 520 defines each point as follows and approximates the polygonal line with a function corresponding to the line segment AI and the line segment BI.
Point A: Coordinates (M1 (q), 2 × h (q) × h (q-1) / (h (q) + h (q-1))
Point B: Coordinates (M2 (q), 2 × h (q) × h (q + 1) / (h (q) + h (q + 1))
Point I: Coordinate (M (q), h (q) 2 {1 / (h (q) + h (q-1)) + 1 / (h (q) + h (q + 1))}

なお、本変形例を場合分けして適用してもよい。
すなわち、折れ線近似部520は、ヒストグラムh(q-1),h(q),h(q+1)が単調増加あるいは単調減少ではないとき、図9に例示したように、点Gと点Hとの中点Iを導入して、線分AI及び線分BIに相当する関数で折れ線近似し、ヒストグラムh(q-1),h(q),h(q+1)が単調増加または単調減少であるとき、点F(すなわち、座標(M(q),h(q)))を導入して、線分AF及び線分BFに相当する関数で折れ線近似してもよい。
In addition, you may apply this modification according to a case.
That is, when the histograms h (q−1), h (q), and h (q + 1) are not monotonously increasing or decreasing, the polygonal line approximating unit 520, as illustrated in FIG. Introducing a midpoint I and a line approximation with a function corresponding to the line segment AI and line segment BI, the histograms h (q-1), h (q), h (q + 1) are monotonically increasing or monotonic When it is a decrease, a point F (that is, coordinates (M (q), h (q))) may be introduced, and a polyline may be approximated by a function corresponding to the line segment AF and the line segment BF.

また、本変形例では、図9に例示するように、点Gと点Hとの中点Iを用いて、連続となるような確率密度関数としたが、必ずしも連続にしなくてもよい。
例えば、折れ線近似部520は、図9に例示する線分AG及び線分BHに相当する関数で折れ線近似を行ってもよい。すなわち、関数fq(x)は、以下のように定義される。
fq(x)=線分AG(ただし、M1(q)≦x<M(q))
fq(x)=線分BH(ただし、M(q)≦x<M2(q))
Further, in this modification, as illustrated in FIG. 9, the probability density function is continuous using the midpoint I between the point G and the point H, but it is not necessarily continuous.
For example, the broken line approximation unit 520 may perform broken line approximation with a function corresponding to the line segment AG and the line segment BH illustrated in FIG. That is, the function fq (x) is defined as follows.
fq (x) = Line segment AG (M1 (q) ≦ x <M (q))
fq (x) = Line segment BH (where M (q) ≦ x <M2 (q))

また、折れ線近似部520は、h(q-1),h(q),h(q+1)が単調増加あるいは単調減少ではないとき、
fq(x)=線分AG(ただし、M1(q)≦x<M(q))
fq(x)=線分BH(ただし、M(q)≦x<M2(q))
を用いて、不連続な折れ線近似を行い、h(q-1),h(q),h(q+1)が単調増加又は単調減少であるとき、点Fを座標(M(q),h(q))として、線分AF及び線分BFに相当する関数で折れ線近似してもよい。
The polygonal line approximation unit 520 is configured such that when h (q−1), h (q), and h (q + 1) are not monotonically increasing or monotonically decreasing,
fq (x) = Line segment AG (M1 (q) ≦ x <M (q))
fq (x) = Line segment BH (where M (q) ≦ x <M2 (q))
Is used to perform a discontinuous broken line approximation, and when h (q-1), h (q), h (q + 1) is monotonically increasing or monotonically decreasing, the point F is represented by coordinates (M (q), h (q)) may be approximated by a broken line with a function corresponding to the line segment AF and the line segment BF.

なお、上記変形例2は、以下のように一般化できる。
点Aは、h(q)とh(q-1)の間をh(q)n :h(q-1)n に内分する点とする。すなわち、
点A:座標(M1(q), 2×h(q)n×h(q-1)n/(h(q)n+h(q-1)n))
同様に、点Bは、h(q)とh(q+1)の間をh(q)n : h(q+1)n に内分する点とする。すなわち、
点B:座標(M2(q), 2×h(q)n×h(q+1)n/(h(q)n+h(q+1)n))
また、点Iの座標は、以下とする。
点I:座標(M(q), 2×h(q)−(Pa+Pb)/2)
ただし、
Pa=2×h(q)n×h(q-1)n/(h(q)n+h(q-1)n)
Pb=2×h(q)n×h(q+1)n/(h(q)n+h(q+1)n)
上記nの値は実数であり、図9を参照して説明した上記変形例2は、n=1の場合に相当する。
In addition, the said modification 2 can be generalized as follows.
Point A is a point that internally divides h (q) and h (q-1) into h (q) n : h (q-1) n . That is,
Point A: Coordinates (M1 (q), 2 × h (q) n × h (q-1) n / (h (q) n + h (q-1) n ))
Similarly, point B is a point that internally divides h (q) and h (q + 1) into h (q) n : h (q + 1) n . That is,
Point B: Coordinates (M2 (q), 2 × h (q) n × h (q + 1) n / (h (q) n + h (q + 1) n ))
The coordinates of point I are as follows.
Point I: Coordinates (M (q), 2 × h (q) − (Pa + Pb) / 2)
However,
Pa = 2 × h (q) n × h (q-1) n / (h (q) n + h (q-1) n )
Pb = 2 × h (q) n × h (q + 1) n / (h (q) n + h (q + 1) n )
The value of n is a real number, and the second modification described with reference to FIG. 9 corresponds to the case where n = 1.

また、折れ線近似部520は、所定の関数F()を用いて、ヒストグラムの境界に位置する点(点A及び点B)を算出し、算出された点を用いて折れ線近似してもよい。すなわち、上記では、点Aは、h(q)とh(q-1)の間をh(q)n : h(q-1)n に内分する点としたが、所定の関数F()を用いて、点Aは、h(q)とh(q-1)の間をF(h(q)):F(h(q-1))に内分する点としてもよい。このような点Aを採用する理由は、確率密度関数を連続にしたいからである。そして、このように様々な形状の関数F()を用いて、点を決めることにより確率密度関数を連続にすることが可能である。 Further, the polygonal line approximation unit 520 may calculate points (point A and point B) located at the boundary of the histogram using a predetermined function F () and approximate the polygonal line using the calculated points. That is, in the above, the point A is a point that internally divides between h (q) and h (q-1) into h (q) n : h (q-1) n , but the predetermined function F ( ), The point A may be a point that internally divides between h (q) and h (q-1) into F (h (q)): F (h (q-1)). The reason for adopting such point A is that the probability density function is to be continuous. Then, the probability density function can be made continuous by determining points using the functions F () of various shapes in this way.

さらに、上記では、点Aは、h(q)とh(q-1)の間をF(h(q)):F(h(q-1))に内分する点としたが、確率密度関数を連続にするためには、点Aの位置を、h(q)及びh(q-1)を入力として、h(q)とh(q-1)とを交換しても同じ値になるような関数値とすればよい。すなわち、互いに隣接するヒストグラムの境界における値(点A又は点Bの値)が、これらのヒストグラムの頻度値h(q)及びh(q-1)に関して対称となることが望ましい。   Furthermore, in the above, the point A is a point that internally divides between h (q) and h (q-1) into F (h (q)): F (h (q-1)). In order to make the density function continuous, the same value can be obtained even if the position of point A is replaced by h (q) and h (q-1) with h (q) and h (q-1) as inputs. The function value should be such that That is, it is desirable that values at the boundaries of adjacent histograms (values of point A or point B) are symmetrical with respect to the frequency values h (q) and h (q-1) of these histograms.

次に、確率密度関数であるため、その関数の値域は、正または0であることが望まれる。そのため、折れ線近似部520は、I<0であるときには、I=0とする例外処理を行う。
ただし、F(x)=xn 、かつ、n?1の場合には、I≧0となるため、上記例外処理(I=0とする処理)は必要ない。
Next, since it is a probability density function, the range of the function is desired to be positive or zero. Therefore, the polygonal line approximation unit 520 performs exception processing with I = 0 when I <0.
However, in the case of F (x) = x n and n? 1, since I ≧ 0, the above exception processing (processing for setting I = 0) is not necessary.

[変形例3]
上記実施形態では、確率密度関数を折れ線近似で行ったが、第3の変形例では、曲線で確率密度関数を近似する。
図10は、第3の変形例における復号化プログラム52を例示する図である。なお、本図に示された各構成のうち、図5に示された構成と実質的に同一のものには同一の符号が付されている。
図10に例示するように、本変形例の復号化プログラム52は、図5に示された復号化プログラム5の折れ線近似部520を、パラメータ推定部560に置換した構成をとる。
パラメータ推定部560は、ヒストグラム取得部500により取得されたヒストグラムh(q)に基づいて、変換係数Tの分布を曲線で近似する。
本例のパラメータ推定部560は、量子化インデクスのヒストグラムに基づいて、変換係数Tの分布をラプラス分布で推定する。
まずラプラス分布の式は、以下で表すことができる。
[Modification 3]
In the above embodiment, the probability density function is performed by polygonal line approximation, but in the third modification, the probability density function is approximated by a curve.
FIG. 10 is a diagram illustrating a decryption program 52 in the third modification. Of the components shown in the figure, those substantially the same as those shown in FIG. 5 are given the same reference numerals.
As illustrated in FIG. 10, the decoding program 52 of this modification has a configuration in which the broken line approximation unit 520 of the decoding program 5 shown in FIG. 5 is replaced with a parameter estimation unit 560.
The parameter estimation unit 560 approximates the distribution of the conversion coefficient T with a curve based on the histogram h (q) acquired by the histogram acquisition unit 500.
The parameter estimation unit 560 of this example estimates the distribution of the transform coefficient T as a Laplace distribution based on the quantization index histogram.
First, the Laplace distribution equation can be expressed as follows.

Figure 0004730144
Figure 0004730144

ラプラス分布の形状を推定するためには、パラメータ推定部560が上式のσを推定すればよい。
まず、パラメータ推定部560は、以下の式(数6)を用いて、ヒストグラムh(q)から、確率密度関数fhc(x)を算出する。
In order to estimate the shape of the Laplace distribution, the parameter estimation unit 560 may estimate σ in the above equation.
First, the parameter estimation unit 560 calculates the probability density function fhc (x) from the histogram h (q) using the following equation (Equation 6).

Figure 0004730144
Figure 0004730144

ただし、この場合に、q=0は、-1<x<1に対応する。また、q=1,2,…は、q≦x<q+1に対応し、q=-1,-2,…は、q-1<x≦qに対応する。
このとき、図11に例示されるように、ラプラス関数L(x)とヒストグラムfhc(x)の違いができるだけ小さくなるようなσを求めればよい。
上記の「違いができるだけ小さくなる」ことを評価する関数として、以下の誤差関数Err(σ)を定義する。
In this case, however, q = 0 corresponds to -1 <x <1. Further, q = 1, 2,... Corresponds to q.ltoreq.x <q + 1, and q = -1, -2,... Corresponds to q-1 <x.ltoreq.q.
At this time, as illustrated in FIG. 11, σ may be obtained so that the difference between the Laplace function L (x) and the histogram fhc (x) is as small as possible.
The following error function Err (σ) is defined as a function for evaluating that “the difference is as small as possible”.

Figure 0004730144
Figure 0004730144

この誤差関数Errは、各量子化インデクス値q毎に求めた確率密度関数の面積の差分の絶対値を加算したものである。誤差関数Err(σ)の値が小さいほど、fhc(x)とL(x)は似ているといえる。パラメータ推定部560は、上記Err(σ)を最小にするようなσを、数値計算を行って求めればよい。
あるいは、パラメータ推定部560は、σの値を多く用意しておき、そのうちで上記Err関数が最も小さくなるσを採用すればよい。
あるいは、パラメータ推定部560は、単純に変換係数種類cごとに、量子化インデクスQ(c,i,j)の標準偏差を計算して、σを求めてもよい。
This error function Err is obtained by adding the absolute value of the difference in area of the probability density function obtained for each quantization index value q. It can be said that fhc (x) and L (x) are more similar as the value of the error function Err (σ) is smaller. The parameter estimation unit 560 may obtain σ that minimizes the Err (σ) by performing numerical calculation.
Alternatively, the parameter estimation unit 560 may prepare many values of σ, and among them, σ that minimizes the Err function may be adopted.
Alternatively, the parameter estimation unit 560 may simply calculate the standard deviation of the quantization index Q (c, i, j) for each transform coefficient type c to obtain σ.

なお、本変形例では、ラプラス分布を用いる形態を具体例として説明したが、これに限定されるものではなく、パラメータを入力すると形状が決定できる関数であれば何でもよい。パラメータ数がN個ある場合には、多次元の最小化を行う数値演算を行えばよい。
例えば、パラメータ推定部560は、以下に示す一般化ガウス分布GG(x)を用いて、ヒストグラムを近似してもよい。
In this modification, the form using the Laplace distribution has been described as a specific example. However, the present invention is not limited to this, and any function can be used as long as the shape can be determined by inputting parameters. When there are N parameters, a numerical operation that performs multidimensional minimization may be performed.
For example, the parameter estimation unit 560 may approximate the histogram using a generalized Gaussian distribution GG (x) shown below.

Figure 0004730144
Figure 0004730144

なお、上記式中のΓ()は、ガンマ関数である。この分布は、パラメータα、βにより、形状が決定する。例えば、パラメータ推定部560は、上記誤差関数Errをガンマ関数GG(x)に適用して(すなわち、上記式(数7)のラプラス関数L(x)をガンマ関数GG(x)に変えて)、Errを最小化するパラメータα、βを求めればよい。   Note that Γ () in the above formula is a gamma function. The shape of this distribution is determined by parameters α and β. For example, the parameter estimation unit 560 applies the error function Err to the gamma function GG (x) (that is, changes the Laplace function L (x) in the above equation (Equation 7) to the gamma function GG (x)). , Parameters α and β that minimize Err may be obtained.

関数推定部530の説明を行う。
ここで、パラメータ推定部560により算出された確率密度関数が、LL(x)であるとする。
関数推定部530は、Fq(x)=LL(x)として以下の式により、部分確率密度関数fq()を求めればよい。
q>0の時、M1→0、M2→1の対応を取る。
fq(x)=Fq{(M2(q)-M1(q))x+M1(q)}
q<0の時、M1→1、M2→0の対応を取る。
fq(x)=Fq{(M1(q)-M2(q))x+M2(q)}
The function estimation unit 530 will be described.
Here, it is assumed that the probability density function calculated by the parameter estimation unit 560 is LL (x).
The function estimation unit 530 may obtain the partial probability density function fq () by the following equation with Fq (x) = LL (x).
When q> 0, take M1 → 0, M2 → 1.
fq (x) = Fq {(M2 (q) -M1 (q)) x + M1 (q)}
When q <0, take M1 → 1 and M2 → 0.
fq (x) = Fq {(M1 (q) -M2 (q)) x + M2 (q)}

[変形例4]
上記変形例3では、予めパラメータ化された分布関数を仮定して、パラメータを推定すれば、曲線で構成された、より緻密な確率密度関数を推定することができる。ところが、問題は、上記のように予め仮定した分布関数が、実際の変換係数分布と一致するとは限らない点である。例えば、前記ラプラス分布あるいは一般化ガウス分布は、|x|に対して単調減少するが、実際の分布は単調減少するとは限らない。
そこで、第4の変形例では、折れ線近似と、分布関数を用いた曲線近似とを併用する。より具体的には、信号数(量子化インデクスの出現頻度)の多い|q|が、比較的値の小さな領域に対しては、比較的パラメータ化された分布関数近似を適用する。逆に、|q|が比較的大きな領域に対しては、パラメータ化された分布関数による近似が当てはまらない可能性があるため、|q|が比較的大きな領域では、確率密度の変化が比較的小さいので折れ線近似を適用する。
[Modification 4]
In the third modification, if a parameter function is estimated on the assumption of a parameterized distribution function, a more precise probability density function composed of curves can be estimated. However, the problem is that the distribution function assumed in advance as described above does not always match the actual transform coefficient distribution. For example, the Laplace distribution or the generalized Gaussian distribution decreases monotonically with respect to | x |, but the actual distribution does not always decrease monotonously.
Therefore, in the fourth modified example, the broken line approximation and the curve approximation using the distribution function are used in combination. More specifically, a relatively parameterized distribution function approximation is applied to a region where | q | having a large number of signals (appearance frequency of quantization index) is relatively small. On the other hand, for regions with a relatively large | q |, the approximation by the parameterized distribution function may not apply, so in regions with a relatively large | q | Since it is small, a polygonal line approximation is applied.

図12は、第4の変形例における復号化プログラム54の構成を示す図である。なお、本図に示された各構成のうち、図5又は図10に示された構成と実質的に同一のものには、同一の符号が付されている。
図12に例示するように、本変形例における復号化プログラム54は、図5に示された構成に、パラメータ推定部560を追加した構成をとる。
折れ線近似部520は、正の整数の閾値TH1を用意する。典型的にはTH1=1、あるいは、TH1=2等の値となる。
また、パラメータ推定部560により推定された確率密度関数がLL(x)であるとする。
FIG. 12 is a diagram showing the configuration of the decryption program 54 in the fourth modified example. Of the components shown in the figure, those substantially the same as those shown in FIG. 5 or 10 are denoted by the same reference numerals.
As illustrated in FIG. 12, the decoding program 54 in the present modification has a configuration in which a parameter estimation unit 560 is added to the configuration illustrated in FIG. 5.
The polygonal line approximation unit 520 prepares a positive integer threshold TH1. Typically, the value is TH1 = 1 or TH1 = 2.
Further, it is assumed that the probability density function estimated by the parameter estimation unit 560 is LL (x).

折れ線近似部520は、|q|>TH1である場合に、上記実施形態又は上記変形例で示した折れ線近似を行い、Fq(x)を求める。
また、折れ線近似部520は、|q|=TH1である場合に、左右の点を規定する。すなわち、q=THのときに、折れ線近似部520は、左の点の値Fq(M1(q))を、パラメータ推定部560により求められた関数の代入値LL(M1(q))とし、右の点Fq(M2(q))を、パラメータ推定部560により求められた関数の代入値=LL(M2(q))とする。
上記実施形態又は上記変形例で示したように、折れ線近似部520は、3点(あるいは4点)を結ぶ線分を用いて折れ線近似を行う。上記で示されていない他の点については、折れ線近似部520は、上記実施形態又は上記変形例で示したものと同じ点を取って、折れ線近似を行う。
The broken line approximation unit 520 performs the broken line approximation shown in the embodiment or the modified example when | q |> TH1, and obtains Fq (x).
The broken line approximation unit 520 defines the left and right points when | q | = TH1. That is, when q = TH, the polygonal line approximation unit 520 sets the value Fq (M1 (q)) of the left point as the substitution value LL (M1 (q)) of the function obtained by the parameter estimation unit 560, The right point Fq (M2 (q)) is assumed to be the substitution value of the function obtained by the parameter estimation unit 560 = LL (M2 (q)).
As shown in the embodiment or the modified example, the polygonal line approximation unit 520 performs polygonal line approximation using a line segment connecting three points (or four points). For other points not shown above, the polygonal line approximation unit 520 performs the polygonal line approximation by taking the same points as those shown in the embodiment or the modification.

関数推定部530は、|q|≦TH1である場合に、折れ線近似部520により求められたFq(x)を、上記実施形態と同様の方法により部分密度関数fq()に変換し、|q|<TH1である場合に、変形例3と同様の方法により、部分密度関数fq()を求める。   When | q | ≦ TH1, the function estimation unit 530 converts Fq (x) obtained by the polygonal line approximation unit 520 into a partial density function fq () by the same method as in the above embodiment, and | q When | <TH1, the partial density function fq () is obtained by the same method as in the third modification.

[その他の変形例]
上記実施形態及び上記変形例では、各変換係数種類c及び量子化インデクス値qに対して統一されたr値を求める例を示した。ところが、r値は、各量子化インデクスqに対して別々の値をとってもよい。例えば、rをqの関数として、r(q)とすることができる。
この場合、補正値推定部540は、以下の式により、量子化インデクス値q毎に補正値r(q)を求めることができる。
[Other variations]
In the embodiment and the modification described above, an example in which a unified r value is obtained for each transform coefficient type c and quantization index value q has been described. However, the r value may take a different value for each quantization index q. For example, r (q) can be used as a function of q.
In this case, the correction value estimation unit 540 can obtain the correction value r (q) for each quantization index value q by the following equation.

Figure 0004730144
Figure 0004730144

このとき、逆量子化値出力部550は、量子化インデクス値qに対応する補正値r(q)を用いて、逆量子化値を算出する。   At this time, the inverse quantization value output unit 550 calculates an inverse quantization value using the correction value r (q) corresponding to the quantization index value q.

同様に、r値は、変換係数種類cに対して別々の値をとってもよい。例えば、rをcの関数として、r(c)とすることができる。
この場合、ヒストグラム取得部500は、ヒストグラム値h(q)を、変換係数種類c毎に算出し、hc(q)とすればよい。
また、上記実施形態のh(q)を全てhc(q)と読み替えて、かつ、全ての処理を変換係数種類ごとに行えばよい。
その結果、部分確率密度関数fq(x)も、変換係数種類c毎に算出することになる。変換係数種類cに対応する部分確率密度関数をfcq(x)とする。
この場合、補正値推定部540は、変換係数種類c毎にr(c)を求めることができる。
このとき、逆量子化値出力部550は、変換係数種類cに対応するr(c)を用いて、逆量子化値を算出する。
Similarly, the r value may take different values for the conversion coefficient type c. For example, r (c) can be used as a function of c.
In this case, the histogram acquisition unit 500 calculates the histogram value h (q) for each conversion coefficient type c and sets it as hc (q).
Further, all h (q) in the above embodiment may be read as hc (q), and all the processes may be performed for each conversion coefficient type.
As a result, the partial probability density function fq (x) is also calculated for each conversion coefficient type c. Let fcq (x) be the partial probability density function corresponding to the conversion coefficient type c.
In this case, the correction value estimation unit 540 can obtain r (c) for each conversion coefficient type c.
At this time, the inverse quantized value output unit 550 calculates an inverse quantized value using r (c) corresponding to the transform coefficient type c.

また、同様に、r値は、変換係数種類c及び量子化インデクス値qの組合せに対して別々の値をとってもよい。例えば、補正値rを変換係数種類c及び量子化インデクス値qの関数として、r(c,q)とすることができる。
この場合、ヒストグラム取得部500は、ヒストグラム値h(q)を、変換係数種類毎に算出し、hc(q)とすればよい。また、h(q)を全てhc(q)と読み替えて、かつ、全ての処理を変換係数ごとに行えばよい。
このとき、逆量子化値出力部550は、量子化インデクス値q及び変換係数種類cの組合せに対応するr(c,Q(c,i,j))を用いて、逆量子化値を算出する。
Similarly, the r value may take different values for the combination of the transform coefficient type c and the quantization index value q. For example, the correction value r can be set to r (c, q) as a function of the transform coefficient type c and the quantization index value q.
In this case, the histogram acquisition unit 500 may calculate the histogram value h (q) for each conversion coefficient type and set it as hc (q). Moreover, all h (q) may be read as hc (q), and all processing may be performed for each conversion coefficient.
At this time, the inverse quantization value output unit 550 calculates an inverse quantization value using r (c, Q (c, i, j)) corresponding to the combination of the quantization index value q and the transform coefficient type c. To do.

また、上記実施形態では、ヒストグラムを計測するときに、変換係数種類cに関わらず頻度数を計測し、最終的に部分確率密度関数の和を取って、r値を推定していた。
しかしながら、復号化プログラム5は、まず、各変換係数種類c、あるいは、量子化インデクス値q毎に推定したr値を用いて、重み付け平均を取って統一されたr値を求めるようにしてもよい。
ここで、変換係数種類c、かつ、量子化インデクスqとなる信号の個数をp(c,q)とし、量子化インデクス値がqとなる信号の個数をp(q)とし、変換係数種類cとなる信号の個数をp(c)とする。
この場合に、復号化プログラム5は、以下の式により、r、r(q)、あるいは、r(c)を算出する。
In the above embodiment, when the histogram is measured, the frequency number is measured regardless of the conversion coefficient type c, and the sum of partial probability density functions is finally obtained to estimate the r value.
However, the decoding program 5 may first obtain a unified r value by taking a weighted average using the r value estimated for each transform coefficient type c or for each quantized index value q. .
Here, the number of signals with transform coefficient type c and quantized index q is p (c, q), the number of signals with quantized index value q is p (q), and transform coefficient type c Let p (c) be the number of signals.
In this case, the decryption program 5 calculates r, r (q), or r (c) by the following equation.

Figure 0004730144
Figure 0004730144

また、上記実施形態では、Fq()を求めてから、fq()に変換していたが、復号化プログラム5は、最初に量子化範囲内のT(c,i,j)/D(c)の値を、0〜1に変換して、次に直接fq()を求めるようにしてももちろんよい。   In the above embodiment, Fq () is obtained and then converted to fq (). However, the decoding program 5 first calculates T (c, i, j) / D (c within the quantization range. ) May be converted to 0 to 1 and fq () may be directly obtained.

また、上記実施形態では、JPEG2000方式に適用する形態を具体例として説明したが、上記実施形態で説明した逆量子化は、JPEG方式の逆量子化に用いることができる。
この場合、以下の変更を行えばよい。
すなわち、ヒストグラム取得部500は、f(x)=h(q)(ただし、x≦0.5かつq-0.5≦x<q+0.5、あるいは、x≦-0.5かつq-0.5<x≦q+0.5のとき)、f(x)=h(0)(ただし、-0.5<x<0.5のとき)として、ヒストグラム関数を定義し、折れ線近似部520は、M(q)=q、M1(q)=q-0.5、M2(q)=q+0.5として、折れ線近似を行う。
Further, in the above embodiment, the form applied to the JPEG2000 system has been described as a specific example. However, the inverse quantization described in the above embodiment can be used for the inverse quantization of the JPEG system.
In this case, the following changes may be made.
That is, the histogram acquisition unit 500 calculates f (x) = h (q) (where x ≦ 0.5 and q−0.5 ≦ x <q + 0.5, or x ≦ −0.5 and q−0.5 <x ≦ q + 0.5). ), F (x) = h (0) (where −0.5 <x <0.5), a histogram function is defined, and the polygonal line approximation unit 520 has M (q) = q, M1 (q) Polygonal line approximation is performed with = q-0.5 and M2 (q) = q + 0.5.

また、パラメータ推定部560は、q=0を、-0.5<x<0.5に対応させ、q=1,2,…を、q-0.5≦x<q+0.5に対応させ、q=-1,-2,…を、q-0.5<x≦q+0.5に対応させて、ヒストグラムh(q)を、確率密度関数fhc(x)に変換する。   In addition, the parameter estimation unit 560 associates q = 0 with −0.5 <x <0.5, associates q = 1, 2,... With q−0.5 ≦ x <q + 0.5, and q = −1. The histogram h (q) is converted into a probability density function fhc (x) by making −2,... Correspond to q−0.5 <x ≦ q + 0.5.

なお、上記変形例3において、パラメータ推定部560が、単純に変換係数種類cごとに、量子化インデクスQ(c,i,j)の標準偏差を計算して、σを求める方法を説明する。
パラメータ推定部560は、以下の式により、部分確率密度関数fq(x)を求めることができる。
In the third modification, a method in which the parameter estimation unit 560 simply calculates the standard deviation of the quantization index Q (c, i, j) for each transform coefficient type c to obtain σ will be described.
The parameter estimation unit 560 can obtain the partial probability density function fq (x) by the following equation.

Figure 0004730144
Figure 0004730144

ただし、量子化インデクスがqとなるxの範囲をd1(q)〜d2(q)としている。また、量子化インデクスqにおける値rを、r(q)とする。
ここで、
However, the range of x where the quantization index is q is defined as d1 (q) to d2 (q). Further, the value r in the quantization index q is r (q).
here,

Figure 0004730144
Figure 0004730144

とすると、r(q)は、以下のように表される。 Then, r (q) is expressed as follows.

Figure 0004730144
Figure 0004730144

f(x)がラプラス分布の場合、上記r(q)は、qに依存しない(すなわち、σとDの比のみに依存する)定数となる。したがって、関数G(q)は、以下の式のように表される。   When f (x) has a Laplace distribution, r (q) is a constant that does not depend on q (that is, depends only on the ratio of σ and D). Therefore, the function G (q) is expressed as the following equation.

Figure 0004730144
Figure 0004730144

ただし、   However,

Figure 0004730144
Figure 0004730144

および、q≠0、q=0を得る。
よって、パラメータ推定部560は、以下の式により補正値rを算出することができる。
And q ≠ 0 and q = 0 are obtained.
Therefore, the parameter estimation unit 560 can calculate the correction value r by the following equation.

Figure 0004730144
Figure 0004730144

すなわち、パラメータ推定部560は、量子化インデクスQのヒストグラムから、その変換係数種類の標準偏差σを推定する。量子化インデクスから変換係数の標準偏差を推定する手法としては、特開2004-80741に示された手法などを用いればよい。
そして、パラメータ推定部560は、推定された標準偏差(すなわち、量子化インデクスの標準偏差)に基づいて、r値を算出する。
なお、r値は、符号化時に算出されてもよく、この場合には、実際の変換係数の標準偏差に基づいて上記式(14)及び式(15)によりr値を算出し、算出されたr値を符号データに埋め込む。復号化プログラム5は、符号データに埋め込まれたr値に基づいて、逆量子化することができる。
本変形例では、変換係数の標準偏差を求めるだけで、簡単にr値を求めることができるため好適である。
That is, the parameter estimation unit 560 estimates the standard deviation σ of the conversion coefficient type from the histogram of the quantization index Q. As a technique for estimating the standard deviation of the transform coefficient from the quantization index, a technique disclosed in Japanese Patent Application Laid-Open No. 2004-80741 may be used.
Then, parameter estimation unit 560 calculates an r value based on the estimated standard deviation (that is, the standard deviation of the quantization index).
The r value may be calculated at the time of encoding. In this case, the r value is calculated by calculating the r value by the above formula (14) and formula (15) based on the standard deviation of the actual transform coefficient. The r value is embedded in the code data. The decoding program 5 can perform inverse quantization based on the r value embedded in the code data.
This modification is preferable because the r value can be easily obtained simply by obtaining the standard deviation of the conversion coefficient.

JPEG方式及びJPEG2000方式などの変換符号化方式の概略を説明する図であり、(A)は、符号化処理の概略を示し、(B)は、復号化処理の概略を示す。It is a figure explaining the outline of transform coding systems, such as a JPEG system and a JPEG2000 system, (A) shows the outline of encoding processing, and (B) shows the outline of decoding processing. 変換符号化方式における量子化処理を説明する図である。It is a figure explaining the quantization process in a transform coding system. 変換係数の分布を例示する図である。It is a figure which illustrates distribution of a conversion coefficient. 本発明にかかる逆量子化方法が適応される復号化装置2のハードウェア構成を、制御装置20を中心に例示する図である。It is a figure which illustrates the hardware constitutions of the decoding apparatus 2 with which the inverse quantization method concerning this invention is applied centering on the control apparatus 20. FIG. 制御装置20(図4)により実行され、本発明にかかる逆量子化方法を実現する復号化プログラム5の機能構成を例示する図である。It is a figure which illustrates the functional structure of the decoding program 5 which is performed by the control apparatus 20 (FIG. 4), and implement | achieves the inverse quantization method concerning this invention. 折れ線近似を例示する図である。It is a figure which illustrates a polygonal line approximation. 折れ線近似とヒストグラムとの面積差を例示する図である。It is a figure which illustrates the area difference of a broken line approximation and a histogram. 第1の変形例における折れ線近似を説明する図である。It is a figure explaining the broken line approximation in the 1st modification. 第2の変形例における折れ線近似を説明する図である。It is a figure explaining the broken line approximation in the 2nd modification. 第2の復号化プログラム52の構成を例示する図である。It is a figure which illustrates the structure of the 2nd decoding program 52. FIG. ラプラス分布(分布関数)を用いた近似を説明する図である。It is a figure explaining the approximation using a Laplace distribution (distribution function). 第3の復号化プログラム54の構成を例示する図である。It is a figure which illustrates the structure of the 3rd decoding program.

符号の説明Explanation of symbols

2・・・復号化装置
5・・・復号化プログラム
40・・・エントロピ復号部
50・・・逆量子化部
500・・・逆量子化値推定部
520・・・分布推定部
540・・・期待値推定部
560・・・乱数発生部
580・・・補正部
582・・・分布情報特定部
584・・・期待値シフト部
586・・・期待値補正部
590・・・逆量子化値出力部
60・・・逆変換部
DESCRIPTION OF SYMBOLS 2 ... Decoding apparatus 5 ... Decoding program 40 ... Entropy decoding part 50 ... Inverse quantization part 500 ... Inverse quantization value estimation part 520 ... Distribution estimation part 540 ... Expected value estimating unit 560... Random number generating unit 580... Correcting unit 582 .. distribution information specifying unit 584... Expected value shifting unit 586 .. expected value correcting unit 590. 60: Inverse conversion unit

Claims (21)

量子化インデクス値の頻度分布を生成する分布生成手段と、
前記分布生成手段により生成された量子化インデクス頻度分布において、互いに隣接する2つの量子化インデクス値の頻度値を結ぶ一次関数を求め、この一次関数を用いて量子化インデクス値の確率密度関数の期待値を算出する期待値算出手段と、
前記期待値算出手段により算出された期待値に基づいて、量子化インデクス値それぞれに対応する逆量子化値を補正する補正手段と
を有する復号化装置。
A distribution generating means for generating a frequency distribution of quantized index values;
In the frequency distribution of the quantized index values generated by the distribution generating means, a linear function connecting the frequency values of two adjacent quantized index values is obtained, and the probability density function of the quantized index value using the linear function An expected value calculating means for calculating an expected value of
A decoding device comprising: correction means for correcting an inverse quantization value corresponding to each quantized index value based on the expected value calculated by the expected value calculation means .
前記期待値算出手段は、注目量子化インデクス値について確率密度関数を決定する場合に、この注目量子化インデクス値の頻度値と、この注目量子化インデクス値と隣接する量子化インデクス値の頻度値との比、及び、前記注目量子化インデクス値の頻度値と前記隣接する量子化インデクス値の頻度値との差分に応じて、頻度分布を近似する一次関数を決定する
請求項に記載の復号化装置。
When determining the probability density function for the target quantization index value, the expectation value calculating means, the frequency value of the target quantization index value, and the frequency value of the quantization index value adjacent to the target quantization index value, The decoding according to claim 1 , wherein a linear function that approximates a frequency distribution is determined in accordance with a ratio between the frequency value of the target quantization index value and a frequency value of the adjacent quantization index value. apparatus.
前記期待値算出手段は、注目量子化インデクス値について確率密度関数を決定する場合に、この注目量子化インデクス値と、この注目量子化インデクス値に対応する量子化区間の最頻値とを用いて、前記頻度分布を近似する一次関数を決定する
請求項1又は2に記載の復号化装置。
When determining the probability density function for the target quantization index value, the expected value calculation means uses the target quantization index value and the mode value of the quantization interval corresponding to the target quantization index value. the decoding apparatus according to claim 1 or 2 for determining a linear function that approximates the frequency distribution.
前記期待値算出手段は、注目量子化インデクス値について確率密度関数を決定する場合に、この注目量子化インデクス値の頻度値をh(q)とし、この注目量子化インデクス値の両隣の量子化インデクス値の頻度値をh(q−1)及びh(q+1)としたときに、中心の値をh(q) 2 {1/(h(q)+h(q-1))+1/(h(q)+h(q+1))}とし、この中心の値を用いて、前記頻度分布を近似する一次関数を決定する
請求項1又は2に記載の復号化装置。
When determining the probability density function for the target quantization index value, the expected value calculation means sets the frequency value of the target quantization index value to h (q), and the quantization index on both sides of the target quantization index value. When the frequency values of the values are h (q-1) and h (q + 1), the central value is h (q) 2 {1 / (h (q) + h (q-1)) + 1 / ( and h (q) + h (q + 1))}, using the value of the center, the decoding apparatus according to claim 1 or 2 for determining a linear function that approximates the frequency distribution.
前記期待値算出手段は前記分布生成手段により生成された頻度分布を近似する分布関数を生成し、生成された分布関数を用いて、前記確率密度関数を生成する
請求項に記載の復号化装置。
The expected value calculation unit, said generating a distribution function approximating the generated frequency distribution by distribution generation unit, by using the generated distribution function, decoding according to claim 1 to generate the probability density function apparatus.
前記期待値算出手段は、量子化インデクス値の絶対値が既定値以下となる量子化区間について、前記分布関数を用いて前記確率密度関数を生成し、量子化インデクス値の絶対値が既定値よりも大きくなる量子化区間について、前記分布生成手段により生成された頻度分布を少なくとも1つの直線で近似する関数を用いて、前記確率密度関数を生成する
請求項に記載の復号化装置。
The expected value calculation means generates the probability density function using the distribution function for a quantization interval in which the absolute value of the quantized index value is equal to or less than a predetermined value, and the absolute value of the quantized index value is greater than the predetermined value. The decoding apparatus according to claim 5 , wherein the probability density function is generated using a function that approximates the frequency distribution generated by the distribution generation means with at least one straight line for a quantization interval that becomes larger.
前記期待値算出手段は、前記分布関数を用いて生成される確率密度関数と、前記直線で近似する関数を用いて生成される確率密度関数とを互いに連続に接続する
請求項に記載の復号化装置。
7. The decoding according to claim 6 , wherein the expectation value calculating means continuously connects a probability density function generated using the distribution function and a probability density function generated using a function approximated by the straight line. Device.
前記期待値算出手段は、前記分布生成手段により生成された頻度分布との面積差が既定値以下となるような分布関数を生成する
請求項に記載の復号化装置。
The decoding apparatus according to claim 5 , wherein the expected value calculation unit generates a distribution function such that an area difference from the frequency distribution generated by the distribution generation unit is equal to or less than a predetermined value.
前記期待値算出手段は、前記分布生成手段により生成された頻度分布に基づいて、量子化インデクスの標準偏差を算出し、算出された標準偏差に基づいて、前記分布関数を生成する
請求項に記載の復号化装置。
The expected value calculation means, based on the frequency distribution generated by the distribution generation unit calculates the standard deviation of the quantization indices, based on the standard deviation calculated, to claim 5 to generate the distribution function The decoding apparatus as described.
前記分布生成手段は、量子化インデクス値の頻度分布を示す標準偏差σを算出し、
前記補正手段は、前記分布生成手段により算出された標準偏差σと、量子化区間の幅Dと、以下の2式:
Figure 0004730144
Figure 0004730144
とを用いて、補正値rを算出する
請求項1に記載の復号化装置。
The distribution generation means calculates a standard deviation σ indicating a frequency distribution of quantization index values,
The correction means includes a standard deviation σ calculated by the distribution generation means, a quantization interval width D, and the following two formulas:
Figure 0004730144
Figure 0004730144
The decoding device according to claim 1, wherein the correction value r is calculated using
前記分布生成手段により生成された頻度分布に基づいて、量子化インデクスの確率密度関数の期待値を量子化区間毎に算出する期待値算出手段
をさらに有し、
前記補正手段は、前記期待値算出手段により算出された量子化区間毎の期待値に基づいて、量子化区間毎の個別補正値を算出し、算出された個別補正値と、それぞれの量子化区間に対応する量子化インデクスの数とに基づいて、適用すべき補正値を決定する
請求項1に記載の復号化装置。
Based on the frequency distribution generated by the distribution generating means, further comprising an expected value calculating means for calculating an expected value of the probability density function of the quantization index for each quantization section;
The correction unit calculates an individual correction value for each quantization interval based on the expected value for each quantization interval calculated by the expected value calculation unit, and calculates the individual correction value and each quantization interval. The decoding device according to claim 1, wherein a correction value to be applied is determined based on the number of quantization indexes corresponding to.
前記量子化インデクスは、変換符号化処理で生成される変換係数の種類に対応付けられており、
前記分布生成手段は、変換係数の種類毎に、量子化インデクス値の頻度分布を生成し、
前記分布生成手段により生成された頻度分布に基づいて、量子化インデクスの確率密度関数の期待値を、変換係数の種類毎に算出する期待値算出手段
をさらに有し、
前記補正手段は、前記期待値算出手段により算出された期待値に基づいて、変換係数の種類毎の個別補正値を算出し、算出された個別補正値と、それぞれの量子化区間に対応する量子化インデクスの数とに基づいて、適用すべき補正値を決定する
請求項1に記載の復号化装置。
The quantization index is associated with the type of transform coefficient generated by transform coding processing,
The distribution generation means generates a frequency distribution of quantized index values for each type of transform coefficient,
Based on the frequency distribution generated by the distribution generation means, further comprising an expected value calculation means for calculating the expected value of the probability density function of the quantization index for each type of transform coefficient,
The correction unit calculates an individual correction value for each type of transform coefficient based on the expected value calculated by the expected value calculation unit, and calculates the calculated individual correction value and a quantum corresponding to each quantization interval. The decoding device according to claim 1, wherein a correction value to be applied is determined based on the number of digitized indexes.
前記分布生成手段により生成された頻度分布に基づいて、量子化インデクスの確率密度関数の期待値を量子化区間毎に算出する期待値算出手段
をさらに有し、
前記補正手段は、前記期待値算出手段により算出された量子化区間毎の期待値に基づいて、量子化区間毎の補正値を算出し、
前記補正手段により算出された補正値のうち、逆量子化すべき量子化インデクスの量子化区間が一致する補正値を適用して、逆量子化値を算出する逆量子化値算出手段
をさらに有する
請求項1に記載の復号化装置。
Based on the frequency distribution generated by the distribution generating means, further comprising an expected value calculating means for calculating an expected value of the probability density function of the quantization index for each quantization section;
The correction means calculates a correction value for each quantization interval based on the expected value for each quantization interval calculated by the expected value calculation means,
An inverse quantization value calculation unit that calculates an inverse quantization value by applying a correction value that matches a quantization interval of a quantization index to be inversely quantized among the correction values calculated by the correction unit. Item 4. The decoding device according to Item 1.
前記量子化インデクスは、変換符号化処理で生成される変換係数の種類に対応付けられており、
前記分布生成手段は、変換係数の種類毎に、量子化インデクス値の頻度分布を生成し、
前記分布生成手段により生成された頻度分布に基づいて、量子化インデクスの確率密度関数の期待値を、変換係数の種類毎に算出する期待値算出手段
をさらに有し、
前記補正手段は、前記期待値算出手段により算出された期待値に基づいて、変換係数の種類毎の補正値を算出し、
前記補正手段により算出された補正値のうち、逆量子化すべき量子化インデクスと変換係数の種類が一致する補正値を適用して、逆量子化値を算出する逆量子化値算出手段
をさらに有する
請求項1に記載の復号化装置。
The quantization index is associated with the type of transform coefficient generated by transform coding processing,
The distribution generation means generates a frequency distribution of quantized index values for each type of transform coefficient,
Based on the frequency distribution generated by the distribution generation means, further comprising an expected value calculation means for calculating the expected value of the probability density function of the quantization index for each type of transform coefficient,
The correction means calculates a correction value for each type of transform coefficient based on the expected value calculated by the expected value calculation means,
Of the correction values calculated by the correction means, further includes a dequantized value calculation means for calculating a dequantized value by applying a correction value whose type of transform coefficient matches the quantization index to be dequantized. The decoding device according to claim 1.
前記分布生成手段は、量子化インデクスのヒストグラムを作成し、
前記期待値算出手段は、前記分布生成手段により生成されたヒストグラムに基づいて、
互いに隣接する量子化区間の境界位置の頻度値を算出し、算出された境界位置の頻度値を用いて、前記確率密度関数を生成し、
前記互いに隣接する量子化区間の境界位置の頻度値は、これらの量子化区間の頻度値に関して対称となるように算出される
請求項に記載の復号化装置。
The distribution generation means creates a histogram of quantization indexes,
The expected value calculation means is based on the histogram generated by the distribution generation means,
Calculating a frequency value of a boundary position between adjacent quantization intervals, and using the calculated frequency value of the boundary position to generate the probability density function;
The decoding device according to claim 1 , wherein the frequency values of the boundary positions of the adjacent quantization intervals are calculated so as to be symmetric with respect to the frequency values of the quantization intervals.
前記期待値算出手段は、互いに隣り合う2つの量子化区間の頻度値をh(q)及びh(q−1)とした場合に、既定の関数F()を用いて、これらの量子化区間の境界位置の頻度値として、h(q)及びh(q−1)の間をF(h(q)):F(h(q−1))に内分する値を算出する
請求項15に記載の復号化装置。
The expectation value calculation means uses a predetermined function F () when the frequency values of two adjacent quantization intervals are h (q) and h (q−1), and uses these predetermined quantization intervals. 16. A value that internally divides between h (q) and h (q−1) into F (h (q)): F (h (q−1)) is calculated as a frequency value of the boundary position of The decoding device according to 1.
前記期待値算出手段は、前記関数F()として、F(x)=xn(nは定数)として表すことのできる関数を用いる
請求項16に記載の復号化装置。
The decoding apparatus according to claim 16 , wherein the expected value calculation means uses a function that can be expressed as F (x) = xn (n is a constant) as the function F ().
前記期待値算出手段は、連続する3つの量子化区間のうち、2番目の量子化区間の中間位置の確率密度関数値Iを算出する場合に、1番目の量子化区間と2番目の量子化区間との境界位置の確率密度関数値Aと、2番目の量子化区間と3番目の量子化区間との境界位置の確率密度関数値Bと、2番目の量子化区間の頻度値H(q)と、以下の式:
I=2×H(q)−(A+B)/2とを用いて、確率密度関数値Iを算出する
請求項に記載の復号化装置。
The expected value calculating means calculates the probability density function value I at the intermediate position of the second quantization interval among the three consecutive quantization intervals, when the first quantization interval and the second quantization interval are calculated. The probability density function value A at the boundary position with the interval, the probability density function value B at the boundary position between the second quantization interval and the third quantization interval, and the frequency value H (q of the second quantization interval ) And the following formula:
I = 2 × H (q) - (A + B) / 2 and using a decoding apparatus according to claim 1 for calculating a probability density function value I.
前記期待値算出手段は、算出された確率密度関数値が負の値となった場合に、この確率密度関数値を0として、期待値を算出する
請求項18に記載の復号化装置。
The decoding apparatus according to claim 18 , wherein the expected value calculation means calculates an expected value by setting the probability density function value to 0 when the calculated probability density function value becomes a negative value.
量子化インデクス値の頻度分布を生成し、
生成された量子化インデクス頻度分布において、互いに隣接する2つの量子化インデクス値の頻度値を結ぶ一次関数を求め、この一次関数を用いて量子化インデクス値の確率密度関数の期待値を算出し、
算出された期待値に基づいて、量子化インデクス値それぞれに対応する逆量子化値を補正する
逆量子化方法。
Generate a frequency distribution of quantized index values,
In the frequency distribution of the generated quantized index values , obtain a linear function that connects the frequency values of two adjacent quantized index values, and use this linear function to calculate the expected value of the probability density function of the quantized index value And
An inverse quantization method for correcting an inverse quantization value corresponding to each quantization index value based on a calculated expected value .
量子化インデクス値の頻度分布を生成するステップと、
生成された量子化インデクス頻度分布において、互いに隣接する2つの量子化インデクス値の頻度値を結ぶ一次関数を求め、この一次関数を用いて量子化インデクス値の確率密度関数の期待値を算出するステップと、
算出された期待値に基づいて、量子化インデクス値それぞれに対応する逆量子化値を補正するステップと
をコンピュータに実行させるプログラム。
Generating a frequency distribution of quantized index values;
In the frequency distribution of the generated quantized index values , obtain a linear function that connects the frequency values of two adjacent quantized index values, and use this linear function to calculate the expected value of the probability density function of the quantized index value And steps to
A program for causing a computer to execute a step of correcting an inverse quantized value corresponding to each quantized index value based on a calculated expected value .
JP2006061480A 2005-03-23 2006-03-07 Decoding device, inverse quantization method, and program thereof Expired - Fee Related JP4730144B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006061480A JP4730144B2 (en) 2005-03-23 2006-03-07 Decoding device, inverse quantization method, and program thereof

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2005084084 2005-03-23
JP2005084084 2005-03-23
JP2006061480A JP4730144B2 (en) 2005-03-23 2006-03-07 Decoding device, inverse quantization method, and program thereof

Publications (2)

Publication Number Publication Date
JP2006304270A JP2006304270A (en) 2006-11-02
JP4730144B2 true JP4730144B2 (en) 2011-07-20

Family

ID=37471970

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006061480A Expired - Fee Related JP4730144B2 (en) 2005-03-23 2006-03-07 Decoding device, inverse quantization method, and program thereof

Country Status (1)

Country Link
JP (1) JP4730144B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3252768B1 (en) * 2015-01-30 2020-08-19 Nippon Telegraph and Telephone Corporation Parameter determination device, method, program, and recording medium
CN113921021A (en) * 2015-01-30 2022-01-11 日本电信电话株式会社 Decoding device, decoding method, recording medium, and program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004080741A (en) * 2002-06-21 2004-03-11 Nippon Hoso Kyokai <Nhk> Encoding error estimation method and encoding error estimation apparatus
JP2005124145A (en) * 2003-10-11 2005-05-12 Lg Electronics Inc Method for decoding digital image data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004080741A (en) * 2002-06-21 2004-03-11 Nippon Hoso Kyokai <Nhk> Encoding error estimation method and encoding error estimation apparatus
JP2005124145A (en) * 2003-10-11 2005-05-12 Lg Electronics Inc Method for decoding digital image data

Also Published As

Publication number Publication date
JP2006304270A (en) 2006-11-02

Similar Documents

Publication Publication Date Title
JP4737711B2 (en) Decoding device, inverse quantization method, distribution determination method, and program thereof
Zhang et al. Compression artifact reduction by overlapped-block transform coefficient estimation with block similarity
JP4987086B2 (en) Image encoding method and decoding method, apparatus thereof, program thereof, and recording medium recording the program
KR100809409B1 (en) Decoding apparatus, inverse quantization method, and computer readable medium recorded with the program
JP4775756B2 (en) Decoding device and program thereof
US7778468B2 (en) Decoding apparatus, dequantizing method, and program thereof
KR100922510B1 (en) Image coding and decoding method, corresponding devices and applications
JP2006502604A (en) Image compression method for arbitrarily shaped objects
CN101779461B (en) Image compression and decompression using the pixon method
JP5176175B2 (en) System, method and program for predicting file size of image converted by changing and scaling quality control parameters
JP2000152240A (en) Nonlinear quantization method in resolution layer using s-shaped nonlinearity
Hachicha et al. Efficient inter-view bit allocation methods for stereo image coding
Abhayaratne et al. Scalable watermark extraction for real-time authentication of JPEG 2000 images
JP4730144B2 (en) Decoding device, inverse quantization method, and program thereof
JP4645948B2 (en) Decoding device and program
US20030103576A1 (en) Encoding/decoding apparatus and method for orientation interpolator node data
JP2006270737A (en) Decoder, distribution estimating method, decoding method and their programs
US7657110B2 (en) Image compression using a color visual model
JPH08331563A (en) Image compressing method using ripple conversion
JP3894605B2 (en) Outline approximation method and outline encoding apparatus
JP4660698B2 (en) Image processing system and image processing program
JP2006287487A (en) Encoder, encoding method and program, and information recording medium
JP2002152049A (en) Data processing apparatus and data processing method
CN118413675B (en) Context-based progressive three-plane coding image compression algorithm and terminal equipment
Tiwari et al. A comparative study on image and video compression techniques

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110221

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110322

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110404

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140428

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees