JPH04326254A - Image data compressing and encoding device and encoding method - Google Patents

Image data compressing and encoding device and encoding method

Info

Publication number
JPH04326254A
JPH04326254A JP3095452A JP9545291A JPH04326254A JP H04326254 A JPH04326254 A JP H04326254A JP 3095452 A JP3095452 A JP 3095452A JP 9545291 A JP9545291 A JP 9545291A JP H04326254 A JPH04326254 A JP H04326254A
Authority
JP
Japan
Prior art keywords
code amount
code
block
encoding
allocated
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.)
Withdrawn
Application number
JP3095452A
Other languages
Japanese (ja)
Inventor
Akira Hatanaka
畠中 晃
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 JP3095452A priority Critical patent/JPH04326254A/en
Publication of JPH04326254A publication Critical patent/JPH04326254A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE:To present the image data encoding device and encoding method to encode image data within an objective code amount in fixed processing time according to a simple method while guaranteeing compatibility with an international standard plan system and maintaining picture quality. CONSTITUTION:The image data encoding device to divide the image data into plural blocks, to execute orthogonal transformation for each block, to quantize the transformed output and to encode it with a variable length executes a first encoding processing with temporary quantizing width at a variable length encoding part 4, optimizes the quantizing width and predicts the allocated code amount for each block based on this first processing by a quantizing width prediction part 9. According to the optimum quantizing width, a specified variable length code is allocated to an EOB(End of Block) by a code amount allocation part 10 and the image data are encoded by executing second encoding while interrupting the encoding so as not to exceed the allocated code amount by using the two kinds of margin code amounts for the final block allocated by an objective code amount in advance and for the middle block.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、画像データを高圧縮符
号化する符号化装置および符号化方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a coding apparatus and method for highly compression coding image data.

【0002】0002

【従来の技術】一般に、CCD( Charge Co
upled Device)に代表される固体撮像装置
等により撮像された画像信号をメモリカード、磁気ディ
スクあるいは磁気テープ等の記憶装置にディジタルデー
タとして記憶する場合、そのデータ量は膨大なものとな
るため、限られた記憶容量の範囲で記録しようとするに
は、得られた画像信号のデータに対し、何らかの高能率
な圧縮を行なうことが必要となる。
[Prior Art] Generally, CCD (Charge Co.
When storing an image signal captured by a solid-state imaging device, such as an uploaded device, as digital data in a storage device such as a memory card, magnetic disk, or magnetic tape, the amount of data is enormous, so it is difficult to In order to record data within the available storage capacity, it is necessary to perform some kind of highly efficient compression on the obtained image signal data.

【0003】同様に、デジタル電子スチルカメラ等によ
りメモリカード、磁気ディスクあるいは磁気テープ等の
記憶媒体にデジタルデータとして保存する場合において
も、1枚のメモリカード、磁気ディスクあるいは1巻の
磁気テープに記録できる画像の枚数は規定される。しか
も、この規定枚数分の画像の記録が保証されなければな
らず、画像データの記録再生処理に要する時間が短く、
且つ、一定である必要がある。
Similarly, when storing digital data on a storage medium such as a memory card, magnetic disk, or magnetic tape using a digital electronic still camera, the data is recorded on one memory card, magnetic disk, or one roll of magnetic tape. The number of images that can be created is specified. Moreover, recording of this specified number of images must be guaranteed, and the time required to record and reproduce image data is short.
Moreover, it needs to be constant.

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

【0005】すなわち、静止画像であっても、動画像で
あっても、必要なコマ数分を確実に記録できる必要があ
るとともに、データの記録再生処理に要する時間が短く
、且つ、一定である必要がある。
That is, 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 is short and constant. There is a need.

【0006】このようなデ―タの記録再生処理に採用さ
れる高能率な画像デ―タの圧縮方式として、直交変換符
号化と可変長符号化を組み合わせた符号化方法が広く知
られている。その代表的なものとして、静止画符号化国
際標準化において検討されている方式があり、この方式
の概略について説明する。
An encoding method that combines orthogonal transform encoding and variable length encoding is widely known as a highly efficient image data compression method used in such data recording and reproducing processing. . A typical example is a method being considered in the international standardization of still image coding, and an overview of this method will be explained below.

【0007】まず、画像データを所定の大きさのブロッ
クに分割し、分割されたブロック毎に直交変換として、
2次元のDCT(離散コサイン変換)を行なう。次に各
周波数成分に応じた線形量子化を行ない、この量子化さ
れた値に対し可変長符号化としてハフマン符号化を行な
う。この時、直流成分に関しては、近傍ブロックの直流
成分との差分値をハフマン符号化する。また交流成分は
ジグザグスキャンと呼ばれる低い周波数成分から高い周
波数成分へのスキャンを行ない、無効(値が“0”)な
成分の連続する個数と、それに続く有効な成分の値とか
ら2次元のハフマン符号化を行なう。
First, image data is divided into blocks of a predetermined size, and each divided block is subjected to orthogonal transformation.
A two-dimensional DCT (discrete cosine transform) is performed. Next, linear quantization is performed according to each frequency component, and Huffman encoding is performed as variable length encoding on this quantized value. At this time, regarding the DC component, the difference value between it and the DC component of the neighboring block is Huffman encoded. In addition, AC components are scanned from low frequency components to high frequency components called a zigzag scan, and two-dimensional Huffman is calculated from the number of consecutive invalid components (value "0") and the values of the following valid components. Perform encoding.

【0008】以上が、この方式の基本部分である。しか
し、この基本部分だけでは、可変長符号化であるハフマ
ン符号化を用いているために符号量が画像毎に一定では
なくなってしまう。そのため、符号量の制御の方法とし
てニュートン・ラフソン・イタレーション(Newto
n  Raphson  Iterration)を用
いた方式が提案されている。
The above is the basic part of this method. However, in this basic part alone, the amount of code is not constant for each image because Huffman coding, which is variable length coding, is used. Therefore, the Newton-Raphson iteration (Newto
A method using n Raphson Iteration) has been proposed.

【0009】しかしながら、この方式を用いてもなお、
符号化の基本部分のパスを何度繰り返すかが画像によっ
て異なるために、処理時間が不定となるばかりでなく、
一般的に処理時間が長くなるという欠点があった。
However, even if this method is used,
Because the number of times the basic encoding passes are repeated differs depending on the image, not only is the processing time unstable;
Generally, the disadvantage is that the processing time is long.

【0010】これらの問題を解決する手法として、本出
願人による特願平01−283761号、特願平02−
137222号に記載される方式を提案した。これらの
方式は、直交変換と可変長符号化を組み合わせた圧縮方
式において、発生符号量の制御を行なうために、画像メ
モリに記憶し、標本化した画像信号をブロックに分割す
る。
[0010] As a method for solving these problems, Japanese Patent Application No. 01-283761 and Japanese Patent Application No. 02-02 filed by the present applicant have been proposed.
proposed the method described in No. 137222. These methods are compression methods that combine orthogonal transformation and variable length coding, and in order to control the amount of generated code, an image signal stored in an image memory and sampled is divided into blocks.

【0011】この分割されたブロック毎に直交変換を行
なってから、出力される変換出力を暫定的な量子化幅で
量子化した後、該量子化出力を可変長符号化すると共に
、各ブロック毎の発生符号量と画像全体の総発生符号量
を算出する。次に前記暫定的な量子化幅、前記総発生符
号量および、目的とする総符号量とから、新しい量子化
幅を予測する。また、前記各ブロック毎の発生符号量と
、前記総発生符号量と、目的とする総符号量とから、各
ブロック毎の割当符号量を計算する。
After performing orthogonal transformation for each divided block, the outputted transform output is quantized with a provisional quantization width, and then the quantized output is variable-length encoded, and The amount of generated codes for the image and the total amount of generated codes for the entire image are calculated. Next, a new quantization width is predicted from the provisional quantization width, the total generated code amount, and the target total code amount. 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.

【0012】そして、新しい量子化幅を用いて再び画像
メモリの画像信号をブロック分割、直交変換、量子化、
可変長符号化を行なうと共に、各ブロックの発生符号量
が各ブロックの割当符号量を越える場合には、途中で可
変長符号化を中止して、次のブロックの処理に移行する
。これにより、画像全体の総発生符号量が目的の総符号
量を越えないように符号量の制御を行なう。
Then, using the new quantization width, the image signal in the image memory is again divided into blocks, orthogonally transformed, quantized,
When variable length encoding is performed and the amount of code generated for each block exceeds the allocated amount of code for each block, the variable length encoding is stopped midway and processing proceeds to the next block. Thereby, the code amount is controlled so that the total generated code amount for the entire image does not exceed the target total code amount.

【0013】また、ブロック毎の発生符号量を算出し記
憶するかわりに、本出願人が出願した特願平02−29
3924号に記載される固定的な符号量を各ブロックに
割り当てる方式がある。
In addition, instead of calculating and storing the generated code amount for each block,
There is a method described in No. 3924 that allocates a fixed amount of code to each block.

【0014】[0014]

【発明が解決しようとする課題】しかし、前述した方式
を採用すれば、大変に良好な結果が得られるが、これに
より得られる圧縮データをさらに幅広い応用に対して有
効に活性するためには、前記国際標準案方式との互換性
を保証する必要がある。
[Problem to be Solved by the Invention] However, if the above-mentioned method is adopted, very good results can be obtained, but in order to effectively utilize the compressed data obtained by this method for a wider range of applications, it is necessary to It is necessary to ensure compatibility with the above-mentioned international standard draft method.

【0015】この国際標準案方式では、その圧縮データ
をバイトの単位で考えた場合に、特殊なコードを認識す
るための接頭語として16進数の“FF”を挿入するこ
とが決められている。
In this international standard draft system, when the compressed data is considered in units of bytes, it is decided to insert a hexadecimal number "FF" as a prefix to recognize a special code.

【0016】しかし、符号自体でもバイトの単位で区切
ると、“FF”が並ぶ可能性があるので、特殊コードの
接頭語と復号化させない場合であっても、区別する必要
があり、符号自体で“FF”と並んで区切られた場合に
は、その直後に16進数の“00”を挿入(バイトスタ
ッフィング:byte  stuffing)すること
が決められている。
[0016] However, if the code itself is divided into bytes, there is a possibility that "FF" will be lined up, so it is necessary to distinguish it from the prefix of a special code even if it is not decoded. When it is delimited along with "FF", it is decided that a hexadecimal number "00" is inserted immediately after it (byte stuffing).

【0017】さらに、可変長符号としてハフマン符号を
用いる場合は、上記特殊コードの接頭語が挿入される位
置で、符号長がバイト単位に揃うようにビット“1”が
埋め込まれる(ビットスタッフィング:bit  st
uffing)。
Furthermore, when a Huffman code is used as a variable length code, a bit "1" is embedded at the position where the prefix of the special code is inserted so that the code length is aligned in bytes (bit stuffing). st
uffing).

【0018】ところが、実際に符号化を行い、バイト単
位で区切るまでは、バイトスタッフィングが発生するか
否か分からず、そのため発生符号量を予測し、符号量を
適切に割当てることが困難であるばかりでなく、前述し
た符号量制御方式(特願平01−283761号、特願
平02−137222号)のように各ブロックの発生符
号量が各ブロックの割当符号量を越える場合に、途中で
そのブロックの可変長符号化を中止して、ブロックの終
わりを示すEOB(エンド・オブ・ブロック)符号を付
加したことによって、バイトスタッフィングが発生し、
このため割当符号量を大きく越えてしまうようなことも
起り得る。
However, it is not known whether or not byte stuffing will occur until the encoding is actually performed and the data is divided into bytes, which makes it difficult to predict the amount of code that will occur and to allocate the amount of code appropriately. Instead, when the generated code amount of each block exceeds the allocated code amount of each block as in the above-mentioned code amount control method (Japanese Patent Application No. 01-283761, Patent Application No. 02-137222), Byte stuffing occurs because variable length encoding of a block is stopped and an EOB (end of block) code is added to indicate the end of the block.
For this reason, the allocated code amount may be greatly exceeded.

【0019】また、前述した符号量制御方式(特願平0
2−293724号)では、割当てられた符号量が直流
成分さえも符号化するに足りない場合には、直流成分と
EOBコードだけは符号化し、不足した符号量は次のブ
ロックの割当符号量から減算される。しかし、極端に圧
縮率を高くしないかぎり、このような現象が起こること
は、非常に稀である。すなわち、もともと画像全体の画
質が低下している状況の中で起こるために、符号量を減
じられる以降のブロックへの影響もさほど目立たない。
[0019] Furthermore, the above-mentioned code amount control method (patent application
2-293724), if the allocated code amount is insufficient to encode even the DC component, only the DC component and EOB code are encoded, and the insufficient code amount is used from the allocated code amount of the next block. Subtracted. However, unless the compression ratio is extremely high, this phenomenon rarely occurs. That is, since this occurs in a situation where the image quality of the entire image is already degraded, the effect on subsequent blocks whose code amount is reduced is not so noticeable.

【0020】ところが、バイトスタッフィングの発生に
よる符号量の不足も同様に処理するようにした場合、使
用可能な符号量の変動が大きく、画質劣化が目立ってし
まうおそれがあるばかりでなく、画像の最後の方を符号
化する際にバイトスタッフィングが多発すると、目的と
する総符号量を越えてしまうようなことも起り得る。応
用の仕方によっては、これらの方式を採用できない場合
がある。
However, if the shortage of code amount due to byte stuffing is handled in the same way, the amount of usable code will fluctuate greatly, and there is a risk that image quality deterioration will be noticeable. If byte stuffing occurs frequently during encoding, the target total code amount may be exceeded. Depending on the application, these methods may not be applicable.

【0021】そこで本発明は、国際標準案方式との互換
性を保証しつつ、画質を維持し簡単な方法で、一定の処
理時間内で目的とする符号量内に収まるように符号化す
る画像データの符号化装置および符号化方法を提供する
ことを目的とする。
[0021] Therefore, the present invention aims to encode an image to within a target code amount within a certain processing time using a simple method that maintains image quality while ensuring compatibility with the international standard system. An object of the present invention is to provide a data encoding device and encoding method.

【0022】[0022]

【課題を解決するための手段】本発明では前記目的を達
成するために、画像データを複数のブロックに分割し、
各ブロック毎に直交変換を行ない、変換された出力を量
子化手段により量子化し、可変長符号化手段により可変
長符号化する画像データ符号化装置において、前記可変
長符号化された変換係数の各ブロック毎の符号量を算出
するとともに、全画像の符号量を算出する符号量算出手
段と、前記符号量算出手段により算出された画像全体の
符号量と目的とする符号量から最適な量子化幅を予測す
る量子化幅予測手段と、前記符号量算出手段により算出
された各ブロック毎の符号量と、前記量子化幅予測手段
により予測された量子化幅から各ブロック毎にそれぞれ
符号量の割当てを行う符号量割当手段と、前記ブロック
の終わりを示すエンド・オブ・ブロック(EOB)コー
ドに特定の符号を割付けて、可変長符号テーブルを生成
する可変長符号テーブル生成手段と、前記EOBコード
が付加されたブロック以前の各ブロック毎の符号化によ
り発生した符号量の過不足の累積を求める過不足符号量
算出手段と、前記過不足符号量算出手段により求められ
た過不足符号量と、前記割当符号量と、予め設定された
目的符号量から割当てられたマージンの符号量とから、
そのブロックの割当符号量を決定する割当符号量決定手
段と、前記割当符号量決定手段により決定された割当符
号量を越えないように、前記可変長符号化を打ち切る符
号化打ち切り手段と、前記可変長符号化手段から出力さ
れた符号とその他付加情報を多重して出力する符号出力
手段と、前記量子化手段に対し、予め設定された暫定的
な量子化幅を用いて量子化を行わせる第1の符号化処理
を実施させ、その結果、得られた最適な量子化幅と割当
符号量とで第2の符号化処理を実施させるように制御す
る制御手段とで構成される画像データの符号化装置が提
供される。
[Means for Solving the Problems] In order to achieve the above object, the present invention divides image data into a plurality of blocks,
In an image data encoding device that performs orthogonal transformation for each block, quantizes the transformed output by a quantization means, and variable-length encodes it by a variable-length encoding means, each of the variable-length encoded transform coefficients is A code amount calculation means that calculates the code amount of each block and the code amount of the entire image, and an optimal quantization width based on the code amount of the entire image calculated by the code amount calculation means and the target code amount. a quantization width prediction means for predicting the quantization width, a code amount for each block calculated by the code amount calculation means, and a code amount allocated to each block from the quantization width predicted by the quantization width prediction means; code amount allocation means for allocating a specific code to an end of block (EOB) code indicating the end of the block, and variable length code table generation means for generating a variable length code table; an excess/deficiency code amount calculating means for calculating the accumulation of excess/deficiency of code amount caused by encoding of each block before the added block; From the allocated code amount and the margin code amount allocated from the preset target code amount,
an allocated code amount determining means for determining an allocated code amount for the block; a coding aborting means for terminating the variable length encoding so as not to exceed the allocated code amount determined by the allocated code amount determining means; code output means for multiplexing and outputting the code output from the long encoding means and other additional information; and code output means for causing the quantization means to perform quantization using a preset provisional quantization width. and a control means for controlling the first encoding process to be executed and the second encoding process to be executed using the optimum quantization width and allocated code amount obtained as a result. equipment is provided.

【0023】また、画像データを複数のブロックに分割
し、各ブロック毎に直交変換を行ない、変換された出力
を量子化手段により量子化し、可変長符号化手段により
可変長符号化する画像データ符号化方法において、画像
データの符号化処理を行って、各ブロック毎の符号量お
よび画像全体の符号量を調べる第1のステップと、第1
のステップで得た情報から最適な量子化幅と各ブロック
毎の割当符号量を予測する第2のステップと、第2のス
テップで予測した量子化幅を用いて、再度量子化を行う
第3のステップと、第2のステップで予測した割当符号
量と、そのブロック以前に発生した符号量の過不足と、
あらかじめ目的符号量から割当てたマージンの符号量と
から、そのブロックの割当符号量を決定する第4のステ
ップと、この第4のステップで決定した割当符号量に収
まるように可変長符号化を実施する第5のステップより
なる画像データの符号化方法が提供される。
[0023] Also, an image data code in which image data is divided into a plurality of blocks, orthogonal transformation is performed for each block, the transformed output is quantized by a quantization means, and then variable length encoded by a variable length encoding means. The encoding method includes a first step of performing encoding processing on image data and checking the amount of code for each block and the amount of code for the entire image;
The second step is to predict the optimal quantization width and the allocated code amount for each block from the information obtained in the second step, and the third step is to perform quantization again using the quantization width predicted in the second step. step, the allocated code amount predicted in the second step, and the excess or deficiency of the code amount that occurred before that block,
The fourth step is to determine the allocated code amount for the block based on the margin code amount allocated in advance from the target code amount, and variable length encoding is performed to fit within the allocated code amount determined in this fourth step. A method for encoding image data is provided, comprising a fifth step of:

【0024】[0024]

【作用】以上のような構成の画像データの符号化装置お
よび符号化方法によれば、各ブロック毎の生成符号量と
画像全体の生成符号量を算出し、これらから最適な量子
化幅を予測し、また各ブロックに符号量を割当て(第1
の符号化)、直交変換された変換係数に対し、新しい量
子化幅で量子化を行った後、第1の符号化により割当て
られた各ブロック当たりの符号量と、前のブロックまで
の符号量の過不足と、あらかじめ目的符号量から割当て
たマージンの残量とから、最終的なそのブロックの割当
符号量を決定し、必要な場合にはバイトスタッフィング
を行いつつ、割当符号量を越える前に、そのブロックの
符号化を打ち切り、可変長符号化が行なわれる(第2の
符号化)。これらの第1の符号化及び第2の符号化の2
パス処理により、一定の処理時間内で符号化が実施でき
、符号量の制御が各ブロックの割当符号量と、そのブロ
ックまでの割当符号量の過不足とマージンの符号量を用
いて、符号化の打ち切りが、画質の劣化に影響しない高
い周波数の成分に対して行われる。
[Operation] According to the image data encoding device and encoding method configured as described above, the amount of generated codes for each block and the amount of generated codes for the entire image are calculated, and the optimal quantization width is predicted from these. and also assigns a code amount to each block (first
After quantizing the orthogonally transformed transform coefficients using a new quantization width, the amount of codes allocated to each block by the first encoding and the amount of codes up to the previous block are calculated. The final amount of code allocated to the block is determined based on the surplus or deficiency of the amount of code and the remaining amount of margin allocated in advance from the target amount of code, and while performing byte stuffing if necessary, the amount of code allocated before exceeding the allocated amount of code is determined. , the encoding of that block is discontinued, and variable length encoding is performed (second encoding). Two of these first encoding and second encoding
Pass processing allows encoding to be performed within a certain processing time, and the amount of code is controlled using the allocated code amount for each block, excess or deficiency of the allocated code amount up to that block, and the margin code amount. truncation is performed on high frequency components that do not affect image quality deterioration.

【0025】従って、本発明によれば、国際標準案方式
との互換性を保証するためにバイトスタッフィングに対
応しながら、簡単な構成により、一定の処理時間で、目
的とする符号量以内に収まるように、また画質の劣化を
殆んどなしに画像データの符号化を行うことが可能とな
る。
Therefore, according to the present invention, while supporting byte stuffing in order to ensure compatibility with the international standard draft method, it is possible to keep the code amount within the target code amount within a certain processing time with a simple configuration. Thus, image data can be encoded with almost no deterioration in image quality.

【0026】[0026]

【実施例】以下、図面を参照して本発明の実施例を詳細
に説明する。図1は、本発明の実施例として、画像デー
タ圧縮符号化装置の構成を示す図である。
Embodiments Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram showing the configuration of an image data compression encoding device as an embodiment of the present invention.

【0027】この画像データ圧縮符号化装置において、
直交変換部1は、入力端Aから入力した画像データをブ
ロックに分割し、各ブロック毎に直交変換を施し、変換
係数としての画像データを量子化部2へ出力する。そし
て前記量子化部2は、各周波数成分毎に量子化幅を定義
した量子化テーブルにしたがって、前記変換係数を量子
化して、可変長符号テーブル生成部3及び可変長符号化
部4に出力する。
[0027] In this image data compression encoding device,
The orthogonal transformer 1 divides the image data input from the input terminal A into blocks, performs orthogonal transform on each block, and outputs the image data as transform coefficients to the quantizer 2. Then, the quantization unit 2 quantizes the transform coefficients according to a quantization table that defines a quantization width for each frequency component, and outputs the quantization coefficients to the variable length code table generation unit 3 and the variable length encoding unit 4. .

【0028】次に前記可変長符号テーブル生成部3は、
前述の量子化された変換係数の値の発生頻度からハフマ
ン符号テーブルを生成して、前記可変長符号化部4及び
後述する符号出力部7へ出力する。
Next, the variable length code table generation section 3
A Huffman code table is generated from the frequency of occurrence of the quantized transform coefficient values, and is output to the variable length encoder 4 and the code output unit 7, which will be described later.

【0029】そして前記可変長符号化部4では、前記量
子化部2で量子化された変換係数を可変長符号化した後
、ビットスタッフ部5により、前述した特殊コードが挿
入される位置で、符号長がバイト単位で揃うようにビッ
ト“1”が付加される。
In the variable length encoding section 4, after variable length encoding the transform coefficients quantized by the quantization section 2, the bit stuffing section 5 performs variable length encoding at the position where the above-mentioned special code is inserted. A bit "1" is added so that the code lengths are aligned in byte units.

【0030】さらに前記ビットスタッフ部5からバイト
スタッフ部6に前記符号長が出力され、その符号長をバ
イト単位で区切る場合に、16進数の“FF”が、その
符号中に存在するならば、バイト“00”を挿入し、符
号出力部7及び符号量算出部8に出力される。そして前
記符号出力部7は、前述したように符号化された画像デ
ータと、前記量子化テーブル、ハフマン符号テーブル、
特殊コード等の付加情報と多重させて、出力端Bに出力
する。
Furthermore, when the code length is output from the bit stuff section 5 to the byte stuff section 6 and the code length is divided into bytes, if a hexadecimal number "FF" exists in the code, Byte “00” is inserted and output to the code output unit 7 and code amount calculation unit 8. The code output unit 7 outputs the encoded image data as described above, the quantization table, the Huffman code table,
It is multiplexed with additional information such as a special code and output to output terminal B.

【0031】そして前記符号量算出部8は、各ブロック
毎,コンポーネント毎,画像全体等の符号量を算出し、
算出した符号量を量子化幅予測部9に出力する。前記量
子化幅予測部9は、前記符号量算出部8からの算出符号
量や予め設定された目的とする符号量等から最適な量子
化幅を予測し、前記量子化部2に出力する。
[0031]The code amount calculation unit 8 calculates the code amount for each block, each component, the entire image, etc.
The calculated code amount is output to the quantization width prediction unit 9. The quantization width prediction unit 9 predicts the optimum quantization width from the calculated code amount from the code amount calculation unit 8 and a preset target code amount, and outputs it to the quantization unit 2.

【0032】前記符号量割当部10は、前記符号量算出
部8で算出された符号量と目的とする符号量及び、前記
量子化幅予測部9で量子化幅の最適化に用いた係数等か
ら、各ブロックに符号量を割当てる。そして前記符号化
打ち切り制御部11は、各ブロックの生成符号量が割当
符号量を越えずに符号化が打ち切られるように、可変長
符号化部4の動作を制御する。次に、このように構成さ
れた画像データ圧縮符号化装置の符号化方法を図2を参
照して説明する。
The code amount allocation unit 10 uses the code amount calculated by the code amount calculation unit 8, the target code amount, and the coefficients used for optimizing the quantization width by the quantization width prediction unit 9. Then, the amount of code is assigned to each block. The encoding abort control unit 11 controls the operation of the variable length encoder 4 so that the encoding is aborted without the generated code amount of each block exceeding the allocated code amount. Next, the encoding method of the image data compression encoding apparatus configured as described above will be explained with reference to FIG.

【0033】まず、A点より入力された画像データ(a
部)は8×8サンプルにブロック化され(以下、ブロッ
ク画像データと称する)、ブロック毎に直交変換部1に
て離散コサイン変換(DCT)による2次元の直交変換
が行われる。直交変換されたブロック画像データ(変換
係数)は、8×8のマトリックス上の対応する周波数成
分位置(マトリクスの原点位置がDC成分、それ以外は
、AC成分で原点位置より離れるに従って周波数が高く
なる)に格納され(b部)、これが量子化部2に入力さ
れる。
First, image data (a
part) is divided into blocks of 8×8 samples (hereinafter referred to as block image data), and the orthogonal transform unit 1 performs two-dimensional orthogonal transform using discrete cosine transform (DCT) for each block. The orthogonally transformed block image data (transformation coefficients) are divided into corresponding frequency component positions on an 8 x 8 matrix (the origin position of the matrix is the DC component, the others are AC components, and the frequency increases as the distance from the origin position increases) ) (part b), and this is input to the quantization unit 2.

【0034】量子化部2では、このブロック画像データ
(変換係数)に対して第1回目の量子化を行う(c部)
。この装置において、予め設定された各周波数成分毎に
量子化幅を格納した量子化マトリクスに対して、量子化
幅予測部9より与えられる暫定の量子化係数αを乗じた
量子化幅が使用される(i部)。
The quantization section 2 performs the first quantization on this block image data (transform coefficients) (section c).
. In this device, a quantization width is used, which is obtained by multiplying a quantization matrix storing a quantization width for each frequency component set in advance by a provisional quantization coefficient α given by a quantization width prediction unit 9. (Part i).

【0035】そして量子化されたブロック画像データ(
変換係数)は、可変長符号化部4に入力され、図3に示
すような順序で、低い周波数成分から高い周波数成分へ
走査される。
[0035] Then, the quantized block image data (
The transform coefficients) are input to the variable length encoder 4 and scanned from low frequency components to high frequency components in the order shown in FIG.

【0036】この図3に示す走査順序で1番目のデータ
はDC成分であり、直前に可変長符号化されたブロック
(1つ前のブロック)のDC成分との差分値diff−
DCをハフマン符号化する(d1部,e1部)。AC成
分については、図3の走査順序の2番目から64番目ま
で順に変換係数を検索していき(ジグザグスキャン)、
有効な係数(“0”でない係数)が出てきたら、その直
前に存在した連続する無効な係数(“0”の係数)の数
(ゼロラン)と、その有効係数の値とで2次元のハフマ
ン符号化を行う(d2部,e2部)。
The first data in the scanning order shown in FIG. 3 is a DC component, and the difference value diff-
DC is Huffman encoded (d1 part, e1 part). For the AC component, search for conversion coefficients in order from the 2nd to the 64th in the scanning order in FIG. 3 (zigzag scan).
When a valid coefficient (a coefficient that is not "0") appears, a two-dimensional Huffman is calculated using the number of consecutive invalid coefficients (coefficients that are "0") that existed immediately before it (zero run) and the value of the valid coefficient. Encoding is performed (d2 part, e2 part).

【0037】また、可変長符号化部4は、ある係数以降
、64番目の係数まで連続して無効な係数が続く場合は
、ブロックの終わりを示すEOBの符号を付加する。 そして、各符号について、その符号長を符号量算出部8
に出力する(g1部)。
Furthermore, if invalid coefficients continue after a certain coefficient up to the 64th coefficient, the variable length encoder 4 adds an EOB code indicating the end of the block. Then, for each code, the code length is calculated by the code amount calculation unit 8.
Output to (g1 part).

【0038】符号量算出部8は入力されたY,Cr,C
bの各コンポーネントの1画像全体の符号量を算出すべ
く、各ブロック毎の符号量の算出とその符号量の積算を
行う(g2部)と共に、各ブロックごとの符号量のデー
タを符号量割当部10に出力する。このように1画像分
の全ブロックについてハフマン符号化の処理を終了した
段階で、符号量算出部8は、この画像全体の符号量デー
タを量子化幅予測部9に出力する。
[0038] The code amount calculation unit 8 receives input Y, Cr, C.
In order to calculate the code amount for the entire image of each component of b, the code amount for each block is calculated and the code amount is integrated (part g2), and the code amount data for each block is allocated to the code amount. output to section 10. When the Huffman encoding process has been completed for all blocks of one image in this way, the code amount calculation unit 8 outputs the code amount data for the entire image to the quantization width prediction unit 9.

【0039】前記量子化幅予測部9は、この画像全体の
符号量データと目的総符号量とから、最適な量子化幅係
数αを、第1回目の量子化で使用した量子化幅係数に基
づいて予測する(h1部)。
The quantization width prediction unit 9 sets the optimum quantization width coefficient α to the quantization width coefficient used in the first quantization from the code amount data of the entire image and the target total code amount. Prediction is made based on this (h1 part).

【0040】前記符号量割当部10は、第1回目および
最適化した量子化幅係数αと、各ブロック毎の第1回目
の符号化による生成符号量とから各ブロックで使用可能
な符号量を算出する(h2部)。以上で、各ブロックの
割当符号量および最適な量子化幅の予測のための第1の
符号化(統計処理)を終了する。次に、目的総符号量に
収まるように最適化した最終の符号化出力を得るための
第2の符号化(符号化処理)を行う。
[0040] The code amount allocation unit 10 calculates the usable code amount for each block from the first and optimized quantization width coefficient α and the generated code amount by the first encoding for each block. Calculate (h2 part). This completes the first encoding (statistical processing) for predicting the allocated code amount and optimal quantization width for each block. Next, second encoding (encoding processing) is performed to obtain a final encoded output optimized to fit within the target total code amount.

【0041】量子化部2でブロック画像データ(変換係
数)(b部)に対し、第1の符号化において量子化幅予
測部9で算出した最適量子化係数α(h1部)および量
子化マトリクス(i部)を使用して、再び量子化を行う
(c部)。
The quantization unit 2 uses the optimal quantization coefficient α (h1 part) and quantization matrix calculated by the quantization width prediction unit 9 in the first encoding for the block image data (transform coefficients) (b part). (part i) is used to perform quantization again (part c).

【0042】次に量子化されたブロック画像データ(変
換係数)は、可変長符号化部4に入力される。統計処理
の時と同様、まずDC成分の差分値diff−DCをハ
フマン符号化し(d1部,e1部)、次にAC成分をジ
グザグスキャンで順次データ抽出して2次元のハフマン
符号化を行う(d2部,e2部)。
Next, the quantized block image data (transform coefficients) is input to the variable length encoding section 4. As in the statistical processing, first the difference value diff-DC of the DC component is Huffman encoded (d1 part, e1 part), then the data of the AC component is sequentially extracted by zigzag scan and two-dimensional Huffman encoding is performed ( d2 part, e2 part).

【0043】ただし、1つのブロックの処理ごとに、符
号量割当部10は統計処理で算出した各ブロックの割当
符号量(h2部)と、直前までのブロックの符号化で発
生した過不足符号量の累積から、そのブロックの割当符
号量を最終的に決定し、符号化打ち切り部11に出力す
る。前記符号化打ち切り部11では、1つのハフマン符
号が発生する度に、その符号およびEOBを送出した時
に割当符号量を越えないか監視する。越えない場合は、
発生した符号量を割当符号量から減算する。
However, for each block processed, the code amount allocation unit 10 calculates the allocated code amount (h2 part) of each block calculated by statistical processing and the excess or deficiency code amount generated in the encoding of the previous block. The allocated code amount for the block is finally determined based on the accumulation of , and is output to the coding abort unit 11 . Each time a Huffman code is generated, the coding abort unit 11 monitors whether the allocated code amount is exceeded when the code and EOB are sent. If it does not exceed
The generated code amount is subtracted from the allocated code amount.

【0044】越える場合は、そのブロックの符号化を打
ち切り、その符号を出力せずにEOBを付加するように
可変長符号化部4を制御し、発生した符号量(EOBの
み)を割当符号量から減算する。ただしDC成分につい
ては、その符号も出力した後にEOBを付加する。
[0044] If the amount exceeds the number, the variable length encoding unit 4 is controlled to stop the encoding of that block, add EOB without outputting the code, and use the generated code amount (EOB only) as the allocated code amount. Subtract from. However, for the DC component, EOB is added after its code is also output.

【0045】前述した特殊コードが挿入される位置では
、ビットスタッフ部5により、符号量がバイト単位にな
るか監視され、バイト単位に揃わない場合はビット“1
”が必要な数だけ付加される。
At the position where the above-mentioned special code is inserted, the bit stuff section 5 monitors whether the code amount is in byte units, and if it is not aligned in byte units, the bit "1" is set.
” are added as many times as necessary.

【0046】バイトスタッフィング部6は、符号をビッ
トスタッフも含めてバイト単位に区切って16進数で“
FF”という並びが見つかると直後に“00”を挿入し
、符号量の増加は符号化打ち切り部11、符号量算出部
8に伝えられる。符号化打ち切り部11では、このビッ
トスタッフィング,バイトスタッフィングによる符号量
の増加は、ビットスタッフィング,バイトスタッフィン
グを引き起こした符号の次の符号の符号量を監視する前
に割当符号量から減算される。
[0046] The byte stuffing unit 6 divides the code into bytes including the bit stuff and writes it in hexadecimal notation as "
When the sequence "FF" is found, "00" is inserted immediately after, and the increase in the code amount is transmitted to the coding abort section 11 and the code amount calculation section 8. The increase in code amount is subtracted from the allocated code amount before monitoring the code amount of the code following the code that caused bit stuffing or byte stuffing.

【0047】以上のように、割当符号量を監視しながら
ハフマン符号化を行なうため、1つのブロックの符号化
を終了した時(符号化打ち切りも含めて)に、割当符号
量が“0”又は負となるのは、DC成分のみの符号化あ
るいはビットスタッフィング,バイトスタッフィングの
発生により割当符号量を越える場合である。
As described above, since Huffman encoding is performed while monitoring the allocated code amount, when the coding of one block is completed (including the termination of coding), the allocated code amount is "0" or The value becomes negative when the allocated code amount is exceeded due to encoding of only the DC component or occurrence of bit stuffing or byte stuffing.

【0048】1つのブロックの符号化を終了した時に、
割当符号量が余った場合は、過不足符号量に加算され、
次のブロックの割当符号量の決定に使用される。また割
当符号量が不足した場合は、あらかじめ目的符号量から
マージンとして確保してある符号量からこれを充当する
。このマージンを使い切ってしまった場合は過不足符号
量から減算され、次のブロックの割当符号量の決定に使
用される。
[0048] When the encoding of one block is finished,
If the allocated code amount is surplus, it will be added to the surplus or deficiency code amount,
It is used to determine the allocated code amount for the next block. Furthermore, if the allocated code amount is insufficient, the code amount is allocated from the code amount secured in advance as a margin from the target code amount. If this margin is used up, it is subtracted from the surplus/deficiency code amount and used to determine the allocated code amount for the next block.

【0049】また画像全体の最後のブロックを符号化す
る際は、前述したものとは別に、マージンが確保されて
おり、DC成分の符号化、またはビットスタッフィング
,バイトスタッフィングの発生により割当符号量を越え
る場合はこのマージンを充当する。
[0049] In addition to the above, when encoding the last block of the entire image, a margin is secured, and the allocated code amount can be reduced by encoding the DC component or by bit stuffing or byte stuffing. If it exceeds, this margin will be used.

【0050】またハフマン符号化の際使用するハフマン
符号テーブルは、量子化部2から出力される量子化ブロ
ック画像データの変換係数の値の発生頻度を集計して可
変長符号テーブル生成部3により生成される。あるいは
発生頻度に関らず特定のハフマン符号テーブルを使用し
ても良いが、EOBの符号は前述したようなそれを付加
することにより、バイトスタッフィングが発生すること
のない値とする。このことで、符号化を打ち切ることに
よって割当符号量内に生成符号量が収まることが保証さ
れる。
The Huffman code table used in Huffman encoding is generated by the variable length code table generation unit 3 by summing up the frequency of occurrence of the transform coefficient values of the quantized block image data output from the quantization unit 2. be done. Alternatively, a specific Huffman code table may be used regardless of the frequency of occurrence, but by adding the EOB code as described above, it is assumed that byte stuffing will not occur. This ensures that the generated code amount falls within the allocated code amount by terminating the encoding.

【0051】このようにして符号化された画像データは
、符号出力部7で最終的に使用した量子化テーブル、ハ
フマン符号テーブル、その他付加情報と多重され、出力
端Bより出力される。
The image data encoded in this manner is multiplexed with the finally used quantization table, Huffman code table, and other additional information in the code output section 7, and is outputted from the output terminal B.

【0052】本実施例では、国際標準案の基本方式にし
たがって、ブロックのサイズは8×8、直交変換はDC
T(離散コサイン変換)、可変長符号化にはハフマン符
号を用いたが、本発明の実施例は、これらに限定される
ものではない。
In this embodiment, the block size is 8×8, and the orthogonal transformation is DC
Although Huffman codes were used for T (discrete cosine transform) and variable length encoding, the embodiments of the present invention are not limited to these.

【0053】本発明の画像データ圧縮符号化装置及び符
号化方法により、画像データをブロックに分割し、この
分割されたブロック毎に直交変換を行ってから、この変
換出力を量子化し、その後この量子化出力を可変長符号
化することにより画像データを符号化する際に、暫定的
な量子化幅を用いて第1の符号化処理を行ない、その結
果をもとに量子化幅の最適化および各ブロック毎の割当
符号量の予測を行い、最適化された量子化幅を用いて、
またEOBに特定の可変長符号を割付け、あらかじめ目
的符号量から割当てた、最終ブロックと途中のブロック
用の2種類のマージン符号量を用いて、割当符号量を越
えないよう、必要な場合は符号化の打ち切りを行いなが
ら第2の符号化を実施することにより、国際標準案方式
との互換性を保証するために、バイトスタッフィングに
対応しながら、簡単な構成により一定の処理時間内で、
目的とする符号量以内に収まるように、また画質の劣化
も殆んどなしに、画像データの符号化を行うことができ
る。
According to the image data compression encoding device and encoding method of the present invention, image data is divided into blocks, orthogonal transformation is performed for each divided block, and the output of this transformation is quantized. When encoding image data by variable-length encoding the encoded output, a first encoding process is performed using a provisional quantization width, and the quantization width is optimized and Predict the allocated code amount for each block and use the optimized quantization width,
In addition, a specific variable-length code is assigned to the EOB, and two types of margin code amounts are allocated in advance from the target code amount for the final block and intermediate blocks. By performing the second encoding while aborting the encoding, in order to guarantee compatibility with the proposed international standard system, we can deal with byte stuffing while maintaining a simple configuration within a certain processing time.
Image data can be encoded within a target code amount and with almost no deterioration in image quality.

【0054】以上、詳述したように本実施例では統計処
理、符号化処理の二段階の符号化により処理を終了する
為に一定時間内での画像データの符号化が可能である。 また、統計処理により、量子化幅の最適化、各ブロック
毎の符号量割当てを行うことにより、目的符号量に対し
精度よく符号量を制御するばかりでなく、偶発的なバイ
トスタッフィングの発生に対しても、EOBコードに特
定の符号を割付けること、および2種類のマージンを設
けることにより、画質の劣化を抑えながら、目的符号量
内に生成符号量を抑えることを可能としている。また本
発明は、前述した実施例に限定されるものではなく、他
にも発明の要旨を逸脱しない範囲で種々の変形や応用が
可能であることは勿論である。
As described in detail above, in this embodiment, the image data can be encoded within a certain period of time because the processing is completed by two-stage encoding, that is, statistical processing and encoding processing. In addition, by optimizing the quantization width and allocating the code amount for each block through statistical processing, it is possible to not only control the code amount accurately relative to the target code amount, but also to prevent the occurrence of accidental byte stuffing. However, by assigning a specific code to the EOB code and providing two types of margins, it is possible to suppress the amount of generated code within the target code amount while suppressing deterioration of image quality. Further, the present invention is not limited to the embodiments described above, and it goes without saying that various modifications and applications can be made without departing from the gist of the invention.

【0055】[0055]

【発明の効果】以上詳述したように本発明によれば、国
際標準案方式との互換性を保証しつつ、画質を維持し簡
単な構成で、一定の処理時間内で目的とする符号量内に
収まるように符号化する画像データの符号化装置および
符号化方法を提供することができる。
Effects of the Invention As described in detail above, according to the present invention, it is possible to maintain image quality while ensuring compatibility with the international standard system, and to achieve the desired amount of code within a certain processing time with a simple configuration. It is possible to provide an encoding device and an encoding method for image data that encodes image data so that it fits within

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

【図1】図1は、本発明の実施例として、画像データ圧
縮符号化装置の構成を示す図である。
FIG. 1 is a diagram showing the configuration of an image data compression encoding device as an embodiment of the present invention.

【図2】図2は、図1に示す構成の画像データ圧縮符号
化装置の符号化方法を説明するためのブロック図である
FIG. 2 is a block diagram for explaining the encoding method of the image data compression encoding apparatus having the configuration shown in FIG. 1;

【図3】図3は、量子化されたブロック画像データの変
換係数の検索する走査順序を示す図である。
FIG. 3 is a diagram showing a scanning order for searching for transform coefficients of quantized block image data.

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

1…直交変換部、2…量子化部、3…可変長符号テーブ
ル生成部、4…可変長符号化部、、5…ビットスタッフ
部、6…バイトスタッフ部、7…符号出力部、8…符号
量算出部、9…量子化幅予測部、10…符号量割当部、
11…符号化打ち切り制御部11、A…入力端、B…出
力端。
DESCRIPTION OF SYMBOLS 1... Orthogonal transformation unit, 2... Quantization unit, 3... Variable length code table generation unit, 4... Variable length encoding unit, 5... Bit stuff unit, 6... Byte stuff unit, 7... Code output unit, 8... Code amount calculation unit, 9... Quantization width prediction unit, 10... Code amount allocation unit,
11... Encoding abort control unit 11, A... Input end, B... Output end.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  画像データを複数のブロックに分割し
、各ブロック毎に直交変換を行ない、変換された出力を
量子化手段により量子化し、可変長符号化手段により可
変長符号化する画像データ符号化装置において、前記可
変長符号化された変換係数の各ブロック毎の符号量を算
出するとともに、全画像の符号量を算出する符号量算出
手段と、前記符号量算出手段により算出された画像全体
の符号量と目的とする符号量から最適な量子化幅を予測
する量子化幅予測手段と、前記符号量算出手段により算
出された各ブロック毎の符号量と、前記量子化幅予測手
段により予測された量子化幅から各ブロック毎にそれぞ
れ符号量の割当てを行う符号量割当手段と、前記ブロッ
クの終わりを示すエンド・オブ・ブロック(EOB)コ
ードに特定の符号を割付けて、可変長符号テーブルを生
成する可変長符号テーブル生成手段と、前記EOBコー
ドが付加されたブロック以前の各ブロック毎の符号化に
より発生した符号量の過不足の累積を求める過不足符号
量算出手段と、前記過不足符号量算出手段により求めら
れた過不足符号量と、前記割当符号量と、予め設定され
た目的符号量から割当てられたマージンの符号量とから
、そのブロックの割当符号量を決定する割当符号量決定
手段と、前記割当符号量決定手段に決定された割当符号
量を越えないように、前記可変長符号化を打ち切る符号
化打ち切り手段と、前記可変長符号化手段から出力され
た符号とその他付加情報を多重して出力する符号出力手
段と、前記量子化手段に対し、予め設定された暫定的な
量子化幅を用いて量子化を行わせる第1の符号化処理を
実施させ、その結果、得られた最適な量子化幅と割当符
号量とで第2の符号化処理を実施させるように制御する
制御手段とを備えたことを特徴とする画像データの符号
化装置。
1. An image data code in which image data is divided into a plurality of blocks, orthogonal transformation is performed for each block, the transformed output is quantized by a quantization means, and variable length encoded by a variable length encoding means. In the encoding device, a code amount calculation means calculates the code amount for each block of the variable-length encoded transform coefficients and also calculates the code amount of the entire image, and the entire image calculated by the code amount calculation means. a quantization width prediction means for predicting an optimal quantization width from the code amount and a target code amount; a code amount for each block calculated by the code amount calculation means; and prediction by the quantization width prediction means. code amount allocation means that allocates a code amount to each block from the quantization width that has been determined; and a variable length code table that allocates a specific code to an end of block (EOB) code indicating the end of the block. variable-length code table generation means for generating a variable-length code table; excess/deficiency code amount calculation means for calculating the accumulation of excess/deficiency of code amount caused by encoding of each block before the block to which the EOB code is added; An allocated code amount for determining the allocated code amount of the block from the surplus/deficit code amount calculated by the code amount calculation means, the allocated code amount, and the margin code amount allocated from the preset target code amount. a determining means, a coding aborting means for aborting the variable length encoding so as not to exceed the allocated code amount determined by the allocated code amount determining means, and a code output from the variable length encoding means and other additions. A first encoding process is performed in which the code output means for multiplexing and outputting information and the quantization means perform quantization using a preset temporary quantization width, and as a result, 1. An image data encoding device comprising: a control means for performing control so as to perform a second encoding process using the obtained optimal quantization width and allocated code amount.
【請求項2】  画像データを複数のブロックに分割し
、各ブロック毎に直交変換を行ない、変換された出力を
量子化手段により量子化し、可変長符号化手段により可
変長符号化する画像データ符号化方法において、画像デ
ータの符号化処理を行って、各ブロック毎の符号量およ
び画像全体の符号量を調べる第1のステップと、第1の
ステップで得た情報から最適な量子化幅と各ブロック毎
の割当符号量を予測する第2のステップと、第2のステ
ップで予測した量子化幅を用いて、再度量子化を行う第
3のステップと、第2のステップで予測した割当符号量
と、そのブロック以前に発生した符号量の過不足と、あ
らかじめ目的符号量から割当てたマージンの符号量とか
ら、そのブロックの割当符号量を決定する第4のステッ
プと、この第4のステップで決定した割当符号量に収ま
るように可変長符号化を実施する第5のステップよりな
ることを特徴とする画像データの符号化方法。
2. An image data code in which image data is divided into a plurality of blocks, orthogonal transformation is performed for each block, the transformed output is quantized by a quantization means, and variable length encoded by a variable length encoding means. In the quantization method, the first step is to encode the image data and check the amount of code for each block and the amount of code for the entire image, and determine the optimal quantization width and each amount from the information obtained in the first step. A second step of predicting the allocated code amount for each block, a third step of performing quantization again using the quantization width predicted in the second step, and an allocated code amount predicted in the second step. and a fourth step of determining the allocated code amount for the block based on the excess or deficiency of the code amount that occurred before that block and the code amount of the margin allocated in advance from the target code amount. A method for encoding image data, comprising a fifth step of performing variable length encoding so as to fit within the determined allocated code amount.
JP3095452A 1991-04-25 1991-04-25 Image data compressing and encoding device and encoding method Withdrawn JPH04326254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3095452A JPH04326254A (en) 1991-04-25 1991-04-25 Image data compressing and encoding device and encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3095452A JPH04326254A (en) 1991-04-25 1991-04-25 Image data compressing and encoding device and encoding method

Publications (1)

Publication Number Publication Date
JPH04326254A true JPH04326254A (en) 1992-11-16

Family

ID=14138090

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3095452A Withdrawn JPH04326254A (en) 1991-04-25 1991-04-25 Image data compressing and encoding device and encoding method

Country Status (1)

Country Link
JP (1) JPH04326254A (en)

Similar Documents

Publication Publication Date Title
US6072835A (en) Variable transfer rate control coding apparatus
US5661523A (en) Moving picture coding method and an apparatus therefor
US5335016A (en) Image data compressing/coding apparatus
KR100756596B1 (en) Video data encoder and video data encoding method
JP3115199B2 (en) Image compression coding device
US7215818B2 (en) Image compression coding apparatus and control method therefor
JP5524072B2 (en) Video encoding device
US20050157785A1 (en) Video signal quantizing apparatus and method thereof
WO2000065842A1 (en) Image encoder and its method
JPH10191343A (en) Device and method for compressing video data
JPH06141298A (en) Variable transfer rate coder and recording medium
JP2952000B2 (en) Image data encoding apparatus and encoding method
JPH04326254A (en) Image data compressing and encoding device and encoding method
JP2935334B2 (en) Code amount control method
JPH05227519A (en) Encoder and decoder for picture data
JP2915922B2 (en) Image signal compression coding device
JPH04343578A (en) Image compressing/coding device
JP2931328B2 (en) Image signal compression coding device
KR100225348B1 (en) A quantizing coefficient count apparatus for decision of quantizing number
JPH04208775A (en) Bit distribution encoding system
EP0758513A1 (en) Device and method for coding video pictures
JPH04314266A (en) Device and method for encoding picture data
JPH04326859A (en) Device and method for encoding picture data
JPH05300379A (en) Code quantity distribution circuit
JPH06292180A (en) Image compression encoder

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980711