JP2002159006A - Calculation assisting circuit - Google Patents

Calculation assisting circuit

Info

Publication number
JP2002159006A
JP2002159006A JP2000349644A JP2000349644A JP2002159006A JP 2002159006 A JP2002159006 A JP 2002159006A JP 2000349644 A JP2000349644 A JP 2000349644A JP 2000349644 A JP2000349644 A JP 2000349644A JP 2002159006 A JP2002159006 A JP 2002159006A
Authority
JP
Japan
Prior art keywords
data
read
arithmetic
calculation
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2000349644A
Other languages
Japanese (ja)
Inventor
Daisuke Miyakoshi
大輔 宮腰
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2000349644A priority Critical patent/JP2002159006A/en
Publication of JP2002159006A publication Critical patent/JP2002159006A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a calculation assisting circuit which can be manufactured at a low cost in a short manufacturing time and can be appropriately reduced in circuit scale and improved in computing speed. SOLUTION: An image processing system performs the compression or decompression of image data by the encoding method using the DCT with software and hardware and is constituted by connecting a CPU 40, an external image memory 44, and a calculation assisting circuit 50 to each other through a bus. The calculation assisting circuit 50 is provided with an internal arithmetic circuit 52 and buffers 54-58 which are accessible from both the CPU 40 and circuit 52. Upon receiving an instruction to perform a YUV conversion, an RGB conversion, a quantization calculation, or an inverse quantization calculation, the internal arithmetic circuit 52 reads data from the buffers 54-58, performs calculation including a common calculation which is commonly performed in the above-mentioned calculations based on the plurality of read data, and writes the results of the calculation in the buffers 54-58.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、ソフトウェアによ
り画像データの圧縮または解凍を行うCPUの処理を補
助する回路に係り、特に、コストや製作時間の面で有利
であり、しかも回路規模の小型化および演算速度の向上
を図るのに好適な演算補助回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a circuit for assisting processing of a CPU for compressing or decompressing image data by software, and is particularly advantageous in terms of cost and production time, and furthermore, the circuit size can be reduced. And an arithmetic auxiliary circuit suitable for improving the arithmetic speed.

【0002】[0002]

【従来の技術】画像をディジタル化してCD−ROMや
ハードディスクなどの記憶媒体に記憶する場合には、そ
のデータ量は巨大なものとなるため、通常は圧縮符号化
して記憶する。各種の圧縮符号化方式のなかで画像の空
間周波数が低周波に集中する性質に着目して圧縮を行う
DCT(Dsicrete Cosine Transform:離散コサイン変
換)による符号化方式が比較的多く使用されている。代
表的な例としては、JPEG(Joint Photographic Exp
erts Group)やMPEG(Moving Picture Experts Gro
up)などの国際標準である符号化方式にこの方式が採用
されている。
2. Description of the Related Art When an image is digitized and stored in a storage medium such as a CD-ROM or a hard disk, the amount of data is enormous. Among various compression coding methods, a coding method using DCT (Discrete Cosine Transform), which performs compression while paying attention to the property that the spatial frequency of an image is concentrated on a low frequency, is relatively frequently used. A typical example is JPEG (Joint Photographic Exp
erts Group) and MPEG (Moving Picture Experts Gro
This method is adopted in an encoding method which is an international standard such as up).

【0003】DCTによる符号化方式では、画像データ
の圧縮および解凍を、例えば、図7に示すようにして行
う。図7は、DCTによる符号化方式で画像データの圧
縮および解凍を行う処理を示す図である。
[0003] In the coding method based on DCT, compression and decompression of image data are performed, for example, as shown in FIG. FIG. 7 is a diagram illustrating a process of compressing and decompressing image data by an encoding method using DCT.

【0004】まず、画像データの圧縮を行う場合は、図
7左側に示すように、RGBデータからなる画像データ
に対してYUV変換を行うYUV変換部10と、YUV
変換部10からのデータに対して間引きを行う間引き部
12と、間引き部12からのデータに対してDCTを行
うDCT部14と、DCT部14からのデータに対して
量子化演算を行う量子化演算部16と、量子化演算部1
6からのデータに対してジグザグスキャンを行うジグザ
グスキャン部18と、ジグザグスキャン部18からのデ
ータに対して可変長(ハフマン)符号化を行う可変長符
号化部20とを備え、これら処理部10〜20による各
処理を経て画像データを圧縮する。
First, when compressing image data, as shown on the left side of FIG. 7, a YUV conversion unit 10 for performing YUV conversion on image data composed of RGB data,
A thinning unit 12 that thins out data from the transforming unit 10, a DCT unit 14 that performs DCT on data from the thinning unit 12, and a quantization that performs a quantization operation on data from the DCT unit 14. The operation unit 16 and the quantization operation unit 1
6 includes a zigzag scan unit 18 that performs a zigzag scan on the data from the data unit 6 and a variable length encoding unit 20 that performs a variable length (Huffman) encoding on the data from the zigzag scan unit 18. The image data is compressed through the respective processes of.

【0005】次に、画像データの解凍を行う場合は、図
7右側に示すように、圧縮画像データに対して可変長復
号化を行う可変長復号化部22と、可変長復号化部22
からのデータに対して逆ジグザグスキャンを行う逆ジグ
ザグスキャン部24と、逆ジグザグスキャン部24から
のデータに対して逆量子化演算を行う逆量子化演算部2
6と、逆量子化演算部26からのデータに対してIDC
T(Inverse DiscreteCosine Transorm:逆離散コサイ
ン変換)を行うIDCT部28と、IDCT部28から
のデータに対して補間を行う補間部30と、補間部30
からのデータに対してRGB変換を行うRGB変換部3
2とを備え、これら処理部22〜32による各処理を経
て圧縮画像データを解凍する。
Next, when decompressing image data, as shown on the right side of FIG. 7, a variable length decoding unit 22 for performing variable length decoding on the compressed image data and a variable length decoding unit 22
Inverse zigzag scan unit 24 that performs an inverse zigzag scan on data from the first unit, and an inverse quantization operation unit 2 that performs an inverse quantization operation on the data from the inverse zigzag scan unit 24
6 and IDC for the data from the inverse quantization operation unit 26
An IDCT unit 28 that performs T (Inverse Discrete Cosine Transorm), an interpolation unit 30 that performs interpolation on data from the IDCT unit 28, and an interpolation unit 30
Conversion unit 3 that performs RGB conversion on data from
And decompresses the compressed image data through each processing by these processing units 22 to 32.

【0006】なお、ジグザグスキャンとは、水平方向8
画素および垂直方向8画素(以下、8×8画素と略記す
る。)の画像データに対してそれぞれ量子化演算を行っ
たものを、水平方向および垂直方向の周波数成分が小さ
い順に並び替える処理である。逆ジグザグスキャンは、
その逆の処理である。
[0006] The zigzag scan is a horizontal direction 8
This is a process in which image data of pixels and image data of 8 pixels in the vertical direction (hereinafter, abbreviated as 8 × 8 pixels) are subjected to a quantization operation and rearranged in ascending order of frequency components in the horizontal and vertical directions. . Inverse zigzag scan
This is the reverse process.

【0007】従来、このような処理により画像データの
圧縮または解凍を行う方式としては、上記処理をすべて
ソフトウェアで行う第1の方式と、上記処理をすべてハ
ードウェアで行う第2の方式と、上記処理の一部をソフ
トウェアで行い残りの一部をハードウェアで行う第3の
方式とが存在する。
Conventionally, as a method of compressing or decompressing image data by such processing, a first method in which all of the above processing is performed by software, a second method in which all of the processing is performed by hardware, There is a third method in which part of the processing is performed by software and the remaining part is performed by hardware.

【0008】しかし、上記第1の方式は、8×8画素の
画像データを単位として処理を行うため、画像データの
並び替えが頻繁に生じる。そのため、アドレスの計算、
ランダムなメモリアクセス等を行うことが必要となり、
演算処理に時間を要する。例えば、DRAM等の比較的
安価なメモリ素子を用いた場合は、高速なランダムアク
セスが困難であるため、メモリ素子からデータを読み込
んでCPUで演算を行うと、その読込のための処理時間
が大きく、全体のパフォーマンスに大きな影響を与える
ことになる。
However, in the first method, since the processing is performed in units of 8 × 8 pixel image data, the image data is frequently rearranged. Therefore, address calculation,
It is necessary to perform random memory access, etc.,
Computation processing takes time. For example, when a relatively inexpensive memory device such as a DRAM is used, it is difficult to perform high-speed random access. Therefore, when data is read from the memory device and operated by the CPU, the processing time for the read becomes long. , Will have a big impact on overall performance.

【0009】また、上記第2の方式は、高い処理速度が
要求されるような場合は非常に有効な方式ではあるが、
システムとしての柔軟性が劣ること、適切なハードウェ
アを製作するとなると時間的にもコスト的にも不利であ
ること等があり、ローコストで開発サイクルの早い製品
に組み込むことはきわめて難しい。
The second method is very effective when a high processing speed is required.
The flexibility of the system is inferior, and the production of appropriate hardware is disadvantageous in terms of time and cost, and it is extremely difficult to incorporate it into a low-cost product with a fast development cycle.

【0010】これに対して、上記第3の方式は、上記2
つの方式の問題点をある程度解決することができるた
め、最近の設計で多く採用されている方式である。
[0010] On the other hand, the third method is based on the second method.
Since this method can solve the problems of the two methods to some extent, it is a method frequently used in recent designs.

【0011】[0011]

【発明が解決しようとする課題】しかしながら、上記第
3の方式にあっては、画像データの圧縮または解凍を行
う処理のうちどれをソフトウェアで行ってどれをハード
ウェアで行うかを決定するのは意外に困難である。処理
の多くをハードウェアに移行すれば、高速化は図れる
が、コストや製作時間の面で不利になるばかりか、その
処理の数に応じた回路を設けなればならず、回路規模が
増大するという問題がある。逆に、処理の多くをソフト
ウェアに移行すれば、コストや製作時間の面で有利にな
り回路規模の小型化を図ることはできても、処理時間が
増大するという問題がある。
However, in the above-mentioned third method, it is not determined which of the processing for compressing or decompressing image data is performed by software and which is performed by hardware. Surprisingly difficult. If much of the processing is shifted to hardware, the speed can be increased, but it is not only disadvantageous in terms of cost and manufacturing time, but also the circuit must be provided according to the number of processing, and the circuit scale increases There is a problem. Conversely, if much of the processing is shifted to software, it is advantageous in terms of cost and manufacturing time, and although the circuit size can be reduced, there is a problem that the processing time increases.

【0012】さらに、ソフトウェアからハードウェアに
処理が引き渡される場合は、ソフトウェア処理は、RA
M等からハードウェア側のメモリにデータを転送し、そ
の転送が終了したときは、ハードウェア処理を開始する
ことを示す開始命令をハードウェア側に出力し、ハード
ウェア側は、ソフトウェア処理からの開始命令を待って
処理を開始するようになっているので、ソフトウェア処
理による転送が完全に終了するまではハードウェアが待
機している。そのため、その待機時間が全体の演算速度
を向上する点でネックとなっていた。
Further, when processing is transferred from software to hardware, software processing is performed by RA
The data is transferred from the M or the like to the memory on the hardware side, and when the transfer is completed, a start instruction indicating that the hardware processing is started is output to the hardware side. Since the processing is started after waiting for the start command, the hardware is on standby until the transfer by the software processing is completely completed. Therefore, the waiting time has been a bottleneck in improving the overall operation speed.

【0013】そこで、本発明は、このような従来の技術
の有する未解決の課題に着目してなされたものであっ
て、ハードウェアによる高速化を実現しながらも、コス
トや製作時間の面で有利であり、しかも回路規模の小型
化および演算速度の向上を図るのに好適な演算補助回路
を提供することを目的としている。
The present invention has been made in view of such unresolved problems of the prior art, and has been realized in terms of cost and manufacturing time while realizing high-speed processing by hardware. It is an object of the present invention to provide an arithmetic auxiliary circuit which is advantageous and suitable for reducing the circuit scale and improving the arithmetic speed.

【0014】[0014]

【課題を解決するための手段】上記目的を達成するため
に、本発明に係る請求項1記載の演算補助回路は、外部
演算手段の演算を補助する回路であって、内部演算手段
と、前記外部演算手段および前記内部演算手段の両方が
アクセス可能な記憶手段とを備え、前記内部演算手段
は、前記記憶手段からデータを読み込み、読み込んだデ
ータに基づいて、演算の一部が共通する複数の演算方法
のなかから指定されたいずれかにより、前記各演算方法
に共通する共通演算を含む演算を行い、その演算結果を
前記記憶手段に書き込むようになっている。
According to another aspect of the present invention, there is provided an arithmetic assisting circuit for assisting arithmetic operation of an external arithmetic means, comprising: an internal arithmetic means; Storage means accessible by both the external operation means and the internal operation means, wherein the internal operation means reads data from the storage means and, based on the read data, a plurality of common operations, An operation including a common operation common to the respective operation methods is performed by one of the operation methods designated, and the operation result is written in the storage means.

【0015】このような構成であれば、外部演算手段に
より、複数の演算方法のなかからいずれかが指定され、
記憶手段にデータが書き込まれると、内部演算手段によ
り、記憶手段からデータが読み込まれ、読み込まれたデ
ータに基づいて、指定された演算方法により各演算方法
に共通する共通演算を含む演算が行われ、その演算結果
が記憶手段に書き込まれる。
With such a configuration, one of a plurality of arithmetic methods is designated by the external arithmetic means,
When the data is written to the storage means, the data is read from the storage means by the internal calculation means, and based on the read data, a calculation including a common calculation common to each calculation method is performed by a specified calculation method. , And the operation result is written to the storage means.

【0016】さらに、本発明に係る請求項2記載の演算
補助回路は、外部演算手段の演算を補助する回路であっ
て、内部演算手段と、前記外部演算手段および前記内部
演算手段の両方がアクセス可能な記憶手段とを備え、前
記内部演算手段は、前記記憶手段からデータを読み込
み、読み込んだデータに基づいて所定の演算を行い、そ
の演算結果を前記記憶手段に書き込むようになってお
り、前記外部演算手段による前記記憶手段への書込動作
と並列して、前記外部演算手段による書込状況を参照し
ながら前記読込、前記演算及び前記書込を行うようにな
っている。
Further, according to a second aspect of the present invention, there is provided a circuit for assisting an operation of an external operation means, wherein the internal operation means and both the external operation means and the internal operation means have access. Possible storage means, wherein the internal calculation means reads data from the storage means, performs a predetermined calculation based on the read data, and writes the calculation result to the storage means, The reading, the arithmetic operation, and the writing are performed in parallel with the writing operation to the storage unit by the external arithmetic unit while referring to a writing state by the external arithmetic unit.

【0017】このような構成であれば、外部演算手段に
より、記憶手段にデータが書き込まれると、内部演算手
段により、記憶手段からデータが読み込まれ、読み込ま
れたデータに基づいて所定の演算が行われ、その演算結
果が記憶手段に書き込まれる。このとき、外部演算手段
による記憶手段への書込動作と並列して、外部演算手段
による書込状況を参照しながら読込、演算及び書込が行
われる。
With such a configuration, when data is written to the storage means by the external calculation means, the data is read from the storage means by the internal calculation means, and a predetermined calculation is performed based on the read data. Then, the operation result is written into the storage means. At this time, reading, calculation, and writing are performed in parallel with the writing operation to the storage unit by the external arithmetic unit while referring to the writing state by the external arithmetic unit.

【0018】さらに、本発明に係る請求項3記載の演算
補助回路は、外部演算手段の演算を補助する回路であっ
て、内部演算手段と、前記外部演算手段および前記内部
演算手段の両方がアクセス可能な複数の記憶手段とを備
え、前記内部演算手段は、前記各記憶手段からそれぞれ
データを読み込み、読み込んだ複数のデータに基づい
て、演算の一部が共通する複数の演算方法のなかから指
定されたいずれかにより、前記各演算方法に共通する共
通演算を含む演算を行い、その演算結果が1つであると
きは当該演算結果を前記複数の記憶手段のうちいずれか
に書き込み、その演算結果が複数であるときは当該各演
算結果をそれぞれ異なる記憶手段に書き込むようになっ
ている。
Further, an arithmetic assisting circuit according to a third aspect of the present invention is a circuit for assisting the arithmetic operation of the external arithmetic means, wherein the internal arithmetic means and both the external arithmetic means and the internal arithmetic means have access. A plurality of possible storage means, wherein the internal calculation means reads data from each of the storage means, and designates, based on the plurality of read data, a plurality of calculation methods in which a part of the calculation is common. The operation including the common operation common to each of the operation methods is performed by any one of the methods, and when the operation result is one, the operation result is written to any of the plurality of storage units, and the operation result is stored. When there are a plurality of data, the respective calculation results are written in different storage means.

【0019】このような構成であれば、外部演算手段に
より、複数の演算方法のなかからいずれかが指定され、
各記憶手段にデータが書き込まれると、内部演算手段に
より、各記憶手段からそれぞれデータが読み込まれ、読
み込まれた複数のデータに基づいて、指定された演算方
法により各演算方法に共通する共通演算を含む演算が行
われる。その結果、演算結果が1つであるときは、その
演算結果が複数の記憶手段のうちいずれかに書き込ま
れ、演算結果が複数であるときは、その各演算結果がそ
れぞれ異なる記憶手段に書き込まれる。
With such a configuration, one of a plurality of arithmetic methods is designated by the external arithmetic means,
When data is written to each storage means, the data is read from each storage means by the internal calculation means, and a common calculation common to each calculation method is performed based on the plurality of read data by a designated calculation method. An operation including is performed. As a result, when there is one operation result, the operation result is written to any of the plurality of storage units, and when there is more than one operation result, each operation result is written to a different storage unit. .

【0020】さらに、本発明に係る請求項4記載の演算
補助回路は、外部演算手段の演算を補助する回路であっ
て、内部演算手段と、前記外部演算手段および前記内部
演算手段の両方がアクセス可能な複数の記憶手段とを備
え、前記内部演算手段は、前記各記憶手段からそれぞれ
データを読み込み、読み込んだ複数のデータに基づいて
所定の演算を行い、その演算結果が1つであるときは当
該演算結果を前記複数の記憶手段のうちいずれかに書き
込み、その演算結果が複数であるときは当該各演算結果
をそれぞれ異なる記憶手段に書き込むようになってお
り、前記外部演算手段による前記記憶手段への書込動作
と並列して、前記外部演算手段による書込状況を参照し
ながら前記読込、前記演算及び前記書込を行うようにな
っている。
The arithmetic assisting circuit according to claim 4 of the present invention is a circuit for assisting the arithmetic operation of the external arithmetic means, wherein the internal arithmetic means and both the external arithmetic means and the internal arithmetic means have access. A plurality of possible storage means, wherein the internal calculation means reads data from each of the storage means, performs a predetermined calculation based on the read plurality of data, and when the calculation result is one, The calculation result is written to any of the plurality of storage means, and when the calculation result is a plurality, each calculation result is written to a different storage means. The reading, the calculation, and the writing are performed in parallel with the writing operation to the memory while referring to the writing state by the external calculation means.

【0021】このような構成であれば、外部演算手段に
より、各記憶手段にデータが書き込まれると、内部演算
手段により、各記憶手段からそれぞれデータが読み込ま
れ、読み込まれた複数のデータに基づいて所定の演算が
行われる。その結果、演算結果が1つであるときは、そ
の演算結果が複数の記憶手段のうちいずれかに書き込ま
れ、演算結果が複数であるときは、その各演算結果がそ
れぞれ異なる記憶手段に書き込まれる。このとき、外部
演算手段による記憶手段への書込動作と並列して、外部
演算手段による書込状況を参照しながら読込、演算及び
書込が行われる。
With such a configuration, when data is written into each storage means by the external arithmetic means, the data is read from each storage means by the internal arithmetic means, and based on the plurality of read data, A predetermined operation is performed. As a result, when there is one operation result, the operation result is written to any of the plurality of storage units, and when there is more than one operation result, each operation result is written to a different storage unit. . At this time, reading, calculation, and writing are performed in parallel with the writing operation to the storage unit by the external arithmetic unit while referring to the writing state by the external arithmetic unit.

【0022】さらに、本発明に係る請求項5記載の演算
補助回路は、請求項1および3のいずれかに記載の演算
補助回路において、前記内部演算手段は、前記外部演算
手段による前記記憶手段への書込動作と並列して、前記
外部演算手段による書込状況を参照しながら前記読込、
前記演算及び前記書込を行うようになっている。
According to a fifth aspect of the present invention, there is provided the arithmetic assisting circuit according to any one of the first and third aspects, wherein the internal arithmetic means is connected to the storage means by the external arithmetic means. In parallel with the writing operation of the above, the reading,
The calculation and the writing are performed.

【0023】このような構成であれば、内部演算手段に
より、外部演算手段による記憶手段への書込動作と並列
して、外部演算手段による書込状況を参照しながら読
込、演算及び書込が行われる。
With such a configuration, reading, calculation, and writing are performed by the internal arithmetic means in parallel with the writing operation to the storage means by the external arithmetic means while referring to the writing situation by the external arithmetic means. Done.

【0024】さらに、本発明に係る請求項6記載の演算
補助回路は、色素変換、離散コサイン変換、量子化演算
およびジグザグスキャンを行って画像データを圧縮する
画像データ圧縮処理、またはその逆の工程を経て圧縮画
像データを解凍する画像データ解凍処理を行う外部演算
手段の処理を補助する回路であって、内部演算手段と、
前記外部演算手段および前記内部演算手段の両方がアク
セス可能な第1の記憶手段、第2の記憶手段および第3
の記憶手段とを備え、前記内部演算手段は、前記第1な
いし第3の記憶手段からそれぞれデータを読み込み、読
み込んだ複数のデータに基づいて、演算の一部が共通す
る複数の演算方法のなかから指定されたいずれかによ
り、前記各演算方法に共通する共通演算を含む演算を行
い、その演算結果が1つであるときは当該演算結果を前
記第1ないし第3の記憶手段のうちいずれかに書き込
み、その演算結果が複数であるときは当該各演算結果を
それぞれ異なる記憶手段に書き込むようになっている。
The arithmetic assisting circuit according to the present invention may further comprise an image data compressing process for compressing image data by performing a dye conversion, a discrete cosine transform, a quantization operation, and a zigzag scan, or vice versa. A circuit for assisting the processing of an external arithmetic means for performing image data decompression processing for decompressing compressed image data via the internal arithmetic means,
A first storage unit, a second storage unit, and a third storage unit accessible by both the external operation unit and the internal operation unit;
Wherein the internal calculation means reads data from the first to third storage means, and based on the plurality of read data, a plurality of calculation methods in which a part of the calculation is common. Performing an operation including a common operation common to each of the operation methods, and if the operation result is one, the operation result is stored in one of the first to third storage units. When there are a plurality of calculation results, the respective calculation results are written to different storage means.

【0025】このような構成であれば、外部演算手段に
より、複数の演算方法のなかからいずれかが指定され、
第1ないし第3の記憶手段にデータが書き込まれると、
内部演算手段により、第1ないし第3の記憶手段からそ
れぞれデータが読み込まれ、読み込まれた複数のデータ
に基づいて、指定された演算方法により各演算方法に共
通する共通演算を含む演算が行われる。その結果、演算
結果が1つであるときは、その演算結果が複数の記憶手
段のうちいずれかに書き込まれ、演算結果が複数である
ときは、その各演算結果がそれぞれ異なる記憶手段に書
き込まれる。
With such a configuration, one of a plurality of arithmetic methods is designated by the external arithmetic means,
When data is written to the first to third storage means,
The internal operation means reads data from the first to third storage means, respectively, and performs an operation including a common operation common to each operation method by a designated operation method based on the plurality of read data. . As a result, when there is one operation result, the operation result is written to any of the plurality of storage units, and when there is more than one operation result, each operation result is written to a different storage unit. .

【0026】さらに、本発明に係る請求項7記載の演算
補助回路は、請求項6記載の演算補助回路において、前
記内部演算手段は、前記演算方法を指定する命令として
前記色素変換を行うことを示す色素変換命令が与えられ
た場合には、前記第1ないし第3の記憶手段からそれぞ
れデータを読み込み、読み込んだ3つのデータに基づい
て第1の積和演算、第2の積和演算および第3の積和演
算を行い、前記第1の積和演算結果を前記第1の記憶手
段に、前記第2の積和演算結果を前記第2の記憶手段
に、前記第3の積和演算結果を前記第3の記憶手段に書
き込むようになっており、前記第1ないし第3の積和演
算は、前記読み込んだ3つのデータに対してそれぞれ係
数を乗算してその各乗算結果を加算するものである。
According to a seventh aspect of the present invention, in the arithmetic auxiliary circuit according to the sixth aspect, the internal arithmetic means performs the dye conversion as an instruction for specifying the arithmetic method. When a dye conversion command is given, data is read from each of the first to third storage units, and a first product-sum operation, a second product-sum operation, and a second product-sum operation are performed based on the read three data. 3, the first product-sum operation result is stored in the first storage means, the second product-sum operation result is stored in the second storage means, and the third product-sum operation result is stored. Is written into the third storage means, and the first to third multiply-accumulate operations multiply each of the read three data by a coefficient and add the respective multiplication results. It is.

【0027】このような構成であれば、色素変換命令が
与えられると、内部演算手段により、第1ないし第3の
記憶手段からそれぞれデータが読み込まれ、読み込まれ
た3つのデータに基づいて、第1の積和演算、第2の積
和演算および第3の積和演算が行われる。第1ないし第
3の積和演算では、読み込まれた3つのデータに対して
それぞれ係数が乗算されてその各乗算結果が加算され
る。そして、第1の積和演算結果が第1の記憶手段に、
第2の積和演算結果が第2の記憶手段に、第3の積和演
算結果が第3の記憶手段に書き込まれる。
With such a configuration, when a dye conversion command is given, data is read from the first to third storage means by the internal operation means, and the data is read out based on the three read data. The first product-sum operation, the second product-sum operation, and the third product-sum operation are performed. In the first to third product-sum operations, the read three data are multiplied by coefficients, and the results of the multiplication are added. Then, the first product-sum operation result is stored in the first storage means,
The second product-sum operation result is written to the second storage means, and the third product-sum operation result is written to the third storage means.

【0028】さらに、本発明に係る請求項8記載の演算
補助回路は、請求項6および7のいずれかに記載の演算
補助回路において、前記内部演算手段は、前記演算方法
を指定する命令として前記量子化演算を行うことを示す
量子化演算命令が与えられた場合には、前記第1ないし
第3の記憶手段からそれぞれデータを読み込み、読み込
んだ3つのデータに基づいて所定の演算を行い、前記所
定の演算結果のうち一部を前記第1ないし第3の記憶手
段のうちいずれかに、前記所定の演算結果のうち残りの
一部をそれ以外の記憶手段に書き込むようになってお
り、前記所定の演算は、前記第1および第2の記憶手段
から読み込んだデータを結合してなるデータに、前記第
3の記憶手段から読み込んだデータを乗算するものであ
る。
According to a further aspect of the present invention, in the arithmetic auxiliary circuit according to any one of the sixth and seventh aspects, the internal arithmetic means includes the instruction as an instruction for specifying the arithmetic method. When a quantization operation command indicating that a quantization operation is to be performed is given, data is read from the first to third storage units, and a predetermined calculation is performed based on the read three data. A part of the predetermined operation result is written into one of the first to third storage units, and the remaining part of the predetermined operation result is written into another storage unit. The predetermined operation is to multiply data obtained by combining data read from the first and second storage means with data read from the third storage means.

【0029】このような構成であれば、量子化演算命令
が与えられると、内部演算手段により、第1ないし第3
の記憶手段からそれぞれデータが読み込まれ、読み込ま
れた3つのデータに基づいて所定の演算が行われる。所
定の演算では、第1および第2の記憶手段から読み込ま
れたデータが結合されてなるデータに、第3の記憶手段
から読み込まれたデータが乗算される。そして、所定の
演算結果のうち一部が第1ないし第3の記憶手段のうち
いずれかに、所定の演算結果のうち残りの一部がそれ以
外の記憶手段に書き込まれる。
With such a configuration, when a quantization operation command is given, the first to third signals are output by the internal operation means.
Are read from the storage means, and a predetermined operation is performed based on the read three data. In the predetermined operation, data obtained by combining data read from the first and second storage units is multiplied by data read from the third storage unit. Then, a part of the predetermined operation result is written to one of the first to third storage units, and the remaining part of the predetermined operation result is written to the other storage units.

【0030】ここで、量子化演算とは、画像データを圧
縮する過程で行う量子化演算に限らず、画像データを解
凍する過程で行う逆量子化演算も含む。
Here, the quantization operation is not limited to the quantization operation performed in the process of compressing image data, but also includes the inverse quantization operation performed in the process of decompressing image data.

【0031】さらに、本発明に係る請求項9記載の演算
補助回路は、請求項6ないし8のいずれかに記載の演算
補助回路において、前記内部演算手段は、前記外部演算
手段による前記記憶手段への書込動作と並列して、前記
外部演算手段による書込状況を参照しながら前記読込、
前記演算及び前記書込を行うようになっている。
Further, according to a ninth aspect of the present invention, in the arithmetic auxiliary circuit according to any one of the sixth to eighth aspects, the internal arithmetic means is connected to the storage means by the external arithmetic means. In parallel with the writing operation of the above, the reading,
The calculation and the writing are performed.

【0032】このような構成であれば、内部演算手段に
より、外部演算手段による記憶手段への書込動作と並列
して、外部演算手段による書込状況を参照しながら読
込、演算及び書込が行われる。
With such a configuration, reading, calculation and writing can be performed by the internal arithmetic means in parallel with the writing operation to the storage means by the external arithmetic means while referring to the writing situation by the external arithmetic means. Done.

【0033】さらに、本発明に係る請求項10記載の演
算補助回路は、請求項9記載の演算補助回路において、
前記内部演算手段による動作は、前記読込を行う読込ス
テートと、前記演算を行う演算ステートと、前記書込を
行う書込ステートと、待機を行う待機ステートとからな
り、前記書込ステートでは、前記外部演算手段が前記第
1ないし第3の記憶手段に対してアクセスを行っている
かまたはアクセスを開始しようとしているときは、前記
外部演算手段によるアクセスが終了するのを待って前記
書込を行うようになっており、前記待機ステートでは、
次の読込ステートで読み込む予定のデータが前記第1な
いし第3の記憶手段に書き込まれていないときは、その
書込が終了するまで待機するようになっている。
Further, according to a tenth aspect of the present invention, in the arithmetic auxiliary circuit according to the ninth aspect,
The operation by the internal arithmetic means includes a read state for performing the read, an arithmetic state for performing the arithmetic, a write state for performing the write, and a standby state for performing the standby. When the external arithmetic means is accessing or starting to access the first to third storage means, the writing is performed after the access by the external arithmetic means is completed. In the waiting state,
When data to be read in the next reading state has not been written to the first to third storage means, the apparatus waits until the writing is completed.

【0034】このような構成であれば、書込ステートで
は、外部演算手段が第1ないし第3の記憶手段に対して
アクセスを行っているかまたはアクセスを開始しようと
しているときは、外部演算手段によるアクセスが終了す
るのを待って書込が行われる。また、待機ステートで
は、次の読込ステートで読み込む予定のデータが第1な
いし第3の記憶手段に書き込まれていないときは、その
書込が終了するまで待機する。
With this configuration, in the write state, when the external arithmetic means is accessing or starting to access the first to third storage means, the external arithmetic means uses the external arithmetic means. Writing is performed after the access is completed. In the standby state, if data to be read in the next read state has not been written to the first to third storage means, it waits until the writing is completed.

【0035】さらに、本発明に係る請求項11記載の演
算補助回路は、請求項6ないし10のいずれかに記載の
演算補助回路において、前記内部演算手段は、前記演算
結果を、その演算の基となったデータを読み込んだ前記
第1ないし第3の記憶手段のアドレスのうちいずれかに
書き込むようになっている。
Further, according to an eleventh aspect of the present invention, in the arithmetic auxiliary circuit according to any one of the sixth to tenth aspects, the internal arithmetic means outputs the arithmetic result based on the arithmetic result. Is written to any one of the addresses of the first to third storage means from which the read data is read.

【0036】このような構成であれば、内部演算手段に
より、演算結果が、その演算の基となったデータを読み
込んだ第1ないし第3の記憶手段のアドレスのうちいず
れかに書き込まれる。
With such a configuration, the calculation result is written by the internal calculation means to any of the addresses of the first to third storage means from which the data on which the calculation is based is read.

【0037】さらに、本発明に係る請求項12記載の演
算補助回路は、請求項6ないし11のいずれかに記載の
演算補助回路において、前記外部演算手段が前記第1乃
至第3の記憶手段に対して読込又は書込を行うときの読
込アドレス又は書込アドレスを変換するアドレス変換手
段を備え、前記アドレス変換手段は、前記演算方法を指
定する命令として前記ジグザグスキャンを行うことを示
すジグザグスキャン命令が与えられた場合には、前記外
部演算手段の読込アドレス又は書込アドレスを所定規則
で変換するようになっている。
According to a twelfth aspect of the present invention, in the arithmetic auxiliary circuit according to any one of the sixth to eleventh aspects, the external arithmetic means is provided in the first to third storage means. Address conversion means for converting a read address or a write address when reading or writing the data, wherein the address conversion means indicates that the zigzag scan is to be performed as a command for specifying the operation method. Is given, the read address or write address of the external arithmetic means is converted according to a predetermined rule.

【0038】このような構成であれば、ジグザグスキャ
ン命令が与えられると、アドレス変換手段により、外部
演算手段の読込アドレスまたは書込アドレスが所定規則
で変換される。
With such a configuration, when a zigzag scan instruction is given, the read address or write address of the external arithmetic means is converted by the address conversion means according to a predetermined rule.

【0039】ここで、ジグザグスキャンとは、画像デー
タを圧縮する過程で行うジグザグスキャンに限らず、画
像データを解凍する過程で行う逆ジグザグスキャンも含
む。
Here, the zigzag scan is not limited to the zigzag scan performed in the process of compressing image data, but also includes the inverse zigzag scan performed in the process of decompressing image data.

【0040】さらに、本発明に係る請求項13記載の演
算補助回路は、請求項6ないし12のいずれかに記載の
演算補助回路において、前記第1ないし第3の記憶手段
から読み込んだデータをそれぞれ保持する第1ないし第
3の読込側保持手段と、前記第1ないし第3の記憶手段
に書き込む演算結果をそれぞれ保持する第1ないし第3
の書込側保持手段と、前記演算に用いる係数を保持する
係数保持手段と、前記係数保持手段のいずれかの係数と
前記第1の読込側保持手段のデータとを乗算する第1の
乗算器と、前記係数保持手段のいずれかの係数と前記第
2の読込側保持手段のデータとを乗算する第2の乗算器
と、前記係数保持手段のいずれかの係数と前記第3の読
込側保持手段のデータとを乗算する第3の乗算器と、前
記第1ないし第3の乗算器の演算結果を加算する加算器
と、前記第1ないし第3の書込側保持手段と前記加算器
とを結ぶデータ経路をいずれかに切り換える経路切換手
段と、前記第1の読込側保持手段および前記第2の読込
側保持手段のデータを結合して前記第1の読込側保持手
段のデータとして前記第1の乗算器に出力する第1のデ
ータ出力手段と、前記第3の読込側保持手段のデータを
前記係数保持手段の係数として前記第1の乗算器に出力
する第2のデータ出力手段とを有する。
Further, according to a thirteenth aspect of the present invention, in the arithmetic auxiliary circuit according to any one of the sixth to twelfth aspects, the data read from the first to third storage means are respectively stored. First to third reading-side holding means for holding, and first to third means for respectively holding calculation results to be written in the first to third storage means.
Writing-side holding means, coefficient holding means for holding the coefficients used in the calculation, and a first multiplier for multiplying any of the coefficient holding means by the data of the first reading-side holding means A second multiplier for multiplying any one of the coefficients of the coefficient holding means by the data of the second reading-side holding means; and any one of the coefficients of the coefficient holding means and the third reading-side holding A third multiplier for multiplying the data of the means, an adder for adding the operation results of the first to third multipliers, the first to third write-side holding means, and the adder; Path switching means for switching any one of the data paths connecting the first and second reading-side holding means, and combining the data of the first and second reading-side holding means to form the first reading-side holding means as data of the first reading-side holding means. First data output means for outputting to the first multiplier; And a second data output means for outputting the data of the serial third reading side holding means to said first multiplier as the coefficient of the coefficient holding means.

【0041】このような構成であれば、第1ないし第3
の記憶手段からそれぞれデータが読み込まれると、第1
ないし第3の読込側保持手段により、読み込まれたデー
タがそれぞれ保持される。次いで、第1の乗算器によ
り、係数保持手段のいずれかの係数と第1の読込側保持
手段のデータとが乗算され、第2の乗算器により、係数
保持手段のいずれかの係数と第2の読込側保持手段のデ
ータとが乗算され、第3の乗算器により、係数保持手段
のいずれかの係数と第3の読込側保持手段のデータとが
乗算される。次いで、加算器により、第1ないし第3の
乗算器の演算結果が加算され、経路切換手段により、デ
ータ経路が、第1の書込側保持手段と加算器とを結ぶデ
ータ経路に切り換えられ、加算器の加算結果が第1の書
込側保持手段に保持される。
With such a configuration, the first to the third
When the data is read from the respective storage means, the first
The read data is held by the third reading-side holding means. Next, the first multiplier multiplies one of the coefficients of the coefficient holding means by the data of the first reading-side holding means, and the second multiplier multiplies one of the coefficients of the coefficient holding means by the second multiplier. Is multiplied by the data of the reading-side holding means, and any of the coefficients of the coefficient holding means is multiplied by the third multiplier by the data of the third reading-side holding means. Next, the operation results of the first to third multipliers are added by the adder, and the data path is switched to the data path connecting the first writing side holding means and the adder by the path switching means, The addition result of the adder is held in the first writing side holding means.

【0042】また、これと同じ要領で乗算および加算が
行われ、経路切換手段により、データ経路が、第2の書
込側保持手段と加算器とを結ぶデータ経路に切り換えら
れ、加算器の加算結果が第2の書込側保持手段に保持さ
れる。さらに、これと同じ要領で乗算および加算が行わ
れ、経路切換手段により、データ経路が、第3の書込側
保持手段と加算器とを結ぶデータ経路に切り換えられ、
加算器の加算結果が第3の書込側保持手段に保持され
る。
Multiplication and addition are performed in the same manner as described above, and the data path is switched by the path switching means to the data path connecting the second write-side holding means and the adder. The result is held in the second writing side holding means. Further, multiplication and addition are performed in the same manner, and the data path is switched by the path switching means to a data path connecting the third writing side holding means and the adder.
The addition result of the adder is held in the third writing side holding means.

【0043】そして、第1ないし第3の書込側保持手段
で保持されているデータが、第1ないし第3の記憶手段
にそれぞれ書き込まれる。
Then, the data held by the first to third writing side holding means are written into the first to third storage means, respectively.

【0044】一方、第1のデータ出力手段により、第1
の読込側保持手段および第2の読込側保持手段のデータ
が結合されて第1の読込側保持手段のデータとして第1
の乗算器に出力されるとともに、第2のデータ出力手段
により、第3の読込側保持手段のデータが係数保持手段
の係数として第1の乗算器に出力されると、第1の乗算
器により、第1および第2の記憶手段から読み込まれた
データが結合されてなるデータに、第3の記憶手段から
読み込まれたデータが乗算される。
On the other hand, the first data output means
The data of the reading side holding means and the data of the second reading side holding means are combined to form the first reading side holding means as data of the first reading side holding means.
When the data of the third reading-side holding unit is output to the first multiplier as a coefficient of the coefficient holding unit by the second data output unit, the first multiplier The data read from the third storage means is multiplied by the data obtained by combining the data read from the first and second storage means.

【0045】なお、請求項13記載の発明の動作として
は、上記のように、第1ないし第3の乗算器による乗算
が終了するのを待ってから加算器による加算を行っても
よいが、これに限らず、第1ないし第3の乗算器による
乗算と加算器による加算を並列に行ってもよい。例え
ば、「11×14+15×13」を計算する場合、前者
の動作によれば、「11×14=154」および「15
×13=195」を計算してから「154+195」を
計算することにより演算結果を得る。また、後者の動作
によれば、「11×14=44〔11×4〕+110
〔11×10〕」および「15×13=45〔15×
3〕+150〔15×10〕」を計算してから「44+
110+45+150」を計算することにより演算結果
を得る。
As an operation of the invention of claim 13, as described above, the addition by the adder may be performed after the completion of the multiplication by the first to third multipliers. The present invention is not limited to this, and the multiplication by the first to third multipliers and the addition by the adder may be performed in parallel. For example, when calculating “11 × 14 + 15 × 13”, according to the former operation, “11 × 14 = 154” and “15”
The calculation result is obtained by calculating “154 + 195” after calculating “× 13 = 195”. According to the latter operation, “11 × 14 = 44 [11 × 4] +110”
[11 × 10] ”and“ 15 × 13 = 45 [15 ×
3] +150 [15 × 10] ”and then“ 44+
The calculation result is obtained by calculating “110 + 45 + 150”.

【0046】[0046]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照しながら説明する。図1ないし図6は、本発明に
係る演算補助回路の実施の形態を示す図である。
Embodiments of the present invention will be described below with reference to the drawings. FIGS. 1 to 6 are diagrams showing an embodiment of an arithmetic assist circuit according to the present invention.

【0047】本実施の形態は、本発明に係る演算補助回
路を、ソフトウェアおよびハードウェアにより、DCT
による符号化方式で画像データの圧縮または解凍を行う
場合について適用したものである。具体的には、図1に
示すように、画像データの圧縮を行う場合は、YUV変
換部10、量子化演算部16およびジグザグスキャン部
18をハードウェアとしての演算補助回路50で実現
し、その他の処理部12,14,20をソフトウェアと
してのCPU40による処理で実現する。また、画像デ
ータの解凍を行う場合は、逆ジグザグスキャン部24、
逆量子化演算部26およびRGB変換部32を演算補助
回路50で実現し、その他の処理部22,28,30で
実現する。
In the present embodiment, the arithmetic assist circuit according to the present invention is implemented by software and hardware using a DCT.
This is applied to a case where image data is compressed or decompressed by an encoding method according to. Specifically, as shown in FIG. 1, when compressing image data, the YUV conversion unit 10, the quantization operation unit 16, and the zigzag scan unit 18 are realized by an operation auxiliary circuit 50 as hardware. Are realized by processing by the CPU 40 as software. When decompressing image data, the reverse zigzag scanning unit 24,
The inverse quantization operation unit 26 and the RGB conversion unit 32 are realized by the operation auxiliary circuit 50, and are realized by the other processing units 22, 28, and 30.

【0048】まず、本発明を適用した画像処理システム
の構成を図1を参照しながら説明する。図1は、本発明
を適用した画像処理システムの構成を示すブロック図で
ある。
First, the configuration of an image processing system to which the present invention is applied will be described with reference to FIG. FIG. 1 is a block diagram illustrating a configuration of an image processing system to which the present invention has been applied.

【0049】図1において、バス49には、制御プログ
ラムに基づいて演算およびシステム全体を制御するCP
U40と、画像データやCPU40の演算過程で必要な
演算結果を格納するための外部画像メモリ44と、CP
U40の処理を補助する演算補助回路50とが接続され
ている。ここで、演算補助回路50が本発明に係る演算
補助回路に相当する。
In FIG. 1, a bus 49 has a CP for controlling arithmetic operations and the entire system based on a control program.
U40, an external image memory 44 for storing image data and calculation results required in the calculation process of the CPU 40,
An arithmetic assist circuit 50 for assisting the processing of U40 is connected. Here, the arithmetic auxiliary circuit 50 corresponds to the arithmetic auxiliary circuit according to the present invention.

【0050】演算補助回路50は、内部演算回路52
と、8×8画素の画像データを格納可能なメモリ容量を
有しかつCPU40および内部演算回路52の両方がア
クセス可能な3つのバッファ54,56,58と、CP
U40からの命令および内部演算回路52の演算に必要
な係数を格納するレジスタ60と、CPU40がバッフ
ァ54〜58に対して読込または書込を行うときの読込
アドレスまたは書込アドレスを変換するアドレス変換器
62と、CPU40の書込アドレスを監視しながら書込
アドレスに基づいて演算用トリガを生成する演算用トリ
ガ生成回路64とで構成されている。
The arithmetic assist circuit 50 includes an internal arithmetic circuit 52
And three buffers 54, 56, and 58 having a memory capacity capable of storing image data of 8 × 8 pixels and accessible by both the CPU 40 and the internal arithmetic circuit 52;
A register 60 for storing an instruction from U40 and a coefficient necessary for the operation of internal operation circuit 52, and an address converter for converting a read address or a write address when CPU 40 reads or writes from / to buffers 54 to 58. And a calculation trigger generation circuit 64 that generates a calculation trigger based on the write address while monitoring the write address of the CPU 40.

【0051】レジスタ60は、CPU40からの命令を
内部演算回路52およびアドレス変換器62が参照する
ために、CPU40から与えられた命令を一時的に格納
するようになっている。CPU40からの命令として
は、YUV変換を行うことを示すYUV変換命令と、量
子化演算を行うことを示す量子化演算命令と、ジグザグ
スキャンを行うことを示すジグザグスキャン命令と、逆
ジグザグスキャンを行うことを示す逆ジグザグスキャン
命令と、逆量子化演算を行うことを示す逆量子化演算命
令と、RGB変換を行うことを示すRGB変換命令とが
ある。このうち、ジグザグスキャン命令および逆ジグザ
グスキャン命令は、アドレス変換器62によって参照さ
れ、それ以外の命令は、内部演算回路52によって参照
される。
The register 60 temporarily stores the instruction given from the CPU 40 so that the internal arithmetic circuit 52 and the address converter 62 refer to the instruction from the CPU 40. The commands from the CPU 40 include a YUV conversion command indicating that the YUV conversion is performed, a quantization operation command indicating that the quantization operation is performed, a zigzag scan command indicating that the zigzag scan is performed, and an inverse zigzag scan. There is an inverse zigzag scan instruction indicating that the above operation is performed, an inverse quantization operation instruction indicating that the inverse quantization operation is performed, and an RGB conversion instruction indicating that the RGB conversion is performed. Among them, the zigzag scan instruction and the reverse zigzag scan instruction are referred to by the address converter 62, and the other instructions are referred to by the internal arithmetic circuit 52.

【0052】また、レジスタ60には、内部演算回路5
2がYUV変換またはRGB変換を行うときに必要な係
数が格納されている。YUV変換は、画素を構成するR
成分、G成分およびB成分の色素データをそれぞれR、
GおよびBとし、画素を構成するY成分、U成分および
V成分の色素データをそれぞれY、UおよびVとする
と、下式(1)〜(3)により行われる。また、RGB
変換は、下式(4)〜(6)により行われる。すなわ
ち、下式(1)〜(3)において、R、GおよびBに乗
算する係数kyr、kyg、kyb、kur、kug、kub
vr、kvg、kvbが、下式(4)〜(6)において、
Y、UおよびVに乗算する係数kry、kru、krv
gy、kgu、kgv、kby、kbu、kbvがレジスタ60に
格納されている。なお、これら係数は、いずれも8ビッ
トのデータで構成されており、CPU40がYUV変換
命令またはRGB変換命令を出力するときにCPU40
が格納するようにしてもよいし、あらかじめ格納してお
いてもよい。
The register 60 includes the internal arithmetic circuit 5.
2 stores coefficients required when performing YUV conversion or RGB conversion. YUV conversion is based on the R
The dye data of the component, the G component, and the B component are respectively represented by R,
Assuming that G and B are used, and Y, U and V are the dye data of the Y component, U component and V component constituting the pixel, respectively, the following equations (1) to (3) are used. Also, RGB
The conversion is performed by the following equations (4) to (6). That is, in the following equation (1) to (3), the coefficient k yr multiplying R, G, and B, k yg, k yb, k ur, k ug, k ub,
k vr , k vg , and k vb are represented by the following equations (4) to (6):
Coefficients k ry , k ru , k rv , which multiply Y, U and V,
k gy , k gu , k gv , k by , k bu , and k bv are stored in the register 60. Each of these coefficients is composed of 8-bit data. When the CPU 40 outputs a YUV conversion command or an RGB conversion command,
May be stored, or may be stored in advance.

【0053】 Y = kyr×R +kyg×G +kyb×B … (1) U = kur×R +kug×G +kub×B … (2) V = kvr×R +kvg×G +kvb×B … (3) R = kry×Y +kru×U +krv×V … (4) G = kgy×Y +kgu×U +kgv×V … (5) B = kby×Y +kbu×U +kbv×V … (6) 次に、内部演算回路52の構成を図2を参照しながら詳
細に説明する。図2は、内部演算回路52の構成を示す
ブロック図である。
Y = kyr × R + kyg × G + kyb × B (1) U = kur × R + kug × G + kub × B (2) V = kvr × R + kvg × G + k vb × B ... (3) R = k ry × Y + k ru × U + k rv × V ... (4) G = k gy × Y + k gu × U + k gv × V ... (5) B = k by × Y + k bu × U + kbv × V (6) Next, the configuration of the internal arithmetic circuit 52 will be described in detail with reference to FIG. FIG. 2 is a block diagram showing a configuration of the internal operation circuit 52.

【0054】内部演算回路52は、図2に示すように、
各バッファ54〜58から読み込んだデータをそれぞれ
ラッチする3つの読込側ラッチ回路100,102,1
04と、バッファ54〜58に書き込む演算結果をそれ
ぞれラッチする3つの書込側ラッチ回路106,10
8,110と、読込側ラッチ回路100〜102のデー
タと乗算する係数をそれぞれ決定する切換器112,1
14,116と、読込側ラッチ回路100のデータと切
換器112の出力係数を乗算する乗算器118と、読込
側ラッチ回路102のデータと切換器114の出力係数
を乗算する乗算器120と、読込側ラッチ回路104の
データと切換器116の出力係数を乗算する乗算器12
2とを有して構成されている。さらに、乗算器118〜
122の乗算結果を加算する加算器124と、書込側ラ
ッチ回路106〜110と加算器124とを結ぶデータ
経路をいずれかに切り換える切換器126と、読込側ラ
ッチ回路100,102のデータを結合して読込側ラッ
チ回路100のデータとして乗算器118に出力する切
換器128と、読込側ラッチ回路104のデータを切換
器112の出力係数として乗算器118に出力する切換
器130とを有して構成されている。
The internal operation circuit 52, as shown in FIG.
Three read-side latch circuits 100, 102, and 1 for latching data read from the buffers 54 to 58, respectively.
04 and three write-side latch circuits 106 and 10 for latching the operation results to be written into the buffers 54 to 58, respectively.
8 and 110 and switches 112 and 1 for determining coefficients to be multiplied by the data of the read-side latch circuits 100 to 102, respectively.
14, a multiplier 118 for multiplying the data of the read-side latch circuit 100 by the output coefficient of the switch 112; a multiplier 120 for multiplying the data of the read-side latch circuit 102 by the output coefficient of the switch 114; Multiplier 12 for multiplying the data of side latch circuit 104 by the output coefficient of switch 116
2 are provided. Further, multipliers 118 to
An adder 124 for adding the multiplication result of 122, a switch 126 for switching the data path connecting the write-side latch circuits 106 to 110 to the adder 124, and data of the read-side latch circuits 100 and 102 are combined. And a switch 130 for outputting the data of the read-side latch circuit 104 to the multiplier 118 as an output coefficient of the switch 112. It is configured.

【0055】読込側ラッチ回路100〜104および書
込側ラッチ回路106〜110は、図示しない制御回路
の制御により、いずれも8ビットのデータをラッチする
ようになっている。
Each of the read-side latch circuits 100 to 104 and the write-side latch circuits 106 to 110 latches 8-bit data under the control of a control circuit (not shown).

【0056】切換器112は、レジスタ60の係数
yr,kur,kvr,kry,kgy,kbyを選択的に切り換
えて出力するようになっている。すなわち、YUV変換
を行う場合、Yを算出するときは係数kyrを、Uを算出
するときは係数kurを、Vを算出するときは係数kvr
出力する。RGB変換を行う場合、Rを算出するときは
係数kryを、Gを算出するときは係数kgyを、Bを算出
するときは係数kbyを出力する。
The switch 112 selectively switches and outputs coefficients k yr , k ur , k vr , k ry , k gy , and k by of the register 60. That is, when performing YUV conversion, a coefficient k yr is calculated when Y is calculated, a coefficient k ur is calculated when U is calculated, and a coefficient k vr is calculated when V is calculated. When performing RGB conversion, the coefficient k ry when calculating the R, the coefficient k gy when calculating the G, when calculating the B outputs the coefficient k By.

【0057】切換器114は、レジスタ60の係数
yg,kug,kvg,kru,kgu,kbuを選択的に切り換
えて出力するようになっている。すなわち、YUV変換
を行う場合、Yを算出するときは係数kygを、Uを算出
するときは係数kugを、Vを算出するときは係数kvg
出力する。RGB変換を行う場合、Rを算出するときは
係数kruを、Gを算出するときは係数kguを、Bを算出
するときは係数kbuを出力する。
The switch 114 selectively switches and outputs the coefficients k yg , k ug , k vg , k ru , k gu , and k bu of the register 60. That is, when performing YUV conversion, the coefficient k yg when calculating the Y, the coefficient k ug when calculating the U, when calculating V outputs the coefficient k vg. When performing RGB conversion, a coefficient k ru is output when calculating R, a coefficient k gu is output when calculating G, and a coefficient k bu is output when calculating B.

【0058】切換器116は、レジスタ60の係数
yb,kub,kvb,krv,kgv,kbvを選択的に切り換
えて出力するようになっている。すなわち、YUV変換
を行う場合、Yを算出するときは係数kybを、Uを算出
するときは係数kubを、Vを算出するときは係数kvb
出力する。RGB変換を行う場合、Rを算出するときは
係数krvを、Gを算出するときは係数kgvを、Bを算出
するときは係数kbvを出力する。
The switch 116 selectively switches and outputs the coefficients k yb , k ub , k vb , k rv , k gv , and k bv of the register 60. That is, when performing YUV conversion, the coefficient k yb is output when Y is calculated, the coefficient k ub is calculated when U is calculated, and the coefficient k vb is output when V is calculated. When RGB conversion is performed, the coefficient k rv is output when calculating R, the coefficient k gv is output when calculating G, and the coefficient k bv is output when calculating B.

【0059】乗算器118は、読込側ラッチ回路100
側の入力ビット数が16ビットで、切換器112側の入
力ビット数が8ビットであり、16ビットと8ビットの
乗算を行って、その乗算結果である24ビットのデータ
を加算器124に出力するようになっている。
The multiplier 118 is connected to the read-side latch circuit 100
The number of input bits on the switch side is 16 bits, and the number of input bits on the switch 112 side is 8 bits. Multiplication of 16 bits and 8 bits is performed, and 24-bit data as a result of the multiplication is output to the adder 124. It is supposed to.

【0060】乗算器120は、読込側ラッチ回路102
側の入力ビット数が8ビットで、切換器114側の入力
ビット数が8ビットであり、8ビットと8ビットの乗算
を行って、その乗算結果である16ビットのデータを加
算器124に出力するようになっている。
The multiplier 120 is connected to the read-side latch circuit 102
The number of input bits on the input side is 8 bits, and the number of input bits on the switch 114 side is 8 bits. Multiplication of 8 bits and 8 bits is performed, and 16-bit data as a result of the multiplication is output to the adder 124. It is supposed to.

【0061】乗算器122は、読込側ラッチ回路104
側の入力ビット数が8ビットで、切換器116側の入力
ビット数が8ビットであり、8ビットと8ビットの乗算
を行って、その乗算結果である16ビットのデータを加
算器124に出力するようになっている。
The multiplier 122 is connected to the read-side latch circuit 104
The number of input bits on the side is 8 bits, and the number of input bits on the switch 116 side is 8 bits. Multiplication of 8 bits and 8 bits is performed, and the 16-bit data resulting from the multiplication is output to the adder 124. It is supposed to.

【0062】加算器124は、乗算器118からの16
ビットのデータと、乗算器120からの16ビットのデ
ータと、乗算器122からの16ビットのデータとを加
算し、与えられた命令に応じて、その加算結果のデータ
のうち16ビットのデータを切換器126に出力するよ
うになっている。具体的には、加算器124と切換器1
26との間に設けられた図示しないシフトレジスタによ
り、与えられた命令に応じて加算結果を所定ビットシフ
トし、シフトレジスタの例えば下位16ビットのデータ
を切換器126に出力する。
The adder 124 outputs the 16
Bit data, the 16-bit data from the multiplier 120, and the 16-bit data from the multiplier 122, and according to a given instruction, 16-bit data of the addition result data is The data is output to the switch 126. Specifically, the adder 124 and the switch 1
26, the addition result is shifted by a predetermined bit in accordance with a given instruction by a shift register (not shown), and outputs, for example, lower 16-bit data of the shift register to the switch 126.

【0063】切換器126は、YUV変換またはRGB
変換を行うときは、加算器124からの16ビットのデ
ータのうち下位8ビットのデータを、書込側ラッチ回路
106〜110のうちいずれかに選択的に出力するよう
になっている。また、量子化演算または逆量子化演算を
行うときは、加算器124からの16ビットのデータの
うち上位8ビットのデータを書込側ラッチ回路106に
出力し、下位8ビットのデータを書込側ラッチ回路10
8に出力するようになっている。
The switch 126 is used for YUV conversion or RGB.
When performing the conversion, the lower 8 bits of the 16-bit data from the adder 124 are selectively output to any of the write-side latch circuits 106 to 110. When performing the quantization operation or the inverse quantization operation, the upper 8 bits of the 16-bit data from the adder 124 are output to the write-side latch circuit 106, and the lower 8 bits are written. Side latch circuit 10
8 is output.

【0064】切換器128は、2つの切換状態を有し、
第1の切換状態では、読込側ラッチ回路100のデータ
を下位8ビットのデータとし、上位8ビットのデータを
0としてそれらを結合して16ビットのデータを生成
し、乗算器118に出力するようになっている。また、
第2の切換状態では、読込側ラッチ回路100のデータ
を上位8ビットのデータとし、読込側ラッチ回路102
のデータを下位8ビットのデータとしてそれらを結合し
て16ビットのデータを生成し、乗算器118に出力す
るようになっている。
The switch 128 has two switching states,
In the first switching state, the data of the read-side latch circuit 100 is set to lower 8-bit data, the upper 8-bit data is set to 0, and they are combined to generate 16-bit data, which is output to the multiplier 118. It has become. Also,
In the second switching state, the data of the read-side latch circuit 100 is changed to upper 8-bit data,
Are combined as low-order 8-bit data to generate 16-bit data, which is output to the multiplier 118.

【0065】切換器130は、2つの切換状態を有し、
第1の切換状態では、切換器112からの出力係数を乗
算器118に出力するようになっており、第2の切換状
態では、読込側ラッチ回路104のデータを乗算器11
8に出力するようになっている。
The switch 130 has two switch states,
In the first switching state, the output coefficient from the switching unit 112 is output to the multiplier 118, and in the second switching state, the data of the read-side latch circuit 104 is output to the multiplier 11.
8 is output.

【0066】内部演算回路52は、YUV変換命令が与
えられたときは、図3に示すように、6つのステートを
単位として動作するようになっている。図3は、YUV
変換するときの内部演算回路52の各ステートを示す図
である。なお、RGB変換は、YUV変換と同じ要領で
行われるので、ここでは、YUV変換についてのみを説
明し、RGB変換については説明を省略する。
When a YUV conversion instruction is given, the internal operation circuit 52 operates in units of six states as shown in FIG. FIG. 3 shows YUV
FIG. 3 is a diagram illustrating each state of an internal operation circuit 52 when converting. Since the RGB conversion is performed in the same manner as the YUV conversion, here, only the YUV conversion will be described, and the description of the RGB conversion will be omitted.

【0067】各ステートは、図3に示すように、バッフ
ァ54〜58から読込側ラッチ回路100〜104にそ
れぞれRGB成分の色素データ(以下、単にRGBデー
タという。)を読み込む読込ステート(State0)と、
読込側ラッチ回路100〜104のRGBデータに基づ
いてY成分の色素データを算出するY成分算出ステート
(State1)と、読込側ラッチ回路100〜104のR
GBデータに基づいてU成分の色素データを算出するU
成分算出ステート(State2)と、読込側ラッチ回路1
00〜104のRGBデータに基づいてV成分の色素デ
ータを算出するV成分算出ステート(State3)と、書
込側ラッチ回路106〜110のYUV成分の色素デー
タ(以下、単にYUVデータという。)をバッファ54
〜58に書き込む書込ステート(State5)と、次の読
込ステートで読み込む予定のRGBデータがバッファ5
4〜58に書き込まれるまで待機する待機ステート(St
ate6)とからなる。
Each state is, as shown in FIG. 3, a reading state (State 0) for reading RGB component dye data (hereinafter simply referred to as RGB data) from the buffers 54 to 58 to the reading-side latch circuits 100 to 104, respectively. ,
A Y-component calculation state (State1) for calculating Y-component dye data based on the RGB data of the read-side latch circuits 100 to 104;
U for calculating U component dye data based on GB data
Component calculation state (State 2) and read-side latch circuit 1
A V component calculation state (State 3) for calculating the V component dye data based on the RGB data of 00 to 104, and the YUV component dye data (hereinafter simply referred to as YUV data) of the write-side latch circuits 106 to 110. Buffer 54
And the RGB data to be read in the next read state are stored in the buffer 5.
Waiting state (St
ate6).

【0068】なお、以下、R成分の色素データ、G成分
の色素データ、B成分の色素データ、Y成分の色素デー
タ、U成分の色素データおよびV成分の色素データのこ
とを、単にRデータ、Gデータ、Bデータ、Yデータ、
UデータおよびVデータという。また、これらそれぞれ
の組み合わせを、例えば、RデータとGデータとの組み
合わせであればRGデータということもある。
Hereinafter, the dye data of the R component, the dye data of the G component, the dye data of the B component, the dye data of the Y component, the dye data of the U component, and the dye data of the V component are simply referred to as R data, G data, B data, Y data,
They are called U data and V data. Further, if each of these combinations is a combination of R data and G data, it may be referred to as RG data.

【0069】読込ステートでは、各バッファ54〜58
の同一アドレスからそれぞれデータを読み込み、バッフ
ァ54から読み込んだデータを読込側ラッチ回路100
に、バッファ56から読み込んだデータを読込側ラッチ
回路102に、バッファ58から読み込んだデータを読
込側ラッチ回路102に出力するようになっている。こ
れにより、CPU40が、8×8画素の画像データのう
ち、Rデータをバッファ54に、Gデータをバッファ5
6に、Bデータをバッファ58に書き込むと、1回目の
読込ステートでは、8×8画素のデータのうち表示画面
上で左上に位置する画像データであって、そのRデータ
が読込側ラッチ回路100に、そのGデータが読込側ラ
ッチ回路102に、そのBデータが読込側ラッチ回路1
04にラッチされる。すなわち、読込ステートを64回
繰り返すことで、バッファ54〜58のRGBデータを
一つずつ読込側ラッチ回路100〜104に読み込んで
いく。
In the read state, each of the buffers 54 to 58
From the same address, and reads the data read from the buffer 54 into the read-side latch circuit 100.
The data read from the buffer 56 is output to the read-side latch circuit 102, and the data read from the buffer 58 is output to the read-side latch circuit 102. Thus, the CPU 40 stores the R data in the buffer 54 and the G data in the buffer 5 out of the image data of 8 × 8 pixels.
6, when the B data is written to the buffer 58, in the first read state, of the 8 × 8 pixel data, the image data located at the upper left on the display screen, and the R data thereof is the read side latch circuit 100. The G data is stored in the read-side latch circuit 102, and the B data is stored in the read-side latch circuit 1.
04 is latched. That is, by repeating the read state 64 times, the RGB data in the buffers 54 to 58 is read into the read-side latch circuits 100 to 104 one by one.

【0070】Y成分算出ステートでは、切換器112〜
116を切り換えて係数kyr,kyg,kybを選択し、読
込側ラッチ回路100のRデータと切換器112からの
出力係数kyrとを乗算器118で乗算し、読込側ラッチ
回路102のGデータと切換器114からの出力係数k
ygとを乗算器120で乗算し、読込側ラッチ回路104
のBデータと切換器116からの出力係数kybとを乗算
器122で乗算し、それら乗算結果を加算器124で加
算し、切換器126を切り換えて加算器124からのデ
ータをYデータとして書込側ラッチ回路106にラッチ
させるようになっている。
In the Y component calculation state, the switches 112 to
116, the coefficients k yr , kyg , and kyb are selected, the R data of the read-side latch circuit 100 and the output coefficient k yr from the switch 112 are multiplied by a multiplier 118, and the read-side latch circuit 102 G data and output coefficient k from switch 114
yg is multiplied by a multiplier 120 and the read-side latch circuit 104
, And the output coefficient k yb from the switch 116 is multiplied by the multiplier 122, the multiplication result is added by the adder 124, the switch 126 is switched, and the data from the adder 124 is written as Y data. The latch circuit 106 latches the data.

【0071】U成分算出ステートでは、切換器112〜
116を切り換えて係数kur,kug,kubを選択し、読
込側ラッチ回路100のRデータと切換器112からの
出力係数kurとを乗算器118で乗算し、読込側ラッチ
回路102のGデータと切換器114からの出力係数k
ugとを乗算器120で乗算し、読込側ラッチ回路104
のBデータと切換器116からの出力係数kubとを乗算
器122で乗算し、それら乗算結果を加算器124で加
算し、切換器126を切り換えて加算器124からのデ
ータをUデータとして書込側ラッチ回路108にラッチ
させるようになっている。
In the U component calculation state, the switches 112 to
116, the coefficients k ur , k ug , and k ub are selected, the R data of the read-side latch circuit 100 and the output coefficient k ur from the switch 112 are multiplied by a multiplier 118, and the read-side latch circuit 102 G data and output coefficient k from switch 114
ug is multiplied by the multiplier 120 and the read-side latch circuit 104
, And the output coefficient k ub from the switch 116 is multiplied by the multiplier 122, the multiplication result is added by the adder 124, the switch 126 is switched, and the data from the adder 124 is written as U data. The latch circuit 108 latches.

【0072】V成分算出ステートでは、切換器112〜
116を切り換えて係数kvr,kvg,kvbを選択し、読
込側ラッチ回路100のRデータと切換器112からの
出力係数kvrとを乗算器118で乗算し、読込側ラッチ
回路102のGデータと切換器114からの出力係数k
vgとを乗算器120で乗算し、読込側ラッチ回路104
のBデータと切換器116からの出力係数kvbとを乗算
器122で乗算し、それら乗算結果を加算器124で加
算し、切換器126を切り換えて加算器124からのデ
ータをVデータとして書込側ラッチ回路110にラッチ
させるようになっている。
In the V component calculation state, the switches 112 to
116, the coefficients k vr , k vg , and k vb are selected, and the R data of the read-side latch circuit 100 and the output coefficient k vr from the switch 112 are multiplied by a multiplier 118. G data and output coefficient k from switch 114
vg is multiplied by a multiplier 120 and the read-side latch circuit 104
Is multiplied by the output coefficient k vb from the switch 116 by the multiplier 122, the multiplication result is added by the adder 124, the switch 126 is switched, and the data from the adder 124 is written as V data. The latch circuit 110 latches the data.

【0073】書込ステートでは、書込側ラッチ回路10
6のYデータをバッファ54に、書込側ラッチ回路10
8のUデータをバッファ56に、書込側ラッチ回路11
0のVデータをバッファ58に書き込むようになってい
る。ここで、書込アドレスは、読込ステートで指定した
読込アドレスと同一のアドレスとする。また、書込ステ
ートでは、CPU40がバッファ54〜58に対してア
クセスを行っているかまたはアクセスを開始しようとし
ているときは、CPU40によるアクセスが終了するの
を待ってデータの書込を行うようになってる。
In the write state, write-side latch circuit 10
6 to the buffer 54 and the write-side latch circuit 10
8 into the buffer 56 and the write-side latch circuit 11
The V data of 0 is written in the buffer 58. Here, the write address is the same address as the read address specified in the read state. In the write state, when the CPU 40 is accessing or starting to access the buffers 54 to 58, the data is written after the access by the CPU 40 is completed. Te

【0074】待機ステートでは、次の読込ステートで読
み込む予定のRGBデータがバッファ54〜58に書き
込まれていないときは、その書込が終了するまで待機す
るようになっている。また、CPU40がバッファ54
〜58に対してアクセスを行っているかまたはアクセス
を開始しようとしているときは、CPU40によるアク
セスが終了するまで待機するようになっている。なお、
次の読込ステートで読み込む予定のRGBデータがバッ
ファ54〜58に書き込まれているか否かは、演算用ト
リガ生成回路64からの演算用トリガを入力するごとに
インクリメントされるCPU動作カウンタの値と、書込
ステート終了後にインクリメントされる内部演算回路動
作カウンタの値とを比較することにより判定する。すな
わち、CPU動作カウンタの値が内部演算回路動作カウ
ンタの値よりも大きいと判定したときは、次の読込ステ
ートで読み込む予定のRGBデータがバッファ54〜5
8に書き込まれたと判定し、待機を解除する。
In the standby state, when the RGB data to be read in the next read state has not been written to the buffers 54 to 58, the process waits until the writing is completed. Also, the CPU 40
When an access is being made or an attempt is being made to start access to 5858, the CPU 40 waits until the access by the CPU 40 ends. In addition,
Whether or not the RGB data to be read in the next read state has been written to the buffers 54 to 58 depends on the value of the CPU operation counter that is incremented each time a calculation trigger from the calculation trigger generation circuit 64 is input, and The determination is made by comparing the value of the internal operation circuit operation counter that is incremented after the end of the write state. That is, when it is determined that the value of the CPU operation counter is larger than the value of the internal operation circuit operation counter, the RGB data to be read in the next read state is stored in the buffers 54-5.
8 is written, and the standby is released.

【0075】内部演算回路52は、バス49の動作クロ
ックを基準として動作し、読込ステート、Y成分算出ス
テート、U成分算出ステートおよびV成分算出ステート
を、いずれも1クロックで行うようになっている。ま
た、書込ステートおよび待機ステートについては、上記
待機条件を満たしていなければ1クロックで行うが、待
機条件を満たしているか否かの判定を1クロックごとに
行い、待機条件を満たしていると判定したときは、1ク
ロック分待機するようになっている。これにより、CP
U40によるバッファ54〜58への書込動作と並列し
て、CPU40による書込状況を参照しながらCPU4
0とは独立に各ステートが行われる。
The internal operation circuit 52 operates on the basis of the operation clock of the bus 49, and performs the read state, the Y-component calculation state, the U-component calculation state, and the V-component calculation state in one clock. . If the standby condition is not satisfied, the write state and the standby state are performed in one clock. However, it is determined whether or not the standby condition is satisfied, every clock, and it is determined that the standby condition is satisfied. Then, it waits for one clock. Thereby, the CP
In parallel with the writing operation by the U40 to the buffers 54 to 58, the CPU 4
Each state is performed independently of 0.

【0076】内部演算回路52は、量子化演算命令が与
えられたときは、図4に示すように、4つのステートを
単位として動作するようになっている。図4は、量子化
演算するときの内部演算回路52の各ステートを示す図
である。なお、逆量子化演算は、量子化演算と同じ要領
で行われるので、ここでは、量子化演算についてのみを
説明し、逆量子化演算については説明を省略する。
When a quantization operation command is given, the internal operation circuit 52 operates in units of four states as shown in FIG. FIG. 4 is a diagram showing each state of the internal operation circuit 52 when performing a quantization operation. Since the inverse quantization operation is performed in the same manner as the quantization operation, here, only the quantization operation will be described, and the description of the inverse quantization operation will be omitted.

【0077】各ステートは、図4に示すように、バッフ
ァ54〜58から読込側ラッチ回路100〜104にそ
れぞれデータを読み込む読込ステート(State0)と、
読込側ラッチ回路100〜104のRGBデータに基づ
いて量子化演算を行う量子化演算ステート(State4)
と、書込側ラッチ回路106〜110のデータをバッフ
ァ54〜58に書き込む書込ステート(State5)と、
次の読込ステートで読み込む予定のデータがバッファ5
4〜58に書き込まれるまで待機する待機ステート(St
ate6)とからなる。
Each state is, as shown in FIG. 4, a read state (State 0) for reading data from the buffers 54 to 58 to the read-side latch circuits 100 to 104, respectively.
Quantization operation state (State 4) for performing a quantization operation based on the RGB data of the read-side latch circuits 100 to 104
A write state (State 5) for writing the data of the write-side latch circuits 106 to 110 into the buffers 54 to 58;
Data to be read in the next read state is buffer 5
Waiting state (St
ate6).

【0078】読込ステートでは、各バッファ54〜58
の同一アドレスからそれぞれデータを読み込み、バッフ
ァ54から読み込んだデータを読込側ラッチ回路100
に、バッファ56から読み込んだデータを読込側ラッチ
回路102に、バッファ58から読み込んだデータを読
込側ラッチ回路102に出力するようになっている。こ
れにより、CPU40が8×8画素の画像データについ
てDCTを行うと16ビット単位の周波数成分データが
生成されるが、CPU40が、DCTを行って得た周波
数成分データのうち上位8ビットのデータをバッファ5
4に、下位8ビットのデータをバッファ56に書き込む
とともに、量子化係数をバッファ58に書き込むと、1
回目の読込ステートでは、8×8画素の水平方向および
垂直方向の周波数が最も低い周波数成分データであっ
て、その上位8ビットのデータが読込側ラッチ回路10
0に、その下位8ビットのデータが読込側ラッチ回路1
02にラッチされるとともに、これに乗算する量子化係
数が読込側ラッチ回路104にラッチされる。すなわ
ち、水平方向および垂直方向の周波数の区分数だけ読込
ステートを繰り返すことで、バッファ54,56の周波
数成分データを一つずつ読込側ラッチ回路100,10
2に読み込んでいく。
In the read state, each of the buffers 54 to 58
From the same address, and reads the data read from the buffer 54 into the read-side latch circuit 100.
The data read from the buffer 56 is output to the read-side latch circuit 102, and the data read from the buffer 58 is output to the read-side latch circuit 102. Thus, when the CPU 40 performs DCT on the image data of 8 × 8 pixels, frequency component data in units of 16 bits is generated. However, the CPU 40 converts the upper 8 bits of the frequency component data obtained by performing DCT. Buffer 5
4, the lower 8 bits of data are written to the buffer 56 and the quantized coefficients are written to the buffer 58.
In the second read state, the horizontal frequency and vertical frequency of 8 × 8 pixels are the lowest frequency component data, and the data of the upper 8 bits is the read-side latch circuit 10.
0, the lower 8 bits of the data are read-side latch circuit 1
02, and the quantization coefficient to be multiplied is latched by the read-side latch circuit 104. That is, the read state is repeated by the number of divisions of the frequency in the horizontal direction and the vertical direction, so that the frequency component data of the buffers 54 and 56 is read one by one into the read-side latch circuits 100 and 10.
Read in 2.

【0079】量子化演算ステートでは、切換器128を
切り換えて読込側ラッチ回路100,102のデータを
結合して乗算器118に出力し、切換器130を切り換
えて読込側ラッチ回路104の量子化係数を乗算器11
8に出力し、読込側ラッチ回路100,102の周波数
成分データと読込側ラッチ回路104の量子化係数とを
乗算器118で乗算し、その乗算結果である24ビット
のデータのうち上位8ビットのデータを切り捨て、残り
の16ビットのデータのうち上位8ビットのデータを書
込側ラッチ回路106にラッチさせ、下位8ビットのデ
ータを書込側ラッチ回路108にラッチさせる。
In the quantization operation state, the switch 128 is switched to combine the data of the read-side latch circuits 100 and 102 and output to the multiplier 118, and the switch 130 is switched to switch the quantization coefficient of the read-side latch circuit 104. To the multiplier 11
8 and the multiplier 118 multiplies the frequency component data of the read-side latch circuits 100 and 102 by the quantization coefficient of the read-side latch circuit 104, and outputs the higher-order 8 bits of the 24-bit data resulting from the multiplication. The data is discarded, the upper 8 bits of the remaining 16 bits of data are latched by the write side latch circuit 106, and the lower 8 bits of data are latched by the write side latch circuit 108.

【0080】書込ステートでは、書込側ラッチ回路10
6のデータをバッファ54に、書込側ラッチ回路108
のデータをバッファ56に書き込むようになっている。
ここで、書込アドレスは、読込ステートで指定した読込
アドレスと同一のアドレスとする。また、書込ステート
では、CPU40がバッファ54〜58に対してアクセ
スを行っているかまたはアクセスを開始しようとしてい
るときは、CPU40によるアクセスが終了するのを待
ってデータの書込を行うようになってる。
In the write state, write-side latch circuit 10
6 to the buffer 54 and the write-side latch circuit 108
Is written to the buffer 56.
Here, the write address is the same address as the read address specified in the read state. In the write state, when the CPU 40 is accessing or starting to access the buffers 54 to 58, the data is written after the access by the CPU 40 is completed. Te

【0081】待機ステートでは、次の読込ステートで読
み込む予定の周波数成分データおよび量子化係数がバッ
ファ54〜58に書き込まれていないときは、その書込
が終了するまで待機するようになっている。また、CP
U40がバッファ54〜58に対してアクセスを行って
いるかまたはアクセスを開始しようとしているときは、
CPU40によるアクセスが終了するまで待機するよう
になっている。なお、次の読込ステートで読み込む予定
の周波数成分データおよび量子化係数がバッファ54〜
58に書き込まれているか否かは、CPU動作カウンタ
の値と内部演算回路動作カウンタの値とを比較すること
により判定する。すなわち、CPU動作カウンタの値が
内部演算回路動作カウンタの値よりも大きいと判定した
ときは、次の読込ステートで読み込む予定の周波数成分
データおよび量子化係数がバッファ54〜58に書き込
まれたと判定し、待機を解除する。
In the standby state, when the frequency component data and the quantization coefficient to be read in the next reading state are not written in the buffers 54 to 58, the process waits until the writing is completed. Also, CP
When U40 is accessing or starting to access buffers 54-58,
It waits until the access by the CPU 40 is completed. The frequency component data and the quantization coefficient to be read in the next reading state are stored in the buffers 54 to 54.
Whether it is written in 58 or not is determined by comparing the value of the CPU operation counter with the value of the internal operation circuit operation counter. That is, when it is determined that the value of the CPU operation counter is larger than the value of the internal operation circuit operation counter, it is determined that the frequency component data and the quantization coefficient to be read in the next read state have been written to the buffers 54 to 58. , Release the wait.

【0082】内部演算回路52は、バス49の動作クロ
ックを基準として動作し、読込ステートおよび量子化演
算ステートを、いずれも1クロックで行うようになって
いる。また、書込ステートおよび待機ステートについて
は、上記待機条件を満たしていなければ1クロックで行
うが、待機条件を満たしているか否かの判定を1クロッ
クごとに行い、待機条件を満たしていると判定したとき
は、1クロック分待機するようになっている。これによ
り、CPU40によるバッファ54〜58への書込動作
と並列して、CPU40による書込状況を参照しながら
CPU40とは独立に各ステートが行われる。
The internal operation circuit 52 operates based on the operation clock of the bus 49, and performs both the read state and the quantization operation state in one clock. If the standby condition is not satisfied, the write state and the standby state are performed in one clock. However, it is determined whether or not the standby condition is satisfied, every clock, and it is determined that the standby condition is satisfied. Then, it waits for one clock. Accordingly, each state is performed independently of the CPU 40 while referring to the writing status of the CPU 40 in parallel with the writing operation of the buffers 40 to 58 by the CPU 40.

【0083】次に、アドレス変換回路62の構成を図5
を参照しながら詳細に説明する。図5は、アドレス変換
回路62の構成を示すブロック図である。
Next, the configuration of the address conversion circuit 62 is shown in FIG.
This will be described in detail with reference to FIG. FIG. 5 is a block diagram showing a configuration of the address conversion circuit 62.

【0084】アドレス変換回路62は、図5に示すよう
に、レジスタ60の命令に基づいて、CPU40がバッ
ファ54〜58に対して読込または書込を行うときの読
込アドレスまたは書込アドレスを変換するようになって
いる。
Address conversion circuit 62, as shown in FIG. 5, converts a read address or a write address when CPU 40 reads or writes from / to buffers 54 to 58 based on an instruction of register 60. It has become.

【0085】YUV変換命令が与えられたときは、図5
(a)に示すように、書込アドレスを、バッファ54、
バッファ56およびバッファ58の順に切り換え、バッ
ファ58の次には書込アドレスを1加算し、再びバッフ
ァ54、バッファ56およびバッファ58の順に切り換
えるようになっている。これにより、例えば、Rデータ
0、Gデータ0、Bデータ0、…、Rデータ63、Gデ
ータ63、Bデータ63の順でCPU40が書込を行う
と、Rデータ0〜63がバッファ54のアドレス0〜6
3に順に書き込まれ、Gデータ0〜63がバッファ56
のアドレス0〜63に順に書き込まれ、Bデータ0〜6
3がバッファ58のアドレス0〜63に順に書き込まれ
る。
When a YUV conversion command is given, the
As shown in (a), the write address is stored in the buffer 54,
The buffer is switched in the order of the buffer 56 and the buffer 58, and after the buffer 58, the write address is incremented by 1, and the buffer is switched again in the order of the buffer 54, the buffer 56, and the buffer 58. Thus, for example, when the CPU 40 writes data in the order of R data 0, G data 0, B data 0,..., R data 63, G data 63, and B data 63, the R data 0 to 63 Address 0-6
3, G data 0 to 63 are stored in the buffer 56
Are sequentially written to addresses 0 to 63 of B data 0 to 6
3 are sequentially written to addresses 0 to 63 of the buffer 58.

【0086】また、RGB変換命令が与えられたとき
は、図5(b)に示すように、書込アドレスを、バッフ
ァ54のアドレス0からアドレス63まで切り換え、次
にバッファ56のアドレス0からアドレス63まで切り
換え、次にバッファ58のアドレス0からアドレス63
まで切り換えるようになっている。これにより、例え
ば、Yデータ0〜63、Uデータ0〜63、Vデータ0
〜63の順でCPU40が書込を行うと、Yデータ0〜
63がバッファ54のアドレス0〜63に順に書き込ま
れ、Uデータ0〜63がバッファ56のアドレス0〜6
3に順に書き込まれ、Vデータ0〜63がバッファ58
のアドレス0〜63に順に書き込まれる。
When an RGB conversion instruction is given, the write address is switched from address 0 of the buffer 54 to address 63, and then from address 0 of the buffer 56 to address 63, as shown in FIG. 63, and then from address 0 to address 63 of the buffer 58.
To switch over. Thereby, for example, Y data 0 to 63, U data 0 to 63, V data 0
When the CPU 40 performs writing in the order of
63 is sequentially written to addresses 0 to 63 of the buffer 54, and U data 0 to 63 are written to addresses 0 to 6 of the buffer 56.
3, V data 0 to 63 are stored in the buffer 58
Are sequentially written to addresses 0 to 63.

【0087】また、量子化演算命令が与えられたとき
は、図5(c)に示すように、バッファ54,56への
同時書込を行うために、バッファ54,56への書込ア
ドレスを同時に1ずつ加算するようになっている。これ
により、例えば、16ビットのデータからなる周波数成
分データをCPU40が書き込むと、周波数成分データ
のうち上位8ビットのデータがバッファ54のアドレス
0〜63に順に書き込まれ、下位8ビットのデータがバ
ッファ56のアドレス0〜63に順に書き込まれる。
When a quantization operation instruction is given, as shown in FIG. 5 (c), in order to perform simultaneous writing to buffers 54 and 56, the write addresses to buffers 54 and 56 are changed. At the same time, one is added. Thus, for example, when the CPU 40 writes the frequency component data composed of 16-bit data, the upper 8 bits of the frequency component data are sequentially written to addresses 0 to 63 of the buffer 54, and the lower 8 bits of the frequency component data are stored in the buffer 54. The data is sequentially written to 56 addresses 0 to 63.

【0088】また、ジグザグスキャン命令が与えられた
ときは、図5(d)に示すように、バッファ54,56
への同時書込を行うために、バッファ54,56への書
込アドレスを同時に所定規則で加算または減算するよう
になっている。ジグザグスキャンとは、8×8画素の画
像データに対してそれぞれ量子化演算を行ったものを、
水平方向および垂直方向の周波数成分が小さい順に並び
替える処理であり、その並び替えは、所定の順序で行わ
れる。したがって、書込アドレスの加算または減算は、
その所定の順序に従った増減分だけ行われる。その増減
分を示す増減データは、例えば、1対1のテーブルとし
て格納されており、そのテーブルを参照して書込アドレ
スの加算または減算を行う。これにより、16ビットの
データからなる量子化演算データをCPU40が書き込
むと、量子化演算データのうち上位8ビットのデータが
バッファ54のアドレス0〜63に所定の順序で並び替
えられて書き込まれ、下位8ビットのデータがバッファ
56のアドレス0〜63に所定の順序で並び替えられて
書き込まれる。
When a zigzag scan instruction is given, as shown in FIG.
In order to perform simultaneous writing to the buffer, write addresses to the buffers 54 and 56 are simultaneously added or subtracted according to a predetermined rule. The zigzag scan is obtained by performing a quantization operation on image data of 8 × 8 pixels.
This is a process of rearranging the frequency components in the horizontal and vertical directions in ascending order, and the rearrangement is performed in a predetermined order. Therefore, the addition or subtraction of the write address is
The increase and decrease are performed according to the predetermined order. The increase / decrease data indicating the increase / decrease is stored, for example, as a one-to-one table, and the addition or subtraction of the write address is performed with reference to the table. As a result, when the CPU 40 writes the quantized operation data composed of 16-bit data, the upper 8 bits of the quantized operation data are rearranged in addresses 0 to 63 of the buffer 54 in a predetermined order and written. The lower 8 bits of data are rearranged and written in addresses 0 to 63 of the buffer 56 in a predetermined order.

【0089】次に、上記実施の形態の動作を説明する。Next, the operation of the above embodiment will be described.

【0090】初めに、DCTによる符号化方式で画像デ
ータの圧縮を行う場合について動作を説明する。
First, the operation in the case where image data is compressed by the DCT coding method will be described.

【0091】DCTによる符号化方式で画像データの圧
縮を行う場合は、その概要を説明すると、まず、CPU
40により、YUV変換命令がレジスタ60に書き込ま
れるとともに外部画像メモリ44に格納されている原画
像データであるRGBデータがバッファ54〜58に書
き込まれ、演算補助回路50により、YUV変換が行わ
れる。
When compressing image data by the DCT coding method, the outline will be described first.
At 40, the YUV conversion command is written into the register 60, and the RGB data, which is the original image data stored in the external image memory 44, is written into the buffers 54 to 58, and the arithmetic auxiliary circuit 50 performs YUV conversion.

【0092】YUV変換が完了すると、CPU40によ
り、YUVデータがバッファ54〜58から外部画像メ
モリ44に読み込まれ、外部画像メモリ44において間
引き処理およびDCT処理がその順で行われる。DCT
処理が完了すると、CPU40により、量子化演算命令
がレジスタ60に書き込まれるとともに外部画像メモリ
44に格納されている周波数成分データがバッファ5
4,56に書き込まれ、その後量子化係数がバッファ5
8に書き込まれ、演算補助回路50により、量子化演算
が行われる。
When the YUV conversion is completed, the CPU 40 reads the YUV data from the buffers 54 to 58 into the external image memory 44, and the external image memory 44 performs the thinning process and the DCT process in that order. DCT
When the processing is completed, the CPU 40 writes the quantization operation instruction into the register 60 and stores the frequency component data stored in the external image memory 44 into the buffer 5.
4, 56, and then the quantized coefficients are stored in buffer 5
8 and a quantization operation is performed by the operation auxiliary circuit 50.

【0093】量子化演算が完了すると、CPU40によ
り、量子化演算データがバッファ54,56から外部画
像メモリ44に読み込まれる。次いで、CPU40によ
り、ジグザグスキャン命令がレジスタ60に書き込まれ
るとともに外部画像メモリ44に格納されている量子化
演算データがバッファ54,56に書き込まれ、演算補
助回路50により、ジグザグスキャンが行われる。ジグ
ザグスキャンが完了すると、CPU40により、ジグザ
グスキャンされたデータがバッファ54,56から外部
画像メモリ44に読み込まれ、外部画像メモリ44にお
いて可変長符号化処理が行われる。こうした一連の処理
により、原画像データが圧縮され、原画像データよりも
データ容量の小さい圧縮画像データが生成される。
When the quantization operation is completed, the CPU 40 reads the quantization operation data from the buffers 54 and 56 into the external image memory 44. Next, the CPU 40 writes the zigzag scan instruction into the register 60 and the quantization operation data stored in the external image memory 44 into the buffers 54 and 56, and the operation auxiliary circuit 50 performs the zigzag scan. When the zigzag scan is completed, the zigzag scanned data is read from the buffers 54 and 56 into the external image memory 44 by the CPU 40, and the external image memory 44 performs a variable length encoding process. Through this series of processing, the original image data is compressed, and compressed image data having a smaller data volume than the original image data is generated.

【0094】演算補助回路50では、YUV変換命令が
与えられると、アドレス変換器62により、書込アドレ
スが、バッファ54、バッファ56およびバッファ58
の順に切り換えられ、バッファ58の次には書込アドレ
スが1加算され、再びバッファ54、バッファ56およ
びバッファ58の順に切り換えられる。したがって、R
データ0、Gデータ0、Bデータ0、…、Rデータ6
3、Gデータ63、Bデータ63の順でCPU40が書
込を行うと、Rデータ0〜63がバッファ54のアドレ
ス0〜63に順に書き込まれ、Gデータ0〜63がバッ
ファ56のアドレス0〜63に順に書き込まれ、Bデー
タ0〜63がバッファ58のアドレス0〜63に順に書
き込まれる。
In the arithmetic assist circuit 50, when a YUV conversion instruction is given, the write address is converted by the address converter 62 into the buffers 54, 56 and 58.
, The write address is incremented by 1 after the buffer 58, and the buffer 54, the buffer 56, and the buffer 58 are switched again. Therefore, R
Data 0, G data 0, B data 0, ..., R data 6
3, when the CPU 40 writes in the order of the G data 63 and the B data 63, the R data 0 to 63 are sequentially written to the addresses 0 to 63 of the buffer 54, and the G data 0 to 63 are written to the addresses 0 to 63 of the buffer 56. The B data 0 to 63 are sequentially written to addresses 0 to 63 of the buffer 58.

【0095】一方、バッファ54にRデータ0が、バッ
ファ56にGデータ0が、バッファ58にBデータ0が
書き込まれると、演算用トリガ生成回路64により、演
算用トリガが生成される。内部演算回路52では、演算
用トリガが入力されると、読込ステート、Y成分算出ス
テート、U成分算出ステート、V成分算出ステート、書
込ステートおよび待機ステートを経て、RGBデータ0
がYUVデータ0に変換される。このとき、具体的なタ
イミングについては後段のRGB変換のところで詳述す
るが、読込ステート、Y成分算出ステート、U成分算出
ステート、V成分算出ステート、書込ステートおよび待
機ステートは、CPU40によるバッファ54〜58へ
の書込動作と並列して、CPU40による書込状況を参
照しながら行われる。
On the other hand, when R data 0 is written in the buffer 54, G data 0 is written in the buffer 56, and B data 0 is written in the buffer 58, an operation trigger generation circuit 64 generates an operation trigger. When an operation trigger is input, the internal operation circuit 52 goes through a read state, a Y-component calculation state, a U-component calculation state, a V-component calculation state, a write state, and a standby state, and outputs RGB data 0.
Is converted to YUV data 0. At this time, the specific timing will be described in detail in the later stage of RGB conversion, but the read state, the Y component calculation state, the U component calculation state, the V component calculation state, the write state, and the standby state are stored in the buffer 54 by the CPU 40. In parallel with the writing operation to # 58, the writing is performed while referring to the writing status of the CPU 40.

【0096】読込ステートでは、各バッファ54〜58
の先頭アドレスからそれぞれRGBデータ0が読み込ま
れ、バッファ54から読み込まれたRデータ0が読込側
ラッチ回路100に、バッファ56から読み込まれたG
データ0が読込側ラッチ回路102に、バッファ58か
ら読み込まれたBデータ0が読込側ラッチ回路102に
出力されラッチされる。
In the read state, each of the buffers 54 to 58
, RGB data 0 is read from the start address of each of the data, and R data 0 read from the buffer 54 is read into the read-side latch circuit 100 by the G read from the buffer 56.
Data 0 is output to the read-side latch circuit 102, and B data 0 read from the buffer 58 is output to the read-side latch circuit 102 and latched.

【0097】Y成分算出ステートでは、乗算器118に
より、Rデータ0と係数kyrとが乗算され、乗算器12
0により、Gデータ0と係数kygとが乗算され、乗算器
122により、Bデータ0と係数kybとが乗算される。
それら乗算結果は、加算器124により加算され、加算
器124からのデータがYデータ0として書込側ラッチ
回路106にラッチされる。
In the Y component calculation state, the multiplier 118 multiplies the R data 0 by the coefficient k yr ,
0 multiplies the G data 0 by the coefficient kyg, and the multiplier 122 multiplies the B data 0 by the coefficient kyb .
The multiplication results are added by the adder 124, and the data from the adder 124 is latched as Y data 0 by the write-side latch circuit 106.

【0098】U成分算出ステートでは、乗算器118に
より、Rデータ0と係数kurとが乗算され、乗算器12
0により、Gデータ0と係数kugとが乗算され、乗算器
122により、Bデータ0と係数kubとが乗算される。
それら乗算結果は、加算器124により加算され、加算
器124からのデータがUデータ0として書込側ラッチ
回路108にラッチされる。
In the U component calculation state, the multiplier 118 multiplies the R data 0 by the coefficient k ur ,
0 multiplies the G data 0 by the coefficient k ug, and the multiplier 122 multiplies the B data 0 by the coefficient k ub .
These multiplication results are added by the adder 124, and the data from the adder 124 is latched as U data 0 by the write-side latch circuit 108.

【0099】V成分算出ステートでは、乗算器118に
より、Rデータ0と係数kvrとが乗算され、乗算器12
0により、Gデータ0と係数kvgとが乗算され、乗算器
122により、Bデータ0と係数kvbとが乗算される。
それら乗算結果は、加算器124により加算され、加算
器124からのデータがVデータ0として書込側ラッチ
回路110にラッチされる。
In the V component calculation state, the multiplier 118 multiplies the R data 0 by the coefficient kvr, and
0 multiplies the G data 0 by the coefficient k vg, and the multiplier 122 multiplies the B data 0 by the coefficient k vb .
The multiplication results are added by the adder 124, and the data from the adder 124 is latched as V data 0 by the write-side latch circuit 110.

【0100】書込ステートでは、書込側ラッチ回路10
6のYデータ0がバッファ54に、書込側ラッチ回路1
08のUデータ0がバッファ56に、書込側ラッチ回路
110のVデータ0がバッファ58に書き込まれる。た
だし、CPU40がバッファ54〜58に対してアクセ
スを行っているかまたはアクセスを開始しようとしてい
るときは、CPU40によるアクセスが終了するのを待
ってデータの書込が行われる。
In the write state, write-side latch circuit 10
6 is stored in the buffer 54 and the write-side latch circuit 1
08 U data 0 is written to the buffer 56, and V data 0 of the write side latch circuit 110 is written to the buffer 58. However, when the CPU 40 is accessing or starting to access the buffers 54 to 58, data writing is performed after the access by the CPU 40 is completed.

【0101】待機ステートでは、次の演算用トリガが入
力されるまで、すなわち、次の読込ステートで読み込む
予定のRGBデータ1がバッファ54〜58に書き込ま
れるまで待機する。また、CPU40がバッファ54〜
58に対してアクセスを行っているかまたはアクセスを
開始しようとしているときは、CPU40によるアクセ
スが終了するまで待機する。
In the standby state, the process waits until the next operation trigger is input, that is, until the RGB data 1 to be read in the next read state is written to the buffers 54 to 58. In addition, the CPU 40
If the CPU 58 is accessing or starting to access, it waits until the access by the CPU 40 ends.

【0102】このように、演算補助回路50では、これ
ら6つのステートを繰り返し実行することで、8×8画
素の画像データであるRGBデータがすべてYUVデー
タに変換される。その変換は、8×8画素を構成する最
後のデータであるBデータ63がバッファ58に書き込
まれた後、バス49の動作クロックで5クロック分(読
込ステート、Y成分算出ステート、U成分算出ステー
ト、V成分算出ステートおよび書込ステートに要するク
ロック分)遅れて完了する。
As described above, in the arithmetic auxiliary circuit 50, all of the RGB data, which is image data of 8.times.8 pixels, is converted into YUV data by repeatedly executing these six states. After the B data 63, which is the last data constituting the 8 × 8 pixel, is written into the buffer 58, the conversion is performed for five clocks of the operation clock of the bus 49 (read state, Y component calculation state, U component calculation state). , V component calculation state and writing state)).

【0103】次いで、演算補助回路50では、量子化演
算命令が与えられると、アドレス変換器62により、バ
ッファ54,56への同時書込を行うために、バッファ
54,56への書込アドレスが同時に1ずつ加算され
る。したがって、16ビットのデータからなる周波数成
分データをCPU40が書き込むと、周波数成分データ
のうち上位8ビットのデータがバッファ54のアドレス
0〜63に順に書き込まれ、下位8ビットのデータがバ
ッファ56のアドレス0〜63に順に書き込まれる。そ
の後、量子化係数kq0〜kq63がバッファ58のアドレ
ス0〜63に順に書き込まれる。
Next, in the arithmetic assist circuit 50, when a quantization operation instruction is given, the address converter 62 writes write addresses to the buffers 54 and 56 in order to perform simultaneous writing to the buffers 54 and 56. One is added at a time. Therefore, when the CPU 40 writes the frequency component data composed of 16-bit data, the upper 8 bits of the frequency component data are sequentially written to the addresses 0 to 63 of the buffer 54 and the lower 8 bits of the frequency component data are stored in the address of the buffer 56. Data is written in order from 0 to 63. Thereafter, the quantized coefficients k q0 to k q63 are sequentially written to addresses 0 to 63 of the buffer 58.

【0104】一方、1番目の周波数成分データのうち上
位ビットデータ0がバッファ54に、下位ビットデータ
0がバッファ56に、それに乗算する量子化係数kq0
バッファ58に書き込まれると、演算用トリガ生成回路
64により、演算用トリガが生成される。内部演算回路
52では、演算用トリガが入力されると、読込ステー
ト、量子化演算ステート、書込ステートおよび待機ステ
ートを経て、周波数成分データが量子化演算される。こ
のとき、具体的なタイミングについては後段のRGB変
換のところで詳述するが、読込ステート、量子化演算ス
テート、書込ステートおよび待機ステートは、CPU4
0によるバッファ54〜58への書込動作と並列して、
CPU40による書込状況を参照しながら行われる。
On the other hand, when the upper bit data 0 of the first frequency component data is written to the buffer 54, the lower bit data 0 is written to the buffer 56, and the quantization coefficient k q0 to be multiplied to the buffer 58 is written to the buffer 58, The generation circuit 64 generates an operation trigger. When an operation trigger is input, the internal operation circuit 52 performs a quantization operation on the frequency component data through a read state, a quantization operation state, a write state, and a standby state. At this time, the specific timing will be described in detail in the later stage of RGB conversion, but the read state, the quantization operation state, the write state, and the standby state
In parallel with the write operation to the buffers 54 to 58 by 0,
This is performed while referring to the writing status by the CPU 40.

【0105】読込ステートでは、各バッファ54〜58
の先頭アドレスからそれぞれ周波数成分データ0および
量子化係数kq0が読み込まれ、バッファ54から読み込
まれた上位ビットデータ0が読込側ラッチ回路100
に、バッファ56から読み込まれた下位ビットデータ0
が読込側ラッチ回路102に、バッファ58から読み込
まれた量子化係数kq0が読込側ラッチ回路102に出力
されラッチされる。
In the read state, each of the buffers 54 to 58
, The frequency component data 0 and the quantization coefficient k q0 are read from the head address of the read-side latch circuit 100, respectively.
The lower bit data 0 read from the buffer 56
Is output to the read-side latch circuit 102, and the quantization coefficient k q0 read from the buffer 58 is output to the read-side latch circuit 102 and latched.

【0106】量子化演算ステートでは、切換器128に
より、読込側ラッチ回路100,102のデータが結合
されて乗算器118に出力され、切換器130により、
読込側ラッチ回路104の量子化係数kq0が乗算器11
8に出力され、乗算器118により、周波数成分データ
0と量子化係数kq0とが乗算される。その乗算結果は、
24ビットのデータのうち上位8ビットのデータが切り
捨てられ、残りの16ビットのデータのうち上位8ビッ
トのデータが書込側ラッチ回路106にラッチされ、下
位8ビットのデータが書込側ラッチ回路108にラッチ
される。
In the quantization operation state, the data of the read-side latch circuits 100 and 102 are combined by the switch 128 and output to the multiplier 118.
The quantization coefficient k q0 of the read-side latch circuit 104 is
8 and the multiplier 118 multiplies the frequency component data 0 by the quantization coefficient k q0 . The result of the multiplication is
The upper 8 bits of the 24-bit data are truncated, the upper 8 bits of the remaining 16-bit data are latched by the write-side latch circuit 106, and the lower 8 bits of the data are written to the write-side latch circuit. Latched at 108.

【0107】書込ステートでは、量子化演算データのう
ち書込側ラッチ回路106の上位ビットデータ0がバッ
ファ54に、書込側ラッチ回路108の下位ビットデー
タ0がバッファ56に書き込まれる。ただし、CPU4
0がバッファ54〜58に対してアクセスを行っている
かまたはアクセスを開始しようとしているときは、CP
U40によるアクセスが終了するのを待ってデータの書
込が行われる。
In the write state, of the quantized operation data, upper bit data 0 of the write side latch circuit 106 is written to the buffer 54 and lower bit data 0 of the write side latch circuit 108 is written to the buffer 56. However, CPU4
0 is accessing or starting to access buffers 54-58,
Data writing is performed after the access by U40 is completed.

【0108】待機ステートでは、次の演算用トリガが入
力されるまで、すなわち、次の読込ステートで読み込む
予定の周波数成分データ1および量子化係数kq1がバッ
ファ54〜58に書き込まれるまで待機する。また、C
PU40がバッファ54〜58に対してアクセスを行っ
ているかまたはアクセスを開始しようとしているとき
は、CPU40によるアクセスが終了するまで待機す
る。
[0108] In the standby state until the trigger for the next operation is input, i.e., the frequency component data 1 and the quantized coefficient k q1 scheduled to read in the next read state to wait until they are written into the buffer 54-58. Also, C
When the PU 40 is accessing or starting to access the buffers 54 to 58, the process waits until the access by the CPU 40 ends.

【0109】このように、演算補助回路50では、これ
ら4つのステートを繰り返し実行することで、8×8画
素の画像データの周波数成分データがすべて量子化演算
される。その変換は、周波数成分データを構成する最後
のデータに乗算する量子化係数がバッファ58に書き込
まれた後、バス49の動作クロックで3クロック分(読
込ステート、量子化演算ステートおよび書込ステートに
要するクロック分)遅れて完了する。
As described above, in the arithmetic assist circuit 50, by repeatedly executing these four states, all the frequency component data of the image data of 8 × 8 pixels are quantized. In the conversion, after the quantization coefficient for multiplying the last data constituting the frequency component data is written in the buffer 58, the operation clock of the bus 49 is equivalent to three clocks (the read state, the quantization operation state, and the write state). Completion is delayed by the required clock).

【0110】次いで、演算補助回路50では、ジグザグ
スキャン命令が与えられると、アドレス変換器62によ
り、バッファ54,56への同時書込を行うために、バ
ッファ54,56への書込アドレスが同時に所定規則で
加算または減算される。
Next, in the arithmetic auxiliary circuit 50, when a zigzag scan instruction is applied, the address converter 62 simultaneously writes data into the buffers 54 and 56 in order to perform simultaneous writing into the buffers 54 and 56. It is added or subtracted according to a predetermined rule.

【0111】次に、DCTによる符号化方式で圧縮画像
データの解凍を行う場合について動作を説明する。
Next, the operation in the case of decompressing the compressed image data by the DCT coding method will be described.

【0112】DCTによる符号化方式で圧縮画像データ
の解凍を行う場合は、その概要を説明すると、まず、C
PU40により、外部画像メモリ44において可変長復
号化処理が行われ、逆ジグザグスキャン命令がレジスタ
60に書き込まれるとともに外部画像メモリ44に格納
されている復号化データがバッファ54,56に書き込
まれ、演算補助回路50により、逆ジグザグスキャンが
行われる。
When decompression of compressed image data is performed by an encoding method based on DCT, the outline thereof will be described first.
The PU 40 performs a variable length decoding process in the external image memory 44, writes an inverse zigzag scan instruction to the register 60, and writes the decoded data stored in the external image memory 44 to the buffers 54 and 56, and performs an operation. The auxiliary circuit 50 performs an inverse zigzag scan.

【0113】逆ジグザグスキャンが完了すると、CPU
40により、量子化演算データがバッファ54,56か
ら外部画像メモリ44に読み込まれる。次いで、CPU
40により、逆量子化演算命令がレジスタ60に書き込
まれるとともに外部画像メモリ44に格納されている量
子化演算データがバッファ54,56に書き込まれ、そ
の後逆量子化係数がバッファ58に書き込まれ、演算補
助回路50により、逆量子化演算が行われる。
When the reverse zigzag scan is completed, the CPU
At step 40, the quantization operation data is read from the buffers 54 and 56 to the external image memory 44. Then, CPU
At 40, the inverse quantization operation instruction is written into the register 60, and the quantization operation data stored in the external image memory 44 is written into the buffers 54 and 56. Thereafter, the inverse quantization coefficient is written into the buffer 58 and the operation is performed. The auxiliary circuit 50 performs an inverse quantization operation.

【0114】逆量子化演算が完了すると、CPU40に
より、周波数成分データがバッファ54,56から外部
画像メモリ44に読み込まれ、外部画像メモリ44にお
いてIDCT処理および補間処理がその順で行われる。
補間処理が完了すると、CPU40により、RGB変換
命令がレジスタ60に書き込まれるとともに外部画像メ
モリ44に格納されているYUVデータがバッファ54
〜58に書き込まれ、演算補助回路50により、RGB
変換が行われる。
When the inverse quantization operation is completed, the CPU 40 reads the frequency component data from the buffers 54 and 56 into the external image memory 44, and the external image memory 44 performs the IDCT process and the interpolation process in that order.
When the interpolation process is completed, the CPU 40 writes the RGB conversion command into the register 60 and stores the YUV data stored in the external image memory 44 into the buffer 54.
To 58, and RGB by the arithmetic assist circuit 50
Conversion is performed.

【0115】RGB変換が完了すると、CPU40によ
り、原画像データであるRGBデータがバッファ54〜
58から外部画像メモリ44に読み込まれる。こうした
一連の処理により、圧縮画像データが解凍され、元の原
画像データが復元される。
When the RGB conversion is completed, the CPU 40 stores the RGB data as the original image data in the buffers 54 to 54.
From 58, it is read into the external image memory 44. Through such a series of processes, the compressed image data is decompressed, and the original original image data is restored.

【0116】次に、RGB変換を行う場合について動作
を図6を参照しながら詳細に説明する。図6は、演算補
助回路50が行うRGB変換を説明するためのタイムチ
ャートである。なお、以下の説明中、時刻tnは、時間
が経過するにつれて大きな値で示されるものである。
Next, the operation when the RGB conversion is performed will be described in detail with reference to FIG. FIG. 6 is a time chart for explaining the RGB conversion performed by the arithmetic auxiliary circuit 50. In the following description, the time t n is indicated by a larger value as time elapses.

【0117】図6において、「CLK」は、バス49のク
ロック信号を示し、「L_EXT_ID」は、CPU40がバス
49に出力したデータ信号を示し、「L_EXT_WR」は、C
PU40からのライトイネーブル信号を示し、「S_TRG_
EDGE」は、演算用トリガ生成回路64の演算用トリガ信
号を示し、「L_EXT_ADR〔5:0〕」は、CPU動作カウン
タのデータ信号を示している。また、「L_INT_ADR〔5:
0〕」は、内部演算回路動作カウンタのデータ信号を示
し、「O_STATE〔2:0〕」は、内部演算回路52のステー
トを示すステート信号を示し、「S_INT_WR」は、内部演
算回路52からのライトイネーブル信号を示している。
また、「L_MTRX_DA」、「L_MTRX_DB」および「L_MTRX_D
C」は、それぞれ読込側ラッチ回路100〜104がラ
ッチしているデータ信号を示し、「O_MTRX_DA〔7:
0〕」、「O_MTRX_DB〔7:0〕」および「O_MTRX_DC〔7:
0〕」は、それぞれ書込側ラッチ回路106〜110が
ラッチしているデータ信号を示している。
In FIG. 6, “CLK” indicates a clock signal on the bus 49, “L_EXT_ID” indicates a data signal output from the CPU 40 to the bus 49, and “L_EXT_WR” indicates a C signal.
The write enable signal from the PU 40 is indicated by “S_TRG_
"EDGE" indicates an operation trigger signal of the operation trigger generation circuit 64, and "L_EXT_ADR [5: 0]" indicates a data signal of the CPU operation counter. In addition, "L_INT_ADR [5:
0] ”indicates a data signal of the internal operation circuit operation counter,“ O_STATE [2: 0] ”indicates a state signal indicating the state of the internal operation circuit 52, and“ S_INT_WR ”indicates a signal from the internal operation circuit 52. 2 shows a write enable signal.
Also, “L_MTRX_DA”, “L_MTRX_DB” and “L_MTRX_D
"C" indicates a data signal latched by each of the read-side latch circuits 100 to 104, and "O_MTRX_DA [7:
0], O_MTRX_DB [7: 0] and O_MTRX_DC [7:
[0] "indicates data signals latched by the write-side latch circuits 106 to 110, respectively.

【0118】演算補助回路50では、RGB変換命令が
与えられると、アドレス変換器62により、書込アドレ
スが、バッファ54のアドレス0からアドレス63まで
切り換えられ、次にバッファ56のアドレス0からアド
レス63まで切り換えられ、次にバッファ58のアドレ
ス0からアドレス63まで切り換えられる。したがっ
て、Yデータ0〜63、Uデータ0〜63、Vデータ0
〜63の順でCPU40が書込を行うと、Yデータ0〜
63がバッファ54のアドレス0〜63に順に書き込ま
れ、Uデータ0〜63がバッファ56のアドレス0〜6
3に順に書き込まれ、Vデータ0〜63がバッファ58
のアドレス0〜63に順に書き込まれる。
In the arithmetic auxiliary circuit 50, when an RGB conversion instruction is given, the write address is switched by the address converter 62 from address 0 to address 63 of the buffer 54, and then from address 0 to address 63 of the buffer 56. , And then from address 0 to address 63 of the buffer 58. Therefore, Y data 0 to 63, U data 0 to 63, V data 0
When the CPU 40 performs writing in the order of
63 is sequentially written to addresses 0 to 63 of the buffer 54, and U data 0 to 63 are written to addresses 0 to 6 of the buffer 56.
3, V data 0 to 63 are stored in the buffer 58
Are sequentially written to addresses 0 to 63.

【0119】一方、バッファ54にYデータ0が、バッ
ファ56にUデータ0が書き込まれた状態で、図6に示
すように、CPU40により、Vデータ0がバス49に
出力され、時刻t0においてライトイネーブル信号がロ
ーレベルとなると、そのライトイネーブル信号がローレ
ベルとなっている時刻t0〜t1の間に、Vデータ0がバ
ッファ58に書き込まれる。そして、バッファ54にY
データ0が、バッファ56にUデータ0が、バッファ5
8にVデータ0が書き込まれると、時刻t2において、
演算用トリガ生成回路64により、演算用トリガが生成
され、演算用トリガ信号がハイレベルとなる。
On the other hand, in a state in which Y data 0 is written in the buffer 54 and U data 0 is written in the buffer 56, as shown in FIG. 6, the CPU 40 outputs V data 0 to the bus 49, and at time t 0 When the write enable signal goes low, the V data 0 is written to the buffer 58 between times t 0 and t 1 when the write enable signal goes low. Then, Y is stored in the buffer 54.
Data 0, U data 0 in buffer 56, buffer 5
When the V data 0 is written to 8, at time t 2
An operation trigger is generated by the operation trigger generation circuit 64, and the operation trigger signal becomes high level.

【0120】内部演算回路52では、演算用トリガが入
力されると、時刻t3において読込ステート(State0)
となり、読込ステートでは、YUV変換における読込ス
テートと同じ要領でデータの読込が行われる。データの
読込が完了すると、時刻t 4において、読込側ラッチ回
路100〜104にYUVデータ0がラッチされ、R成
分算出ステート(State1)となり、R成分算出ステー
トでは、YUV変換におけるY成分算出ステートと同じ
要領でRデータ0の算出が行われる。
In the internal arithmetic circuit 52, an arithmetic trigger is input.
At the time tThreeRead state at (State 0)
In the read state, the read status in the YUV conversion
The data is read in the same manner as the Tate. Data
When reading is completed, time t FourAt the read-side latch
The YUV data 0 is latched in the
Minute calculation state (State1), and the R component calculation state
Same as the Y component calculation state in YUV conversion
The calculation of the R data 0 is performed in the same manner.

【0121】次いで、Rデータ0の算出が完了すると、
時刻t5において、書込側ラッチ回路106にRデータ
0がラッチされ、G成分算出ステート(State2)とな
り、G成分算出ステートでは、YUV変換におけるU成
分算出ステートと同じ要領でGデータ0の算出が行われ
る。Gデータ0の算出が完了すると、時刻t6におい
て、書込側ラッチ回路108にGデータ0がラッチさ
れ、B成分算出ステート(State3)となり、B成分算
出ステートでは、YUV変換におけるV成分算出ステー
トと同じ要領でBデータ0の算出が行われる。
Next, when the calculation of the R data 0 is completed,
At time t 5 , the R data 0 is latched by the write-side latch circuit 106 to enter the G component calculation state (State 2). In the G component calculation state, the G data 0 is calculated in the same manner as the U component calculation state in the YUV conversion. Is performed. When the calculation of the G data 0 is completed, at time t 6 , the G data 0 is latched by the write-side latch circuit 108 to enter the B component calculation state (State 3). In the B component calculation state, the V component calculation state in the YUV conversion is performed. Calculation of B data 0 is performed in the same manner as described above.

【0122】次いで、Bデータ0の算出が完了すると、
時刻t7において、書込側ラッチ回路110にBデータ
0がラッチされ、書込ステート(State5)となる。書
込ステートでは、時刻t8においてライトイネーブル信
号がローレベルとなるが、同時刻においてCPU40か
らのライトイネーブル信号がハイレベルとなっているの
で、時刻t9において書込側ラッチ回路106〜110
のRGBデータ0がバッファ54〜58に書き込まれ
る。
Next, when the calculation of the B data 0 is completed,
At time t 7 , B data 0 is latched by write-side latch circuit 110, and the write state (State 5) is set. The write state, but the write enable signal goes low at time t 8, since the write enable signal from the CPU40 at the same time is at a high level, the write latch circuit at time t 9 106 - 110
RGB data 0 is written to the buffers 54 to 58.

【0123】データの書込が完了すると、時刻t10にお
いて待機ステート(State6)となり、待機ステートで
は、時刻t11においてCPU40からのライトイネーブ
ル信号がローレベルとなっているので、CPU40が書
込中であると判定して1クロック分待機する。次いで、
1クロック経過した時刻t12においては、CPU動作カ
ウンタの値が内部演算回路動作カウンタの値以下である
ので、次の読込ステートで読み込む予定のYUVデータ
1がバッファ54〜58に書き込まれていないと判定し
てさらに1クロック分待機する。次いで、1クロック経
過した時刻t13においては、CPU40からのライトイ
ネーブル信号がハイレベルとなっており、かつ、CPU
動作カウンタの値が内部演算回路動作カウンタの値より
も大きいので、待機を終了する。
[0123] When writing of data is completed, the waiting state (STATE 6) next to the time t 10, in the standby state, since the write enable signal from the CPU 40 at time t 11 is at low level, CPU 40 is in a write And waits for one clock. Then
1 in the clock elapsed time t 12 was, because the value of the CPU clock counter is equal to or less than the value of the internal computation circuit operation counter, the YUV data 1 are to be loaded at the next reading state is not written in the buffer 54 to 58 Judge and wait for one more clock. Then, at time t 13 which has passed one clock is at a high level write enable signal from the CPU 40, and, CPU
Since the value of the operation counter is larger than the value of the internal operation circuit operation counter, the standby is terminated.

【0124】そして、待機が終了すると、時刻t14にお
いて次の読込ステート(State0)となり、読込ステー
トでは、YUV変換における読込ステートと同じ要領で
データの読込が行われる。データの読込が完了すると、
時刻t15において、読込側ラッチ回路100〜104に
YUVデータ1がラッチされ、R成分算出ステート(St
ate1)となり、R成分算出ステートでは、YUV変換
におけるY成分算出ステートと同じ要領でRデータ1の
算出が行われる。
[0124] When the standby is completed, the next read state (State0) next at time t 14, the read state, read of data is performed in the same way as reading state in YUV conversion. When the data reading is completed,
At time t 15, YUV data 1 are latched in read latch circuit 100 to 104, R component calculation state (St
ate1), and in the R component calculation state, the R data 1 is calculated in the same manner as in the Y component calculation state in the YUV conversion.

【0125】次いで、Rデータ1の算出が完了すると、
時刻t16において、書込側ラッチ回路106にRデータ
1がラッチされ、G成分算出ステート(State2)とな
り、G成分算出ステートでは、YUV変換におけるU成
分算出ステートと同じ要領でGデータ1の算出が行われ
る。Gデータ1の算出が完了すると、時刻t17におい
て、書込側ラッチ回路108にGデータ1がラッチさ
れ、B成分算出ステート(State3)となり、B成分算
出ステートでは、YUV変換におけるV成分算出ステー
トと同じ要領でBデータ1の算出が行われる。
Next, when the calculation of the R data 1 is completed,
At time t 16 , the R data 1 is latched by the write-side latch circuit 106 to enter the G component calculation state (State 2). In the G component calculation state, the G data 1 is calculated in the same manner as the U component calculation state in the YUV conversion. Is performed. When the calculation of the G data 1 is completed, at time t 17, G data 1 are latched in the write latch circuit 108, the B component calculated state (State3) becomes, the B component calculation state, V component calculating state in YUV conversion B data 1 is calculated in the same manner as described above.

【0126】次いで、Bデータ1の算出が完了すると、
時刻t18において、書込側ラッチ回路110にBデータ
1がラッチされ、書込ステート(State5)となる。書
込ステートでは、時刻t19においてライトイネーブル信
号がローレベルとなるが、同時刻においてCPU40か
らのライトイネーブル信号がローレベルとなるので、時
刻t20においてCPU40が書込中であると判定して1
クロック分待機する。次いで、1クロック経過した時刻
21においては、CPU40からのライトイネーブル信
号がハイレベルとなっているので、書込側ラッチ回路1
06〜110のRGBデータ1がバッファ54〜58に
書き込まれる。
Next, when the calculation of the B data 1 is completed,
At time t 18, B data 1 to the write latch circuit 110 is latched, the write state (State5). The write state, but the write enable signal goes low at time t 19, write enable signal from the CPU 40 at the same time becomes the low level at time t 20 CPU 40 is determined to be in writing 1
Wait for the clock. Then, at time t 21 which has passed one clock, since the write enable signal from the CPU40 is at high level, the write latch circuit 1
The RGB data 1 of 06 to 110 is written to the buffers 54 to 58.

【0127】データの書込が完了すると、時刻t22にお
いて待機ステート(State6)となり、待機ステートで
は、時刻t23において、CPU40からのライトイネー
ブル信号がハイレベルとなっており、かつ、CPU動作
カウンタの値が内部演算回路動作カウンタの値よりも大
きいので、待機を終了する。
[0127] When writing of data is completed, the waiting state (STATE 6) at time t 22 becomes, in the standby state, at time t 23, has a high level write enable signal from the CPU 40, and, CPU clock counter Is larger than the value of the internal operation circuit operation counter, the standby is terminated.

【0128】そして、待機が終了すると、時刻t24にお
いて次の読込ステート(State0)となる。
[0128] Then, the wait is completed, the next of the read state (State0) at time t 24.

【0129】このように、演算補助回路50では、これ
ら6つのステートを繰り返し実行することで、8×8画
素の画像データであるYUVデータがすべてRGBデー
タに変換される。その変換は、8×8画素を構成する最
後のデータであるVデータ63がバッファ58に書き込
まれた後、バス49の動作クロックで5クロック分(読
込ステート、R成分算出ステート、G成分算出ステー
ト、B成分算出ステートおよび書込ステートに要するク
ロック分)遅れて完了する。
As described above, in the arithmetic auxiliary circuit 50, by repeatedly executing these six states, all the YUV data, which is image data of 8 × 8 pixels, is converted into RGB data. After the V data 63, which is the last data constituting the 8 × 8 pixel, is written into the buffer 58, the conversion is performed by five operation clocks of the bus 49 (read state, R component calculation state, G component calculation state). , B component calculation state and write state)).

【0130】なお、逆ジグザグスキャンおよび逆量子化
演算については、上記ジグザグスキャンおよび上記量子
化演算と同じ要領で演算補助回路50が動作するので、
詳細な説明は省略する。
Note that the operation auxiliary circuit 50 operates in the same manner as the zigzag scan and the quantization operation for the inverse zigzag scan and the inverse quantization operation.
Detailed description is omitted.

【0131】このようにして、本実施の形態では、演算
補助回路50は、内部演算回路52と、CPU40およ
び内部演算回路52の両方がアクセス可能なバッファ5
4〜58とを備え、内部演算回路52は、YUV変換命
令、RGB変換命令、量子化演算命令および逆量子化演
算命令のいずれかが与えられたときは、各バッファ54
〜58からそれぞれデータを読み込み、読み込んだ複数
のデータに基づいて、上記各演算方法に共通する共通演
算を含む演算を行い、その演算結果をそれぞれ異なるバ
ッファに書き込むようになっている。
As described above, in the present embodiment, the arithmetic auxiliary circuit 50 includes the internal arithmetic circuit 52 and the buffer 5 that can be accessed by both the CPU 40 and the internal arithmetic circuit 52.
4 to 58, and the internal arithmetic circuit 52, when given any one of the YUV conversion instruction, the RGB conversion instruction, the quantization operation instruction, and the inverse quantization operation instruction,
To 58, each of which performs an operation including a common operation common to the above-described operation methods based on the plurality of read data, and writes the operation results to different buffers.

【0132】これにより、YUV変換、RGB変換、量
子化演算および逆量子化演算など、演算の一部が共通す
る処理を一つの内部演算回路52で実行することができ
るので、それら共通処理の多くをハードウェアに移行し
ても、コストが上昇したり、製作時間が増大したり、回
路規模が増大したりするといった不具合をさほど生じる
ことがない。したがって、従来に比して、ハードウェア
による高速化を実現しながらも、コストや製作時間の面
で比較的有利となり、しかも回路規模の小型化をある程
度図ることができる。また、ソフトウェア側では、演算
補助回路50に対して命令を出力し、データをメモリに
書き込み、データをメモリから読み込むという手順を経
るだけで各演算結果を得ることができるので、ソフトウ
ェアの設計が比較的容易となる。
As a result, processes having a part of operations such as YUV conversion, RGB conversion, quantization operation and inverse quantization operation can be executed by one internal operation circuit 52. However, there is no problem that the cost is increased, the manufacturing time is increased, and the circuit scale is increased. Therefore, while realizing high-speed operation by hardware as compared with the related art, it is relatively advantageous in terms of cost and manufacturing time, and it is possible to reduce the circuit scale to some extent. In addition, since the software can obtain each operation result only through a procedure of outputting an instruction to the operation auxiliary circuit 50, writing data to the memory, and reading data from the memory, the software design can be compared. It becomes easy.

【0133】さらに、本実施の形態では、内部演算回路
52は、CPU40によるバッファ54〜58への書込
動作と並列して、CPU40による書込状況を参照しな
がら各ステートが行われる。
Further, in the present embodiment, the internal arithmetic circuit 52 performs each state while referring to the writing status of the CPU 40 in parallel with the writing operation of the CPU 40 to the buffers 54 to 58.

【0134】これにより、CPU40が書込を行ってい
る間に演算が行われるので、CPU40が書込を完了す
るのとほぼ同時に演算が終了する。そのため、従来のよ
うに、ソフトウェア処理による転送が完全に終了するま
でハードウェアが待機するという状態がなくなるので、
待機時間が短くなり、従来に比して、演算速度の向上を
ある程度図ることができる。
As a result, since the calculation is performed while the CPU 40 is performing the writing, the calculation is completed almost at the same time when the CPU 40 completes the writing. As a result, the state in which the hardware waits until the transfer by the software processing is completely completed as in the related art is eliminated,
The waiting time is shortened, and the calculation speed can be improved to some extent as compared with the related art.

【0135】さらに、本実施の形態では、内部演算回路
52による動作は、読込を行う読込ステートと、演算を
行う演算ステートと、書込を行う書込ステートと、待機
を行う待機ステートとからなり、書込ステートでは、C
PU40がバッファ54〜58に対してアクセスを行っ
ているかまたはアクセスを開始しようとしているとき
は、CPU40によるアクセスが終了するのを待って書
込を行うようになっており、待機ステートでは、次の読
込ステートで読み込む予定のデータがバッファ54〜5
8に書き込まれていないときは、その書込が終了するま
で待機するようになっている。
Further, in the present embodiment, the operation of the internal arithmetic circuit 52 includes a read state for performing a read, an arithmetic state for performing an operation, a write state for performing a write, and a standby state for performing a standby. , In the write state, C
When the PU 40 is accessing or starting to access the buffers 54 to 58, the writing is performed after the access by the CPU 40 is completed. Data to be read in the read state is stored in buffers 54 to 5
When the data has not been written to the memory 8, the system waits until the writing is completed.

【0136】これにより、ソフトウェア側では、データ
の書込タイミングを特に考慮しなくてすむので、ソフト
ウェアの設計がさらに容易となる。
As a result, the software does not need to particularly consider the data write timing, so that the software design is further facilitated.

【0137】さらに、本実施の形態では、内部演算回路
52は、演算結果を、その演算の基となったデータを読
み込んだバッファ54〜58のアドレスに書き込むよう
になっている。
Further, in the present embodiment, the internal operation circuit 52 writes the operation result to the addresses of the buffers 54 to 58 from which the data on which the operation is based has been read.

【0138】これにより、バッファ54〜58に演算結
果を格納するために特別の領域を設けなくてもよいの
で、バッファ54〜58のメモリを効率的に利用するこ
とができる。
As a result, it is not necessary to provide a special area for storing the operation results in the buffers 54 to 58, so that the memories of the buffers 54 to 58 can be used efficiently.

【0139】さらに、本実施の形態では、アドレス変換
器62は、ジグザグスキャン命令が与えられた場合に
は、CPU40がバッファ54〜58に対して書込を行
うときの書込アドレスを所定規則で変換するようになっ
ている。
Further, in the present embodiment, when a zigzag scan instruction is given, address converter 62 sets a write address when CPU 40 writes to buffers 54 to 58 according to a predetermined rule. It is designed to convert.

【0140】これにより、アドレス変換器62に簡単な
処理を追加するだけで、複雑な並び替え処理を行うこと
なくジグザグスキャン処理を実行することができる。し
たがって、簡易な構成で演算処理の高速化をさらに図る
ことができる。
Thus, the zigzag scan process can be executed by simply adding a simple process to the address converter 62 without performing a complicated rearrangement process. Therefore, the speed of the arithmetic processing can be further increased with a simple configuration.

【0141】上記実施の形態において、CPU40は、
請求項1ないし6、9、10または12記載の外部演算
手段に対応し、内部演算回路52は、請求項1ないし1
1記載の内部演算手段に対応し、バッファ54〜58
は、請求項1ないし5記載の記憶手段に対応し、バッフ
ァ54は、請求項6ないし13記載の第1の記憶手段に
対応し、バッファ56は、請求項6ないし13記載の第
2の記憶手段に対応し、バッファ58は、請求項6ない
し13記載の第3の記憶手段に対応している。また、ア
ドレス変換器62は、請求項12記載のアドレス変換手
段に対応し、Y成分算出ステート、U成分算出ステー
ト、V成分算出ステート、R成分算出ステート、G成分
算出ステート、B成分算出ステートおよび量子化演算ス
テートは、請求項10記載の演算ステートに対応してい
る。
In the above embodiment, the CPU 40
The internal arithmetic circuit 52 corresponds to the external arithmetic means according to claims 1 to 6, 9, 10, or 12.
Buffers 54 to 58 corresponding to the internal arithmetic means
Corresponds to the storage unit according to claims 1 to 5, the buffer 54 corresponds to the first storage unit according to claims 6 to 13, and the buffer 56 corresponds to the second storage unit according to claims 6 to 13. The buffer 58 corresponds to the third storage means. The address translator 62 corresponds to the address translator described in claim 12, and includes a Y component calculation state, a U component calculation state, a V component calculation state, an R component calculation state, a G component calculation state, a B component calculation state, and The quantization operation state corresponds to the operation state described in claim 10.

【0142】また、読込側ラッチ回路100〜104
は、請求項13記載の第1乃至第3の読込側保持手段に
対応し、書込側ラッチ回路106〜110は、請求項1
3記載の第1乃至第3の書込側保持手段に対応し、レジ
スタ60は、請求項13記載の係数保持手段に対応し、
乗算器118〜122は、請求項13記載の第1ないし
第3の乗算器に対応し、切換器126は、請求項13記
載の経路切換手段に対応し、切換器128,130は、
請求項13記載の第1および第2のデータ出力手段に対
応している。
The read-side latch circuits 100 to 104
Corresponds to the first to third reading-side holding means in claim 13, and the write-side latch circuits 106 to 110 correspond to claim 1.
The register 60 corresponds to the first to third writing-side holding means according to claim 3, and the register 60 corresponds to the coefficient holding means according to claim 13,
The multipliers 118 to 122 correspond to the first to third multipliers according to claim 13, the switch 126 corresponds to the path switching means according to claim 13, and the switches 128 and 130 include
The present invention corresponds to the first and second data output means.

【0143】なお、上記実施の形態においては、本発明
に係る演算補助回路を、ソフトウェアおよびハードウェ
アにより、DCTによる符号化方式で画像データの圧縮
または解凍を行う場合について適用したが、これに限ら
ず、本発明の主旨を逸脱しない範囲で他の場合にも適用
可能である。例えば、音声データの圧縮または解凍を行
う場合について適用することができる。
In the above embodiment, the arithmetic auxiliary circuit according to the present invention is applied to a case where image data is compressed or decompressed by a coding method using DCT by software and hardware. However, the present invention is not limited to this. The present invention can be applied to other cases without departing from the gist of the present invention. For example, the present invention can be applied to a case where audio data is compressed or decompressed.

【0144】[0144]

【発明の効果】以上説明したように、本発明に係る請求
項1ないし13記載の演算補助回路によれば、従来に比
して、ハードウェアによる高速化を実現しながらも、コ
ストや製作時間の面で比較的有利となり、しかも回路規
模の小型化をある程度図ることができるという効果が得
られる。また、ソフトウェア側では、本発明に係る演算
補助回路に対して命令を出力し、データを記憶手段に書
き込み、データを記憶手段から読み込むという手順を経
るだけで各演算結果を得ることができるので、ソフトウ
ェアの設計が比較的容易となるという効果も得られる。
As described above, according to the arithmetic auxiliary circuit according to the first to thirteenth aspects of the present invention, the cost and the manufacturing time can be improved while realizing a high-speed operation by hardware as compared with the prior art. This is relatively advantageous in terms of the size, and the effect that the circuit size can be reduced to some extent is obtained. Further, on the software side, each operation result can be obtained only through a procedure of outputting an instruction to the operation auxiliary circuit according to the present invention, writing data to the storage unit, and reading data from the storage unit. The effect of relatively easy software design is also obtained.

【0145】さらに、本発明に係る請求項2、4、5ま
たは9記載の演算補助回路によれば、従来に比して、演
算速度の向上をある程度図ることができるという効果も
得られる。
Further, according to the arithmetic auxiliary circuit according to the second, fourth, fifth or ninth aspect of the present invention, an effect is obtained that the arithmetic speed can be improved to some extent as compared with the conventional one.

【0146】さらに、本発明に係る請求項10記載の演
算補助回路によれば、ソフトウェア側では、データの書
込タイミングを特に考慮しなくてすむので、ソフトウェ
アの設計がさらに容易となるという効果も得られる。
Further, according to the arithmetic auxiliary circuit according to the tenth aspect of the present invention, since the software does not need to particularly consider the data write timing, the design of the software is further facilitated. can get.

【0147】さらに、本発明に係る請求項11記載の演
算補助回路によれば、記憶手段に演算結果を格納するた
めに特別の領域を設けなくてもよいので、記憶手段のメ
モリを効率的に利用することができるという効果も得ら
れる。
Further, according to the arithmetic auxiliary circuit according to the eleventh aspect of the present invention, it is not necessary to provide a special area for storing the operation result in the storage means, so that the memory of the storage means can be efficiently used. The effect of being able to use is also obtained.

【0148】さらに、本発明に係る請求項12記載の演
算補助回路によれば、簡易な構成で演算処理の高速化を
さらに図ることができるという効果も得られる。
Further, according to the arithmetic auxiliary circuit according to the twelfth aspect of the present invention, it is possible to obtain the effect that the speed of arithmetic processing can be further increased with a simple configuration.

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

【図1】本発明を適用した画像処理システムの構成を示
すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an image processing system to which the present invention has been applied.

【図2】内部演算回路52の構成を示すブロック図であ
る。
FIG. 2 is a block diagram showing a configuration of an internal operation circuit 52.

【図3】YUV変換するときの内部演算回路52の各ス
テートを示す図である。
FIG. 3 is a diagram showing each state of an internal operation circuit 52 when performing YUV conversion.

【図4】量子化演算するときの内部演算回路52の各ス
テートを示す図である。
FIG. 4 is a diagram showing each state of an internal operation circuit 52 when performing a quantization operation.

【図5】アドレス変換回路62の構成を示すブロック図
である。
FIG. 5 is a block diagram showing a configuration of an address conversion circuit 62.

【図6】演算補助回路50が行うRGB変換を説明する
ためのタイムチャートである。
FIG. 6 is a time chart for explaining the RGB conversion performed by the arithmetic assist circuit 50;

【図7】DCTによる符号化方式で画像データの圧縮お
よび解凍を行う処理を示す図である。
FIG. 7 is a diagram illustrating processing for compressing and decompressing image data by an encoding method using DCT.

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

40 CPU 44 外部画像メモリ 49 バス 50 演算補助回路 52 内部演算回路 54〜58 バッファ 60 レジスタ 62 アドレス変換器 64 演算用トリガ生成回路 100〜104 読込側ラッチ回路 106〜110 書込側ラッチ回路 112〜116 切換器 118〜122 乗算器 124 加算器 126〜130 切換器 40 CPU 44 External image memory 49 Bus 50 Operation auxiliary circuit 52 Internal operation circuit 54 to 58 Buffer 60 Register 62 Address converter 64 Operation trigger generation circuit 100 to 104 Read-side latch circuit 106 to 110 Write-side latch circuit 112 to 116 Switch 118-122 Multiplier 124 Adder 126-130 Switch

フロントページの続き Fターム(参考) 5B056 BB11 HH03 5B057 CA08 CA12 CA16 CB08 CB12 CB16 CG05 CH01 CH11 CH12 CH14 5C059 KK12 KK50 LA00 MA23 MC01 MC11 ME01 UA02 UA05 UA29 UA38 5J064 AA03 AA04 BA16 BB13 BC01 BC04 BC08 BC09 BC16 BC25 BC29 BD04 Continued on the front page F term (reference) 5B056 BB11 HH03 5B057 CA08 CA12 CA16 CB08 CB12 CB16 CG05 CH01 CH11 CH12 CH14 5C059 KK12 KK50 LA00 MA23 MC01 MC11 ME01 UA02 UA05 UA29 UA38 5J064 AA03 BC04 BC16 BC04 BC16 BC04 BC

Claims (13)

【特許請求の範囲】[Claims] 【請求項1】 外部演算手段の演算を補助する回路であ
って、 内部演算手段と、前記外部演算手段及び前記内部演算手
段の両方がアクセス可能な記憶手段とを備え、 前記内部演算手段は、前記記憶手段からデータを読み込
み、読み込んだデータに基づいて、演算の一部が共通す
る複数の演算方法のなかから指定されたいずれかによ
り、前記各演算方法に共通する共通演算を含む演算を行
い、その演算結果を前記記憶手段に書き込むようになっ
ていることを特徴とする演算補助回路。
1. A circuit for assisting an operation of an external operation means, comprising: an internal operation means; and a storage means accessible by both the external operation means and the internal operation means. Data is read from the storage unit, and based on the read data, an operation including a common operation common to the respective operation methods is performed by any one of a plurality of operation methods common to a part of the operation. And a calculation result written in the storage means.
【請求項2】 外部演算手段の演算を補助する回路であ
って、 内部演算手段と、前記外部演算手段及び前記内部演算手
段の両方がアクセス可能な記憶手段とを備え、 前記内部演算手段は、前記記憶手段からデータを読み込
み、読み込んだデータに基づいて所定の演算を行い、そ
の演算結果を前記記憶手段に書き込むようになってお
り、 前記外部演算手段による前記記憶手段への書込動作と並
列して、前記外部演算手段による書込状況を参照しなが
ら前記読込、前記演算及び前記書込を行うようになって
いることを特徴とする演算補助回路。
2. A circuit for assisting an operation of an external operation means, comprising: an internal operation means; and a storage means accessible by both the external operation means and the internal operation means. Data is read from the storage means, a predetermined calculation is performed based on the read data, and the calculation result is written to the storage means. The write operation to the storage means by the external calculation means is performed in parallel. The arithmetic assisting circuit is configured to perform the reading, the arithmetic operation, and the writing while referring to a writing situation by the external arithmetic means.
【請求項3】 外部演算手段の演算を補助する回路であ
って、 内部演算手段と、前記外部演算手段及び前記内部演算手
段の両方がアクセス可能な複数の記憶手段とを備え、 前記内部演算手段は、前記各記憶手段からそれぞれデー
タを読み込み、読み込んだ複数のデータに基づいて、演
算の一部が共通する複数の演算方法のなかから指定され
たいずれかにより、前記各演算方法に共通する共通演算
を含む演算を行い、その演算結果が1つであるときは当
該演算結果を前記複数の記憶手段のうちいずれかに書き
込み、その演算結果が複数であるときは当該各演算結果
をそれぞれ異なる記憶手段に書き込むようになっている
ことを特徴とする演算補助回路。
3. A circuit for assisting an operation of an external operation means, comprising: an internal operation means; and a plurality of storage means accessible by both the external operation means and the internal operation means. Read data from each of the storage means, and, based on the plurality of read data, specify one of a plurality of operation methods in which a part of the operation is common, and specify a common common method among the operation methods. An operation including an operation is performed, and when the operation result is one, the operation result is written to any of the plurality of storage units. When the operation result is plural, each of the operation results is stored in a different one. An arithmetic assisting circuit characterized in that the arithmetic assisting circuit is adapted to write in the means.
【請求項4】 外部演算手段の演算を補助する回路であ
って、 内部演算手段と、前記外部演算手段及び前記内部演算手
段の両方がアクセス可能な複数の記憶手段とを備え、 前記内部演算手段は、前記各記憶手段からそれぞれデー
タを読み込み、読み込んだ複数のデータに基づいて所定
の演算を行い、その演算結果が1つであるときは当該演
算結果を前記複数の記憶手段のうちいずれかに書き込
み、その演算結果が複数であるときは当該各演算結果を
それぞれ異なる記憶手段に書き込むようになっており、 前記外部演算手段による前記記憶手段への書込動作と並
列して、前記外部演算手段による書込状況を参照しなが
ら前記読込、前記演算及び前記書込を行うようになって
いることを特徴とする演算補助回路。
4. A circuit for assisting an operation of an external operation means, comprising: an internal operation means; and a plurality of storage means accessible by both the external operation means and the internal operation means. Reads data from each of the storage means, performs a predetermined calculation based on the plurality of read data, and when the result of the calculation is one, stores the calculation result in any of the plurality of storage means. When a plurality of operation results are written, each of the operation results is written to a different storage unit. In parallel with the write operation to the storage unit by the external operation unit, the external operation unit Wherein the reading, the calculation, and the writing are performed while referring to a writing situation of the calculation assisting circuit.
【請求項5】 請求項1及び3のいずれかにおいて、 前記内部演算手段は、前記外部演算手段による前記記憶
手段への書込動作と並列して、前記外部演算手段による
書込状況を参照しながら前記読込、前記演算及び前記書
込を行うようになっていることを特徴とする演算補助回
路。
5. The internal arithmetic unit according to claim 1, wherein the internal arithmetic unit refers to a writing state of the external arithmetic unit in parallel with a write operation of the external arithmetic unit to the storage unit. An arithmetic assisting circuit for performing the reading, the arithmetic operation, and the writing while performing the read operation.
【請求項6】 色素変換、離散コサイン変換、量子化演
算及びジグザグスキャンを行って画像データを圧縮する
画像データ圧縮処理、又はその逆の工程を経て圧縮画像
データを解凍する画像データ解凍処理を行う外部演算手
段の処理を補助する回路であって、 内部演算手段と、前記外部演算手段及び前記内部演算手
段の両方がアクセス可能な第1の記憶手段、第2の記憶
手段及び第3の記憶手段とを備え、 前記内部演算手段は、前記第1乃至第3の記憶手段から
それぞれデータを読み込み、読み込んだ複数のデータに
基づいて、演算の一部が共通する複数の演算方法のなか
から指定されたいずれかにより、前記各演算方法に共通
する共通演算を含む演算を行い、その演算結果が1つで
あるときは当該演算結果を前記第1乃至第3の記憶手段
のうちいずれかに書き込み、その演算結果が複数である
ときは当該各演算結果をそれぞれ異なる記憶手段に書き
込むようになっていることを特徴とする演算補助回路。
6. An image data compression process of compressing image data by performing a dye conversion, a discrete cosine transform, a quantization operation, and a zigzag scan, or an image data decompression process of decompressing compressed image data through a reverse process. A circuit for assisting processing of an external arithmetic means, comprising: an internal arithmetic means; a first storage means, a second storage means, and a third storage means accessible by both the external arithmetic means and the internal arithmetic means. Wherein the internal operation means reads data from the first to third storage means, and is designated based on the plurality of read data from among a plurality of operation methods in which a part of the operation is common. By performing the operation including the common operation common to each of the operation methods, if the operation result is one, the operation result is stored in the first to third storage units. Write to or Chiizure, operation auxiliary circuit for the operation result, characterized in that when a plurality are adapted to write the result of each operation in the respective different storage means.
【請求項7】 請求項6において、 前記内部演算手段は、前記演算方法を指定する命令とし
て前記色素変換を行うことを示す色素変換命令が与えら
れた場合には、前記第1乃至第3の記憶手段からそれぞ
れデータを読み込み、読み込んだ3つのデータに基づい
て第1の積和演算、第2の積和演算及び第3の積和演算
を行い、前記第1の積和演算結果を前記第1の記憶手段
に、前記第2の積和演算結果を前記第2の記憶手段に、
前記第3の積和演算結果を前記第3の記憶手段に書き込
むようになっており、 前記第1乃至第3の積和演算は、前記読み込んだ3つの
データに対してそれぞれ係数を乗算してその各乗算結果
を加算するものであることを特徴とする演算補助回路。
7. The image processing apparatus according to claim 6, wherein the internal operation unit is configured to output the first to third instructions when a dye conversion instruction indicating that the dye conversion is performed is given as an instruction for specifying the operation method. Each of the data is read from the storage means, a first multiply-accumulate operation, a second multiply-accumulate operation, and a third multiply-accumulate operation are performed based on the three read data, and the first multiply-accumulate result is calculated by The first storage means stores the second product-sum operation result in the second storage means.
The third product-sum operation result is written in the third storage means. In the first to third product-sum operations, the read three data are each multiplied by a coefficient. An arithmetic assisting circuit for adding the respective multiplication results.
【請求項8】 請求項6及び7のいずれかにおいて、 前記内部演算手段は、前記演算方法を指定する命令とし
て前記量子化演算を行うことを示す量子化演算命令が与
えられた場合には、前記第1乃至第3の記憶手段からそ
れぞれデータを読み込み、読み込んだ3つのデータに基
づいて所定の演算を行い、前記所定の演算結果のうち一
部を前記第1乃至第3の記憶手段のうちいずれかに、前
記所定の演算結果のうち残りの一部をそれ以外の記憶手
段に書き込むようになっており、 前記所定の演算は、前記第1及び第2の記憶手段から読
み込んだデータを結合してなるデータに、前記第3の記
憶手段から読み込んだデータを乗算するものであること
を特徴とする演算補助回路。
8. The apparatus according to claim 6, wherein the internal operation means is provided with a quantization operation instruction indicating that the quantization operation is to be performed as an instruction specifying the operation method. Data is read from each of the first to third storage units, a predetermined operation is performed based on the read three data, and a part of the predetermined operation result is stored in the first to third storage units. In any one of the embodiments, the remaining part of the predetermined operation result is written into another storage unit, and the predetermined operation combines data read from the first and second storage units. An arithmetic assisting circuit for multiplying the obtained data by data read from the third storage means.
【請求項9】 請求項6乃至8のいずれかにおいて、 前記内部演算手段は、前記外部演算手段による前記記憶
手段への書込動作と並列して、前記外部演算手段による
書込状況を参照しながら前記読込、前記演算及び前記書
込を行うようになっていることを特徴とする演算補助回
路。
9. The internal arithmetic unit according to claim 6, wherein the internal arithmetic unit refers to a writing situation by the external arithmetic unit in parallel with a write operation to the storage unit by the external arithmetic unit. An arithmetic assisting circuit for performing the reading, the arithmetic operation, and the writing while performing the read operation.
【請求項10】 請求項9において、 前記内部演算手段による動作は、前記読込を行う読込ス
テートと、前記演算を行う演算ステートと、前記書込を
行う書込ステートと、待機を行う待機ステートとからな
り、 前記書込ステートでは、前記外部演算手段が前記第1乃
至第3の記憶手段に対してアクセスを行っているか又は
アクセスを開始しようとしているときは、前記外部演算
手段によるアクセスが終了するのを待って前記書込を行
うようになっており、 前記待機ステートでは、次の読込ステートで読み込む予
定のデータが前記第1乃至第3の記憶手段に書き込まれ
ていないときは、その書込が終了するまで待機するよう
になっていることを特徴とする演算補助回路。
10. The operation according to claim 9, wherein the operation by the internal operation means includes a read state for performing the read, an operation state for performing the operation, a write state for performing the write, and a standby state for performing standby. In the write state, when the external arithmetic means is accessing or starting to access the first to third storage means, the access by the external arithmetic means ends. In the standby state, when the data to be read in the next read state is not written in the first to third storage units, the writing is performed. An arithmetic assisting circuit, which waits until the operation is completed.
【請求項11】 請求項6乃至10のいずれかにおい
て、 前記内部演算手段は、前記演算結果を、その演算の基と
なったデータを読み込んだ前記第1乃至第3の記憶手段
のアドレスのうちいずれかに書き込むようになっている
ことを特徴とする演算補助回路。
11. The internal processing means according to claim 6, wherein said internal calculation means stores the calculation result in an address of said first to third storage means which reads data on which the calculation is based. An arithmetic assist circuit characterized in that it is written in any of them.
【請求項12】 請求項6乃至11のいずれかにおい
て、 前記外部演算手段が前記第1乃至第3の記憶手段に対し
て読込又は書込を行うときの読込アドレス又は書込アド
レスを変換するアドレス変換手段を備え、 前記アドレス変換手段は、前記演算方法を指定する命令
として前記ジグザグスキャンを行うことを示すジグザグ
スキャン命令が与えられた場合には、前記外部演算手段
の読込アドレス又は書込アドレスを所定規則で変換する
ようになっていることを特徴とする演算補助回路。
12. The address according to claim 6, wherein said external arithmetic means converts a read address or a write address when reading or writing to said first to third storage means. A conversion unit, wherein, when a zigzag scan instruction indicating that the zigzag scan is performed is given as an instruction for specifying the operation method, the address conversion unit changes a read address or a write address of the external operation unit. An arithmetic assist circuit characterized in that conversion is performed according to a predetermined rule.
【請求項13】 請求項6乃至12のいずれかにおい
て、 前記第1乃至第3の記憶手段から読み込んだデータをそ
れぞれ保持する第1乃至第3の読込側保持手段と、前記
第1乃至第3の記憶手段に書き込む演算結果をそれぞれ
保持する第1乃至第3の書込側保持手段と、前記演算に
用いる係数を保持する係数保持手段と、前記係数保持手
段のいずれかの係数と前記第1の読込側保持手段のデー
タとを乗算する第1の乗算器と、前記係数保持手段のい
ずれかの係数と前記第2の読込側保持手段のデータとを
乗算する第2の乗算器と、前記係数保持手段のいずれか
の係数と前記第3の読込側保持手段のデータとを乗算す
る第3の乗算器と、前記第1乃至第3の乗算器の演算結
果を加算する加算器と、前記第1乃至第3の書込側保持
手段と前記加算器とを結ぶデータ経路をいずれかに切り
換える経路切換手段と、前記第1の読込側保持手段及び
前記第2の読込側保持手段のデータを結合して前記第1
の読込側保持手段のデータとして前記第1の乗算器に出
力する第1のデータ出力手段と、前記第3の読込側保持
手段のデータを前記係数保持手段の係数として前記第1
の乗算器に出力する第2のデータ出力手段とを有するこ
とを特徴とする演算補助回路。
13. The first to third reading-side holding means for holding data read from the first to third storage means, respectively, and the first to third reading means, respectively. First to third writing-side holding means for respectively holding the calculation results to be written in the storage means, coefficient holding means for holding the coefficients used for the calculation, and any one of the coefficient holding means and the first A first multiplier for multiplying the data of the reading-side holding unit by a second multiplier for multiplying any of the coefficients of the coefficient holding unit by the data of the second reading-side holding unit; A third multiplier for multiplying any of the coefficients of the coefficient holding means by the data of the third reading-side holding means, an adder for adding the operation results of the first to third multipliers, First to third writing side holding means and the addition Path switching means and said first by combining data of said first reading-side holding means and the second reading-side holding means for switching the data path connecting the bets to either
First data output means for outputting to the first multiplier as data of the reading side holding means, and data of the third reading side holding means as coefficients of the coefficient holding means.
And a second data output means for outputting the data to the multiplier.
JP2000349644A 2000-11-16 2000-11-16 Calculation assisting circuit Withdrawn JP2002159006A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000349644A JP2002159006A (en) 2000-11-16 2000-11-16 Calculation assisting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000349644A JP2002159006A (en) 2000-11-16 2000-11-16 Calculation assisting circuit

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2003086596A Division JP2003345588A (en) 2003-03-26 2003-03-26 Arithmetic auxiliary circuit

Publications (1)

Publication Number Publication Date
JP2002159006A true JP2002159006A (en) 2002-05-31

Family

ID=18823009

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000349644A Withdrawn JP2002159006A (en) 2000-11-16 2000-11-16 Calculation assisting circuit

Country Status (1)

Country Link
JP (1) JP2002159006A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005086485A1 (en) * 2004-03-09 2005-09-15 Matsushita Electric Industrial Co., Ltd. Encoded data decoding apparatus
US7356189B2 (en) 2003-05-28 2008-04-08 Seiko Epson Corporation Moving image compression device and imaging device using the same
US7373001B2 (en) 2003-05-28 2008-05-13 Seiko Epson Corporation Compressed moving image decompression device and image display device using the same

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7356189B2 (en) 2003-05-28 2008-04-08 Seiko Epson Corporation Moving image compression device and imaging device using the same
US7373001B2 (en) 2003-05-28 2008-05-13 Seiko Epson Corporation Compressed moving image decompression device and image display device using the same
WO2005086485A1 (en) * 2004-03-09 2005-09-15 Matsushita Electric Industrial Co., Ltd. Encoded data decoding apparatus

Similar Documents

Publication Publication Date Title
JP4491798B2 (en) Method and system for performing two-dimensional transformation on data value array with low power consumption
JP3279852B2 (en) Signal decoding device
JP2008117368A5 (en)
US5649077A (en) Modularized architecture for rendering scaled discrete cosine transform coefficients and inverse thereof for rapid implementation
JP2959104B2 (en) Signal processor
US6640019B2 (en) Image processing apparatus capable of decoding, raster scan converting, and varying data at high speed, and method and computer readable storage medium for the same
US7929777B2 (en) Variable length decoding device, variable length decoding method and image capturing system
JP2002159006A (en) Calculation assisting circuit
JP2947389B2 (en) Image processing memory integrated circuit
JP2003345588A (en) Arithmetic auxiliary circuit
Elbadri et al. Hardware support of JPEG
JPH09322168A (en) Two-dimensional inverse discrete cosine transformation device
US7151861B2 (en) Raster image transformation circuit using micro-code and method
JP2960328B2 (en) Apparatus for providing operands to "n + 1" operators located in a systolic architecture
TWI382768B (en) Method and apparatus for concurrently performing lapped transform and core transform operations
JP2851804B2 (en) 2D orthogonal transform device
JP4170173B2 (en) Block matching arithmetic unit
JPH08307868A (en) Moving image decoder
JP3382358B2 (en) Image processing apparatus and method
JPH10105672A (en) Computer and memory integrated circuit with operation function to be used in this computer
JP2009159631A (en) Image processor, image processing method, computer program, and recording medium
JP2790911B2 (en) Orthogonal transform operation unit
JP3503711B2 (en) Raster / block conversion method and apparatus for implementing the method
KR100408884B1 (en) Discrete cosine transform circuit of distributed arithmetic
JPH1091615A (en) Discrete cosine transformation/inverse discrete cosine transformation device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060314

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060515

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070130

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070315

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070918

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20071116