JP2007158804A - Code amount controller, code amount control method and code amount control program - Google Patents
Code amount controller, code amount control method and code amount control program Download PDFInfo
- Publication number
- JP2007158804A JP2007158804A JP2005352184A JP2005352184A JP2007158804A JP 2007158804 A JP2007158804 A JP 2007158804A JP 2005352184 A JP2005352184 A JP 2005352184A JP 2005352184 A JP2005352184 A JP 2005352184A JP 2007158804 A JP2007158804 A JP 2007158804A
- Authority
- JP
- Japan
- Prior art keywords
- code amount
- block
- generated code
- generated
- 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.)
- Pending
Links
Images
Landscapes
- Image Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
本発明は、静止画を圧縮符号化する符号量制御装置、符号量制御方法及び符号量制御プログラムに関し、特に、発生符号量を目標値以下に収めることを目的とする符号量制御を高速に実行可能な符号量制御装置及び符号量制御方法の改良に関する。 The present invention relates to a code amount control device, a code amount control method, and a code amount control program for compressing and encoding a still image, and in particular, high-speed code amount control aimed at keeping a generated code amount below a target value. The present invention relates to an improvement in a possible code amount control apparatus and code amount control method.
従来より、国際標準化機構(ISO)、国際電気標準会議(IEC)及び国際電気通信標準化部門(ITU−T)によって勧告されているJPEG(Joint Photographics Experts Group)などの静止画の符号化方式を用いた装置が市場に多く流通しており、デジタルスチルカメラやデジタルビデオカメラ、カメラつき携帯電話などにおいて、これらの符号化を用いた静止画の撮影機能を具備したものが多い。 Conventionally, still picture encoding methods such as JPEG (Joint Photographics Experts Group) recommended by the International Organization for Standardization (ISO), the International Electrotechnical Commission (IEC), and the International Telecommunication Standardization Sector (ITU-T) are used. Many of these devices are distributed in the market, and many digital still cameras, digital video cameras, camera-equipped mobile phones, and the like have a still image shooting function using these encodings.
上記のような装置においては、記録装置のメモリ容量による制限や、伝送系のファイルサイズによる制限により、撮影/編集時に、画像データの符号量サイズを調整する機能が必須となっている。 In the apparatus as described above, a function for adjusting the code amount size of image data at the time of shooting / editing is indispensable due to the limitation due to the memory capacity of the recording device and the limitation due to the file size of the transmission system.
撮影時に符号量制御が可能な従来技術としては、特許文献1が知られている。この方法によれば、符号化時の発生符号量をカウントし、目標符号量に発生符号量が収まらない場合、量子化係数を変更した上で、DCT(Discrete Cosine Transform)後のデータに対して再量子化・再符号化を実行している。例えば、符号化対象画像に対してDCT/量子化/符号化を行い、符号量のカウント結果を用いて量子化係数を変更し、DCT結果に対して再量子化/再符号化を行うことで符号量制御を実現する。
しかしながらこのような従来の符号量制御装置にあっては、以下のような問題点があった。 However, such a conventional code amount control device has the following problems.
一般的に、静止画データの画素数増加は、エンコード全体の処理時間増大を招くことになる。その中でも、エンコード処理において目標符号量に収束させる符号量制御処理があるが、目標符号量に収束するまで数回エンコード処理を繰り返すような符号量制御処理の場合、エンコード全体の処理時間に占める割合が非常に大きい。この場合、符号量制御処理時間に対する静止画データの画素数増加による影響も大きく、符号量制御処理における処理時間削減が必須事項となる。 In general, an increase in the number of pixels of still image data leads to an increase in the processing time of the entire encoding. Among them, there is a code amount control process that converges to the target code amount in the encoding process, but in the case of a code amount control process that repeats the encoding process several times until it converges to the target code amount, the percentage of the processing time of the entire encoding Is very big. In this case, the influence of the increase in the number of pixels of still image data on the code amount control processing time is also large, and reduction of the processing time in the code amount control processing is an essential matter.
目標符号量内に収まらない場合、量子化係数を変更した上で全画素領域に対して再量子化/再符号化を繰り返し行うため、繰り返したエンコード回数と総画素数がエンコード時間に対して顕著な悪影響を与えることになる。したがって、全画素領域に対して再量子化/再符号化を繰り返し行うため、画素数増加による処理時間の増加が顕著であり、撮影時のユーザ待ち時間増大から、製品審査NGや、ユーザからのクレーム対象になるという問題があった。 If the code amount does not fall within the target code amount, the quantization coefficient is changed and the re-quantization / re-encoding is repeated for all pixel regions. Will have adverse effects. Therefore, since re-quantization / re-encoding is repeatedly performed on all pixel regions, an increase in processing time due to an increase in the number of pixels is remarkable. There was a problem of being subject to claims.
本発明はかかる点に鑑みてなされたものであり、画像符号化処理における符号量制御に要する時間を削減することができる符号量制御装置、画像符号化装置、符号量制御方法及び符号量制御プログラムを提供することを目的とする。 The present invention has been made in view of the above points, and a code amount control device, an image encoding device, a code amount control method, and a code amount control program capable of reducing the time required for code amount control in image encoding processing. The purpose is to provide.
本発明の符号量制御装置は、符号化対象画像に対して直交変換を施す直交変換手段と、前記直交変換手段の出力結果に対して量子化係数を用いて量子化する量子化手段と、前記量子化手段により量子化された値に所定の符号を割り当てて符号化データを得る符号化手段と、前記符号化手段により発生したブロック毎の発生符号量を計測する計測手段と、計測したブロック毎の発生符号量を基に代表となるブロックを抽出する代表ブロック抽出手段と、前記代表ブロックに対して、目標符号量に収束すると予測される量子化係数を決定する発生符号量予測手段と、前記発生符号量予測手段により決定された量子化係数を前記量子化手段に設定する量子化係数制御手段とを備え、前記計測手段は、ブロック毎の発生符号量が前記目標符号量以下に収束した場合、符号化データを最終エンコード結果として出力し、前記発生符号量予測手段は、全画素領域に対する総発生符号量を予測する構成を採る。 The code amount control apparatus of the present invention includes an orthogonal transform unit that performs orthogonal transform on an encoding target image, a quantization unit that quantizes an output result of the orthogonal transform unit using a quantization coefficient, An encoding unit that assigns a predetermined code to a value quantized by the quantizing unit to obtain encoded data; a measuring unit that measures a generated code amount for each block generated by the encoding unit; Representative block extracting means for extracting a representative block based on the generated code quantity, a generated code quantity predicting means for determining a quantized coefficient predicted to converge to a target code quantity for the representative block, and A quantization coefficient control unit that sets the quantization coefficient determined by the generated code amount prediction unit in the quantization unit, and the measurement unit sets the generated code amount for each block to be equal to or less than the target code amount. If you bundle, and outputs the coded data as the final encoding result, the generated code quantity predicting means has a configuration to predict the total amount of generated code for the entire pixel area.
本発明の符号量制御装置は、入力された符号化データに対して復号化を行う復号化手段と、前記復号化手段により復号化されたデータに対して量子化係数を用いて逆量子化する逆量化手段と、量子化係数を用いて量子化する量子化手段と、前記量子化手段により量子化された値に所定の符号を割り当てて符号化データを得る符号化手段と、前記符号化手段により発生したブロック毎の発生符号量を計測する、もしくは、入力された符号化データに対してブロック毎の発生符号量を計測する計測手段と、計測したブロック毎の発生符号量を基に代表となるブロックを抽出する代表ブロック抽出手段と、前記代表ブロックに対して、目標符号量に収束すると予測される量子化係数を決定する発生符号量予測手段と、前記発生符号量予測手段により決定された量子化係数を前記量子化手段に設定する量子化係数制御手段とを備え、前記計測手段は、ブロック毎の発生符号量が前記目標符号量以下に収束した場合、符号化データを最終エンコード結果として出力し、前記発生符号量予測手段は、全画素領域に対する総発生符号量を予測する構成を採る。 The code amount control apparatus of the present invention includes a decoding unit that decodes input encoded data, and dequantizes the data decoded by the decoding unit using a quantization coefficient. Inverse quantization means, quantization means for quantizing using a quantization coefficient, encoding means for assigning a predetermined code to a value quantized by the quantization means to obtain encoded data, and the encoding means Measuring the generated code amount for each block generated by the above, or measuring means for measuring the generated code amount for each block with respect to the input encoded data, and the representative based on the measured generated code amount for each block A representative block extracting means for extracting a block, a generated code quantity predicting means for determining a quantized coefficient predicted to converge to a target code quantity for the representative block, and the generated code quantity predicting means Quantizing coefficient control means for setting the determined quantizing coefficient in the quantizing means, and when the generated code amount for each block converges below the target code amount, the measuring means finalizes the encoded data. The generated code amount predicting means outputs a result of encoding, and adopts a configuration for predicting the total generated code amount for all pixel regions.
本発明の符号量制御方法は、符号化対象画像に対して直交変換を施すステップと、直交変換の出力結果に対して量子化係数を用いて量子化するステップと、量子化された値に所定の符号を割り当てて符号化データを出力するステップと、発生したブロック毎の発生符号量を計測するステップと、計測したブロック毎の発生符号量を基に代表となるブロックを抽出するステップと、前記代表ブロックに対して、目標符号量に収束すると予測される量子化係数を決定するステップと、決定された量子化係数を前記量子化手段に設定するステップとを実行し、ブロック毎の発生符号量が前記目標符号量以下に収束した場合、符号化データを最終エンコード結果として出力し、全画素領域に対する総発生符号量を予測する。 The code amount control method of the present invention includes a step of performing orthogonal transformation on an encoding target image, a step of quantizing an output result of the orthogonal transformation using a quantization coefficient, and a predetermined value for the quantized value. A step of outputting encoded data by assigning a code of the step, a step of measuring a generated code amount for each generated block, a step of extracting a representative block based on the generated generated code amount for each block, and For the representative block, a step of determining a quantized coefficient predicted to converge to the target code amount and a step of setting the determined quantized coefficient in the quantizing means are executed, and the generated code amount for each block Is converged below the target code amount, the encoded data is output as the final encoding result, and the total generated code amount for all pixel regions is predicted.
本発明の符号量制御方法は、入力された符号化データに対して復号化を行うステップと、復号化されたデータに対して量子化係数を用いて逆量子化するステップと、量子化係数を用いて量子化するステップと、量子化された値に所定の符号を割り当てて符号化データを得るステップと、発生したブロック毎の発生符号量を計測する、もしくは、入力された符号化データに対してブロック毎の発生符号量を計測するステップと、計測したブロック毎の発生符号量を基に代表となるブロックを抽出するステップと、前記代表ブロックに対して、目標符号量に収束すると予測される量子化係数を決定するステップと、決定された量子化係数を前記量子化手段に設定するステップとを実行し、ブロック毎の発生符号量が前記目標符号量以下に収束した場合、符号化データを最終エンコード結果として出力し、全画素領域に対する総発生符号量を予測する。 The code amount control method of the present invention includes a step of decoding input encoded data, a step of inversely quantizing the decoded data using a quantization coefficient, and a quantization coefficient Using the quantization step, assigning a predetermined code to the quantized value to obtain encoded data, measuring the generated code amount for each generated block, or for the input encoded data The step of measuring the generated code amount for each block, the step of extracting a representative block based on the generated generated code amount for each block, and the representative block are predicted to converge to the target code amount. The step of determining the quantization coefficient and the step of setting the determined quantization coefficient in the quantization means are executed, and the generated code amount for each block converges to the target code amount or less. If, and outputs the coded data as the final encoding result, to predict the total amount of generated code for the entire pixel area.
他の観点から、本発明は、上記符号量制御方法のステップをコンピュータに実行させるためのプログラムである。 From another viewpoint, the present invention is a program for causing a computer to execute the steps of the code amount control method.
本発明によれば、保持しているブロック毎の発生符号量から代表となるブロックを抽出し、代表ブロックに対してのみ量子化係数変更/再量子化/再符号化を試み、全画素領域に対する総符号量を予測することにより、符号量制御が収束するまでの総処理時間を短縮して、符号量制御に要する処理時間を短縮することができる。これにより、符号化対象画像のサイズが増加した場合でも、符号量制御の処理時間増加を最小限に抑えることができる。 According to the present invention, a representative block is extracted from the generated code amount for each block, and quantization coefficient change / requantization / recoding is attempted only for the representative block, By predicting the total code amount, the total processing time until the code amount control converges can be shortened, and the processing time required for the code amount control can be shortened. Thereby, even when the size of the encoding target image increases, it is possible to minimize an increase in the processing time of the code amount control.
また、再符号化時に、最初は、入力された符号化データに対してブロック毎の発生符号量を計測することで、最初の全画素領域に対する符号化処理が不要となり、符号量制御が収束するまでの総処理時間を短縮することができ、デコード画像の再エンコード処理に要する処理時間を短縮することができる。 In addition, at the time of re-encoding, by measuring the generated code amount for each block with respect to the input encoded data, the encoding process for the first all pixel regions becomes unnecessary and the code amount control converges. The total processing time up to 1 can be shortened, and the processing time required for re-encoding the decoded image can be shortened.
以下、本発明の実施の形態について図面を参照して詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
(実施の形態1)
図1は、本発明の実施の形態1に係る符号量制御装置の構成を示すブロック図である。本実施の形態に係る符号量制御装置は、静止画データを圧縮符号化する画像データ符号化装置に適用した例である。
(Embodiment 1)
FIG. 1 is a block diagram showing a configuration of a code amount control apparatus according to Embodiment 1 of the present invention. The code amount control apparatus according to the present embodiment is an example applied to an image data encoding apparatus that compresses and encodes still image data.
図1において、符号量制御装置100は、直交変換部101、直交変換係数メモリ102、量子化部103、符号化部104、カウンタ105、発生符号量予測部106、及び量子化係数変更部107を備えて構成される。
1, the code
直交変換部101は、入力された符号化対象となる符号化対象画像に対して直交変換を行い、直交変換係数メモリ102に直交変換結果を格納する。直交変換には例えばDCT等がある。
The
量子化部103は、量子化係数変更部107により設定された量子化係数を基に直交変換係数メモリ102に格納されている直交変換結果に対して量子化を行う。
The
符号化部104は、量子化部103の出力結果に対して符号化を行い、符号化データを出力する。符号化には例えばハフマン符号化やランレングス符号化等がある。
カウンタ105は、符号化部104により発生したブロック毎の発生符号量を計測し、ブロック毎の発生符号量を保持する。すなわち、カウンタ105は、符号化データの符号量カウントを行い、指定された目標符号量を基に発生符号量の監視を行う。
The
発生符号量予測部106は、カウンタ105が集計したブロック毎の発生符号量を基に、符号量制御を目的とした再エンコード時に使用する量子化係数を決定する。特に、発生符号量予測部106は、計測したブロック毎の発生符号量を基に代表となるブロックを抽出し、代表ブロックに対して、目標符号量に収束すると予測される量子化係数を決定する。また、発生符号量予測部106は、ブロック毎の発生符号量が前記目標符号量以下に収束した場合、全画素領域に対する総発生符号量を予測する。
The generated code
量子化係数変更部107は、量子化部103に対して発生符号量予測部106により指定された量子化係数を設定する。
The quantization
以下、上述のように構成された符号量制御装置の符号量制御動作について説明する。 Hereinafter, the code amount control operation of the code amount control apparatus configured as described above will be described.
符号量制御装置100には、符号化対象となる符号化対象画像が入力される。直交変換部101では、入力された符号化対象画像に対して直交変換を行い、直交変換係数メモリ102に画像データ1フレーム分の直交変換結果を格納する。量子化部103では、直交変換係数メモリ102に格納されている直交変換結果に対して量子化を行い、量子化された結果は符号化部104において符号化され、符号化データを出力する。同時に、カウンタ105は、符号化データの符号量カウントを行い、指定されている目標符号量を基に発生符号量の監視を行う。また、カウンタ105は、ブロック毎の発生符号量を保持する。本実施の形態では、カウンタ105は符号量カウントにより、発生符号量が目標符号量以下に収まるように監視しているが、指定した目標符号量を超えて目標符号量付近に収まるように監視する態様でもよい。
The encoding
発生符号量が目標符号量以下に収束した場合、符号化データを最終エンコード結果として出力する。 When the generated code amount converges below the target code amount, the encoded data is output as the final encoding result.
発生符号量が目標符号量以下に収束しない場合、発生符号量予測部106は、カウンタ105が集計したブロック毎の発生符号量を基に、符号量制御を目的とした再エンコード時に使用する量子化係数を決定する。
When the generated code amount does not converge below the target code amount, the generated code
図2は、ブロック別発生符号量のヒストグラムを示す図であり、発生符号量予測部106が発生符号量の予測に使用するブロック毎の発生符号量をサイズ別にヒストグラム化したものである。
FIG. 2 is a diagram showing a histogram of the generated code amount for each block. The generated code amount for each block used by the generated code
発生符号量予測部106は、このブロック別発生符号量のヒストグラムを基に符号量サイズ別に代表ブロックB0〜Bn(nは任意の自然数)を決定する。ここで、代表ブロックB0〜Bnにおけるそれぞれの符号量サイズをX0〜Xn、ブロック数をZ0〜Znとした場合、以下の式(1)が成り立つ。
発生符号量 ≒ X0×Z0 + X1×Z1 + ・・・ + Xn×Zn …(1)
The generated code
Generated code amount ≒ X0 x Z0 + X1 x Z1 + ... + Xn x Zn (1)
次に、代表ブロックB0〜Bnに対して任意の量子化係数を用いて量子化/符号化を実行した場合の符号量サイズをY0〜Ynとした場合、以下の計算式(2)を用いて発生符号量の予測を行う。
予測符号量 = Y0×Z0 + Y1×Z1 + ・・・ + Yn×Zn …(2)
Next, when the code amount size is Y0 to Yn when quantization / encoding is performed on the representative blocks B0 to Bn using arbitrary quantization coefficients, the following calculation formula (2) is used. The generated code amount is predicted.
Predicted code amount = Y0 × Z0 + Y1 × Z1 +... + Yn × Zn (2)
発生符号量予測部106は、上記予測符号量と目標符号量を比較し、目標符号量に収束すると予測される量子化係数を決定する。
The generated code
最後に、量子化係数変更部107は、量子化部103に対して発生符号量予測部106により指定された量子化係数を設定し、符号量制御を目的とした再エンコード処理の準備を整える。以後はエンコード処理/符号量制御処理の繰り返しとなる。上記処理により、符号量制御に要する処理時間の短縮を実現できる。
Finally, the quantization
図3は、符号量制御装置100の符号量制御方法を示すフローチャートであり、図中、Sはフローの各ステップを示す。
FIG. 3 is a flowchart showing a code amount control method of the code
まず、ステップS1で符号化対象画像を入力し、ステップS2で入力された符号化対象画像に対して直交変換処理を行う。次いで、ステップS3で直交変換処理の結果を直交変換係数メモリ102に格納する。
First, an encoding target image is input in step S1, and orthogonal transformation processing is performed on the encoding target image input in step S2. Next, the result of the orthogonal transformation process is stored in the orthogonal
次いで、ステップS4で直交変換処理の結果に対して量子化処理を行い、ステップS5で量子化処理結果に対して符号化処理を行う。同時に、ステップS6で発生符号量のカウント処理を行い、ステップS7で発生符号量と目標符号量とを比較する。発生符号量が目標符号量を超える(発生符号量>目標符号量)ときは、発生符号量を目標値以下に収める符号量制御を行うため、ステップS8で発生符号量の予測を行い、ステップS9で符号量制御を目的とした再エンコードに使用する量子化係数を決定してステップS4に戻る。この再エンコード処理の場合、上述した方法、すなわち、ブロック毎の発生符号量から量子化係数変更時の総発生符号量を予測して、量子化係数を変更するものである。 Next, in step S4, a quantization process is performed on the result of the orthogonal transform process, and in step S5, an encoding process is performed on the quantization process result. At the same time, the generated code amount is counted in step S6, and the generated code amount is compared with the target code amount in step S7. When the generated code amount exceeds the target code amount (generated code amount> target code amount), the generated code amount is predicted in step S8 in order to perform code amount control for keeping the generated code amount below the target value, and in step S9 In step S4, the quantization coefficient used for re-encoding for the purpose of code amount control is determined, and the process returns to step S4. In the case of this re-encoding process, the quantization coefficient is changed by predicting the total generated code quantity when the quantization coefficient is changed from the generated code quantity for each block.
目標符号量が発生符号量以上(発生符号量≦目標符号量)のときは、ステップS10でエンコード結果の出力及びエンコード終了と判断してステップS10で符号化データを出力して本フローを終了する。以後は、エンコード処理終了まで、エンコード処理/符号量制御処理の繰り返しとなる。 If the target code amount is equal to or greater than the generated code amount (generated code amount ≦ target code amount), it is determined in step S10 that the output of the encoding result and the encoding have been completed, and the encoded data is output in step S10, and this flow ends. . Thereafter, the encoding process / code amount control process is repeated until the end of the encoding process.
以上のように、実施の形態1によれば、カウンタ105に保持しているブロック毎の発生符号量から代表となるブロックを抽出し、代表ブロックに対してのみ量子化係数変更/再量子化/再符号化を試み、全画素領域に対する総符号量を予測するので、全画素領域に対して再量子化/再符号化を繰り返し行う従来例に比べ、符号量制御が収束するまでの総処理時間を大幅に短縮することができ、符号化対象画像のサイズが増加した場合であっても、符号量制御の処理時間増加を最小限に抑えることができる。
As described above, according to the first embodiment, a representative block is extracted from the generated code amount for each block held in the
なお、本実施の形態では、画像データ1フレーム分の直交変換係数を格納する直交変換係数メモリ102を有することで再エンコード時の直交変換処理時間を削減しているが、直交変換係数メモリ102を用いず、符号化対象画像から再エンコード処理を開始する装置でもよい。
In this embodiment, the orthogonal
また、符号量制御装置100は、例えば携帯端末の画像符号化装置として組み込むことが可能であり、このような携帯端末を具備した移動体通信システムとして実現することも可能である。
The code
(実施の形態2)
図4は、本発明の実施の形態2に係る符号量制御装置の構成を示すブロック図である。本実施の形態の説明にあたり、図1と同一構成要素には同一の番号を付して重複部分の説明を省略する。
(Embodiment 2)
FIG. 4 is a block diagram showing the configuration of the code amount control apparatus according to
図4において、符号量制御装置200は、図1の符号化対象画像を直交変換する直交変換部101に代えて、符号化データを復号/逆量子化する復号化部201及び逆量子化部202を備える構成となっている。
In FIG. 4, the code
また、カウンタ203は、符号化部104により発生したブロック毎の発生符号量を計測する図1のカウンタ105と同様の機能に加え、さらに入力された符号化データに対してブロック毎の発生符号量を計測する。
The
復号化部201は、符号化データの復号化を行う。逆量子化部202は、復号化部201が出力した復号化データに対して逆量子化処理を行う。
The
符号化データは、復号化部201によって復号化され、復号化データに対して逆量子化部202により逆量子化処理が行われる。逆量子化されたデータは、直交変換係数メモリ102に格納され、符号量制御を目的とした再エンコード処理の入力データとされる。
The encoded data is decoded by the
復号化と同時にカウンタ203は符号化データの符号量カウントを行い、ブロック毎の発生符号量を保持する。発生符号量予測部106は、カウンタ203が集計したブロック毎の発生符号量を基に、符号量制御を目的とした再エンコード時に使用する量子化係数を決定する。量子化係数の決定方法に関しては、実施の形態1における説明と重複するためここでは省略する。
Simultaneously with the decoding, the
次に、量子化係数変更部107は、量子化部103に対して発生符号量予測部106により指定された量子化係数を設定し、符号量制御を目的とした再エンコード処理の準備を整える。以後はエンコード処理/符号量制御処理の繰り返しとなる。上記処理により、符号量制御に要する処理時間の短縮を実現できる。
Next, the quantization
以下、上述のように構成された符号量制御装置の符号量制御動作について説明する。 Hereinafter, the code amount control operation of the code amount control apparatus configured as described above will be described.
図5は、符号量制御装置200の符号量制御方法を示すフローチャートである。図3と同一処理を行うステップには同一ステップ番号を付して重複部分の説明を省略する。
FIG. 5 is a flowchart showing a code amount control method of the code
まず、ステップS11で符号化データを入力し、ステップS12で入力された符号化データに対して発生符号量のカウント処理を行う。同時に、ステップS13で入力された符号化データに対して復号化処理を行い、ステップS14で逆量子化処理を行う。次いで、ステップS15で逆量子化処理の結果を直交変換係数メモリ102に格納する。ステップS16では、実施の形態1で説明した方法により発生符号量の予測を行い、ステップS17で符号量制御を目的とした再エンコードに使用する量子化係数を決定してステップS4に進む。以後は、エンコード処理終了まで、エンコード処理/符号量制御処理の繰り返しとなる。
First, encoded data is input in step S11, and the generated code amount is counted for the encoded data input in step S12. At the same time, a decoding process is performed on the encoded data input in step S13, and an inverse quantization process is performed in step S14. Next, the result of the inverse quantization process is stored in the orthogonal
このように、実施の形態2によれば、再符号化時に、最初は、入力された符号化データに対してブロック毎の発生符号量を計測することで、最初の全画素領域に対する符号化処理が不要となることから、実施の形態1で述べた効果に加えて、デコード画像の再エンコード処理に要する処理時間の短縮を図ることができる。 As described above, according to the second embodiment, at the time of re-encoding, first, the encoding process for the first all pixel regions is performed by measuring the generated code amount for each block of the input encoded data. Therefore, in addition to the effects described in the first embodiment, the processing time required for the re-encoding process of the decoded image can be shortened.
また、符号量制御装置200は、例えば携帯端末の画像符号化装置として組み込むことが可能であり、このような携帯端末を具備した移動体通信システムとして実現することも可能である。
Further, the code
以上の説明は本発明の好適な実施の形態の例証であり、本発明の範囲はこれに限定されることはない。 The above description is an illustration of a preferred embodiment of the present invention, and the scope of the present invention is not limited to this.
なお、上記各実施の形態ではデジタルビデオカメラのような用途を想定した説明を行ったが、例えばTV電話端末の符号化方法として実施することも可能である。 In each of the above-described embodiments, description has been made assuming a use such as a digital video camera. However, for example, it can be implemented as a coding method for a TV phone terminal.
また、符号量制御装置及び方法を有する電子機器であればどのような装置にも適用できる。例えば、電子機器としてデジタルカメラやカメラ付き携帯電話装置、PDA(Personal Digital Assistants)等の携帯情報端末、パソコン等の情報処理装置など、カメラ(内蔵/外付け)を備えた装置にも適用可能である。また、符号化対象となる画像は、どのような画像データであってもよい。 Further, the present invention can be applied to any apparatus as long as it is an electronic apparatus having a code amount control apparatus and method. For example, it can also be applied to devices equipped with a camera (built-in / external) such as digital cameras, mobile phone devices with cameras, portable information terminals such as PDAs (Personal Digital Assistants), and information processing devices such as personal computers. is there. Further, the image to be encoded may be any image data.
また、上記各実施の形態では、符号量制御装置及び符号量制御方法という名称を用いたが、これは説明の便宜上であり、画像データ圧縮装置、画像符号化方法、移動体通信システム等でもよいことは勿論である。 In the above embodiments, the names of the code amount control device and the code amount control method are used. However, this is for convenience of explanation, and an image data compression device, an image encoding method, a mobile communication system, and the like may be used. Of course.
また、図2に示すブロック別発生符号量のヒストグラムは一例であって他の例でもよいことは言うまでもない。 Moreover, it goes without saying that the histogram of the generated code amount for each block shown in FIG. 2 is an example and may be another example.
また、上記画像の符号量制御装置を構成する各回路部の種類、数及び接続方法などは前述した実施の形態に限られない。 The type, number, connection method, and the like of each circuit unit constituting the code amount control apparatus for the image are not limited to the above-described embodiments.
また、以上説明した符号量制御装置及び方法は、これら符号量制御装置及び符号量制御方法を機能させるためのプログラムでも実現される。このプログラムはコンピュータで読み取り可能な記録媒体に格納されている。 The code amount control apparatus and method described above are also realized by a program for causing the code amount control apparatus and the code amount control method to function. This program is stored in a computer-readable recording medium.
本発明に係る符号量制御装置及び方法は、静止画撮影可能なデジタルビデオカメラやカメラ付き携帯電話といった静止画を圧縮符号化記録する装置及び方法に用いて好適である。特に発生符号量を目標値以下に収めることを目的とした符号量制御を高速に実行できる装置等として有用である。また、符号量制御プログラムとして画像処理装置などの電子機器に組み込むことも可能である。 The code amount control apparatus and method according to the present invention is suitable for use in an apparatus and method for compressing and recording still images, such as a digital video camera capable of taking a still image and a camera-equipped mobile phone. In particular, the present invention is useful as a device that can execute code amount control aimed at keeping the generated code amount below a target value at high speed. Further, it can be incorporated into an electronic apparatus such as an image processing apparatus as a code amount control program.
100,200 符号量制御装置
101 直交変換部
102 直交変換係数メモリ
103 量子化部
104 符号化部
105,203 カウンタ
106 発生符号量予測部
107 量子化係数変更部
201 復号化部
202 逆量子化部
DESCRIPTION OF SYMBOLS 100,200 Code
Claims (7)
前記直交変換手段の出力結果に対して量子化係数を用いて量子化する量子化手段と、
前記量子化手段により量子化された値に所定の符号を割り当てて符号化データを得る符号化手段と、
前記符号化手段により発生したブロック毎の発生符号量を計測する計測手段と、
計測したブロック毎の発生符号量を基に代表となるブロックを抽出する代表ブロック抽出手段と、
前記代表ブロックに対して、目標符号量に収束すると予測される量子化係数を決定する発生符号量予測手段と、
前記発生符号量予測手段により決定された量子化係数を前記量子化手段に設定する量子化係数制御手段とを備え、
前記計測手段は、ブロック毎の発生符号量が前記目標符号量以下に収束した場合、符号化データを最終エンコード結果として出力し、前記発生符号量予測手段は、全画素領域に対する総発生符号量を予測する符号量制御装置。 Orthogonal transform means for performing orthogonal transform on the encoding target image;
Quantization means for quantizing the output result of the orthogonal transform means using a quantization coefficient;
Encoding means for assigning a predetermined code to the value quantized by the quantization means to obtain encoded data;
Measuring means for measuring the amount of generated code for each block generated by the encoding means;
Representative block extraction means for extracting a representative block based on the measured code amount for each block;
For the representative block, generated code amount prediction means for determining a quantized coefficient predicted to converge to a target code amount;
A quantization coefficient control unit that sets the quantization coefficient determined by the generated code amount prediction unit in the quantization unit;
When the generated code amount for each block converges below the target code amount, the measuring unit outputs encoded data as a final encoding result, and the generated code amount predicting unit calculates the total generated code amount for all pixel regions. A code amount control device for prediction.
前記復号化手段により復号化されたデータに対して量子化係数を用いて逆量子化する逆量子化手段と、
量子化係数を用いて量子化する量子化手段と、
前記量子化手段により量子化された値に所定の符号を割り当てて符号化データを得る符号化手段と、
前記符号化手段により発生したブロック毎の発生符号量を計測する、もしくは、入力された符号化データに対してブロック毎の発生符号量を計測する計測手段と、
計測したブロック毎の発生符号量を基に代表となるブロックを抽出する代表ブロック抽出手段と、
前記代表ブロックに対して、目標符号量に収束すると予測される量子化係数を決定する発生符号量予測手段と、
前記発生符号量予測手段により決定された量子化係数を前記量子化手段に設定する量子化係数制御手段とを備え、
前記計測手段は、ブロック毎の発生符号量が前記目標符号量以下に収束した場合、符号化データを最終エンコード結果として出力し、前記発生符号量予測手段は、全画素領域に対する総発生符号量を予測する符号量制御装置。 Decoding means for decoding input encoded data;
Inverse quantization means for inversely quantizing the data decoded by the decoding means using a quantization coefficient;
A quantization means for performing quantization using a quantization coefficient;
Encoding means for assigning a predetermined code to the value quantized by the quantization means to obtain encoded data;
Measuring the generated code amount for each block generated by the encoding means, or measuring means for measuring the generated code amount for each block with respect to the input encoded data;
Representative block extraction means for extracting a representative block based on the measured code amount for each block;
For the representative block, generated code amount prediction means for determining a quantized coefficient predicted to converge to a target code amount;
A quantization coefficient control unit that sets the quantization coefficient determined by the generated code amount prediction unit in the quantization unit;
When the generated code amount for each block converges below the target code amount, the measuring unit outputs encoded data as a final encoding result, and the generated code amount predicting unit calculates the total generated code amount for all pixel regions. A code amount control device for prediction.
直交変換の出力結果に対して量子化係数を用いて量子化するステップと、
量子化された値に所定の符号を割り当てて符号化データを出力するステップと、
発生したブロック毎の発生符号量を計測するステップと、
計測したブロック毎の発生符号量を基に代表となるブロックを抽出するステップと、
前記代表ブロックに対して、目標符号量に収束すると予測される量子化係数を決定するステップと、
決定された量子化係数を前記量子化手段に設定するステップとを実行し、
ブロック毎の発生符号量が前記目標符号量以下に収束した場合、符号化データを最終エンコード結果として出力し、全画素領域に対する総発生符号量を予測する符号量制御方法。 Performing orthogonal transform on the encoding target image;
Quantizing the output result of the orthogonal transform using a quantization coefficient;
Assigning a predetermined code to the quantized value and outputting encoded data;
Measuring a generated code amount for each generated block;
Extracting a representative block based on the generated code amount for each block;
Determining a quantization coefficient predicted to converge to a target code amount for the representative block;
Performing the step of setting the determined quantization coefficient in the quantization means;
A code amount control method for outputting encoded data as a final encoding result and predicting a total generated code amount for all pixel regions when a generated code amount for each block converges to the target code amount or less.
復号化されたデータに対して量子化係数を用いて逆量子化するステップと、
量子化係数を用いて量子化するステップと、
量子化された値に所定の符号を割り当てて符号化データを得るステップと、
発生したブロック毎の発生符号量を計測する、もしくは、入力された符号化データに対してブロック毎の発生符号量を計測するステップと、
計測したブロック毎の発生符号量を基に代表となるブロックを抽出するステップと、
前記代表ブロックに対して、目標符号量に収束すると予測される量子化係数を決定するステップと、
決定された量子化係数を前記量子化手段に設定するステップとを実行し、
ブロック毎の発生符号量が前記目標符号量以下に収束した場合、符号化データを最終エンコード結果として出力し、全画素領域に対する総発生符号量を予測する符号量制御方法。 Decoding input encoded data; and
Dequantizing the decoded data using quantization coefficients;
Quantizing using a quantization coefficient;
Assigning a predetermined code to the quantized value to obtain encoded data;
Measuring a generated code amount for each generated block, or measuring a generated code amount for each block with respect to input encoded data;
Extracting a representative block based on the generated code amount for each block;
Determining a quantization coefficient predicted to converge to a target code amount for the representative block;
Performing the step of setting the determined quantization coefficient in the quantization means;
A code amount control method for outputting encoded data as a final encoding result and predicting a total generated code amount for all pixel regions when a generated code amount for each block converges to the target code amount or less.
Decoding the input encoded data, dequantizing the decoded data using a quantization coefficient, quantizing using the quantization coefficient, A step of assigning a predetermined code to the converted value to obtain encoded data, and measuring the generated code amount for each generated block, or measuring the generated code amount for each block with respect to the input encoded data A step of extracting a representative block based on the measured generated code amount for each block, and a generated code for determining a quantized coefficient predicted to converge to a target code amount for the representative block An amount prediction step and a step of setting the determined quantization coefficient in the quantization means, and in the measurement step, the generated code amount for each block is the target code amount. If it converged below, and outputs the encoded data as the final encoding result, and in the generated code quantity predicting step, a program for executing the steps of predicting the total generated code amount for the entire pixel area to the computer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005352184A JP2007158804A (en) | 2005-12-06 | 2005-12-06 | Code amount controller, code amount control method and code amount control program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005352184A JP2007158804A (en) | 2005-12-06 | 2005-12-06 | Code amount controller, code amount control method and code amount control program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007158804A true JP2007158804A (en) | 2007-06-21 |
Family
ID=38242577
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005352184A Pending JP2007158804A (en) | 2005-12-06 | 2005-12-06 | Code amount controller, code amount control method and code amount control program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007158804A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010281965A (en) * | 2009-06-03 | 2010-12-16 | Sony Corp | Quantization device, reproducing device, quantization method and program |
-
2005
- 2005-12-06 JP JP2005352184A patent/JP2007158804A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010281965A (en) * | 2009-06-03 | 2010-12-16 | Sony Corp | Quantization device, reproducing device, quantization method and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20170347105A1 (en) | Quantization Method and Apparatus in Encoding/Decoding | |
US8213498B2 (en) | Bitrate reduction techniques for image transcoding | |
US7050499B2 (en) | Video encoding apparatus and method and video encoding mode converting apparatus and method | |
CN102685478B (en) | Encoding method and device, and decoding method and device | |
US8467442B2 (en) | Image searching device and method, program and program recording medium | |
JP4682102B2 (en) | Image coding apparatus and image coding method | |
EP2144446A2 (en) | Video encoding techniques | |
US10873763B2 (en) | Video compression techniques for high dynamic range data | |
US20070031049A1 (en) | Image compression device and image compression method | |
US20090297053A1 (en) | Image encoding device and image encoding method | |
US20110268181A1 (en) | Method and apparatus for rate control for compression of video frames | |
US8259811B2 (en) | Method for determining a number of items of encoded data that can be stored in a memory, and method for controlling sizes of items of encoded image data to be stored in a memory | |
JP5843631B2 (en) | Frame rate control method, frame rate control device, and frame rate control program | |
US20050265613A1 (en) | Image coding apparatus and method, and image decoding apparatus and method | |
CN102685483B (en) | Decoding method | |
JP2007158804A (en) | Code amount controller, code amount control method and code amount control program | |
WO2021060262A1 (en) | Image processing device and image processing method | |
CN102685485B (en) | Coding method and device, and decoding method and device | |
US7623720B2 (en) | Image processing apparatus and method | |
US8111748B2 (en) | Method and apparatus for video coding | |
JP2007336005A (en) | Image coding apparatus and image coding method | |
WO2021054437A1 (en) | Image processing device and image processing method | |
CN102685484A (en) | Coding method and device, and decoding method and device | |
JP2006148235A (en) | Jpeg image code amount control apparatus and method | |
JP2007214680A (en) | Method of forming fixed length data |