JPH04207266A - Encoder and encoding method for image data - Google Patents

Encoder and encoding method for image data

Info

Publication number
JPH04207266A
JPH04207266A JP2325687A JP32568790A JPH04207266A JP H04207266 A JPH04207266 A JP H04207266A JP 2325687 A JP2325687 A JP 2325687A JP 32568790 A JP32568790 A JP 32568790A JP H04207266 A JPH04207266 A JP H04207266A
Authority
JP
Japan
Prior art keywords
code amount
block
encoding
color component
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
Application number
JP2325687A
Other languages
Japanese (ja)
Inventor
Chihiro Nakagawa
千尋 中川
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.)
Olympus Corp
Original Assignee
Olympus Optical Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Optical Co Ltd filed Critical Olympus Optical Co Ltd
Priority to JP2325687A priority Critical patent/JPH04207266A/en
Publication of JPH04207266A publication Critical patent/JPH04207266A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To perform the encoding of a wide spatial frequency image so as to be kept within constant encode quantity for constant processing time with simple constitution by predicting the optimum quantization width by calculated encode quantity and quantization width, etc., based on variable length encode output when statistical processing is performed, and controlling quantization classified by every chrominance component when encode processing is performed. CONSTITUTION:A quantization width prediction circuit predicts the optimum quantization width classified by every chrominance component at an encoder circuit 80 which encodes the image pickup image signal of an electronic camera by the calculated encode quantity classified by every chrominance component and the quantization width by an encode quantity calculation circuit 14 based on the output of a variable length encoder circuit 8 and a total encode quantity target value from a control circuit 18 replying to target encode quantity setting information from a control circuit 90. The quantization and encoding classified by every chrominance component are performed based on predicted width, and the encode quantity can be controlled for the wide spatial frequency without impairing picture quality with simple constitution, and encoding processing can be performed so as to be kept within the constant encode quantity for constant processing time.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は画像データを所定の容量に高圧縮符号化するた
めの符号化装置および符号化方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an encoding device and encoding method for highly compression encoding image data to a predetermined capacity.

〔従来の技術〕[Conventional technology]

CCDに代表される固体撮像装置等により撮像された画
像信号をメモリカード、磁気ディスクあるいは磁気テー
プ等の記憶装置にディジタルデータとして記憶する場合
、そのデータ量は膨大なものとなるため、多くのフレー
ム画像を限られた記憶容量の範囲で記録しようとするに
は、得られた画像信号のデータに対し、何らかの高能率
な圧縮を行うことか必要となる。さらに、ディジタル電
子スチルカメラなどにおいては、撮影した画像を銀塩フ
ィルムの代わりに、メモリカード、磁気ディスクあるい
は磁気テープ等の記憶媒体にディジタルデータとして保
存するので、1枚のメモリカート、磁気ディスクあるい
は1巻の磁気テープ装置に記録できる画像の枚数か規定
され、この規定枚数分の画像の記録が保証されなければ
ならず、しかも、データの記録再生処理に要する時間が
短く、且つ、一定である必要かある。
When an image signal captured by a solid-state imaging device such as a CCD is stored as digital data in a storage device such as a memory card, magnetic disk, or magnetic tape, the amount of data is enormous, so many frames are required. In order to record images within a limited storage capacity, it is necessary to perform some kind of highly efficient compression on the obtained image signal data. Furthermore, in digital electronic still cameras, captured images are stored as digital data on storage media such as memory cards, magnetic disks, or magnetic tapes instead of silver halide films, so they can be stored as digital data on storage media such as memory cards, magnetic disks, or magnetic tapes. The number of images that can be recorded on one roll of magnetic tape device is specified, and the recording of this specified number of images must be guaranteed, and the time required for data recording and reproduction processing is short and constant. Is it necessary?

同様に、ディジタルVTR(ビデオテープレコーダ)、
ディジタル動画ファイル等において動画像を記録する場
合もフレーム当たりの画像のデータ量に影響されること
なく、諸定量のフレームを記録できなければならない。
Similarly, digital VTR (video tape recorder),
When recording moving images such as digital moving image files, it is necessary to be able to record various amounts of frames without being affected by the amount of image data per frame.

すなわち、静止画像であっても、動画像であっても、必
要なコマ数分を確実に記録できる必要があるとともにデ
ータの記録再生処理に要する時間、か短く、且つ、一定
である必要がある。
In other words, whether it is a still image or a moving image, it is necessary to be able to reliably record the required number of frames, and the time required for data recording and reproduction processing must be short and constant. .

高能率な画像データの圧縮方式として、直交変換符号化
と可変長符号化を組み合わせた符号化方法が広く知られ
ている。
A coding method that combines orthogonal transform coding and variable length coding is widely known as a highly efficient image data compression method.

その代表的なものとして、静止画符号化国際標準化にお
いて検討されている方式かある。
A typical example is the method being considered in the international standardization of still image coding.

この方式について次に概略を説明する。ます画像データ
を所定の大きさのブロックに分割し、分割されたブロッ
ク毎に直交変換として2次元のDCT (離散コサイン
変換)を行う。次に各周波成分に応じた線形量子化を行
い、この量子化された値に対し可変長符号化としてノ\
フマン符号化を行う。この時、直流成分に関しては近傍
プロ・ンクの直流成分との差分値を/Xフマン符号化す
る。交流成分はジグサグスキャンと呼ばれる低い周波数
成分から高い周波数成分へのスキャンを行い無効(値か
O)の成分の連続する個数とそれに続く有効な成分の値
とから2次元の/%フマン符号化する。
An outline of this method will be explained below. First, image data is divided into blocks of a predetermined size, and a two-dimensional DCT (discrete cosine transform) is performed as orthogonal transformation for each divided block. Next, linear quantization is performed according to each frequency component, and this quantized value is encoded as a variable length code.
Perform human encoding. At this time, regarding the DC component, the difference value between the DC component and the DC component of the neighboring program is encoded by /X human coding. The AC component is scanned from a low frequency component to a high frequency component called a zig-sag scan, and two-dimensional /% Human encoding is performed from the consecutive number of invalid (value or O) components and the value of the subsequent valid component. do.

この基本部分たけては、可変長符号化であるハフマン符
号化を用いているために符号量か画像毎に一定ではなく
なってしまう。
Since Huffman encoding, which is variable length encoding, is used, the amount of code for this basic part is not constant for each image.

そこで、符号量の制御の方法として次の方式か提案され
ている。ます、前記基本部分の処理を行うと同時に全画
面の発生した総符号量を求める。
Therefore, the following method has been proposed as a method for controlling the amount of code. First, at the same time as processing the basic part, the total amount of codes generated for the entire screen is calculated.

この総符号量と目的とする符号量とからDCT係数に対
する目的とする符号量に近づけるのに最適な量子化幅を
予測する。次にこの量子化幅を用いて前記基本部分の量
子化以降の処理を繰り返す。
From this total code amount and the target code amount, the optimum quantization width for approaching the target code amount for the DCT coefficient is predicted. Next, using this quantization width, the processing after quantization of the basic portion is repeated.

そして、今回発生した総符号量と、前回発生した総符号
量と、目的とする符号量とから再び目的の符号量に近づ
けるのに最適な量子化幅を予測する。
Then, from the total code amount generated this time, the total code amount generated last time, and the target code amount, the optimum quantization width to bring the target code amount closer again is predicted.

そして、この予測した量子化幅と前回の量子化幅が充分
に近づき、かつ目的の符号量よりも今回発生した総符号
量の方か少ない場合には処理を終了し、符号を出力する
。そうでない場合には新しい量子化幅を用いて処理を繰
り返す。
If the predicted quantization width and the previous quantization width are sufficiently close and the total amount of code generated this time is smaller than the target code amount, the process is terminated and the code is output. If not, the process is repeated using a new quantization width.

量子化幅は、各周波数成分に対する相対的な量子化特性
を表す基本形である量子化マトリックスを用意し、この
量子化マトリックスに対して、量子化係数を乗じて必要
な量子化幅を得る。具体的には最初に標準的な量子化係
数を用いて得た量子化幅により上述の基本部分での量子
化を行い、これを可変長符号化し、これにより得られた
総符号量の情報と、収めるべき限度となる予め設定した
目標の総符号量との比較を行い、目標総符号量以内に達
したときはその量子化幅を使用して最終的な符号化処理
を行い、目標総符号量以内に収まらなかったときは、発
生総符号量と目標総符号量とから、例えば、線形予測に
より目的総符号量に近づくに最適な量子化係数を求め、
この求めた量子化係数と量子化マトリックスとから、よ
り最適化した量子化幅を計算し、これを用いて最終的な
符号化処理を行う。このような方法で、量子化幅の変更
を行う。
The quantization width is obtained by preparing a quantization matrix, which is a basic form representing relative quantization characteristics for each frequency component, and multiplying this quantization matrix by a quantization coefficient to obtain the necessary quantization width. Specifically, first, the above-mentioned basic part is quantized using the quantization width obtained using standard quantization coefficients, and then this is variable-length encoded, and the information on the total code amount obtained by this is , a comparison is made with the preset target total code amount, which is the limit that should be accommodated, and when the target total code amount is reached, the final encoding process is performed using that quantization width, and the target total code amount is reached. If the amount does not fall within the amount, the optimal quantization coefficient that approaches the target total code amount is determined by linear prediction from the generated total code amount and the target total code amount, and
A more optimized quantization width is calculated from the obtained quantization coefficient and quantization matrix, and this is used to perform the final encoding process. The quantization width is changed using this method.

しかし、上述の符号量の制御の方法では符号化の基本部
分のバスを何度繰り返すかが画像によって異なるために
処理時間が不定となるばかりでなく、−船釣に処理時間
を長く必要とする欠点があった。
However, with the above-mentioned code amount control method, the number of times the bus, which is the basic part of encoding, is repeated differs depending on the image, so not only does the processing time become unstable, but also - Long processing time is required for boat fishing. There were drawbacks.

そこで、この問題を解決する手法として本発明者らは次
のような方式を提案した。(特願平1−283761号
、特願平2−137222号参照)この提案した方式は
、直交変換と可変長符号化を組み合わせた圧縮方式にお
いて、発生符号量の制御を行うために、画像障モリに記
憶した標本化した画像信号を、ブロックに分割し、この
分割されたブロック毎に直交変換を行ってから、この変
換出力を暫定的な量子化幅で量子化した後、この量子化
出力を可変長符号化すると共に、各ブロック毎の発生符
号量と画像全体の総発生符号量を算出し、次に前記暫定
的な量子化幅、前記総発生符号量および、目的とする総
符号量とから、新しい量子化幅を予測する。また、前記
各ブロック毎の発生符号量と、前記総発生符号量と、目
的とする総符号量とから、各ブロック毎の割当符号量を
計算する。そして、新しい量子化幅を用いて再び画像メ
モリの画像信号をブロック分割、直交変換、量子化、可
変長符号化を行うと共に、各ブロックの発生符号量が各
ブロックの割当符号量を越える場合には、途中で可変長
符号化を中止して、次のブロックの処理に移る。これに
より、画像全体の総発生符号量が目的の総符号量を越え
ないようにすると、ます、(a)に示すように、1フレ
ームの画像データ(国際標準化室で例示されている1フ
レームの画像は720 x 57B画素)を所定の大き
さのブロック(例えば、8×8の画素よりなるブロック
A、B、C,・・・ )に分割し、(b)に示すように
、この分割されたブロック毎に直交変換として2次元の
DCT (離散コサイン変換)を行い、8×8のマトリ
ックス上に順次格納する。画像データは2次元平面で眺
めてみると、濃淡情報の分布に基づく周波数情報である
空間周波数を有している。
Therefore, the present inventors proposed the following method as a method to solve this problem. (Refer to Japanese Patent Application No. 1-283761 and Japanese Patent Application No. 2-137222.) This proposed method is a compression method that combines orthogonal transform and variable-length coding, and is designed to control the amount of generated code. Divide the sampled image signal stored in the memory into blocks, perform orthogonal transformation for each divided block, quantize this transform output with a provisional quantization width, and then convert the quantized output to is variable-length encoded, and calculates the generated code amount for each block and the total generated code amount for the entire image, and then calculates the provisional quantization width, the total generated code amount, and the target total code amount. From this, predict the new quantization width. Further, the allocated code amount for each block is calculated from the generated code amount for each block, the total generated code amount, and the target total code amount. Then, the image signal in the image memory is divided into blocks, orthogonally transformed, quantized, and variable length encoded again using the new quantization width, and if the generated code amount of each block exceeds the allocated code amount of each block, stops variable-length encoding midway through and moves on to processing the next block. As a result, if the total generated code amount of the entire image does not exceed the target total code amount, one frame of image data (one frame of The image is 720 x 57B pixels) is divided into blocks of a predetermined size (for example, blocks A, B, C, etc. each consisting of 8 x 8 pixels), and as shown in (b), the divided A two-dimensional DCT (discrete cosine transform) is performed as an orthogonal transform for each block, and the data is sequentially stored on an 8×8 matrix. When image data is viewed on a two-dimensional plane, it has a spatial frequency that is frequency information based on the distribution of gradation information.

従って、上記DCTを行うことにより、画像データは直
流成分DCと交流成分ACに変換され、8×8のマトリ
ックス上には原点位置(0,0位置)に直流成分DCの
値を示すデータが、そして、0.7位置には横軸方向の
交流成分ACの最大周波数値を示すデータが、そして、
7,0位置には縦軸方向の交流成分ACの最大周波数値
を示すデータが、さらに、7,7位置には斜方向の交流
成分ACの最大周波数値を示すデータがそれぞれ格納さ
れ、中間位置ではそれぞれの座標位置により関係付けら
れる方向における周波数データが、原点側より順次高い
周波数のものか出現する形で格納されることになる。
Therefore, by performing the above DCT, the image data is converted into a direct current component DC and an alternating current component AC, and data indicating the value of the direct current component DC is placed at the origin position (0,0 position) on the 8×8 matrix. At the 0.7 position, there is data indicating the maximum frequency value of the alternating current component AC in the horizontal axis direction, and
Data indicating the maximum frequency value of the alternating current component AC in the vertical axis direction is stored at positions 7 and 0, and data indicating the maximum frequency value of the alternating current component AC in the diagonal direction is stored at positions 7 and 7. Then, the frequency data in the directions related by the respective coordinate positions are stored in a form in which higher frequencies appear sequentially from the origin side.

次にこのマトリックスにおける各座標位置の格納データ
を、各周波数成分毎の量子化幅により割ることにより、
各周波数成分に応じた線形量子化を行い(C)、この量
子化された値に対し可変長符号化としてノ\フマン符号
化を行う。この時、直流成分DCに関しては近傍プロ・
ツクの直流成分との差分値をグループ番号(付加ビット
数)と付加ビットで表現し、そのグループ番号をノ\フ
マン符号化し、得られた符号語と付加ビットを合わせて
符号化データとする( di、 d2. el、 e2
)。
Next, by dividing the stored data at each coordinate position in this matrix by the quantization width for each frequency component,
Linear quantization is performed according to each frequency component (C), and the quantized values are subjected to Noffman encoding as variable length encoding. At this time, regarding the direct current component DC, the nearby professional
The difference value from the DC component of the tsuku is expressed by a group number (number of additional bits) and additional bits, the group number is Nofman encoded, and the obtained code word and additional bits are combined to form encoded data ( di, d2. el, e2
).

交流成分ACに関しても有効な(値が“0°でない)係
数は、グループ番号と付加ビットで表現する。
Coefficients that are also valid for the alternating current component AC (values other than 0°) are expressed by group numbers and additional bits.

そのため、交流成分式〇はジグザグスキャンと呼ばれる
低い周波数成分から高い周波数成分へのスキャンを行い
、無効(値か“0”)の成分の連続する個数(零のラン
数)と、それに続く有効な成分の値のグループ番号とか
ら2次元のハフマン符号化を行い、得られた符号語と付
加ビットを合わせて符号化データとする。
Therefore, AC component formula 〇 performs a scan called zigzag scan from low frequency components to high frequency components, and calculates the number of consecutive invalid (value or "0") components (number of runs of zero) and the following valid components. Two-dimensional Huffman encoding is performed using the group number of the component value, and the resulting code word and additional bits are combined to form encoded data.

ハフマン符号化はフレーム画像当たりの上記直流成分D
Cおよび交流成分ACの各々のデータ分布における発生
頻度のピークのものを中心として、この中心のものほど
、データビットを少なくし、周辺になるほどビット数を
多くするようにしてビット割り当てをした形でデータを
符号化して符号語を得ることで行う。
Huffman encoding is the above DC component D per frame image.
Centering on the peak frequency of occurrence in the data distribution of C and alternating current component AC, bits are allocated in such a way that the center has fewer data bits, and the closer it is to the periphery, the larger the number of bits. This is done by encoding data to obtain a code word.

以上がこの方式の基本部分である。The above is the basic part of this method.

この基本部分だけでは、可変長符号化であるハフマン符
号化を用いているために符号が画像毎に一定ではなくな
ってしまうから、符号量の制御の方法として例えば、次
のように処理する。
If only this basic part is used, the code will not be constant for each image because Huffman coding, which is variable length coding, is used, so the code amount is controlled, for example, as follows.

まず、暫定的な量子化係数を用いて、定められた量子化
マトリックスと量子化係数を掛は合わせて得られる各周
波数成分毎の量子化幅で前記基本部分の処理を行うと同
時に、全画面の発生した総符号量(総ビット数)を求め
る(g)。この総符号量と、目的とする符号量と、用い
た暫定的な量子化係数などからDCT係数に対する目的
とする符号量に近付けるのに最適な量子化係数を予測す
る(h)。次に、この量子化係数を用いて(j)、前述
の基本部分の量子化以降の処理を繰り返す。そして、今
回発生した総符号量と、前回発生した総符号量と、目的
とする符号量と、今回用いた量子化係数と、前回用いた
量子化係数とから、再び目的の符号量に近付けるのに最
適な量子化係数をニュートン・ラプソン・イタレーショ
ン(NewtonRaphson Iterratjo
n)により予測する。
First, using a provisional quantization coefficient, the basic part is processed with the quantization width for each frequency component obtained by multiplying the predetermined quantization matrix and the quantization coefficient, and at the same time The total amount of generated codes (total number of bits) is determined (g). The optimum quantization coefficient for approaching the target code amount for the DCT coefficient is predicted from this total code amount, the target code amount, and the temporary quantization coefficient used (h). Next, using this quantization coefficient (j), the above-described process after quantization of the basic part is repeated. Then, from the total code amount generated this time, the total code amount generated last time, the target code amount, the quantization coefficient used this time, and the quantization coefficient used last time, it is possible to approach the target code amount again. The optimal quantization coefficients are determined using Newton-Raphson iteration.
Predict by n).

そして、この予測した量子化係数と前回の量子化係数が
充分に近つき、かつ目的の符号量よりも今回発生した総
符号量の方か少ない場合には処理を終了し、今回発生し
た符号化データを出力してメモリカードに記憶する(f
)。そうでない場合には量子化係数を変更し、この新し
い量子化係数を用いて処理を繰り返す。
If the predicted quantization coefficient and the previous quantization coefficient are sufficiently close, and the total amount of code generated this time is less than the target amount of code, the process is terminated, and the code amount generated this time is Output the data and store it on the memory card (f
). Otherwise, the quantization coefficient is changed and the process is repeated using this new quantization coefficient.

しかし、上述の符号量の制御の方法では符号化の基本部
分のパスを何度繰り返すかが画像によって異なるために
処理時間か不定となるばかりでなく、一般的に処理時間
を長く必要とする欠点かあった。そこで、本発明者らは
次のような方式でこれを解決した。
However, with the method of controlling the amount of code described above, the number of times the basic encoding pass is repeated differs depending on the image, which not only makes the processing time unstable, but also generally requires a long processing time. There was. Therefore, the present inventors solved this problem using the following method.

ます、暫定的な量子化係数を用いて、定められた量子化
マトリックスと量子化係数を掛は合わせて得られる各周
波数成分毎の量子化幅で前記基本部分の処理を行うと同
時に、全画面の発生した総符号量(総ビット数)と各ブ
ロック毎の発生符号量を求める(gl)。この総符号量
と、目的とする符号量と、用いた暫定的な量子化係数な
どからDCT係数に対する目的とする符号量に近付ける
のに最適な量子化係数を予測する(hl)。また、総符
号量と、目的とする符号量と、各ブロック毎の発生符号
量から比例配分により、各ブロックの割当符号量を求め
る(h2)。次に、予測した量子化係数を用いて(1)
、前述の基本部分の処理を繰り返す。つまり、再び画像
メモリの画像信号をブロック分割、直交変換、量子化、
可変長符号化を行うと共に、各ブロックの発生符号量が
各ブロックの割当符号量を越える場合には、途中で可変
長符号化を中止して、次のブロックの処理に移る。
First, using a provisional quantization coefficient, the basic part is processed with the quantization width for each frequency component obtained by multiplying the determined quantization matrix and the quantization coefficient, and at the same time, the entire screen is processed. The total amount of generated codes (total number of bits) and the amount of generated codes for each block are determined (gl). The optimum quantization coefficient for approaching the target code amount for the DCT coefficient is predicted from this total code amount, the target code amount, and the temporary quantization coefficient used (hl). Further, the allocated code amount for each block is determined by proportional allocation from the total code amount, the target code amount, and the generated code amount for each block (h2). Next, using the predicted quantization coefficients, (1)
, repeat the basic processing described above. In other words, the image signal in the image memory is divided into blocks, orthogonally transformed, quantized,
When variable length encoding is performed and the amount of code generated for each block exceeds the amount of allocated code for each block, variable length encoding is stopped midway and processing proceeds to the next block.

そして、すべてのブロックについて上記の処理を終了し
たら、今回発生した符号化データを出力してメモリカー
ドに記憶する(0゜ 〔発明か解決しようとする課題〕 上述したように、例えば、ディジタル電子スチルカメラ
などにおいては、1枚のメモリカードあるいは磁気ディ
スク装置あるいは1本の磁気テープ等に記録できる画像
に枚数が保証されていなければならず、そのため、画像
データを圧縮して記録するが、操作性の上からその処理
時間はできるだけ短く、且つ、一定である必要かある。
After completing the above processing for all blocks, the encoded data generated this time is output and stored in a memory card (0゜ [Problem to be solved by the invention]) As mentioned above, for example, a digital electronic still In cameras, etc., the number of images that can be recorded on one memory card, magnetic disk device, or magnetic tape must be guaranteed, so image data is compressed and recorded, but it is difficult to operate. Above all, the processing time needs to be as short as possible and constant.

また、高能率で画像データの圧縮が行えることか望まれ
る。これらはディジタル電子スチルカメラに限らず他の
アプリケーションにおいても少なからず要求される項目
である。
It is also desired that image data can be compressed with high efficiency. These are items that are required not only for digital electronic still cameras but also for other applications.

そして、このような要求を満たす圧縮方式として上述の
国際標準室方式があり、この方式において、前記基本部
分で例示したようなブロック毎の直交変換と可変長符号
化を組み合わせた手法では、画像データの圧縮を高能率
で行えるものの、可変長符号化を用いているが故に符号
量か一定にならす、1枚のメモリカートあるいは磁気デ
ィスクあるいは1本の磁気テープ等の記録媒体に記憶で
きる画像の枚数が不定になるという欠点があった。
As a compression method that satisfies these requirements, there is the above-mentioned International Standards Laboratory method. In this method, the method that combines block-by-block orthogonal transformation and variable-length coding as exemplified in the basic section above cannot process image data. However, since variable-length encoding is used, the number of images that can be stored on a recording medium such as a memory cart, magnetic disk, or magnetic tape remains constant. The problem was that it was not fixed.

また、これを解決するための従来技術として、上述した
静止画符号化国際標準化において検討されている符号量
制御の方式かあるが、この方式では符号化の基本部分の
パスを何度繰り返すかが画像によって異なるために処理
時間か不定となるばかりでなく、一般的に処理時間を長
く必要とする欠点かあった。
In addition, as a conventional technique to solve this problem, there is a code amount control method that is being considered in the international standardization of still image coding mentioned above, but in this method, the number of passes of the basic part of encoding is repeated. Not only is the processing time undefined because it varies depending on the image, but it also has the drawback of generally requiring a long processing time.

この問題を解決する手法として本発明者らが提案した特
願平1−28376]号および特願平2−137222
号の方式がある。二の提案した方式は、通常の場合、大
変に良好な結果か得られるか、応用するシステムによっ
ては、空間周波数の特に低い、あるいは特に高い画像で
は若干画質か低下し、発生した符号量の目標の符号量に
対する隔たりか通常の場合よりも若干多くなることが極
く稀に生しる。
As a method to solve this problem, the present inventors proposed Japanese Patent Application No. 1-28376 and Japanese Patent Application No. 2-137222.
There is a number system. The second proposed method usually gives very good results, but depending on the system to which it is applied, the image quality may deteriorate slightly for images with particularly low or particularly high spatial frequencies, and the amount of code generated may be In very rare cases, the difference in the amount of code becomes slightly larger than in the normal case.

この原因に関して説明する。前述のように、量子化幅を
各周波数成分に対する相対的な量子化特性を表す基本形
である量子化マトリックスに、量子化係数を乗したもの
で表すとき、量子化係数と発生符号量の間にはおよそ次
の関係かある。
The cause of this will be explained. As mentioned above, when expressing the quantization width by multiplying the quantization matrix, which is the basic form expressing the relative quantization characteristics for each frequency component, by the quantization coefficient, there is a difference between the quantization coefficient and the amount of generated code. has approximately the following relationship.

log BR−a log sp+ b       
 =・(1)ここで、BRは一画素当たりの符号量(ビ
ットレート)、SFは量子化係数、aおよびbは定数で
あり、aは特にシステムに大きく依存し、bは特に画像
に大きく依存する。
log BR-a log sp+ b
=・(1) Here, BR is the amount of code per pixel (bit rate), SF is the quantization coefficient, a and b are constants, a is particularly dependent on the system, and b is particularly large on the image. Dependent.

色成分に分離されたカラー画像の量子化の際に、色成分
に対し、複数の量子化マトリックス、例えば、輝度用と
色差用の二つの量子化マトリックスを用いるとともに、
共通の量子化係数を用いるとすると、 log BR= a  log SP+ b     
 −(2)y      y            
ylog BR−a  log SP+ b     
 −(3)CCC のような関係になる。尚、上記各式においてはBR。
When quantizing a color image separated into color components, a plurality of quantization matrices, for example, two quantization matrices for luminance and color difference, are used for the color components, and
If we use a common quantization coefficient, log BR= a log SP+ b
-(2) y y
ylog BR-a log SP+ b
-(3) The relationship is like CCC. In addition, in each of the above formulas, BR.

a、bに、それぞれy、cを添えて輝度、色差の区別し
である。ここでもし、a  =aoであれば、= a 
log SP+ b          −(4)のよ
うになり、各ブロック毎の割当符号量の決定は、統計量
に応じて目的の符号量を比例配分して得れば良いことか
わかる。
y and c are added to a and b to distinguish between brightness and color difference. Here, if a = ao, then = a
log SP+ b - (4), and it can be seen that the allocated code amount for each block can be determined by proportionally allocating the target code amount according to the statistics.

通常の場合、aha  であるが、システムy    
   c によっては極く稀にa とa の大きさかかなりy  
     c 異なることがある。
In the normal case, aha, but the system y
Depending on c, in very rare cases the size of a and a may be quite large y
c It may be different.

つまり、総符号量log BRをY軸に、量子化係数l
og SFをX軸にとり、式(2)と式(3)の関係を
示すと第10図の如きとなり、量子化係数log SF
に応じた総符号量log BRの大きさは輝度系と色差
系で少し違いがある。第10図を眺めてみると、符号化
するときの量子化係数、つまり、最適値と予測される量
子化係数が、特に大きかったり、あるいは小さいとき、
言い換えると特に空間周波数の高い画像のとき、あるい
は低い画像の場合においては、各ブロックの統計量に応
じて目的の符号量を比例配分することによって割当符号
量を決定すると、その予測された量子化係数を用いて実
際に符号化を行った際に、輝度成分のブロックにおいて
は割当符号量が不十分となり、色差成分のブロックでは
余分となる、あるいはその逆になる。
In other words, the total code amount log BR is plotted on the Y axis, and the quantization coefficient l
og SF on the X axis and the relationship between equations (2) and (3) is shown in Figure 10, and the quantization coefficient log SF
The total code amount according to log BR is slightly different between the luminance system and the color difference system. Looking at Figure 10, when the quantization coefficient during encoding, that is, the quantization coefficient predicted to be the optimal value, is particularly large or small,
In other words, especially in the case of images with high or low spatial frequencies, if the allocated code amount is determined by proportionally allocating the target code amount according to the statistics of each block, the predicted quantization When coding is actually performed using the coefficients, the allocated code amount becomes insufficient for the luminance component block, and becomes redundant for the chrominance component block, or vice versa.

輝度成分における割当符号量が不足するか、色差成分に
おける割当符号量か不足するかは、a とa の大小関
係と、予測された量子化係数y      c の大小による。
Whether the allocated code amount for the luminance component is insufficient or the allocated code amount for the chrominance component is insufficient depends on the magnitude relationship between a and a and the magnitude of the predicted quantization coefficient y c .

以上の原因から、応用するシステムによっては、空間周
波数の特に低い、あるいは特に高い画像では、若干画質
が低下し、発生した符号量の目標の符号量に対する隔た
りが通常の場合よりも若干多くなることがあった。
Due to the above reasons, depending on the applied system, the image quality may deteriorate slightly for images with particularly low or particularly high spatial frequencies, and the gap between the generated code amount and the target code amount may be slightly larger than in normal cases. was there.

そこで、本発明の目的とするところは、空間周波数分布
傾向が片寄った画像であっても、画質を損なわずに、一
定の処理時間内で一定の符号量内に収まるように符号化
することのできる画像データの符号化装置および符号化
方法を提供することにある。
Therefore, it is an object of the present invention to encode an image so that it stays within a certain amount of code within a certain processing time without degrading the image quality, even if the image has a biased spatial frequency distribution. An object of the present invention is to provide an image data encoding device and encoding method that can perform image data encoding.

〔課題を解決するための手段〕[Means to solve the problem]

上記目的を達成するため、本発明は次のように構成する
In order to achieve the above object, the present invention is configured as follows.

すなわち、色成分別に分離されたカラー画像データそれ
ぞれを所定画素数のブロックに分割し、色成分別のこの
分割されたブロック毎に順に直交変換を行って周波数成
分別のデータに変換し、この変換された周波数成分別の
データを量子化手段により量子化し、その後、この量子
化出力を可変長符号化手段に与えて可変長符号化し、画
像データの符号化を行う際に、初めに暫定的に定めた量
子化幅で量子化して可変長符号化し、各ブロック毎の符
号量を得る統計処理を行い、次にこの統計処理により求
めた各ブロック毎の符号量と、画像あたりの総符号量目
標値とからこの総符号量目標値に収めるに適した最適量
子化幅と各ブロック毎の割当符号量とを決定し、この決
定した最適量子化幅に従って各ブロック毎の前記変換出
力の量子化を行うと共にこの量子化出力を各ブロック毎
の割当符号量に従って各ブロック毎に符号量制御を行い
ながら順次可変長符号化する符号化処理を実施する符号
化装置において、 第1には、前記統計処理時の可変長符号化出力をもとに
各色成分別前記各ブロックの符号量を算出する算出手段
と、前記総符号量目標値と前記算出手段の算出値および
前記統計処理に使用した暫定的な量子化幅とに基づいて
各色成分別の最適量子化幅を予測する量子化幅予測手段
と、前記符号化処理時に前記量子化幅予測手段の予測し
た各色成分別の最適量子化幅を使用して各色成分別の量
子化を行うべく制御する制御手段とを具備して構成する
That is, each color image data separated by color component is divided into blocks of a predetermined number of pixels, and each divided block by color component is sequentially subjected to orthogonal transformation to be converted to data by frequency component. The quantized data for each frequency component is quantized by the quantization means, and then this quantized output is given to the variable length encoding means for variable length encoding. Quantize with a predetermined quantization width and perform variable length coding, perform statistical processing to obtain the code amount for each block, and then calculate the code amount for each block obtained by this statistical processing and the total code amount target per image. The optimum quantization width and the allocated code amount for each block are determined based on the total code amount target value, and the transform output is quantized for each block according to the determined optimum quantization width. In an encoding apparatus that performs a coding process in which the quantized output is sequentially variable-length encoded while controlling the code amount for each block according to the allocated code amount for each block, the first step is to perform the statistical processing. calculation means for calculating the code amount of each block for each color component based on the variable length encoded output at the time; quantization width prediction means for predicting an optimum quantization width for each color component based on the quantization width; and using the optimum quantization width for each color component predicted by the quantization width prediction means during the encoding process. and a control means for controlling to perform quantization for each color component.

第2には、前記統計処理時の可変長符号化出力をもとに
各色成分別前記各ブロックの符号量を算出する算出手段
と、前記総符号量目標値と前記算出手段の算出値と前記
統計処理に使用した暫定的な量子化幅とに基づいて各色
成分別の最適量子化幅を予測する量子化幅予測手段と、
前記総符号量目標値を前記算出手段の算出値に応じて配
分し、当該各色成分側番ブロックの基準符号量を決定す
る決定手段と、符号化処理時に前記決定手段にて決定し
た各色成分別各ブロックの基準符号量を用い、前記ブロ
ックのうち、次に符号化処理する処理対象ブロックの前
に処理した処理済みブロックでの符号化により発生した
符号量と当該処理済みブロックでの割当符号量との差を
求めてこれを前記処理対象ブロックの前記基準符号量に
加える二とにより得られる符号量を当該処理対象ブロッ
クでの割当符号量として割り当てる割当手段と、前記処
理対象ブロックでの符号化処理において前記割当手段に
より割り当てられた前記割当符号量を越えないように、
前記可変長符号化を打ち切る打ち切り手段と、前記符号
化処理時に前記量子化幅予測手段の予測した各色成分別
の最適量子化幅を使用して各色成分別の量子化を行うべ
く制御する制御手段とを具備して構成する。
Second, a calculation means for calculating the code amount of each block for each color component based on the variable length encoded output during the statistical processing, and the total code amount target value and the calculated value of the calculation means and the quantization width prediction means for predicting an optimal quantization width for each color component based on the provisional quantization width used for statistical processing;
determining means for allocating the total code amount target value according to the calculated value of the calculating means and determining a reference code amount for each color component side number block; and for each color component determined by the determining means during encoding processing. Using the standard code amount of each block, the code amount generated by encoding in the processed block processed before the next block to be encoded among the blocks and the allocated code amount in the processed block. and adding this to the reference code amount of the block to be processed, and assigning means for allocating the obtained code amount as the allocated code amount in the block to be processed, and encoding in the block to be processed. In order not to exceed the allocated code amount allocated by the allocation means in the processing,
an abort means for aborting the variable length encoding; and a control means for controlling to perform quantization for each color component using the optimum quantization width for each color component predicted by the quantization width prediction means during the encoding process. It is composed of:

また、第3には上記第1および第2の構成それぞれに、
更に、目的とする圧縮率を選択すると共に、選択された
圧縮率に応じて収めるべき目的の符号量および前記暫定
的量子化幅を決定する圧縮率選択手段を設けて構成する
Thirdly, for each of the above first and second configurations,
Furthermore, the apparatus is configured to include compression rate selection means for selecting a target compression rate and determining the target code amount to be accommodated and the provisional quantization width according to the selected compression rate.

また、第4には上記第1および第3の構成それぞれにお
いて、更に、前記量子化手段には前記符号化処理時での
量子化は、前記直交変換により得られる周波数成分別の
データのうち、低周波数成分のデータより実施させると
共に、前記可変長符号化手段には前記直交変換により周
波数成分別に得られる前記各ブロック単位の画像データ
の周波数成分別データのうち、直流成分については前の
処理ブロックでの直流成分との差分を得ると共にこの差
分を可変長符号化する直流成分用の符号化処理部と、こ
の直流成分について符号化処理部の処理が終った後、前
記交流成分について可変長符号化する交流成分用の符号
化処理部とを設け、前記符号化打ち切り手段は交流成分
用の符号化処理部にのみ設けて構成する。
Fourthly, in each of the first and third configurations, the quantization means may perform quantization at the time of the encoding process to perform quantization on each of the frequency component data obtained by the orthogonal transformation. In addition, the variable length encoding means uses the data of the previous processing block for the DC component among the frequency component data of the image data in units of blocks obtained for each frequency component by the orthogonal transformation. a DC component encoding processing unit that obtains a difference with the DC component at and variable-length encoding this difference; and after the encoding processing unit finishes processing the DC component, variable-length encoding the AC component; An encoding processing section for alternating current components is provided, and the encoding aborting means is provided only in the encoding processing section for alternating current components.

また、第5には、色成分別に分離されたカラー画像デー
タをそれぞれ所定画素数のブロックに分割し、この分割
されたブロック毎に順に直交変換を行ってからこの変換
出力を量子化手段により量子化し、その後、この量子化
出力を可変長符号化手段に与えて可変長符号化し、デー
タの符号化を行う際に、収めるべき目的の総符号量と予
め求めた各ブロック毎の統計量とから決定した各ブロッ
ク毎の割当符号量に従って各ブロック毎に符号量制御を
行いながら可変長符号化を行うにあたり、前記量子化を
暫定的な量子化幅を使用して行い、これにより得た量子
化出力について符号化処理を行い、画像全体の符号量お
よび各色成分別符号量および各色成分別各ブロック毎の
符号量を調べる第1のステップと、この第1のステップ
で得た画像全体の符号量と各色成分別符号量がら最適化
に必要な量子化幅の予4]を各色成分別に行う第2のス
テップと、前記目的の総符号量と各色成分別各ブロック
の符号量がら各色成分別各ブロック毎の基準割当符号量
を求める第3のステップと、前記予測した前記各色成分
別の量子化幅を用いて前記各色成分別各ブロック毎の前
記量子化を行う第4のステップと、この第4のステップ
での前記各色成分別各ブロック毎の2子化出力をそのブ
ロックに対する割当符号量に収まる範囲で可変長符号化
する第5のステップと、前記第5のステップにおける現
在可変長符号化処理しようとするブロックの、直前に処
理したブロックでの可変長符号化による符号量とこのブ
ロックでの割当符号量との差を求め、これを繰り越し量
として前記現在処理しようとするブロックでの前記基準
割当符号量に加算し、前記現在処理しようとするブロッ
クでの割当符号量とする第6のステップとより構成する
Fifth, the color image data separated by color component is divided into blocks each having a predetermined number of pixels, and each divided block is sequentially subjected to orthogonal transformation, and then the transformation output is quantized by quantization means. After that, this quantized output is given to a variable length encoding means to perform variable length encoding, and when encoding data, it is calculated from the total amount of code to be stored and the statistics for each block determined in advance. When performing variable length encoding while controlling the code amount for each block according to the determined allocated code amount for each block, the quantization is performed using a provisional quantization width, and the resulting quantization A first step of performing encoding processing on the output and checking the code amount of the entire image, the code amount for each color component, and the code amount for each block for each color component, and the code amount of the entire image obtained in this first step. The second step is to pre-determine the quantization width necessary for optimization based on the amount of code for each color component and the amount of code for each block for each color component. a third step of determining a standard allocated code amount for each block; a fourth step of performing the quantization for each block for each color component using the predicted quantization width for each color component; a fifth step of variable-length encoding the binary output of each block for each color component in step 4 within the allocated code amount for that block; and a fifth step of variable-length encoding the current output in the fifth step. Find the difference between the amount of code generated by variable-length encoding in the block to be processed immediately before and the amount of code allocated to this block, and use this as the carryover amount for the block to be processed currently. and a sixth step of adding the reference allocated code amount to the allocated code amount for the block to be currently processed.

また、第6には第5の方法において、第1のステップの
前に圧縮率が設定されることにより、この設定された圧
縮率に応じて収めるべき目的の総符号量および暫定的な
量子化幅を決定するステップを付加して構成する。
Sixthly, in the fifth method, by setting the compression rate before the first step, the target total code amount to be accommodated and provisional quantization are determined according to the set compression rate. Configure by adding a step to determine the width.

さらにまた第7には前記第5および第6の方法において
、前記暫定的な量子化幅は、選択設定した画面あたりの
総符号量に応じて予め定めた値を用いることを特徴とす
る。
Furthermore, seventhly, in the fifth and sixth methods, the provisional quantization width is a predetermined value according to the selected total code amount per screen.

〔作 用〕[For production]

このような構成において、色成分別に分離されたカラー
画像データそれぞれを所定画素数のブロックに分割し、
色成分別のこの分割されたブロック毎に順に直交変換を
行って周波数代分別のデータに変換し、この変換された
周波数代分別のデータを量子化手段により量子化し、そ
の後、この量子化出力を可変長符号化手段に与えて可変
長符号化し、データの符号化を行う際に、初めに暫定的
に定めた量子化幅で量子化して可変長符号化し、各ブロ
ック毎の符号量を得る統計処理を行い、次にこの統計処
理により求めた各ブロック毎の符号量と、画像あたりの
総符号量目標値とからこの総符号量目標値に収めるに適
した最適量子化幅と各ブロック毎の割当符号量とを決定
し、この決定した最適量子化幅に従って各ブロック毎の
前記変換出力の量子化を行うと共にこの量子化出力を各
ブロック毎の割当符号量に従って各ブロック毎に符号量
制御を行いながら順次可変長符号化する符号化処理を実
施するか、第1の構成の場合、算出手段は前記統計処理
時の可変長符号化出力をもとに各色成分別前記各ブロッ
クの符号量を算出し、量子化幅予測手段は前記総符号量
目標値と前記算出手段の算出値および前記統計処理に使
用した暫定的な量子化幅とに基づいて各色成分別の最適
量子化幅を予測する。そして、制御手段は前記符号化処
理時に前記量子化幅予測手段の予測した各色成分別の最
適量子化幅を使用して各色成分別の量子化を行うべく制
御する。
In such a configuration, each color image data separated by color component is divided into blocks of a predetermined number of pixels,
Orthogonal transformation is sequentially performed on each divided block for each color component to convert it into frequency-classified data, and this transformed frequency-classified data is quantized by a quantization means, and then this quantized output is Statistics to obtain the code amount for each block by applying it to a variable length encoding means and performing variable length encoding, and when encoding data, quantize it with a provisionally determined quantization width and perform variable length encoding. Then, from the code amount for each block obtained through this statistical processing and the total code amount target value per image, the optimal quantization width suitable for keeping within this total code amount target value and the optimal quantization width for each block are determined. The allocated code amount is determined, and the transform output is quantized for each block according to the determined optimal quantization width, and the code amount is controlled for each block based on the quantized output according to the allocated code amount for each block. Alternatively, in the case of the first configuration, the calculating means calculates the code amount of each block for each color component based on the variable length encoding output during the statistical processing. and the quantization width prediction means predicts the optimal quantization width for each color component based on the total code amount target value, the calculated value of the calculation means, and the provisional quantization width used in the statistical processing. . Then, the control means performs control to perform quantization for each color component using the optimum quantization width for each color component predicted by the quantization width prediction means during the encoding process.

以上は、統計処理時に暫定的な量子化幅を用いての量子
化に基づく画面全体の総発生符号量、および各色成分別
の発生符号量、各色成分別前記各ブロックの発生符号量
の状態を知り、これらの情報と目的総符号量とから色成
分別の最適量子化幅を予測し、符号化処理における各色
成分の各ブロックの符号化に当たっては色成分の発生符
号量に対応した最適な量子化幅を決定できてその最適量
子化幅で量子化することかできることから、発生符号量
か最適なものとなり、画質向上に寄与すると共に、符号
化処理の回数を規定回数に定めると符号化に要する時間
は一定とすることができる。
The above describes the total generated code amount for the entire screen based on quantization using a provisional quantization width during statistical processing, the generated code amount for each color component, and the state of the generated code amount for each block for each color component. The optimal quantization width for each color component is predicted from this information and the target total code amount, and when encoding each block of each color component in the encoding process, the optimal quantization width corresponding to the generated code amount of the color component is predicted. Since the quantization width can be determined and quantization can be performed using the optimal quantization width, the amount of generated code is optimized, which contributes to improving image quality. The time required can be constant.

また、第2の構成の場合、算出手段は前記統計処理時の
可変長符号化出力をもとに各色成分別前記各ブロックの
符号量を算出し、決定手段は前記総符号量目標値をこの
算出値に応じて配分し、当該各色成分別各ブロックの基
準符号量を決定する。また、量子化幅予測手段は前記総
符号量目標値と前記算出手段の算出値と前記統計処理に
使用した暫定的な量子化幅とに基づいて各色成分別の最
適量子化幅を予測し、割当手段は符号化処理時に、前記
決定手段にて決定した各色成分別各ブロックの基準符号
量を用い、前記ブロックのうち、次に符号化処理する処
理対象ブロックの前に処理した処理済みブロックでの符
号化により発生した符号量と当該処理済みブロックでの
割当符号量との差を求めてこれと前記処理対象ブロック
の前記割当符号量とを加え、当該処理対象ブロックでの
割当符号量として割り当てる。そして、打ち切り手段は
前記処理対象ブロックでの符号化処理時に前記割当手段
により割り当てられた割当符号量を越えないように、前
記可変長符号化を打ち切る。
In the case of the second configuration, the calculating means calculates the code amount of each block for each color component based on the variable length encoded output during the statistical processing, and the determining means calculates the total code amount target value based on the above-mentioned total code amount target value. It is distributed according to the calculated value, and the reference code amount of each block for each color component is determined. Further, the quantization width prediction means predicts the optimum quantization width for each color component based on the total code amount target value, the calculated value of the calculation means, and the provisional quantization width used in the statistical processing, During the encoding process, the allocation means uses the reference code amount of each block for each color component determined by the determination means, and among the blocks, a processed block processed before the next target block to be encoded is used. Find the difference between the code amount generated by encoding and the allocated code amount for the processed block, add this to the allocated code amount of the processing target block, and assign it as the allocated code amount for the processing target block. . Then, the aborting means aborts the variable length encoding so as not to exceed the allocated code amount allocated by the allocating means during the encoding process on the processing target block.

一方、制御手段は、前記符号化処理時に前記量子化幅予
測手段の予測した各色成分別の最適量子化幅を使用して
各色成分別の量子化を行うべく制御する。
On the other hand, the control means performs control to perform quantization for each color component using the optimum quantization width for each color component predicted by the quantization width prediction means during the encoding process.

以上節2の構成では、統計処理時に暫定的な量子化幅を
用いての量子化に基づく画面全体の総発生符号量、およ
び各色成分別の発生符号量、各色成分別前記各ブロック
の発生符号量の状態を知り、これらの情報から各色成分
別の最適量子化幅を予測し、また、前記総符号量目標値
をこの各色成分別の発生符号量に対応じて配分し、これ
を用いて色成分別前記各ブロックの発生符号量に応じた
その各ブロック毎の基準割当符号量を決め、符号化処理
における各ブロックの符号化に当たってはそのブロック
の基準割当符号量に、その前のブロックでの符号化にお
ける符号量と割当符号量の差を繰り越し量として加算し
て割当符号量とし、この割当符号量に収まる範囲で符号
化してゆくと云ったもので、統計処理時のデータに基づ
いて、各色成分別の各ブロック毎の基準割当符号量を合
理的に配分して定めてあり、また、先に処理したブロッ
クでの割当符号量の来泊化分を繰り越し分として後のブ
ロックの符号化に振り向けることかできることから、符
号量を多く必要とする色成分であっても各ブロックでの
符号化打ぢ切りが少なくなり、画質向上に寄与すると共
に、符号化処理の回数を規定回数に定めると符号化に要
する時間は一定とすることができる。
In the above configuration of Section 2, the total generated code amount for the entire screen based on quantization using a provisional quantization width during statistical processing, the generated code amount for each color component, and the generated code for each block for each color component. Knowing the state of the amount, predicting the optimal quantization width for each color component from this information, allocating the target total code amount according to the amount of generated code for each color component, and using this. The standard allocated code amount for each block is determined according to the generated code amount of each block for each color component, and when encoding each block in the encoding process, the standard allocated code amount for that block is used for the previous block. The difference between the code amount in the encoding and the allocated code amount is added as a carryover amount to obtain the allocated code amount, and encoding is performed within the range of this allocated code amount.Based on the data during statistical processing. , the standard allocated code amount for each block for each color component is determined by rationally distributing it, and the allocated code amount for the previously processed block is carried over and used as the code for subsequent blocks. Even for color components that require a large amount of code, there are fewer interruptions in coding for each block, contributing to improved image quality and reducing the number of times the coding process is performed. By setting , the time required for encoding can be kept constant.

また、第3の構成の場合、上記第1および第2のケース
に、更に、圧縮率選択手段を設ける構成としたもので、
目的とする圧縮率を選択すると、圧縮率選択手段はこの
選択された圧縮率に応じて収めるべき目的の符号量およ
び前記暫定的量子化幅を決定する。
In addition, in the case of the third configuration, a compression ratio selection means is further provided in the first and second cases,
When a target compression rate is selected, the compression rate selection means determines the target code amount to be accommodated and the provisional quantization width according to the selected compression rate.

従って、この方式では第1および第2の構成の作用と効
果に加え、目的とする圧縮率を選択することができ、こ
れに対応じて暫定的量子化幅と収めるべき1画像当たり
の目的の符号量を定めて統計処理を行うので、所望の符
号量に収まる最適量子化幅をより精度良く見付けること
ができるようになる利点か得られる。
Therefore, in this method, in addition to the functions and effects of the first and second configurations, the target compression rate can be selected, and the provisional quantization width and the target per image to be accommodated can be selected accordingly. Since the amount of code is determined and statistical processing is performed, an advantage is obtained that the optimum quantization width that fits within the desired amount of code can be found with higher accuracy.

また、第4の構成の場合、上記第1および第3の構成そ
れぞれにおいて、前記可変長符号化手段の機能を、前記
直交変換により得られる前記各ブロック単位の画像デー
タのうち、直流成分については前の処理ブロックでの直
流成分との差分を得ると共にこの差分を可変長符号化し
、この直流成分について符号化処理部の処理が終わった
後、前記交流成分について可変長符号化すると共に前記
符号化打ち切りは交流成分用の符号化処理においてのみ
、実施する構成としたものを使用している。従って、前
記量子化手段は前記符号化処理時での量子化は、前記直
交変換により得られる周波数成分別のデータのうち、低
周波数成分のデータより実施させると共に、前記可変長
符号化手段には前記直交変換により周波数成分別に得ら
れる前記各ブロック単位の画像データの周波数成分別デ
ータのうち、直流成分については前の処理ブロックでの
直流成分との差分を得ると共にこの差分を可変長符号化
し、この直流成分について符号化処理が終った後、前記
交流成分について可変長符号化すると共に、前記符号化
の打ち切りは交流成分にのみ適用する。
Further, in the case of the fourth configuration, in each of the first and third configurations, the function of the variable length encoding means is applied to the DC component of the image data in units of blocks obtained by the orthogonal transformation. Obtain the difference from the DC component in the previous processing block and variable-length encode this difference. After the encoding processing unit finishes processing the DC component, variable-length encode the AC component and perform the encoding. A configuration is used in which truncation is performed only in the encoding process for AC components. Therefore, the quantization means performs quantization during the encoding process on data of low frequency components among the frequency component data obtained by the orthogonal transformation, and the variable length encoding means Of the frequency component data of the image data in each block obtained by the orthogonal transformation for each frequency component, for the DC component, a difference from the DC component in the previous processing block is obtained, and this difference is variable-length coded; After the encoding process for the DC component is completed, the AC component is subjected to variable length encoding, and the aborting of the encoding is applied only to the AC component.

この結果、上記第1乃至第3のケースに、さらに符号化
処理時の符号化打ち切りを交流成分に対してのみとした
ことで視覚上、影響の少ない高い周波数領域の打ち切り
に止めることができ、画質の劣化を防止できる。
As a result, in addition to the first to third cases above, by terminating the encoding only for the alternating current component during encoding processing, it is possible to limit the terminating to the high frequency region, which has little visual impact. Deterioration of image quality can be prevented.

第5のケースでは色成分別に分離されたカラー画像デー
タをそれぞれ所定画素数のブロックに分割し、この分割
されたブロック毎に順に直交変換を行ってからこの変換
出力を量子化手段により量子化し、その後、この量子化
出力を可変長符号化手段に与えて可変長符号化し、デー
タの符号化を行う際に、収めるべき目的の総符号量と予
め求めた各ブロック毎の統計量とから決定した各ブロッ
ク毎の割当符号量に従って各ブロック毎に符号量制御を
行いながら可変長符号化を行うにあたり、第1のステッ
プで前記量子化を暫定的な量子化幅を使用して行い、こ
れにより得た量子化出力について符号化処理を行い、画
像全体の符号量および画像全体の符号量および各色成分
別各ブロック毎の符号量を調べ、第2のステップではこ
の第1のステシブで得た画像全体の符号量と色成分別符
号量から最適化に必要な色成分別量子化幅の予測を行い
、第3のステップにおいて、前記各ブロックの符号量か
ら各ブロック毎の基準割当符号量ヲ求め、第4のステッ
プにおいて、前記予測した色成分別量子化幅を用いて前
記色成分別各ブロック毎の前記量子化を行う。そして、
第5のステップおいて、この第4のステップでの前記各
ブロック毎の量子化出力をそのブロックに対する割当符
号量に収まる範囲で可変長符号化するが、このステップ
における現在処理しようとするブロックでの割当符号量
は、当該現在可変長符号化処理しようとするブロックの
、直前に処理したブロックでの可変長符号化による符号
量とこのブロックでの割当符号量との差を求め、これを
繰り越し量として前記現在処理しようとするブロックで
の前記基準割当符号量に加算したものをあてる。
In the fifth case, the color image data separated by color component is divided into blocks each having a predetermined number of pixels, orthogonal transformation is sequentially performed for each divided block, and the output of this transformation is quantized by a quantization means, After that, this quantized output is given to a variable length encoding means for variable length encoding, and when encoding data, the quantization output is determined from the total amount of code to be stored and the statistics for each block determined in advance. When performing variable length encoding while controlling the code amount for each block according to the allocated code amount for each block, the quantization is performed using a provisional quantization width in the first step, and the resulting gain is The code amount of the entire image, the code amount of the entire image, and the code amount of each block for each color component are checked, and in the second step, the entire image obtained in the first step is encoded. The quantization width for each color component necessary for optimization is predicted from the code amount and the code amount for each color component, and in the third step, the standard allocated code amount for each block is calculated from the code amount for each block, In the fourth step, the quantization is performed for each block of each color component using the predicted quantization width of each color component. and,
In the fifth step, the quantized output for each block in the fourth step is variable-length encoded within the allocated code amount for that block. The allocated code amount is determined by calculating the difference between the code amount due to variable length encoding of the block processed immediately before the current block to be subjected to variable length encoding processing and the allocated code amount for this block, and carrying this forward. The amount added to the reference allocated code amount for the block to be currently processed is applied.

このように第5のケースは、初めに暫定的な量子化幅を
用いての量子化に基づく画面全体の総発生符号量、およ
び各色成分別の発生符号量、各色成分別前記各ブロック
の発生符号量の状態を知り、これらの情報と収めるべき
目的の総符号量とから、色成分別の最適量子化幅を予測
し、また、前記総符号量目標値をこの各色成分別の発生
符号量に応じて配分し、更にこの配分した各符号量と各
色成分別前記各ブロックの発生符号量とから、各色成分
別の各ブロック毎の基準割当符号量を決め、符号化処理
における各ブロックの符号化に当たってはそのブロック
の基準割当符号量に、その前のブロックでの符号化にお
ける符号量と割当符号量の差を繰り越し苗として加算し
て割当符号量とし、この割当符号量に収まる範囲で符号
化してゆくと云ったもので、統計処理時のデータに基つ
いて、各色成分別の最適な量子化幅を合理的に決定する
と共に、各色成分別の各ブロック毎の基準割当符号量と
を合理的に配分して定めてあり、また、先に処理したブ
ロックでの割当符号量の来泊化分を繰り越し分として後
のブロックの符号化に振り向けることができることから
、符号量を多く必要とする色成分であっても各ブロック
での符号化打ち切りか少なくなり、画質向上に寄与する
と共に、符号化処理の回数を規定回数に定めると符号化
に要する時間は一定とすることかできる。
In this way, in the fifth case, the total generated code amount for the entire screen based on quantization using a provisional quantization width, the generated code amount for each color component, and the generated code amount for each block for each color component are calculated. Knowing the state of the code amount, predicting the optimum quantization width for each color component from this information and the target total code amount to be stored, and also calculating the target value of the total code amount from the generated code amount for each color component. The standard allocation code amount for each block for each color component is determined from the allocated code amount and the generated code amount for each block for each color component, and the code for each block in the encoding process is determined. When converting, the difference between the coding amount in the previous block and the allocated code amount is added to the standard allocated code amount of the block as a carryover seedling to obtain the allocated code amount, and the code is allocated within the allocated code amount. Based on the data during statistical processing, the optimal quantization width for each color component is determined rationally, and the standard allocated code amount for each block for each color component is rationally determined. In addition, the amount of allocated code for the previously processed block can be carried forward and used for encoding subsequent blocks, so a large amount of code is not required. Even if the color component is a color component, the number of coding interruptions in each block is reduced, which contributes to improved image quality, and if the number of coding processes is set to a prescribed number, the time required for coding can be kept constant.

第6の場合では、圧縮率か設定されることにより、この
設定された圧縮率に応じて収めるべき目的の総符号量お
よび暫定的な量子化幅を決定し、その後に前記第5のケ
ースの方法を実施する。
In the sixth case, by setting the compression rate, the target total code amount and provisional quantization width to be accommodated are determined according to the set compression rate, and then, in the fifth case. Implement the method.

このように、最初に暫定的な量子化幅を用いての量子化
に基づく画面全体の総発生符号量、および各色成分別の
発生符号量、各色成分別前記各ブロックの発生符号量の
状態を知り、これらの情報と収めるべき目的総符号量と
から、各色成分別最適量子化幅を予測し、また、前記総
符号量目標値をこの各色成分別の発生符号量に応じて配
分し、更にこの配分した各符号量と各色成分別前記各ブ
ロックの発生符号量とから、各色成分別の各ブロック毎
の基準割当符号量を決め、符号化処理における各ブロッ
クの符号化に当たってはそのブロックの基準割当符号量
に、その前のブロックでの符号化における符号量と割当
符号量の差を繰り越し量として加算して割当符号量とし
、この割当符号量に収まる範囲で符号化してゆくと云っ
たもので、暫定的な量子化幅を用いての処理時のデータ
に基づいて、各色成分別の各ブロック毎の基準割当符号
量を合理的に配分して定めてあり、また、先に処理した
ブロックでの割当符号量の来泊化分を繰り越し分として
後のブロックの符号化に振り向けることかできることか
ら、符号量を多く必要とする色成分であっても各ブロッ
クでの符号化打ち切りが少なくなり、画質向上に寄与す
ると共に、符号化処理の回数を規定回数に定めると符号
化に要する時間は一定とすることかできる。
In this way, first, the status of the total generated code amount for the entire screen based on quantization using a provisional quantization width, the generated code amount for each color component, and the generated code amount for each block for each color component is determined. From this information and the target total code amount to be stored, predict the optimal quantization width for each color component, allocate the target total code amount according to the generated code amount for each color component, and further Based on the allocated code amount and the generated code amount of each block for each color component, the standard allocated code amount for each block for each color component is determined, and when encoding each block in the encoding process, the standard for that block is determined. The difference between the code amount in the encoding of the previous block and the allocated code amount is added to the allocated code amount as a carryover amount to obtain the allocated code amount, and encoding is performed within the allocated code amount. Based on the data at the time of processing using the provisional quantization width, the standard allocated code amount for each block for each color component is rationally allocated and determined, and the previously processed block Since the allocated code amount for the next block can be carried over and used for encoding subsequent blocks, even for color components that require a large amount of code, coding is less likely to be interrupted in each block. This contributes to improving image quality, and if the number of encoding processes is set to a prescribed number, the time required for encoding can be kept constant.

また、第7のケースでは、前記第5および第6のケース
において、前記暫定的な量子化幅は、選択設定した画面
あたりの総符号量に応じて予め定めた値を用いる。
Furthermore, in the seventh case, in the fifth and sixth cases, the provisional quantization width uses a predetermined value according to the selected total code amount per screen.

この結果、暫定的な量子化幅は収めるべき画面あたりの
総符号二に応した最適値に近いものとなり、より適正な
圧縮符号化が可能になる。
As a result, the provisional quantization width becomes close to the optimum value corresponding to the total number of codes per screen to be accommodated, and more appropriate compression encoding becomes possible.

適な量子化幅の予測と、各色成分別各ブロックの基準割
当符号量の決定に必要な統計量を得、これらの情報をも
とに符号化の処理に入り、順次符号化出力を見ながら、
処理しようとするブロックの基準割当符号量とそのブロ
ックの前の処理ブロックでの割当符号量の過不足分を合
わせて得られた当該処理しようとするブロックの割当符
号量内に収まるように、可変長符号化を打ち切ることで
ブロック毎に符号量を制御し、所望の符号量内で収まっ
た符号化出力を最終出力として得るようにしたものであ
る。
Obtain the statistics necessary to predict the appropriate quantization width and determine the standard allocated code amount for each block for each color component, and start the encoding process based on this information, sequentially checking the encoded output. ,
Variable so as to fit within the allocated code amount of the block to be processed, which is obtained by combining the standard allocated code amount of the block to be processed and the excess or deficiency of the allocated code amount in the processing block before that block. By discontinuing long encoding, the code amount is controlled for each block, and an encoded output within the desired code amount is obtained as the final output.

これは、次に示す考え方によるものである。This is based on the following idea.

従来例で説明したように、符号化するときの量子化係数
が特に大きかったり小さいとき、言い換えると特に空間
周波数の高いあるいは低い画像の場合においては、各ブ
ロックの統計量に応じて目的の符号量を比例配分するこ
とによって割当符号量を決定すると、その予測された量
子化係数を用いて実際に符号化を行うと輝度成分のブロ
ックにおいては割当符号量か不十分で色差成分のブロッ
クでは余分である、あるいはその逆になることがある。
As explained in the conventional example, when the quantization coefficient during encoding is particularly large or small, in other words, in the case of an image with a particularly high or low spatial frequency, the target code amount is determined according to the statistics of each block. When the allocated code amount is determined by proportional allocation of Yes, or vice versa.

すると、符号量の不十分たった色成分の方は符号化を途
中で打ち切られるので、当然画質か劣化する。このよう
な現象か発生するか否か、色成分における輝度成分での
割当符号量か不足するか否か、色成分における色差成分
での割当符号量か不足するかか否かは、式(2)のa 
と式(3)のa の大小関係と予測された量子化係数の
大小によって容易に判断することができるか、これは、
つまりはシステムと画像によって決まるものである。そ
こで、符号化処理済みのブロックでの割当符号量の余分
な分を、以降のブロックの割当符号量に回すとともに、
前述の関係から各色成分毎の符号量の比か変わらないよ
う、各色成分別に量子化幅の予測を行った後、これに従
ってブロック毎の符号量制御を行いながら符号化を実施
する。
Then, the encoding of the color component for which the amount of code is insufficient is aborted midway, and the image quality naturally deteriorates. Whether or not such a phenomenon occurs, whether or not the allocated code amount for the luminance component in the color component is insufficient, and whether or not the allocated code amount for the chrominance component in the color component is insufficient can be determined using the formula (2 ) of a
This can be easily determined based on the magnitude relationship of a in equation (3) and the magnitude of the predicted quantization coefficient.
In other words, it depends on the system and the image. Therefore, the excess code amount allocated for the block that has already been encoded is used as the allocated code amount for subsequent blocks.
From the above-mentioned relationship, after predicting the quantization width for each color component so that the ratio of the code amount for each color component does not change, encoding is performed while controlling the code amount for each block according to the prediction.

この各色成分毎に予測した量子化幅を用いることにより
、各色成分毎の発生符号量の比は統計量を得たときの比
と変わらないので、各ブロック毎の割り当て符号量の決
定は単に統計量に応じて目的とする符号量を比例配分す
ればよくなり、各色成分ともに良好な結果か得られる。
By using this predicted quantization width for each color component, the ratio of the generated code amount for each color component is the same as the ratio when the statistics were obtained, so determining the allocated code amount for each block is simply done using statistics. It is only necessary to proportionately distribute the target code amount according to the amount, and good results can be obtained for each color component.

各色成分毎の量子化幅の予測は式(2)1式(3)から
線形予測すれば良い。
The quantization width for each color component can be predicted by linear prediction using equations (2) and (3).

従って、この発明によれば、幅広い空間周波数の画像に
対し、画質をなるべく損なわずに、簡単な回路により一
定の処理時間内で一定の符号量内に収まるように符号化
できるようになる。
Therefore, according to the present invention, it becomes possible to encode images with a wide range of spatial frequencies within a certain amount of code within a certain processing time using a simple circuit without degrading the image quality as much as possible.

〔実施例〕〔Example〕

以下、本発明の実施例について、図面を参照して説明す
る。カラー画像データを圧縮符号化する場合において、
予測した最適量子化係数で量子化し、これを符号化する
にあたり、輝度成分や色差成分等の各色成分毎に規定の
符号量範囲内に収まるようにそれぞれ符号化処理した場
合、色成分によっては符号量に余裕があり、他方では不
足すると云ったことが生じることがあり、このような場
合では不足した色成分の側では高い周波数成分をカット
する事態が続出し、一方の色成分ではこのような事態が
生ぜずにむしろ符号量が余り気味であるというような不
合理が生じる。本発明はこれを総発生符号量と各色成分
別の発生符号量より、各色成分別の割当符号量を比例配
分して定め、余り気味となる可能性のある色成分や、不
足気味となる色成分が生じないように、適正に割振り、
これによって割当符号量の合理的な配分を行うことかで
きるようにし、以て画質の向上を図る。
Embodiments of the present invention will be described below with reference to the drawings. When compressing and encoding color image data,
When quantizing with the predicted optimal quantization coefficient and encoding it, if each color component such as luminance component or chrominance component is encoded so that it falls within the specified code amount range, depending on the color component, the code may be different. There may be cases where there is a surplus in the amount, but there is a shortage on the other side, and in such cases, the situation where the high frequency components are cut on the side of the insufficient color component occurs one after another, and on the other side, the high frequency components are cut. An unreasonable situation arises in which the amount of code becomes too large rather than causing the situation to occur. The present invention determines this by proportionally distributing the allocated code amount for each color component from the total generated code amount and the generated code amount for each color component, and determines this by proportionally distributing the allocated code amount for each color component. Appropriately allocate so that no components occur,
This makes it possible to rationally allocate the allocated code amount, thereby improving image quality.

初めに本発明を分かり易くするために、本発明の基本的
な考え方を説明しておく。すなわち、本発明は例えば、
1つのカラー画像(画面)を色成分別に分け、これら色
成分別のカラー画像データを所定画素数のブロックに区
分し、これら色成分別各ブロックを順に、ブロック単位
でそのブロックの構成画素のデータを直交変換して周波
数成分側に分離し、これを更に量子化し、圧縮符号化し
、圧縮符号化した各色成分の総符号量が目的の符号量に
収まるように符号化するにあたり、最初に色成分に分離
されたカラー画像データに対して統計処理を行い、この
統計処理により各色成分別の最適な量子化幅の予測と、
各色成分別の発生符号量に基つく各色成分別の割当符号
量比例配分および各色成分別各ブロックの基準割当符号
量の決定に必要な統計量を得る。そして、これらの情報
をもとに各色成分毎の各ブロック別基準割当符号量を定
め、この各色成分毎の各ブロック別基準割当符号量内に
収まるように各色成分毎の各ブロックについて符号化処
理を実施する。
First, in order to make the present invention easier to understand, the basic idea of the present invention will be explained. That is, the present invention, for example,
One color image (screen) is divided into color components, the color image data for each color component is divided into blocks of a predetermined number of pixels, and each color component block is sequentially divided into data of the constituent pixels of that block in block units. is orthogonally transformed to separate it into frequency components, which is further quantized, compression encoded, and encoded so that the total code amount of each compression encoded color component falls within the target code amount. Statistical processing is performed on the separated color image data, and this statistical processing predicts the optimal quantization width for each color component.
Statistics necessary for determining the proportional allocation of the allocated code amount for each color component based on the generated code amount for each color component and the standard allocated code amount for each block for each color component are obtained. Then, based on this information, the standard allocated code amount for each block for each color component is determined, and encoding processing is performed for each block for each color component so that it falls within the standard allocated code amount for each block for each color component. Implement.

符号化処理は予測した各色成分毎の量子化幅を用いて色
成分別に且つ、ブロック順に順次行い、その符号化出力
を見ながら、各ブロックの基準割当符号量と、その処理
ブロックの1つ前の処理ブロックでの発生符号量におけ
る割当符号量に対しての過不足量(繰り越し分)を合わ
せて得られたそのブロックの割当符号量内に収まるよう
に、可変長符号化によって得られる符号量を監視しなが
ら、符号化を進め、EOB符号を含め、発生符号量か割
当符号量に達するとそのブロックの符号化は終了させる
か、直流成分は割当符号量を越える場合でも必ず符号化
させ、そのときの割当符号量に対する過不足量を記憶し
ておき、次のブロックの符号化に移ってゆくというもの
である。
Encoding processing is performed sequentially for each color component and in block order using the predicted quantization width for each color component, and while looking at the encoded output, the standard allocated code amount for each block and the block preceding the processing block are determined. The amount of code obtained by variable-length encoding is determined so that the amount of code generated in the processing block falls within the amount of allocated code for that block, which is obtained by adding up the amount of excess or deficiency (carryover amount) for the amount of allocated code in the amount of code generated in the processing block. Encoding is continued while monitoring the block, including EOB codes, and when the generated code amount or the allocated code amount is reached, the encoding of that block is terminated, or the DC component is always encoded even if it exceeds the allocated code amount. The amount of excess or deficiency with respect to the allocated code amount at that time is stored, and the next block is encoded.

統計処理は各色成分別の最適な量子化幅を予測するとと
もに、各色成分毎の符号量を最適に割振り、さらにこれ
に基づく各色成分毎の各ブロック別基準割当符号量を決
定するための基準となる統計量を得るだめのものである
Statistical processing predicts the optimal quantization width for each color component, optimally allocates the amount of code for each color component, and based on this, determines the standard allocated amount of code for each block for each color component. This is the only way to obtain statistics.

統計処理により得られた最適化された量子化幅を、次の
符号化処理で使用することで、はぼ目的の総符号量に近
付けることができるか、1画像のデータ量の上限が規定
されている場合、1バイトはおろか、1ビツトでも目的
の符号量をオーバすることはできない。
By using the optimized quantization width obtained through statistical processing in the next encoding process, it is possible to approach the desired total amount of code, or whether there is an upper limit on the amount of data for one image. In this case, the target code amount cannot be exceeded by even 1 bit, let alone 1 byte.

そこで、ブロック毎の割当符号量による制御を行う。こ
れは符号化を行ったときの符号量が目的の符号量をオー
バーしたときの微調整に使用するものであって、各ブロ
ック毎の標準的な割当符号量である基準割当符号量を決
め、この基準割当符号量に、そのブロックの1つ前の処
理ブロックでの割当符号量に対する発生符号量を差し引
いた残りを繰り越し分として貰い、この繰り越し分を加
えて補正した割当符号量を当該ブロックでの符号化処理
の最大枠として、特別の場合を除き、これに収まる範囲
で符号化するよう符号化制御を行う。
Therefore, control is performed based on the allocated code amount for each block. This is used for fine adjustment when the code amount during encoding exceeds the target code amount.The standard allocated code amount, which is the standard allocated code amount for each block, is determined. The amount of code generated by subtracting the amount of code generated from the amount of allocated code in the processing block immediately before the block is obtained from this standard allocated amount of code, and the remaining amount is obtained as a carryover amount. Except in special cases, encoding is controlled so that encoding is performed within the maximum frame for encoding processing.

この繰り越しによる割当符号量の調整は、符号化を行っ
たときの符号量かブロック毎に異なるので、余りの生じ
るブロックではその余り分を、不足の生じるブロックに
融通して、全体として目的の符号量に収まるように合理
的に配分するためである。これにより、基準符号量をオ
ーバしたときの微調整の機能が得られることになる。各
ブロックの符号化において低い周波数成分から高い周波
数成分に順次、符号化しながら、ガイドライン(1ブロ
ツク当たりの割当符号量)を越えた時点で、それ以上の
高周波成分の符号化を打ち切る。
Adjustment of the allocated code amount by this carryover differs depending on the code amount at the time of encoding, so in blocks where there is a surplus, the surplus is transferred to the block where there is a shortage, so that the overall target code is achieved. This is to rationally allocate the amount within the specified amount. This provides a function for fine adjustment when the standard code amount is exceeded. Each block is encoded sequentially from low frequency components to high frequency components, and when the guideline (allocated code amount per block) is exceeded, the encoding of any further high frequency components is discontinued.

これは、視覚的な影響を最小にするために、各ブロック
の高い周波数成分から省略して行くためである。この交
流成分の打ち切りに関しては、高い周波数成分は特に周
波数か高くなる程、視覚的影響が少ないと云う傾向があ
ることを逆に利用している。
This is because high frequency components of each block are omitted to minimize visual impact. Regarding the termination of the alternating current component, the fact that high frequency components tend to have less visual impact especially as the frequency becomes higher is utilized.

EOBを含めて発生した符号量が、割り当てられた符号
量よりも少なかった、あるいはちょうど同じだったブロ
ックは、問題なく符号化を終了、つまり、EOBを出力
する。このようにして、その余りか生じたときは次のブ
ロックの基準割当符号量に加え、このブロックでの割当
符号量とする。
For blocks whose generated code amount including EOB is less than or exactly equal to the allocated code amount, encoding is completed without any problem, that is, EOB is output. In this way, if there is a surplus, it is added to the standard allocated code amount for the next block and is used as the allocated code amount for this block.

途中でオーバーしてしまうブロックは符号化を打ち切り
、そのブロックの符号化を終了、つまり、EOBを出力
する。
Encoding is aborted for a block that exceeds the limit on the way, and the encoding of that block is terminated, that is, an EOB is output.

極端に圧縮率を高くしない限り現実にはあり得ないが、
万一、与えられた割当符号量が直流成分さえも符号化す
るに足りない場合には、直流成分のみは符号化を実施し
、そのブロックの符号化を終了、つまり、EOBを出力
する。そして、足りなかった符号量は不足分として、次
のプロ・ツクに繰り越し、その不足分をそのブロックの
基準割当符号量から減し、そのブロックの割当符号量と
する。この時、EOBも符号の−っであるから、EOB
も含めて割当符号量内に収まるようにする。
This is not possible in reality unless the compression ratio is extremely high, but
In the unlikely event that the given allocated code amount is insufficient to encode even the DC component, only the DC component is encoded and the encoding of that block is completed, that is, an EOB is output. Then, the insufficient amount of code is carried over to the next program as a shortage, and the shortage is subtracted from the standard allocated code amount of that block to become the allocated code amount of that block. At this time, since EOB also has the sign -, EOB
The amount of code including the amount of code should be within the allocated code amount.

このように、割当符号量を無駄にしないようにするのが
本発明の目的であり、発生符号量の割当符号量に対する
余剰分を以降のプロ・ツクの割当符号量へと繰り越すと
ともに、統計量を得たときの各ブロック毎の統計量の比
が維持されるように各色成分毎の量子化幅の予測を実施
することにより、実際に発生する符号量に対して各プロ
・ツク毎の割り当て符号量がより妥当なものとなり、各
色成分ともに良好な結果が得られる。
In this way, the purpose of the present invention is to prevent the allocated code amount from being wasted, and to carry over the surplus of the generated code amount to the allocated code amount for subsequent programs, and to By predicting the quantization width for each color component so that the ratio of statistics for each block is maintained when obtaining The code amount becomes more reasonable, and good results can be obtained for each color component.

本発明は基本的には、「統計処理」と「符号化処理」の
2つを行って符号化を終了する2ノずス方式と称する方
式を採用しているもので、ある量子化幅で量子化してこ
れを可変長符号化するに際し、各ブロックに割り当てた
基準割当符号量を一つの基準とし、各ブロックでの発生
符号量にばらつきかあるのを、次のブロックで吸収する
二とで調整しようと云うもので、この調整したものを割
当符号量とし、この割当符号量の範囲でブロックでの符
号化を実施し、割当符号量を越えるときはそのブロック
の符号化を打ち切るようにする。しかし、画像データは
直交変換により直流成分と交流成分に分解されおり、視
覚的に影響の大きい直流成分については符号量が仮に割
当符号量を越えても符号化打ち切りは行わず、次のブロ
ックでの割当符号量をそのオーバした分たけ差し引き、
また、交流成分に入って割当符号量をオーバする危険が
生じた場合は符号化を打ち切る。また、符号化により発
生した符号量か割当符号量に満たないときはその余剰分
を、次のブロックの割当符号量に加えて、当該次のブロ
ックでの割当符号量を多くする。このようにして、一つ
前の処理ブロックでの符号量が割当符号量に対して過不
足を生じた場合に、その過不足分を次のブロックの割当
符号量に反映させ、調整する。
The present invention basically employs a method called the 2-nozu method in which encoding is completed by performing two processes: "statistical processing" and "encoding processing." When quantizing and variable-length encoding this, the standard allocated code amount assigned to each block is used as a standard, and any variation in the code amount generated in each block is absorbed by the next block. The adjusted code amount is set as the allocated code amount, and block encoding is performed within this allocated code amount, and when the allocated code amount is exceeded, the encoding of that block is terminated. . However, image data is decomposed into DC and AC components by orthogonal transformation, and even if the code amount exceeds the allocated code amount for the DC component, which has a large visual impact, the coding will not be aborted and the next block will be processed. Subtract the allocated code amount by the excess amount,
Furthermore, if there is a risk that the amount of code will exceed the allocated code amount due to the alternating current component, the coding will be terminated. Further, when the amount of code generated by encoding is less than the allocated code amount, the surplus is added to the allocated code amount of the next block to increase the allocated code amount of the next block. In this way, when the amount of code in the previous processing block is over or under the allocated code amount, the excess or deficiency is reflected in the allocated code amount of the next block and adjusted.

一般に、特に空間周波数の高いあるいは低い画像の場合
において、各ブロックの統計量に応じて、画像あたりの
収めるべき目的の総符号量を比例配分することによって
各ブロックの基準割当符号量を決定し、予測された各色
成分共通のひとつの量子化係数を用いて実際に符号化を
行う従来方式を採用すると、輝度成分のブロックにおい
ては割り当て符号量か不十分て色差成分のブロックでは
余分であったり、あるいはその逆になることがあり、符
号量の不十分だった色成分の方は符号化を途中で打ち切
られることになって、当然画質劣化が生じるが、本発明
によれば幅広い空間周波数の画像に対し、画質をなるべ
く損なわずに、簡単な回路により一定の処理時間内で一
定の符号量内に収まるように符号化できるようになる。
In general, especially in the case of images with high or low spatial frequencies, the standard allocated code amount for each block is determined by proportionally allocating the total intended code amount to be stored per image according to the statistics of each block, If we adopt the conventional method of actually encoding using one quantization coefficient common to each predicted color component, the amount of allocated code may be insufficient for the luminance component block and redundant for the chrominance component block. Alternatively, the opposite may occur, and the encoding of color components with insufficient code amount is aborted midway, resulting in deterioration of image quality.However, according to the present invention, images with a wide range of spatial frequencies can be imaged. On the other hand, it becomes possible to perform encoding within a certain amount of code within a certain processing time using a simple circuit, without degrading the image quality as much as possible.

以上の原理を用いた本装置の実施例を説明する。An embodiment of this device using the above principle will be described.

第1図に本発明による画像データの符号化装置をディジ
タル電子スチルカメラに適用した一実施例を、また、第
2図には本発明による画像データの符号化装置の構成を
それぞれブロック図で示す。なお、本発明とは直接関係
のないディジタル電子スチルカメラの機構は図示および
説明を省略する。
FIG. 1 shows an embodiment in which an image data encoding device according to the present invention is applied to a digital electronic still camera, and FIG. 2 shows a block diagram of the configuration of the image data encoding device according to the present invention. . Note that illustrations and explanations of mechanisms of the digital electronic still camera that are not directly related to the present invention will be omitted.

第1図に示すように、デイ・ジタル電子スチルカメラ本
体(以下、電子カメラ本体と称する)1は画像を撮像す
る撮像系40と、この撮影系40の出力に対し、所定の
信号処理を行う信号処理回路60と、直交変換、線形量
子化、可変長符号化機能等を持ち、前記信号処理回路6
0の出力を圧縮符号化して出力する符号化回路80と、
この符号化回路80により符号化された画像データおよ
び量子化幅(またはこれに対応した情報)を記録媒体7
1に記録する記録系70と、所望のデータ圧縮率を設定
入力するスイッチ30、システム全体の制御を司る制御
回路90とから構成される。
As shown in FIG. 1, a digital electronic still camera body (hereinafter referred to as electronic camera body) 1 includes an imaging system 40 that captures images, and performs predetermined signal processing on the output of this imaging system 40. The signal processing circuit 60 has functions such as orthogonal transformation, linear quantization, variable length coding, etc.
an encoding circuit 80 that compresses and encodes the output of 0 and outputs it;
The image data and quantization width (or information corresponding to this) encoded by this encoding circuit 80 are stored on a recording medium 7.
1, a switch 30 for setting and inputting a desired data compression ratio, and a control circuit 90 for controlling the entire system.

電子カメラ本体1の操作部には画像の圧縮率を設定する
スイッチ30が設けられており、スイッチ30は制御回
路90に接続されている。
A switch 30 for setting an image compression rate is provided on the operating section of the electronic camera body 1, and the switch 30 is connected to a control circuit 90.

前記撮像系40は光学像を結像するためのレンズ40a
と、CCD等の撮像素子40bとを備える。前記信号処
理回路80は増幅およびノイズ除去等を行うアンプ60
aと、アナログ信号をディジタル信号に変換するA/D
変換器60bと、RAM等からなるバッファメモリ60
cと、色信号形成等を行うプロセス回路80dとを備え
る。符号化回路80は例えば、DCT  (離散コサイ
ン変換)等の直交変換を行う直交変換回路4、線形量子
化を行う量子化回路6、可変長符号化としてハフマン符
号化を行うハフマン符号化回路8を備え、更に量子化幅
予測回路12゜符号量算出回路14、符号量割当回路2
0.符号打切回路16および符号化回路80内の制御処
理を行う制御回路18とを有している。
The imaging system 40 includes a lens 40a for forming an optical image.
and an image sensor 40b such as a CCD. The signal processing circuit 80 includes an amplifier 60 that performs amplification, noise removal, etc.
a and an A/D that converts analog signals into digital signals.
A converter 60b and a buffer memory 60 consisting of RAM, etc.
c, and a process circuit 80d that performs color signal formation and the like. The encoding circuit 80 includes, for example, an orthogonal transform circuit 4 that performs orthogonal transform such as DCT (discrete cosine transform), a quantization circuit 6 that performs linear quantization, and a Huffman encoding circuit 8 that performs Huffman encoding as variable length encoding. In addition, a quantization width prediction circuit 12, a code amount calculation circuit 14, and a code amount allocation circuit 2 are provided.
0. It has a code truncation circuit 16 and a control circuit 18 that performs control processing within the encoding circuit 80.

前記記録系70はインタフェース回路70aおよび記録
媒体として用いられるICメモリを内蔵したメモリカー
ド71とからなる。メモリカード71は電子カメラ本体
1に対し、着脱可能となりでいる。
The recording system 70 includes an interface circuit 70a and a memory card 71 containing an IC memory used as a recording medium. The memory card 71 is removably attachable to the electronic camera body 1.

制御回路90はマイクロプロセッサ(MPtl)により
実現されている。
The control circuit 90 is realized by a microprocessor (MPtl).

第6図に電子カメラ本体1の外観を斜視図で示す。図は
双眼鏡形のものを示しており、48は操作部におけるL
CD  (液晶)表示器、3oは操作部におけるスイッ
チ30てあり、その他、テレ・ワイド切り替えスイッチ
、シャッタ操作ボタン50等が設けられている。また、
49はファインダである。
FIG. 6 shows a perspective view of the external appearance of the electronic camera body 1. The figure shows a binocular type, and 48 is L in the operation section.
A CD (liquid crystal) display, 3o, is a switch 30 in the operation section, and is also provided with a tele/wide changeover switch, a shutter operation button 50, and the like. Also,
49 is a finder.

LCD表示器48には制御回路90の制御のもとに撮影
モードやコマ数、日付、時間等、種々の値や状態か表示
される。本電子カメラでは、電子カメラ本体1の操作部
に設けられたスイッチ30を操作することにより、画像
の圧縮率を所望の値に設定することができる。すなわち
、制御回路9oには予め標準的な複数種の圧縮率情報か
設定されており、これがスイッチ30の操作により設定
される撮影可能枚数の値をもとに、装着されているメモ
リカード(記録媒体)の容量から、適用する圧縮率を求
め、この求めた圧縮率の値およびメモリカートに記録で
きる画像の枚数の値に換算されて操作部のLCD表示器
48に表示させるようになっている。そして、ユーザか
スイッチ30を押すと、制御回路9oはスイッチ30が
押される毎に、これらの値を変更する。
Under the control of the control circuit 90, the LCD display 48 displays various values and states such as the shooting mode, number of frames, date, and time. In this electronic camera, the image compression ratio can be set to a desired value by operating a switch 30 provided on the operating section of the electronic camera body 1. That is, the control circuit 9o is set in advance with standard multiple types of compression ratio information, and this is determined based on the value of the number of images that can be taken by operating the switch 30. The compression rate to be applied is determined from the capacity of the medium), and the determined compression rate value and the number of images that can be recorded in the memory cart are converted and displayed on the LCD display 48 of the operation unit. . When the user presses the switch 30, the control circuit 9o changes these values each time the switch 30 is pressed.

ユーザは表示される変更値を見ながら、所望の値のとこ
ろでスイッチ30を押すのを止めることにより、制御回
路90はその時点での撮影可能画像枚数指示値に対応す
る指示圧縮率を設定するようになっている。これは圧縮
率に応じて定まる画像当りの標準的な総符号量を制御回
路90が求めて、これを目的符号量設定情報として符号
化回路80に与えることで行う。また、トリガスイッチ
であるシャッタ操作ボタン50が押されることにより、
シャッタ機能が作動して撮像素子40bには被写体像が
結像され、撮像素子40bにはこの像に対応じて電荷像
が蓄積されるので、これを読出し制御することで撮像素
子40bから映像信号を得ることができる。これらの制
御も制御回路90か司る。
When the user stops pressing the switch 30 at the desired value while looking at the displayed change value, the control circuit 90 sets the command compression rate corresponding to the command value for the number of images that can be taken at that time. It has become. This is done by the control circuit 90 determining the standard total code amount per image determined according to the compression rate, and providing this to the encoding circuit 80 as target code amount setting information. In addition, when the shutter operation button 50, which is a trigger switch, is pressed,
When the shutter function is activated, a subject image is formed on the image sensor 40b, and a charge image is accumulated in the image sensor 40b corresponding to this image. can be obtained. These controls are also controlled by the control circuit 90.

第1図における撮像系40は、撮影レンズ40aやCC
D等の撮像デバイスよりなる撮像素子40bを有し、前
記撮影レンズ40aにより撮像素子40b上に結像され
た光学像を画像信号に変換して信号処理回路60に出力
するものである。信号処理回路6゜は増幅器80a 、
 A/D変換器60b1バッファメモリ60c1プロセ
ス回路8(ldが含まれ、このプロセス回路60dによ
り前記撮像素子40bにより得られた画像信号をカラー
信号のY、 R−Y  (以下、このR−YをCr(ク
ロマレッド)と略称する) 、B−Y(以下、このB−
YをCb (クロマブルー)と略称する)の各色成分に
分離させると共にガンマ補正やホワイトバランス処理等
を行うようにしである。
The imaging system 40 in FIG. 1 includes a photographic lens 40a and a CC
It has an image pickup device 40b made of an image pickup device such as D, and converts an optical image formed on the image pickup device 40b by the photographic lens 40a into an image signal and outputs it to the signal processing circuit 60. The signal processing circuit 6° includes an amplifier 80a,
An A/D converter 60b1, a buffer memory 60c1, and a process circuit 8 (ld) are included. (abbreviated as Cr (chroma red)), B-Y (hereinafter, this B-
In addition to separating Y into each color component of Cb (abbreviated as chroma blue), gamma correction, white balance processing, etc. are performed.

A/D変換器60bによりディジタル変換された撮像系
40の出力映像信号は、例えば、1フレ一ム分の容量を
有するバッファメモリ[1iOcに画像データか格納さ
れ、読み出されてプロセス回路60dに与えられること
により、輝度信号系であるY成分とクロマ(C:色差信
号)系であるCr、 Cb成分に分離される。バッファ
メモリ60cに格納された画像データは、例えば最初に
輝度系の信号について統計処理を行うべく、プロセス回
路によりプロセス処理して画像信号のY成分データを得
、これを符号化回路80に与えて、Y成分データについ
ての符号化処理を行い、該処理が終ったならば、次にク
ロマ系cr、Cb成分のデータについてプロセス処理し
た後、符号化処理を行う。
The output video signal of the imaging system 40 that has been digitally converted by the A/D converter 60b is stored in a buffer memory [1iOc] having a capacity for one frame, and is read out and sent to the process circuit 60d. As a result, it is separated into a Y component, which is a luminance signal system, and Cr and Cb components, which are chroma (C: color difference signal) systems. For example, the image data stored in the buffer memory 60c is first processed by a process circuit to obtain Y component data of the image signal in order to perform statistical processing on the luminance signal, and this is then supplied to the encoding circuit 80. , Y component data is performed, and once this processing is completed, chroma system cr and Cb component data are processed and then encoded.

信号処理回路60にはブロック化機能かあり、バッファ
メモリ60cより読み出され、プロセス処理されて得た
Y成分用およびCr、 Cb成分用の画像データ(1フ
レ一ム分、若しくは1フイ一ルド分)を、所定の大きさ
のブロックに分割するブロック化処理を行うことかでき
る。ここでは例としてブロックサイズは8×8画素とす
るが、このブロックサイズは8×8に限るものではなく
、またYとC(クロマ系)でブロックサイズが異なって
も良い。
The signal processing circuit 60 has a blocking function, and the image data for the Y component and the Cr and Cb components (one frame or one field) is read out from the buffer memory 60c and processed. It is possible to perform blocking processing to divide the data (minutes) into blocks of a predetermined size. Here, as an example, the block size is 8×8 pixels, but this block size is not limited to 8×8, and the block sizes may be different for Y and C (chroma system).

本実施例では、輝度系Yのデータを読出してブロック化
し、後段の処理系に与えて、このY成分データについて
の統計処理を行わせ、該統計処理が終了したならば、次
にクロマ系Cr、 Cb酸成分データについての統計処
理に入るべく該クロマ系Cr、 Cb酸成分データの読
出しとブロック化に入る。
In this embodiment, luminance system Y data is read out, divided into blocks, and given to the subsequent processing system to perform statistical processing on this Y component data.Once the statistical processing is completed, next chroma system Cr , In order to start statistical processing on the Cb acid component data, reading and blocking of the chroma-based Cr and Cb acid component data is started.

クロマ系のブロック化は、最初にCr成分の画像データ
についてすべてのブロック化を行い、その後に、Cb酸
成分画像データをブロック化して行くものとする。
In the chroma system blocking, all of the Cr component image data is first blocked, and then the Cb acid component image data is blocked.

符号化回路80は第2図に示す構成となっている。第2
図において、4は直交変換回路であり、ブロック化され
て入力された各画像データを受けて、この画像データに
対し、各ブロック毎に2次元の直交変換を行うものであ
る。直交変換としてはコサイン変換、サイン変換、フー
リエ変換、アダマール変換などが使用できる。直交変換
を行うことにより、変換係数としての画像データが得ら
れる。この変換係数としての画像データは直交変換であ
るが故に、画像の持つ空間周波数を周波数成分毎に分解
したデータとなる。
The encoding circuit 80 has a configuration shown in FIG. Second
In the figure, reference numeral 4 denotes an orthogonal transformation circuit, which receives input image data in blocks and performs two-dimensional orthogonal transformation on each block of this image data. As the orthogonal transformation, cosine transformation, sine transformation, Fourier transformation, Hadamard transformation, etc. can be used. By performing orthogonal transformation, image data as transformation coefficients can be obtained. Since the image data as the transform coefficient is orthogonally transformed, it is data obtained by decomposing the spatial frequency of the image into each frequency component.

6は量子化回路であり、前記直交変換回路4の出力する
画像データ(変換係数)を受けると、第1回目の量子化
では各色成分に応じて予め設定された各周波数成分毎の
量子化幅に、撮影モードに応じて予め設定された量子化
係数αを掛けて補正した量子化幅で、変換係数の量子化
を行い、第2回目では前回の処理により決定された最適
量子化係数αを用いて量子化を行う構成としである。
6 is a quantization circuit, which receives the image data (transform coefficients) output from the orthogonal transform circuit 4, and in the first quantization, quantization width for each frequency component is set in advance according to each color component. The transform coefficients are quantized using the quantization width corrected by multiplying by the quantization coefficient α set in advance according to the shooting mode, and in the second time, the optimal quantization coefficient α determined by the previous processing is quantized. This is a configuration in which quantization is performed using

8は可変長符号化回路であり、可変長符号化回路8は量
子化回路6の出力する前記量子化出力を可変長符号化す
るものである。可変長符号化としてはハフマン符号化、
算術符号化などを利用する。可変長符号化ではブロック
毎の符号量、画像全体の符号量などが画像毎に変化する
。どのような可変長符号化を用いるかは本発明とは直接
関係が無いか、ここではハフマン符号化を使用した一例
を示すこととする。
8 is a variable length encoding circuit, and the variable length encoding circuit 8 subjects the quantized output output from the quantization circuit 6 to variable length encoding. Huffman coding is used as variable length coding,
Use arithmetic encoding, etc. In variable length coding, the amount of code for each block, the amount of code for the entire image, etc. change for each image. Although the type of variable length encoding used is not directly related to the present invention, an example using Huffman encoding will be shown here.

可変長符号化回路8では、入力した量子化された変換係
数を第7図に示す順序でスキャンするジグザグ・スキャ
ンと呼ばれる手法により、低い周波数成分から高い周波
数成分への走査を行う。
The variable length encoding circuit 8 scans the input quantized transform coefficients from low frequency components to high frequency components by a method called zigzag scan in which the input quantized transform coefficients are scanned in the order shown in FIG.

第7図の走査順序の1番目の直流成分[DC]のデータ
は、直前に可変長符号化を行ったブロックの直流成分と
の差分値をハフマン符号化して出力する。交流成分[A
C3については第7図の走査順序の2番目から64番目
まで順番に変換係数を見て行き、変換係数が0でない(
すなわち、有効な)係数が出て来たらその直前に存在し
た連続した0(無効)の係数の数(ゼロラン)とその有
効係数の値とで2次元のハフマン符号化して出力すると
云った動作をする。
The data of the first DC component [DC] in the scanning order in FIG. 7 is output by Huffman encoding the difference value from the DC component of the block that has been subjected to variable length encoding immediately before. AC component [A
For C3, look at the conversion coefficients in order from the 2nd to the 64th in the scanning order in Figure 7, and if the conversion coefficient is not 0 (
In other words, when a valid (valid) coefficient appears, it is encoded into two-dimensional Huffman code using the number of consecutive 0 (invalid) coefficients that existed immediately before it (zero run) and the value of that valid coefficient, and then output. do.

また、ある係数以降64番目の係数まで連続して無効係
数が続く場合はプロ・ツクの終りを示すEOB  (エ
ンド・オブ・ブロック)の符号を出力する。また、打ち
切り信号か入力されると符号化を終了し、EOBを付加
して出力する。そして、その各符号について発生した符
号長を符号量算出回路14に出力する。
Further, if invalid coefficients continue after a certain coefficient up to the 64th coefficient, an EOB (end of block) code indicating the end of the program is output. Furthermore, when a truncation signal is input, encoding is terminated, and an EOB is added and output. Then, the code length generated for each code is output to the code amount calculation circuit 14.

符号量算出回路14は入力されたY、 Cr、 Cb各
色成分の各符号毎の符号長の積算を行い、Y、 Cr。
The code amount calculation circuit 14 integrates the code length for each code of the inputted Y, Cr, and Cb color components, and calculates Y, Cr.

Cb各成分の各ブロック毎の符号量データの収集と、各
色成分毎の符号量と、画像全体の符号量を計算し、この
各色成分毎の符号量と画像全体の符号量のデータについ
て量子化幅予測回路12に出力すると共に、各色成分毎
の符号量と画像全体の符号量のデータについては符号量
割当て回路20に出力する構成としである。
Collect the code amount data for each block of each Cb component, calculate the code amount for each color component, and the code amount for the entire image, and quantize the code amount data for each color component and the code amount for the entire image. The data is output to the width prediction circuit 12, and the data of the code amount for each color component and the code amount of the entire image is output to the code amount allocation circuit 20.

量子化幅子#j回路12は第1バスの開始にあたり、制
御回路18から目的とする符号量の情報を受け、この符
号量情報から先に説明した(4)式に基づく log (BRy +BRc ) za x log 
SF+b但し、BRは符号量(1画素あたりのビ・ント
数)、spは量子化係数、a、bは定数。
At the start of the first bus, the quantization width #j circuit 12 receives information on the target code amount from the control circuit 18, and uses this code amount information to calculate log (BRy +BRc) based on the equation (4) explained earlier. za x log
SF+b However, BR is the code amount (the number of bits per pixel), sp is the quantization coefficient, and a and b are constants.

の関係を用いて量子化係数αの初期値を設定し、量子化
回路6に出力し、更には第2バスの開始に先駆けて、符
号量算出回路14から入力された画像全体の符号量と、
1画像当りの許容される最大のデータ量である目的縁符
号量とから、例えば、(2)式、(3)式の関係を用い
、線形予測により目的縁符号量に近づけるのに最適な色
成分毎の量子化係数αを、今回実際に使用した量子化係
数を勘案して予測するものである。
The initial value of the quantization coefficient α is set using the relationship shown in FIG. ,
From the target edge code amount, which is the maximum allowable data amount per image, for example, using the relationships of equations (2) and (3), calculate the optimal color to get close to the target edge code amount by linear prediction. The quantization coefficient α for each component is predicted by taking into account the quantization coefficient actually used this time.

ここで、量子化係数を如何にして最適な値にするかが、
重要な課題となるので、この点について少し説明する。
Here, how to set the quantization coefficient to an optimal value is
Since this is an important issue, I will explain this point a little.

画像データを前処理し、この出力を量子化し、この量子
化出力を可変長符号化する場合、この量子化の量子化幅
を変化させると発生する符号量が変化することは良く知
られている。これは、/%フマン符号化に代表される可
変長符号化は、符号化するデータの発生確率の偏りを利
用してそのデータを表現するのに必要な符号量を減少さ
せると云うものであることから、前記「量子化幅を変化
させる」と云うことは、量子化値の発生確率を変化させ
ることでもあるから、量子化幅を変化させることにより
発生符号量も変化することかわかる。
It is well known that when image data is preprocessed, this output is quantized, and this quantized output is variable-length coded, the amount of code generated changes when the quantization width of this quantization is changed. . This means that variable length coding, typified by human coding, uses the bias in the probability of occurrence of data to be coded to reduce the amount of code required to represent that data. Therefore, since "changing the quantization width" also means changing the probability of occurrence of a quantized value, it can be seen that by changing the quantization width, the generated code amount also changes.

ところで、同じ量子化幅で同一の符号化を行っても、そ
のときの画像データによって発生符号量は異なる。しか
し、1つの画像データに対して量子化幅を変化させて同
一の符号化を行った場合は量子化幅と、発生符号量との
間には一定の関係か得られる。また、多くの画像データ
で量子化幅と発生符号量の関係を求めると、最も発生頻
度の高い関係が統計的に得られることが明らかになった
By the way, even if the same encoding is performed with the same quantization width, the amount of generated code will differ depending on the image data at that time. However, when the same encoding is performed on one image data by changing the quantization width, a certain relationship is obtained between the quantization width and the amount of generated code. Furthermore, it has become clear that when the relationship between the quantization width and the amount of generated code is determined for a large amount of image data, the relationship with the highest frequency of occurrence can be statistically obtained.

具体的には多くの場合、次の関係が得られた。Specifically, in many cases, the following relationships were obtained.

すなわち、ある量子化幅に対する相対的な比をSPとし
、発生符号量1画素あたりのビット数(ビ・ソトレート
)で表わしてこれをBRとすると上記(1)式の関係が
成立する。(1)式において、aは同一の符号化であれ
ば、画像によらず略一定であり、bは画像に依存する。
That is, if the relative ratio to a certain quantization width is SP, and the amount of generated code is expressed as the number of bits per pixel (bi-sortorate), and this is BR, the relationship of equation (1) above holds true. In equation (1), if the encoding is the same, a is approximately constant regardless of the image, and b depends on the image.

このbの値は画像により、一定の分布を持ち、この発生
頻度分布から代表的なりが得られる。
The value of b has a certain distribution depending on the image, and a representative value can be obtained from this distribution of frequency of occurrence.

故に(1)式の関係から最適な量子化係数を求めること
ができる。
Therefore, the optimal quantization coefficient can be found from the relationship in equation (1).

上記符号量割当回路20は符号量算出回路14から入力
された各色成分毎の画像データの符号量、各色成分別各
ブロック毎の符号量、画像全体の符号量と、目的縁符号
量とから各色成分別各ブロック毎の割当符号量を算出し
て符号化打切回路1Bに出力するものである。ここでの
算出の方法は、例えば、各色成分別各ブロック毎の符号
量の比で、目的縁符号量を比例配分する。例えば、ある
ブロックの符号量と目的縁符号量との乗算を行い、それ
を画像全体の符号量で割ることにより、そのブロックの
基準割当符号量を決定する。或いは、目的縁符号量を各
色成分別符号量で比例配分し、これをその色成分各ブロ
ックの発生符号量で比例配分する。この結果、各ブロッ
クの基準割当符号量は、そのブロックでの実際の符号量
に応じて符号量か少い場合はそれ相応に間に合う程度に
抑えられ、符号量の多いブロックにはそれ相応に多く割
り当てられる。
The code amount allocation circuit 20 calculates each color from the code amount of the image data for each color component inputted from the code amount calculation circuit 14, the code amount for each block for each color component, the code amount of the entire image, and the target edge code amount. The allocated code amount for each component block is calculated and outputted to the encoding abort circuit 1B. The calculation method here is, for example, to proportionally allocate the target edge code amount based on the ratio of the code amount for each block for each color component. For example, by multiplying the code amount of a certain block by the target edge code amount and dividing it by the code amount of the entire image, the standard allocated code amount of the block is determined. Alternatively, the target edge code amount is proportionally distributed by the code amount for each color component, and this is proportionally distributed by the generated code amount for each block of that color component. As a result, the standard allocated code amount for each block is suppressed according to the actual code amount in that block, so that if the code amount is small, it will be kept in time, and if the code amount is small, it will be increased accordingly. Assigned.

符号量割当回路20は符号量情報テーブルとブロック割
当符号量データテーブルとを持ち、符号量情報テーブル
における該当ブロック位置の符号量情報を符号量算出回
路14から入力された符号量情報に書き替える一方、符
号量算出回路14から入力された各ブロック毎の符号量
および画像全体の符号量と、目的縁符号量とから各色成
分別品ブロックの基準割当符号量を算出し、この算出し
た各ブロックの基準割当符号量のデータをブロック割当
符号量データテーブルに格納する。このブロック割当符
号量データテーブルの各ブロック別の基準割当符号量は
、該当のブロックが可変長符号化処理される際に符号化
打切回路16に与えられる。
The code amount allocation circuit 20 has a code amount information table and a block allocation code amount data table, and rewrites the code amount information of the corresponding block position in the code amount information table with the code amount information input from the code amount calculation circuit 14. , calculates the standard allocated code amount for each color component block from the code amount for each block and the code amount for the entire image input from the code amount calculation circuit 14, and the target edge code amount, and calculates the standard allocated code amount for each color component block. The data of the standard allocated code amount is stored in the block allocated code amount data table. The standard allocated code amount for each block in this block allocated code amount data table is given to the encoding abort circuit 16 when the corresponding block is subjected to variable length encoding processing.

符号化打切回路16は、符号量割当回路20からの上記
該当ブロックの基準割当符号量に、このブロックの1つ
前に処理したブロックでの割当符号量に対する発生符号
量の差である過不足量を、前ブロックからの繰り越し分
として加えて、この該当ブロックでの割当符号量とする
と共に、符号量割当回路20からの各ブロックの符号長
を割当符号量から減算し、割当符号量の残りが、送出す
べき符号量とEOBの符号との合計符号量より小さくな
った場合には打切り信号を出力して可変長符号化回路8
に与え、そのブロックの符号化を終了し、該ブロックの
割当符号量から送出した符号量を減じてその値を割当符
号量の余りとして保持すると云った機能を有する。従っ
て、符号化打切回路16てはこの割当符号量を参照し、
入力された送出すべき符号量およびEOBの符号を送出
しても割当符号量を越えない場合は、打切りは行われず
、そのブロックの符号化を終了し、該ブロックの割当符
号量から送出すべき符号量を減して、その値を割当符号
量の余りとして保持すると云った動作を行う。また、符
号化打切回路16ではこの割当符号量を参照し、入力さ
れた送出すべき直流成分の符号とEOBの符号を送出す
るのに割当符号量か十分でない場合には、この2つの符
号を送出した後、そのブロックの符号化を終了し、該ブ
ロックの割当符号量から送出した符号量を減する。すな
わち、割当符号量の余りは負の値として保持すると云っ
た動作を行う。
The encoding abort circuit 16 adds an excess/deficiency amount to the reference allocated code amount of the corresponding block from the code amount allocation circuit 20, which is the difference between the generated code amount and the allocated code amount in the block processed one block before this block. is added as a carryover from the previous block to determine the allocated code amount for this block, and the code length of each block from the code amount allocation circuit 20 is subtracted from the allocated code amount, and the remaining allocated code amount is , when the amount of codes to be transmitted and the EOB code become smaller than the total code amount, an abort signal is output and the variable length encoding circuit 8
It has a function to complete the encoding of the block, subtract the transmitted code amount from the allocated code amount of the block, and hold that value as the remainder of the allocated code amount. Therefore, the encoding abort circuit 16 refers to this allocated code amount,
If the input code amount to be transmitted and the EOB code sent do not exceed the allocated code amount, the block is not truncated, the encoding of that block is finished, and the block should be sent from the allocated code amount. An operation is performed in which the amount of code is reduced and that value is held as the remainder of the allocated amount of code. In addition, the encoding abort circuit 16 refers to this allocated code amount, and if the allocated code amount is not sufficient to send out the input DC component code and EOB code, these two codes are After sending out the block, the coding of that block is finished, and the sent code amount is subtracted from the allocated code amount of the block. That is, the remainder of the allocated code amount is held as a negative value.

10は符号出力回路であり、この符号出力回路10は可
変長符号化回路8より入力される可変長の符号をつなぎ
合わせるもので、この繋ぎ合わせた符号をメモリカード
等の記録媒体にて構成される記録系22に書き込むよう
に機能する。
10 is a code output circuit, and this code output circuit 10 connects the variable length codes inputted from the variable length encoding circuit 8. The code output circuit 10 connects the variable length codes inputted from the variable length encoding circuit 8, and stores the connected codes in a recording medium such as a memory card. It functions to write to the recording system 22 that is stored in the memory.

本システムでは撮影モードに応じて定めた各色成分に共
通な初期時用標準の量子化係数αを使用して最初に統計
処理を行い(第1バス)、最適化するに必要なブロック
毎の情報量や各色成分毎  −の情報量、画像全体の情
報量等を調べ、次にこの統計処理により得た情報をもと
に最適化された符号化を行うための処理に入る(第2バ
ス)。そのため、最初に画像のブロック化、このブロッ
ク化された画像の要素に対する各色成分に共通な標準の
量子化係数αを使用しての量子化、量子化により得られ
た変換係数の可変長符号化、そして、この可変長符号化
により得られる各ブロックの各要素の符号量情報と、各
色成分毎の符号量と、画像全体の符号量情報より、各色
成分毎に最適な符号量にするのに必要な符号化係数αの
予測、各色成分毎に割り当てる符号量の比例配分、この
配分された符号量とその色成分の各ブロックでの発生符
号量に基づく該各ブロックに対する基準割当符号量の決
定、これらに基づく処理対象画像への最適符号化の処理
モードへの移行、この処理モードの実施における画像の
ブロック化処理、このブロック化された画像の要素に対
する前記各色成分毎の予測量子化係数αを使用しての量
子化処理、この量子化により得られた変換係数の可変長
符号化、各ブロックに対する基準割当符号量とそのブロ
ックの1つ前の処理ブロックからの繰越符号量を加えた
割当符号量内での当該可変長符号化処理制御、処理対象
画像の符号化情報の保存のため、当該可変長符号化処理
制御されて得られた可変長符号符号情報の出力処理と云
った手順を実施させるが、その全体の制御管理は図にお
ける制御回路18により行うようにしであるものとする
。尚、制御回路18のこのような機能はマイクロプロセ
ッサ(MPU)を使用することで容易に実現できる。
This system first performs statistical processing (first bus) using the initial standard quantization coefficient α that is common to each color component determined according to the shooting mode, and then uses the information for each block that is necessary for optimization. The amount of information, the amount of information for each color component, the amount of information for the entire image, etc. are checked, and then processing begins to perform optimized encoding based on the information obtained through this statistical processing (second bus). . Therefore, we first block the image, quantize the elements of this blocked image using a standard quantization coefficient α common to each color component, and then variable-length encode the transform coefficients obtained by quantization. Then, from the code amount information of each element of each block obtained by this variable length encoding, the code amount for each color component, and the code amount information for the entire image, it is possible to obtain the optimal code amount for each color component. Predicting the necessary coding coefficient α, proportionally allocating the amount of code to be allocated to each color component, and determining the standard amount of allocated code for each block based on the allocated amount of code and the amount of code generated in each block for that color component. , transition to the processing mode of optimal encoding for the image to be processed based on these, blocking processing of the image in implementing this processing mode, prediction quantization coefficient α for each color component for the elements of this blocked image Quantization processing using , variable-length encoding of the transform coefficients obtained by this quantization, allocation of the standard allocated code amount for each block plus the carryover code amount from the processing block immediately before that block. In order to control the variable length encoding process within the code amount and to save the encoded information of the image to be processed, the procedure of outputting the variable length code code information obtained by controlling the variable length encoding process is performed. However, it is assumed that the entire control management is performed by the control circuit 18 in the figure. Incidentally, such a function of the control circuit 18 can be easily realized by using a microprocessor (MPU).

以上が符号化回路80の構成である。The above is the configuration of the encoding circuit 80.

第1図における記録系70はインタフェース回路70a
と、これに着脱自在に接続される記録媒体71があり、
符号化回路80により符号化されて出力された画像デー
タおよび量子化幅(またはこれに対応した情報)はイン
タフェース回路70aを介して記録媒体71に記録され
る構成となっている。
The recording system 70 in FIG. 1 is an interface circuit 70a.
There is a recording medium 71 that is detachably connected to this.
The image data and quantization width (or information corresponding thereto) encoded and output by the encoding circuit 80 are recorded on the recording medium 71 via the interface circuit 70a.

次に上記第1図および第2図に示す構成の本装置の作用
を説明するが、全体の概要を掴むために初めに動作遷移
図である第8図を参照して基本動作を説明する。
Next, the operation of the present apparatus having the structure shown in FIGS. 1 and 2 will be described. In order to get an overall overview, the basic operation will first be explained with reference to FIG. 8, which is an operation transition diagram.

カメラの使用者がカメラを使用するにあたり、スイッチ
30を操作して所望とする撮影可能枚数を設定する。こ
れにより設定撮影可能枚数に応じ、制御回路90が最適
符号量を求めて、これを目的符号量設定情報として符号
化回路80に与える。このようにして撮影可能枚数が設
定される。
When using the camera, a camera user operates a switch 30 to set the desired number of images that can be taken. Thereby, the control circuit 90 determines the optimum code amount according to the set number of images that can be photographed, and provides this to the encoding circuit 80 as target code amount setting information. In this way, the number of images that can be taken is set.

次に撮影を行うと、撮影レンズ40aの後方におかれた
撮像素子40b上に被写体像が光学像として結像される
。そして、この撮像素子40bはこの結像された光学像
を画像信号に変換して出力する。
When a photograph is taken next, the subject image is formed as an optical image on the image sensor 40b placed behind the photographic lens 40a. The image sensor 40b converts the formed optical image into an image signal and outputs the image signal.

撮像素子40bにより得られた画像信号は信号処理回路
60に入力され、ここで信号処理回路60内の増幅回路
60aによる増幅、A/D変換器60bによるA/D変
換後、バッファメモリ60cに一時保持される。そして
、この後、バッファメモリ80cから読み出され、信号
処理回路60内のプロセス回路60dにより帯域補正、
色信号形成等の処理が行われる。
The image signal obtained by the image sensor 40b is input to the signal processing circuit 60, where it is amplified by the amplifier circuit 60a in the signal processing circuit 60, A/D converted by the A/D converter 60b, and temporarily stored in the buffer memory 60c. Retained. Thereafter, it is read out from the buffer memory 80c, and subjected to band correction by the process circuit 60d in the signal processing circuit 60.
Processing such as color signal formation is performed.

ここで、後の1バス目の処理がY(輝度成分) 、Cr
、 Cb (クロマ系、いずれも色差成分)信号の順序
で行われるため、色信号形成もこれに合わせて行われる
。すなわち、画像信号は8×8画素のマトリックスでブ
ロック化されて読み出され、プロセス回路ではこのブロ
ック化された画像信号データから Y成分、 Cr成分
(R−成分)、Cb酸成分 B−Y成分)の順序でこれ
ら各色成分の信号を分離させると共に、カンマ補正やホ
ワイトバランス処理等を行う。
Here, the subsequent processing of the first bus is Y (luminance component), Cr
, Cb (chroma system, both are color difference components) signals are performed in this order, so color signal formation is also performed in accordance with this order. That is, the image signal is read out in blocks of 8 x 8 pixel matrices, and the process circuit extracts Y component, Cr component (R-component), Cb acid component, B-Y component from this blocked image signal data. ), the signals of each color component are separated, and comma correction, white balance processing, etc. are performed.

プロセス回路60clにより分離された8×8のマトリ
ックスのブロック化画像信号における各色成分の画像信
号データは、符号化回路80に入力される。これにより
、1フレ一ム分(若しくは]フィールド分)の画像デー
タは、上記所定の大きさのブロックに分割されて順次、
符号化回路80に入力される。尚、プロセス回路EiO
clにより処理された各色成分の画像信号は、Y、 C
r、 Cbの各色成分別にバッファメモリに記憶させ、
後の処理において、読出して使用するようにしても良い
The image signal data of each color component in the 8×8 matrix blocked image signal separated by the process circuit 60cl is input to the encoding circuit 80. As a result, image data for one frame (or field) is divided into blocks of the predetermined size and sequentially
The signal is input to the encoding circuit 80. In addition, the process circuit EiO
The image signals of each color component processed by cl are Y, C
Each color component of r and Cb is stored in a buffer memory,
It may be read and used in later processing.

本実施例では、信号処理回路60からは1画像分の画像
信号データにおけるY成分(輝度成分)について出力か
行われ、これについての後段での処理(統計処理)が済
んだ後に、次にCr成分の画像データについて総てのブ
ロック化を行い、これについて後段での統計処理を行い
、その後に、Cb酸成分画像をブロック化し、これにつ
いて後段での統計処理を行ってゆくと云った処理を行う
In this embodiment, the signal processing circuit 60 outputs the Y component (luminance component) of the image signal data for one image, and after the subsequent processing (statistical processing) is completed, the Cr All of the component image data is divided into blocks, which are then subjected to statistical processing at a later stage.Then, the Cb acid component image is divided into blocks and which are subjected to statistical processing at a later stage. conduct.

符号化回路80では、信号処理回路60より受けたこの
入力データを直交変換回路4に与える。すると、直交変
換回路4はブロック化された入力画像データ(以下、ブ
ロック画像データと呼ぶ)に対し、各ブロック毎に例え
ば、離散コサイン変換(DCT)による2次元の直交変
換を行う。このDCTによる直交変換と云うのは、ある
波形を周波数成分に分割し、これを入力サンプル数と同
じ数だけの各々異なる周波数のコサイン波で表現すると
云った処理である。
The encoding circuit 80 supplies this input data received from the signal processing circuit 60 to the orthogonal transformation circuit 4. Then, the orthogonal transform circuit 4 performs two-dimensional orthogonal transform using, for example, discrete cosine transform (DCT) on each block of the input image data that has been divided into blocks (hereinafter referred to as block image data). This orthogonal transformation using DCT is a process of dividing a certain waveform into frequency components and expressing them with the same number of cosine waves of different frequencies as the number of input samples.

そして、直交変換されたブロック画像データ(変換係数
)は図示しないバッファメモリにおける8×8のマトリ
ックス上の対応する周波数成分位置に格納され(マトリ
ックスの原点位置が直流成分、それ以外は交流成分で原
点位置より離れるに従い周波数が高くなるような関係を
持たせたマトリックスに格納する)、これが量子化回路
6に入力される。
Then, the orthogonally transformed block image data (transformation coefficients) are stored at corresponding frequency component positions on an 8x8 matrix in a buffer memory (not shown) (the origin of the matrix is the DC component, and the rest are AC components and the origin is This is input into the quantization circuit 6.

すると量子化回路6は、このブロック画像データ(変換
係数)に対して1バス目(第1回目)の量子化を行う。
Then, the quantization circuit 6 performs the first bus (first time) quantization on this block image data (transform coefficients).

この第1回目の量子化では、予め設定された各周波数成
分毎(周波数成分はブロックの各マトリックス位置に対
応じて決まる)の量子化マトリックスに対し、撮影に当
り使用者か設定した画質設定値に対応じて制御回路18
より与えられる標準(暫定)の量子化係数αを掛けた量
子化幅で、変換係数の量子化を行う(第8図(hl 、
 D)。この時の量子化マトリックスは輝度系とクロマ
系とでそれぞれで同しであっても良いか、それぞれに適
した量子化マトリックスを設定する方が良い結果か得ら
れる。
In this first quantization, the image quality setting value set by the user at the time of shooting is applied to the quantization matrix for each preset frequency component (frequency components are determined corresponding to each matrix position of the block). The control circuit 18 corresponds to
The transform coefficients are quantized using the quantization width multiplied by the standard (provisional) quantization coefficient α given by (Figure 8 (hl,
D). The quantization matrices at this time may be the same for the luminance system and the chroma system, or better results may be obtained by setting quantization matrices suitable for each.

量子化されたブロック画像データ(変換係数)は可変長
符号化回路8に入力され、ここで、可変長符号化される
。可変長符号化回路8では量子化されて入力された変換
係数を第7図に示す順序でジグザグスキャンし、低い周
波数成分から高い周波数成分への走査を行う。すなわち
、変換係数は8×8のマトリックスに、周波数成分に対
応じて格納されており、原点に近いはと、周波数が低い
ので、ジグザグスキャンする二とで低い周波数成分から
高い周波数成分へと走査できる。
The quantized block image data (transform coefficients) is input to a variable length encoding circuit 8, where it is variable length encoded. The variable length encoding circuit 8 zigzags scans the input quantized transform coefficients in the order shown in FIG. 7, scanning from low frequency components to high frequency components. In other words, the conversion coefficients are stored in an 8 x 8 matrix corresponding to the frequency components, and since the one closest to the origin has a lower frequency, the zigzag scan scans from the lower frequency component to the higher frequency component. can.

第7図の走査順序の1番目のデータは直流成分DCであ
るから、この直流成分DCのデータは直前に可変長符号
化を行ったブロック(一つ前のブロック)の直流成分D
Cとの差分値djrf−DCをハフマン符号化する(第
8図(di)、 (el))。
Since the first data in the scanning order in FIG. 7 is the DC component DC, the data of this DC component DC is the DC component D of the block (previous block) that was subjected to variable length encoding immediately before.
The difference value djrf-DC with C is Huffman encoded (FIGS. 8(di) and (el)).

交流成分ACについては第7図の走査順序の2番目から
64番目まで順番に変換係数を見て行き、変換係数が0
でない(すなわち、有効な)係数か出て来たらその直前
に存在した連続した0(無効)の係数の数(セロラン)
とその有効係数の値とで2次元のハフマン符号化を行う
((d2)、 (e2))。
Regarding the alternating current component AC, look at the conversion coefficients in order from the 2nd to the 64th in the scanning order in Figure 7, and if the conversion coefficient is 0.
If a non-valid (that is, valid) coefficient appears, the number of consecutive 0 (invalid) coefficients that existed immediately before it (celloran)
Two-dimensional Huffman encoding is performed using and the value of its effective coefficient ((d2), (e2)).

また、可変長符号化回路8は、ある係数以降64番目の
係数まで連続して無効係数が続く場合はブロックの終り
を示すEOB  (エンド・オブ・ブロック)の符号を
与える。そして、その符号について発生した符号長を符
号量算出回路14に出力する(gl)。
Further, the variable length encoding circuit 8 provides an EOB (end of block) code indicating the end of the block when invalid coefficients continue after a certain coefficient up to the 64th coefficient. Then, the code length generated for that code is output to the code amount calculation circuit 14 (gl).

1画像分の全ブロックについてこのような処理を実行し
て行く。
Such processing is executed for all blocks of one image.

Y成分についてのこのような処理が終了したなら、次に
C「、cb各成分についても同様の処理を行う。
When such processing for the Y component is completed, the same processing is performed for each of the C' and cb components.

一方、符号量算出回路14は入力されたY、 Cr。On the other hand, the code amount calculation circuit 14 inputs Y and Cr.

cb各成分の各色成分毎に1画像全体の符号量の計算を
すべく、Y、 Cr、 Cb各成分の各ブロック毎の符
号量の算出と、その符号量の各色成分毎および画像全体
についての積算を行う(g2)と共に、各ブロック毎の
符号量のデータを符号量割当回路20に出力する。符号
量割当回路20はこの各ブロック毎の符号量のデータを
符号量情報テーブルにおける該当ブロック位置の符号量
情報として書き込む。
In order to calculate the code amount for the entire image for each color component of each cb component, we calculated the code amount for each block of each Y, Cr, and Cb component, and calculated the code amount for each color component and the entire image. At the same time as performing integration (g2), the data of the code amount for each block is output to the code amount allocation circuit 20. The code amount allocation circuit 20 writes the code amount data for each block as the code amount information of the corresponding block position in the code amount information table.

そして、1画像分の全ブロックについて、Y、 Cr。Then, Y, Cr for all blocks for one image.

Cb各成分、全てのハフマン符号化処理を終了した段階
で、制御回路18の制御により、符号量算出回路】4は
この各色成分毎の符号量と画像全体の符号量のデータを
量子化幅予測回路12に出力すると共に、画像全体の符
号量のデータを符号量割当回路20に出力する。
At the stage when all the Huffman encoding processing for each Cb component is completed, under the control of the control circuit 18, the code amount calculation circuit 4 predicts the quantization width using the data of the code amount for each color component and the code amount for the entire image. At the same time, the data of the code amount of the entire image is output to the code amount allocation circuit 20.

量子化幅予測回路12はこの入力された各色成分毎の符
号量と、画像全体の符号量データと、目的総符号量デー
タとから、例えば、線形予測により目的総符号量の値に
近づけるのに最適な各色成分毎の量子化係数αを、実際
に使用した量子化係数に基づいて予測する(第8図(h
2))。
The quantization width prediction circuit 12 uses the input code amount for each color component, the code amount data of the entire image, and the target total code amount data to approximate the value of the target total code amount by linear prediction, for example. The optimal quantization coefficient α for each color component is predicted based on the quantization coefficient actually used (see Fig. 8 (h
2)).

また、符号量割当回路20は入力された各ブロック毎の
符号量および画像全体の符号量と、目的総符号量とから
各ブロックの基準割当符号量を、例えば各ブロック毎の
符号量の比で、目的総符号量を比例配分する等して算出
する(第8図(h3))。
Further, the code amount allocation circuit 20 calculates a standard allocated code amount for each block from the input code amount for each block, the code amount for the entire image, and the target total code amount, for example, by calculating the ratio of the code amount for each block. , is calculated by proportionally allocating the total target code amount (FIG. 8 (h3)).

具体的には、あるブロックの基準割当符号量を決定する
には、当該ブロックの符号量と目的総符号量とを乗算し
、それを画像全体の符号量で割ることで得た結果を以て
、そのブロックにおける基準割当符号量とする。
Specifically, to determine the standard allocated code amount for a certain block, multiply the code amount of the block by the target total code amount, and divide it by the code amount of the entire image. This is the standard allocated code amount in a block.

そして、この算出した各ブロックの基準割当符号量のデ
ータを、ブロック割当符号量データテーブルに格納する
。このブロック割当符号量データテーブルの各ブロック
別割当符号量のデータは、該当のブロックが可変長符号
化処理される際に符号化打切回路16に与えられること
になる。
Then, the calculated standard allocated code amount data for each block is stored in the block allocated code amount data table. The data of the allocated code amount for each block in this block allocated code amount data table is given to the encoding abort circuit 16 when the corresponding block is subjected to variable length encoding processing.

以上で1パス目、すなわち、各ブロックの割当符号量の
決定及び量子化幅の最適化のための第1の符号化(統計
処理)を終了する。
This completes the first pass, that is, the first encoding (statistical processing) for determining the allocated code amount for each block and optimizing the quantization width.

次に2パス目の処理に入る。この2パス目の処理は第2
の符号化(符号化処理)であり、目的総符号量に収まる
ように最適化した最終の符号化出力を得る処理である。
Next, the second pass processing begins. This second pass process is
It is a process to obtain a final encoded output optimized to fit within the target total code amount.

この処理はまずY成分について行い、Y成分が終了した
後にCr、 Cb酸成分処理を行う。Cr、 Cb酸成
分処理順序はいずれが先でも良い。従って、処理順序か
Cr、 Cbの順であれば、Cr成分の処理を行い、そ
の後にcb酸成分ついて行うようにする。
This treatment is first performed on the Y component, and after the Y component is completed, the Cr and Cb acid component treatments are performed. The Cr and Cb acid components may be treated in any order. Therefore, if the treatment order is Cr and Cb, the Cr component is treated first, and then the Cb acid component is treated.

順序が、Cb、 Crの順ならば、最初にcb酸成分つ
いて処理を行い、cb酸成分終了した後にCr成分につ
いて行うようにすると云った具合である。
If the order is Cb and Cr, the Cb acid component is treated first, and the Cr component is treated after the Cb acid component is finished.

2パス目の処理は、初めに画像データをブロック化して
読出し、これについて抽出されて信号処理回路60から
出力されるY成分(輝度系)の画像信号データを符号化
回路80に入力する(a)。入力されたブロック化画像
データは符号化回路801;おける直交変換回路4に入
力され、再び直交変換が行われる(b)。この直交変換
により得られた変換係数は量子化回路6に入力され、再
び量子化が行われる(e)。ただし、このとき使用する
量子化係数αは前回のパスにおいて量子化幅予測回路1
2が算出した各色成分別の予測の最適量子化係数αであ
る。
In the second pass processing, the image data is first read out in blocks, and the Y component (luminance system) image signal data extracted from this block and output from the signal processing circuit 60 is input to the encoding circuit 80 (a ). The input blocked image data is input to the orthogonal transformation circuit 4 in the encoding circuit 801; and orthogonal transformation is performed again (b). The transform coefficients obtained by this orthogonal transform are input to the quantization circuit 6 and quantized again (e). However, the quantization coefficient α used at this time is determined by the quantization width prediction circuit 1 in the previous pass.
2 is the calculated optimal quantization coefficient α for prediction for each color component.

次に、量子化したブロック画像データの変換係数は、可
変長符号化回路8に入力される。可変長符号化は統計処
理の時と同様、このブロック画像データの変換係数のう
ち、まず直流成分DCの差分値difr−DCをハフマ
ン符号化しく (di)、 (el))、次に交流成分
ACをジグザグスキャンで順次データ抽出して2次元の
ハフマン符号化を行う((d2)。
Next, the transform coefficients of the quantized block image data are input to the variable length encoding circuit 8. In variable length encoding, as in statistical processing, among the transform coefficients of this block image data, first the difference value difr-DC of the DC component DC is Huffman encoded ((di), (el)), and then the AC component Data is sequentially extracted from AC by zigzag scanning and two-dimensional Huffman encoding is performed ((d2)).

(e2))。(e2)).

但し、一つの要素(マトリックス内の一つの位置)に対
するハフマン符号が発生する度に符号量割当回路20か
ら、割当符号量データテーブルに格納されているそのブ
ロックに対する基準割当符号量を符号化打切回路16に
出力し、一方、符号化打切回路16ではこの各ブロック
の基準割当符号量と前ブロックでの符号化処理における
割当符号量に対する余りを加えて該当ブロックの割当符
号量とすると共に、送出すべき符号量およびEOBの符
号を送出しても割当符号量を越えない場合は、打切り信
号を発生せず、該ブロックの割当符号量から送出すべき
符号量を減する処理を行う。
However, each time a Huffman code for one element (one position in the matrix) is generated, the code amount allocation circuit 20 sends the standard allocated code amount for that block stored in the allocated code amount data table to the encoding abort circuit. On the other hand, the encoding abort circuit 16 adds the standard allocated code amount of each block and the remainder of the allocated code amount in the encoding process of the previous block to obtain the allocated code amount of the corresponding block, and sends it out. If the allocated code amount is not exceeded even if the exponent code amount and the EOB code are sent, a process is performed to reduce the code amount to be sent from the allocated code amount of the block without generating an abort signal.

そして、送出すべき該ブロックの符号量とEOBの符号
との合計の符号量が、割当符号量の残りの符号量を上ま
わったときに、符号化打切回路16は可変長符号化回路
8に打切り信号を出力し、そのブロックのハフマン符号
化を終了させると共に、該ブロックの割当符号量から、
送出した符号量を減じて、その値を割当符号量の余りと
して保持する。そして、可変長符号化回路8は量子化回
路6より得られる次のブロックのノ\フマン符号化に移
る。
Then, when the total code amount of the code amount of the block to be transmitted and the EOB code exceeds the remaining code amount of the allocated code amount, the encoding abort circuit 16 sends the variable length encoder 8 to the variable length encoder circuit 8. A termination signal is output, Huffman encoding of the block is finished, and from the allocated code amount of the block,
The transmitted code amount is subtracted and the value is held as the remainder of the allocated code amount. Then, the variable length encoding circuit 8 moves on to Nofman encoding of the next block obtained from the quantization circuit 6.

また、符号化打ち切り回路16では、直流成分とEOB
の符号を送出するに割当符号量が足りない場合には、こ
れらの符号量は送出させた後、符号化打ち切り回路16
は可変長符号化回路8に打ち切り信号を出力し、そのブ
ロックのハフマン符号化を終了させると共に、該ブロッ
クの割当符号量から送出した符号量を減じて割当符号量
の余りを負の値として保持する。
In addition, in the encoding abort circuit 16, the DC component and the EOB
If the amount of allocated codes is insufficient to send out the codes, these codes are sent out and then sent to the coding abort circuit 16.
outputs an abort signal to the variable length encoding circuit 8 to terminate the Huffman encoding of the block, and subtracts the transmitted code amount from the allocated code amount of the block and holds the remainder of the allocated code amount as a negative value. do.

従って、可変長符号化回路8は符号化打切回路16から
打切り信号が入力されるまで、変換されたハフマン符号
を、符号出力回路10に出力し、打切り信号発生前にマ
トリックスのすべての要素に対するハフマン符号化が終
わった場合には、可変長符号化回路8はEOBの符号を
符号出力回路10に出力する。また、可変長符号化回路
8はマトリックスの全ての要素に対する11フマン符号
化が終わる前に打切り信号が入力された場合には、その
符号の代りにBOBの符号を符号出力回路10に出力す
ることになる。符号出力回路10ではこの符号化された
データを一時記憶する。
Therefore, the variable length encoding circuit 8 outputs the converted Huffman code to the code output circuit 10 until the truncation signal is input from the coding truncation circuit 16, and the Huffman code for all elements of the matrix is output before the truncation signal is generated. When the encoding is completed, the variable length encoding circuit 8 outputs the EOB code to the code output circuit 10. Furthermore, if the abort signal is input before the end of the 11-person encoding for all elements of the matrix, the variable length encoding circuit 8 outputs the BOB code to the code output circuit 10 instead of that code. become. The code output circuit 10 temporarily stores this encoded data.

そして、可変長符号化回路8は量子化回路6より得られ
る次のブロックのハフマン符号化に移る。
The variable length encoding circuit 8 then proceeds to Huffman encoding of the next block obtained from the quantization circuit 6.

このような動作を繰り返し、1画面の画像の全ブロック
の処理が終わることにより、全ての符号化処理を終了す
る。Y成分に対するこのような処理が終ると、次に同様
の手法でクロマ系成分(Cr 、 Cb)の処理に入る
。この2番手の成分の処理でも、量子化回路6は前回の
パスにおいて量子化幅予測回路12が算出したクロマ系
成分用の予測された最適量子化係数αを使用する。
By repeating such operations and completing processing of all blocks of one screen image, all encoding processing is completed. Once the Y component is processed in this way, the chroma components (Cr, Cb) are processed in a similar manner. In processing this second component as well, the quantization circuit 6 uses the predicted optimal quantization coefficient α for the chroma component calculated by the quantization width prediction circuit 12 in the previous pass.

このようにしてすべての色成分について、1画面分の画
像の全ブロックの上記2バス目の処理か終わることによ
り、全ての符号化処理を終了する。
In this way, all the encoding processing is completed by completing the processing of the second bus for all blocks of the image for one screen for all color components.

この終了にあたり、符号出力回路IOでは最適化された
1画像分のハフマン符号化データを記録系22に出力し
、記録系22におけるメモリカードと云った記憶媒体7
1に書き込む(f)。これは、符号出力回路10の出力
により行われるが、符号出力回路10は可変長符号化回
路8からの可変長符号であるハフマン符号をつなぎ合わ
せ、記憶媒体71であるメモリカートに与えることで書
き込む。この符号出力回路10の出力による記憶媒体7
Iへの書き込みは、第2バスが終わった段階でまとめて
行うようにしても良いが、第1バスが終って第2バス実
行に入った段階で可変長のハフマン符号をつなぎ合わせ
た結果が、1バイト若しくは数バイト単位、まとまり次
第、順次、記憶媒体へ書き込むようにしても良い。
At the end of this process, the encoder output circuit IO outputs the optimized Huffman encoded data for one image to the recording system 22, and stores it in a storage medium 7 such as a memory card in the recording system 22.
Write to 1 (f). This is done by the output of the code output circuit 10, which connects the Huffman codes, which are variable length codes from the variable length encoding circuit 8, and writes them by giving them to the memory cart, which is the storage medium 71. . A storage medium 7 based on the output of this code output circuit 10
Writing to I may be done all at once when the second bus is finished, but when the first bus is finished and the execution of the second bus begins, the result of stringing variable-length Huffman codes is written. , the data may be written to the storage medium sequentially in units of one byte or several bytes as soon as they are collected.

尚、これに先立ち、符号出力回路1(lでは符号化に使
用した各色成分の量子化マトリックスの情報を、当該符
号化した画像の記憶データにおけるヘッダ部分に書き込
み、再生時の手掛かりとして残す。
Note that, prior to this, the code output circuit 1 (l) writes information on the quantization matrix of each color component used for encoding into the header part of the stored data of the encoded image, and leaves it as a clue during playback.

以上、本装置においては、最初に統計処理を行い、この
統計処理により各色成分別の最適な量子化幅の予測値と
、各色成分別各ブロックの基準割当符号量の決定に必要
な統計量を得、これらの情報をもとに、各色成分別の最
適な量子化幅の予測と、各色成分別の符号量の割当、こ
の割当てられた符号量と各色成分別各ブロックの発生符
号量の情報とを用いて各色成分別各ブロックの基準割当
符号量の決定を行った後、実際の符号化の処理に入り、
各色成分別にその色成分における各ブロックについて順
に、符号化出力を見ながら、そのブロックに割り当てら
れた基準割当符号量と、そのブロックの一つ前の処理ブ
ロックでの割当符号量に対する実際の出力符号量の過不
足分(繰り越し分)を合わせて得られたそのブロックの
割当符号量内に収まるように、可変長符号化を打ち切る
ことで、ブロック毎の符号量を制御し、所望の符号量内
に収まった符号化出力を最終出力として得るようにした
ものであり、この点が本発明の重要なポイントとなって
いる。
As described above, in this device, statistical processing is first performed, and this statistical processing calculates the predicted value of the optimal quantization width for each color component and the statistical amount necessary for determining the standard allocated code amount for each block for each color component. Based on this information, we predict the optimal quantization width for each color component, allocate the amount of code for each color component, and calculate information on the allocated amount of code and the amount of generated code for each block for each color component. After determining the standard allocated code amount for each block for each color component using
For each color component, look at the encoded output for each block in that color component in order, and check the standard allocated code amount assigned to that block and the actual output code for the allocated code amount in the processing block immediately before that block. By aborting variable-length encoding so that the amount of excess or deficiency (carryover) is within the allocated code amount for that block, the amount of code for each block is controlled and the code amount is within the desired amount of code. This is an important point of the present invention.

よって、本実施例で使用したブロックサイズ、直交変換
の種類、可変長符号化の種類等に限定されるものではな
い。また、統計処理は必ずしも1回である必要はなく、
無くても良いし、複数回でも良い。
Therefore, the block size, the type of orthogonal transformation, the type of variable length encoding, etc. used in this embodiment are not limited. Also, statistical processing does not necessarily have to be done once;
It may be omitted or may be repeated multiple times.

但し、統計処理を一回実施するのが、処理時間と得られ
る効果の点で最も得策である。また、統計処理は実際に
符号化を行って発生符号量を確認する必要は必ずしも無
く、各ブロック毎にアクティビティを求め、その結果か
ら各ブロック毎の基準割当符号量と量子化係数を求める
方式であっても良い。
However, it is best to perform statistical processing once in terms of processing time and effects obtained. In addition, statistical processing does not necessarily require actual encoding to check the generated code amount; instead, it is a method that calculates the activity for each block and calculates the standard allocated code amount and quantization coefficient for each block from the results. It's okay.

また、必ずしも、目的総符号量を全て各ブロックに割り
当てる必要はなく、例えば、目的総符号量を各ブロック
の割当符号量に割り当てたときの余りを仮に最初のブロ
ックに対して、前の処理ブロックでの過不足分として与
える等しても良い。
In addition, it is not necessarily necessary to allocate the entire target total code amount to each block; for example, if the remaining amount when the target total code amount is allocated to the allocated code amount of each block is used for the first block, the previous processing block It is also possible to give it as an excess or deficiency.

また、本実施例においては、各ブロックの基準割当符号
量の決定および、符号量の制御にEOBの符号量を含め
ていたが、EOBの符号量は量子化幅が変化しても変わ
らないので、予めこのEOBの符号量を除外して各ブロ
ックの基準割当符号量の決定および、符号量の制御を実
施しても勿論差支えなく、むしろこの方が精度が向上す
るので、望ましい。同様に、量子化幅の予測においても
、EOBの符号量を除外した符号量を用いて予測を行う
と良い。
Furthermore, in this embodiment, the EOB code amount was included in the determination of the standard allocated code amount for each block and the code amount control, but the EOB code amount does not change even if the quantization width changes. Of course, there is no problem in determining the standard allocated code amount for each block and controlling the code amount by excluding the EOB code amount in advance, but this is preferable since it improves accuracy. Similarly, in predicting the quantization width, it is preferable to perform prediction using a code amount excluding the EOB code amount.

また、圧縮率は可変でなくとも良く、一種類の圧縮率に
固定であり、目的総符号量、暫定的な量子係数などが全
て、固定値として与えられても良く、このようにした場
合にはその構成はより簡単になる。また、画像データバ
ッファメモリは直交変換回路4と量子化回路6との間に
あっても良く、むしろこのようにすると符号化処理にお
けるブロック化と直交変換のプロセスを省略できる。
Furthermore, the compression rate does not need to be variable; it may be fixed to one type of compression rate, and the target total code amount, provisional quantum coefficients, etc. may all be given as fixed values. The configuration will be simpler. Further, the image data buffer memory may be located between the orthogonal transform circuit 4 and the quantization circuit 6, and in this case, the blocking and orthogonal transform processes in the encoding process can be omitted.

しかし、精度を保つためには、この場合、画像メモリの
サイズが大きくなる。
However, in order to maintain accuracy, the size of the image memory becomes large in this case.

また、プロセス処理もA/D変換の前に行うようにし、
その後にディジタル化するようにしても構わない。また
、本装置においては、ブロック毎の可変長符号化を低周
波成分より行い、画質への視覚的影響の比較的少ない高
周波成分が符号化の打ち切りにより省略されるようにし
ているので、画質の劣化を最小限に抑えて、しかも、高
圧縮で符号化できるようになる。
Also, process processing is performed before A/D conversion,
You may digitize it afterwards. In addition, in this device, variable-length encoding is performed for each block starting with low frequency components, and high frequency components, which have relatively little visual impact on image quality, are omitted by aborting the encoding, which improves image quality. Encoding can be performed with high compression while minimizing deterioration.

以上、詳述した第1図および第2図の構成の本発明は、
要するに、統計処理の結果をもとに、各色成分別の量子
化係数の予測および、各色成分毎の発生符号量に基づく
各色成分毎の割当符号量の比例配分、この比例配分され
た符号量と各色成分別の各ブロックの発生符号量に基づ
く当該各色成分別の各ブロックの基準符号量の決定を行
い、また、符号化処理においては、この予測した各色成
分別量子化係数を使用しての各色成分別各ブロックの量
子化並びに可変長符号化と、その可変長符号化処理対象
ブロックの基準割当符号量とそのブロックの前の処理ブ
ロックでの割当符号量に対する過不足分とを加えて得ら
れる割当符号量に、上記可変長符号化による符号量が収
まるように、ブロック毎に符号量を監視しながら、可変
長符号化を進め、符号量が割当符号量に達すると、その
ブロックの符号化は終了させるが、直流成分は割当符号
量を越える場合でも必ず符号化させ、そのときの割当符
号量の過不足を記憶しておき、次のブロックの符号化に
移ってゆくようにすると云うものである。
The present invention having the configuration shown in FIGS. 1 and 2 described above has the following features:
In short, based on the results of statistical processing, prediction of the quantization coefficient for each color component, proportional allocation of the allocated code amount for each color component based on the generated code amount for each color component, and the proportional allocation of the code amount and The standard code amount for each block for each color component is determined based on the generated code amount for each block for each color component, and the predicted quantization coefficient for each color component is used in the encoding process. The result is obtained by quantizing and variable-length encoding each block for each color component, adding the standard allocated code amount of the variable-length encoding target block and the excess or deficiency with respect to the allocated code amount of the processing block before that block. Variable-length encoding is performed while monitoring the code amount for each block so that the code amount resulting from the variable-length encoding is within the allocated code amount. When the code amount reaches the allocated code amount, the code amount for that block is However, even if the DC component exceeds the allocated code amount, it is always encoded, and the excess or deficiency of the allocated code amount at that time is memorized and the next block is encoded. It is something.

これは単に各ブロック毎の統計量たけて目的とする符号
量を比例配分して求めた各ブロック毎の割り当て符号量
を用いたのでは、ある色成分ではブロック毎の割り当て
符号量が余分であり、ある色成分では不足する場合があ
るか、予測した各色成分毎の発生符号量の比で目的とす
る総符号量を配分し、これを更に各ブロック毎の統計量
をもとに比例配分することて、各ブロック毎の割り当て
符号量を求めることにより、この各ブロック毎の割り当
て符号量の各色成分毎の比と、実際に符号化したときの
発生符号量の各色成分毎の比と極く近くなるので、各ブ
ロック毎の割り当て符号量は妥当なものとすることがで
きると云うものであり、このような合理的な配分を予め
行うことで、各色成分ともにバランスのとれた符号化が
行えるようにするためである。
This is because if the allocated code amount for each block is simply calculated by multiplying the statistical amount of each block by proportionally allocating the target code amount, the allocated code amount for each block will be redundant for a certain color component. If there is a case where a certain color component is insufficient, the target total code amount is allocated based on the predicted ratio of the generated code amount for each color component, and then this is further allocated proportionally based on the statistics for each block. In other words, by determining the allocated code amount for each block, the ratio of the allocated code amount for each block for each color component and the ratio of the generated code amount for each color component during actual encoding can be made as close as possible. This means that the amount of code allocated to each block can be set to a reasonable value, and by making such a reasonable allocation in advance, balanced encoding can be achieved for each color component. This is to ensure that.

従って、この発明によれば、幅広い空間周波数の画像に
対し、画質を損なうことなく、一定の処理時間内で一定
の符号量内に収まるように符号化できるようになる。
Therefore, according to the present invention, it becomes possible to encode images with a wide range of spatial frequencies within a certain amount of code within a certain processing time without degrading the image quality.

上述した第2図の構成の符号化回路80は、圧縮符号化
において、一連の処理を目的符号量に基づき、算出した
暫定的な量子化幅で第1バスの処理を行い、その結果を
もとに最適な量子化幅を求めてこの最適な量子化幅によ
り第2バスを実施し、最終的な圧縮符号化データを得る
と云った二回の処理で完成させるもので、第1バスによ
り各色成分別の最適なαと各色成分別各ブロック毎の基
準割当符号量を決定するものである。
In compression encoding, the encoding circuit 80 having the configuration shown in FIG. The process is completed by two steps: finding the optimal quantization width for the first bus, executing the second bus using this optimal quantization width, and obtaining the final compressed encoded data. The optimal α for each color component and the standard allocated code amount for each block for each color component are determined.

第3図に符号化回路80の処理の流れを示す。FIG. 3 shows the processing flow of the encoding circuit 80.

′ia3図においては符号化回路80の処理の流れをわ
かり易くするために、第1バスでの信号の流れを点線の
矢印■で、また、第2パスでの信号の流れを実線の矢印
■でそれぞれ図示しである。この信号の流れに沿ってざ
っと動作を追ってみると次のようになる。
In the 'ia3 diagram, in order to make it easier to understand the processing flow of the encoding circuit 80, the signal flow in the first bus is indicated by a dotted arrow ■, and the signal flow in the second path is indicated by a solid arrow ■. Each is illustrated. If we briefly follow the operation along the flow of this signal, we will see the following.

画像データの符号化が行われるに当り、目的とする総符
号量が符号化回路80の制御回路18内に設定される。
When encoding image data, a target total code amount is set in the control circuit 18 of the encoding circuit 80.

これはスイッチ30の操作により、使用者か所望の撮影
可能枚数を設定することにより、この設定した撮影可能
枚数に応じて制御回路90か最適符号量を選択し、これ
を目的総符号量の情報として符号化回路80に与えるこ
とて実現している。
By operating the switch 30, the user sets the desired number of shots that can be taken, and the control circuit 90 selects the optimum code amount according to the set number of shots, and uses this as information on the target total code amount. This is realized by feeding the signal to the encoding circuit 80 as follows.

尚、−初期状態では予め定めた標準的な撮影可能枚数に
設定される。
Note that, in the initial state, the number of images that can be taken is set to a predetermined standard number.

撮影が行われると、これにより撮像系40内の撮像素子
から画像信号が出力される。この出力された画像信号は
信号処理回路60内においてディジタル信号に変換され
、バッファメモリに記憶された後、8×8画素のブロッ
ク単位で読み出され、Y成分、次にCr成分、次にcb
酸成分分離される。
When photographing is performed, an image signal is output from the image sensor in the imaging system 40. This output image signal is converted into a digital signal in the signal processing circuit 60, stored in a buffer memory, and then read out in blocks of 8 x 8 pixels, starting with the Y component, then the Cr component, and then the cb
The acid component is separated.

この分離は最初にY成分について行われ、8×8画素の
ブロック単位で出力される Y成分の画像データは直交
変換回路4に入力されて、ブロック毎に直交変換(本例
ではDCT;Jlt!散コサイン変換(Discret
e Co51ne Transform)か行われ、周
波数代分別にデータが分解される。
This separation is first performed on the Y component, and the Y component image data is output in blocks of 8 x 8 pixels. The Y component image data is input to the orthogonal transform circuit 4, and orthogonally transforms each block (in this example, DCT; Jlt! Discrete cosine transform
e Co51ne Transform) is performed, and the data is decomposed into frequency divisions.

直交変換回路4で得られたDCT変換係数は量子化回路
6に入力され、一方、制御回路18から目的総符号量が
量子化幅予測回路12に出力され、量子化幅予測回路1
2ては目的総符号量から式(1)の関係を用いて量子化
係数αの初期値を設定し、量子化回路6に出力する。量
子化回路6ては、入力された初期値の量子化係数a(す
なわち、暫定的な量子化係数α)を用いて、変換係数を
線形量子化する。量子化された変換係数は可変長符号化
回路8に入力され、可変長符号化(本例では)1フマン
符号化)か行われる。
The DCT transform coefficients obtained by the orthogonal transform circuit 4 are input to the quantization circuit 6, while the target total code amount is output from the control circuit 18 to the quantization width prediction circuit 12.
2, the initial value of the quantization coefficient α is set from the target total code amount using the relationship of equation (1), and is output to the quantization circuit 6. The quantization circuit 6 linearly quantizes the transform coefficient using the inputted initial value quantization coefficient a (that is, provisional quantization coefficient α). The quantized transform coefficients are input to a variable length encoding circuit 8, where they are subjected to variable length encoding (in this example, 1 human encoding).

ここで入力された量子化係数は、ジグザグスキャンと呼
ばれる低周波数成分から高周波数成分への走査が行われ
、一番目の直流成分のデータは直前に可変長符号化を行
ったブロックの直流成分との差分値がハフマン符号化さ
れて出力される。
The quantization coefficients input here are scanned from low frequency components to high frequency components called zigzag scan, and the data of the first DC component is the DC component of the block that was variable-length encoded immediately before. The difference value is Huffman encoded and output.

交流成分については走査順序の2番目から64番目まで
順番に変換係数を見てゆき、変換係数が0でない(すな
わち、有効な)係数が出てきたら、その直前に存在した
連続したO(零;無効)の係数の数(ゼロラン)とその
有効係数との値で、2次元のハフマン符号化が行われる
。また、ある係数以降、64番目の係数まで、連続して
無効出力が続く場合には、ブロックの終りを示すEOB
の符号を出力する。
For the AC component, look at the conversion coefficients in order from the 2nd to the 64th in the scanning order, and when a conversion coefficient that is not 0 (that is, valid) comes out, it is the consecutive O (zero; Two-dimensional Huffman encoding is performed using the number of invalid coefficients (zero run) and the values of their valid coefficients. Also, if invalid output continues after a certain coefficient up to the 64th coefficient, EOB indicating the end of the block will be displayed.
Outputs the sign of .

可変長符号化回路8は、以上のような符号化か行われ、
1つの符号か発生する毎に、その符号長を符号量算出回
路14に出力する。符号量算出回路14は入力された各
符号長を色成分別各ブロック別に記憶すると共に、色成
分毎に符号長を累積し、記憶する。
The variable length encoding circuit 8 performs encoding as described above,
Every time one code is generated, the code length is output to the code amount calculation circuit 14. The code amount calculation circuit 14 stores each input code length for each color component block, and also accumulates and stores the code lengths for each color component.

Y成分についての二のような処理が終了すると、次にC
r成分、モしてcb酸成分ついても同様の処理を行う。
After completing the processing as in step 2 for the Y component, next
The same treatment is applied to the r component and the cb acid component.

一画像について、符号化が終了すると、符号量算出回路
14は累積した各色成分別各ブロック毎の符号量を加算
して各色成分毎の符号量と画像全体の符号量を総符号量
値として算出する。この各色成分毎の符号量と総符号量
値は量子化幅予測回路12に出力され、また、各色成分
毎の符号量及び画像全体の符号量割当回路20に出力さ
れる。
When encoding for one image is completed, the code amount calculation circuit 14 adds the accumulated code amounts for each block for each color component and calculates the code amount for each color component and the code amount for the entire image as a total code amount value. do. The code amount for each color component and the total code amount value are output to the quantization width prediction circuit 12, and are also output to the code amount for each color component and the code amount allocation circuit 20 for the entire image.

以上の第1パスの符号化処理が終了すると、符号量割当
回路20は符号量算出回路14から入力された各色成分
毎の符号量、画像全体の符号量と、目的符号量および各
色成分側番ブロックの符号量から、比例配分により、各
色成分毎の各ブロックの基準割当符号量を算出し記憶す
る。また、量子化幅予測回路12では第1パスでの符号
化により求められた絵画像符号量と、制御回路18から
与えられた目的総符号量とから、より適した量子化係数
αを各色成分毎に予測し、量子化回路6に出力する。
When the above-described first pass encoding processing is completed, the code amount allocation circuit 20 receives the code amount for each color component inputted from the code amount calculation circuit 14, the code amount for the entire image, the target code amount, and the side number of each color component. Based on the code amount of the block, a standard allocated code amount for each block for each color component is calculated and stored by proportional allocation. In addition, the quantization width prediction circuit 12 calculates a more suitable quantization coefficient α for each color component from the picture image code amount obtained by encoding in the first pass and the target total code amount given from the control circuit 18. It is predicted each time and outputted to the quantization circuit 6.

続いて同じ画像データに対して第2パスの符号化処理が
行われる。第2パスでは信号処理回路60内のメモリか
ら読み出された画像データは、第1パスでの処理順序で
色成分に分離され、それぞれの成分の画像データは8X
8画素のブロック化等の処理が行われた後、直交変換回
路4に入力され、ブロック毎に順に直交変換(DCT変
換)され、これにより、直交変換回路4で得られたDC
T変換係数は量子化回路6に入力される。
Subsequently, a second pass of encoding processing is performed on the same image data. In the second pass, the image data read from the memory in the signal processing circuit 60 is separated into color components in the processing order in the first pass, and the image data of each component is
After processing such as 8-pixel blocking is performed, the data is input to the orthogonal transform circuit 4, and orthogonal transform (DCT transform) is performed for each block in order.
The T transform coefficients are input to the quantization circuit 6.

一方、量子化回路6においては、与えられたこの予測に
よる新たな各色成分毎の量子化係数αによる補正済み量
子化幅を用いて、OCT変換係数を線形量子化する。量
子化された係数は可変長符号化回路8に入力され、第1
パスの符号化時と同様の方式でハフマン符号化される。
On the other hand, the quantization circuit 6 linearly quantizes the OCT transform coefficients using the corrected quantization width based on the new quantization coefficient α for each color component based on the given prediction. The quantized coefficients are input to the variable length encoding circuit 8, and the first
Huffman encoding is performed in the same manner as when encoding the path.

ここで符号化時に発生した符号量は、第1パスの終了時
に求められ、符号量割当回路20に記憶されている各色
成分側番ブロックの基準割当符号量のうちの当該符号化
処理しようとするブロックの基準割当符号量と、当該符
号化処理しようとするブロックの1つ前の符号化処理ブ
ロックでの割当符号量に対する符号量の過不足性(繰り
越し分)とを加えた当該ブロックの割当符号量を基準値
としての比較が行われ、この基準値を越えた場合には符
号打切回路16の働きにより、そのブロック内でそれ以
降の符号化が打ち切られる。また、当該ブロックの符号
化を終了した時点での割当符号量の過不足は、符号量割
当回路20に記憶される。
Here, the amount of code generated during encoding is obtained at the end of the first pass, and the amount of code to be encoded is determined from among the standard allocated code amount of each color component side number block stored in the code amount allocation circuit 20. The assigned code of the block is the sum of the standard assigned code amount of the block and the surplus/deficiency of the code amount (carryover amount) with respect to the assigned code amount of the encoding processing block immediately before the block to be encoded. Comparison is performed using the amount as a reference value, and when this reference value is exceeded, the subsequent coding within that block is aborted by the action of the code abort circuit 16. Furthermore, the excess or deficiency of the allocated code amount at the time when the encoding of the block is finished is stored in the code amount allocation circuit 20.

以上の方法により目的総符号量に制御された符号化デー
タは順次、符号出力回路1(lを経由して記録系70に
出力され、記録される。
The encoded data controlled to the target total code amount by the above method is sequentially outputted to the recording system 70 via the code output circuit 1 (l) and recorded.

次に記録系70にて記録された記録媒体71の圧縮符号
化記録画像データの再生について説明する。
Next, reproduction of compressed and encoded recorded image data recorded on the recording medium 71 by the recording system 70 will be explained.

第4図に再生機の構成を示す。図において、100は再
生機本体であり、この再生機本体100は読取部102
、復号化回路104および処理回路106および制御回
路108を備える。読取部102は記憶媒体71を着脱
でき、記憶媒体71の内容をインタフェース回路110
を介して読出すようになっている。
Figure 4 shows the configuration of the player. In the figure, 100 is a main body of the playback machine, and this main body 100 of the playback machine includes a reading section 102.
, a decoding circuit 104, a processing circuit 106, and a control circuit 108. The reading unit 102 can attach and detach the storage medium 71, and transfers the contents of the storage medium 71 to the interface circuit 110.
It is read out via .

復号化回路104は第5図のような機能ブロックを有す
る。すなわち、112はハフマン符号化データを復号化
するハフマン復号部、114はこのハフマン復号されて
得られたデータを、記憶媒体71から読み出されて設定
入力された量子化幅の情報に基づいて逆量子化する逆量
子化部、11Bはこの逆量子化されて得られたデータを
逆DCT変換して映像信号データとして出力するIDC
T (逆DCT変換)部、そして、118はこれらの制
御を司る制御部である。
The decoding circuit 104 has functional blocks as shown in FIG. That is, 112 is a Huffman decoding unit that decodes Huffman encoded data, and 114 is a Huffman decoding unit that decodes the data obtained by Huffman decoding based on the quantization width information read from the storage medium 71 and set and input. The inverse quantization unit 11B performs quantization, and the IDC performs inverse DCT transformation on the data obtained by inverse quantization and outputs it as video signal data.
T (inverse DCT transformation) unit, and 118 is a control unit that controls these.

処理回路106はバッファメモリ120、エンコーダ1
22およびD/A変換器124を偏える。バッファメモ
リ120は復号化回路104から出力された映像信号デ
ータを一時保持するメモリであり、エンコーダ122は
このバッファメモリ】20から読み出される映像信号デ
ータをNTSC方式の映像信号に変換するものであり、
D/A変換器124はこのNTSC方式の映像信号をア
ナログ変換してテレビ用の映像信号として出力するだめ
のものである。
The processing circuit 106 includes a buffer memory 120 and an encoder 1.
22 and D/A converter 124. The buffer memory 120 is a memory that temporarily holds the video signal data output from the decoding circuit 104, and the encoder 122 converts the video signal data read from the buffer memory 20 into an NTSC video signal.
The D/A converter 124 converts this NTSC video signal into analog and outputs it as a television video signal.

前記制御回路108は再生機本体100全体の制御を司
るものであり、再生機本体100の読取部102に対し
、符号化時の量子化幅の情報を読み出すべく制御して、
その結果、記録媒体71から読み出された符号化時の量
子化幅の情報を復号化回路104め逆量子化部114に
設定させ、続いて制御回路108は情報記録媒体71か
ら圧縮符号化された映像信号データを読出すべく、読取
部lO゛2を制御すると云った制御を行う。また、図示
しないが再生機本体100には、コマ送りスイッチ等が
あり、このスイッチにより指定されたコマ位置の映像を
再生したりすることかできる。このような制御も制御回
路108が行う。
The control circuit 108 is in charge of overall control of the player main body 100, and controls the reading section 102 of the player main body 100 to read out information on the quantization width at the time of encoding.
As a result, the decoding circuit 104 sets the information on the quantization width at the time of encoding read from the recording medium 71 to the dequantization unit 114, and then the control circuit 108 causes the information recording medium 71 to be compressed and encoded. In order to read out the video signal data, control is performed to control the reading section lO'2. Further, although not shown, the main body 100 of the player has a frame forwarding switch and the like, and the video at the frame position designated by this switch can be played back. The control circuit 108 also performs such control.

次に上記構成の再生機の動作を説明する。圧縮符号化さ
れた映像信号データが記録された記録媒体(メモリカー
ド)71が再生機本体100の読取部102に装着され
ると、まず、制御回路108は読取部102に対し、符
号化時の各色成分毎の量子化幅の情報を読み出すべく制
御する。その結果、読取部102において記録媒体71
から符号化時の量子化幅の情報が読み出され、この情報
は復号化回路104の逆量子化部114に設定される。
Next, the operation of the reproducing machine having the above configuration will be explained. When the recording medium (memory card) 71 on which compression-encoded video signal data is recorded is attached to the reading section 102 of the playback main body 100, the control circuit 108 first instructs the reading section 102 to read the data at the time of encoding. Control is performed to read out information on the quantization width for each color component. As a result, the reading unit 102 reads the recording medium 71.
Information about the quantization width at the time of encoding is read from the quantization width, and this information is set in the inverse quantization unit 114 of the decoding circuit 104.

続いて制御回路108は記録媒体71から映像信号を読
出すべく、読取部102を制御するので、読取部102
は記録媒体71から映像信号を順次読み出し、復号化回
路104に入力する。
Next, the control circuit 108 controls the reading unit 102 to read the video signal from the recording medium 71, so the reading unit 102
sequentially reads video signals from the recording medium 71 and inputs them to the decoding circuit 104.

これを受けた復号化回路104では、ハフマン復号部1
12においてハフマン符号を復号し、量子化係数を得る
。こうして得られた量子化係数は逆量子化回路114に
与えて逆量子化する。ここでの逆量子化は先に設定され
ている前記色成分別量子化幅の情報を用いて行われる。
In the decoding circuit 104 that receives this, the Huffman decoding unit 1
12, the Huffman code is decoded to obtain quantized coefficients. The quantized coefficients obtained in this way are supplied to an inverse quantization circuit 114 for inverse quantization. The inverse quantization here is performed using the previously set information on the quantization width for each color component.

逆量子化により得られた変換係数は、I DCT部11
6においてブロック毎に逆DCT変換され、元の映像信
号に復元される。このようにしてY 、 Cr。
The transform coefficients obtained by inverse quantization are transferred to the IDCT section 11
6, each block is subjected to inverse DCT transformation and restored to the original video signal. In this way Y, Cr.

cbO順で映像信号が復元されて復号化回路104から
出力され、処理回路106内のバッファメモリ120に
書き込まれる。1画面の映像信号データの書き込みか終
了すると、バッファメモリ120から通常のテレビ信号
の走査順で映像信号データが読み出され、エンコーダ1
22においてNTSC方式の映像信号に変換される。更
にD/A変換器124によりアナログ信号に変換され、
出力される。この映像信号をテレビモニタに入力するこ
とにより、画像がテレビ映像として再生され、映像とし
て鑑賞でき、また、ビデオプリンタ等のプリント装置に
与えてプリントすることにより、ハードコピーが得られ
るので、写真等と同様な形で鑑賞することかきるように
なる。
The video signal is restored in cbO order, output from the decoding circuit 104, and written to the buffer memory 120 in the processing circuit 106. When writing of the video signal data for one screen is completed, the video signal data is read out from the buffer memory 120 in the normal scanning order of the television signal, and the encoder 1
22, the signal is converted into an NTSC video signal. Furthermore, it is converted into an analog signal by the D/A converter 124,
Output. By inputting this video signal to a TV monitor, the image can be played back as a TV video and viewed as a video.Also, by feeding it to a printing device such as a video printer and printing it, a hard copy can be obtained, so it can be used as a photo, etc. I started to appreciate things in a similar way.

以上説明したように、カメラは所望の撮影可能枚数を設
定でき、撮影可能枚数を設定することで、カメラではこ
れに対応する圧縮率を自動設定すると共に、初めにこの
設定圧縮率に応じて定まる暫定的な量子化幅を用いて、
1画面分の撮影画像データを各色成分別各ブロック単位
で順に量子化し、可変長符号化し、その結果得られるそ
の各色成分毎および1画面分の撮影画像データの符号量
より“各色成分毎の最適量子化幅″を予測し、且つ、各
色成分毎の符号量から各色成分毎の割り当て可能な符号
量を比例配分して定めると共に、各色成分毎の各ブロッ
ク別に割り当てる基準符号量をそのブロックでの発生符
号量に応じて比例配分して定め、次に、前記予測した各
色成分毎の最適量子化幅により、前記1画面分の撮影画
像データを各色成分別各ブロック毎に再び順に量子化し
、この量子化出力に対する可変長符号化にあたっては、
その各ブロックの基準割当符号量とその1つ前に処理し
たブロックでの符号化処理における符号化の際の割当符
号量に対する余り分を加えた割当符号量を最大枠として
この範囲で可変長符号化処理するようにし、符号化され
た映像信号の再生時には撮影時に使用した前記最適量子
化幅を用いて復号することにより、所望の圧縮率での符
号化を圧縮率別にハードウェアを設けることなく、共通
の一つのハードウェアで実現でき、同様に所望の圧縮率
で符号化された画像データの復号化を圧縮率別にハード
ウェアを設けることなく、共通の一つのハードウェアで
実現できる。
As explained above, the camera can set the desired number of shots that can be taken, and by setting the number of shots that can be taken, the camera automatically sets the corresponding compression rate, and the compression rate is initially determined according to this set compression rate. Using the provisional quantization width,
One screen's worth of photographed image data is quantized in turn for each color component in each block and variable length encoded, and from the resulting code amount of each color component and one screen's worth of photographed image data, the "optimum for each color component" is determined. Quantization width'' is predicted, and the allocatable code amount for each color component is determined by proportional allocation from the code amount for each color component, and the standard code amount to be allocated to each block for each color component is determined based on the code amount for each color component. Next, the captured image data for one screen is quantized again in order for each block of each color component using the predicted optimum quantization width for each color component. For variable length encoding of quantized output,
Variable-length code is used within this range, with the maximum allocated code amount being the standard allocated code amount for each block and the remainder of the allocated code amount during encoding in the encoding process of the block processed one before. By decoding the encoded video signal using the optimal quantization width used at the time of shooting, it is possible to encode at the desired compression rate without installing hardware for each compression rate. Similarly, image data encoded at a desired compression rate can be decoded using one common hardware without providing hardware for each compression rate.

以上、実施例では符号化の過程が第1バス(統計処理)
を1回、第2パス(符号化処理)を1回の計2回の処理
で終了する2バス方式としたが、これに限るものではな
く、第1バスを更に何度か繰り返すと更に良好な結果が
得られる。また、記録媒体にメモリカードを用いた例を
示したが、その他、フロッピディスク、光ディスク、磁
気テープ等を利用することもできる。また、カメラと再
生機が別体となっているものを示したが、カメラが再生
機の機能を合せ持つ一体型のものでも良い。更にまた、
実施例では量子化幅の値そのものを記録媒体に記録する
ようにしたが、量子化幅値を変換あるいは符号化して記
録するようにしても良い。また、以上の実施例では目的
総符号量から量子化幅を設定していたか、複数の目的総
符号量をモートで切換えて使用するようなアプリケーシ
ョンにおいては、それぞれのモードに対応する量子化幅
を予め用意しておき、これをモードで切り換えて使用す
るようにしても勿論差支えない。
As described above, in the embodiment, the encoding process is carried out on the first bus (statistical processing).
Although we used a two-bus method in which the process is completed in a total of two times, one time for the first pass and one time for the second pass (encoding process), it is not limited to this, and it will be even better if the first bus is repeated several times. results. Further, although an example is shown in which a memory card is used as the recording medium, other media such as a floppy disk, an optical disk, and a magnetic tape may also be used. Further, although the camera and the playback device are shown as separate bodies, it is also possible to use an integrated camera in which the camera also has the functions of the playback device. Furthermore,
In the embodiment, the quantization width value itself is recorded on the recording medium, but the quantization width value may be converted or encoded and then recorded. In addition, in the above embodiment, the quantization width was set based on the target total code amount, or in applications where multiple target total code amounts are switched and used by mote, the quantization width corresponding to each mode is set. Of course, it is also possible to prepare it in advance and use it by switching it depending on the mode.

尚、本発明は上記し、且つ、図面に示す実施例に限定す
ることなくその要旨を変更しない範囲内で適宜変形して
実施し得るものであり、例えば、本発明はスチル画像に
限らず動画像等、種々の画像に対しての圧縮符号化に適
用できるものである。
Note that the present invention is not limited to the embodiments described above and shown in the drawings, and can be implemented with appropriate modifications within the scope of the gist.For example, the present invention is applicable not only to still images but also to moving images. This method can be applied to compression encoding of various images such as images.

また、上記実施例では圧縮率対応情報より総符号量の情
報を与え、この総符号量に対応した量子化幅を与えるこ
とのできる各色成分毎の量子化係数の予測を行い、この
予測された量子化係数に基づく量子化幅で量子化を行う
ようにしているが、予め圧縮率対応情報に対する量子化
幅の関係を計算で求めてテーブル化しておき、これをメ
モリ等に記憶して、圧縮率対応情報から直接、量子化幅
の情報(すなわち、量子化係数或いは量子化幅の値)を
出力させるようにすることもできる。このようにすれば
、所望の圧縮率に対応する情報を入力すると、この入力
された圧縮率対応情報に対応じて一義的に定まる量子化
幅の情報を読出して出力でき、即座に最適量子化幅を設
定できて直ちに量子化回路にこの量子化幅で画像信号デ
ータを量子化させることができるようになる。
In addition, in the above embodiment, information on the total code amount is given from the compression rate correspondence information, and a quantization coefficient for each color component that can give a quantization width corresponding to this total code amount is predicted. Quantization is performed using the quantization width based on the quantization coefficient, but the relationship between the quantization width and the compression rate correspondence information is calculated in advance and created in a table. This is stored in memory etc. and the compression It is also possible to output quantization width information (ie, quantization coefficient or quantization width value) directly from the rate correspondence information. In this way, when information corresponding to the desired compression ratio is input, information on the quantization width that is uniquely determined according to the input compression ratio information can be read and output, and optimal quantization can be performed immediately. Immediately after setting the width, the quantization circuit can quantize the image signal data using this quantization width.

この構成によれば、メモリ等に各種の圧縮率に対応した
最適量子化幅の情報を予め記憶させて、これを入力圧縮
率対応情報に対応じて読出すだけで最適量子化幅の情報
を与えることができるので、目的総符号量に収まるよう
符号化するに当り、その処理を極めて短時間で行える他
、ハードウェアも簡単で済むようになる。
According to this configuration, the information on the optimal quantization width corresponding to various compression ratios is stored in advance in a memory, etc., and the information on the optimal quantization width can be obtained by simply reading out the information in accordance with the input compression ratio correspondence information. Therefore, when encoding to fit within the target total code amount, the processing can be done in an extremely short time and the hardware can be simple.

〔発明の効果〕〔Effect of the invention〕

以上詳述したように、本発明によれば、幅広い空間周波
数の画像に対し、画質を損なうことなく、符号量の制御
が行えると共に、一定の処理時間で一定の符号量内に収
まるように符号化処理ができる等、電子カメラシステム
等に最適な画像データの符号化装置および符号化方法を
提供できる。
As described in detail above, according to the present invention, it is possible to control the amount of code for images with a wide range of spatial frequencies without degrading the image quality, and to encode images within a certain amount of code within a certain processing time. Accordingly, it is possible to provide an image data encoding device and encoding method that are suitable for electronic camera systems and the like.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の第1の実施例を示すブロック図、第2
図は本発明装置の要部構成例を示すブロック図、第3図
は第2図回路の動作の流れを説明するためのブロック図
、第4図および第5図は再生機の構成を示すブロック図
、第6図は本発明による電子カメラ本体の外観を示す斜
視図、第7図は8X8画素に分けられたブロックのジグ
ザグ・スキャンを説明するための図、第8図は本発明の
原理的な作用を説明するための動作遷移図、第9図は従
来技術を説明するための動作遷移図、第1θ図は符号量
と量子化幅の関係を説明するための図である。 1・・・電子カメラ本体、6・・・量子化回路、8・・
・可変長符号化回路、10・・・符号出力回路、12・
・・量子化幅予測回路、14・・・符号量算出回路、1
6・・・符号化打切回路、18.18a・・・制御回路
、20・・・符号量割当回路、24・・・DCPM回路
、30・・・スイッチ、40・・・撮像系、48・・・
LCD表示器、60・・・信号処理回路、80・・・符
号化回路、70・・・記録系、71・・・記録媒体、9
0・・・制御回路、100・・・再生機本体、102・
読取部、104・・・復号化回路、106・・処理回路
、108・・制御回路、110・・インタフェース回路
、112・・ハフマン復号部、114・・逆苗子化部、
11B・・・IDCT(逆DCT変換)部、118・・
・制御部。 出願人代理人 弁理士 坪井 淳 □−峻0↓附 fog BR φと薫浴
FIG. 1 is a block diagram showing a first embodiment of the present invention;
The figure is a block diagram showing an example of the main part configuration of the device of the present invention, FIG. 3 is a block diagram for explaining the flow of operation of the circuit shown in FIG. 2, and FIGS. 4 and 5 are block diagrams showing the configuration of the regenerator. 6 is a perspective view showing the external appearance of the electronic camera body according to the present invention, FIG. 7 is a diagram for explaining zigzag scanning of a block divided into 8×8 pixels, and FIG. 8 is a diagram showing the principle of the present invention. FIG. 9 is an operation transition diagram for explaining the conventional technique, and FIG. 1θ is a diagram for explaining the relationship between code amount and quantization width. 1... Electronic camera body, 6... Quantization circuit, 8...
・Variable length encoding circuit, 10... Code output circuit, 12.
... Quantization width prediction circuit, 14 ... Code amount calculation circuit, 1
6... Encoding abort circuit, 18.18a... Control circuit, 20... Code amount allocation circuit, 24... DCPM circuit, 30... Switch, 40... Imaging system, 48...・
LCD display, 60... Signal processing circuit, 80... Encoding circuit, 70... Recording system, 71... Recording medium, 9
0...Control circuit, 100...Player main body, 102.
Reading unit, 104...Decoding circuit, 106...Processing circuit, 108...Control circuit, 110...Interface circuit, 112...Huffman decoding unit, 114...Reverse seedling unit,
11B...IDCT (inverse DCT conversion) section, 118...
・Control unit. Applicant's agent Patent attorney Atsushi Tsuboi□−Shun0↓Fog BR φ and smoke bath

Claims (9)

【特許請求の範囲】[Claims] (1)色成分別に分離されたカラー画像データそれぞれ
を所定画素数のブロックに分割し、色成分別のこの分割
されたブロック毎に順に直交変換を行ってからこの変換
出力を量子化手段により量子化し、その後、この量子化
出力を可変長符号化手段に与えて可変長符号化し、画像
データの符号化を行う際に、初めに暫定的に定めた量子
化幅で量子化して可変長符号化し、各ブロック毎の符号
量を得る統計処理を行い、次にこの統計処理により求め
た各ブロック毎の符号量と、画像あたりの総符号量目標
値とからこの総符号量目標値に収めるに適した最適量子
化幅と各ブロック毎の割当符号量とを決定し、この決定
した最適量子化幅に従って各ブロック毎の前記変換出力
の量子化を行うと共に、この量子化出力を各ブロック毎
の割当符号量に従って各ブロック毎に符号量制御を行い
ながら順次可変長符号化する符号化処理を実施する符号
化装置において、 前記統計処理時の可変長符号化出力をもとに各色成分別
前記各ブロックの符号量を算出する算出手段と、 前記総符号量目標値と前記算出手段の算出値および前記
統計処理に使用した暫定的な量子化幅とに基づいて各色
成分別の最適量子化幅を予測する量子化幅予測手段と、 前記符号化処理時に前記量子化幅予測手段の予測した各
色成分別の最適量子化幅を使用して各色成分別の量子化
を行うべく制御する制御手段とを備えたことを特徴とす
る画像データの符号化装置。
(1) Divide each of the color image data separated by color component into blocks of a predetermined number of pixels, perform orthogonal transformation for each divided block by color component, and then quantize the transformed output by quantization means. Then, this quantized output is given to a variable-length encoding means to be variable-length encoded, and when encoding image data, it is first quantized with a provisionally determined quantization width and then variable-length encoded. , performs statistical processing to obtain the code amount for each block, and then calculates the code amount for each block obtained through this statistical processing and the total code amount target value per image to find the appropriate amount to fit within this total code amount target value. The optimal quantization width and allocated code amount for each block are determined, and the transform output for each block is quantized according to the determined optimal quantization width, and the quantized output is allocated for each block. In an encoding device that performs a coding process of sequentially performing variable length coding while controlling the code amount for each block according to the code amount, each block is coded for each color component based on the variable length coding output during the statistical processing. a calculation means for calculating a code amount of the code amount; and predicting an optimal quantization width for each color component based on the total code amount target value, the calculated value of the calculation means, and the provisional quantization width used in the statistical processing. quantization width prediction means, and control means for controlling to perform quantization for each color component using the optimum quantization width for each color component predicted by the quantization width prediction means during the encoding process. An image data encoding device characterized in that:
(2)色成分別に分離されたカラー画像データそれぞれ
を所定画素数のブロックに分割し、色成分別のこの分割
されたブロック毎に順に直交変換を行ってからこの変換
出力を量子化手段により量子化し、その後、この量子化
出力を可変長符号化手段に与えて可変長符号化し、画像
データの符号化を行う際に、初めに暫定的に定めた量子
化幅で量子化して可変長符号化し、各ブロック毎の符号
量を得る統計処理を行い、次にこの統計処理により求め
た各ブロック毎の符号量と、画像あたりの総符号量目標
値とからこの総符号量目標値に収めるに適した最適量子
化幅と各ブロック毎の割当符号量とを決定し、この決定
した最適量子化幅に従って各ブロック毎の前記変換出力
の量子化を行うと共に、この量子化出力を各ブロック毎
の割当符号量に従って各ブロック毎に符号量制御を行い
ながら順次可変長符号化する符号化処理を実施する符号
化装置において、 前記統計処理時の可変長符号化出力をもとに各色成分別
前記各ブロックの符号量を算出する算出手段と、 前記総符号量目標値と前記算出手段の算出値と前記統計
処理に使用した暫定的な量子化幅とに基づいて各色成分
別の最適量子化幅を予測する量子化幅予測手段と、 前記総符号量目標値を前記算出手段の算出値に応じて配
分し、当該各色成分別各ブロックの基準符号量を決定す
る決定手段と、 符号化処理時に前記決定手段にて決定した各色成分別各
ブロックの基準符号量を用い、前記ブロックのうち、次
に符号化処理する処理対象ブロックの前に処理した処理
済みブロックでの符号化により発生した符号量と当該処
理済みブロックでの割当符号量との差を求めてこれを前
記処理対象ブロックの前記基準符号量に加えることによ
り得られる符号量を当該処理対象ブロックでの割当符号
量として割り当てる割当手段と、 前記処理対象ブロックでの符号化処理において前記割当
手段により割り当てられた前記割当符号量を越えないよ
うに、前記可変長符号化を打ち切る打ち切り手段と、 前記符号化処理時に前記量子化幅予測手段の予測した各
色成分別の最適量子化幅を使用して各色成分別の量子化
を行うべく制御する制御手段とを備えたことを特徴とす
る画像データの符号化装置。
(2) Divide each of the color image data separated by color component into blocks of a predetermined number of pixels, perform orthogonal transformation for each divided block by color component, and then quantize the transform output by quantization means. Then, this quantized output is given to a variable-length encoding means to be variable-length encoded, and when encoding image data, it is first quantized with a provisionally determined quantization width and then variable-length encoded. , performs statistical processing to obtain the code amount for each block, and then calculates the code amount for each block obtained through this statistical processing and the total code amount target value per image to find the appropriate amount to fit within this total code amount target value. The optimal quantization width and allocated code amount for each block are determined, and the transform output for each block is quantized according to the determined optimal quantization width, and the quantized output is allocated for each block. In an encoding device that performs a coding process of sequentially performing variable length coding while controlling the code amount for each block according to the code amount, each block is coded for each color component based on the variable length coding output during the statistical processing. a calculation means for calculating a code amount of; and predicting an optimal quantization width for each color component based on the total code amount target value, a value calculated by the calculation means, and a provisional quantization width used in the statistical processing. quantization width prediction means for determining the reference code amount for each block for each color component by allocating the total code amount target value according to the value calculated by the calculation means; and determining means for determining the reference code amount for each block for each color component; Using the standard code amount of each block for each color component determined by the means, the code amount generated by encoding in the processed block processed before the next target block to be encoded among the blocks and the corresponding code amount. an allocation unit that allocates the code amount obtained by calculating the difference between the code amount allocated in the processed block and the code amount obtained by adding this difference to the reference code amount of the processing target block as the allocated code amount in the processing target block; terminating means for aborting the variable length encoding so as not to exceed the allocated code amount allocated by the allocating means in the encoding process of the target block; and prediction by the quantization width predicting means during the encoding process. An image data encoding device comprising: control means for performing control to perform quantization for each color component using the optimal quantization width for each color component.
(3)色成分別に分離されたカラー画像データそれぞれ
を所定画素数のブロックに分割し、色成分別のこの分割
されたブロック毎に順に直交変換を行ってからこの変換
出力を量子化手段により量子化し、その後、この量子化
出力を可変長符号化手段に与えて可変長符号化し、画像
データの符号化を行う際に、初めに暫定的に定めた量子
化幅で量子化して可変長符号化し、各ブロック毎の符号
量を得る統計処理を行い、次にこの統計処理により求め
た各ブロック毎の符号量と、画像あたりの総符号量目標
値とからこの総符号量目標値に収めるに適した最適量子
化幅と各ブロック毎の割当符号量とを決定し、この決定
した最適量子化幅に従って各ブロック毎の前記変換出力
の量子化を行うと共に、この量子化出力を各ブロック毎
の割当符号量に従って各ブロック毎に符号量制御を行い
ながら順次可変長符号化する符号化処理を実施する符号
化装置において、 目的とする圧縮率を選択すると共に、選択された圧縮率
に応じて収めるべき目的の総符号量および前記暫定的量
子化幅を決定する圧縮率選択手段と、 前記統計処理時の可変長符号化出力をもとに各色成分別
前記各ブロックの符号量を算出する算出手段と、 前記総符号量目標値と前記算出手段の算出値および前記
統計処理に使用した暫定的な量子化幅とに基づいて各色
成分別の最適量子化幅を予測する量子化幅予測手段と、 前記符号化処理時に前記量子化幅予測手段の予測した各
色成分別の最適量子化幅を使用して各色成分別の量子化
を行うべく制御する制御手段とを備えたことを特徴とす
る画像データの符号化装置。
(3) Divide each of the color image data separated by color component into blocks of a predetermined number of pixels, perform orthogonal transformation for each divided block by color component, and then quantize the transformed output by quantization means. Then, this quantized output is given to a variable-length encoding means to be variable-length encoded, and when encoding image data, it is first quantized with a provisionally determined quantization width and then variable-length encoded. , performs statistical processing to obtain the code amount for each block, and then calculates the code amount for each block obtained through this statistical processing and the total code amount target value per image to find the appropriate amount to fit within this total code amount target value. The optimal quantization width and allocated code amount for each block are determined, and the transform output for each block is quantized according to the determined optimal quantization width, and the quantized output is allocated for each block. In an encoding device that performs sequential variable length coding while controlling the code amount for each block according to the code amount, the target compression rate is selected and the data should be stored according to the selected compression rate. Compression rate selection means for determining the target total code amount and the provisional quantization width; Calculation means for calculating the code amount for each block for each color component based on the variable length encoded output during the statistical processing; , quantization width prediction means for predicting the optimum quantization width for each color component based on the total code amount target value, the calculated value of the calculation means, and the provisional quantization width used in the statistical processing; and a control means for controlling quantization for each color component using the optimum quantization width for each color component predicted by the quantization width prediction means during encoding processing. Encoding device.
(4)色成分別に分離されたカラー画像データそれぞれ
を所定画素数のブロックに分割し、色成分別のこの分割
されたブロック毎に順に直交変換を行ってからこの変換
出力を量子化手段により量子化し、その後、この量子化
出力を可変長符号化手段に与えて可変長符号化し、画像
データの符号化を行う際に、初めに暫定的に定めた量子
化幅で量子化して可変長符号化し、各ブロック毎の符号
量を得る統計処理を行い、次にこの統計処理により求め
た各ブロック毎の符号量と、画像あたりの総符号量目標
値とからこの総符号量目標値に収めるに適した最適量子
化幅と各ブロック毎の割当符号量とを決定し、この決定
した最適量子化幅に従って各ブロック毎の前記変換出力
の量子化を行うと共に、この量子化出力を各ブロック毎
の割当符号量に従って各ブロック毎に符号量制御を行い
ながら順次可変長符号化する符号化処理を実施する符号
化装置において、 目的とする圧縮率を選択すると共に、選択された圧縮率
に応じて収めるべき目的の総符号量および前記暫定的量
子化幅を決定する圧縮率選択手段と、 前記統計処理時の可変長符号化出力をもとに各色成分別
前記各ブロックの符号量を算出すると共に、各色成分別
の総符号量および画像全体の総符号量を算出する算出手
段と、 前記総符号量目標値と前記算出手段の算出値および前記
統計処理に使用した暫定的な量子化幅とに基づいて各色
成分別の最適量子化幅を予測する量子化幅予測手段と、 前記総符号量目標値を前記算出した各色成分別の総符号
量に従って配分し、且つ、前記算出した各色成分別各ブ
ロックの符号量に応じて配分することにより当該各色成
分別各ブロックの基準符号量を決定する決定手段と、 符号化処理時に前記決定手段にて決定した各色成分別各
ブロックの基準符号量を用い、前記ブロックのうち、次
に符号化処理する処理対象ブロックの前に処理した処理
済みブロックでの符号化により発生した符号量と当該処
理済みブロックでの割当符号量との差を求めてこれを前
記処理対象ブロックの前記基準符号量に加えることによ
り得られる符号量を当該処理対象ブロックでの割当符号
量として割り当てる割当手段と、 前記処理対象ブロックでの符号化処理において前記割当
手段により割り当てられた前記割当符号量を越えないよ
うに、前記可変長符号化を打ち切る打ち切り手段と、 前記符号化処理時に前記量子化幅予測手段の予測した各
色成分別の最適量子化幅を使用して各色成分別の量子化
を行うべく制御する制御手段とを備えたことを特徴とす
る画像データの符号化装置。
(4) Divide each of the color image data separated by color component into blocks of a predetermined number of pixels, sequentially perform orthogonal transformation for each divided block by color component, and then quantize the transformed output by quantization means. Then, this quantized output is given to a variable-length encoding means to be variable-length encoded, and when encoding image data, it is first quantized with a provisionally determined quantization width and then variable-length encoded. , performs statistical processing to obtain the code amount for each block, and then calculates the code amount for each block obtained through this statistical processing and the total code amount target value per image to find the appropriate amount to fit within this total code amount target value. The optimal quantization width and allocated code amount for each block are determined, and the transform output for each block is quantized according to the determined optimal quantization width, and the quantized output is allocated for each block. In an encoding device that performs sequential variable length coding while controlling the code amount for each block according to the code amount, the target compression rate is selected and the data should be stored according to the selected compression rate. compression rate selection means for determining the target total code amount and the provisional quantization width; a calculation means for calculating the total code amount for each component and the total code amount for the entire image, based on the total code amount target value, the calculated value of the calculation means, and the provisional quantization width used for the statistical processing; quantization width prediction means for predicting an optimal quantization width for each color component, and distributing the total code amount target value according to the calculated total code amount for each color component; a determining means for determining a reference code amount for each block for each color component by distributing it according to the code amount; Among the blocks, the difference between the amount of code generated by encoding in the processed block processed before the block to be encoded next and the amount of allocated code in the processed block is calculated and this is used in the above processing. an allocation unit that allocates a code amount obtained by adding the code amount to the reference code amount of the target block as an allocated code amount in the target block; and an allocation unit that allocates the code amount obtained by adding the code amount to the reference code amount of the target block; and terminating means for aborting the variable length encoding so as not to exceed the code amount; 1. An image data encoding apparatus, comprising: a control means for controlling to perform image data encoding.
(5)前記量子化手段には前記符号化処理時での量子化
は、前記直交変換により得られる周波数成分別のデータ
のうち、低周波数成分のデータより実施させると共に、
前記可変長符号化手段には前記直交変換により周波数成
分別に得られる前記各ブロック単位の画像データの周波
数成分別データのうち、直流成分については前の処理ブ
ロックでの直流成分との差分を得ると共に、この差分を
可変長符号化する直流成分用の符号化処理部と、この直
流成分について符号化処理部の処理が終った後、前記交
流成分について可変長符号化する交流成分用の符号化処
理部とを設け、前記符号化打ち切り手段は交流成分用の
符号化処理部にのみ設けて構成することを特徴とする請
求項(1)乃至(4)記載の画像データの符号化装置。
(5) The quantization means performs quantization during the encoding process from data of low frequency components among the frequency component data obtained by the orthogonal transformation, and
The variable-length encoding means obtains the difference between the DC component and the DC component in the previous processing block among the frequency component data of the image data for each block obtained by the orthogonal transformation for each frequency component. , a DC component encoding processing unit that variable-length encodes this difference, and an AC component encoding processing unit that performs variable-length encoding on the AC component after the encoding processing unit finishes processing the DC component. 5. The image data encoding apparatus according to claim 1, wherein the encoding aborting means is provided only in the alternating current component encoding processing section.
(6)色成分別に分離されたカラー画像データをそれぞ
れ所定画素数のブロックに分割し、この分割されたブロ
ック毎に順に直交変換を行ってからこの変換出力を量子
化手段により量子化し、その後、この量子化出力を可変
長符号化手段に与えて可変長符号化し、データの符号化
を行う際に、収めるべき目的の総符号量と予め求めた各
ブロック毎の統計量とから決定した各ブロック毎の割当
符号量に従って各ブロック毎に符号量制御を行いながら
可変長符号化を行うにあたり、 前記量子化を暫定的な量子化幅を使用して行い、これに
より得た量子化出力について符号化処理を行い、画像全
体の符号量および各色成分別符号量および各色成分別各
ブロック毎の符号量を調べる第1のステップと、 この第1のステップで得た画像全体の符号量と各色成分
別符号量から最適化に必要な量子化幅の予測を各色成分
別に行う第2のステップと、前記目的の総符号量と各色
成分別各ブロックの符号量から各色成分別各ブロック毎
の基準割当符号量を求める第3のステップと、 前記予測した前記各色成分別の量子化幅を用いて前記各
色成分別各ブロック毎の前記量子化を行う第4のステッ
プと、 この第4のステップでの前記各色成分別各ブロック毎の
量子化出力をそのブロックに対する割当符号量に収まる
範囲で可変長符号化する第5のステップと、 前記第5のステップにおける現在可変長符号化処理しよ
うとするブロックの、直前に処理したブロックでの可変
長符号化による符号量とこのブロックでの割当符号量と
の差を求め、これを繰り越し量として前記現在処理しよ
うとするブロックでの前記基準割当符号量に加算し、前
記現在処理しようとするブロックでの割当符号量とする
第6のステップとを含んでなる画像データの符号化方法
(6) Divide the color image data separated by color component into blocks each having a predetermined number of pixels, sequentially perform orthogonal transformation for each divided block, and then quantize the transformation output by a quantization means, and then, This quantized output is given to variable length encoding means to be variable length encoded, and when encoding data, each block is determined from the target total code amount to be stored and the statistics for each block determined in advance. When performing variable length encoding while controlling the code amount for each block according to the allocated code amount for each block, the quantization is performed using a provisional quantization width, and the quantized output obtained thereby is encoded. A first step of processing and checking the code amount of the entire image, the code amount for each color component, and the code amount for each block for each color component, and the code amount of the entire image obtained in this first step and the code amount for each color component. A second step in which the quantization width required for optimization is predicted for each color component from the code amount, and a standard allocation code for each color component and each block is calculated from the target total code amount and the code amount of each block for each color component. a third step of calculating the amount; a fourth step of performing the quantization for each block of each color component using the predicted quantization width of each color component; a fifth step of variable length encoding the quantized output of each block for each color component within the allocated code amount for that block; and a block to be currently variable length encoded in the fifth step. The difference between the code amount by variable length encoding in the block processed immediately before and the allocated code amount in this block is calculated, and this is added as a carryover amount to the standard allocated code amount in the block to be currently processed. and a sixth step of setting the amount of code to be allocated to the block to be currently processed.
(7)色成分別に分離されたカラー画像データをそれぞ
れ所定画素数のブロックに分割し、この分割されたブロ
ック毎に順に直交変換を行ってからこの変換出力を量子
化手段により量子化し、その後、この量子化出力を可変
長符号化手段に与えて可変長符号化し、データの符号化
を行う際に、収めるべき目的の総符号量と予め求めた各
ブロック毎の統計量とから決定した各ブロック毎の割当
符号量に従って各ブロック毎に符号量制御を行いながら
可変長符号化を行うにあたり、 圧縮率が設定されることにより、この設定された圧縮率
に応じて収めるべき目的の総符号量および暫定的な量子
化幅を決定する第1のステップと、前記量子化を暫定的
な量子化幅を使用して色成分別に行い、これにより得た
色成分別量子化出力について符号化を行い、画像全体の
符号量および各色成分別符号量および各色成分別各ブロ
ック毎の符号量を調べる第2のステップと、 この第2のステップで得た画像全体の符号量と各色成分
別符号量から最適化に必要な量子化幅の予測を各色成分
別に行う第3のステップと、前記目的の総符号量と前記
各色成分別各ブロックの符号量から各色成分別各ブロッ
ク毎の基準割当符号量を求める第4のステップと、 前記予測した前記各色成分別の量子化幅を用いて前記各
色成分別各ブロック毎の前記量子化を行う第5のステッ
プと、 この第5のステップでの前記各色成分別各ブロック毎の
量子化出力をそのブロックに対する割当符号量に収まる
範囲で可変長符号化する第6のステップと、 前記第6のステップにおける現在可変長符号化処理しよ
うとするブロックの、直前に処理したブロックでの可変
長符号化による符号量とこのブロックでの割当符号量と
の差を求め、これを繰り越し量として前記現在処理しよ
うとするブロックでの前記基準割当符号量に加算し、前
記現在処理しようとするブロックでの割当符号量とする
第6のステップとを含んでなる画像データの符号化方法
(7) Divide the color image data separated by color component into blocks each having a predetermined number of pixels, sequentially perform orthogonal transformation for each divided block, and then quantize the transform output by a quantization means, and then, This quantized output is given to variable length encoding means to be variable length encoded, and when encoding data, each block is determined from the target total code amount to be stored and the statistics for each block determined in advance. When performing variable length encoding while controlling the code amount for each block according to the allocated code amount for each block, by setting the compression rate, the target total code amount to be accommodated and a first step of determining a provisional quantization width, performing the quantization for each color component using the provisional quantization width, and encoding the resulting quantized output for each color component; A second step that examines the code amount for the entire image, the code amount for each color component, and the code amount for each block for each color component, and the optimal code amount from the code amount for the entire image and the code amount for each color component obtained in this second step. A third step of predicting the quantization width required for each color component, and calculating the standard allocated code amount for each block for each color component from the target total code amount and the code amount for each block for each color component. a fourth step; a fifth step of performing the quantization for each block for each color component using the predicted quantization width for each color component; and for each color component in this fifth step; a sixth step of variable-length encoding the quantized output of each block within the allocated code amount for that block; and processing immediately before the block to be currently subjected to variable-length encoding in the sixth step. The difference between the code amount by variable-length coding in the block that has been processed and the allocated code amount in this block is calculated, and this is added as the carryover amount to the standard allocated code amount in the block to be currently processed. A method for encoding image data, comprising: a sixth step of assigning a code amount to a block to be processed.
(8)前記暫定的な量子化幅は、画面あたりの総符号量
に応じて予め定めた値を用いることを特徴とする請求項
(6)または(7)記載の画像データの符号化方法。
(8) The image data encoding method according to claim (6) or (7), wherein the provisional quantization width uses a predetermined value depending on the total code amount per screen.
(9)前記暫定的な量子化幅は、選択設定した画面あた
りの総符号量に応じて予め定めた値を用いることを特徴
とする請求項(6)または(7)記載の画像データの符
号化方法。
(9) The image data code according to claim (6) or (7), wherein the provisional quantization width uses a predetermined value according to the selected total code amount per screen. method.
JP2325687A 1990-11-29 1990-11-29 Encoder and encoding method for image data Pending JPH04207266A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2325687A JPH04207266A (en) 1990-11-29 1990-11-29 Encoder and encoding method for image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2325687A JPH04207266A (en) 1990-11-29 1990-11-29 Encoder and encoding method for image data

Publications (1)

Publication Number Publication Date
JPH04207266A true JPH04207266A (en) 1992-07-29

Family

ID=18179599

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2325687A Pending JPH04207266A (en) 1990-11-29 1990-11-29 Encoder and encoding method for image data

Country Status (1)

Country Link
JP (1) JPH04207266A (en)

Similar Documents

Publication Publication Date Title
JP3012698B2 (en) Image data encoding apparatus and encoding method
US5291282A (en) Image data coding apparatus and method capable of controlling amount of codes
JP3085465B2 (en) Image data encoding apparatus and encoding method
US8120671B2 (en) Digital camera for recording a still image while shooting a moving image
US5764806A (en) Image encoding method and apparatus
EP0868092A2 (en) Method and apparatus for compression coding of color image data and digital camera including the same
JPH0832037B2 (en) Image data compression device
JP2959831B2 (en) Image data encoding device
JP2952000B2 (en) Image data encoding apparatus and encoding method
JP3795932B2 (en) Image data compression encoding method and apparatus
JPWO2002080575A1 (en) Image processing apparatus, image processing method, image processing program, and recording medium
JP3037961B2 (en) Electronic camera device and image data encoding device
JP3038022B2 (en) Electronic camera device
JP3239583B2 (en) Imaging device and videophone device having imaging device
JPH04207266A (en) Encoder and encoding method for image data
JP3192133B2 (en) Electronic camera device
JPH04207352A (en) Encoding device and encoding method for image data
JPH04179371A (en) Device and method for encoding picture data
JPH02248180A (en) Picture information coding device
JPH0537901A (en) Image recorder
JPH04114564A (en) Picture signal recording device
JPH07115668A (en) Device and method for compressing image
JPH04220875A (en) Encoding device for picture data
JP3055954B2 (en) Electronic still camera
JP3095788B2 (en) Electronic camera device