JP5423469B2 - Quantization apparatus, program and method, and moving picture encoding apparatus - Google Patents

Quantization apparatus, program and method, and moving picture encoding apparatus Download PDF

Info

Publication number
JP5423469B2
JP5423469B2 JP2010037845A JP2010037845A JP5423469B2 JP 5423469 B2 JP5423469 B2 JP 5423469B2 JP 2010037845 A JP2010037845 A JP 2010037845A JP 2010037845 A JP2010037845 A JP 2010037845A JP 5423469 B2 JP5423469 B2 JP 5423469B2
Authority
JP
Japan
Prior art keywords
coefficient
quantization
amount
coefficient level
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2010037845A
Other languages
Japanese (ja)
Other versions
JP2011176483A (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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2010037845A priority Critical patent/JP5423469B2/en
Publication of JP2011176483A publication Critical patent/JP2011176483A/en
Application granted granted Critical
Publication of JP5423469B2 publication Critical patent/JP5423469B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、量子化装置、プログラム及び方法、並びに、動画像符号化装置に関し、例えば、H.264等の動画像符号化技術による動画像圧縮符号の処理に適用できる。   The present invention relates to a quantization apparatus, a program and method, and a moving picture encoding apparatus. The present invention can be applied to processing of a moving image compression code by a moving image encoding technique such as H.264.

H.264(ITU-T Rec.H264|ISO/IEC 14496-10)等に代表される動画像符号化技術による動画像情報の圧縮符号化処理は、入力された画像を分割した処理単位毎に、動き補償予測等を行った予測画像と、入力された画像との差分である予測残差信号に、離散コサイン変換等の直交変換を施した変換係数を量子化して、これを可変長符号等のエントロピー符号化することによって高効率の動画像圧縮を実現している。   H. H.264 (ITU-T Rec.H264 | ISO / IEC 14496-10) and other moving image information compression coding processing using moving image coding technology is performed for each processing unit obtained by dividing an input image. The prediction residual signal, which is the difference between the predicted image that has undergone compensated prediction and the input image, is quantized with a transform coefficient that has been subjected to orthogonal transform such as discrete cosine transform, and this is then entropy such as variable-length code. Encoding realizes highly efficient video compression.

この時、量子化処理により量子化雑音が発生し、復号側で再生される復号画像に歪が生じる。一方で、量子化することによって、符号化すべき情報量が削減され高効率の圧縮が実現される。   At this time, quantization noise is generated by the quantization process, and distortion occurs in the decoded image reproduced on the decoding side. On the other hand, by quantizing, the amount of information to be encoded is reduced, and highly efficient compression is realized.

このような歪とレート(符号量)のトレードオフを評価し、符号化モード選択等に利用する技術としてレート歪最適化技術がある。   There is a rate distortion optimization technique as a technique for evaluating such a trade-off between distortion and rate (code amount) and using it for coding mode selection or the like.

すなわち、複数の符号化モード等の選択肢について、その選択肢を選択した場合に得られる復号画像の歪Dと、その選択肢で符号化したときに発生する符号量Rと、ラグランジュ乗数λで表されるRDコストJ(J=D+λR)を最小化するような選択をすることによって、レートと歪のトレードオフが最適な符号化をする方法である。   That is, for options such as a plurality of encoding modes, the distortion D of the decoded image obtained when the option is selected, the code amount R generated when the option is encoded, and the Lagrange multiplier λ In this method, encoding is performed with an optimum trade-off between rate and distortion by making a selection that minimizes the RD cost J (J = D + λR).

通常、歪Dは復号画素値と入力画素値との2乗誤差の和で評価される。   Usually, the distortion D is evaluated by the sum of square errors between the decoded pixel value and the input pixel value.

非特許文献1には、このレート歪最適化技術を変換係数の量子化に利用する方法が開示されている。   Non-Patent Document 1 discloses a method of using this rate distortion optimization technique for transform coefficient quantization.

非特許文献1の方法(従来のRDOQ(Rate Distortion Optimized Quantization))では、H.264符号化処理の量子化処理において、歪Dを画素値の2乗誤差の和で評価する場合、直交変換の性質により、画素値領域での2乗誤差の和を、変換係数領域での2乗誤差の和で近似できること利用して、与えられたブロックのRDコスト(以下の(1)式のように示すことができる)を最小化する方法として定式化している。   In the method of Non-Patent Document 1 (conventional RDOQ (Rate Distortion Optimized Quantization)) In the quantization process of the H.264 encoding process, when distortion D is evaluated as the sum of square errors of pixel values, the sum of square errors in the pixel value area is calculated as 2 in the transform coefficient area due to the nature of orthogonal transformation. Utilizing the fact that it can be approximated by the sum of multiplication errors, it is formulated as a method for minimizing the RD cost (which can be expressed as the following equation (1)) of a given block.

J(λ)=ΣΣJ(λ,cij,lij) …(1)
(1)式において、J(λ,cij,lij)は、変換係数cijを係数レベルlijに量子化して符号化する場合のRDコストであり、以下の(2)式にように示すことができる。
J (λ) = Σ i Σ j J (λ, c ij , l ij ) (1)
In the equation (1), J (λ, c ij , l ij ) is an RD cost when the transform coefficient c ij is quantized to the coefficient level l ij and encoded, as in the following equation (2) Can show.

J(λ,cij,lij)=err(cij,lij
+λbits(lij) …(2)
(2)式において、量子化誤差err(cij,lij)は、以下の(3)式のように示すことができる。
J (λ, c ij , l ij ) = err (c ij , l ij )
+ Λbits (l ij ) (2)
In the equation (2), the quantization error err (c ij , l ij ) can be expressed as the following equation (3).

err(cij,lij)=N(QP%6,i,j)(rij−cij …(3)
(3)式において、rijは、係数レベルlijを逆量子化することによって得られる値であり、以下の(4)式のように示すことができる。
err (c ij , l ij ) = N (QP% 6, i, j) (r ij −c ij ) 2 (3)
In the equation (3), r ij is a value obtained by dequantizing the coefficient level l ij and can be expressed as the following equation (4).

ij=lijR(QP%6,i,j) …(4)
(3)式及び(4)式において、N(QP%6,i,j),R(QP%6,i,j)はそれぞれH.264で用いられる整数変換の、正規化マトリックス、逆量子化スケールマトリックスであり、QPは量子化パラメータである。なお、QP/6,QP%6は、QPを6で割った商と余りを表す。
r ij = l ij R (QP% 6, i, j) (4)
In the equations (3) and (4), N (QP% 6, i, j) and R (QP% 6, i, j) are respectively H. The normalization matrix and the inverse quantization scale matrix of the integer transform used in H.264, and QP is a quantization parameter. Note that QP / 6 and QP% 6 represent the quotient and remainder obtained by dividing QP by 6.

また、(2)式において、bits(lij)はlijをCAVLC(Context−based Adaptive Variable Length Coding)もしくはCABAC(Context−based Adaptive Binary Arithmetic Coding)でエントロピー符号化するときに必要となる符号量である。 Also, in the expression (2), bits (l ij ) is an encoding amount that is required when l ij is encoded by CAVLC (Context-based Adaptive Length Coding) or CABAC (Context-based Adaptive Binary Coding). It is.

さらに、非特許文献1では、使用されるエントロピー符号がCABACの場合とCAVLCの場合について、与えられたcijからlijの複数の候補から上記RDコストを最小化する候補を選択していくアルゴリズムが開示されている。 Further, in Non-Patent Document 1, an algorithm for selecting a candidate for minimizing the RD cost from a plurality of given c ij to l ij for the case where the entropy code used is CABAC and CAVLC. Is disclosed.

そして、|lij|の候補を、以下の(5)〜(8)式のようにおいて、CABACのアルゴリズムでは、主に0,lij floor,lij ceilの3通りからの選択を、主に高周波側から順に、CAVLCのアルゴリズムでは、主に0,1,lij roundの3通りから、主に係数の絶対値が小さい順に、上記RDコストJ(λ)を各係数成分の各係数レベル候補ごとに評価して、その最小値を与える係数レベルを選択している。 In the CABAC algorithm, candidates for | l ij | are mainly selected from three types of 0, l ij floor , and l ij ceil in the following equations (5) to (8). In order from the high frequency side, in the CAVLC algorithm, the above-mentioned RD cost J (λ) is set to each coefficient component candidate for each coefficient component mainly in the order of the absolute value of the coefficient from the three types of 0, 1, and l ij round. Each coefficient level is evaluated and the coefficient level that gives the minimum value is selected.

ij float=|cij|Q(QP%6,i,j)/215+QP/6 …(5)
ij floor=floor(lij float) …(6)
ij ceil=lij floor+1 …(7)
ij round
floor{(|cij|Q(QP%6,i,j)+0.5)/215+QP/6} …(8)
l ij float = | c ij | Q (QP% 6, i, j) / 2 15 + QP / 6 (5)
l ij floor = floor (l ij float) ... (6)
l ij ceil = l ij floor +1 (7)
l ij round =
floor {(| c ij | Q (QP% 6, i, j) +0.5) / 2 15 + QP / 6 } (8)

Marta Karczewicz、Yan Ye、Peisong Chen著、「Rate Distortion Optimized Quantization」、[Online]、INTERNET、[2010年2月10日検索],<URL:http://ftp3.itu.int/av-arch/jvt-site/2008_04_Geneva/JVT-AA026.zip>By Marta Karczewicz, Yan Ye, Peisong Chen, “Rate Distribution Optimized Quantization”, [Online], INTERNET, [Search February 10, 2010], <URL: http://ftp3.itu.int/av-arch/ jvt-site / 2008_04_Geneva / JVT-AA026.zip>

しかしながら、非特許文献1(従来のRDOQ)では、量子化の最適化処理をするための演算量が非常に多く、十分な処理性能で最適な量子化結果を求めることができないという課題があった。   However, Non-Patent Document 1 (conventional RDOQ) has a problem that the amount of calculation for performing the optimization process of quantization is very large, and an optimal quantization result cannot be obtained with sufficient processing performance. .

すなわち、例えば、量子化誤差err(cij,lij)を求めるために乗算2回と、λとの乗算1回と、少なくとも3回の乗算が、ある係数レベル候補のRDコストを評価するために必要であり、3通りの候補を評価する場合には、係数1個あたり、9回程度の乗算が必要となる。 That is, for example, in order to obtain the quantization error err (c ij , l ij ), two multiplications, one multiplication with λ, and at least three multiplications evaluate the RD cost of a certain coefficient level candidate. If three candidates are evaluated, about nine multiplications are required for each coefficient.

また、例えば、CAVLCの場合にlij roundは評価しているが、lij roundと異なる、lij floor、もしくは、lij ceilを評価していないため、比較的高い可能性をもつRDコストが小さくなる係数レベルを選択できていない場合があるという課題があり、例えば単純に選択候補を増やしたとしても、処理量の増大を招いてしまうおそれがある。 In addition, for example, in the case of CAVLC, l ij round is evaluated, but ij floor or l ij ceil, which is different from l ij round , is not evaluated, so the RD cost with a relatively high possibility is high. There is a problem that the coefficient level to be decreased may not be selected. For example, even if the number of selection candidates is simply increased, the processing amount may be increased.

そのため、動画像符号化に係る量子化処理において、処理量を低減させることができる量子化装置、プログラム及び方法、並びに、動画像符号化装置が望まれている。   Therefore, a quantization device, a program and a method, and a moving image encoding device that can reduce the amount of processing in the quantization processing related to moving image encoding are desired.

第1の本発明は、動画像符号化処理において、符号化対象の動画像を構成する入力画像と上記入力画像の予測画像との誤差信号に係る変換係数を、量子化する量子化装置において、(1)上記変換係数に対して量子化のためのスケーリングを施すスケーリング手段と、(2)スケーリングされた上記変換係数の絶対値について小数点以下の切り捨てにより整数化した第1の係数レベル侯補と、第1の係数レベル候補よりも絶対値が1大きい第2の係数レベル候補を決定する係数レベル候補決定手段と、(3)上記第1の係数レベル侯補を選択した場合と、上記第2の係数レベル候補を選択した場合の、量子化誤差の差に相当するスケール化された歪変化量、及び、エントロピー符号化する場合に必要となる符号量の変化量を求め、求めた歪変化量と符号量の変化量とを利用して、上記第1の係数レベル侯補を適用した場合と、上記第2の係数レベル侯補を適用した場合とのレート歪コストの変化量を算出するレート歪コスト変化量算出手段と、(4)上記レート歪コスト変化量算出手段の算出結果に応じて、上記第1の係数レベル候補又は上記第2の係数レベル候補のいずれかを、上記変換係数の量子化に適用する係数レベルとして選択する係数レベル選択手段とを有することを特徴とする。   The first aspect of the present invention is a quantization apparatus that quantizes a transform coefficient related to an error signal between an input image constituting a moving image to be encoded and a predicted image of the input image in the moving image encoding process. (1) scaling means for performing scaling for quantization on the transform coefficient; and (2) a first coefficient level compensation obtained by rounding the absolute value of the scaled transform coefficient into an integer by rounding off the decimal point. , A coefficient level candidate determining means for determining a second coefficient level candidate having an absolute value one larger than that of the first coefficient level candidate, (3) when the first coefficient level compensation is selected, and the second When a coefficient level candidate is selected, a scaled distortion change amount corresponding to the difference in quantization error and a code amount change amount necessary for entropy coding are obtained, and the obtained distortion change is obtained. The amount of change in the rate distortion cost between the case where the first coefficient level compensation is applied and the case where the second coefficient level compensation is applied is calculated using the amount and the change amount of the code amount. Rate distortion cost change amount calculation means; and (4) depending on the calculation result of the rate distortion cost change amount calculation means, either the first coefficient level candidate or the second coefficient level candidate is converted to the conversion coefficient. And coefficient level selection means for selecting a coefficient level to be applied to the quantization.

第2の本発明は、動画像符号化処理において、符号化対象の動画像を構成する入力画像と上記入力画像の予測画像との誤差信号に係る変換係数を、量子化する量子化プログラムにおいて、コンピュータを、(1)上記変換係数に対して量子化のためのスケーリングを施すスケーリング手段と、(2)スケーリングされた上記変換係数の絶対値について小数点以下の切り捨てにより整数化した第1の係数レベル侯補と、第1の係数レベル候補よりも絶対値が1大きい第2の係数レベル候補を決定する係数レベル候補決定手段と、(3)上記第1の係数レベル侯補を選択した場合と、上記第2の係数レベル候補を選択した場合の、量子化誤差の差に相当するスケール化された歪変化量、及び、エントロピー符号化する場合に必要となる符号量の変化量を求め、求めた歪変化量と符号量の変化量とを利用して、上記第1の係数レベル侯補を適用した場合と、上記第2の係数レベル侯補を適用した場合とのレート歪コストの変化量を算出するレート歪コスト変化量算出手段と、(4)上記レート歪コスト変化量算出手段の算出結果に応じて、上記第1の係数レベル候補又は上記第2の係数レベル候補のいずれかを、上記変換係数の量子化に適用する係数レベルとして選択する係数レベル選択手段として機能させることを特徴とする。   The second aspect of the present invention is a quantization program for quantizing a transform coefficient related to an error signal between an input image constituting a moving image to be encoded and a predicted image of the input image in the moving image encoding process. (1) scaling means for performing scaling for quantization on the transform coefficient; and (2) a first coefficient level obtained by converting the absolute value of the scaled transform coefficient into an integer by rounding off a decimal point. Compensation, coefficient level candidate determination means for determining a second coefficient level candidate whose absolute value is one greater than that of the first coefficient level candidate, and (3) when the first coefficient level compensation is selected. When the second coefficient level candidate is selected, the scaled distortion change amount corresponding to the difference in quantization error and the change in the code amount required for entropy coding are used. A rate between the case where the first coefficient level compensation is applied and the case where the second coefficient level compensation is applied using the obtained distortion change amount and code amount change amount Rate distortion cost change amount calculating means for calculating the distortion cost change amount; and (4) the first coefficient level candidate or the second coefficient level candidate according to the calculation result of the rate distortion cost change amount calculating means. Any one of the above is functioned as coefficient level selection means for selecting a coefficient level to be applied to quantization of the transform coefficient.

第3の本発明は、動画像符号化処理において、符号化対象の動画像を構成する入力画像と上記入力画像の予測画像との誤差信号に係る変換係数を、量子化する量子化方法において、(1)上記変換係数に対して量子化のためのスケーリングを施すスケーリング工程と、(2)スケーリングされた上記変換係数の絶対値について小数点以下の切り捨てにより整数化した第1の係数レベル侯補と、第1の係数レベル候補よりも絶対値が1大きい第2の係数レベル候補を決定する上記係数レベル候補決定工程と、(3)上記第1の係数レベル侯補を選択した場合と、上記第2の係数レベル候補を選択した場合の、量子化誤差の差に相当するスケール化された歪変化量、及び、エントロピー符号化する場合に必要となる符号量の変化量を求め、求めた歪変化量と符号量の変化量とを利用して、上記第1の係数レベル侯補を適用した場合と、上記第2の係数レベル侯補を適用した場合とのレート歪コストの変化量を算出するレート歪コスト変化量算出工程と、(4)上記レート歪コスト変化量算出工程の算出結果に応じて、上記第1の係数レベル候補又は上記第2の係数レベル候補のいずれかを、上記変換係数の量子化に適用する係数レベルとして選択する係数レベル選択工程とを有することを特徴とする。
A third aspect of the present invention is a quantization method for quantizing a transform coefficient related to an error signal between an input image constituting a moving image to be encoded and a predicted image of the input image in the moving image encoding process. (1) a scaling step for performing scaling for quantization on the transform coefficient; and (2) a first coefficient level compensation obtained by converting the absolute value of the scaled transform coefficient into an integer by rounding down the decimal point. The coefficient level candidate determination step for determining a second coefficient level candidate whose absolute value is one greater than that of the first coefficient level candidate; (3) when the first coefficient level candidate is selected; When a coefficient level candidate of 2 is selected, the scaled distortion change amount corresponding to the difference in quantization error and the change amount of the code amount necessary for entropy coding are obtained and obtained. Using the change amount and the change amount of the code amount, the change amount of the rate distortion cost between the case where the first coefficient level compensation is applied and the case where the second coefficient level compensation is applied is calculated. A rate distortion cost change amount calculating step, and (4) converting the first coefficient level candidate or the second coefficient level candidate into the conversion according to the calculation result of the rate distortion cost change amount calculating step. And a coefficient level selection step of selecting as a coefficient level to be applied to coefficient quantization.

第4の本発明は、動画像符号化装置において、符号化対象の動画像を構成する入力画像と上記入力画像の予測画像との誤差信号に係る変換係数を、量子化する量子化装置を備え、上記量子化装置として、第1の本発明の量子化装置を適用したことを特徴とする。   According to a fourth aspect of the present invention, there is provided a quantization device that quantizes a transform coefficient related to an error signal between an input image constituting a moving image to be encoded and a predicted image of the input image in the moving image encoding device. The quantization apparatus according to the first aspect of the present invention is applied as the quantization apparatus.

本発明によれば、動画像符号化に係る量子化処理において、処理量を低減させることができる。   According to the present invention, it is possible to reduce the amount of processing in the quantization processing related to moving image coding.

第1の実施形態に係る量子化部(量子化装置)の機能的構成について示したブロック図である。It is the block diagram shown about the functional structure of the quantization part (quantization apparatus) which concerns on 1st Embodiment. 第1の実施形態に係る動画像符号化装置の機能的構成について示したブロック図である。It is the block diagram shown about the functional structure of the moving image encoder which concerns on 1st Embodiment. 第1の実施形態に係る量子化部(量子化装置)の動作について示したフローチャート(1)である。It is the flowchart (1) shown about operation | movement of the quantization part (quantization apparatus) which concerns on 1st Embodiment. 第1の実施形態に係る量子化部(量子化装置)の動作について示したフローチャート(2)である。It is the flowchart (2) shown about operation | movement of the quantization part (quantization apparatus) which concerns on 1st Embodiment. 第2の実施形態に係る量子化部(量子化装置)の動作について示したフローチャートである。It is the flowchart shown about operation | movement of the quantization part (quantization apparatus) which concerns on 2nd Embodiment. 第3の実施形態に係る量子化部(量子化装置)の動作について示したフローチャート(1)である。It is the flowchart (1) shown about operation | movement of the quantization part (quantization apparatus) which concerns on 3rd Embodiment. 第3の実施形態に係る量子化部(量子化装置)の動作について示したフローチャート(2)である。It is the flowchart (2) shown about operation | movement of the quantization part (quantization apparatus) which concerns on 3rd Embodiment. 第4の実施形態に係る量子化部(量子化装置)の動作について示したフローチャートである。It is the flowchart shown about operation | movement of the quantization part (quantization apparatus) which concerns on 4th Embodiment. 第5の実施形態に係る量子化部(量子化装置)の機能的構成について示したブロック図である。It is the block diagram shown about the functional structure of the quantization part (quantization apparatus) which concerns on 5th Embodiment.

(A)第1の実施形態
以下、本発明による量子化装置、プログラム及び方法、並びに、動画像符号化装置の第1の実施形態を、図面を参照しながら詳述する。なお、第1の実施形態の量子化装置は、量子化部であるものとして説明する。
(A) First Embodiment Hereinafter, a first embodiment of a quantization apparatus, a program and a method, and a moving picture coding apparatus according to the present invention will be described in detail with reference to the drawings. Note that the quantization apparatus according to the first embodiment will be described as a quantization unit.

(A−1)第1の実施形態の構成
(A−1−1)動画像符号化装置の全体構成について
図2は、この実施形態の動画像符号化装置10の全体構成を示すブロック図である。
(A-1) Configuration of First Embodiment (A-1-1) Overall Configuration of Video Encoding Device FIG. 2 is a block diagram showing the overall configuration of the video encoding device 10 of this embodiment. is there.

動画像符号化装置10は、予測差信号生成器11、変換部12、量子化部13、エントロピー符号化部14、逆量子化・逆変換部15、復号画像生成部16、フレームバッファ17、予測部18を有している。なお、量子化部13以外の構成要素については、例えば、既存のH.264に準拠した動画像符号化装置と同様のものを適用することができる。   The moving image encoding apparatus 10 includes a prediction difference signal generator 11, a conversion unit 12, a quantization unit 13, an entropy encoding unit 14, an inverse quantization / inverse conversion unit 15, a decoded image generation unit 16, a frame buffer 17, and a prediction. A portion 18 is provided. Note that components other than the quantization unit 13 are, for example, the existing H.264. An apparatus similar to the moving picture encoding apparatus compliant with H.264 can be applied.

動画像符号化装置10は、CPU、ROM、RAM、EEPROM、ハードディスクなどのプログラムの実行構成を有する装置(1台に限定されず、複数台を分散処理し得るようにしたものであっても良い。)に、動画像符号化プログラム(実施形態の量子化プログラムを含む)等をインストールすることにより構築しても良く、その場合でも、機能的には上述の図2のように示すことができる。   The moving image encoding apparatus 10 is an apparatus having a program execution configuration such as a CPU, ROM, RAM, EEPROM, and hard disk (not limited to one, but may be configured to be capable of distributed processing of a plurality of units. )) May be constructed by installing a moving picture encoding program (including the quantization program of the embodiment) or the like, and even in that case, it can be functionally shown as in FIG. .

予測差信号生成器11は、供給された原画像の画像データと予測部18から供給される予測画像とから、予測誤差信号を得て、変換部12に供給する。   The prediction difference signal generator 11 obtains a prediction error signal from the supplied image data of the original image and the prediction image supplied from the prediction unit 18 and supplies the prediction error signal to the conversion unit 12.

変換部12は、予測誤差信号の直交変換処理を行い、周波数成分等の変換係数に変換された予測誤差信号を得て、量子化部13に供給する。   The transform unit 12 performs orthogonal transform processing on the prediction error signal, obtains a prediction error signal converted into a transform coefficient such as a frequency component, and supplies the prediction error signal to the quantization unit 13.

量子化部13は、周波数成分等の変換係数に変換された予測誤差信号を量子化し、量子化された予測誤差信号を得て、エントロピー符号化部14及び逆量子化・逆変換部15に供給する。   The quantization unit 13 quantizes the prediction error signal converted into a conversion coefficient such as a frequency component, obtains a quantized prediction error signal, and supplies the quantized prediction error signal to the entropy encoding unit 14 and the inverse quantization / inverse conversion unit 15. To do.

エントロピー符号化部14は、量子化された予測誤差信号についてエントロピー符号化(例えば、可変長符号化等)を行って、その他の符号化情報とともにストリームのデータを生成する。このストリームのデータが、動画像符号化装置10の出力となる。   The entropy encoding unit 14 performs entropy encoding (for example, variable length encoding) on the quantized prediction error signal, and generates stream data together with other encoding information. The data of this stream becomes the output of the moving image encoding device 10.

逆量子化・逆変換部15は、量子化された予測誤差信号を逆量子化および逆直交変換を行い、量子化誤差を伴う予測誤差信号を得て、復号画像生成部16に供給する。   The inverse quantization / inverse transform unit 15 performs inverse quantization and inverse orthogonal transform on the quantized prediction error signal, obtains a prediction error signal with a quantization error, and supplies it to the decoded image generation unit 16.

復号画像生成部16は、量子化誤差を伴う予測誤差信号と予測画像より復号画像を得る。   The decoded image generation unit 16 obtains a decoded image from the prediction error signal accompanied with the quantization error and the prediction image.

フレームバッファ17は、既に符号化され、局所復号された復号画像を参照画像として記憶する。なお、H.264/AVC標準の場合、動き補償で参照する画像は、現在符号化を行おうとしている画像の直前画像に限定されず、複数の時刻の画像が参照画像となり得る。   The frame buffer 17 stores a decoded image that has already been encoded and locally decoded as a reference image. H. In the case of the H.264 / AVC standard, an image to be referred to in motion compensation is not limited to an image immediately before an image to be currently encoded, and images at a plurality of times can be reference images.

予測部18は、現在符号化を行おうとしている対象時刻の画像データと、その対象時刻と異なる時刻の参照画像から動きベクトル等の予測情報を得て予測画像データを生成し、予測差信号生成器11及び復号画像生成部16に供給する。なお、H.264の場合、対象時刻の既に符号化され、局所復号された復号画像を用いる、イントラ予測による予測画像を供給する場合もある。   The prediction unit 18 obtains prediction information such as a motion vector from image data at a target time to be encoded and a reference image at a time different from the target time, generates predicted image data, and generates a prediction difference signal. To the device 11 and the decoded image generator 16. H. In the case of H.264, a prediction image based on intra prediction using a decoded image that has already been encoded at the target time and is locally decoded may be supplied.

(A−1−2)量子化部の処理概要について
次に、量子化部13による処理の概要について説明する。
(A-1-2) Processing Outline of Quantization Unit Next, an outline of processing by the quantization unit 13 will be described.

量子化部13では、変換係数(例えば、離散コサイン変換等の直交変換を施した変換係数)に対して、量子化のためにスケーリングを施し、スケールされた値cの絶対値をa、cの符号をsとする。そして、aを小数点以下の切り捨てにより整数化したtと、t+1の少なくとも2つを、量子化された係数レベルlの絶対値uの候補とする。さらに、uとして、tを選択した場合と、t+1を選択した場合の、量子化誤差の差に相当するスケールされた歪の変化量△Eを求める(以下単に歪の変化量と記載する)。さらにまた、uとして、tもしくはt+1を選択した場合をエントロピー符号化するのに必要となる、符号量の変化量△Rを求める。 The quantization unit 13 performs scaling for quantization on a transform coefficient (for example, a transform coefficient that has been subjected to orthogonal transform such as discrete cosine transform), and converts the absolute value of the scaled value c i to a i , Let the sign of c i be s i . Then, a t i that integer by truncating the decimal point of a i, at least two t i +1, a candidate of the absolute value u i of the coefficient levels l i quantized. Furthermore, a scaled distortion change amount ΔE corresponding to a difference in quantization error between when t i is selected as u i and when t i +1 is selected (hereinafter simply referred to as a distortion change amount). To describe). Furthermore, as u i, needed to entropy encode If you choose t i or t i +1, obtaining the code amount of variation △ R.

また、ラグランジュ乗数λを係数レベル領域での比較用にスケールしたラグランジュ乗数μをもちいて、tを選択した場合から、t+1を選択した場合へのスケールされたRDコストの変化量(以下単にRDコストの変化量と記載する)を、以下の(9)式により求める。そして、その求めた結果における正負の判断によって、tもしくは、t+1を、係数レベル領域にスケールされたcに対する量子化された係数レベルlの絶対値uとして選択するよう構成する。なお、説明の簡単化のため、添字iは個々の係数成分を表すものとし、例えば、4×4変換の場合は16個の係数成分をわたるものとする。また以下の説明で、特に断りがなければ、Zig−Zagスキャン等のスキャン順に番号づけされているものとする。 Also, the amount of change in the scaled RD cost from the selection of t i to the selection of t i +1 using the Lagrange multiplier μ scaled for comparison in the coefficient level region of the Lagrangian multiplier λ (hereinafter referred to as “r i”). Simply described as the amount of change in RD cost) by the following equation (9). Then, it is configured to select t i or t i +1 as the absolute value u i of the quantized coefficient level l i with respect to c i scaled in the coefficient level region based on the positive / negative determination in the obtained result. . For simplification of explanation, the subscript i represents each coefficient component. For example, in the case of 4 × 4 conversion, 16 coefficient components are crossed. In the following description, it is assumed that numbers are assigned in the order of scanning such as Zig-Zag scanning unless otherwise specified.

△J=△E+μ△R …(9)
ここで、△J,△E,μ,△Rの意味について説明する。
ΔJ = ΔE + μΔR (9)
Here, the meanings of ΔJ, ΔE, μ, and ΔR will be described.

H.264の復号処理で用いられる逆量子化、逆変換は、その演算過程の整数演算の切り捨て等を無視した実数演算と見なした場合、入力する係数レベル領域の値cと出力される画素値領域の値dの間には、量子化パラメータをQPとして、q=(21/6(QP−4)とおくと(ただし21/6は実数としての2の6乗根)、以下の(10)式の関係がほぼ満たされる線形変換となるよう定義されている。 H. When the inverse quantization and inverse transform used in the H.264 decoding process are regarded as real number operations ignoring truncation of integer operations in the calculation process, the value c i of the input coefficient level region and the pixel value to be output If the quantization parameter is QP between the region values d i and q = (2 1/6 ) (QP−4) (where 2 1/6 is the sixth root of 2 as a real number), The linear transformation is defined so that the relationship of the following expression (10) is substantially satisfied.

Σ =Σ …(10)
すなわち、量子化ステップサイズq倍された正規直交変換の近似変換と見なすことができる。
Σ i d i 2 = Σ i q 2 c i 2 (10)
That is, it can be regarded as an approximate transformation of orthonormal transformation multiplied by the quantization step size q.

したがって、変換係数を係数レベル領域にスケールした値cを整数値のある係数レベルlに量子化した場合に、復号画像の画素値の領域に生じる量子化誤差e(c,l)は、以下の(11)式で近似できる。 Therefore, when the value c i that scale factor level region transform coefficient is quantized in the coefficient level l i with integer values, the quantization error e occurring in the region of the pixel values of the decoded image (c i, l i) Can be approximated by the following equation (11).

e(c,l)=q(c−l …(11)
とlは同符号で、2乗されているので、符号を無視して絶対値のみで評価してもよく、それぞれの絶対値をa,uで表すと、以下の(12)式のようになる。
e (c i , l i ) = q 2 (c i −l i ) 2 (11)
Since c i and l i have the same sign and are squared, the sign may be ignored and the evaluation may be performed using only the absolute value. When each absolute value is represented by a i and u i , the following (12 )

e(a,u)=q(a−u …(12)
そして、uとしてtとt+1を選んだ場合の量子化誤差の変化量は、以下の(13)式のようになる。
e (a i, u i) = q 2 (a i -u i) 2 ... (12)
The amount of change in quantization error when t i and t i +1 are selected as u i is expressed by the following equation (13).

△e(a,t)=e(a,t+1)−e(a,t
=2q(1/2−(a−t)) …(13)
そして、全体を1/(2q)倍にスケールして評価すれば、以下の(14)式のように乗算無しで評価できる。
Δe (a i , t i ) = e (a i , t i +1) −e (a i , t i )
= 2q 2 (1 / 2− (a i −t i )) (13)
If the whole is scaled to 1 / (2q 2 ) and evaluated, it can be evaluated without multiplication as in the following equation (14).

△E(a,t)=△e(a,t)/(2q
=1/2−(a−t) …(14)
この時、μを以下の(15)式のようにおけば、RDコストJの変化量を1/(2q)でスケールした値△Jが、上述の(9)式で評価できる。
ΔE (a i , t i ) = Δe (a i , t i ) / (2q 2 )
= 1 / 2- (a i -t i) ... (14)
At this time, if μ is set as in the following equation (15), the value ΔJ obtained by scaling the change amount of the RD cost J by 1 / (2q 2 ) can be evaluated by the above equation (9).

μ=λ/(2q) …(15)
このとき、△Rは、符号量の変化量なので、uとしてtもしくはt+1を選択したときに、符号量の変化するシンタックスエレメントのみの符号量の変化量を求めれば良い。
μ = λ / (2q 2 ) (15)
At this time, since ΔR is the amount of change in the code amount, when t i or t i +1 is selected as u i , the amount of change in the code amount of only the syntax element whose code amount changes may be obtained.

△Jが負(△J<0)のばあいは、uとしてt+1を選択する方がRDコストが減少するとを表し、△Jの正負を判定することにより、tとt+1の選択をすることが可能となる。 △ If J is negative (△ J <0), it represents the person to select a t i +1 as u i is RD cost is reduced, △ by determining the sign of J, t i and t i +1 Can be selected.

ここで、H.264の符号化器を例にすると、入力された原画像と、動き補償等によって求められた予測画像との差である残差信号に対して、以下の(16)式に示すH.264の整数変換を、2次元に適用して得られた変換係数を入力とし、所定の量子化パラメータQPを用いて量子化して得られる係数レベルとして、レート歪的に最適となるような係数レベル値を選択して出力する。量子化処理により得られた係数レベル値は、符号化モード等の選択の上、CABAC,CAVLCといったエントロピー符号化器によりエントロピー符号化され、動画像ストリームとして出力される。また得られた係数レベルは、逆量子化・逆変換して予測画像に加えることで復号画像を再生し、次の予測画像の生成のために使用される。

Figure 0005423469
Here, H. When an H.264 encoder is taken as an example, an H.264 code shown in the following equation (16) is used for a residual signal that is a difference between an input original image and a predicted image obtained by motion compensation or the like. A coefficient level that is optimal in terms of rate distortion as a coefficient level obtained by applying a transform coefficient obtained by applying H.264 integer transform to a two-dimensional input and quantizing using a predetermined quantization parameter QP Select a value and output it. The coefficient level value obtained by the quantization process is entropy-encoded by an entropy encoder such as CABAC or CAVLC after selecting an encoding mode or the like, and is output as a moving image stream. Further, the obtained coefficient level is inversely quantized / inverted and added to the predicted image to reproduce the decoded image, and is used to generate the next predicted image.
Figure 0005423469

以下では、量子化部13において、入力が変換係数、出力が係数レベルである処理として説明する。   Hereinafter, the quantization unit 13 will be described as a process in which an input is a transform coefficient and an output is a coefficient level.

なお、H.264においても、上述の4×4変換のほか、8×8変換や、DC係数を集めたブロックに対するアダマール変換等もあるが、同様に構成可能であるので、以下、4×4変換を例に説明する。   H. In H.264, in addition to the above 4 × 4 transform, there are 8 × 8 transform and Hadamard transform for a block in which DC coefficients are collected. However, since it can be similarly configured, 4 × 4 transform is taken as an example below. explain.

(A−1−3)量子化部の内部構成について
図1は、量子化部13の機能的構成について示したブロック図である。
(A-1-3) Internal Configuration of Quantization Unit FIG. 1 is a block diagram showing a functional configuration of the quantization unit 13.

量子化部13は、スケール計算部131、歪変化量計算部132、レート変化量計算部133、係数レベル選択部134を有している。   The quantization unit 13 includes a scale calculation unit 131, a distortion change amount calculation unit 132, a rate change amount calculation unit 133, and a coefficient level selection unit 134.

量子化部13(量子化装置)は、CPU、ROM、RAM、EEPROM、ハードディスクなどのプログラムの実行構成を有する装置(1台に限定されず、複数台を分散処理し得るようにしたものであっても良い。)に、実施形態の量子化プログラム等をインストールすることにより構築しても良く、その場合でも、機能的には上述の図1のように示すことができる。この実施形態においては、量子化部13は、動画像符号化装置10に搭載されるものとして示しているが、単独の装置(量子化装置)として構成するようにしても良い。動画像符号化装置10が、上述の情報処理装置に動画像符号化プログラムをインストールすることにより構成される場合には、量子化部13は、その動画像符号化プログラムの一部の量子化プログラムとして構築するようにしても良い。   The quantization unit 13 (quantization device) is a device having a program execution configuration such as a CPU, ROM, RAM, EEPROM, hard disk, etc. (not limited to one, but capable of distributed processing of a plurality of devices). May be constructed by installing the quantization program or the like of the embodiment, and even in that case, it can be functionally shown as in FIG. In this embodiment, the quantization unit 13 is illustrated as being mounted on the moving image encoding device 10, but may be configured as a single device (quantization device). When the moving image encoding apparatus 10 is configured by installing a moving image encoding program in the information processing apparatus described above, the quantization unit 13 is a quantization program that is a part of the moving image encoding program. You may make it build as.

量子化部13では、スケール計算部131により、整数変換によって求められた変換係数に対して、量子化パラメータQPに応じたスケーリングを施す。すなわち、変換係数gjkに対して、スケールされた係数cjkの各要素(以下、「係数成分」ともいう)を以下の(17)式により求める。 In the quantization unit 13, the scale calculation unit 131 performs scaling according to the quantization parameter QP on the transform coefficient obtained by integer transform. That is, each element (hereinafter also referred to as “coefficient component”) of the scaled coefficient c jk is obtained by the following expression (17) with respect to the conversion coefficient g jk .

jk=gjkQ(QP%6,j,k)/215+QP/6 …(17)
ここで、Q(QP%6,j,k)は、量子化時のスケールマトリックス、QP/6,QP%6はそれぞれ、QPを6で割った商と余り、215+QP/6による除算は、実数としての除算である。
c jk = g jk Q (QP% 6, j, k) / 2 15 + QP / 6 (17)
Here, Q (QP% 6, j, k) is a scale matrix at the time of quantization, and QP / 6 and QP% 6 are the quotient obtained by dividing QP by 6, respectively, and the division by 215 + QP / 6 is Division as a real number.

なお、この除算は、cjkを適当な精度の固定少数で表現すれば、15+QP/6から小数点以下のビット数を引いた数による右シフト演算で行うことができる。例えば、cjkを小数点以下11ビットの固定少数で表現する場合は、4+QP/6ビットの右シフトとなる。 Note that this division can be performed by a right shift operation using a number obtained by subtracting the number of bits after the decimal point from 15 + QP / 6 if c jk is expressed by a fixed decimal number with appropriate accuracy. For example, when c jk is expressed by a fixed decimal having 11 bits after the decimal point, it is a 4 + QP / 6 bit right shift.

4×4以外の変換では、スケールマトリックス、シフト量等が異なるが、変換係数領域の値を、係数レベル領域の整数化されていない値ヘスケールする同様の処理を行う。   In conversions other than 4 × 4, the scale matrix, the shift amount, and the like are different, but the same processing is performed to scale the values in the conversion coefficient region to values that are not integerized in the coefficient level region.

ここでは、以下の説明の簡単化のため、スケールされた係数cijを、Zig−Zagスキャン順に、改めて、cと記述することとし、以下の(18)式に示すように、その絶対値をa、(19)式に示すように符号をsと記述する。ただし、i=0、…、Mであり、Mは、対象係数ブロックの係数成分数−1とする。 Here, for simplification of the following description, the scaled coefficient c ij will be described again as c i in the Zig-Zag scan order, and its absolute value as shown in the following equation (18). A i , and the code as s i as shown in equation (19). However, i = 0,..., M, where M is the number of coefficient components of the target coefficient block−1.

=|c| …(18)
=sign(c) …(19)
また以下の説明で、これらの値に対する演算を実数演算のように記述するが、適当な精度の固定少数表現によって、整数演算器で処理することも可能である。なお、上記スケーリング時の右シフトは、gjkの絶対値に対して行うようにしてもよい。
a i = | c i | (18)
s i = sign (c i ) (19)
In the following description, operations for these values are described as real number operations, but can be processed by an integer arithmetic unit using a fixed decimal representation with appropriate precision. The right shift at the time of scaling may be performed on the absolute value of g jk .

絶対値aの整数部分(aを超えない最大の整数)をtとおくと、tは以下の(20)式のように示される。 If the integer part of the absolute value a i (the maximum integer not exceeding a i ) is set to t i , t i is expressed as in the following equation (20).

=floor(a) …(20)
そして、スケールされた係数cに対する係数レベルlの絶対値uの候補として、tと、t+1の少なくとも2つを候補とする(△Rの評価をスキップして、tを選択する場合も含む)。
t i = floor (a i ) (20)
Then, as a candidate of the absolute value u i of the coefficient levels l i relative to the scale coefficients c i, and t i, and at least two candidates for t i +1 (△ skipping evaluation of R, a t i Including the case of selection).

歪変化量計算部132では、以下の(21)式について求める。   The distortion change amount calculation unit 132 calculates the following equation (21).

△E(a,t)=1/2−(a−t) …(21)
レート変化量計算部133では、CABAC、CAVLC等のそれぞれのエントロピー符号化器によって両候補に対して発生するであろう符号量の変化量△Rを求める。レート変化量計算部133の処理については、後述する動作説明において詳述する。
ΔE (a i , t i ) = 1 / 2− (a i −t i ) (21)
The rate change amount calculation unit 133 obtains a change amount ΔR of the code amount that will be generated for both candidates by respective entropy encoders such as CABAC and CAVLC. The processing of the rate change amount calculation unit 133 will be described in detail in the operation description to be described later.

係数レベル選択部134は、あらかじめ計算しておいたスケールされたラグランジュ乗数μを用いて、RDコストの変化量の評価式(上述の(9)式)の符号の判定に相当する判断により、最適な係数レベルの選択を行い係数レベル値lを出力する。 The coefficient level selection unit 134 uses the scaled Lagrangian multiplier μ that has been calculated in advance to determine the optimum value based on the determination corresponding to the determination of the sign of the RD cost change evaluation formula (the above-described formula (9)). The coefficient level value l i is output by selecting a suitable coefficient level.

(A−2)第1の実施形態の動作
次に、以上のような構成を有する第1の実施形態の動画像符号化装置10について、量子化部13の動作を中心に説明する。
(A-2) Operation of the First Embodiment Next, the video encoding device 10 of the first embodiment having the above configuration will be described focusing on the operation of the quantization unit 13.

第1の実施形態では、エントロピー符号化部14によるエントロピー符号化がCABACである場合に、量子化部13における処理で、非特許文献1と同様な処理手順(係数成分の決定順)で、与えられた係数ブロックの、個々の成分の係数レベルを選択していく例について説明する。CABACによるエントロピー符号化では、変換係数における係数成分のスキャン順で最終非ゼロ係数であることを表すシンタックスを有するため、第1の実施形態では、このCABACの特性を考慮した量子化処理が行われる。   In the first embodiment, when the entropy encoding performed by the entropy encoding unit 14 is CABAC, the processing in the quantization unit 13 is performed in the same processing procedure (decision order of coefficient components) as in Non-Patent Document 1. An example of selecting coefficient levels of individual components of the obtained coefficient block will be described. Since the entropy coding by CABAC has a syntax that represents the final non-zero coefficient in the scan order of the coefficient component in the transform coefficient, in the first embodiment, a quantization process is performed in consideration of the characteristics of the CABAC. Is called.

図3は、第1の実施形態の量子化部13における量子化処理の処理手順を示す図である。   FIG. 3 is a diagram illustrating a processing procedure of a quantization process in the quantization unit 13 of the first embodiment.

まず、量子化部13では、入力された変換係数を量子化パラメータQPに応じてスケーリングを施した、スケールされた係数cが求められる(S101)。ただしi=0,…,MはZig−Zagスキャン等のスキャン順であるものとする。 First, the quantization unit 13 obtains a scaled coefficient c i obtained by scaling the input transform coefficient in accordance with the quantization parameter QP (S101). Here, i = 0,..., M is assumed to be a scan order such as a Zig-Zag scan.

次に、量子化部13では、cの絶対値aについて、係数レベルlの絶対値uの侯補として、上記の(20)式によりtが求められる(S102)。 Then, the quantization unit 13, the absolute value a i of c i, as Hoho absolute value u i of the coefficient levels l i, t i is calculated by the above expression (20) (S102).

そして、量子化部13では、上記の(21)式により、歪変化量△Eが求められる。ここで、△E≧0であるiについては、u=tとし、以降の処理では、t+1は候補としないものとする。 Then, the quantization unit 13 obtains the distortion change amount ΔE i by the above equation (21). Here, for i where ΔE i ≧ 0, u i = t i, and in the subsequent processing, t i +1 is not a candidate.

次に、量子化部13では、非ゼロの係数レベルを選択する変換係数の内、スキャン順でもっとも最後となる(もっとも番号の大きな)係数の位置kが決定される(S103)。   Next, the quantization unit 13 determines the position k of the last coefficient (the largest number) in the scan order among the transform coefficients for selecting the non-zero coefficient level (S103).

図4は、ステップS103における最終非ゼロ係数位置の決定処理の詳細について示したフローチャートである。   FIG. 4 is a flowchart showing details of the final non-zero coefficient position determination process in step S103.

図4では、kの候補としては、i,…iを考慮する。ただし、iはa>0.5であるiの最大値であり、iはa>1であるiの最大値(なければ−1)であるものとする。 In FIG. 4, i 0 ,... I 1 are considered as k candidates. Here, i 1 is the maximum value of i for which a i > 0.5, and i 0 is the maximum value of i for which a i > 1 (-1 if not).

以下の説明において、bits()はかっこ内の情報をCABACで符号化するのに必要となるビット数の近似値(符号化するシンタックスのコンテクストにおける確率状態変数を用いて計算、算術符号であるのでビット数は整数とは限らない)であるものとする。また、codedは、coded_block_flagであり、lastはlast_significant _coeff_flagであり、uは付随する符号sとあわせた係数レベルlに関するシンタックス、significant_coeff_flag,coeff_abs_level_minus1、coeff_sign_flagの略記とする。 In the following description, bits () is an approximate value of the number of bits necessary to encode information in parentheses with CABAC (calculated using a probability state variable in the context of the syntax to be encoded, an arithmetic code. Therefore, the number of bits is not necessarily an integer). Also, coded is coded_block_flag, last i is last_significant_coeff_flag, and u i is a syntax related to coefficient level l i combined with associated code s i , significant_coeff_flag_

まず、候補範囲として、i、…、iが設定されたものとする(S201)。 First, it is assumed that i 0 ,..., I 1 are set as candidate ranges (S201).

次に、以下の(22)式〜(25)式により、各変数の初期化が行われる。   Next, each variable is initialized by the following formulas (22) to (25).

k=i …(22)
e=0 …(23)
r=bits(coded=1)−bits(coded=0)
(i==−1のとき) …(24)
r=bits(last=0)−bits(last=1)
(i≧0のとき) …(25)
次に、候補範囲内(i=i+1,…,i)で、k、e、rの更新を繰り返す(S203、S204)。
k = i 0 (22)
e = 0 (23)
r = bits (coded = 1) −bits (coded = 0)
(When i 0 == − 1) (24)
r = bits (last k = 0) −bits (last k = 1)
(When i 0 ≧ 0) (25)
Next, updating of k, e, r is repeated within the candidate range (i = i 0 +1,..., I 1 ) (S203, S204).

ステップS203、S204では、まず、p及びbを、それぞれ、以下の(26)式及び(27)式により求める。そして、p及びbの結果に応じて、k、e、rの更新を行う。   In steps S203 and S204, first, p and b are obtained by the following equations (26) and (27), respectively. Then, k, e, and r are updated according to the results of p and b.

p=△E+μ(bits(u=1,last=0)
−bits(u=0))…(26)
b=e+△E+μ(r+bits(u=1,last=1) …(27)
[b<0の場合について]
k=iに更新する。
p = ΔE i + μ (bits (u i = 1, last i = 0)
-Bits (u i = 0)) (26)
b = e + ΔE i + μ (r + bits (u i = 1, last i = 1) (27)
[For b <0]
Update to k = i.

p<0の場合には、e及びrについて、以下の(28)式及び(29)式のように求める。   In the case of p <0, e and r are obtained as in the following equations (28) and (29).

e=0 …(28)
r=bits(last=0)−bits(last=1)…(29)
p≧0の場合には、e及びrについて、以下の(30)式及び(31)式のように求める。
e = 0 (28)
r = bits (last k = 0) −bits (last k = 1) (29)
In the case of p ≧ 0, e and r are obtained as in the following equations (30) and (31).

e=−△E …(30)
r=bits(u=0)−bits(u=1,last=0) …(31)
[b≧0の場合について]
p<0の場合には、e及びrについて、以下の(32)式及び(33)式のように求める。
e = −ΔE i (30)
r = bits (u i = 0) −bits (u i = 1, last i = 0) (31)
[For b ≧ 0]
In the case of p <0, e and r are obtained as in the following equations (32) and (33).

e=e+△E …(32)
r=r+bits(u=1,last=0) …(33)
p≧0の場合には、rについて以下の(34)式のように求める。
e = e + ΔE i (32)
r = r + bits (u i = 1, last i = 0) (33)
In the case of p ≧ 0, r is obtained as in the following equation (34).

r=r+bits(u=0) …(34)
上述のように、ステップS203、S204によるk、e、rの更新が行われた後、得られたkを最終非ゼロ係数位置とする(S205)。ただし、k=−1の場合は、対象ブロックは係数なしとする。
r = r + bits (u i = 0) (34)
As described above, after k, e, and r are updated in steps S203 and S204, the obtained k is set as the final non-zero coefficient position (S205). However, when k = −1, the target block has no coefficient.

ここで、上述の図4に示すフローチャートで用いられている変数について説明する。   Here, the variables used in the flowchart shown in FIG. 4 will be described.

「k」は上記処理過程の、暫定の最終非ゼロ係数位置である(k=−1は非ゼロ係数なしを表す)。   “K” is a provisional final non-zero coefficient position in the above process (k = −1 indicates no non-zero coefficient).

「e」はkが最終非ゼロ係数位置であった場合から、kを最終とはしない場合への歪の変化量をiまで累積した値である。   “E” is a value obtained by accumulating the amount of change in distortion from the case where k is the final non-zero coefficient position to the case where k is not the final position up to i.

「r」はkが最終非ゼロ係数位置であった場合から、kを最終とはしない場合への符号量の変化量をiまで累積した値である。   “R” is a value obtained by accumulating the amount of change in the code amount from when k is the final non-zero coefficient position to when i is not the final position up to i.

b<0の意味は、iの位置を最終非ゼロ係数位置としたほうが、kであった場合よりもRDコストが減少することを表す。   The meaning of b <0 indicates that the RD cost is reduced when the position of i is the final non-zero coefficient position than when k is set.

p<0の意味は、iよりもスキャン順の大きな位置が最終非ゼロ係数位置となると仮定した場合に、iの位置の係数レベルの絶対値として0よりも1を選択するほうがRDコストが減少することを表す。   The meaning of p <0 means that if it is assumed that the position in the scanning order larger than i is the final non-zero coefficient position, selecting 1 as the absolute value of the coefficient level at the position of i reduces RD cost. Represents what to do.

次に、係数レベル選択部134では、上述の図4の処理により、得られたkを用いて、i=k.…,0について、係数レベルを選択していく(S104)。すなわち、kからスキャンの逆順に、各iについて、符号量の変化量△Rは、以下の(35)式のように求め、以下の(36)式に示すRDコストの変化量の符号の判断により、tもしくは、t+1から係数レベルを選択していく。すなわち、△J<0の場合にt+1を選択する。 なお、上述したように、△E≧0であるiについては、u=tとし、この判断をスキップする。 Next, the coefficient level selection unit 134 uses the k obtained by the processing of FIG. .., 0, coefficient levels are selected (S104). That is, the k in the reverse order of scan, for each i, the code amount of the change amount △ R i, the following (35) determined as equation below (36) the variation of the RD cost in the expression of the code Depending on the judgment, the coefficient level is selected from t i or t i +1. That is, t i +1 is selected when ΔJ i <0. As described above, for i for which ΔE i ≧ 0, u i = t i and this determination is skipped.

△R=bits(u=t+1)−bits(u=t) …(35)
△J=△E+μ△R …(36)
ここで、さらに符号量の変化量△Rについては、CABACでの係数レベルの表現方法に依存して、tの大きさに応じて、以下の4つの場合ごとに、効率的に求めることができる。CABACの算術符号による符号量は、確率状態変数に依存し、繰り返し使用される確率状態変数については、正確には状態遷移させつつ評価したほうがよいが、状態遷移なしで近似してもよい。
ΔR i = bits (u i = t i +1) −bits (u i = t i ) (35)
ΔJ i = ΔE i + μΔR i (36)
Here, the change amount ΔR i of the code amount is further efficiently obtained for each of the following four cases depending on the magnitude of t i depending on the coefficient level expression method in CABAC. Can do. The code amount by the CABAC arithmetic code depends on the probability state variable, and it is better to evaluate the state variable repeatedly used while performing state transition, but it may be approximated without state transition.

[t>14の場合]
この場合、△Rは、確率状態変数に依存しなくなり、coeff_abs_level_minus1のsuffix部分長さの違いのみとなり、△Rは0もしくは2となる。
[If t i > 14]
In this case, ΔR i does not depend on the probability state variable, only the difference of the suffix part length of coeff_abs_level_minus1 is obtained, and ΔR i is 0 or 2.

[2≦t≦14の場合]
この場合、△Rは、coeff_abs_level_minus1に関する1つの確率状態変数のみに依存し、tが13通り、確率状態変数が、128通りの、△Rのテーブルをあらかじめ作成しておくことができる。
[When 2 ≦ t i ≦ 14]
In this case, ΔR i depends on only one probability state variable related to coeff_abs_level_minus1, and a table of ΔR i can be created in advance with t i having 13 patterns and 128 probability state variables.

また、CABACでは、この1つの確率状態変数が一つのcoeff_abs_level_minus1の符号化中に状態遷移しつつ繰り返し使用されるため、状態遷移させた上での符号量差をテーブル化することもできる。   Also, in CABAC, this one probability state variable is repeatedly used while performing state transition during the encoding of one coeff_abs_level_minus1, so that the code amount difference after state transition can also be tabulated.

[t=1の場合]
この場合、△Rは、coeff_abs_level_minus1に関する2つの確率状態変数に依存するが、2つのbinの符号量差のみを求めればよい。
[When t i = 1]
In this case, ΔR i depends on two probability state variables related to coeff_abs_level_minus1, but it is only necessary to obtain the code amount difference between the two bins.

[t=0]
この場合、△Rは、significant_coeff_flagとcoeff_abs_level_minus1の最初のbinのみに関係し、これに関する2つの確率状態変数から求めることができる。
[t i = 0]
In this case, ΔR i is related only to the first bin of the significant_coeff_flag and coeff_abs_level_minus1, and can be obtained from two probability state variables related thereto.

以上の処理により、従来のRDOQのCABACアルゴリズムと同等にレート歪的に最適な係数レベルの選択を、より少ない演算量、処理量で行うことが可能となる。   With the above processing, it is possible to select a coefficient level that is optimal in terms of rate distortion equivalent to the conventional RDOQ CABAC algorithm with a smaller amount of computation and processing.

(A−3)第1の実施形態の効果
第1の実施形態によれば、非特許文献1に記載のRDOQのCABACアルゴリズムと同様にレート歪み的に最適な係数レベルの選択を、より少ない処理量(演算量)で行うことができる。
(A-3) Effect of First Embodiment According to the first embodiment, the coefficient level that is optimal in terms of rate distortion can be selected with less processing as in the RDOQ CABAC algorithm described in Non-Patent Document 1. It can be performed in quantity (calculation amount).

(B)第2の実施形態
以下、本発明による量子化装置、プログラム及び方法、並びに、動画像符号化装置の第2の実施形態を、図面を参照しながら詳述する。なお、第2の実施形態の量子化装置は、量子化部であるものとして説明する。
(B) Second Embodiment Hereinafter, a second embodiment of a quantization apparatus, a program and a method, and a moving picture coding apparatus according to the present invention will be described in detail with reference to the drawings. Note that the quantization apparatus according to the second embodiment will be described as a quantization unit.

(B−1)第2の実施形態の構成及び動作
第2の実施形態の量子化部及び動画像符号化装置も、図1により示すことができる。
(B-1) Configuration and Operation of Second Embodiment The quantization unit and the moving image encoding device of the second embodiment can also be shown in FIG.

第2の実施形態では、エントロピー符号化部14がCAVLCに対応しており、量子化部13において、非特許文献1と同様な処理手順(係数成分の決定順)で、与えられた係数ブロックの、個々の成分の係数レベルを選択していく点で第1の実施形態と異なっている。それ以外の構成については、第1の実施形態と同様であるので詳しい説明を省略し、以下では、第2の実施形態について、第1の実施形態との差異を中心に説明を行う。   In the second embodiment, the entropy encoding unit 14 supports CAVLC, and the quantization unit 13 performs processing procedures similar to those of Non-Patent Document 1 (decision order of coefficient components) for given coefficient blocks. This is different from the first embodiment in that the coefficient level of each component is selected. Since other configurations are the same as those in the first embodiment, detailed description thereof will be omitted, and in the following, the second embodiment will be described focusing on differences from the first embodiment.

CAVLCによるエントロピー符号化処理では、ゼロ係数のランレングス符号化が含まれるため、第2の実施形態では、CAVLCのこの特性を考慮した量子化が行われる。   Since entropy encoding processing by CAVLC includes run-length encoding of zero coefficients, in the second embodiment, quantization is performed in consideration of this characteristic of CAVLC.

図5は、第2の実施形態の量子化部13の処理について示したフローチャートである。   FIG. 5 is a flowchart illustrating the processing of the quantization unit 13 according to the second embodiment.

まず、量子化部13では、入力された変換係数を量子化パラメータQPに応じてスケーリングを施した、スケールされた係数cを求める(S301)。ただし、i=0,…,Mは、第1の実施形態とは異なり、スケールされた係数cjkをその絶対値の小さい順にソートした順に番号付けされるものとする(S302)。すなわち、cが絶対値最小の係数とする。 First, the quantization unit 13 obtains a scaled coefficient c i obtained by scaling the input transform coefficient according to the quantization parameter QP (S301). However, i = 0,..., M are numbered in the order in which the scaled coefficients c jk are sorted in ascending order of their absolute values, unlike the first embodiment (S302). That is, c 0 is a coefficient having the minimum absolute value.

次に、量子化部13では、cの絶対値aについて、係数レベルlの絶対値uの初期値として、以下の(37)式により、初期化する(S303)。ここで、係数レベルの初期値の選択は、例えば、(37)式のfとして、従来のRDOQと同様、イントラピクチャではf=1/3、インターピクチャではf=1/6とする場合や、その他の、さまざまな簡易な量子化方法を用いるなどとしてもよい。 Next, the quantization unit 13 initializes the absolute value a i of c i as an initial value of the absolute value u i of the coefficient level l i by the following equation (37) (S303). Here, the selection of the initial value of the coefficient level is, for example, in the case of f = 1/3 for an intra picture and f = 1/6 for an inter picture, as in the conventional RDOQ, as f in Expression (37). Other various simple quantization methods may be used.

=floor(a+f) …(37)
また、量子化部13では、係数レベルlの絶対値u候補として、以下の(38)によりtを求め、以下の(39)により歪変化量△Eを求める。
u i = floor (a i + f) (37)
Also, the quantization unit 13, as an absolute value u i candidates coefficient levels l i, obtains a t i by the following (38) to obtain the strain variation △ E i according to the following (39).

=floor(a) …(38)
△E=△E(a,t)=1/2−(a−t) …(39)
ここで、△E≧0であるiについては、u=tとし、以降の処理では、t+1は候補としない。
t i = floor (a i ) (38)
ΔE i = ΔE (a i , t i ) = 1 / 2− (a i −t i ) (39)
Here, for i where ΔE i ≧ 0, u i = t i, and in the subsequent processing, t i +1 is not a candidate.

以上の準備の下、量子化部13では、スケールされた係数cの絶対値が小さい順i=0,…,Mに、係数レベルlを選択していく(S304)。すなわち、絶対値最小のcから順に、各iについて、uとしてtを選択した場合とt+1を選択した場合の符号量の変化量△Rをもとめ、以下の(40)式に示すRDコストの変化量の符号の判断により、tもしくは、t+1から係数レベルを選択していく。すなわち、△J<0の場合にt+1を選択する。選択されたu用いて、係数レベルlを順次更新していく。 With the above preparation, the quantizing unit 13 selects coefficient levels l i in the order i = 0,..., M in which the absolute values of the scaled coefficients c i are small (S304). That is, in order from c 0 having the smallest absolute value, for each i, the change amount ΔR i of the code amount when t i is selected as u i and when t i +1 is selected, and the following equation (40) is obtained: The coefficient level is selected from t i or t i +1 by determining the sign of the amount of change in the RD cost shown in FIG. That is, t i +1 is selected when ΔJ i <0. The coefficient level l i is sequentially updated using the selected u i .

△J=△E+μ△R …(40)
なお、上述したように、△E≧0であるiについては、u=tとし、この判断をスキップする。
ΔJ i = ΔE i + μΔR i (40)
As described above, for i for which ΔE i ≧ 0, u i = t i and this determination is skipped.

符号量の変化量△Rの算出時には必要に応じて、初期値のままの、あるいは、上記処理により更新された場合は、更新された係数レベルlを参照して算出する。 When calculating the amount of change ΔR i of the code amount, if necessary, the initial value is maintained, or if it is updated by the above processing, it is calculated with reference to the updated coefficient level l i .

ここで、さらに符号量の変化量△Rについては、tを選択した場合と、t+1を選択した場合の間で、符号量に変化のあるシンタックスエレメントのみを考慮すればよい。すなわち、以下のような場合ごとに、効率的に△Rの計算処理に関連するシンタックスエレメントを絞り込むことができる。 Here, regarding the amount of change ΔR i of the code amount, only the syntax element having a change in the code amount between the case where t i is selected and the case where t i +1 is selected may be considered. That is, the syntax elements related to the calculation process of ΔR i can be efficiently narrowed for each of the following cases.

[第1の要件]
>1の場合は、coeff−tokenに影響しないので、無視できる。
[First requirement]
When t i > 1, it does not affect the coeff-token and can be ignored.

[第2の要件]
>0の場合は、total_zeros,run_beforeに影響しないので、無視できる。
[Second requirement]
When t i > 0, total_zeros and run_before are not affected and can be ignored.

[第3の要件]
suffixLengthの更新に影響がなければ、i番目以外の係数レベルに関するtrailing_ones_sign_flag,level_prefix,level_suffix等は無視できる。なお、suffixLengthへの影響を無視して、常にi番目以外の係数レベルに関するシンタックスを無視する処理としてもよい。
[Third requirement]
If there is no effect on the update of suffixLength, trailing_ones_sign_flag, level_prefix, level_suffix, etc. relating to coefficient levels other than the i-th coefficient can be ignored. In addition, it is good also as a process which ignores the influence on suffixLength and always ignores the syntax regarding coefficient levels other than the i-th.

[第4の要件]
level_prefixに変化がなければ、△R=0である。
[Fourth requirement]
If there is no change in level_prefix, ΔR i = 0.

(B−2)第2の実施形態の効果
第2の実施形態によれば、以下のような効果を奏することができる。
(B-2) Effects of Second Embodiment According to the second embodiment, the following effects can be achieved.

非特許文献1に記載された従来のRDOQのCAVLCアルゴリズムと同等にレート歪的に最適な係数レベルの選択を、より少ない演算量、処理量で行うことができる。   Selection of the optimum coefficient level in terms of rate distortion can be performed with a smaller amount of calculation and processing amount as in the conventional RDOQ CAVLC algorithm described in Non-Patent Document 1.

また、非特許文献1に記載された従来のRDOQのCAVLCアルゴリズムでは評価漏れしていた、レート歪的に最適となる可能性の高い、切り上げ、切り捨ての両候補を評価できているので、より符号化効率が向上させることができる。   In addition, since the conventional RDOQ CAVLC algorithm described in Non-Patent Document 1 is not evaluated, it is likely to be optimal in terms of rate distortion. Efficiency can be improved.

(C)第3の実施形態
以下、本発明による量子化装置、プログラム及び方法、並びに、動画像符号化装置の第3の実施形態を、図面を参照しながら詳述する。なお、第3の実施形態の量子化装置は、量子化部であるものとして説明する。
(C) Third Embodiment Hereinafter, a third embodiment of a quantization device, a program and a method, and a moving image coding device according to the present invention will be described in detail with reference to the drawings. Note that the quantization apparatus according to the third embodiment will be described as a quantization unit.

(C−1)第3の実施形態の構成及び動作
第3の実施形態の量子化部及び動画像符号化装置も、図1により示すことができる。
(C-1) Configuration and Operation of Third Embodiment A quantization unit and a moving image encoding apparatus of the third embodiment can also be shown in FIG.

第3の実施形態では、エントロピー符号化部14がCABACに対応しており、量子化部13において、第1の実施形態とは異なる処理手順(係数成分の決定順)で、与えられた係数ブロックの、個々の成分の係数レベルを選択していく点で、第1の実施形態と異なっている。それ以外の構成については、第1の実施形態と同様であるので詳しい説明を省略し、以下では、第3の実施形態について、第1の実施形態との差異を中心に説明を行う。   In the third embodiment, the entropy encoding unit 14 supports CABAC, and the quantization unit 13 is provided with a coefficient block in a processing procedure (decision order of coefficient components) different from that of the first embodiment. This is different from the first embodiment in that the coefficient level of each component is selected. Since the other configuration is the same as that of the first embodiment, a detailed description thereof will be omitted. In the following, the third embodiment will be described focusing on differences from the first embodiment.

図6は、第3の実施形態の量子化部13の処理について示したフローチャートである。   FIG. 6 is a flowchart illustrating the processing of the quantization unit 13 according to the third embodiment.

まず、量子化部13では、入力された変換係数を量子化パラメータQPに応じてスケーリングを施した、スケールされた係数cが求められる(S401)。(ただし、i=0,…,MはZig−Zagスキャン等のスキャン順)
次に、量子化部13では、cの絶対値aについて、係数レベルlの絶対値uの候補として、以下の(41)式によりtを求め、さらに、以下の(41)式により歪変化量△Eが求められる。
First, the quantization unit 13 obtains a scaled coefficient c i obtained by scaling the input transform coefficient according to the quantization parameter QP (S401). (Where i = 0,..., M is the scan order such as Zig-Zag scan)
Then, the quantization unit 13, the absolute value a i of c i, as a candidate of the absolute value u i of the coefficient levels l i, obtains a t i by the following equation (41), further, the following (41) The strain change amount ΔE i is obtained from the equation.

=floor(a) …(41)
△E=△E(a,t)=1/2−(a−t) …(42)
ここで、△E≧0であるiについては、u=tとし、以降の処理では、t+1は候補としない。
t i = floor (a i ) (41)
ΔE i = ΔE (a i , t i ) = 1 / 2− (a i −t i ) (42)
Here, for i where ΔE i ≧ 0, u i = t i, and in the subsequent processing, t i +1 is not a candidate.

次に、非ゼロの係数レベルを選択する変換係数の内、スキャン順でもっとも最後となる(もっとも番号の大きな)係数の位置kを決定する(S402、S403)。   Next, the position k of the last coefficient (the largest number) in the scan order among the transform coefficients for selecting the non-zero coefficient level is determined (S402, S403).

第1の実施形態(上述の図4)との違いは、スキャンの逆順に処理を行うことである。すなわち、第1の実施形態では、kの候補範囲であるi,…,iについて、kを決定するために順方向に処理を行っているが、第3の実施形態では、i=Mからスキャンの逆順に、iの位置を求め(S402)、iに相当する位置まで、kの位置を探索する(S403)。 The difference from the first embodiment (FIG. 4 described above) is that processing is performed in the reverse order of scanning. In other words, in the first embodiment, i 0 ,..., I 1 that are candidate ranges of k are processed in the forward direction to determine k, but in the third embodiment, i = M In the reverse order of scanning, the position of i 1 is obtained (S402), and the position of k is searched for up to the position corresponding to i 0 (S403).

量子化部13では、kの候補としては、i,…,iを考慮する。ただし、iはa>0.5であるiの最大値とし、iはa>1であるiの最大値(なければ−1)とする。そして、このようなiがなければ、対象ブロックは係数なしとして以下の処理は行わないものとする。 The quantization unit 13 considers i 1 ,..., I 0 as candidates for k. However, i 1 is the maximum value of i with a i > 0.5, and i 0 is the maximum value of i with a i > 1 (-1 if not). If there is no such i 1 , the target block has no coefficient, and the following processing is not performed.

すなわち、量子化部13は、上述のステップS402の処理として、iの位置を設定するが、a>0.5であるiがなければ、対象ブロックは係数なしとして、以下のステップS403の処理は行わない。 That is, the quantization unit 13 sets the position of i 1 as the process of step S402 described above, but if there is no i where a i > 0.5, the target block is assumed to have no coefficient, and the following step S403 is performed. No processing is performed.

図7は、第3の実施形態の量子化部13における、上述のステップS403の処理の詳細について示したフローチャートである。   FIG. 7 is a flowchart showing details of the processing in step S403 described above in the quantization unit 13 of the third embodiment.

量子化部13では、図7に示す処理により、iの位置を探索しつつkを決定する。ただし、以下でbits()の意味は第1の実施形態と同様とする。 The quantization unit 13 determines k while searching for the position of i 0 by the process shown in FIG. However, in the following, the meaning of bits () is the same as in the first embodiment.

まず、kの初期値をk=iとして、このときのa>1の場合は、i=iであるので、以下のkおよびiの探索処理は行わず、i以下の処理(S404)のみ行う。 First, assuming that the initial value of k is k = i 1 and a k > 1 at this time, i 0 = i 1 , so the following search processing of k and i 0 is not performed, and i 0 or less Only the process (S404) is performed.

そして、量子化部13は、各変数(k、e、r)の初期化を、以下の(43)、(44)、(45)式により行う(S501)。   Then, the quantization unit 13 initializes each variable (k, e, r) using the following equations (43), (44), and (45) (S501).

k=i …(43)
e=△E …(44)
r=bits(u=1,last=1) …(45)
次に、量子化部13は、i=i−1、…、0について、それぞれ△E、p、bを求め、その結果に応じてu、k、e、rの更新し、iがみつかるまで繰り返す(S502、S503)。ただし、t>1ならこのときのiを、i=iとしてiがみつかったものとし(S504),後述するステップS507に進む。
k = i 1 (43)
e = ΔE k (44)
r = bits (u k = 1, last k = 1) (45)
Next, the quantization unit 13 obtains ΔE i , p, b for i = i 1 −1,..., 0, respectively, and updates u i , k, e, r according to the result, i Repeat until 0 is found (S502, S503). However, if t i > 1, i is assumed to be i 0 = i and i 0 is found (S504), and the process proceeds to step S507 described later.

次に、上述のステップS502、S503において、△E、p、bの結果に応じてu、k、e、rを更新する際の場合分けについて説明する。 Next, the case classification when updating u i , k, e, and r according to the results of ΔE i , p, and b in steps S502 and S503 described above will be described.

[△E>0の場合]
を以下の(46)式により更新し、rを以下の(47)式により更新し、次のiの処理に進む。
[If △ E i > 0]
u i is updated by the following equation (46), r is updated by the following equation (47), and the process proceeds to the next i.

=0 …(46)
r=r+bits(u=0) …(47)
[△E≦0の場合]
この場合、まずpを以下の(48)とおき、p及び後述するbの結果に応じた処理が行われる。
u i = 0 (46)
r = r + bits (u i = 0) (47)
[If △ E i ≦ 0]
In this case, first, p is set as (48) below, and processing corresponding to the result of p and b described later is performed.

p=△E+μ(bits(u=1,last=0)
−bits(u=0)) …(48)
[△E≦0、かつ、p<0の場合]
まず、uを下記の(49)式により更新し、bを以下の(50)式とおくものとする。
p = ΔE i + μ (bits (u i = 1, last i = 0)
−bits (u i = 0)) (48)
[If ΔE i ≦ 0 and p <0]
First, u i is updated by the following equation (49), and b is assumed to be the following equation (50).

=1 …(49)
b=e+μ(r+bits(last=0)
−bits(last=1)) …(50)
そして、b>0の場合には、k、e、rを、それぞれ以下の、(51)式、(52)式、(53)式により更新する。
u i = 1 (49)
b = e + μ (r + bits (last i = 0)
-Bits (last i = 1)) (50)
When b> 0, k, e, and r are updated by the following expressions (51), (52), and (53), respectively.

k=i …(51)
e=△E …(52)
r=bits(u=1,last=1) …(53)
一方、b<=0の場合には、e、rをそれぞれ以下の(54)式、(55)式により更新する。
k = i (51)
e = ΔE k (52)
r = bits (u k = 1, last k = 1) (53)
On the other hand, when b <= 0, e and r are updated by the following equations (54) and (55), respectively.

e=e+△E …(54)
r=r+bits(u=1,last=0) …(55)
[△E≦0、かつ、p≧0の場合]
まず、uを下記の(56)式により更新し、bを以下の(57)式とおくものとする。
e = e + ΔE i (54)
r = r + bits (u i = 1, last i = 0) (55)
[If ΔE i ≦ 0 and p ≧ 0]
First, u i is updated by the following equation (56), and b is set by the following equation (57).

=0 …(56)
b=e+△E+μ(r+bits(u=0)
−bits(u=1,last=1)) …(57)
そして、b>0の場合には、k、e、rを、それぞれ以下の、(58)式、(59)式、(60)式により更新する。
u i = 0 (56)
b = e + ΔE i + μ (r + bits (u i = 0)
-Bits (u k = 1, last i = 1)) ... (57)
When b> 0, k, e, and r are updated by the following equations (58), (59), and (60), respectively.

k=i …(58)
e=△E …(59)
r=bits(u=1,last=1) …(60)
一方、b<=0の場合には、rを以下の(61)により更新する。
k = i (58)
e = ΔE k (59)
r = bits (u k = 1, last k = 1) (60)
On the other hand, when b <= 0, r is updated by the following (61).

r=r+bits(u=0) …(61)
以上のように、ステップS502、S503の繰り返しにより、iの探索が行われると、量子化部13では、その処理結果について判定が行われ(S504)、iがみつかった場合(t>1がみつかった場合)には、後述するステップS507の処理が行われ、iが見つからなかった場合(t>1がみつからなかった場合)には、後述するステップS505の処理が行われる。
r = r + bits (u i = 0) (61)
As described above, when the search for i 0 is performed by repeating steps S502 and S503, the quantization unit 13 determines the processing result (S504), and when i 0 is found (t i > in the case where 1 is found), it carried out the processing of step S507 to be described later, in a case where i 0 is not found (t i> If one is not found), the process of step S505 described below is performed.

上述のステップS502、S503により、iがみつからなかったと判定された場合には、量子化部13では、i、bについて、それぞれ、以下の(62)式、(63)式のようにおき、bの算出結果について判定が行われる(S505)。 In step S502, S503 described above, if i 0 is determined to not be found is the quantization unit 13, for i 0, b, respectively, the following equation (62), placed as (63) below , B is determined (S505).

i0 = -1 …(62)
b = e + μ(r + bits(coded=1) - bits(coded=1)) …(63)
そして、b>0ならば、対象ブロックは係数なしとして(S506)、図7の処理を終了し、そうでなければ後述するステップS508の処理に進む。
i 0 = -1 (62)
b = e + μ (r + bits (coded = 1)-bits (coded = 1)) (63)
If b> 0, the target block has no coefficient (S506), and the process of FIG. 7 ends. Otherwise, the process proceeds to step S508, which will be described later.

上述のステップS505において、b>0でない場合には、さらにkとiが比較され、k<iの場合には、i=k+1,…,iの範囲はu=0にクリアし(S508)、図7の処理を終了する。 In the above step S505, if b> 0 is not satisfied, k and i 1 are further compared, and if k <i 1 , the range of i = k + 1,..., I 1 is cleared to u i = 0. (S508), the process of FIG.

一方、上述のステップS502、S503により、iがみつかったと判定された場合には、bを以下の(64)式のようにおいて、b>0である場合にはk=iと更新する(S507)、一方b ≦0 の場合は k の更新は行わない(S507)。つまり、b ≦0の場合、 i0よりも大きな位置を指し示したままである。その後、bの判断に関わらず、k<iの場合には、i=k+1,…,iの範囲はu=0にクリアし(S508)、図7の処理を終了する。 On the other hand, in step S502, S503 described above, when it is determined that i 0 is found, b at as follows (64) formula, when a b> 0 is updated with k = i (S507 On the other hand, if b ≦ 0, k is not updated (S507). That is, when b ≦ 0, the position larger than i 0 is still indicated. Thereafter, regardless of the determination of b, if k <i 1 , the range of i = k + 1,..., I 1 is cleared to u i = 0 (S508), and the process of FIG.

b=e+μ(r+bits(last=0)
−bits(last=1)…(64)
次に、図7の処理において用いられている変数について説明する。
b = e + μ (r + bits (last i = 0)
-Bits (last i = 1) (64)
Next, variables used in the process of FIG. 7 will be described.

kは上記処理過程の、暫定の最終非ゼロ係数位置である(k=−1は非ゼロ係数なしを表す)。   k is a provisional final non-zero coefficient position in the above process (k = −1 indicates no non-zero coefficient).

eはkが最終非ゼロ係数位置ではない場合から、kが最終である場合への歪の変化量をiまで累積した値である。   e is a value obtained by accumulating the amount of change in distortion from the case where k is not the final non-zero coefficient position to the case where k is the final position up to i.

rはkが最終非ゼロ係数位置ではない場合から、kが最終である場合への符号量の変化量をiまで累積した値である。   r is a value obtained by accumulating the amount of change in the code amount from the case where k is not the final non-zero coefficient position to the case where k is the final position up to i.

b>0の意味は、iの位置を最終非ゼロ係数位置としたほうが、kであった場合よりもRDコストが減少することを表す。   The meaning of b> 0 indicates that the RD cost is reduced when the position of i is the final non-zero coefficient position than when k is set.

p<0の意味は、iよりもスキャン順の大きな位置kが最終非ゼロ係数位置となると仮定した場合に、iの位置の係数レベルの絶対値として0よりも1を選択するほうがRDコストが減少することを表す。   The meaning of p <0 is that if it is assumed that the position k in the scanning order larger than i is the final non-zero coefficient position, it is more RD cost to select 1 than 0 as the absolute value of the coefficient level at the position of i. Represents a decrease.

次に、上述のステップS403の処理(図7の処理)が終了すると、量子化部13では、iが見つかった場合に、i=i.…,0について、係数レベルを選択していく。すなわち、i(例えば、探索停止位置)から順に、各iについて、符号量の変化量△Rを、以下の(65)式として、以下の(66)式に示すRDコストの変化量の符号の判断により、tもしくは、t+1から係数レベルを選択していく。すなわち、△J<0の場合にt+1を選択する。 Next, the process of step S403 described above (the processing in FIG. 7) is completed, the quantization unit 13, if i 0 is found, i = i 0. ..., 0, coefficient levels are selected. That, i 0 (e.g., the search stop position) in order from, for each i, the code amount of variation △ the R i, the following (65) as a formula, the following (66) of the RD costs of the variation in the expression The coefficient level is selected from t i or t i +1 depending on the sign. That is, t i +1 is selected when ΔJ i <0.

△R=bits(u=t+1)−bits(u=t) …(65)
△J=△E+μ△R …(66)
なお、上述したように、△E≧0であるiについては、u=tとし、この判断をスキップするようにしても良い。
ΔR i = bits (u i = t i +1) −bits (u i = t i ) (65)
ΔJ i = ΔE i + μΔR i (66)
As described above, for i is △ E i ≧ 0, and u i = t i, may be skip this determination.

また、符号量の変化量△Rについては、第1の実施形態と同様、符号量に変化のあるbinのみに関する計算処理とすることで、効率的に求めることができる。 Also, the code amount change ΔR i can be efficiently obtained by performing calculation processing only on bins having a change in the code amount, as in the first embodiment.

(C−2)第3の実施形態の効果
第3の実施形態によれば、第1の実施形態の効果に加えて、以下のような効果を奏することができる。
(C-2) Effects of Third Embodiment According to the third embodiment, the following effects can be achieved in addition to the effects of the first embodiment.

第1の実施形態では係数を順方向、逆方向と、複数回スキャンする必要があるが、第3の実施形態では、i=Mから逆方向のみに、iが見つかるまで、i見つかるまで、i=0までのスキャンをするだけでよくなり、処理が簡単になり処理量を低減するとともに、メモリアクセスが削減できるなどの効果が得られる。 In the first embodiment, the coefficients need to be scanned a plurality of times in the forward direction and in the reverse direction. In the third embodiment, until i 1 is found in i = M only in the reverse direction, until i 0 is found. , It is only necessary to scan up to i = 0, so that the processing is simplified, the processing amount is reduced, and the memory access can be reduced.

(D)第4の実施形態
以下、本発明による量子化装置、プログラム及び方法、並びに、動画像符号化装置の第4の実施形態を、図面を参照しながら詳述する。なお、第4の実施形態の量子化装置は、量子化部であるものとして説明する。
(D) Fourth Embodiment Hereinafter, a fourth embodiment of a quantization device, a program and a method, and a moving image coding device according to the present invention will be described in detail with reference to the drawings. Note that the quantization apparatus according to the fourth embodiment will be described as a quantization unit.

(D−1)第4の実施形態の構成及び動作
第4の実施形態の量子化部及び動画像符号化装置も、図1により示すことができる。
(D-1) Configuration and Operation of Fourth Embodiment A quantization unit and a moving image encoding device of the fourth embodiment can also be shown in FIG.

第4の実施形態では、エントロピー符号化部14がCAVLCに対応しており、第2の実施形態とは異なる処理手順(係数成分の決定順)で、与えられた係数ブロックの、個々の成分の係数レベルを選択していく点で、第2実施形態と異なっている。それ以外の構成については、第2の実施形態と同様であるので詳しい説明を省略し、以下では、第4の実施形態について、第2の実施形態との差異を中心に説明を行う。   In the fourth embodiment, the entropy encoding unit 14 supports CAVLC, and each of the individual components of a given coefficient block is processed in a different processing procedure (coefficient component determination order) from that of the second embodiment. This is different from the second embodiment in that the coefficient level is selected. Since the other configuration is the same as that of the second embodiment, detailed description thereof will be omitted. In the following, the fourth embodiment will be described focusing on differences from the second embodiment.

図8は、第4の実施形態の量子化部13の処理について示したフローチャートである。   FIG. 8 is a flowchart illustrating processing of the quantization unit 13 according to the fourth embodiment.

まず、量子化部13では、入力された変換係数を量子化パラメータQPに応じてスケーリングを施した、スケールされた係数cが求められる(S601)。ただし、i=0,…,Mは、第2の実施形態とは異なり、第1、第3の実施形態と同様、Zig−Zagスキャン等のスキャン順に番号付けされているものとする。すなわち、第4の実施形態では、絶対値の大きさによるソートは行わない。 First, the quantizing unit 13 obtains a scaled coefficient c i obtained by scaling the input transform coefficient according to the quantization parameter QP (S601). However, i = 0,..., M are numbered in the order of scanning such as Zig-Zag scanning, as in the first and third embodiments, unlike the second embodiment. That is, in the fourth embodiment, sorting based on the magnitude of the absolute value is not performed.

次に、量子化部13では、スキャンの逆順i=M,…,0に、最終非ゼロ係数の候補位置iが探索され、設定される(S602)。すなわち、iはa>Tであるiの最大値となるiを探索する。ここで、Tは係数レベル値0を選択する閾値であり、T=0.5、あるいは、T=0.5+μなどとしてもよい。また、外部から制御可能としてもよい。このようなiがなければ、対象ブロックは係数なしとして以降の処理は行わずに終了するようにしても良い。 Then, the quantization unit 13, inverse order i = M scan, ..., 0, candidate positions i 1 of the last non-zero coefficient is searched, it is set (S602). That is, i 1 searches for i 1 that is the maximum value of i for which a i > T 0 . Here, T 0 is the threshold for selecting the coefficient level values 0, T 0 = 0.5, or may be such as T 0 = 0.5 + μ. Moreover, it is good also as controllable from the outside. If there is no such i 1 , the target block may be determined to have no coefficient, and the process may be terminated without performing subsequent processing.

次に、量子化部13では、スキャンの逆順i=i,…,0に、係数レベルの候補として、0を含めないような係数について、係数レベルliを選択していく(S603、S604)。すなわち、cの絶対値aについて、係数レベルlの絶対値uの候補として、以下の(67)式によりtを求め、さらに、以下の(68)式により歪変化量△Eを求める。 Next, the quantization unit 13 selects the coefficient level li for coefficients that do not include 0 as coefficient level candidates in the reverse scan order i = i 1 ,..., 0 (S603, S604). . That is, for the absolute value a i of c i , t i is obtained by the following equation (67) as a candidate of the absolute value u i of the coefficient level l i , and further, the distortion change amount ΔE by the following equation (68): i is determined.

=floor(a) …(67)
△E=△E(a,t)=1/2−(a−t)…(68)
ここで、△E≧0であるiについては、u=tとし、以降の処理では、t+1は候補としないようにしても良い(ただし、△E≧0であっても、t=0の場合は、未選択とし、後の未選択係数レベルの選択時に処理することとしてもよい)。
t i = floor (a i ) (67)
ΔE i = ΔE (a i , t i ) = 1 / 2− (a i −t i ) (68)
Here, for i where ΔE i ≧ 0, u i = t i, and in the subsequent processing, t i +1 may not be a candidate (however, even if ΔE i ≧ 0) , T i = 0, it may be unselected and processed at the time of selecting an unselected coefficient level later).

一方、△E<0であるiについては、uとしてtを選択した場合とt+1を選択した場合の符号量の変化量△Rをもとめ、以下の(69)式のRDコストの変化量の符号の判断により、tもしくは、t+1から係数レベルを選択していく。 On the other hand, for i where ΔE i <0, the amount of change ΔR i in the code amount when t i is selected as u i and when t i +1 is selected, and RD in the following equation (69) is obtained. The coefficient level is selected from t i or t i +1 by judging the sign of the amount of change in cost.

△J=△E+μ△R…(69)
すなわち、△J<0の場合にt+1を選択する.選択されたu用いて、係数レベルliを順次更新していく。
ΔJ i = ΔE i + μΔR i (69)
That is, t i +1 is selected when ΔJ i <0. The coefficient level li is successively updated using the selected u i .

ただし、t=0の場合は、未選択とし、後の未選択係数レベルの選択時に処理することとし、ここでは、いったん、以下の(70)式のように初期化する。ここでの、未選択係数レベルl初期値は、例えば、上記fとして、イントラピクチャではf=1/3、インターピクチャではf=1/6とする場合や、その他の、さまざまな簡易な量子化方法を用いるなどとしてもよい。 However, when t i = 0, the selection is not performed, and processing is performed when a subsequent unselected coefficient level is selected. Here, initialization is performed once as in the following expression (70). Here, the initial value of the unselected coefficient level l i is, for example, f, where f = 1/3 for an intra picture and f = 1/6 for an inter picture. It is also possible to use a method of making it.

=floor(a+f)…(70)
一方、t>0の場合は、変数suffixLengthが確定していれば、△Rは、suffixLengthで選択される可変長符号のテーブルにおける符号長の差として、効率的に求めることができる。
u i = floor (a i + f) (70)
On the other hand, in the case of t i > 0, if the variable suffixLength is determined, ΔR i can be efficiently obtained as a code length difference in the variable length code table selected by the suffix Length.

なお、ここでの△Rは、係数レベルlに関する符号長のみの差であるが、第2の実施例と同様、「level_prefixに変化がなければ、△R=0である」となるため、この場合には、△E<0の判断のみで選択可能である。 Here, the △ R i is the difference code lengths only relates coefficient levels l i, as in the second embodiment, the "if there is no change in level_prefix, a △ R i = 0" Therefore, in this case, the selection can be made only by the determination of ΔE i <0.

ここで、変数suffixLengthは、係数レベルをCAVLC符号化する際の、可変長符号のテーブルを選択する変数であり、スキャンの逆順に、係数レベルの絶対値の大きさに応じて遷移する。したがって、スキャンの逆順に係数レベルを選択していくことにより、suffixLengthも確定していく。未選択係数レベルについては、上記初期値にしたがってsuffixLengthを更新する。なお、trailingOnesの個数が3に満たない場合等、suffixLengthの確度が低い場合の係数レベルを未選択として、後の未選択係数レベルの選択時に処理することとしてもよい。   Here, the variable suffixLength is a variable for selecting a variable-length code table when the coefficient level is CAVLC encoded, and changes in the reverse order of scanning according to the magnitude of the absolute value of the coefficient level. Therefore, by selecting coefficient levels in the reverse order of scanning, suffixLength is also determined. For the unselected coefficient level, the suffixLength is updated according to the initial value. Note that the coefficient level when the accuracy of the suffixLength is low, such as when the number of trailingOnes is less than 3, may be set as unselected and processed when selecting an unselected coefficient level later.

上述のステップS603、604の処理が終了すると、量子化部13は、以上の処理(上述のステップS603、604の処理)で、未選択のままである係数について、スキャンの逆順i=i,…,0に、係数レベルlを選択していく(S605、S606)。ここまでの処理で、選択済みの係数成分の処理は、スキップする。 When the processes in steps S603 and 604 described above are completed, the quantization unit 13 performs reverse scan order i = i 1 , for coefficients that remain unselected in the above process (the processes in steps S603 and 604 described above). .., 0, the coefficient level l i is selected (S605, S606). In the processing so far, the processing of the selected coefficient component is skipped.

すなわち、スキャンの逆順i=i,…,0に、各iについて、uとしてtを選択した場合とt+1を選択した場合の符号量の変化量△Rをもとめ、以下の(71)式のRDコストの変化量の符号の判断により、tもしくは、t+1から係数レベルを選択していく。すなわち、△J<0の場合にt+1を選択する。選択されたu用いて、係数レベルlを順次更新していく。 That is, reverse i = i 1 scan, ..., 0, for each i, determine the code amount of the change amount △ R i in the case of selecting a t i +1 If you choose t i as u i, the following The coefficient level is selected from t i or t i +1 by determining the sign of the amount of change in the RD cost in equation (71). That is, t i +1 is selected when ΔJ i <0. The coefficient level l i is sequentially updated using the selected u i .

△J=△E+μ△R…(71)
符号量の変化量△Rの算出時には必要に応じて、初期値のままの、あるいは、それまでの処理により更新された場合は更新された係数レベルlを参照して算出する。△Rの計算は、第2の実施形態で記載したのと同様に、tを選択した場合と、t+1を選択した場合の間で、符号量に変化のあるシンタックスエレメントのみを考慮すればよく、効率的に△Rの計算処理に関連するシンタックスエレメントを絞り込むことができる。
ΔJ i = ΔE i + μΔR i (71)
When calculating the change amount ΔR i of the code amount, it is calculated with reference to the updated coefficient level l i as it is, if necessary, or if it is updated by the processing so far. △ calculation of R i, similar to that described in the second embodiment, as selecting t i, between when selecting t i +1, only syntax element with a change in the amount of codes may be considered, it is possible to narrow the syntax elements associated with the calculation processing efficiently △ R i.

(D−2)第4の実施形態の効果
第4の実施形態によれば、第2の実施形態の効果に加えて、以下のような効果を奏することができる。
(D-2) Effects of Fourth Embodiment According to the fourth embodiment, the following effects can be achieved in addition to the effects of the second embodiment.

第2の実施形態に必要であった、係数のソート処理が不要となり、さらに、係数レベルの初期値の設定時に、suffixLengthにしたがって係数レベルの符号長差のみで選択可能な係数については、選択を行ってしまうため、ブロック全体の符号量変化を見ながら選択する係数の個数を削減でき、第2の実施形態と比べてもさらに少ない演算量、処理用で、量子化処理を行うことができる。   The coefficient sorting process, which was necessary in the second embodiment, is no longer necessary. Further, when setting the initial value of the coefficient level, the coefficient that can be selected only by the code length difference of the coefficient level according to suffixLength is selected. Therefore, the number of coefficients to be selected can be reduced while observing the change in the code amount of the entire block, and the quantization process can be performed with a smaller amount of computation and processing than in the second embodiment.

(E)第5の実施形態
以下、本発明による量子化装置、プログラム及び方法、並びに、動画像符号化装置の第5の実施形態を、図面を参照しながら詳述する。なお、第5の実施形態の量子化装置は、量子化部であるものとして説明する。
(E) Fifth Embodiment Hereinafter, a fifth embodiment of a quantization device, a program and a method, and a moving image coding device according to the present invention will be described in detail with reference to the drawings. Note that the quantization apparatus according to the fifth embodiment will be described as a quantization unit.

(E−1)第5の実施形態の構成及び動作
第5の実施形態では、第1〜第4の実施形態のような、係数ブロック単位での量子化処理ののち、複数の係数ブロックを含む、より大きな単位での量子化結果の最適化処理を行う。
(E-1) Configuration and Operation of Fifth Embodiment In the fifth embodiment, after a quantization process in units of coefficient blocks as in the first to fourth embodiments, a plurality of coefficient blocks are included. Optimize the quantization result in a larger unit.

例えば、H.264の4×4変換係数の場合、coded_block_patternにより、4×4ブロックを4つ集めた8×8の単位で、係数の有無(なしの場合は対象となるブロックのすべての係数レベルが0であることを表す)を制御でき、この制御によるレート歪コストの変化量を評価して量子化の最適化処理を行う。   For example, H.M. In the case of H.264 4 × 4 transform coefficients, the presence / absence of coefficients in the unit of 8 × 8 obtained by collecting four 4 × 4 blocks by coded_block_pattern (in the case of none, all coefficient levels of the target block are 0) The amount of rate distortion cost change due to this control is evaluated, and the quantization optimization process is performed.

第5の実施形態は、第1の実施形態における量子化部13が、量子化部13Aに置き換わっているだけであるので、量子化部13A以外の構成については説明を省略する。   In the fifth embodiment, since the quantization unit 13 in the first embodiment is merely replaced with the quantization unit 13A, the description of the configuration other than the quantization unit 13A is omitted.

図9は、第5の実施形態の量子化部13A内部の機能的構成について示したブロック図である。   FIG. 9 is a block diagram illustrating a functional configuration inside the quantization unit 13A of the fifth embodiment.

量子化部13Aは、量子化処理部135、歪変化量総和計算部136、レート変化量計算部137、係数レベル選択部138を有している。   The quantization unit 13A includes a quantization processing unit 135, a distortion change amount total calculation unit 136, a rate change amount calculation unit 137, and a coefficient level selection unit 138.

量子化処理部135では、変換係数をブロック単位に受け取り、所定の量子化パラメータQPにしたがって、第1〜4の実施形態のようなブロック単位での、RD最適な係数レベルの選択による量子化処理を行い、得られたブロック単位の係数レベルと、絶対値が1である係数レベルに関しては、△Eを出力する。 The quantization processing unit 135 receives transform coefficients in units of blocks, and performs quantization processing by selection of RD optimum coefficient levels in units of blocks as in the first to fourth embodiments according to a predetermined quantization parameter QP. And ΔE i is output for the obtained coefficient level of the block unit and the coefficient level whose absolute value is 1.

以下では、例として、coded_block_patternで表現される、ある8×8ブロックに関して、そこに含まれる4×4ブロック4個の係数レベルを同時に最適化する例について記載するが、この例に限定されず、複数の係数ブロックを同時に係数なしと制御することが可能なそのほかの制御方法の場合も、同様に構成可能である。   Hereinafter, as an example, an example of simultaneously optimizing the coefficient levels of four 4 × 4 blocks included in a certain 8 × 8 block expressed by coded_block_pattern will be described. However, the present invention is not limited to this example. The other control methods that can control a plurality of coefficient blocks at the same time without coefficients can be similarly configured.

以下の処理は、coded_block_patternで制御可能な8×8ブロックに含まれる4×4ブロックの係数レベルが、絶対値1よりも大きな係数レベル値を有しない時、すなわち、係数レベル値が−1,0,1のみからなる時に行う。また、すべての係数レベル値が0である場合も、処理は行わない。   The following processing is performed when the coefficient level of the 4 × 4 block included in the 8 × 8 block that can be controlled by coded_block_pattern does not have a coefficient level value larger than the absolute value 1, that is, the coefficient level value is −1, 0. , 1 only. Also, when all coefficient level values are 0, no processing is performed.

歪変化量総和計算部136は、歪の変化量△Eとして、係数レベル値の絶対値が1である係数成分に関する歪の変化量△Eをすべて加算して求める。 The distortion change amount total calculation unit 136 obtains the distortion change amount ΔE by adding all the distortion change amounts ΔE i related to the coefficient component whose absolute value of the coefficient level value is 1.

すなわち、係数ブロックjに関する非ゼロ係数の歪の変化量△Eの和であるeを以下の(72)式により求める。このとき係数レベル値が0であるiに関する△Eは加算しない。 That is, obtaining the e j is the sum of the distortion change amount △ E i nonzero coefficient related coefficient blocks j by the following (72) below. The time for the i coefficient level value is 0 △ E i is not added.

=Σi(li≠0)△E …(72)
歪変化量総和計算部136は、対象ブロック全体にわたる歪の変化量の総和△Eを、以下の(73)式により求める。△Eは、対象係数ブロックをすべて係数なしとした場合から、ブロック単位での量子化結果の状態(絶対値1の係数が含まれる)へのスケールされた歪の変化量となる。
e j = Σ i (li ≠ 0) ΔE i (72)
The distortion change amount total calculation unit 136 obtains the total distortion change amount ΔE over the entire target block by the following equation (73). ΔE is the amount of change in the scaled distortion from the case where all the target coefficient blocks have no coefficient to the state of the quantization result in units of blocks (including a coefficient having an absolute value of 1).

△E=Σ …(73)
レート変化量計算部137は、符号量の変化量として、係数ブロックjを、CABACもしくはCAVLC等のエントロピー符号化器で符号化する場合の符号量をrとして求める。そして、レート変化量計算部137は、△Rをこれらの総和と、coded_block_patternにより、これらすべての符号語を符号化しない場合の差として、以下の(74)式により求める。ただし、(74)式の第2項のbits()の差は、coded_block_patternの、対象としている8×8領域全体の係数の有無を制御した場合の符号量の差であり、使用するCABAC,CAVLC等のエントロピー符号化によって決まる値である。また、この符号量の差が非常に小さいものとみなして無視(計算しない)する構成としてもよい。
ΔE = Σ j e j (73)
The rate change amount calculation unit 137 obtains, as r j, the code amount when the coefficient block j is encoded by an entropy encoder such as CABAC or CAVLC as the change amount of the code amount. Then, the rate change amount calculation unit 137 obtains ΔR by the following equation (74) as a difference when not coding all these codewords by using the sum of these and coded_block_pattern. However, the difference between bits () in the second term of equation (74) is the difference in code amount when the presence / absence of the coefficient of the entire 8 × 8 region of the coded_block_pattern is controlled, and the CABAC and CAVLC to be used. It is a value determined by entropy coding. Further, it may be configured that the difference in the code amount is regarded as very small and ignored (not calculated).

△R=Σ+(bits(CBP=1)−bits(CBP=0)) …(74)
そして、係数レベル選択部138は、得られた△Eと△Rと、スケールされたラグランジュ乗数μを用いて、複数ブロックを同時に係数なしとする場合と、ブロックごとの量子化処理による係数レベルを使用する場合のRDコストの変化量△Jを、以下の(75)式により求め、△J≧0の場合は、対象ブロックをすべて係数なしとする。△J<0の場合、もしくは、上記で処理対象としなかった、絶対値2以上の係数レベルを含む場合等は、ブロックごとの量子化処理結果をそのまま出力する。
ΔR = Σ j r j + (bits (CBP = 1) −bits (CBP = 0)) (74)
Then, the coefficient level selection unit 138 uses the obtained ΔE and ΔR and the scaled Lagrangian multiplier μ to make a plurality of blocks have no coefficient at the same time, and the coefficient level by quantization processing for each block. A change amount ΔJ of the RD cost when used is obtained by the following equation (75). When ΔJ ≧ 0, all the target blocks have no coefficient. If ΔJ <0, or if it includes a coefficient level with an absolute value of 2 or more, which is not subject to processing above, the quantization processing result for each block is output as it is.

△J=△E+μ△R …(75)
(E−2)第5の実施形態の効果
第5の実施形態によれば、以下のような効果を奏することができる。
ΔJ = ΔE + μΔR (75)
(E-2) Effects of Fifth Embodiment According to the fifth embodiment, the following effects can be achieved.

複数ブロックを含むより大きな単位での量子化結果の最適化処理を、行うことができ、符号化効率が向上できる。また、このときのRDコストの評価をスケールされた係数レベルの領域で行い、また、変化量のみを評価しているので、歪の変化量の評価を乗算なしで行うことができ、軽微な処理負荷で実現できる。   Optimization processing of the quantization result in a larger unit including a plurality of blocks can be performed, and coding efficiency can be improved. Further, since the evaluation of the RD cost at this time is performed in the scaled coefficient level region and only the change amount is evaluated, the distortion change amount can be evaluated without multiplication, and the processing is small. Can be realized with load.

(F)他の実施形態
本発明は、上記の各実施形態に限定されるものではなく、以下に例示するような変形実施形態も挙げることができる。
(F) Other Embodiments The present invention is not limited to the above-described embodiments, and may include modified embodiments as exemplified below.

(F−1)上記の各実施形態では、本発明の動画像符号化装置(量子化装置)をH.264に適用する場合の例について説明したが、本発明は上記実施形態に限定されず、変換係数の量子化と、エントロピー符号化を含むようなさまざまな動画像符号化処理における量子化処理に適用可能である。 (F-1) In each of the above embodiments, the moving picture coding apparatus (quantization apparatus) of the present invention is the H.264 standard. However, the present invention is not limited to the above-described embodiment, and is applied to quantization processing in various moving image encoding processes including transform coefficient quantization and entropy encoding. Is possible.

10…動画像符号化装置、11…予測差信号生成器、12…変換部、13…量子化部、14…エントロピー符号化部、15…逆量子化・逆変換部、16…復号画像生成部、17…フレームバッファ、18…予測部、131…スケール計算部、132…歪変化量計算部、133…レート変化量計算部、134…係数レベル選択部。   DESCRIPTION OF SYMBOLS 10 ... Moving image encoding device, 11 ... Prediction difference signal generator, 12 ... Conversion part, 13 ... Quantization part, 14 ... Entropy encoding part, 15 ... Dequantization / inverse conversion part, 16 ... Decoded image generation part , 17 ... Frame buffer, 18 ... Prediction unit, 131 ... Scale calculation unit, 132 ... Distortion change amount calculation unit, 133 ... Rate change amount calculation unit, 134 ... Coefficient level selection unit.

Claims (9)

動画像符号化処理において、符号化対象の動画像を構成する入力画像と上記入力画像の予測画像との誤差信号に係る変換係数を、量子化する量子化装置において、
上記変換係数に対して量子化のためのスケーリングを施すスケーリング手段と、
スケーリングされた上記変換係数の絶対値について小数点以下の切り捨てにより整数化した第1の係数レベル侯補と、第1の係数レベル候補よりも絶対値が1大きい第2の係数レベル候補を決定する係数レベル候補決定手段と、
上記第1の係数レベル侯補を選択した場合と、上記第2の係数レベル候補を選択した場合の、量子化誤差の差に相当するスケール化された歪変化量、及び、エントロピー符号化する場合に必要となる符号量の変化量を求め、求めた歪変化量と符号量の変化量とを利用して、上記第1の係数レベル侯補を適用した場合と、上記第2の係数レベル侯補を適用した場合とのレート歪コストの変化量を算出するレート歪コスト変化量算出手段と、
上記レート歪コスト変化量算出手段の算出結果に応じて、上記第1の係数レベル候補又は上記第2の係数レベル候補のいずれかを、上記変換係数の量子化に適用する係数レベルとして選択する係数レベル選択手段と
を有することを特徴とする量子化装置。
In a moving image encoding process, in a quantization device that quantizes a transform coefficient related to an error signal between an input image constituting a moving image to be encoded and a predicted image of the input image,
Scaling means for performing scaling for quantization on the transform coefficient;
A first coefficient level compensation obtained by converting the absolute value of the scaled conversion coefficient into an integer by rounding off the decimal point, and a coefficient for determining a second coefficient level candidate whose absolute value is 1 larger than the first coefficient level candidate Level candidate determination means,
When the first coefficient level compensation is selected and when the second coefficient level candidate is selected, the scaled distortion change amount corresponding to the difference in quantization error and entropy encoding are performed. The amount of change in the amount of code required for the above is obtained, and when the first coefficient level compensation is applied using the obtained amount of change in distortion and the amount of change in the amount of code, the second coefficient level 係数Rate distortion cost change amount calculating means for calculating a change amount of the rate distortion cost when the complement is applied; and
A coefficient that selects either the first coefficient level candidate or the second coefficient level candidate as a coefficient level to be applied to quantization of the transform coefficient according to the calculation result of the rate distortion cost change amount calculation means. And a level selection means.
当該量子化装置は、上記動画像符号化処理において、量子化された上記変換係数をエントロピー符号化するものであって、上記変換係数における係数成分のスキャン順で最終非ゼロ係数であることを表すシンタックスを有する符号化手段へ、量子化した上記変換係数を供給し、
上記スケーリング手段は、上記変換係数を量子化パラメータにしたがってスケーリングし、
上記レート歪コスト変化量算出手段は、上記変換係数の各係数成分で、最終非ゼロ係数成分位置を探索する範囲を決定し、この範囲について、スキャンの順方向に、ある最終非ゼロ係数成分位置を選択した場合と、別の最終非ゼロ係数成分位置を選択した場合のレート歪コストの変化量を求め、このレート歪コストの変化量の符号に応じて、最終非ゼロ係数成分位置を決定し、決定した最終非ゼロ係数成分位置から、スキャンの逆方向に各係数成分について、上記第1の係数レベル侯補を適用した場合と、上記第2の係数レベル侯補を適用した場合とのレート歪コストの変化量を求め、
上記係数レベル選択手段は、上記レート歪コスト変化量算出手段が算出したレート歪コストの変化量の符号に応じて、上記変換係数の各係数成分に適用する係数レベルを選択する
ことを特徴とする請求項1に記載の量子化装置。
The quantization apparatus entropy-encodes the quantized transform coefficient in the moving image encoding process, and represents that the coefficient is a final non-zero coefficient in the scan order of the transform coefficient. Supplying the quantized transform coefficient to the encoding means having the syntax;
The scaling means scales the transform coefficient according to a quantization parameter,
The rate distortion cost change amount calculation means determines a range for searching for a final non-zero coefficient component position in each coefficient component of the conversion coefficient, and a certain final non-zero coefficient component position in the forward direction of the scan with respect to this range. And the amount of change in rate distortion cost when another final non-zero coefficient component position is selected, and the final non-zero coefficient component position is determined according to the sign of the rate distortion cost change amount. The rate when the first coefficient level compensation is applied and the second coefficient level compensation is applied to each coefficient component in the reverse direction of scanning from the determined final non-zero coefficient component position. Find the amount of change in distortion cost,
The coefficient level selection means selects a coefficient level to be applied to each coefficient component of the transform coefficient according to the sign of the rate distortion cost change amount calculated by the rate distortion cost change amount calculation means. The quantization apparatus according to claim 1.
当該量子化装置は、上記動画像符号化処理において、量子化された上記変換係数をエントロピー符号化するものであって、ゼロ係数のランレングス符号化を含む符号化手段へ、量子化した上記変換係数を供給し、
上記スケーリング手段は、上記変換係数を量子化パラメータにしたがってスケーリングし、
上記レート歪コスト変化量算出手段は、上記スケーリング手段によりスケール化された上記変換係数の各係数成分を絶対値の小さい順にソートし、上記第1の係数レベル候補及び上記第2の係数レベル候補を、所定の量子化処理で量子化した値に初期化し、上記変換係数の各係数成分について、ソートされた順番で、上記第1の係数レベル侯補を適用した場合と、上記第2の係数レベル侯補を適用した場合とのレート歪コストの変化量を求め、 上記係数レベル選択手段は、上記レート歪コスト変化量算出手段が算出したレート歪コストの変化量の符号に応じて、上記変換係数の各係数成分に適用する係数レベルを選択する
ことを特徴とする請求項1に記載の量子化装置。
The quantization apparatus entropy-encodes the quantized transform coefficient in the moving image encoding process, and the quantized transform is performed to an encoding unit including run-length encoding of a zero coefficient. Supply coefficient,
The scaling means scales the transform coefficient according to a quantization parameter,
The rate distortion cost change amount calculating means sorts the coefficient components of the transform coefficients scaled by the scaling means in ascending order of absolute values, and selects the first coefficient level candidates and the second coefficient level candidates. , When the first coefficient level compensation is applied to each coefficient component of the transform coefficient in the sorted order for each coefficient component of the transform coefficient, and the second coefficient level. The amount of change in rate distortion cost with respect to the case where compensation is applied is obtained, and the coefficient level selection means determines the conversion coefficient according to the sign of the amount of change in rate distortion cost calculated by the rate distortion cost change amount calculation means. 2. The quantization apparatus according to claim 1, wherein a coefficient level to be applied to each coefficient component is selected.
当該量子化装置は、量子化された上記変換係数をエントロピー符号化するものであって、上記変換係数の各係数成分のスキャン順で最終非ゼロ係数であることを表すシンタックスを有する符号化手段へ、量子化した上記変換係数を供給し、
上記スケーリング手段は、上記変換係数を量子化パラメータにしたがってスケーリングし、
上記レート歪コスト変化量算出手段は、上記変換係数の各係数成分のスキャンの逆順に最終非ゼロ係数位置の探索開始位置を決定し、上記探索開始位置からスキャンの逆順に0を係数レベル候補としない係数成分まで、ある最終非ゼロ係数成分位置を選択した場合と、別の最終非ゼロ係数成分位置を選択した場合のレート歪コストの変化量を求め、このレート歪コストの変化量の符号判断によって、適用する最終非ゼロ係数成分位置を決定し、探索範囲の係数レベルを決定し、探索の停止位置から、スキャンの逆方向に各係数成分について、上記第1の係数レベル侯補を適用した場合と、上記第2の係数レベル侯補を適用した場合とのレート歪コストの変化量を求め、
上記係数レベル選択手段は、上記レート歪コスト変化量算出手段が算出したレート歪コストの変化量の符号に応じて、上記変換係数の各係数成分に適用する係数レベルを選択する
ことを特徴とする請求項1に記載の量子化装置。
The quantization apparatus performs entropy encoding on the quantized transform coefficient, and has encoding syntax indicating that it is a final non-zero coefficient in the scan order of each coefficient component of the transform coefficient To supply the quantized conversion coefficient,
The scaling means scales the transform coefficient according to a quantization parameter,
The rate distortion cost change amount calculating means determines a search start position of the final non-zero coefficient position in the reverse order of scanning of each coefficient component of the transform coefficient, and sets 0 as a coefficient level candidate in the reverse order of the scan from the search start position. Determine the rate distortion cost change amount when selecting a certain final non-zero coefficient component position and another final non-zero coefficient component position up to the coefficient component that is not, and determine the sign of this rate distortion cost change amount The final non-zero coefficient component position to be applied is determined, the coefficient level of the search range is determined, and the first coefficient level compensation is applied to each coefficient component in the reverse direction of the scan from the search stop position. The amount of change in the rate distortion cost between the case and the case where the second coefficient level compensation is applied,
The coefficient level selection means selects a coefficient level to be applied to each coefficient component of the transform coefficient according to the sign of the rate distortion cost change amount calculated by the rate distortion cost change amount calculation means. The quantization apparatus according to claim 1.
当該量子化装置は、当該量子化装置が量子化した変換係数をエントロピー符号化するものであって、ゼロ係数のランレングス符号化と、量子化された係数レベルの符号化順に現れる係数レベルの絶対値の大きさに依存して、非ゼロ係数レベルの符号化に使用する符号が変化する符号化を含む符号化手段へ、量子化した上記変換係数を供給し、
上記スケーリング手段は、上記変換係数を量子化パラメータにしたがってスケーリングし、
上記レート歪コスト変化量算出手段は、上記変換係数の各係数成分について係数レベルの符号化順に、当該係数成分に対応する上記第1の係数レベル候補又は上記第2の係数レベル候補のうちいずれかの係数レベルが0である場合には、当該係数成分に適用する係数レベルを、所定の量子化処理で量子化した値に初期化し、当該係数成分の符号化に使用する符号が確定する場合には、当該係数成分について、上記第1の係数レベル侯補を適用した場合と、上記第2の係数レベル侯補を適用した場合とのレート歪コストの変化量を求めて係数レベルを選択し、さらに、以上の処理で、まだレート歪コストの変化量が求められていない係数成分についても、レート歪コストの変化量を求め、
上記係数レベル選択手段は、上記レート歪コスト変化量算出手段が算出したレート歪コストの変化量の符号に応じて、上記変換係数の各係数成分に適用する係数レベルを選択する
ことを特徴とする請求項1に記載の量子化装置。
The quantization device entropy-encodes the transform coefficient quantized by the quantization device, and includes zero-length run-length coding and absolute coefficient level appearing in the order of quantization coefficient level coding. Depending on the magnitude of the value, the quantized transform coefficient is supplied to an encoding means including encoding in which the code used for encoding of the non-zero coefficient level is changed,
The scaling means scales the transform coefficient according to a quantization parameter,
The rate distortion cost change amount calculation means is either the first coefficient level candidate or the second coefficient level candidate corresponding to the coefficient component in the coding order of the coefficient level for each coefficient component of the transform coefficient. When the coefficient level is zero, the coefficient level applied to the coefficient component is initialized to a value quantized by a predetermined quantization process, and the code used to encode the coefficient component is determined. For the coefficient component, the coefficient level is selected by obtaining the amount of change in the rate distortion cost when the first coefficient level compensation is applied and when the second coefficient level compensation is applied, Further, for the coefficient component for which the rate distortion cost change amount has not yet been obtained by the above processing, the rate distortion cost change amount is obtained,
The coefficient level selection means selects a coefficient level to be applied to each coefficient component of the transform coefficient according to the sign of the rate distortion cost change amount calculated by the rate distortion cost change amount calculation means. The quantization apparatus according to claim 1.
動画像符号化処理において、符号化対象の動画像を構成する入力画像と上記入力画像の予測画像との誤差信号に係る変換係数を、量子化する量子化装置において、
当該量子化装置は、量子化した結果をエントロピー符号化するものであって、複数の変換係数ブロックにわたって、係数レベルが全てゼロであることを表現できる符号化を含む符号化手段へ、量子化した上記変換係数を供給し、
量子化対象となる複数の変換係数ブロックを構成する各変換係数ブロックについて、請求項1〜5のいずれかに記載の量子化装置により量子化する単位量子化手段と、
上記単位量子化手段により、量子化された変換係数ブロックのうち、係数レベルが非ゼロのものについて、係数レベル0を適用する場合からのスケールされた歪変化量の総和を求める歪変化量総和計算手段と、
上記単位量子化手段により量子化された変換係数ブロックを、エントロピー符号化する場合に必要となる符号量と、上記各変換係数ブロックの係数レベルが全てゼロであることを表現する場合の符号量との変化量を求める符号量変化量算出手段と、
上記歪変化量総和計算手段により求められた歪変化量の総和と、上記符号量変化量算出手段により求められた符号量の変化量とを用いて、上記単位量子化手段により量子化された変換係数ブロックと、上記各変換係数ブロックの係数レベルが全てゼロである場合とのレート歪コストの変化量を求め、このレート歪コストの変化量に応じて、上記各変換係数ブロックの量子化結果について、係数レベルを全てゼロとするか、上記単位量子化手段の量子化結果とするかを決定する係数レベル選択手段と、
を有することを特徴とする量子化装置。
In a moving image encoding process, in a quantization device that quantizes a transform coefficient related to an error signal between an input image constituting a moving image to be encoded and a predicted image of the input image,
The quantization apparatus performs entropy coding on the quantized result and quantizes the coding means including coding capable of expressing that the coefficient levels are all zero over a plurality of transform coefficient blocks. Supply the above conversion factor,
Unit quantization means for quantizing by the quantizing device according to any one of claims 1 to 5 for each transform coefficient block constituting a plurality of transform coefficient blocks to be quantized,
A distortion change amount sum calculation for obtaining a sum of scaled strain change amounts from the case where coefficient level 0 is applied to a transform coefficient block quantized by the unit quantization means and having a coefficient level of non-zero. Means,
A code amount required for entropy encoding the transform coefficient block quantized by the unit quantization means, and a code amount for expressing that the coefficient levels of the transform coefficient blocks are all zero. A code amount change amount calculating means for obtaining a change amount of
The transform quantized by the unit quantization means using the total distortion change amount obtained by the distortion change amount summation calculating means and the code amount change amount obtained by the code amount change amount calculating means. The amount of change in the rate distortion cost between the coefficient block and the case where the coefficient levels of each of the transform coefficient blocks are all zero is obtained, and the quantization result of each of the transform coefficient blocks is determined according to the amount of change in the rate distortion cost. , Coefficient level selection means for determining whether the coefficient levels are all zero or the quantization result of the unit quantization means;
A quantization apparatus comprising:
動画像符号化処理において、符号化対象の動画像を構成する入力画像と上記入力画像の予測画像との誤差信号に係る変換係数を、量子化する量子化プログラムにおいて、
コンピュータを、
上記変換係数に対して量子化のためのスケーリングを施すスケーリング手段と、
スケーリングされた上記変換係数の絶対値について小数点以下の切り捨てにより整数化した第1の係数レベル侯補と、第1の係数レベル候補よりも絶対値が1大きい第2の係数レベル候補を決定する係数レベル候補決定手段と、
上記第1の係数レベル侯補を選択した場合と、上記第2の係数レベル候補を選択した場合の、量子化誤差の差に相当するスケール化された歪変化量、及び、エントロピー符号化する場合に必要となる符号量の変化量を求め、求めた歪変化量と符号量の変化量とを利用して、上記第1の係数レベル侯補を適用した場合と、上記第2の係数レベル侯補を適用した場合とのレート歪コストの変化量を算出するレート歪コスト変化量算出手段と、
上記レート歪コスト変化量算出手段の算出結果に応じて、上記第1の係数レベル候補又は上記第2の係数レベル候補のいずれかを、上記変換係数の量子化に適用する係数レベルとして選択する係数レベル選択手段と
して機能させることを特徴とする量子化プログラム。
In a moving image encoding process, in a quantization program for quantizing a transform coefficient related to an error signal between an input image constituting a moving image to be encoded and a predicted image of the input image,
Computer
Scaling means for performing scaling for quantization on the transform coefficient;
A first coefficient level compensation obtained by converting the absolute value of the scaled conversion coefficient into an integer by rounding off the decimal point, and a coefficient for determining a second coefficient level candidate whose absolute value is 1 larger than the first coefficient level candidate Level candidate determination means,
When the first coefficient level compensation is selected and when the second coefficient level candidate is selected, the scaled distortion change amount corresponding to the difference in quantization error and entropy encoding are performed. The amount of change in the amount of code required for the above is obtained, and when the first coefficient level compensation is applied using the obtained amount of change in distortion and the amount of change in the amount of code, the second coefficient level 係数Rate distortion cost change amount calculating means for calculating a change amount of the rate distortion cost when the complement is applied; and
A coefficient that selects either the first coefficient level candidate or the second coefficient level candidate as a coefficient level to be applied to quantization of the transform coefficient according to the calculation result of the rate distortion cost change amount calculation means. A quantization program that functions as a level selection means.
動画像符号化処理において、符号化対象の動画像を構成する入力画像と上記入力画像の予測画像との誤差信号に係る変換係数を、量子化する量子化方法において、
上記変換係数に対して量子化のためのスケーリングを施すスケーリング工程と、
スケーリングされた上記変換係数の絶対値について小数点以下の切り捨てにより整数化した第1の係数レベル侯補と、第1の係数レベル候補よりも絶対値が1大きい第2の係数レベル候補を決定する上記係数レベル候補決定工程と、
上記第1の係数レベル侯補を選択した場合と、上記第2の係数レベル候補を選択した場合の、量子化誤差の差に相当するスケール化された歪変化量、及び、エントロピー符号化する場合に必要となる符号量の変化量を求め、求めた歪変化量と符号量の変化量とを利用して、上記第1の係数レベル侯補を適用した場合と、上記第2の係数レベル侯補を適用した場合とのレート歪コストの変化量を算出するレート歪コスト変化量算出工程と、
上記レート歪コスト変化量算出工程の算出結果に応じて、上記第1の係数レベル候補又は上記第2の係数レベル候補のいずれかを、上記変換係数の量子化に適用する係数レベルとして選択する係数レベル選択工程と
を有することを特徴とする量子化方法。
In a moving image encoding process, in a quantization method for quantizing a transform coefficient related to an error signal between an input image constituting a moving image to be encoded and a predicted image of the input image,
A scaling step for scaling the transform coefficient for quantization;
The first coefficient level compensation obtained by converting the absolute value of the scaled conversion coefficient into an integer by rounding down the decimal point, and the second coefficient level candidate having a larger absolute value than the first coefficient level candidate by 1 A coefficient level candidate determination step;
When the first coefficient level compensation is selected and when the second coefficient level candidate is selected, the scaled distortion change amount corresponding to the difference in quantization error and entropy encoding are performed. The amount of change in the amount of code required for the above is obtained, and when the first coefficient level compensation is applied using the obtained amount of change in distortion and the amount of change in the amount of code, the second coefficient level 係数A rate distortion cost change amount calculating step for calculating a change amount of the rate distortion cost when the supplement is applied; and
A coefficient for selecting either the first coefficient level candidate or the second coefficient level candidate as a coefficient level to be applied to quantization of the transform coefficient according to the calculation result of the rate distortion cost change amount calculating step. And a level selection step.
動画像符号化装置において、符号化対象の動画像を構成する入力画像と上記入力画像の予測画像との誤差信号に係る変換係数を、量子化する量子化装置を備え、上記量子化装置として、請求項1〜6のいずれかに記載された量子化装置を適用したことを特徴とする動画像符号化装置   In the moving image coding apparatus, the moving image coding apparatus includes a quantization device that quantizes a transform coefficient related to an error signal between an input image constituting a moving image to be encoded and a predicted image of the input image, and the quantization device includes: A moving picture coding apparatus to which the quantization apparatus according to any one of claims 1 to 6 is applied.
JP2010037845A 2010-02-23 2010-02-23 Quantization apparatus, program and method, and moving picture encoding apparatus Active JP5423469B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010037845A JP5423469B2 (en) 2010-02-23 2010-02-23 Quantization apparatus, program and method, and moving picture encoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010037845A JP5423469B2 (en) 2010-02-23 2010-02-23 Quantization apparatus, program and method, and moving picture encoding apparatus

Publications (2)

Publication Number Publication Date
JP2011176483A JP2011176483A (en) 2011-09-08
JP5423469B2 true JP5423469B2 (en) 2014-02-19

Family

ID=44688961

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010037845A Active JP5423469B2 (en) 2010-02-23 2010-02-23 Quantization apparatus, program and method, and moving picture encoding apparatus

Country Status (1)

Country Link
JP (1) JP5423469B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10085024B2 (en) * 2012-04-13 2018-09-25 Qualcomm Incorporated Lookup table for rate distortion optimized quantization
US10230956B2 (en) * 2012-09-26 2019-03-12 Integrated Device Technology, Inc. Apparatuses and methods for optimizing rate-distortion of syntax elements
US10277907B2 (en) 2012-10-25 2019-04-30 Integrated Device Technology, Inc. Rate-distortion optimizers and optimization techniques including joint optimization of multiple color components
EP2941000B1 (en) * 2012-12-27 2020-11-04 NEC Corporation Video coding device, video coding method, and video coding program
JP6476900B2 (en) * 2015-01-21 2019-03-06 富士通株式会社 Moving picture coding apparatus, moving picture coding method, and computer program for moving picture coding
CN108322749B (en) * 2018-03-15 2021-03-16 北京数码视讯科技股份有限公司 RDOQ coefficient optimization method, RDOQ acceleration method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1830573A1 (en) * 2006-03-02 2007-09-05 Thomson Licensing Method and apparatus for determining in picture signal encoding the bit allocation for groups of pixel blocks in a picture
US9008171B2 (en) * 2008-01-08 2015-04-14 Qualcomm Incorporated Two pass quantization for CABAC coders
US8902972B2 (en) * 2008-04-11 2014-12-02 Qualcomm Incorporated Rate-distortion quantization for context-adaptive variable length coding (CAVLC)

Also Published As

Publication number Publication date
JP2011176483A (en) 2011-09-08

Similar Documents

Publication Publication Date Title
TWI813126B (en) Dependent quantization
JP5409909B2 (en) How to decode a bitstream
JP5492206B2 (en) Image encoding method and image decoding method, and image encoding device and image decoding device
TWI705700B (en) Apparatus and method for decoding and encoding a significance map, and related decoder, data stream and computer readable digital storage medium
JP3679083B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, image decoding program
KR102314801B1 (en) Selective Blending for Entropy Coding in Video Compression
KR102613155B1 (en) Efficient coding of transform coefficients using or suitable for a combination with dependent scalar quantization
JP5566529B2 (en) How to code a video using a dictionary
KR102020101B1 (en) Method and apparatus for syntax element encoding in a video codec
CN108093256B (en) Method for encoding and decoding image, encoding and decoding device
US9635366B2 (en) Quantization method, coding apparatus, and computer-readable recording medium storing quantization program
US20080219578A1 (en) Method and apparatus for context adaptive binary arithmetic coding and decoding
JP2014523186A (en) Entropy encoding / decoding method and apparatus
WO2010119757A1 (en) Image encoding apparatus, method, and program, and image decoding apparatus, method, and program
WO2011007719A1 (en) Image processing apparatus and method
JP5423469B2 (en) Quantization apparatus, program and method, and moving picture encoding apparatus
KR20090097013A (en) Apparatus of encoding image and apparatus of decoding image
JP2008035134A (en) Image coding device
KR20120009693A (en) Competition-Based Intra Prediction Coding/Decoding Apparatus and Method Using Multiple Prediction Filters
JP2016134860A (en) Dynamic image encoding device, dynamic image encoding method and dynamic image encoding computer program
US20080144721A1 (en) Video coding apparatus
JP4855417B2 (en) Video encoding device, video decoding device
CN105453566B (en) Data encoding and data decoding
JP2023117786A (en) Encoding device, program, and model generation method
JP2014068247A (en) Code amount calculation device and program and moving image encoder and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121115

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130416

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130430

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130628

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130723

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130920

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: 20131029

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131111

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5423469

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150