JP2010130548A - Encoding apparatus and method - Google Patents
Encoding apparatus and method Download PDFInfo
- Publication number
- JP2010130548A JP2010130548A JP2008305240A JP2008305240A JP2010130548A JP 2010130548 A JP2010130548 A JP 2010130548A JP 2008305240 A JP2008305240 A JP 2008305240A JP 2008305240 A JP2008305240 A JP 2008305240A JP 2010130548 A JP2010130548 A JP 2010130548A
- Authority
- JP
- Japan
- Prior art keywords
- code amount
- quantization parameter
- target code
- block
- quantization
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は符号化装置及び符号化方法に関し、とくに、ピクチャ(フィールド)単位での符号量制御の精度向上を図るために用いて好適な技術に関する。 The present invention relates to an encoding apparatus and an encoding method, and more particularly to a technique suitable for use in improving accuracy of code amount control in units of pictures (fields).
近年、動画像データの圧縮符号化方式として、MPEG-2(Moving Picture Experts Group phase2)やH.264/AVC(Advanced Video Coding)といったものが知られている。MPEG-2方式では、符号化時に仮想的なバッファを定義し、この仮想バッファの占有量に基づいて量子化の特性を制御するパラメータである量子化パラメータ(量子化スケール)を制御することで発生する符号量が目標とする符号量になるように制御している。仮想バッファの占有量に応じて発生符号量を制御する技術として、例えば特許文献1が提案されている。 In recent years, MPEG-2 (Moving Picture Experts Group phase 2) and H.264 / AVC (Advanced Video Coding) are known as compression encoding methods for moving image data. In the MPEG-2 system, a virtual buffer is defined at the time of encoding, and it is generated by controlling the quantization parameter (quantization scale), which is a parameter that controls the quantization characteristics based on the virtual buffer occupancy. The code amount to be controlled is controlled to be the target code amount. As a technique for controlling the generated code amount according to the occupation amount of the virtual buffer, for example, Patent Document 1 is proposed.
ここで、図1を参照してMPEG-2における符号量制御について、その概略を説明する。図1は、符号量制御を行う符号量制御装置の構成を示すブロック図である。なお、ここでは、説明を簡略化するため、仮想バッファ及び仮想バッファが対象とするピクチャをイントラ符号化画像(Iピクチャ)に限定する。 Here, the outline of the code amount control in MPEG-2 will be described with reference to FIG. FIG. 1 is a block diagram illustrating a configuration of a code amount control apparatus that performs code amount control. Here, in order to simplify the description, the virtual buffer and the pictures targeted by the virtual buffer are limited to intra-coded images (I pictures).
図1において、符号量制御装置100は、量子化部101、エントロピー符号化部102、バッファ103、レート制御部104を有する。そして、量子化部101によって、映像信号が所定の大きさのブロック(以下、マクロブロック)単位に直交変換(DCT : Discrete Cosine Transfer)する。次に、直交変換した直交変換データ(DCT係数)をレート制御部104で設定された量子化パラメータに従い量子化する。
1, the code
符号量制御装置100は、エントロピー符号化部102によって、量子化された直交変換データ(量子化DCT係数)にエントロピー符号化を行い符号化する。さらに、符号量制御装置100は、その符号化されたデータをバッファ103に蓄積し符号化データとして所定の転送レートに基づいて出力する。
The code
なお、このバッファ103に蓄積される符号化データの量が発生符号量であって、符号量制御装置100は、この発生符号量がバッファ103に予め設定した目標符号量を超過しないように制御しなければならない。そこで、符号量制御装置100は、レート制御部104によって、バッファ103に蓄積される発生符号量を監視し、発生符号量が目標符号量となるように量子化ステップ(マクロブロック単位で設定される量子化パラメータ)を変更する。
Note that the amount of encoded data stored in the
これによって、量子化部101によって行われる量子化の度合いが変更され、結果、1ピクチャの符号化終了時には、発生符号量が目標とした符号量になる。すなわち、レート制御部104は、目標符号量をT、1ピクチャ内のマクロブロック数をMBcnt、バッファ103における仮想バッファの初期符号量をd0とする。また、ピクチャの先頭から(j‐1)番目のマクロブロックまでのビット量(符号量)をB(j - 1)とする。その時、j番目のマクロブロック符号化前の仮想バッファの符号量djを式(1)により算出する。
dj = d0 + B(j - 1) - T×(j - 1)/MBcnt … 式(1)
As a result, the degree of quantization performed by the
dj = d0 + B (j-1)-T x (j-1) / MBcnt (1)
なお、ピクチャ符号量後の仮想バッファの符号量は、次のピクチャを符号化する際の仮想バッファの初期符号量d0として用いられる。また、レート制御部104は、j番目のマクロブロックに対する量子化ステップQjを以下の式(2)により算出する。
Qj = dj×31/r … 式(2)
The code amount of the virtual buffer after the picture code amount is used as the initial code amount d0 of the virtual buffer when the next picture is encoded. Further, the
Qj = dj x 31 / r Equation (2)
ここで、rは量子化を行う際の応答速度を制御する係数(リアクションパラメータ)であって、転送レートをBr、映像信号の1秒間に含まれるピクチャ数をPrとした時、以下の式(3)により算出される値である。
r = 2×Br/Pr … 式(3)
Here, r is a coefficient (reaction parameter) for controlling the response speed at the time of quantization, and when the transfer rate is Br and the number of pictures included in one second of the video signal is Pr, the following equation ( It is a value calculated by 3).
r = 2 × Br / Pr (3)
そして、量子化部101が前記式(2)で算出された量子化ステップに従い、マクロブロック単位でDCT係数の量子化を行うことで、1ピクチャの符号化終了時には、発生符号量が目標とした符号量になる。
Then, the
しかしながら、上記従来技術では、r(リアクションパラメータ)により量子化ステップの変化量が制限されている。このため、目標符号量に対して発生符号量の差分が大きくなった場合などに量子化ステップが追従することができずに、発生符号量と目標符号量に大きなずれを生じてしまう場合があった。 However, in the above prior art, the amount of change in the quantization step is limited by r (reaction parameter). For this reason, when the difference in the generated code amount with respect to the target code amount becomes large, for example, the quantization step cannot follow and a large deviation may occur between the generated code amount and the target code amount. It was.
また、上記従来技術では、r(リアクションパラメータ)により量子化ステップの変化量が制限されているため、目標符号量に対する発生符号量の差分が1ピクチャの符号化終了時にどの程度誤差がでるのか予測できず、符号量制御が難しいといった問題があった。 Further, in the above prior art, since the amount of change in the quantization step is limited by r (reaction parameter), it is predicted how much the difference in the generated code amount with respect to the target code amount will occur at the end of encoding of one picture. There is a problem that the code amount control is difficult.
本発明は前述の問題点に鑑み、発生符号量が目標符号量に対して大きくずれない符号量制御を行うことができるようにすることを目的としている。 In view of the above-described problems, an object of the present invention is to enable code amount control in which a generated code amount does not greatly deviate from a target code amount.
本発明の符号化装置は、入力画像を所定数の画素から構成されるブロックに分割して、ブロック単位で符号化する符号化装置において、前記入力画像の目標符号量を設定する目標符号量設定手段と、前記目標符号量設定手段によって設定された目標符号量に対する発生符号量の差分を前記ブロック単位に算出するブロック差分符号量算出手段と、前記ブロック差分符号量算出手段で算出される符号量の傾きに応じて、発生符号量が目標符号量に近づくように、量子化の度合いを示す量子化パラメータを制御する量子化パラメータ制御手段と、前記量子化パラメータ制御手段から出力される量子化パラメータに従って前記ブロック毎に量子化を行う量子化手段とを有することを特徴とする。 A coding apparatus according to the present invention is a coding apparatus that divides an input image into blocks each composed of a predetermined number of pixels and codes each block, and sets a target code amount for setting a target code amount of the input image. Means, a block difference code amount calculating means for calculating a difference of the generated code amount with respect to the target code amount set by the target code amount setting means for each block, and a code amount calculated by the block difference code amount calculating means The quantization parameter control means for controlling the quantization parameter indicating the degree of quantization so that the generated code quantity approaches the target code quantity according to the inclination of the quantization parameter, and the quantization parameter output from the quantization parameter control means And a quantization means for performing quantization for each block.
本発明の符号化方法は、入力画像を所定数の画素から構成されるブロックに分割して、ブロック単位で符号化する符号化方法において、前記入力画像の目標符号量を設定する目標符号量設定工程と、前記目標符号量設定工程において設定された目標符号量に対する発生符号量の差分を前記ブロック単位に算出するブロック差分符号量算出工程と、前記ブロック差分符号量算出工程において算出される符号量の傾きに応じて、発生符号量が目標符号量に近づくように、量子化の度合いを示す量子化パラメータを制御する量子化パラメータ制御工程と、前記量子化パラメータ制御工程から出力される量子化パラメータに従って前記ブロック毎に量子化を行う量子化工程とを有することを特徴とする。 The encoding method of the present invention is a coding method in which an input image is divided into blocks each composed of a predetermined number of pixels and encoded in units of blocks, and a target code amount setting for setting a target code amount of the input image is performed. A block difference code amount calculation step for calculating a difference of the generated code amount with respect to the target code amount set in the target code amount setting step for each block, and a code amount calculated in the block difference code amount calculation step A quantization parameter control step for controlling a quantization parameter indicating the degree of quantization so that the generated code amount approaches the target code amount according to the slope of the quantization parameter, and the quantization parameter output from the quantization parameter control step And a quantization step for performing quantization for each block.
本発明によれば、量子化パラメータを精度よく制御することが可能となるので、目標符号量に対する発生符号量の誤差が小さくなり、符号量制御の精度を向上することができ、符号化制御が容易になる。 According to the present invention, since it is possible to control the quantization parameter with high accuracy, the error of the generated code amount with respect to the target code amount can be reduced, the accuracy of the code amount control can be improved, and the encoding control can be performed. It becomes easy.
(第1の実施形態)
本発明の実施形態を説明するにあたり、図2を用いて、本発明が組み込まれた符号化装置の全体構成を説明する。
図2は、本発明が実施若しくは適応されて好適な符号化装置の全体構成を示すブロック図である。
(First embodiment)
In describing an embodiment of the present invention, the overall configuration of an encoding apparatus incorporating the present invention will be described with reference to FIG.
FIG. 2 is a block diagram showing the overall configuration of a preferred encoding apparatus in which the present invention is implemented or applied.
符号化装置200において、並び替え分割部201は入力画像を符号化ピクチャタイプに応じた並び替えを行い、マクロブロックに分割し、減算器202を介して、画像残差データをDCT変換部203へ出力する。
In the
DCT変換部203は、減算器202からの画像残差データをDCT係数に変換して量子化部204へ出力する。量子化部204は、量子化パラメータ制御部216から出力される量子化パラメータによってDCT係数を除算することでDCT係数を量子化してエントロピー符号化部205へ出力する。
The
また、量子化部204で量子化されたDCT係数は予測画像データの生成にも使われるため、逆量子化部207にも出力する。エントロピー符号化部205は、量子化部204から出力されたデータをエントロピー符号化して、ストリームバッファ206に出力する。また、エントロピー符号化部205は、マクロブロック単位での発生符号量をレート制御部213へ出力する。
In addition, the DCT coefficient quantized by the
逆量子化部207は、量子化部204と同じ量子化パラメータで逆量子化を施し、逆DCT変換部208に出力する。逆DCT変換部208は、逆量子化部207により復元されたDCT係数に逆DCTを施し、元の画像、或いは差分画像に変換され、加算器209に出力する。加算器209、画像メモリ210、動き予測補償部211、及び減算器202により動き予測処理、及び動き補償処理が行われる。
The inverse quantization unit 207 performs inverse quantization with the same quantization parameter as the
ピクチャタイプ決定部212は、ピクチャタイプを決定し、並び替え分割部201、動き予測補償部211に出力する。ストリームバッファ206は、エントロピー符号化部205から出力されたデータを蓄積し、目標ビットレートに従ったビットレートで出力する。また、出力されたストリームには、画像情報の他にも差分画像を生成する際に得られた動きベクトルや量子化に用いた量子化パラメータなどの各種符号化情報も含まれる。
The picture
ストリームバッファ206は、入力された符号量をカウントして得られた発生符号量、及びバッファポジションをレート制御部213へ出力する。レート制御部213は、目標符号量設定部214とブロック差分符号量算出部215と量子化パラメータ制御部216とから構成される。
The
レート制御部213において、目標符号量設定部214は、エントロピー符号化部205から出力されるストリームのビットレートと、ストリームバッファ206のバッファ容量とから、目標符号量を設定する。その際に、ストリームバッファ206のバッファ容量がオーバーフロー、アンダーフローしないように設定し、その値を量子化パラメータ制御部216に出力する。
In the
ブロック差分符号量算出部215は、エントロピー符号化部205より入力されるマクロブロック毎の発生符号量(ブロックライン発生符号量)と目標符号量とを比較する。そして、マクロブロック毎の差分符号量を算出し、その値を量子化パラメータ制御部216に出力する。量子化パラメータ制御部216は、目標符号量設定部214から出力された目標符号量をもとに、差分符号量と後述するアクティビティーを用いて、発生符号量が目標符号量に近づくように量子化の度合いを示す量子化パラメータを制御する。
The block difference code
画像解析部217は、並び替え分割部201から入力された画像を解析し、画像に応じた複雑度や特徴に応じて、符号量にメリハリをつけるアクティビティーを生成し、レート制御部213に出力する。レート制御部213は、アクティビティーを用いて量子化を制御することで、符号量の割当てをマクロブロック単位で制御し、画像のメリハリをつけて画質を向上させる。
The
図3は、本実施形態に係る符号量の制御手順を説明するフローチャートである。また、図4及び図5は本実施形態に係る符号量制御の符号量推移を示す図である。
始めに、ステップS300において、目標符号量設定部214は、目標ビットレートとバッファ残量より、ピクチャ毎の目標符号量を設定する。
FIG. 3 is a flowchart illustrating a code amount control procedure according to the present embodiment. 4 and 5 are diagrams showing code amount transition of code amount control according to the present embodiment.
First, in step S300, the target code
次に、ステップS301において、量子化パラメータ制御部216は、今回、符号化を行うピクチャタイプ(I/P/B)と同じピクチャタイプで、かつ、直前のピクチャから量子化パラメータの平均値を求める。そして、ピクチャの最初のマクロブロックの量子化パラメータ値として設定する。
Next, in step S301, the quantization
次に、ステップS302において、ブロック差分符号量算出部215は、エントロピー符号化部205より入力されるマクロブロック毎の発生符号量を現在符号化中のマクロブロック位置での目標符号量に対して差分があるか否かを判定する。本実施形態において、目標符号量は、(ピクチャ目標符号量÷ピクチャマクロブロック総数×符号化済みのマクロブロック数)とする。ステップS302の判定の結果、差分があれば差分符号量を量子化パラメータ制御部216に出力し、ステップS303に進む。一方、ステップS302の判定の結果、差分がなければステップS305に進む。
Next, in step S302, the block difference code
ステップS303においては、量子化パラメータ制御部216は、前のマクロブロック符号化終了時の差分符号量と今回のマクロブロック符号化終了時の差分符号量から傾きを求め、差分符号量がより外れる方向に向かっているか否かを判定する。この判定の結果、差分符号量がより外れる方向に傾きが向かっている場合はステップS304に進み、差分符号量が小さくなる方向に傾きが向かっている場合はステップS305に進む。
In step S303, the quantization
ステップS304においては、量子化パラメータ制御部216は、量子化パラメータを、ステップS303で求めた傾き量に応じた値に調整することで差分符号量を少なくする。次に、ステップS305において、量子化パラメータ制御部216は、ピクチャにおける最終マクロブロックか否かを判定して、最終マクロブロックだった場合はこのフローを終了する。それ以外は、ステップS302へ進んで前述した処理を繰り返し行う。
In step S304, the quantization
以上、説明したように、差分符号量の傾きから差分量がさらに大きくなっていく場合に強く量子化パラメータの値を制御する。これにより、図4に示すように、従来は追従できなかったような差分量が発生した場合でも発生符号量を目標符号量に近づけることが可能となる(図5)。 As described above, the value of the quantization parameter is strongly controlled when the difference amount further increases from the gradient of the difference code amount. As a result, as shown in FIG. 4, it is possible to bring the generated code amount close to the target code amount even when a difference amount that could not be followed conventionally occurs (FIG. 5).
さらには、傾きにより量子化パラメータを制御することで、従来の制御方法で、自然に発生符号量が目標符号量に近づく場合は何も制御をする必要がない。このため、量子化パラメータに余分な制御が加わらず、画質にも大きな影響を与えることなく、発生符号量を目標符号量に近づける制御が可能である。 Further, by controlling the quantization parameter by the gradient, there is no need to control anything when the generated code amount naturally approaches the target code amount by the conventional control method. Therefore, it is possible to control the generated code amount close to the target code amount without adding excessive control to the quantization parameter and without greatly affecting the image quality.
(第2の実施形態)
次に、第1の実施形態で示した図2の符号化装置200を用いて行う第2の実施形態を、図6〜8を参照しながら説明する。なお、第1の実施形態において説明した内容は省略する。
(Second Embodiment)
Next, a second embodiment performed using the
図6は、本実施形態に係る符号量制御を説明するフローチャートである。図7は、本実施形態に係る符号量制御を行う画面内位置を表す図である。図8は、本実施形態に係る符号量制御の符号量推移を示す図である。 FIG. 6 is a flowchart illustrating code amount control according to the present embodiment. FIG. 7 is a diagram illustrating the position in the screen where the code amount control according to the present embodiment is performed. FIG. 8 is a diagram illustrating a code amount transition of the code amount control according to the present embodiment.
始めに、ステップS600において、目標符号量設定部214は、目標ビットレートとバッファ残量より、ピクチャ毎の目標符号量を設定する。次に、ステップS601において、量子化パラメータ制御部216は、今回、符号化を行うピクチャタイプ(I/P/B)と同じピクチャタイプで、かつ、直前のピクチャから量子化パラメータの平均値を求める。そして、ピクチャの最初のマクロブロックの量子化パラメータ値として設定する。
First, in step S600, the target code
次に、ステップS602において、量子化パラメータ制御部216は、符号化を行うマクロブロックがピクチャ内における本実施形態の制御を行う位置であるか否かを判定する。この判定の結果、制御を行う位置である場合はステップS603へ進み、制御を行わない場合はステップS606へ進む。また、通常、画像は人物や物などの中心物がピクチャ内で中央にくる場合が多く、制御を行うか否かを判定する位置は、例えば、図7の(a)、(b)、(c)、(d)のような場合が考えられる。
Next, in step S602, the quantization
次に、ステップS603において、ブロック差分符号量算出部215は、エントロピー符号化部205より入力されるマクロブロック毎の発生符号量を現在のマクロブロック位置での目標符号量に対して差分があるか否かを判定する。本実施形態における目標符号量は第1の実施形態と同じである。この判定の結果、差分があれば差分符号量を量子化パラメータ制御部216に出力し、ステップS604に進み、差分がなければステップS606に進む。
Next, in step S603, the block difference code
ステップS604においては、量子化パラメータ制御部216は、前のマクロブロック符号化終了時の差分符号量と今回のマクロブロック符号化終了時の差分符号量から傾きを求め、差分符号量がより外れる方向に向かっているか否かを判定する。この判定の結果、差分符号量がより外れる方向に傾きが向かっている場合はステップS605に進み、差分符号量が小さくなる方向に傾きが向かっている場合はステップS606に進む。
In step S604, the quantization
次に、ステップS605において、量子化パラメータ制御部216は、量子化パラメータを、ステップS604で求めた傾き量に応じた値に調整することで差分符号量を少なくする。
Next, in step S605, the quantization
次に、ステップS606において、量子化パラメータ制御部216は、ピクチャにおける最終マクロブロックか否かを判定する。この判定の結果、最終マクロブロックだった場合はこのフローを終了する。それ以外は、ステップS602へ戻って前述した処理を繰り返し行う。
Next, in step S606, the quantization
以上、説明したように、本実施形態においては、ピクチャ内の位置に応じて制御を行うようにしたので、図8の特性図に示すように、第1の実施形態に対して、画像の特徴に応じた制御が可能となる。 As described above, in the present embodiment, control is performed according to the position in the picture. Therefore, as shown in the characteristic diagram of FIG. It is possible to control according to
(第3の実施形態)
次に、図9〜11を参照しながら本発明の第3の実施形態を説明する。なお、第1及び第2の実施形態において説明した内容は同一の符号を付して説明は省略する。
図9は、本実施形態の符号化装置900の全体構成を示すブロック図である。図10は本実施形態に係る符号量制御の符号量推移を示す図である。
(Third embodiment)
Next, a third embodiment of the present invention will be described with reference to FIGS. In addition, the content demonstrated in 1st and 2nd embodiment attaches | subjects the same code | symbol, and abbreviate | omits description.
FIG. 9 is a block diagram showing the overall configuration of the
符号化装置900において、レート制御部913は、目標符号量設定部214とブロック差分符号量算出部215と量子化パラメータ制御部916と許容差分符号量設定部918から構成される。許容差分符号量設定部918は、目標符号量設定部214が設定した目標符号量に対して、図10に示す許容差分符号量を設定して、量子化パラメータ制御部916に出力する。
In the
量子化パラメータ制御部916は、設定された許容差分符号量から現在のマクロブロック位置での値を計算(許容差分符号量÷ピクチャのマクロブロック総数×マクロブロック位置)する。そして、発生符号量と目標符号量の差分符号量がマクロブロック位置での許容差分符号量を超えているか否かを判断し、量子化パラメータを制御する。
The quantization
図11は、本実施形態に係る符号量の制御手順を説明するフローチャートである。
先ず、ステップS1100において、目標符号量設定部214は、目標ビットレートとバッファ残量より、ピクチャ毎の目標符号量を設定する。また、ステップS1100において、許容差分符号量設定部918は、ストリームバッファ206の状態を考慮し、許容可能な誤差符号量を設定する。
FIG. 11 is a flowchart illustrating a code amount control procedure according to the present embodiment.
First, in step S1100, the target code
次に、ステップS1102において、ブロック差分符号量算出部215は、エントロピー符号化部205より入力されるマクロブロック毎の発生符号量を現在のマクロブロック位置での目標符号量に対して差分があるか否かを判定する。この判定の結果、差分があればその差分符号量を量子化パラメータ制御部916に出力する。
Next, in step S1102, the block difference code
量子化パラメータ制御部916は、入力された差分符号量が、設定された許容差分符号量から現在のマクロブロック位置での値(許容差分符号量÷ピクチャのマクロブロック総数×マクロブロック位置)に対して超えているか否かを判定する。そして、超えていれば、ステップS303に進み、超えていなければステップS305に進む。
The quantization
ステップS305において、量子化パラメータ制御部216は、ピクチャにおける最終マクロブロックか否かを判定して、最終マクロブロックだった場合はこのフローを終了する。それ以外は、ステップS1102へ進んで前述した処理を繰り返し行う。
In step S305, the quantization
(第4の実施形態)
次に、図12を用いて本発明の第4の実施形態を説明する。
図12は、本実施形態に係るマクロブロックとマクロブロックラインとの関係を示す図である。図12において、1200は1ピクチャ、1201は所定数の画素から構成されるマクロブロック、1202はそのマクロブロック1201を水平方向にまとめた1マクロブロックラインである。
(Fourth embodiment)
Next, a fourth embodiment of the present invention will be described with reference to FIG.
FIG. 12 is a diagram illustrating a relationship between the macroblock and the macroblock line according to the present embodiment. In FIG. 12, 1200 is one picture, 1201 is a macroblock composed of a predetermined number of pixels, and 1202 is one macroblock line in which the
本実施形態においては、このマクロブロックライン1202に対して、先の第1の実施形態〜第3の実施形態で説明した技術を適応しており、図示しないが、1ブロックライン毎の目標符号量を設定するブロックライン目標符号量設定部を有している。また、1ブロックラインの許容差分符号量を設定するブロックライン許容差分符号量設定部を有している。これにより、ピクチャ単位で量子化パラメータ制御を実施するのではなく、マクロブロックライン毎に細かく設定、制御を行うことができる。
In the present embodiment, the technique described in the first to third embodiments is applied to the
以上、第1〜第4の実施形態で説明したように、量子化パラメータ制御手段を用いて、量子化パラメータを精度よく制御することができる。これにより、目標符号量に対する発生符号量の誤差を小さくすることができ、精度が高い符号量制御を行うことが可能となる。なお、本発明は、本発明の技術思想の範囲内において、前述した実施形態に限定されるものではなく、対象となる回路形態により適時変更されて適応するべきものである。 As described above, as described in the first to fourth embodiments, the quantization parameter can be accurately controlled using the quantization parameter control means. Thereby, the error of the generated code amount with respect to the target code amount can be reduced, and the code amount control with high accuracy can be performed. Note that the present invention is not limited to the above-described embodiments within the scope of the technical idea of the present invention, and should be adapted as appropriate according to the target circuit form.
(本発明に係る他の実施形態)
前述した本発明の実施形態における符号化装置を構成する各手段は、コンピュータのRAMやROMなどに記憶されたプログラムが動作することによって実現できる。このプログラム及び前記プログラムを記録したコンピュータ読み取り可能な記録媒体は本発明に含まれる。
(Other embodiments according to the present invention)
Each unit constituting the encoding device according to the above-described embodiment of the present invention can be realized by operating a program stored in a RAM or a ROM of a computer. This program and a computer-readable recording medium recording the program are included in the present invention.
また、本発明は、例えば、システム、装置、方法、プログラムもしくは記憶媒体等としての実施形態も可能であり、具体的には、複数の機器から構成されるシステムに適用してもよいし、また、一つの機器からなる装置に適用してもよい。 In addition, the present invention can be implemented as, for example, a system, apparatus, method, program, storage medium, or the like. Specifically, the present invention may be applied to a system including a plurality of devices. The present invention may be applied to an apparatus composed of a single device.
なお、本発明は、前述した符号化方法における各工程を実行するソフトウェアのプログラム(実施形態では図3、図6、図11に説明するフローチャートに対応したプログラム)を、システムあるいは装置に直接、あるいは遠隔から供給する。そして、そのシステムあるいは装置のコンピュータが前記供給されたプログラムコードを読み出して実行することによっても達成される場合を含む。 In the present invention, a software program (in the embodiment, a program corresponding to the flowcharts described in FIGS. 3, 6, and 11) that executes each step in the above-described encoding method is directly applied to a system or apparatus, or Supply remotely. In addition, this includes a case where the system or the computer of the apparatus is also achieved by reading and executing the supplied program code.
したがって、本発明の機能処理をコンピュータで実現するために、前記コンピュータにインストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明は、本発明の機能処理を実現するためのコンピュータプログラム自体も含まれる。 Accordingly, since the functions of the present invention are implemented by computer, the program code installed in the computer also implements the present invention. In other words, the present invention includes a computer program itself for realizing the functional processing of the present invention.
その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等の形態であってもよい。 In that case, as long as it has the function of a program, it may be in the form of object code, a program executed by an interpreter, script data supplied to the OS, and the like.
プログラムを供給するための記録媒体としては種々の記録媒体を使用することができる。例えば、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM,DVD−R)などがある。 Various recording media can be used as a recording medium for supplying the program. For example, floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD (DVD-ROM, DVD- R).
その他、プログラムの供給方法としては、クライアントコンピュータのブラウザを用いてインターネットのホームページに接続する。そして、前記ホームページから本発明のコンピュータプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイルをハードディスク等の記録媒体にダウンロードすることによっても供給できる。 As another program supply method, a browser on a client computer is used to connect to an Internet home page. The computer program itself of the present invention or a compressed file including an automatic installation function can be downloaded from the homepage by downloading it to a recording medium such as a hard disk.
また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも、本発明に含まれるものである。 It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the present invention.
また、本発明のプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布し、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせる。そして、その鍵情報を使用することにより暗号化されたプログラムを実行してコンピュータにインストールさせて実現することも可能である。 In addition, the program of the present invention is encrypted, stored in a storage medium such as a CD-ROM, distributed to users, and key information for decryption is downloaded from a homepage via the Internet to users who have cleared predetermined conditions. Let It is also possible to execute the encrypted program by using the key information and install the program on a computer.
また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現される他、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行うことによっても前述した実施形態の機能が実現され得る。 In addition to the functions of the above-described embodiments being realized by the computer executing the read program, the OS running on the computer may perform part or all of the actual processing. The functions of the above-described embodiments can be realized.
さらに、記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれる。その後、そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によっても前述した実施形態の機能が実現される。 Further, the program read from the recording medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. Thereafter, the CPU of the function expansion board or function expansion unit performs part or all of the actual processing based on the instructions of the program, and the functions of the above-described embodiments are realized by the processing.
100 符号量制御装置
101 量子化部
102 エントロピー符号化部
103 バッファ
104 レート制御部
200 符号化装置
201 並び替え分割部
202 減算器
203 DCT変換部
204 量子化部
205 エントロピー符号化部
206 ストリームバッファ
207 逆量子化部
208 逆DCT変換部
209 加算器
210 画像メモリ
211 動き予測補償部
212 ピクチャタイプ決定部
213 レート制御部
214 目標符号量設定部
215 ブロック差分符号量算出部
216 量子化パラメータ制御部
217 画像解析部
900 符号化装置
913 レート制御部
916 量子化パラメータ制御部
918 許容差分符号量設定部
1200 Iピクチャ
1201 マクロブロック
1202 マクロブロックライン
100 Code
Claims (6)
前記入力画像の目標符号量を設定する目標符号量設定手段と、
前記目標符号量設定手段によって設定された目標符号量に対する発生符号量の差分を前記ブロック単位に算出するブロック差分符号量算出手段と、
前記ブロック差分符号量算出手段で算出される符号量の傾きに応じて、発生符号量が目標符号量に近づくように、量子化の度合いを示す量子化パラメータを制御する量子化パラメータ制御手段と、
前記量子化パラメータ制御手段から出力される量子化パラメータに従って前記ブロック毎に量子化を行う量子化手段とを有することを特徴とする符号化装置。 In an encoding device that divides an input image into blocks each including a predetermined number of pixels and encodes the blocks in units of blocks
Target code amount setting means for setting a target code amount of the input image;
A block difference code amount calculating means for calculating a difference of the generated code amount with respect to the target code amount set by the target code amount setting means for each block;
Quantization parameter control means for controlling a quantization parameter indicating the degree of quantization so that the generated code quantity approaches the target code quantity according to the gradient of the code quantity calculated by the block difference code quantity calculation means;
An encoding apparatus comprising: quantization means for performing quantization for each block in accordance with a quantization parameter output from the quantization parameter control means.
前記ブロックライン目標符号量設定手段に対して、1ブロックラインで発生したブロックライン発生符号量をカウントして得られた発生符号量に応じて前記量子化パラメータ制御手段を制御することを特徴とする請求項1または2に記載の符号化装置。 A block line target code amount setting means for setting a target code amount for each block line, with a horizontal direction obtained by dividing the input image by the blocks as one block line;
The quantization parameter control means is controlled according to the generated code quantity obtained by counting the block line generated code quantity generated in one block line with respect to the block line target code quantity setting means. The encoding device according to claim 1 or 2.
前記入力画像の目標符号量を設定する目標符号量設定工程と、
前記目標符号量設定工程において設定された目標符号量に対する発生符号量の差分を前記ブロック単位に算出するブロック差分符号量算出工程と、
前記ブロック差分符号量算出工程において算出される符号量の傾きに応じて、発生符号量が目標符号量に近づくように、量子化の度合いを示す量子化パラメータを制御する量子化パラメータ制御工程と、
前記量子化パラメータ制御工程から出力される量子化パラメータに従って前記ブロック毎に量子化を行う量子化工程とを有することを特徴とする符号化方法。 In an encoding method in which an input image is divided into blocks composed of a predetermined number of pixels and encoded in units of blocks,
A target code amount setting step for setting a target code amount of the input image;
A block difference code amount calculation step of calculating a difference of the generated code amount with respect to the target code amount set in the target code amount setting step in the block unit;
A quantization parameter control step for controlling a quantization parameter indicating a degree of quantization so that the generated code amount approaches the target code amount according to the gradient of the code amount calculated in the block difference code amount calculation step;
And a quantization step of performing quantization for each block in accordance with a quantization parameter output from the quantization parameter control step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008305240A JP5197329B2 (en) | 2008-11-28 | 2008-11-28 | Encoding apparatus and encoding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008305240A JP5197329B2 (en) | 2008-11-28 | 2008-11-28 | Encoding apparatus and encoding method |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2010130548A true JP2010130548A (en) | 2010-06-10 |
JP2010130548A5 JP2010130548A5 (en) | 2012-01-19 |
JP5197329B2 JP5197329B2 (en) | 2013-05-15 |
Family
ID=42330565
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008305240A Expired - Fee Related JP5197329B2 (en) | 2008-11-28 | 2008-11-28 | Encoding apparatus and encoding method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5197329B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017515378A (en) * | 2014-04-15 | 2017-06-08 | クゥアルコム・インコーポレイテッドQualcomm Incorporated | System and method for selecting a quantization parameter (QP) in display stream compression (DSC) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0418857A (en) * | 1990-04-23 | 1992-01-23 | Ricoh Co Ltd | Picture data compression system |
JPH10155152A (en) * | 1996-09-25 | 1998-06-09 | Matsushita Electric Ind Co Ltd | Image compression coder and its method |
-
2008
- 2008-11-28 JP JP2008305240A patent/JP5197329B2/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0418857A (en) * | 1990-04-23 | 1992-01-23 | Ricoh Co Ltd | Picture data compression system |
JPH10155152A (en) * | 1996-09-25 | 1998-06-09 | Matsushita Electric Ind Co Ltd | Image compression coder and its method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017515378A (en) * | 2014-04-15 | 2017-06-08 | クゥアルコム・インコーポレイテッドQualcomm Incorporated | System and method for selecting a quantization parameter (QP) in display stream compression (DSC) |
Also Published As
Publication number | Publication date |
---|---|
JP5197329B2 (en) | 2013-05-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102461169B (en) | Motion based dynamic resolution multiple bit rate video encoding | |
CN102271257B (en) | Image processing device, method, and program | |
JP2008283560A (en) | Information processing apparatus and method thereof | |
US7539347B2 (en) | Information processing apparatus and information processing method, recording medium, and program | |
JP4908943B2 (en) | Image coding apparatus and image coding method | |
JP4939273B2 (en) | Image coding apparatus and image coding method | |
JP4928176B2 (en) | Video encoding apparatus and video encoding method | |
CN104125460A (en) | Method and apparatus for controlling video bitrates | |
JP5330672B2 (en) | Video encoding apparatus and video encoding method | |
JP5197329B2 (en) | Encoding apparatus and encoding method | |
JP2006303580A (en) | Apparatus, method and program for changing coded data | |
JP2011082629A (en) | Image coding method, image decoding method, image coding apparatus, image decoding apparatus, and program | |
JP5078852B2 (en) | Moving picture coding apparatus and moving picture coding method | |
JP5472094B2 (en) | Moving image conversion apparatus, moving image distribution system, moving image conversion method, and program | |
JP6875566B2 (en) | Moving image prediction coding device, moving image prediction decoding device, moving image prediction coding method, moving image prediction decoding method and moving image prediction decoding program | |
JP4367354B2 (en) | Image encoding device | |
KR20130086294A (en) | Video rate control based on transform-coefficients histogram | |
US8218626B2 (en) | Encoding control apparatus, encoding control method, and storage medium | |
JP4510696B2 (en) | Image processing apparatus and image processing method | |
JP2008182408A (en) | Dynamic image encoder and dynamic image encoding method | |
KR100677128B1 (en) | Rate control apparatus and method in video encoder | |
JP2005318529A (en) | Image processing apparatus | |
KR101470404B1 (en) | Transcoding method and apparatus for n screen service | |
Xu et al. | Context adaptive thresholding and entropy coding for very low complexity JPEG transcoding | |
JP2007300557A (en) | Image encoding device and image encoding method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20111128 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20111128 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120704 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120717 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120914 |
|
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: 20130108 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130205 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160215 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5197329 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160215 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |