JP2009038746A - Image information encoding device - Google Patents
Image information encoding device Download PDFInfo
- Publication number
- JP2009038746A JP2009038746A JP2007203208A JP2007203208A JP2009038746A JP 2009038746 A JP2009038746 A JP 2009038746A JP 2007203208 A JP2007203208 A JP 2007203208A JP 2007203208 A JP2007203208 A JP 2007203208A JP 2009038746 A JP2009038746 A JP 2009038746A
- Authority
- JP
- Japan
- Prior art keywords
- code amount
- estimated
- unit
- target
- arithmetic coding
- 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.)
- Pending
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
本発明は、動画像の画像情報を符号化する画像情報符号化装置に関し、特に量子化されたDCT(Discrete Cosine Transform)係数などを可変長符号化して出力する画像情報符号化装置に関する。また、オーディオ情報の符号化装置に関係する。 The present invention relates to an image information encoding apparatus that encodes image information of a moving image, and more particularly to an image information encoding apparatus that outputs a quantized DCT (Discrete Cosine Transform) coefficient and the like after variable length encoding. The present invention also relates to an audio information encoding device.
動画像の符号化技術において、符号化効率の向上が図られている。これにより、携帯電話機で滑らかな動きのテレビ電話を実現したり、高画質な動画像を撮影したりすることも可能になりつつある。このような符号化技術の進展において、最新の動画像圧縮符号化技術の国際基準であるH.264/AVCでは、DCT係数や動きベクトルなど、シンタックスで伝送することが定められているシンタックス要素のエントロピー符号化方式として、単純な表による変換に代わってさらに符号化効率の高い符号化方式が用意されている。すなわち、CAVLC(Context-Adaptive Variable Length Coding)と呼ばれる可変長符号化方式や、CABAC(Context-Adaptive Binary Arithmetic Coding)と呼ばれる算術符号化方式である。これらのうち、CABACのような算術符号化方式は、定常的な信号を理論上、限界まで圧縮することが可能であるといわれている。 In the moving picture coding technique, the coding efficiency is improved. As a result, it is becoming possible to realize a smooth-moving videophone or to shoot a high-quality moving image on a mobile phone. With this advancement in coding technology, the H.264 / AVC, which is the international standard for the latest video compression coding technology, specifies that syntax such as DCT coefficients and motion vectors should be transmitted. As an element entropy encoding method, an encoding method with higher encoding efficiency is prepared instead of conversion by a simple table. That is, a variable-length coding method called CAVLC (Context-Adaptive Variable Length Coding) and an arithmetic coding method called CABAC (Context-Adaptive Binary Arithmetic Coding). Of these, arithmetic coding methods such as CABAC are said to be able to theoretically compress stationary signals to the limit.
一方、CABACは、上記のように符号化効率のよさがメリットであるが、処理が終わるまで発生符号量がわからないという欠点がある。 On the other hand, CABAC has the advantage of good coding efficiency as described above, but has the disadvantage that the amount of generated code is not known until the processing is completed.
HDサイズ(1920x1080)画像に対応したCABACをハードウエア実装した場合、リアルタイム処理を実現するのは難しい。そこで算術符号化の前段にバッファを設け、非同期処理にする手法が考えられる。その場合、処理中の1枚の画像の最後にデータ量の多いマクロブロック(以下、MB)が集中したとすると、算術符号化の符号量が確定するのに最悪ケースでは1枚の画像分の遅延が生じてしまうような場合がある。 Real-time processing is difficult to achieve when hardware is mounted on CABAC that supports HD size (1920x1080) images. Therefore, a method of providing a buffer before the arithmetic coding and performing asynchronous processing can be considered. In this case, if a macroblock (hereinafter referred to as MB) having a large amount of data is concentrated at the end of one image being processed, the code amount for arithmetic coding is determined, but in the worst case, it corresponds to one image. There may be a delay.
このように、算術符号化の符号量が確定してから符号化画像のレート制御を行なうとすると、例えば、ピクチャごとにレート制御を行なうことは可能だが、マクロブロックごとに量子化ステップを変更するなどのような細やかなレート制御を行なうことが困難である。ピクチャごとにレート制御を行なう場合と、マクロブロックごとにレート制御を行なう場合とを比較すると、ピクチャごとにレート制御を行なう場合の方がレートの変動が大きくなってしまう可能性が高く、従って動画像の画質の劣化を招く可能性が高いという課題がある。 As described above, if the coded image rate control is performed after the code amount of arithmetic coding is determined, for example, the rate control can be performed for each picture, but the quantization step is changed for each macroblock. It is difficult to perform fine rate control such as. When the rate control for each picture is compared with the rate control for each macroblock, it is more likely that the rate fluctuation will be greater when the rate control is performed for each picture. There is a problem that there is a high possibility that image quality will be deteriorated.
また、MPEG-2などの従来の画像符号化のレート制御では、目標符号量とリアルタイムに出力される符号量との差を基に量子化ステップを決定しレート制御する(例えば、特許文献2参照)。しかし、CABAC(算術符号化)を採用したH.264では、CABAC符号化で発生する符号量をリアルタイムで取得するのが難しく遅延が生じ、最悪ビットオーバでレート制御が破綻する。このため、CABACへの入力データ量を事前に監視し制限することで、リアルタイム符号化を確保する方法が開示されている(例えば、特許文献1参照)。
しかしながら、上記従来例では、CABACへの入力データ量を制限する必要がある。そのため、粗く量子化して再符号化するなどの処理が不可欠であり、急激な画質劣化を引きおこすという課題がある。 However, in the above conventional example, it is necessary to limit the amount of data input to CABAC. For this reason, processing such as coarse quantization and re-encoding is indispensable, and there is a problem of causing rapid image quality degradation.
上記課題に鑑みて、推定された発生符号量に基づいてレート制御する画像符号化方法が考えられる。この方法では、推定された符号量を用いるため、算術符号化処理の完了を待つ必要がない。また、前述のようにCABACへの入力データ量を制限する必要がないので、画質劣化を起こすことはない。 In view of the above problems, an image encoding method in which rate control is performed based on an estimated generated code amount can be considered. In this method, since the estimated code amount is used, it is not necessary to wait for completion of the arithmetic encoding process. In addition, as described above, there is no need to limit the amount of data input to CABAC, so image quality does not deteriorate.
しかしながら、推定された符号量を基にレート制御を行うため、実際の符号量と推定符号量との誤差が発生し、蓄積する。そのため、実際に割り当て可能な符号量より多い符号量を割り当る可能性があり、最悪の場合レート破綻を引き起こす。また、実際に割り当て可能な符号量より少ない符号量を割り当てた場合、想定した画質が維持できず、画質が劣化することがある。 However, since rate control is performed based on the estimated code amount, an error between the actual code amount and the estimated code amount is generated and accumulated. Therefore, there is a possibility that a larger code amount than the actually assignable code amount may be allocated, which causes a rate breakdown in the worst case. Also, if a smaller code amount than the actually assignable code amount is assigned, the assumed image quality may not be maintained and the image quality may deteriorate.
そこで、本発明は、推定された符号量に基づいてレート制御を行った場合でも、推定誤差の影響を最小限に抑えた画像情報符号化装置を提供することを目的とする。 Accordingly, an object of the present invention is to provide an image information encoding apparatus that minimizes the influence of an estimation error even when rate control is performed based on an estimated code amount.
上記課題を解決するために、本発明に係る情報圧縮装置は、データ変換手段と可逆圧縮手段を備える情報圧縮装置であって、前記可逆圧縮手段による可逆圧縮前のデータに基づいて、前記可逆圧縮手段による可逆圧縮後の実符号量を推定して推定符号量を生成する符号量推定手段と、前記符号量推定手段によって生成された推定符号量を累積して累積推定符号量を生成する推定符号量累積手段と、前記可逆圧縮後の実符号量を累積して累積実符号量を生成する実符号量累積手段と、前記推定符号量累積手段によって生成された累積推定符号量を前記実符号量累積手段によって生成された累積実符号量で補正する累積推定符号量補正手段と、前記可逆圧縮後の実符号量が確定していない前記可逆圧縮前のデータに対する未確定推定符号量を累積して累積未確定推定符号量を生成する未確定推定符号量累積手段と、前記推定符号量補正手段によって補正された累積推定符号量と前記未確定推定符号量累積手段によって生成された累積未確定推定符号量とに基づいて、前記データ変換手段から出力される符号量の目標値である目標符号量を設定するレート制御手段とを備え、前記データ変換手段は、前記目標符号量に基づいてデータを変換することによって、当該データ変換手段から出力される符号量を増減させることを特徴とする。これにより、推定された符号量に基づいてレート制御を行った場合でも、推定された符号量が実際の符号量で補正され、推定誤差の影響を最小限に抑えることができる。 In order to solve the above-described problem, an information compression apparatus according to the present invention is an information compression apparatus including a data conversion unit and a lossless compression unit, and the lossless compression is performed based on data before lossless compression by the lossless compression unit. A code amount estimation unit that estimates an actual code amount after lossless compression by the unit and generates an estimated code amount; and an estimated code that accumulates the estimated code amount generated by the code amount estimation unit and generates a cumulative estimated code amount Amount accumulating means, actual code amount accumulating means for accumulating the actual code amount after the lossless compression to generate an accumulated actual code amount, and the accumulated estimated code amount generated by the estimated code amount accumulating means as the actual code amount Accumulated estimated code amount correcting means for correcting with the accumulated actual code amount generated by the accumulating means, and accumulating the undetermined estimated code amount for the data before the lossless compression for which the actual code amount after the lossless compression is not fixed An undetermined estimated code amount accumulating unit for generating an accumulated undetermined estimated code amount, an accumulated estimated code amount corrected by the estimated code amount correcting unit, and an accumulated undetermined estimation generated by the undetermined estimated code amount accumulating unit Rate control means for setting a target code amount that is a target value of the code amount output from the data conversion means based on the code amount, and the data conversion means converts the data based on the target code amount. By performing the conversion, the amount of code output from the data conversion means is increased or decreased. Thereby, even when the rate control is performed based on the estimated code amount, the estimated code amount is corrected with the actual code amount, and the influence of the estimation error can be minimized.
また、本発明に係る画像情報符号化装置は、動画像圧縮手段と算術符号化手段を備える画像情報符号化装置であって、前記算術符号化手段による算術符号化前の動画像に関するデータを用いて、前記算術符号化手段による算術符号化後の実符号量を推定して推定符号量を生成する符号量推定手段と、前記符号量推定手段によって生成された推定符号量の累積値の一部または全部を前記算術符号化後の実符号量に置き換えて推定誤差を軽減する推定符号量置き換え手段と、前記推定符号量置き換え手段によって置き換えられた前記推定符号量の累積値を基に前記動画像圧縮手段から出力される符号量の目標値である目標符号量を設定するレート制御手段とを備え、前記動画像圧縮手段は、前記目標符号量に基づいて動画像を圧縮することを特徴とする。これにより、推定された符号量に基づいてレート制御を行った場合でも、推定された符号量が実際の符号量に置き換えられ、推定誤差の影響を最小限に抑えることができる。 The image information encoding apparatus according to the present invention is an image information encoding apparatus including a moving image compression unit and an arithmetic encoding unit, and uses data related to a moving image before arithmetic encoding by the arithmetic encoding unit. A code amount estimation unit that estimates an actual code amount after arithmetic coding by the arithmetic coding unit and generates an estimated code amount; and a part of a cumulative value of the estimated code amount generated by the code amount estimation unit Alternatively, the estimated code amount replacing means for reducing the estimation error by replacing the entire code amount with the actual code amount after arithmetic coding, and the moving image based on the accumulated value of the estimated code amount replaced by the estimated code amount replacing means. Rate control means for setting a target code amount that is a target value of the code amount output from the compression means, and the moving image compression means compresses the moving image based on the target code amount. To. Thereby, even when rate control is performed based on the estimated code amount, the estimated code amount is replaced with the actual code amount, and the influence of the estimation error can be minimized.
なお、本発明は、このような画像情報符号化装置として実現することができるだけでなく、このような画像情報符号化装置に備えられるコンテキスト適応型2値算術符号化装置として実現したり、このような画像情報符号化装置が備える特徴的な手段をステップとする画像情報符号化方法として実現したり、それらのステップをコンピュータに実行させるプログラムとして実現したりすることもできる。そして、そのようなプログラムは、CD−ROM等の記録媒体やインターネット等の伝送媒体を介して配信することができるのは言うまでもない。 Note that the present invention can be realized not only as such an image information encoding device, but also as a context adaptive binary arithmetic encoding device provided in such an image information encoding device. The present invention can be realized as an image information encoding method having steps as characteristic means included in a simple image information encoding apparatus, or as a program for causing a computer to execute these steps. Needless to say, such a program can be distributed via a recording medium such as a CD-ROM or a transmission medium such as the Internet.
以上のように、本発明によれば、推定された符号量に基づいてレート制御を行った場合でも、推定された符号量が実際の符号量で補正され、推定誤差の影響を最小限に抑えることができる。これにより、CABAC処理が終了する前に、レート制御に必要な算術符号化後の符号量を推定することができ、遅延がなくかつ精度よくレート制御を実現することが可能となる。 As described above, according to the present invention, even when rate control is performed based on the estimated code amount, the estimated code amount is corrected with the actual code amount, and the influence of the estimation error is minimized. be able to. As a result, the code amount after arithmetic coding necessary for the rate control can be estimated before the CABAC processing is completed, and it is possible to realize the rate control with high accuracy without delay.
(実施の形態)
図1は、本実施の形態の画像情報符号化装置の構成を示すブロック図である。本実施の形態の画像情報符号化装置は、マクロブロックごとに、残差信号、DCT係数、量子化係数及び2値データのいずれかに基づいて、CABAC処理部で発生する符号量を予測し、その予測結果に基づいて量子化部での量子化ステップを調整することにより、符号化レートを制御する画像情報符号化装置であって、予測処理部100、DCT変換部101、量子化部102、CABAC処理部103、バッファ104、符号量推定部105及びレート制御判定部106を備える。なお、同図では、予測処理部100からの残差信号、DCT変換部101からのDCT係数、量子化部102からの量子化係数、及びCABAC処理部103からの2値データのいずれもが符号量推定部105に入力されているが、実際には、これらのうちのいずれかでよい。以下では、まず、量子化係数に基づいて符号量を予測する場合について説明する。予測処理部100は、画像情報符号化処理対象の画像領域であるマクロブロック(以下、「MB」と表記する。)に対し、そのピクチャタイプ及びスライスタイプを検出し、検出したピクチャタイプ(I、P、B)及びスライスタイプ(I、P、B)を符号量推定部105に出力する。また、予測処理部100は、面内予測や面間予測により生成した予測画像と原画像の差分値である残差信号、および、予測方法などの符号化条件(以下、「予測情報」という。)を出力する。予測情報の一例を示すと、MBの符号化モード、マクロブロックタイプ、符号化ブロックパターン及び直前のMBからの量子化パラメータの差分などである。DCT変換部101は、予測処理部100の出力である残差信号を離散コサイン変換した係数を出力する。量子化部102では、DCT変換部101の出力であるDCT係数を量子化した係数を出力する。CABAC処理部103では量子化部の出力である量子化係数および、予測情報を2値化し、算術符号化を行い、ビットストリームをバッファ104に出力する。符号量推定部105では、量子化部の出力である量子化係数および予測処理部100の出力である予測情報を、それぞれの“算術符号化結果の発生符号量の実測値を基に作成されたテーブル”を用いて推定符号量に変換することで、CABAC処理部103から出力される符号量を推定する。すなわち、予測情報の符号量を推定するテーブルは、量子化係数の符号量を推定するテーブルとは別途、予測情報を符号化して得られる実測値に基づいて作成される。符号量推定部105では、符号化対象MBのピクチャタイプまたはスライスタイプに応じて、量子化係数に対応する推定符号量を示した変換テーブルを複数保持している。符号量推定部105は、予測処理部100から入力されるピクチャタイプまたはスライスタイプに従って、保持している中で最適な変換テーブルを選択し、参照する。レート制御判定部106では、符号量推定部105の出力である推定符号量を基に以降の符号化条件を決定する。レート制御を行なうための符号化条件は、例えば、量子化部102における量子化ステップの値である。レート制御判定部106は、決定した符号化条件を量子化部102に戻し、以降のMBの符号化条件とする。
(Embodiment)
FIG. 1 is a block diagram showing a configuration of an image information encoding apparatus according to the present embodiment. The image information encoding apparatus according to the present embodiment predicts the code amount generated in the CABAC processing unit based on one of the residual signal, DCT coefficient, quantization coefficient, and binary data for each macroblock, An image information encoding device that controls an encoding rate by adjusting a quantization step in a quantization unit based on the prediction result, and includes a
図2は、図1に示したCABAC処理部103のより詳細な構成を示すブロック図である。CABAC処理部103は、量子化部102から入力される量子化係数を2値化し、2値化により得られた2値データを算術符号化する処理部であって、2値化処理部200、算術符号化部201及びCONTEXT計算部203を備える。
FIG. 2 is a block diagram showing a more detailed configuration of the
2値化処理部200は、量子化部102の出力である量子化係数を定められた変換法則にしたがって、2値データに変換する。算術符号化部201は前記2値データの入力に応じて、CONTEXT計算部203から出力される0/1の生起確率を用いて算術符号化を行い、バッファ104へ出力する。CONTEXT計算部203は、内部に0/1の生起確率を示すテーブルを格納しており、そのテーブルを参照して、次のビットの0/1の生起確率を算術符号化部201に出力する。CONTEXT計算部203は、ビットの値が予測どおりでなかった場合、内部のテーブルの0/1の生起確率を更新する。
The
図3は、図1に示したレート制御判定部106によるレート制御方法の一例を示すグラフである。レート制御判定部106は、例えば、(1)MBごとの一定の目標発生符号量(例えば、3Mbit/MB)と、(2)同一ピクチャ内の各MBの推定符号量を現在のMBまで累積して得られる累積推定符号量と、現在のMBまでの累積目標発生符号量との差分の上限及び下限の閾値と、(3)現在のMBまでの累積推定符号量が累積目標発生符号量と比較して閾値を超えて増加または減少した場合、量子化ステップをどれだけ増加または減少させるかを記憶している。そして、符号量推定部105から得られる推定符号量を1MBごとに集計し、集計した推定符号量が累積目標発生符号量から閾値を超えて増加した場合、量子化ステップの増加量を量子化部102に出力する。これにより、量子化部102は、より大きな値の量子化ステップでDCT係数を量子化するので、量子化係数がより小さな値となり、発生符号量が低減される。
FIG. 3 is a graph showing an example of a rate control method performed by the rate
図4は、画像情報符号化装置全体における各処理部のレート制御の手順を示すフローチャートである。まず、量子化部102は、ピクチャの先頭のMBを対象MBとして順次、量子化を行なう。各MBに対して、画素と同数の輝度及び色差のDCT係数が算出されており、量子化部102はこのDCT係数を量子化ステップで除算し、量子化係数を出力する(S901)。符号量推定部105は、量子化部102から出力された量子化係数をキーとして、内部に保持している変換テーブルを参照し、その量子化係数に対応する推定符号量を取得する(S902)。符号量推定部105は、取得した推定符号量を、例えば、(符号量)というレジスタに加算していき、対象MBのすべての量子化係数の推定符号量が取得されたか否かを判定する(S904)。まだ対象MBのすべての量子化係数の推定符号量が取得されていないときは、ステップS902に戻り、新たな量子化係数を取得する。対象MBのすべての量子化係数について推定符号量を取得した場合、(符号量)というレジスタに累積加算されていた量子化係数ごとの推定符号量を、例えば、(累積符号量)というレジスタに加算する(S905)。これにより、対象MBまでの累積推定符号量が得られる。レート制御判定部106は、MBごとに保持している目標符号量から、当該MBまでの目標符号量を算出する。例えば、目標符号量として3000bit/MBという値を保持している場合、ピクチャ内の5個のMBの量子化が完了している場合、3000×5=15000という計算を行い、対象MBまでの目標符号量を算出する。なお、レート制御判定部106は、目標符号量として3000bit/MBのように、必ずしも一定値を記憶している必要はなく、一定でない目標符号量をテーブルにして保持していてもよい。例えば、0番目のMBは2500bit、1番目のMBまでは合計5500bit、・・・、k番目のMBまでは合計32000bit、・・・などのように保持しておいてもよい。
FIG. 4 is a flowchart showing a rate control procedure of each processing unit in the entire image information encoding apparatus. First, the
次いで、レート制御判定部106は、ステップS905で算出された(累積符号量)と、計算またはテーブルから求めた目標符号量とから、対象MBを含む対象MBまでの累積符号量が目標符号量を超えており、かつ、その差があらかじめ定められた上限の閾値を超えているか否かを判定する(S906)。レート制御判定部106は、累積符号量が目標符号量を超えており、かつ、その差が上限の閾値を超えている場合、量子化ステップの値を大きくして(S907)、次のMBの符号化を開始する(S901)。累積符号量が目標符号量を超えており、かつ、その差が上限の閾値を超えている以外の場合、レート制御判定部106はさらに、累積符号量が目標符号量以下で、かつ、その差が予め定められた下限の閾値を超えているか否かを判定する(S908)。累積符号量が目標符号量以下で、かつ、その差が予め定められた下限の閾値を超えている場合、量子化ステップの値を小さくして(S909)、次のMBの符号化を開始する(S901)。それ以外の場合、レート制御判定部106は量子化ステップの値を変更することなく、次のMBの量子化を開始する(S901)。なおここで、それ以外の場合とは、累積符号量が目標符号量以下で、かつ、累積符号量と目標符号量との差が下限の閾値以下であるか、または、累積符号量が目標符号量を超えており、かつ、上限の閾値以下である場合である。このように、推定符号量に基づいてMBごとに量子化ステップを調整することにより、算術符号化による発生符号量を、より精度よく目標符号量に近づけることができる。ここでは、MBを符号化単位として、説明したがMBライン単位、スライス単位、ピクチャ単位などとしてもよい。
Next, the rate
次に符号量推定部105の符号量推定手法について述べる。
Next, a code amount estimation method of the code
図5は、各量子化係数値に対応してCABAC処理部で発生する推定符号量を示す変換テーブルである。符号量推定部105は、量子化部102により出力された量子化係数を基にCABAC処理後の符号量を推定する。推定には図5に示すような変換テーブルを利用する。符号量推定部105は、入力された量子化係数値に対応する推定符号量を、変換テーブルを参照して取得する。図5の変換テーブルによれば、例えば、量子化係数値が1のとき推定符号量は1.2ビット、量子化係数値が2のとき推定符号量は1.4ビットである。推定符号量が整数ではなく実数であるのは、実測された符号量の平均値から作成されたものであるからである。このように、変換テーブルを参照することによって、各量子化係数値から推定符号量が一意に決定される。符号量推定部105は、このような変換テーブルを内部のメモリ上に格納しており、入力された量子化係数値を基に変換テーブルを参照する。当該変換テーブルは、符号量推定部104の外部に持つとしてもよい。また、変換テーブルは1枚である必要はなく、複数枚のテーブルの中から選択して、参照してもよい。例えば、符号化対象の画像を面内予測した場合と面間予測した場合で参照するテーブルを切り替え、量子化ステップに応じた推定符号量を取得するとしてもよい。さらに、変換テーブルは、MBの符号化タイプにより切り替えるとしてもよい。また、ピクチャタイプ、スライスタイプまたは予測情報の種類毎に切り替えるとしてもよい。さらに、変換テーブルは固定値を用いた静的なテーブルとしてもよい。また、変換テーブルは更新可能な動的なテーブルとしてもよい。
FIG. 5 is a conversion table showing the estimated code amount generated in the CABAC processing unit corresponding to each quantization coefficient value. The code
図6は、図5に示した変換テーブルのより具体的な一例を示す図である。同図において、abs_level[i]のiは1から384の係数番号を示している。図6(a)は、量子化値が1から14までの値をとる場合の推定bit値を示すテーブルである。このテーブルでは、量子化値と推定符号量が1対1に対応している。このテーブルでは量子化値が1から14までの推定符号量を得ることができる。例えば、量子化係数abs_levelが1のとき推定符号量は1.56bitであり、量子化係数abs_levelが8のとき推定符号量は5.20bitである。図6(b)は、量子化値が15以上の値をとる場合の推定bit値を示すテーブルである。このテーブルでは、量子化値が15から60までと、61から250と、251以上とがそれぞれ同一推定符号量に定められている。このテーブルを参照することにより、量子化値が15以上の値をとる場合の推定bit値を一意に定めることができる。例えば、量子化係数abs_levelが125のとき推定符号量は0.82bitであり、量子化係数abs_levelが61のとき推定符号量は0.82bitである。このように、符号量推定部105は、このテーブルを参照することによって、量子化係数384個(輝度Y256、色差Cb64、色差Cr64)すべての値に対応する推定符号量を求めることが出来る。
FIG. 6 is a diagram showing a more specific example of the conversion table shown in FIG. In the figure, i in abs_level [i] indicates a coefficient number from 1 to 384. FIG. 6A is a table showing estimated bit values when the quantized values take values from 1 to 14. In this table, the quantization value and the estimated code amount have a one-to-one correspondence. In this table, it is possible to obtain an estimated code amount of
なお、図6(a)及び(b)に示した変換テーブルは、量子化係数に基づいて推定符号量を求める場合だけでなく、2値データに基づいて推定符号量を求める場合にも用いることができる。理由は、2値データが量子化係数値から一意に決まるからである。例えば、量子化係数Coeff_abs_level_minus1=10のとき、2値データは、2値データ=1111 1111 110のように、一意に求められる。 The conversion tables shown in FIGS. 6A and 6B are used not only when the estimated code amount is obtained based on the quantization coefficient but also when the estimated code amount is obtained based on binary data. Can do. The reason is that the binary data is uniquely determined from the quantization coefficient value. For example, when the quantization coefficient Coeff_abs_level_minus1 = 10, binary data is uniquely obtained as binary data = 1111 1111 110.
ここでは、量子化係数のみについて言及したが、量子化係数以外のCABAC処理の対象となる予測情報を符号量推定部105の対象とすることもできる。
Here, only the quantized coefficients are mentioned, but prediction information that is subject to CABAC processing other than the quantized coefficients may be the target of the code
さらに、符号量推定部105の推定に利用するデータを、量子化係数だけでなく2値化処理部200で生成される2値データ値または2値データ量、DCT係数、予測処理部100の出力である予測画像と入力画像の差分である残差信号として、変換テーブルを生成することも可能である。
Further, the data used for the estimation of the code
図7は、DCT係数の値に対応して算術符号化による推定符号量を示す変換テーブルの一例を示す図である。DCT係数に基づいて符号量を推定する場合には、後段の量子化によって推定符号量が変わってくるため、量子化変数QP(H.264で規定される値で、0〜51の値を取り得る)ごとに変換テーブルを作成し、各MBに量子化変数QPが決定される都度、変換テーブルを切り替えて用いるものとする。図7(a)は、量子化変数QPごとに作成された変換テーブルの一例を示す図である。図7(b)は、DCT係数を用いて符号量を推定しレート制御を行なう場合のデータおよび手順の流れを示す図である。符号量推定部105は、量子化部102から現在量子化されているMBの量子化変数QPを受け取り、受け取った量子化変数QPに基づいて、図7(a)に示した変換テーブルを選択する。符号量推定部105は、DCT係数ごとに選択したテーブルを参照して各DCT係数の算術符号量を推定し、推定符号量を現MB内のDCT係数全部について集計することにより、現MBの推定符号量を算出する。符号量推定部105は、図3のグラフに示したように、先頭MBから現MBまでの累積符号量を算出してレート制御判定部106に出力する。レート制御判定部106は、符号量推定部105から入力された累積符号量を、先頭MBから現MBまでの累積目標発生符号量と比較し、次のMBの量子化変数QPを決定する。
FIG. 7 is a diagram illustrating an example of a conversion table indicating the estimated code amount by arithmetic coding corresponding to the DCT coefficient value. When the code amount is estimated based on the DCT coefficient, the estimated code amount is changed by the subsequent quantization. Therefore, the quantization variable QP (value defined by H.264 is a value from 0 to 51. A conversion table is created for each (obtain), and each time the quantization variable QP is determined for each MB, the conversion table is switched and used. FIG. 7A is a diagram illustrating an example of a conversion table created for each quantization variable QP. FIG. 7B is a diagram illustrating a flow of data and a procedure when rate control is performed by estimating a code amount using a DCT coefficient. The code
上記実施の形態では、図7を用いて量子化前のDCT係数から符号量を推定する方法について説明したが、以下では、周波数変換を行う前の残差信号から符号量を推定する方法について説明する。図8は、MB内の各画素の残差信号と、その残差信号から当該MBの符号量を推定するためのテーブルである。図8(a)は、ピクチャ内の各MBとその残差信号の絶対差分値和(SAD)の一例を示す図である。なお、予測誤差には、絶対差分値和や差分自乗和(SSD)を用いるのが一般的である。ここでは、絶対差分値和について説明する。また、図8(b)は、MBごとの絶対差分値和(SAD)に対応する当該MBの推定符号量を示すテーブルである。残差信号も後段で量子化を施されるので、量子化変数QPごとに変換テーブルが作成されている。また、残差信号は、空間上の信号成分を表しているのに対し、DCT係数はそれらの周波数成分を表している。従って画素ごとの予測誤差の値は、量子化係数や2値データと1対1に対応しない。このため、符号量推定部105は、MBごとに絶対差分値和を集計し、集計した絶対差分値和を用いて図8(b)の変換テーブルを参照し、当該MBに対する推定符号量を得る。
In the above embodiment, the method for estimating the code amount from the DCT coefficient before quantization has been described with reference to FIG. 7, but the method for estimating the code amount from the residual signal before performing frequency conversion will be described below. To do. FIG. 8 is a table for estimating the residual amount signal of each pixel in the MB and the code amount of the MB from the residual signal. FIG. 8A is a diagram illustrating an example of the absolute difference value sum (SAD) of each MB in a picture and its residual signal. Note that the absolute difference value sum or the sum of squared differences (SSD) is generally used for the prediction error. Here, the absolute difference value sum will be described. FIG. 8B is a table showing the estimated code amount of the MB corresponding to the absolute difference value sum (SAD) for each MB. Since the residual signal is also quantized at a later stage, a conversion table is created for each quantization variable QP. Further, the residual signal represents a signal component in space, whereas the DCT coefficient represents those frequency components. Therefore, the prediction error value for each pixel does not correspond one-to-one with the quantization coefficient or binary data. For this reason, the code
次に動的な変換テーブルの作成手法を述べる。 Next, a method for creating a dynamic conversion table will be described.
第一の手法を述べる。図9は、算術符号化により実際に発生した符号量を参照して、変換テーブルを更新する方法を説明する図である。この場合、符号量推定部105は、例えば、変換テーブル生成部を備える。
The first method is described. FIG. 9 is a diagram illustrating a method of updating the conversion table with reference to the code amount actually generated by arithmetic coding. In this case, the code
符号量推定部105は、量子化部102より出力された量子化係数を内部メモリに格納する。次に変換テーブル生成部は、CABAC処理部103で符号化された符号から、符号量を計測し内部メモリに格納する。具体的には、CABAC処理部103から出力される符号が0であるか、1であるか、あるいは未定であるかをカウントすることによって符号量を計測する。出力される符号が未定である場合、変換テーブル生成部は、CABAC処理部103に備えられ、どの桁の符号値が確定していないのかをカウントするカウンタBits_Outstandingの値を用いて符号量を計測する。
The code
次いで、変換テーブル生成部は、内部メモリ内の量子化値と実際に計測された符号量とを既存の変換テーブルに一旦、記入する。変換テーブル生成部は、変換テーブルに記入されている、同じ量子化値に対応する符号量同士を平均した値で既存の変換テーブルを更新する。なお、変換テーブルの更新は、全ての量子化係数毎に行うことも、一部の量子化係数のみ行うとしてもよい。 Next, the conversion table generation unit temporarily enters the quantization value in the internal memory and the actually measured code amount in the existing conversion table. The conversion table generation unit updates the existing conversion table with a value obtained by averaging the code amounts corresponding to the same quantized value entered in the conversion table. The update of the conversion table may be performed for every quantization coefficient or only a part of the quantization coefficients.
第二の手法を述べる。 The second method is described.
図2に示したCABAC処理部103は、入力に応じて、CONTEXT計算部203から出力される“事前に決められた0/1の生起確率”を用いて、区間分割を行うため、推定符号量は0/1の生起確率により変化する。符号量推定部105で、2値データの0/1系列の実際の0/1の生起確率を計測し、事前に決められた0/1の生起確率と比較する。符号量推定部105は、実際の生起確率と事前に決められた生起確率の差に応じて、変換テーブルを更新する。例えば、符号量推定部105は、優性シンボルの生起確率の実測値がCABACのテーブルと比べて大きく下がった場合(具体的には、優性シンボルの生起確率の実測値がCABACのテーブルと比べて予め定めた閾値よりも下がった場合)、変換テーブルを更新する。また、例えば、前記二つの生起確率が等しいときは、テーブル更新を行わない。前記二つの生起確率に差があるときは、算術符号化による圧縮率が変化するので変換テーブルの推定符号量の値を変更する。変更量は、前記二つの生起確率の差と圧縮率の差をメモリに格納し、それを用いて変更量を決定することも可能である。また、0/1のパターンにより、生起確率を推定し、テーブルを更新することも可能である。例えば、一定の個数より1が連続した場合、または0が連続した場合はCONTEXT計算部203の計算による事前の生起確率から実際の生起確率が変動するので、そのようなパターンを検出した場合は、変換テーブルを更新するとしてもよい。すなわち、符号量推定部105は、2値データの0と1との出現パターンを解析して、一定以上の個数の0または1が連続したとき、算術符号化による圧縮率が高くなるので、量子化係数、2値データ、DCT係数及び残差信号のいずれかの同一値に対して、変換テーブルの推定符号量を低減するように更新する。また、一定以上の個数の0と1とが交互に出現したとき、前記同一値に対して、変換テーブルの推定符号量を増加するように更新する。
Since the
また、前記事前に決められた0/1の生起確率が変動した場合に変換テーブルを更新するとしてもよいし、前記実際の生起確率と事前に決められた生起確率が変動した場合に変換テーブルを更新するとしてもよいし、これらの組み合わせなどとしてもよい。 The conversion table may be updated when the predetermined occurrence probability of 0/1 varies, or the conversion table when the actual occurrence probability and the predetermined occurrence probability vary. May be updated, or a combination thereof may be used.
さらに前記事前に決められた0/1の生起確率は、動画像圧縮符号化標準H.264のエントロピー符号化CABACでは、pStateIdxに対応し、これに応じて、変換テーブルを更新するとしてもよい。また、変換テーブルを更新するのではなく、最初から、高圧縮率用と低圧縮率用の2種類の変換テーブルを保持しておき、pStateIdxの値に応じて、いずれかを選択して使用するとしてもよい。すなわち、MBの算術符号化開始時にはCONTEXT計算部203が2値データの発生確率を計算する。この発生確率は、発生確率テーブルの番号pStateIdx(0-63)で与えられる。符号量推定部105は、このpStateIdxが予め定めた閾値と比較して大きいときは圧縮率が高いと判断して高圧縮率用変換テーブル(すなわち、量子化係数、2値データ、DCT係数及び残差信号のいずれかの同一の値に対して、標準の変換テーブルよりも推定符号量を低減したもの)を使用する。なお、標準の変換テーブルとは、高圧縮率用と低圧縮率用とを切り替えて用いる場合ではなく、1つの変換テーブルのみを使用して推定符号量を参照する場合の変換テーブルのことをいう。また、逆に、pStateIdxの値が、閾値と比較して小さいときは圧縮率が低いと判断して低圧縮率用変換テーブル(すなわち、量子化係数、2値データ、DCT係数及び残差信号のいずれかの同一の値に対して、標準の変換テーブルよりも推定符号量を増加したもの)を使用する。具体的には、pStateIdxの値が50でMBの算術符号化を開始したが、途中でpStateIdxの値が40になった場合、符号量推定部105は、それをトリガに低圧縮率用変換テーブルに切り替えて、符号量を推定するとしてもよい。
Further, the predetermined occurrence probability of 0/1 corresponds to pStateIdx in the entropy coding CABAC of the video compression coding standard H.264, and the conversion table may be updated accordingly. . Also, instead of updating the conversion table, two types of conversion tables for high compression rate and low compression rate are stored from the beginning, and either one is selected and used according to the value of pStateIdx It is good. That is, at the start of MB arithmetic coding, the
なお、変換テーブルを更新したり、高圧縮率用変換テーブルと低圧縮率用変換テーブルとを切り替えたりするタイミングは、pStateIdxが更新される都度であってもよいし、pStateIdxの更新の一定回数ごと(例えば、pStateIdxの更新の5回おき)などであってもよい。また、pStateIdxの移動平均に応じて、変換テーブルを更新したり、高圧縮率用変換テーブルと低圧縮率用変換テーブルとを切り替えたりするとしてもよい。例えば、pStateIdxが3回更新されるごとに3回分の平均値を求め、求められた平均値が予め定めた閾値より大きいとき高圧縮率用変換テーブルを用いる、または推定符号量を小さい値に更新する。逆に、求められた平均値が予め定めた閾値より小さいとき低圧縮率用変換テーブルを用いる、または推定符号量を大きい値に更新するなどとしてもよい。なお、移動平均の求め方は、pStateIdxの3回更新ごとである必要はなく、何回ごとであってもよい。 The timing for updating the conversion table or switching between the conversion table for high compression ratio and the conversion table for low compression ratio may be every time pStateIdx is updated, or every fixed number of times pStateIdx is updated. (For example, every 5th update of pStateIdx). Further, the conversion table may be updated or the high compression rate conversion table and the low compression rate conversion table may be switched in accordance with the moving average of pStateIdx. For example, every time pStateIdx is updated three times, an average value for three times is obtained, and when the obtained average value is larger than a predetermined threshold, a conversion table for high compression ratio is used, or the estimated code amount is updated to a small value To do. On the contrary, when the obtained average value is smaller than a predetermined threshold value, a low compression rate conversion table may be used, or the estimated code amount may be updated to a large value. Note that the method of obtaining the moving average need not be every three updates of pStateIdx, and may be any number of times.
さらに、ここでは変換テーブルとしたが、一つないしは、複数の関数により、推定符号量を決定してもよい。すなわち、符号量推定部105は、量子化係数、2値データ、DCT係数、及び残差信号のいずれかと、推定符号量との関係を表した1または複数の関数を用いて、演算によって推定符号量を算出するとしてもよい。
Furthermore, although the conversion table is used here, the estimated code amount may be determined by one or a plurality of functions. In other words, the code
なお、上記実施の形態では、符号化条件を量子化ステップとして説明したが、例えば、予測処理部100におけるMBの予測処理のタイプをスキップモードとしてしまってもよい。スキップモードとは、予測に基づいて残差信号を算出することなく、当該MBに対して所定の位置にある画像データをコピーする意味のフラグだけを送るモードをいう。このスキップモードは、1MBにつき1ビットのデータしか符号化しないので、累積された推定符号量が非常に大きい場合には、符号量の低減に有効である。この場合レート制御判定部106は、スキップモードと決定した符号化条件を予測処理部100にフィードバックする。
In the above embodiment, the coding condition is described as the quantization step. However, for example, the type of MB prediction processing in the
また、逆に、符号量推定部105において推定された累積推定符号量が、目標発生符号量よりも非常に小さかった場合には、レート制御判定部106は、それ以降のMBの符号化条件をI_PCMデータとしてもよい。I_PCMデータとは、動き予測や面内予測がされる前の各MBの生のデータであって、輝度信号及び2つの色差信号からなる。すなわち、符号化条件をI_PCMデータとするということは、動き予測や面内予測や符号化も行なわず、そのピクチャの生のデータをそのまま出力するということである。このようにすることによって、累積推定符号量が目標発生符号量に満たない場合には、データ量は大きいが符号化が行なわれないため画質が損なわれない画像データを出力することができる。
Conversely, if the cumulative estimated code amount estimated by the code
図10は、本発明の要部の詳細な構成を示すブロック図である。具体的には、動画像圧縮部400と、CABAC処理部103と、符号量推定部105と、推定符号量置き換え部35と、レート制御判定部106の詳細な構成を示している。動画像圧縮部400は、請求項1記載のデータ変換手段または請求項4記載の動画像圧縮手段の一例である。CABAC処理部103には算術符号化部12が含まれる構成を例示しているが、この算術符号化部12に代えて可変長符号化部02(図示せず)を採用することも可能である。算術符号化部12も可変長符号化部02も、請求項1記載の可逆圧縮手段の一例である。
FIG. 10 is a block diagram showing a detailed configuration of a main part of the present invention. Specifically, detailed configurations of the moving
CABAC処理部103で可変長符号化された符号化列のbit量を累積符号量計算部30に入力する。累積符号量計算部30では、符号化列のbit量を累積加算する。このとき、図示しない記憶領域で累積されたbit量がどの符号化単位からどの符号化単位までのbit量であるかを同時に記録する。ここでの符号化単位とは、ピクチャ単位、スライス単位、マクロブロックライン単位、マクロブロック単位などを指す。なお、符号化単位を識別する識別子とともにbit量を管理記録するとしてもよい。ピクチャの識別子には、符号化順序を示すピクチャ番号、マクロブロックの識別子にはマクロブロックアドレスなどを利用することができる。
The bit amount of the encoded sequence subjected to variable length encoding by the
また、可変長符号化部02は、回路実装において入力に対して非同期で動作するため、所定の符号化単位可変長符号化が完了したことを累積符号量計算部30に通知し、可変長符号化された符号化列のbit量を入力する。このとき、どの符号化単位の符号量であるかを同時に通知する。
In addition, since the variable length coding unit 02 operates asynchronously with respect to the input in circuit implementation, the variable
同様に符号量推定部105(図1の符号量推定部105に相当)で推定された符号量を累積推定符号量計算部31で累積加算する。この累積加算された値を累積符号量と呼ぶ。このとき、図示しない記憶領域で累積された符号量がどの符号化単位からどの符号化単位までの符号量であるかを同時に記録する。さらに、後述するように、どの符号化単位の可変長符号化が完了しているかをここで記録してもよい。なお、符号化単位を識別する識別子とともにbit量を管理記録するとしてもよい。
Similarly, the code amount estimated by the code amount estimation unit 105 (corresponding to the code
さらに、累積目標符号量計算部32で符号量の目標値である目標符号量を累積加算する。このとき、図示しない記憶領域で累積された目標符号量がどの符号化単位からどの符号化単位までの目標符号量であるかを同時に記録する。なお、符号化単位を識別する識別子とともにbit量を管理記録するとしてもよい。
Further, the cumulative target code
次に、累積推定符号量計算部31で計算された所定の符号化単位から所定の符号化単位までの推定符号量の累積値と、累積目標符号量計算部32で計算された所定の符号化単位から所定の符号化単位までの目標符号量の累積値との差分値(以下、累積差分値)を目標符号量計算部33へ出力する。ここでは、便宜上、累積差分値は、目標符号量の累積値から推定符号量の累積値を減算した値とする。目標符号量計算部33では、累積差分値を累積加算する。この累積加算された値を余剰符号量と呼ぶ。目標符号量計算部33では、余剰符号量と累積差分値を基に、次の符号化単位の目標符号量を決定する。決定方法の一例としては、符号化時に設定されたビットレートより求まる平均符号量を目標符号量計算部33で算出する方法がある。
Next, the cumulative value of the estimated code amount calculated from the predetermined coding unit to the predetermined coding unit calculated by the cumulative estimated code
累積差分値が正のとき、つまり、符号量に余裕があるときは、目標符号量を平均目標符号量より多く割り当てる。逆に負のときは、目標符号量を平均符号量より少なく割り当てる。また、図示しない画像特徴量計算部で計算された入力画像の画像特徴量、例えば、画像の平坦度を示す隣接画素差分などに応じて、割り当て量を制御することも可能である。ここで、隣接画素差分とは、特定の符号化単位内の画素であって、隣り合う画素同士の画素値の差分絶対値を加算した総和を示す。これにより、割り当て可能な符号量が十分ある場合である余剰符号量が所定の閾値より多い場合、かつ符号化領域の画像の平坦度が高い場合である隣接画素差分の絶対値和や二乗総和が所定の閾値より小さい場合、平均符号量より大きい目標符号量を設定することで、平坦部の微妙な画素値の変化を保存することが可能となり、画像の精細感を維持できる。 When the accumulated difference value is positive, that is, when there is a margin in the code amount, the target code amount is allocated more than the average target code amount. Conversely, when negative, the target code amount is assigned less than the average code amount. Further, it is possible to control the allocation amount according to the image feature amount of the input image calculated by the image feature amount calculation unit (not shown), for example, the adjacent pixel difference indicating the flatness of the image. Here, the adjacent pixel difference is a pixel in a specific coding unit, and indicates a sum obtained by adding the absolute differences of pixel values of adjacent pixels. As a result, the absolute value sum or the square sum of the adjacent pixel differences when the surplus code amount, which is a case where there is a sufficient code amount that can be allocated, is larger than a predetermined threshold and when the flatness of the image in the coding region is high If it is smaller than the predetermined threshold, setting a target code amount that is larger than the average code amount makes it possible to preserve a subtle change in the pixel value of the flat portion and maintain the fineness of the image.
次に動画像圧縮部400が備える量子化パラメータ算出部34は、目標符号量計算部33で決定された目標符号量から、符号化の制御情報の一つである量子化ステップを決定する。ここでは、量子化ステップを決定するとしたが、決定するものは符号量を増減させるパラメータ(符号化の制御情報)であればよい。例えば、量子化する際の量子化ステップを係数位置に応じて変化させる量子化マトリクスでもよい。また、余剰符号量が負のときは、符号量を制限するために、量子化ステップを大きくするだけでなく、面間予測が選択され易くなるように制御してもよい。例えば、符号化手段の面間予測と面内予測の判定処理において、評価関数にオフセットを設定し、面内予測が選択されやすくする。
Next, the quantization
また、量子化ステップの算出方法の一例としては、以前に符号化した符号化単位の量子化ステップ(過去の量子化ステップ)と実際に発生した符号量(過去の符号量)の比から、目標符号量に対する量子化ステップを決定する方法がある。 In addition, as an example of a method for calculating a quantization step, a target value can be calculated based on a ratio between a quantization step of a previously encoded coding unit (past quantization step) and a code amount actually generated (past code amount). There is a method for determining a quantization step for a code amount.
具体的には、以下の等式を満たすように量子化ステップを決定する。
過去の符号量:過去の量子化ステップ=目標符号量:量子化ステップ
Specifically, the quantization step is determined so as to satisfy the following equation.
Past code amount: Past quantization step = Target code amount: Quantization step
算出された量子化ステップに基づいて、量子化部102で量子化を行う。
Based on the calculated quantization step, the
上記に加えて推定符号量置き換え部35では、累積推定符号量計算部31で算出した推定符号量の一部または全部を累積符号量計算部30で算出した累積符号量に置き換える。CABACの符号化が完了した符号化単位が更新されたとき以降に、前回置き換えが完了した符号化単位から今回CABACの符号化が完了した符号化単位までの推定符号量の累積値を実際の累積符号量に置き換える。図示しない記憶領域でどの符号化単位まで置き換えが完了したかを同時に記録する。推定符号量の累積値の一部を実際の累積符号量に置き換えることで、推定誤差の伝搬を最小限にする。置き換えられた累積推定符号量をレート制御判定部106に出力する。
In addition to the above, the estimated code
ここに示す累積推定符号量計算部31と推定符号量置き換え部35は、請求項1記載の未確定推定符号量累積手段と推定符号量累積手段と累積推定符号量補正手段に相当する。
The accumulated estimated code
図11に置き換えの具体例を示す。 FIG. 11 shows a specific example of replacement.
図に示す各ブロックそれぞれが図示しない記憶領域の一つのレジスタに対応する。格納されている情報の種別(符号量、推定符号量とその該当するピクチャ番号)を各ブロックに記載する。図では、CABACの符号化がピクチャ番号0から2まで完了していることを示す。また、推定符号量の算出処理がピクチャ番号0から4まで完了していることを示す。ここでは、CABACの符号化が3ピクチャ完了する毎に置き換え処理を行う。
Each block shown in the figure corresponds to one register in a storage area (not shown). The type of information stored (code amount, estimated code amount and corresponding picture number) is described in each block. In the figure, it is shown that CABAC encoding has been completed for
「置き換え前」の置き換えが完了したピクチャ位置は、初期状態のピクチャ番号0の位置とする。ここでは、置き換えが一度も発生していないことを示す。次に「置き換え後」の置き換えが完了したピクチャ位置は、ピクチャ番号3に更新される。上記の要領で、CABACの符号化が3ピクチャ完了する毎に置き換え処理を行う。目標符号量計算部33は、図示しない記憶領域を介して、前述のどのピクチャまで符号化が完了したか(符号化完了ピクチャ位置)、どのピクチャまで推定符号量を完了したか(推定完了ピクチャ位置)、どのピクチャまで置き換えが完了したか(置き換え完了ピクチャ位置)を判断する。なお、記憶領域を介して各種の完了ピクチャ位置を管理しているが、各ブロックが直接完了通知を目標符号量計算部33に通知する構成を採用しても同様の効果が得られることは言うまでもない。
The picture position where the replacement before “replacement” is completed is the position of
以上のように、本発明によれば、推定された符号量に基づいてレート制御を行った場合でも、推定された符号量が実際の符号量で補正され、推定誤差の影響を最小限に抑えることができる。これにより、CABAC処理が終了する前に、レート制御に必要な算術符号化後の符号量を推定することができ、遅延がなくかつ精度よくレート制御を実現することが可能となる。 As described above, according to the present invention, even when rate control is performed based on the estimated code amount, the estimated code amount is corrected with the actual code amount, and the influence of the estimation error is minimized. be able to. As a result, the code amount after arithmetic coding necessary for the rate control can be estimated before the CABAC processing is completed, and it is possible to realize the rate control with high accuracy without delay.
ここでは、推定符号量を符号量に置き換える方法を示したが、このような単純な置き換えだけに限定されるものではない。すなわち、推定符号量と符号量の比率に応じた係数を推定符号量または符号量に乗算するなどの方法で推定符号量を補正するとしてもよい。 Here, a method of replacing the estimated code amount with the code amount has been described, but the present invention is not limited to such simple replacement. That is, the estimated code amount may be corrected by a method such as multiplying the estimated code amount or the code amount by a coefficient corresponding to the ratio between the estimated code amount and the code amount.
なお、CABACの符号化が完了した符号化単位と推定している符号化単位とが同じであれば、置き換えをせず、符号量をそのままレート制御に出力するとしてもよいのは言うまでもない。 Needless to say, if the encoding unit in which the CABAC encoding is completed and the estimated encoding unit are the same, the code amount may be directly output to the rate control without replacement.
なお、図1と図10の各機能ブロックは典型的には集積回路であるLSIとして実現される。これらは個別に1チップ化されても良いし、一部又は全てを含むように1チップ化されても良い(例えばメモリ以外の機能ブロックが1チップ化されていても良い。)。 Each functional block in FIGS. 1 and 10 is typically realized as an LSI which is an integrated circuit. These may be individually made into one chip, or may be made into one chip so as to include a part or all of them (for example, functional blocks other than the memory may be made into one chip).
ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。 The name used here is LSI, but it may also be called IC, system LSI, super LSI, or ultra LSI depending on the degree of integration.
また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用しても良い。 Further, the method of circuit integration is not limited to LSI's, and implementation using dedicated circuitry or general purpose processors is also possible. An FPGA (Field Programmable Gate Array) that can be programmed after manufacturing the LSI or a reconfigurable processor that can reconfigure the connection and setting of the circuit cells inside the LSI may be used.
さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適応等が可能性としてありえる。 Further, if integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology or a derivative other technology, it is naturally also possible to carry out function block integration using this technology. Biotechnology can be applied.
また、各機能ブロックのうち、符号化または復号化の対象となるデータを格納する手段だけ1チップ化せずに別構成としても良い。 In addition, among the functional blocks, only the means for storing the data to be encoded or decoded may be configured separately instead of being integrated into one chip.
また、ここでは画像符号化を例に説明したが、オーディオ信号の符号化やその他の信号符号化に適用できることは言うまでもない。 In addition, although image coding has been described here as an example, it goes without saying that the present invention can be applied to audio signal coding and other signal coding.
本発明に係る画像情報符号化装置は、通信機能を備えるパーソナルコンピュータ、PDA、ディジタル放送の放送局および携帯電話機などに備えられる画像情報符号化装置として有用である(図12参照)。 The image information encoding apparatus according to the present invention is useful as an image information encoding apparatus provided in a personal computer, a PDA, a digital broadcast station, a mobile phone, and the like having a communication function (see FIG. 12).
100 予測処理部
101 DCT変換部
102 量子化部
103 CABAC処理部
104 バッファ
105 符号量推定部
106 レート制御判定部
200 2値化処理部
201 算術符号化部
203 CONTEXT計算部
400 動画像圧縮部
11 2値化部
12 算術符号化部
30 累積符号量計算部
31 累積推定符号量計算部
32 累積目標符号量計算部
33 目標符号量計算部
34 量子化パラメータ算出部
35 推定符号量置き換え部
DESCRIPTION OF
Claims (6)
前記可逆圧縮手段による可逆圧縮前のデータに基づいて、前記可逆圧縮手段による可逆圧縮後の実符号量を推定して推定符号量を生成する符号量推定手段と、
前記符号量推定手段によって生成された推定符号量を累積して累積推定符号量を生成する推定符号量累積手段と、
前記可逆圧縮後の実符号量を累積して累積実符号量を生成する実符号量累積手段と、
前記推定符号量累積手段によって生成された累積推定符号量を前記実符号量累積手段によって生成された累積実符号量で補正する累積推定符号量補正手段と、
前記可逆圧縮後の実符号量が確定していない前記可逆圧縮前のデータに対する未確定推定符号量を累積して累積未確定推定符号量を生成する未確定推定符号量累積手段と、
前記推定符号量補正手段によって補正された累積推定符号量と前記未確定推定符号量累積手段によって生成された累積未確定推定符号量とに基づいて、前記データ変換手段から出力される符号量の目標値である目標符号量を設定するレート制御手段とを備え、
前記データ変換手段は、前記目標符号量に基づいてデータを変換することによって、当該データ変換手段から出力される符号量を増減させる
ことを特徴とする情報圧縮装置。 An information compression apparatus comprising data conversion means and lossless compression means,
A code amount estimation unit that estimates an actual code amount after lossless compression by the lossless compression unit and generates an estimated code amount based on data before the lossless compression unit;
An estimated code amount accumulating means for accumulating the estimated code amount generated by the code amount estimating means to generate an accumulated estimated code amount;
An actual code amount accumulating means for accumulating the actual code amount after the lossless compression to generate an accumulated actual code amount;
A cumulative estimated code amount correcting unit that corrects the cumulative estimated code amount generated by the estimated code amount accumulating unit with the accumulated actual code amount generated by the actual code amount accumulating unit;
Undetermined estimated code amount accumulating means for accumulating the undetermined estimated code amount for the data before the lossless compression in which the actual code amount after the lossless compression is not determined,
Based on the accumulated estimated code amount corrected by the estimated code amount correcting unit and the accumulated undetermined estimated code amount generated by the undetermined estimated code amount accumulating unit, a code amount target output from the data conversion unit Rate control means for setting a target code amount that is a value,
The data compression unit increases or decreases a code amount output from the data conversion unit by converting data based on the target code amount.
ことを特徴とする請求項1記載の情報圧縮装置。 The information compression apparatus according to claim 1, wherein the lossless compression unit performs variable-length encoding of data.
ことを特徴とする請求項1記載の情報圧縮装置。 The information compression apparatus according to claim 1, wherein the lossless compression unit arithmetically encodes data.
前記算術符号化手段による算術符号化前の動画像に関するデータを用いて、前記算術符号化手段による算術符号化後の実符号量を推定して推定符号量を生成する符号量推定手段と、
前記符号量推定手段によって生成された推定符号量の累積値の一部または全部を前記算術符号化後の実符号量に置き換えて推定誤差を軽減する推定符号量置き換え手段と、
前記推定符号量置き換え手段によって置き換えられた前記推定符号量の累積値を基に前記動画像圧縮手段から出力される符号量の目標値である目標符号量を設定するレート制御手段とを備え、
前記動画像圧縮手段は、前記目標符号量に基づいて動画像を圧縮する
ことを特徴とする画像情報符号化装置。 An image information encoding device comprising a moving image compression means and an arithmetic encoding means,
Code amount estimation means for estimating an actual code amount after arithmetic coding by the arithmetic coding means and generating an estimated code amount using data relating to a moving image before arithmetic coding by the arithmetic coding means;
Estimated code amount replacement means for reducing the estimation error by replacing part or all of the accumulated value of the estimated code amount generated by the code amount estimation means with the actual code amount after the arithmetic coding;
A rate control unit that sets a target code amount that is a target value of a code amount output from the moving image compression unit based on a cumulative value of the estimated code amount replaced by the estimated code amount replacement unit;
The moving image compression unit compresses a moving image based on the target code amount.
前記算術符号化ステップにおける算術符号化前の動画像に関するデータを用いて、前記算術符号化ステップにおける算術符号化後の実符号量を推定して推定符号量を生成する符号量推定ステップと、
前記符号量推定ステップにおいて生成された推定符号量の累積値の一部または全部を前記算術符号化後の実符号量に置き換えて推定誤差を軽減する推定符号量置き換えステップと、
前記推定符号量置き換えステップにおいて置き換えられた前記推定符号量の累積値を基に前記動画像圧縮ステップにおいて出力される符号量の目標値である目標符号量を設定するレート制御ステップとを含み、
前記動画像圧縮ステップにおいて前記目標符号量に基づいて動画像を圧縮する
ことを特徴とする画像情報符号化方法。 An image information encoding method including a moving image compression step and an arithmetic encoding step,
A code amount estimation step for generating an estimated code amount by estimating an actual code amount after arithmetic coding in the arithmetic coding step using data on a moving image before arithmetic coding in the arithmetic coding step;
An estimated code amount replacement step for reducing an estimation error by replacing a part or all of the accumulated value of the estimated code amount generated in the code amount estimation step with the actual code amount after the arithmetic coding;
A rate control step of setting a target code amount that is a target value of the code amount output in the moving image compression step based on the accumulated value of the estimated code amount replaced in the estimated code amount replacement step,
An image information encoding method, wherein the moving image is compressed based on the target code amount in the moving image compression step.
前記算術符号化手段による算術符号化前の動画像に関するデータを用いて、前記算術符号化手段による算術符号化後の実符号量を推定して推定符号量を生成する符号量推定手段と、
前記符号量推定手段によって生成された推定符号量の累積値の一部または全部を前記算術符号化後の実符号量に置き換えて推定誤差を軽減する推定符号量置き換え手段と、
前記推定符号量置き換え手段によって置き換えられた前記推定符号量の累積値を基に前記動画像圧縮手段から出力される符号量の目標値である目標符号量を設定するレート制御手段とを備え、
前記動画像圧縮手段は、前記目標符号量に基づいて動画像を圧縮する
ことを特徴とする集積回路。 An integrated circuit comprising moving image compression means and arithmetic coding means,
Code amount estimation means for estimating an actual code amount after arithmetic coding by the arithmetic coding means and generating an estimated code amount using data relating to a moving image before arithmetic coding by the arithmetic coding means;
Estimated code amount replacement means for reducing the estimation error by replacing part or all of the accumulated value of the estimated code amount generated by the code amount estimation means with the actual code amount after the arithmetic coding;
A rate control unit that sets a target code amount that is a target value of a code amount output from the moving image compression unit based on a cumulative value of the estimated code amount replaced by the estimated code amount replacement unit;
The integrated circuit, wherein the moving image compression means compresses a moving image based on the target code amount.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007203208A JP2009038746A (en) | 2007-08-03 | 2007-08-03 | Image information encoding device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007203208A JP2009038746A (en) | 2007-08-03 | 2007-08-03 | Image information encoding device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009038746A true JP2009038746A (en) | 2009-02-19 |
Family
ID=40440262
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007203208A Pending JP2009038746A (en) | 2007-08-03 | 2007-08-03 | Image information encoding device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009038746A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012178660A (en) * | 2011-02-25 | 2012-09-13 | Hitachi Kokusai Electric Inc | Moving image encoder and moving image encoding method |
JP2012186569A (en) * | 2011-03-03 | 2012-09-27 | Fujitsu Ltd | Image encoding device, image encoding method, and image encoding program |
JP2013247683A (en) * | 2012-05-24 | 2013-12-09 | Fujitsu Ltd | Method and device for compressing image |
JP2014135720A (en) * | 2012-12-11 | 2014-07-24 | Mega Chips Corp | Moving image coding apparatus, coding amount control method, and coding amount control program |
JP2014531863A (en) * | 2011-10-04 | 2014-11-27 | トムソン ライセンシングThomson Licensing | Device and method for intra-encoding an image block, storage medium carrying an intra-encoded image block, and use of a processing device for decoding an intra-encoded image block |
EP2858365A2 (en) | 2013-10-02 | 2015-04-08 | Renesas Electronics Corporation | Video encoder and method of operating the same |
EP2847995A4 (en) * | 2012-05-09 | 2016-01-13 | Magnum Semiconductor Inc | Apparatuses and methods for estimating bitstream bit counts |
WO2018074291A1 (en) | 2016-10-18 | 2018-04-26 | パナソニックIpマネジメント株式会社 | Image coding method, transmission method and image coding device |
WO2023210594A1 (en) * | 2022-04-27 | 2023-11-02 | ヌヴォトンテクノロジージャパン株式会社 | Image encoding device and image encoding method |
-
2007
- 2007-08-03 JP JP2007203208A patent/JP2009038746A/en active Pending
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012178660A (en) * | 2011-02-25 | 2012-09-13 | Hitachi Kokusai Electric Inc | Moving image encoder and moving image encoding method |
US9210435B2 (en) | 2011-02-25 | 2015-12-08 | Hitachi Kokusai Electric Inc. | Video encoding method and apparatus for estimating a code amount based on bit string length and symbol occurrence frequency |
JP2012186569A (en) * | 2011-03-03 | 2012-09-27 | Fujitsu Ltd | Image encoding device, image encoding method, and image encoding program |
JP2014531863A (en) * | 2011-10-04 | 2014-11-27 | トムソン ライセンシングThomson Licensing | Device and method for intra-encoding an image block, storage medium carrying an intra-encoded image block, and use of a processing device for decoding an intra-encoded image block |
EP2847995A4 (en) * | 2012-05-09 | 2016-01-13 | Magnum Semiconductor Inc | Apparatuses and methods for estimating bitstream bit counts |
US10021409B2 (en) | 2012-05-09 | 2018-07-10 | Integrated Device Technology, Inc. | Apparatuses and methods for estimating bitstream bit counts |
JP2013247683A (en) * | 2012-05-24 | 2013-12-09 | Fujitsu Ltd | Method and device for compressing image |
JP2014135720A (en) * | 2012-12-11 | 2014-07-24 | Mega Chips Corp | Moving image coding apparatus, coding amount control method, and coding amount control program |
EP2858365A2 (en) | 2013-10-02 | 2015-04-08 | Renesas Electronics Corporation | Video encoder and method of operating the same |
JP2015073177A (en) * | 2013-10-02 | 2015-04-16 | ルネサスエレクトロニクス株式会社 | Moving image coding device and operation method therefor |
EP2858365A3 (en) * | 2013-10-02 | 2015-04-22 | Renesas Electronics Corporation | Video encoder and method of operating the same |
US9961346B2 (en) | 2013-10-02 | 2018-05-01 | Renesas Electronics Corporation | Video encoder and method of operating the same |
WO2018074291A1 (en) | 2016-10-18 | 2018-04-26 | パナソニックIpマネジメント株式会社 | Image coding method, transmission method and image coding device |
EP3531700A4 (en) * | 2016-10-18 | 2019-11-06 | Panasonic Intellectual Property Management Co., Ltd. | Image coding method, transmission method and image coding device |
US11297329B2 (en) | 2016-10-18 | 2022-04-05 | Panasonic Intellectual Property Management Co., Ltd. | Image encoding method, transmission method, and image encoder |
WO2023210594A1 (en) * | 2022-04-27 | 2023-11-02 | ヌヴォトンテクノロジージャパン株式会社 | Image encoding device and image encoding method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4828925B2 (en) | Encoder | |
US8571104B2 (en) | Adaptive coefficient scanning in video coding | |
KR100585901B1 (en) | Digital signal encoding device, digital signal decoding device, digital signal arithmetic encoding method, and digital signal arithmetic decoding method | |
KR101213513B1 (en) | Fast macroblock delta qp decision | |
RU2407219C2 (en) | Compression of video images with help of adaptive codes with alternating length | |
JP2009038746A (en) | Image information encoding device | |
US7573405B2 (en) | System updating accumulated statistics coding variable values after multiple encodings | |
JP5893002B2 (en) | Rate control in video coding. | |
US9319700B2 (en) | Refinement coefficient coding based on history of corresponding transform coefficient values | |
US20110310976A1 (en) | Joint Coding of Partition Information in Video Coding | |
US20160021397A1 (en) | Method for protecting a video frame sequence against packet loss | |
AU2019337644B2 (en) | Index signaling for reference picture list structures | |
KR20150039582A (en) | Video encoder and method of operating the same | |
JP2004135251A (en) | Method of encoding image information, and method of decoding the image information | |
AU2018347343A1 (en) | Binary arithmetic coding with progressive modification of adaptation parameters | |
EP4246975A1 (en) | Video decoding method and apparatus, video coding method and apparatus, and device | |
JP5961189B2 (en) | Method and apparatus for arithmetic coding and termination | |
JP2010130522A (en) | Moving image encoding device and moving image encoding method | |
US20090245350A1 (en) | Image coding apparatus and image coding method | |
JP2008042942A (en) | Coding method | |
JP2006093777A (en) | Motion picture encoder and encoding program | |
EP4113999A1 (en) | Video decoding method and apparatus, video coding method and apparatus, device, and storage medium | |
JP2011101404A (en) | Decoding apparatus and decoding method | |
Milicevic et al. | RD optimization and skip prediction for H. 264/AVC standard | |
WO2023183173A1 (en) | Systems and methods for regularization-free multi-hypothesis arithmetic coding |