JPH04223773A - Encoder - Google Patents

Encoder

Info

Publication number
JPH04223773A
JPH04223773A JP2406840A JP40684090A JPH04223773A JP H04223773 A JPH04223773 A JP H04223773A JP 2406840 A JP2406840 A JP 2406840A JP 40684090 A JP40684090 A JP 40684090A JP H04223773 A JPH04223773 A JP H04223773A
Authority
JP
Japan
Prior art keywords
block
component
value
circuit
block line
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
JP2406840A
Other languages
Japanese (ja)
Inventor
Masaru Kobayashi
優 小林
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2406840A priority Critical patent/JPH04223773A/en
Publication of JPH04223773A publication Critical patent/JPH04223773A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PURPOSE:To increase the processing speed by providing a DC component encoding circuit, a block terminating encoding circuit and an AC component encoding circuit and controlling each coding circuit with a microcontroller operated by a microprogram. CONSTITUTION:Picture data are made into DCT with a block unit at a DCT circuit 1, sent to a quantization circuit 2 where the data are quantized by a quantizing weight and outputted to a block line memory 3. The picture data stored in the memory 3 are transferred to a Q interface 4, segmented into data with one bit unit, supplied to Q coder 5 and stored into a storage device 6 successively. On the other hand, the picture data read from the device 6 are decoded via the Q coder 5, sent to the Q interface 4 and the picture data of one block line are stored in the memory 3. Then, the picture data are read at a reverse quantization circuit 7 by block units and a high frequency is extended. Further, these picture data are turned into the reverse DCT at the reverse DCT circuit 8 and outputted as the picture data of an original pixel arrangement.

Description

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

【0001】0001

【産業上の利用分野】本発明は、直交変換された画像デ
ータを量子化した後に符号化して記憶させるための符号
化装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an encoding device for quantizing orthogonally transformed image data and then encoding and storing the encoded data.

【0002】0002

【従来の技術】近年、テレビ電話などの分野で離散コサ
イン変換(以下「DCT」と略称する)を使用した画像
圧縮装置が注目されている。ここでDCTは、画像デー
タを周波数成分に分割し、入力サンプル数と同じ数のコ
サイン波で表現するもので、エネルギーの集中が得られ
、そのエネルギーの大きい成分だけを符号化することに
より、画像圧縮を可能にするものである。
2. Description of the Related Art In recent years, image compression devices using discrete cosine transform (hereinafter abbreviated as "DCT") have been attracting attention in fields such as video telephones. Here, DCT divides image data into frequency components and expresses them with the same number of cosine waves as the number of input samples. By concentrating energy, and encoding only the components with high energy, It enables compression.

【0003】このようなDCTを使用した画像圧縮装置
では、記録時に画像データを記憶した画像メモリの内容
をブロック分割手段により所定の大きさのブロックに分
割し、これらのブロックに対してDCTを施す。そして
、このDCTより得られた結果を量子化手段で量子化し
た後に、所定のインタフェース部で1ビット単位に切出
した後に一般にQコーダと呼ばれる符号化器で符号化し
、記憶装置に記憶させる。
[0003] In such an image compression device using DCT, the contents of an image memory storing image data during recording are divided into blocks of a predetermined size by a block division means, and DCT is applied to these blocks. . After the result obtained from this DCT is quantized by a quantizing means, it is extracted into bits by a predetermined interface section, and then encoded by an encoder generally called a Q coder and stored in a storage device.

【0004】一方、再生時には記憶装置から読出したデ
ータは該Qコーダで復号した後に上記インタフェース部
でブロック単位に構成し直し、それから逆量子化手段で
逆量子化し、さらに逆DCTを施し、ブロック結合手段
でブロック結合して再生画像データを得るようになって
いる。
On the other hand, during playback, the data read from the storage device is decoded by the Q coder, then reconfigured in block units by the interface section, then dequantized by the dequantization means, further subjected to inverse DCT, and then combined into blocks. The blocks are combined using means to obtain reproduced image data.

【0005】[0005]

【発明が解決しようとする課題】しかして、上述した如
く上記インタフェース部は、量子化されたブロック単位
のデータを切出して1ビット単位で入出力を行なうQコ
ーダに供給するようになっているが、その処理は汎用プ
ロセッサを用いてソフトウェアによって実現していた。 そのため、回路規模が大きくなり、また、処理時間が長
くなるなどの欠点があった。
[Problem to be Solved by the Invention] However, as described above, the above interface section cuts out quantized block data and supplies it to the Q coder which performs input/output in 1 bit units. , the processing was realized by software using a general-purpose processor. Therefore, there were drawbacks such as an increase in circuit scale and a longer processing time.

【0006】本発明は上記のような実情に鑑みてなされ
たもので、その目的とするところは、量子化されたブロ
ック単位のデータを符号化器の特性に合わせて演算、分
解して供給するインタフェース部の回路を小規模化し、
かつ処理速度を向上させることが可能な符号化装置を提
供することにある。
The present invention has been made in view of the above-mentioned circumstances, and its purpose is to calculate and decompose quantized block-based data according to the characteristics of an encoder and supply the data. By reducing the size of the interface circuit,
Another object of the present invention is to provide an encoding device that can improve processing speed.

【0007】[0007]

【課題を解決するための手段及び作用】すなわち本発明
は、ブロック分割され直交変換されたデータを符号化す
るための符号化器と該符号化器の特性に合わせて符号化
のための前処理を行なうインタフェースを備えた符号化
装置において、上記インタフェースに、ブロックライン
を記憶するブロックラインメモリと、このブロックライ
ンメモリに記憶された直流成分値のブロック間の差分を
算出し所定の規則で符号化する直流成分符号化回路と、
上記ブロックラインメモリに記憶された交流成分のブロ
ック終端情報を所定の規則で符号化するブロック終端符
号化回路と、上記ブロック終端符号化回路で得られるブ
ロック終端情報を基にブロックラインメモリに記憶され
た交流成分値を所定の規則で符号化する交流成分符号化
回路とを備え、これらの各回路をマイクロプログラムを
記憶したマイクロコントローラによって制御するように
したもので、マイクロプログラム動作によるマイクロコ
ントローラで各符号化回路を制御させることによりイン
ターフェイス部の回路を小規模化し、かつ処理速度を向
上させることができる。
[Means and operations for solving the problems] That is, the present invention provides an encoder for encoding block-divided and orthogonally transformed data, and pre-processing for encoding in accordance with the characteristics of the encoder. In an encoding device equipped with an interface, the interface has a block line memory for storing block lines, and a difference between blocks of DC component values stored in this block line memory is calculated and encoded according to a predetermined rule. a DC component encoding circuit,
A block end encoding circuit encodes the block end information of the AC component stored in the block line memory according to a predetermined rule, and the block end information obtained by the block end encoder is stored in the block line memory. The system is equipped with an AC component encoding circuit that encodes AC component values according to predetermined rules, and each of these circuits is controlled by a microcontroller that stores a microprogram. By controlling the encoding circuit, the circuit of the interface section can be downsized and the processing speed can be improved.

【0008】[0008]

【実施例】以下図面を参照して本発明の一実施例を説明
する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0009】図1は画像圧縮装置全体の回路構成につい
て述べたもので、入力されたデジタル値の画像データは
DCT回路1において例えば横8画素×縦8画素のブロ
ック単位でDCT化され、量子化回路2に送出される。 この量子化回路2は、送られてきた画像データを予め設
定されている量子化ウェイトによって量子化し、高周波
成分を圧縮してブロックラインメモリ3に出力する。こ
のブロックラインメモリ3は、量子化回路2から送られ
てくるブロック単位の画像データを横1ブロックライン
、例えば96ブロック分格納する。このブロックライン
メモリ3に格納される画像データはそのままQインタフ
ェース4に転送され、1ビット単位のデータに切出され
てQコーダ5に供給される。Qコーダ5は、Qインタフ
ェース4からの1ビット単位のデータをそのまま符号化
し、記憶装置6に順次記憶させる。
FIG. 1 describes the circuit configuration of the entire image compression device. Input digital value image data is converted into DCT in block units of, for example, 8 pixels horizontally by 8 pixels vertically in a DCT circuit 1, and then quantized. The signal is sent to circuit 2. The quantization circuit 2 quantizes the received image data using preset quantization weights, compresses high frequency components, and outputs the compressed high frequency components to the block line memory 3. This block line memory 3 stores image data in units of blocks sent from the quantization circuit 2 for one horizontal block line, for example, 96 blocks. The image data stored in the block line memory 3 is transferred as is to the Q interface 4, cut out into data in units of 1 bit, and supplied to the Q coder 5. The Q coder 5 encodes the 1-bit data from the Q interface 4 as it is, and sequentially stores it in the storage device 6.

【0010】一方、再生時に記憶装置6から1ビット単
位で読出される画像データはQコーダ5を介して復号化
され、Qインタフェース4に送られる。Qインタフェー
ス4は、Qコーダ5からの1ビット単位で送られてくる
データを1ブロックラインの画像データに構成し、上記
ブロックラインメモリ3に転送して格納させる。ブロッ
クラインメモリ3に格納された1ブロックライン分の画
像データはブロック単位で逆量子化回路7に読出され、
逆量子化されて高周波成分が伸長される。この逆量子化
された画像データはさらに逆DCT回路8によって逆D
CT化され、元の画素配列の画像データとして出力され
る。
On the other hand, image data read out bit by bit from the storage device 6 during playback is decoded via the Q coder 5 and sent to the Q interface 4. The Q interface 4 configures the data sent in 1-bit units from the Q coder 5 into image data of 1 block line, and transfers the image data to the block line memory 3 for storage. The image data for one block line stored in the block line memory 3 is read out to the inverse quantization circuit 7 in block units.
The high frequency components are expanded by dequantization. This inverse quantized image data is further processed by an inverse DCT circuit 8.
It is converted into CT and output as image data of the original pixel array.

【0011】ここで、取扱う画像データの構成例を図2
により示す。
Here, an example of the structure of image data to be handled is shown in FIG.
It is shown by

【0012】ここでは、1枚のカラー画像データが輝度
信号Yと色差信号R−Y及び色差信号B−Yから構成さ
れるものとし、輝度信号Yは横768ドット×縦480
ライン、色差信号R−Y及びB−Yはそれぞれ、輝度信
号Yを横方向に1/4、縦方向の1/2に間引いた横1
92ドット×縦240ラインの構成とする。
[0012] Here, it is assumed that one sheet of color image data is composed of a luminance signal Y, a color difference signal RY, and a color difference signal B-Y, and the luminance signal Y is 768 dots horizontally x 480 dots vertically.
The line, color difference signals R-Y and B-Y are respectively horizontally thinned out by thinning the luminance signal Y to 1/4 in the horizontal direction and 1/2 in the vertical direction.
The configuration is 92 dots x 240 vertical lines.

【0013】したがって、上記ブロックラインメモリ3
は輝度信号Yを格納する際には96ブロック分を、色差
信号R−Y及びB−Yを格納する際には24ブロック分
を格納することで1ブロックライン分を格納することと
なる。
Therefore, the block line memory 3
When storing the luminance signal Y, 96 blocks are stored, and when storing the color difference signals RY and BY, 24 blocks are stored, so that one block line is stored.

【0014】次に上記DCT回路1と量子化回路2ある
いは逆量子化回路7と逆DCT回路8による画像データ
のブロック単位の処理の概念について図3を用いて説明
する。
Next, the concept of block-by-block processing of image data by the DCT circuit 1 and quantization circuit 2 or the inverse quantization circuit 7 and inverse DCT circuit 8 will be explained with reference to FIG.

【0015】DCT回路1に入力される画像データ中の
1ブロックは図3(a)に示すように横8画素×縦8画
素の64画素、各画素当たり8ビットの階調データから
構成され、これをDCT回路1がDCT化することによ
り図3(b)に示すような8要素×8要素のシーケンシ
ーからなる画像データが得られる。この画像データ中、
縦横両方向共に最も周波数成分の低い最左上に位置する
要素データが直流成分(以下「DC成分」と略称する)
となり、全64画素の階調の加重平均値となる。また、
このDC成分以外の要素データがすべて交流成分(以下
「AC成分」と略称する)となり、右方向あるいは下方
向にいくほど周波数成分の高い要素となる。こうしてD
CT化された画像データのエネルギーは、DC成分及び
AC成分の低周波側に片寄ったものとなる。
As shown in FIG. 3(a), one block of image data input to the DCT circuit 1 is composed of 64 pixels (8 horizontal pixels x 8 vertical pixels) and 8-bit gradation data for each pixel. By converting this into DCT by the DCT circuit 1, image data consisting of a sequence of 8 elements x 8 elements as shown in FIG. 3(b) is obtained. In this image data,
The element data located at the top left with the lowest frequency component in both the vertical and horizontal directions is the DC component (hereinafter abbreviated as "DC component")
This is the weighted average value of the gradations of all 64 pixels. Also,
All element data other than this DC component becomes an alternating current component (hereinafter abbreviated as "AC component"), and the further to the right or downward, the higher the frequency component becomes. Thus D
The energy of CT image data is biased towards the low frequency side of the DC and AC components.

【0016】このDCT化された画像データに対して、
量子化回路2で各要素毎に量子化ウェイトの数値を異な
らせて設定した量子化テーブルを用いて量子化処理を実
行することにより、図3(c)に示すようにAC成分の
高周波側の要素がほとんど「0(ゼロ)」になった画像
データが得られる。この量子化によって得られた画像デ
ータ中の「0」になっていない低周波側の要素のみを符
号化することにより画像の圧縮が行われる。
For this DCT image data,
By performing quantization processing using a quantization table set with different quantization weight values for each element in the quantization circuit 2, the high frequency side of the AC component is Image data in which most of the elements are "0" is obtained. The image is compressed by encoding only the low-frequency elements that are not "0" in the image data obtained by this quantization.

【0017】画像データの再生時には上記とまったく反
対の処理となる。すなわち、図3(c)に示すような量
子化されたデータを逆量子化回路7が逆量子化すること
により図3(b)に示すようなDCTされた画像データ
が得られ、これをさらに逆DCT回路8で逆DCT化す
ることにより図3(a)に示すような元の8×8画素の
画像データが得られる。
[0017] When reproducing image data, processing is completely opposite to the above. That is, the inverse quantization circuit 7 dequantizes the quantized data as shown in FIG. 3(c) to obtain DCT image data as shown in FIG. 3(b), which is then further processed. By performing inverse DCT in the inverse DCT circuit 8, original 8×8 pixel image data as shown in FIG. 3(a) is obtained.

【0018】次いでQインタフェース4の行なうブロッ
ク単位のデータから1ビット単位でデータを切出す処理
の概念について図4及び図5により説明する。上記Qコ
ーダ5は、ビット列の符号化器であり、そのビット列は
“0”“1”それぞれの符号量が等分ではなく、どちら
か一方に符号が片寄っている場合の方が符号化効率が向
上する。そのため、Qインタフェース4は1要素当たり
例えば8ビットの画像データを片寄りをもったビット列
に変換するためのものであり、その符号化はDC成分と
AC成分とに分けて処理される。
Next, the concept of the processing performed by the Q interface 4 to extract data in units of 1 bit from data in units of blocks will be explained with reference to FIGS. 4 and 5. The above-mentioned Q coder 5 is a bit string encoder, and the bit string is not equally divided into “0” and “1” code amounts, but the coding efficiency is higher when the code is biased towards one side. improves. Therefore, the Q interface 4 is for converting image data of, for example, 8 bits per element into a biased bit string, and its encoding is processed separately into a DC component and an AC component.

【0019】図4によりDC成分の符号化について述べ
る。
The encoding of the DC component will be described with reference to FIG.

【0020】DC成分を符号化する際には、そのDC成
分の絶対的な値ではなく、同一平面上の隣接するブロッ
クのDC成分との差分を符号化する。図4(a)はその
平面差分の演算方法を示す。例えば同図(a)中のXで
示すDC成分を符号化する場合、その上のブロックのD
C成分の値aと左のブロックのDC成分の値bとにより
演算「X−((a+b)/2)」を実行して算出し、そ
の算出結果を予測誤差である平面差分Dとして得るもの
である。得られた平面差分Dは図4(b)に示す符号木
と呼ぶロジックに従って“0”“1”のビット列に変換
する。この符号木は、その頂部より順次右または左方向
への判断を符号“1”“0”としてビット単位で行ない
ながら下っていくことにより符号“1”“0”のビット
列を作成するものである。例えば「D=+3」である場
合、このDを符号木に従って符号化すると「10110
」となる。この符号木による特定数のビットを別々のQ
コーダにより個別に符号化するべく、通称binと呼ぶ
区分を行なう。図4(c)はこのbin区分を示すもの
であり、ここでは6つに区分する。したがって、上記Q
コーダ5内はこのbinに対応して実際には6つのQコ
ーダを並列に配設して構成するものとする。
When encoding a DC component, the difference between the DC component and the DC component of an adjacent block on the same plane is encoded, rather than the absolute value of the DC component. FIG. 4(a) shows a method for calculating the plane difference. For example, when encoding the DC component indicated by X in FIG.
Calculated by executing the operation "X-((a+b)/2)" using the value a of the C component and the value b of the DC component of the left block, and obtaining the calculation result as the plane difference D, which is the prediction error. It is. The obtained plane difference D is converted into a bit string of "0" and "1" according to the logic called a code tree shown in FIG. 4(b). This code tree creates a bit string of codes "1" and "0" by going down from the top of the tree while sequentially making judgments to the right or left with codes "1" and "0" on a bit-by-bit basis. . For example, when "D=+3", if this D is encoded according to the code tree, "10110
”. A specific number of bits by this code tree are divided into separate Q
In order to be individually coded by a coder, the data are divided into sections commonly called bins. FIG. 4(c) shows this bin division, which is divided into six bins here. Therefore, the above Q
The inside of the coder 5 is actually constructed by arranging six Q coders in parallel corresponding to these bins.

【0021】図5によりAC成分の符号化について述べ
る。
The encoding of AC components will be described with reference to FIG.

【0022】AC成分は1ブロックに63個あるため、
図5(a)に示すように1順目と2順目の2回に分けて
低周波成分から高周波成分の方向へジグザグスキャンを
行なう。この場合、ジグザグスキャンのポインタ位置を
Zとし、それぞれスキャンの始点となる位置をZmin
 、終点となる位置をZmax とする。また、ある値
から後に続く高周波成分がすべて連続して“0”となる
位置があり、その位置をEOB(End  Of  B
lock)とし、このEOB以降は符号化を省略する。
Since there are 63 AC components in one block,
As shown in FIG. 5A, zigzag scanning is performed in the direction from the low frequency component to the high frequency component in two steps, a first order and a second order. In this case, the pointer position of the zigzag scan is Z, and the starting point of each scan is Zmin.
, the end point is Zmax. Also, there is a position where all the high frequency components following a certain value are "0" consecutively, and that position is called EOB (End Of B).
lock), and the encoding is omitted after this EOB.

【0023】さらに、上述したDC成分の場合と同様に
、AC成分においても図5(c)に示す如くbin区分
を行なう。この区分において、EOBLは隣接する左側
のブロックのEOB位置、PREVはジグザグスキャン
時のZの前位置が“0”であるか否かを示すフラグであ
る。
Furthermore, as in the case of the DC component described above, the AC component is also divided into bins as shown in FIG. 5(c). In this division, EOBL is the EOB position of the adjacent left block, and PREV is a flag indicating whether the previous position of Z during zigzag scanning is "0" or not.

【0024】次に上記Qインタフェース4内の回路構成
を図6に示す。
Next, the circuit configuration inside the Q interface 4 is shown in FIG.

【0025】Qインタフェース4内のすべての動作制御
はマイクロコントローラ11が行なうもので、このマイ
クロコントローラ11はブロックラインメモリ13、E
OBRAM18にそれぞれ読出し/書き込み信号R/W
を、ブロックラインメモリアドレス生成部12、COL
カウンタ23、EOBRAMアドレス生成部17、DC
平面差分演算器14、Tカウンタ15及びbinカウン
タ22にカウントアップ/ダウン等の制御指令を出力す
る。
All operations within the Q interface 4 are controlled by a microcontroller 11, which controls the block line memory 13 and E
Read/write signal R/W to OBRAM18 respectively
, the block line memory address generation unit 12, COL
Counter 23, EOBRAM address generation section 17, DC
Control commands such as count up/down are output to the plane difference calculator 14, T counter 15, and bin counter 22.

【0026】ブロックラインメモリアドレス生成部12
はブロックラインメモリ13のアドレス指定を行なうも
のであり、そのアドレス値はまた、EOBLレジスタ2
0、EOBレジスタ19、Zコンパレータ21及びEO
BRAM18へも出力される。ブロックラインメモリ1
3は、上記ブロックラインメモリ3を介して転送されて
きた1ブロックライン分の量子化された画像データを格
納する。DC平面差分演算器14は、ブロックラインメ
モリ13から読出されてくる画像データのブロック中の
DC成分とTカウンタ15に格納される隣接ブロックの
DC成分から上述した平面差分Dを演算し、演算結果を
Tカウンタ15に送出する。Tカウンタ15は、DC平
面差分演算器14からの平面差分Dを格納する。このT
カウンタ15に格納された平面差分DはTコンパレータ
16において“0”であるか否か絶対値の減算により比
較判断され、その判断結果は上記マイクロコントローラ
11へ出力される。
Block line memory address generation section 12
is used to specify the address of the block line memory 13, and its address value is also stored in the EOBL register 2.
0, EOB register 19, Z comparator 21 and EO
It is also output to BRAM18. Block line memory 1
3 stores quantized image data for one block line transferred via the block line memory 3. The DC plane difference calculator 14 calculates the above-mentioned plane difference D from the DC component in the block of image data read from the block line memory 13 and the DC component of the adjacent block stored in the T counter 15, and calculates the calculation result. is sent to the T counter 15. The T counter 15 stores the plane difference D from the DC plane difference calculator 14. This T
The T comparator 16 compares and determines whether the plane difference D stored in the counter 15 is "0" by subtracting the absolute value, and the determination result is output to the microcontroller 11.

【0027】EOBLレジスタ20は、EOBL(左隣
のブロックのEOB)の位置データを保持し、Zコンパ
レータ21に出力する。EOBレジスタ19は、EOB
の位置データを保持し、Zコンパレータ21に出力する
。Zコンパレータ21は、ブロックラインメモリアドレ
ス生成部12からのポインタ位置ZにおけるEOBLレ
ジスタ20、EOBレジスタ19の保持内容との比較を
行なうことでEOB位置を検出するもので、その比較結
果を上記マイクロコントローラ11へ出力する。EOB
RAM18は、マイクロコントローラ11からの読出し
/書き込み信号R/Wに応じてEOBRAMアドレス生
成部17にアドレス指示される位置にブロックラインメ
モリアドレス生成部12からのEOB位置データを1ブ
ロックライン分記憶し、また、これを上記EOBLレジ
スタ20、EOBレジスタ19及びZコンパレータ21
に適宜読出す。このときEOBRAMアドレス生成部1
7は、COLカウンタ23から輝度信号Y、色差信号R
−Y及び色差信号B−Yの区別に応じたカウント値によ
りEOBRAM18のアドレスを生成する。
The EOBL register 20 holds position data of EOBL (EOB of the block on the left) and outputs it to the Z comparator 21. EOB register 19
The position data is held and output to the Z comparator 21. The Z comparator 21 detects the EOB position by comparing the contents held in the EOBL register 20 and the EOB register 19 at the pointer position Z from the block line memory address generation unit 12, and transmits the comparison result to the microcontroller. Output to 11. EOB
The RAM 18 stores one block line worth of EOB position data from the block line memory address generation section 12 at a position specified by the EOBRAM address generation section 17 in accordance with the read/write signal R/W from the microcontroller 11. In addition, this is applied to the EOBL register 20, EOB register 19 and Z comparator 21.
Read as appropriate. At this time, EOBRAM address generation section 1
7 is a luminance signal Y and a color difference signal R from the COL counter 23.
The address of the EOBRAM 18 is generated based on the count value according to the distinction between -Y and the color difference signal B-Y.

【0028】しかして、binカウンタ22の出力する
3ビットのデータがbinの区分データとしてQコーダ
5に送られると共に、マイクロコントローラ11から1
ビットの符号化データがQコーダ5に送られる。また、
Qコーダ5から送られてくる1ビットの復号化データは
マイクロコントローラ11に入力される。
Thus, the 3-bit data output from the bin counter 22 is sent to the Q coder 5 as bin classification data, and is also sent from the microcontroller 11 to the Q coder 5.
The encoded data of the bits is sent to the Q coder 5. Also,
The 1-bit decoded data sent from the Q coder 5 is input to the microcontroller 11.

【0029】続いて図7により上記マイクロコントロー
ラ11内で取扱われるマイクロプログラム命令について
説明する。
Next, microprogram instructions handled within the microcontroller 11 will be explained with reference to FIG.

【0030】マイクロプログラム命令は通常命令とジャ
ッジ/コール(Judge/Call)命令の2種類が
あり、そのいずれも56ビットのデータ長を有する。
There are two types of microprogram instructions: normal instructions and judge/call instructions, both of which have a data length of 56 bits.

【0031】通常命令は、その上位55〜53の3ビッ
トにインストラクション(Inst)ビットを、下位7
〜0の8ビットにネクストアドレス(NEXT  Ad
dr)を割当て、残る52〜8の45ビットに各回路の
制御信号を割当てている。
[0031] A normal instruction has an instruction (Inst) bit in its upper 3 bits 55 to 53 and a lower 7
The next address (NEXT Ad
dr), and control signals for each circuit are assigned to the remaining 45 bits 52 to 8.

【0032】また、ジャッジ/コール命令は、同じくそ
の上位55〜53の3ビットにインストラクションビッ
トを、下位7〜0の8ビットにネクストアドレスを割当
てていると共に、15〜8の8ビットに2方向分岐のた
めの2重アドレスとしてジャッジリターン(Judge
  Return)アドレスを割当て、さらに19〜1
6の4ビットにジャッジ選択のためのジャッジセレクト
(JudgeSelect)ビットを割当てている。
[0032] Also, the judge/call instruction similarly assigns an instruction bit to the upper 3 bits 55 to 53 and a next address to the lower 8 bits 7 to 0, and also assigns two directions to the 8 bits 15 to 8. Judge return (Judge return) as double address for branch
Return) address and further 19-1
A judge select (JudgeSelect) bit for selecting a judge is assigned to 4 bits of 6.

【0033】図8は上記マイクロコントローラ11内の
回路構成を示すもので、31は種々の制御信号や命令を
記憶したマイクロプログラムROMであり、そのアドレ
ス指定は符号化スタート信号あるいは復号化スタート信
号により起動するアドレスラッチ回路33が行なう。
FIG. 8 shows the circuit configuration inside the microcontroller 11. Numeral 31 is a microprogram ROM that stores various control signals and instructions, and its address can be specified by an encoding start signal or a decoding start signal. This is done by the address latch circuit 33 that is activated.

【0034】アドレスラッチ回路33のアドレス指定に
よってマイクロプログラムROM31から読出された命
令は以下に示すように出力される。すなわち、インスト
ラクションは命令デコーダ32へ、通常命令の制御信号
は制御ラッチ回路35へ、ジャッジ/コール命令のジャ
ッジセレクトはジャッジセレクタ36へ、ジャッジリタ
ーンアドレスはスタック回路34あるいはゲート回路3
7cを介してアドレスラッチ回路33へ、ネクストアド
レスはゲート回路37aを介してアドレスラッチ回路3
3へそれぞれ出力されるものである。スタック回路34
は、入力されたアドレスを一時スタックした後にゲート
回路37bを介してアドレスラッチ回路33へ出力する
The instructions read from the microprogram ROM 31 by the address designation of the address latch circuit 33 are output as shown below. That is, instructions are sent to the instruction decoder 32, control signals for normal instructions are sent to the control latch circuit 35, judge selects for judge/call instructions are sent to the judge selector 36, and judge return addresses are sent to the stack circuit 34 or gate circuit 3.
7c to the address latch circuit 33, and the next address to the address latch circuit 3 via the gate circuit 37a.
3, respectively. stack circuit 34
outputs the input address to the address latch circuit 33 via the gate circuit 37b after temporarily stacking the input address.

【0035】通常命令であれば、その制御信号が制御ラ
ッチ回路35へ出力されると共に、ネクストアドレスが
ゲート回路37aを介してアドレスラッチ回路33にラ
ッチされ、次の指定アドレスとして使用される。
If it is a normal command, the control signal is output to the control latch circuit 35, and the next address is latched by the address latch circuit 33 via the gate circuit 37a, and is used as the next specified address.

【0036】命令デコーダ32は、インストラクション
の内容に従ってアドレスラッチ回路33にラッチクロッ
クを、ジャッジセレクタ36にジャッジ出力信号を、ス
タック回路34にスタッククロックを、ゲート回路37
a〜37cにバス切換信号を出力する。
The instruction decoder 32 sends a latch clock to the address latch circuit 33, a judge output signal to the judge selector 36, a stack clock to the stack circuit 34, and a gate circuit 37 according to the contents of the instruction.
A bus switching signal is output to a to 37c.

【0037】次に上記実施例の動作について説明する。Next, the operation of the above embodiment will be explained.

【0038】図9はQインタフェース4で行われる符号
化のメインルーチンを示し、その動作制御はマイクロコ
ントローラ11が行なうもので、処理当初にはまずステ
ップA01で各回路を初期化する。その後、ステップA
02で後述するサブルーチンにより1ブロックライン分
(図では「1BL」と示す)の画像データの各DC成分
を符号化する。続くステップA03でさらに後述するサ
ブルーチンにより今度は同じく1ブロックライン分の画
像データのAC成分の各EOBを検出する。そして、ス
テップA04で1画面分が終了したと判断されるまでブ
ロックラインメモリ3に記憶される1ブロックライン分
の画像データを順次書換えて上記ステップA02〜A0
4の処理を繰返し実行し、1画面分が終了したと判断さ
れたら次はステップA05で輝度信号Yと色差信号R−
Y、色差信号B−Yの3色分が終了したと判断されるま
でステップA02〜A05の処理を繰返し実行する。
FIG. 9 shows the main routine of encoding performed by the Q interface 4, whose operation is controlled by the microcontroller 11. At the beginning of the process, each circuit is initialized in step A01. Then step A
02, each DC component of image data for one block line (indicated as "1BL" in the figure) is encoded by a subroutine to be described later. In the following step A03, each EOB of the AC component of the image data for one block line is similarly detected by a subroutine to be described later. Then, the image data for one block line stored in the block line memory 3 is sequentially rewritten until it is determined in step A04 that one screen has been completed, and the steps A02 to A0 described above are performed.
4 is repeatedly executed, and when it is determined that one screen has been completed, the next step is step A05, where the luminance signal Y and color difference signal R-
The processes of steps A02 to A05 are repeatedly executed until it is determined that three colors of Y and color difference signals B-Y are completed.

【0039】その後、ステップA06で後述するサブル
ーチンにより1ブロックライン分の画像データのAC成
分の低周波側の前半について符号化する。続くステップ
A07で1画面分が終了したと判断されるまでブロック
ラインメモリ3に記憶される1ブロックライン分の画像
データを順次書換えてこのステップA06の処理を繰返
し実行し、1画面分が終了したと判断されたら次は輝度
信号Yと色差信号R−Y、色差信号B−Yの3色分が終
了したと判断されるまで上記ステップA06〜A08の
処理を繰返して実行する。さらにステップA08で3色
分が終了したと判断されたら次はステップA09でAC
成分の高周波側の後半が終了したと判断されるまで上記
ステップA06〜A09の処理を繰返して実行する。
Thereafter, in step A06, the first half of the low frequency side of the AC component of the image data for one block line is encoded by a subroutine to be described later. The image data for one block line stored in the block line memory 3 is sequentially rewritten and the process of step A06 is repeatedly executed until it is determined that one screen has been completed in the subsequent step A07, and one screen has been completed. When it is determined that this is the case, the processing of steps A06 to A08 is repeated until it is determined that the three colors of the luminance signal Y, color difference signal RY, and color difference signal B-Y are completed. Furthermore, if it is determined in step A08 that three colors have been completed, the next step is step A09.
The processing of steps A06 to A09 is repeated until it is determined that the second half of the high frequency side of the component is completed.

【0040】そして、ステップA09でAC成分の高周
波側の後半も終了したと判断されると、以上でカラーの
画像データ1画面分に対する符号化を終了する。
When it is determined in step A09 that the second half of the high frequency side of the AC component has also been completed, the encoding for one screen of color image data is completed.

【0041】図10は上記ステップA02の1ブロック
ライン分の画像データの各DC成分の符号化を示すサブ
ルーチンである。その処理当初にはステップB01で後
述するサブルーチンによりブロックラインメモリ3に記
憶されている8ライン分(=1ブロックライン分)の画
像データをQインタフェース4内のブロックラインメモ
リ13に転送、格納する。次いでステップB02でブロ
ックラインメモリ13に記憶される画像データ中のDC
成分により1ブロック分の平面差分DをDC平面差分演
算器14が上記図4(a)に示したように算出する。算
出した平面差分Dは続くステップB03でTカウンタ1
5に格納する。その後、ステップB04で後述するサブ
ルーチンにより1ブロック分のDC成分を符号化した後
、ステップB05で1ブロックライン分が終了したか否
か判断する。 1ブロックライン分が終了したと判断するまで上記ステ
ップB02〜B05の処理を繰返し実行し、終了したと
判断すると以上でこのサブルーチンを終えて上記図9の
メインルーチンに復帰する。
FIG. 10 is a subroutine showing the encoding of each DC component of the image data for one block line in step A02. At the beginning of the process, image data for eight lines (=one block line) stored in the block line memory 3 is transferred to and stored in the block line memory 13 in the Q interface 4 by a subroutine to be described later in step B01. Next, in step B02, the DC in the image data stored in the block line memory 13 is
The DC plane difference calculator 14 calculates the plane difference D for one block based on the components as shown in FIG. 4(a). The calculated plane difference D is stored in the T counter 1 in the subsequent step B03.
Store in 5. Thereafter, in step B04, DC components for one block are encoded by a subroutine to be described later, and then, in step B05, it is determined whether or not one block line has been completed. The processing of steps B02 to B05 is repeated until it is determined that one block line has been completed, and when it is determined that it has been completed, this subroutine is completed and the process returns to the main routine of FIG. 9.

【0042】図19は上記ステップB01やその他、符
号化、復号化のいずれでも多用されるブロックラインメ
モリ13への1ブロックライン分の画像データの格納処
理を示すサブルーチンである。
FIG. 19 shows a subroutine for storing one block line worth of image data in the block line memory 13, which is frequently used in step B01 and other steps in encoding and decoding.

【0043】その処理当初には、ステップK01でブロ
ックラインメモリ13のアドレス指定を行なうブロック
ラインメモリアドレス生成部12を初期化する。次にス
テップK02でこのブロックラインメモリアドレス生成
部12のアドレス指定により1ライン分の画像データを
上記ブロックラインメモリ3から転送格納する。続くス
テップK03で1ブロックライン分、8ライン分の格納
を終えたか否か判断し、終えると判断するまで上記ステ
ップK02,K03の処理を8ライン分繰返し実行して
このサブルーチンを終了する。
At the beginning of the process, the block line memory address generation unit 12, which specifies the address of the block line memory 13, is initialized in step K01. Next, in step K02, one line of image data is transferred and stored from the block line memory 3 according to the address specification of the block line memory address generation section 12. In the following step K03, it is determined whether or not storage for one block line or eight lines has been completed, and the processes of steps K02 and K03 are repeatedly executed for eight lines until it is determined that storage has been completed, and this subroutine ends.

【0044】図11は上記ステップA03の1ブロック
ライン分の画像データの各AC成分のEOBの検出処理
を示すサブルーチンである。その処理当初にはステップ
C01でTカウンタ15がカウントする当該ブロック中
のAC成分のポインタZの値を逆方向からのジグザグス
キャンのために最終値「63」に設定する。このポイン
タZの指示する値に従ってステップC02でブロックラ
インメモリ13から該当する量子化された要素データを
読出す。そして、ステップC03でこの読出した要素デ
ータを一時Tカウンタ15に格納し、続くステップC0
4でこの格納した要素データが「0」以外の数値である
か、あるいはポインタZの値が「0」であるか判断する
。ここでTカウンタ15に格納した要素データが「0」
であるか、ポインタZの値が「0」ではないとTコンパ
レータ16で判断した場合は、ステップC07で「−1
」更新設定したポインタZの値によりTカウンタ15か
ら要素データを読出し、再びステップC01〜C04の
処理を繰返す。
FIG. 11 is a subroutine showing the process of detecting the EOB of each AC component of the image data for one block line in step A03. At the beginning of the process, in step C01, the value of the pointer Z of the AC component in the block counted by the T counter 15 is set to the final value "63" for zigzag scanning from the opposite direction. According to the value indicated by the pointer Z, the corresponding quantized element data is read out from the block line memory 13 in step C02. Then, in step C03, this read element data is temporarily stored in the T counter 15, and in the following step C0
In step 4, it is determined whether the stored element data is a numerical value other than "0" or whether the value of pointer Z is "0". Here, the element data stored in the T counter 15 is "0"
, or if the T comparator 16 determines that the value of pointer Z is not "0", the value of pointer Z is "-1" in step C07.
” The element data is read from the T counter 15 according to the updated value of pointer Z, and the processing of steps C01 to C04 is repeated again.

【0045】上記ステップC01〜C04,C07の処
理を繰返し実行して当該ブロック中の「0」が連続する
AC成分を高周波側からジグザグスキャンしていく。「
T≠0」であると判断した時点でステップC04からス
テップC05に進み、Tカウンタ15のカウント値であ
るポインタZの値を「+1」した値をEOBRAM18
に書込む。その後、ステップC06で1ブロックライン
分が終了したか否か判断するもので、終了していないと
判断した際には1ブロックライン中の当該ブロックを更
新設定して再び上記ステップC01からの処理を繰返し
実行する。
[0045] The above steps C01 to C04 and C07 are repeatedly executed to zigzag scan AC components having consecutive "0"s in the block from the high frequency side. "
When it is determined that "T≠0", the process proceeds from step C04 to step C05, and the value obtained by adding "+1" to the value of pointer Z, which is the count value of T counter 15, is stored in EOBRAM 18.
write to. After that, in step C06, it is determined whether one block line has been completed or not. If it is determined that it has not been completed, the corresponding block in one block line is updated and the process from step C01 is repeated. Execute repeatedly.

【0046】ステップC06で1ブロックライン分が終
了したと判断されると、EOBRAM18には1ブロッ
クライン分のEOBが書込まれていることとなり、以上
でこのサブルーチンを終了して上記図9のメインルーチ
ンに復帰する。
If it is determined in step C06 that one block line has been completed, it means that one block line's worth of EOB has been written in the EOBRAM 18, and this subroutine is completed and the main flow shown in FIG. 9 is completed. Return to routine.

【0047】図13は上記図10のステップB04のA
C成分の符号化を示すサブルーチンである。このサブル
ーチンは上記図4(b)で示した符号木に沿った符号化
を示すものであり、その処理当初にはステップE01で
binカウンタ22に保持されるbinの値をまず初期
値「0」に設定する。その後、ステップE02でTカウ
ンタ15に格納されているDC成分の平面差分Dの値を
Tコンパレータ16に読出し、これが「0」であるか否
かを判断する。「0」である場合、上記図4(c)に示
す如くbinは「0」であるので、ステップE12に進
んで1ビットのコード“0”を符号化データとしてQコ
ーダ5へ出力させ、この処理を終了する。
FIG. 13 shows A of step B04 in FIG. 10 above.
This is a subroutine showing the encoding of the C component. This subroutine shows encoding along the code tree shown in FIG. Set to . Thereafter, in step E02, the value of the plane difference D of the DC component stored in the T counter 15 is read to the T comparator 16, and it is determined whether or not this is "0". If it is "0", the bin is "0" as shown in FIG. Finish the process.

【0048】また、ステップE02でTコンパレータ1
6に読出したDC成分の平面差分Dの値が「0」でない
と判断した場合には、次にステップE03で1ビットの
コード“1”を符号化データとしてQコーダ5へ出力さ
せると共に、binカウンタ22を「+1」カウントア
ップする。その後、ステップE04でTコンパレータ1
6に読出したDC成分の平面差分Dの値がマイナスであ
るか否かを判断する。
[0048] Also, in step E02, T comparator 1
If it is determined that the value of the plane difference D of the DC component read in step E03 is not "0", then in step E03, a 1-bit code "1" is output as encoded data to the Q coder 5, and the bin The counter 22 is counted up by "+1". After that, in step E04, T comparator 1
It is determined whether the value of the plane difference D of the DC component read in step 6 is negative.

【0049】マイナスである場合は、ステップE05で
さらに1ビットのコード“1”を符号化データとしてQ
コーダ5へ出力させ、binカウンタ22を「2」に設
定すると共に、Tカウンタ15の値を「×(−1)」し
てプラスの値に反転させる。また、ステップE04でT
コンパレータ16に読出したDC成分の平面差分Dの値
がマイナスではなくプラスであると判断した場合は、次
にステップE11でコード“0”を符号化データとして
Qコーダ5へ出力させ、binカウンタ22を「3」に
設定する。
If it is negative, in step E05, 1 bit of code "1" is added as encoded data to Q.
It outputs to the coder 5, sets the bin counter 22 to "2", and inverts the value of the T counter 15 by "x(-1)" to a positive value. Also, in step E04, T
If it is determined that the value of the plane difference D of the DC component read by the comparator 16 is positive rather than negative, then in step E11 the code "0" is output as encoded data to the Q coder 5, and the bin counter 22 is set to "3".

【0050】ステップE05あるいはE11の処理後、
ステップE06でTコンパレータ16に読出したDC成
分の平面差分Dの値を「−1」更新設定し、続けてステ
ップE07でこの更新設定したTカウンタ15の値が「
0」であるか否かを判断する。
After processing step E05 or E11,
In step E06, the value of the plane difference D of the DC component read out to the T comparator 16 is updated by "-1", and then in step E07, the updated value of the T counter 15 is set to "
0".

【0051】「0」である場合、元のDC成分の平面差
分Dは「±1」であり、binは「2」あるいは「3」
であることとなり、次にステップE12に進んで1ビッ
トのコード“0”を符号化データとしてQコーダ5へ出
力させ、この処理を終了する。
[0051] When it is "0", the plane difference D of the original DC component is "±1", and the bin is "2" or "3".
Therefore, the process proceeds to step E12, where the 1-bit code "0" is outputted as encoded data to the Q coder 5, and this process is terminated.

【0052】また、ステップE07でTカウンタ15の
値が「0」ではないと判断した場合には、次にステップ
E08で1ビットのコード“1”を符号化データとして
Qコーダ5へ出力させ、binカウンタ22を「4」に
設定すると共に、Tコンパレータ16の平面差分Dの値
をさらに「−1」更新設定し、続くステップE09で再
びこの更新設定したTコンパレータ16の値が「0」で
あるか否かを判断する。「0」である場合、元のDC成
分の平面差分Dは「±2」であり、binは「4」であ
ることとなり、次にステップE12に進んで1ビットの
コード“0”を符号化データとしてQコーダ5へ出力さ
せ、この処理を終了する。
Further, if it is determined in step E07 that the value of the T counter 15 is not "0", then in step E08, a 1-bit code "1" is outputted as encoded data to the Q coder 5, The bin counter 22 is set to "4", and the value of the plane difference D of the T comparator 16 is further updated by "-1", and in the following step E09, the updated value of the T comparator 16 is again set to "0". Determine whether it exists or not. If it is "0", the plane difference D of the original DC component is "±2" and the bin is "4", and the process then proceeds to step E12 to encode a 1-bit code "0". The data is outputted to the Q coder 5, and this processing is completed.

【0053】また、ステップE09でTコンパレータ1
6の値が「0」ではないと判断した場合には、次にステ
ップE10で1ビットのコード“1”を符号化データと
してQコーダ5へ出力させ、binカウンタ22を「5
」に設定すると共に、Tカウンタ15の平面差分Dの値
をさらに「−1」更新設定し、以後ステップE09から
の処理を繰返して実行する。そして、再びTカウンタ1
5の値が「0」となった時点でステップE09からステ
ップE12に進んで1ビットのコード“0”を符号化デ
ータとしてQコーダ5へ出力させ、この処理を終了する
Furthermore, in step E09, T comparator 1
If it is determined that the value of 6 is not "0", then in step E10, a 1-bit code "1" is output as encoded data to the Q coder 5, and the bin counter 22 is set to "5".
'', and the value of the plane difference D of the T counter 15 is further updated to ``-1'', and thereafter the process from step E09 is repeated. Then, T counter 1 again
When the value of 5 becomes "0", the process proceeds from step E09 to step E12, where a 1-bit code "0" is outputted as encoded data to the Q coder 5, and this process is completed.

【0054】続いて図12により上記図9のステップA
06の1ブロックライン分の画像データの各AC成分の
符号化のサブルーチンを説明する。
Next, referring to FIG. 12, step A in FIG.
A subroutine for encoding each AC component of image data for one block line of 06 will be explained.

【0055】その処理当初にはステップD01で1ブロ
ックラインの先頭のブロックに対する処理のために前ブ
ロックのEOBの値であるEOBLを記憶するEOBL
レジスタ20に仮の数値「63」を設定する。次いでス
テップD02で上記図19で示したブロックラインメモ
リ13への1ブロックライン分の画像データの格納処理
のサブルーチンを実行する。
At the beginning of the process, in step D01, EOBL, which is the EOB value of the previous block, is stored in order to process the first block of one block line.
A temporary numerical value "63" is set in the register 20. Next, in step D02, a subroutine for storing one block line worth of image data in the block line memory 13 shown in FIG. 19 is executed.

【0056】続くステップD03でジグザグスキャン時
のポインタZの前位置を示すPREVに“1”を設定し
、ステップD04でEOBRAM18から当該ブロック
のEOBを読出し、EOBレジスタ19に設定する。次
のステップD05でポインタZとして、ここではまず1
順目のZmin の値「1」を設定し、ステップD06
でポインタZがEOBレジスタ19のEOBの値より大
きいか否かを判断する。
In the following step D03, PREV indicating the previous position of pointer Z during zigzag scanning is set to "1", and in step D04, the EOB of the block in question is read from the EOBRAM 18 and set in the EOB register 19. In the next step D05, the pointer Z is set to 1.
Set the Zmin value “1” in the order, and proceed to step D06.
It is determined whether the pointer Z is larger than the EOB value of the EOB register 19.

【0057】ここでポインタZがEOBの値より大きく
ないと判断すると次にステップD07に進み、PREV
が“0”であるか否かを判断する。PREVが“0”で
はなく“1”であると判断した場合は、次にステップD
10でbinカウンタ22に「0」を設定した後、ステ
ップD11でポインタZがEOBLレジスタ20に保持
される値より小さいか否か判断する。ポインタZがEO
BLレジスタ20に保持される値より大きい場合、次に
ステップD12でbinカウンタ22に「1」を設定す
る。また、ポインタZがEOBLレジスタ20に保持さ
れる値より小さい場合は、このステップD12の処理を
省略する。
If it is determined that pointer Z is not larger than the value of EOB, the process proceeds to step D07, and PREV
It is determined whether or not is "0". If it is determined that PREV is “1” instead of “0”, then step D
After setting the bin counter 22 to "0" in step D10, it is determined whether the pointer Z is smaller than the value held in the EOBL register 20 in step D11. Pointer Z is EO
If it is larger than the value held in the BL register 20, then in step D12 the bin counter 22 is set to "1". Furthermore, if the pointer Z is smaller than the value held in the EOBL register 20, the process of step D12 is omitted.

【0058】ステップD12あるいはステップD11の
処理の後、ステップD13でポインタZがEOBレジス
タ19に保持される値と等しいか否かを判断する。等し
くないと判断した場合、次にステップD14で1ビット
のコード“0”を符号化データとしてQコーダ5へ出力
させると共に、binカウンタ22を「2」に設定して
ステップD16に進む。
After the processing in step D12 or step D11, it is determined in step D13 whether the pointer Z is equal to the value held in the EOB register 19. If it is determined that they are not equal, then in step D14, a 1-bit code "0" is outputted as encoded data to the Q coder 5, and the bin counter 22 is set to "2", and the process proceeds to step D16.

【0059】ステップD16では、ブロックラインメモ
リ13から当該AC成分を読出し、これを続くステップ
D17でTカウンタ15に格納する。そして、ステップ
D18で後述するサブルーチンによりそのAC成分を符
号化する。符号化後、ステップD19でポインタZの値
がZmax の値、1順目では「34」、より小さいか
否か、すなわち、ポインタZの更新の最終値に至ったか
否かを判断する。
In step D16, the AC component is read from the block line memory 13, and then stored in the T counter 15 in step D17. Then, in step D18, the AC component is encoded by a subroutine to be described later. After encoding, in step D19, it is determined whether the value of pointer Z is smaller than the value of Zmax, which is "34" in the first order, that is, whether the value of pointer Z has reached the final value of update.

【0060】ポインタZの値がZmax の値より小さ
いと判断されると、次にステップD09でポインタZの
値を「+1」更新設定した後に、再びステップD07に
至り、ジグザグスキャンによる次のAC成分の符号化の
ための諸処理を繰返す。
When it is determined that the value of pointer Z is smaller than the value of Zmax, the value of pointer Z is updated by "+1" in step D09, and then the process returns to step D07, where the next AC component is calculated by zigzag scanning. The various processes for encoding are repeated.

【0061】上記ステップD13でポインタZがEOB
レジスタ19に保持される値と等しいと判断した場合、
それ以降の高周波側のAC成分の符号化は行わないため
、ステップD15に進んで1ビットのコード“1”を符
号化データとしてQコーダ5へ出力する。
[0061] In step D13 above, pointer Z reaches EOB.
If it is determined that the value is equal to the value held in register 19,
Since the subsequent AC components on the high frequency side are not encoded, the process proceeds to step D15, where a 1-bit code "1" is output to the Q coder 5 as encoded data.

【0062】そして、ステップD20で次のブロックの
AC成分の符号化に備えてEOBレジスタ19に保持さ
れるEOBの値をEOBLレジスタ20に転送設定した
後に、ステップD21で1ブロックライン分のAC成分
の符号化をすべて終えたか否かを判断し、終えていない
場合は再び上記ステップD03からの処理を繰返す。
Then, in step D20, the EOB value held in the EOB register 19 is transferred and set to the EOBL register 20 in preparation for encoding the AC component of the next block, and then in step D21, the AC component for one block line is set. It is determined whether or not all encoding has been completed, and if not, the processing from step D03 is repeated again.

【0063】上記ステップD06でポインタZがEOB
の値より大きいと判断した場合は、それ以上の高周波側
のAC成分の符号化は行わないため、上記ステップD2
0に進む。
[0063] In step D06 above, pointer Z reaches EOB.
If it is determined that the value is larger than the value of
Go to 0.

【0064】また、上記ステップD07でPREVが“
0”であると判断した場合は、次にステップD08でb
inカウンタ22に「4」を設定した後、次に上記ステ
ップD16に進む。
[0064] Also, in step D07 above, PREV is “
If it is determined that the value is 0'', then in step D08
After setting the in counter 22 to "4", the process then proceeds to step D16.

【0065】なお、上記ステップD05,D19ではZ
min ,Zmax の値としてブロック前半の1順目
の「1」「34」を用いたが、2順目であればこれらZ
min ,Zmax の値はそれぞれ「35」「63」
となる。
[0065] In steps D05 and D19 above, Z
As the values of min and Zmax, we used "1" and "34" in the first order of the block, but in the second order, these Z
The values of min and Zmax are “35” and “63” respectively.
becomes.

【0066】そして、上記ステップD21で1ブロック
ライン分のAC成分の符号化をすべて終えたと判断した
時点でこのサブルーチンを終了し、上記図9のメインル
ーチンに復帰する。
When it is determined in step D21 that all AC components for one block line have been encoded, this subroutine is terminated and the process returns to the main routine shown in FIG. 9.

【0067】次に図14により上記図12のステップD
18の個々のAC成分の符号化のサブルーチンについて
説明する。
Next, according to FIG. 14, step D of FIG.
A subroutine for encoding 18 individual AC components will now be described.

【0068】その処理当初にはステップF01でTカウ
ンタ15に格納されているAC成分が「0」であるか否
かをTコンパレータ16に読出して判断する。「0」で
ある場合、次にステップF09に進んでPREVを“0
”に設定した後に、ステップF10で1ビットのコード
“0”を符号化データとしてQコーダ5へ出力させ、こ
の処理を終了する。
At the beginning of the process, it is determined in step F01 whether or not the AC component stored in the T counter 15 is "0" by reading it to the T comparator 16. If it is “0”, then proceed to step F09 and set PREV to “0”.
”, in step F10, a 1-bit code “0” is outputted to the Q coder 5 as encoded data, and this process ends.

【0069】また、ステップF01でTコンパレータ1
6に読出したAC成分の値が「0」でないと判断した場
合には、次にステップF02で1ビットのコード“1”
を符号化データとしてQコーダ5へ出力させると共に、
PREVに“1”を設定する。そして、続くステップF
03でTコンパレータ16に読出したAC成分の値がマ
イナスであるか否かを判断する。
Furthermore, in step F01, T comparator 1
If it is determined that the value of the AC component read in step F02 is not "0", then a 1-bit code "1" is set in step F02.
is output to the Q coder 5 as encoded data, and
Set PREV to “1”. And then the next step F
At step 03, it is determined whether the value of the AC component read to the T comparator 16 is negative.

【0070】マイナスである場合は、ステップF04で
さらに1ビットのコード“1”を符号化データとしてQ
コーダ5へ出力すると共に、Tコンパレータ16の値に
「−1」を乗算してプラスの値に反転させる。また、ス
テップF03でTコンパレータ16に読出したAC成分
の値がマイナスではなくプラスであると判断した場合は
、次にステップF08でコード“0”を符号化データと
してQコーダ5へ出力させる。
If it is negative, in step F04, 1 bit of code “1” is added as encoded data to Q.
At the same time as outputting it to the coder 5, the value of the T comparator 16 is multiplied by "-1" and inverted to a positive value. If it is determined in step F03 that the value of the AC component read to the T comparator 16 is positive rather than negative, then in step F08 the code "0" is output to the Q coder 5 as encoded data.

【0071】ステップF04あるいはF08の処理後、
ステップF05でTカウンタ15に読出したAC成分の
値を「−1」更新設定すると共に、binカウンタ22
を「+1」更新設定し、続けてステップF06でこの更
新設定したTカウンタ15の値が「0」であるか否かを
判断する。
After processing step F04 or F08,
At step F05, the value of the AC component read out to the T counter 15 is updated to "-1", and the bin counter 22
is updated by "+1", and then in step F06 it is determined whether the updated value of the T counter 15 is "0" or not.

【0072】Tコンパレータ16の値が「0」ではない
と判断した場合に、次にステップF07で1ビットのコ
ード“1”を符号化データとしてQコーダ5へ出力させ
ると共に、binカウンタ22を「+1」更新設定し、
再びステップF06からの処理を繰返し実行する。
If it is determined that the value of the T comparator 16 is not "0", then in step F07, a 1-bit code "1" is outputted as encoded data to the Q coder 5, and the bin counter 22 is set to "0". +1” update setting,
The process from step F06 is repeated again.

【0073】こうしてTコンパレータ16の値が「0」
であると判断した時点で次に上記ステップF10に進ん
で1ビットのコード“0”を符号化データとしてQコー
ダ5へ出力させ、この処理を終了する。
[0073] Thus, the value of T comparator 16 becomes "0".
When it is determined that this is the case, the process proceeds to step F10, where the 1-bit code "0" is outputted as encoded data to the Q coder 5, and this process ends.

【0074】次に図15により復号化のメインルーチン
を示す。
Next, FIG. 15 shows the main routine of decoding.

【0075】その処理当初には、まずステップG01で
各回路を初期化する。その後、ステップG02で後述す
るサブルーチンによりQコーダ5から送られてくる1ブ
ロックライン分の復号化データの各DC成分を復号化す
る。 続くステップG03で1画面分が終了したと判断される
まで記憶装置6から読出され、Qコーダ5を介してブロ
ックラインメモリ13に格納される1ブロックライン分
の画像データを順次書換えて上記ステップG02,G0
3の処理を繰返し実行し、1画面分が終了したと判断さ
れたら次はステップG04に進み、以後輝度信号Yと色
差信号R−Y、色差信号B−Yの3色分が終了したと判
断する。 以後、3色分が終了したと判断するまで上記ステップG
02〜G04の処理を繰返して実行する。
At the beginning of the process, each circuit is first initialized in step G01. Thereafter, in step G02, each DC component of the decoded data for one block line sent from the Q coder 5 is decoded by a subroutine to be described later. The image data for one block line read from the storage device 6 and stored in the block line memory 13 via the Q coder 5 is sequentially rewritten until it is determined that one screen has been completed in the following step G02. ,G0
The process in step 3 is repeatedly executed, and when it is determined that one screen has been completed, the process proceeds to step G04, after which it is determined that three colors of the luminance signal Y, color difference signal R-Y, and color difference signal B-Y have been completed. do. From then on, repeat step G until it is determined that three colors have been completed.
The processes from 02 to G04 are executed repeatedly.

【0076】その後、ステップG05で後述するサブル
ーチンにより1ブロックライン分の画像データのAC成
分の低周波側の前半について復号化する。続くステップ
G06で1画面分が終了したと判断されるまでブロック
ラインメモリ13に格納される1ブロックライン分の画
像データを順次書換えてこのステップG05の処理を繰
返し実行し、1画面分が終了したと判断されたら次は輝
度信号Yと色差信号R−Y、色差信号B−Yの3色分が
終了したと判断されるまで上記ステップG05〜G07
の処理を繰返して実行する。さらにステップG07で3
色分が終了したと判断されたら次はステップG08でA
C成分の高周波側の後半が終了したと判断されるまで上
記ステップG05〜G08の処理を繰返して実行する。
Thereafter, in step G05, the first half of the low frequency side of the AC component of the image data for one block line is decoded by a subroutine to be described later. The image data for one block line stored in the block line memory 13 is sequentially rewritten and the process of step G05 is repeatedly executed until it is determined in the following step G06 that one screen has been completed. When it is determined that the luminance signal Y, the color difference signal R-Y, and the color difference signal B-Y are completed, the steps G05 to G07 are performed until it is determined that the three colors have been completed.
Repeat the process. Furthermore, in step G07, 3
When it is determined that color separation is completed, the next step is A at step G08.
The processes of steps G05 to G08 are repeated until it is determined that the second half of the high frequency side of the C component is completed.

【0077】そして、ステップG08でAC成分の高周
波側の後半も終了したと判断されると、以上でカラーの
画像データ1画面分に対する復号化を終了する。
When it is determined in step G08 that the second half of the high frequency side of the AC component has also been completed, the decoding for one screen of color image data is completed.

【0078】図16は上記ステップG02の1ブロック
ライン分の画像データの各DC成分の復号化を示すサブ
ルーチンである。その処理当初にはステップH01でブ
ロックラインメモリ13に格納されている8ライン分(
=1ブロックライン分)の画像データを後述するサブル
ーチンにより復号化する。その後、ステップH02で上
記図10のステップB02の処理とまったく逆のプロセ
スで加算によりDC成分の平面差分Dを復号する。そし
て、復号した平面差分Dをブロックラインメモリ13に
格納し、続くステップH04で1ブロックライン分が終
了したか否か判断する。以後、1ブロックライン分が終
了したと判断するまで上記ステップH01〜H04の処
理を繰返して実行し、終了したと判断したら次にステッ
プH05でブロックラインメモリ13に格納した1ブロ
ックライン分のDC成分のデータを後述するサブルーチ
ンによりブロックラインメモリ13からブロックライン
メモリ3へ出力し、以上でこのサブルーチンを終えて上
記図15のメインルーチンに復帰する。
FIG. 16 is a subroutine showing the decoding of each DC component of the image data for one block line in step G02. At the beginning of the process, 8 lines (
= 1 block line) image data is decoded by a subroutine described later. Thereafter, in step H02, the plane difference D of the DC component is decoded by addition in a process completely opposite to that of step B02 in FIG. 10 above. Then, the decoded plane difference D is stored in the block line memory 13, and in the subsequent step H04 it is determined whether one block line has been completed. Thereafter, the processes of steps H01 to H04 are repeated until it is determined that one block line has been completed, and when it is determined that one block line has been completed, the next step H05 is to execute the DC component for one block line stored in the block line memory 13. The data is output from the block line memory 13 to the block line memory 3 by a subroutine to be described later, and this subroutine is thus completed and the process returns to the main routine shown in FIG. 15.

【0079】図20は上記ステップH05やその他、符
号化、復号化のいずれでも多用されるブロックラインメ
モリ13からの1ブロックライン分の画像データの出力
処理を示すサブルーチンである。
FIG. 20 is a subroutine showing output processing of one block line worth of image data from the block line memory 13, which is frequently used in both encoding and decoding, in addition to step H05 described above.

【0080】その処理当初には、ステップL01でブロ
ックラインメモリ13のアドレス指定を行なうブロック
ラインメモリアドレス生成部12を初期化する。次いで
ステップL02でこのブロックラインメモリアドレス生
成部12のアドレス指定により1ライン分の画像データ
をブロックラインメモリ13から読出し、ブロックライ
ンメモリ3へ出力する。そして、ステップL03で1ブ
ロックライン分すなわち8ライン分の出力を終えたか否
か判断し、終えると判断されるまで上記ステップL02
,L03の処理を8ライン分繰返して実行してこのサブ
ルーチンを終了する。
At the beginning of the process, the block line memory address generation unit 12 which specifies the address of the block line memory 13 is initialized in step L01. Next, in step L02, one line of image data is read out from the block line memory 13 according to the address specification of the block line memory address generation section 12, and outputted to the block line memory 3. Then, in step L03, it is determined whether or not the output for one block line, that is, eight lines, has been completed.
, L03 are repeated for eight lines, and this subroutine ends.

【0081】続いて図17により上記図15のステップ
G05の1ブロックライン分の画像データの各AC成分
の復号化のサブルーチンを説明する。
Next, with reference to FIG. 17, a subroutine for decoding each AC component of image data for one block line in step G05 of FIG. 15 will be explained.

【0082】この復号化の動作は基本的に図12の符号
化の動作に対応してその逆の動作を行なうものである。
This decoding operation basically corresponds to the encoding operation shown in FIG. 12 and is the opposite thereof.

【0083】その処理当初にはステップI01で1ブロ
ックラインの先頭のブロックに対する処理のために前ブ
ロックのEOBの値であるEOBLを記憶するEOBL
レジスタ20に仮の数値「63」を設定する。
At the beginning of the process, in step I01, the EOBL which is the value of the EOB of the previous block is stored in order to process the first block of one block line.
A temporary numerical value "63" is set in the register 20.

【0084】次いでステップI02でジグザグスキャン
時のポインタZの前位置を示すPREVに“1”を設定
し、ステップI03でEOBRAM18から当該ブロッ
クのEOBを読出し、EOBレジスタ19に設定する。 次のステップI04でポインタZとして、ここではまず
1順目のZmin の値「1」を設定し、ステップI0
5でポインタZがEOBレジスタ19のEOBの値より
大きいか否かを判断する。
Next, in step I02, PREV indicating the previous position of pointer Z during zigzag scanning is set to "1", and in step I03, the EOB of the block in question is read from the EOBRAM 18 and set in the EOB register 19. In the next step I04, the value of Zmin in the first order is set to "1" as the pointer Z, and then in step I0
5, it is determined whether the pointer Z is larger than the EOB value of the EOB register 19.

【0085】ここでポインタZがEOBの値より大きく
ないと判断すると次にステップI06に進み、PREV
が“0”であるか否かを判断する。PREVが“0”で
はなく“1”であると判断した場合は、次にステップI
09でbinカウンタ22に「0」を設定した後、ステ
ップI10でポインタZがEOBLレジスタ20に保持
される値より小さいか否か判断する。ポインタZがEO
BLレジスタ20に保持される値より大きい場合、次に
ステップI11でbinカウンタ22に「1」を設定す
る。また、ポインタZがEOBLレジスタ20に保持さ
れる値より小さい場合は、このステップI11の処理を
省略する。
If it is determined that pointer Z is not larger than the value of EOB, the process proceeds to step I06, and PREV
It is determined whether or not is "0". If it is determined that PREV is “1” instead of “0”, then step I
After setting the bin counter 22 to "0" in step I10, it is determined whether the pointer Z is smaller than the value held in the EOBL register 20. Pointer Z is EO
If it is larger than the value held in the BL register 20, then in step I11 the bin counter 22 is set to "1". Furthermore, if the pointer Z is smaller than the value held in the EOBL register 20, the process of step I11 is omitted.

【0086】ステップI11あるいはステップI10の
処理の後、ステップI12でbinの値に応じて復号化
データに対する復号化を行ない、その後にステップI1
3で復号化して得られたDの値が「0」であるか否かを
判断する。「0」と判断した場合、次にステップI14
でbinカウンタ22に「2」を設定してステップI1
7に進む。
After the processing in step I11 or step I10, decoding is performed on the decoded data according to the value of bin in step I12, and then step I1
It is determined whether the value of D obtained by decoding in step 3 is "0". If it is determined to be "0", then step I14
Set "2" to the bin counter 22 and proceed to step I1.
Proceed to step 7.

【0087】ステップI17では、当該AC成分を後述
するサブルーチンにより復号化する。復号化後、得られ
たAC成分をステップI18でブロックラインメモリ1
3に格納し、続くステップI19でポインタZの値がZ
max の値、1順目では「34」、より小さいか否か
、すなわち、ポインタZの更新の最終値に至ったか否か
を判断する。
In step I17, the AC component is decoded by a subroutine to be described later. After decoding, the obtained AC component is stored in block line memory 1 in step I18.
3, and in the subsequent step I19, the value of pointer Z becomes Z.
It is determined whether the value of max is smaller than "34" in the first order, that is, whether the final value of the update of pointer Z has been reached.

【0088】ポインタZの値がZmax の値より小さ
いと判断されると、次にステップI08でポインタZの
値を「+1」更新設定した後に、再びステップI06に
至り、ジグザグスキャンによる次のAC成分の復号化の
ための諸処理を繰返す。
If it is determined that the value of pointer Z is smaller than the value of Zmax, then in step I08, the value of pointer Z is updated by "+1", and then the process returns to step I06, where the next AC component is calculated by zigzag scanning. The various processes for decoding are repeated.

【0089】上記ステップI13でDの値が「0」では
ないと判断した場合、それ以降の高周波側のAC成分の
復号化は行わないものとし、ステップI16に進んでポ
インタZの値をEOBRAM18とEOBLレジスタ2
0の双方に設定する。
If it is determined in step I13 that the value of D is not "0", the AC component on the high frequency side is not decoded after that, and the process proceeds to step I16, where the value of pointer Z is stored in EOBRAM18. EOBL register 2
Set both to 0.

【0090】そして、ステップI21で1ブロックライ
ン分のAC成分の復号化をすべて終えたか否かを判断し
、終えていない場合は再び上記ステップI02からの処
理を繰返す。
[0090] Then, in step I21, it is determined whether decoding of all AC components for one block line has been completed, and if not, the processing from step I02 is repeated.

【0091】上記ステップI05でポインタZがEOB
レジスタ19の値より大きいと判断した場合は、それ以
上の高周波側のAC成分の復号化は行わわないので、次
にステップI15で次のAC成分の復号化のためにEO
Bレジスタ19の値をEOBLレジスタ20に転送設定
した後、上記ステップI21に進む。
[0091] In step I05 above, pointer Z reaches EOB.
If it is determined that the value is larger than the value in register 19, no further decoding of the AC component on the high frequency side is performed, so in step I15, the EO is used to decode the next AC component.
After transferring and setting the value of the B register 19 to the EOBL register 20, the process proceeds to step I21.

【0092】また、上記ステップI06でPREVが“
0”であると判断した場合は、次にステップI07でb
inカウンタ22に「4」を設定した後、上記ステップ
I17に進む。
[0092] Also, in step I06 above, PREV is “
If it is determined that the value is 0", then in step I07
After setting the in counter 22 to "4", the process proceeds to step I17.

【0093】なお、上記ステップI04,I19ではZ
min ,Zmax の値としてブロック前半の1順目
の「1」「34」を用いたが、2順目であればこれらZ
min ,Zmax の値はそれぞれ「35」「63」
となる。
[0093] In steps I04 and I19 above, Z
As the values of min and Zmax, we used "1" and "34" in the first order of the block, but in the second order, these Z
The values of min and Zmax are “35” and “63” respectively.
becomes.

【0094】そして、上記ステップI21で1ブロック
ライン分のAC成分の復号化をすべて終えたと判断した
時点で、次にステップI22で復号化された1ブロック
ライン分のAC成分をブロックラインメモリ13から上
記図20で示したサブルーチンに従ってブロックライン
メモリ3へ出力させ、以上でこのサブルーチンを終了し
、上記図15のメインルーチンに復帰する。
[0094] Then, when it is determined that all the AC components for one block line have been decoded in step I21, the AC components for one block line decoded in step I22 are transferred from the block line memory 13. The output is made to the block line memory 3 according to the subroutine shown in FIG. 20, and this subroutine is thus ended and the process returns to the main routine shown in FIG. 15.

【0095】次に図18により上記図17のステップI
17の個々のAC成分の復号化のサブルーチンについて
説明する。
Next, according to FIG. 18, step I of FIG.
A subroutine for decoding 17 individual AC components will now be described.

【0096】その処理当初にはステップJ01でTカウ
ンタ15に初期値「0」を設定し、このカウント値に従
って初めのコードを復号化する。次のステップJ02で
この復号化して得られた先頭のコードDの値が「0」で
あるか否かをTコンパレータ16に読出して判断する。 「0」である場合、次にステップJ10に進んでPRE
Vを“0”に設定してこの処理を終了する。
At the beginning of the process, an initial value "0" is set in the T counter 15 in step J01, and the first code is decoded according to this count value. In the next step J02, it is determined whether the value of the first code D obtained by this decoding is "0" or not by reading it to the T comparator 16. If it is "0", then proceed to step J10 and perform the PRE
V is set to "0" and this process ends.

【0097】また、ステップJ02でTコンパレータ1
6に読出したコードDの値が“0”でないと判断した場
合には、次にステップJ03で続く復号化データを復号
化した後に、ステップJ04で得られたDの値をプラス
あるいはマイナスの符号として設定すると共に、bin
カウンタ22を「+1」更新設定する。
[0097] Also, in step J02, T comparator 1
If it is determined that the value of the code D read in Step 6 is not "0", the subsequent decoded data is decoded in Step J03, and then the value of D obtained in Step J04 is changed to a plus or minus sign. and set it as bin
The counter 22 is updated by "+1".

【0098】その後、ステップJ05でTカウンタ15
を「+1」更新設定すると共にこの更新設定した値に従
って続く復号化データを復号化し、次のステップJ06
で得られたDの値が「0」であるか否か判断する。「0
」でない場合は、さらに上記ステップJ05,J06の
処理を繰返してTカウンタ15を更新設定しながら復号
化をDの値が「0」となるまで続行する。
After that, in step J05, the T counter 15
"+1" is updated and the following decrypted data is decrypted according to this updated value, and the next step J06
It is determined whether the value of D obtained in is "0" or not. "0
'', the processes of steps J05 and J06 are repeated to continue decoding while updating the T counter 15 until the value of D becomes ``0''.

【0099】Dの値が「0」となると、その後にステッ
プJ07で上記ステップJ04で設定した符号が「1」
であるか否か、すなわち、マイナスの符号であるか否か
を判断し、マイナスであると判断した場合のみステップ
J08でTコンパレータ16の値に「−1」を乗算して
プラスの値に反転させる。
When the value of D becomes "0", the code set in step J04 above is changed to "1" in step J07.
In other words, it is determined whether or not it has a negative sign, and only when it is determined that it is negative, the value of the T comparator 16 is multiplied by "-1" in step J08 and inverted to a positive value. let

【0100】その後、ステップJ09でPREVとして
“1”を設定し、以上でこのサブルーチンを終了して上
記図17に復帰する。
Thereafter, in step J09, PREV is set to "1", and this subroutine is thus completed and the process returns to FIG. 17.

【0101】なお、上記実施例では画像データに対する
直交変換として具体的には離散コサイン変換(DCT)
により変換する例を用いたが、これに限らず、離散コサ
イン変換以外の直交変換で得た画像データに対して実施
することも可能なことはもちろんである。
[0101] In the above embodiment, specifically, discrete cosine transform (DCT) is used as the orthogonal transform for image data.
Although an example in which the transformation is performed using the following is used, the present invention is not limited to this, and it is of course possible to perform the transformation on image data obtained by orthogonal transformation other than discrete cosine transformation.

【0102】[0102]

【発明の効果】以上詳記した如く本発明によれば、ブロ
ック分割され直交変換されたデータを符号化するための
符号化器と該符号化器の特性に合わせて符号化のための
前処理を行なうインタフェースを備えた符号化装置にお
いて、上記インタフェースに、ブロックラインを記憶す
るブロックラインメモリと、このブロックラインメモリ
に記憶された直流成分値のブロック間の差分を算出し所
定の規則で符号化する直流成分符号化回路と、上記ブロ
ックラインメモリに記憶された交流成分のブロック終端
情報を所定の規則で符号化するブロック終端符号化回路
と、上記ブロック終端符号化回路で得られるブロック終
端情報を基にブロックラインメモリに記憶された交流成
分値を所定の規則で符号化する交流成分符号化回路とを
備え、これらの各回路をマイクロプログラムを記憶した
マイクロコントローラによって制御するようにしたので
、マイクロプログラム動作によるマイクロコントローラ
で各符号化回路を制御させることによりインターフェイ
ス部の回路を小規模化し、かつ処理速度を向上させるこ
とが可能な符号化装置を提供することができる。
As described in detail above, the present invention provides an encoder for encoding block-divided and orthogonally transformed data, and pre-processing for encoding in accordance with the characteristics of the encoder. In an encoding device equipped with an interface, the interface has a block line memory for storing block lines, and a difference between blocks of DC component values stored in this block line memory is calculated and encoded according to a predetermined rule. a DC component encoding circuit that encodes the block termination information of the AC component stored in the block line memory according to a predetermined rule; and a block termination encoding circuit that encodes the block termination information obtained by the block termination encoding circuit. Based on the AC component encoding circuit that encodes the AC component values stored in the block line memory according to predetermined rules, each of these circuits is controlled by a microcontroller that stores a microprogram. By controlling each encoding circuit with a microcontroller using a program operation, it is possible to provide an encoding device that can reduce the size of the circuit of the interface section and improve the processing speed.

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

【図1】本発明の一実施例に係る画像圧縮装置全体の回
路構成を示すブロック図。
FIG. 1 is a block diagram showing the overall circuit configuration of an image compression device according to an embodiment of the present invention.

【図2】図1で取扱われるカラー画像データの構成を示
す図。
FIG. 2 is a diagram showing the structure of color image data handled in FIG. 1;

【図3】図1で行われる離散コサイン変換及び量子化を
説明する図。
FIG. 3 is a diagram illustrating discrete cosine transformation and quantization performed in FIG. 1;

【図4】図1のQインタフェースで行われる直流成分の
符号化を説明する図。
FIG. 4 is a diagram illustrating encoding of a DC component performed in the Q interface of FIG. 1;

【図5】図1のQインタフェースで行われる交流成分の
符号化を説明する図。
FIG. 5 is a diagram illustrating encoding of AC components performed in the Q interface of FIG. 1;

【図6】図1のQインタフェース内の回路構成を示すブ
ロック図。
FIG. 6 is a block diagram showing a circuit configuration within the Q interface of FIG. 1.

【図7】図6のマイクロコントローラ内で取扱われる命
令の構成を示す図。
FIG. 7 is a diagram showing the structure of instructions handled within the microcontroller of FIG. 6;

【図8】図6のマイクロコントローラ内の回路構成を示
すブロック図。
FIG. 8 is a block diagram showing a circuit configuration within the microcontroller of FIG. 6.

【図9】符号化のメインルーチンを示すフローチャート
FIG. 9 is a flowchart showing the main routine of encoding.

【図10】図9の直流成分1ブロックライン分の符号化
処理のサブルーチンを示すフローチャート。
10 is a flowchart showing a subroutine of encoding processing for one block line of DC component in FIG. 9;

【図11】図9の交流成分の終端位置検出処理のサブル
ーチンを示すフローチャート。
FIG. 11 is a flowchart showing a subroutine of AC component terminal position detection processing in FIG. 9;

【図12】図9の交流成分1ブロックライン分の符号化
処理のサブルーチンを示すフローチャート。
FIG. 12 is a flowchart showing a subroutine of encoding processing for one block line of AC components in FIG. 9;

【図13】図10の直流成分1ブロック分の符号化処理
のサブルーチンを示すフローチャート。
FIG. 13 is a flowchart showing a subroutine of encoding processing for one block of DC components in FIG. 10;

【図14】図12の交流成分1ブロック分の符号化処理
のサブルーチンを示すフローチャート。
FIG. 14 is a flowchart showing a subroutine of encoding processing for one block of AC components in FIG. 12;

【図15】復号化のメインルーチンを示すフローチャー
ト。
FIG. 15 is a flowchart showing the main routine of decoding.

【図16】図15の直流成分1ブロックライン分の復号
化処理のサブルーチンを示すフローチャート。
FIG. 16 is a flowchart showing a subroutine of decoding processing for one block line of DC component in FIG. 15;

【図17】図15の交流成分1ブロックライン分の復号
化処理のサブルーチンを示すフローチャート。
FIG. 17 is a flowchart showing a subroutine of decoding processing for one block line of AC components in FIG. 15;

【図18】図17の交流成分1ブロック分の復号化処理
のサブルーチンを示すフローチャート。
FIG. 18 is a flowchart showing a subroutine of decoding processing for one block of AC components in FIG. 17;

【図19】ブロックラインメモリへのデータ格納処理の
サブルーチンを示すフローチャート。
FIG. 19 is a flowchart showing a subroutine of data storage processing in a block line memory.

【図20】ブロックラインメモリからのデータ出力処理
のサブルーチンを示すフローチャート。
FIG. 20 is a flowchart showing a subroutine of data output processing from a block line memory.

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

1…DCT回路、2…量子化回路、3…ブロックライン
メモリ、4…Qインタフェース、5…Qコーダ、6…記
憶装置、11…マイクロコントローラ、12…ブロック
ラインメモリアドレス生成部、13…ブロックラインメ
モリ、14…DC平面差分演算器、15…Tカウンタ、
16…Tコンパレータ、17…EOBRAMアドレス生
成部、18…EOBRAM、19…EOBレジスタ、2
0…EOBLレジスタ、21…Zコンパレータ、22…
binカウンタ、23…COLカウンタ、31…マイク
ロプログラムROM、32…命令デコーダ、33…アド
レスラッチ回路、34…スタック回路、35…制御ラッ
チ回路、36…ジャッジセレクタ。
DESCRIPTION OF SYMBOLS 1...DCT circuit, 2...Quantization circuit, 3...Block line memory, 4...Q interface, 5...Q coder, 6...Storage device, 11...Microcontroller, 12...Block line memory address generation part, 13...Block line Memory, 14...DC plane difference calculator, 15...T counter,
16...T comparator, 17...EOBRAM address generation unit, 18...EOBRAM, 19...EOB register, 2
0...EOBL register, 21...Z comparator, 22...
bin counter, 23...COL counter, 31...micro program ROM, 32...instruction decoder, 33...address latch circuit, 34...stack circuit, 35...control latch circuit, 36...judge selector.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  ブロック分割され直交変換されたデー
タを符号化するための符号化器と該符号化器の特性に合
わせて符号化のための前処理を行なうインタフェースを
備えた符号化装置において、上記インタフェースは、ブ
ロックラインを記憶するブロックラインメモリと、この
ブロックラインメモリに記憶された直流成分値のブロッ
ク間の差分を算出し所定の規則で符号化する直流成分符
号化回路と、上記ブロックラインメモリに記憶された交
流成分のブロック終端情報を所定の規則で符号化するブ
ロック終端符号化回路と、上記ブロック終端符号化回路
で得られるブロック終端情報を基に上記ブロックライン
メモリに記憶された交流成分値を所定の規則で符号化す
る交流成分符号化回路と、マイクロプログラムを記憶し
、上記直流成分符号化回路、ブロック終端符号化回路及
び交流成分符号化回路を制御するマイクロコントローラ
とを具備したことを特徴とする符号化装置。
1. An encoding device comprising an encoder for encoding block-divided and orthogonally transformed data, and an interface for performing preprocessing for encoding in accordance with the characteristics of the encoder. The above interface includes a block line memory that stores block lines, a DC component encoding circuit that calculates the difference between blocks of DC component values stored in this block line memory and encodes it according to a predetermined rule, and a DC component encoding circuit that stores the block lines. a block end encoding circuit that encodes block end information of the AC component stored in the memory according to a predetermined rule; and a block end encoder that encodes the block end information of the AC component stored in the memory based on the block end information obtained by the block end encoder circuit. It is equipped with an AC component encoding circuit that encodes component values according to predetermined rules, and a microcontroller that stores a microprogram and controls the DC component encoding circuit, the block end encoding circuit, and the AC component encoding circuit. An encoding device characterized by:
JP2406840A 1990-12-26 1990-12-26 Encoder Pending JPH04223773A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2406840A JPH04223773A (en) 1990-12-26 1990-12-26 Encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2406840A JPH04223773A (en) 1990-12-26 1990-12-26 Encoder

Publications (1)

Publication Number Publication Date
JPH04223773A true JPH04223773A (en) 1992-08-13

Family

ID=18516463

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2406840A Pending JPH04223773A (en) 1990-12-26 1990-12-26 Encoder

Country Status (1)

Country Link
JP (1) JPH04223773A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003088675A1 (en) * 2002-04-15 2003-10-23 Matsushita Electric Industrial Co., Ltd. Image encoding method and image decoding method

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003088675A1 (en) * 2002-04-15 2003-10-23 Matsushita Electric Industrial Co., Ltd. Image encoding method and image decoding method
US7095896B2 (en) 2002-04-15 2006-08-22 Matsushita Electric Industrial Co., Ltd. Image encoding method and image decoding method
CN1293762C (en) * 2002-04-15 2007-01-03 松下电器产业株式会社 Image encoding method and image decoding method
US7184598B2 (en) 2002-04-15 2007-02-27 Matsushita Electric Industrial Co., Ltd. Picture coding method and picture decoding method
US7305134B2 (en) 2002-04-15 2007-12-04 Matsushita Electric Industrial Co., Ltd. Picture coding method and picture decoding method
US7308149B2 (en) 2002-04-15 2007-12-11 Matsushita Electric Industrial Co., Ltd. Picture coding method and picture decoding method
US7308144B2 (en) 2002-04-15 2007-12-11 Matsushita Electric Industrial Co., Ltd. Picture coding method and picture decoding method
US7308143B2 (en) 2002-04-15 2007-12-11 Matsushita Electric Industrial Co., Ltd. Picture coding method and picture decoding method
US7693340B2 (en) 2002-04-15 2010-04-06 Panasonic Corporation Picture coding method and picture decoding method
US7697770B2 (en) 2002-04-15 2010-04-13 Panasonic Corporation Picture coding method and picture decoding method
US7769238B2 (en) 2002-04-15 2010-08-03 Panasonic Corporation Picture coding method and picture decoding method
US8139878B2 (en) 2002-04-15 2012-03-20 Panasonic Corporation Picture coding method and picture decoding method
US8265403B2 (en) 2002-04-15 2012-09-11 Panasonic Corporation Picture coding method and picture decoding method
US8290286B2 (en) 2002-04-15 2012-10-16 Panasonic Corporation Picture coding method and picture decoding method
US8526748B2 (en) 2002-04-15 2013-09-03 Panasonic Corporation Picture coding method and picture decoding method
US8867855B2 (en) 2002-04-15 2014-10-21 Panasonic Intellectual Property Corporation Of America Picture coding method and picture decoding method

Similar Documents

Publication Publication Date Title
US7869502B2 (en) Video coder providing implicit coefficient prediction and scan adaptation for image coding and intra coding of video
JP5990790B2 (en) Decoding method, computer readable medium storing instructions for decoding, decoding system and decoder
EP0665512B1 (en) An image processing method and apparatus
US5719961A (en) Adaptive technique for encoder and decoder signal transformation
JP2000316153A (en) Image decoding method
US6005622A (en) Video coder providing implicit or explicit prediction for image coding and intra coding of video
JPH04223773A (en) Encoder
EP1684530A2 (en) Video coder providing implicit coefficient prediction and scan adaption for image coding and intra coding of video
US7760951B2 (en) Method and system for pipelined processing in an integrated embedded image and video accelerator
JPH05316359A (en) Picture data coder
JPH0654196A (en) Image processor
JPH02131671A (en) Picture data compression method
JP3347488B2 (en) Image processing apparatus and method
US20070192393A1 (en) Method and system for hardware and software shareable DCT/IDCT control interface
JPH0556270A (en) Reverse quantizing method and image data restoring device
JPH0310486A (en) Moving picture encoder
JPH08316846A (en) Image coder, image decoder, image coding method and image decoding method
JP2856268B2 (en) Image data restoration device
Kuroki et al. Redesigning of JPEG statistical model in the lossy mode fitting distribution of DCT coefficients
JPH0730889A (en) Picture data encoder
JPH05268591A (en) Picture coding method and picture coder
JPH06113279A (en) Picture compressor
JPH04220082A (en) Method and device for picture data decoding
JPH04180356A (en) Image encoding method
KR960043913A (en) Image Compression Apparatus and Method Using Image Separation and Arithmetic Coding and Its Restoration Method