JPH09223124A - Method and device for discrete cosine transformation and inverse discrete cosine transformation by data compressing and expanding device - Google Patents

Method and device for discrete cosine transformation and inverse discrete cosine transformation by data compressing and expanding device

Info

Publication number
JPH09223124A
JPH09223124A JP2969196A JP2969196A JPH09223124A JP H09223124 A JPH09223124 A JP H09223124A JP 2969196 A JP2969196 A JP 2969196A JP 2969196 A JP2969196 A JP 2969196A JP H09223124 A JPH09223124 A JP H09223124A
Authority
JP
Japan
Prior art keywords
equation
data
rotation
discrete cosine
input
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.)
Granted
Application number
JP2969196A
Other languages
Japanese (ja)
Other versions
JP3095348B2 (en
Inventor
Takao Matsumoto
孝夫 松本
Koichi Horiuchi
浩一 堀内
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 Holdings Corp
Original Assignee
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
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)

Abstract

PROBLEM TO BE SOLVED: To speed up discrete cosine transformation(DCT) or inverse DCT by decomposing a two-dimensional rotational operation into a necessary irreducible number of rotational operations for specific discrete angles. SOLUTION: The DCT and inverse DCT are performed by using a two-dimensional rotational operation of an angle θ shown by equation I and input data (x[0], y[0]) as an object of the two-dimensional rotational operation is calculated; and a rotational operation for a discrete angle shown by equation II represented by using previously found δ[i], p[i], and q[i], is performed (n) times and finally obtained output data (x[n], y[n]) is corrected. In the equation I, (x, y) is data before rotation and (x', y') is a logical value after rotation. At this time, irreducible steps needed for the rotational operation for not an arbitrary angle, but the predetermined angle are found on the basis of equations III-V, and each step consists of only a shift, and addition and subtraction. In the equations III-V, E is an allowable error angle and k[i] is a real number.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、データ圧縮伸長装
置における離散余弦変換及び逆離散余弦変換を高速に行
う方法及び装置に関し、特に、2次元回転演算を用いた
改良技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for performing a discrete cosine transform and an inverse discrete cosine transform at high speed in a data compression / decompression device, and more particularly 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 become faster and cheaper.
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 higher compression rates and higher quality has become necessary.

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

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

【0005】[0005]

【数7】 ただし、Kは定数であり、C[u](0≦u≦N-1)は数8を
満たす。
(Equation 7) However, 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 the image processing in which compression / expansion is performed by such a DCT encoding method, speeding up of DCT and inverse DCT is one of the extremely important points for realizing a high compression rate and high quality of an image. Although various researches have been done on speeding up the DCT operation, one of the factors that hinder the speeding up is one.
There are many multiplications (for example, W. Che
n et al., `` A Fast Computational 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 solutionfor an 8 by 8 twodimensio
nal DCT,'' IEEE Intl. Symp. on Circuits and System
s, 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 of the many multiplications required in the DCT operation, or most of the multiplications, can be expressed by using a two-dimensional rotation operation as shown by the equation 1 (for example, A . Ligtenberg et al.,
'' A single chip solutionfor an 8 by 8 twodimensio
nal DCT, '' IEEE Intl. Symp. on Circuits and System
s, 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 the equation 7, K = √
In the case of 2, N = 8, the calculation flow graph shown in FIG. 6A can be obtained (eg, KR Rao et al.,
"Image coding technology-DCT and its international standard-", Ohmsha, pp. 403-426). From this figure, one-dimensional 8
It can be seen that many of the multiplications required in the next DCT have been replaced by a two-dimensional rotation operation for three angles (-π / 16, -2π / 16, -5π / 16). Note that FIG. 6B is a chart 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 understood that the two-dimensional rotation calculation shown in the equation 1 should be performed at high speed in order to perform the DCT calculation at high speed. Therefore, conventionally, a method for speeding up the two-dimensional rotation calculation has been proposed, but two typical methods are as follows. (1) The first conventional method is a method of performing the two-dimensional rotation operation of the equation 9 obtained by modifying the two-dimensional rotation operation of the equation 1 instead of performing the two-dimensional rotation operation of the equation 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 is because the two-dimensional rotation operation shown in Formula 1 requires four multiplications per one two-dimensional rotation operation, but the two-dimensional rotation calculation shown in Formula 9 requires three multiplications. The focus is on what can be done. In fact, by using this method, it has been reported that the conventional method requires 16 multiplications to realize a one-dimensional DCT, but it can be realized by 11 multiplications (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.)。
By this method, for example, JPEG, H2
61, 8 required for image compression / decompression such as MPEG
In the two-dimensional 8th-order DCT of × 8 pixel data, the conventional 25
The multiplications required 6 times are reduced to 176. (2) The second conventional method is CORDIC (COordinate R
otation DIgital Computer) algorithm is used (eg JE Volder, '' The CORDIC
trigonometric computing technique, '' IRETrans. El
ectron.Comput., EC-8, pp.330-334, 1959., JS Wa
lther, `` A unified algorithm 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 used.
The calculation of the recurrence formula shown in is repeatedly executed while determining δ [i] so that z [i] shown in Formula 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) However, i is an integer, δ [i] = ± 1, x [0], y [0], and z [0] satisfy Expression 13, and θ [i] satisfies Expression 14.

【0016】[0016]

【数13】 (Equation 13)

【0017】[0017]

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

【0018】[0018]

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

【0019】[0019]

【数16】 この手法は、回転しようとする任意の角度(θ)を2の
べき乗と関連する所定の離散角度の和又は差に分解する
(例えば、θ=θ1−θ2+θ3・・・)ことにより、複
雑な2次元回転演算を単純な2進数の演算(桁シフトと
加減算)の繰り返しに置き換えるものである。
(Equation 16) This method decomposes an arbitrary angle (θ) to be rotated into a sum or difference of predetermined discrete angles associated with a power of 2 (for example, θ = θ1−θ2 + θ3 ...) The dimensional rotation calculation is replaced by the repetition of simple binary number calculation (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 the configuration when the two-dimensional rotation calculation by the CORDIC method 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 have the input data x [0] and y [0] at the first clock and the adder / subtractor 71 from the next clock.
The output data of 7, 718 is transferred to the next register 713, 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である
べきかを判定する比較器である。
The two sets of data sent directly from the registers 713 and 714 and via the shifters 715 and 716 are calculated by adder / subtractors 717 and 718, respectively. The adder / subtractor 717 corresponds to the operation of the equation 10, and the adder / subtractor 718
Corresponds to the operation of Eq. The control unit 720 uses the LUT
(LUT) 721, Z calculation unit 722, and determination unit 723. The LUT 721 is a ROM that stores a large number of angles θ [i] that satisfy Expression 14 in advance.
The calculation unit is a calculator that calculates z [i] of the equation 12, and the determination unit 723 is a comparator that determines whether δ [i] of the equation 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 functions (addition or subtraction) of the adder / subtractors 717 and 718 are dynamically determined for each clock according to an instruction from the control unit. As a result, the arithmetic operations of Mathematical Expression 10, Mathematical Expression 11 and Mathematical Expression 12 are executed once for each clock. In addition, it has been clarified in the CORDIC method that a proper calculation accuracy is ensured by keeping the number of times of calculation repetition equal to the word length of the input data (eg, GL Haviland et al., `` A CORDICArithme '').
tic Processor Chip, '' IEEE Trans. Comput., C-29, p
p.68-78, 1980.). For example, when the two-dimensional rotation calculation is performed on the input data having the calculation word length of 16 bits, it is sufficient to repeat each of Expression 10, Expression 11 and Expression 12 16 times.

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

【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] The numerical values shown in Table 1 represent 16-bit data as fixed-point data with the position of the decimal point being the 8th bit from the lower order. As can be seen from this table, the constant C [16] (= 0.6) is added to (x [16], y [16]) shown at the bottom.
It is found that the values (58.787303, 39.286418) multiplied by 072529 ...) are in good agreement with the theoretical values (58.793780, 39.284748) to be obtained.

【0025】[0025]

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

【0026】即ち、上記第1の従来手法では、2次元回
転演算で必要とされていた4回の乗算を3回の乗算に削
減にした過ぎず、依然として乗算という複雑な演算が必
要とされるために、この手法によって削減された時間で
は十分とは言えない。一方、上記第2の従来手法では、
演算精度を確保するには入力データの語長に等しい回数
のシフトや加減算を実行しなければならないために、扱
うデータの語長が長い場合には、非常に多くの回数のシ
フト及び加減算が必要とされ、1回の2次元回転演算に
要する時間が長くなってしまう。
That is, in the first conventional method, the number of multiplications required for the two-dimensional rotation operation, that is, four times, is reduced to only three times, 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,
In order to secure the calculation accuracy, the number of shifts and additions / subtractions that are equal to the word length of the input data must be executed. Therefore, when the word length of the data to be handled is long, a large number of shifts and 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クロックという多くの時間が必要と
されてしまう。
Further, as shown in FIG. 7, when the second conventional method is realized by hardware, a look-up table, a comparator, etc. are required, so that these circuits can be realized. Many gates are spent and DC
It becomes difficult to make T into an LSI. Further, in image compression / decompression, two-dimensional image data is divided into 8 × 8 pixel blocks and DCT / inverse DCT is sequentially repeated for each block. With such a hardware configuration, 16-bit data can be handled. For example, since two-dimensional rotation calculation for one set of input data is completed by 16 clocks, for example, when repeating two-dimensional rotation calculation for 48 sets of input data, a large time of 768 clocks is required. .

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

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

【0030】また、本発明の第2の目的は、従来のCO
RDIC手法をハードウェアで実現する際に必要とされ
たルックアップテーブルや比較器等が必要とされない、
即ち小規模な回路で構成することができる離散余弦変換
及び逆離散余弦変換装置を提供することである。また、
本発明の第3の目的は、連続する入力データに対して定
角度の2次元回転演算を繰り返す場合においては、1組
の入力データに対する2次元回転演算につき必要とされ
るクロック数がCORDIC手法の場合よりも少なくて
済む高速な離散余弦変換及び逆離散余弦変換装置を提供
することである。
A second object of the present invention is to reduce the CO
Look-up tables and comparators, etc., required when implementing the RDIC method in hardware are not required,
That is, it is to provide a discrete cosine transform and an inverse discrete cosine transform device that can be configured with a small-scale circuit. Also,
A third object of the present invention is that when the constant angle two-dimensional rotation calculation is repeated for continuous input data, the number of clocks required for the two-dimensional rotation calculation for one set of input data is the CORDIC method. (EN) It is an object to provide a high-speed discrete cosine transform and inverse discrete cosine transform device that 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])の補正を行うステップとから
なることを特徴とする。
In order to solve this problem, the present invention is a method for performing DCT / inverse DCT by using a two-dimensional rotation operation of a predetermined angle (θ), which is a two-dimensional rotation operation. A step of calculating the target input data (x [0], y [0]), and δ [i], p obtained in advance for the input data (x [0], y [0]) The step of executing the rotation operation of the discrete angle shown in Expression 5 represented by using [i] and q [i] n times, and the output data (x [n], y finally obtained by the step [n]) is corrected.

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

【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-th order DCT device, its configuration (processing steps) is performed in the following order.
Should be determined. (1) One-dimensional Nth-order D
Specify the type of 2D rotation calculation (angle) required for CT,
Furthermore, the configuration that implements each specified calculation is determined in the following order. (2) For each specified angle, n δs (δ [0] to δ [n-1]) and p (p [0] to p [n-
1]) and q (q [0] to q [n-1]).

【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の演算を繰り返すパイプラインの構成を決定す
る。
In this determination, δ [i], p [i] and q [i] satisfy the equations 2, 3 and 4 at a smaller value of n, and p [i + 1]- p [i] ≠ 1, q [i + 1] −q [i]
It is preferable that ≠ 1 is satisfied. (3) Based on the determined n, δ [i], p [i], and q [i], the configuration of the pipeline that repeats the operation of Equation 5 is determined.

【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 the equation 5 corresponding to each of i = 1 to n-1. Since each stage executes the operation of the equation 5 once, two registers for storing x [i] and y [i] and two adders or subtractors determined by the value of δ [i] are used. It can be configured from a vessel. 2 by p [i] and q [i]
The exponentiation operation (shift down) may be realized by devising the wiring between the register and the adder or subtractor (shifting the corresponding digits and connecting them).

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

【0037】[0037]

【実施例】以下、本発明に係るDCT装置について図面
を用いて詳細に説明する。 (第1実施例)第1実施例は、1次元8次のDCTを高
速に行うDCT装置に関するものである。 (全体の構成及び機能)図1は、本装置の構成を示すブ
ロック図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A DCT device according to the present invention will be described in detail below with reference to the drawings. (First Embodiment) The first embodiment relates to a DCT device for performing a one-dimensional eight-order DCT at high speed. (Overall Structure and Function) FIG. 1 is a block diagram showing the structure 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 device,
F [0] to F [7] represent DCT coefficients which are the outputs of this device.
FIG. 2 is a calculation flow graph showing the contents of calculation performed by this device, 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 preprocessing unit 101 is composed of an adder, a subtractor, a selector, a register, etc., and performs the addition / subtraction 201 shown in FIG. The content of the calculation in the pre-processing unit 101 is
As can be seen from FIG. 7 and FIG. 2, it is similar to the case of the conventional method. Specifically, the DCT coefficient is calculated from eight input pixel data f [0] to f [7] by a simple addition / subtraction operation. F [0]
And F [4], and the 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の詳細な構成及び動作については後述する。
First rotation calculation unit 102, second rotation calculation unit 1
03 and the third rotation calculation unit 104 are respectively −2π /
Two-dimensional rotation calculation is performed at fixed angles of 16, −π / 16, −5π / 16, and R ′ (−
2π / 16), R '(-π / 16), R' (-5π / 1
It corresponds to 6). In addition, 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回転演算部103、即ち、−π/16の角
度の回転演算を高速に行う演算部について説明する。
The six correction units 105 to 110 are composed of multipliers and the like, and the multiplication units 205 to 21 shown in FIG. 2 respectively.
Perform 0. As can be seen from FIGS. 7 and 2, the contents of calculation in these six types of correction units 105 to 110 are only different from those in the conventional method. 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 These meanings will be described later. (Structure / Operation of Rotation Computation Unit) In the present device configured as described above, the configuration and operation of the three types of rotation computation units 102 to 104, which are largely different from those of the conventional method, will be described. . Since each of these rotation calculation units 102 to 104 is composed of the same type of circuit,
Here, the second rotation calculation unit 103, that is, the calculation unit that performs rotation calculation of the angle of −π / 16 at 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 section 103. The second rotation calculation unit 103 is roughly divided into five stages of discrete angle rotation calculation units 340 to 344 and an output buffer 345. The result of the upper discrete angle rotation calculation unit is propagated to the next stage by a clock (not shown). It has a pipeline structure.

【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 calculation section in each stage is composed of two 16
Bit registers REGx [i] and REGy [i] and adder AD
Dx [i] (or ADDy [i]) and 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 corresponding digits are connected to each other. However, if a numerical value is shown next to the wiring, the wiring is indicated by the sign of the numerical value. It is connected by shifting the digit of the numerical value in the corresponding direction.
For example, "-2" is written next to the wiring connecting the register REGx [0] and the subtractor SUBy [0], but this is because the output data of the register REGx [0] is shifted by 2 bits. It is connected so that it is brought down 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, it will be described that the second rotation operation unit 103 configured as described above performs a two-dimensional rotation operation at an angle of -π / 16 while ensuring 16-bit operation accuracy. First, two input data x [0], y output from the preprocessing 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, by the second clock, the following operation is performed in the adder ADDx [0] and the subtractor SUBy [0], and the result is registered in the registers REGx [1] and REGy [1].
Stored in. REGx [1] = REGx [0 ] +2 over 2 · REGy [0] REGy [ 1] = REGy [0] -2 over 2 · REGx [0] Similarly to, the third clock, the subtracter SUBx
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]に格納される。
[0046] REGx [2] = REGx [1 ] -2 over 4 · REGy [1] REGy [ 2] = REGy [1] +2 over 4 · REGx [1] In the same manner, the sixth clock At the time when the time elapses, the final result R by the second rotation calculation unit 103
EGx [5] and REGy [5] are 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 held 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] In addition, "-" in the table indicates this input data (50, 50)
It indicates that the values for other input data different from are held. Also, the real number display column of Table 2 shows the value (in decimal notation) in which the 16-bit data displayed in the left column is expressed as 16-bit fixed point data with the decimal point position being the 8th bit from the lower order. There is.

【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 unit 103 are sent to the third correction unit 107 and the fourth correction unit 108, respectively, and √2.
The value is multiplied by k1, but the value obtained by multiplying (REGx [5], REGy [5]) by k1 is a value close to the theoretical value (x ', y') to be obtained. A comparison between these values and the value C · (x [5], y [5]) obtained by 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 device is closer to the theoretical value than the data obtained by the CORDIC method. That is, the present apparatus executes the two-dimensional rotation calculation with higher accuracy than the case of the CORDIC method that performs the calculation 16 times even though the calculation is performed only 5 times.

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

【0053】もっとも、CORDIC手法をハードウェ
アで実現する他の方法として、図7における制御部72
0をなくし、離散角度回転演算部710を16段にして
直列にパイプラインとして接続する構成とすることも考
えられる。しかし、このような構成であっても、その演
算速度と回路のコンパクトさの点において、1個のシフ
タをも必要とせず、かつ、5段の加減算回路のみで高精
度の2次元回転演算を実行する本演算部103には到底
及ばないことは言うまでもない。 (理論的考察)次に、本発明に係るDCT装置の第2回
転演算部103の構成を図3に示されたように決定した
プロセス及び他の回転演算部102、104の構成につ
いて説明する。
However, as another method for realizing the CORDIC method by hardware, the control unit 72 in FIG. 7 is used.
It is also conceivable to eliminate 0 and configure the discrete angle rotation calculation unit 710 in 16 stages and connect them in series as a pipeline. However, even with such a configuration, one shifter is not required in terms of operation speed and circuit compactness, and highly accurate two-dimensional rotation operation can be performed using only five stages of addition / subtraction circuits. It goes without saying that the calculation unit 103 to be executed does not reach at all. (Theoretical Consideration) Next, the process of determining the configuration of the second rotation computing unit 103 of the DCT device according to the present invention as shown in FIG. 3 and the configurations of the other rotation computing 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
に示される関係を有するとする。)」ことを証明する。
First, "n number of δ (δ [0] to δ [n-1]) defined so as to satisfy the equations 2, 3 and 4, p (p [0]
To p [n-1]) and q (q [0] to q [n-1]),
It is obtained by repeating the operation of Equation 5 n times (x [n], y
[n]) is the theoretical value (x ', y') that should be originally obtained and Equation 17
(However, x [0] and y [0] are expressed by
Suppose that they have 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) When Equation 20 is transformed using Equation 1,

【0059】[0059]

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

【0060】[0060]

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

【0061】[0061]

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

【0062】[0062]

【数24】 数3、数4より、(Equation 24) From equations 3 and 4,

【0063】[0063]

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

【0064】[0064]

【数26】 数5、数6より、(Equation 26) From equations 5 and 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 was proved that the formula 17 holds. Next, a process of determining a specific circuit configuration of each rotation calculation unit 102 to 104 will be described. Each rotation calculation unit 102-1
The discrete angle rotation calculation unit that constitutes each stage of 04 executes the calculation shown in Formula 5. Therefore, θ = -2π
All required δ (δ [0] to δ [n-1]) for three angles of / 16, −π / 16 and −5π / 16, p (p
By determining the values of [0] to p [n-1]) and q (q [0] to q [n-1]), the specific circuit configuration of each rotation calculation unit 102 to 104 is unique. Can be led to.

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

【0067】即ち、E=0.000005 とする。 (Step2)次に、k[i] = cosθ[i] とする。このよう
にk[i]を設定することで、数3、数4がそれぞれ数2
8、数29に簡略化され、CORDIC手法との対比を
明瞭にすることができるからである。
That is, E = 0.000005. (Step 2) Next, k [i] = cos θ [i]. By setting k [i] in this way, Equation 3 and Equation 4 are respectively Equation 2
This is because it is simplified to 8 and 29 and the contrast with the CORDIC method can be clarified.

【0068】[0068]

【数28】 [Equation 28]

【0069】[0069]

【数29】 なお、数29より、全てのiについて、q[i]=0とな
る。 (Step3)続いて、 Δθ[0](=|θ−δ[0]・θ[0]|) を最小にするδ[0]及びθ[0]を決定する。
(Equation 29) Note that 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ー1ー2 かつ δ[0]=−
1とすることで、Δθ[0]を最小にできることが導き出
せる。以上より、第2回転演算部103に関して、p
[0](=−2)、q[0](=0)及びδ[0](=−1)が
決定された。 (Step4)同様にして、 Δθ[1](=|θ−δ[0]・θ[0]−δ[1]・θ[1]|) を最小にするδ[1]及びθ[1]を決定する。
Considering the conditions of δ [i] = ± 1 and Formula 28, for example, in the case of the second rotation calculation unit 103 (θ = −π /
If 16), θ [0] = tan -1 2-2 cutlet δ [0] = -
By setting the value to 1, it can be derived that Δθ [0] can be minimized. From the above, regarding the second rotation calculation unit 103, p
[0] (=-2), q [0] (= 0) and δ [0] (=-1) were determined. (Step 4) Similarly, δ [1] and θ [1] which minimize Δθ [1] (= | θ−δ [0] ・ θ [0] −δ [1] ・ θ [1] |) To decide.

【0071】第2回転演算部103の場合であれば、θ
[1]=tanー1ー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, θ
[1] = tan -1 2-4 cutlet [delta] [0] = 1 or to it, [Delta] [theta]
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, ...
When p [i], q [i], and δ [i] for ... Are sequentially determined, in the case of the second rotation calculation unit 103, when i = 4, Δθ [i] is not calculated for the first time. <E is satisfied, and the decision 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 is the first rotation calculation unit 102 (θ = −2π / 16), Table 5 is the second rotation calculation unit 103 (θ = −π / 16), and Table 6 is the third rotation calculation unit 102 (θ = −5π). / 16). Note that these tables also show the values of k [i] and k defined by Equation 6.

【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 calculation section 103 has the circuit configuration shown in FIG.
Further, depending on the configuration of the second rotation calculation unit 103 shown in FIG. 3 and the values of δ [i] and p [i] shown in Tables 4 to 6, (note that q
[i] is all zero. ), The circuit configurations of the first rotation calculation unit 102 and the third rotation calculation unit 104 can be easily analogized. That is, the first rotation calculation unit 102 and the second rotation calculation unit 10
Each of 3 has a 5-stage pipeline configuration, and the third rotation calculation unit 104 has a 6-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を
乗ずる)処理を除いたものに等しい。
Further, as described above, the six correction units 10
5 to 110 are values (= √) according to the conventional method shown in FIG.
The correction is performed using a value obtained by multiplying 2) by constants k2, k1, and k5. As can be seen from Equation 17, the theoretical value (x ', y') to be obtained is the value obtained by multiplying the data (x [n], y [n]) output from each rotation calculation unit by the correction value k. Because it is equal to (approximate). The concrete values of k2, k1, and k5 are
It is the value written at the end of the k column shown in Table 4, Table 5, and Table 6, respectively, and is unique when n, δ [i], p [i], and q [i] are determined. It is a value that is determined dynamically. (Second Embodiment) The second embodiment is a two-dimensional 8th order, that is, 8 ×.
DCT for performing high-speed DCT on 8-pixel input data
It concerns the device. (Overall Configuration and Function) FIG. 4 is a calculation flow graph showing the overall configuration of the apparatus. "1-DDCT" in the figure
Further results in the calculation flow graph shown in FIG.
The calculation flow graph of FIG. 5 is equivalent to the calculation flow graph of FIG. 2 in the first embodiment excluding the correction (multiplication by √2 · k) processing at the final 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 input pixel data, F [0] [0] to F [7] [7], represent DCT coefficients obtained by this device. In addition, k00 to k77 are constants and satisfy the formula 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 the present embodiment. This is because the correspondence relationship between each constituent block and the calculation flow graph is the same as in the case of the first embodiment, so that the structure of this device can be easily derived from the calculation flow graphs of FIGS. 4 and 5.

【0080】即ち、本装置における図5に対応する部分
(以下、「1−D DCTモジュール」という。)の構
成は、図1に示された構成から6個の補正部105〜1
10を除いたものに等しい。また、図4から明らかなよ
うに、本装置の全体は、図中の左列に並んだ8個の1−
D DCTモジュール(以下、「前段部」という。)
と、図中の右列に並んだ8個の1−D DCTモジュー
ル(以下、「後段部」という。)と、64個の補正部と
から構成される。
That is, the configuration of the portion (hereinafter, referred to as "1-D DCT module") corresponding to FIG. 5 in this apparatus is the six correction units 105 to 1 from the configuration shown in FIG.
It is equal to the one without 10. Further, as is clear from FIG. 4, the entire apparatus is composed of eight 1-lines arranged in the left column in the figure.
D DCT module (hereinafter referred to as "pre-stage")
And eight 1-D DCT modules (hereinafter, referred to as “post-stage part”) arranged in the right column in the figure, and 64 correction parts.

【0081】以上のように構成された本装置によって2
次元8次のDCTが実現される根拠は以下の通りであ
る。一般に、2次元N次のDCTは、数31に示され
る。
With the present apparatus configured as described above,
The grounds for realizing the DCT of the 8th order are as follows. In general, the two-dimensional Nth-order DCT is shown in Expression 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-th order DCT shown on the right side of Equation 31
Is decomposed into a plurality of one-dimensional N-th order DCTs. That is, 2
The dimensional Nth-order DCT is a pre-stage unit that performs a one-dimensional Nth-order DCT on each of N sets of input data obtained by dividing N × N input data into N pieces, and the output data thereof is more constant. Is divided into N pieces of output data divided into N pieces, respectively, and is decomposed into a post-stage portion that performs one-dimensional N-order DCT.

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

【0084】図4及び図5の計算フローグラフから判る
ように、本装置は、基本的には、第1実施例の装置が1
6個集まったものに等しい。但し、本装置においては、
上述したように、個々の1−D DCTモジュールは、
その内部に補正部を有さない点で第1実施例の装置と異
なる。これは、数7の1次元N次のDCTの式より導か
れる性質 F[s・u]=s・F[u] を利用して、前段部に属する1−D DCTモジュール
で本来必要とされる補正(例えば、√2・kiを乗ずる
こと)と後段部に属する1−D DCTモジュールで本
来必要とされる補正(例えば、√2・kjを乗ずるこ
と)とを結合させることにより、2回の補正を1回の補
正(例えば、2・ki・kjを乗ずること)で済ませるた
めである。
As can be seen from the calculation flow graphs of FIGS. 4 and 5, this apparatus is basically the same as the apparatus of the first embodiment.
Equal to a collection of six. However, in this device,
As mentioned above, the individual 1-D DCT modules are
It 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-D DCT module belonging to the preceding stage by using the property F [s · u] = s · F [u] derived from the one-dimensional Nth-order DCT equation of Eq. 2 times by combining the correction (for example, multiplying by √2 · ki) and the correction originally required by the 1-D DCT module belonging to the latter part (for example, multiplying by √2 · kj). This is because the correction of 1 is required only once (for example, multiplying by 2 · ki · kj).

【0085】よって、本装置において、後段部の1−D
DCTの出力データに対して、64個の補正部によ
り、数30に示された補正値が乗算されることにより、
少ない処理ステップで2次元8次のDCT係数が得られ
る。なお、個々の1−D DCTモジュールの詳細な動
作は、第1実施例の場合と同様であるので、その説明は
省略する。 (従来手法との比較)次に、2次元8次のDCTに必要
とされる演算の種類と回数について、本装置による場合
と従来手法による場合とを比較して説明する。
Therefore, in this apparatus, 1-D of the rear stage section
The output data of the DCT is multiplied by the correction value shown in Expression 30 by the 64 correction units,
A two-dimensional 8th order DCT coefficient can be obtained with a small number of processing steps. The detailed operation of each 1-D DCT module is the same as that of the first embodiment, and therefore its explanation is omitted. (Comparison with Conventional Method) Next, the types and the number of operations required for the two-dimensional 8th order DCT will be described by comparing the case of this apparatus and 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, in order to compare with the first conventional method,
When the input data for one block consisting of 8 × 8 pixels is given, the number of multiplications executed in this device is obtained. In this device, the two "1 /" shown in FIG.
√2 ”requires two multiplications per 1-DDCT module, and this device has 16 1-D
Since the DCT module and the 64 correction units are included, a total of 96 (= 2 × 16 + 64) multiplications 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 the number of multiplications of 256 is reduced to 176. In addition, MPE
In the standard such as G, the value of the constant K in the equation 31 is different from that of this embodiment (K = √2), but k00 to k in this embodiment
This can be dealt with by scaling the value of 77 in advance, and this does not change the number of multiplications required.

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

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

【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, each calculation of the discrete rotation angle performs two shifts and three additions and subtractions (x [i], y [i], z [i]). Since one and one condition judgment are required, a total of 96 shifts, 144 additions and subtractions, and 48 condition judgments are required for the calculation of the discrete rotation angle of 48 times. On the other hand, in this device, addition / subtraction is performed 10 times for rotation calculation of −2π / 16, −π
Since the addition / subtraction is required 10 times for the rotation operation of / 16 and the addition / subtraction is performed 12 times for the rotation operation of −5π / 16, only a total of 32 additions / subtractions are required. Moreover, with this device, CO
The control units needed in the RDIC approach, namely the LUT, z
The calculation unit and the determination unit are 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 drastically reduced, and the circuit structure becomes compact. It is considered that such an effect is essentially based on the fact that the present apparatus is configured by a process or a circuit that performs a rotation calculation of a predetermined angle instead of an arbitrary angle. Although the DCT device according to the present invention has been described above based on the embodiments, it goes without saying that the present invention is not limited to these embodiments. That is, (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 the method using software can also obtain the same effect as the case using hardware, that is, the effect that the processing steps are shortened. (2) In the first and second embodiments, the device that performs DCT has been described, but the same applies to the device that performs inverse DCT. For example, the two-dimensional inverse DCT is
Generally, it is expressed by the equation of Expression 32, but the two-dimensional inverse DCT is also 2
This is because, like the three-dimensional DCT, it is also expressed as a calculation flow graph using a two-dimensional rotation calculation.

【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 are 8th-order DC
Although T has been 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 known 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) The DCT devices according to the first and second embodiments performed the DCT defined by the equations 7 and 31, respectively, but other definitions are possible as long as they can be expressed using the two-dimensional rotation calculation. May be a DCT. (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] is repeated, but the method is not limited to such a method.
For example, it may be possible to set 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装置は、画像デ
ータを対象としたが、これに限定されることはなく、例
えば、音声データ等であってもよい。
However, 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. This is because n, δ [i], p [i], and q [i] that satisfy Equations 2, 3, and 4 are determined for smaller n. (6) Although the DCT devices according to the first and second embodiments target image data, the present invention is not limited to this, and may be audio data, for example.

【0094】[0094]

【発明の効果】以上の説明から明らかなように、請求項
1及び3記載の本発明に係る離散余弦変換及び逆離散余
弦変換方法及び装置は、DCT/逆DCTを所定角度
(θ)の2次元回転演算を用いて行うものであり、それ
ら2次元回転演算は必要最低限の個数の所定の離散角度
の回転演算に分解されている。そして、それら各回転演
算は、2のべき乗との乗算と加減算で表される。
As is apparent from the above description, the discrete cosine transform and the inverse discrete cosine transform method and apparatus according to the present invention as defined in claims 1 and 3 make DCT / inverse DCT a predetermined angle (θ) of 2. The two-dimensional rotation calculation is performed by using a two-dimensional rotation calculation, and the two-dimensional rotation calculation is decomposed into a minimum necessary number of rotation calculations of predetermined discrete angles. Then, each of these rotation operations is represented by multiplication and addition / subtraction with a power of two.

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

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

【0097】請求項4記載の離散余弦変換及び逆離散余
弦変換装置によれば、前記2次元回転演算は単純な離散
角度の回転演算を順次行うパイプラインにより構成され
る。これにより、従来のCORDIC手法で必要とされ
たルックアップテーブルや比較器等が不要になると共に
少ない回路規模で2次元回転演算部が構築されるので、
高速かつコンパクトなDCT/逆DCT装置が実現され
る。
According to the discrete cosine transform and the inverse discrete cosine transform device of the fourth aspect, the two-dimensional rotation calculation is composed of a pipeline for sequentially performing rotation calculation of simple discrete angles. As a result, the look-up table, the comparator, etc., which are required in the conventional CORDIC method, become unnecessary, and the two-dimensional rotation calculation unit is constructed with a small circuit scale.
A high speed and compact DCT / inverse DCT device is realized.

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

【図1】本発明の第1実施例に係るDCT装置の構成を
示すブロック図である。
FIG. 1 is a block diagram showing 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 operation contents of a one-dimensional eight-order DCT performed by the same apparatus.

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

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

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

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

【図7】従来のCORDIC手法による2次元回転演算
をハードウェアで実現した場合の構成を示すブロック図
である。
FIG. 7 is a block diagram showing a configuration when a two-dimensional rotation calculation 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 Preprocessor 102-104 Rotation calculator 105-110 Corrector 340-344 Discrete angle rotation calculator 345 Output buffer 300-305, 310-315 Register 320, 322, 324, 331, 333 Adder 321, 323, 330, 332, 334 Subtractor

Claims (4)

【特許請求の範囲】[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 predetermined angle (.theta.) Expressed by equation 1 for discrete cosine transform and inverse discrete cosine transform in a data compression / expansion device.
The method of using the two-dimensional rotation calculation of No. 2, wherein input for calculating input data (x [0], y [0]) to be the two-dimensional rotation calculation from the data to be converted is input. A data calculation step, and equations (2), (3) and (3) obtained in advance based on the predetermined angle (θ) for the input data (x [0], y [0]) calculated in the input data calculation step. N δs (δ [0] to δ [n-1]), p (p [0] to p [n-1]), and q (q [0] to q [n-1]) satisfying Equation 4 are satisfied. ) Is used to perform the rotation operation of the discrete angle shown in Expression 5 from i = 0 to i = n−1.
It includes a discrete angle rotation calculation step to be executed once, output data (x [n], y [n]) finally obtained by the discrete angle rotation calculation step, and a predetermined coefficient (k) shown in Equation 6. A discrete cosine transform method and an inverse discrete cosine transform method, comprising: a step of correcting output data by calculating a product with a constant. [Equation 1] However, (x, y) is the data before rotation, and (x ', y') is the theoretical value after rotation. [Equation 2] (Equation 3) (Equation 4) However, δ [i] = ± 1, p [i] and q [i] are integers, n is a positive integer, E is a predetermined allowable error angle, and k [i] is a real number. (Equation 5) (Equation 6)
【請求項2】 前記離散角度回転演算ステップにおける
n個のδ、p及びqは、数2、数3及び数4に加えて、
各iについての数2の左辺の値を最小にする組合せであ
ることを特徴とする請求項1記載の離散余弦変換及び逆
離散余弦変換方法。
2. The n δs, p and q in the discrete angle rotation calculation step are in addition to the equations (2), (3) and (4),
The discrete cosine transform and inverse discrete cosine transform method according to claim 1, wherein the combination is a combination that minimizes the value on the left side of the equation 2 for each i.
【請求項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. A predetermined angle (.theta.) Shown in equation 1 for discrete cosine transform and inverse discrete cosine transform in a data compression / expansion device.
Which is a device for performing the two-dimensional rotation calculation, and which inputs input data (x [0], y [0]) to be the two-dimensional rotation calculation from the data to be converted. Data calculation means, and the input data (x [0], y [0]) calculated by the input data calculation means, which are obtained in advance based on the predetermined angle (θ). N δs (δ [0] to δ [n-1]), p (p [0] to p [n-1]), and q (q [0] to q [n-1]) satisfying Equation 4 are satisfied. ) Is used to perform the rotation calculation of the discrete angle shown in Formula 5 n times from i = 0 to i = n-1, and finally obtained by the discrete angle rotation calculation means. Correction means for correcting the output data by calculating a product of the output data (x [n], y [n]) obtained and a constant including the predetermined coefficient (k) shown in Expression 6. Discrete cosine transform and inverse discrete cosine transform unit and said.
【請求項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記載の離散余弦変換及び逆離散
余弦変換装置。
4. The discrete angle rotation calculation means is composed of n stages of rotation calculators (R (0) to R (n-1)) connected in series as a pipeline, and each stage of rotation calculators. 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 2-input arithmetic units ALUx [i] and ALUy [i], the register REGx [i] and the two-input arithmetic unit ALUx [i].
And ALUy [i] means that the data x [i] output from the register REGx [i] is shifted by q [i] bits and input to one of the arithmetic units ALUx [i] and p [i]. ] Bits are shifted so as to be input to one of the two-input operation units ALUy [i], and the registers REGy [i] and the two-input operation units ALUx are connected.
[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 units ALUx [i]. The 2-input arithmetic unit ALUy is inputted and shifted by q [i] bits.
The two-input arithmetic units ALUx [i] and ALUy [i] are connected so that they are input to the other one of [i], and δ [i]
The two-input arithmetic units ALUx [i] and ALUy [i] are predetermined adders or subtracters based on the above, except when they belong to the final-stage rotation arithmetic unit R (n-1). hand,
The results of these calculations are used as the next-stage rotation calculator R (i + 1)
4. The discrete cosine transform and inverse discrete cosine transform device according to claim 3, wherein the discrete cosine transform and the inverse discrete cosine transform are output to the 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 true JPH09223124A (en) 1997-08-26
JP3095348B2 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009110560A1 (en) * 2008-03-06 2009-09-11 日本電気株式会社 Cordic operational 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

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009110560A1 (en) * 2008-03-06 2009-09-11 日本電気株式会社 Cordic operational circuit and method
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
US9021003B2 (en) 2010-06-23 2015-04-28 Nec Corporation Processor and operating method
KR101358417B1 (en) * 2012-09-17 2014-02-06 고려대학교 산학협력단 Device for discrete cosine transform

Also Published As

Publication number Publication date
JP3095348B2 (en) 2000-10-03

Similar Documents

Publication Publication Date Title
RU2273044C2 (en) Method and device for parallel conjunction of data with shift to the right
US20070094320A1 (en) Parallel Adder-Based DCT / IDCT Design Using Cyclic Convolution
KR20080107474A (en) Transform design with scaled and non-scaled interfaces
US10983755B2 (en) Transcendental calculation unit apparatus and method
JPH07236143A (en) High-speed digital signal decoding method
JPH1078863A (en) Method for executing microprocessor integer division operation using floating point type hardware and device therefor
De Caro et al. High-performance special function unit for programmable 3-D graphics processors
US7634524B2 (en) Arithmetic method and function arithmetic circuit for a fast fourier transform
US7020671B1 (en) Implementation of an inverse discrete cosine transform using single instruction multiple data instructions
US9151842B2 (en) Method and apparatus for time of flight sensor 2-dimensional and 3-dimensional map generation
Kumar et al. Area and frequency optimized 1024 point Radix-2 FFT processor on FPGA
JP3857308B2 (en) Apparatus and method for performing inverse discrete cosine transform
CN115658008A (en) Resource multiplexing type transcendental function operation implementation method
Chiper et al. A New Systolic Array Algorithm and Architecture for the VLSI Implementation of IDST Based on a Pseudo-Band Correlation Structure.
WO1996004733A9 (en) System and method for inverse discrete cosine transform implementation
JP5733379B2 (en) Processor and calculation method
JP3095348B2 (en) Discrete cosine transform and inverse discrete cosine transform device in data compression / decompression device
JP3129392B2 (en) Two-dimensional IDCT circuit
KR100227271B1 (en) Inverse discrete cosine transformation method
Panda Performance Analysis and Design of a Discreet Cosine Transform processor Using CORDIC algorithm
JP2002519957A (en) Method and apparatus for processing a sign function
Bariamis et al. Adaptable, fast, area-efficient architecture for logarithm approximation with arbitrary accuracy on FPGA
JP4243277B2 (en) Data processing device
Dawid et al. High speed bit-level pipelined architectures for redundant CORDIC implementation
JP2009124353A (en) Data transform apparatus and control method thereof

Legal Events

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