JP3281423B2 - Code amount control device at the time of image encoding - Google Patents

Code amount control device at the time of image encoding

Info

Publication number
JP3281423B2
JP3281423B2 JP27412792A JP27412792A JP3281423B2 JP 3281423 B2 JP3281423 B2 JP 3281423B2 JP 27412792 A JP27412792 A JP 27412792A JP 27412792 A JP27412792 A JP 27412792A JP 3281423 B2 JP3281423 B2 JP 3281423B2
Authority
JP
Japan
Prior art keywords
block
code
code amount
sum
function
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.)
Expired - Lifetime
Application number
JP27412792A
Other languages
Japanese (ja)
Other versions
JPH06125537A (en
Inventor
哲郎 久下
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Broadcasting Corp
Original Assignee
Japan Broadcasting Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Japan Broadcasting Corp filed Critical Japan Broadcasting Corp
Priority to JP27412792A priority Critical patent/JP3281423B2/en
Publication of JPH06125537A publication Critical patent/JPH06125537A/en
Application granted granted Critical
Publication of JP3281423B2 publication Critical patent/JP3281423B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、画像の構成単位である
1フレームの1/S(サブフレーム)を処理単位とする
ような画像符号化を行う場合、その処理単位毎に発生す
る符号量を予め定めた値を上限とするように固定制御す
る画像符号化時における符号量制御装置に係わり、特に
動画像蓄積メディア(例えば、カセット型ディジタルV
TRなど)のための動画像符号化や、静止画像蓄積メデ
ィア(例えば、ディジタルスチールカメラなど)のため
の静止画像符号化などに応用可能な画像符号化時におけ
る符号量制御装置に関する。
BACKGROUND OF THE INVENTION The present invention relates to an image encoding system in which 1 / S (sub-frame) of one frame, which is a constituent unit of an image, is used as a processing unit. Is related to a code amount control device at the time of image encoding in which fixed control is performed so that a predetermined value is set as an upper limit.
The present invention relates to a code amount control device at the time of image encoding that can be applied to moving image encoding for a TR or the like and still image encoding for a still image storage medium (for example, a digital still camera).

【0002】[発明の概要]本発明は、動画像蓄積メデ
ィア(例えば、カセット型ディジタルVTRなど)のた
めの動画像符号化や静止画像蓄積メディア(例えば、デ
ィジタルスチールカメラなど)のための静止画像符号化
において、画像の構成単位である1フレームの1/S
(以下「サブフレーム」と呼ぶ。Sは自然数でS≧1、
例えば、TV信号での1フィールドはS=2のときの1
サブフレームである。)を処理単位とし、さらに1サブ
フレームを複数の画素ブロックに分割するような画像符
号化を行う場合、その処理単位である1サブフレーム毎
に発生する符号量を予め定めた値を上限とするように固
定制御する方式(固定長符号制御方式)であり、各ブロ
ック毎に最適な符号化パラメータQk を選択して符号化
し総符号量、量子化誤差の総和を最適化する。
SUMMARY OF THE INVENTION The present invention relates to a moving picture coding for a moving picture storage medium (for example, a cassette type digital VTR) and a still picture for a still picture storage medium (for example, a digital still camera). In encoding, 1 / S of one frame, which is a constituent unit of an image,
(Hereinafter referred to as “sub-frame”. S is a natural number and S ≧ 1,
For example, one field in a TV signal is one field when S = 2.
This is a subframe. ) Is used as a processing unit, and when image encoding is performed such that one subframe is divided into a plurality of pixel blocks, a predetermined value is set as an upper limit to a code amount generated for each subframe which is the processing unit. In this manner, a fixed control method (fixed-length code control method) is used, and an optimum coding parameter Qk is selected and encoded for each block, and the block is optimized to optimize the total code amount and the sum of quantization errors.

【0003】[0003]

【従来の技術】[Prior art]

《動画像蓄積メディアの動画像符号化における固定長符
号化の必要性》一般に、動画像の伝送や、編集を伴わな
い場合の動画像記録においては、画像の構成単位である
個々のフレーム/フィールドに対応する符号量が、必ず
しもフレーム/フィールド毎に一定である必要はない。
そのため、この目的のための動画像符号化方式(MPE
Gなど)では、フレーム/フィールド間の画像相関を利
用するなどして、画像1枚ごとには必ずしも符号量が一
定とはならないが、符号化の対象となる動画像全体に対
して所望の一定レートの圧縮率を実現する方式(レート
一定型符号制御方式)が用いられる。
<< Necessity of Fixed-Length Coding in Moving Image Coding of Moving Image Storage Media >> Generally, in the transmission of moving images and recording of moving images without editing, individual frames / fields which are constituent units of images are used. Is not necessarily required to be constant for each frame / field.
Therefore, a moving picture coding method (MPE
G), the code amount is not always constant for each image, for example, by utilizing image correlation between frames / fields. However, a desired constant amount is set for the entire moving image to be encoded. A method of achieving a rate compression rate (constant rate code control method) is used.

【0004】この方式では、所望の符号レートの実現法
としては、発生した符号をFIFO型のバッファに書き
込み、所望のレートでコンスタントに読み出すことによ
り行われる。この場合、FIFO型のバッファがアンダ
ーフローやオーバーフローを起こさない様に(理想的に
は、バッファの占有量が常にほぼ1/2となるよう
に)、符号化パラメータを制御することになる。この制
御はFIFO型バッファの最大容量をある程度、大きく
しておけば、容易にかつ確実に行える。
In this method, a desired code rate is realized by writing the generated codes into a FIFO type buffer and reading them out at a desired rate constantly. In this case, the encoding parameters are controlled so that the FIFO type buffer does not cause underflow or overflow (ideally, the buffer occupancy is almost always 常 に). This control can be easily and reliably performed if the maximum capacity of the FIFO buffer is increased to some extent.

【0005】ところが、カセット型ディジタルVTRな
どの動画像蓄積メディアにおいては、単に動画像全体の
記録・再生を行うだけでなく、その中の特定のフレーム
の切り出しや、フレーム/フィールド単位での編集が必
要となる。このような編集においては、言うまでもな
く、メディア上に記録されている符号化データを画像に
復号することなく、符号化データのままで編集すること
が、画質劣化の防止、編集実行時間の短縮化の観点から
必要で、したがって、フレーム/フィールドを処理単位
として固定長符号化することが望まれる。
However, in a moving image storage medium such as a cassette type digital VTR, not only recording / reproducing of the entire moving image but also cutting out of a specific frame from the moving image and editing in a frame / field unit are required. Required. In such editing, it goes without saying that editing the encoded data recorded on the medium as it is without decoding it into an image can prevent image quality deterioration and shorten the editing execution time. Therefore, it is desirable to perform fixed-length encoding using a frame / field as a processing unit.

【0006】さらに、ディジタルVTRにおいては、画
像の構成単位である1フレーム/1フィールドを複数の
トラックに渡って記録することが多く、1トラックに相
当する画像を、画像符号化の処理単位とすることも考え
られる。
Further, in a digital VTR, one frame / field, which is a constituent unit of an image, is often recorded over a plurality of tracks, and an image corresponding to one track is used as a processing unit for image coding. It is also possible.

【0007】以上の説明から明らかなように、動画像蓄
積メディアのための動画像符号化では、画像の構成単位
である1フレームの1/S(サブフレーム。Sは自然数
でS≧1)を符号化の手順が完結する処理単位とし、か
つ、処理単位毎に発生する符号量が一定化される方式
(固定長符号制御方式)の採用が必須の条件となる。
As is apparent from the above description, in moving picture coding for moving picture storage media, 1 / S (subframe, where S is a natural number and S ≧ 1) of one frame, which is a unit of picture, is used. It is an essential condition to adopt a system (fixed-length code control system) in which the encoding procedure is completed and the amount of code generated for each processing unit is fixed.

【0008】《従来の固定長符号化技法》以下、画像符
号化方式を、サブフレームを単位として以下に示す、 直交変換(DCT等)+スカラー量子化+可変長符号
(エントロピー符号)…(1) を行う場合を例にして説明する。
<< Conventional Fixed-Length Coding Technique >> Hereinafter, an image coding method is shown below in units of subframes. Orthogonal transform (DCT, etc.) + Scalar quantization + variable-length code (entropy code) (1) ) Will be described as an example.

【0009】この場合、符号化は、サブフレーム内の縦
m画素×横n画素のm×n画素ブロックを単位として行
われ、可変長符号が生成される。
In this case, the encoding is performed in units of m × n pixel blocks of m pixels vertically × n pixels horizontally in the subframe, and a variable length code is generated.

【0010】すなわち、この1ブロック毎に、直交変換
による変換係数がm×n個得られ、これを量子化してm
×n個の整数の組を得て、この整数の組を可変長符号に
変換する。
That is, m × n transform coefficients obtained by orthogonal transform are obtained for each block, and these are quantized to obtain m
A set of × n integers is obtained, and the set of integers is converted to a variable length code.

【0011】この手順から分かるように、変換係数をい
かに量子化するかが、画質(量子化雑音)と、生成され
る可変長符号の量(圧縮率)の両者とを決定する重要な
ファクターとなる。
As can be seen from this procedure, how to quantize the transform coefficients is an important factor that determines both the image quality (quantization noise) and the amount of generated variable-length code (compression ratio). Become.

【0012】一般の画像を対象とするDCTなどの直交
変換では、エネルギーが低次の変換係数に集中する、と
いう実験的事実が知られている。この事実に基づき、変
換係数に対する上記量子化は、次低の変換係数ほど細か
く量子化し、高次の変換係数ほど荒く量子化するような
量子化器を用いるのが普通である。
It is known that in orthogonal transform such as DCT for general images, energy is concentrated on low-order transform coefficients. Based on this fact, it is common to use a quantizer for performing the above-described quantization on the transform coefficients in such a manner that the lower-order transform coefficients are finely quantized and the higher-order transform coefficients are coarsely quantized.

【0013】ところが、上記のエネルギーの低次係数へ
の集中度合は、符号化の対象となる画像によって異なる
ため、量子化器を固定化すると、画像によって、最終的
に得られる符号(可変長符号)の総量が異なる。すなわ
ち、細かい絵柄の場合、符号量が増加し、平坦な部分の
多い絵柄では符号量が減少する。
However, since the degree of concentration of the energy on the low-order coefficients differs depending on the image to be encoded, if the quantizer is fixed, a code (variable-length code) finally obtained by the image is obtained. ) Are different. That is, in the case of a fine pattern, the code amount increases, and in the case of a pattern having many flat portions, the code amount decreases.

【0014】このため、伝送のための動画像画像符号化
などでは、一定の符号レートを実現するのに、前述した
ように、符号を蓄積するFIFO型のバッファを用い、
バッファの占有量を監視して、スカラ量子化器の「荒
さ」を制御する方法が用いられている。この場合、複数
のフレーム/フィールドに渡る符号量の平均値として、
所定の符号レートが実現できておればよい。
For this reason, in moving image coding for transmission and the like, in order to realize a constant code rate, as described above, a FIFO type buffer for storing codes is used.
A method of monitoring the buffer occupancy and controlling the "roughness" of the scalar quantizer is used. In this case, as an average value of the code amount over a plurality of frames / fields,
It is sufficient if a predetermined code rate can be realized.

【0015】ところが、ここで問題としているサブフレ
ーム内固定長符号化方式においては、符号化の処理単位
(1サブフレーム)当たりの符号量が、厳密に所定の符
号量以下でなければならないので、このようなバッファ
制御は利用できない。
[0015] However, in the fixed-length intra-subframe coding method in question here, the code amount per coding processing unit (1 subframe) must be strictly less than a predetermined code amount. Such buffer control is not available.

【0016】このように、従来の固定制御で多く用いら
れている方式は、画素ブロックに対する直交変換の結果
から、その符号量を予測する「予測関数」を用意し、そ
れに基づいて、そのブロックに適用すべき、量子化器の
「荒さ」を決定するものである。
As described above, in the conventional method often used in fixed control, a "prediction function" for predicting the code amount is prepared from the result of orthogonal transformation for a pixel block, and based on that, the block is subjected to the block. This determines the "roughness" of the quantizer to be applied.

【0017】《従来の符号量予測関数の例(アクテイビ
テイによる符号量予測)》従来よく用いられる符号量予
測関数は、m×n画素単位の1ブロック当たりのエント
ロピー符号の量を予測するものであり、一般には、1ブ
ロック当たりのアクテイビテイA(直交変換係数のう
ち、DC成分以外の変換係数の自乗和、すなわちACエ
ネルギー)と、量子化器の「荒さ」を制御する符号化パ
ラメータQとなるスカラー量Q(例えば、JPEGにお
けるQファクター)の関数、 f(Q,A) …(2) として表される場合が多い。この符号量予測関数f
(Q,A)を理論的に求める手段はもとよりないので、
現実的に行われる方法としては、標準的と思われる複数
の画像に対して、何通りかのスカラー量Qについて符号
化を行い、個々のブロックでのアクテイビテイAと、エ
ントロピー符号の量bとを実測し、これら多数の実測値
の組の集合、 {(A,Q,b)} …(3) から内挿することにより、符号量予測関数、 b=f(A,Q) …(4) あるいは、この関数をスカラー量Qについて解いたもの
(符号化パラメータ予測関数) Q=g(b,A) …(5) を作成する。そして、符号化器では、あるブロックの符
号化パラメータQについて、そのブロックに割り当てる
ことが許されている符号量bと、そのブロックについて
のアクテイビテイAから、符号化パラメータ予測関数Q
=g(b,A)により、符号化パラメータQを決定す
る。
<< Example of Conventional Code Amount Prediction Function (Code Amount Prediction by Activity) >> A code amount prediction function often used in the past predicts the amount of entropy code per block of m × n pixels. In general, the activity A per block (the sum of squares of transform coefficients other than the DC component among the orthogonal transform coefficients, that is, AC energy) and a scalar serving as an encoding parameter Q for controlling the "roughness" of the quantizer. It is often expressed as a function of the quantity Q (eg, the Q factor in JPEG), f (Q, A) (2). This code amount prediction function f
Since there is no way to theoretically find (Q, A),
As a practical method, encoding is performed on a plurality of images considered to be standard with respect to several scalar amounts Q, and the activity A in each block and the amount b of the entropy code are calculated. By measuring and interpolating from a set of a large number of these measured values, {(A, Q, b)} (3), the code amount prediction function: b = f (A, Q) (4) Alternatively, this function is solved for a scalar quantity Q (coding parameter prediction function) Q = g (b, A) (5). Then, for the coding parameter Q of a certain block, the encoder calculates the coding parameter prediction function Q from the code amount b allowed to be allocated to the block and the activity A of the block.
= G (b, A), the coding parameter Q is determined.

【0018】しかしながら、この場合、最大の問題は、
「汎用性で効率的な予測関数」が用意できるかという点
にある。
In this case, however, the biggest problem is that
The point is whether a "versatile and efficient prediction function" can be prepared.

【0019】すなわち、画像の種類によらずに、与えら
れた符号量の枠内で、画像全体の符号化誤差が最も少な
くなるように、各ブロックへの符号割り当てができるよ
うな予測関数が必要なのであるが、予測関数の作成に使
用した画像以外の画素については、その予測値は保証の
限りではない。その結果、標本画像を使って求めた符号
化パラメータ予測関数g(b,A)によって一般画像を
実際に符号化したときの符号量は、設定符号量に対し
て、さほど一致しない。そのため、所定の符号量にまで
いたらない過少な符号の生成(アンダーフロー)や、逆
に所定の量を越えた符号の生成(オーバーフロー)が常
に発生する。
That is, a prediction function is required that can assign codes to each block so that the encoding error of the entire image is minimized within a given amount of code regardless of the type of image. However, for pixels other than the image used to create the prediction function, the predicted values are not guaranteed. As a result, the code amount when the general image is actually coded by the coding parameter prediction function g (b, A) obtained using the sample image does not substantially match the set code amount. Therefore, generation of an undersized code that does not reach the predetermined code amount (underflow) or generation of a code exceeding the predetermined amount (overflow) always occurs.

【0020】前者の場合、本来実現できるかも知れない
画質を下回る画質となるが、破綻的ではない。
In the former case, the image quality is lower than the image quality that may be realized, but it is not destructive.

【0021】ところが、後者の場合、なんらかの「符号
切捨て処理」を行うことが必須となる。すなわち、符号
量を減らすべきブロックを選び出し、それらブロックの
符号化パラメータを変更することで、符号量を減らし
(その結果、それらブロックでは画質は低下することは
避けられないが)、全体の符号量が所定の値におさまる
様な調整を行う。
However, in the latter case, it is necessary to perform some kind of "code truncation processing". That is, by selecting blocks whose code amount is to be reduced and changing the coding parameters of those blocks, the code amount is reduced (as a result, the image quality is inevitably reduced in those blocks), and the entire code amount is reduced. Is adjusted so that the value falls within a predetermined value.

【0022】一般に、符号化画像に関しては、アクテイ
ビテイ、符号量、量子化誤差には比例的な関係があると
いう実験的事実がある。このことから、このような符号
量制御は、アクテイビテイを指標として用いることによ
る量子化誤差の間接的な制御を行っているものと理解さ
れる。
In general, there is an experimental fact that an activity, a code amount, and a quantization error have a proportional relationship with respect to a coded image. From this, it is understood that such code amount control performs indirect control of the quantization error by using the activity as an index.

【0023】すなわち、この方式は必ずしも、その符号
量で最大限達成できるはずの最良(量子化誤差が少な
い)の画素の実現を直接的に目指している、というわけ
ではないことになる。
That is, this method does not necessarily directly aim at realizing the best (small quantization error) pixel which should be able to achieve the maximum with the code amount.

【0024】[0024]

【発明が解決しようとする課題】以上述べてきたことか
ら分かるように、このような予測関数を用いる符号量制
御方式の問題点は、次の2つに要約される。
As will be understood from the above description, the problems of the code amount control system using such a prediction function are summarized in the following two points.

【0025】その1つは、予測関数の精度があまり高く
はないので、破綻を回避するための「切捨て処理」にか
なりの重点を置く必要がある。そのため、ブロックによ
る画質のばらつきが発生し、結果として、画質を安定的
に制御できない。
One is that the accuracy of the prediction function is not very high, so a considerable emphasis needs to be placed on "truncation processing" to avoid failure. Therefore, the image quality varies depending on the block, and as a result, the image quality cannot be stably controlled.

【0026】他の1つは、最良な画質(量子化誤差の最
小化)の実現を直接に目指す制御とは言えない。
The other one cannot be said to be a control which directly aims at realizing the best image quality (minimization of the quantization error).

【0027】本発明は上記の事情に鑑み、各ブロックの
量子化誤差と符号長とを計測することによって、画像全
体の(量子化誤差、符号長)の分布を得たのち、この分
布に基づいて、画像全体として、最も量子化誤差が少な
く、かつ、設定符号量に最も近い符号量となるように、
各ブロックに対する最適な符号化パラメータQを決定す
る画像符号化時における符号量制御装置を提供すること
を目的としている。
In view of the above circumstances, the present invention obtains a (quantization error, code length) distribution of the entire image by measuring the quantization error and the code length of each block, and then, based on this distribution. Thus, as a whole image, the quantization error is the least, and the code amount is the closest to the set code amount,
It is an object of the present invention to provide a code amount control device at the time of image encoding that determines an optimal encoding parameter Q for each block.

【0028】すなわち、本発明は与えられた設定符号量
の枠を目いっぱい使って、最も量子化誤差が少なくなる
ように、ブロックの量子化誤差を直接の指標として使っ
て、各ブロックへの最適符号化割り当てを実現するもの
で、各ブロックへの符号化パラメータの選択を、画像全
体の画質と符号量とをにらみながら決定し、さらに非常
に高い精度で安定的に設定符号量を達成し、これによっ
て破綻的なオーバーフロー発生の危険を著しく少なくす
ることができる画像符号化時における符号量制御装置を
提供することを目的としている。
That is, according to the present invention, the quantization error of a block is used as a direct index so that the quantization error is minimized by using the given set code amount frame as much as possible, and In order to realize coding assignment, the selection of coding parameters for each block is determined while considering the image quality and code amount of the entire image, and furthermore, achieves the set code amount stably with very high accuracy, It is an object of the present invention to provide a code amount control device at the time of image encoding, which can significantly reduce the risk of occurrence of a catastrophic overflow.

【0029】[0029]

【課題を解決するための手段】上記の目的を達成するた
めに本発明に係る画像符号化時における符号量制御装置
は、符号化対象となる画像をN個のブロックの集合に変
換した後、ブロック毎に可変長符号を生成する非可逆符
号化方式であって、可変長符号の長さb(i,k)を計数す
る計数手段と、評価関数Fを計算する評価関数演算手段
と、前記評価関数Fを最小化する写像ψを決定する写像
決定手段とを備えて成り、前記評価関数演算手段は、N
個の量、 を変数とし、それらの総和を計算する関数を関数Eと
し、係数λを用いて、
In order to achieve the above object, a code amount control apparatus according to the present invention at the time of image encoding converts an image to be encoded into a set of N blocks. An irreversible coding method for generating a variable length code for each block, wherein a counting means for counting the length b (i, k) of the variable length code, an evaluation function calculating means for calculating an evaluation function F, And a mapping determining means for determining a mapping す る that minimizes the evaluation function F.
Quantity, Is a variable, a function for calculating the sum of them is a function E, and using a coefficient λ,

【数8】 として計算する手段であり、前記写像決定手段は、符号
量の総和、
(Equation 8) Where the mapping determination means calculates the sum of code amounts,

【数9】 を予め設定した符号量B0 に一致させるために、予め与
えられた関数ψについて、前記各ブロックをある定めら
れた順序で選択し、ある時点で選択されたブロックをi
とするとき、当該ブロックiの関数値ψ(i)(当該ブロ
ックiに割り当てるべき符号化器番号)の割当をψ(i)
=kとするとき、前記評価関数Fの値をより小さくする
ように当該ブロックiに対する割当の値kを変更し、さ
らにi以外の他のブロックに対してもこの割り当て変更
を逐次的に実施し、前記写像ψのK通りの定値関数ψk
(ただし、k=1,…,K)を、全てのiに対して、ψ
k(i)=kとするとき、前記K通りの定値関数ψkによる
符号化器割当てを行って得られるK通りの符号量総和B
(ψ1),…,B(ψK)と、K通りの符号化誤差総和E
(ψ1),…,E(ψk)とを計算し、前記K通りの符号
量総和の中から予め設定した符号量B0に最も近い符号
量総和B(ψk)を選択し、選択された番号kによる定
値関数ψkを写像ψの初期値としてψを逐次的に決定す
る手段であることを特徴としている。
(Equation 9) To match the code amount B0 set in advance, the blocks are selected in a predetermined order for a given function ψ, and the block selected at a certain point in time is selected as i
, The assignment of the function value ψ (i) of the block i (encoder number to be assigned to the block i) is ψ (i)
= K, the value k of the allocation to the block i is changed so as to make the value of the evaluation function F smaller, and this allocation change is sequentially performed for blocks other than i. , K constant value functions ψk of the mapping ψ
(Where k = 1,..., K) for all i
When k (i) = k, K kinds of code amount sums B obtained by performing encoder assignment by the K kinds of fixed value functions ψk
(Ψ1),..., B (ψK) and K kinds of coding error sum E
(Ψ1),..., E (ψk), and selects the code amount sum B (ψk) closest to the preset code amount B0 from the K kinds of code amount sums, and selects the selected number k Is a means for sequentially determining ψ as a constant value function ψk by as an initial value of the mapping ψ.

【0030】[0030]

【作用】上記の構成において、ブロック単位の可変長符
号化器C(k) をk種類用意し、あるブロックiに対して
C(k) を適用した場合に発生する可変長符号の長さをb
(i,k) 、そのブロックの符号化誤差をe(i,k) 、ブロッ
クの添字集合{1,…,N}から符号化器の添字集合
{1,…,K}への対応を与える写像をψとするとき、
2N個の可変長符号の長さをb(i,k) 、そのブロックの
符号化誤差をe(i,k) を変数とする評価関数Fを最小化
することで、符号量の総和b(1, ψ(1))+…+b(i, ψ
(i))+…+b(N, ψ(N))が予め設定した符号量B0 に等
しくなるように、各ブロックに対する符号化器に割り当
てる写像ψを決定することにより、最適な符号化パラメ
ータでブロックを符号化し、これによって総符号量、量
子化誤差の総和を最適化する。
In the above arrangement, k types of variable length encoders C (k) are prepared in block units, and the length of the variable length code generated when C (k) is applied to a certain block i is determined. b
(i, k), the encoding error of the block is e (i, k), and the correspondence from the subscript set {1,..., N} of the block to the subscript set {1,. When the mapping is ψ,
By minimizing the evaluation function F with the length of the 2N variable-length codes as b (i, k) and the coding error of the block as e (i, k), the sum b ( 1, ψ (1)) +… + b (i, ψ
(i)) +... + b (N, N (N)) is determined so that the mapping 割 り 当 て る to be assigned to the encoder for each block is equal to the predetermined code amount B0. The block is coded, thereby optimizing the total code amount and the sum of the quantization errors.

【0031】[0031]

【実施例】【Example】

《本発明の基本原理》まず、最適符号割り当て問題の定
式化を行いながら、本発明による符号量の制御手順につ
いて説明し、次に、その手順を実行するハードウェアの
具体的な構成方法について、図を用いながら説明する。
<< Basic Principle of the Present Invention >> First, while formulating an optimal code assignment problem, a control procedure of a code amount according to the present invention will be described, and then a specific configuration method of hardware for executing the procedure will be described. This will be described with reference to the drawings.

【0032】<最適符号割り当て問題の定式化と、本発
明による符号量制御手順>まず、符号化パラメータQと
してK通りの値、 {Q1 ,…,QK } …(6) を用意する。
<Formulation of optimal code assignment problem and code amount control procedure according to the present invention> First, K values, {Q 1 ,..., Q K } (6), are prepared as coding parameters Q.

【0033】また、画素ブロックの個数をNとし、第i
番目の画素ブロックを、符号化パラメータQk で符号化
した場合の量子化誤差をe(i,k) 、符号長をb(i,k) と
する。
Also, the number of pixel blocks is N, and
It is assumed that the quantization error and the code length of the pixel block at the time of encoding with the encoding parameter Q k are e (i, k) and b (i, k), respectively.

【0034】ここで、N個のブロック1つ1つに、K種
類のうちの符号化パラメータ{Q1,…,QK }のいず
れかを割り当てるということは、添字集合、
Here, assigning any one of the K types of encoding parameters {Q1,..., QK} to each of the N blocks is a set of subscripts.

【数3】 から、添字集合、(Equation 3) From the index set,

【数4】 への対応を与える写像ψ、(Equation 4) Ψ, which gives a correspondence to

【数5】 を1つ定めることにほかならない。すなわち、ψ(i)
は、第i番目の画素ブロックに適用すべき符号化パラメ
ータの番号を示す。言い替えると、写像ψを1つ定める
ことは、K通りの符号化パラメータ{Q1 ,…,QK }
のもとでの、N個のブロックから成る画像全体に対する
符号化ストラテジーを1つ決定したことになる。
(Equation 5) There is no other way to determine one. That is, ψ (i)
Indicates the number of the encoding parameter to be applied to the i-th pixel block. In other words, determining one mapping ψ is equivalent to K coding parameters {Q 1,..., Q K}
, One encoding strategy for the entire image composed of N blocks has been determined.

【0035】以下、この写像ψを「符号割り当て」関数
と呼ぶ。この関数ψの下での、画像全体の量子化誤差の
総和E(ψ)、符号量の総和B(ψ)は、
Hereinafter, this mapping ψ is called a “sign assignment” function. Under this function ψ, the sum E (ψ) of the quantization errors of the entire image and the sum B (ψ) of the code amount are

【数6】 となる。一方、画像全体に対して予め定められた符号の
総量をB0 とすると、最適な符号化パラメータ割り当て
関数ψを決定するという問題は、以下のような、拘束条
件付き最小化問題[A]に定式化される。
(Equation 6) Becomes On the other hand, assuming that the predetermined total amount of codes for the entire image is B0, the problem of determining the optimal coding parameter assignment function ψ is formulated as the following constraint minimization problem [A]. Be transformed into

【0036】B(ψ)=B0 …(12) [A]:「(12)式のもとで、E(ψ)を最小化する
ような関数ψを見つけよ」 …
(13) ところで、上記の最適化問題[A]の解となる関数ψ
は、ラグランジェの未定乗数法などで良く知られている
ように、次のような最小化問題[B]、 F(ψ)=E(ψ)+λ・(B(ψ)−B0 )2 …(14) [B]:「ある適正な正数λを用いて(14)式に示す
汎関数F( ψ) を最小化する関数ψをみつけよ」 …
(15) の解として得られる。とすると、ここで問題としている
1枚の画像に対する最適な符号化ストラテジーを決定す
ることは、その画像に対する問題[B]の解ψを求める
ことになる。
B (ψ) = B0 (12) [A]: “Find a function ψ that minimizes E (ψ) under the equation (12)”.
(13) By the way, a function ψ that is a solution to the above-mentioned optimization problem [A]
As is well known in Lagrange's undetermined multiplier method and the like, the following minimization problem [B], F (ψ) = E (ψ) + λ · (B (ψ) −B0) 2 . (14) [B]: “Use a proper positive number λ to find a function ψ that minimizes the functional F (ψ) shown in equation (14)”.
It is obtained as the solution of (15). Then, determining the optimal coding strategy for one image in question here is to find the solution 問題 to the problem [B] for that image.

【0037】とはいうものの、この最適化問題の最適解
を得ることは、単純に言って、KN通りの関数ψの中か
ら最適な関数ψを捜すことであり、仮にk=2,N=6
4としても、関数ψの候補の総数は、 KN =1.84×1019 …(16) となり、現実には最適解の発見は不可能であることが分
かる。
Nevertheless, obtaining an optimal solution to this optimization problem simply means searching for an optimal function ψ from among K N kinds of functions ψ, and if k = 2, N = 6
Even when the number is 4, the total number of candidates for the function と な り is K N = 1.84 × 10 19 (16), which indicates that it is practically impossible to find an optimal solution.

【0038】ところが、本発明の手法を用いると、必ず
しも最適ではないにせよ、準最適な関数ψを、極めて高
速に(実時間で)求めることができる。
However, if the method of the present invention is used, a sub-optimal function ψ can be obtained at very high speed (in real time), though not necessarily optimally.

【0039】以下、本発明の、問題[B]に対する最適
解の符号割り当て関数ψ(正確には準最適解である)を
高速に求める制御手順について述べる。
The control procedure of the present invention for quickly finding the code assignment function ψ (accurately, a quasi-optimal solution) of the optimal solution to the problem [B] will be described below.

【0040】まず、N個の全てのブロックに対して、符
号化パラメータに一定の値Qk を選択したとすると、符
号割り当て関数として、 全てのiに対して、ψk (i) =k …(17) として定義される定値関数ψk を用いたことになる。
First, assuming that a constant value Q k is selected as a coding parameter for all N blocks, as a code assignment function, 全 てk (i) = k... For all i. (17) This means that the constant value function ψ k defined as follows is used.

【0041】そして、入力された符号化画像に対して、
K通りの定値関数、 ψ1 ,…,ψK …(18) を適用すると、画像全体の符号量としてK通りの値、 B(ψ1 ),…,B(ψK ) …(19) が得られる。
Then, for the input coded image,
Applying K different value functions, ψ 1 ,..., Ψ K (18), K values, B (ψ 1 ),..., B (ψ K ). can get.

【0042】この中から設定符号量B0 に最も近くなる
ような符号量を実現する定値関数を選ぶ。これが関数ψ
k であったとすると、N個の全てのブロックに対して、
同一の符号化パラメータQk を選んだ時、設定符号量B
0 に最も近い符号量B(ψk)が生成されることを意味
する。
From these, a constant value function that realizes the code amount closest to the set code amount B0 is selected. This is the function ψ
If k , then for all N blocks,
When the same coding parameter Q k is selected, the set code amount B
This means that the code amount B (ψ k ) closest to 0 is generated.

【0043】ここで、最適な関数ψを求める制御手順の
初期値ψ(0) として、この定値関数ψk を採用する。
Here, this constant value function ψ k is adopted as the initial value ψ (0) of the control procedure for finding the optimum function ψ.

【0044】次に、N個のブロックの1つ1つについ
て、遂次的に、評価関数F(ψ)を最も小さくなるよう
な、符号化パラメータを選びだすことで関数ψを更新し
てゆく。
Next, with respect to each of the N blocks, the function ψ is updated by successively selecting an encoding parameter that minimizes the evaluation function F (ψ). .

【0045】すなわち、この遂次的な更新手順のtステ
ップ目において、この時の符号割り当て関数がψ(t-1)
であって、ブロックpが選択されたとすると、ブロック
pに対する新たな符号化パラメータの番号k* として全
てのkに対して、 F(ψ,p,k* )≦F(ψ,p,k) …(20) を満たすものに定める。ただし、 B(ψ,p,k)=B(ψ)−b(p,ψ(p) )+b(p,k ) …(21) E(ψ,p,k)=E(ψ)−e(p,ψ(p) )+e(p,k ) …(22) F(ψ,p,k)=E(ψ,p,k) +λ・(B(ψ,p,k)−B0 )2 …(23) であって、B(ψ,p,k)、E(ψ,p,k)、F(ψ,p,k)
は、第p番目のブロックのみ符号化パラメータQk を適
用し、その以外のブロックに対しては符号割り当て関数
ψを用いた時の総符号量、量子化誤差の総和、評価関数
を各々表している。
That is, at the t-th step in this successive updating procedure, the code assignment function at this time is ψ (t−1)
If a block p is selected, then as a new coding parameter number k * for the block p, for all k, F (ψ, p, k * ) ≦ F (ψ, p, k) ... Defined as satisfying (20). Where B (ψ, p, k) = B (ψ) −b (p, ψ (p)) + b (p, k) (21) E (ψ, p, k) = E (ψ) −e (P, ψ (p)) + e (p, k) (22) F (ψ, p, k) = E (ψ, p, k) + λ · (B (ψ, p, k) −B0) 2 ... (23) where B (ψ, p, k), E (ψ, p, k), F (ψ, p, k)
Represents the total code amount, the total quantization error, and the evaluation function when the coding parameter Q k is applied only to the p-th block and the other blocks use the code assignment function ψ. I have.

【0046】こうして選ばれた符号化パラメータの番号
* を用いて、新たな符号割り当て関数ψ(t) を、
Using the number k * of the encoding parameters thus selected, a new code assignment function ψ (t) is

【数7】 と定義する。(Equation 7) Is defined.

【0047】すなわち、ある時刻tにおける新たなψ
(t) を作成するにあたり、あるブロックpに着目し、古
いψ(t-1) の評価値F(ψ(t-1) )よりも小さくなるよ
うに、ブロックpに関する新たな符号割り当てを捜す、
ということである。
That is, a new ψ at a certain time t
(t) In preparing is focused on the block p, to be smaller than the evaluation value F for the old ψ (t-1) (ψ (t-1)), look for new code assignment for block p ,
That's what it means.

【0048】この更新法は、平面上に定義されたポテン
シャル面上を、平面上のkN 個の格子点(個々の格子点
が、相異なる関数ψに対応する)を辿りながら、谷間に
向かって下降してゆく「最急降下法」である、と比喩的
に解釈することもできる。
In this updating method, a potential plane defined on a plane is traversed by k N lattice points (each lattice point corresponds to a different function ψ) on the plane while moving toward a valley. It can be interpreted figuratively as the "steepest descent method" that descends.

【0049】最急降下法は一般的に、任意のポテンシャ
ル関数に対する最適解を保証するものではない。とはい
え、以上の記述から明らかなように、この制御手順に従
う限り、評価関数Fを単調に減少させる関数ψの列が生
成される。先に、この制御手順が最小化問題[B]の準
最適解を与える、と述べたのは、このような理由によ
る。
The steepest descent method generally does not guarantee an optimal solution for any potential function. However, as is clear from the above description, as long as this control procedure is followed, a sequence of functions さ せ る that monotonously reduces the evaluation function F is generated. It is for this reason that we have stated earlier that this control procedure gives a suboptimal solution of the minimization problem [B].

【0050】<誤差評価関数E( ψ) の拡張>今までの
解説では、符号化画像の画質を評価するのに、(10)
式で表される画像全体の量子化誤差の総和(各ブロック
ごとの自乗誤差の総和)を用いてきた。
<Extension of Error Evaluation Function E (ψ)> In the explanations so far, (10)
The sum of the quantization errors (the sum of the square errors of each block) of the entire image represented by the equation has been used.

【0051】ところが、符号化画像の画質の評価は、必
ずしもこのような自乗誤差の総和だけでは不十分である
ことが知られている。例えば、境界の部分やエッジ部分
などでは、自乗誤差は少なくても人間の目には大きな劣
化と感じられ、また、細かいテクスチャー部分の量子化
誤差は、さほど気にならない。
However, it is known that the evaluation of the image quality of an encoded image is not always sufficient only by the sum of the square errors. For example, in a boundary portion or an edge portion, even if the square error is small, it is perceived as a great deterioration by human eyes, and a quantization error in a fine texture portion is not so noticeable.

【0052】したがって、各ブロックの誤差、 e(i,ψ(i) ) …(25) をそのブロックの周辺のブロックの分布をも考慮した新
たな誤差を定義することも考えられる。
Therefore, it is conceivable to define a new error for each block error, e (i, ψ (i)) (25), taking into account the distribution of blocks around the block.

【0053】この場合にも、新たな誤差評価関数E
(ψ)は、各ブロックの誤差、 e(1,ψ(1) ),…,e(N,ψ(N) ) …(26) のN個の和である、という事情に変わりはなく、したが
ってこの場合にも、本発明の符号量制御手順をいささか
の変更することもなく適用できることは、(20)式か
ら(24)式を見れば明らかである。
Also in this case, a new error evaluation function E
(Ψ) is the error of each block, e (1, ψ (1)),..., E (N,) (N))... (26) Therefore, in this case, it is clear from the expressions (20) to (24) that the code amount control procedure of the present invention can be applied without any change.

【0054】<本発明の汎用性>先に、画像符号化方式
を、 直交変換(DCTなど)+スカラー量子化+可変長符号
(エントロピー符号)
…(27) を例にして固定長符号制御の問題について述べたが、本
発明の方式では、「アクテイビテイ」のような直交変換
に固有な量を用いるわけではないので、運用できる符号
方式の範囲を著しく拡張することができる。
<General versatility of the present invention> First, the image coding method is defined as orthogonal transform (DCT, etc.) + Scalar quantization + variable length code (entropy code)
The problem of fixed-length code control has been described by taking (27) as an example. However, in the method of the present invention, since an amount unique to orthogonal transform such as “activity” is not used, the range of code systems that can be used is Can be significantly expanded.

【0055】例えば、LOT(Lapped Orthogonal Tran
form:変換の対象となる画素ブロックがお互いにオーバ
ーラップする直交変換)を例に取れば、LOTの場合、
生成される変換係数は(元の画素ブロックとはサイズは
異なるものの)完全に分離されたブロック集合となり、
さらに、この変換係数ブロック全体の集合の持つ情報量
は、元の画像全体の情報量に一致する。つまり、LOT
を用いた符号化では、この独立したLOT変換係数ブロ
ック1つ1つを対象とするスカラー量子化と可変長符号
が行われる。したがって、上記の制御手順における「ブ
ロック」は「LOT変換係数ブロック」に置き換えられ
る。
For example, LOT (Lapped Orthogonal Tran)
form: orthogonal transformation in which pixel blocks to be transformed overlap each other). In the case of LOT,
The resulting transform coefficients are a completely separated set of blocks (although of a different size than the original pixel block)
Further, the information amount of the set of the entire transform coefficient block matches the information amount of the entire original image. That is, LOT
, Scalar quantization and variable-length coding are performed on each of the independent LOT transform coefficient blocks. Therefore, “block” in the above control procedure is replaced with “LOT coefficient block”.

【0056】さらに例を挙げれば、画像をブロック単位
でスカラー量子化したのち、ベクトル量子化して、セン
トロイドの番号を可変長符号に変換するような符号化に
おいても適用可能である。
As another example, the present invention is also applicable to encoding in which an image is scalar-quantized in block units, then vector-quantized, and the centroid number is converted into a variable-length code.

【0057】より一般化すれば、画像全体の情報を、一
定の大きさのブロックの集合に変換したのち、それらの
ブロック1つごとに可変長符号1つを生成するような符
号化(ブロック符号化)で、ブロック毎の符号量制御に
スカラーの制御変数を用いる場合には、この制御手順は
そのまま適用できることになる。
More generally, coding (block code) for converting the information of the entire image into a set of blocks of a fixed size and then generating one variable-length code for each of the blocks. In the case where a scalar control variable is used for code amount control for each block, this control procedure can be applied as it is.

【0058】《本発明のハードウエアの構成例》 次に、本発明の制御手順を高速実行するハードウエアの
構成を述べる。前述のように、この制御手順は、ある画
像全体を一定の大きさのブロックの集合に変換した後、
それらのブロック1つ毎に可変長符号1つを生成するよ
うな符号化方式一般に対して、汎用的に適用できる。そ
こでこの例では、ブロックの構成要素は、DCTなどの
直交変換係数とは限らず、単なる数値に過ぎないとして
おく。
<< Example of Hardware Configuration of the Present Invention >> Next, the configuration of hardware for executing the control procedure of the present invention at high speed will be described. As described above, this control procedure converts an entire image into a set of blocks of a certain size,
The present invention can be generally applied to a general encoding method in which one variable-length code is generated for each of those blocks. Therefore, in this example, it is assumed that the components of the block are not limited to orthogonal transform coefficients such as DCT, but are merely numerical values.

【0059】そして、1ブロックを対象とする前置符号
化器をK種類用意し、 {C1 ,…,CK } …(28) とする。この符号化器は、1ブロックごとに1つの可変
長符号を発生するもので、一般に、符号化器の種類が異
なれば、異なる符号量と量子化誤差を発生する。したが
って、例えば、前述したように、スカラー量子化器とエ
ントロビー符号化器との組み合わせや、セントロイドの
番号を可変長符号として発生するようなベクトル量子化
器と考えてもよい。
Then, K kinds of precoders for one block are prepared, and {C 1 ,..., C K } (28). This encoder generates one variable-length code for each block. Generally, different types of encoders generate different code amounts and quantization errors. Therefore, for example, as described above, a combination of a scalar quantizer and an entropy encoder or a vector quantizer that generates a centroid number as a variable-length code may be considered.

【0060】また、前置符号化器はローカルデコーダを
含み、各ブロックごとの量子化誤差も計算する。
The precoder includes a local decoder, and also calculates a quantization error for each block.

【0061】図1はこのような条件で、かつK=4とし
たときの符号化回路の一実施例を示すブロック図であ
る。
FIG. 1 is a block diagram showing an embodiment of an encoding circuit under such conditions and when K = 4.

【0062】この図に示す符号化回路は、4つの前置符
号化器1と、4つの量子化誤差・符号量マップ回路2
と、符号初期値選択回路3と、量子化誤差総和レジスタ
回路4と、符号量総和レジスタ回路5と、最適符号化器
番号マップ回路6と、ブロック番号発生回路7と、最適
符号選択回路8と、遅延回路9と、切替スイッチ10
と、4つの後置符号化器11とを備えており、予め設定
された符号量B0 のもとで、全体の量子化誤差の総和が
最も小さくなるように、各ブロックに対する符号化パラ
メータQk を決定して各ブロックを符号化する。
The encoding circuit shown in this figure has four precoders 1 and four quantization error / code amount map circuits 2
A code initial value selection circuit 3, a quantization error sum register circuit 4, a code amount sum register circuit 5, an optimum encoder number map circuit 6, a block number generation circuit 7, an optimum code selection circuit 8, , Delay circuit 9 and changeover switch 10
And four post-coders 11. The coding parameters Q k for each block are minimized so that the total sum of the quantization errors is minimized under a predetermined code amount B0. Is determined and each block is encoded.

【0063】各前置符号化器1は、各々ローカルデコー
ダを含むとともに、互いに異なる符号化パラメータQk
(但し、k=1,…,4)が各々設定されており、入力
画像を構成するN個のブロックが供給される毎に、設定
されている符号化パラメータQk に基づいてこのブロッ
クをブロック番号i(但し、iは1,…,Nのいずれ
か)のブロックとして各々符号化して4つの出力符号の
符号量b(i,k) と、4つの出力符号の量子化誤差e(i,
k) とを生成し、これらを各量子化誤差・符号量マップ
回路2に各々、供給する。そして、N個のブロックに対
する符号化処理が終了したとき、各前置符号化器1毎に
前記入力画像を構成するN個のブロックに対する全体の
符号量を示す4つの符号量総和Bk と、全体の量子化誤
差を示す4つの量子化誤差総和Ek とを演算してこれを
符号初期値選択回路3に供給する。
Each precoder 1 includes a local decoder, and has different coding parameters Q k from each other.
(Where k = 1,..., 4) are set, and each time N blocks constituting the input image are supplied, this block is blocked based on the set encoding parameter Q k. Each block is coded as a block of number i (where i is one of 1,..., N), and the code amount b (i, k) of the four output codes and the quantization error e (i,
k) are generated and supplied to the respective quantization error / code amount map circuits 2. Then, when the encoding process for the N blocks is completed, four code amount sums B k indicating the entire code amount for the N blocks constituting the input image for each precoder 1; The sum of four quantization errors E k indicating the entire quantization error is calculated and supplied to the code initial value selection circuit 3.

【0064】各量子化誤差・符号量マップ回路2は、各
々前記ブロック数Nに対応するN個のセルを持つRAM
によって構成されており、前記各前置符号化器1から4
つの符号量b(i,k) と、4つの出力符号の量子化誤差e
(i,k) とが出力される毎に、これを取り込んで対応する
ブロック番号iの各セルに各々、格納し、前記最適符号
選択回路8から読出し指令が出力されたとき、この読出
し指令によって指定されたブロック番号p(但し、pは
1,…,Nのいずれか)に対応する各セルに格納されて
いる4つの符号量b(p,k) と、4つの出力符号の量子化
誤差e(p,k) とを前記最適符号選択回路8に供給する。
Each quantization error / code amount map circuit 2 is a RAM having N cells corresponding to the number N of blocks.
And each of the precoders 1 to 4
Code amount b (i, k) and quantization error e of four output codes
Each time (i, k) is output, it is fetched and stored in each cell of the corresponding block number i, and when a read command is output from the optimum code selection circuit 8, the read command Four code amounts b (p, k) stored in each cell corresponding to the designated block number p (where p is one of 1,..., N) and the quantization error of the four output codes e (p, k) is supplied to the optimum code selecting circuit 8.

【0065】また、符号初期値選択回路3は,前記各前
置符号化器1から4つの符号量総和Bk と、4つの量子
化誤差総和Ek とが供給されたとき、これを取り込むと
ともに、前記入力画像に対して設定されている設定符号
量B0 と、前記各符号量総和Bk とを各々比較して前記
各符号量総和Bk のうち、設定符号量B0 に最も近い符
号量総和を示す符号化器1の番号kを選択してこれを最
適符号化器番号マップ回路6に供給するとともに、この
符号化器番号kに対応する1つの符号量総和Bk を符号
量総和レジスタ回路5に供給し、前記符号化器番号kに
対応する1つの量子化誤差総和Ek を量子化誤差総和レ
ジスタ回路4に供給する。
The code initial value selection circuit 3 receives the four code amount sums B k and the four quantization error sums E k from the respective pre-encoders 1 when they are supplied, and also takes them in. , and the set code amount B0 which is set for the input image, of the respective code amount sum B k by comparing each of said respective code amount sum B k, the closest code amount sum to the set code amount B0 Is supplied to the optimal encoder number map circuit 6, and one code amount total Bk corresponding to the encoder number k is stored in the code amount total register circuit. 5 and supplies one quantization error sum E k corresponding to the encoder number k to the quantization error sum register circuit 4.

【0066】符号量総和レジスタ回路5は、前記符号初
期値選択回路3から1つの符号量総和Bk が出力された
とき、これを取り込んで記憶するとともに、前記最適符
号選択回路8から読出し指令が出力されたとき、記憶し
ている符号量総和Bk を前記最適符号選択回路8に供給
する。そして、この最適符号選択回路8から書込み指令
が出力されたとき、この書込み指令とともに出力される
符号量総和Bk を取り込んでそれまでの符号量総和Bk
に代えてこれを記憶し、この後最適符号選択回路8から
読出し指令が出力されたとき、記憶している符号量総和
k を前記最適符号選択回路8に供給する。
When one code amount sum Bk is output from the code initial value selection circuit 3, the code amount sum register circuit 5 fetches and stores the code amount sum Bk. When output, the stored code amount sum B k is supplied to the optimum code selection circuit 8. When a write command is output from the optimum code selection circuit 8, the code amount total B k output together with the write command is fetched and the code amount total B k up to that time is taken.
Storing it in place, and supplies the optimum code selection circuit 8 after this when the read command is outputted, the code amount sum B k stored in said optimum code selection circuit 8.

【0067】また、量子化誤差総和レジスタ回路4は、
前記符号初期値選択回路3から1つの量子化誤差総和E
k が出力されたとき、これを取り込んで記憶するととも
に、前記最適符号選択回路8から読出し指令が出力され
たとき、記憶している量子化誤差総和Ek を前記最適符
号選択回路8に供給する。そして、この最適符号選択回
路8から書込み指令が出力されたとき、この書込み指令
とともに出力される量子化誤差総和Ek を取り込んでそ
れまでの量子化誤差総和Ek に代えてこれを記憶し、こ
の後最適符号選択回路8から読出し指令が出力されたと
き、記憶している量子化誤差総和Ek を前記最適符号選
択回路8に供給する。
The quantization error sum register circuit 4
One quantization error sum E from the code initial value selection circuit 3
When k is output, it is fetched and stored, and when a read command is output from the optimum code selection circuit 8, the stored quantization error sum E k is supplied to the optimum code selection circuit 8. . When a write command is output from the optimum code selection circuit 8, the quantization error sum E k output together with the write command is fetched and stored in place of the previous quantization error sum E k , when the read command is outputted from the optimum code selection circuit 8 Thereafter, supplies the quantization error summation E k stored in said optimum code selection circuit 8.

【0068】また、最適符号化器番号マップ回路6は、
前記入力画像を構成するブロックの数と対応するN個の
セルを有するRAMによって構成されており、前記符号
初期値選択回路3から設定符号量B0 に最も近い符号量
総和を示す1つの符号化器番号kが出力されたとき、こ
れを取り込んで全てのセルに書込む。そして、前記最適
符号選択回路8から読出し指令が出力されたとき、この
読出し指令によって指定されたブロック番号pに対応す
るセルに格納されている符号化器番号kを読出し、これ
を初期符号化器番号OPT(p) として、前記最適符号選
択回路8に供給し、またこの最適符号選択回路8から書
込み指令が出力されたとき、この書込み指令とともに出
力される最適符号化器番号k* を最適符号化器番号OP
T(p) として指定されたブロック番号pに対応するセル
に記憶する。そして、全てのセルに対する最適符号化器
番号OPT(p) の書込みが終了したとき、先頭のセルか
ら最適符号化器番号OPT(i) を順次、読み出し、これ
を切替信号として切替スイッチ10に供給し、最後のセ
ルに格納されている最適符号化器番号OPT(N)を読
出してこれを切替信号として切替スイッチ10に供給し
た後、動作を終了する。
Also, the optimal encoder number map circuit 6
One encoder which is constituted by a RAM having N cells corresponding to the number of blocks constituting the input image and which indicates the code amount sum closest to the set code amount B0 from the code initial value selection circuit 3 When the number k is output, it is fetched and written into all cells. When a read command is output from the optimum code selection circuit 8, the encoder number k stored in the cell corresponding to the block number p specified by the read command is read, and this is used as the initial encoder. The number OPT (p) is supplied to the optimum code selection circuit 8, and when a write command is output from the optimum code selection circuit 8, the optimum coder number k * output together with the write command is optimized. Chemistry number OP
The data is stored in the cell corresponding to the block number p specified as T (p). When the writing of the optimal encoder numbers OPT (p) to all the cells is completed, the optimal encoder numbers OPT (i) are sequentially read from the first cell and supplied to the changeover switch 10 as a switching signal. Then, after reading out the optimal encoder number OPT (N) stored in the last cell and supplying it to the changeover switch 10 as a changeover signal, the operation is terminated.

【0069】また、ブロック番号発生回路7は、前記符
号量総和レジスタ回路5に対する最初の符号量総和Bk
の格納処理および前記量子化誤差総和レジスタ回路4に
対する最初の量子化誤差総和Ek の格納処理、前記最適
符号化器番号マップ回路6に対する符号化器番号kの格
納処理が終了した後、動作を開始してN個のブロック番
号pをランダムに発生し、これを最適符号選択回路8に
供給する。そして、全てのブロック番号pの発生を終了
したとき、動作を停止する。
Further, the block number generation circuit 7 supplies the first code amount sum B k to the code amount sum register circuit 5.
After completion of the storage processing of the above, the storage processing of the first quantization error sum E k in the quantization error sum register circuit 4, and the storage processing of the encoder number k in the optimal encoder number map circuit 6, the operation is terminated. At the start, N block numbers p are randomly generated and supplied to the optimum code selection circuit 8. Then, when the generation of all the block numbers p is completed, the operation is stopped.

【0070】最適符号選択回路8は、前記ブロック番号
発生回路7からブロック番号pが出力される毎に、前記
設定符号量B0 および前記符号量総和レジスタ回路5に
格納されている符号量総和Bk 、前記量子化誤差総和レ
ジスタ回路4に格納されている量子化誤差総和Ek を取
り込むとともに、前記ブロック番号pに基づいて前記各
量子化誤差・符号量マップ回路2をアクセスして前記ブ
ロック番号pに対応する各セルに格納されている4つの
符号量b(p,k) と、4つの量子化誤差e(p,k)とを取り
込み、さらに前記最適符号化器番号マップ回路6をアク
セスして前記ブロック番号pに対応するセルに格納され
ている初期符号化器番号OPT(p) を取り込んだ後、こ
れら設定符号量B0 、符号量総和Bk 、量子化誤差総和
k 、各符号量b(p,k) 、各量子化誤差e(p,k) 、初期
符号化器番号OPT(p) に基づいて次式に示す演算を行
って、全ての符号化器番号kに対して次式を満たす最適
符号化器番号k* を求める。
Each time the block number p is output from the block number generation circuit 7, the optimum code selection circuit 8 outputs the set code amount B0 and the code amount sum B k stored in the code amount sum register circuit 5. , fetches the quantization error summation E k stored in the quantization error summation register circuit 4, the accesses to the respective quantization error and code amount map circuit 2 on the basis of the block number p block number p , The four code amounts b (p, k) and the four quantization errors e (p, k) stored in each cell corresponding to wherein after capturing the initial encoder number OPT (p) stored in the cell corresponding to the block number p, these settings code amount B0, code amount sum B k, the quantization error summation E k, the code amount Te b (p, k), each The following equation is performed on the basis of the encoding error e (p, k) and the initial encoder number OPT (p), and the optimum encoder number that satisfies the following equation is obtained for all the encoder numbers k. Find k * .

【0071】F(p,k * )≦F(p,k ) …(2
9) ただし、 F(p,k )=E(p,k) +λ・(B(p,k) −B0 )2 …(30) E(p,k )=Ek −e(p,OPT(p))+e(p,k) …(31) B(p,k )=Bk −b(p,OPT(p))+b(p,k) …(32) この後、最適符号選択回路8は、最適符号化器番号k*
に基づいて次式に示す演算を行って新たな量子化誤差総
和Ek * と、符号量総和Bk * とを求める。
F (p, k * ) ≦ F (p, k) (2)
9) where F (p, k) = E (p, k) + λ · (B (p, k) −B0) 2 (30) E (p, k) = E k −e (p, OPT ( p)) + e (p, k) ... (31) B (p, k) = B k -b (p, OPT (p)) + b (p, k) ... (32) then, the optimum code selection circuit 8 Is the optimal encoder number k *
, A new sum of quantization errors E k * and a sum of code amounts B k * are obtained by performing the operation shown in the following equation.

【0072】 Ek * =Ek −e(p,OPT(p))+e(p,k *) …(33) Bk * =Bk −b(p,OPT(p))+b(p,k *) …(34) そして、この(33)式によって得られる量子化誤差総
和Ek * を新たな量子化誤差総和Ek として前記量子化
誤差総和レジスタ回路4に格納するとともに、前記(3
4)式によって得られる符号量総和Bk * を新たな符号
量総和Bk として前記符号量総和レジスタ回路5に格納
する。
[0072] E k * = E k -e ( p, OPT (p)) + e (p, k *) ... (33) B k * = B k -b (p, OPT (p)) + b (p, k * ) (34) Then, the quantization error sum E k * obtained by the equation (33) is stored in the quantization error sum register circuit 4 as a new quantization error sum E k , and the (3)
The code amount sum B k * obtained by equation (4) is stored in the code amount sum register circuit 5 as a new code amount sum B k .

【0073】次いで、前記(29)式によって得られた
最適符号化器番号k* を最適符号化器番号OPT(p) と
して前記最適符号化器番号マップ回路6に供給し、前記
ブロック番号pに対応するセルに格納されている初期符
号化器番号OPT(p) に代えてこの最適符号化器番号O
PT(p) を記憶させる。
Next, the optimal encoder number k * obtained by the above equation (29) is supplied to the optimal encoder number map circuit 6 as the optimal encoder number OPT (p), and Instead of the initial encoder number OPT (p) stored in the corresponding cell, this optimal encoder number O
PT (p) is stored.

【0074】また、遅延回路9は前記入力画像を構成す
るN個のブロックが供給される毎に、これを取り込みな
がら順次、遅延してファーストイン・ファーストアウト
形式で出力するFIFOメモリによって構成されてお
り、前記ブロックが供給される毎に、これを取り込んで
順次、遅延しながら、前記最適符号化器番号マップ回路
6にある全てのセルに対して最適符号化器番号OPT
(p) が格納されて、この最適符号化器番号マップ回路6
から最初の切替信号が出力されたとき、最初のブロック
番号1に対応するブロックを出力してこれを前記切替ス
イッチ10に供給する。以下、前記最適符号化器番号マ
ップ回路6から切替信号が出力される毎に、順次、次の
ブロックを出力してこれを前記切替スイッチ10に供給
する。
Further, the delay circuit 9 is constituted by a FIFO memory which, each time the N blocks constituting the input image are supplied, successively delays them while taking them in and outputs them in a first-in first-out format. Each time the block is supplied, the block is fetched and sequentially delayed, and the optimum coder number OPT is assigned to all cells in the optimum coder number map circuit 6.
(p) is stored, and this optimal encoder number map circuit 6 is stored.
When the first switching signal is output from the first block, the block corresponding to the first block number 1 is output and supplied to the changeover switch 10. Thereafter, each time a switching signal is output from the optimal encoder number map circuit 6, the next block is sequentially output and supplied to the changeover switch 10.

【0075】切替スイッチ10は、前記最適符号化器番
号マップ回路6から切替信号が出力される毎に、この切
替信号によって指定された後置符号化器11を選択する
とともに、前記遅延回路9から出力されるブロックを受
けて、これを選択した後置符号化器11に供給する。
Each time a switch signal is output from the optimum encoder number map circuit 6, the switch 10 selects the post-coder 11 specified by the switch signal, It receives the output block and supplies it to the selected post-coder 11.

【0076】各後置符号化器11には、各前置符号化器
1と各々対応する符号化パラメータQk が設定されてお
り、前記切替スイッチ10から入力画像を構成するブロ
ックが供給される毎に、設定されている符号化パラメー
タQk に基づいてこのブロックを符号化してこれを出力
符号として出力する。
Each post-encoder 11 is set with an encoding parameter Q k corresponding to each of the pre-encoders 1, and blocks constituting an input image are supplied from the changeover switch 10. Each time, this block is encoded based on the set encoding parameter Qk , and this is output as an output code.

【0077】次に、図1を参照しながら、この符号化回
路の符号化動作を説明する。
Next, the encoding operation of the encoding circuit will be described with reference to FIG.

【0078】まず、入力画像を構成するN個のブロック
の1つが入力される毎に、各前置符号化器1によって予
め設定されている符号化パラメータQk に基づいて前記
ブロックがブロック番号iのブロックとして符号化され
て4つの出力符号の符号量b(i,k) と、4つの出力符号
の量子化誤差e(i,k) とが生成され、これらが各量子化
誤差・符号量マップ回路2に供給されて対応するブロッ
ク番号iの各セルに格納される。
First, every time one of the N blocks constituting the input image is input, the block is assigned a block number i based on a coding parameter Q k preset by each precoder 1. To generate a code amount b (i, k) of four output codes and a quantization error e (i, k) of the four output codes. The data is supplied to the map circuit 2 and stored in each cell of the corresponding block number i.

【0079】そして、各前置符号化器1によってN個の
ブロックに対する符号化処理が終了したとき、前記入力
画像を構成するN個のブロックに対する全体の符号量を
示す4つの符号量総和Bk と、全体の量子化誤差を示す
4つの量子化誤差総和Ek とが演算されてこれが符号初
期値選択回路3に供給される。
When the encoding process for the N blocks is completed by each pre-encoder 1, four code amount sums B k indicating the total code amount for the N blocks constituting the input image. And the four quantization error sums E k indicating the entire quantization error are calculated and supplied to the code initial value selection circuit 3.

【0080】これにより、符号初期値選択回路3によっ
て前記入力画像に対して設定されている設定符号量B0
と、前記各前置符号化器1から出力される4つの符号量
総和Bk とが各々比較されて前記符号量総和Bk のう
ち、設定符号量B0 に最も近い符号量総和を示す1つの
符号化器番号kが選択され、これが最適符号化器番号マ
ップ回路6に供給されて全てのブロックに対応する全て
のセルに記憶されるとともに、この符号化器番号kに対
応する1つの符号量総和Bk が符号量総和レジスタ回路
5に供給されて記憶され、さらに前記符号化器番号kに
対応する1つの量子化誤差総和Ek が量子化誤差総和レ
ジスタ回路4に供給されて記憶される。
Thus, the set code amount B0 set for the input image by the code initial value selection circuit 3
When, among the code amount sum B k the four code amount sum B k output from the pre-encoder 1 is compared each one indicating the closest code amount sum to the set code amount B0 An encoder number k is selected, supplied to the optimal encoder number map circuit 6, and stored in all cells corresponding to all blocks, and one code amount corresponding to the encoder number k is selected. The sum B k is supplied to and stored in the code amount sum register circuit 5, and one quantization error sum E k corresponding to the encoder number k is supplied to the quantization error sum register circuit 4 and stored. .

【0081】この後、ブロック番号発生回路7が動作を
開始して、このブロック番号発生回路7によってN個の
ブロック番号pの1つがランダムに生成されてこれが最
適符号選択回路8に供給される。
Thereafter, the block number generation circuit 7 starts operating, and one of the N block numbers p is randomly generated by the block number generation circuit 7 and supplied to the optimum code selection circuit 8.

【0082】そして、前記ブロック番号発生回路7から
最初のブロック番号pが出力されたとき、最適符号選択
回路8によって前記設定符号量B0 および前記符号量総
和レジスタ回路5に格納されている1つの符号量総和B
k 、前記量子化誤差総和レジスタ回路4に格納されてい
る1つの量子化誤差総和Ek が取り込まれるとともに、
前記ブロック番号pに基づいて前記各量子化誤差・符号
量マップ回路2がアクセスされて前記ブロック番号pに
対応する4つのセルに格納されている4つの符号量b
(p,k) と、4つの量子化誤差e(p,k) とが取り込まれ、
さらに前記最適符号化器番号マップ回路6がアクセスさ
れて前記ブロック番号pに対応する1つのセルに格納さ
れている初期符号化器番号OPT(p) が取り込まれた
後、これら設定符号量B0 、符号量総和Bk 、量子化誤
差総和Ek 、各符号量b(p,k) 、各量子化誤差e(p,k)
、初期符号化器番号OPT(p) に基づいて前記(2
9)式〜(32)式が演算されて、全ての符号化器番号
kに対し、前記(29)式を満たす最適符号化器番号k
* が求められる。
When the first block number p is output from the block number generation circuit 7, one code stored in the set code amount B 0 and the code amount sum register circuit 5 by the optimum code selection circuit 8. Sum B
k , one quantization error sum E k stored in the quantization error sum register circuit 4 is taken in,
Each of the quantization error / code amount map circuits 2 is accessed based on the block number p, and four code amounts b stored in four cells corresponding to the block number p.
(p, k) and four quantization errors e (p, k) are fetched,
Further, after the optimum encoder number map circuit 6 is accessed and the initial encoder number OPT (p) stored in one cell corresponding to the block number p is fetched, the set code amount B0, Code amount sum B k , quantization error sum E k , code amount b (p, k), quantization error e (p, k)
, Based on the initial encoder number OPT (p).
Equations (9) to (32) are calculated, and the optimum encoder number k that satisfies the equation (29) is calculated for all encoder numbers k.
* Is required.

【0083】この後、最適符号選択回路8によって前記
最適符号化器番号k* に基づき前記(33)式、(3
4)式に示す演算が行われて新たな符号量総和B
k * と、新たな量子化誤差総和Ek * とが求められる。
[0083] After this, the based on the optimum coder number k * by the optimum code selection circuit 8 (33), (3
4) The calculation shown in the equation is performed to obtain a new code amount sum B.
k * and a new quantization error sum E k * are obtained.

【0084】そして、この量子化誤差総和Ek * が新た
な量子化誤差総和Ek として前記量子化誤差総和レジス
タ回路4に格納されるとともに、符号量総和Bk * が新
たな符号量総和Bk として前記符号量総和レジスタ回路
5に格納される。
Then, the quantization error sum E k * is stored in the quantization error sum register circuit 4 as a new quantization error sum E k , and the code amount sum B k * is stored in the new code amount sum B k . The code amount is stored in the code amount sum register circuit 5 as k .

【0085】次いで、前記(29)式によって得られた
最適符号化器番号k* が最適符号化器番号OPT(p) と
して前記最適符号化器番号マップ回路6に供給され、前
記ブロック番号pに対応するセルに格納されている初期
符号化器番号OPT(p) に代えてこの最適符号化器番号
OPT(p) が記憶される。
Next, the optimal encoder number k * obtained by the above equation (29) is supplied to the optimal encoder number map circuit 6 as the optimal encoder number OPT (p), and This optimal encoder number OPT (p) is stored instead of the initial encoder number OPT (p) stored in the corresponding cell.

【0086】以下、ブロック番号発生回路7によって新
たなブロック番号pが生成される毎に、上述した動作が
繰り返されて最適符号化器番号マップ回路6の対応する
セルに格納されている初期符号化器番号OPT(p) が最
適符号化器番号OPT(p) に書き換えられる。
Thereafter, each time a new block number p is generated by the block number generating circuit 7, the above-described operation is repeated and the initial encoding stored in the corresponding cell of the optimal encoder number map circuit 6 is performed. The unit number OPT (p) is rewritten to the optimal encoder number OPT (p).

【0087】そして、最適符号化器番号マップ回路6の
全てのセルに格納されている初期符号化器番号OPT
(p) が最適符号化器番号OPT(p) に書き換えられたと
き、この最適符号化器番号マップ回路6によって先頭の
セルに格納されている最適符号化器番号OPT(i) が読
み出されてこれが切替信号として切替スイッチ10に供
給されてこの切替信号に対応する後置符号化器11が選
択される。
The initial encoder numbers OPT stored in all cells of the optimal encoder number map circuit 6
When (p) is rewritten to the optimal encoder number OPT (p), the optimal encoder number OPT (i) stored in the first cell is read out by the optimal encoder number map circuit 6. This is supplied to the changeover switch 10 as a changeover signal, and the post encoder 11 corresponding to the changeover signal is selected.

【0088】また、この動作と並行して、遅延回路9に
よって前記入力画像を構成するN個のブロックが供給さ
れる毎に、これが取り込まれて順次、遅延され、前記最
適符号化器番号マップ回路6から最初の切替信号が出力
されたとき、最初のブロック番号1に対応するブロック
が出力されてこれが前記切替スイッチ10に供給され、
この切替スイッチ10によって選択されている後置符号
化器11によって符号化され、この符号化動作によって
得られた符号が出力符号として出力される。
In parallel with this operation, every time the N blocks constituting the input image are supplied by the delay circuit 9, they are taken in and sequentially delayed, and the optimum encoder number map circuit is provided. When the first switching signal is output from 6, the block corresponding to the first block number 1 is output and supplied to the changeover switch 10,
Encoding is performed by the post-encoder 11 selected by the changeover switch 10, and a code obtained by this encoding operation is output as an output code.

【0089】以下、最適符号化器番号マップ回路6から
次のセルに格納されている最適符号化器番号OPT(i)
が読み出されて、これが切替信号として切替スイッチ1
0に供給され、この切替スイッチ10によって後置符号
化器11が選択される毎に、遅延回路9から次のブロッ
クが出力されて、これが切替スイッチ10によって選択
されている後置符号化器11によって符号化されて出力
符号として出力される。
Hereinafter, the optimal encoder number OPT (i) stored in the next cell from the optimal encoder number map circuit 6
Is read out, and this is used as a changeover signal as the changeover switch 1
0, and every time the post-encoder 11 is selected by the changeover switch 10, the next block is output from the delay circuit 9, and the next block is selected by the changeover switch 10. And output as an output code.

【0090】そして、最適符号化器番号マップ回路6か
ら最後のセルに格納されている最適符号化器番号OPT
(N)が読み出されて、これが切替信号として切替スイ
ッチ10に供給され、この切替スイッチ10によって後
置符号化器11が選択されるとともに、遅延回路9から
最後のブロックが出力されて、これが切替スイッチ10
によって選択されている後置符号化器11によって符号
化されて出力符号として出力された後、この符号化回路
の符号化動作が終了する。
Then, the optimal encoder number OPT stored in the last cell from the optimal encoder number map circuit 6 is obtained.
(N) is read out and supplied to the changeover switch 10 as a changeover signal. The changeover switch 10 selects the post-encoder 11 and outputs the last block from the delay circuit 9. Selector switch 10
After the encoding is performed by the post-encoder 11 selected and output as an output code, the encoding operation of the encoding circuit ends.

【0091】[0091]

【発明の効果】本発明による符号量制御は、前述のよう
に、汎用性が高く、画像全体の情報を一定の大きさのブ
ロックの集合に変換した後、それらのブロック1つごと
に可変長符号1つを生成するような符号化方式(ブロッ
ク符号化)であれば適用することができる。
As described above, the code amount control according to the present invention is highly versatile. After converting the information of the entire image into a set of blocks of a fixed size, the variable length control is performed for each of the blocks. Any coding method (block coding) that generates one code can be applied.

【0092】また、従来の符号量制御方式とは異なり、
符号化された画像の量子化誤差を直接の制御対象として
いるため、所定符号量の範囲内での最良の画質を実現す
ることができる。
Also, unlike the conventional code amount control method,
Since the quantization error of the encoded image is directly controlled, it is possible to realize the best image quality within a predetermined code amount range.

【0093】また、ブロックの数Nが大きいほど、最適
な符号割り当てを実現する確率が大きくなるので、ハイ
ビジョンなどの大規模な画像の符号化にも適している。
このため、ハイビジョン画像を対象とするDCTとLO
Tの符号化(共に8x8の変換係数ブロックを生成する
場合)で、達成符号量の誤差を1/1000以下に押さ
えることができる。
Further, the larger the number N of blocks is, the higher the probability of realizing the optimum code assignment becomes. Therefore, the present invention is suitable for encoding a large-scale image such as a high-vision image.
For this reason, DCT and LO for HDTV images
By encoding T (both in the case of generating an 8 × 8 transform coefficient block), the error of the achieved code amount can be suppressed to 1/1000 or less.

【0094】このため、オーバーフローによる破綻を避
けるための符号切捨て処理の比重が著しく低減し、安定
した符号化画質を得ることができる。
As a result, the specific gravity of the code truncation process for avoiding a failure due to overflow is significantly reduced, and a stable encoded image quality can be obtained.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明に係る画像符号化時における符号量制御
装置の実施例構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of an embodiment of a code amount control device at the time of image encoding according to the present invention.

【符号の説明】[Explanation of symbols]

1 前置符号化器 2 量子化誤差・符号量マップ回路 3 符号初期値選択回路 4 量子化誤差総和レジスタ回路 5 符号量総和レジスタ回路 6 最適符号化器番号マップ回路 7 ブロック番号発生回路 8 最適符号選択回路 9 遅延回路 10 切替スイッチ 11 後置符号化器 DESCRIPTION OF SYMBOLS 1 Pre-encoder 2 Quantization error / code amount map circuit 3 Code initial value selection circuit 4 Quantization error sum register circuit 5 Code amount sum register circuit 6 Optimal encoder number map circuit 7 Block number generation circuit 8 Optimal code Selection circuit 9 Delay circuit 10 Changeover switch 11 Post encoder

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 符号化対象となる画像をN個のブロック
の集合に変換した後、ブロック毎に可変長符号を生成す
る非可逆符号化方式であって、 ブロック単位の可変長符号化器C(k) をK種類備え、 あるブロックiに対して可変長符号化器C(k) を適用し
た場合に発生する可変長符号の長さb(i,k) を計数する
計数手段と、 そのブロックの符号化誤差e(i,k) を計算する符号化誤
差演算手段と、 ブロックの添字集合{1,…,N}から符号化器の添字
集合{1,…,K}への対応を与える写像をψとすると
き、2N個の量、 に基づく評価関数Fを計算する評価関数演算手段と、 前記評価関数Fを最小化する写像ψを決定する写像決定
手段と、 を備えて成り、 前記評価関数演算手段は、N個の量、 を変数とし、それらの総和を計算する関数を関数Eと
し、係数λを用いて、 【数1】 として計算する手段であり、 前記写像決定手段は、 符号量の総和、 【数2】 を予め設定した符号量B0 に一致させるために、予め与
えられた関数ψについて、前記各ブロックをある定めら
れた順序で選択し、 ある時点で選択されたブロックをiとするとき、当該ブ
ロックiの関数値ψ(i)(当該ブロックiに割り当てる
べき符号化器番号)の割当をψ(i)=kとするとき、前
記評価関数Fの値をより小さくするように当該ブロック
iに対する割当の値kを変更し、さらにi以外の他のブ
ロックに対してもこの割り当て変更を逐次的に実施し、 前記写像ψのK通りの定値関数ψk(ただし、k=1,
…,K)を、全てのiに対して、 ψk(i)=k とするとき、前記K通りの定値関数ψkによる符号化器
割当てを行って得られるK通りの符号量総和B(ψ
1),…,B(ψK)と、K通りの符号化誤差総和E(ψ
1),…,E(ψk)とを計算し、 前記K通りの符号量総和の中から予め設定した符号量B
0に最も近い符号量総和B(ψk)を選択し、 選択された番号kによる定値関数ψkを写像ψの初期値
としてψを逐次的に決定する手段である、 ことを特徴とする画像符号化時における符号量制御装
置。
An irreversible coding method for converting an image to be coded into a set of N blocks, and then generating a variable length code for each block, comprising: counting means for counting the length b (i, k) of a variable-length code generated when the variable-length encoder C (k) is applied to a certain block i; A coding error calculating means for calculating a coding error e (i, k) of a block, and a correspondence between a subscript set {1,..., N} of a block to a subscript set {1,. When the map to be given is 、 2, 2N quantities, Evaluation function calculation means for calculating an evaluation function F based on: and mapping determination means for determining a mapping す る that minimizes the evaluation function F, wherein the evaluation function calculation means comprises N quantities, Is a variable, a function for calculating the sum of them is a function E, and a coefficient λ is used to obtain The mapping determination means calculates the sum of the code amounts, Is set to a predetermined code amount B0, the blocks are selected in a predetermined order with respect to a function 、 given in advance, and when a block selected at a certain time is defined as i, the block i When the allocation of the function value ψ (i) (encoder number to be allocated to the block i) is ψ (i) = k, the allocation of the evaluation function F to the block i is made smaller so that the value of the evaluation function F becomes smaller. The value k is changed, and this allocation change is sequentially performed on blocks other than i, and K kinds of fixed-value functions ψk (where k = 1,
.., K) for all i, ψk (i) = k, and K kinds of code amount sums B (ψ) obtained by performing encoder assignment by the K kinds of constant value functions ψk.
1),..., B (ψK) and K kinds of coding error sum E (ψ
1),..., E (ψk), and a predetermined code amount B from the K total code amounts.
Means for selecting a code amount sum B (ψk) closest to 0 and sequentially determining ψ as an initial value of a mapping を with a fixed-value function に よ る k according to the selected number k. Code amount control device at the time.
JP27412792A 1992-10-13 1992-10-13 Code amount control device at the time of image encoding Expired - Lifetime JP3281423B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27412792A JP3281423B2 (en) 1992-10-13 1992-10-13 Code amount control device at the time of image encoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27412792A JP3281423B2 (en) 1992-10-13 1992-10-13 Code amount control device at the time of image encoding

Publications (2)

Publication Number Publication Date
JPH06125537A JPH06125537A (en) 1994-05-06
JP3281423B2 true JP3281423B2 (en) 2002-05-13

Family

ID=17537401

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27412792A Expired - Lifetime JP3281423B2 (en) 1992-10-13 1992-10-13 Code amount control device at the time of image encoding

Country Status (1)

Country Link
JP (1) JP3281423B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7372999B2 (en) 2002-09-09 2008-05-13 Ricoh Company, Ltd. Image coder and image decoder capable of power-saving control in image compression and decompression
US7912324B2 (en) 2005-04-28 2011-03-22 Ricoh Company, Ltd. Orderly structured document code transferring method using character and non-character mask blocks

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7372999B2 (en) 2002-09-09 2008-05-13 Ricoh Company, Ltd. Image coder and image decoder capable of power-saving control in image compression and decompression
US7609897B2 (en) 2002-09-09 2009-10-27 Ricoh Company, Ltd. Image coder and image decoder capable of power-saving control in image compression and decompression
US7912324B2 (en) 2005-04-28 2011-03-22 Ricoh Company, Ltd. Orderly structured document code transferring method using character and non-character mask blocks

Also Published As

Publication number Publication date
JPH06125537A (en) 1994-05-06

Similar Documents

Publication Publication Date Title
EP0385654B1 (en) Highly efficient coding apparatus
JP2870515B2 (en) Variable length coding device
CN103765893A (en) Video encoding method with bit depth adjustment for fixed-point conversion and apparatus therefor, and video decoding method and aparatus therefor
US20080284788A1 (en) Method and apparatus for processing information
JPH0723383A (en) Method and apparatus for compressing/ expanding image for bit fixation
JPH1098726A (en) Method and device for video encoding that control bit geneation quantity by using quantization activity
JP2007267384A (en) Compression apparatus and compression method
JP4101034B2 (en) Encoding apparatus and method
JP3872849B2 (en) Video encoding device
JP5093349B2 (en) Image compression apparatus and image restoration apparatus
KR101172983B1 (en) Image data compression apparatus, decompression apparatus, compression method, decompression method, and computer-readable recording medium having program
JP3511893B2 (en) Video signal encoding method and apparatus
JP3281423B2 (en) Code amount control device at the time of image encoding
JPH09121359A (en) Picture coding and decoding methods
JPH0970041A (en) Variable bit rate coder
JP2004518199A (en) coding
JPH0541860A (en) Picture compression coder
JPH07147679A (en) Moving image compressing/coding method
JP2856974B2 (en) Image coding device
JP2521359B2 (en) Image coding device
JP2887843B2 (en) Image data restoration method and apparatus
JPH11103463A (en) Picture encoding method and storage medium
JPH05276391A (en) Method for compressing picture and device therefor
JPH0621828A (en) Vector quantizing decoder
JP2641773B2 (en) Vector quantization coding device

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090222

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100222

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110222

Year of fee payment: 9

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120222

Year of fee payment: 10

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130222

Year of fee payment: 11

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130222

Year of fee payment: 11