JPH04345369A - Picture data encoder - Google Patents

Picture data encoder

Info

Publication number
JPH04345369A
JPH04345369A JP3118825A JP11882591A JPH04345369A JP H04345369 A JPH04345369 A JP H04345369A JP 3118825 A JP3118825 A JP 3118825A JP 11882591 A JP11882591 A JP 11882591A JP H04345369 A JPH04345369 A JP H04345369A
Authority
JP
Japan
Prior art keywords
circuit
block
bits
image data
bit allocation
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
JP3118825A
Other languages
Japanese (ja)
Inventor
Hiroyuki Akagi
宏之 赤木
Hiroyuki Katada
裕之 堅田
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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP3118825A priority Critical patent/JPH04345369A/en
Priority to DE69226095T priority patent/DE69226095T2/en
Priority to EP92100680A priority patent/EP0495501B1/en
Priority to US07/821,221 priority patent/US5327502A/en
Publication of JPH04345369A publication Critical patent/JPH04345369A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Analogue/Digital Conversion (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PURPOSE:To obtain a picture data encoder which operates an optimal bit assignment to make a quantization error minimum under decided information amounts. CONSTITUTION:One screen picture data are divided into plural blocks by a block circuit 102, an orthogonal transformation is operated by an orthogonal transformation circuit 103, the number of bits is assigned so that the picture data amounts for one frame can be constant by a bit assigning circuit 104, the bit is assigned to the conversion factor of each block according to a variance within the range by a bit assigning circuit 105, a quantization index is prepared according to this by a quantizing circuit 106, and the data are encoded by an encoding circuit 107. The received code is decoded by a decoding circuit 109, the quantization index is inverse quantized by an inverse quantizing circuit 111 in order to restore the conversion factor from the prescribed additional information of a bit assigning circuit 110 and the assigned number of bits of the conversion factor based on this, an inverse orthogonal transformation is operated by an inverse orthogonal transformation circuit 112 in order to restore the picture data, and the blocks are decomposed by a block decomposing circuit 113 in order to reproduce the original picture data for one screen.

Description

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

【0001】0001

【産業上の利用分野】本発明は、画像データを符号化し
、伝送媒体を介して送受信するための画像データ符号化
装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image data encoding apparatus for encoding image data and transmitting and receiving the encoded image data via a transmission medium.

【0002】0002

【従来の技術】従来、画像データの伝送レートを一定に
保つため、画像データを所定の量子化ステップで量子化
した後、その情報量を計算し、これが目標とする値とな
るように量子化ステップを変更して量子化をやり直すと
いう、いわゆるフィードバック法が用いられている。し
かしこの方法では、リアルタイム処理が必要な動画の場
合には正確に情報量を制御することが困難であり、特に
デジタルVTRなどのパッケージメディア系の装置には
適さない。
[Background Art] Conventionally, in order to keep the transmission rate of image data constant, image data is quantized at a predetermined quantization step, the amount of information is calculated, and quantization is performed so that this becomes a target value. A so-called feedback method is used in which the step is changed and the quantization is re-performed. However, with this method, it is difficult to accurately control the amount of information in the case of moving images that require real-time processing, and is particularly unsuitable for package media devices such as digital VTRs.

【0003】そこで画像データのある範囲内の情報量を
一定にすることが比較的容易なフィードフォワード型の
符号化方式が提案されている。ADRC方式、変換符号
化を用いた方式などがその例である。ADRC方式は、
分割された画像データの各ブロックのダイナミックレン
ジにより、各ブロックに割り当てる平均ビット数を、ビ
ットレートを一定にして適応的に割り当てるというもの
であり、ブロック適応型の符号化方式である。また変換
符号化を用いた方式としては、一般に、画像データを直
交変換して得られる変換係数に対して、ビットレートを
一定にして量子化誤差を最小とするように各係数のビッ
ト配分を決める係数適応型の符号化方式が知られている
[0003] Therefore, a feedforward encoding method has been proposed, which makes it relatively easy to keep the amount of information constant within a certain range of image data. Examples include an ADRC method and a method using transform coding. The ADRC method is
This is a block-adaptive encoding method in which the average number of bits allocated to each block is adaptively allocated to each block while keeping the bit rate constant, depending on the dynamic range of each block of divided image data. In addition, in a method using transform coding, the bit allocation for each coefficient is generally determined for the transform coefficients obtained by orthogonally transforming image data so as to keep the bit rate constant and minimize the quantization error. Coefficient adaptive encoding methods are known.

【0004】0004

【発明が解決しようとする課題】しかし、ADRC方式
では、上述のようにブロックのダイナミックレンジを使
用しているので、分散などの統計量を使用した場合に比
べて各ブロックへのビット割り当ての精度は低く、また
、ブロック内部において変換係数に対し、最適なビット
割り当てを行っていない。一方、変換符号化を用いた方
式では、変換係数については適応的なビット配分を行っ
ているものの、各ブロックに対するビット割り当てにつ
いては考慮していない。従って、いずれの方式でも必ず
しも最適なビット割り当てが行われているとはいえない
[Problem to be Solved by the Invention] However, since the ADRC method uses the dynamic range of blocks as described above, the accuracy of bit allocation to each block is lower than when using statistics such as variance. is low, and optimal bit allocation is not performed for transform coefficients within the block. On the other hand, in the method using transform coding, although adaptive bit allocation is performed for transform coefficients, bit allocation to each block is not considered. Therefore, it cannot be said that optimal bit allocation is necessarily performed in either method.

【0005】本発明の目的は、このような問題を解決し
、決められた情報量のもとで量子化誤差を最小にする最
適のビット割当が可能な画像データ符号化装置を提供す
ることにある。
An object of the present invention is to solve such problems and provide an image data encoding device capable of optimal bit allocation that minimizes quantization errors under a predetermined amount of information. be.

【0006】[0006]

【課題を解決するための手段】本発明の前記目的は、1
画面分の画像データを複数のブロックに分割するブロッ
ク化手段と、ブロック毎に画像データを直交変換して変
換係数を求める直交変換手段と、画像データの情報量が
所定の大きさの領域毎に一定になるように各ブロックの
変換係数の統計量に応じて各ブロックにビット数を割り
当てる第1のビット割り当て手段と、ブロック毎に割り
当てられたビット数の範囲で各変換係数にビットを割り
当てる第2のビット割り当て手段と、割り当てられたビ
ットの数に応じた量子化ステップで変換係数を量子化し
量子化インデックスを作成する量子化手段と、作成され
た量子化インデックスを符号化し付加情報と共に一定の
ビットレートで送出する符号化手段と、該符号化手段か
ら受容した符号を復号し量子化インデックスを復元する
復号手段と、前記復元された量子化インデックス及び前
記付加情報に基づいて各変換係数の割り当てビット数を
決定する第3のビット割り当て手段と、前記復号された
量子化インデックス、前記付加情報及び前記割り当てビ
ット数に基づいて前記量子化インデックスを逆量子化し
て変換係数を復元する逆量子化手段と、復元された変換
係数を逆直交変換することによりブロック毎に画像デー
タを復元する逆直交変換手段と、ブロックを分解して前
記復元された画像データから1画面分の画像データを再
生するブロック分解手段とを備えたことを特徴とする画
像データ符号化装置によって達成される。
[Means for Solving the Problems] The above objects of the present invention are as follows:
A blocking unit divides image data for a screen into a plurality of blocks, an orthogonal transformation unit performs orthogonal transformation on the image data for each block to obtain transformation coefficients, and a block unit divides the image data for each block into a plurality of blocks. a first bit allocation means that allocates the number of bits to each block according to the statistics of the transform coefficients of each block so as to be constant; and a second bit allocator that allocates bits to each transform coefficient within the range of the number of bits allocated for each block; 2 bit allocation means, quantization means that quantizes the transform coefficient in a quantization step according to the number of allocated bits and creates a quantization index, and encodes the created quantization index and quantizes it along with additional information. an encoding means for transmitting at a bit rate; a decoding means for decoding the code received from the encoding means to restore a quantization index; and assignment of each transform coefficient based on the restored quantization index and the additional information. a third bit allocation means for determining the number of bits; and a dequantization means for dequantizing the quantization index and restoring the transform coefficient based on the decoded quantization index, the additional information, and the allocated number of bits. , an inverse orthogonal transform means for restoring image data block by block by performing inverse orthogonal transform on the restored transform coefficients, and a block for decomposing the blocks and reproducing one screen's worth of image data from the restored image data. This is achieved by an image data encoding device characterized by comprising decomposition means.

【0007】[0007]

【作用】画像データが入力されると、ブロック化手段は
まず、入力された1画面分の画像データを複数のブロッ
クに分割し、直交変換手段は画像データに対してブロッ
ク毎に直交変換を行い直交変換係数を求める。第1のビ
ット割当手段は、この変換係数にもとづいて、所定の大
きさの領域(例えば1フレーム)の画像データの情報量
が一定となるように各ブロックの分散等の統計量に応じ
てビット数を各ブロックに割り当てる。さらに、第2の
ビット割当手段は、第1のビット割当手段が割り当てた
ビット数の範囲内で、ブロック毎に各変換係数に対しビ
ットを割り当てる。量子化手段は、この第2のビット割
当手段が割り当てたビットの数に応じた量子化レベルで
変換係数を量子化し、量子化インデックスを作成する。 量子化インデックスは符号化手段により符号化され一定
のビットレートで伝送媒体に送出される。
[Operation] When image data is input, the blocking means first divides the input image data for one screen into multiple blocks, and the orthogonal transformation means performs orthogonal transformation on the image data for each block. Find orthogonal transformation coefficients. Based on the transform coefficient, the first bit allocation means assigns bits according to statistics such as the variance of each block so that the amount of information of the image data in a predetermined size area (for example, one frame) is constant. Assign a number to each block. Further, the second bit allocation means allocates bits to each transform coefficient for each block within the range of the number of bits allocated by the first bit allocation means. The quantization means quantizes the transform coefficient at a quantization level corresponding to the number of bits allocated by the second bit allocation means, and creates a quantization index. The quantization index is encoded by the encoding means and sent to the transmission medium at a constant bit rate.

【0008】伝送媒体を介して受信された符号は、復号
手段により復号され、第3のビット割当手段がまず量子
化インデックスと所定の付加情報とにもとづいて変換係
数の割当ビット数を求める。逆量子化手段は、付加情報
、ならびに第3のビット割当手段により求められた割当
ビット数にもとづいて、量子化インデックスを逆量子化
する。逆直交変換手段はその結果に対して逆直交変換を
行い、画像データを復元する。ブロック分解手段はブロ
ックを分解し、1画面分の画像データを再生する。
The code received via the transmission medium is decoded by the decoding means, and the third bit allocation means first determines the number of bits to be allocated to the transform coefficient based on the quantization index and predetermined additional information. The dequantization means dequantizes the quantization index based on the additional information and the number of allocated bits determined by the third bit allocation means. The inverse orthogonal transform means performs inverse orthogonal transform on the result to restore image data. The block decomposition means decomposes the blocks and reproduces image data for one screen.

【0009】[0009]

【実施例】次に本発明の実施例について説明する。図1
は本発明による画像データ符号化装置の一実施例のブロ
ック図である。入力端子101には例えば1サンプル当
り8ビットのビデオ画像のデジタルデータが入力される
。ブロック化回路102はこのデジタル画像データを受
け取ると、それを1つが例えば8画素×8画素の大きさ
の複数のブロックに分割する。
[Example] Next, an example of the present invention will be described. Figure 1
1 is a block diagram of an embodiment of an image data encoding device according to the present invention. For example, digital data of a video image with 8 bits per sample is input to the input terminal 101 . When the blocking circuit 102 receives this digital image data, it divides it into a plurality of blocks each having a size of, for example, 8 pixels x 8 pixels.

【0010】直交変換回路103は、このようにブロッ
クに分割された画像データを受け取り、それに対して各
ブロック毎に2次元直交変換を行う。そして、その結果
得られた変換係数を、各ブロックに対しビットを割り当
てるビット割当回路104と遅延回路115とに供給す
る。この直交変換回路103における直交変換の方式と
しては、DCT(離散コサイン変換)、DST(離散サ
イン変換)、アダマール変換などを用いるが、ビット割
当回路104でブロック毎の分散を使用する場合には、
DCTのような変換係数から画像データの分散を計算す
ることが可能な方式を用いる。それが不可能な場合は、
ビット割当回路104を直交変換回路103の後ではな
く、該変換回路103の前、あるいは該変換回路103
と並列に配置する。ただし、この場合、分散を計算する
部分には、ブロック毎にその平均値を求める作業が余分
に加わるため、ビット割当回路104の回路規模は少し
大きくなる。
The orthogonal transform circuit 103 receives the image data thus divided into blocks, and performs two-dimensional orthogonal transform on each block. The resulting transform coefficients are then supplied to a bit allocation circuit 104 that allocates bits to each block and a delay circuit 115. The orthogonal transform method used in the orthogonal transform circuit 103 is DCT (discrete cosine transform), DST (discrete sine transform), Hadamard transform, etc. However, when the bit allocation circuit 104 uses block-by-block variance,
A method such as DCT that can calculate the variance of image data from transform coefficients is used. If that is not possible,
The bit allocation circuit 104 is placed before the orthogonal conversion circuit 103 instead of after the conversion circuit 103, or before the conversion circuit 103.
placed in parallel with However, in this case, the circuit scale of the bit allocation circuit 104 becomes a little larger because an additional task of calculating the average value for each block is added to the part that calculates the variance.

【0011】ビット割当回路104は変換回路103か
ら変換係数を受け取ると、まず各ブロック毎に平均値を
計算し、一定の範囲(例えば1フレーム)内のブロック
の分散値を集計した時点で、上記一定の範囲内の画像デ
ータの情報量が所定の値となるように、分散値に応じて
各ブロックに割り当てる平均のビット数(平均ビット長
)を決める。なお、上記情報量の値は、要求されるビッ
トレートから逆算して予め決めておく。ビット割当回路
104は各ブロックに割り当てるビット数を、各変換係
数に対しビットを割り当てるビット割当回路105と遅
延回路117とに供給する。なお、この実施例ではブロ
ックへのビット割り当てを行う際の基準として画像デー
タの分散を用いたが、画像データのダイナミックレンジ
を用いることも可能である。その場合には、割当回路1
04は必ずしも変換回路103の後に配置する必要はな
く、また変換係数を供給する必要もない。
[0011] When the bit allocation circuit 104 receives the transform coefficients from the transform circuit 103, it first calculates the average value for each block, and when the variance values of the blocks within a certain range (for example, one frame) are totaled, the above-mentioned The average number of bits (average bit length) to be allocated to each block is determined according to the variance value so that the amount of information of image data within a certain range becomes a predetermined value. Note that the value of the amount of information is determined in advance by calculating backward from the required bit rate. Bit allocation circuit 104 supplies the number of bits to be allocated to each block to bit allocation circuit 105 and delay circuit 117, which allocate bits to each transform coefficient. In this embodiment, the variance of image data is used as a criterion for allocating bits to blocks, but it is also possible to use the dynamic range of image data. In that case, the allocation circuit 1
04 does not necessarily need to be placed after the conversion circuit 103, nor does it need to supply conversion coefficients.

【0012】ビット割当回路105は、ビット割当回路
104から各ブロックに割り当てられた平均ビット数を
受け取り、一方、遅延回路115からは変換係数を受け
取る。ビット割当回路105はまず、各ブロックから変
換係数を各周波数成分毎に取り出してその平均および分
散を計算し、算出された分散に応じて、各ブロックに割
り当てられた平均ビット数の範囲内で、各変換係数に割
り当てるビット数を計算する。ビット割当回路105は
算出した直交変換係数の平均及び分散を量子化回路10
6と遅延回路118とに供給し、また、各係数に割り当
てるビット数を量子化回路106に供給する。
Bit allocation circuit 105 receives the average number of bits allocated to each block from bit allocation circuit 104, while receiving transform coefficients from delay circuit 115. The bit allocation circuit 105 first extracts transform coefficients for each frequency component from each block, calculates their average and variance, and according to the calculated variance, within the range of the average number of bits allocated to each block, Calculate the number of bits to allocate to each transform coefficient. The bit allocation circuit 105 converts the average and variance of the calculated orthogonal transform coefficients into the quantization circuit 10.
6 and the delay circuit 118, and also supplies the number of bits to be assigned to each coefficient to the quantization circuit 106.

【0013】量子化回路106は、ビット割当回路10
5から送られてきた上記平均、分散、割り当てビット数
にもとづき、遅延回路115、116を介して変換回路
103から供給される変換係数を量子化する。量子化回
路106はまず、各変換係数への割り当てビット数と分
散とを用いて各変換係数の量子化ステップサイズを計算
する。その際、例えば、基準ステップサイズとして分散
1のラプラス分布の入力に対する量子化ステップサイズ
を容易しておき、これに分散を掛け合わせることにより
ステップサイズを決定する。その後、決定した量子化ス
テップサイズで変換係数を量子化し、量子化インデック
スを作成して符号化回路107に供給する。なお、変換
係数の交流成分と直流成分とで異なる量子化方法を用い
ることも可能である。
The quantization circuit 106 includes the bit allocation circuit 10
The transform coefficients supplied from the transform circuit 103 via the delay circuits 115 and 116 are quantized based on the average, variance, and number of allocated bits sent from the transform circuit 103. The quantization circuit 106 first calculates the quantization step size of each transform coefficient using the number of bits allocated to each transform coefficient and the variance. At this time, for example, the quantization step size for the input of the Laplace distribution with variance 1 is set as the standard step size, and the step size is determined by multiplying this by the variance. Thereafter, the transform coefficients are quantized using the determined quantization step size, a quantization index is created, and the generated quantization index is supplied to the encoding circuit 107. Note that it is also possible to use different quantization methods for the AC component and the DC component of the transform coefficient.

【0014】符号化回路107は、量子化回路106か
ら出力される量子化インデックス、付加情報として遅延
回路117から出力される各ブロックへの割り当てビッ
ト数、ならびに遅延回路118から出力される各変換係
数の平均および分散の符号化を行い、その結果を伝送媒
体(あるいは記録媒体)108に供給する。符号化の方
式としては様々な方式を用いることができるが、可逆で
あること、及びビットレートを一定にできることが必要
条件となる。なお、実際には符号化回路107と伝送媒
体108との間にはエラー訂正などを目的とする伝送路
符号化回路(図示せず)が設けられている。
The encoding circuit 107 receives the quantization index output from the quantization circuit 106, the number of bits allocated to each block output from the delay circuit 117 as additional information, and each transform coefficient output from the delay circuit 118. The mean and variance of are encoded and the results are supplied to the transmission medium (or recording medium) 108. Various encoding methods can be used, but the required conditions are that the encoding is reversible and that the bit rate can be kept constant. Note that, in reality, a transmission path encoding circuit (not shown) is provided between the encoding circuit 107 and the transmission medium 108 for the purpose of error correction and the like.

【0015】伝送媒体108からのデータは、伝送路復
号回路(図示せず)を経て復号回路109に供給される
。復号回路109は符号化回路107とは逆の操作によ
り、符号化されたデータから量子化インデックス、各ブ
ロックへの割り当てビット数、ならびに各変換係数の平
均および分散を復元し、ブロック及び変換係数に対しビ
ットを割り当てるビット割当回路110および遅延回路
119に供給する。なお、符号化回路107と復号回路
109とは省略することも可能である。
Data from the transmission medium 108 is supplied to a decoding circuit 109 via a transmission path decoding circuit (not shown). The decoding circuit 109 restores the quantization index, the number of bits allocated to each block, and the average and variance of each transform coefficient from the encoded data by performing an operation opposite to that of the encoding circuit 107, and converts the blocks and transform coefficients into The signal is supplied to a bit allocation circuit 110 and a delay circuit 119 which allocate bits to each other. Note that the encoding circuit 107 and the decoding circuit 109 can also be omitted.

【0016】ビット割当回路110は、復号回路109
からの各ブロックへの割り当てビット数と各変換係数の
分散とにもとづいて各変換係数への割り当てビット数を
計算し、逆量子化回路111に供給する。
The bit allocation circuit 110 is connected to the decoding circuit 109.
The number of bits allocated to each transform coefficient is calculated based on the number of bits allocated to each block from , and the variance of each transform coefficient, and is supplied to the inverse quantization circuit 111 .

【0017】逆量子化回路111は、ビット割当回路1
10からの各変換係数への割り当てビット数と、遅延回
路119からの変換係数の平均および分散を用いて、遅
延回路119からの量子化インデックスを逆量子化し、
直交変換係数を復元して逆直交変換回路112に供給す
る。
The inverse quantization circuit 111 is a bit allocation circuit 1
Dequantize the quantization index from the delay circuit 119 using the number of bits assigned to each transform coefficient from 10 and the average and variance of the transform coefficient from the delay circuit 119,
The orthogonal transform coefficients are restored and supplied to the inverse orthogonal transform circuit 112.

【0018】逆直交変換回路112は、直交変換回路1
03とは逆の変換を行うことにより、逆量子化回路11
1からの変換係数からブロック化された画像データを復
元し、ブロック分解回路113は、それをブロック化前
の通常の画像データに戻して出力端子114に出力する
The inverse orthogonal transform circuit 112 is the orthogonal transform circuit 1
03, the inverse quantization circuit 11
The block decomposition circuit 113 restores the blocked image data from the transform coefficients starting from 1, converts it back into normal image data before blocking, and outputs it to the output terminal 114.

【0019】なお、遅延回路115〜119は具体的に
は、フレームメモリなどによって構成する。
Note that the delay circuits 115 to 119 are specifically constituted by frame memories or the like.

【0020】次に、各ビット割当回路104、105、
110につていさらに詳しく説明する。
Next, each bit allocation circuit 104, 105,
110 will be explained in more detail.

【0021】まず、これらの回路で行うビット割り当て
について理論的に説明する。変換係数にビット割り当て
る際には、例えば分散の大きな変換係数には多くのビッ
ト数を割り当て、分散の小さい変換係数には少ないビッ
ト数を割り当てることにより、全体として小さなデータ
量で符号化するという次のようなビット配分理論を用い
る。
First, the bit allocation performed by these circuits will be theoretically explained. When allocating bits to transform coefficients, for example, a large number of bits are assigned to transform coefficients with a large variance, and a small number of bits are assigned to transform coefficients with a small variance, so that the overall amount of data is encoded using a small amount. A bit allocation theory such as is used.

【0022】[0022]

【数1】[Math 1]

【0023】ここで、b(i)はi番目の変換係数に割
り当てるビット数、σ(i)はi番目の変換係数の分散
、bavrは平均ビット数、Nは変換係数の総数、aは
定数である。
Here, b(i) is the number of bits allocated to the i-th transform coefficient, σ(i) is the variance of the i-th transform coefficient, bavr is the average number of bits, N is the total number of transform coefficients, and a is a constant. It is.

【0024】ところで、(1)式は変換係数のビット割
り当てに関して成立する式であるが、これをブロックの
ビット割り当てに利用することも可能である。その場合
には、b(i)はi番目のブロックに割り当てるビット
数、σ(i)はi番目のブロックの分散、bavrは1
ブロック当りの平均ビット数(全体の情報量をNで割っ
たもの)、Nは総ブロック数となる。
By the way, although equation (1) is an equation that holds true regarding bit allocation of transform coefficients, it is also possible to use this equation for bit allocation of blocks. In that case, b(i) is the number of bits allocated to the i-th block, σ(i) is the variance of the i-th block, and bavr is 1
The average number of bits per block (the total amount of information divided by N), where N is the total number of blocks.

【0025】(1)式は以下のように書き換えることが
でき、その結果、ビット割り当てをより簡単に行うこと
が可能となる。
Equation (1) can be rewritten as follows, and as a result, bit allocation can be performed more easily.

【0026】[0026]

【数2】[Math 2]

【0027】ここで、f(i)は(2c)式の条件を付
ける前の割り当てビット数を示し、b(i)はf(i)
を整数化したものである。Q(x)は図3のグラフに示
すような整数化関数である。
Here, f(i) indicates the number of allocated bits before adding the condition of equation (2c), and b(i) indicates f(i)
is converted into an integer. Q(x) is an integerization function as shown in the graph of FIG.

【0028】(2a)〜(2c)式にもとづくビット割
り当ての特徴は、総ビット数をAの関数として表すので
、Aの値を変えることによってビット数を簡単に制御で
き、Aの値を求めた後は、(2a)式および(2b)式
に従って簡単にb(i)を求めることができるというこ
とである。
The feature of bit allocation based on formulas (2a) to (2c) is that the total number of bits is expressed as a function of A, so the number of bits can be easily controlled by changing the value of A, and the value of A can be easily controlled by changing the value of A. After that, b(i) can be easily obtained according to equations (2a) and (2b).

【0029】この方式にもとづいてビット割り当てを行
う回路の一例を図2に示す。以下、この回路について説
明する。
FIG. 2 shows an example of a circuit that allocates bits based on this method. This circuit will be explained below.

【0030】入力端子201には分散の値が入力される
。この分散の値は、ブロックに対しビットを割り当てる
ビット割当回路104では直交変換係数の交流成分のア
クティビティにより計算され、変換係数にビットを割り
当てるビット割当回路105では各ブロックから直交変
換係数を同一周波数成分毎に取り出して平均値を求めて
から計算され、また、ビット割当回路110では入力と
して与えられるものである。
A dispersion value is input to the input terminal 201. The value of this variance is calculated by the activity of the alternating current component of the orthogonal transform coefficient in the bit assignment circuit 104 that allocates bits to blocks, and the bit assignment circuit 105 that allocates bits to the transform coefficient assigns the orthogonal transform coefficient from each block to the same frequency component. It is calculated after taking out each time and finding an average value, and is also given as an input to the bit allocation circuit 110.

【0031】A(i,j)計算回路202は、入力端子
201からの分散の値より上記(2a)式によってまず
g(i)を計算し、その後、次式によりA(i,j)を
求める。
The A(i,j) calculation circuit 202 first calculates g(i) using the above equation (2a) from the value of the variance from the input terminal 201, and then calculates A(i,j) using the following equation. demand.

【0032】[0032]

【数3】[Math 3]

【0033】ここで、A(i,j)は、図4に示すよう
に、b(i)をAの関数としたときにb(i)の値が1
だけ増加する点を示すものであり、割り当てる最大、最
小のビット数bmax、bminおよび変換係数(ある
いはブロック)の総数Nは、予め設定しておくものとす
る。なお、g(i)を計算する際、次のような変換を行
ったうえで、log2 Xを直線近似するとハードウェ
アの規模を小さくすることができる。
Here, A(i,j) is, as shown in FIG. 4, when the value of b(i) is 1 when b(i) is a function of A.
The maximum and minimum bit numbers bmax and bmin to be allocated and the total number N of transform coefficients (or blocks) are set in advance. Note that when calculating g(i), the scale of the hardware can be reduced by performing the following conversion and then linearly approximating log2X.

【0034】[0034]

【数4】[Math 4]

【0035】以上の計算の後、計算回路202はA(i
,j)の値を度数分布回路203に供給し、g(i)の
値を遅延回路207に供給する。
After the above calculation, the calculation circuit 202 calculates A(i
, j) are supplied to the frequency distribution circuit 203, and the value of g(i) is supplied to the delay circuit 207.

【0036】度数分布回路203は、計算回路202が
計算したA(i,j)の値をその大きさによっていくつ
かのレベルに分類し、それぞれのレベルについての度数
を計算し、最後に累積度数分布を作成する。厳密には、
A(i,j)を小さい方から順番に並べ替えるべきであ
るが、ハードウェアによるリアルタイム処理を考えた場
合には実用的ではない。そこで例えば度数分布を使用し
た簡便法を用いる。
The frequency distribution circuit 203 classifies the value of A(i,j) calculated by the calculation circuit 202 into several levels according to its size, calculates the frequency for each level, and finally calculates the cumulative frequency. Create a distribution. Strictly speaking,
Although A(i,j) should be sorted in order from smallest to largest, this is not practical when considering real-time processing by hardware. Therefore, for example, a simple method using frequency distribution is used.

【0037】A決定回路204は、度数分布回路203
が作成した累積度数分布を用いてAの値を求める。設定
されている総ビット数をBとすると、最低ビット数であ
るN×bminから、n=B−N×bminだけビット
数を増やす必要がある。そのため、累積度数分布で、累
積度数がnとなる点を調べてAの値を決定する。
The A determining circuit 204 is a frequency distribution circuit 203
Find the value of A using the cumulative frequency distribution created by If the total number of bits set is B, then it is necessary to increase the number of bits by n=BN-Nxbmin from the minimum number of bits, Nxbmin. Therefore, the value of A is determined by checking the point where the cumulative frequency is n in the cumulative frequency distribution.

【0038】度数分布回路203およびA決定回路20
4はRAMなどを用いて実現する。例えばAの値を25
6のレベルに分類する場合には、アドレスが8ビットの
RAMを使用し、それぞれAの値をRAMのアドレスに
対応づけておく。そして、このRAMを用いて累積度数
分布を作成し、nの値を含むアドレスを調べ、最後にそ
のアドレスからAの値を逆算する。
[0038] Frequency distribution circuit 203 and A determination circuit 20
4 is realized using a RAM or the like. For example, the value of A is 25
When classifying into 6 levels, a RAM with an 8-bit address is used, and the value of A is associated with each RAM address. Then, a cumulative frequency distribution is created using this RAM, the address that includes the value of n is checked, and finally the value of A is calculated backward from that address.

【0039】b(i)計算回路205は、A決定回路2
04から供給されるAの値と、遅延回路207から供給
されるg(i)の値とを用い、(2a)式よりまずf(
i)の値を計算し、その後、(2b)式からb(i)の
値を計算する。そして計算結果を出力端子206から出
力する。
The b(i) calculation circuit 205 is the A determination circuit 2
Using the value of A supplied from 04 and the value of g(i) supplied from the delay circuit 207, first f(
The value of i) is calculated, and then the value of b(i) is calculated from equation (2b). Then, the calculation result is outputted from the output terminal 206.

【0040】図5に図2の回路の具体的な構成を示す。 タイミングパルスEN1が入力されると、レジスタR1
はビット数回路501が出力するbmin+1/2の値
を取り込んで保持し、レジスタR2はJカウンタ502
が出力するjの値を保持する。また、レジスタR4は関
数回路504が出力するlog2 (σ(i)2 )の
値を保持し、レジスタR5は定数回路505が出力する
1/a・1/log2 eの値を保持する。加算器50
3はレジスタR1、R2が保持した値を加算し、乗算器
506はレジスタR4、R5が保持した値の積を求める
。そして、タイミングパルスEN2が入力されると、レ
ジスタR3、R6はそれぞれ加算器503および乗算器
506の出力を取り込む。その結果、レジスタR3は、
bmin+1/2+jの値を保持し、レジスタR6はg
(i)の値を保持することになる。
FIG. 5 shows a specific configuration of the circuit shown in FIG. 2. When timing pulse EN1 is input, register R1
takes in and holds the value bmin+1/2 output by the bit number circuit 501, and register R2 stores the value of bmin+1/2 output by the bit number circuit 501.
holds the value of j output by . Further, the register R4 holds the value of log2 (σ(i)2) outputted by the function circuit 504, and the register R5 holds the value of 1/a·1/log2e outputted by the constant circuit 505. adder 50
3 adds the values held in registers R1 and R2, and multiplier 506 calculates the product of the values held in registers R4 and R5. When timing pulse EN2 is input, registers R3 and R6 take in the outputs of adder 503 and multiplier 506, respectively. As a result, register R3 is
Holds the value of bmin+1/2+j, and register R6 holds g.
The value of (i) will be retained.

【0041】減算器508はレジスタR3が出力するb
min+1/2+jの値から、レジスタR6が出力する
g(i)の値を引くことによってA(i,j)を求める
((3)式)。タイミングパルスEN3が入力されると
、このA(i,j)はレジスタR8に取り込まれ、一方
、定数回路507が出力するアドレス変換定数はレジス
タR7に取り込まれる。そして、乗算器509は、レジ
スタR8が出力するA(i,j)にレジスタR7が出力
するアドレス変換定数を掛けることによってアドレス変
換を行い、RAMのアドレスを求める。その結果はタイ
ミングパルスEN4が入力されたときレジスタR9に保
持され、さらにRAM510に与えられる。そしてこの
ときRAM510が出力する度数は、タイミングパルス
EN4のタイミングでレジスタR11に保持される。 加算器513は、定数回路512が出力し、レジスタR
14が保持する値“1”をレジスタR11が保持してい
る度数に加算し、その結果をレジスタR12を通じてR
AM510に出力して度数分布の値を更新させる。尚、
R10は、RAM510、レジスタR11、R13の内
容をクリアするためのものであり、クリア信号CLRが
入力されると定数回路511から受け取る値“0”をR
AM510、レジスタR11、R13に入力する。
The subtracter 508 receives the b output from the register R3.
A(i,j) is obtained by subtracting the value of g(i) output from register R6 from the value of min+1/2+j (formula (3)). When timing pulse EN3 is input, this A(i, j) is taken into register R8, while the address conversion constant output from constant circuit 507 is taken into register R7. Multiplier 509 then performs address conversion by multiplying A(i,j) output from register R8 by the address conversion constant output from register R7, and obtains the address of the RAM. The result is held in register R9 when timing pulse EN4 is input, and is further provided to RAM 510. The frequency output by the RAM 510 at this time is held in the register R11 at the timing of the timing pulse EN4. The adder 513 receives the output from the constant circuit 512 and the register R.
14 is added to the frequency held in register R11, and the result is sent to R through register R12.
It is output to AM510 to update the value of the frequency distribution. still,
R10 is for clearing the contents of the RAM 510 and registers R11 and R13, and when the clear signal CLR is input, the value “0” received from the constant circuit 511 is sent to R10.
Input to AM510 and registers R11 and R13.

【0042】以上の動作をすべてのiについて行うこと
によって度数分布が完成する。その後、度数分布にもと
づいて累積度数分布が作成され、その過程で基準レベル
nに一致する累積度数を格納するRAM510のアドレ
スが検出される。すなわち、レジスタR13はタイミン
グパルスEN5が入力される毎に、RAM510が出力
する値(累積度数)を保持し、コンパレータ515はそ
の値と、レジスタR15が保持している定数回路514
からの基準レベルnの値とを比較する。この比較結果が
不一致のときは、累積度数カウンタ517はその値を1
だけ増加させ、レジスタR16はそれを次のアドレスと
してRAM510に与える。そして、コンパレータ51
5の比較結果が一致となった場合には、タイミングパル
スEN6により、カウンタ517が出力しているアドレ
スをレジスタR17に保持する。このアドレスが、基準
レベルnに一致する累積度数を格納するRAM510の
アドレスとなる。
By performing the above operations for all i's, the frequency distribution is completed. Thereafter, a cumulative frequency distribution is created based on the frequency distribution, and in the process, the address of the RAM 510 that stores the cumulative frequency that matches the reference level n is detected. That is, the register R13 holds the value (cumulative frequency) output by the RAM 510 every time the timing pulse EN5 is input, and the comparator 515 stores that value and the constant circuit 514 held by the register R15.
The value of the reference level n from . If the comparison results do not match, the cumulative frequency counter 517 sets the value to 1.
register R16 provides it to RAM 510 as the next address. And comparator 51
If the comparison result of 5 is a match, the address output by the counter 517 is held in the register R17 by the timing pulse EN6. This address becomes the address of the RAM 510 that stores the cumulative frequency that matches the reference level n.

【0043】タイミングパルスEN6が入力されると、
定数回路518からのアドレス変換定数がレジスタR1
8に取り込まれ、乗算器519はこの定数とレジスタR
17が保持しているアドレスとを掛け合わせることによ
ってアドレスの逆変換を行い、値Aを求める。値Aは、
タイミングパルスEN7が入力されたときレジスタR1
9に保持され、加算器520は値Aと、遅延回路516
を介して与えられるg(i)とを加算してf(i)を求
める((2a)式)。最後に整数化回路521はこのf
(i)を整数化してb(i)を求める((2b)式)。
When timing pulse EN6 is input,
The address conversion constant from constant circuit 518 is stored in register R1.
8, and the multiplier 519 uses this constant and register R
The address is inversely converted by multiplying it by the address held by No. 17, and the value A is obtained. The value A is
When timing pulse EN7 is input, register R1
9 and the adder 520 receives the value A and the delay circuit 516
f(i) is obtained by adding g(i) given through (formula (2a)). Finally, the integerization circuit 521 converts this f
(i) is converted into an integer to obtain b(i) (formula (2b)).

【0044】[0044]

【発明の効果】以上説明したように本発明の画像データ
符号化装置では、ブロック適応型および係数適応型のビ
ット割り当てが行われるので、決められた情報量のもと
で量子化誤差を最小にする最適のビット割り当てが可能
である。また、変換符号化を用いたフィードフォワード
型の情報圧縮が行われるので、リアルタイム処理が必要
な動画の場合にも正確に情報量を制御することができる
。さらに、どのような伝送レートにも対応でき、かつか
なり小さな範囲で伝送レートを一定にできるので、伝送
媒体あるいは記録媒体の種類に関係なく、画像データの
圧縮を必要とするあらゆる装置に適応することができる
[Effects of the Invention] As explained above, in the image data encoding device of the present invention, block adaptive type and coefficient adaptive type bit allocation is performed, so that the quantization error can be minimized under a predetermined amount of information. Optimal bit allocation is possible. Furthermore, since feed-forward information compression using transform coding is performed, the amount of information can be accurately controlled even in the case of moving images that require real-time processing. Furthermore, since it can handle any transmission rate and keep the transmission rate constant within a fairly small range, it can be applied to any device that requires compression of image data, regardless of the type of transmission or recording medium. Can be done.

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

【図1】本発明の画像データ符号化装置の一実施例のブ
ロック図である。
FIG. 1 is a block diagram of an embodiment of an image data encoding device of the present invention.

【図2】図1の画像データ符号化装置のビット割当回路
のブロック図である。
FIG. 2 is a block diagram of a bit allocation circuit of the image data encoding device of FIG. 1;

【図3】図2のビット割当回路における処理で用いる整
数化関数をQ(x)を説明するためのグラフである。
3 is a graph for explaining an integerization function Q(x) used in processing in the bit allocation circuit of FIG. 2; FIG.

【図4】図2の(Ai,j)計算回路を説明するための
グラフである。
FIG. 4 is a graph for explaining the (Ai, j) calculation circuit of FIG. 2;

【図5】図2のビット割当回路の具体的構成を示すブロ
ック図である。
FIG. 5 is a block diagram showing a specific configuration of the bit allocation circuit in FIG. 2;

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

101、201  入力端子 102  ブロック化回路 103  直交変換回路 104  ブロックへのビット割当回路105  係数
へのビット割当回路 106  量子化回路 107  符号化回路 108  伝送媒体(記録媒体) 109  復号回路 110  ブロックおよび係数へのビット割当回路11
1  逆量子化回路 112  逆直交変換回路 113  ブロック分解回路 114、206  出力端子 115〜119、207、516  遅延回路202 
 A(i,j)計算回路 203  度数分布回路 204  A決定回路 205  b(i)計算回路 501  ビット数回路 505、507、511、512、514、518  
定数回路 502  Jカウンタ 503、513、520  加算器 504、521  関数回路 506、509、519  乗算器 508  減算器 510  RAM 515  コンパレータ 517  累積度数カウンタ R1〜R19  レジスタ
101, 201 Input terminal 102 Blocking circuit 103 Orthogonal transform circuit 104 Bit allocation circuit for blocks 105 Bit allocation circuit for coefficients 106 Quantization circuit 107 Encoding circuit 108 Transmission medium (recording medium) 109 Decoding circuit 110 To blocks and coefficients bit allocation circuit 11
1 Inverse quantization circuit 112 Inverse orthogonal transform circuit 113 Block decomposition circuits 114, 206 Output terminals 115 to 119, 207, 516 Delay circuit 202
A(i,j) calculation circuit 203 Frequency distribution circuit 204 A determination circuit 205 b(i) calculation circuit 501 Bit number circuits 505, 507, 511, 512, 514, 518
Constant circuit 502 J counter 503, 513, 520 Adder 504, 521 Function circuit 506, 509, 519 Multiplier 508 Subtractor 510 RAM 515 Comparator 517 Cumulative frequency counter R1 to R19 Register

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  1画面分の画像データを複数のブロッ
クに分割するブロック化手段と、ブロック毎に画像デー
タを直交変換して変換係数を求める直交変換手段と、画
像データの情報量が所定の大きさの領域毎に一定になる
ように各ブロックの変換係数の統計量に応じて各ブロッ
クにビット数を割り当てる第1のビット割り当て手段と
、ブロック毎に割り当てられたビット数の範囲で各変換
係数にビットを割り当てる第2のビット割り当て手段と
、割り当てられたビットの数に応じた量子化ステップで
変換係数を量子化し量子化インデックスを作成する量子
化手段と、作成された量子化インデックスを符号化し付
加情報と共に一定のビットレートで送出する符号化手段
と、該符号化手段から受容した符号を復号し量子化イン
デックスを復元する復号手段と、前記復元された量子化
インデックス及び前記付加情報に基づいて各変換係数の
割り当てビット数を決定する第3のビット割り当て手段
と、前記復号された量子化インデックス、前記付加情報
及び前記割り当てビット数に基づいて前記量子化インデ
ックスを逆量子化して変換係数を復元する逆量子化手段
と、復元された変換係数を逆直交変換することによりブ
ロック毎に画像データを復元する逆直交変換手段と、ブ
ロックを分解して前記復元された画像データから1画面
分の画像データを再生するブロック分解手段とを備えた
ことを特徴とする画像データ符号化装置。
1. Blocking means for dividing image data for one screen into a plurality of blocks; orthogonal transformation means for orthogonally transforming the image data for each block to obtain transformation coefficients; a first bit allocation means that allocates the number of bits to each block according to the statistics of the transform coefficients of each block so that the number of bits is constant for each area of size; a second bit allocation means for allocating bits to coefficients; a quantization means for quantizing the transform coefficients in a quantization step according to the number of allocated bits to create a quantization index; a decoding means for decoding the code received from the encoding means and restoring a quantization index; a third bit allocation means for determining the number of allocated bits for each transform coefficient; and a third bit allocation means for dequantizing the quantization index to obtain a transform coefficient based on the decoded quantization index, the additional information, and the number of allocated bits. an inverse quantization means for restoring; an inverse orthogonal transform means for restoring image data block by block by performing inverse orthogonal transform on the restored transform coefficients; An image data encoding device comprising block decomposition means for reproducing image data.
JP3118825A 1991-01-17 1991-05-23 Picture data encoder Pending JPH04345369A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP3118825A JPH04345369A (en) 1991-05-23 1991-05-23 Picture data encoder
DE69226095T DE69226095T2 (en) 1991-01-17 1992-01-16 Image coding and decoding system using an orthogonal transformation and bit allocation method
EP92100680A EP0495501B1 (en) 1991-01-17 1992-01-16 Image coding and decoding system using an orthogonal transform and bit allocation method suitable therefore
US07/821,221 US5327502A (en) 1991-01-17 1992-01-16 Image coding system using an orthogonal transform and bit allocation method suitable therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3118825A JPH04345369A (en) 1991-05-23 1991-05-23 Picture data encoder

Publications (1)

Publication Number Publication Date
JPH04345369A true JPH04345369A (en) 1992-12-01

Family

ID=14746087

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3118825A Pending JPH04345369A (en) 1991-01-17 1991-05-23 Picture data encoder

Country Status (1)

Country Link
JP (1) JPH04345369A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02222386A (en) * 1989-02-23 1990-09-05 Toshiba Corp Picture data compressor

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02222386A (en) * 1989-02-23 1990-09-05 Toshiba Corp Picture data compressor

Similar Documents

Publication Publication Date Title
EP0959627B1 (en) A motion video compression system with adaptive bit allocation and quantization
Jain Image data compression: A review
EP0562787B1 (en) Image coding method and apparatus
JP2509469B2 (en) Method and apparatus for adaptive encoding and decoding of continuous image by conversion
US6256413B1 (en) Image encoding apparatus
KR950702084A (en) Method and apparatus for coding image, and image recording medium
JPH02194734A (en) Control system for quantity of encoded output data
JPH0232688A (en) Adaptive conversion encoder
JP2002534862A (en) Adaptive quantizer in buffer adjustment mechanism based on motion analysis for video compression
US5396292A (en) Encoding apparatus for motion video signals
JPH10108184A (en) Image data processing unit and its method
KR100389893B1 (en) Apparatus for coding image by using image feature classification system
JPH0970041A (en) Variable bit rate coder
JPH04114585A (en) Movement compensation inter-frame coder
EP1155360B1 (en) Quality priority image storage and communication
JPH04345369A (en) Picture data encoder
JPH0541860A (en) Picture compression coder
US8111748B2 (en) Method and apparatus for video coding
JPH04255190A (en) Picture data compressor
JPH07236137A (en) Picture encoding control system
JP2931328B2 (en) Image signal compression coding device
JPH0711832B2 (en) High-efficiency image coding device
KR0147958B1 (en) Layer encoding method of image data
JPH0541859A (en) Picture compression coder
JPH09512674A (en) Complexity determination device