JP2012060210A - Method, apparatus and program for adaptive quantization - Google Patents

Method, apparatus and program for adaptive quantization Download PDF

Info

Publication number
JP2012060210A
JP2012060210A JP2010198576A JP2010198576A JP2012060210A JP 2012060210 A JP2012060210 A JP 2012060210A JP 2010198576 A JP2010198576 A JP 2010198576A JP 2010198576 A JP2010198576 A JP 2010198576A JP 2012060210 A JP2012060210 A JP 2012060210A
Authority
JP
Japan
Prior art keywords
class
value
weighted sum
boundary
quantization
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.)
Granted
Application number
JP2010198576A
Other languages
Japanese (ja)
Other versions
JP5426506B2 (en
Inventor
Yukihiro Bando
幸浩 坂東
Masayuki Takamura
誠之 高村
Hirohisa Jozawa
裕尚 如澤
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2010198576A priority Critical patent/JP5426506B2/en
Publication of JP2012060210A publication Critical patent/JP2012060210A/en
Application granted granted Critical
Publication of JP5426506B2 publication Critical patent/JP5426506B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To achieve adaptive quantization minimizing an approximation error under the constraint of a given coding amount, without depending on an input signal distribution.SOLUTION: When approximating a histogram of input signals with the number of classes given separately, an RD cost calculator 17 stores into a memory a quantization value to minimize a weighted sum of the approximation error and the coding amount relative to the entire candidates of a class boundary, and a minimum value of the weighted sum. When selecting the class boundary for the next class, the RD cost calculator 17 reads out the stored minimum value from the memory, so as to use for the calculation of the minimum value of the weighted sum in the class boundary selection at the time point concerned. A section top end optimum value tracer 20 selects the class boundary minimizing the weighted sum of the approximation error and the coding amount to the entire class boundary candidates from the calculated result by the RD cost calculator 17.

Description

本発明は,高能率画像信号符号化の技術に関し,特に符号化効率を向上させるための適応量子化技術に関する。   The present invention relates to a high-efficiency image signal encoding technique, and more particularly to an adaptive quantization technique for improving encoding efficiency.

非可逆符号化において,量子化は必要不可欠な構成要素である。一般的な符号化方式においては,量子化は符号化データの表現精度を制御し,この制御過程において符号化歪みが発生する。基本的な量子化器の設計は,与えられた歪み量の評価尺度に対して,その評価尺度を最小化するための符号語(量子化インデックス)を求める最小化問題に帰着される。歪み量の評価尺度としては,二乗和,絶対値和が用いられる。   In lossy coding, quantization is an indispensable component. In a general encoding method, quantization controls the accuracy of expression of encoded data, and encoding distortion occurs in this control process. The design of the basic quantizer is reduced to a minimization problem for obtaining a codeword (quantization index) for minimizing the evaluation measure for a given distortion amount evaluation measure. The sum of squares or the sum of absolute values is used as a measure for evaluating the amount of distortion.

また,一般的な量子化器の設計においては,符号量に関する制約条件が課せられる。この場合,量子化器の設計は,符号量に関する一定の制約条件の下,与えられた歪み量の評価尺度に対して,その評価尺度を最小化するための符号語(量子化インデックス)を求める制約条件付きの最小化問題に帰着される。符号化対象信号の確率密度関数がパラメトリックに表現できる場合には,解析的に最適解を求める手法(analitical optimization) が可能な場合もある。例えば,確率密度関数が,一様分布,ガウス分布,ラプラス分布に従う場合がそれに当たる。しかし,一般的に符号化対象データに対して,そうしたパラメトリックな表現は成立しない。   In general quantizer design, a constraint on the amount of code is imposed. In this case, the design of the quantizer calculates the codeword (quantization index) for minimizing the evaluation measure for a given evaluation measure of distortion amount under certain constraints on the code amount. This results in a constrained minimization problem. If the probability density function of the signal to be encoded can be expressed parametrically, there may be a case where an analytical optimization method can be obtained. For example, this is the case when the probability density function follows a uniform distribution, Gaussian distribution, or Laplace distribution. However, in general, such parametric expression does not hold for data to be encoded.

そこで,計算機上での離散数値演算に基づく最適化手法(operational optimization)が用いられる。代表的な手法が,Lloyd−Max量子化法(非特許文献1参照)である。これは,量子化代表値の算出と量子化ビン境界の算出を一定の収束条件まで繰り返す処理である。   Therefore, an optimization technique (operational optimization) based on discrete numerical computation on a computer is used. A representative method is the Lloyd-Max quantization method (see Non-Patent Document 1). This is a process of repeating the calculation of the quantized representative value and the calculation of the quantized bin boundary up to a certain convergence condition.

S. P. Lloyd,“Least Squares Quantization in PCM ”, IEEE Trans. on Information Theory, Vol. IT-28, No.2, pp.129-136, Mar. 1982S. P. Lloyd, “Least Squares Quantization in PCM”, IEEE Trans. On Information Theory, Vol. IT-28, No.2, pp.129-136, Mar. 1982

しかし,Lloyd−Max量子化法は,最適解を得られることが必ずしも保証されていないという問題が指摘されている。これは,Lloyd−Max量子化法が,最適量子化の必要条件のみを考慮して設計された手法であることに起因する。このため,繰り返し処理において用いる初期データに依存して,局所解に陥る可能性を含んでいる。   However, it has been pointed out that the Lloyd-Max quantization method is not necessarily guaranteed to obtain an optimal solution. This is due to the fact that the Lloyd-Max quantization method is a method designed in consideration of only the necessary conditions for optimal quantization. For this reason, there is a possibility of falling into a local solution depending on the initial data used in the iterative processing.

本発明はかかる事情に鑑みてなされたものであって,符号量に関する一定の制約条件が課せられた場合に量子化により発生する近似誤差を最小化する量子化方法を確立することを目的とする。   The present invention has been made in view of such circumstances, and an object of the present invention is to establish a quantization method for minimizing an approximation error caused by quantization when a certain constraint on the amount of code is imposed. .

本発明の適応量子化方法は,上記課題を解決するため,入力信号のヒストグラムに対して,別途,与えられたクラス数で,同ヒストグラムを近似する際に,クラス境界の全候補に対して,近似誤差と符号量の加重和を最小化する量子化値,および,そのときの前記加重和の最小値をメモリに格納し,次のクラスでのクラス境界を選択する際,上記格納した最小値をメモリから呼び出し,その時点でのクラス境界選択における加重和の計算に用いることで,クラス境界の全候補に対して加重和を最小化するクラス境界を選択する。これにより,符号量に関する一定の制約条件の下,量子化により発生する近似誤差を最小化する量子化代表値およびクラス境界(量子化境界)を求めることを特徴とする。   In order to solve the above-described problem, the adaptive quantization method of the present invention separates all of the class boundary candidates when approximating the histogram with a given number of classes separately from the histogram of the input signal. The quantized value that minimizes the weighted sum of the approximation error and the code amount, and the minimum value of the weighted sum at that time are stored in the memory, and when the class boundary in the next class is selected, the stored minimum value Is used to calculate the weighted sum in the class boundary selection at that time, thereby selecting a class boundary that minimizes the weighted sum for all candidate class boundaries. This is characterized in that a quantized representative value and a class boundary (quantized boundary) that minimize an approximation error caused by quantization are obtained under a certain constraint on the code amount.

以上により,符号量に関する一定の制約条件が課せられた場合において,量子化により発生する近似誤差の最小化を実現することができる。   As described above, it is possible to minimize the approximation error caused by the quantization when a certain constraint on the code amount is imposed.

また,本発明の適応量子化方法は,入力信号のヒストグラムに対して,別途,与えられたクラス数で,同ヒストグラムを近似する際に,クラス境界の全候補に対して,視覚感度に基づき重み付けされた近似誤差(視覚的近似誤差)と符号量の加重和を最小化する量子化値,および,そのときの前記加重和の最小値をメモリに格納し,次のクラスでのクラス境界を選択する際,上記格納した最小値をメモリから呼び出し,その時点でのクラス境界選択における加重和の計算に用いることで,クラス境界の全候補に対して加重和を最小化するクラス境界を選択する。これにより,符号量に関する一定の制約条件の下,量子化により発生する視覚的近似誤差を最小化する量子化代表値およびクラス境界(量子化境界)を求めることを特徴とする。   Also, the adaptive quantization method of the present invention weights all candidate class boundaries based on visual sensitivity when approximating the histogram with a given number of classes separately from the histogram of the input signal. The quantization value that minimizes the weighted sum of the approximated error (visual approximation error) and the code amount, and the minimum value of the weighted sum at that time are stored in memory, and the class boundary in the next class is selected In this case, the class boundary that minimizes the weighted sum is selected for all the class boundary candidates by calling the stored minimum value from the memory and using it for the calculation of the weighted sum in the class boundary selection at that time. This is characterized in that a quantized representative value and a class boundary (quantized boundary) that minimize a visual approximation error caused by quantization are obtained under a certain constraint on the code amount.

以上により,符号量に関する一定の制約条件が課せられた場合において,量子化により発生する視覚的な近似誤差の最小化を実現することができる。   As described above, the visual approximation error generated by the quantization can be minimized when a certain constraint on the code amount is imposed.

また,本発明の適応量子化方法は,別途,クラス数の候補が与えられた状態で,入力信号のヒストグラムに対して,同ヒストグラムを近似する際に,クラス数の各候補値に対して,適切に設定された近似誤差と情報量の加重係数を用いて,前述した方法により量子化代表値・クラス境界を求め,その量子化代表値・クラス境界を用いた場合の近似誤差を算出し,クラス数の各候補値を用いた場合の近似誤差の中から最小値を求め,その最小値を実現する量子化代表値・クラス境界,および,その時のクラス数を同定することを特徴とする。   In addition, the adaptive quantization method of the present invention separately provides a class number candidate when each of the class number candidate values is approximated to the histogram of the input signal in a state where the class number candidates are given. Using an approximation error and a weighting factor for the amount of information set appropriately, the quantized representative value / class boundary is obtained by the above-described method, and the approximate error when the quantized representative value / class boundary is used is calculated. It is characterized in that the minimum value is obtained from the approximation error when each candidate value of the number of classes is used, and the quantized representative value / class boundary that realizes the minimum value and the number of classes at that time are identified.

以上により,符号量に関する一定の制約条件が課せられた場合において,最適なクラス数を選択し,量子化により発生する近似誤差の最小化を実現することができる。   As described above, when a certain constraint on the amount of code is imposed, it is possible to select the optimum number of classes and minimize the approximation error generated by quantization.

さらに,クラス数Mの最適化において,クラス数をMとして近似誤差と符号量の加重係数を変化させた場合の発生符号量の上限値と下限値とから最適化の対象となるクラス数Mの上限値と下限値とを算出し,クラス数Mの上限値と下限値との範囲に限定して,クラス数の候補値に対する量子化代表値およびクラス境界を求める処理を行うことにより,演算量の削減が可能になる。   Further, in the optimization of the number of classes M, the number of classes M to be optimized is determined from the upper limit value and the lower limit value of the generated code amount when the number of classes is M and the weighting coefficient of the approximation error and the code amount is changed. By calculating the upper limit value and the lower limit value and limiting the range between the upper limit value and the lower limit value of the number of classes M, and obtaining the quantized representative value and class boundary for the candidate number of classes, the amount of computation Can be reduced.

また,前記クラス数の各候補値に対する量子化代表値およびクラス境界を求める処理において,クラス数M−1として量子化代表値およびクラス境界を求めた結果を記憶し,クラス数Mの量子化代表値およびクラス境界を求める処理に利用することにより,クラス数M−1とクラス数Mとで重複する演算を省略することにより,演算量を削減することができる。   Further, in the process of obtaining the quantization representative value and the class boundary for each candidate value of the class number, the result of obtaining the quantization representative value and the class boundary is stored as the class number M−1, and the quantization representative of the class number M is stored. By using the value and the class boundary for the processing, the calculation amount can be reduced by omitting the overlapping calculation between the class number M-1 and the class number M.

本発明により,入力信号の分布に依存することなく,与えられた符号量の制約条件のもとにおいて近似誤差を最小化することが可能となり,量子化を伴う非可逆符号化において,符号化効率を向上させることが可能となる。また,画像信号の階調変換を行う際に発生する変換誤差を最小化することも可能となるため,ビット深度変換を用いた画像符号化器における符号化効率の向上も可能となる。   According to the present invention, it is possible to minimize the approximation error under a given code amount constraint without depending on the distribution of the input signal, and in the lossy coding with quantization, the coding efficiency can be reduced. Can be improved. In addition, since it is possible to minimize a conversion error that occurs when tone conversion of an image signal is performed, it is possible to improve encoding efficiency in an image encoder using bit depth conversion.

本発明の一実施形態に係る装置構成例を示す図である。It is a figure which shows the apparatus structural example which concerns on one Embodiment of this invention. 本発明の一実施形態に係る適応量子化処理のフローチャートである。It is a flowchart of the adaptive quantization process which concerns on one Embodiment of this invention. 本発明の一実施形態に係る適応量子化処理のフローチャートである。It is a flowchart of the adaptive quantization process which concerns on one Embodiment of this invention.

以下,本発明の実施の形態について,図面を用いて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

[適応量子化装置の構成例]
図1は,本発明の一実施形態に係る装置構成例を示す図である。
[Configuration example of adaptive quantizer]
FIG. 1 is a diagram illustrating an apparatus configuration example according to an embodiment of the present invention.

適応量子化装置10は,レベル数(クラス数ともいう)Kの入力信号を入力し,レベル数M(M<K)に適応的に量子化して,量子化結果の値を出力する装置である。適応量子化装置10は,入力信号のレベル数Kを記憶する入力信号レベル数記憶部11,量子化後のレベル数Mを記憶する量子化後レベル数記憶部12,与えられた未定乗数λを記憶する未定乗数記憶部13を備える。   The adaptive quantization apparatus 10 is an apparatus that inputs an input signal of K levels (also referred to as class numbers), adaptively quantizes the number of levels M (M <K), and outputs a quantization result value. . The adaptive quantization apparatus 10 includes an input signal level number storage unit 11 that stores the level number K of the input signal, a post-quantization level number storage unit 12 that stores a level number M after quantization, and a given undetermined multiplier λ. An undetermined multiplier storage unit 13 is provided.

ヒストグラム生成部14は,入力信号における画素値kの頻度をh[k](k=0,…,K−1)として格納する。近似誤差算出部15は,入力信号のヒストグラムh[k]に対して,量子化後レベル数記憶部12に格納されているレベル数M(クラス数)で,同ヒストグラムを近似するにあたって,ヒストグラムの全区間[0,K]をM個の区間に分割し,各区間を重心(代表値)で近似した場合の近似誤差を,区間幅を変えた各区間の候補について算出する。また,情報量算出部16は,ヒストグラムの全区間[0,K]をM個の区間に分割し,各区間を重心(代表値)で近似した場合の量子化結果の情報量(符号量)を算出する。   The histogram generator 14 stores the frequency of the pixel value k in the input signal as h [k] (k = 0,..., K−1). The approximation error calculator 15 approximates the histogram with the number of levels M (number of classes) stored in the quantized level number storage unit 12 with respect to the histogram h [k] of the input signal. An entire section [0, K] is divided into M sections, and an approximation error when each section is approximated by a centroid (representative value) is calculated for each section candidate with the section width changed. Further, the information amount calculation unit 16 divides the entire section [0, K] of the histogram into M sections, and the information amount (code amount) of the quantization result when each section is approximated by the center of gravity (representative value). Is calculated.

RDコスト算出部17は,近似誤差算出部15が算出した近似誤差と,情報量算出部16が算出した符号量と,未定乗数記憶部13に記憶されている未定乗数λとから,近似誤差と符号量との加重和(RDコスト)を算出し,先頭の区間から第i番目の区間までの区間の候補の中で,RDコストが最小値となるものをRDコスト最小値記憶部18に記憶する。このとき,第i番目までの区間のRDコストの最小値の算出では,第i−1番目までの区間のRDコストの最小値を利用する。また,RDコスト算出部17は,区間上端最適値記憶部19にRDコストが最小となる区間の上端(クラス境界)の値を記憶する。   The RD cost calculation unit 17 calculates an approximation error from the approximation error calculated by the approximation error calculation unit 15, the code amount calculated by the information amount calculation unit 16, and the undetermined multiplier λ stored in the undetermined multiplier storage unit 13. A weighted sum (RD cost) with the code amount is calculated, and a candidate having a minimum RD cost among the candidates from the first section to the i-th section is stored in the RD cost minimum value storage unit 18. To do. At this time, in the calculation of the minimum value of the RD cost of the i-th section, the minimum value of the RD cost of the i-1th section is used. Further, the RD cost calculation unit 17 stores the value of the upper end (class boundary) of the section in which the RD cost is minimum in the section upper end optimum value storage unit 19.

区間上端最適値追跡部20は,区間上端最適値記憶部19に記憶された区間の上端の値から,クラス境界の全候補に対してRDコストを最小化するクラス境界を選択する。量子化処理部21は,区間上端最適値追跡部20が選択したクラス境界をもとに,入力信号を量子化レベル数Mで量子化し,量子化結果の量子化値を出力する。   The section upper end optimum value tracking unit 20 selects a class boundary that minimizes the RD cost for all class boundary candidates from the upper end value of the section stored in the section upper end optimum value storage unit 19. The quantization processing unit 21 quantizes the input signal with the quantization level number M based on the class boundary selected by the section upper end optimum value tracking unit 20 and outputs a quantization value of the quantization result.

[適応量子化処理の流れ(基本処理)]
図2および図3は,本発明の一実施形態に係る適応量子化処理のフローチャートである。
[Flow of adaptive quantization processing (basic processing)]
2 and 3 are flowcharts of adaptive quantization processing according to an embodiment of the present invention.

まず,適応量子化装置10は,量子化後のクラス数Mを入力し,量子化後レベル数記憶部12に記憶し,また,未定乗数λを未定乗数記憶部13に記憶する。ヒストグラム生成部14は,入力信号レベル数記憶部11に記憶されているクラス数Kに従って,入力信号のヒストグラムh[k](k=0,…,K−1)を算出する(ステップS10)。RDコスト算出部17は,RDコスト最小値記憶部18の近似誤差と符号量の加重和(RDコスト)の最小値を0に初期化する(ステップS11)。   First, the adaptive quantization apparatus 10 inputs the class number M after quantization, stores it in the quantized level number storage unit 12, and stores the undetermined multiplier λ in the undetermined multiplier storage unit 13. The histogram generation unit 14 calculates a histogram h [k] (k = 0,..., K−1) of the input signal according to the class number K stored in the input signal level number storage unit 11 (step S10). The RD cost calculation unit 17 initializes the minimum value of the weighted sum (RD cost) of the approximation error and the code amount in the RD cost minimum value storage unit 18 to 0 (step S11).

その後,量子化後のレベルmについて,m=1からm=M−1まで,mの値を1ずつ増やしながら,近似誤差算出部15,情報量算出部16およびRDコスト算出部17により,ステップS24までの処理を繰り返す(ステップS12)。この処理のループでは,さらに量子化レベルmを表す区間の上端Lm の各候補に対して,Lm =mからLm =K−(M−m)まで,Lm を1ずつ増やしながら,ステップS23までの処理を繰り返す(ステップS13)。なお,L0 は予め0に初期化しておく。 Thereafter, with respect to the level m after quantization, while the value of m is increased by 1 from m = 1 to m = M−1, the approximation error calculation unit 15, the information amount calculation unit 16, and the RD cost calculation unit 17 perform steps. The processing up to S24 is repeated (step S12). In the loop of this process, further to each candidate of the upper end L m of the section representing the quantization level m, from L m = m L m = K-up (M-m), while increasing the L m by one, The processing up to step S23 is repeated (step S13). Note that L 0 is initialized to 0 in advance.

また,さらに量子化レベルmを表す区間の区間幅Δm の各候補に対して,Δm =1からΔm =Lm −(m−1)まで,Δm を1ずつ増やしながら,ステップS20までの処理を繰り返す(ステップS14)。 Also, further for each candidate interval length delta m sections representing the quantization level m, the Δ m = 1 Δ m = L m - to (m-1), while increasing the delta m by 1, step S20 The processes up to are repeated (step S14).

近似誤差算出部15は,ヒストグラムの区間[Lm −(Δm −1),Lm ]の代表値を算出し(ステップS15),そのヒストグラムの区間を代表値で近似した場合の近似誤差を算出する(ステップS16)。一方,情報量算出部16は,そのヒストグラムの区間を代表値で近似した場合に発生する符号量を算出する(ステップS17)。 The approximation error calculation unit 15 calculates a representative value of the histogram section [L m − (Δ m −1), L m ] (step S15), and calculates an approximation error when the histogram section is approximated by the representative value. Calculate (step S16). On the other hand, the information amount calculation unit 16 calculates the amount of code generated when the section of the histogram is approximated with a representative value (step S17).

RDコスト算出部17は,近似誤差算出部15が算出した近似誤差と,情報量算出部16が算出した符号量と,未定乗数記憶部13に記憶されている未定乗数とから,ヒストグラムの区間[Lm −(Δm −1),Lm ]を代表値で近似した場合の近似誤差と符号量との加重和(RDコスト)を算出する(ステップS18)。続いて,RDコスト算出部17は,一つ前の区間までに算出されたRDコスト最小値記憶部18に記憶されているRDコストの最小値と,ステップS18で算出した現在の区間のRDコストの和を算出して記憶する(ステップS19)。次にステップ14に戻り,区間幅Δm の最終の候補の処理が終えるまで,ステップS14〜S20の処理を繰り返す。 The RD cost calculation unit 17 calculates the interval of the histogram from the approximation error calculated by the approximation error calculation unit 15, the code amount calculated by the information amount calculation unit 16, and the undetermined multiplier stored in the undetermined multiplier storage unit 13. A weighted sum (RD cost) of an approximation error and a code amount when L m − (Δ m −1), L m ] is approximated by a representative value is calculated (step S18). Subsequently, the RD cost calculation unit 17 determines the minimum value of the RD cost stored in the RD cost minimum value storage unit 18 calculated up to the previous section, and the RD cost of the current section calculated in step S18. Is calculated and stored (step S19). Returning now to step 14, until after the processing of the last of the candidate interval length delta m, it repeats the processing of steps S14~S20.

区間幅Δm の全候補について処理したならば,区間幅Δm の候補の中で,現在の区間までのRDコストが最小となる値をRDコスト最小値記憶部18に記憶する(ステップS21)。また,区間の上端Lm に対してRDコストを最小化する区間情報(区間幅Δm ,区間の上端Lm など)を区間上端最適値記憶部19に記憶する(ステップS22)。 Once processed for all the candidate interval length delta m, in the candidate interval length delta m, stores a value RD cost to the current interval is minimum RD cost minimum value storage section 18 (step S21) . Further, section information for minimizing the RD cost with respect to the upper end L m of the section (section width Δ m , upper end L m of the section, etc.) is stored in the section upper end optimum value storage unit 19 (step S22).

以上の処理を上端Lm のすべての候補に対して行い(ステップS23),また,全レベルm(m=M−1まで)について繰り返す(ステップS24)。以上の処理が終了したならば,区間上端最適値追跡部20は,全体の近似誤差を最小化する区間情報(クラス境界)を区間上端最適値記憶部19から選出し,選出したクラス境界の情報を量子化処理部21に出力する(ステップS25)。 The above processing is performed for all candidates at the upper end L m (step S23), and is repeated for all levels m (up to m = M−1) (step S24). When the above processing is completed, the section upper end optimum value tracking unit 20 selects section information (class boundary) that minimizes the overall approximation error from the section upper end optimum value storage unit 19, and selects the selected class boundary information. Is output to the quantization processing unit 21 (step S25).

量子化処理部21は,区間上端最適値追跡部20が出力したクラス境界に従って,入力信号を量子化することにより,近似誤差(変換誤差)と符号量の加重和が最小となる量子化値を出力することができる。   The quantization processing unit 21 quantizes the input signal according to the class boundary output by the section upper end optimum value tracking unit 20, thereby obtaining a quantized value that minimizes the weighted sum of the approximation error (conversion error) and the code amount. Can be output.

以上の処理において,視覚感度特性を考慮した重み付き歪み量の最小化を図る実施例も好適である。視覚感度特性を考慮した重み付き歪み量の最小化を図る場合,ステップS16における近似誤差の算出では,視覚感度に基づき重み付けされた近似誤差を計算する。例えば,画素値k(k=0,…,K−1)に対して,輝度差に対する視覚特性に基づく重み係数w[k]を設定し,画素値kに対する頻度h[k]に重み係数w[k]を乗算した値を用いて,近似誤差(視覚的近似誤差)を算出する。   In the above processing, an embodiment that minimizes the weighted distortion amount considering the visual sensitivity characteristic is also suitable. When minimizing the weighted distortion amount in consideration of the visual sensitivity characteristics, the approximation error weighted based on the visual sensitivity is calculated in the calculation of the approximation error in step S16. For example, for the pixel value k (k = 0,..., K−1), a weighting factor w [k] based on the visual characteristic for the luminance difference is set, and the weighting factor w is set to the frequency h [k] for the pixel value k. An approximation error (visual approximation error) is calculated using a value obtained by multiplying [k].

また,区間幅Δm の範囲を制限した準最適化法を適用する場合には,ステップS14において,各Δm を変化させる場合に,予め設定された最大値Aの範囲内で,すなわち,1≦Δm ≦Aの範囲内で各Δm に対する近似誤差の最小値を計算することにより本発明を実施することもできる。 Further, in the case of applying a quasi-optimization method that limits the scope of the section width delta m at step S14, in the case of changing the respective delta m, within a range of a preset maximum value A, i.e., 1 It is also possible to implement the present invention by calculating the minimum value of the approximation error for each Δ m within the range of ≦ Δ m ≦ A.

図1の例では,量子化レベル数(クラス数)Mが予め定められているとしたが,このクラス数を可変として,本発明による適応量子化を行うこともできる。この場合,別途与えられたクラス数の各候補値に対して,適切に設定された近似誤差と情報量の加重係数を用いて,図2および図3で説明した処理により,量子化代表値・クラス境界を求め,その量子化代表値およびクラス境界を用いた場合の近似誤差を算出し,クラス数の各候補値を用いた場合の近似誤差の中から最小値を求め,その最小値を実現する量子化代表値・クラス境界,および,その時のクラス数を同定する。   In the example of FIG. 1, the number of quantization levels (number of classes) M is determined in advance, but adaptive quantization according to the present invention can also be performed with the number of classes variable. In this case, for each candidate value of the class number given separately, the quantization representative value and the weighting coefficient of the appropriately set approximation error and the information amount are processed by the processing described in FIGS. Find the class boundary, calculate the approximation error when using the quantized representative value and the class boundary, determine the minimum value from the approximation error when using each candidate number of classes, and realize the minimum value Quantization representative value / class boundary to be identified and the number of classes at that time are identified.

さらに詳しく,本発明の実施の形態について説明する。   The embodiment of the present invention will be described in more detail.

[基本解法]
画素値kの頻度をh[k](k=0,…,K−1)として格納する。例えば,8ビットの輝度信号の場合,kの取り得る範囲は0から255の値となる。このK階調の信号をM階調(M<K)に量子化する場合を考える。
[Basic solution]
The frequency of the pixel value k is stored as h [k] (k = 0,..., K−1). For example, in the case of an 8-bit luminance signal, the possible range of k is a value from 0 to 255. Consider a case where the signal of K gradation is quantized to M gradation (M <K).

ヒストグラムの量子化を表現するパラメータとして,次の2種類(Δm とLm )を導入する。Δm はヒストグラムの第m区間の区間幅を表す。さらに,Lm はヒストグラムにおける第m区間の上端であり,次式で定義されるものとする。 The following two types (Δ m and L m ) are introduced as parameters expressing histogram quantization. Δ m represents the section width of the m-th section of the histogram. Further, L m is the upper end of the m-th section in the histogram, and is defined by the following equation.

Figure 2012060210
Figure 2012060210

なお,量子化後の各階調が,少なくとも1つ以上,量子化前の階調を含む必要があることから,Lm (0≦m≦M−2)は以下の範囲に制限される。 In addition, since each gradation after quantization needs to include at least one gradation before quantization, L m (0 ≦ m ≦ M−2) is limited to the following range.

m≦Lm ≦K−(M−m)
以下,ヒストグラムの区間[Lm −(Δm −1),Lm ]を第m量子化ビンと呼ぶ。
m ≦ L m ≦ K− (M−m)
Hereinafter, the section [L m − (Δ m −1), L m ] of the histogram is referred to as the m-th quantization bin.

量子化においては,歪み量と符号量の2種類を考慮する必要がある。まず,歪み量としては,ヒストグラムの区間[Lm −(Δm −1),Lm ]を代表値c(Lm −(Δm −1),Lm )で近似した場合の近似誤差として,次式で表されるe(Lm −(Δm −1),Lm )を用いる。 In quantization, it is necessary to consider two types of distortion and code. First, as an amount of distortion, as an approximation error when a histogram section [L m − (Δ m −1), L m ] is approximated by a representative value c (L m − (Δ m −1), L m ). , E (L m − (Δ m −1), L m ) expressed by the following equation is used.

Figure 2012060210
Figure 2012060210

c(Lm −(Δm −1),Lm )は,ヒストグラムの区間[Lm −(Δm −1),Lm ]における重心位置を表し,次式で定まる。 c (L m − (Δ m −1), L m ) represents the position of the center of gravity in the histogram section [L m − (Δ m −1), L m ], and is determined by the following equation.

Figure 2012060210
Figure 2012060210

次に,符号量としては,ヒストグラムの区間[Lm −(Δm −1),Lm ]を代表値c(Lm −(Δm −1),Lm )で近似した場合の代表値を表現するために必要な情報量として,次式で表されるl(Lm −(Δm −1),Lm )を用いる。 Next, as a code amount, a representative value when the histogram section [L m − (Δ m −1), L m ] is approximated by a representative value c (L m − (Δ m −1), L m ). As the amount of information necessary to express, l (L m − (Δ m −1), L m ) expressed by the following equation is used.

Figure 2012060210
Figure 2012060210

ここで,p(Lm , Δm )は,ヒストグラムの区間[Lm −(Δm −1),Lm ]における頻度が全頻度に占める割合であり,次式で定義される。 Here, p (L m , Δ m ) is the ratio of the frequency in the histogram interval [L m − (Δ m −1), L m ] to the total frequency, and is defined by the following equation.

Figure 2012060210
Figure 2012060210

ここで必要なことは,量子化の符号量が一定の閾値以下という条件下で歪み量を最小化することである。つまり,求めるべきパラメータ(Δ0 ,…,ΔM-1 )は, What is required here is to minimize the amount of distortion under the condition that the amount of code for quantization is below a certain threshold. In other words, the parameters to be obtained (Δ 0 , ..., Δ M-1 ) are

Figure 2012060210
Figure 2012060210

上式を満たす条件下において,次式を最小化するものである。   Under the condition that satisfies the above equation, the following equation is minimized.

Figure 2012060210
Figure 2012060210

こうした制約条件付き最小化問題は,ラグランジュの未定乗数法により,未定乗数λを導入することで,制約条件のない最小化問題に変形できる。つまり,求めるべきパラメータは,次式を満たすM個のパラメータとなる。   Such a constrained minimization problem can be transformed into a constrained minimization problem by introducing an undetermined multiplier λ by Lagrange's undetermined multiplier method. That is, the parameters to be obtained are M parameters that satisfy the following expression.

Figure 2012060210
Figure 2012060210

ここで,ψ(Lm −(Δm −1),Lm , λ)は,次式で定義される評価尺度(RDコストと呼ぶ)である。 Here, ψ (L m − (Δ m −1), L m , λ) is an evaluation scale (referred to as RD cost) defined by the following equation.

ψ(Lm −(Δm −1),Lm , λ)
=e(Lm −(Δm −1),Lm )+λ・l(Lm −(Δm −1),Lm ) (8)
M個のパラメータ(Δ0 ,…,ΔM-1 )の取り得る組み合わせは,Mとともに指数関数的に増加するため,この中から最適な組み合わせ(Δ0 * ,…,ΔM-1 * )を総当りで探索するのは,計算量的に困難である。
ψ (L m − (Δ m −1), L m , λ)
= E (L m - (Δ m -1), L m) + λ · l (L m - (Δ m -1), L m) (8)
M number of parameters (Δ 0, ..., Δ M -1) possible combinations of, for increases exponentially with M, optimal combination from among the (Δ 0 *, ..., Δ M-1 *) It is difficult to search for brute force in terms of computational complexity.

そこで,第m量子化ビンのRDコストψ(Lm −(Δm −1),Lm , λ)が同ビンの上端Lm と同ビンの区間幅Δm に依存することに着目し,以下のように最適解を算出する。まず,ヒストグラムの区間[0, Lm ]をm+1分割した際のRDコストの総和
Σi=0 m ψ(Li −(Δi −1),Li ,λ)
の最小値をSm (Lm )として定義する。つまり,最適なΔm ,…, Δ0 を用いた場合のΣi=0 m ψ(Li −(Δi −1),Li ,λ)に対する最小値である。
Therefore, paying attention to the RD cost ψ (L m − (Δ m −1), L m , λ) of the m-th quantization bin depends on the upper end L m of the bin and the section width Δ m of the bin, The optimal solution is calculated as follows. First, the sum of the RD costs when the histogram section [0, L m ] is divided into m + 1, Σ i = 0 m ψ (L i − (Δ i −1), L i , λ)
Is defined as S m (L m ). That is, the optimum delta m, ..., sigma in the case of using the Δ 0 i = 0 m ψ - is the minimum value for the (L i (Δ i -1) , L i, λ).

ここで,ψ(Lm −(Δm −1),Lm , λ)が第m量子化ビンの上端Lm と同ビンの区間幅Δm に依存することに着目すると,Sm (Lm )はSm-1 (Lm −Δm )を用いて,次式のように表わされる。 Here, paying attention to that ψ (L m − (Δ m −1), L m , λ) depends on the upper end L m of the m-th quantization bin and the section width Δ m of the bin, S m (L m ) is expressed as follows using S m−1 (L m −Δ m ).

Figure 2012060210
Figure 2012060210

なお,m=0,…,M−1である。また,Lm =m,…,K−(M−m)である。 Note that m = 0,..., M-1. Further, L m = m,..., K− (M−m).

Δm の取り得る範囲について考察する。Lm-1 =Lm −Δm であることから,Lm −Δm の範囲は,m−1≦Lm −Δm ≦K−(M−m+1)となる。このため,Δm の範囲 は,与えられたLm を用いて次式のように表される。 Consider possible range of delta m. Since L m−1 = L m −Δ m , the range of L m −Δ m is m−1 ≦ L m −Δ m ≦ K− (M−m + 1). For this reason, the range of Δ m is expressed as follows using the given L m .

m −K+(M−m+1)≦Δm ≦Lm −m+1 (10)
さらに,Δm ≧1であることを考慮すると,次式を得る。
L m −K + (M−m + 1) ≦ Δ m ≦ L m −m + 1 (10)
Further, considering that Δ m ≧ 1, the following equation is obtained.

1≦Δm ≦Lm −m+1 (11)
次式のように,Δm の最大値をAに制限することで,演算量の削減を図るアプローチも採ることができる。ただし,この場合,解の最適性は保証されない。
1 ≦ Δ m ≦ L m −m + 1 (11)
As in the following equation, the maximum value of delta m by limiting the A, can also take approach to reduce the amount of calculation. However, in this case, the optimality of the solution is not guaranteed.

1≦Δm ≦A (12)
ここで,算出したSm (Lm )を格納しておき,Sm+1 (Lm+1 )の計算で用いるものとする。さらに,式(9) の最小値を与えるLm-1 を^Lm-1 (Lm )とおく(なお,^はLの上に付く記号。他も同様)。この^Lm-1 (Lm )(m≦Lm ≦K−(M−m))も,全て格納しておくものとする。
1 ≦ Δ m ≦ A (12)
Here, the calculated S m (L m ) is stored and used in the calculation of S m + 1 (L m + 1 ). Furthermore, L m-1 giving the minimum value of the equation (9) is set as ^ L m-1 (L m ) (where ^ is a symbol on L. The same applies to others). This ^ L m-1 (L m ) (m ≦ L m ≦ K− (M−m)) is all stored.

m-1 (Lm-1 )(Lm-1 =m−1,…,K−M+m−1)は,同様の漸化式を用いて算出可能であり,その算出値は,Sm (Lm )の計算に用いられる。漸化式(9) を用いることで,Sm (Lm )の計算は,Δm =1,…,Lm −m+1からの最適なパラメータ選択問題に帰着させられる。式(9) の右辺を最小化するΔm の値を^Δm (Lm )として,各Lm (=m,…,K−M+m)に対して,^Lm-1 (Lm )=Lm −^Δm (Lm )をメモリに格納しておくものとする。 S m−1 (L m−1 ) (L m−1 = m−1,..., K−M + m−1) can be calculated using the same recurrence formula, and the calculated value is S m Used to calculate (L m ). By using the recurrence formula (9), the calculation of S m (L m ) is reduced to an optimal parameter selection problem from Δ m = 1,..., L m −m + 1. Let Δ m (L m ) be the value of Δ m that minimizes the right side of equation (9), and for each L m (= m,..., K−M + m), L m−1 (L m ) = L m − ^ Δ m (L m ) is stored in the memory.

式(6) の最小化問題は,次式のように表される。   The minimization problem in Eq. (6) is expressed as

Figure 2012060210
Figure 2012060210

式(9) および式(1) におけるLM-1 =K−1を用いて,式(6) の最小化問題は,(K−M)×(1+K−M)×(M−1)/2個の候補の中から最適解(Δ0 * ,…,ΔM-1 * )を求める最適化問題に帰着される。このように,本方式による方法は,多項式時間での最適解の求解を可能とする。式(13)の
M-2 (LM-1 −ΔM-1 )+ψ(LM-1 −(ΔM-1 −1),LM-1 ,λ)
の最小値を求めた後,最適解(Δ0 * ,…,ΔM-1 * )は,バックトラック過程を通して,求めることができる。次式に示す通り,式(13)の最小化問題の解をΔM-1 * とおく。
Using L M-1 = K-1 in Equation (9) and Equation (1), the minimization problem in Equation (6) is (K−M) × (1 + K−M) × (M−1) / This results in an optimization problem for obtaining an optimal solution (Δ 0 * ,..., Δ M-1 * ) from the two candidates. In this way, the method according to the present method makes it possible to find the optimal solution in polynomial time. S M−2 (L M−1 −Δ M−1 ) + ψ (L M−1 − (Δ M−1 −1), L M−1 , λ) of the equation (13)
After obtaining the minimum value of, the optimal solution (Δ 0 * , ..., Δ M-1 * ) can be obtained through the backtracking process. As shown in the following equation, let the solution of the minimization problem of Equation (13) be Δ M-1 * .

Figure 2012060210
Figure 2012060210

このΔM-1 * を用いて,第M−2ビンの上端の最適値は,
M-2 * =LM-1 −ΔM-1 * =K−1−ΔM-1 *
と求まる。第M−3ビンの上端の最適値は,LM-2 * に対する最適解として,^LM-3 (LM-2 * )として格納されているので,該当する値を参照し,LM-3 * =^LM-3 (LM-2 * )とする。この結果,第M−2ビンの区間幅は,ΔM-2 * =LM-2 * −LM-3 * と求まる。以下,同様の参照処理を
M-4 * =^LM-4 (LM-3 * ),…,L1 * =^L1 (L2 *
として繰り返し,得られた各ビンの上端値を用いて,
ΔM-3 * =LM-3 * −LM-4 * ,…,Δ1 * =L1 * −L0 * ,Δ0 * =L0 * +1
として求める。
Using this Δ M-1 * , the optimum value of the upper end of the M-2th bin is
L M−2 * = L M−1 −Δ M−1 * = K−1−Δ M−1 *
It is obtained. Optimal value of the upper end of the M-3 bins, as the optimal solution for L M-2 *, ^ L M-3 so (L M-2 *) are stored as, with reference to the appropriate value, L M -3 * = ^ L M-3 (L M-2 * ). As a result, the section width of the (M−2) -th bin is obtained as Δ M−2 * = L M−2 * −L M−3 * . Hereinafter, the same reference processing is performed as follows: L M-4 * = ^ L M-4 (L M-3 * ),..., L 1 * = ^ L 1 (L 2 * )
And using the obtained top value for each bin,
Δ M-3 * = L M-3 * −L M-4 * ,..., Δ 1 * = L 1 * −L 0 * , Δ 0 * = L 0 * + 1
Asking.

[適応量子化アルゴリズム(基本形)]
以上の適応量子化の基本的な処理手順は,以下のとおりである。
1.入力信号のヒストグラム(クラス数K)を生成する。
2.量子化後のクラス数Mを読み込む。
3.S0 (i)←0(i=0,…,K−M)とする。
4.for m=0,…,M−1 (処理4〜12のループ)
5. for LM =m,…,K−(M−m) (処理5〜12のループ)
6. ただし,m=M−1の場合には,Lm =K−1に限定
7. for Δm =1,…,Lm −(m−1) (処理7〜10のループ)
8. ただし,m=0の場合には,Δm =Lm +1に限定
9. ヒストグラムの区間[Lm −(Δm −1),Lm ]を代表値で近似した場合のRDコストを求める。RDコストは式(8) により求め,そのRDコストをψ(Lm −(Δm −1),Lm ,λ)に格納する。
10. Sm-1 (Lm −Δm )+ψ(Lm −(Δm −1),Lm , λ)の値を計算する。
11. Sm-1 (Lm −Δm )+ψ(Lm −(Δm −1),Lm , λ)(Δm =1,…,Lm −(m−1))の中での最小値をSm (Lm )に格納する。
12. Sm-1 (Lm −Δm )+ψ(Lm −(Δm −1),Lm , λ)(Δm =1,…,Lm −(m−1))を最小化するΔm を用いて,Lm −Δm を^Lm-1 (Lm )に格納する。
13.LM-1 * ←K−1
14.for m=M−1,…,1 (処理14〜16のループ)
15. ^Lm-1 (Lm * )を読み込み,Lm-1 * ←^Lm-1 (Lm * )とする。
16. Δm * ←Lm * −Lm-1 *
17.Δ0 * ←L0 * +1
以上により,区間幅Δm * (m=0,…,M−1)が定まり,クラス境界(量子化境界)が決定される。
[Adaptive quantization algorithm (basic form)]
The basic processing procedure of the above adaptive quantization is as follows.
1. A histogram (number of classes K) of the input signal is generated.
2. Read the number of classes M after quantization.
3. S 0 (i) ← 0 (i = 0,..., KM).
4). for m = 0,..., M-1 (loop of processing 4 to 12)
5. for L M = m,..., K− (M−m) (loop of processing 5 to 12)
6). However, when m = M−1, it is limited to L m = K−1 for Δ m = 1,..., L m − (m−1) (loop of processing 7 to 10)
8). However, when m = 0, it is limited to Δ m = L m +1. The RD cost is obtained when the histogram section [L m − (Δ m −1), L m ] is approximated by a representative value. The RD cost is obtained by Expression (8), and the RD cost is stored in ψ (L m − (Δ m −1), L m , λ).
10. S m-1 (L m -Δ m) + ψ (L m - (Δ m -1), L m, λ) to calculate the value of.
11. S m−1 (L m −Δ m ) + ψ (L m − (Δ m −1), L m , λ) (Δ m = 1,..., L m − (m−1)) Store the value in S m (L m ).
12 Δ that minimizes S m−1 (L m −Δ m ) + ψ (L m − (Δ m −1), L m , λ) (Δ m = 1,..., L m − (m−1)) Using m , L m −Δ m is stored in ^ L m−1 (L m ).
13. L M-1 * ← K-1
14 form = M−1,..., 1 (loop of processes 14 to 16)
15. ^ L m-1 (L m * ) is read and L m-1 * ← ^ L m-1 (L m * ) is set.
16. Δ m * ← L m * -L m-1 *
17. Δ 0 * ← L 0 * +1
As described above, the section width Δ m * (m = 0,..., M−1) is determined, and the class boundary (quantization boundary) is determined.

[未定乗数の設定法]
未定乗数λの設定法について説明する。2つの未定乗数λl ,λu を準備する。なお,この未定乗数は,以下の条件を満たすように設定されるものとする。量子化ビン数をMとし,未定乗数λu およびλl が与えられた場合,前述した適応量子化アルゴリズムにより生成されるパラメータの情報量和を各々,R(ΔM * (λu ),λu ),R(ΔM * (λl ),λl )とすると,次式を満たす。
[How to set the undetermined multiplier]
A method for setting the undetermined multiplier λ will be described. Two undetermined multipliers λ l and λ u are prepared. This undetermined multiplier is set so as to satisfy the following conditions. When the number of quantization bins is M and undetermined multipliers λ u and λ l are given, the information sums of parameters generated by the above-described adaptive quantization algorithm are respectively R (Δ M *u ), λ If u ) and R (Δ M *l ), λ l ), the following equation is satisfied.

R(ΔM * (λu ),λu )≦R0 ≦R(ΔM * (λl ),λl
未定乗数として,
λ=(λl +λu )/2 (15)
を設定し,同未定乗数を用いて上記[適応量子化アルゴリズム(基本形)]を実行する。そこで生成されるパラメータの情報量和R(ΔM * (λ),λ)を求める。
R (Δ M *u ), λ u ) ≦ R 0 ≦ R (Δ M *l ), λ l )
As an undetermined multiplier,
λ = (λ l + λ u ) / 2 (15)
And the above [adaptive quantization algorithm (basic form)] is executed using the undetermined multiplier. Therefore, an information amount sum R (Δ M * (λ), λ) of the generated parameters is obtained.

得られたR(ΔM * (λ),λ)の値に基づき,以下のような処理を行う。
(i)R0 −ε≦R(ΔM * (λ),λ)≦R0 の場合:
λを未定乗数として設定する。εは十分小さな正の数である。R(ΔM * (λ),λ)=R0 を評価したいのであるが,実数値の場合,等式の評価は計算精度の観点から難しいため,ここで用いるような不等式の評価を用いる。
(ii)R(ΔM * (λ),λ)>R0 の場合:
λl ←λとして,式(15)以降の処理を繰り返す。
Based on the obtained value of R (Δ M * (λ), λ), the following processing is performed.
(I) When R 0 −ε ≦ R (Δ M * (λ), λ) ≦ R 0 :
Set λ as an undetermined multiplier. ε is a sufficiently small positive number. I would like to evaluate R (Δ M * (λ), λ) = R 0 , but in the case of real values, it is difficult to evaluate an equation from the viewpoint of calculation accuracy, so the evaluation of inequality used here is used.
(Ii) When R (Δ M * (λ), λ)> R 0 :
Set λ l ← λ, and repeat the processing from equation (15).

(iii) R(ΔM * (λ),λ)<R0 −εの場合:
λu ←λとして,式(15)以降の処理を繰り返す。
(iii) When R (Δ M * (λ), λ) <R 0 −ε:
Set λ u ← λ, and repeat the processing from equation (15).

[未定乗数の設定アルゴリズム]
以上の未定乗数の設定アルゴリズムをまとめると,以下のようになる。
1.量子化ビン数Mを読み込む。
2.情報量の上限R0 を読み込む。
3.次式を満たす未定乗数λl , λu を準備する。
[Undecided multiplier setting algorithm]
The above algorithm for setting the undetermined multiplier is summarized as follows.
1. The quantization bin number M is read.
2. The upper limit R 0 of the information amount is read.
3. The undetermined multipliers λ l and λ u satisfying the following expressions are prepared.

R(ΔM * (λu ),λu )≦R0 ≦R(ΔM * (λl ),λl
4.未定乗数として,λ=(λl +λu )/2を設定する。
5.未定乗数λを用いて,上記[適応量子化アルゴリズム(基本形)]を実行する。
6.前の処理5で生成されるパラメータの情報量和R(ΔM * (λ),λ)を求める。
7.if R0 −ε≦R(ΔM * (λ),λ)≦R0 の場合:
λを未定乗数として設定する。
8.if R(ΔM * (λ),λ)>R0 の場合:
λl ←λとして,処理4へ戻る。
9.if R(ΔM * (λ),λ)<R0 −εの場合:
λu ←λとして,処理4へ戻る。
R (Δ M *u ), λ u ) ≦ R 0 ≦ R (Δ M *l ), λ l )
4). As an undetermined multiplier, λ = (λ 1 + λ u ) / 2 is set.
5. [Adaptive quantization algorithm (basic form)] is executed using the undetermined multiplier λ.
6). An information amount sum R (Δ M * (λ), λ) of the parameters generated in the previous process 5 is obtained.
7). If R 0 −ε ≦ R (Δ M * (λ), λ) ≦ R 0 :
Set λ as an undetermined multiplier.
8). If R (Δ M * (λ), λ)> R 0 :
Return to process 4 as λ l ← λ.
9. If R (Δ M * (λ), λ) <R 0 −ε:
Return to process 4 as λ u ← λ.

[量子化ビン数の設定法(基本解法)]
上記適応量子化の例では,量子化ビン数Mが外部から与えられるものとして説明したが,次に,量子化ビン数を可変とした場合の量子化ビン数Mの設定法について説明する。量子化ビン数Mが取り得る値をBl ≦M≦Bu とし,量子化ビン数M(Bl ≦M≦Bu )の各々について,前述した[未定乗数の設定アルゴリズム]に基づき,最適な未定乗数を求める。量子化ビン数がMの場合に求まる未定乗数をλM * とおく。
[Method for setting the number of quantized bins (basic solution)]
In the example of the adaptive quantization, the quantization bin number M is described as being given from the outside. Next, a method for setting the quantization bin number M when the quantization bin number is variable will be described. The value that the number of quantized bins M can take is B l ≦ M ≦ B u, and each of the quantized bin numbers M (B l ≦ M ≦ B u ) is optimized based on the above-mentioned [undefined multiplier setting algorithm]. Find the undecided multiplier. An undetermined multiplier obtained when the number of quantized bins is M is assumed to be λ M * .

M=Bl ,…,Bu に対して,未定乗数λM * を用いた場合の近似誤差和D(ΔBl *(λBl * ),λBl * ),…,D(ΔBu * (λBu * ),λBu * )を求め,近似誤差和が最小となる量子化ビン数を最適な量子化ビン数とする。つまり,次式を満たすM* を求める。 M = B l, ..., with respect to B u, the approximation error sum D in the case of using an undetermined multiplier λ M * (Δ Bl * ( λ Bl *), λ Bl *), ..., D (Δ Bu * ( λ Bu * ) and λ Bu * ) are obtained, and the number of quantization bins that minimizes the approximate error sum is determined as the optimum number of quantization bins. That is, M * satisfying the following equation is obtained.

D(ΔM* *(λM* * ),λM* * )<D(ΔM * (λM * ),λM *
for all M≠M*
[量子化ビン数の設定アルゴリズム]
量子化ビン数の設定アルゴリズムは,以下のとおりである。
1.情報量の上限R0 を読み込む。
2.for M=Bl ,…,Bu (処理2−1〜2−2のループ)
2−1.[未定乗数の設定アルゴリズム]を実行し,最適な未定乗数λM * および同未定乗数に対する量子化パラメータΔM * (λM * )を求める。
2−2.前の処理2−1で求めた量子化パラメータΔM * (λM * )を用いた場合の近似誤差和D(ΔM * (λM * ),λM * )を^D[M]に格納する。
3.^D[M](M=Bl ,…,Bu )の中で最小値を返すM* を求め,このM* に対する量子化パラメータΔM* * (λM* * )を出力する。
D (Δ M * * (λ M * *), λ M * *) <D (Δ M * (λ M *), λ M *)
for all M ≠ M *
[Algorithm bin setting algorithm]
The algorithm for setting the number of quantization bins is as follows.
1. The upper limit R 0 of the information amount is read.
2. for M = B 1 ,..., B u (loop of processes 2-1 to 2-2)
2-1. [Undetermined multiplier setting algorithm] is executed to determine the optimum undetermined multiplier λ M * and the quantization parameter Δ M *M * ) for the undetermined multiplier.
2-2. The approximate error sum D (Δ M *M * ), λ M * ) using the quantization parameter Δ M *M * ) obtained in the previous process 2-1 is represented by ^ D [M]. Store.
3. ^ D [M] (M = B 1 ,..., B u ) M * that returns the minimum value is obtained, and the quantization parameter Δ M **M * * ) for this M * is output.

[量子化ビン数の設定法(低演算量解法)]
量子化ビン数Mが取り得る値をBl ≦M≦Bu とし,量子化ビン数M(Bl ≦M≦Bu )が与えられた場合,最適な未定乗数の算出が不要となる量子化ビン数については,同算出処理を省略するアプローチを採る。
[Quantization bin number setting method (low computational complexity)]
A value that can be taken by the quantization bin number M is B 1 ≦ M ≦ B u, and when the quantization bin number M (B 1 ≦ M ≦ B u ) is given, a quantum that does not require calculation of an optimum undetermined multiplier. For the number of bins, an approach that omits the calculation process is used.

ここでは,量子化ビン数をMとして,λを変化させた場合の発生符号量の上限値・下限値を考察する。式(7) をλの関数と見た場合,発生符号量の上限を与えるのは,λ=0とした場合,つまり,コスト関数として歪み量のみを用いた場合である。これは,量子化ビン数をMとして,以下の最小化問題を解いた場合に当たる。   Here, the upper limit value and the lower limit value of the generated code amount when λ is changed with the number of quantization bins as M will be considered. When Equation (7) is regarded as a function of λ, the upper limit of the generated code amount is given when λ = 0, that is, when only the distortion amount is used as the cost function. This is the case when the following minimization problem is solved with the number of quantization bins as M.

Figure 2012060210
Figure 2012060210

一方,発生符号量の下限を与えるのは,λ=+∞とした場合,つまり,コスト関数として符号量のみを用いた場合である。量子化ビン数をMとして,以下の最小化問題を解いた場合に当たる。   On the other hand, the lower limit of the generated code amount is given when λ = + ∞, that is, when only the code amount is used as the cost function. This is the case when the following minimization problem is solved with the number of quantization bins as M.

Figure 2012060210
Figure 2012060210

上記の最小化問題を解くことで求まる発生符号量の上限・下限を各々Ru (M),Rl (M)とおく。Ru (M),Rl (M)は,いずれも量子化ビン数Mに対する非減少関数である。これは,量子化ビン数として大きな値を設定すれば,発生符号量も増加するためである。また,上限・下限として設定したことから,Rl (M)≦Ru (M)である。 Let R u (M) and R l (M) be the upper and lower limits of the generated code amount obtained by solving the above minimization problem. R u (M) and R l (M) are both non-decreasing functions with respect to the quantization bin number M. This is because the amount of generated code increases if a large value is set as the number of quantization bins. Further, since the upper limit and the lower limit are set, R l (M) ≦ R u (M).

ここで,まず,Rl (M)≦R0 を満たすMの最大値をMupper とする。Rl (M)のMに対する非減少性から,Mupper ≦Mを満たすMの場合,発生符号量がR0 以下となる制約条件を満たすことができない。このため,λの設定を含めた最適化の対象は,M≦Mupper を満たすMに限定しても最適性は保証される。 Here, first, the maximum value of M that satisfies R 1 (M) ≦ R 0 is defined as M upper . Because of the non-decreasing property of R l (M) with respect to M, in the case of M satisfying M upper ≦ M, the constraint condition that the generated code amount is R 0 or less cannot be satisfied. For this reason, the optimization is guaranteed even if the optimization target including the setting of λ is limited to M that satisfies M ≦ M upper .

次に,Ru (M)≦R0 を満たすMの最大値をMlower とする。発生符号量のMに対する非減少性から,M<Mlower を満たすMの場合,制約条件は必ず満足する。一方,量子化歪みのMに対する非増加性から,M<Mlower を満たすMの場合,M=Mlower の場合以上に,符号化歪みを低減できない。このため,λの設定を含めた最適化の対象は,Mlower ≦Mを満たすMに限定しても最適性は保証される。そこで,
max(Bl ,Mlower )≦M≦min(Bu ,Mupper
を満たすMに限定して,前述した未定乗数の設定のアルゴリズムに基づき,最適な未定乗数を求める。ここで,max()は2つの引数のうち,大きい方の値を返す関数であり,min()は2つの引数のうち,小さい方の値を返す関数である。
Next, let M lower be the maximum value of M that satisfies R u (M) ≦ R 0 . Because of the non-decreasing property of the generated code amount with respect to M, the constraint condition is always satisfied when M satisfies M <M lower . On the other hand, due to the non-increasing property of quantization distortion with respect to M, when M satisfies M <M lower , encoding distortion cannot be reduced more than when M = M lower . For this reason, even if the optimization target including the setting of λ is limited to M that satisfies M lower ≦ M, the optimality is guaranteed. Therefore,
max (B l , M lower ) ≦ M ≦ min (B u , M upper )
The optimum undetermined multiplier is obtained based on the algorithm for setting the undetermined multiplier described above, while limiting to M that satisfies the above. Here, max () is a function that returns the larger value of the two arguments, and min () is a function that returns the smaller value of the two arguments.

量子化ビン数がMの場合に求まる未定乗数をλM * とおく。M=Bl ,…,Bu に対して,未定乗数λM * を用いた場合の近似誤差和D(ΔBl *(λBl * ),λBl * ),…,D(ΔBu * (λBu * ),λBu * )を求め,近似誤差和が最小となる量子化ビン数を最適な量子化ビン数とする。つまり,次式を満たすMを求める。 An undetermined multiplier obtained when the number of quantized bins is M is assumed to be λ M * . M = B l, ..., with respect to B u, the approximation error sum D in the case of using an undetermined multiplier λ M * (Δ Bl * ( λ Bl *), λ Bl *), ..., D (Δ Bu * ( λ Bu * ) and λ Bu * ) are obtained, and the number of quantization bins that minimizes the approximate error sum is determined as the optimum number of quantization bins. That is, M that satisfies the following equation is obtained.

D(ΔM* *(λM* * ),λM* * )<D(ΔM * (λM * ),λM *
for all M≠M*
<Mupper , Mlower の設定に際しての演算量低減法>
upper の設定においては,コスト関数をe()として,各量子化ビン数に対する最適コスト値を算出する。これは,式(8) のRDコストにおいて,λ=0と設定した場合に相当する。一方,Mlower の設定においては,コスト関数をl()として,各量子化ビン数に対する最適コスト値を算出する。これは,式(8) のRDコストにおいて,λとしては,λ=+∞と設定した場合に相当する。
D (Δ M * * (λ M * *), λ M * *) <D (Δ M * (λ M *), λ M *)
for all M ≠ M *
<Computation amount reduction method for setting M upper and M lower >
In setting M upper, the optimal cost value for each number of quantized bins is calculated with the cost function as e (). This corresponds to the case where λ = 0 is set in the RD cost of equation (8). On the other hand, in the setting of M lower , the cost function is l (), and the optimum cost value for each number of quantized bins is calculated. This corresponds to the case where λ = + ∞ is set as λ in the RD cost of equation (8).

上記はいずれも共通のλを用いた場合に,異なる量子化ビン数に対する最適化を行う問題といえる。この場合,異なる量子化ビン数で重複した計算過程があることに着目することで,演算量を低減可能である。Mlower およびMupper の具体的な処理手順を,以下に示す。 All of the above can be said to be problems for optimization for different numbers of quantized bins when a common λ is used. In this case, the amount of calculation can be reduced by paying attention to the fact that there are overlapping calculation processes with different numbers of quantized bins. Specific processing procedures for M lower and M upper are shown below.

[Mlower の算出アルゴリズム]
1.入力信号のヒストグラム(クラス数K)を生成する。
2.Mlower ←Bl
3.λ=0,M=Bl として,[適応量子化アルゴリズム]の処理を行い,^Lm-1 (Lm )の値をルックアップテーブルT[m,Lm ]に格納し,さらに,Sm (Lm )の値を別のルックアップテーブルΦBl[m, m ]に格納する。
4.R(ΔBl * (0),0)≧R0 であれば処理を終了する。そうでなければ,次の処理へ進む。
5.for ^M=Bl +1,…,Bu (処理5〜9のループ)
6. M=^Mとして,ルックアップテーブルT[]およびルックアップテーブルΦ^M-1 []を読み込み,後述する[適応量子化アルゴリズム(M−1ビンの量子化結果利用形)]の処理を実施する。
7. 生成されるパラメータの情報量の和R(ΔM * (0),0)を求める。
8. R(ΔM * (0),0)≧R0 であれば,Mlower ←^M−1として,処理を終了する。そうでなければ,次の処理9へ進む。
9. ルックアップテーブルT[]を更新し,ルックアップテーブルΦ^M []を出力する。
[M lower calculation algorithm]
1. A histogram (number of classes K) of the input signal is generated.
2. M lower ← B l
3. The processing of [adaptive quantization algorithm] is performed with λ = 0 and M = B l , the value of L m−1 (L m ) is stored in the lookup table T [m, L m ], and S The value of m (L m ) is stored in another look-up table Φ Bl [m , L m ].
4). If R (Δ Bl * (0), 0) ≧ R 0 , the process is terminated. Otherwise, go to the next process.
5. for ^ M = B 1 +1,..., B u (loop of processing 5 to 9)
6). When M = ^ M, the lookup table T [] and the lookup table Φ ^ M-1 [] are read and the processing of [adaptive quantization algorithm (M-1 bin quantization result utilization type)] to be described later is performed. To do.
7). A sum R (Δ M * (0), 0) of information amounts of generated parameters is obtained.
8). If R (Δ M * (0), 0) ≧ R 0 , the processing is terminated as M lower ← ^ M−1. Otherwise, the process proceeds to the next process 9.
9. The lookup table T [] is updated, and the lookup table Φ ^ M [] is output.

[Mupper の算出アルゴリズム]
1.入力信号のヒストグラム(クラス数K)を生成する。
2.Mupper ←Bu
3.λ=λ+max,M=Bl として,[適応量子化アルゴリズム]の処理を行い,^Lm-1 (Lm )の値をルックアップテーブルT[m,Lm ]に格納し,さらに,Sm (Lm )の値を別のルックアップテーブルΦBl[m,Lm ]に格納する。ここで,λ+maxは十分大きな値とする。
4.R(ΔBu * (λ+max),λ+max)≧R0 であれば,処理を終了する。この場合,与えられた制約条件を満たす解がないことになる。そうでなければ,次の処理5へ進む。
5.for ^M=Bl +1,…,Bu (処理5〜9のループ)
6. M=^Mとして,ルックアップテーブルT[]およびルックアップテーブルΦ^M-1 []を読み込み,後述する[適応量子化アルゴリズム(M−1ビンの量子化結果利用形)]の処理を実施する。
7. 生成されるパラメータの情報量の和R(ΔM * (λ+max),λ+max)を求める。
8. R(ΔM * (λ+max),λ+max)≧R0 であれば,Mupper ←^M−1として,処理を終了する。そうでなければ,次の処理9へ進む。
9. ルックアップテーブルT[]を更新し,ルックアップテーブルΦ^M []を出力する。
[Calculation algorithm for M upper ]
1. A histogram (number of classes K) of the input signal is generated.
2. M upper ← B u
3. lambda = lambda + max, as M = B l, performs processing of the adaptive quantization algorithm, and stores ^ L m-1 the value of (L m) look-up table T [m, L m], and further , S m (L m ) are stored in another lookup table Φ Bl [m, L m ]. Here, λ + max is a sufficiently large value.
4). If R (Δ Bu *+ max ), λ + max ) ≧ R 0 , the process is terminated. In this case, there is no solution that satisfies the given constraints. Otherwise, the process proceeds to the next process 5.
5. for ^ M = B 1 +1,..., B u (loop of processing 5 to 9)
6). When M = ^ M, the lookup table T [] and the lookup table Φ ^ M-1 [] are read and the processing of [adaptive quantization algorithm (M-1 bin quantization result utilization type)] to be described later is performed. To do.
7). The sum R (Δ M *+ max ), λ + max ) of the information amount of the generated parameters is obtained.
8). If R (Δ M *+ max ), λ + max ) ≧ R 0 , the processing is terminated as M upper ← ^ M−1. Otherwise, the process proceeds to the next process 9.
9. The lookup table T [] is updated, and the lookup table Φ ^ M [] is output.

<最適ビン数の算出方法>
upper の設定においては,コスト関数をe()として,各量子化ビン数に対する最適コスト値を算出する。これは,式(8) のRDコストにおいて,λ=0と設定した場合に相当する。一方,Mlower の設定においては,コスト関数をl()として,各量子化ビン数に対する最適コスト値を算出する。これは,式(8) のRDコストにおいて,λとしては,λ=+∞と設定した場合に相当する。
<Calculation method of optimum number of bins>
In setting M upper, the optimal cost value for each number of quantized bins is calculated with the cost function as e (). This corresponds to the case where λ = 0 is set in the RD cost of equation (8). On the other hand, in the setting of M lower , the cost function is l (), and the optimum cost value for each number of quantized bins is calculated. This corresponds to the case where λ = + ∞ is set as λ in the RD cost of equation (8).

[量子化ビン数の設定アルゴリズム(低演算量タイプ)]
低演算量タイプの量子化ビン数の設定アルゴリズムを,以下に示す。
1.情報量の上限R0 を読み込む。
2.前述した[Mlower の算出アルゴリズム]によりMlower を求める。
3.前述した[Mupper の算出アルゴリズム]によりMupper を求める。
4.for M=max(Bl ,Mlower ),…,min(Bu ,Mupper
(処理4−1〜4−2の繰り返し)
4−1.M>max(Bl ,Mlower )の場合には,λM-1 * を未定乗数の初期値として入力して,下記に示す[未定乗数の設定アルゴリズム(継承型)]を実行し,最適な未定乗数λM * および同未定乗数に対する量子化パラメータΔM * (λM * )を求める。
[Quantization bin number setting algorithm (low complexity type)]
The algorithm for setting the number of low-computation-type quantization bins is shown below.
1. The upper limit R 0 of the information amount is read.
2. Request M lower by the above-described [the algorithm for calculating the M lower].
3. Request M upper by the aforementioned [the algorithm for calculating the M upper].
4). for M = max (B 1 , M lower ),..., min (B u , M upper )
(Repeat processing 4-1 to 4-2)
4-1. If M> max (B 1 , M lower ), enter λ M-1 * as the initial value of the undetermined multiplier, execute the [Undecided multiplier setting algorithm (inherited type)] shown below, and And the quantization parameter Δ M *M * ) for the unknown multiplier λ M * and the unknown multiplier.

M=max(Bl ,Mlower )の場合には,[未定乗数の設定アルゴリズム]を実行し,最適な未定乗数λM * および同未定乗数に対する量子化パラメータΔM * (λM * )を求める。
4−2.前の処理4−1で求めた量子化パラメータΔM * (λM * )を用いた場合の近似誤差和D(ΔM * (λM * ),λM * )を,^D[M]に格納する。
5.^D[M](M=Bl ,…,Bu )の中で最小値を返すMを求め,このMに対する量子化パラメータΔM* * (λM* * )を出力する。
In the case of M = max (B 1 , M lower ), the [undecided multiplier setting algorithm] is executed, and the optimum undetermined multiplier λ M * and the quantization parameter Δ M *M * ) for the undetermined multiplier are set. Ask.
4-2. The approximate error sum D (Δ M *M * ), λ M * ) when the quantization parameter Δ M *M * ) obtained in the previous process 4-1 is used is represented by ^ D [M]. To store.
5. ^ D [M] (M = B 1 ,..., B u ) M that returns the minimum value is obtained, and the quantization parameter Δ M **M * * ) for this M is output.

[未定乗数の設定アルゴリズム(継承型)]
上記処理4−1で用いる未定乗数の設定アルゴリズム(継承型)の手順は,以下のとおりである。
1.量子化ビン数Mを読み込む。
2.情報量の上限R0 を読み込む。
3.未定乗数λの初期値,および,その上限値λu を読み込む。
4.未定乗数として,λ=(λl +λu )/2を設定する。
5.未定乗数λを用いて後述する[適応量子化アルゴリズム(M−1ビンの量子化結果利用形)]を実行する。
6.処理5で生成されるパラメータの情報量和R(ΔM * (λ),λ)を求める。
7.if R0 −ε≦R(ΔM * (λ),λ)≦R0 の場合:
λu を未定乗数として設定する。
8.未定乗数λu を用いて,後述する[適応量子化アルゴリズム(M−1ビンの量子化結果利用形)]を実行する。
9.処理8で生成されるパラメータの情報量和R(ΔM * (λu ),λu )を求める。
10. if R0 −ε≦R(ΔM * (λu ),λu )≦R0 の場合:
λu を未定乗数として設定する。
11. if R(ΔM * (λu ),λu )>R0 の場合:
λ←2λu として,処理5へ戻る。
12. if R(ΔM * (λu ),λu )<R0 −εの場合:
λl ←λとして,処理4へ戻る。
13. if R0 −ε≦R(ΔM * (λl ),λl )≦R0 の場合:
λl を未定乗数として設定する。
14. if R(ΔM * (λl ),λl )>R0 の場合:
λu ←λとして,処理4へ戻る。
15. if R(ΔM * (λl ),λl )<R0 −εの場合:
λ←λu /2として,処理5へ戻る。
[Undecided multiplier setting algorithm (inherited)]
The procedure of the undetermined multiplier setting algorithm (inherited type) used in the above process 4-1 is as follows.
1. The quantization bin number M is read.
2. The upper limit R 0 of the information amount is read.
3. The initial value of the undetermined multiplier λ and its upper limit value λ u are read.
4). As an undetermined multiplier, λ = (λ 1 + λ u ) / 2 is set.
5. [Adaptive quantization algorithm (M-1 bin quantization result utilization type)] to be described later is executed using the undetermined multiplier λ.
6). An information amount sum R (Δ M * (λ), λ) of the parameters generated in the process 5 is obtained.
7). If R 0 −ε ≦ R (Δ M * (λ), λ) ≦ R 0 :
Set λ u as an undetermined multiplier.
8). Using the undetermined multiplier λ u , a later-described [adaptive quantization algorithm (M-1 bin quantization result use form)] is executed.
9. An information amount sum R (Δ M *u ), λ u ) of the parameters generated in the process 8 is obtained.
10. If R 0 −ε ≦ R (Δ M *u ), λ u ) ≦ R 0 :
Set λ u as an undetermined multiplier.
11. If R (Δ M *u ), λ u )> R 0 :
as λ ← 2λ u, returns to the processing 5.
12 If R (Δ M *u ), λ u ) <R 0 −ε:
Return to process 4 as λ l ← λ.
13. If R 0 −ε ≦ R (Δ M *l ), λ l ) ≦ R 0 :
Set λ l as the undetermined multiplier.
14 If R (Δ M *l ), λ l )> R 0 :
Return to process 4 as λ u ← λ.
15. If R (Δ M *l ), λ l ) <R 0 −ε:
Return to processing 5 as λ ← λ u / 2.

以上が未定乗数の設定アルゴリズム(継承型)である。   The above is the algorithm for setting the undetermined multiplier (inherited type).

上記はいずれも共通のλを用いた場合に,異なる量子化ビン数に対する最適化を行う問題といえる。この場合,異なる量子化ビン数で重複した計算過程があることに着目することで,演算量を低減可能である。その具体的な処理手順を以下に示す。   All of the above can be said to be problems for optimization for different numbers of quantized bins when a common λ is used. In this case, the amount of calculation can be reduced by paying attention to the fact that there are overlapping calculation processes with different numbers of quantized bins. The specific processing procedure is shown below.

[適応量子化アルゴリズム(M−1ビンの量子化結果利用形)]
以下の適応量子化アルゴリズムでは,M−1ビンの量子化の結果を用いて,Mビンの量子化を算出する場合の例である。なお,ここで説明を簡単にするために,3≦Mを対象とする。
1.入力信号のヒストグラム(クラス数K)を読み込む。
2.量子化後のクラス数Mを読み込む。
3.for m=0,…,M−3 (処理3〜6のループ)
4. for Lm =m,…,K−(M−m) (処理4〜6のループ)
5. ΦM [m,Lm ]←ΦM-1 [m,Lm
6. Lm −Δm を^Lm-1 (Lm )に格納する。
7.for m=M−2,M−1 (処理7〜16のループ)
8. for Lm =m,…,K−(M+1−m) (処理8〜16ループ)
9.ただし,m=M−1の場合には,Lm =K−1に限定
10. for Δm =1,…,Lm −(m−1) (処理10〜16のループ)
11. ヒストグラムの区間[Lm −(Δm −1),Lm ]を代表値で近似した場合のRDコストを求める。RDコストは式(8) により求め,そのRDコストをψ(Lm −(Δm −1),Lm , λ)に格納する。
12. Φm-1 (Lm −Δm )+ψ(Lm −(Δm −1),Lm , λ)の値を計算する。
13. Φm-1 (Lm −Δm )+ψ(Lm −(Δm −1),Lm , λ)(Δm =1,…,Lm −(m−1))の中での最小値をSm (Lm )に格納する。
14. ΦM+1 [m,Lm ]←Φm (Lm )(m=M−1の場合には,省略)
15. Φm-1 (Lm −Δm )+ψ(Lm −(Δm −1),Lm , λ)(Δm =1,…,Lm −(m−1))を最小化するΔm を用いて,Lm −Δm を^Lm-1 (Lm )に格納する。
16. T[m,Lm ]←^Lm-1 (Lm
17.LM * ←K−1
18.for m=M−1,…,1 (処理18〜21のループ)
19. ^Lm-1 (Lm * )を読み込み,Lm-1 * ←^Lm-1 (Lm * )とする。
20. Δm * ←Lm * −Lm-1 *
21. Δ0 * ←L0 * +1
[ルックアップテーブルを用いた演算量低減法]
上記の処理では,Lm とΔm の組み合わせによっては,RDコストψ(Lm −(Δm −1),Lm , λ)が異なる量子化ビン(mの値が異なるという意味)において必要となる。その度に,RDコストψ(Lm −(Δm −1),Lm , λ)を算出するのは,計算コストの観点から得策ではない。計算結果を格納し,必要に応じて格納結果を呼び出すことで,演算量を低減できる。そこで,ψ(Lm −(Δm −1),Lm , λ)として取り得る値をルックアップテーブル((K−1)×K要素)に格納する。格納処理は,次のような手順になる。
1.for m=0,…,K−2 (処理1〜3のループ)
2. for k=1,…,K−m−1 (処理2〜3のループ)
3. E[m,m+k]←ψ(m,m+k,λ)
なお,前記[量子化ビン数の設定法(基本解法)],[量子化ビン数の設定法(低演算量解法)]において,本ルックアップテーブルを用いる場合,全ての量子化ビン数([量子化ビン数の設定法(基本解法)]の場合,Bl ≦M≦Bu ,[量子化ビン数の設定法(低演算量解法)]の場合,Mlower ≦M≦Mupper )に対して,全ての量子化ビン数で共有可能である。このため,対象とする量子化ビン数が増加しても,ルックアップテーブルを求める処理は増加することはない。
[Adaptive quantization algorithm (M-1 bin quantization result use form)]
The following adaptive quantization algorithm is an example in the case of calculating M bin quantization using the result of M-1 bin quantization. In order to simplify the description here, 3 ≦ M is targeted.
1. Reads the histogram (number of classes K) of the input signal.
2. Read the number of classes M after quantization.
3. for m = 0,..., M-3 (loop of processing 3 to 6)
4). for L m = m,..., K− (M−m) (loop of processing 4 to 6)
5. Φ M [m, L m ] ← Φ M-1 [m, L m ]
6). L m −Δ m is stored in L m−1 (L m ).
7). for m = M−2, M−1 (loop of processing 7 to 16)
8). for L m = m,..., K− (M + 1−m) (Processing 8 to 16 loops)
9. However, when m = M−1, it is limited to L m = K−110. for Δ m = 1,..., L m − (m−1) (loop of processes 10 to 16)
11. The RD cost is obtained when the histogram section [L m − (Δ m −1), L m ] is approximated by a representative value. The RD cost is obtained by equation (8), and the RD cost is stored in ψ (L m − (Δ m −1), L m , λ).
12 Φ m-1 (L m -Δ m) + ψ - to calculate the value of (L m (Δ m -1) , L m, λ).
13. Φ m−1 (L m −Δ m ) + ψ (L m − (Δ m −1), L m , λ) (Δ m = 1,..., L m − (m−1)) Store the value in S m (L m ).
14 Φ M + 1 [m, L m ] ← Φ m (L m ) (omitted when m = M−1)
15. Δ that minimizes Φ m−1 (L m −Δ m ) + ψ (L m − (Δ m −1), L m , λ) (Δ m = 1,..., L m − (m−1)) Using m , L m −Δ m is stored in ^ L m−1 (L m ).
16. T [m, L m ] ← ^ L m−1 (L m )
17. L M * ← K-1
18. form = M−1,..., 1 (loop of processes 18 to 21)
19. ^ L m-1 (L m * ) is read and L m-1 * ← ^ L m-1 (L m * ) is set.
20. Δ m * ← L m * -L m-1 *
21. Δ 0 * ← L 0 * +1
[Calculation method using lookup table]
In the above processing, depending on the combination of L m and Δ m , the RD cost ψ (L m − (Δ m −1), L m , λ) is required in different quantization bins (meaning that the value of m is different). It becomes. It is not a good idea from the viewpoint of calculation cost to calculate the RD cost ψ (L m − (Δ m −1), L m , λ) each time. The calculation amount can be reduced by storing the calculation result and calling the storage result as necessary. Therefore, values that can be taken as ψ (L m − (Δ m −1), L m , λ) are stored in a lookup table ((K−1) × K elements). The storage process is as follows.
1. for m = 0,..., K-2 (loop of processing 1 to 3)
2. for k = 1,..., K-m-1 (loop of processing 2 to 3)
3. E [m, m + k] ← ψ (m, m + k, λ)
In the above [Quantization bin number setting method (basic solution)] and [Quantization bin number setting method (low complexity solution)], when this lookup table is used, all quantization bin numbers ([ In the case of [Quantization bin number setting method (basic solution)], B 1 ≦ M ≦ B u , and in the case of [Quantization bin number setting method (low computational complexity method)], M lower ≦ M ≦ M upper ) On the other hand, it can be shared by all the number of quantized bins. For this reason, even if the number of target quantization bins increases, the processing for obtaining the lookup table does not increase.

[RDコスト計算の漸化関係を用いた演算量低減法]
上述のルックアップテーブル((K−1)×K要素)E[m,m+k]へ格納するRDコストψ(Lm −Δm ,Lm-1 ,λ)の計算過程にも重複した計算が存在するため,そうした重複部分を省略することで,演算量の低減を図る。
[Computation amount reduction method using recurrence relation of RD cost calculation]
There is an overlapping calculation in the calculation process of the RD cost ψ (L m −Δ m , L m−1 , λ) stored in the lookup table ((K−1) × K elements) E [m, m + k]. Since it exists, the amount of calculation is reduced by omitting such overlapping parts.

まず,以下の値を定義する。   First, the following values are defined.

Figure 2012060210
Figure 2012060210

これらを用いて,重心位置c(Lm −(Δm −1),Lm ),量子化誤差e(Lm −(Δm −1),Lm )を再定義すると,次のようになる。 Using these, the centroid position c (L m − (Δ m −1), L m ) and the quantization error e (L m − (Δ m −1), L m ) are redefined as follows. Become.

Figure 2012060210
Figure 2012060210

これより,c(Lm −(Δm −1),Lm )およびe(Lm −(Δm −1),Lm )が,以下の漸化関係を持つことが分かる。 From this, it can be seen that c (L m − (Δ m −1), L m ) and e (L m − (Δ m −1), L m ) have the following recurrence relationship.

Figure 2012060210
Figure 2012060210

Figure 2012060210
Figure 2012060210

さらに,情報量l(Lm −(Δm −1),Lm )が,以下の漸化関係を持つことが分かる。 Furthermore, it can be seen that the information amount l (L m − (Δ m −1), L m ) has the following recurrence relationship.

Figure 2012060210
Figure 2012060210

ここで,Tは頻度の総和である。 Here, T is the sum of frequencies.

T=Σk=0 K-1 h[k]
上記の関係に基づきe(Lm −(Δm −1),Lm ),l(Lm −(Δm −1),Lm )を算出し,両者の加重和であるRDコストをルックアップテーブル((K−1)×K要素)に格納する。格納処理は,以下に説明する[RDコストの算出アルゴリズム(低減法)]のようになる。
T = Σ k = 0 K-1 h [k]
Based on the above relationship, e (L m − (Δ m −1), L m ), l (L m − (Δ m −1), L m ) is calculated, and the RD cost that is the weighted sum of the two is looked up. Store in the up table ((K-1) × K elements). The storage process is as described in [RD cost calculation algorithm (reduction method)] described below.

なお,前記[量子化ビン数の設定法(基本解法)],[量子化ビン数の設定法(低演算量解法)]において,本ルックアップテーブルを用いる場合,全ての量子化ビン数([量子化ビン数の設定法(基本解法)]の場合,Bl ≦M≦Bu ,[量子化ビン数の設定法(低演算量解法)]の場合,Mlower ≦M≦Mupper )に対して,全ての量子化ビン数で共有可能である。このため,対象とする量子化ビン数が増加しても,ルックアップテーブルを求める処理は増加することはない。 In the above [Quantization bin number setting method (basic solution)] and [Quantization bin number setting method (low complexity solution)], when this lookup table is used, all quantization bin numbers ([ In the case of [Quantization bin number setting method (basic solution)], B 1 ≦ M ≦ B u , and in the case of [Quantization bin number setting method (low computational complexity method)], M lower ≦ M ≦ M upper ) On the other hand, it can be shared by all the number of quantized bins. For this reason, even if the number of target quantization bins increases, the processing for obtaining the lookup table does not increase.

[RDコストの算出アルゴリズム(低減法)]
1.for k=0,…,K−1 (処理1〜4のループ)
2. q1 [0,k]←0
3. q2 [0,k]←0
4. q3 [0,k]←0
5.T←Σk=0 K-1 h[k]
6.for m=0,…,K−2 (処理6〜14のループ)
7. for k=0,…,K−m−1 (処理7〜14のループ)
8. q1 [m,m+k+1]←q1 (m,m+k)+h[m+k+1]
9. q2 [m,m+k+1]←q2 (m,m+k)+(m+k+1)h[m+k+1]
10. q3 [m,m+k+1]←q3 (m,m+k)+(m+k+1)2 h[m+k+1]
11. c[m,m+k+1]←q2 (m,m+k+1)/q1 (m,m+k+1)
12. e[m,m+k+1]←q3 (m,m+k+1)−2c(m,m+k+1)q2 (m,m+k+1)+c(m,m+k+1)2 1 (m,m+k+1)
13. l(Lm −(Δm −1),Lm )←−{q1 (Lm −Δm −1),Lm )/T}{log2 1 (Lm −(Δm −1),Lm )−log2 T}
14. E[m,m+k+1]←e[m,m+k+1]+λ・l(Lm −(Δm −1),Lm
以上を踏まえ,ルックアップテーブルを参照する方式の場合の低演算量形の適応量子化アルゴリズムは,以下のようになる。
[RD cost calculation algorithm (reduction method)]
1. for k = 0,..., K-1 (loop of processes 1 to 4)
2. q 1 [0, k] ← 0
3. q 2 [0, k] ← 0
4). q 3 [0, k] ← 0
5. T ← Σ k = 0 K-1 h [k]
6). for m = 0,..., K-2 (loop of processing 6 to 14)
7). for k = 0,..., K-m-1 (loop of processing 7 to 14)
8). q 1 [m, m + k + 1] ← q 1 (m, m + k) + h [m + k + 1]
9. q 2 [m, m + k + 1] ← q 2 (m, m + k) + (m + k + 1) h [m + k + 1]
10. q 3 [m, m + k + 1] ← q 3 (m, m + k) + (m + k + 1) 2 h [m + k + 1]
11. c [m, m + k + 1] ← q 2 (m, m + k + 1) / q 1 (m, m + k + 1)
12 e [m, m + k + 1] ← q 3 (m, m + k + 1) −2c (m, m + k + 1) q 2 (m, m + k + 1) + c (m, m + k + 1) 2 q 1 (m, m + k + 1)
13. l (L m − (Δ m −1), L m ) ← − {q 1 (L m −Δ m −1), L m ) / T} {log 2 q 1 (L m − (Δ m −1) ), L m ) −log 2 T}
14 E [m, m + k + 1] ← e [m, m + k + 1] + λ · l (L m − (Δ m −1), L m )
Based on the above, the low-computation type adaptive quantization algorithm in the case of the method of referring to the lookup table is as follows.

[適応量子化アルゴリズム(低演算量形)]
1.入力信号のヒストグラム(クラス数K)を生成する。
2.量子化後のクラス数Mを読み込む。
3.[RDコストの算出アルゴリズム(低減法)]に基づくRDコスト算出,およびルックアップテーブルへの格納。
4.[適応量子化アルゴリズム(基本形)]におけるψ(Lm −(Δm −1),Lm , λ)への格納対象の算出処理をルックアップテーブルE[Lm (Δm −1),Lm , λ]からの読み出し処理に置き換えて,同アルゴリズムの処理3以降の処理を実施。
[Adaptive quantization algorithm (low complexity)]
1. A histogram (number of classes K) of the input signal is generated.
2. Read the number of classes M after quantization.
3. RD cost calculation based on [RD cost calculation algorithm (reduction method)] and storage in a lookup table.
4). In the [adaptive quantization algorithm (basic form)], the calculation processing of the object to be stored in ψ (L m − (Δ m −1), L m , λ) is referred to as the lookup table E [L mm −1), L Replaced with the process of reading from [ m , λ], and implemented the process after process 3 of the same algorithm.

[視覚感度特性を考慮した重み付き歪み量の最小化]
視覚系は,低輝度の画素値の変化に比べて,高輝度の画素値の変化に鈍感である。そこで,こうした視覚特性を考慮して量子化を行う場合には,以下のように行う。まず,画素値k(k=0,…,K−1)に対する重み係数として,w[k]を設定する。この重み係数は,外部から与えられるものとする。例えば,高輝度(大きなk)の重みを低輝度(小さなk)の重みより小さな値に設定すれば,上記の輝度差に対する視覚特性を量子化処理に組み込むことが可能になる。この重み係数を用いて,画素値kに対する頻度h[k]を,〜h[k]=w[k]×h[k](ただし,〜はhの上に付く記号)として補正し,この補正後のヒストグラム〜h[k]に対して,前述の量子化処理を実施する。
[Minimization of weighted distortion considering visual sensitivity characteristics]
The visual system is less sensitive to changes in high luminance pixel values than changes in low luminance pixel values. Therefore, when quantization is performed in consideration of such visual characteristics, it is performed as follows. First, w [k] is set as a weighting factor for the pixel value k (k = 0,..., K−1). This weighting factor shall be given from the outside. For example, if the weight of high luminance (large k) is set to a value smaller than the weight of low luminance (small k), it is possible to incorporate the visual characteristic for the luminance difference into the quantization process. Using this weighting factor, the frequency h [k] for the pixel value k is corrected as ~ h [k] = w [k] × h [k] (where ~ is a symbol on h), The above-described quantization processing is performed on the corrected histogram to h [k].

以上の適応量子化の処理は,コンピュータとソフトウェアプログラムとによって実現することができ,そのプログラムをコンピュータ読み取り可能な記録媒体に記録することも,ネットワークを通して提供することも可能である。   The above adaptive quantization processing can be realized by a computer and a software program, and the program can be recorded on a computer-readable recording medium or provided through a network.

10 適応量子化装置
11 入力信号レベル数記憶部
12 量子化後レベル数記憶部
13 未定乗数記憶部
14 ヒストグラム生成部
15 近似誤差算出部
16 情報量算出部
17 RDコスト算出部
18 RDコスト最小値記憶部
19 区間上端最適値記憶部
20 区間上端最適値追跡部
21 量子化処理部
DESCRIPTION OF SYMBOLS 10 Adaptive quantization apparatus 11 Input signal level number memory | storage part 12 Quantized level number memory | storage part 13 Undetermined multiplier memory | storage part 14 Histogram generation part 15 Approximate error calculation part 16 Information amount calculation part 17 RD cost calculation part 18 RD cost minimum value memory | storage Section 19 Upper section optimum value storage section 20 Section upper section optimum value tracking section 21 Quantization processing section

Claims (9)

クラス数がKの入力信号を,Kより小さいMのクラス数に量子化する適応量子化方法であって,
入力信号についてクラス数Kのヒストグラムを生成するステップと,
与えられたクラス数Mで前記ヒストグラムを近似する際に,クラス境界の全候補に対して,最初のクラス境界の候補から順番に量子化により発生する近似誤差と符号量とを算出し,近似誤差と符号量の加重和を最小化する量子化値に対応するクラス境界情報およびそのときの前記加重和の最小値を算出し,メモリに格納するとともに,次のクラスでのクラス境界を選択する際,上記格納した最小値をメモリから読み出し,その時点でのクラス境界の選択における前記加重和の最小値の計算に用いて,最初のクラスから当該クラスまでの近似誤差を最小化するクラス境界を求めるステップと,
前記メモリに格納されたクラス境界情報および前記加重和の最小値に基づき,クラス境界の全候補に対して近似誤差と符号量の加重和を最小化するクラス境界を選択するステップと,
最終的に選択したクラス境界を用いて入力信号を量子化するステップとを有する
ことを特徴とする適応量子化方法。
An adaptive quantization method for quantizing an input signal of class number K into M class numbers smaller than K,
Generating a class number K histogram for the input signal;
When approximating the histogram with a given number of classes M, an approximation error and code amount generated by quantization are calculated in order from the first class boundary candidate for all class boundary candidates, and the approximation error is calculated. When calculating the class boundary information corresponding to the quantized value that minimizes the weighted sum of the code amount and the minimum value of the weighted sum at that time, storing it in the memory, and selecting the class boundary in the next class The stored minimum value is read from the memory, and used to calculate the minimum value of the weighted sum in the selection of the class boundary at that time, and the class boundary that minimizes the approximation error from the first class to the class is obtained. Steps,
Selecting a class boundary that minimizes a weighted sum of approximation error and code amount for all candidate class boundaries based on the class boundary information stored in the memory and the minimum value of the weighted sum;
And a step of quantizing the input signal using the finally selected class boundary.
請求項1記載の適応量子化方法において,
前記近似誤差として,クラス数Mの各クラスの代表値と当該各クラスにおける入力信号の値との誤差の絶対値和または二乗和,あるいは,クラス数Mの各クラスの代表値と当該各クラスにおける入力信号の値に対して視覚感度に基づき重み付けされた値との誤差の絶対値和または二乗和を算出する
ことを特徴とする適応量子化方法。
The adaptive quantization method according to claim 1, wherein:
As the approximation error, the absolute value sum or square sum of errors between the representative value of each class of class number M and the value of the input signal in each class, or the representative value of each class of class number M and each class. An adaptive quantization method, characterized in that an absolute value sum or a square sum of errors between a value of an input signal and a weighted value based on visual sensitivity is calculated.
請求項1または請求項2記載の適応量子化方法において,
前記近似誤差と符号量との加重和として取り得る値を予め算出してルックアップテーブルに格納し,前記ルックアップテーブルを参照して,前記クラス境界の候補に対する加重和を得る
ことを特徴とする適応量子化方法。
In the adaptive quantization method according to claim 1 or 2,
A value that can be taken as a weighted sum of the approximation error and the code amount is calculated in advance and stored in a lookup table, and the weighted sum for the class boundary candidates is obtained by referring to the lookup table. Adaptive quantization method.
クラス数がKの入力信号を,別途,与えられたクラス数の候補から選択されたクラス数に量子化する適応量子化方法であって,
設定された近似誤差と符号量の加重係数を用いて,前記与えられたクラス数の各候補値に対して,請求項1,請求項2または請求項3に記載された適応量子化方法により,量子化代表値およびクラス境界を求め,
かつ,前記加重係数を変化させて前記適応量子化方法を繰り返すことにより,前記加重係数を最適化し,
最適化した加重係数の下で前記適応量子化方法により求めた量子化代表値およびクラス境界を用いた場合の近似誤差を算出し,クラス数の各候補値を用いた場合の近似誤差の中から最小値を求め,
その最小値を実現する量子化代表値およびクラス境界,並びに,その時のクラス数を同定する
ことを特徴とする適応量子化方法。
An adaptive quantization method for separately quantizing an input signal having a class number of K into a class number selected from a given class number candidate,
The adaptive quantization method according to claim 1, claim 2, or claim 3, for each given value of the given number of classes, using the set approximation error and the weighting coefficient of the code amount, Find quantized representative values and class boundaries,
And, by changing the weighting factor and repeating the adaptive quantization method, optimizing the weighting factor,
Approximation error when using the quantized representative value and class boundary obtained by the adaptive quantization method under the optimized weighting coefficient is calculated, and from among the approximation errors when using each candidate value of class number Find the minimum value,
An adaptive quantization method characterized by identifying the quantization representative value and class boundary that realize the minimum value, and the number of classes at that time.
請求項4記載の適応量子化方法において,
前記クラス数をMとして前記近似誤差と符号量の加重係数を変化させた場合の発生符号量の上限値と下限値とから最適化の対象となるクラス数Mの上限値と下限値とを算出し,前記クラス数Mの上限値と下限値との範囲に限定して,前記クラス数の候補値に対する前記量子化代表値およびクラス境界を求める処理を行う
ことを特徴とする適応量子化方法。
The adaptive quantization method according to claim 4, wherein
The upper limit value and lower limit value of the class number M to be optimized are calculated from the upper limit value and lower limit value of the generated code quantity when the number of classes is M and the weighting coefficient of the approximation error and code quantity is changed. An adaptive quantization method characterized in that processing for obtaining the quantization representative value and class boundary for the candidate number of classes is limited to a range between an upper limit value and a lower limit value of the class number M.
請求項4または請求項5記載の適応量子化方法において,
前記クラス数の各候補値に対する前記量子化代表値およびクラス境界を求める処理において,クラス数M−1として量子化代表値およびクラス境界を求めた結果を記憶し,クラス数Mの量子化代表値およびクラス境界を求める処理に利用することにより,クラス数M−1とクラス数Mとで重複する演算を省略する
ことを特徴とする適応量子化方法。
In the adaptive quantization method according to claim 4 or 5,
In the process of obtaining the quantized representative value and class boundary for each candidate value of the class number, the result of obtaining the quantized representative value and the class boundary is stored as the class number M−1, and the quantized representative value of the class number M is stored. And an adaptive quantization method characterized by omitting an overlapping operation between the class number M-1 and the class number M by being used for processing for obtaining a class boundary.
クラス数がKの入力信号を,Kより小さいMのクラス数に量子化する適応量子化装置であって,
入力信号についてクラス数Kのヒストグラムを生成するヒストグラム生成手段と,
与えられたクラス数Mで前記ヒストグラムを近似する際に,クラス境界の各候補に対して,量子化により発生する近似誤差を算出する近似誤差算出手段と,
前記クラス境界の各候補に対して,量子化により発生する符号量を算出する情報量算出手段と,
前記近似誤差と前記符号量との加重和を算出する加重和算出手段と,
前記クラス境界の候補の中で,算出された前記加重和が最小となるクラス境界情報および加重和の最小値を記憶する記憶手段と,
前記記憶手段に記憶されたクラス境界情報および加重和の最小値に基づき,クラス境界の全候補に対して前記加重和を最小化するクラス境界を選択する最適値追跡手段と,
前記最適値追跡手段によって選択されたクラス境界を用いて入力信号を量子化する量子化処理手段とを備え,
前記加重和算出手段は,クラス境界の候補の中で次のクラスでのクラス境界を選択する際,前記記憶手段に記憶された加重和の最小値を読み出し,その時点でのクラス境界の選択における加重和の最小値の計算に用いることで,最初のクラスから当該クラスまでの加重和を最小化するクラス境界を求める
ことを特徴とする適応量子化装置。
An adaptive quantization apparatus that quantizes an input signal having a class number of K into an M class number smaller than K,
Histogram generating means for generating a histogram of K classes for the input signal;
An approximation error calculating means for calculating an approximation error generated by quantization for each class boundary candidate when approximating the histogram with a given number of classes M;
Information amount calculating means for calculating the amount of code generated by quantization for each candidate of the class boundary;
Weighted sum calculating means for calculating a weighted sum of the approximation error and the code amount;
Storage means for storing class boundary information that minimizes the calculated weighted sum among the class boundary candidates and a minimum value of the weighted sum;
Optimal value tracking means for selecting a class boundary that minimizes the weighted sum for all candidate class boundaries based on the class boundary information and the minimum value of the weighted sum stored in the storage means;
Quantization processing means for quantizing an input signal using the class boundary selected by the optimum value tracking means,
The weighted sum calculation means reads the minimum value of the weighted sum stored in the storage means when selecting a class boundary in the next class among the class boundary candidates, and selects the class boundary at that time. An adaptive quantizer characterized by obtaining a class boundary that minimizes the weighted sum from the first class to the class by using it to calculate the minimum value of the weighted sum.
クラス数がKの入力信号を,別途,与えられたクラス数の候補から選択されたクラス数に量子化する適応量子化装置であって,
入力信号についてクラス数Kのヒストグラムを生成するヒストグラム生成手段と,
設定された近似誤差と符号量の加重係数を用いて,前記与えられたクラス数の各候補値Mに対して,前記ヒストグラムを近似する際に,クラス境界の各候補に対して,量子化により発生する近似誤差を算出する近似誤差算出手段と,
前記クラス境界の各候補に対して,量子化により発生する符号量を算出する情報量算出手段と,
前記近似誤差と前記符号量との加重和を算出する加重和算出手段と,
前記クラス境界の候補の中で,算出された前記加重和が最小となるクラス境界情報および加重和の最小値を記憶する記憶手段と,
前記記憶手段に記憶されたクラス境界情報および加重和の最小値に基づき,クラス境界の全候補に対して前記加重和を最小化するクラス境界を選択する最適値追跡手段と,
前記最適値追跡手段によって選択されたクラス境界を用いて入力信号を量子化する量子化処理手段とを備え,
前記加重和算出手段は,クラス境界の候補の中で次のクラスでのクラス境界を選択する際,前記記憶手段に記憶された加重和の最小値を読み出し,その時点でのクラス境界の選択における加重和の最小値の計算に用いることで,最初のクラスから当該クラスまでの加重和を最小化するクラス境界を求め,
前記与えられたクラス数の各候補値Mに対して,前記近似誤差と前記符号量との加重和に用いる加重係数の最適化を行うとともに,最適化した加重係数の下で量子化代表値およびクラス境界を用いた場合の近似誤差を算出し,クラス数の各候補値を用いた場合の近似誤差の中から最小値を求め,その最小値を実現する量子化代表値およびクラス境界,並びに,その時のクラス数を同定する
ことを特徴とする適応量子化装置。
An adaptive quantizer that quantizes an input signal having a class number of K separately into a class number selected from given class number candidates,
Histogram generating means for generating a histogram of K classes for the input signal;
When the histogram is approximated for each candidate value M of the given number of classes using the set approximation error and the weighting coefficient of the code amount, each candidate of the class boundary is quantized. An approximation error calculating means for calculating an approximation error to be generated;
Information amount calculating means for calculating the amount of code generated by quantization for each candidate of the class boundary;
Weighted sum calculating means for calculating a weighted sum of the approximation error and the code amount;
Storage means for storing class boundary information that minimizes the calculated weighted sum among the class boundary candidates and a minimum value of the weighted sum;
Optimal value tracking means for selecting a class boundary that minimizes the weighted sum for all candidate class boundaries based on the class boundary information and the minimum value of the weighted sum stored in the storage means;
Quantization processing means for quantizing an input signal using the class boundary selected by the optimum value tracking means,
The weighted sum calculation means reads the minimum value of the weighted sum stored in the storage means when selecting a class boundary in the next class among the class boundary candidates, and selects the class boundary at that time. The class boundary that minimizes the weighted sum from the first class to the class is obtained by calculating the minimum value of the weighted sum.
For each candidate value M of the given number of classes, optimization of the weighting coefficient used for the weighted sum of the approximation error and the code amount is performed, and a quantized representative value and Calculate the approximation error when using class boundaries, determine the minimum value from the approximation errors when using each candidate value for the number of classes, quantize representative values and class boundaries that realize the minimum value, and An adaptive quantizer characterized by identifying the number of classes at that time.
請求項1から請求項6までのいずれか1項に記載の適応量子化方法を,コンピュータに実行させるための適応量子化プログラム。   An adaptive quantization program for causing a computer to execute the adaptive quantization method according to any one of claims 1 to 6.
JP2010198576A 2010-09-06 2010-09-06 Adaptive quantization method, adaptive quantization apparatus, and adaptive quantization program Expired - Fee Related JP5426506B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010198576A JP5426506B2 (en) 2010-09-06 2010-09-06 Adaptive quantization method, adaptive quantization apparatus, and adaptive quantization program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010198576A JP5426506B2 (en) 2010-09-06 2010-09-06 Adaptive quantization method, adaptive quantization apparatus, and adaptive quantization program

Publications (2)

Publication Number Publication Date
JP2012060210A true JP2012060210A (en) 2012-03-22
JP5426506B2 JP5426506B2 (en) 2014-02-26

Family

ID=46056829

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010198576A Expired - Fee Related JP5426506B2 (en) 2010-09-06 2010-09-06 Adaptive quantization method, adaptive quantization apparatus, and adaptive quantization program

Country Status (1)

Country Link
JP (1) JP5426506B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017028584A (en) * 2015-07-24 2017-02-02 日本電信電話株式会社 Adaptive quantization method, adaptive quantization device and adaptive quantization program
US9635366B2 (en) 2013-08-30 2017-04-25 Fujitsu Limited Quantization method, coding apparatus, and computer-readable recording medium storing quantization program
CN113258935A (en) * 2021-05-25 2021-08-13 山东大学 Communication compression method based on model weight distribution in federated learning
US11468370B1 (en) 2022-03-07 2022-10-11 Shandong University Communication compression method based on model weight distribution in federated learning

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001518247A (en) * 1997-02-25 2001-10-09 ブリティッシュ ブロードキャスティング コーポレーション Digital signal compression encoding method using improved quantization processing
JP2005348310A (en) * 2004-06-07 2005-12-15 Nippon Telegr & Teleph Corp <Ntt> Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium for storing the program
JP2006157881A (en) * 2004-11-08 2006-06-15 Toshiba Corp Variable-length coding device and method of same
JP2007017659A (en) * 2005-07-07 2007-01-25 Fujitsu Ltd Audio encoding method and device
JP2007504727A (en) * 2003-09-03 2007-03-01 トムソン ライセンシング Process and apparatus for encoding video images
JP2012004616A (en) * 2010-06-14 2012-01-05 Nippon Telegr & Teleph Corp <Ntt> Adaptive quantization method, adaptive quantization apparatus and adaptive quantization program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001518247A (en) * 1997-02-25 2001-10-09 ブリティッシュ ブロードキャスティング コーポレーション Digital signal compression encoding method using improved quantization processing
JP2007504727A (en) * 2003-09-03 2007-03-01 トムソン ライセンシング Process and apparatus for encoding video images
JP2005348310A (en) * 2004-06-07 2005-12-15 Nippon Telegr & Teleph Corp <Ntt> Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium for storing the program
JP2006157881A (en) * 2004-11-08 2006-06-15 Toshiba Corp Variable-length coding device and method of same
JP2007017659A (en) * 2005-07-07 2007-01-25 Fujitsu Ltd Audio encoding method and device
JP2012004616A (en) * 2010-06-14 2012-01-05 Nippon Telegr & Teleph Corp <Ntt> Adaptive quantization method, adaptive quantization apparatus and adaptive quantization program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9635366B2 (en) 2013-08-30 2017-04-25 Fujitsu Limited Quantization method, coding apparatus, and computer-readable recording medium storing quantization program
JP2017028584A (en) * 2015-07-24 2017-02-02 日本電信電話株式会社 Adaptive quantization method, adaptive quantization device and adaptive quantization program
CN113258935A (en) * 2021-05-25 2021-08-13 山东大学 Communication compression method based on model weight distribution in federated learning
CN113258935B (en) * 2021-05-25 2022-03-04 山东大学 Communication compression method based on model weight distribution in federated learning
US11468370B1 (en) 2022-03-07 2022-10-11 Shandong University Communication compression method based on model weight distribution in federated learning

Also Published As

Publication number Publication date
JP5426506B2 (en) 2014-02-26

Similar Documents

Publication Publication Date Title
US6836225B2 (en) Fast search method for nearest neighbor vector quantization
KR20190034985A (en) Method and apparatus of artificial neural network quantization
JP5426506B2 (en) Adaptive quantization method, adaptive quantization apparatus, and adaptive quantization program
JP6867528B2 (en) Periodic integrated envelope sequence generator, periodic integrated envelope sequence generation method, periodic integrated envelope sequence generation program, recording medium
CN110444217B (en) Decoding device, decoding method, and recording medium
JP6633787B2 (en) Linear prediction decoding apparatus, method, program, and recording medium
JP6509973B2 (en) Encoding method, encoding apparatus, program, and recording medium
JP6412993B2 (en) Encoding device, decoding device, encoding method, decoding method, encoding program, decoding program, recording medium
US11531884B2 (en) Separate quantization method of forming combination of 4-bit and 8-bit data of neural network
JP5345977B2 (en) Adaptive quantization method, adaptive quantization apparatus, and adaptive quantization program
WO2010084951A1 (en) Parameter selection method, parameter selection apparatus, program, and recording medium
US20070211804A1 (en) Method And Apparatus For The Digitization Of And For The Data Compression Of Analog Signals
GB2551387A (en) Improved encoding and decoding of geometry data in 3D mesh models
JP2009210644A (en) Linear prediction coefficient calculator, linear prediction coefficient calculation method, linear prediction coefficient calculation program, and storage medium
KR20230010854A (en) An improved concept for the representation of neural network parameters
JP6538572B2 (en) Quantization method, quantization device and quantization program
JP6368287B2 (en) Adaptive quantization method, adaptive quantization apparatus, and adaptive quantization program
CN106463137B (en) Encoding device, method thereof, and recording medium
KR101461840B1 (en) Low complexity target vector identification
JP6441833B2 (en) Quantization method, quantization apparatus, and quantization program
Perić et al. Switched nonuniform polar quantization of sources with a wide dynamic range of power
CN117391143A (en) Method and system for determining bit width for mixed precision neural network calculation
JP2022141513A (en) Arithmetic device, common arithmetic operation setting device, arithmetic method, common arithmetic operation setting method and program
TW202347183A (en) Optimizing method and computing apparatus for deep learning network and computer readable storage medium
CN116579374A (en) Full integer neural network model reasoning method, device, equipment and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120906

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130920

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131008

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131111

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131126

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131128

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5426506

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees