JPH10262248A - Micro controller - Google Patents

Micro controller

Info

Publication number
JPH10262248A
JPH10262248A JP6306497A JP6306497A JPH10262248A JP H10262248 A JPH10262248 A JP H10262248A JP 6306497 A JP6306497 A JP 6306497A JP 6306497 A JP6306497 A JP 6306497A JP H10262248 A JPH10262248 A JP H10262248A
Authority
JP
Japan
Prior art keywords
dct
coefficient
image data
quantization
data
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
JP6306497A
Other languages
Japanese (ja)
Inventor
Tomohiro Fukuoka
智博 福岡
Masaki Okada
雅樹 岡田
Tomonobu Miyata
知伸 宮田
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.)
Fujitsu VLSI Ltd
Fujitsu Ltd
Original Assignee
Fujitsu VLSI Ltd
Fujitsu 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 Fujitsu VLSI Ltd, Fujitsu Ltd filed Critical Fujitsu VLSI Ltd
Priority to JP6306497A priority Critical patent/JPH10262248A/en
Publication of JPH10262248A publication Critical patent/JPH10262248A/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)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a micro controller by which image data are compressed and extended inexpensively at a high speed. SOLUTION: A micro controller 2 of an image processing unit 1 that applies compression processing to image data is provided with a conversion execution means 5 that converts image data transferred via an internal bus 3 into a DCT coefficient. The conversion execution means 5 is provided with an image data storage area 6 to which image data are inputted, an intermediate value storage area 7 to which intermediate data in the conversion processing are stored, a conversion coefficient storage area 8 to which the DCT efficient is stored and together with a conversion circuit 9 that stores the intermediate data resulting from applying conversion processing to the image data in the area 6 to the area 7 and stores the DCT coefficient resulting from applying conversion processing to the intermediate data in the area 7 to the area 8. Then a data transfer means 4 transfers the DCT coefficient stored in the conversion coefficient storage area 8 during the conversion processing to the image data and transfers the image data in which the conversion processing is applied next during the conversion processing for the intermediate data to the image data storage area 6.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は静止画の画像データ
を圧縮伸長処理する画像処理装置に備えられたマイクロ
コントローラに関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a microcontroller provided in an image processing apparatus for compressing and expanding still image data.

【0002】近年、カメラやビデオ等の画像情報処理装
置はデジタル化され始めており、デジタル画像の圧縮伸
長処理は重要な基礎技術となっている。そして、画像処
理装置に備えられたマイクロコントローラにおいては、
圧縮伸長処理における処理時間の短縮が要求されてい
る。
In recent years, image information processing apparatuses such as cameras and videos have begun to be digitized, and compression / expansion processing of digital images has become an important basic technology. And in the microcontroller provided in the image processing device,
There is a demand for a reduction in processing time in the compression / decompression processing.

【0003】[0003]

【従来の技術】近年、カメラやビデオ等はデジタル化さ
れ、それらのデジタルスチルカメラ等に用いられる静止
画の圧縮伸長技術はJPEGと呼ばれ、そのJPEG処
理はソフトウェアあるいは専用ハードウェアを用いて行
われる。専用ハードウェアであるJPEGプロセッサ
は、高速にJPEG処理を行うことができるものの、か
なりの回路規模を必要とするためにカメラ等のシステム
全体のコストアップとなる。そのため、安価なシステム
においてはマイクロコントローラを備え、ソフトウェア
によりJPEG処理が行われる場合が多い。
2. Description of the Related Art In recent years, cameras and videos have been digitized, and the still image compression / expansion technology used in such digital still cameras is called JPEG. The JPEG processing is performed using software or dedicated hardware. Will be The JPEG processor, which is dedicated hardware, can perform JPEG processing at high speed, but requires a considerable circuit scale, which increases the cost of the entire system such as a camera. For this reason, inexpensive systems often include a microcontroller and perform JPEG processing by software.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、JPE
G処理は多大な演算処理あるいはメモリ操作を必要とす
るために、ソフトウェアのみによる処理では所望の速度
を得るのは困難である。例えば、デジタルスチルカメラ
等では、シャッタを押すと取り込まれた画像データはJ
PEGにより圧縮された後メモリに記憶される。そのた
め、圧縮処理に時間がかかると、次にシャッタが押せる
ようになるまでに長時間(例えば5乃至10秒程度)か
かり、待ちきれなくなってしまう。
However, the JPE
Since the G processing requires a large amount of arithmetic processing or memory operation, it is difficult to obtain a desired speed by processing using only software. For example, in a digital still camera or the like, when the shutter is pressed, the captured image data becomes J
After being compressed by PEG, it is stored in the memory. Therefore, if the compression process takes a long time, it takes a long time (for example, about 5 to 10 seconds) until the shutter can be pressed next time, and it becomes impossible to wait.

【0005】また、デジタルカメラには、シャッタを押
している間、連続して画像を取り込む連写モードが備え
られているものがある。その連写モードは、カラー画像
を連続してJPEGに基づいて圧縮又は伸長し、動画の
記録又は再生を行うモーションJPEG(Motion JPEG)
により行われる。この場合、圧縮・伸長処理に所定の速
度(例えば、1秒間に30フレーム)が得られないと、
必要な画像データを記録することができなかったり、動
きがぎくしゃくして見づらいものになってしまう。
[0005] Some digital cameras are provided with a continuous shooting mode for continuously capturing images while the shutter is pressed. The continuous shooting mode is a motion JPEG (Motion JPEG) that continuously compresses or decompresses color images based on JPEG and records or reproduces moving images.
It is performed by In this case, if a predetermined speed (for example, 30 frames per second) cannot be obtained in the compression / decompression processing,
Necessary image data cannot be recorded, or the movement becomes jerky and difficult to see.

【0006】本発明は上記問題点を解決するためになさ
れたものであって、その目的は安価で高速に画像データ
の圧縮伸長処理を行うことのできるマイクロコントロー
ラを提供することにある。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and has as its object to provide a microcontroller capable of performing inexpensive and high-speed compression and decompression processing of image data.

【0007】[0007]

【課題を解決するための手段】図1は本発明の原理説明
図である。即ち、画像データの圧縮処理を行う画像処理
装置1には、マイクロコントローラ2が用いられる。マ
イクロコントローラ2には、内部バス3に接続され、そ
の内部バス3を介してデータを転送するデータ転送手段
4と、内部バス3を介してデータ転送手段4により転送
される画像データに対して離散コサイン変換を施して圧
縮処理に必要なDCT係数に変換する変換実行手段5と
が備えられている。変換実行手段5には、画像データが
入力される画像データ記憶領域6と、変換処理における
中間データが格納される中間値記憶領域7と、DCT係
数が格納される変換係数記憶領域8とが備えられると共
に、画像データ記憶領域6の画像データに対して変換処
理を施した結果を中間データとして中間値記憶領域7に
格納し、中間値記憶領域7の中間データに対して変換処
理を施した結果をDCT係数として変換係数記憶領域8
に格納する変換回路9が備えられる。そして、データ転
送手段4は、画像データに対する変換処理の間に変換係
数記憶領域8に格納されたDCT係数を転送し、中間デ
ータに対する変換処理の間に画像データ記憶領域6に次
に変換処理する画像データを転送する。
FIG. 1 is a diagram illustrating the principle of the present invention. That is, the microcontroller 2 is used in the image processing apparatus 1 that performs a compression process on image data. The microcontroller 2 is connected to the internal bus 3 and transfers data via the internal bus 3. And a conversion execution unit 5 that performs cosine conversion and converts the data into DCT coefficients required for compression processing. The transformation execution means 5 includes an image data storage area 6 for inputting image data, an intermediate value storage area 7 for storing intermediate data in the conversion processing, and a transform coefficient storage area 8 for storing DCT coefficients. In addition, the result of performing the conversion process on the image data in the image data storage region 6 is stored as intermediate data in the intermediate value storage region 7, and the result of performing the conversion process on the intermediate data in the intermediate value storage region 7 As a DCT coefficient, a transform coefficient storage area 8
Is provided. The data transfer means 4 transfers the DCT coefficients stored in the transform coefficient storage area 8 during the conversion processing on the image data, and then performs the conversion processing on the image data storage area 6 during the conversion processing on the intermediate data. Transfer image data.

【0008】請求項2記載の発明は、請求項1に記載の
マイクロコントローラにおいて、前記変換実行手段は、
前記画像データに対して2次元離散コサイン変換を施す
ものであり、前記変換回路は1次元離散コサイン変換を
施すものであり、該変換回路は前記画像データ記憶領域
の画像データに対して1次元離散コサイン変換処理の結
果を前記中間データとして前記中間値記憶領域に格納
し、前記中間値記憶領域の中間データに対して1次元離
散コサイン変換の結果を前記DCT係数として前記変換
係数記憶領域に格納するようにした。
According to a second aspect of the present invention, in the microcontroller according to the first aspect, the conversion executing means includes:
The image data is subjected to a two-dimensional discrete cosine transform, and the conversion circuit is configured to perform a one-dimensional discrete cosine transform. The conversion circuit is configured to perform a one-dimensional discrete cosine transform on the image data in the image data storage area. The result of the cosine transform process is stored in the intermediate value storage area as the intermediate data, and the result of the one-dimensional discrete cosine transform on the intermediate data in the intermediate value storage area is stored in the transform coefficient storage area as the DCT coefficient. I did it.

【0009】請求項3記載の発明は、請求項1又は2に
記載のマイクロコントローラにおいて、量子化処理に用
いられる量子化係数からなる量子化テーブルが予め格納
された係数メモリと、前記量子化係数に基づいて、前記
変換係数格納領域から転送された前記DCT係数を量子
化する量子化処理手段とを備え、前記変換実行手段に
は、前記DCT係数と前記量子化係数とを比較し、その
比較結果に基づいて、前記符号データが量子化処理によ
って所定値となるか否かを予測し、前記所定値となる符
号データに対して情報を付加する量子化予測回路を備
え、前記量子化処理手段は、前記DCT係数に付加され
た情報に基づいて、該DCT係数が所定値の場合に該D
CT係数に対する量子化処理を実行しないようにした。
According to a third aspect of the present invention, in the microcontroller according to the first or second aspect, a coefficient memory in which a quantization table including quantization coefficients used for quantization processing is stored in advance, and the quantization coefficient And a quantization processing unit that quantizes the DCT coefficient transferred from the transform coefficient storage area based on the DCT coefficient. The transform execution unit compares the DCT coefficient with the quantized coefficient. A quantization prediction circuit for predicting whether or not the code data has a predetermined value by a quantization process based on a result, and adding information to the code data having the predetermined value; Is based on information added to the DCT coefficient, and when the DCT coefficient is a predetermined value, the D
The quantization processing for the CT coefficients is not executed.

【0010】請求項4記載の発明は、請求項3に記載の
マイクロコントローラにおいて、前記量子化予測回路
は、前記DCT係数を入力し、該DCT係数の最下位ビ
ットを拡張して出力するビット操作部と、前記量子化係
数格納領域に格納された量子化係数と前記ビット操作部
の出力データとを比較し、その比較結果を出力する比較
部と、前記比較結果に基づいた情報ビットを前記DCT
係数に付加して前記変換係数格納領域に格納するデータ
生成部とから構成される。
According to a fourth aspect of the present invention, in the microcontroller according to the third aspect, the quantization prediction circuit inputs the DCT coefficient, and expands and outputs the least significant bit of the DCT coefficient. Unit, a comparing unit that compares the quantized coefficient stored in the quantized coefficient storage area with the output data of the bit operation unit, and outputs a result of the comparison.
And a data generation unit for storing in the conversion coefficient storage area in addition to the coefficients.

【0011】請求項5記載の発明は、請求項1乃至4の
いずれか1項に記載のマイクロコントローラにおいて、
前記2次元のDCT係数を1次元に配列し直すジグザグ
走査方式に対応した第1のアドレス信号を生成する第1
のアドレス生成回路を備え、前記変換係数格納領域に
は、前記第1のアドレス信号に基づいて、ジグザグ走査
順に前記DCT係数が格納されるようにした。
According to a fifth aspect of the present invention, in the microcontroller according to any one of the first to fourth aspects,
A first address signal generating a first address signal corresponding to a zigzag scanning method for rearranging the two-dimensional DCT coefficients in a one-dimensional manner;
And the DCT coefficients are stored in the transform coefficient storage area in a zigzag scanning order based on the first address signal.

【0012】請求項6記載の発明は、請求項5に記載の
マイクロコントローラにおいて、前記DCT係数の算出
順の第2のアドレス信号を生成する第2のアドレス生成
回路と、前記第1のアドレス信号と前記第2のアドレス
信号とを切り替える切り替え回路とを備え、前記変換係
数格納領域には切り替えられた第1又は第2のアドレス
信号に基づいて前記DCT係数が格納されるようにし
た。
According to a sixth aspect of the present invention, in the microcontroller according to the fifth aspect, a second address generating circuit for generating a second address signal in the order of calculating the DCT coefficients, and the first address signal And a switching circuit for switching between the second address signal and the second address signal, wherein the DCT coefficient is stored in the conversion coefficient storage area based on the switched first or second address signal.

【0013】請求項7記載の発明は、請求項3乃至6の
いずれか1項に記載のマイクロコントローラにおいて、
前記係数メモリには、画像の種類に応じた複数のテーブ
ルが予め格納され、前記変換実行手段には、前記2次元
のDCT係数を複数の領域に分割し、各DCT係数とそ
のDCT係数が含まれる領域に対応して設定された閾値
とを比較し、各領域毎に前記閾値よりも大きいDCT係
数の数を記憶するテーブル判定回路を備え、前記量子化
実行手段は、各領域毎に記憶された数に基づいて前記複
数のテーブルのうちの1つを選択し、該選択したテーブ
ルを用いて前記DCT係数に対する量子化処理を実行す
るようにした。
According to a seventh aspect of the present invention, in the microcontroller according to any one of the third to sixth aspects,
The coefficient memory previously stores a plurality of tables corresponding to the type of image, and the conversion executing means divides the two-dimensional DCT coefficient into a plurality of regions, and stores each DCT coefficient and its DCT coefficient. A table determination circuit that compares a threshold value set corresponding to each region to be stored and stores the number of DCT coefficients larger than the threshold value for each region, wherein the quantization execution unit is stored for each region. One of the plurality of tables is selected based on the calculated number, and the quantization processing is performed on the DCT coefficients using the selected table.

【0014】請求項8記載の発明は、請求項7に記載の
マイクロコントローラにおいて、前記テーブル判定回路
は、 前記分割された符号データの複数の領域毎に設定
された閾値を格納する閾値レジスタと、前記入力される
符号データと、その符号データが存在する領域の閾値レ
ジスタに格納された閾値とを比較し、その比較結果に基
づいて符号データが閾値よりも大きい場合に信号を出力
する比較器と、前記複数の領域に対応して設けられ、前
記比較器からの信号に基づいてカウントアップするカウ
ンタとから構成される。
According to an eighth aspect of the present invention, in the microcontroller according to the seventh aspect, the table determination circuit comprises: a threshold register for storing a threshold set for each of a plurality of areas of the divided code data; A comparator that compares the input code data with a threshold stored in a threshold register of an area where the code data exists, and outputs a signal when the code data is larger than the threshold based on the comparison result; , Provided in correspondence with the plurality of areas, and configured to count up based on a signal from the comparator.

【0015】(作用)従って、請求項1記載の発明によ
れば、変換回路が画像データ記憶領域に入力された画像
データに対して離散コサイン変換を施した中間データを
中間値記憶領域に格納している時には、変換係数記憶領
域に対するアクセスは行われない。このとき、データ転
送手段は、変換係数記憶領域に格納されたDCT係数の
転送を行う。又、変換回路が中間値記憶領域の中間デー
タに対して離散コサイン変換を施したDCT係数を変換
係数格納領域に格納しているときには、画像データ記憶
領域に対するアクセスは行われない。このとき、データ
転送手段は、画像データ記憶領域にたいして次の画像デ
ータを格納する。従って、画像データ記憶領域又は変換
係数格納領域に対するデータの転送と、離散コサイン変
換とが並列に行われる。
According to the first aspect of the present invention, the conversion circuit stores the intermediate data obtained by performing the discrete cosine transform on the image data input to the image data storage area in the intermediate value storage area. Access to the transform coefficient storage area is not performed. At this time, the data transfer means transfers the DCT coefficients stored in the transform coefficient storage area. When the transform circuit stores the DCT coefficients obtained by performing the discrete cosine transform on the intermediate data in the intermediate value storage area in the transform coefficient storage area, the image data storage area is not accessed. At this time, the data transfer means stores the next image data in the image data storage area. Therefore, data transfer to the image data storage area or the transform coefficient storage area and the discrete cosine transform are performed in parallel.

【0016】請求項2記載の発明によれば、変換実行手
段は、画像データに対して2次元離散コサイン変換を施
すものであり、変換回路は1次元離散コサイン変換を施
すものである。そして、変換回路は画像データ記憶領域
の画像データに対して1次元離散コサイン変換処理の結
果を中間データとして中間値記憶領域に格納し、中間値
記憶領域の中間データに対して1次元離散コサイン変換
の結果をDCT係数として変換係数記憶領域に格納す
る。
According to the second aspect of the present invention, the conversion executing means performs two-dimensional discrete cosine transformation on the image data, and the conversion circuit performs one-dimensional discrete cosine transformation. Then, the conversion circuit stores the result of the one-dimensional discrete cosine transform processing on the image data in the image data storage area as intermediate data in the intermediate value storage area, and performs one-dimensional discrete cosine transform on the intermediate data in the intermediate value storage area. Is stored in the transform coefficient storage area as a DCT coefficient.

【0017】請求項3記載の発明によれば、係数メモリ
には、量子化処理に用いられる量子化係数からなる量子
化テーブルが予め格納される。量子化処理手段は、量子
化係数に基づいて、変換係数格納領域から転送されたD
CT係数を量子化する。そして、変換実行手段には、D
CT係数と量子化係数とを比較し、その比較結果に基づ
いて、符号データが量子化処理によって所定値となるか
否かを予測し、所定値となる符号データに対して情報を
付加する量子化予測回路が備えられ、量子化処理手段
は、DCT係数に付加された情報に基づいて、DCT係
数が所定値の場合にDCT係数に対する量子化処理を実
行しない。
According to the third aspect of the present invention, a quantization table including quantization coefficients used for quantization processing is stored in the coefficient memory in advance. The quantization processing means is configured to output the D transferred from the transform coefficient storage area based on the quantization coefficient.
Quantize the CT coefficients. Then, the conversion executing means includes D
A CT that compares a CT coefficient with a quantized coefficient, predicts whether or not code data has a predetermined value by a quantization process based on the comparison result, and adds information to the code data having a predetermined value. A quantization prediction circuit is provided, and the quantization processing means does not execute the quantization processing on the DCT coefficient based on the information added to the DCT coefficient when the DCT coefficient has a predetermined value.

【0018】請求項4記載の発明によれば、量子化予測
回路は、DCT係数を入力し、DCT係数の最下位ビッ
トを拡張して出力するビット操作部と、量子化係数格納
領域に格納された量子化係数とビット操作部の出力デー
タとを比較し、その比較結果を出力する比較部と、比較
結果に基づいた情報ビットをDCT係数に付加して変換
係数格納領域に格納するデータ生成部とから構成され
る。
According to the fourth aspect of the present invention, the quantization prediction circuit receives the DCT coefficient, expands the least significant bit of the DCT coefficient and outputs the result, and the quantization operation is stored in the quantization coefficient storage area. A comparison unit that compares the quantized coefficient with the output data of the bit operation unit and outputs the comparison result, and a data generation unit that adds information bits based on the comparison result to the DCT coefficient and stores the DCT coefficient in the transform coefficient storage area It is composed of

【0019】請求項5記載の発明によれば、2次元のD
CT係数を1次元に配列し直すジグザグ走査方式に対応
した第1のアドレス信号を生成する第1のアドレス生成
回路が備えられ、変換係数格納領域には、第1のアドレ
ス信号に基づいて、ジグザグ走査順にDCT係数が格納
される。
According to the fifth aspect of the present invention, the two-dimensional D
A first address generation circuit for generating a first address signal corresponding to a zigzag scanning method in which CT coefficients are arranged one-dimensionally is provided, and a zigzag based on the first address signal is provided in a conversion coefficient storage area. DCT coefficients are stored in the order of scanning.

【0020】請求項6記載の発明によれば、DCT係数
の算出順の第2のアドレス信号を生成する第2のアドレ
ス生成回路と、第1のアドレス信号と第2のアドレス信
号とを切り替える切り替え回路とが備えられ、変換係数
格納領域には切り替えられた第1又は第2のアドレス信
号に基づいてDCT係数が格納される。
According to the sixth aspect of the present invention, the second address generating circuit for generating the second address signals in the order of calculating the DCT coefficients, and switching between the first address signal and the second address signal. A DCT coefficient is stored in the transform coefficient storage area based on the switched first or second address signal.

【0021】請求項7記載の発明によれば、係数メモリ
には、画像の種類に応じた複数のテーブルが予め格納さ
れ、変換実行手段には、2次元のDCT係数を複数の領
域に分割し、各DCT係数とそのDCT係数が含まれる
領域に対応して設定された閾値とを比較し、各領域毎に
閾値よりも大きいDCT係数の数を記憶するテーブル判
定回路が備えられる。そして、量子化実行手段は、各領
域毎に記憶された数に基づいて複数のテーブルのうちの
1つを選択し、選択してテーブルを用いてDCT係数に
対する量子化処理を実行する。
According to the seventh aspect of the present invention, a plurality of tables corresponding to the types of images are stored in the coefficient memory in advance, and the two-dimensional DCT coefficients are divided into a plurality of regions by the conversion executing means. And a table determination circuit that compares each DCT coefficient with a threshold set corresponding to an area including the DCT coefficient, and stores the number of DCT coefficients larger than the threshold for each area. Then, the quantization execution means selects one of the plurality of tables based on the number stored for each region, selects and performs quantization processing on the DCT coefficients using the table.

【0022】請求項8記載の発明によれば、テーブル判
定回路は、分割された符号データの複数の領域毎に設定
された閾値を格納する閾値レジスタと、入力される符号
データと、その符号データが存在する領域の閾値レジス
タに格納された閾値とを比較し、その比較結果に基づい
て符号データが閾値よりも大きい場合に信号を出力する
比較器と、複数の領域に対応して設けられ、比較器から
の信号に基づいてカウントアップするカウンタとから構
成される。
According to the eighth aspect of the present invention, the table determination circuit includes: a threshold register for storing a threshold set for each of a plurality of regions of the divided code data; input code data; Comparing the threshold value stored in the threshold value register of the region where there is, and a comparator that outputs a signal when the code data is larger than the threshold value based on the comparison result, provided for a plurality of regions, And a counter that counts up based on a signal from the comparator.

【0023】[0023]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

(第一実施形態)以下、本発明を具体化した第一実施形
態を図2〜図8に従って説明する。
(First Embodiment) Hereinafter, a first embodiment of the present invention will be described with reference to FIGS.

【0024】図2に示すように、デジタルスチルカメラ
等の画像情報処理装置10には、撮像素子としてのCC
D11が設けられている。CCD11は、変換回路12
を介して外部バス13に接続されている。外部バス13
には、マイクロコントローラ(以下、マイコンという)
14、ROM15、フレームメモリ16、及び、フラッ
シュメモリ17(Flash Memory)が接続されている。
又、外部バス13には、駆動回路18を介して表示素子
としてのLCD19が接続されている。
As shown in FIG. 2, an image information processing apparatus 10 such as a digital still camera has a CC as an image sensor.
D11 is provided. The CCD 11 includes a conversion circuit 12
Is connected to the external bus 13 via the. External bus 13
Includes a microcontroller (hereinafter referred to as a microcomputer)
14, a ROM 15, a frame memory 16, and a flash memory 17 are connected.
Further, an LCD 19 as a display element is connected to the external bus 13 via a drive circuit 18.

【0025】CCD11は画像を取り込み記憶するため
に設けられ、LCD19は記憶した画像を表示するため
に設けられている。マイコン14は、画像の取り込み、
画像の表示を制御するために設けられている。ROM1
5には、マイコン14が画像の取り込み・表示を行うた
めの制御プログラムや、取り込んだ画像データを所定の
方式(本実施形態ではJPEG方式)に基づいて圧縮伸
長処理を行うために処理プログラムが予め記憶されてい
る。
The CCD 11 is provided to capture and store an image, and the LCD 19 is provided to display the stored image. The microcomputer 14 captures an image,
It is provided to control the display of an image. ROM1
5 includes a control program for the microcomputer 14 to capture and display an image and a processing program for compressing and expanding the captured image data based on a predetermined method (in this embodiment, the JPEG method). It is remembered.

【0026】マイコン14は、図示しないレリーズボタ
ン等の操作に基づいてCCD11を制御し、CCD11
は、取り込んだ1画面分の画像を画像データに変換して
出力する。その画像データは、変換回路を介してデジタ
ルデータに変換され、外部バス13を介してフレームメ
モリ16に一旦記憶される。フレームメモリ16は、例
えばDRAMよりなり、1画面分の画像データを格納可
能な容量に設定されている。
The microcomputer 14 controls the CCD 11 based on the operation of a release button (not shown) and the like.
Converts the captured image for one screen into image data and outputs it. The image data is converted into digital data via a conversion circuit, and is temporarily stored in the frame memory 16 via the external bus 13. The frame memory 16 is composed of, for example, a DRAM, and is set to a capacity capable of storing image data for one screen.

【0027】マイコン14は、前記処理プログラムに基
づいて動作し、フレームメモリ16に記憶された1画面
分の画像データを、JPEG方式に基づいて圧縮処理し
た圧縮画像データを生成する。そして、マイコン14
は、生成した圧縮画像データをフラッシュメモリ17に
格納する。フラッシュメモリ17は、電気的消去可能な
不揮発性メモリ(EEPROM)であり、圧縮処理された複数画
面の圧縮画像データを記憶可能な容量に設定されてい
る。マイコン14は、図示しないボタンの操作に基づい
て、フラッシュメモリ17に記憶された全ての圧縮画像
データ、又は、1画面分の圧縮画像データを消去する。
The microcomputer 14 operates based on the processing program and generates compressed image data obtained by compressing the image data for one screen stored in the frame memory 16 based on the JPEG system. And the microcomputer 14
Stores the generated compressed image data in the flash memory 17. The flash memory 17 is an electrically erasable non-volatile memory (EEPROM), and is set to have a capacity capable of storing compressed image data of a plurality of screens subjected to compression processing. The microcomputer 14 deletes all the compressed image data stored in the flash memory 17 or the compressed image data for one screen based on the operation of a button (not shown).

【0028】又、マイコン14は、図示しないボタンの
操作に基づいて、フラッシュメモリ17に記憶された圧
縮画像データをJPEG方式に基づいて伸長処理した伸
長画像データを生成する。そして、マイコン14は、生
成した伸長画像データを外部バス13及び駆動回路18
を介してLCD19に出力し、画像を表示する。このL
CD19に表示された画像により、フラッシュメモリ1
7に記憶された圧縮画像データが確認される。
Further, the microcomputer 14 generates decompressed image data obtained by decompressing the compressed image data stored in the flash memory 17 based on the JPEG method based on the operation of a button (not shown). Then, the microcomputer 14 transmits the generated decompressed image data to the external bus 13 and the driving circuit 18.
And outputs the image to the LCD 19 via the. This L
According to the image displayed on the CD 19, the flash memory 1
The compressed image data stored in 7 is confirmed.

【0029】尚、LCD19には、画像を取り込む際に
CCD11により取り込まれる画像の画像データが入力
され、そのLCD19にCCD11により取り込まれる
画像が表示される。このLCD19に表示された画像に
より、取り込む画像の構成等が確認される。
The LCD 19 receives image data of an image captured by the CCD 11 when capturing an image, and displays the image captured by the CCD 11 on the LCD 19. From the image displayed on the LCD 19, the configuration of the image to be captured and the like are confirmed.

【0030】次に、マイコン14の構成について詳述す
る。図2に示すように、マイコン14には、量子化処理
手段としての中央演算処理装置(以下、CPUという)
21、データ転送手段としてのデータ転送回路(DMA
C:Direct Memory Access Controler)22、バッファ
メモリ23、変換実行手段としてのDCT演算部24、
及び、係数メモリ25が設けられている。CPU21、
DMAC22、バッファメモリ23、DCT演算部2
4、及び、係数メモリ25は、内部バス26に接続さ
れ、その内部バス26は、前記外部バス13に接続され
ている。
Next, the configuration of the microcomputer 14 will be described in detail. As shown in FIG. 2, the microcomputer 14 includes a central processing unit (hereinafter referred to as a CPU) as a quantization processing unit.
21. Data transfer circuit (DMA
C: Direct Memory Access Controller) 22, a buffer memory 23, a DCT operation unit 24 as a conversion execution unit,
Further, a coefficient memory 25 is provided. CPU 21,
DMAC 22, buffer memory 23, DCT operation unit 2
4, and the coefficient memory 25 are connected to an internal bus 26, and the internal bus 26 is connected to the external bus 13.

【0031】DMAC22は、前記フレームメモリ16
に記憶された画像データをCPU21を介さずにDCT
演算部24に転送するために設けられる。又、DMAC
22は、後述するDCT演算部24の演算結果を、CP
U21を介さずにバッファメモリ23に順次転送する。
DMAC22は、DCT演算部24において1回のDC
T演算に必要な分の画像データを順次転送する。
The DMAC 22 stores the frame memory 16
DCT without using the CPU 21
It is provided for transferring to the arithmetic unit 24. Also, DMAC
Reference numeral 22 denotes a calculation result of a DCT calculation unit 24 described later,
The data is sequentially transferred to the buffer memory 23 without going through the U21.
The DMAC 22 performs one DCT operation in the DCT operation unit 24.
The image data required for the T operation is sequentially transferred.

【0032】DCT演算部24は、転送された画像デー
タに対して離散コサイン変換を行いDCT係数を生成す
るものである。尚、本実施形態では、DCT演算部24
は、一般的な画素数、即ち、8×8画素の画像データに
対して2次元の離散コサイン変換を行う。従って、DM
AC22は、一度に8×8画素の画像データをDCT演
算部24に順次転送する。
The DCT operation section 24 performs DCT on the transferred image data to generate DCT coefficients. In this embodiment, the DCT operation unit 24
Performs a two-dimensional discrete cosine transform on image data of a general number of pixels, that is, 8 × 8 pixels. Therefore, DM
The AC 22 sequentially transfers the image data of 8 × 8 pixels to the DCT operation unit 24 at a time.

【0033】DCT演算部24には、内部バッファメモ
リ27が設けられ、前記画像データは内部バッファメモ
リ27に一旦記憶される。DCT演算部24は、内部バ
ッファメモリ27に記憶された画像データに対して二次
元DCT演算を行い、その演算結果であるDCT係数を
再び内部バッファメモリ27に格納する。従って、DC
T演算部24は、その演算において内部バス26を使用
しないため、後述するCPU21の処理に影響はない。
又、DMAC22は、DCT演算部24に必要な画像デ
ータ、及び、演算後のDCT係数の転送を直接行うた
め、CPU21の負荷とならない。
The DCT operation section 24 is provided with an internal buffer memory 27, and the image data is temporarily stored in the internal buffer memory 27. The DCT operation unit 24 performs a two-dimensional DCT operation on the image data stored in the internal buffer memory 27, and stores the DCT coefficient as the operation result in the internal buffer memory 27 again. Therefore, DC
Since the T operation unit 24 does not use the internal bus 26 in the operation, it does not affect the processing of the CPU 21 described later.
Further, since the DMAC 22 directly transfers image data necessary for the DCT operation unit 24 and DCT coefficients after the operation, the DMAC 22 does not load the CPU 21.

【0034】CPU21は、前記ROM15に格納され
た処理プログラムに基づいて、DMAC22により転送
されバッファメモリ23に記憶されたDCT係数に対し
て所定の圧縮処理を行い、その処理結果をフラッシュメ
モリ17に格納する。尚、CPU21は、バッファメモ
リ23に1画面分のDCT係数が格納されると、その1
画面分のDCT係数に対して圧縮処理を行って1画面分
の圧縮画像データを生成する。
The CPU 21 performs predetermined compression processing on the DCT coefficients transferred by the DMAC 22 and stored in the buffer memory 23 based on the processing program stored in the ROM 15, and stores the processing result in the flash memory 17. I do. When the DCT coefficient for one screen is stored in the buffer memory 23, the CPU 21
The compression processing is performed on the DCT coefficients for one screen to generate compressed image data for one screen.

【0035】本実施形態では、CPU21は、量子化処
理及び符号化処理を圧縮処理として実行する。量子化処
理において、CPU21は、RAMに記憶されたDCT
係数と予め係数メモリ25に格納された所定の量子化テ
ーブル閾値とを比較し、その比較結果に基づいてDCT
係数を量子化する。更に、符号化処理において、CPU
21は、係数メモリ25に予め格納された所定の符号テ
ーブル(例えば、ハフマンテーブル)を用いて、量子化
された値を符号化して圧縮画像データを生成する。そし
て、CPU21は、生成した圧縮画像データをフラッシ
ュメモリ17に格納する。
In the present embodiment, the CPU 21 executes the quantization processing and the encoding processing as compression processing. In the quantization process, the CPU 21 uses the DCT stored in the RAM.
The coefficient is compared with a predetermined quantization table threshold value stored in the coefficient memory 25 in advance, and DCT is performed based on the comparison result.
Quantize the coefficients. Further, in the encoding process, the CPU
21 encodes the quantized value using a predetermined code table (for example, a Huffman table) stored in the coefficient memory 25 in advance to generate compressed image data. Then, the CPU 21 stores the generated compressed image data in the flash memory 17.

【0036】逆に、フラッシュメモリ17に格納された
圧縮画像データをLCD19に表示する場合、上記とは
逆の処理が行われる。即ち、CPU21は、フラッシュ
メモリ17に格納された圧縮画像データを復号化及び逆
量しかしてDCT係数を生成し、そのDCT係数をバッ
ファメモリ23に格納する。バッファメモリ23に格納
されたDCT係数は、DMAC22によってDCT演算
部24の内部バッファメモリ27に順次転送される。
Conversely, when the compressed image data stored in the flash memory 17 is displayed on the LCD 19, the reverse process is performed. That is, the CPU 21 decodes the compressed image data stored in the flash memory 17 and generates a DCT coefficient by the inverse amount, and stores the DCT coefficient in the buffer memory 23. The DCT coefficients stored in the buffer memory 23 are sequentially transferred to the internal buffer memory 27 of the DCT operation unit 24 by the DMAC 22.

【0037】DCT演算部24は、内部バッファメモリ
27に格納されたDCT係数に対して逆DCT演算を行
い、その演算結果を再び内部バッファメモリ27に格納
する。その演算結果は、伸長画像データとしてDMAC
22によって順次読み出され、フレームメモリ16に格
納される。そして、1画面分の伸長画像データがフレー
ムメモリ16に格納されると、そのフレームメモリ16
に格納された1画面分の伸長画像データは、外部バス1
3及び駆動回路18を介してLCD19に転送され、L
CD19に画像が表示される。
The DCT operation section 24 performs an inverse DCT operation on the DCT coefficients stored in the internal buffer memory 27 and stores the operation result in the internal buffer memory 27 again. The result of the calculation is DMAC as the decompressed image data.
The data is sequentially read out by the CPU 22 and stored in the frame memory 16. When the expanded image data for one screen is stored in the frame memory 16, the frame memory 16
Decompressed image data for one screen stored in the external bus 1
3 and to the LCD 19 via the drive circuit 18,
An image is displayed on the CD 19.

【0038】次に、DCT演算部24の構成を詳述す
る。図3に示すように、DCT演算部24には、前記内
部バッファメモリ27に加えて、DCT演算器31、ア
ドレス生成回路32、及び、量子化予測回路33が設け
られている。内部バッファメモリ27は、画像データ記
憶領域としての画像バッファ27a、中間値記憶領域と
しての中間値バッファ27b、及び、変換係数格納領域
としてのDCT係数バッファ27cにより構成されてい
る。
Next, the configuration of the DCT operation section 24 will be described in detail. As shown in FIG. 3, the DCT operation unit 24 includes a DCT operation unit 31, an address generation circuit 32, and a quantization prediction circuit 33 in addition to the internal buffer memory 27. The internal buffer memory 27 includes an image buffer 27a as an image data storage area, an intermediate value buffer 27b as an intermediate value storage area, and a DCT coefficient buffer 27c as a transform coefficient storage area.

【0039】画像データを圧縮処理する場合、画像バッ
ファ27aには、前記DMAC22により転送される画
像データが格納される。中間値バッファ27bには、D
CT演算器31からDCT演算途中の中間データが格納
される。そして、DCT係数バッファ27cには、DC
T演算器31の演算結果であるDCT係数が格納され
る。
When compressing the image data, the image buffer 27a stores the image data transferred by the DMAC 22. D is stored in the intermediate value buffer 27b.
The intermediate data in the middle of the DCT calculation is stored from the CT calculator 31. The DCT coefficient buffer 27c stores the DC
The DCT coefficient which is the result of the operation of the T calculator 31 is stored.

【0040】一方、圧縮画像データを伸長処理する場
合、DCT係数バッファ27cには、CPU21により
逆量子化されたデータが格納される。中間値バッファ2
7bには、DCT演算器31からDCT演算途中のデー
タが格納される。そして、画像バッファ27aには、D
CT演算器31により生成される伸長画像データが格納
される。
On the other hand, when decompressing the compressed image data, the data dequantized by the CPU 21 is stored in the DCT coefficient buffer 27c. Intermediate value buffer 2
The data in the middle of the DCT calculation from the DCT calculator 31 is stored in 7b. Then, in the image buffer 27a, D
The expanded image data generated by the CT calculator 31 is stored.

【0041】変換回路としてのDCT演算器31は、圧
縮処理時において画像バッファ27aに格納された画像
データに対して二次元DCT演算を施すために設けられ
ている。また、DCT演算器31は、伸長処理時におい
てDCT係数バッファ27cに格納された逆量子化後の
データに対して二次元逆DCT演算を施すために設けら
れている。
The DCT calculator 31 as a conversion circuit is provided for performing a two-dimensional DCT calculation on the image data stored in the image buffer 27a during the compression processing. The DCT calculator 31 is provided to perform a two-dimensional inverse DCT operation on the data after the inverse quantization stored in the DCT coefficient buffer 27c at the time of the decompression processing.

【0042】図4は、DCT演算器31周辺の概略ブロ
ック回路図である。DCT演算部24には、セレクタ3
4,35、制御レジスタ36、及び、シーケンス管理回
路37が設けられている。
FIG. 4 is a schematic block circuit diagram around the DCT calculator 31. The DCT operation unit 24 includes a selector 3
4, 35, a control register 36, and a sequence management circuit 37 are provided.

【0043】画像バッファ27aには、セレクタ34を
介してDCT演算部24から出力されるデータ又は内部
バス26上を転送されるデータが入力され、画像バッフ
ァ27aは入力されたデータを記憶する。そして、画像
バッファ27aに記憶されたデータは、DCT演算器3
1又はDMAC22により読み出される。
Data output from the DCT operation unit 24 or data transferred on the internal bus 26 is input to the image buffer 27a via the selector 34, and the image buffer 27a stores the input data. The data stored in the image buffer 27a is transferred to the DCT
1 or read by the DMAC 22.

【0044】中間値バッファ27bには、DCT演算部
24から出力されるデータが入力され、中間値バッファ
27bは入力されたデータを記憶する。そして、中間値
バッファ27bに記憶されたデータは、DCT演算部2
4により読み出される。
The data output from the DCT calculator 24 is input to the intermediate value buffer 27b, and the intermediate value buffer 27b stores the input data. The data stored in the intermediate value buffer 27b is stored in the DCT
4 is read.

【0045】DCT係数バッファ27cには、セレクタ
35を介してDCT演算部24から出力されるデータ又
は内部バス26上を転送されるデータが入力され、DC
T係数バッファ27cは入力されたデータを記憶する。
そして、DCT係数バッファ27cに記憶されたデータ
は、DCT演算器31又はDMAC22により読み出さ
れる。
The data output from the DCT operation unit 24 or the data transferred on the internal bus 26 via the selector 35 is input to the DCT coefficient buffer 27c.
The T coefficient buffer 27c stores the input data.
Then, the data stored in the DCT coefficient buffer 27c is read by the DCT calculator 31 or the DMAC 22.

【0046】制御レジスタ36は、内部バス26に接続
され、CPU21から内部バス26を介して各種の設定
を行うための制御データが格納される。設定には、例え
ば、そのときの処理が圧縮処理であるか伸長処理である
か等の設定がある。即ち、CPU21は前記したように
図示しないボタンなどの操作に基づいて圧縮処理又は伸
長処理を選択し、その選択した処理に応じた制御データ
を制御レジスタ36に格納する。そして、CPU21
は、設定終了後に、制御レジスタ3667の制御ビット
により処理の開始を通知する。
The control register 36 is connected to the internal bus 26, and stores control data for performing various settings from the CPU 21 via the internal bus 26. The setting includes, for example, whether the process at that time is a compression process or an expansion process. That is, the CPU 21 selects the compression process or the decompression process based on the operation of the button (not shown) as described above, and stores control data corresponding to the selected process in the control register 36. And the CPU 21
Notifies the start of the processing by the control bit of the control register 3667 after the setting is completed.

【0047】制御レジスタ36には、シーケンス管理回
路37が接続されている。シーケンス管理回路37は、
制御レジスタ36に格納された設定に基づいて、両セレ
クタ34,35をそれぞれ制御する。制御レジスタ36
に格納された設定に基づいて圧縮処理が行われる場合、
シーケンス管理回路37はセレクタ34,35をそれぞ
れ制御して画像バッファ27aを内部バス26に、DC
T係数バッファ27cをDCT演算器31に接続する。
The control register 36 is connected to a sequence management circuit 37. The sequence management circuit 37
Based on the settings stored in the control register 36, both selectors 34 and 35 are controlled respectively. Control register 36
If compression is performed based on settings stored in
The sequence management circuit 37 controls the selectors 34 and 35 to transfer the image buffer 27a to the internal bus 26 and the DC
The T coefficient buffer 27c is connected to the DCT calculator 31.

【0048】DCT演算器31は、処理開始の通知に応
答して、制御レジスタ36の設定に基づいてDCT演算
を開始し、画像データの転送要求を発生する。この転送
要求は、制御レジスタ36の要求ビット、あるいは割り
込み信号等によってDMAC22に通知される。
The DCT calculator 31 starts the DCT calculation based on the setting of the control register 36 in response to the notification of the processing start, and issues a transfer request of the image data. This transfer request is notified to the DMAC 22 by a request bit of the control register 36 or an interrupt signal.

【0049】DMAC22は、画像データの転送要求に
従って、図2に示されるフレームメモリ16に格納され
た画像データをのうちの1ブロック(8×8画素)の画
像データを、内部バス26及びセレクタ34を介して画
像バッファ27aに転送する。転送が終了すると、DM
AC22は、制御レジスタ36の制御ビットにより転送
が完了したことをDCT演算器31に通知する。
The DMAC 22 transfers the image data of one block (8 × 8 pixels) of the image data stored in the frame memory 16 shown in FIG. Through the image buffer 27a. When the transfer is completed, DM
The AC 22 notifies the DCT operator 31 that the transfer has been completed by the control bit of the control register 36.

【0050】DCT演算器31は、転送完了の通知に応
答して、画像バッファ27aに記憶された画像データを
順次入力し、その画像データに対して一次元DCT演算
を施す。そして、DCT演算器31は、その演算結果を
中間データとして中間値バッファ27bに順次出力し、
中間値バッファ27bはその中間データを記憶する。更
に、DCT演算器31は、中間値バッファ27bに格納
された前記中間データを順次入力し、その中間データに
対して一次元DCT演算を施す。そして、DCT演算器
31は、その演算結果をDCT係数としてセレクタ35
を介してDCT係数バッファ27cに順次出力し、DC
T係数バッファ27cはDCT係数を順次記憶する。
The DCT calculator 31 sequentially receives the image data stored in the image buffer 27a in response to the transfer completion notification, and performs a one-dimensional DCT calculation on the image data. Then, the DCT calculator 31 sequentially outputs the calculation results as intermediate data to the intermediate value buffer 27b,
The intermediate value buffer 27b stores the intermediate data. Further, the DCT calculator 31 sequentially inputs the intermediate data stored in the intermediate value buffer 27b, and performs a one-dimensional DCT operation on the intermediate data. Then, the DCT calculator 31 uses the result of the calculation as a DCT coefficient in the selector 35.
Are sequentially output to the DCT coefficient buffer 27c through
The T coefficient buffer 27c sequentially stores DCT coefficients.

【0051】従って、画像バッファ27aに格納された
画像データは、DCT演算器31による2回の一次元D
CT演算により2次元DCT演算が施され、その演算結
果がDCT係数としてDCT係数バッファ27cに格納
される。そのDCT係数バッファ27cに格納されたD
CT係数は、DCT演算器31より発せられる転送要求
に従って、DMAC22によって内部バス26を介して
バッファメモリ23に転送され、バッファメモリ23は
転送されたDCT係数を記憶する。
Accordingly, the image data stored in the image buffer 27a is stored in the two-dimensional one-dimensional D
A two-dimensional DCT operation is performed by the CT operation, and the operation result is stored as a DCT coefficient in the DCT coefficient buffer 27c. D stored in the DCT coefficient buffer 27c
The CT coefficients are transferred by the DMAC 22 to the buffer memory 23 via the internal bus 26 in accordance with the transfer request issued by the DCT calculator 31, and the buffer memory 23 stores the transferred DCT coefficients.

【0052】以上のようにして、フレームメモリ16に
格納された各ブロックの画像データは、DCT処理が施
されてDCT係数に変換され、バッファメモリ23に順
次格納される。この時、1回目の一次元DCT演算が終
了した時点で、画像バッファ27aの内容は不要となっ
ている。従って、DCT演算器31は、次のブロックの
画像データの転送要求を発生し、中間値バッファ27b
に格納された中間データに対して2回目の一次元DCT
演算を開始する。そして、DMAC22は転送要求に応
答して次のブロックの画像データを画像バッファ27a
に転送する。
As described above, the image data of each block stored in the frame memory 16 is subjected to DCT processing, converted into DCT coefficients, and sequentially stored in the buffer memory 23. At this time, when the first one-dimensional DCT operation is completed, the contents of the image buffer 27a become unnecessary. Therefore, the DCT calculator 31 issues a transfer request for the image data of the next block, and outputs the intermediate value buffer 27b.
Second one-dimensional DCT for intermediate data stored in
Start the operation. Then, in response to the transfer request, the DMAC 22 stores the image data of the next block in the image buffer 27a.
Transfer to

【0053】即ち、DCT演算器31が中間値バッファ
27bに格納された中間データに対して2回目の一次元
DCT演算を実行している最中に、次のブロックの画像
データが転送される。従って、画像データの転送とDC
T演算とが並列に実行される。
That is, while the DCT calculator 31 is executing the second one-dimensional DCT calculation on the intermediate data stored in the intermediate value buffer 27b, the image data of the next block is transferred. Therefore, transfer of image data and DC
The T operation is executed in parallel.

【0054】又、2回目の一次元DCT演算が終了した
時点で、画像バッファ27aには次のブロックの画像デ
ータが格納されている。従って、DCT演算器31は、
DCT係数バッファ27cに格納されたDCT係数の転
送要求を発生し、画像バッファ27aに格納された画像
データに対する1回目の一次元DCT演算を開始する。
DMAC22は、転送要求に応答してDCT係数バッフ
ァ27cのDCT係数を転送する。
When the second one-dimensional DCT operation is completed, the image data of the next block is stored in the image buffer 27a. Therefore, the DCT calculator 31 calculates
A transfer request for the DCT coefficient stored in the DCT coefficient buffer 27c is generated, and the first one-dimensional DCT operation on the image data stored in the image buffer 27a is started.
The DMAC 22 transfers the DCT coefficient of the DCT coefficient buffer 27c in response to the transfer request.

【0055】即ち、DCT演算器31が画像バッファ2
7aに格納された画像データに対して1回目の一次元D
CT演算を実行して最中に、前に演算されたDCT係数
が転送される。従って、DCT演算と演算後のDCT係
数の転送とが並列に実行される。
That is, the DCT operation unit 31 is connected to the image buffer 2
The first one-dimensional D for the image data stored in 7a
During the execution of the CT operation, the previously calculated DCT coefficients are transferred. Therefore, the DCT operation and the transfer of the DCT coefficient after the operation are performed in parallel.

【0056】一方、伸長処理を行う場合、CPU21は
伸長処理に対応した制御データを制御レジスタ36に格
納する。更に、CPU21は、設定終了後に、制御レジ
スタ3667の制御ビットにより処理の開始を通知す
る。この時、バッファメモリ23には、フラッシュメモ
リ17に記憶された圧縮画像データがCPU21によっ
て復号化及び逆量子化されたデータ(DCT係数)が格
納されている。
On the other hand, when performing the decompression processing, the CPU 21 stores control data corresponding to the decompression processing in the control register 36. Further, the CPU 21 notifies the start of the processing by the control bit of the control register 3667 after the setting is completed. At this time, the buffer memory 23 stores data (DCT coefficients) obtained by decoding and dequantizing the compressed image data stored in the flash memory 17 by the CPU 21.

【0057】シーケンス管理回路37は、制御レジスタ
36に格納された設定に基づいて、セレクタ34,35
をそれぞれ制御して画像バッファ27aをDCT演算器
31に、DCT係数バッファ27cを内部バス26に接
続する。DCT演算器31は、処理開始の通知に応答し
て、制御レジスタ36の設定に基づいて逆DCT演算を
開始し、逆量子化後のDCT係数の転送要求を発生す
る。この転送要求は、制御レジスタ36の要求ビット、
あるいは割り込み信号塔によってDMAC22に通知さ
れる。
The sequence management circuit 37 selects the selectors 34 and 35 based on the settings stored in the control register 36.
To connect the image buffer 27a to the DCT calculator 31 and the DCT coefficient buffer 27c to the internal bus 26. The DCT calculator 31 starts the inverse DCT operation based on the setting of the control register 36 in response to the notification of the processing start, and issues a transfer request of the inversely quantized DCT coefficient. This transfer request includes a request bit of the control register 36,
Alternatively, the DMAC 22 is notified by an interrupt signal tower.

【0058】DMAC22は、転送要求に従って、バッ
ファメモリ23に格納された逆量子化後のDCT係数を
内部バス26及びセレクタ35を介してDCT係数バッ
ファ27cに転送する。1ブロックのDCT係数の転送
が終了すると、DMAC22は、制御レジスタ36の制
御ビットにより転送が完了したことをDCT演算器31
に通知する。
The DMAC 22 transfers the inversely quantized DCT coefficients stored in the buffer memory 23 to the DCT coefficient buffer 27c via the internal bus 26 and the selector 35 according to the transfer request. When the transfer of the DCT coefficient of one block is completed, the DMAC 22 informs the DCT operator 31 that the transfer has been completed by the control bit of the control register 36.
Notify.

【0059】DCT演算器31は、転送完了の通知に応
答して、DCT係数バッファ27cに格納されたDCT
係数を順次入力し、そのDCT係数に対して一次元逆D
CT演算を施す。そして、DCT演算器31は、その演
算結果を中間データとして中間値バッファ27bに出力
し、中間値バッファ27bはその中間データを記憶す
る。更に、DCT演算器31は、中間値バッファ27b
に格納された前記中間データを順次入力し、その中間デ
ータに対して一次元逆DCT演算を施す。そして、DC
T演算器31は、その演算結果を伸長画像データとして
セレクタ34を介して画像バッファ27aに出力し、画
像バッファ27aはその伸長画像データを記憶する。
The DCT calculator 31 responds to the notification of the completion of the transfer by storing the DCT coefficient stored in the DCT coefficient buffer 27c.
The coefficients are sequentially input, and the one-dimensional inverse D
Perform CT operation. Then, the DCT calculator 31 outputs the calculation result to the intermediate value buffer 27b as intermediate data, and the intermediate value buffer 27b stores the intermediate data. Further, the DCT calculator 31 includes an intermediate value buffer 27b.
Are sequentially input, and a one-dimensional inverse DCT operation is performed on the intermediate data. And DC
The T calculator 31 outputs the calculation result as decompressed image data to the image buffer 27a via the selector 34, and the image buffer 27a stores the decompressed image data.

【0060】従って、DCT係数バッファ27cに格納
された逆量子化後のDCT係数は、DCT演算器31に
よる2回の一次元逆DCT演算により2次元DCT逆D
CT演算が施され、その演算結果が伸長画像データとし
て画像バッファ27aに格納される。その画像バッファ
27aに格納された伸長画像データは、DCT演算器3
1により発せられる転送要求に従って、DMAC22に
よって内部バス26、及び、図2に示される外部バス1
3及び駆動回路18を介してLCD19に転送され、L
CD19は転送された伸長画像データを表示する。
Accordingly, the inversely quantized DCT coefficient stored in the DCT coefficient buffer 27c is converted into a two-dimensional inverse DCT by two one-dimensional inverse DCT operations by the DCT calculator 31.
The CT operation is performed, and the operation result is stored in the image buffer 27a as decompressed image data. The decompressed image data stored in the image buffer 27a is output to the DCT
1 according to the transfer request issued by the DMAC 22, the internal bus 26 and the external bus 1 shown in FIG.
3 and to the LCD 19 via the drive circuit 18,
The CD 19 displays the transferred decompressed image data.

【0061】以上のようにしてフラッシュメモリ17に
格納された圧縮画像データは、CPU21によって復号
化及び逆量子化された後、DCT演算部24によりDC
T演算が施されて伸長画像データに変換され、LCD1
9に表示される。この時、1回目の逆DCT演算が終了
した時点で、DCT係数バッファ27cの内容は不要と
なっている。従って、DCT演算器31は、次のブロッ
クのDCT係数の転送要求を発生すると共に、中間値バ
ッファ27bに格納された中間データに対して2回目の
逆DCT演算を開始する。そして、DMAC22は、転
送要求に応答して次のブロックのDCT係数をバッファ
メモリ23からDCT係数バッファ27cに転送する。
The compressed image data stored in the flash memory 17 as described above is decoded and inversely quantized by the CPU 21, and then the DCT
T operation is performed to convert the image data into expanded image data.
9 is displayed. At this time, the contents of the DCT coefficient buffer 27c become unnecessary at the time when the first inverse DCT operation is completed. Accordingly, the DCT calculator 31 generates a transfer request for the DCT coefficient of the next block and starts the second inverse DCT calculation on the intermediate data stored in the intermediate value buffer 27b. Then, the DMAC 22 transfers the DCT coefficient of the next block from the buffer memory 23 to the DCT coefficient buffer 27c in response to the transfer request.

【0062】即ち、DCT演算器31が中間値バッファ
27bに格納した中間データに対して2回目の一次元逆
DCT演算を実行している最中に、次のブロックのDC
T係数が転送されDCT係数バッファ27cに格納され
る。従って、逆DCT演算とDCT係数の転送とが並列
に実行される。
That is, while the DCT calculator 31 is executing the second one-dimensional inverse DCT calculation on the intermediate data stored in the intermediate value buffer 27b, the DCT of the next block is
The T coefficient is transferred and stored in the DCT coefficient buffer 27c. Therefore, the inverse DCT operation and the transfer of the DCT coefficient are executed in parallel.

【0063】又、2回目の一次元逆DCT演算が終了し
た時点で、DCT係数バッファ27cには次のブロック
のDCT係数が格納されている。従って、DCT演算器
31は、画像バッファ27aに格納した伸長画像データ
の転送要求を発生し、DCT係数バッファ27cに格納
された次のブロックのDCT係数に対する1回目の一次
元逆DCT演算を開始する。DMAC22は、転送要求
に応答して画像バッファ27aに格納された伸長画像デ
ータをLCD19へ転送する。
When the second one-dimensional inverse DCT operation is completed, the DCT coefficient of the next block is stored in the DCT coefficient buffer 27c. Therefore, the DCT calculator 31 issues a transfer request for the decompressed image data stored in the image buffer 27a, and starts the first one-dimensional inverse DCT operation on the DCT coefficient of the next block stored in the DCT coefficient buffer 27c. . The DMAC 22 transfers the decompressed image data stored in the image buffer 27a to the LCD 19 in response to the transfer request.

【0064】即ち、DCT演算器31がDCT係数バッ
ファ27cに格納されたDCT係数に対して1回目の一
次元逆DCT演算を実行している最中に、前に演算され
格納された伸長画像データが転送される。従って、逆D
CT演算と演算後の伸長画像データの転送とが並列に実
行される。
That is, while the DCT calculator 31 is executing the first one-dimensional inverse DCT calculation on the DCT coefficients stored in the DCT coefficient buffer 27c, the decompressed image data previously calculated and stored Is transferred. Therefore, the inverse D
The CT operation and the transfer of the decompressed image data after the operation are performed in parallel.

【0065】又、CPU21は、上記の圧縮伸長処理に
おける各データの転送に関与せず、圧縮伸長処理の選択
及び処理の開始を通知するのみである。従って、CPU
21は、上記の間に圧縮処理時にはバッファメモリ23
に格納されたDCT係数に対する量子化及び符号化、伸
長処理時には復号化及び逆量子化したDCT係数をバッ
ファメモリ23に格納する。即ち、画像データの圧縮処
理時にはDCT演算と、量子化及び符号化とが並列に実
行される。又、圧縮画像データの伸長処理時には、逆D
CT演算と、逆量子化及び復号化とが並列に実行され
る。
The CPU 21 does not participate in the transfer of each data in the above-mentioned compression / decompression processing, but only notifies the selection of the compression / decompression processing and the start of the processing. Therefore, CPU
21 indicates a buffer memory 23 during the compression process during the above.
During the quantization, encoding, and decompression processing for the DCT coefficients stored in the buffer memory 23, the decoded and inversely quantized DCT coefficients are stored in the buffer memory 23. That is, the DCT operation and the quantization and encoding are performed in parallel during the compression processing of the image data. Also, when decompressing the compressed image data, the inverse D
The CT operation and the inverse quantization and decoding are performed in parallel.

【0066】図3に示されるアドレス生成回路32は、
DCT演算器31がDCT係数バッファ27cに対して
演算結果であるDCT係数を格納するときに使用され、
DCT係数を格納するDCT係数バッファ27cのアド
レスを生成するために設けられている。
The address generation circuit 32 shown in FIG.
Used when the DCT calculator 31 stores the DCT coefficient as the calculation result in the DCT coefficient buffer 27c;
It is provided for generating an address of the DCT coefficient buffer 27c for storing the DCT coefficient.

【0067】一般に、図4に示されるDCT演算器31
によりDCT係数バッファ27cに格納されるDCT係
数(周波数成分)は、図6に示すように、左上から右下
に向かって低周波数成分から高周波数成分の順に配置さ
れる。そして、通常、各周波数成分は、DC成分(左上
の最初の位置に配置された周波数成分)の値が最も大き
く、周波数が高くなるにつれて値が減少する。そして、
量子化後のデータは、最高周波数では0に近くなる場合
が多い。そのため、量子化後のデータを、図6に示され
る矢印に従ってジグザグにスキャンして符号化すること
により、圧縮率の高い効率的な圧縮画像データを得るこ
とができる。
Generally, the DCT calculator 31 shown in FIG.
As shown in FIG. 6, the DCT coefficients (frequency components) stored in the DCT coefficient buffer 27c are arranged in the order of low frequency components to high frequency components from the upper left to the lower right. Usually, each frequency component has the largest value of the DC component (the frequency component located at the first position at the upper left), and the value decreases as the frequency increases. And
The quantized data often approaches 0 at the highest frequency. For this reason, zigzag scanning and encoding of the quantized data according to the arrow shown in FIG. 6 enables efficient compressed image data with a high compression rate to be obtained.

【0068】そして、上記のジグザグスキャンは、図2
に示すCPU21により行われる。即ち、CPU21
は、DCT係数バッファ27cからバッファメモリ23
に転送されたDCT係数に対して量子化処理を施した
後、図6に示される順番でジグザグスキャンを実行して
読み取った値を符号化することにより、高圧縮率の圧縮
画像データを得るわけである。しかしながら、各周波数
成分は、読み取る順番に並べられていないので各周波数
成分の格納アドレスは不連続なものとなっているため、
CPU21にとって読み出しに手間がかかる。
Then, the above zigzag scan is performed as shown in FIG.
Is performed by the CPU 21 shown in FIG. That is, the CPU 21
From the DCT coefficient buffer 27c to the buffer memory 23
After performing a quantization process on the DCT coefficients transferred to the, the zigzag scan is performed in the order shown in FIG. 6 and the read values are encoded to obtain compressed image data with a high compression ratio. It is. However, since the respective frequency components are not arranged in the reading order, the storage addresses of the respective frequency components are discontinuous.
It takes time for the CPU 21 to read.

【0069】そのため、予めDCT係数を格納するとき
に、アドレス生成回路32により生成されたジグザグス
キャン順の格納アドレスに基づいて、各周波数成分をジ
グザグスキャン順に並べて格納することにより、CPU
21の手間を省くようにしている。即ち、CPU21が
各周波数成分をジグザグにスキャンする必要が無く、連
続してアクセスして量子化などの処理を行うことができ
る。
Therefore, when the DCT coefficients are stored in advance, the frequency components are arranged and stored in the zigzag scan order based on the storage addresses in the zigzag scan order generated by the address generation circuit 32.
The effort of 21 is saved. That is, there is no need for the CPU 21 to scan each frequency component zigzag, and it is possible to perform continuous access and perform processing such as quantization.

【0070】図5に示すように、アドレス生成回路32
は、第1,第2の格納アドレス生成回路38,39と、
切り替え回路40とから構成されている。第1の格納ア
ドレス生成回路38は、図4に示されるDCT演算器3
1により算出されるDCT係数に対してジグザグスキャ
ン順のアドレス信号を生成するものである。第1の格納
アドレス生成回路38は、生成したジグザグスキャン順
アドレス信号を切り替え回路40に出力する。第2の格
納アドレス生成回路39は、DCT演算器31により算
出されるDCT係数に対して算出順のアドレス信号を生
成するものである。第2の格納アドレス生成回路39
は、生成した算出順アドレス信号を切り替え回路40に
出力する。切り替え回路40には、図4に示される制御
レジスタ36の選択ビットに応じた選択信号が入力さ
れ、その選択ビットはCPU21により設定される。即
ち、CPU21は、生成するアドレス信号の順番に応じ
て制御レジスタ36の選択ビットをセットし、切り替え
回路40にはその選択ビットに応じた選択信号が入力さ
れる。そして、切り替え回路40は、選択信号に基づい
て、第1,第2の格納アドレス生成回路38,39から
入力される両アドレス信号の内の一方を選択し、その選
択したアドレス信号をDCT係数バッファ27cに出力
する。すると、DCT係数バッファ27cは、入力され
るアドレス信号に基づいて、DCT演算器31から出力
されるDCT係数(周波数成分)を対応するアドレスに
格納する。
As shown in FIG. 5, the address generation circuit 32
Include first and second storage address generation circuits 38 and 39,
And a switching circuit 40. The first storage address generation circuit 38 is provided with the DCT operator 3 shown in FIG.
This is to generate an address signal in a zigzag scan order with respect to the DCT coefficient calculated by (1). The first storage address generation circuit 38 outputs the generated zigzag scan order address signal to the switching circuit 40. The second storage address generation circuit 39 generates an address signal in the calculation order for the DCT coefficient calculated by the DCT calculator 31. Second storage address generation circuit 39
Outputs the generated calculation order address signal to the switching circuit 40. A selection signal corresponding to a selection bit of the control register 36 shown in FIG. 4 is input to the switching circuit 40, and the selection bit is set by the CPU 21. That is, the CPU 21 sets the selection bits of the control register 36 in accordance with the order of the generated address signals, and the switching circuit 40 receives a selection signal corresponding to the selected bits. Then, the switching circuit 40 selects one of the two address signals input from the first and second storage address generation circuits 38 and 39 based on the selection signal, and converts the selected address signal into a DCT coefficient buffer. 27c. Then, the DCT coefficient buffer 27c stores the DCT coefficient (frequency component) output from the DCT calculator 31 at the corresponding address based on the input address signal.

【0071】例えば、DCT係数を、DCT係数バッフ
ァ27cの0000番地から格納する場合について説明す
る。この時、DCT演算器31は、その演算結果である
DCT係数a00 〜a63 を、その算出順であるa00,a01,a0
2,・・・,a61,a62,a63の順番出力する。一方、第1の格
納アドレス生成回路38は、ジグザグスキャンの順番に
対応したアドレス信号を出力する。例えば、DCT係数
a00 は一番最初に読み込まれ、DCT係数a01 は2番目
に読み込まれる。そして、DCT係数a02 は5番目に、
DCT係数a03 は6番目に読み込まれる。従って、第1
の格納アドレス生成回路38は、DCT係数a00 に対応
してアドレス0000を、DCT係数a01 に対応してアドレ
ス0001を生成する。更に、第1の格納アドレス生成回路
38は、DCT係数a02 に対応してアドレス0005を、D
CT係数a03 に対応してアドレス0006を生成する。
For example, a case where DCT coefficients are stored from the address 0000 of the DCT coefficient buffer 27c will be described. At this time, the DCT calculator 31 converts the DCT coefficients a00 to a63, which are the calculation results, into a00, a01, a0 in the calculation order.
2, ..., a61, a62, a63 are output in order. On the other hand, the first storage address generation circuit 38 outputs an address signal corresponding to the zigzag scan order. For example, DCT coefficient
a00 is read first and the DCT coefficient a01 is read second. And the DCT coefficient a02 is the fifth,
The DCT coefficient a03 is read sixth. Therefore, the first
Generates an address 0000 corresponding to the DCT coefficient a00 and an address 0001 corresponding to the DCT coefficient a01. Further, the first storage address generation circuit 38 stores the address 0005 corresponding to the DCT coefficient a02
An address 0006 is generated corresponding to the CT coefficient a03.

【0072】即ち、第1の格納アドレス生成回路38
は、DCT演算器31から出力されるDCT係数a00,a0
1,a02,a03,・・・,a60,a61,a62,a63に対応して、アドレ
ス0000,0001,0005,0006,・・・,0057,0058,0062,0036を
生成し出力する。その結果、DCT係数バッファ27c
には、アドレス0000〜0063に対して、DCT係数a00 〜
a63 がa00,a01,a08,a16,a09,a02,a03,a10,・・・,a55,a
62,a63の順番に格納されると共に、図2に示されるバッ
ファメモリ23に同じ順番で転送される。
That is, the first storage address generation circuit 38
Are the DCT coefficients a00, a0 output from the DCT calculator 31.
, A60, a61, a62, a63, and generates and outputs addresses 0000,0001,0005,0006, ..., 0057,0058,0062,0036. As a result, the DCT coefficient buffer 27c
Have the DCT coefficients a00 to
a63 is a00, a01, a08, a16, a09, a02, a03, a10, ..., a55, a
It is stored in the order of 62, a63, and transferred to the buffer memory 23 shown in FIG. 2 in the same order.

【0073】この順番は、符号化におけるジグザグスキ
ャンの順番であるため、図2中のCPU21は、アドレ
ス0000から順番にアクセスするだけで、ジグザグスキャ
ンの順番にDCT係数を読み出すことができる。そのた
め、CPU21により不連続にDCT係数を読み出す必
要が無く、CPU21によりジグザグスキャン順に並び
替える必要がないので、その手間が省略される。
This order is the order of the zigzag scan in the encoding, so that the CPU 21 in FIG. 2 can read out the DCT coefficients in the order of the zigzag scan simply by accessing in order from the address 0000. Therefore, it is not necessary for the CPU 21 to read the DCT coefficients discontinuously, and it is not necessary for the CPU 21 to rearrange the DCT coefficients in the zigzag scan order, so that the trouble is eliminated.

【0074】尚、図2中のCPU21の高速化等により
ジグザグスキャン順に並び替える処理が負荷とならない
場合や、ジグザグスキャンそのものを必要としない符号
化等の場合には、CPU21は、DCT係数をその算出
順にDCT係数バッファ27cに格納することも可能で
ある。即ち、CPU21は、図4に示される制御レジス
タ36に対して、図5に示される切り替え回路40にて
第2の格納アドレス生成回路39から出力される算出順
のアドレス信号が選択されるように設定する。そのアド
レス信号によりDCT係数バッファ27cにはDCT係
数が算出順に順次格納される。
In the case where the processing for rearranging in the zigzag scan order does not impose a load due to the speeding up of the CPU 21 in FIG. 2 or in the case of encoding that does not require the zigzag scan itself, the CPU 21 determines the DCT coefficient by It is also possible to store them in the DCT coefficient buffer 27c in the order of calculation. That is, the CPU 21 controls the control register 36 shown in FIG. 4 so that the switching circuit 40 shown in FIG. 5 selects the address signals in the calculation order output from the second storage address generation circuit 39. Set. According to the address signal, the DCT coefficients are sequentially stored in the DCT coefficient buffer 27c in the calculation order.

【0075】図3に示される量子化予測回路33は、D
CT係数バッファ27cに格納されたDCT係数に対し
て次に施されるCPU21による量子化処理の負荷を軽
減するために設けられている。量子化予測回路33は、
量子化処理において量子化後の値が予め設定された所定
値(例えば「0」)になるものを検出し、その「0」と
なるDCT係数に対して符号を付加する。
The quantization prediction circuit 33 shown in FIG.
It is provided to reduce the load of the quantization process performed by the CPU 21 on the DCT coefficient stored in the CT coefficient buffer 27c next. The quantization prediction circuit 33
In the quantization processing, a value whose value after quantization becomes a predetermined value (for example, “0”) is detected, and a sign is added to the DCT coefficient that becomes “0”.

【0076】前に述べたように、DCT演算後のDCT
係数(周波数成分)は、図6に示すように、DC成分
(左上の最初の位置に配置された周波数成分)の値が最
も大きく、周波数が高くなるにつれて値が減少する。そ
して、量子化後のデータは、最高周波数では「0」に近
くなる場合が多い。
As described above, the DCT after the DCT operation is performed.
As shown in FIG. 6, the coefficient (frequency component) has the largest value of the DC component (the frequency component located at the first position on the upper left), and decreases as the frequency increases. Then, the quantized data is often close to “0” at the highest frequency.

【0077】従って、CPU21は、量子化処理におい
て読み込んだDCT係数の符号を検査する。そして、D
CT係数に対して上記の符号が付加されている場合、C
PU21は、「0」を格納して読み出したDCT係数に
対する量子化処理を省略する。すると、量子化後に
「0」となるDCT係数に対する量子化処理が省略でき
るので、CPU21による演算の負荷が低減する。更
に、CPU21における符号の検査時間は、量子化に必
要な時間に比べて短いので、量子化における処理時間が
短縮される。
Accordingly, the CPU 21 checks the sign of the DCT coefficient read in the quantization processing. And D
When the above-mentioned code is added to the CT coefficient, C
The PU 21 omits the quantization processing on the DCT coefficient read by storing “0”. Then, since the quantization process for the DCT coefficient which becomes “0” after the quantization can be omitted, the calculation load of the CPU 21 is reduced. Furthermore, since the code inspection time in the CPU 21 is shorter than the time required for quantization, the processing time in quantization is reduced.

【0078】具体的には、量子化予測回路33は、入力
されるDCT係数Svuと、係数メモリ25に予め格納さ
れた量子化テーブルの各量子化係数Qvuとを比較する。
そして、量子化予測回路33は、量子化した時の値Sq
vu=round(Svu ÷Qvu)による解が0(ゼロ)となるかど
うかによって予測処理を行う。尚、round は、丸め込み
処理であって、この場合には小数点以下を四捨五入する
処理をいう。
More specifically, the quantization prediction circuit 33 compares the input DCT coefficient Svu with each quantization coefficient Qvu of a quantization table stored in the coefficient memory 25 in advance.
Then, the quantization prediction circuit 33 calculates the value Sq at the time of quantization.
The prediction process is performed depending on whether or not the solution by vu = round (SvuuQvu) becomes 0 (zero). Note that round is a rounding process, and in this case, a process of rounding off a decimal part.

【0079】比較の結果、Sqvu=0と予測されるDC
T係数Svuの場合、量子化予測回路33は、それを示す
符号をDCT係数Svuに対して付加し、DCT係数バッ
ファ27cに再格納する。
As a result of the comparison, DC which is predicted to be Sqvu = 0
In the case of the T coefficient Svu, the quantization prediction circuit 33 adds a code indicating the Tv to the DCT coefficient Svu and re-stores it in the DCT coefficient buffer 27c.

【0080】図8に示すように、量子化予測回路33
は、ビット操作部41、比較部42、及び、データ生成
部43を備えている。ビット操作部41にはDCT係数
バッファ27cに格納されたDCT係数が順次入力され
る。ビット操作部41は、量子化で行われるround (丸
め込み)処理による結果と、比較器にて行われる予測処
理との結果の相違がでないようにするために設けられて
いる。又、ビット操作部41は、比較器における比較処
理の簡素化のために、入力されるDCT係数Svuに対し
てビット操作を行うために設けられている。
As shown in FIG. 8, the quantization prediction circuit 33
Includes a bit operation unit 41, a comparison unit 42, and a data generation unit 43. The DCT coefficients stored in the DCT coefficient buffer 27c are sequentially input to the bit operation unit 41. The bit operation unit 41 is provided to prevent a difference between a result of a round (rounding) process performed by quantization and a result of a prediction process performed by a comparator from occurring. In addition, the bit operation unit 41 is provided for performing a bit operation on the input DCT coefficient Svu to simplify the comparison process in the comparator.

【0081】ビット操作部41は、入力されたDCT係
数SvuのMSBの値を検査する。そして、MSB=
(0)B の場合、ビット操作部41は、DCT係数のM
SBを(1)B にセットし、DCT係数を負の値とす
る。尚、(0)B は、バイナリデータであることを示
す。これにより、次の比較部42において入力されるD
CT係数と量子化係数との比較を加算処理にて行うこと
により、比較処理を簡素化するためである。
The bit operation unit 41 checks the value of the MSB of the input DCT coefficient Svu. And MSB =
In the case of (0) B, the bit operation unit 41 determines that the DCT coefficient M
Set SB to (1) B and set the DCT coefficient to a negative value. Note that (0) B indicates binary data. As a result, D input in the next comparing section 42
This is to simplify the comparison process by comparing the CT coefficient and the quantization coefficient by an addition process.

【0082】一般に、比較処理は、減算した結果の正負
により判断される。しかしながら、減算処理は回路規模
が大きくなる。そのため、一方を予め負の値に変更する
ことにより、回路規模の小さな加算処理(加算回路)に
て比較処理を行うことが可能となる。
Generally, the comparison process is determined by the sign of the result of the subtraction. However, the circuit size of the subtraction processing becomes large. Therefore, by changing one of them to a negative value in advance, it is possible to perform the comparison process by an addition process (addition circuit) having a small circuit scale.

【0083】又、ビット操作部41は、入力されるDC
T係数に対してLSBに(0)B を付加してLSB拡張
を施す。これは、最終的な量子化の際に、小数点以下の
値はround 処理によって四捨五入され、量子化の結果と
予測とが異なる場合がある。そのため、予めLSBを拡
張しておくことにより、量子化の結果と予測とを同じに
する訳である。
The bit operation unit 41 receives the input DC
LSB extension is performed by adding (0) B to the LSB for the T coefficient. This is because, at the time of final quantization, the value after the decimal point is rounded off by round processing, and the result of quantization and the prediction may be different. Therefore, by extending the LSB in advance, the result of quantization and the prediction are the same.

【0084】ビット操作部41は、以上の処理結果を比
較部42に出力する。比較部42には、係数メモリ25
に格納された量子化テーブルの各量子化係数が入力され
る。比較部42は、本実施形態では加算器よりなり、ビ
ット操作部41から入力される処理後のDCT係数と、
量子化係数とを加算し、その加算結果を比較結果として
データ生成部43に出力する。
The bit operating section 41 outputs the above processing result to the comparing section 42. The comparison unit 42 includes a coefficient memory 25
Are input as the quantization coefficients stored in the quantization table. The comparison unit 42 includes an adder in the present embodiment, and includes a processed DCT coefficient input from the bit operation unit 41,
The result is added to the quantization coefficient, and the addition result is output to the data generation unit 43 as a comparison result.

【0085】データ生成部43には、前記比較部42に
より比較結果が入力される。又、データ生成部43に
は、DCT係数バッファ27cに格納されたDCT係数
が入力される。データ生成部43は、比較結果に基づい
て、DCT係数に対して所定の値を付加する。具体的に
は、データ生成部43は、入力されるDCT係数がnビ
ットの場合、そのDCT係数のMSBを拡張してn+1
ビットの値にする。そして、データ生成部43は、比較
結果に基づいて、拡張したMSBに対して(0)B 又は
(1)B を格納する。これにより、基のDCT係数に対
して、比較結果が付加されてDCT係数バッファ27c
に再格納される。
The data generator 43 receives the comparison result from the comparator 42. Further, the DCT coefficient stored in the DCT coefficient buffer 27c is input to the data generation unit 43. The data generator 43 adds a predetermined value to the DCT coefficient based on the comparison result. Specifically, when the input DCT coefficient is n bits, the data generation unit 43 expands the MSB of the DCT coefficient to n + 1
Set to a bit value. Then, the data generating unit 43 stores (0) B or (1) B for the extended MSB based on the comparison result. As a result, the comparison result is added to the original DCT coefficient, and the DCT coefficient buffer 27c
Is stored again.

【0086】比較部42において、DCT係数と量子化
係数との加算結果が正の値、即ち、量子化係数の方がD
CT係数よりも大きい場合、量子化におけるround 処理
を含めて量子化結果が「0」であることを示す。そし
て、本実施形態では、データ生成部43は、量子化結果
が「0」であるDCT係数に対して(1)B を付加し、
「0」とならないDCT係数に対して(0)B を付加す
る。データ生成部43は、この所定の値を付加したDC
T係数を、DCT係数バッファ27cに再格納する。
In the comparing section 42, the addition result of the DCT coefficient and the quantization coefficient is a positive value, that is, the quantization coefficient is
If it is larger than the CT coefficient, it indicates that the quantization result is "0" including the round processing in the quantization. Then, in the present embodiment, the data generation unit 43 adds (1) B to the DCT coefficient whose quantization result is “0”,
(0) B is added to DCT coefficients that do not become “0”. The data generation unit 43 outputs the DC value to which the predetermined value has been added.
The T coefficient is stored again in the DCT coefficient buffer 27c.

【0087】次に、量子化における丸め込み処理(roun
d )処理について、具体例を示して説明する。例えば、
量子化係数Qvu=4,DCT係数Svu=2の場合、量子
化によって得られる値Sqvuは、 Sqvu=round(Svu÷Qvu) であるので、 Sqvu=round(2÷4)=round(0.5)
=1 となり、Sqvu≠0である。これを、ビット操作部41
におけるLSB拡張を実行しないで、比較部42による
処理を行うと、 Sqvu0 =Qvu−Svu=4−2=2 となり、Sqvu0 >0であるので、Sqvu=0と判断し
てしまい、本来の量子化とは異なる結果を得ることにな
ってしまう。
Next, a rounding process (roun
d) The processing will be described with a specific example. For example,
When the quantization coefficient Qvu = 4 and the DCT coefficient Svu = 2, the value Sqvu obtained by quantization is Sqvu = round (Svu ÷ Qvu), so that Sqvu = round (2 ÷ 4) = round (0.5) )
= 1 and Sqvu ≠ 0. This is transmitted to the bit operation unit 41
When the processing by the comparing unit 42 is performed without performing the LSB extension in Sqvu0 = Qvu−Svu = 4-2 = 2 and Sqvu0> 0, it is determined that Sqvu = 0, and the original quantization is performed. You will get different results.

【0088】そこで、ビット操作部41にてLSB拡張
を実行して、比較部42による処理を行うと、Svu=
(0010)B であるので、LSB拡張すると、その値
Svu1=(00100)B となる。すると、 Sqvu1 =Qvu−Svu1 =4−4=0 となり、Sqvu1 ≦0であるので、量子化予測回路33
はSqvu≠0と判断し、本来の量子化と同じ結果を得ら
れる。
Then, when the LSB extension is executed by the bit operation unit 41 and the processing by the comparison unit 42 is performed, Svu =
Since it is (0010) B, the value Svu1 = (00100) B when LSB-extended. Then, Sqvu1 = Qvu-Svu1 = 4-4 = 0, and since Sqvu1≤0, the quantization prediction circuit 33
Is determined as Sqvu ≠ 0, and the same result as the original quantization can be obtained.

【0089】又、量子化係数Qvu=5,DCT係数Svu
=2の場合、量子化によって得られる値Sqvuは、 Sqvu=round(2÷5)=round(0.4)
=0 となり、Sqvu=0である。そして、比較部42による
処理を行うと、 Sqvu1 =Qvu−Svu1 =5−4=1 となり、Sqvu1 >0であるので、量子化予測回路33
はSqvu=0と判断し、本来の量子化と同じ結果を得ら
れる。
Also, the quantization coefficient Qvu = 5, the DCT coefficient Svu
When = 2, the value Sqvu obtained by quantization is: Sqvu = round (2 ÷ 5) = round (0.4)
= 0 and Sqvu = 0. Then, when the processing by the comparing unit 42 is performed, Sqvu1 = Qvu-Svu1 = 5-4 = 1, and Sqvu1> 0.
Is determined to be Sqvu = 0, and the same result as the original quantization can be obtained.

【0090】又、量子化係数Qvu=3,DCT係数Svu
=2の場合、量子化によって得られる値Sqvuは、 Sqvu=round(2÷3)=round(0.66
7)=1 となり、Sqvu≠0である。そして、比較部42による
処理を行うと、 Sqvu1 =Qvu−Svu1 =3−4=−1 となり、Sqvu1 ≦0であるので、量子化予測回路33
はSqvu≠0と判断し、本来の量子化と同じ結果を得ら
れる。
Also, the quantization coefficient Qvu = 3, the DCT coefficient Svu
= 2, the value Sqvu obtained by quantization is: Sqvu = round (2 ÷ 3) = round (0.66)
7) = 1, and Sqvu ≠ 0. Then, when the processing by the comparing unit 42 is performed, Sqvu1 = Qvu−Svu1 = 3-4 = −1, and Sqvu1 ≦ 0.
Is determined as Sqvu ≠ 0, and the same result as the original quantization can be obtained.

【0091】以上記述したように、本実施の形態によれ
ば、以下の効果を奏する。 (1)マイコン14は、内部バスに接続されたCPU2
1と、DCT演算部を備える。DCT演算部は、DCT
演算器31と、画像バッファ27a、中間値バッファ2
7b、DCT係数バッファ27cを備える。DCT演算
器31は、画像バッファ27aに格納された画像データ
に対して1回目の一次元DCT演算を実行して中間値バ
ッファ27bに格納し、中間値バッファに格納した中間
データに対して2回目の一次元DCT演算を実行してD
CT係数バッファ27cに格納する。従って、DCT演
算器31が1回目の一次元DCT演算を実行して最中
に、前に演算されたDCT係数が転送され、2回目の一
次元DCT演算を実行して最中に、次に演算する画像デ
ータが転送される。従って、DCT演算と演算後のDC
T係数の転送とが並列に実行される。又、CPU21
は、上記の圧縮伸長処理における各データの転送に関与
せず、圧縮伸長処理の選択及び処理の開始を通知するの
みである。その結果、画像データの圧縮処理時にはDC
T演算器31によるDCT演算と、CPU21による量
子化及び符号化とが並列に実行されるため、処理が高速
化される。又、DCT演算器31を回路により構成した
ので、ソフトウェアに比べて高速に演算することができ
ると共に、全ての処理を回路により構成した場合に比べ
て回路規模が小さくなるので、マイコン14のコストア
ップを抑えることができる。
As described above, the present embodiment has the following advantages. (1) The microcomputer 14 is the CPU 2 connected to the internal bus.
1 and a DCT operation unit. The DCT operation part is a DCT
Arithmetic unit 31, image buffer 27a, intermediate value buffer 2
7b and a DCT coefficient buffer 27c. The DCT calculator 31 executes the first one-dimensional DCT operation on the image data stored in the image buffer 27a, stores the image data in the intermediate value buffer 27b, and executes the second time on the intermediate data stored in the intermediate value buffer. Performs a one-dimensional DCT operation of
It is stored in the CT coefficient buffer 27c. Accordingly, while the DCT calculator 31 performs the first one-dimensional DCT operation, the previously calculated DCT coefficient is transferred, and during the execution of the second one-dimensional DCT operation, Image data to be calculated is transferred. Therefore, DCT operation and DC after operation
The transfer of the T coefficient is executed in parallel. Also, the CPU 21
Does not involve in the transfer of each data in the above-mentioned compression / decompression processing, but only notifies the selection of the compression / decompression processing and the start of the processing. As a result, during the compression processing of the image data, the DC
Since the DCT calculation by the T calculator 31 and the quantization and encoding by the CPU 21 are performed in parallel, the processing is speeded up. In addition, since the DCT calculator 31 is constituted by a circuit, the operation can be performed at a higher speed than software, and the circuit scale becomes smaller than when all the processing is constituted by a circuit. Can be suppressed.

【0092】(2)マイコン14のDCT演算部24に
は、アドレス生成回路32が設けられている。アドレス
生成回路32は、第1,第2の格納アドレス生成回路3
8,39と、切り替え回路40とから構成されている。
第1の格納アドレス生成回路38は、図4に示されるD
CT演算器31により算出されるDCT係数に対してジ
グザグスキャン順のアドレス信号を生成するものであ
る。第1の格納アドレス生成回路38は、生成したジグ
ザグスキャン順アドレス信号を切り替え回路40を介し
てDCT係数バッファ27cに出力する。従って、DC
T演算器31から出力されるDCT係数は、第1の格納
アドレス生成回路38により生成されたジグザグスキャ
ン順の格納アドレスに基づいて、各周波数成分をジグザ
グスキャン順に並べて格納される。その結果、CPU2
1は各周波数成分をジグザグにスキャンする必要が無
く、連続してアクセスして量子化などの処理を行うこと
ができるので、CPU21の手間が省略され、負荷が低
減する。
(2) The DCT operation section 24 of the microcomputer 14 is provided with an address generation circuit 32. The address generation circuit 32 includes the first and second storage address generation circuits 3
8, 39 and a switching circuit 40.
The first storage address generation circuit 38 outputs the D
It generates an address signal in a zigzag scan order for the DCT coefficient calculated by the CT calculator 31. The first storage address generation circuit 38 outputs the generated zigzag scan order address signal to the DCT coefficient buffer 27c via the switching circuit 40. Therefore, DC
The DCT coefficients output from the T calculator 31 are stored by arranging the respective frequency components in the zigzag scan order based on the storage addresses in the zigzag scan order generated by the first storage address generation circuit 38. As a result, CPU2
No. 1 does not need to scan each frequency component zigzag, and can perform processing such as quantization by accessing continuously, so that the work of the CPU 21 is omitted and the load is reduced.

【0093】(3)マイコン14のDCT演算部24に
は、係数メモリ25と量子化予測回路33とが備えられ
る。係数メモリ25には、量子化処理に用いられる量子
化係数からなる量子化テーブルが予め設定され格納され
る。量子化予測回路33は、DCT演算器31により生
成されDCT係数バッファ27cに格納されるDCT係
数と、係数メモリ25から読み出された量子化係数とを
比較し、その比較結果に基づいて、DCT係数が量子化
処理によって「0」となるか否かを予測し、「0」とな
るDCT係数に対して拡張したMSBに(1)B を格納
して符号を付加するようにした。その結果、DCT係数
に対して上記の符号が付加されている場合、CPU21
は、「0」を格納して読み出したDCT係数に対する量
子化処理を省略できるので、CPU21による演算の負
荷が低減する。更に、CPU21における符号の検査時
間は、量子化に必要な時間に比べて短いので、量子化に
おける処理時間が短縮される。
(3) The DCT operation section 24 of the microcomputer 14 includes a coefficient memory 25 and a quantization prediction circuit 33. In the coefficient memory 25, a quantization table including quantization coefficients used for the quantization process is set and stored in advance. The quantization prediction circuit 33 compares the DCT coefficient generated by the DCT calculator 31 and stored in the DCT coefficient buffer 27c with the quantization coefficient read from the coefficient memory 25, and based on the comparison result, Whether or not the coefficient becomes “0” by the quantization process is predicted, and (1) B is stored in the MSB extended for the DCT coefficient that becomes “0” and a sign is added. As a result, when the above-mentioned code is added to the DCT coefficient, the CPU 21
Can omit the quantization process for the DCT coefficient read by storing “0”, so that the calculation load of the CPU 21 is reduced. Furthermore, since the code inspection time in the CPU 21 is shorter than the time required for quantization, the processing time in quantization is reduced.

【0094】(第二実施形態)次に、本発明を具体化し
た第二実施形態を図2,図9〜図11に従って説明す
る。尚、説明の便宜上、前記第一実施形態と同様の構成
については同一の符号を付してその説明を一部省略す
る。
(Second Embodiment) Next, a second embodiment of the present invention will be described with reference to FIGS. For convenience of description, the same components as those in the first embodiment are denoted by the same reference numerals, and the description thereof will be partially omitted.

【0095】本実施形態において、図2に示される係数
メモリ25には、複数の量子化テーブル及び符号化テー
ブルが格納されている。複数の量子化テーブル及び符号
化テーブルは、圧縮処理を行う画像データの傾向に対応
して予め設定され、係数メモリ25に格納されている。
In this embodiment, the coefficient memory 25 shown in FIG. 2 stores a plurality of quantization tables and encoding tables. The plurality of quantization tables and encoding tables are set in advance in accordance with the tendency of image data to be subjected to compression processing, and are stored in the coefficient memory 25.

【0096】画像データは、一般的に、DCT演算後の
DCT係数(周波数成分)の値が、低周波領域において
大きく、周波数が高くなるにつれて小さくなる。又、人
間の視覚は、低周波領域における輝度の差には敏感であ
るが、高周波に対して鈍感である。そのため、低周波領
域において量子化テーブルを構成する量子化係数を小さ
な値に設定し、輝度の差を再現しやすくする。又、高周
波領域において量子化係数を大きな値に設定し、符号化
において高圧縮率化を図っている。
In the image data, generally, the value of the DCT coefficient (frequency component) after the DCT operation is large in a low frequency region, and decreases as the frequency increases. Also, human vision is sensitive to luminance differences in the low frequency range, but insensitive to high frequencies. Therefore, in the low frequency region, the quantization coefficients constituting the quantization table are set to small values, and the difference in luminance is easily reproduced. In addition, the quantization coefficient is set to a large value in a high-frequency region to achieve a high compression ratio in encoding.

【0097】しかしながら、画像によっては、高周波領
域における情報量が多いものがある。この画像を一般的
な量子化テーブルを用いて量子化すると、高周波領域に
おける情報が欠落して、再現された画像が基の画像に対
して大きく変わったものになってしまう。又、高周波領
域における情報量が多い画像データを一般的な量子化テ
ーブル及び符号化テーブルを用いて圧縮した場合、圧縮
率が高くならない場合がある。
However, some images have a large amount of information in a high-frequency region. If this image is quantized using a general quantization table, information in the high-frequency region is lost, and the reproduced image is significantly different from the original image. Further, when image data having a large amount of information in a high frequency region is compressed using a general quantization table and an encoding table, the compression ratio may not be high.

【0098】そのため、画像データの傾向を周波数成分
に対応して求めると共に、画像データの傾向に対応した
複数の量子化テーブル及び符号化テーブルを予め設定し
ておく。そして、求めた画像データの傾向に対応した量
子化テーブル及び符号化テーブルを利用して情報を保持
して圧縮すると共に、圧縮率を高めるようにしている。
For this purpose, the tendency of the image data is determined corresponding to the frequency component, and a plurality of quantization tables and encoding tables corresponding to the tendency of the image data are set in advance. Then, information is held and compressed using a quantization table and an encoding table corresponding to the tendency of the obtained image data, and the compression ratio is increased.

【0099】図9に示すように、DCT演算部24に
は、DCT演算器31、アドレス生成回路32、及び、
テーブル判定回路50が設けられている。尚、DCT演
算器31及びアドレス生成回路32は、上記第一実施形
態と同じであるため、詳細な説明を省略する。
As shown in FIG. 9, the DCT operation unit 24 includes a DCT operation unit 31, an address generation circuit 32,
A table determination circuit 50 is provided. Since the DCT calculator 31 and the address generation circuit 32 are the same as those in the first embodiment, detailed description will be omitted.

【0100】テーブル判定回路50は、前記係数メモリ
25に格納された複数の量子化テーブル、符号化テーブ
ルの内の1つを選択するための選択情報を生成するため
に設けられている。図2中のCPU21は、テーブル判
定回路50において生成された選択情報を読み出し、そ
の選択情報に基づいて係数メモリ25に格納された複数
の量子化テーブル及び符号化テーブルの内の1つを選択
する。そして、CPU21は、選択したテーブルに基づ
いて量子化及び符号化処理を行って圧縮画像データを生
成し、その圧縮画像データをフラッシュメモリ17に格
納する。
The table determination circuit 50 is provided for generating selection information for selecting one of a plurality of quantization tables and coding tables stored in the coefficient memory 25. The CPU 21 in FIG. 2 reads out the selection information generated by the table determination circuit 50, and selects one of the plurality of quantization tables and coding tables stored in the coefficient memory 25 based on the selection information. . Then, the CPU 21 performs quantization and encoding processing based on the selected table to generate compressed image data, and stores the compressed image data in the flash memory 17.

【0101】フラッシュメモリ17に格納された圧縮画
像データは、基の画像の傾向に基づいて選択された量子
化テーブル及び符号化テーブルを用いて処理されてい
る。そのため、圧縮画像データには、基の画像の情報が
欠落することがなく含まれると共に、高い圧縮率にて作
成される。
The compressed image data stored in the flash memory 17 is processed using a quantization table and an encoding table selected based on the tendency of the original image. Therefore, the compressed image data includes the information of the original image without any loss, and is created at a high compression rate.

【0102】次に、テーブル判定回路50の構成を詳述
する。図10に示すように、テーブル判定回路50に
は、閾値レジスタ51、セレクタ52、比較器53、制
御部54、及び、カウンタ55が設けられている。閾値
レジスタ51は、前記DCT係数の傾向に対応して分割
された複数の領域に対応した数だけ設けられている。
尚、本実施形態では、図11に示すように、DCT係数
の周波数成分を4つの領域に分割し、各領域に対応して
4つの閾値レジスタ51a〜51dが設けられている。
Next, the configuration of the table determination circuit 50 will be described in detail. As shown in FIG. 10, the table determination circuit 50 includes a threshold register 51, a selector 52, a comparator 53, a control unit 54, and a counter 55. The threshold registers 51 are provided in a number corresponding to a plurality of areas divided according to the tendency of the DCT coefficient.
In this embodiment, as shown in FIG. 11, the frequency component of the DCT coefficient is divided into four regions, and four threshold registers 51a to 51d are provided for each region.

【0103】図11に示すように、前記DCT演算部2
4により演算され出力されるDCT係数の周波数成分
は、低周波側から高周波側へと並べられる。そして、本
実施形態では、DCT係数の周波数成分を、図11にお
ける縦方向と横方向とにそれぞれ2分割し、合計4つの
領域に分割している。
As shown in FIG. 11, the DCT operation unit 2
The frequency components of the DCT coefficients calculated and output by step 4 are arranged from the low frequency side to the high frequency side. In the present embodiment, the frequency component of the DCT coefficient is divided into two in each of the vertical direction and the horizontal direction in FIG. 11 to be divided into a total of four regions.

【0104】各閾値レジスタ51a〜51dには、CP
U21によりDCT係数の各領域に対応した閾値が書き
込まれる。例えば、通常のDCT係数は、低周波成分が
大きく高周波成分ほど小さくなる傾向にあるため、平均
的な画像データを量子化する場合には、閾値を大きくす
ると高周波成分のほとんどが「0」となり、圧縮率が高
くなる。そのため、低周波側の領域に対応して低周波側
の領域の閾値を最も大きく、高周波側の領域の閾値を最
も小さくすることにより、画像データの傾向を求めるこ
とができる。
Each of the threshold registers 51a-51d has a CP
The threshold corresponding to each area of the DCT coefficient is written by U21. For example, a normal DCT coefficient tends to have a large low-frequency component and a small high-frequency component. Therefore, when quantizing average image data, when the threshold is increased, most of the high-frequency components become “0”, The compression ratio increases. Therefore, the tendency of the image data can be obtained by setting the threshold value of the low frequency region to be the largest and the threshold value of the high frequency region to be the smallest corresponding to the low frequency region.

【0105】各閾値レジスタ51a〜51dに格納され
た閾値は、セレクタ52を介して比較器53に出力され
る。比較器53は、DCT演算器31に接続されてい
る。DCT演算器31は、図4に示される画像バッファ
27aに格納された1ブロック分(8×8画素)の画像
データに対してDCT演算処理を施し、その演算結果を
DCT係数としてDCT係数バッファ27cに格納す
る。そして、比較器53には、DCT演算器31から出
力されるその時々のDCT係数が入力される。
The threshold values stored in each of the threshold value registers 51a to 51d are output to the comparator 53 via the selector 52. The comparator 53 is connected to the DCT calculator 31. The DCT calculator 31 performs a DCT calculation process on the image data of one block (8 × 8 pixels) stored in the image buffer 27a shown in FIG. 4, and uses the calculation result as a DCT coefficient in the DCT coefficient buffer 27c. To be stored. The DCT coefficient output from the DCT calculator 31 at each time is input to the comparator 53.

【0106】セレクタ52は、制御部54に接続され、
その制御部54から選択信号が入力される。その選択信
号は、DCT係数バッファ27cに格納されるDCT係
数のアドレス信号に基づいて生成され、セレクタ52に
出力される。そして、セレクタ52は、選択信号に基づ
いて、その時々にDCT係数に格納されるDCT係数が
属する領域に対応した閾値レジスタ51a〜51dに格
納された敷地を比較器53に出力する。比較器53は、
DCT係数が入力される毎に、入力されるDCT係数
と、そのDCT係数が属する領域に対応した閾値レジス
タ51a〜51dから読み出された閾値とを比較し、そ
の比較結果を制御部54に出力する。
The selector 52 is connected to the control unit 54,
A selection signal is input from the control unit 54. The selection signal is generated based on the DCT coefficient address signal stored in the DCT coefficient buffer 27c, and is output to the selector 52. Then, based on the selection signal, the selector 52 outputs to the comparator 53 the sites stored in the threshold registers 51a to 51d corresponding to the area to which the DCT coefficient stored each time belongs. The comparator 53 is
Each time a DCT coefficient is input, the input DCT coefficient is compared with a threshold read out from threshold registers 51a to 51d corresponding to the area to which the DCT coefficient belongs, and the comparison result is output to control unit 54. I do.

【0107】制御部54には、前記DCT係数を分割し
た領域に対応した数のカウンタ55が接続されている。
本実施形態では、DCT係数を4つの領域に分割してい
るため、制御部54には、4つのカウンタ55a〜55
dが接続されている。
The control unit 54 is connected to a number of counters 55 corresponding to the areas obtained by dividing the DCT coefficients.
In this embodiment, since the DCT coefficient is divided into four regions, the control unit 54 includes four counters 55a to 55
d is connected.

【0108】制御部54は、比較器53から入力される
比較結果に基づいて、その比較器53に入力されるDC
T係数が属する領域に対応したカウンタ55a〜55d
に信号を出力する。各カウンタ55a〜55dは、制御
部54から出力される信号に基づいて、そのカウント値
をカウントアップする。従って、各カウンタ55a〜5
5dのカウント値は、各閾値レジスタ51a〜51dに
格納された閾値と、DCT係数との比較結果に基づいた
値となる。
The control unit 54 controls the DC input to the comparator 53 based on the comparison result input from the comparator 53.
Counters 55a to 55d corresponding to the area to which the T coefficient belongs
Output the signal. Each of the counters 55a to 55d counts up its count value based on a signal output from the control unit 54. Therefore, each of the counters 55a to 55a
The count value of 5d is a value based on the comparison result between the threshold value stored in each of the threshold value registers 51a to 51d and the DCT coefficient.

【0109】具体的には、制御部54は、比較器53か
ら入力される比較結果に基づいて、DCT係数が閾値よ
りも大きい場合に、そのDCT係数が属する領域に対応
したカウンタ55a〜55dに信号を出力する。従っ
て、1ブロック分の画像データに対するDCT演算処理
が終了した時点で、各カウンタ55a〜55dのカウン
ト値は、各領域において敷居を越えるDCT係数が何個
あったかを示している。従って、CPU21は、各カウ
ンタ55a〜55dのカウント値を内部バス26を介し
て読み出し、それらのカウント値に基づいて画像データ
の傾向を判断する。
Specifically, when the DCT coefficient is larger than the threshold based on the comparison result input from comparator 53, control unit 54 controls counters 55a to 55d corresponding to the area to which the DCT coefficient belongs. Output a signal. Therefore, when the DCT calculation processing for one block of image data is completed, the count values of the counters 55a to 55d indicate how many DCT coefficients have exceeded the threshold in each area. Therefore, the CPU 21 reads out the count values of the respective counters 55a to 55d via the internal bus 26, and determines the tendency of the image data based on the count values.

【0110】例えば、領域4に対応したカウンタ55d
のカウント値が他の領域に対応したカウンタ55a〜5
5cのカウント値に比べて著しく大きい場合には、入力
された画像が平均的な画像データではなく、極めて高周
波成分の大きい画像データであると判断される。従っ
て、CPU21は、通常使用する量子化テーブル及び符
号化テーブルでは満足のいく圧縮率と画質が得られない
可能性があるため、高周波成分を重視したテーブルを用
いて量子化及び符号化処理を行う。これにより、高周波
成分が確実に保持されて画質が高くなると共に、最適な
量子化テーブルにより量子化が行われるため圧縮効率を
高めることができる。
For example, the counter 55d corresponding to the area 4
Counters 55a-5 corresponding to the other areas
If the count value is significantly larger than the count value of 5c, it is determined that the input image is not average image data but image data having an extremely high frequency component. Therefore, the CPU 21 may not be able to obtain a satisfactory compression rate and image quality with the quantization table and the encoding table that are normally used. Therefore, the CPU 21 performs the quantization and the encoding process using the table emphasizing the high frequency component. . As a result, the high-frequency component is reliably held, the image quality is improved, and the compression efficiency can be increased because the quantization is performed by the optimal quantization table.

【0111】尚、上記の判断は、1ブロックの処理のみ
で行うのは好ましくないため、CPU21は、予め1フ
レーム内の代表ブロック、例えば画像データの4隅付近
と中心付近等を設定し、設定した代表ブロックにおける
判定結果に基づいて総合的に判断する。
Since it is not preferable to make the above-described determination only in the processing of one block, the CPU 21 previously sets a representative block in one frame, for example, around the four corners and the center of the image data, and sets it. Comprehensive judgment is made based on the judgment result in the representative block.

【0112】以上記述したように、本実施の形態によれ
ば、以下の効果を奏する。 (1)第一実施形態における(1)(2)と同じ効果を
奏する。 (2)テーブル判定回路50を備える。テーブル判定回
路の閾値レジスタ51a〜51dは、DCT係数を分割
した複数の領域に対応した閾値を格納する。比較器53
は、各閾値レジスタ51a〜51dに記憶された閾値と
DCT係数とを比較する。制御部54は、比較器53の
比較結果に基づいて、各領域に対応したカウンタ55a
〜55dをカウントアップさせる。従って、各カウンタ
55a〜55dには、各領域において閾値を越えるDC
T係数が幾つあったかがカウント値として格納され、そ
のカウント値が画像の種類を示している。そして、CP
U21は量子化及び符号化する際に複数の量子化テーブ
ル及び符号化テーブルのうちの1つを選択して量子化処
理及び符号化処理を行うようにした。その結果、取り込
んだ画像の状態に応じて圧縮を行うことができるので、
圧縮効率とその圧縮画像データの画質を高めることがで
きる。
As described above, the present embodiment has the following advantages. (1) The same effects as (1) and (2) in the first embodiment are achieved. (2) A table determination circuit 50 is provided. The threshold registers 51a to 51d of the table determination circuit store thresholds corresponding to a plurality of areas obtained by dividing the DCT coefficient. Comparator 53
Compares the DCT coefficient with the threshold value stored in each of the threshold value registers 51a to 51d. The control unit 54 sets a counter 55a corresponding to each area based on the comparison result of the comparator 53.
5555d is counted up. Therefore, each of the counters 55a to 55d has a DC value exceeding the threshold value in each region.
The number of T coefficients is stored as a count value, and the count value indicates the type of image. And CP
The U21 selects one of the plurality of quantization tables and the encoding tables when performing the quantization and the encoding, and performs the quantization process and the encoding process. As a result, compression can be performed according to the state of the captured image,
The compression efficiency and the image quality of the compressed image data can be improved.

【0113】尚、本発明は前記実施の形態の他、以下の
態様で実施してもよい。上記各実施形態において、量子
化及び逆量子化をCPU21にて行うようにしたが、図
2の点線で示すようにマイコン14に量子化及び逆量子
化の処理を実行する量子化部61を備えて実施してもよ
い。また、上記各実施形態において符号化及び復号化を
CPU21にて行うようにしたが、図2に点線で示すよ
うに、マイコン14に符号化及び復号化の処理を実行す
る符号化部62を備えて実施してもよい。更に、マイコ
ン14に量子化演算部及び符号化部を備えて実施しても
よい。
The present invention may be embodied in the following modes other than the above embodiment. In the above embodiments, the quantization and the inverse quantization are performed by the CPU 21. However, the microcomputer 14 includes the quantization unit 61 that executes the quantization and the inverse quantization as shown by the dotted line in FIG. May be implemented. Although the encoding and decoding are performed by the CPU 21 in each of the above-described embodiments, the microcomputer 14 includes an encoding unit 62 that performs the encoding and decoding processes, as indicated by a dotted line in FIG. May be implemented. Further, the microcomputer 14 may be provided with a quantization operation unit and an encoding unit.

【0114】上記各実施形態では、データ転送手段とし
てDMAC22を設けてDCT演算部24の内部バッフ
ァ27に対して各データの転送をCPU21とは関係な
く行うようにしたが、各データの転送をCPU21にて
行うようにしてもよい。この場合、CPU21の付加が
若干増加するものの、DMAC22を設ける必要がない
ので、マイクロコントローラ14のチップ面積を小さく
することが可能となる。
In each of the above embodiments, the DMAC 22 is provided as data transfer means so that each data is transferred to the internal buffer 27 of the DCT operation unit 24 independently of the CPU 21. May be performed. In this case, although the addition of the CPU 21 is slightly increased, it is not necessary to provide the DMAC 22, so that the chip area of the microcontroller 14 can be reduced.

【0115】上記各実施形態において、アドレス生成回
路32に第1の格納アドレス生成回路38と第2の格納
アドレス生成回路39とを設け、それぞれの回路により
生成される算出順アドレス信号とジグザグスキャン順ア
ドレス信号とを切り替え回路40により選択可能とした
が、第1の格納アドレス生成回路38のみを設けた構成
として実施してもよい。この場合、DCT演算器31か
ら出力されるDCT係数をその算出順に格納することが
できなくなるものの、第2の格納アドレス生成回路39
及び切り替え回路40を省略することができるので、そ
の分だけマイコン14のチップ面積を小さくすることが
可能となる。
In each of the above embodiments, the first storage address generation circuit 38 and the second storage address generation circuit 39 are provided in the address generation circuit 32, and the calculation order address signal generated by each circuit and the zigzag scan order are generated. Although the address signal and the switching signal can be selected by the switching circuit 40, the configuration may be such that only the first storage address generation circuit 38 is provided. In this case, although the DCT coefficients output from the DCT calculator 31 cannot be stored in the calculation order, the second storage address generation circuit 39
Since the switching circuit 40 can be omitted, the chip area of the microcomputer 14 can be reduced accordingly.

【0116】上記第一実施形態において、量子化予測回
路33は、DCT係数バッファ27cに格納されたDC
T係数に対して、そのDCT係数が量子化後に「0」に
なるか否かを判断してそのDCT係数に符号を付加して
DCT係数バッファ27cに再格納するようにしたが、
図8の点線で示すように、DCT演算器31から出力さ
れるDCT係数を直接入力して、そのDCT係数を判断
し、その判断結果に基づいて符号を付加したDCT係数
をDCT係数バッファ27cに格納するようにしてもよ
い。
In the first embodiment, the quantization predicting circuit 33 uses the DCT coefficient stored in the DCT coefficient buffer 27c.
For the T coefficient, it is determined whether or not the DCT coefficient becomes “0” after quantization, a sign is added to the DCT coefficient, and the DCT coefficient is stored again in the DCT coefficient buffer 27c.
As shown by the dotted line in FIG. 8, the DCT coefficient output from the DCT calculator 31 is directly input, the DCT coefficient is determined, and the DCT coefficient added with a sign based on the determination result is stored in the DCT coefficient buffer 27c. It may be stored.

【0117】又、上記第一実施形態において、量子化予
測回路33は、量子化後に「0」となるか否かを判断
し、その判断結果に基づいてDCT係数バッファ27c
に「0」を格納するようにしてもよい。この場合、CP
U21は、読み出したDCT係数が「0」の場合に量子
化処理を省略することができるので、上記第一実施形態
と同じ効果を奏する。
In the first embodiment, the quantization prediction circuit 33 determines whether or not the value becomes "0" after quantization, and based on the determination result, the DCT coefficient buffer 27c.
May be stored as “0”. In this case, CP
U21 can omit the quantization process when the read DCT coefficient is "0", and thus has the same effect as the first embodiment.

【0118】上記第二実施形態において、テーブル判定
回路50の回路構成を適宜変更して実施してもよい。例
えば、図12に示すように、テーブル判定回路50は、
DCT係数を分割した複数の領域に対応した数(n個)
の判定部50a〜50nにより構成され、各判定部50
a〜50nは、それぞれ閾値レジスタ51a、比較器5
3a、及び、カウンタ51aから構成される。
In the second embodiment, the circuit configuration of the table determination circuit 50 may be changed as appropriate. For example, as shown in FIG.
Number corresponding to a plurality of areas obtained by dividing DCT coefficients (n)
And each of the determination units 50a to 50n.
a to 50n are a threshold register 51a and a comparator 5
3a and a counter 51a.

【0119】上記第二実施形態において、DCT係数を
4つの領域に分割したが、任意の数の領域に分割して実
施してもよい。例えば、図11に示されるDCT係数を
図面において横方向又は縦方向に2分割する。この構成
により、量子化テーブル及び符号化テーブルが2つで済
むため、係数メモリ25の容量を小さくすることができ
る。又、横方向及び縦方向にそれぞれ3分割し、DCT
係数の周波数成分を9個の領域に分割する。この構成に
より、更に細かく画像データの状態に対応して量子化及
び符号化を行うことが可能となる。
Although the DCT coefficient is divided into four regions in the second embodiment, the DCT coefficient may be divided into an arbitrary number of regions. For example, the DCT coefficient shown in FIG. 11 is divided into two in the horizontal or vertical direction in the drawing. With this configuration, since only two quantization tables and two encoding tables are required, the capacity of the coefficient memory 25 can be reduced. In addition, DCT is divided into three in the horizontal and vertical directions.
The frequency components of the coefficients are divided into nine regions. With this configuration, it is possible to perform quantization and encoding in more detail according to the state of image data.

【0120】上記第二実施形態において、第一実施形態
の量子化予測回路33を備え、使用する量子化テーブル
を決定した後に、その量子化テーブルの量子化係数に基
づいて、量子後にDCT係数が「0」になるか否かを判
断してそのDCT係数に符号を付加してDCT係数バッ
ファ27cに再格納するようにしてもよい。この構成に
より、画像データの状態に対応して量子化及び符号化を
行うことが可能になると共に、量子化における量子化処
理を省略することができるので、CPU21の負荷を低
減することができる。
In the second embodiment, the quantization prediction circuit 33 of the first embodiment is provided, and after determining the quantization table to be used, the DCT coefficient after quantization is determined based on the quantization coefficient of the quantization table. A determination may be made as to whether the value becomes "0", a sign may be added to the DCT coefficient, and the DCT coefficient may be stored again in the DCT coefficient buffer 27c. With this configuration, it is possible to perform quantization and encoding according to the state of image data, and it is possible to omit the quantization process in quantization, so that the load on the CPU 21 can be reduced.

【0121】上記各実施形態において、フラッシュメモ
リ17を内蔵したが、画像情報処理装置の外部から外部
バス13に接続するようにしてもよい。又、内蔵したフ
ラッシュメモリ17と外部に接続したフラッシュメモリ
17とを設け、選択して圧縮画像データを格納する、又
は、複数のフラッシュメモリ17間で圧縮画像データを
転送できるようにしてもよい。
In each of the above embodiments, the flash memory 17 is built in. However, the flash memory 17 may be connected to the external bus 13 from outside the image information processing apparatus. Further, a built-in flash memory 17 and an externally connected flash memory 17 may be provided to selectively store compressed image data, or to transfer compressed image data between a plurality of flash memories 17.

【0122】[0122]

【発明の効果】以上詳述したように、本発明によれば、
安価で高速に画像データの圧縮伸長処理を行うことの可
能なマイクロコントローラを提供することができる。
As described in detail above, according to the present invention,
A microcontroller capable of performing inexpensive and high-speed compression and decompression processing of image data can be provided.

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

【図1】 本発明の原理説明図。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】 一実施形態の画像処理システムを示す概略構
成図。
FIG. 2 is a schematic configuration diagram illustrating an image processing system according to an embodiment.

【図3】 第一実施形態のDCT演算部のブロック回路
図。
FIG. 3 is a block circuit diagram of a DCT operation unit according to the first embodiment.

【図4】 DCT演算器の動作を説明するためのブロッ
ク回路図。
FIG. 4 is a block circuit diagram for explaining the operation of the DCT calculator.

【図5】 アドレス生成回路のブロック回路図。FIG. 5 is a block circuit diagram of an address generation circuit.

【図6】 DCT演算におけるジグザグスキャンの順番
を示す説明図。
FIG. 6 is an explanatory diagram showing the order of zigzag scanning in DCT calculation.

【図7】 算出順とジグザグスキャン順のアドレスを示
す説明図。
FIG. 7 is an explanatory diagram showing addresses in a calculation order and a zigzag scan order.

【図8】 量子化予測回路のブロック回路図。FIG. 8 is a block circuit diagram of a quantization prediction circuit.

【図9】 第二実施形態のDCT演算部のブロック回路
図。
FIG. 9 is a block circuit diagram of a DCT operation unit according to the second embodiment.

【図10】 テーブル判定回路のブロック回路図。FIG. 10 is a block circuit diagram of a table determination circuit.

【図11】 DCT係数の分割を示す説明図。FIG. 11 is an explanatory diagram showing division of DCT coefficients.

【図12】 別のテーブル判定回路のブロック回路図。FIG. 12 is a block circuit diagram of another table determination circuit.

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

1 画像処理装置 2 マイクロコントローラ 3 内部バス 4 データ転送手段 5 変換実行手段 6 画像データ記憶領域 7 中間値記憶領域 8 変換係数格納領域 9 変換回路 DESCRIPTION OF SYMBOLS 1 Image processing apparatus 2 Microcontroller 3 Internal bus 4 Data transfer means 5 Conversion execution means 6 Image data storage area 7 Intermediate value storage area 8 Conversion coefficient storage area 9 Conversion circuit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 岡田 雅樹 愛知県春日井市高蔵寺町二丁目1844番2 富士通ヴィエルエスアイ株式会社内 (72)発明者 宮田 知伸 愛知県春日井市高蔵寺町二丁目1844番2 富士通ヴィエルエスアイ株式会社内 ────────────────────────────────────────────────── ─── Continuing from the front page (72) Inventor Masaki Okada 2-1844-2 Kozoji-cho, Kasugai-shi, Aichi Prefecture Inside Fujitsu VSI Co., Ltd. (72) Tomonobu Miyata 2-1844-2 Kozoji-cho, Kasugai-shi, Aichi Fujitsu VLSI Corporation

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 画像データの圧縮処理を行う画像処理装
置に用いられるマイクロコントローラであって、 前記内部バスに接続され、前記内部バスを介してデータ
を転送するデータ転送手段と、 前記内部バスに接続され、前記内部バスを介して画像デ
ータが入力され、該画像データに対して離散コサイン変
換を施して前記圧縮処理に必要なDCT係数に変換する
変換実行手段とを備え、 前記変換実行手段は、 前記画像データが入力される画像データ記憶領域と、 前記変換処理における中間データが格納される中間値記
憶領域と、 前記DCT係数が格納される変換係数記憶領域と、 前記画像データ記憶領域の画像データに対して変換処理
を施した結果を中間データとして前記中間値記憶領域に
格納し、前記中間値記憶領域の中間データに対して変換
処理を施した結果をDCT係数として前記変換係数記憶
領域に格納する変換回路とを備え、 前記データ転送手段は、前記画像データに対する変換処
理の間に前記変換係数記憶領域に格納されたDCT係数
を転送し、前記中間データに対する変換処理の間に前記
画像データ記憶領域に次に変換処理する画像データを転
送するようにしたマイクロコントローラ。
1. A microcontroller used in an image processing apparatus for performing a compression process of image data, comprising: a data transfer unit connected to the internal bus, for transferring data via the internal bus; Connected to the image data through the internal bus, and performing a discrete cosine transform on the image data to convert the image data into DCT coefficients required for the compression process. An image data storage area to which the image data is input; an intermediate value storage area to store intermediate data in the conversion processing; a transform coefficient storage area to store the DCT coefficients; and an image in the image data storage area. The result of performing the conversion process on the data is stored in the intermediate value storage area as intermediate data, and the intermediate data in the intermediate value storage area A conversion circuit for storing a result of the conversion processing as a DCT coefficient in the conversion coefficient storage area, wherein the data transfer unit stores the DCT coefficient stored in the conversion coefficient storage area during the conversion processing on the image data. A microcontroller configured to transfer image data to be converted next to the image data storage area during the conversion processing on the intermediate data.
【請求項2】 請求項1に記載のマイクロコントローラ
において、 前記変換実行手段は、前記画像データに対して2次元離
散コサイン変換を施すものであり、前記変換回路は1次
元離散コサイン変換を施すものであり、該変換回路は前
記画像データ記憶領域の画像データに対して1次元離散
コサイン変換処理の結果を前記中間データとして前記中
間値記憶領域に格納し、前記中間値記憶領域の中間デー
タに対して1次元離散コサイン変換の結果を前記DCT
係数として前記変換係数記憶領域に格納するようにした
マイクロコントローラ。
2. The microcontroller according to claim 1, wherein said conversion executing means performs two-dimensional discrete cosine transform on said image data, and said conversion circuit performs one-dimensional discrete cosine transform. The conversion circuit stores the result of the one-dimensional discrete cosine transform processing on the image data in the image data storage area as the intermediate data in the intermediate value storage area, The result of the one-dimensional discrete cosine transform
A microcontroller configured to store the coefficients in the conversion coefficient storage area.
【請求項3】 請求項1又は2に記載のマイクロコント
ローラにおいて、 量子化処理に用いられる量子化係数からなる量子化テー
ブルが予め格納された係数メモリと、 前記量子化係数に基づいて、前記変換係数格納領域から
転送された前記DCT係数を量子化する量子化処理手段
とを備え、 前記変換実行手段には、前記DCT係数と前記量子化係
数とを比較し、その比較結果に基づいて、前記符号デー
タが量子化処理によって所定値となるか否かを予測し、
前記所定値となる符号データに対して情報を付加する量
子化予測回路を備え、 前記量子化処理手段は、前記DCT係数に付加された情
報に基づいて、該DCT係数が所定値の場合に該DCT
係数に対する量子化処理を実行しないようにしたマイク
ロコントローラ。
3. The microcontroller according to claim 1, wherein a coefficient memory in which a quantization table including a quantization coefficient used for a quantization process is stored in advance, and the conversion is performed based on the quantization coefficient. A quantization processing unit that quantizes the DCT coefficient transferred from the coefficient storage area, wherein the transform execution unit compares the DCT coefficient with the quantization coefficient, and, based on a comparison result, Predict whether the code data will be a predetermined value by the quantization process,
A quantizing prediction circuit for adding information to the code data having the predetermined value, wherein the quantization processing means performs the processing when the DCT coefficient has a predetermined value based on the information added to the DCT coefficient. DCT
A microcontroller that does not perform quantization processing on coefficients.
【請求項4】 請求項3に記載のマイクロコントローラ
において、 前記量子化予測回路は、 前記DCT係数を入力し、該DCT係数の最下位ビット
を拡張して出力するビット操作部と、 前記量子化係数格納領域に格納された量子化係数と前記
ビット操作部の出力データとを比較し、その比較結果を
出力する比較部と、 前記比較結果に基づいた情報ビットを前記DCT係数に
付加して前記変換係数格納領域に格納するデータ生成部
とから構成されたマイクロコントローラ。
4. The microcontroller according to claim 3, wherein the quantization prediction circuit receives the DCT coefficient, extends a least significant bit of the DCT coefficient, and outputs the result. A comparing unit that compares the quantized coefficient stored in the coefficient storage area with the output data of the bit operation unit, and outputs a result of the comparison; and adds an information bit based on the result of the comparison to the DCT coefficient. A microcontroller including a data generation unit that stores the data in a conversion coefficient storage area.
【請求項5】 請求項1乃至4のいずれか1項に記載の
マイクロコントローラにおいて、 前記2次元のDCT係数を1次元に配列し直すジグザグ
走査方式に対応した第1のアドレス信号を生成する第1
のアドレス生成回路を備え、 前記変換係数格納領域には、前記第1のアドレス信号に
基づいて、ジグザグ走査順に前記DCT係数が格納され
るようにしたマイクロコントローラ。
5. The microcontroller according to claim 1, wherein a first address signal corresponding to a zigzag scanning method for rearranging the two-dimensional DCT coefficients one-dimensionally is generated. 1
A microcontroller comprising: an address generation circuit, wherein the DCT coefficients are stored in the conversion coefficient storage area in a zigzag scanning order based on the first address signal.
【請求項6】 請求項5に記載のマイクロコントローラ
において、 前記DCT係数の算出順の第2のアドレス信号を生成す
る第2のアドレス生成回路と、 前記第1のアドレス信号と前記第2のアドレス信号とを
切り替える切り替え回路とを備え、前記変換係数格納領
域には切り替えられた第1又は第2のアドレス信号に基
づいて前記DCT係数が格納されるようにしたマイクロ
コントローラ。
6. The microcontroller according to claim 5, wherein a second address generation circuit generates a second address signal in the order of calculating the DCT coefficients; and the first address signal and the second address. A microcontroller comprising: a switching circuit for switching between a DCT signal and a DCT coefficient in the conversion coefficient storage area based on the switched first or second address signal.
【請求項7】 請求項3乃至6のいずれか1項に記載の
マイクロコントローラにおいて、 前記係数メモリには、画像の種類に応じた複数のテーブ
ルが予め格納され、 前記変換実行手段には、前記2次元のDCT係数を複数
の領域に分割し、各DCT係数とそのDCT係数が含ま
れる領域に対応して設定された閾値とを比較し、各領域
毎に前記閾値よりも大きいDCT係数の数を記憶するテ
ーブル判定回路を備え、 前記量子化実行手段は、各領域毎に記憶された数に基づ
いて前記複数のテーブルのうちの1つを選択し、該選択
したテーブルを用いて前記DCT係数に対する量子化処
理を実行するようにしたマイクロコントローラ。
7. The microcontroller according to claim 3, wherein a plurality of tables corresponding to types of images are stored in the coefficient memory in advance, and the conversion execution unit includes the plurality of tables. The two-dimensional DCT coefficient is divided into a plurality of areas, each DCT coefficient is compared with a threshold set corresponding to the area including the DCT coefficient, and the number of DCT coefficients larger than the threshold is determined for each area. The quantization execution means selects one of the plurality of tables based on the number stored for each area, and uses the selected table to generate the DCT coefficient. A microcontroller adapted to execute a quantization process on.
【請求項8】 請求項7に記載のマイクロコントローラ
において、 前記テーブル判定回路は、 前記分割された符号データの複数の領域毎に設定された
閾値を格納する閾値レジスタと、 前記入力される符号データと、その符号データが存在す
る領域の閾値レジスタに格納された閾値とを比較し、そ
の比較結果に基づいて符号データが閾値よりも大きい場
合に信号を出力する比較器と、 前記複数の領域に対応して設けられ、前記比較器からの
信号に基づいてカウントアップするカウンタとから構成
されたマイクロコントローラ。
8. The microcontroller according to claim 7, wherein the table determination circuit includes: a threshold register that stores a threshold set for each of a plurality of regions of the divided code data; and the input code data. And a comparator that compares a threshold stored in a threshold register of the area where the code data is present, and outputs a signal when the code data is larger than the threshold based on the comparison result; and A counter provided correspondingly and configured to count up based on a signal from the comparator.
JP6306497A 1997-03-17 1997-03-17 Micro controller Pending JPH10262248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6306497A JPH10262248A (en) 1997-03-17 1997-03-17 Micro controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6306497A JPH10262248A (en) 1997-03-17 1997-03-17 Micro controller

Publications (1)

Publication Number Publication Date
JPH10262248A true JPH10262248A (en) 1998-09-29

Family

ID=13218550

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6306497A Pending JPH10262248A (en) 1997-03-17 1997-03-17 Micro controller

Country Status (1)

Country Link
JP (1) JPH10262248A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006319944A (en) * 2005-04-15 2006-11-24 Sony Corp Decoding control device and method, recording medium, and program
KR20170003967A (en) * 2014-05-07 2017-01-10 마벨 월드 트레이드 리미티드 Low power distributed memory network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006319944A (en) * 2005-04-15 2006-11-24 Sony Corp Decoding control device and method, recording medium, and program
KR20170003967A (en) * 2014-05-07 2017-01-10 마벨 월드 트레이드 리미티드 Low power distributed memory network

Similar Documents

Publication Publication Date Title
KR101158345B1 (en) Method and system for performing deblocking filtering
CN101253761B (en) Image encoding apparatus and image encoding method
JP4641892B2 (en) Moving picture encoding apparatus, method, and program
JPH11136677A (en) Image information processing unit and coder
US20210385458A1 (en) System-on-chip having a merged frame rate converter and video codec and frame rate converting method thereof
JP3448462B2 (en) Image data compression device
JP3680845B2 (en) Compressed video decompression device and image display device using the same
JP3680846B2 (en) MOVING IMAGE COMPRESSION DEVICE AND IMAGING DEVICE USING THE SAME
US8532424B2 (en) Method and system for filtering image data
US10506233B2 (en) Encoder for determining quantization parameter adaptively and application processor having the same
JP3676237B2 (en) Data processing apparatus and arithmetic unit
JPH10262248A (en) Micro controller
JP4870563B2 (en) Image processing method and apparatus in portable device
JP3695451B2 (en) Image size changing method and apparatus
JP2006050571A (en) Image processing apparatus
JP2021013145A (en) Video transmission device and video transmission method
US7350035B2 (en) Information-processing apparatus and electronic equipment using thereof
JP2004328178A (en) Image processing apparatus
JP2000278349A (en) Compressed data transmission equipment and recording medium
JP2009060536A (en) Image encoding apparatus, and image encoding method
JPS62281582A (en) Picture data compression system
US20110142357A1 (en) Variable length encoding device of image compression system
CN117939161A (en) Image decoding method, device, electronic equipment and readable storage medium
JPH0856357A (en) Image processor
JP2005244845A (en) Moving image processing device

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20021112