JP3095348B2 - Discrete cosine transform and inverse discrete cosine transform device in data compression / decompression device - Google Patents

Discrete cosine transform and inverse discrete cosine transform device in data compression / decompression device

Info

Publication number
JP3095348B2
JP3095348B2 JP2969196A JP2969196A JP3095348B2 JP 3095348 B2 JP3095348 B2 JP 3095348B2 JP 2969196 A JP2969196 A JP 2969196A JP 2969196 A JP2969196 A JP 2969196A JP 3095348 B2 JP3095348 B2 JP 3095348B2
Authority
JP
Japan
Prior art keywords
input
data
equation
rotation
alux
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.)
Expired - Fee Related
Application number
JP2969196A
Other languages
Japanese (ja)
Other versions
JPH09223124A (en
Inventor
孝夫 松本
浩一 堀内
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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2969196A priority Critical patent/JP3095348B2/en
Publication of JPH09223124A publication Critical patent/JPH09223124A/en
Application granted granted Critical
Publication of JP3095348B2 publication Critical patent/JP3095348B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/007Transform coding, e.g. discrete cosine transform

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Discrete Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Complex Calculations (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、データ圧縮伸長装
置における離散余弦変換及び逆離散余弦変換を高速に行
う装置に関し、特に、2次元回転演算を用いた改良技術
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention performs high-speed discrete cosine transform and inverse discrete cosine transform in a data compression / decompression device.
It relates USo location, in particular, to an improved technique using a two-dimensional rotation operation.

【0002】[0002]

【従来の技術】近年のWS、PC等のコンピュータ及び
VLSI等の半導体デバイスの高速化、低価格化と、J
PEG、H261、MPEGといったディジタル画像圧
縮伸長処理の標準化に伴い、画像データのディジタル圧
縮伸長処理が身近なものとなってきている。その結果、
ディジタル画像圧縮伸長処理に対する需要が増大し、さ
らなる高圧縮率、高品質を実現する画像圧縮伸長処理技
術が必要となってきた。
2. Description of the Related Art In recent years, computers such as WS and PC, and semiconductor devices such as VLSI have been increased in speed and cost, and J.
With the standardization of digital image compression / expansion processing such as PEG, H261, and MPEG, digital compression / expansion processing of image data has become familiar. as a result,
The demand for digital image compression / expansion processing has increased, and image compression / expansion processing technology that achieves a higher compression ratio and higher quality has been required.

【0003】近年標準化されたJPEG、H261、M
PEGといった画像圧縮伸長処理においては、画像デー
タに対して離散余弦変換(Discrete Cosine Transfor
m、以下、「DCT」ともいう。)を施し、その結果得
られたDCT係数を線形量子化し、さらに可変長符号化
することで画像圧縮し、さらにその逆のプロセスを実行
することで画像伸長するDCT符号化方式が採用されて
いる。
[0003] Recently standardized JPEG, H261, M
In image compression / expansion processing such as PEG, Discrete Cosine Transform
m, hereinafter also referred to as “DCT”. ), The resulting DCT coefficients are linearly quantized, and image compression is performed by further performing variable-length coding, and the image is further decompressed by performing the reverse process. .

【0004】ここで、DCTは直交変換の一つであり、
その出力であるDCT係数は、元の画像データに含まれ
る空間周波数の成分に相当する。7は、1次元N次の
DCT、即ち、N個の入力データf[x](0≦x≦N-1)に
対するDCTを表す変換式である。
[0004] Here, DCT is one of orthogonal transforms.
The output DCT coefficient corresponds to a spatial frequency component included in the original image data. Equation 7 is a transform equation representing a one-dimensional N-order DCT, that is, a DCT for N pieces of input data f [x] (0 ≦ x ≦ N−1).

【0005】[0005]

【数7】 ただし、Kは定数であり、C[u](0≦u≦N-1)は8を
満たす。
(Equation 7) Here, K is a constant, and C [u] (0 ≦ u ≦ N−1) satisfies Expression 8.

【0006】[0006]

【数8】 このようなDCT符号化方式により圧縮伸長を行なう画
像処理においては、DCT及び逆DCTの高速化が、画
像の高圧縮率、高品質を実現するうえで、極めて重要な
ポイントの1つとなる。DCT演算の高速化については
種々の研究がなされているが、高速化を妨げる要因の1
つとして乗算が多いことがあげられる(例えば、W. Che
n他, ''A FastComputational Algorithm for the Discr
ete Cosine Transform,'' IEEE Trans.Commun., COM-2
5, pp.1004-1009, 1977.)。
(Equation 8) In image processing in which compression and decompression are performed by such a DCT coding method, speeding up of DCT and inverse DCT is one of the very important points in realizing a high compression rate and high quality of an image. Various studies have been made on the speeding up of the DCT operation, but one of the factors hindering the speeding up is as follows.
One is that there are many multiplications (for example, W. Che
n et al., '' A FastComputational Algorithm for the Discr
ete Cosine Transform, '' IEEE Trans.Commun., COM-2
5, pp. 1004-1009, 1977.).

【0007】ところが、DCT演算において必要とされ
る多くの乗算のすべて、あるいは、それら乗算のほとん
どが1で示されるような2次元回転演算を用いて表現
できることが示されている(例えば、A. Ligtenberg他,
''A single chip solution for an 8 by 8 twodimensi
onal DCT,'' IEEE Intl. Symp. on Circuits and Syste
ms, ISCAS-87,pp.1128-1131, 1987.、 C. Loeffler他,
''Algorithm-architecture mapping forcustom DSP ch
ips,'' IEEE Intl. Symp. on Circuits and Systems, I
SCAS-88,pp.1953-1956, 1988.)。
However, it has been shown that all or many of the multiplications required in the DCT operation can be expressed using a two-dimensional rotation operation as shown in Equation 1 (for example, A Ligtenberg et al.,
'' A single chip solution for an 8 by 8 twodimensi
onal DCT, '' IEEE Intl.Symp.on Circuits and Syste
ms, ISCAS-87, pp. 1128-1131, 1987., C. Loeffler et al.,
'' Algorithm-architecture mapping for custom DSP ch
ips, '' IEEE Intl.Symp.on Circuits and Systems, I
SCAS-88, pp.1953-1956, 1988.).

【0008】具体的には、例えば、7においてK=√
2,N=8の場合であれば、図6(a)に示す計算フロ
ーグラフを得ることができる(例えば、K. R. Rao 他、
「画像符号化技術−DCTとその国際標準−」、オーム
社、403〜426ページ)。 この図より、1次元8
次のDCTにおいて必要とされる多くの乗算は、3種類
の角度(−π/16、−2π/16、−5π/16)に
ついての2次元回転演算に置き換えられていることが判
る。なお、図6(b)は、図6(a)に用いられている
シンボルの意味を説明する図表である。
Specifically, for example, in equation 7, K = √
If N = 8, a calculation flow graph shown in FIG. 6A can be obtained (for example, KR Rao et al.,
"Image coding technology-DCT and its international standard-", Ohmsha, pages 403-426). From this figure, one dimension 8
It can be seen that many of the multiplications required in the next DCT have been replaced by two-dimensional rotation operations on three different angles (-π / 16, -2π / 16, -5π / 16). FIG. 6B is a table for explaining the meaning of the symbols used in FIG. 6A.

【0009】以上のことから、DCT演算を高速に行う
には、1で示される2次元回転演算を高速にすればよ
いことが判る。そこで、従来から2次元回転演算を高速
化する手法が提案されているが、その代表的な2つの手
法は以下の通りである。 (1)第1の従来手法は、1の2次元回転演算を行う
代わりに、それを変形して得られる9の2次元回転演
算を行う方法である。
From the above, it can be seen that the DCT operation can be performed at a high speed by increasing the speed of the two-dimensional rotation operation represented by Expression 1. Therefore, techniques for speeding up the two-dimensional rotation operation have been conventionally proposed. The two typical techniques are as follows. (1) The first conventional method is a method of performing a two-dimensional rotation operation of Expression 9 obtained by transforming the two-dimensional rotation operation of Expression 1 instead of performing the two-dimensional rotation operation of Expression 1.

【0010】[0010]

【数9】 これは、1に示された2次元回転演算では1回の2次
元回転演算につき4回の乗算が必要とされるが、9に
示された2次元回転演算によれば3回の乗算で済むこと
に着目したものである。実際には、この手法を用いるこ
とで、従来の方式では1次元DCTの実現に16回の乗
算を必要としていたものが、11回の乗算で実現できる
ことが報告されている(Loeffler他, ''Practical fast
1-D DCT algorithms with 11multiplications,'' IEEE
Intl. Conf. on Acoust., Speech, and Signal Proces
s.,ICASSP-89, pp.988-991, 1989.)。
(Equation 9) This means that, in the two-dimensional rotation operation shown in Equation 1, four multiplications are required for one two-dimensional rotation operation, but according to the two-dimensional rotation operation shown in Equation 9, three multiplications are performed. It is focused on that it suffices. In fact, it has been reported that this technique can be realized by 11 multiplications, whereas the conventional scheme requires 16 multiplications to realize one-dimensional DCT (Loeffler et al., '' Practical fast
1-D DCT algorithms with 11multiplications, '' IEEE
Intl. Conf. On Acoust., Speech, and Signal Proces
s., ICASSP-89, pp.988-991, 1989.).

【0011】この手法により、例えば、JPEG、H2
61、MPEGといった画像圧縮伸長で必要とされる8
×8画素データの2次元8次のDCTにおいて従来25
6回必要とされていた乗算が176回に削減される。 (2)第2の従来手法は、CORDIC(COordinate R
otation DIgital Computer)と呼ばれるアルゴリズムを
用いる方法である(例えば、J. E. Volder,''TheCORDIC
trigonometric computing technique,'' IRETrans. El
ectron. Comput., EC-8, pp.330-334, 1959.、J. S. Wa
lther,''A unifiedalgorithm for elementary functio
n,'' AFIPS Conf., 38, pp.379-385, 1971.)。
According to this method, for example, JPEG, H2
61, 8 required for image compression / decompression such as MPEG
Conventional 25-dimensional DCT of 2D 8th order of × 8 pixel data
The required multiplication of six times is reduced to 176 times. (2) The second conventional method uses CORDIC (COordinate R).
This method uses an algorithm called “otation digital computer” (for example, JE Volder, '' TheCORDIC
trigonometric computing technique, '' IRETrans.El
ectron.Comput., EC-8, pp.330-334, 1959., JS Wa
lther, '' A unifiedalgorithm for elementary functio
n, '' AFIPS Conf., 38, pp.379-385, 1971.).

【0012】この方法では、10、11及び12
に示される漸化式の演算を、12で示されるz[i]が
0に収束していくようにδ[i]を決定しながら、繰り返
し実行する。
In this method, equations ( 10), ( 11) and ( 12)
Are repeatedly executed while δ [i] is determined so that z [i] shown in Expression 12 converges to 0.

【0013】[0013]

【数10】 (Equation 10)

【0014】[0014]

【数11】 [Equation 11]

【0015】[0015]

【数12】 但し、iは整数、δ[i] = ±1であり、x[0]、y[0]及
びz[0]は13を満たし、θ[i]は14を満たすもの
とする。
(Equation 12) Here, i is an integer, δ [i] = ± 1, x [0], y [0] and z [0] satisfy Expression 13, and θ [i] satisfy Expression 14.

【0016】[0016]

【数13】 (Equation 13)

【0017】[0017]

【数14】 すると、10及び11によって得られる(x[n]、
y[n])に15で示される補正値C[n]を乗じた値は、
求める理論値(x'、y')に収束していくというもので
ある。
[Equation 14] Then, (x [n], obtained by Expression 10 and Expression 11,
y [n]) multiplied by the correction value C [n] shown in Equation 15 is
It converges on the theoretical value (x ', y') to be obtained.

【0018】[0018]

【数15】 即ち、大きなnに対して、16が成り立つ。(Equation 15) That is, Equation 16 holds for a large n.

【0019】[0019]

【数16】 この手法は、回転しようとする任意の角度(θ)を2の
べき乗と関連する所定の離散角度の和又は差に分解する
(例えば、θ=θ1−θ2+θ3・・・)ことにより、複
雑な2次元回転演算を単純な2進数の演算(桁シフトと
加減算)の繰り返しに置き換えるものである。
(Equation 16) This technique breaks down any angle (θ) to be rotated into a sum or difference of predetermined discrete angles associated with powers of two (eg, θ = θ1−θ2 + θ3,. The dimensional rotation operation is replaced with the repetition of a simple binary operation (digit shift and addition / subtraction).

【0020】図7は、CORDIC手法による2次元回
転演算をハードウェアで実現した場合の構成を示すブロ
ック図である。この従来装置は、大きく分けて、離散角
度回転演算部710と制御部720からなり、図示され
ていないクロックに同期して動作する。即ち、セレクタ
711、712は、最初のクロックにおいては入力デー
タx[0]、y[0]を、次のクロックからは加減算器71
7、718の出力データを次のレジスタ713、712
に送る。
FIG. 7 is a block diagram showing a configuration in a case where the two-dimensional rotation operation by the CORDIC technique is realized by hardware. This conventional device is roughly divided into a discrete angle rotation calculation unit 710 and a control unit 720, and operates in synchronization with a clock (not shown). That is, the selectors 711 and 712 output the input data x [0] and y [0] in the first clock, and adder / subtractor 71 from the next clock.
7 and 718 to the next registers 713 and 712
Send to

【0021】レジスタ713、714から直接に、及び
シフタ715、716を経て送られてきた2組のデータ
は、それぞれ加減算器717、718で演算される。加
減算器717は10の演算に対応し、加減算器718
11の演算に対応する。制御部720は、LUT
(ルックアップテーブル)721、Z算出部722及び
判定部723からなり、LUT721は予め14を満
たす多くの角度θ[i]を記憶しているROMであり、Z
算出部は12のz[i]を算出する演算器であり、判定
部723は12のδ[i]が1であるべきか−1である
べきかを判定する比較器である。
Two sets of data sent directly from the registers 713 and 714 and via the shifters 715 and 716 are calculated by adders / subtracters 717 and 718, respectively. The adder / subtractor 717 corresponds to the operation of Expression 10, and the adder / subtractor 718
Corresponds to the operation of Expression 11. The control unit 720 includes an LUT
(Lookup table) 721, a Z calculation unit 722, and a determination unit 723, and the LUT 721 is a ROM that stores many angles θ [i] that satisfy Expression 14 in advance.
The calculation unit is an arithmetic unit that calculates z [i] in Expression 12, and the determination unit 723 is a comparator that determines whether δ [i] in Expression 12 should be 1 or −1.

【0022】加減算器717、718の演算機能(加算
又は減算)は、制御部からの指示によってクロックごと
に動的に決定される。これによって、1クロックごと
に、10、11及び12の演算が1回ずつ実行さ
れることになる。なお、演算の繰り返し回数を入力デー
タの語長に等しくしておくことで適度な演算精度が確保
されることが、CORDIC手法において明らかにされ
ている(例えば、G. L. Haviland他,''A CORDICArithme
tic Processor Chip,'' IEEE Trans. Comput., C-29, p
p.68-78, 1980.)。例えば、16ビットの演算語長を有
する入力データに対して2次元回転演算を実行する場合
には、10、11及び12をそれぞれ16回繰り
返せばよい。
The arithmetic function (addition or subtraction) of the adders / subtracters 717 and 718 is dynamically determined for each clock according to an instruction from the control unit. Thus, for each clock, Equation 10, so that the operation of Equation 11 and Equation 12 is executed once. It has been clarified in the CORDIC method that appropriate arithmetic accuracy is ensured by making the number of repetitions of the arithmetic equal to the word length of the input data (for example, GL Haviland et al., “A CORDICArithme
tic Processor Chip, '' IEEE Trans. Comput., C-29, p
p.68-78, 1980.). For example, when performing a 2-dimensional rotation operation on the input data with the operation word length of 16 bits, Equation 10, Equation 11 and Equation 12 may be repeated each 16 times.

【0023】以下の表1は、16ビット固定小数点の入
力データ(x,y)=(50,50)を、CORDIC
手法を用いて、θ=−π/16として2次元回転演算し
た場合の演算過程を示す。
Table 1 below shows that the 16-bit fixed-point input data (x, y) = (50, 50) is
A calculation process when a two-dimensional rotation calculation is performed with θ = −π / 16 using the technique will be described.

【0024】[0024]

【表1】 なお、表1に示された数値は、16ビットデータを小数
点の位置が下位から8ビット目とする固定小数点データ
として表現したものである。この表から判るように、最
下段に示された(x[16],y[16])に定数C[16](=0.6
072529…)を乗じた値(58.787303,39.286418)は、求
めるべき理論値(58.793780,39.284748)によく一致し
ていることが判る。
[Table 1] Note that the numerical values shown in Table 1 represent 16-bit data as fixed-point data in which the position of the decimal point is the eighth bit from the lower order. As can be seen from this table, the constant (x [16], y [16]) shown at the bottom is a constant C [16] (= 0.6
072529 ...) (58.787303, 39.286418) is well in agreement with the theoretical value to be obtained (58.793780, 39.284748).

【0025】[0025]

【発明が解決しようとする課題】しかしながら、上記の
従来手法による2次元回転演算を用いたDCT及び逆D
CTは、一定量の演算回数を削減したものの、今日の大
容量化した画像データをリアルタイムで圧縮伸長する技
術としては十分に高速なものとは言えないという問題点
がある。また、これらの演算をハードウェアで実現した
場合には回路が大規模化するという問題点がある。
However, DCT using the two-dimensional rotation operation and the inverse D
Although the CT has reduced the number of calculations by a certain amount, it has a problem that it cannot be said to be a sufficiently high-speed technique for compressing and expanding real-time large-volume image data in real time. Further, when these operations are realized by hardware, there is a problem that a circuit becomes large-scale.

【0026】即ち、上記第1の従来手法では、2次元回
転演算で必要とされていた4回の乗算を3回の乗算に削
減にした過ぎず、依然として乗算という複雑な演算が必
要とされるために、この手法によって削減された時間で
は十分とは言えない。一方、上記第2の従来手法では、
演算精度を確保するには入力データの語長に等しい回数
のシフトや加減算を実行しなければならないために、扱
うデータの語長が長い場合には、非常に多くの回数のシ
フト及び加減算が必要とされ、1回の2次元回転演算に
要する時間が長くなってしまう。
That is, in the first conventional method, the four multiplications required in the two-dimensional rotation operation are merely reduced to three multiplications, and a complicated operation called multiplication is still required. Therefore, the time saved by this method is not enough. On the other hand, in the second conventional method,
Shifts and additions / subtractions must be performed a number of times equal to the word length of the input data to ensure the operation accuracy. If the word length of the data to be handled is long, a very large number of shifts / additions / subtractions are required. Therefore, the time required for one two-dimensional rotation calculation becomes long.

【0027】また、図7に示されるように、第2の従来
手法をハードウェアで実現した場合においては、ルック
アップテーブルや比較器等が必要とされるので、これら
の回路を実現するのに多くのゲート数が費やされ、DC
TのLSI化が困難となる。さらに、画像圧縮伸長にお
いては2次元画像データを8×8個の画素ブロックに分
割し各ブロックについてDCT/逆DCTを順次繰り返
すが、このようなハードウェア構成では、16ビットの
データを扱うのであれば16クロックによって1組の入
力データに対する2次元回転演算が終了するので、例え
ば、48組の入力データに対して2次元回転演算を繰り
返す場合には768クロックという多くの時間が必要と
されてしまう。
As shown in FIG. 7, when the second conventional method is implemented by hardware, a look-up table, a comparator, and the like are required. Many gates are spent and DC
It becomes difficult to make T an LSI. Furthermore, in image compression / expansion, two-dimensional image data is divided into 8 × 8 pixel blocks, and DCT / inverse DCT is sequentially repeated for each block. However, such a hardware configuration handles 16-bit data. For example, a two-dimensional rotation operation on one set of input data is completed by 16 clocks. For example, when repeating a two-dimensional rotation operation on 48 sets of input data, a long time of 768 clocks is required. .

【0028】一方、この第2の従来手法をソフトウェア
で実現した場合においては、12の演算結果が出力さ
れてからでないと10及び11の演算の種類(加算
又は減算)を決定することができない、即ち、1回の演
算毎に条件判断が必要とされるため、このソフトウェア
を実行するCPU等が有するパイプラインの機能が十分
に活かされない。その結果、高速化が妨げられるという
問題点を有している。
On the other hand, that the second in case of realizing a conventional technique in software, for determining the calculation result of Equation 12 is not from the output type of the operation of formula 10 and formula 11 (addition or subtraction) That is, since the condition judgment is required for each operation, the function of the pipeline of the CPU or the like executing this software cannot be fully utilized. As a result, there is a problem that speeding up is hindered.

【0029】そこで、本発明はかかる問題点に鑑みてな
されたものであり、従来の2次元回転演算で必要とされ
る乗算をシフトと加減算のみで行うと共に、CORDI
C手法で必要とされる演算回数よりも少ない回数のシフ
トと加減算で2次元回転演算を行うことができる高速な
離散余弦変換及び逆離散余弦変換装置を提供することを
第1の目的とする。
Accordingly, the present invention has been made in view of such a problem, and the multiplication required in the conventional two-dimensional rotation operation is performed only by shift and addition / subtraction, and the CORDI
To provide a C technique fast discrete cosine transform and inverse discrete cosine varying retrofit location capable of performing two-dimensional rotation operation with a small number of shift and subtraction than the number of calculations required in the first object .

【0030】また、本発明の第2の目的は、従来のCO
RDIC手法をハードウェアで実現する際に必要とされ
たルックアップテーブルや比較器等が必要とされない、
即ち小規模な回路で構成することができる離散余弦変換
及び逆離散余弦変換装置を提供することである。また、
本発明の第3の目的は、連続する入力データに対して定
角度の2次元回転演算を繰り返す場合においては、1組
の入力データに対する2次元回転演算につき必要とされ
るクロック数がCORDIC手法の場合よりも少なくて
済む高速な離散余弦変換及び逆離散余弦変換装置を提供
することである。
Further, a second object of the present invention is to provide a conventional CO 2
Look-up tables, comparators, and the like required when implementing the RDIC method with hardware are not required.
That is, an object of the present invention is to provide a discrete cosine transform and inverse discrete cosine transform device which can be constituted by a small-scale circuit. Also,
A third object of the present invention is to provide a method for repeating a constant-angle two-dimensional rotation operation on continuous input data, in which the number of clocks required for the two-dimensional rotation operation on one set of input data is determined by the CORDIC method. An object of the present invention is to provide a high-speed discrete cosine transform and inverse discrete cosine transform device which requires less than the case.

【0031】[0031]

【課題を解決するための手段】この課題を解決するため
に本発明は、DCT/逆DCTを所定角度(θ)の2次
元回転演算を用いて行う方法であって、2次元回転演算
を行う対象となる入力データ(x[0],y[0])を算出す
るステップと、その入力データ(x[0],y[0])に対し
て、予め求められたδ[i]、p[i]及びq[i]を用いて表
される5に示される離散角度の回転演算をn回実行す
るステップと、そのステップにより最終的に得られた出
力データ(x[n],y[n])の補正を行うステップとから
なることを特徴とする。
SUMMARY OF THE INVENTION In order to solve this problem, the present invention is a method for performing DCT / inverse DCT using a two-dimensional rotation operation at a predetermined angle (θ). A step of calculating target input data (x [0], y [0]); and, for the input data (x [0], y [0]), δ [i], p A step of executing a rotation operation at a discrete angle represented by Expression 5 expressed by using [i] and q [i] n times, and output data (x [n], y finally obtained by the step) [n]) performing the correction.

【0032】この方法によれば、任意の角度ではなく、
予め定められた角度の回転演算を実行するのに必要な最
低限のステップが2〜4に基づいて予め求められて
おり、又それらのステップはシフトと加減算のみで構成
されるため、従来手法で必要とされた乗算の回数が減少
しかつ必要な処理ステップ数も減少する。また、この方
法による2次元回転演算を離散角度の回転演算を順次行
うパイプラインの構成とすることにより、従来のCOR
DIC手法で必要とされたルックアップテーブルや比較
器等が不要になると共に少ない回路規模で高速かつコン
パクトなDCT/逆DCT装置が実現される。
According to this method, instead of an arbitrary angle,
Since the minimum steps required to execute the rotation operation at a predetermined angle are obtained in advance based on Equations ( 2) to ( 4), and since these steps are constituted only by shift and addition / subtraction, the related art The number of multiplications required by the technique is reduced and the number of processing steps required is also reduced. Further, by adopting a pipeline configuration in which the two-dimensional rotation operation according to this method sequentially performs the rotation operation at discrete angles, the conventional COR can be used.
A look-up table, a comparator, and the like required by the DIC method become unnecessary, and a high-speed and compact DCT / inverse DCT device with a small circuit scale is realized.

【0033】[0033]

【発明の実施の形態】1次元N次のDCT装置の場合で
あれば、以下の順に従って、その構成(処理ステップ)
を決定すればよい。 (1)上述のLoefflerらの理論により、1次元N次のD
CTに必要な2次元回転演算の種類(角度)を特定し、
さらに、特定した各演算を実現する構成を以下の順に決
定する。 (2)特定した角度ごとに、2、3及び4を満た
すn個のδ(δ[0]からδ[n-1])、p(p[0]からp[n-
1])及びq(q[0]からq[n-1])を決定する。
BEST MODE FOR CARRYING OUT THE INVENTION In the case of a one-dimensional N-order DCT device, its configuration (processing step) is performed in the following order.
Should be determined. (1) According to the above-mentioned theory of Loeffler et al.
Specify the type (angle) of the two-dimensional rotation calculation required for CT,
Further, a configuration for realizing each specified operation is determined in the following order. (2) in each specific angular equation 2, of n satisfying Equations 3 and 4 [delta] ([delta] [0] from δ [n-1]), p from p (p [0] [n-
1]) and q (q [0] to q [n-1]) are determined.

【0034】この決定に際しては、より小さいnの値に
おいてδ[i]、p[i]及びq[i]が2、3、4を満
たすこと、また、p[i+1]−p[i]≠1、q[i+1]−q[i]
≠1を満たすことが好ましい。 (3)決定されたn、δ[i]、p[i]及びq[i]に基づ
き、5の演算を繰り返すパイプラインの構成を決定す
る。
[0034] In this determination, [delta] [i] at a value of less than n, p [i] and q [i] is Formula 2, Formula 3, to satisfy equation 4, also, p [i + 1] - p [i] ≠ 1, q [i + 1] −q [i]
It is preferable to satisfy # 1. (3) Based on the determined n, δ [i], p [i], and q [i], determine the configuration of the pipeline that repeats the operation of Expression 5.

【0035】即ち、パイプラインは、i=1〜n−1の
それぞれに対応する5の演算を実行するn個のステー
ジからなる。各ステージは、5の演算を1回実行する
ものであるので、x[i]及びy[i]を格納する2個のレジ
スタとδ[i]の値によって決まる2個の加算器又は減算
器から構成することができる。p[i]及びq[i]による2
のべき乗の演算(シフトダウン)は、レジスタと加算器
又は減算器との配線の工夫(対応する桁をずらして接続
する)により実現すればよい。
That is, the pipeline is composed of n stages for executing the operation of Expression 5 corresponding to each of i = 1 to n-1. Since each stage executes the operation of Equation 5 once, two registers for storing x [i] and y [i] and two adders or subtractors determined by the value of δ [i] It can be composed of vessels. 2 by p [i] and q [i]
The exponentiation operation (shift down) may be realized by devising a wiring between the register and the adder or the subtractor (connecting by shifting the corresponding digit).

【0036】以上のようにして決定された構成を備える
DCT装置は、N個の入力画素データに対して高速にD
CTを実行する。
The DCT device having the configuration determined as described above can perform high-speed D.sub.D processing on N input pixel data.
Perform CT.

【0037】[0037]

【実施例】以下、本発明に係るDCT装置について図面
を用いて詳細に説明する。 (第1実施例) 第1実施例は、1次元8次のDCTを高速に行うDCT
装置に関するものである。 (全体の構成及び機能) 図1は、本装置の構成を示すブロック図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a DCT device according to the present invention will be described in detail with reference to the drawings. (First Embodiment) The first embodiment is a DCT that performs one-dimensional 8th-order DCT at high speed.
It concerns the device. (Overall Configuration and Function) FIG. 1 is a block diagram showing the configuration of the present apparatus.

【0038】本装置は、前置処理部101、3個の回転
演算部102〜104及び6個の補正部105〜110
からなる。f[0]〜f[7]は本装置への入力画素データ、
F[0]〜F[7]は本装置の出力であるDCT係数を示す。
図2は、本装置が行う演算内容を示す計算フローグラフ
であり、従来手法における図6に示された計算フローグ
ラフに対応する。
This apparatus comprises a preprocessing unit 101, three rotation calculation units 102 to 104, and six correction units 105 to 110.
Consists of f [0] to f [7] are input pixel data to the apparatus,
F [0] to F [7] indicate DCT coefficients which are outputs of the present apparatus.
FIG. 2 is a calculation flow graph showing the operation performed by the present apparatus, and corresponds to the calculation flow graph shown in FIG. 6 in the conventional method.

【0039】前置処理部101は、加算器、減算器、セ
レクタ及びレジスタ等からなり、図2に示された加減算
201を行う。この前置処理部101での演算内容は、
図7及び図2から判るように従来手法の場合と同様であ
り、具体的には、8個の入力画素データf[0]〜f[7]か
ら、単純な加減算等の演算によって、DCT係数F[0]
及びF[4]を算出したり、各回転演算部102〜104へ
の入力データを算出したりする。
The pre-processing unit 101 comprises an adder, a subtractor, a selector, a register and the like, and performs the addition / subtraction 201 shown in FIG. The content of the operation in the preprocessing unit 101 is as follows:
As can be seen from FIGS. 7 and 2, this is the same as the case of the conventional method. Specifically, the DCT coefficient is calculated from eight pieces of input pixel data f [0] to f [7] by a simple operation such as addition and subtraction. F [0]
And F [4], and input data to each of the rotation calculation units 102 to 104.

【0040】第1回転演算部102、第2回転演算部1
03及び第3回転演算部104は、それぞれ、−2π/
16、−π/16、−5π/16という固定角度の2次
元回転演算を行うものであり、図2に示されたR'(−
2π/16)、R'(−π/16)、R'(−5π/1
6)に相当する。なお、これら3種類の回転演算部10
2〜104の詳細な構成及び動作については後述する。
The first rotation calculator 102 and the second rotation calculator 1
03 and the third rotation operation unit 104 are respectively -2π /
The two-dimensional rotation operation is performed at fixed angles of 16, −π / 16, and −5π / 16, and R ′ (−−) shown in FIG.
2π / 16), R ′ (− π / 16), R ′ (− 5π / 1
6). Note that these three types of rotation calculation units 10
Detailed configurations and operations of 2 to 104 will be described later.

【0041】6個の補正部105〜110は、乗算器等
からなり、それぞれ、図2に示された乗算205〜21
0を行う。これら6種類の補正部105〜110での演
算内容は、図7及び図2から判るように従来手法の場合
と乗数が異なるだけである。なお、図2に示されたk
2、k1、k5は、すべて定数であり、以下の値である。 k2=0.892658、 k1=0.968133、 k5=0.684574 これらの意義については後述する。 (回転演算部の構成・動作) 以上のように構成された本装置において、従来手法によ
る装置と大きく異なる構成部、即ち、3種の回転演算部
102〜104の詳細な構成及び動作について説明す
る。なお、これら各回転演算部102〜104は、同種
類の回路で構成されるので、ここでは第2回転演算部1
03、即ち、−π/16の角度の回転演算を高速に行う
演算部について説明する。
Each of the six correction units 105 to 110 is composed of a multiplier or the like, and each of the six correction units 105 to 110 shown in FIG.
Perform 0. As can be seen from FIGS. 7 and 2, the contents of the calculations performed by these six types of correction units 105 to 110 are different from the conventional method only in the multiplier. Note that k shown in FIG.
2, k1 and k5 are all constants and have the following values. k2 = 0.892658, k1 = 0.968133, k5 = 0.684574 The significance of these will be described later. (Structure and Operation of Rotation Calculation Unit) The detailed configuration and operation of the rotation calculation units 102 to 104 of the present apparatus configured as described above, which are significantly different from those of the apparatus according to the related art, will be described. . Since each of the rotation calculation units 102 to 104 is configured by the same type of circuit, the second rotation calculation unit 1 is used here.
03, that is, a calculation unit that performs a rotation calculation at an angle of -π / 16 at a high speed will be described.

【0042】図3は、第2回転演算部103の構成を示
す回路図である。第2回転演算部103は、大きく分け
て、5段の離散角度回転演算部340〜344と出力バ
ッファ345からなり、上段の離散角度回転演算部の結
果が図示されていないクロックによって次段に伝搬され
るパイプラインの構成となっている。
FIG. 3 is a circuit diagram showing the configuration of the second rotation calculation unit 103. The second rotation operation unit 103 is roughly divided into five stages of discrete angle rotation operation units 340 to 344 and an output buffer 345, and the result of the upper stage discrete angle rotation operation unit is propagated to the next stage by a clock (not shown). It has a pipeline configuration.

【0043】各段の離散角度回転演算部は、2個の16
ビットレジスタREGx[i]、REGy[i]と、加算器AD
Dx[i](又はADDy[i])と、減算器SUBy[i](又は
SUBx[i])とからなり、出力バッファ345は、2個
の16ビットレジスタREGx[5]、REGy[5]からな
る。なお、図中の配線は、基本的には16本のバスであ
り対応する桁どうしが接続されるが、配線の横に数値が
示されている場合は、その配線は、その数値の符号に対
応する方向に、その数値の桁だけずらして接続される。
例えば、レジスタREGx[0]と減算器SUBy[0]とを接
続する配線の横には"−2"が記されているが、これは、
レジスタREGx[0]の出力データが2ビットだけシフト
ダウンされて減算器SUBy[0]に入力されるように接続
されることを意味する。
The discrete angle rotation operation section of each stage includes two 16
Bit registers REGx [i], REGy [i] and adder AD
Dx [i] (or ADDy [i]) and a subtractor SUBy [i] (or SUBx [i]), and the output buffer 345 has two 16-bit registers REGx [5] and REGy [5]. Consists of The wiring in the figure is basically 16 buses, and the corresponding digits are connected. When a numerical value is shown beside the wiring, the wiring is indicated by the sign of the numerical value. In the corresponding direction, the connection is shifted by the digit of the numerical value.
For example, “−2” is written beside the wiring connecting the register REGx [0] and the subtractor SUBy [0].
This means that the output data of the register REGx [0] is connected to be shifted down by 2 bits and input to the subtractor SUBy [0].

【0044】次に、以上のように構成された第2回転演
算部103によって、16ビットの演算精度を確保しつ
つ、−π/16の角度の2次元回転演算が行われること
を説明する。先ず、第1番目のクロックにより、前置処
理部101から出力された2個の入力データx[0]、y
[0]がレジスタREGx[0]、REGy[0]に格納される。
Next, a description will be given of how the second rotation calculation unit 103 configured as described above performs a two-dimensional rotation calculation of an angle of -π / 16 while ensuring 16-bit calculation accuracy. First, two input data x [0], y output from the pre-processing unit 101 by the first clock.
[0] is stored in the registers REGx [0] and REGy [0].

【0045】次に、第2番目のクロックにより、加算器
ADDx[0]及び減算器SUBy[0]において以下の演算が
行われ、その結果がレジスタREGx[1]及びREGy[1]
に格納される。 REGx[1]=REGx[0]+2ー2・REGy[0] REGy[1]=REGy[0]−2ー2・REGx[0] 同様して、第3番目のクロックにより、減算器SUBx
[1]及び加算器ADDy[1]において以下の演算が行わ
れ、その結果がレジスタREGx[2]及びREGy[2]に格
納される。
Next, the following operation is performed in the adder ADDx [0] and the subtractor SUBy [0] by the second clock, and the result is stored in the registers REGx [1] and REGy [1].
Is stored in REGx [1] = REGx [0] + 2-2−REGy [0] REGy [1] = REGy [0] −2−REGx [0] Similarly, the subtractor SUBx is generated by the third clock.
The following operation is performed in [1] and the adder ADDy [1], and the result is stored in the registers REGx [2] and REGy [2].

【0046】REGx[2]=REGx[1]−2ー4・REGy
[1] REGy[2]=REGy[1]+2ー4・REGx[1] 以下、同様にして、第6番目のクロックが経過した時点
において、この第2回転演算部103による最終結果R
EGx[5]、REGy[5]がレジスタREGx[5]、REGy
[5]に格納される。
REGx [2] = REGx [1] -2-4 · REGy
[1] REGy [2] = REGy [1] + 2−4 · REGx [1] Hereinafter, similarly, when the sixth clock has elapsed, the final result R of the second rotation operation unit 103 is obtained.
EGx [5] and REGy [5] are the registers REGx [5] and REGy
Stored in [5].

【0047】以下の表2及び表3は、入力データ(x
[0]、y[0])として(50,50)が与えられた場合に
おける、レジスタREGx[0]〜REGx[5]及びREGy
[0]〜REGx[5]に保持される値(16進表示による)
のクロック毎の変化を示す。
Tables 2 and 3 below show the input data (x
Registers REGx [0] to REGx [5] and REGy when (50, 50) is given as [0], y [0])
Value stored in [0] to REGx [5] (in hexadecimal notation)
Shows the change for each clock.

【0048】[0048]

【表2】 [Table 2]

【0049】[0049]

【表3】 なお、表中の"−"は、この入力データ(50,50)と
は異なる他の入力データについての値が保持されている
ことを示している。また、表2の実数表示欄は、左欄に
表示された16ビットデータを、小数点の位置を下位か
ら8ビット目とする16ビット固定小数点データとして
表現した値(10進表示による)を示している。
[Table 3] Note that "-" in the table indicates that values for other input data different from the input data (50, 50) are held. Further, the real number display column in Table 2 shows a value (in decimal notation) that represents the 16-bit data displayed in the left column as 16-bit fixed-point data with the decimal point position being the eighth bit from the lower order. I have.

【0050】この第2回転演算部103において最終的
に得られた結果(REGx[5],REGy[5])はそれぞれ
第3補正部107及び第4補正部108に送られて√2
・k1倍されるが、(REGx[5],REGy[5])にk1を
乗じた値は、求めるべき理論値(x',y')に近似した
値となる。これらの値と従来のCORDIC手法による
値C・(x[5],y[5])とを比較すると以下の通りであ
る。
The results (REGx [5], REGy [5]) finally obtained in the second rotation calculation section 103 are sent to the third correction section 107 and the fourth correction section 108, respectively, and
-Although multiplied by k1, the value obtained by multiplying (REGx [5], REGy [5]) by k1 is a value approximating the theoretical value (x ', y') to be obtained. A comparison between these values and the value C · (x [5], y [5]) according to the conventional CORDIC method is as follows.

【0051】 (x',y') =(58.793780,39.284748) k1・(REGx[5],REGy[5]) =(58.791401,39.288812) C(x[16],y[16]) =(58.787303,39.286418) この比較から判るように、本装置により得られたデータ
は、CORDIC手法によるデータよりも理論値に近
い。即ち、本装置は、わずか5回の演算しか実行してい
ないにも拘らず、16回の演算を行うCORDIC手法
による場合よりも精度の高い2次元回転演算を実行した
ことになる。
(X ′, y ′) = (58.793780, 39.284748) k1 · (REGx [5], REGy [5]) = (58.791401, 39.288812) C (x [16], y [16]) = (58.787303) , 39.286418) As can be seen from this comparison, the data obtained by this apparatus is closer to the theoretical value than the data obtained by the CORDIC method. In other words, the present apparatus has executed a two-dimensional rotation operation with higher accuracy than the CORDIC method of performing the operation 16 times, although the apparatus has executed only the operation 5 times.

【0052】また、この第2回転演算部103の構成か
ら明らかなように、図7に示されたCORDIC手法で
必要とされたLUT721、z算出部722及び判定部
723に相当する構成要素が不要となっている。さら
に、上記例においては、6個のクロックにより、1組の
入力データに対する2次元回転演算が終了したが、多数
組の入力データが次々に連続して与えられる実際の画像
圧縮伸長処理の場合においては、パイプラインの効果に
より、1組の入力データの2次元回転演算に必要とされ
るクロック数は、1に近づく。この点、1組の入力デー
タの回転演算につき常に16個のクロックが必要とされ
る従来の装置と大きく異なる。
As is apparent from the configuration of the second rotation calculation unit 103, components corresponding to the LUT 721, the z calculation unit 722, and the determination unit 723 required by the CORDIC method shown in FIG. It has become. Further, in the above example, the two-dimensional rotation operation for one set of input data is completed by six clocks. However, in the case of an actual image compression / decompression process in which a large number of sets of input data are successively provided. The number of clocks required for the two-dimensional rotation operation of one set of input data approaches 1 due to the pipeline effect. In this regard, this is greatly different from a conventional device that always requires 16 clocks for the rotation operation of one set of input data.

【0053】もっとも、CORDIC手法をハードウェ
アで実現する他の方法として、図7における制御部72
0をなくし、離散角度回転演算部710を16段にして
直列にパイプラインとして接続する構成とすることも考
えられる。しかし、このような構成であっても、その演
算速度と回路のコンパクトさの点において、1個のシフ
タをも必要とせず、かつ、5段の加減算回路のみで高精
度の2次元回転演算を実行する本演算部103には到底
及ばないことは言うまでもない。 (理論的考察) 次に、本発明に係るDCT装置の第2回転演算部103
の構成を図3に示されたように決定したプロセス及び他
の回転演算部102、104の構成について説明する。
As another method for realizing the CORDIC method by hardware, the control unit 72 shown in FIG.
It is also conceivable to adopt a configuration in which 0 is eliminated and the discrete angle rotation operation unit 710 is connected in series as a pipeline in 16 stages. However, even with such a configuration, in terms of the operation speed and the compactness of the circuit, a single shifter is not required, and a high-precision two-dimensional rotation operation can be performed using only a 5-stage addition / subtraction circuit. Needless to say, it is far from the execution unit 103 to be executed. (Theoretical Consideration) Next, the second rotation operation unit 103 of the DCT device according to the present invention
The process of determining the configuration of FIG. 3 as shown in FIG. 3 and the configuration of the other rotation calculation units 102 and 104 will be described.

【0054】先ず、「2、3、4を満たすように
定められたn個のδ(δ[0]からδ[n-1])、p(p[0]
からp[n-1])及びq(q[0]からq[n-1])を用いて、
5の演算をn回繰り返すことで得られる(x[n]、y
[n])は、本来求めるべき理論値(x',y')と17
に示される関係にある(但し、x[0]、y[0]は、18
に示される関係を有するとする。)」ことを証明する。
[0054] First, "Formula 2, Formula 3, ([delta] from δ [0] [n-1 ]) of n defined to satisfy equation 4 δ, p (p [0 ]
To p [n-1]) and q (q [0] to q [n-1]),
(X [n], y obtained by repeating the operation of Equation 5 n times)
[n]) is the theoretical value (x ′, y ′) that should be originally obtained and Equation 17
(However, x [0] and y [0] are expressed by Expression 18)
Has the relationship shown in ) ".

【0055】[0055]

【数17】 [Equation 17]

【0056】[0056]

【数18】 まず、2の左辺における減算値をΔθとおく。即ち、(Equation 18) First, the subtraction value on the left side of Expression 2 is set to Δθ. That is,

【0057】[0057]

【数19】 Δθ≒0であるから、理論値(x',y')は、以下の通
り表せる。
[Equation 19] Since Δθ ≒ 0, the theoretical value (x ′, y ′) can be expressed as follows.

【0058】[0058]

【数20】 20は、1を用いて変形すると、(Equation 20) Equation 20 can be transformed using Equation 1 to

【0059】[0059]

【数21】 続いて、18、19より、(Equation 21) Then, Equation 18, from Equation 19,

【0060】[0060]

【数22】 n個の行列の積に分解すると、(Equation 22) Decomposing into the product of n matrices,

【0061】[0061]

【数23】 δ[i]=±1より、(Equation 23) From δ [i] = ± 1,

【0062】[0062]

【数24】 3、4より、(Equation 24) Equation 3, from the formula 4,

【0063】[0063]

【数25】 k[i]を整理し、(Equation 25) Organize k [i],

【0064】[0064]

【数26】 5、6より、(Equation 26) Equation 5, from Equation 6,

【0065】[0065]

【数27】 よって、17が成り立つことが証明された。次に、各
回転演算部102〜104の具体的な回路構成を決定す
るプロセスについて説明する。各回転演算部102〜1
04の各段を構成する離散角度回転演算部は、5に示
された演算を実行するものである。従って、θ=−2π
/16、−π/16及び−5π/16の3種類の角度に
ついての必要な全てのδ(δ[0]からδ[n-1])、p(p
[0]からp[n-1])及びq(q[0]からq[n-1])の値を決
定することにより、各回転演算部102〜104の具体
的な回路構成が一義的に導き出せる。
[Equation 27] Therefore, it has been proved that Expression 17 holds. Next, a process for determining a specific circuit configuration of each of the rotation calculation units 102 to 104 will be described. Each rotation calculation unit 102-1
The discrete angle rotation calculation unit constituting each stage of No. 04 executes the calculation shown in Expression 5. Therefore, θ = −2π
Δ, all necessary δ (δ [0] to δ [n−1]) and p (p for three types of angles of −π / 16 and −5π / 16
By determining the values of [0] to p [n-1]) and q (q [0] to q [n-1]), the specific circuit configuration of each of the rotation calculation units 102 to 104 is univocal. Can be derived.

【0066】以下、必要なn個のδ[i]、p[i]及びq
[i]を具体的に決定するプロセスについて説明する。(S
tep1)まず、少なくともCORDIC手法による演算
精度を確保するために、許容誤差角度Eを、CORDI
C手法における許容誤差角度であるz[16]の絶対値(=
0.000005)と同一の値に設定する。
Hereinafter, the necessary n δ [i], p [i] and q
A process for specifically determining [i] will be described. (S
tep1) First, in order to secure at least calculation accuracy by the CORDIC method, the allowable error angle E is set to CORDI.
Absolute value of z [16] which is an allowable error angle in the C method (=
0.000005).

【0067】即ち、E=0.000005 とする。(Step2)
次に、k[i] = cosθ[i] とする。このようにk[i]を設
定することで、3、4がそれぞれ28、29に
簡略化され、CORDIC手法との対比を明瞭にするこ
とができるからである。
That is, E = 0.000005. (Step 2)
Next, let k [i] = cosθ [i]. By setting this way k [i], equation 3, since Equation 4 are each equation 28 is simplified to Equation 29, it is possible to clarify the comparison with CORDIC technique.

【0068】[0068]

【数28】 [Equation 28]

【0069】[0069]

【数29】 なお、29より、全てのiについて、q[i]=0とな
る。(Step3)続いて、 Δθ[0](=|θ−δ[0]・θ[0]|) を最小にするδ[0]及びθ[0]を決定する。
(Equation 29) From Expression 29, q [i] = 0 for all i. (Step 3) Subsequently, δ [0] and θ [0] that minimize Δθ [0] (= | θ−δ [0] · θ [0] |) are determined.

【0070】δ[i]=±1及び28の条件を考慮する
と、例えば、第2回転演算部103の場合(θ=−π/
16)であれば、θ[0]=tanー12ー2 かつ δ[0]=−1
とすることで、Δθ[0]を最小にできることが導き出
せる。以上より、第2回転演算部103に関して、p
[0](=−2)、q[0](=0)及びδ[0](=−1)が
決定された。(Step4)同様にして、 Δθ[1](=|θ−δ[0]・θ[0]−δ[1]・θ[1]|) を最小にするδ[1]及びθ[1]を決定する。
Considering δ [i] = ± 1 and the condition of Expression 28, for example, in the case of the second rotation operation unit 103 (θ = −π /
16), θ [0] = tan-12−2 and δ [0] = − 1
Thus, it can be derived that Δθ [0] can be minimized. As described above, regarding the second rotation operation unit 103, p
[0] (= -2), q [0] (= 0) and δ [0] (= -1) were determined. (Step 4) Similarly, δ [1] and θ [1] that minimize Δθ [1] (= | θ−δ [0] · θ [0] −δ [1] · θ [1] |) To determine.

【0071】第2回転演算部103の場合であれば、θ
[1]=tanー12ー4 かつ δ[0]=1とすることで、Δθ
[1]を最小にできることが導き出せる。従って、p[1]
(=−4)、q[1](=0)及びδ[1](=1)が決定さ
れた。(Step5)以上のようにして、i=0、1、2・
・・に対するp[i]、q[i]及びδ[i]を順次決定してい
くと、第2回転演算部103の場合であれば、i=4の
ときに、初めて、 Δθ[i]<E を満たすこととなり、この決定プロセスは終了する。
In the case of the second rotation calculation unit 103, θ
By setting [1] = tan-12-4 and δ [0] = 1, Δθ
It can be derived that [1] can be minimized. Therefore, p [1]
(= -4), q [1] (= 0) and δ [1] (= 1) were determined. (Step 5) As described above, i = 0, 1, 2,.
.. P [i], q [i], and δ [i] are sequentially determined. In the case of the second rotation operation unit 103, when i = 4, Δθ [i] is obtained for the first time. <E 2, and the determination process ends.

【0072】このようにして決定されるδ[i]、p[i]等
の値を以下の表4、表5及び表6に示す。
The values of δ [i], p [i], etc. determined in this way are shown in Tables 4, 5 and 6 below.

【0073】[0073]

【表4】 [Table 4]

【0074】[0074]

【表5】 [Table 5]

【0075】[0075]

【表6】 表4は第1回転演算部102(θ=−2π/16)、表
5は第2回転演算部103(θ=−π/16)、表6は
第3回転演算部102(θ=−5π/16)の値に対応
する。なお、これらの表には、k[i]及び6で定義さ
れるkの値も併せて示している。
[Table 6] Table 4 shows the first rotation calculator 102 (θ = −2π / 16), Table 5 shows the second rotation calculator 103 (θ = −π / 16), and Table 6 shows the third rotation calculator 102 (θ = −5π). / 16). In these tables, k [i] and the value of k defined by Equation 6 are also shown.

【0076】以上の説明より、第2回転演算部103が
図3に示された回路構成となることが明らかにされた。
また、図3に示された第2回転演算部103の構成と表
4〜表6に示されたδ[i]、p[i]の値により(なお、q
[i]は、全てゼロである。)、第1回転演算部102及
び第3回転演算部104の回路構成が容易に類推でき
る。即ち、第1回転演算部102と第2回転演算部10
3はそれぞれ5段のパイプラインの構成となり、第3回
転演算部104は6段のパイプラインの構成となる。
From the above description, it has been clarified that the second rotation operation section 103 has the circuit configuration shown in FIG.
Further, according to the configuration of the second rotation operation unit 103 shown in FIG. 3 and the values of δ [i] and p [i] shown in Tables 4 to 6, (q
[i] is all zero. ), The circuit configurations of the first rotation operation unit 102 and the third rotation operation unit 104 can be easily analogized. That is, the first rotation calculation unit 102 and the second rotation calculation unit 10
3 has a five-stage pipeline configuration, and the third rotation operation unit 104 has a six-stage pipeline configuration.

【0077】また、上述したように、6個の補正部10
5〜110は、図6に示される従来手法による値(=√
2)に定数k2、k1、k5を乗じた値を用いて補正を行
っている。これは、17から判るように、求めるべき
理論値(x',y')は、各回転演算部から出力されるデ
ータ(x[n],y[n])に補正値k乗じた値に等しい(近
似する)からである。k2、k1、k5の具体的な値は、
それぞれ表4、表5、表6に示されたkの欄の最後に記
された値であり、n、δ[i]、p[i]、q[i]が決定され
たときに同時に一義的に決定される値である。 (第2実施例) 第2実施例は、2次元8次、即ち、8×8画素の入力デ
ータに対するDCTを高速に行うDCT装置に関するも
のである。 (全体の構成及び機能) 図4は、本装置全体の構成を示す計算フローグラフであ
る。図中の"1−DDCT"は、さらに、図5に示される
計算フローグラフとなる。図5の計算フローグラフは、
第1実施例における図2の計算フローグラフにおける最
終段での補正(√2・kを乗ずる)処理を除いたものに
等しい。
As described above, the six correction units 10
5 to 110 are values according to the conventional method shown in FIG.
Correction is performed using a value obtained by multiplying 2) by constants k2, k1, and k5. This is because the theoretical value (x ′, y ′) to be obtained is a value obtained by multiplying the data (x [n], y [n]) output from each rotation operation unit by the correction value k, as can be seen from Expression 17. This is because (approximate). The specific values of k2, k1, and k5 are
These are the values described at the end of the column of k shown in Tables 4, 5, and 6, respectively, and are unambiguous when n, δ [i], p [i], q [i] are determined. It is a value that is determined. Second Embodiment A second embodiment relates to a DCT apparatus that performs DCT on input data of two-dimensional octal, that is, 8 × 8 pixels at high speed. (Overall Configuration and Function) FIG. 4 is a calculation flow graph showing the overall configuration of the present apparatus. "1-DDCT" in the figure further becomes a calculation flow graph shown in FIG. The calculation flow graph of FIG.
This is equivalent to the calculation flow graph of FIG. 2 in the first embodiment except for the correction (multiplying by √2 · k) at the last stage.

【0078】図4において、f[0][0]〜f[7][7]は64
個の入力画素データ、F[0][0]〜F[7][7]は本装置によ
って得られるDCT係数を示す。また、k00〜k77は定
数であり、30を満たす。
In FIG. 4, f [0] [0] to f [7] [7] are 64
The pieces of input pixel data F [0] [0] to F [7] [7] indicate DCT coefficients obtained by the present apparatus. Further, k00 to k77 are constants and satisfy Expression 30.

【0079】[0079]

【数30】 なお、第1実施例においては構成ブロック図(図1)を
示したが、本実施例においては構成ブロック図を省略す
る。各構成ブロックと計算フローグラフとの対応関係は
第1実施例の場合と同様なので、図4及び図5の計算フ
ローグラフから容易に本装置の構成を導き出せるからで
ある。
[Equation 30] Although the configuration block diagram (FIG. 1) is shown in the first embodiment, the configuration block diagram is omitted in this embodiment. This is because the correspondence between each constituent block and the calculation flow graph is the same as that of the first embodiment, so that the configuration of the present apparatus can be easily derived from the calculation flow graphs of FIGS.

【0080】即ち、本装置における図5に対応する部分
(以下、「1−DDCTモジュール」という。)の構成
は、図1に示された構成から6個の補正部105〜11
0を除いたものに等しい。また、図4から明らかなよう
に、本装置の全体は、図中の左列に並んだ8個の1−D
DCTモジュール(以下、「前段部」という。)と、図
中の右列に並んだ8個の1−DDCTモジュール(以
下、「後段部」という。)と、64個の補正部とから構
成される。
That is, the configuration of the portion corresponding to FIG. 5 (hereinafter referred to as “1-DDCT module”) in the present apparatus is different from the configuration shown in FIG.
Equivalent to zero. Further, as is apparent from FIG. 4, the entirety of the present apparatus is composed of eight 1-Ds arranged in the left column in the figure.
The DCT module includes a DCT module (hereinafter, referred to as a “front section”), eight 1-DDCT modules (hereinafter, referred to as a “post section”) arranged in the right column in the figure, and 64 correction sections. You.

【0081】以上のように構成された本装置によって2
次元8次のDCTが実現される根拠は以下の通りであ
る。一般に、2次元N次のDCTは、31に示され
る。
With the present device configured as described above,
The grounds for implementing the DCT of dimension eight are as follows. In general, a two-dimensional N-order DCT is shown in Equation 31.

【0082】[0082]

【数31】 そして、31の右辺に示された2次元N次のDCT
は、複数の1次元N次のDCTに分解される。即ち、2
次元N次のDCTは、N×N個の入力データをN個ずつ
に分割したN組の入力データのそれぞれに対して1次元
N次のDCTを行う前段部と、それらの出力データをさ
らに一定の関係の下にN個ずつに分割したN組の出力デ
ータのそれぞれに対して1次元N次のDCTを行う後段
部に分解される。
(Equation 31) Then, the two-dimensional N-dimensional DCT shown on the right side of Equation 31
Is decomposed into a plurality of one-dimensional N-order DCTs. That is, 2
The N-dimensional DCT is a former stage that performs one-dimensional N-dimensional DCT on each of N sets of input data obtained by dividing N × N pieces of input data into N pieces, and further sets the output data thereof constant. Each of the N sets of output data divided into N pieces under the relationship is decomposed into a post-stage section that performs one-dimensional N-order DCT.

【0083】本装置は、2次元8次のDCTを行うもの
であるから、K=√2、N=8とすることにより、図4
及び図5の計算フローグラフが導き出される。よって、
これらの計算フローグラフで示される構成によって2次
元8次のDCTが実現されることが判る。次に、本装置
が有する64個の補正部の意義を説明する。
Since this apparatus performs two-dimensional, eighth-order DCT, by setting K = √2 and N = 8, FIG.
And the calculation flow graph of FIG. 5 is derived. Therefore,
It can be seen that a two-dimensional eighth-order DCT is realized by the configuration shown in these calculation flow graphs. Next, the significance of the 64 correction units of the present apparatus will be described.

【0084】図4及び図5の計算フローグラフから判る
ように、本装置は、基本的には、第1実施例の装置が1
6個集まったものに等しい。但し、本装置においては、
上述したように、個々の1−DDCTモジュールは、そ
の内部に補正部を有さない点で第1実施例の装置と異な
る。これは、7の1次元N次のDCTの式より導かれ
る性質 F[s・u]=s・F[u] を利用して、前段部に属する1−DDCTモジュールで
本来必要とされる補正(例えば、√2・kiを乗ずるこ
と)と後段部に属する1−DDCTモジュールで本来必
要とされる補正(例えば、√2・kjを乗ずること)と
を結合させることにより、2回の補正を1回の補正(例
えば、2・ki・kjを乗ずること)で済ませるためであ
る。
As can be seen from the calculation flow graphs of FIG. 4 and FIG. 5, this apparatus is basically different from the apparatus of the first embodiment in that
Equivalent to six. However, in this device,
As described above, each 1-DDCT module differs from the device of the first embodiment in that it does not have a correction unit inside. This is originally required in the 1-DDCT module belonging to the preceding stage by using the property F [s · u] = s · F [u] derived from the one-dimensional N-order DCT equation of Equation 7. The correction is performed twice by combining the correction (for example, multiplying by √2 · ki) and the correction originally required by the 1-DDCT module belonging to the subsequent stage (for example, by multiplying by √2 · kj). Is corrected once (for example, multiplying by 2 · ki · kj).

【0085】よって、本装置において、後段部の1−D
DCTの出力データに対して、64個の補正部により、
30に示された補正値が乗算されることにより、少な
い処理ステップで2次元8次のDCT係数が得られる。
なお、個々の1−DDCTモジュールの詳細な動作は、
第1実施例の場合と同様であるので、その説明は省略す
る。 (従来手法との比較) 次に、2次元8次のDCTに必要とされる演算の種類と
回数について、本装置による場合と従来手法による場合
とを比較して説明する。
Therefore, in the present apparatus, the 1-D
For the DCT output data, 64 correction units
By multiplying by the correction value shown in Expression 30, a two-dimensional eighth-order DCT coefficient can be obtained with a small number of processing steps.
The detailed operation of each 1-DDCT module is as follows.
Since it is the same as the case of the first embodiment, the description is omitted. (Comparison with Conventional Method) Next, the types and the number of operations required for the two-dimensional eighth-order DCT will be described by comparing the case of the present apparatus with the case of the conventional method.

【0086】まず、第1の従来手法と比較するために、
8×8画素からなる1ブロック分の入力データが与えら
れた場合に本装置において実行される乗算の回数を求め
る。本装置においては、図5に示された2箇所の"1/
√2"より1個の1−DDCTモジュールにつき2回の
乗算が必要とされること、及び本装置が16個の1−D
DCTモジュールと64個の補正部から構成されること
より、合計96回(=2×16+64)の乗算が行われ
る。
First, for comparison with the first conventional method,
The number of times of multiplication executed in the present apparatus when input data of one block composed of 8 × 8 pixels is given. In this apparatus, two "1/1 /" shown in FIG.
{2} requires two multiplications per 1-DDCT module, and the device has 16 1-DCTs.
Since the DCT module and the 64 correction units are used, a total of 96 multiplications (= 2 × 16 + 64) are performed.

【0087】これは、上述したように、256回の乗算
を176回に減少させた第1の従来手法に比べ、さらに
大幅にその回数を減少させるものである。なお、MPE
G等の規格では31における定数Kの値は本実施例
(K=√2)とは異なるが、本実施例におけるk00〜k
77の値を予めスケーリングしておくことで対応できるこ
とであり、これによって必要な乗算の回数が変動するも
のではない。
As described above, the number of multiplications is further reduced as compared with the first conventional method in which 256 multiplications are reduced to 176 times. In addition, MPE
In the standard such as G, the value of the constant K in Equation 31 is different from that of the present embodiment (K = √2), but k00 to k in the present embodiment.
This can be handled by scaling the value of 77 in advance, and this does not change the number of necessary multiplications.

【0088】また、画像圧縮装置等においては、DCT
装置から出力された各DCT係数は、続く線形量子化の
処理のために、対応する予め定められたステップサイズ
による割り算が行われる。従って、本DCT装置の64
個の補正部での処理と、線形量子化での割り算とを結合
させることにより、画像圧縮装置全体における乗算の回
数の減少を図ることもできる。
In an image compression apparatus or the like, DCT
Each DCT coefficient output from the device is divided by a corresponding predetermined step size for a subsequent linear quantization process. Accordingly, 64 of the present DCT apparatus is used.
By combining the processing by the correction units and the division by the linear quantization, the number of times of multiplication in the entire image compression apparatus can be reduced.

【0089】次に、第2の従来手法であるCORDIC
手法と比較するために、16ビットのデータ語長で3種
類の角度(−2π/16、−π/16、−5π/16)
の回転演算を行うのに必要な演算の種類と回数を求め
る。なお、この従来手法と本装置で共通する処理、即
ち、補正値(Cやk)を乗ずる処理は、比較の対象に含
めない。
Next, CORDIC, which is a second conventional method, is used.
Three types of angles (-2π / 16, -π / 16, -5π / 16) with a data word length of 16 bits for comparison with the method
The type and the number of calculations required to perform the rotation calculation are calculated. The processing common to the conventional method and the present apparatus, that is, the processing of multiplying the correction value (C or k) is not included in the comparison.

【0090】図7に示されたCORDIC手法による装
置では、1回の離散回転角度の演算につき、2回のシフ
ト、3回の加減算(x[i],y[i],z[i])及び1回の
条件判断が必要とされるので、48回の離散回転角度の
演算には、合計96回のシフト、144回の加減算及び
48回の条件判断が必要とされる。一方、本装置におい
ては、−2π/16の回転演算に10回の加減算、−π
/16の回転演算に10回の加減算、−5π/16の回
転演算に12回の加減算が必要とされることから、合計
32回の加減算のみで済む。しかも、本装置では、CO
RDIC手法で必要とされた制御部、即ち、LUT、z
算出部、判定部が不要となる。
In the apparatus according to the CORDIC method shown in FIG. 7, two shifts and three additions / subtractions (x [i], y [i], z [i]) are performed for one calculation of the discrete rotation angle. And one condition determination is required, so that the calculation of the 48 discrete rotation angles requires a total of 96 shifts, 144 additions / subtractions, and 48 condition determinations. On the other hand, in the present apparatus, the rotation calculation of -2π / 16 is added and subtracted ten times,
Since the rotation operation of / 16 requires 10 additions and subtractions, and the rotation of -5π / 16 requires 12 additions and subtractions, only 32 additions and subtractions are required. Moreover, in this device, CO
Controls required by the RDIC method, ie, LUT, z
The calculation unit and the determination unit become unnecessary.

【0091】このように、本装置によって、従来手法で
必要とされた演算の種類や回数が飛躍的に減少し、回路
構成がコンパクトになる。このような効果は、本質的に
は、本装置が任意の角度ではなく予め定められた角度の
回転演算を行う処理又は回路から構成されていることに
基づくものと考えられる。以上、本発明に係るDCT装
置について、実施例に基づいて説明したが、本発明はこ
れら実施例に限られないことは勿論である。即ち、 (1)第1及び第2実施例では、本発明を論理回路(ハ
ードウェア)で実現したが、汎用のCPUの下で実行さ
れるプログラム(ソフトウェア)で実現してもよい。ソ
フトウェアによる方法であっても、ハードウェアによる
場合と同様の効果、即ち、処理ステップが短縮されると
いう効果が得られることは言うまでもない。 (2)第1及び第2実施例では、DCTを行う装置につ
いて説明したが、逆DCTを行う装置であっても本装置
と同様のことが成り立つ。例えば、2次元逆DCTは、
一般に、32の式で表されるが、2次元逆DCTも2
次元DCTと同様に、やはり2次元回転演算を用いた計
算フローグラフとして表現されるからである。
As described above, according to the present apparatus, the types and the number of operations required by the conventional method are remarkably reduced, and the circuit configuration becomes compact. It is considered that such an effect is based essentially on the fact that the present apparatus is configured by a process or a circuit that performs a rotation operation at a predetermined angle instead of an arbitrary angle. As described above, the DCT device according to the present invention has been described based on the embodiments, but it is needless to say that the present invention is not limited to these embodiments. (1) In the first and second embodiments, the present invention is realized by a logic circuit (hardware), but may be realized by a program (software) executed under a general-purpose CPU. It goes without saying that even with the software method, the same effect as that obtained by the hardware, that is, the effect of shortening the processing steps can be obtained. (2) In the first and second embodiments, the apparatus that performs DCT has been described. However, the same applies to an apparatus that performs inverse DCT. For example, the two-dimensional inverse DCT is
Generally, it is expressed by the equation 32, but the two-dimensional inverse DCT is also 2
This is because, similarly to the dimensional DCT, it is also expressed as a calculation flow graph using a two-dimensional rotation operation.

【0092】[0092]

【数32】 (3)第1及び第2実施例のDCT装置は、8次のDC
Tを行うものであったが、本発明は、この次数に限定さ
れるものではない。即ち、次数Nが予め決定されていれ
ば、その次数Nから必要な回転角度θが判明するので、
その角度θの回転演算を行う回転演算部R'(θ)の回
路構成が一義的に決定されるからである。 (4)第1及び第2実施例に係るDCT装置は、それぞ
7及び31で定義されるDCTを行ったが、2次
元回転演算を用いて表現されるものであれば、他の定義
によるDCTであってもよい。 (5)第1実施例では、n、δ[i]、p[i]及びq[i]の
決定に際し、k[i] = cosθ[i]とし、各iについてΔθ
[i]を最小にするδ[i]及びp[i]を決定することを繰り
返したが、このような方法に限定されるものではない。
例えば、k[i] = sinθ[i]とすることも考えられる。
(Equation 32) (3) The DCT devices of the first and second embodiments use an eighth-order DCT.
Although T is performed, the present invention is not limited to this order. That is, if the order N is determined in advance, the necessary rotation angle θ can be determined from the order N.
This is because the circuit configuration of the rotation calculation unit R ′ (θ) that performs the rotation calculation of the angle θ is uniquely determined. (4) DCT apparatus according to the first and second embodiments have been subjected to DCT defined by the respective formulas 7 and Formula 31, as long as it is expressed using a two-dimensional rotation operations, other definitions May be used. (5) In the first embodiment, when determining n, δ [i], p [i], and q [i], k [i] = cosθ [i], and Δθ for each i
The determination of δ [i] and p [i] that minimizes [i] was repeated, but is not limited to such a method.
For example, it is conceivable that k [i] = sin θ [i].

【0093】但し、p[i+1]−p[i]≠1及びq[i+1]−q
[i]≠1を満たすようなp[i]及びq[i]を決定するのが
好ましい。より小さいnに対して、2、3、4を
満たすn、δ[i]、p[i]及びq[i]を決定するためであ
る。 (6)第1及び第2実施例に係るDCT装置は、画像デ
ータを対象としたが、これに限定されることはなく、例
えば、音声データ等であってもよい。
Where p [i + 1] -p [i] ≠ 1 and q [i + 1] -q
It is preferable to determine p [i] and q [i] that satisfy [i] ≠ 1. For smaller n, Formula 2, Formula 3, n satisfying Equation 4, [delta] [i], in order to determine the p [i] and q [i]. (6) Although the DCT apparatuses according to the first and second embodiments are directed to image data, the present invention is not limited to this, and may be, for example, audio data.

【0094】[0094]

【発明の効果】以上の説明から明らかなように、本発明
に係る離散余弦変換及び逆離散余弦変換装置は、DCT
/逆DCTを所定角度(θ)の2次元回転演算を用いて
行うものであり、それら2次元回転演算は必要最低限の
個数の所定の離散角度の回転演算に分解されている。そ
して、それら各回転演算は、2のべき乗との乗算と加減
算で表される。
As is apparent from the above description, the discrete cosine transform and the inverse discrete cosine transform device according to the present invention provide a DCT.
/ Inverse DCT is performed using a two-dimensional rotation operation at a predetermined angle (θ), and the two-dimensional rotation operation is decomposed into a minimum necessary number of rotation operations at a predetermined discrete angle. Each rotation operation is represented by multiplication by a power of 2 and addition / subtraction.

【0095】これにより、従来手法で必要とされた多く
の乗算が単純な論理演算(シフト及び加減算)の繰り返
しに置き換えられると共に従来のCORDIC手法で必
要とされた演算回数よりも少ない回数の演算によってよ
り演算精度の高い2次元回転演算が行われ、高速な離散
余弦変換及び逆離散余弦変換装置が実現される。
As a result, many multiplications required in the conventional method are replaced with simple repetition of logical operations (shift and addition / subtraction), and the number of operations is smaller than the number of operations required in the conventional CORDIC method. more 2-dimensional rotation operation high operation precision is performed, high-speed discrete cosine transform and inverse discrete cosine varying retrofit location is achieved.

【0096】また、本発明に係る離散余弦変換及び逆離
散余弦変換方法によれば、前記2次元回転演算を明確な
指針の下に所定の離散角度の回転演算に分解しておくこ
とができる。これにより、2次元回転演算に必要とされ
る最適な論理演算の種類と個数を容易に決定しておくこ
とができる。
Further, according to the discrete cosine transform and the inverse discrete cosine transform method according to the present invention, the two-dimensional rotation operation can be decomposed into a rotation operation at a predetermined discrete angle under clear guidelines. This makes it possible to easily determine the type and number of optimal logical operations required for the two-dimensional rotation operation.

【0097】また、本発明に係る離散余弦変換及び逆離
散余弦変換装置によれば、前記2次元回転演算は単純な
離散角度の回転演算を順次行うパイプラインにより構成
される。 これにより、従来のCORDIC手法で必要
とされたルックアップテーブルや比較器等が不要になる
と共に少ない回路規模で2次元回転演算部が構築される
ので、高速かつコンパクトなDCT/逆DCT装置が実
現される。
Further, according to the discrete cosine transform and inverse discrete cosine transform device according to the present invention, the two-dimensional rotation operation is constituted by a pipeline for sequentially performing a rotation operation at a simple discrete angle. This eliminates the need for a look-up table, a comparator, and the like, which are required by the conventional CORDIC method, and allows a two-dimensional rotation operation unit to be constructed with a small circuit scale, thereby realizing a high-speed and compact DCT / inverse DCT device. Is done.

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

【図1】本発明の第1実施例に係るDCT装置の構成を
示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a DCT device according to a first embodiment of the present invention.

【図2】同装置が行う1次元8次のDCTの演算内容を
示す計算フローグラフである。
FIG. 2 is a calculation flow graph showing the content of a one-dimensional eighth-order DCT operation performed by the apparatus.

【図3】同装置の第2回転演算部103の詳細な構成を
示す回路図である。
FIG. 3 is a circuit diagram showing a detailed configuration of a second rotation calculation unit 103 of the device.

【図4】本発明の第2実施例に係るDCT装置が行う2
次元8次のDCTの演算内容を示す計算フローグラフで
ある。
FIG. 4 illustrates a second example of the operation performed by the DCT apparatus according to the second embodiment of the present invention.
9 is a calculation flow graph showing the contents of DCT operation of dimension 8;

【図5】図4の計算フローグラフにおける”1−D D
CT”の内容を詳細に示す計算フローグラフである。
FIG. 5 shows “1-D D” in the calculation flow graph of FIG.
41 is a calculation flow graph showing the details of CT "in detail.

【図6】従来技術における1次元8次のDCTの演算内
容を示す計算フローグラフである。
FIG. 6 is a calculation flow graph showing the contents of a one-dimensional eighth-order DCT calculation in the related art.

【図7】従来のCORDIC手法による2次元回転演算
をハードウェアで実現した場合の構成を示すブロック図
である。
FIG. 7 is a block diagram showing a configuration in a case where a two-dimensional rotation operation by a conventional CORDIC method is realized by hardware.

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

101 前置処理部 102〜104 回転演算部 105〜110 補正部 340〜344 離散角度回転演算部 345 出力バッファ 300〜305、310〜315 レジスタ 320、322、324、331、333 加算器 321、323、330、332、334 減算器 101 Pre-processing unit 102-104 Rotation calculation unit 105-110 Correction unit 340-344 Discrete angle rotation calculation unit 345 Output buffer 300-305, 310-315 Register 320, 322, 324, 331, 333 Adders 321 and 323, 330, 332, 334 Subtractor

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 17/14 H03M 7/30 H04N 1/41 H04N 7/30 JICSTファイル(JOIS)Continuation of the front page (58) Field surveyed (Int.Cl. 7 , DB name) G06F 17/14 H03M 7/30 H04N 1/41 H04N 7/30 JICST file (JOIS)

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 データ圧縮装置における離散余弦変換を
1に示される所定角度(θ)の2次元回転演算を用い
て行う装置であって、 前記変換を行う対象となるデータから前記2次元回転演
算を行う対象となる入力データ(x[0],y[0])を算出
する入力データ算出回路と、 前記入力データ算出回路により算出された入力データ
(x[0],y[0])に対して、前記所定角度(θ)に基づ
いて予め求められた2、3及び4を満たすn個の
δ(δ[0]からδ[n-1])、p(p[0]からp[n-1])及び
q(q[0]からq[n-1])を用いて表される5に示され
る離散角度の回転演算をi=0からi=n−1までn回
実行する離散角度回転演算回路と、 前記離散角度回転演算回路により最終的に得られた出力
データ(x[n],y[n])と6に示される所定の係数
(k)を含む定数との積を算出することにより出力デー
タの補正を行う補正回路とを備えることを特徴とする離
散余弦変換装置。 【数1】 但し、(x,y)は回転前のデータ、(x’,y’)は
回転後の理論値。 【数2】 【数3】 【数4】 但し、δ[i] =±1、p[i] 及びq[i] は整数、nは正の
整数、Eは予め与えられた許容誤差角度、k[i]は実数。 【数5】 【数6】
1. A discrete cosine transform in a data compression device.
An apparatus for performing a two-dimensional rotation operation at a predetermined angle (θ) represented by Equation 1, wherein input data (x [0]) to be subjected to the two-dimensional rotation operation is obtained from the data to be converted. , y [0]) and input data calculation circuit for calculating an input data calculated by the input data calculation circuit (x [0], with respect to y [0]), based on said predetermined angle (theta) previously obtained equation 2, of n satisfying the formula 3 and formula 4 δ (δ [0] from δ [n-1]), p (p [0] p [n-1] from) and q (q [0] to q [n-1]), a discrete angle rotation operation circuit that executes a rotation operation at a discrete angle shown in Expression 5 n times from i = 0 to i = n−1, The output data is calculated by calculating the product of the output data (x [n], y [n]) finally obtained by the discrete angle rotation operation circuit and a constant including a predetermined coefficient (k) shown in Expression 6. Correction And a correction circuit that performs the following. (Equation 1) Here, (x, y) is the data before rotation, and (x ', y') is the theoretical value after rotation. (Equation 2) (Equation 3) (Equation 4) Here, δ [i] = ± 1, p [i] and q [i] are integers, n is a positive integer, E is a predetermined tolerance angle, and k [i] is a real number. (Equation 5) (Equation 6)
【請求項2】 前記離散角度回転演算回路は、 パイプラインとして直列に接続されたn段の回転演算器
(R(0)からR(n-1))から構成され、 各段の回転演算器R(i)は、 前記データx[i]を格納するためのレジスタREGx[i]
と、 前記データy[i]を格納するためのレジスタREGy[i]
と、 2個の2入力演算器ALUx[i]及びALUy[i]とからな
り、 前記レジスタREGx[i]と前記2入力演算器ALUx[i]
及びALUy[i]とは、前記レジスタREGx[i]から出力
されたデータx[i]がq[i]ビットだけシフトして前記演
算器ALUx[i]の一方に入力されると共にp[i]ビット
だけシフトして前記2入力演算器ALUy[i]の一方に入
力されるように結線され、 前記レジスタREGy[i]と前記2入力演算器ALUx
[i]及びALUy[i]とは、前記レジスタREGy[i]から
出力されたデータy[i]がp[i]ビットだけシフトして前
記2入力演算器ALUx[i]の他の一方に入力されると共
にq[i]ビットだけシフトして前記2入力演算器ALUy
[i]の他の一方に入力されるように結線され、 前記2入力演算器ALUx[i]及びALUy[i]は、δ[i]
に基づいて予め決められた加算器又は減算器であり、 前記2入力演算器ALUx[i]及びALUy[i]は、それら
が最終段の回転演算器R(n-1)に属する場合を除いて、
それらの演算結果をそれぞれ次段の回転演算器R(i+1)
のレジスタREGx[i+1]及びREGy[i+1]に出力するこ
とを特徴とする請求項記載の離散余弦変換装置。
2. The discrete angle rotation operation circuit is composed of n stages of rotation operation units (R (0) to R (n-1)) connected in series as a pipeline. R (i) is a register REGx [i] for storing the data x [i].
And a register REGy [i] for storing the data y [i].
And two two-input arithmetic units ALUx [i] and ALUy [i]. The register REGx [i] and the two-input arithmetic unit ALUx [i]
And ALUy [i] mean that the data x [i] output from the register REGx [i] is shifted by q [i] bits, input to one of the arithmetic units ALUx [i], and p [i]. ] And shifted so as to be input to one of the two-input arithmetic unit ALUy [i], the register REGy [i] and the two-input arithmetic unit ALUx.
[i] and ALUy [i] mean that the data y [i] output from the register REGy [i] is shifted by p [i] bits to the other one of the two-input arithmetic unit ALUx [i]. Input and shifted by q [i] bits, and the 2-input arithmetic unit ALUy
[i] is connected so as to be input to the other one of the two input arithmetic units ALUx [i] and ALUy [i] are δ [i]
The two-input arithmetic units ALUx [i] and ALUy [i] are based on the two-input arithmetic units ALUx [i] and ALUy [i] except when they belong to the last-stage rotation arithmetic unit R (n-1). hand,
The results of these calculations are respectively converted to the next-stage rotation operator R (i + 1)
Register REGx [i + 1] and REGy [i + 1] DCT device according to claim 1, characterized in that the output.
【請求項3】 データ伸長装置における逆離散余弦変換
1に示される所定角度(θ)の2次元回転演算を用
いて行う装置であって、 前記変換を行う対象となるデータから前記2次元回転演
算を行う対象となる入力データ(x[0],y[0])を算出
する入力データ算出回路と、 前記入力データ算出回路により算出された入力データ
(x[0],y[0])に対して、前記所定角度(θ)に基づ
いて予め求められた2、3及び4を満たすn個の
δ(δ[0]からδ[n-1])、p(p[0]からp[n-1])及び
q(q[0]からq[n-1])を用いて表される5に示され
る離散角度の回転演算をi=0からi=n−1までn回
実行する離散角度回転演算回路と、 前記離散角度回転演算回路により最終的に得られた出力
データ(x[n],y[n])と6に示される所定の係数
(k)を含む定数との積を算出することにより出力デー
タの補正を行う補正回路とを備えることを特徴とする逆
離散余弦変換装置。
3. An apparatus for performing an inverse discrete cosine transformation in a data decompression apparatus by using a two-dimensional rotation operation of a predetermined angle (θ) shown in equation 1, wherein the two-dimensional rotation is performed based on data to be transformed. input data to be subjected to the rotation operation (x [0], y [ 0]) and input data calculation circuit for calculating an input data calculated by the input data calculation circuit (x [0], y [ 0] relative), said predetermined angle (theta formula 2 obtained in advance based on), [delta] from the n satisfying equation 3 and equation 4 δ (δ [0] [ n-1]), p (p [ 0] to p [n-1]) and q (q [0] to q [n-1]) are used to perform the rotation operation at the discrete angle shown in Expression 5 from i = 0 to i = n− a discrete angular rotation calculation circuit for performing n times until 1, wherein the discrete angular rotation calculating circuit by finally obtained output data (x [n], y [ n]) and a predetermined coefficient shown in equation 6 (k ) An inverse discrete cosine transform device, comprising: a correction circuit that corrects output data by calculating a product of the output data and a constant.
【請求項4】 前記離散角度回転演算回路は、 パイプラインとして直列に接続されたn段の回転演算器
(R(0)からR(n-1))から構成され、 各段の回転演算器R(i)は、 前記データx[i]を格納するためのレジスタREGx[i]
と、 前記データy[i]を格納するためのレジスタREGy[i]
と、 2個の2入力演算器ALUx[i]及びALUy[i]とからな
り、 前記レジスタREGx[i]と前記2入力演算器ALUx[i]
及びALUy[i]とは、前記レジスタREGx[i]から出力
されたデータx[i]がq[i]ビットだけシフトして前記演
算器ALUx[i]の一方に入力されると共にp[i]ビット
だけシフトして前記2入力演算器ALUy[i]の一方に入
力されるように結線され、 前記レジスタREGy[i]と前記2入力演算器ALUx
[i]及びALUy[i]とは、前記レジスタREGy[i]から
出力されたデータy[i]がp[i]ビットだけシフトして前
記2入力演算器ALUx[i]の他の一方に入力されると共
にq[i]ビットだけシフトして前記2入力演算器ALUy
[i]の他の一方に入力されるように結線され、 前記2入力演算器ALUx[i]及びALUy[i]は、δ[i]
に基づいて予め決められた加算器又は減算器であり、 前記2入力演算器ALUx[i]及びALUy[i]は、それら
が最終段の回転演算器R(n-1)に属する場合を除いて、
それらの演算結果をそれぞれ次段の回転演算器R(i+1)
のレジスタREGx[i+1]及びREGy[i+1]に出力するこ
とを特徴とする請求項3記載の逆離散余弦変換装置。
Wherein said discrete angular rotation calculation circuit is configured rotation calculator of n stages connected in series as a pipeline (from R (0) R (n- 1)) from the rotation calculator for each stage R (i) is a register REGx [i] for storing the data x [i].
And a register REGy [i] for storing the data y [i].
And two two-input arithmetic units ALUx [i] and ALUy [i]. The register REGx [i] and the two-input arithmetic unit ALUx [i]
And ALUy [i] mean that the data x [i] output from the register REGx [i] is shifted by q [i] bits, input to one of the arithmetic units ALUx [i], and p [i]. ] And shifted so as to be input to one of the two-input arithmetic unit ALUy [i], the register REGy [i] and the two-input arithmetic unit ALUx.
[i] and ALUy [i] mean that the data y [i] output from the register REGy [i] is shifted by p [i] bits and sent to the other of the two-input arithmetic unit ALUx [i]. Input and shifted by q [i] bits, and the 2-input arithmetic unit ALUy
[i] is connected so as to be input to the other one of the two input arithmetic units ALUx [i] and ALUy [i] are δ [i]
And the two-input arithmetic units ALUx [i] and ALUy [i] are the same except that they belong to the last-stage rotation arithmetic unit R (n-1). hand,
The results of these calculations are respectively converted to the next-stage rotation operator R (i + 1)
4. The inverse discrete cosine transform device according to claim 3, wherein the signals are output to registers REGx [i + 1] and REGy [i + 1].
JP2969196A 1996-02-16 1996-02-16 Discrete cosine transform and inverse discrete cosine transform device in data compression / decompression device Expired - Fee Related JP3095348B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2969196A JP3095348B2 (en) 1996-02-16 1996-02-16 Discrete cosine transform and inverse discrete cosine transform device in data compression / decompression device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2969196A JP3095348B2 (en) 1996-02-16 1996-02-16 Discrete cosine transform and inverse discrete cosine transform device in data compression / decompression device

Publications (2)

Publication Number Publication Date
JPH09223124A JPH09223124A (en) 1997-08-26
JP3095348B2 true JP3095348B2 (en) 2000-10-03

Family

ID=12283140

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2969196A Expired - Fee Related JP3095348B2 (en) 1996-02-16 1996-02-16 Discrete cosine transform and inverse discrete cosine transform device in data compression / decompression device

Country Status (1)

Country Link
JP (1) JP3095348B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8572152B2 (en) 2008-03-06 2013-10-29 Nec Corporation CORDIC computation circuit and method
WO2011162310A1 (en) * 2010-06-23 2011-12-29 日本電気株式会社 Processor and calculation method
KR101358417B1 (en) * 2012-09-17 2014-02-06 고려대학교 산학협력단 Device for discrete cosine transform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
National Technical Report Vol.43,No.6(1997−12)pp.83−89

Also Published As

Publication number Publication date
JPH09223124A (en) 1997-08-26

Similar Documents

Publication Publication Date Title
US6223195B1 (en) Discrete cosine high-speed arithmetic unit and related arithmetic unit
US20070094320A1 (en) Parallel Adder-Based DCT / IDCT Design Using Cyclic Convolution
US8639737B2 (en) Method to compute an approximation to the reciprocal of the square root of a floating point number in IEEE format
JPH1078863A (en) Method for executing microprocessor integer division operation using floating point type hardware and device therefor
US10983755B2 (en) Transcendental calculation unit apparatus and method
US4956799A (en) Trigonometric function arithmetic processor using pseudo-division
US20050131975A1 (en) Function arithmetic method and function arithmetic circuit
US7020671B1 (en) Implementation of an inverse discrete cosine transform using single instruction multiple data instructions
US20120121165A1 (en) Method and apparatus for time of flight sensor 2-dimensional and 3-dimensional map generation
JP3857308B2 (en) Apparatus and method for performing inverse discrete cosine transform
JP3095348B2 (en) Discrete cosine transform and inverse discrete cosine transform device in data compression / decompression device
JP3129392B2 (en) Two-dimensional IDCT circuit
Wahid et al. Error-free computation of 8/spl times/8 2D DCT and IDCT using two-dimensional algebraic integer quantization
Panda Performance Analysis and Design of a Discreet Cosine Transform processor Using CORDIC algorithm
KR19980041724A (en) Inverse Discrete Cosine Transformation Method
Villalba et al. Parallel compensation of scale factor for the CORDIC algorithm
US6463081B1 (en) Method and apparatus for fast rotation
CN115658008A (en) Resource multiplexing type transcendental function operation implementation method
Lewis Complex logarithmic number system arithmetic using high-radix redundant CORDIC algorithms
JP4933405B2 (en) Data conversion apparatus and control method thereof
Gustafsson On lifting-based fixed-point complex multiplications and rotations
Hamill et al. Online CORDIC algorithm and VLSI architecture for implementing QR-array processors
Bariamis et al. Adaptable, fast, area-efficient architecture for logarithm approximation with arbitrary accuracy on FPGA
JP2002519957A (en) Method and apparatus for processing a sign function
US6256656B1 (en) Apparatus and method for extending computational precision of a computer system having a modular arithmetic processing unit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees