JPH09252477A - Image coder - Google Patents

Image coder

Info

Publication number
JPH09252477A
JPH09252477A JP5980796A JP5980796A JPH09252477A JP H09252477 A JPH09252477 A JP H09252477A JP 5980796 A JP5980796 A JP 5980796A JP 5980796 A JP5980796 A JP 5980796A JP H09252477 A JPH09252477 A JP H09252477A
Authority
JP
Japan
Prior art keywords
block
sub
code amount
data
blocks
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
JP5980796A
Other languages
Japanese (ja)
Inventor
Nobuyuki Suzuki
信幸 鈴木
Mitsunori Omokawa
光教 面川
Tadahiro Oku
忠宏 奥
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP5980796A priority Critical patent/JPH09252477A/en
Publication of JPH09252477A publication Critical patent/JPH09252477A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Color Television Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To control a code amount without incurring image quality deterioration by distributing properly a code amount to each sub block even when a code amount of one block exceeds a prescribed amount. SOLUTION: In the case of measuring a code amount by one block, the code amount in a time series different from a conventional device is not measured, but quantization data by one block are stored by using a storage circuit 10 equivalent to one block, data by one block stored in the storage circuit 10 are scanned in parallel between sub blocks from data with lower frequencies to measure the code amount and when the integrated result exceeds the threshold level, succeeding data with higher frequencies are replaced with zero data or the like for each sub block to control a code amount. Thus, the code amount distribution to each sub block is uniformized and high image quality deterioration is not caused.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】この発明は、画像信号の冗長
度を利用してそれを符号化して記録または伝送するため
の面像符号化装量に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a surface image encoding device for encoding and recording or transmitting it by utilizing redundancy of an image signal.

【0002】[0002]

【従来の技術】従来の画像符号化装置においては、入力
画像信号を直交変換しそのデータを周波数順に並び換え
量子化を行い、量子化した信号を可変長符号化してデー
タの圧縮を行い最終的に入力面像信号のデータ圧縮符号
化した信号を記録装置や伝送装置などに用いていた。
2. Description of the Related Art In a conventional image coding apparatus, an input image signal is orthogonally transformed, the data thereof is rearranged in frequency order and quantized, and the quantized signal is variable length coded to compress the data and finally In addition, the data compression-encoded signal of the input image signal is used in a recording device, a transmission device, or the like.

【0003】量子化が行われた後、可変長符号化を行う
のであるが、その際には各マクロブロックの量子化デー
タの符号量の測定が行われ、その符号量がある一定値を
越える場合にはその越えた分のデータそれぞれをゼロデ
ータに置き換える処理が行われる。これは、例えば、マ
クロブロックの符号量が原画像のデータ量よりも多い
と、可変長符号化を行っても十分なデータ圧縮が行われ
ないためである。
After the quantization is performed, the variable length coding is performed. At this time, the code amount of the quantized data of each macroblock is measured, and the code amount exceeds a certain value. In this case, a process of replacing each of the excess data with zero data is performed. This is because, for example, if the code amount of the macroblock is larger than the data amount of the original image, sufficient data compression will not be performed even if variable length coding is performed.

【0004】図4に従来の画像符号化装置の構成を示
す。この画像符号化装置においては、入力画像信号21
はY/C分離回路ブロック22で輝度信号Yと色差信号
Cに分離される。画面分割回路ブロック23では1フレ
ームを適当な大きさのブロックに分割し、サブブロック
分割回路ブロック24でさらに1ブロックがサブブロッ
クに分割される。図5は1ブロックの例であり、輝度信
号と色差信号の比率が4:1:1の場合(4:2:0形
式の画像に対応する)を示す。
FIG. 4 shows the configuration of a conventional image coding apparatus. In this image encoding device, the input image signal 21
Is separated into a luminance signal Y and a color difference signal C by a Y / C separation circuit block 22. The screen division circuit block 23 divides one frame into blocks of an appropriate size, and the sub block division circuit block 24 further divides one block into sub blocks. FIG. 5 shows an example of one block, and shows a case where the ratio of the luminance signal and the color difference signal is 4: 1: 1 (corresponding to an image in the 4: 2: 0 format).

【0005】このときの1ブロックはマクロブロックと
称され、このマクロブロックは、4つの輝度サブブロッ
クY0、Y1、Y2、Y3と2つの色差サブブロックC
r、Cbとから構成される。
One block at this time is called a macro block, and this macro block includes four luminance sub blocks Y0, Y1, Y2, Y3 and two color difference sub blocks C.
It is composed of r and Cb.

【0006】直交変換回路ブロック25で輝度サブブロ
ック・色差サブブロックの順Y0→Y1→Y2→Y3→
Cr→Cbに、直交変換が行われ、各サブブロックが周
波数成分毎に分離される。周波数順並び替え回路ブロッ
ク26では、直交変換を行ったサブブロックの順に、各
サブブロック内のデータが周波数順にジグザク走査され
て並び替えられる。図6は直交変換を行ったサブブロッ
ク内の走査順序の例であり、サブブロックの大きさがサ
ンプル点単位で8×8の場合を示す。
In the orthogonal transformation circuit block 25, the order of luminance sub-block / color difference sub-block is Y0 → Y1 → Y2 → Y3 →
The orthogonal transformation is performed from Cr to Cb, and each sub-block is separated for each frequency component. In the frequency-order rearrangement circuit block 26, the data in each sub-block is zigzag-scanned and rearranged in order of frequency in the order of sub-blocks subjected to orthogonal transformation. FIG. 6 shows an example of the scanning order in the sub-block after the orthogonal transformation, and shows the case where the size of the sub-block is 8 × 8 in sample point units.

【0007】このとき、Y0のデータ列をy0 i(i=
1,2,…,64)、Y1のデータ列をy1 i(i=
1,2,…,64)、Y2のデータ列をy2 i(i=
1,2,…,64)、Y3のデータ列をy3 i(i=
1,2,…,64)、Crのデータ列をcr i(i=
1,2,…,64)、Cbのデータ列をcb i(i=
1,2,…,64)とすると、周波数順並び替え回路ブ
ロック26の出力データ列は、y0 i(i=1,2,
…,64)、y1 i(i=1,2,…,64)、y2
(i=1,2,…,64)、y3 i(i=1,2,…,
64)、cr i(i=1,2,…,64)、cb i(i
=1,2,…,64)と表せる。
At this time, the data string of Y0 is converted into y 0 i (i =
1, 2, ..., 64), and the data sequence of Y1 is y 1 i (i
1, 2, ..., 64), and the data sequence of Y2 is y 2 i (i =
1, 2, ..., 64), and the data sequence of Y3 is y 3 i (i =
1, 2, ..., 64), Cr data strings are converted into cr i (i =
1, 2, ..., 64), and the data string of Cb is c b i (i =
1, 2, ..., 64), the output data sequence of the frequency order rearrangement circuit block 26 is y 0 i (i = 1, 2,
, 64), y 1 i (i = 1, 2, ..., 64), y 2 i
(I = 1, 2, ..., 64), y 3 i (i = 1, 2, ..., 64)
64), cr i (i = 1, 2, ..., 64), c b i (i
= 1, 2, ..., 64).

【0008】このデータ列は、量子化回路ブロック27
で量子化された後、可変長符号化の前処理として符号化
回路ブロック28でランレングス符号化などの符号化処
理がなされる。
This data string is stored in the quantization circuit block 27.
After being quantized by, the encoding circuit block 28 performs encoding processing such as run-length encoding as pre-processing for variable-length encoding.

【0009】符号化されたデータは遅延回路29を介し
て符号長計測回路ブロック32に送られ、1データごと
の符号長が計測される。この値とレジスタ34の値とを
加算器33で加算し、その結果がレジスタ34に蓄えら
れる。これにより、符号化されたデータの符号長が累積
的に加算される。比較器35では、1データ毎にレジス
タ34の値と閾値とが比較され、その間、遅延回路29
で1データ分だけスイッチ30へのデータが遅延され
る。レジスタ34の値が閾値を越えた場合には、スイッ
チ制御信号36によって、スイッチ30がゼロ信号発生
回路31側に接続され、それ以降のデータがブロックの
終わりまで0にされる。そうでない場合は、スイッチ3
0が再符号化回路ブロック37側に接続される。
The encoded data is sent to the code length measuring circuit block 32 via the delay circuit 29, and the code length of each data is measured. This value and the value of the register 34 are added by the adder 33, and the result is stored in the register 34. As a result, the code lengths of encoded data are cumulatively added. The comparator 35 compares the value of the register 34 with the threshold value for each data, and the delay circuit 29
Thus, the data to the switch 30 is delayed by one data. When the value of the register 34 exceeds the threshold value, the switch 30 is connected to the zero signal generating circuit 31 side by the switch control signal 36, and the data thereafter is set to 0 until the end of the block. Otherwise, switch 3
0 is connected to the re-encoding circuit block 37 side.

【0010】図7に遅延回路29の出力から、再符号化
回路ブロック37の入力までのデータの流れを示す。こ
こでは、y3 2のデータを入力した時に符号長の累積加
算結果がしきい値を越え、それ以降のデータ列が全てゼ
ロに置き換えられる例が示されている。
FIG. 7 shows the data flow from the output of the delay circuit 29 to the input of the re-encoding circuit block 37. Here, over the code length accumulated result of the threshold when you enter y 3 2 data, the subsequent data strings are examples to be replaced with all zeros are shown.

【0011】この後、再符号化回路ブロック37で必要
に応じて可変長符号化が行われた後、出力バッファに3
8に送られる。そして、最終的に入力画像を圧縮符号化
した信号39が記録装置や伝送装置などに送られる。上
述の1ブロックの閾値としては再生時に障害が無く、か
つ画質の劣化が起こらない程度の値が選択される。
Thereafter, the re-encoding circuit block 37 performs variable-length encoding as necessary, and then the output buffer 3
8 Then, finally, the signal 39 obtained by compression-encoding the input image is sent to a recording device, a transmission device, or the like. As the above-mentioned threshold value for one block, a value that does not cause any trouble during reproduction and does not cause deterioration of image quality is selected.

【0012】[0012]

【発明が解決しようとする課題】しかしながら、上述し
たように、従来では、直交変換を行ってサブブロックの
順Y0→Y1→Y2→Y3→Cr→Cbに、各サブブロ
ック内のデータを周波数順に走査して、各データの符号
長をそのまま累積加算し、その結果が閾値を越えた時点
以降のデータを強制的に0としているので、サブブロッ
クへの符号量配分に不均一が生じ、大きな画質劣化が発
生する危険がある。
However, as described above, in the conventional art, orthogonal transform is performed to sub-block order Y0 → Y1 → Y2 → Y3 → Cr → Cb, and the data in each sub-block is arranged in frequency order. By scanning, the code length of each data is cumulatively added as it is, and the data after the time when the result exceeds the threshold value is forcibly set to 0. Therefore, the distribution of the code amount to the sub-blocks becomes non-uniform, and the large image quality There is a risk of deterioration.

【0013】すなわち、図7の例では、輝度サブブロッ
クY3の2番目以降のデータと、色差サブブロックC
r、Cbのデータがすべて無くなり、完全に色の無いブ
ロックが発生している。
That is, in the example of FIG. 7, the second and subsequent data of the luminance sub-block Y3 and the color difference sub-block C are displayed.
All the data of r and Cb are lost, and a completely colorless block is generated.

【0014】また、量子化制御信号を変え1ブロックの
符号量が大きくなる場合にもう一度1ブロックの符号量
がある一定値を越えないように符号量を制御する方法を
採用することも考えられるが、この方法は、リアルタイ
ム伝送用には適さず、また回路規模が大幅に大きくなる
という欠点もある。
It is also conceivable to adopt a method of controlling the code amount so that the code amount of one block does not exceed a certain fixed value again when the code amount of one block becomes large by changing the quantization control signal. However, this method is not suitable for real-time transmission, and also has a drawback that the circuit scale is significantly increased.

【0015】この発明はこの様な点に鑑みてなされたも
のであり、1ブロックの符号量が一定量を超えた場合で
も各サブブロックに符号量を適切に配分できるように
し、画質劣化を招くことなく符号量の制御を行うことが
可能な画像符号化装置を提供することを目的とする。
The present invention has been made in view of the above circumstances, and enables the code amount to be appropriately distributed to each sub-block even when the code amount of one block exceeds a certain amount, resulting in deterioration of image quality. It is an object of the present invention to provide an image encoding device capable of controlling the code amount without the need.

【0016】[0016]

【課題を解決するための手段】この発明は、画像信号を
符号化する画像符号化装置において、入力画像信号を輝
度信号と色差信号とに分離し、前記入力画像信号によっ
て提供される画像を、各々が輝度のサブブロックと色差
のサブブロックとを含む複数のブロックに分割する手段
と、前記各サブブロック単位で前記ブロックに含まれる
輝度信号および色差信号を直交変換する直交変換手段
と、この直交変換手段によって直交変換された信号をサ
ブブロック毎に周波数順に並び替える並び替え手段と、
この並び替え手段によって周波数順に並び替えられた信
号を量子化する量子化手段と、この量子化手段から出力
される1ブロック分の量子化データを記憶する記憶手段
と、この記憶手段に記憶された1ブロック分の量子化デ
ータを前記サブブロック間で並列に走査して各データの
符号長を累積加算することにより、その符号量を計測す
る符号量計測手段と、この符号量計測手段によって計測
された符号量に基づいて1ブロック毎の符号量を制御す
る符号量制御手段とを具備することを特徴とする。
According to the present invention, in an image coding apparatus for coding an image signal, an input image signal is separated into a luminance signal and a color difference signal, and an image provided by the input image signal is Means for dividing into a plurality of blocks each including a luminance sub-block and a chrominance sub-block, an orthogonal transformation means for orthogonally transforming the luminance signal and the chrominance signals contained in the block in units of the sub-blocks, and the orthogonal transformation means Rearranging means for rearranging the signals orthogonally transformed by the transforming means in frequency order for each sub-block,
Quantization means for quantizing the signals rearranged in the frequency order by the rearrangement means, storage means for storing one block of quantized data output from the quantization means, and storage means for the storage means. Quantized data for one block is scanned in parallel between the sub-blocks, and the code length of each data is cumulatively added to measure the code amount, and the code amount measuring unit measures the code amount. And a code amount control means for controlling the code amount for each block based on the code amount.

【0017】この画像符号化装置においては、1ブロッ
クの符号量を計測する場合に、従来のように時系列で符
号量を計測するのではなく、1ブロック相当の記憶手段
を用いて1ブロック分の量子化データを蓄え、記憶され
た1ブロック分のデータを周波数順、例えば周波数の低
いデータから順にサブブロック間で走査して符号量を計
測し、累積加算した結果がある閾値を越えたならば、そ
れ以降の高い周波数のデータがゼロデータなどに置き換
えられて符号量の制御が行われる。これによって、各サ
ブブロックへの符号量配分が均一化され、大きな画質劣
化が生じなくなる。また、回路規模を大幅に増やさずに
済む。また、この構成により、走査の割合がサブブロッ
ク間で異なるようにサブブロック間での並列走査順序を
規定すれば、1ブロックを構成するサブブロックの性質
に応じた符号量配分を行うことも可能となる。
In this image coding apparatus, when the code amount of one block is measured, the code amount is not measured in time series as in the conventional case, but one block is stored by using the storage means corresponding to one block. Quantized data is stored, the stored data for one block is scanned in order of frequency, for example, data from the lowest frequency in order between sub-blocks, the code amount is measured, and if the cumulative addition result exceeds a certain threshold, For example, the data of high frequency after that is replaced with zero data and the code amount is controlled. As a result, the distribution of the code amount to each sub-block is made uniform, and a large deterioration in image quality does not occur. In addition, the circuit scale does not need to be significantly increased. Further, with this configuration, if the parallel scanning order among the sub-blocks is defined so that the scanning rate differs among the sub-blocks, it is possible to perform the code amount distribution according to the property of the sub-blocks forming one block. Becomes

【0018】[0018]

【発明の実施の形態】以下、図面を参照してこの発明の
実施例を説明する。図1には、この発明の一実施形態に
係る画像符号化装置の構成が示されている。この画像符
号化装置は、入力画像の冗長度を利用してそれを符号化
して記録または伝送するためのものであり、この画像符
号化装置においては、入力画像信号1はY/C分離回路
ブロック2で輝度信号Yと色差信号Cに分離される。画
面分割回路ブロック3では1フレームをマクロブロック
と称される適当な大きさのブロックに分割し、サブブロ
ック分割回路ブロック4でさらに1ブロックがサブブロ
ックに分割される。1ブロックは、図5で説明したよう
に、輝度信号と色差信号の比率が4:1:1の場合
(4:2:0形式の画像に対応する)には、4つの輝度
サブブロックY0、Y1、Y2、Y3と2つの色差サブ
ブロックCr、Cbとから構成される。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows the configuration of an image coding apparatus according to an embodiment of the present invention. This image encoding device is for encoding and recording or transmitting it by utilizing the redundancy of the input image. In this image encoding device, the input image signal 1 is a Y / C separation circuit block. At 2, the luminance signal Y and the color difference signal C are separated. The screen division circuit block 3 divides one frame into blocks of appropriate size called macroblocks, and the subblock division circuit block 4 further divides one block into subblocks. As described with reference to FIG. 5, one block has four luminance sub-blocks Y0 when the ratio of the luminance signal to the color difference signal is 4: 1: 1 (corresponding to an image in the 4: 2: 0 format). It is composed of Y1, Y2, Y3 and two color difference sub-blocks Cr, Cb.

【0019】直交変換回路ブロック5で輝度サブブロッ
ク・色差サブブロックの順Y0→Y1→Y2→Y3→C
r→Cbに、直交変換が行われ、各サブブロックが周波
数成分毎に分離される。直交変換の方式としては、DC
T(Dscrete Cosine Transfor
m、離散コサイン変換)が使用されている。
In the orthogonal transformation circuit block 5, the order of luminance sub-block / color difference sub-block Y0 → Y1 → Y2 → Y3 → C
An orthogonal transformation is performed on r → Cb, and each sub-block is separated for each frequency component. The orthogonal transformation method is DC
T (Dscreene Cine Transform)
m, discrete cosine transform).

【0020】周波数順並び替え回路ブロック6では、直
交変換を行ったサブブロックの順に、各サブブロック内
のデータが低周波数順にジグザク走査されて並び替えら
れる。直交変換を行ったサブブロック内の走査順序は、
サブブロックの大きさがサンプル点単位で8×8の場合
には、図6のようになる。
In the frequency order rearranging circuit block 6, the data in each sub block are zigzag scanned in the order of the low frequencies in the order of the sub blocks subjected to the orthogonal transformation and rearranged. The scanning order within the sub-block after orthogonal transformation is
When the size of the sub-block is 8 × 8 in sample point units, the result is as shown in FIG.

【0021】このとき、Y0のデータ列をy0 i(i=
1,2,…,64)、Y1のデータ列をy1 i(i=
1,2,…,64)、Y2のデータ列をy2 i(i=
1,2,…,64)、Y3のデータ列をy3 i(i=
1,2,…,64)、Crのデータ列をcr i(i=
1,2,…,64)、Cbのデータ列をcb i(i=
1,2,…,64)とすると、周波数順並び替え回路ブ
ロック6の出力データ列は、y0 i(i=1,2,…,
64)、y1 i(i=1,2,…,64)、y2 i(i
=1,2,…,64)、y3 i(i=1,2,…,6
4)、cr i(i=1,2,…,64)、cb i(i=
1,2,…,64)と表せる。
At this time, the data string of Y0 is converted into y 0 i (i =
1, 2, ..., 64), and the data sequence of Y1 is y 1 i (i
1, 2, ..., 64), and the data sequence of Y2 is y 2 i (i =
1, 2, ..., 64), and the data sequence of Y3 is y 3 i (i =
1, 2, ..., 64), Cr data strings are converted into cr i (i =
1, 2, ..., 64), and the data string of Cb is c bi (i =
1, 2, ..., 64), the output data sequence of the frequency order rearrangement circuit block 6 is y 0 i (i = 1, 2, ..., 64).
64), y 1 i (i = 1, 2, ..., 64), y 2 i (i
= 1, 2, ..., 64), y 3 i (i = 1, 2, ..., 6)
4), cr i (i = 1, 2, ..., 64), c b i (i =
1, 2, ..., 64).

【0022】このデータ列は、量子化回路ブロック7で
量子化された後、符号化回路ブロック28でランレング
ス符号化などの符号化処理がなされる。符号化されたデ
ータはデータ吸収用の遅延回路9を介してデータ記憶回
路10に入力され、そこで1ブロック分のデータが記憶
される。記憶回路10に記憶された1ブロック分のデー
タは、1データ毎にサブブロック間で並列に走査され
て、 {y0 i,y1 i,y2 i,y3 i,cr i,cb i} (i=1,2,…,64) の順序で符号長計測回路ブロック13に送られる。符号
長計測回路ブロック13では、1データごとの符号長が
計測され、この値とレジスタ15に保持されている累積
値とが加算器14で加算され、その結果がレジスタ15
に再び蓄えられる。これにより、符号化されたデータの
符号長が累積的に加算される。比較器16では、1デー
タ毎にレジスタ15の値と閾値とが比較され、レジスタ
15の値が閾値を越えるか、あるいは1ブロックの符号
長計測が終了するまでスイッチ11は、記憶回路10側
にもゼロ信号発生回路12側にも接続されない。この
間、符号化回路8からは次のブロックのデータが出力さ
れるが、このデータ出力は遅延回路9で吸収される。
This data string is quantized by the quantizing circuit block 7, and is then subjected to coding processing such as run-length coding by the coding circuit block 28. The encoded data is input to the data storage circuit 10 via the data absorption delay circuit 9, and the data for one block is stored therein. The data of one block stored in the storage circuit 10 is scanned in parallel between the sub-blocks for each data, and {y 0 i, y 1 i, y 2 i, y 3 i, cr i, c It is sent to the code length measuring circuit block 13 in the order of b i} (i = 1, 2, ..., 64). In the code length measuring circuit block 13, the code length of each data is measured, and this value and the cumulative value held in the register 15 are added by the adder 14, and the result is stored in the register 15
Is stored again in. As a result, the code lengths of encoded data are cumulatively added. In the comparator 16, the value of the register 15 is compared with the threshold value for each data, and the switch 11 is set to the storage circuit 10 side until the value of the register 15 exceeds the threshold value or the code length measurement of one block is completed. Is also not connected to the zero signal generation circuit 12 side. During this time, the data of the next block is output from the encoding circuit 8, and this data output is absorbed by the delay circuit 9.

【0023】レジスタ15の値が閾値を越えるか、ある
いは1ブロックの符号長計測が終了した時点で、記憶回
路10に入力してきた順番で記憶回路10からデータが
順次読み出され、スイッチ11を通して再符号化回路ブ
ロック18に転送される。この場合、1ブロックの符号
長計測が終了したことにより再符号化回路ブロック18
へのデータ転送が開始される場合には、記憶回路10に
入力してきた順番で1ブロック分のデータが全てスイッ
チ11を通して再符号化回路ブロック18に転送され
る。一方、レジスタ15の値が閾値を越えたことによっ
てデータ転送が開始される場合には、その時に加算され
た最後のデータよりも周波数の高いデータについてはど
のサブブロックのものについてもゼロ信号に置き換えら
れるように、スイッチ11が記憶回路10側とゼロ信号
発生回路12側との間で交互に切り替えられる。これに
より、各サブブロック毎にゼロ信号と記憶回路10から
連続的に読み出されるデータ列とが切り替えられる。
When the value of the register 15 exceeds the threshold value or when the code length measurement of one block is completed, the data is sequentially read from the memory circuit 10 in the order of input to the memory circuit 10 and is again read through the switch 11. It is transferred to the encoding circuit block 18. In this case, since the code length measurement of one block is completed, the re-encoding circuit block 18
When the data transfer to (1) is started, all the data for one block is transferred to the re-encoding circuit block 18 through the switch 11 in the order input to the memory circuit 10. On the other hand, when the data transfer is started by the value of the register 15 exceeding the threshold value, the data having a higher frequency than the last data added at that time is replaced with the zero signal for any sub-block. As described above, the switch 11 is alternately switched between the storage circuit 10 side and the zero signal generation circuit 12 side. As a result, the zero signal and the data string continuously read from the storage circuit 10 are switched for each sub-block.

【0024】すなわち、レジスタ15の値が閾値を越え
た時に符号長が計測された最後のデータがcb Nであっ
た場合には、各サブブロックにおいてN+1番目以降か
ら64番目までのデータがゼロに置き換えられ、 y0 1,y0 2,…y0 N,0,… y1 1,y1 2,…y1 N,0,… y2 1,y2 2,…y2 N,0,… y3 1,y3 2,…y3 N,0,… cr 1,cr 2,…cr N,0,… cb 1,cb 2,…cb N,0,… の順で、再符号化回路ブロック18にデータが転送され
る。これにより、各サブブロックへの符号量配分の均一
化を図ることができる。
That is, when the last data whose code length is measured when the value of the register 15 exceeds the threshold value is c b N, the data from N + 1th to 64th data in each sub-block is zero. , Y 0 1, y 0 2, ... y 0 N, 0, ... y 1 1, y 1 2, ... y 1 N, 0, ... y 2 1, y 2 2, ... y 2 N, 0 , ... y 3 1, y 3 2, ... y 3 N, 0, ... cr 1, cr 2, ... cr N, 0, ... c b 1, c b 2, ... c b N, 0, ... The data is transferred to the re-encoding circuit block 18 in this order. As a result, it is possible to make the code amount distribution to each sub-block uniform.

【0025】この後、再符号化回路ブロック18で必要
に応じて可変長符号化処理が行われた後、出力バッファ
に19に送られる。そして、最終的に入力画像を圧縮符
号化した信号39が記録装置や伝送装置などに送られ
る。
Thereafter, the re-encoding circuit block 18 performs variable-length encoding processing if necessary, and then sends it to the output buffer 19. Then, finally, the signal 39 obtained by compression-encoding the input image is sent to a recording device, a transmission device, or the like.

【0026】また、図1において、y0 i(i=1,
2,…,64)、y1 i(i=1,2,…,64)、y
2i(i=1,2,…,64)、y3 i(i=1,2,
…,64)、cr i(i=1,2,…,64)、cb
(i=1,2,…,64)の順番で記憶回路10に入力
した直交変換済みの量子化データをサブブロック間で走
査して1データ毎に符号長を計測するとき、走査の割合
がサブブロック間で異なるようにサブブロック間での並
列走査順序を規定すれば、1ブロックを構成するサブブ
ロックの性質に応じた符号量配分を行うことも可能とな
る。
Further, in FIG. 1, y 0 i (i = 1, 1
2, ..., 64), y 1 i (i = 1, 2, ..., 64), y
2 i (i = 1, 2, ..., 64), y 3 i (i = 1, 2,
, 64), cr i (i = 1, 2, ..., 64), c b i
When the orthogonally transformed quantized data input to the memory circuit 10 in the order of (i = 1, 2, ..., 64) is scanned between sub-blocks to measure the code length for each data, the scanning ratio is If the parallel scanning order among the sub-blocks is defined so as to be different among the sub-blocks, it is possible to perform the code amount distribution according to the property of the sub-blocks forming one block.

【0027】例えば、 {y0 i,y1 i,y2 i,y3 i,y0 i+1,y1
i+1,y2 i+1,y3 i+1,cr (i+1)/
2,cb (i+1)/2} (i=1,3,5,7,…,63) (cr i,cb i) (i=33,34,…,64) の順番で行えば、輝度信号を色差信号よりも優先するこ
とができる。
For example, {y 0 i, y 1 i, y 2 i, y 3 i, y 0 i + 1, y 1
i + 1, y 2 i + 1, y 3 i + 1, cr (i + 1) /
2, c b (i + 1) / 2} (i = 1,3,5,7, ..., 63) (cr i, cb i) (i = 33,34, ..., 64) The signal can be prioritized over the color difference signal.

【0028】図2には、図1の符号量制御を実現するた
めの具体的な構成が示されている。ここでは、輝度信号
と色差信号をサブブロック毎にY0→Y1→Y2→Y3
→Cr→Cbの順に直交変換された符号化データが、y
0 i(i=1,2,…,64)、y1 i(i=1,2,
…,64)、y2i(i=1,2,…,64)、y3
(i=1,2,…,64)、cr i(i=1,2,…,
64)、cb i(i=1,2,…,64)の順番で入力
され、遅延回路9を介して前述の記憶回路10を構成す
るメモリに1ブロック単位で書き込まれる。このメモリ
に書き込まれたデータがサブブロック毎に周波数の低い
データから、 {y0 i,y1 i,y2 i,y3 i,cr i,cb i} (i=1,2,…,64) の順序で読み出されるように、メモリはアドレス発生回
路54で発生されたメモリアドレスによってメモリのラ
ンダムアクセスが行われる。これにより、読み出された
データは、1データ毎に符号長計測回路ブロック13で
その符号長が計測される。そして、その計測された値と
レジスタ15に保持されている累積値とが加算器14で
加算され、その結果がレジスタ15に再び蓄えられる。
このようにして、符号化されたデータの符号長が累積的
に加算される。比較器16では、1データ毎にレジスタ
15の値と閾値とが比較され、レジスタ15の値が閾値
を越えるか、あるいは1ブロックの符号長計測が終了す
るまでスイッチ11は、記憶回路10側にもゼロ信号発
生回路12側にも接続されない。この間、符号化回路8
からは次のブロックのデータが出力されるが、このデー
タ出力は遅延回路9で吸収される。
FIG. 2 shows a specific configuration for realizing the code amount control of FIG. Here, the luminance signal and the color difference signal are Y0 → Y1 → Y2 → Y3 for each sub-block.
The encoded data that has been orthogonally transformed in the order of → Cr → Cb is y
0 i (i = 1, 2, ..., 64), y 1 i (i = 1, 2,
, 64), y 2 i (i = 1, 2, ..., 64), y 3 i
(I = 1, 2, ..., 64), cr i (i = 1, 2, ..., 64)
64), cb i (i = 1, 2, ..., 64) in this order, and written via the delay circuit 9 into the memory constituting the above-mentioned memory circuit 10 in block units. The data written in this memory is as follows: {y 0 i, y 1 i, y 2 i, y 3 i, cr i, c b i} (i = 1, 2, , 64), the memory is randomly accessed by the memory address generated by the address generating circuit 54. As a result, the code length of the read data is measured by the code length measuring circuit block 13 for each data. Then, the measured value and the cumulative value held in the register 15 are added by the adder 14, and the result is stored again in the register 15.
In this way, the code lengths of encoded data are cumulatively added. In the comparator 16, the value of the register 15 is compared with the threshold value for each data, and the switch 11 is set to the storage circuit 10 side until the value of the register 15 exceeds the threshold value or the code length measurement of one block is completed. Is also not connected to the zero signal generation circuit 12 side. During this period, the encoding circuit 8
The data of the next block is output from, but this data output is absorbed by the delay circuit 9.

【0029】レジスタ15の値が閾値を越えるか、ある
いは1ブロックの符号長計測が終了したとき、制御回路
65がスイッチ11を制御して、再符号化回路ブロック
18にデータを送る。このとき、メモリはアドレス発生
回路54で発生されたメモリアドレスによってアドレス
順にシリアルアクセスされる。再符号化回路ブロック1
8に入力されるデータの順番は、メモリの入力データの
順番と同じである。即ち、y0 i(i=1,2,…,6
4)、y1 i(i=1,2,…,64)、y2i(i=
1,2,…,64)、y3 i(i=1,2,…,6
4)、cr i(i=1,2,…,64)、cb i(i=
1,2,…,64)である。
When the value of the register 15 exceeds the threshold value or when the code length measurement of one block is completed, the control circuit 65 controls the switch 11 to send the data to the re-encoding circuit block 18. At this time, the memory is serially accessed in the address order by the memory address generated by the address generation circuit 54. Re-encoding circuit block 1
The order of data input to 8 is the same as the order of input data in the memory. That is, y 0 i (i = 1, 2, ..., 6
4), y 1 i (i = 1, 2, ..., 64), y 2 i (i =
1, 2, ..., 64), y 3 i (i = 1, 2, ..., 6)
4), cr i (i = 1, 2, ..., 64), c b i (i =
1, 2, ..., 64).

【0030】ただし、レジスタ15の値がN番目の周波
数のデータで閾値を越えた場合、 {y0 i,y1 i,y2 i,y3 i,cr i,cb i} (i=1,2,…,64) のデータ列において各サブブロックにおけるN+1番目
以降のデータが全て0になるようにスイッチ11が断続
的にメモり10側からゼロ信号発生回路12側に切り替
えられる。
However, when the value of the register 15 exceeds the threshold value in the data of the Nth frequency, {y 0 i, y 1 i, y 2 i, y 3 i, cr i, c b i} (i = 1, 2, ..., 64), the switch 11 is intermittently switched from the memory 10 side to the zero signal generation circuit 12 side so that the N + 1th and subsequent data in each subblock are all 0.

【0031】図3に遅延回路9の出力から、再符号化回
路ブロック18の入力までのデータの流れを示す。この
例では、メモリ10にcr 60が入力されたのを見てメ
モリ10の走査を開始し、cb 16の符号長を加算した時
点で、閾値を越えたものとする。このとき、それ以降の
データ列、即ち、 {y0 i,y1 i,y2 i,y3 i,cr i,cb i} (i=17,18,…,64) が0になるように、スイッチ11が制御される。
FIG. 3 shows the data flow from the output of the delay circuit 9 to the input of the re-encoding circuit block 18. In this example, it is assumed that the threshold value is exceeded at the time when the scanning of the memory 10 is started when the cr 60 is input to the memory 10 and the code length of cb 16 is added. At this time, the switch 11 is set so that the data string after that, that is, {y0 i, y1 i, y2 i, y3 i, cr i, cb i} (i = 17, 18, ..., 64) becomes 0. Is controlled.

【0032】図3ではスイッチ制御信号が“1”でメモ
リ10側に接続し、“0”でゼロ信号発生回路12側に
接続するものとする。符号化器18にはメモリ10の入
力データ列の順序、即ち、y0 i(i=1,2,…,6
4)、y1 i(i=1,2,…,64)、y2i(i=
1,2,…,64)、y3 i(i=1,2,…,6
4)、cr i(i=1,2,…,64)、cb i(i=
1,2,…,64)で入力され、そこで、再符号化回路
ブロック18で実際の可変長符号化が行われた後、出力
バッファに19に送られる。そして、最終的に入力画像
を圧縮符号化した信号20が記録装置や伝送装置などに
送られる。
In FIG. 3, when the switch control signal is "1", it is connected to the memory 10 side, and when it is "0", it is connected to the zero signal generating circuit 12 side. In the encoder 18, the order of the input data sequence of the memory 10, that is, y 0 i (i = 1, 2, ..., 6)
4), y 1 i (i = 1, 2, ..., 64), y 2 i (i =
1, 2, ..., 64), y 3 i (i = 1, 2, ..., 6)
4), cr i (i = 1, 2, ..., 64), c b i (i =
1, 2, ..., 64), where the actual variable length coding is performed in the re-encoding circuit block 18 and then sent to the output buffer 19. Then, finally, the signal 20 obtained by compression-encoding the input image is sent to a recording device, a transmission device, or the like.

【0033】以上説明したように、この実施形態におい
ては、1ブロックの符号量を計測する場合に、従来のよ
うに時系列で符号量を計測するのではなく、1ブロック
相当の記憶回路10を用いて1ブロック分の量子化デー
タを蓄え、その記憶回路10に記憶された1ブロック分
のデータを周波数の低いデータから順にサブブロック間
で並列に走査して符号量を計測し、累積加算した結果が
ある閾値を越えたならば、それ以降の高い周波数のデー
タがゼロデータなどに置き換えられて符号量の制御が行
われる。これによって、各サブブロックへの符号量配分
が均一化され、大きな画質劣化が生じなくなる。また、
回路規模を大幅に増やさずに済む。
As described above, in this embodiment, when the code amount of one block is measured, the code amount is not measured in time series as in the conventional case, but the storage circuit 10 corresponding to one block is used. One block of quantized data is stored by using the data, and one block of data stored in the storage circuit 10 is scanned in parallel between sub-blocks in order from the data with the lowest frequency to measure the code amount and cumulative addition is performed. If the result exceeds a certain threshold value, the data of high frequency thereafter is replaced with zero data and the code amount is controlled. As a result, the distribution of the code amount to each sub-block is made uniform, and a large deterioration in image quality does not occur. Also,
It is not necessary to significantly increase the circuit scale.

【0034】[0034]

【発明の効果】以上のように、この発明によれば、1ブ
ロックの符号量が一定量を超えた場合でも各サブブロッ
クに符号量を適切に配分できるようになり、画質劣化を
招くことなく符号量の制御を行うことが可能となる。
As described above, according to the present invention, even when the code amount of one block exceeds a certain amount, the code amount can be appropriately distributed to each sub-block, and the image quality is not deteriorated. It is possible to control the code amount.

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

【図1】この発明の一実施形態に係る画像符号化装置の
構成を示すブロック図。
FIG. 1 is a block diagram showing a configuration of an image encoding device according to an embodiment of the present invention.

【図2】図1の装置における符号量制御のための具体的
な構成を示す回路図。
2 is a circuit diagram showing a specific configuration for controlling the code amount in the device of FIG.

【図3】図2の回路における符号量制御動作を説明する
タイミングチャート。
3 is a timing chart illustrating a code amount control operation in the circuit of FIG.

【図4】従来の画像符号化装置の構成を示すブロック
図。
FIG. 4 is a block diagram showing a configuration of a conventional image encoding device.

【図5】通常のマクロブロックの構成を示す図。FIG. 5 is a diagram showing a configuration of a normal macroblock.

【図6】図5のマクロブロックに属するサブブロックを
直交変換した後のデータの並び替え順を説明するための
図。
6A and 6B are views for explaining the rearrangement order of data after orthogonal transformation of sub-blocks belonging to the macro block of FIG.

【図7】従来の画像符号化装置における符号量制御動作
を説明するタイミングチャート。
FIG. 7 is a timing chart illustrating a code amount control operation in a conventional image encoding device.

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

1…入力画像信号、2…Y/C分離回路ブロック、3…
画面分割回路ブロック、4…サブブロック分割回路ブロ
ック、5…直交変換回路ブロック、6…周波数順並び替
え回路ブロック、7…量子化回路ブロック、8…符号化
回路ブロック、9…遅延回路、10…記憶回路、11…
スイッチ、13…符号長計測回路ブロック、14…加算
器、15…レジスタ、16…比較器、17…スイッチ制
御信号、18…再符号化回路ブロック、19…出力バッ
ファ、54…アドレス発生回路、65…制御回路。
1 ... Input image signal, 2 ... Y / C separation circuit block, 3 ...
Screen division circuit block, 4 ... Sub block division circuit block, 5 ... Orthogonal transformation circuit block, 6 ... Frequency rearrangement circuit block, 7 ... Quantization circuit block, 8 ... Encoding circuit block, 9 ... Delay circuit, 10 ... Memory circuit, 11 ...
Switch, 13 ... Code length measuring circuit block, 14 ... Adder, 15 ... Register, 16 ... Comparator, 17 ... Switch control signal, 18 ... Re-encoding circuit block, 19 ... Output buffer, 54 ... Address generating circuit, 65 ... control circuit.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 画像信号を符号化する画像符号化装置に
おいて、 入力画像信号を輝度信号と色差信号とに分離し、前記入
力画像信号によって提供される画像を、各々が輝度のサ
ブブロックと色差のサブブロックとを含む複数のブロッ
クに分割する手段と、 前記各サブブロック単位で前記ブロックに含まれる輝度
信号および色差信号を直交変換する直交変換手段と、 この直交変換手段によって直交変換された信号をサブブ
ロック毎に周波数順に並び替える並び替え手段と、 この並び替え手段によって周波数順に並び替えられた信
号を量子化する量子化手段と、 この量子化手段から出力される1ブロック分の量子化デ
ータを記憶する記憶手段と、 この記憶手段に記憶された1ブロック分の量子化データ
を前記サブブロック間で並列に走査して各データの符号
長を累積加算することにより、その符号量を計測する符
号量計測手段と、 この符号量計測手段によって計測された符号量に基づい
て1ブロック毎の符号量を制御する符号量制御手段とを
具備することを特徴とする画像符号化装置。
1. An image coding apparatus for coding an image signal, wherein an input image signal is separated into a luminance signal and a color difference signal, and an image provided by the input image signal is divided into a luminance sub-block and a color difference signal. Means for dividing into a plurality of blocks including sub-blocks, an orthogonal transformation means for orthogonally transforming the luminance signal and the color difference signals included in the blocks in each sub-block unit, and a signal orthogonally transformed by this orthogonal transformation means Rearranging means for rearranging each sub-block in frequency order, quantizing means for quantizing the signals rearranged in frequency order by this rearranging means, and one block of quantized data output from the quantizing means. And a quantized data for one block stored in the storage means are scanned in parallel between the sub blocks to Code amount measuring means for measuring the code amount by cumulatively adding the code lengths of data, and code amount controlling means for controlling the code amount for each block based on the code amount measured by the code amount measuring means. An image coding apparatus comprising:
【請求項2】 前記符号量計測手段は、1ブロック分の
量子化データを周波数成分の低いデータから順にサブブ
ロック間で並列に走査して各データの符号長を累積加算
することにより符号量を計測し、 前記符号量制御手段は、前記計測された符号量がある閾
値以上になったとき、前記記憶手段に記憶されている1
ブロック分の量子化データの中で未走査の残りの量子化
データの符号をゼロとすることを特徴とする請求項1記
載の画像符号化装置。
2. The code amount measuring means scans one block of quantized data in parallel between sub-blocks in order from the data with the lowest frequency component, and cumulatively adds the code length of each data to obtain the code amount. 1) stored in the storage means when the measured code amount exceeds a certain threshold value.
The image coding apparatus according to claim 1, wherein the code of the remaining unscanned quantized data in the quantized data for the block is zero.
【請求項3】 前記符号量計測手段は、走査の割合がサ
ブブロック間で異なるようにサブブロックの種類に応じ
た順序でサブブロック間の並列走査を実行することを特
徴とする請求項1記載の画像符号化装置。
3. The code amount measuring means executes parallel scanning between sub-blocks in an order according to the type of sub-block so that the scanning rate varies among the sub-blocks. Image encoding device.
【請求項4】 画像信号を符号化する画像符号化装置に
おいて、 入力画像信号を輝度信号と色差信号とに分離し、前記入
力画像信号によって提供される画像を、各々が輝度のサ
ブブロックと色差のサブブロックとを含む複数のブロッ
クに分割する手段と、 前記各サブブロック単位で前記ブロックに含まれる輝度
信号および色差信号を直交変換する直交変換手段と、 この直交変換手段によって直交変換された信号をサブブ
ロック毎に周波数の低い順に並び替える並び替え手段
と、 この並び替え手段によって周波数順に並び替えられた信
号を量子化する量子化手段と、 この量子化手段から出力される1ブロック分の量子化デ
ータを記憶する記憶手段と、 この記憶手段に記憶された1ブロック分の量子化データ
を前記サブブロック間で並列に走査して各データの符号
長を累積加算することにより、その符号量を計測する符
号量計測手段と、 この符号量計測手段によって計測された符号量がある閾
値以上になったとき、前記記憶手段に記憶された1ブロ
ック分の量子化データを連続して読み出し、その読み出
された各サブブロックのデータ列の中で、前記閾値以上
になったときに走査された量子化データよりも周波数の
高い量子化データの符号をゼロに置き換える手段とを具
備することを特徴とする画像符号化装置。
4. An image coding apparatus for coding an image signal, wherein an input image signal is separated into a luminance signal and a color difference signal, and an image provided by the input image signal is divided into a luminance sub-block and a color difference signal. Means for dividing into a plurality of blocks including sub-blocks, an orthogonal transformation means for orthogonally transforming the luminance signal and the color difference signals included in the blocks in each sub-block unit, and a signal orthogonally transformed by this orthogonal transformation means Rearranging means for rearranging each sub-block in ascending order of frequency, quantizing means for quantizing the signals rearranged in frequency order by this rearranging means, and one block of quantum output from the quantizing means. Storage means for storing the encoded data, and one block of quantized data stored in the storage means is scanned in parallel between the sub-blocks. Then, by cumulatively adding the code lengths of the respective data, the code amount measuring means for measuring the code amount, and when the code amount measured by the code amount measuring means exceeds a certain threshold, the storage means stores the code amount. The stored quantized data for one block is continuously read, and the frequency of the read quantized data is higher than that of the quantized data scanned when the threshold value or more is exceeded in the read data string of each sub-block. An image coding apparatus, comprising means for replacing the code of the quantized data with zero.
JP5980796A 1996-03-15 1996-03-15 Image coder Pending JPH09252477A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5980796A JPH09252477A (en) 1996-03-15 1996-03-15 Image coder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5980796A JPH09252477A (en) 1996-03-15 1996-03-15 Image coder

Publications (1)

Publication Number Publication Date
JPH09252477A true JPH09252477A (en) 1997-09-22

Family

ID=13123895

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5980796A Pending JPH09252477A (en) 1996-03-15 1996-03-15 Image coder

Country Status (1)

Country Link
JP (1) JPH09252477A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6509929B1 (en) 1999-05-06 2003-01-21 Nec Corporation Apparatus and method for coding a moving picture
US7720297B2 (en) 2006-03-30 2010-05-18 Mitsubishi Electric Corporation Image coding apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6509929B1 (en) 1999-05-06 2003-01-21 Nec Corporation Apparatus and method for coding a moving picture
US7720297B2 (en) 2006-03-30 2010-05-18 Mitsubishi Electric Corporation Image coding apparatus

Similar Documents

Publication Publication Date Title
US7843998B2 (en) Method for improved entropy coding
JPH0377477A (en) Method and apparatus for variable length coding
US9047669B1 (en) Bit rate control for data compression
CN1106599A (en) Image coding method and apparatus therefor
JPH099261A (en) Signal compression device
JP2921358B2 (en) Image coding device
JPH08256335A (en) Apparatus and method for determining quantization parameter
CN114786011A (en) JPEG image compression method, system, equipment and storage medium
JPH0746139A (en) Signal processor and application thereof
JP2002112268A (en) Compressed image data decoding apparatus
JPH09252477A (en) Image coder
CN113115041B (en) Lossless picture compression method, device and medium supporting alpha channel
JPH1066077A (en) Code amount control method for image data and its device
JPH09191458A (en) Moving image compression coding method and its device
KR100195187B1 (en) Apparatus and method of compressing still image at steady compression rate
JP2993212B2 (en) How to combine images
JPH0984011A (en) Moving image coding system converter
JP2795171B2 (en) Image compression method and apparatus
KR100234239B1 (en) Method and apparatus of quantizing for decreasing blocking effect
JP4404232B2 (en) Quantization method, quantization apparatus, quantization step determination method, and quantization step determination apparatus
JPH06291680A (en) Code quantity estimating device
KR100245788B1 (en) Video coding apparatus
JPH05236448A (en) Compressed moving image code amount controller
KR100221196B1 (en) Variable length encoder for compressing and restoring image signal
JPH03285460A (en) Picture data compressing and encoding system