JPH02100577A - Discrete cosine converting device - Google Patents
Discrete cosine converting deviceInfo
- Publication number
- JPH02100577A JPH02100577A JP63251978A JP25197888A JPH02100577A JP H02100577 A JPH02100577 A JP H02100577A JP 63251978 A JP63251978 A JP 63251978A JP 25197888 A JP25197888 A JP 25197888A JP H02100577 A JPH02100577 A JP H02100577A
- Authority
- JP
- Japan
- Prior art keywords
- data
- image data
- discrete cosine
- coefficient
- block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000009466 transformation Effects 0.000 claims description 10
- 238000013500 data storage Methods 0.000 claims description 7
- 238000006243 chemical reaction Methods 0.000 claims 2
- 239000011159 matrix material Substances 0.000 abstract description 15
- 238000004364 calculation method Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 9
- 238000003384 imaging method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Landscapes
- Storing Facsimile Image Data (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Complex Calculations (AREA)
Abstract
Description
【発明の詳細な説明】
技術分野
本発明はディスクリートコサイン変換装置に関し、特に
、ディジタル画像データを分割した各ブロックの画像デ
ータについて2次元ディスクリートコサイン変換を行う
ディスクリートコサイン変換装置に関する。TECHNICAL FIELD The present invention relates to a discrete cosine transform device, and more particularly to a discrete cosine transform device that performs two-dimensional discrete cosine transform on each block of image data obtained by dividing digital image data.
1且共遺
ディジタル画像データをメモリに記憶する場合には、デ
ータ酸を減らしてメモリの容量を少なくするため、各種
の符号化が行われている。When storing digital image data in a memory, various types of encoding are used to reduce the amount of data and the capacity of the memory.
このような符号化として、例えば2次元ディスクリート
コサイン変換は次のように符号化を行う。1つの画面を
構成する画像データを所定の大きさのブロックに分割し
、ブロックを構成する各画素のデータにより構成される
データの配列を行列Pとする。この行列Pに対して、変
換行列CおよびCの転置行列CTを用いて演算を行う。As such encoding, for example, two-dimensional discrete cosine transform is encoded as follows. Image data constituting one screen is divided into blocks of a predetermined size, and a matrix P is an array of data constituted by data of each pixel constituting the block. An operation is performed on this matrix P using a transformation matrix C and a transposed matrix CT of C.
演算後の2次元ディスクリートコサイン変換係e!!F
は
F=Cφ P ・ CT
で与えられる。Two-dimensional discrete cosine transformation after calculation e! ! F
is given by F=Cφ P · CT.
このようにブロック化された画像データに対して2次元
ディスクリートコサイン変換を行う場合には、1つの画
面を、構成する画素データを所定の数、例えば8x8で
構成されるブロックに分割し、分割された各ブロックご
とに画素データを読み出して、上記の2次元ディスクリ
ートコサイン変換を行う必要がある。したがって、1画
面の画像データを記憶するメモリから画像データを読み
出す場合に、それぞれのブロック内の画素データを読み
出さなければならないため、読み出しにおいてアドレス
の制御に複雑な処理を要する欠点があった。When performing two-dimensional discrete cosine transformation on image data that has been divided into blocks in this way, the pixel data constituting one screen is divided into a predetermined number of blocks, for example, 8x8 blocks, and the It is necessary to read the pixel data for each block and perform the two-dimensional discrete cosine transformation described above. Therefore, when reading out image data from a memory that stores one screen of image data, pixel data in each block must be read out, which has the drawback of requiring complicated processing for address control during readout.
このように、分割された各ブロックごとに画素データを
読み出して、2次元ディスクリートコサイン変換を行う
ものとして例えば特開昭81−135283号に開示さ
れた装置があるが、この装置においては各データの演算
のために、ブロック行列を構成するデータの行または列
の数nに比例した時間を要し、演算が高速化されていな
いという問題があった。For example, there is a device disclosed in Japanese Patent Application Laid-Open No. 81-135283 that reads pixel data for each divided block and performs two-dimensional discrete cosine transformation. There is a problem in that the calculation requires time proportional to the number n of rows or columns of data constituting the block matrix, and the calculation is not accelerated.
[1的
未発明はこのような従来技術の問題点を解消し1画像デ
ータの読み出しに複雑なアドレス制御を要せず、2次元
ディスクリートコサイン変換を高速で行うことのできる
ディスクリートコサイン変換装置を提供することを目的
とする。[An object of the present invention is to provide a discrete cosine transform device that solves the problems of the prior art and can perform two-dimensional discrete cosine transform at high speed without requiring complicated address control to read out one image data.] The purpose is to
発明の開示
本発明によれば、1つの画面を表すディジタル画像デー
タを複数のブロックに分割して各ブロックの画像データ
について2次元ディスクリートコサイン変換を行うディ
スクリートコサイン変換装置は、1つの画面を表すディ
ジタル画像データを蓄積し、画面の水平および垂直方向
に読み出し可能な画像データ記憶手段と、記憶手段から
読み出された画像データをすくなくともブロックの1方
向分蓄積可能な画像データ保持手段と、画像データ保持
手段から並列に読み出されたプロ・ンクの1方向分の画
像データを対称位置のデータごとに加算および減算のい
ずれかを行う加算減算選択手段と、ブロックの画像デー
タについて、2次元ディスクリートコサイン変換を行う
ために用いられる係数を格納する係数記憶手段と、加算
gn選択手段から出力された加算および減算のいずれか
を行われたデータと、係数記憶手段から読み出された係
数との乗算を行う乗算手段と、乗算手段により乗算を行
われたデータを加算する加算手段とを有し、係数記憶手
段から読み出される係数は、ブロックの1方向分の画像
データについて、画像データの数の2分の1の種類であ
り、係数の読み出しごとに加算減算選択手段による選択
を切り換えるものである。DISCLOSURE OF THE INVENTION According to the present invention, a discrete cosine transform device divides digital image data representing one screen into a plurality of blocks and performs two-dimensional discrete cosine transform on the image data of each block. An image data storage means that can store image data and read it out in the horizontal and vertical directions of the screen, an image data storage means that can store the image data read from the storage means for at least one direction of a block, and an image data storage means. addition/subtraction selection means that performs either addition or subtraction for each symmetrical position of the image data in one direction of the pro-nk read out in parallel from the means; and two-dimensional discrete cosine transformation for the image data of the block. a coefficient storage means for storing coefficients used to perform the calculation, and data subjected to either addition or subtraction output from the addition gn selection means and the coefficient read from the coefficient storage means are multiplied. It has a multiplication means and an addition means for adding the data multiplied by the multiplication means, and the coefficients read from the coefficient storage means are half the number of image data for the image data in one direction of the block. 1 type, and the selection by the addition/subtraction selection means is switched every time a coefficient is read.
実施例の説明
次に添付図面を参照して本発明によるディスクリートコ
サイン変換装置の実施例を詳細に説明する。DESCRIPTION OF EMBODIMENTS Next, embodiments of a discrete cosine transformer according to the present invention will be described in detail with reference to the accompanying drawings.
第1図には本発明によるディスクリートコサイン変換装
置の一実施例が示されている。FIG. 1 shows an embodiment of a discrete cosine transform device according to the present invention.
本装置はl@面分の画像データを蓄積するメモリ12を
有する。メモリ12には撮像装置または外部記憶装置等
の信号源から入力端子10を通して、第2図に示すよう
な1画面を構成する画像データが入力され、記憶される
。メモリ12は、アドレス制御部14から入力される水
平、垂直読み出し切り換え信号により、記憶されている
1画面分の各画素データを、第3B図に示すように縦方
向に読み出すか、または第4B図に示すように横方向に
読み出す、第3B図に示す読み出しの場合には、第2A
図および第2B図に矢印Aで示すように、1列目の画素
データがX 00. x 10、x20、・・−x V
−10と、画面の上から下まで読み出された後、2列目
の画素データがxQl、 xll、x21、・−x’J
−11と読み出され、同様にしてすべての画素データが
読み出される。第4B図に示す横方向の読み出しの場合
には、i2A図および第2B図に矢印Bで示すように、
1行目の画素データがxoo、x 01. x 02
、・・・xOH−1と、画面の左から右に読み出された
後、2行目の画素データがxlo、xll、x12、・
・・xlH−1と読み出され、同様にしてすべての画素
データが読み出される。This device has a memory 12 that stores image data for l@ planes. Image data constituting one screen as shown in FIG. 2 is input to the memory 12 from a signal source such as an imaging device or an external storage device through the input terminal 10, and is stored therein. The memory 12 reads out the stored pixel data for one screen in the vertical direction as shown in FIG. 3B, or in the vertical direction as shown in FIG. In the case of reading out in the horizontal direction as shown in FIG. 3B, the second A
As shown by arrow A in the figure and FIG. 2B, the pixel data of the first column is X 00. x 10, x 20,...-x V
-10, and after being read from the top to the bottom of the screen, the pixel data in the second column is xQl, xll, x21, -x'J
-11 is read out, and all pixel data are read out in the same way. In the case of horizontal readout shown in FIG. 4B, as shown by arrow B in FIGS. i2A and 2B,
The pixel data of the first row is xoo, x 01. x 02
, ... xOH-1, and after being read from the left to the right of the screen, the pixel data on the second line is xlo, xll, x12, .
... xlH-1, and all pixel data are read out in the same way.
メモリ12から読み出された画素データは、縦列(直列
)に接続された8個のラッチ21.22、・・・28に
、ラッチ28側から順次入力され、保持される。Pixel data read from the memory 12 is sequentially input from the latch 28 side to eight latches 21, 22, . . . , connected in series, and is held therein.
本実施例では画像データを第3A図に示すような8x8
の画素からなるブロックに分割して2次元ディスクリー
トコサイン変換を行うため、8個のラッチ21.22、
・・・28を設けているが、分割するブロックの大きさ
に応じて異なる数のラッチを設けるようにすればよい。In this embodiment, the image data is 8x8 as shown in Figure 3A.
In order to perform two-dimensional discrete cosine transformation by dividing into blocks each consisting of pixels, eight latches 21, 22,
. . 28 are provided, but a different number of latches may be provided depending on the size of the block to be divided.
ラッチ21.22、・・・28は、クロック発生回路1
6から送られるクロック信号によってデータの保持およ
び読み出し動作を行う。例えば第2B図に示すように、
1列目の画素データがxoo、xlO1x20゜・・・
xV−10の順で読み出された場合には、最初のクロッ
ク信号によって画素データx00がラッチ28に入力さ
れ、保持される0次のクロック信号によって、画素デー
タxloがラッチ2Bに入力されるとともに、ラッチ2
8から画素データがラッチ28に隣接するラッチに送ら
れる。同様にして8個のクロックによって、8個の画素
データx00、xlo、x20、・・・x70がラッチ
21.22・・・28に、それぞれ保持される。The latches 21, 22, . . . , 28 represent the clock generation circuit 1
Data holding and reading operations are performed by a clock signal sent from 6. For example, as shown in Figure 2B,
The pixel data of the first row is xoo, xlO1x20°...
When read out in the order of xV-10, the pixel data x00 is input to the latch 28 by the first clock signal, and the pixel data xlo is input to the latch 2B by the held 0th order clock signal. , latch 2
8, pixel data is sent to a latch adjacent to latch 28. Similarly, eight pieces of pixel data x00, xlo, x20, . . . x70 are held in latches 21, 22, .
ラッチ21.22、・・・28の各出力は、ラッチ30
の入力に接続されている。ラッチ30には分周器18か
らクロック信号が入力される。分周器18は、クロック
発生回路16から送られるクロック信号を、n倍の周期
に分周する分周器であり、本実施例ではクロック発生回
路16から送られるクロック信号を8倍の周期のクロッ
ク信号に変換してラッチ30へ出力する。Each output of the latches 21, 22, . . . 28 is connected to the latch 30.
is connected to the input of A clock signal is input to the latch 30 from the frequency divider 18 . The frequency divider 18 is a frequency divider that divides the frequency of the clock signal sent from the clock generation circuit 16 into n times the period. It is converted into a clock signal and output to the latch 30.
ラッチ30は、ラッチ21.22、・・・28に入力さ
れるクロック信号の8倍の周期のクロック信号が分周器
18から送られることにより、ラッチ21.22、・・
・28からそれぞれ入力されるデータを保持する。した
がって、クロック発生回路18から送られるクロック信
号が8個分、ラッチ21.22、・・・28に入力され
て、8個の画素データX0O1xlO1x20、・・・
x?0がラッチ21.22・・・28に、それぞれ保持
された後、分周器18からラッチ30に送られる8倍の
周期のクロック信号によって、これらのデータがラッチ
30に入力され、保持される。The latches 30 are connected to the latches 21, 22, .
- Holds the data input from 28 respectively. Therefore, eight clock signals sent from the clock generation circuit 18 are input to the latches 21, 22, . . . , and eight pixel data X0O1xlO1x20, .
x? After 0 is held in the latches 21, 22, . .
ラッチ30からの8個の画素データの出力は、4個の加
算器71・・・74および4個の減算器81・・・84
の入力にそれぞれ接続されている。ラッチ30の第1の
出力は、データxoOが出力され、加算器71および減
算器81の一方の入力にそれぞれ接続されている。加算
器71および減算器81の他方の入力には、ラッチ30
の第8の出力が接続され、データx?0が入力される。The output of the 8 pixel data from the latch 30 is transmitted to 4 adders 71...74 and 4 subtracters 81...84.
are connected to the respective inputs. The first output of the latch 30 outputs data xoO and is connected to one input of the adder 71 and the subtracter 81, respectively. The latch 30 is connected to the other input of the adder 71 and the subtracter 81.
The eighth output of is connected and the data x? 0 is input.
ラッチ30の第2の出力は、データxloが出力され、
加算器72および減算器82の一方の入力にそれぞれ接
続されている。加算器72および減算器82の他方の入
力には、ラッチ30の第7の出力が接続され、データx
80が入力される。同様に、加算器73および減算器8
3にはラッチ30の第3の出力および第6の出力が接続
され、加算器74および減算器84にはラッチ30の第
4の出力および第5の出力が接続されている。The second output of the latch 30 is the data xlo,
It is connected to one input of adder 72 and subtracter 82, respectively. The other input of the adder 72 and the subtracter 82 is connected to the seventh output of the latch 30, and the data x
80 is input. Similarly, adder 73 and subtracter 8
3 is connected to the third and sixth outputs of the latch 30, and the adder 74 and the subtracter 84 are connected to the fourth and fifth outputs of the latch 30.
ラッチ30に保持された8個の画素データx00、xl
o、x20、−・x 70は、次の8個の画素データが
ラッチ30に入力されると読み出され、加算器71・・
・74および減算器81・・・84に、それぞれ入力さ
れる。8 pixel data x00, xl held in latch 30
o, x20, -.
74 and subtracters 81...84, respectively.
すなわち同図に示すように、加算器71および減算器8
1にはデータxOOとx70が、加算器72および減算
器82にはデータxlOとx60が、加算器73および
減算器83にはデータx20とx50が、加算器74お
よび減算器84にはデータx30とx40が、それぞれ
入力される。したがって、例えば加算器71においては
、データX00とx70が加算され、減算器81におい
てはデータX00からx?Oが減算される。That is, as shown in the figure, an adder 71 and a subtracter 8
1 receives data xOO and x70, adder 72 and subtractor 82 receive data xlO and x60, adder 73 and subtractor 83 receive data x20 and x50, and adder 74 and subtracter 84 receive data x30. and x40 are input, respectively. Therefore, for example, in the adder 71, the data X00 and x70 are added, and in the subtracter 81, the data X00 to x? O is subtracted.
加算器71および減算器81の出力はスイッチ91に接
続され、他の加算器72.73.74および減算器82
.83.84の出力も同様に、スイッチ92.93.9
4に接続されている。スイッチ91・・・94の出力は
乗算器41・・・44に接続されている。スイッチ91
・・・94はスイッチ制御部90からの制御信号によっ
て一斉に制御され、加算器71・・・74の出力または
減算器81・・・84の出力を選択して、乗算器41、
・・・44へそれぞれ出力する。The outputs of adder 71 and subtracter 81 are connected to switch 91, which connects other adders 72, 73, 74 and subtracter 82.
.. Similarly, the output of 83.84 is also connected to switch 92.93.9.
Connected to 4. The outputs of the switches 91...94 are connected to multipliers 41...44. switch 91
...94 are controlled all at once by a control signal from the switch control section 90, and select the outputs of the adders 71...74 or the outputs of the subtracters 81...84, and select the outputs of the multipliers 41, .
...44 respectively.
乗算器41、・・・44の他方の入力には係数発生器5
1、・・・54から送られる係数CkO〜Ck3が入力
される。係数発生器51、・・・54は、ラッチ30か
ら出力されたデータに2次元ディスクリートコサイン変
換を行うだめの係数CkO1・・・Ck3(k=o〜7
)をそれぞれ発生し、乗算器・41、・・・44へ出力
する。なお、係数CkOと第1図のC(′:)とは同一
のものを意味する。A coefficient generator 5 is connected to the other input of the multipliers 41, . . .
Coefficients CkO to Ck3 sent from 1, . . . , 54 are input. The coefficient generators 51, . . . , 54 generate coefficients CkO1, .
) are generated and output to multipliers 41, . . . , 44, respectively. Note that the coefficient CkO and C(':) in FIG. 1 mean the same thing.
本実施例においてはブロックサイズを8x8としており
、後述するように、8列のデータのうち4列のデータは
他の4列のデータと対称の値となることを利用している
ため、係数発生器51.・・・54により発生される係
数は前記のように8x4種類となるが、ブロックサイズ
を一般的にNとした場合には一般に係@ Ci jは
Cij= (2/N ) W(i) cos ((2j
+1)iπ/ 2 N )で表される。ここで、
W(i) = 1 /σ (i=0のとき)1
(i≠Oのとき)
である。In this example, the block size is 8x8, and as will be described later, the coefficients are Vessel 51. The coefficients generated by . ((2j
+1)iπ/2N). Here, W(i) = 1 /σ (when i=0) 1
(When i≠O).
最初の8個の画素データX0O1xlo、x20、・・
・x?Oがラッチ30に入力されると、前記のように、
データx00とx70は加算器71および減算器81に
、データxloとx60は加算器72および減算器82
に、データx20とx50は加算器73および減算器8
3に、データx30とx40は加算器74および減算器
84にそれぞれ入力され、加算器71・・・74におい
ては加算が、減算器81・・・84においては減算が行
われる。First 8 pixel data X0O1xlo, x20,...
・x? When O is input to the latch 30, as described above,
Data x00 and x70 are sent to adder 71 and subtracter 81, and data xlo and x60 are sent to adder 72 and subtracter 82.
, the data x20 and x50 are sent to the adder 73 and the subtracter 8.
3, data x30 and x40 are input to an adder 74 and a subtracter 84, respectively, and addition is performed in the adders 71...74, and subtraction is performed in the subtracters 81...84.
最初の8個の画素データX0O1xlo、x20、・・
・x70による加算および減算が行われる時には、スイ
ッチ81・・・94はスイッチ制御部90からの制御信
号によって図示のように接続されている。したがって、
加算器71・・・74からの出力が乗算器41・・・4
4へ出力される。すなわちx COI x 70、x
10+ x Go、x20+ x50.x30+ x4
0が、乗算器41・44へそれぞれ送られる。First 8 pixel data X0O1xlo, x20,...
- When addition and subtraction by x70 are performed, the switches 81 . . . 94 are connected as shown in the figure by a control signal from the switch control section 90. therefore,
The outputs from the adders 71...74 are sent to the multipliers 41...4
Output to 4. i.e. x COI x 70, x
10+ x Go, x20+ x50. x30+ x4
0 is sent to multipliers 41 and 44, respectively.
この時、クロック発生回路18からのクロック信号によ
って係数発生器51.・・・54から最初の4個の係数
COO1・・・C03(k= 0)が乗算器41・・・
44に入力され、それぞれ次のような乗算が行われる。At this time, the coefficient generator 51 . ...54, the first four coefficients COO1...C03 (k=0) are multiplier 41...
44, and the following multiplications are performed respectively.
COOx (x00+x70)
COI x (xlo+x80)
CO2x (x20+x50)
CO3x (x30+x40)
乗算器41、・・・44からの出力は、それぞれ多段加
算器60に入力され、多段加算器60において加算され
る。乗算器41、・・・44からの出力が、上記のデー
タである場合には、多段加算器60における加算によっ
て次のデータzoOが求められる。COOx (x00+x70) COI x (xlo+x80) CO2x (x20+x50) CO3x (x30+x40) The outputs from the multipliers 41, . When the outputs from the multipliers 41, .
z OO= COOx COI COlx lo+ C
02x 20+ C03x 30+ C0Ox?O+
C01xEiO+ C02x50+ C03x40
このZooは、係数をCkOl・・・Ck7とした場合
のz OO= C00x00+ C01x 10+ C
02x20+ C03x30+C04x40+C05x
50+C013x80+CO?x70で表されるものと
同一の値となる。この理由について次に説明する。z OO= COOx COI COlx lo+ C
02x 20+ C03x 30+ C0Ox? O+
C01xEiO+ C02x50+ C03x40
This Zoo is z OO= C00x00+ C01x 10+ C when the coefficient is CkOl...Ck7
02x20+ C03x30+C04x40+C05x
50+C013x80+CO? This value is the same as that expressed by x70. The reason for this will be explained next.
前記係数C4jを表す式
%式%)
]
)]
となる。したがって、Ci N−1−’jはC1jと絶
対値が同一であり、iが偶数であるか奇数であるかによ
ってその符号が異なるのみであることがわかる。すなわ
ち、iが偶数の時には
Ci N−1−j = Cijであり、iが奇数の時に
はCi N−1j = −Cijである。The formula representing the coefficient C4j is as follows. Therefore, it can be seen that Ci N-1-'j has the same absolute value as C1j, and only differs in sign depending on whether i is an even number or an odd number. That is, when i is an even number, Ci N-1-j = Cij, and when i is an odd number, Ci N-1j = -Cij.
上記のデータzoOを求める場合においては、データx
OO1xlO1x20、・・・x 70はxijのiを
0としているから、iが偶数である。したがってこの場
合にはCi N−1j = Cijの関係がなり立つか
ら、X00に用いる係数C00と、X70に用いる係数
CO7は等しいため、上記のように係数000、・・・
C03のみを用い、xooとX70、xloとx f3
0. x 20とX50、X30とX40にそれぞれ
同一の係数を用いて乗算を行うことにより、zooを求
めることができる。When calculating the above data zoO, data x
OO1xlO1x20,...x 70 has i of xij set to 0, so i is an even number. Therefore, in this case, the relationship Ci N-1j = Cij holds true, so the coefficient C00 used for X00 and the coefficient CO7 used for X70 are equal, so the coefficient 000,...
Using only C03, xoo and X70, xlo and x f3
0. Zoo can be found by multiplying x20 and X50, and X30 and X40 using the same coefficients.
次に、クロック発生回路16からのクロック信号に応動
してスイッチ91・・・94が図示と反対の位置に切り
換えられ、減算器81・・・84からの出力x 00−
x 70、x 10− x 80、x、2O−X50
、x 30− x 40がそれぞれ乗算器41.・・・
44に送られる。一方、クロック発生回路16からのク
ロック信号によって係数発生器51、・・・54から次
の4個の係数Cl01・・・C13(k= 1)が乗算
器41、・・・44に入力される。Next, in response to the clock signal from the clock generation circuit 16, the switches 91...94 are switched to positions opposite to those shown in the figure, and the outputs x00- from the subtracters 81...84 are
x 70, x 10- x 80, x, 2O-X50
, x 30 - x 40 are respectively multipliers 41 . ...
Sent to 44. On the other hand, the next four coefficients Cl01...C13 (k=1) are input from the coefficient generators 51, . . . to the multipliers 41, . .
乗算器41.・・・44においてそれぞれ乗算が行われ
、乗算されたデータは多段加算器80において加算され
、次のデータzlOが求められる。Multiplier 41. ... 44, and the multiplied data is added in a multistage adder 80 to obtain the next data zlO.
Z lo= C10x oo+ Cllx to+ C
I2x 20+ C13x 30− CIOx 70−
Cllx Go −C12x 50− C13x 4
0このzloは、係数をCkOl・・・Ck?とした場
合のz 10= C10x OO+ Cllx 10+
CI2x 20+ C13x 30+ C14x a
o+ C15x 50+ C18x eo+ CI7x
70で表されるものと同一の値となる。Z lo= C10x oo+ Cllx to+ C
I2x 20+ C13x 30- CIOx 70-
Cllx Go -C12x 50- C13x 4
0 This zlo has a coefficient of CkOl...Ck? z 10= C10x OO+ Cllx 10+
CI2x 20+ C13x 30+ C14x a
o+ C15x 50+ C18x eo+ CI7x
The value is the same as that represented by 70.
同様にして、クロック信号ごとに係数発生器51、・・
・54から4個の係数CkO1・・・CK3が乗算器4
1・・・44に入力され、加算器または減算器から交互
に送られるデータx00、xlO1x20、・・・X7
0と乗算され、多段加算器60において加算され、次の
ようにデータが求められる。Similarly, for each clock signal, a coefficient generator 51, .
・Four coefficients CkO1...CK3 from 54 are multiplier 4
1...44 and sent alternately from the adder or subtracter x00, xlO1x20,...X7
The data is multiplied by 0 and added in the multi-stage adder 60 to obtain data as follows.
X20=C20x00+C21xlO+・・・−C20
x70・・・これらのデータはそれぞれ、
X20= C20x00+ C21x 10+ ・
・・+ C2?x?0z70= C70xOO+
C71x IO+・・ + C77x70に相当する。X20=C20x00+C21xlO+...-C20
x70...These data are respectively X20= C20x00+ C21x 10+ ・
...+C2? x? 0z70=C70xOO+
C71x IO+... + Corresponds to C77x70.
このようにして求められたデータzoo、zlo、X2
0、・・・X70は、多段加算器60からメモリ12に
送られ、第4A図に示すように第1列目に順次格納され
る。メモリ12は、データzOO1zlo、z20、・
・・X70が入力される時には、元のデータX00、x
lo、X20.・・・X70は読み出されてメモリ12
のこれらのアドレスは空となっているから、入力された
データ200、zlo、X20、−・−z 70は元の
データx 00. x 10、X20、・・・X70が
格納されていたアドレスに格納できる。The data zoo, zlo, X2 obtained in this way
0, . . . The memory 12 stores data zOO1zlo, z20, .
...When X70 is input, the original data X00, x
lo, X20. ...X70 is read out and stored in memory 12
Since these addresses are empty, the input data 200, zlo, X20, --.-z 70 is the original data x 00. It can be stored at the address where x10, X20,...X70 were stored.
同様にして、2列目の画未データxol、xll、X2
1.・・・X71がメモリ12から読み出され、同様の
演算を施されてデータzo1. zll、 X21
.−・・X71となって再びメモリ12に格納される。Similarly, the undrawn data xol, xll, X2 in the second column
1. ...X71 is read out from the memory 12 and subjected to similar calculations to become data zo1. zll, X21
.. --...X71 and is stored in the memory 12 again.
以上のようなメモリ12からの画面の縦方向への画素デ
ータの読み出しと、これに対する演算によって、第6図
に示すような式
C@X=Z
であられされる行列演算が行われ、行列Zが求められる
。By reading the pixel data in the vertical direction of the screen from the memory 12 as described above and performing calculations on the data, a matrix calculation is performed using the formula C@X=Z as shown in FIG. is required.
ここまでの動作を示すタイミングチャートを、第8図に
示す。同図において、矢印りで示されるのは、多段加算
器60の加算による遅延時間である。A timing chart showing the operation up to this point is shown in FIG. In the figure, the arrow indicates the delay time due to addition by the multi-stage adder 60.
メモリ12からの画面の縦方向への画素データの読み出
しと、これに対する演算が終了し、第4A図に示すよう
なデータがメモリ12に格納されると、次に第2A図お
よび第2B図に矢印Bで示すような画面の横方向への画
素データの読み出しと、これに対するNtnが行われる
。When the reading of pixel data in the vertical direction of the screen from the memory 12 and the calculation thereof are completed, and the data as shown in FIG. 4A is stored in the memory 12, the data shown in FIGS. 2A and 2B is Pixel data is read out in the horizontal direction of the screen as shown by arrow B, and Ntn for this is performed.
第4B図に示すように、まず画素データzOO1z01
.202、・・・z07が、前記と同様の動作によりメ
モリ12から読み出され、ラッチ21・・・28および
30に保持された後、加算器71・・・74および減算
器81・・・84に送られ、前記と同様に加算および減
算をそれぞれ行われる。111j記と同様にスイッチ9
1・・・94が制御され、加算されたデータまたは減算
されたデータが交互に乗算器41・・・44に送られる
。まず加算されたデータが送られると、係数発生器51
、・・・54からは、前記のZを求める演算の時と同様
に、係数COO1・・・CO3(k= O)が出力され
、乗算器41・・・44に送られる。乗算器41・・・
44において、これらの画素データと係数が乗算され、
多段加算器60で加算され、データyOOが求められる
。yOOは、y OO= COOz OO+ COlz
01+・・・+C00z07で表され、
y00=C00z00+C01zO1+−−・+GO7
z07に相当する。As shown in FIG. 4B, first, pixel data zOO1z01
.. 202, . , and addition and subtraction are performed in the same manner as above. Switch 9 as in 111j
1...94 are controlled, and the added data or subtracted data is sent alternately to the multipliers 41...44. First, when the added data is sent, the coefficient generator 51
, . . . , the coefficients COO1 . . . CO3 (k=O) are output from the coefficients COO1 . Multiplier 41...
At 44, these pixel data and coefficients are multiplied,
The multi-stage adder 60 adds the data to obtain data yOO. yOO is y OO= COOz OO+ COlz
01+...+C00z07, y00=C00z00+C01zO1+--・+GO7
Corresponds to z07.
このデータyOOは、メモリ12の、前記のデータzO
Oが格納されていたアドレスに格納される。This data yOO is the aforementioned data zO in the memory 12.
It is stored at the address where O was stored.
次に、クロック発生回路16からのクロック信号によっ
て係数発生器51、・・・54から次の4個の係数Cl
01・・・C13(k= 1)が乗算器41、・・・4
4に入力され、多段加算器80からデータyotが出力
される。Next, the next four coefficients Cl are generated from the coefficient generators 51, . . . , by the clock signal from the clock generator 16.
01...C13 (k=1) is the multiplier 41,...4
4, and data yot is output from the multistage adder 80.
yo1= C10z 00+ Cllz 01+・・・
−C10z 07−・・(C10z00+C11z01
+・=+C17z07に相占)同様の演算を繰り返して
、
y02= C20zOO+ C21zO1+・−・−C
20z0?・・−(C20z OO+ C21z 01
+・・・+C27zO?に相当)y07= C70z0
0+ C71z01+−・−−C70z07・−・(C
70z OO+ C71z 01+・・・+C77z0
7に相当)が順次出力され、メモリ12の1行目のアド
レスに記憶される。yo1= C10z 00+ Cllz 01+...
-C10z 07-...(C10z00+C11z01
+・=+C17z07) Repeat the same operation to get y02= C20zOO+ C21zO1+・−・−C
20z0? ...-(C20z OO+ C21z 01
+...+C27zO? )y07= C70z0
0+ C71z01+-・--C70z07・-・(C
70z OO+ C71z 01+...+C77z0
7) are sequentially output and stored at the address in the first row of the memory 12.
同様にして、2行目の画素データzlo、zll、z1
2、・・・z17がメモリ12から読み出され、同様の
演算を施されてデータyio、yll、y12、・・・
y17となって再びメモリ12に格納される。Similarly, the pixel data zlo, zll, z1 on the second row
2, .
y17 and is stored in the memory 12 again.
同様に横方向の画素データの読み出しと演算を繰り返す
ことによって、第7図に示すような式7式%
であられされる行列演算が行われ、行列Yが求められる
。Similarly, by repeating the reading and calculation of pixel data in the horizontal direction, the matrix calculation expressed by the formula 7 as shown in FIG. 7 is performed, and the matrix Y is obtained.
したがって、以−]−の動作によって、行列演算Y=C
@X−CT
が行われたことになる。Therefore, by the following operation, matrix operation Y=C
@X-CT has been carried out.
このように本装置によれば、y=c−x・CTで表され
る2次元ディスクリートコサイン変換を行うことができ
る。As described above, according to the present device, it is possible to perform a two-dimensional discrete cosine transformation represented by y=c−x·CT.
従来は、2次元ディスクリートコサイン変換にオイテ、
=記Z=C−XtたはY=Z−CTで表される演算を行
う場合に、1つの画素データに対して8個の係数CkO
,Ckl、・・・Ck7をそれぞれ乗算し、これらを加
算しなければならないため、8つのシステムクロック信
号ごとに1つの演算されたデータを得ることになり、ブ
ロックのサイズに比例した演算時間を必要とした。した
がって、1つのシステムクロックごとにデータを得るこ
とができないため、演算を高速で行うことができない欠
点があった。Conventionally, the two-dimensional discrete cosine transform was
When performing the calculation expressed as = Z=C-Xt or Y=Z-CT, eight coefficients CkO are calculated for one pixel data.
, Ckl, . . . Ck7 and then add them, so one calculated data is obtained for every eight system clock signals, which requires calculation time proportional to the block size. And so. Therefore, since data cannot be obtained every system clock, there is a drawback that calculations cannot be performed at high speed.
これに対して本装置によれば、順次読み出された8個の
データをラッチし、これらの8個のデータに対して同時
にそれぞれ係数を乗算してこれらを加算するから、1つ
のシステムクロックごとに1つのデータを得ることがで
き、行列演算を高速で行うことができる。On the other hand, according to this device, 8 pieces of data read out sequentially are latched, each of these 8 pieces of data is simultaneously multiplied by a coefficient, and then added. It is possible to obtain one piece of data each time, and matrix operations can be performed at high speed.
本装置によれば、係数発生器51、・・・54に格納す
る係数C1jは1種類で済み、縦方向に読み出されたデ
ータXljおよび横方向に読み出されたデータZijに
対して同じように対応させて読み出して演算を行うだけ
でよい。データXijおよびデータzijはメモリ12
からの読み出し方向が異なるから、係数発生器51、・
・・54から発生され、データzijに対して乗算され
る係数は、データXijに対して乗算される係数と同一
のものとしても、Cの転置行列CTとして作用するため
、結果的に上記のように2次元ディスクリートコサイン
変換を行うことができる。According to this device, only one type of coefficient C1j is stored in the coefficient generators 51, . All you have to do is read out the corresponding data and perform the calculation. Data Xij and data zij are stored in the memory 12
Since the read directions from the coefficient generators 51, .
...Even if the coefficient generated from 54 and multiplied by data zij is the same as the coefficient multiplied by data Xij, it acts as the transposed matrix CT of C, so as a result, the above A two-dimensional discrete cosine transformation can be performed on .
しかも、本実施例によれば、係数発生器51・・・54
から発生される係数C1jの種類を、Ci N−1−j
=(−1)’ Cijの関係を用いて少なくし、Nx
N行列の場合に、N/2個としており、これに伴なって
乗算器41・・・44もN/2個としているから、スペ
ースをとる乗算器を少なくすることができ、装置を小型
化できる。Moreover, according to this embodiment, the coefficient generators 51...54
The type of coefficient C1j generated from Ci N-1-j
= (-1)' Using the relationship of Cij, reduce Nx
In the case of N matrices, the number of multipliers 41...44 is N/2, so the number of multipliers that take up space can be reduced, making the device smaller. can.
さらに、本装置によれば、メモリ12に記憶された1画
面分の画素データをそのまま順次読み出して処理できる
ため、ブロックに分けて読み出す場合のように複雑なア
ドレス制御を必要とせず、メモリ12のアドレス生成が
容易である。したがって、アドレス制御のためのプログ
ラムや複雑なコントローラを必要としない。Furthermore, according to the present device, one screen worth of pixel data stored in the memory 12 can be sequentially read out and processed as is, so there is no need for complicated address control as in the case of reading out data in blocks. Address generation is easy. Therefore, no program or complicated controller is required for address control.
仇−」
本発明によれば、1画面分の画素データをブロックに分
けることなく、そのまま順次読み出して行列演算処理を
行うことができるから、画素データの読み出しに複雑な
アドレス制御を要しない。According to the present invention, one screen's worth of pixel data can be read out sequentially and subjected to matrix calculation processing without being divided into blocks, so that complicated address control is not required for reading out pixel data.
しかも、読み出された画素データをプロ、りのサイズに
応じた数ごとに保持し、これらのデータに対して係数C
1jの対称性を考慮して同面に乗算を行い、その後加算
を行うようにしているから、少ない乗算器で、行列演算
を高速で行うことができる。Moreover, the read pixel data is held in units of numbers according to the size of the pixel, and the coefficient C is applied to these data.
Since multiplication is performed on the same plane and then addition is performed in consideration of the symmetry of 1j, matrix operations can be performed at high speed with a small number of multipliers.
第1図は、本発明によるディスクリートコサイン変換装
置の一実施例を示すブロック図、第2A図、第2B図は
、画面のブロック化を示す図、
第3A図は、ブロック化された画素データを示す図、
第3B図は、第3A図の画素データを第1図の装置によ
り最初のステップで読み出す順序を示す図、
第4A図は、第3B図に示す順序で読み出され第1図の
装置により演算処理を行われた画素データを示す図、
第4B図は、第4A図の画素データを第1図の装置によ
り次のステップで読み出す順序を示す図。
第5図は、第4B図に示す順序で読み出され第1図の装
置により演算処理を行われた画素データを示す図、
第6図は、第1図の装置の第1の動作により行われる行
列演算を示す図、
第7図は、第1図の装置の第2の動作により行われる行
列演算を示す図、
第8図は、第1図の装置の第1の動作を示すタイミング
チャートである。
主要部分の符号の説明
、メモリ
、アドレス制御部
クロック発生回路
、分周器
、ラッチ
ランチ
乗算器
係数発生器
多段加算器
加算器
g算器
スイッチ
!2゜
14 。
1B。
18 。
2+、22.・・・28゜
30゜
41・・・44 。
51・・・54゜
60゜
71・・・74゜
81・・・84゜
91・・・94゜
そ
3A
第
′3日
第
4−A
印
第
曙
Oゝ
口 N −m−
慴
×
日FIG. 1 is a block diagram showing an embodiment of the discrete cosine transform device according to the present invention, FIGS. 2A and 2B are diagrams showing how the screen is divided into blocks, and FIG. 3A is a block diagram showing how the screen is divided into blocks. FIG. 3B is a diagram showing the order in which the pixel data in FIG. 3A is read out in the first step by the device in FIG. 1, and FIG. 4A is a diagram showing the order in which the pixel data in FIG. FIG. 4B is a diagram showing the order in which the pixel data in FIG. 4A is read out in the next step by the device in FIG. 1. FIG. 5 is a diagram showing pixel data read out in the order shown in FIG. 4B and subjected to arithmetic processing by the device shown in FIG. 1, and FIG. 6 is a diagram showing pixel data read out in the order shown in FIG. 7 is a diagram showing matrix calculations performed by the second operation of the device in FIG. 1; FIG. 8 is a timing chart showing the first operation of the device in FIG. 1. It is. Explanation of the symbols of the main parts, memory, address control unit, clock generation circuit, frequency divider, latch launch, multiplier, coefficient generator, multi-stage adder, adder, g-multiplier switch! 2゜14. 1B. 18. 2+, 22. ...28°30°41...44. 51...54゜60゜71...74゜81...84゜91...94゜So3A 3rd day 4-A India 1st dawn Oゝ口 N -m- 慴×日
Claims (1)
ロックに分割して各ブロックの画像データについて2次
元ディスクリートコサイン変換を行うディスクリートコ
サイン変換装置において、該装置は、 前記1つの画面を表すディジタル画像データを蓄積し、
画面の水平および垂直方向に読み出し可能な画像データ
記憶手段と、 該記憶手段から読み出された前記画像データをすくなく
とも前記ブロックの1方向分蓄積可能な画像データ保持
手段と、 該画像データ保持手段から並列に読み出された前記ブロ
ックの1方向分の画像データを対称位置のデータごとに
加算および減算のいずれかを行う加算減算選択手段と、 前記ブロックの画像データについて、2次元ディスクリ
ートコサイン変換を行うために用いられる係数を格納す
る係数記憶手段と、 前記加算減算選択手段から出力された前記加算および減
算のいずれかを行われたデータと、前記係数記憶手段か
ら読み出された前記係数との乗算を行う乗算手段と、 該乗算手段により乗算を行われたデータを加算する加算
手段とを有し、 前記係数記憶手段から読み出される前記係数は、前記ブ
ロックの1方向分の画像データについて、該画像データ
の数の2分の1の種類であり、該係数の読み出しごとに
前記加算減算選択手段による選択を切り換えることを特
徴とするディスクリートコサイン変換装置。2、請求項
1に記載の装置において、前記係数記憶手段から読み出
される前記係数は、前記画像データ記憶手段から前記画
像データを水平方向に読み出す場合と垂直方向に読み出
す場合とで同一であることを特徴とするディスクリート
コサイン変換装置。 3、請求項1に記載の装置において、前記加算減算選択
手段は、前記画像データ保持手段から並列に読み出され
た前記ブロックの1方向分の画像データを対称位置のデ
ータごとに加算する対称データ加算手段と、前記ブロッ
クの1方向分の画像データを対称位置のデータごとに減
算する対称データ減算手段と、前記対称データ加算手段
および対称データ減算手段から出力されるデータのいず
れかを選択する選択手段とからなることを特徴とするデ
ィスクリートコサイン変換装置。[Claims] 1. A discrete cosine transform device that divides digital image data representing one screen into a plurality of blocks and performs two-dimensional discrete cosine transform on the image data of each block, the device comprising: Accumulates digital image data representing the screen,
an image data storage means that can be read in the horizontal and vertical directions of the screen; an image data storage means that can store the image data read from the storage means for at least one direction of the block; and from the image data storage means. addition/subtraction selection means for adding or subtracting image data in one direction of the block read out in parallel for each symmetrical position; and performing two-dimensional discrete cosine transformation on the image data of the block. coefficient storage means for storing coefficients used for the multiplication of the data outputted from the addition/subtraction selection means, which has been subjected to either addition or subtraction, and the coefficient read from the coefficient storage means; and an addition means that adds data multiplied by the multiplication means, and the coefficients read from the coefficient storage means are calculated based on the image data for one direction of the block. 1. A discrete cosine transform device, characterized in that the type is half the number of data, and the selection by the addition/subtraction selection means is switched every time the coefficient is read. 2. In the apparatus according to claim 1, the coefficients read from the coefficient storage means are the same when reading the image data from the image data storage means in a horizontal direction and when reading it in a vertical direction. Characteristic discrete cosine conversion device. 3. The apparatus according to claim 1, wherein the addition/subtraction selection means adds symmetrical data for each symmetrical position of image data in one direction of the block read out in parallel from the image data holding means. an adding means, a symmetrical data subtracting means for subtracting image data in one direction of the block for each data at a symmetrical position, and selection for selecting one of the data output from the symmetrical data adding means and the symmetrical data subtracting means. A discrete cosine conversion device comprising means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63251978A JPH02100577A (en) | 1988-10-07 | 1988-10-07 | Discrete cosine converting device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63251978A JPH02100577A (en) | 1988-10-07 | 1988-10-07 | Discrete cosine converting device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH02100577A true JPH02100577A (en) | 1990-04-12 |
Family
ID=17230832
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP63251978A Pending JPH02100577A (en) | 1988-10-07 | 1988-10-07 | Discrete cosine converting device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH02100577A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH03211604A (en) * | 1990-01-17 | 1991-09-17 | Nec Corp | Digital signal processor |
| JPH04182776A (en) * | 1990-11-16 | 1992-06-30 | Nec Corp | Discrete cosine transformer |
-
1988
- 1988-10-07 JP JP63251978A patent/JPH02100577A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH03211604A (en) * | 1990-01-17 | 1991-09-17 | Nec Corp | Digital signal processor |
| JPH04182776A (en) * | 1990-11-16 | 1992-06-30 | Nec Corp | Discrete cosine transformer |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4791598A (en) | Two-dimensional discrete cosine transform processor | |
| JP2646778B2 (en) | Digital signal processor | |
| EP0013069B1 (en) | A data processor and method of processing video information | |
| US4635292A (en) | Image processor | |
| US5331585A (en) | Orthogonal transformation processor for compressing information | |
| JPS62269519A (en) | Discrete cosine converting circuit | |
| WO2020160608A1 (en) | Highly parallel convolutional neural network | |
| US5867414A (en) | Compact pipelined matrix multiplier utilizing encoding and shifting circuit configurations | |
| JPH03263276A (en) | Digital signal filter circuit | |
| NL1001663C2 (en) | Device for two-dimensional discrete cosine transformation. | |
| JP2725544B2 (en) | DCT and inverse DCT operation device and operation method thereof | |
| US5359549A (en) | Orthogonal transformation processor for compressing information | |
| JPH02100577A (en) | Discrete cosine converting device | |
| US5671169A (en) | Apparatus for two-dimensional inverse discrete cosine transform | |
| JP4156538B2 (en) | Matrix operation unit | |
| JPH02100576A (en) | Block picture data arithmetic unit | |
| JP2822684B2 (en) | Discrete cosine transform device and inverse discrete cosine transform device | |
| KR20000013653A (en) | Forward/reverse optimum integer cosine transform apparatus and method | |
| JPH07234863A (en) | Two-dimensional orthogonal transformation device | |
| US4987557A (en) | System for calculation of sum of products by repetitive input of data | |
| JPH0298777A (en) | Parallel sum of product arithmetic circuit and vector matrix product arithmetic method | |
| JPH0540776A (en) | Two-dimensional DCT matrix arithmetic circuit | |
| JP3397838B2 (en) | Image processing apparatus and discrete cosine transform method | |
| KR0154919B1 (en) | 2-D Inverse Discrete Cosine Transform Circuit | |
| NL1000763C2 (en) | Two=dimensional inverse discrete cosine transformation circuit |