JPH07200539A - Two-dimensional dct arithmetic unit - Google Patents

Two-dimensional dct arithmetic unit

Info

Publication number
JPH07200539A
JPH07200539A JP35255893A JP35255893A JPH07200539A JP H07200539 A JPH07200539 A JP H07200539A JP 35255893 A JP35255893 A JP 35255893A JP 35255893 A JP35255893 A JP 35255893A JP H07200539 A JPH07200539 A JP H07200539A
Authority
JP
Japan
Prior art keywords
column
output
components
component
stage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP35255893A
Other languages
Japanese (ja)
Inventor
Hideyo Tsuruta
英世 鶴田
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 JP35255893A priority Critical patent/JPH07200539A/en
Publication of JPH07200539A publication Critical patent/JPH07200539A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PURPOSE:To calculate the two-dimensional DCT/IDCT in a circuit constitution of a smaller scale than the conventional one. CONSTITUTION:This arithmetic unit consists of a one-dimensional DCT unit of the first stage, an intermediate buffer and a one-dimensional DCT unit of the second stage which operate via a pipeline. An (8X8)-pixel block matrix is externally read in order of O-th, 7th, 1st, 6th, 2nd, 5th, 3rd and 4th rows and in order of O-th, 7th, 1st, 6th, 2nd, 5th, 5rd and 4th columns respectively. These orders are changed by the simple address conversion when a DCT coefficient is written. The one-dimensional DCT unit applying conventionally a distribution arithmetic method consists of a constant multiplier and a totalizer. In such a constitution, the intermediate buffer can be reduced down to a quarter and the constitution of a computing element is simplified.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、信号処理装置において
二次元離散余弦変換(DCT(Discrete CosineTransform)
と略す)と離散余弦逆変換(IDCT(Inverse Discrete Co
sine Transform)と略す)との何れかを演算する演算装
置に関する。
BACKGROUND OF THE INVENTION The present invention relates to a two-dimensional discrete cosine transform (DCT) in a signal processing device.
Abbreviated) and inverse discrete cosine transform (IDCT (Inverse Discrete Co
sine Transform) and either).

【0002】[0002]

【従来の技術】画像や音声の圧縮/伸長など多くの信号
処理分野において高速なDCT演算が求められている。DCT
は処理演算量が膨大であるため、これを実時間で処理す
るために大きな回路規模が必要である。従来の二次元DC
T演算装置は、例えば公告特許平5-26229号公報、米国特
許第 4791598号(1988年12月13日)及びM.T.Sun,L.Wu,a
nd M.L. Liou,"A Concurrent Architecture for VLSI I
mplementation of Discrete Cosine Transform," IEEET
rans. on Circuits and Systems,Vol. CAS-34,No.8,pp.
992-994,Aug. 1987、及びM.T. Sun,T.C. Chen,A. Gottl
ieb,L. Wu,and M.L. Liou,"A 16x16 Discrete Cosine T
ransform Chip," Visual Commun. and Image Process.
II,SPIE,Vol. 845,pp. 13-18,Oct. 1987、及びM.T. Su
n,T.C. Chen,and A. M. Gottlieb,"VLSI Implementatio
n of a 16×16 Discrete Cosine Transform," IEEE Tra
ns. Circuits and Systems,Vol. CAS-36,pp. 610-617,A
pr. 1989、及びT.C. Chen,M.T. Sun,and A. M. Gottlie
b,"VLSI Implementation of a 16x16 DCT," ICASSP 88,
Intl. Conf. Acoust.,Speech, and Signal Process.,p
p. 1973-1976,Apr. 1988に示されている。
2. Description of the Related Art High-speed DCT calculation is required in many signal processing fields such as compression / expansion of images and sounds. DCT
Requires a large circuit scale in order to process this in real time because the amount of processing calculation is enormous. Conventional two-dimensional DC
The T arithmetic unit is, for example, Japanese Patent Publication No. Hei 5-26229, US Pat. No. 4,791,598 (December 13, 1988) and MT Sun, L. Wu, a
nd ML Liou, "A Concurrent Architecture for VLSI I
mplementation of Discrete Cosine Transform, "IEEET
rans.on Circuits and Systems, Vol. CAS-34, No.8, pp.
992-994, Aug. 1987, and MT Sun, TC Chen, A. Gottl
ieb, L. Wu, and ML Liou, "A 16x16 Discrete Cosine T
ransform Chip, "Visual Commun. and Image Process.
II, SPIE, Vol.845, pp.13-18, Oct.1987, and MT Su
n, TC Chen, and AM Gottlieb, "VLSI Implementatio
n of a 16 × 16 Discrete Cosine Transform, "IEEE Tra
ns. Circuits and Systems, Vol. CAS-36, pp. 610-617, A
pr.1989, and TC Chen, MT Sun, and AM Gottlie
b, "VLSI Implementation of a 16x16 DCT," ICASSP 88,
Intl. Conf. Acoust., Speech, and Signal Process., P
p. 1973-1976, Apr. 1988.

【0003】(図10),(図11),(図12)は従
来例の構成図を示す。従来例はN×Nの二次元DCTについ
て述べているが、ここでは簡単のために8×8の場合に限
定する。また画素データ,内部数値表現及びDCT係数は1
6ビットから8ビット程度の固定小数点数であるとする。
(図10)において、203は第一の列N×1 DCTプロセ
サである。205はN×N変換メモリである。207は第
二の行N×1 DCTプロセサである。209はタイミング及
び制御信号発生器である。211,212はタイミング
及び制御信号である。216は読み取り/書き込みアド
レス及び制御回路である。214は読み取り/書き込み
アドレス及び制御信号である。(図11)において、3
13は入力レジスタである。315はホールディングレ
ジスタである。381と383はそれぞれN/2個の直列
加算器と直列減算器である。317はRAC(ROM and accu
mulator)である。319は出力レジスタである。38
5,387はN/2ビットバスである。445,447は1
6ワードROMである。449は加算器である。451は加
算/減算器である。453はシフトレジスタである。
(FIG. 10), (FIG. 11) and (FIG. 12) are block diagrams of a conventional example. The conventional example describes an N × N two-dimensional DCT, but here, for simplicity, it is limited to the case of 8 × 8. In addition, the pixel data, internal numerical representation, and DCT coefficient are 1
It is assumed that it is a fixed point number of 6 to 8 bits.
In FIG. 10, 203 is the first column N × 1 DCT processor. 205 is an N × N conversion memory. 207 is a second row N × 1 DCT processor. 209 is a timing and control signal generator. 211 and 212 are timing and control signals. Reference numeral 216 is a read / write address and control circuit. Reference numeral 214 is a read / write address and control signal. In FIG. 11, 3
Reference numeral 13 is an input register. Reference numeral 315 is a holding register. Reference numerals 381 and 383 denote N / 2 serial adders and serial subtractors, respectively. 317 is RAC (ROM and accu
mulator). Reference numeral 319 is an output register. 38
5,387 are N / 2 bit buses. 445, 447 is 1
It is a 6-word ROM. Reference numeral 449 is an adder. Reference numeral 451 is an adder / subtractor. Reference numeral 453 is a shift register.

【0004】従来例では、8×8のDCTに対して4ビットの
RACを用いるとしているが、16ビット画素データを処理
するためには直列加算器381,直列減算器383,RA
C317などがシフトレジスタなど他の部分の倍の周波
数で動作せねばならない(詳細については上記論文に記
載されている。)。全体に同一の周波数が供給される場
合、(図12)に示す8ビットのRACが必要である。
In the conventional example, 4 bits of 8 × 8 DCT are used.
Although RAC is used, in order to process 16-bit pixel data, serial adder 381, serial subtractor 383, RA
The C317 and the like must operate at double the frequency of other parts such as the shift register (details are given in the above paper). If the same frequency is supplied to all, 8-bit RAC shown in (FIG. 12) is required.

【0005】[0005]

【発明が解決しようとする課題】しかしながら上記従来
技術の二次元DCT演算装置は、二つの一次元DCT演算装置
とN×N語の行-列転置用の変換メモリを必要とするた
め、これらハードウェアが費やす素子数,回路面積,消
費電力は大きいという問題点があった。また上記従来技
術の二次元DCT演算装置は、分布アリスメティック(dist
ributed arithmetic)法を用いてビット直列にDCT演算を
行うため、多数の内部バッファとシフトレジスタが必要
であるという問題点があった。
However, the above-mentioned two-dimensional DCT arithmetic unit of the prior art requires two one-dimensional DCT arithmetic units and a conversion memory for row-column transposition of N × N words. There was a problem that the number of elements consumed by the wear, the circuit area, and the power consumption were large. In addition, the above-mentioned conventional two-dimensional DCT computing device is
There is a problem that a large number of internal buffers and shift registers are required to perform DCT operation in serial bit using the ributed arithmetic method.

【0006】本発明は、上記問題点に鑑み、従来の二次
元DCT演算装置と同等の性能を保ちながらより少ないハ
ードウェアで構成される新規の二次元DCT演算装置を提
供することを目的とする。
In view of the above problems, it is an object of the present invention to provide a novel two-dimensional DCT arithmetic device which has performance equivalent to that of a conventional two-dimensional DCT arithmetic device and which is configured with less hardware. .

【0007】[0007]

【課題を解決するための手段】上記課題を解決するため
に本発明の二次元DCT演算装置は、二段の一次元DCT演算
手段を備え、N×N個の成分を有するデータ行列に対して
二次元離散余弦変換を演算し、変換結果の行列の各成分
を外部メモリに書き込む二次元DCT演算装置であって、
二次元DCTの対象となるデータ行列を、(数1)に示す
読み出し番号順に対応する成分を一成分ずつ読み出す読
み出し手段と、前記読み出し手段によって読み出された
二成分ずつに対して第一段目の一次元DCTを行い、変換
結果を一列分ずつ生成する第一の一次元DCT演算手段
と、前記第一の一次元DCT演算手段が生成した二列分の
それぞれの成分を、行順に二成分ずつ読み出してゆく第
二の読み出し手段と、前記第二の読み出し手段によって
読み出された二成分に第二段目の一次元DCTを行い、変
換結果の行列を生成する第二の一次元DCT演算手段と、
前記第二の一次元DCT演算手段が生成した変換結果の行
列を一成分ずつ外部メモリに書き込む書き込み手段とを
備えている。
In order to solve the above-mentioned problems, a two-dimensional DCT operation device of the present invention is provided with a two-stage one-dimensional DCT operation means for a data matrix having N × N elements. A two-dimensional DCT arithmetic device that calculates a two-dimensional discrete cosine transform and writes each component of the matrix of the conversion result to an external memory,
For the data matrix to be subjected to the two-dimensional DCT, the first stage for the reading means for reading out the components corresponding to the reading number order shown in (Equation 1) one by one and the two components read by the reading means The first one-dimensional DCT calculation means for performing one-dimensional DCT and generating the conversion result for each column, and the two-column components generated by the first one-dimensional DCT calculation means are two components in row order. A second read-out means for reading out one by one, and a second one-dimensional DCT operation for performing a second-stage one-dimensional DCT on the two components read out by the second read-out means to generate a matrix of the conversion result. Means and
And a writing unit that writes the matrix of the conversion result generated by the second one-dimensional DCT calculation unit to the external memory one by one.

【0008】また、前記第一の一次元DCT手段は、第一
の加減算手段と、第一の定数乗算手段と、第一の累算手
段とを有し、第一の加減算手段は、読み出し手段によっ
て読み出された二成分同士の加算及び減算を行い、第一
の定数乗算手段は、第一段目の一次元DCTにおける一行
×一列の積和計算において、第一の加減算手段による加
算結果及び減算結果を乗数とする部分積を全て求め、第
一の累算手段は、加減算結果一列分の第一の定数乗算手
段の部分積の累算値を求めて、求めた累算値を第二の読
み出し手段に出力し、前記第二の一次元DCT手段は、第
二の加減算手段と、第二の定数乗算手段と、第二の累算
手段とを有し、第二の加減算手段は、第二の読み出し手
段によって読み出された二成分同士の加算及び減算を行
い、第二の定数乗算手段は、第二段目の一次元DCTにお
ける一行×一列の積和計算において、第二の加減算手段
による加算結果及び減算結果を乗数とする部分積を全て
求めて、第二の累算手段は、加減算結果一行分の第一の
定数乗算手段の部分積の累算値を求めて、求めた累算値
を書き込み手段に出力してもよい。
Further, the first one-dimensional DCT means has a first addition / subtraction means, a first constant multiplication means, and a first accumulation means, and the first addition / subtraction means is a reading means. Performs addition and subtraction of the two components read by, the first constant multiplication means, in the product sum calculation of one row × one column in the one-dimensional DCT of the first stage, the addition result by the first addition and subtraction means All partial products with the subtraction result as a multiplier are obtained, and the first accumulating means obtains the accumulated value of the partial products of the first constant multiplying means for one column of the addition / subtraction result, and the obtained accumulated value is the second value. Output to the reading means, the second one-dimensional DCT means has a second addition and subtraction means, a second constant multiplication means, and a second accumulation means, the second addition and subtraction means, Addition and subtraction of the two components read by the second reading means are performed, and second constant multiplication means , In the one-row × one-column product-sum calculation in the second-stage one-dimensional DCT, all the partial products using the addition result and the subtraction result by the second addition and subtraction means as multipliers are obtained, and the second accumulation means performs addition and subtraction. As a result, the accumulated value of the partial products of the first constant multiplication means for one row may be obtained, and the obtained accumulated value may be output to the writing means.

【0009】また、前記第一の加減算手段は、二段のシ
フトレジスタと、第一の入力バッファと、第二の入力バ
ッファと、第一の加減算器とを有し、二段のシフトレジ
スタは、一成分ずつシフトして、読み出し手段によって
読み出された入力信号系列の二成分を保持し、第一の入
力バッファは、二段のシフトレジスタが二回シフトする
度に前段の保持する一成分を受け取り、第二の入力バッ
ファは、二段のシフトレジスタが二回シフトする度に後
段の保持する一成分を受け取り、第一の加減算器は、第
一の入力バッファ及び第二の入力バッファ内の二成分同
士の加算及び減算を交互に行い、第一の定数乗算手段
は、前記第一の加減算器に接続されるN/2個の第一の定
数乗算器を有し、各々の第一の定数乗算器は、第一段目
の一次元DCTにおける一行×一列の積和計算において、
第一の加減算器による加算結果及び減算結果を乗数と
し、所定の行列の一成分を被乗数とする部分積を求め
て、前記第一の累算手段は、前記N/2個の定数乗算器の
それぞれに対応して接続されるN/2個の第一の加算器
と、当該N/2個の第一の加算器のそれぞれに対応して接
続されるN/2個の二段のシフトレジスタとを有し、各々
の第一の加算器は、第一の定数乗算器が出力した積と、
二段のシフトレジスタの後段から出力される成分とを加
算し、各々の二段のシフトレジスタは、第一の加算器が
出力した成分をシフトしながら二成分保持し、保持した
二成分を一成分ずつシフトすることで後段の出力を第一
の加算器にフィードバックして、N×2回シフトした後
に、当該一列中の二成分を一度に第二の読み出し手段に
出力してもよい。
The first addition / subtraction means has a two-stage shift register, a first input buffer, a second input buffer, and a first adder / subtractor, and the two-stage shift register is , The two components of the input signal sequence read by the reading means are held by shifting by one component, and the first input buffer holds one component held by the preceding stage every time the two-stage shift register shifts twice. The second input buffer receives a component held in the second stage each time the two-stage shift register shifts twice, and the first adder / subtractor operates in the first input buffer and the second input buffer. The two constant components are alternately added and subtracted, and the first constant multiplication means has N / 2 first constant multipliers connected to the first adder-subtractor, Is a constant multiplier in the first-stage one-dimensional DCT. In the product-sum calculation of one row ×,
The addition result and the subtraction result by the first adder-subtractor is a multiplier, and a partial product in which one component of a predetermined matrix is a multiplicand is obtained, and the first accumulating unit is the N / 2 constant multiplier. N / 2 first adders connected corresponding to each, and N / 2 two-stage shift registers connected corresponding to each of the N / 2 first adders And each first adder has a product output by the first constant multiplier,
The components output from the subsequent stages of the two-stage shift register are added, and each of the two-stage shift registers holds the two components while shifting the components output by the first adder, and stores the two retained components into one. The output of the latter stage may be fed back to the first adder by shifting the components one by one, and after shifting N × 2 times, the two components in the one column may be output to the second reading means at once.

【0010】また、前記第二の読み出し手段は、一列バ
ッファと、第一のN段の並列/直列変換用のシフトレジ
スタと、第二のN段の並列/直列変換用のシフトレジス
タとを有し、一列バッファは、第一の一次元DCT演算手
段によって順次生成される一列分の成分を、一列おきに
受け取って保持し、保持している成分の次の列の成分が
第一の一次元DCT演算手段から出力されると、それまで
保持していた一列分の成分を第一のN段の並列/直列変
換用のシフトレジスタに一度に出力し、第一のN段の並
列/直列変換用のシフトレジスタは、前記一列バッファ
が出力した一列分の成分を保持し、保持した一列分の成
分のシフトを一成分ずつ行い、当該一列分の成分を一成
分ずつ第二の一次元DCT演算手段に出力してゆき、第二
のN段の並列/直列変換用のシフトレジスタは、第一の
一次元DCT演算手段が出力した一列分の成分で、一列バ
ッファが受け取らなかったものを保持し、保持した一列
分の成分のシフトを一成分ずつ行い、当該一列分の成分
を一成分ずつ第二の一次元DCT演算手段に出力してもよ
い。
Further, the second reading means has a one-column buffer, a first N-stage parallel / serial conversion shift register, and a second N-stage parallel / serial conversion shift register. The one-column buffer receives the components of one column sequentially generated by the first one-dimensional DCT calculation means and holds them every other column, and the component of the column next to the held component is the first one-dimensional buffer. When output from the DCT calculation means, the one-column component held until then is output to the first N-stage parallel / serial conversion shift register at once, and the first N-stage parallel / serial conversion is performed. The shift register for use holds one-column components output from the one-column buffer, shifts the held one-column components one component at a time, and performs one-column components one component at a time on the second one-dimensional DCT operation. Output to a means for parallel / serial conversion of the second N stages. The register registers the one-column components output by the first one-dimensional DCT calculation means, which are not received by the one-column buffer, shift the held one-column components one by one, and May be output to the second one-dimensional DCT calculation means one by one.

【0011】また、前記第二の加減算手段は、第二の読
み出し手段が出力した二成分同士の加算及び減算を交互
に行い、前記第二の定数乗算手段は、前記第二の加減算
手段と接続されるN/2個の第二の定数乗算器を有し、各
々の第二の定数乗算器は、第二段目の一次元DCTにおけ
る一行×一列の積和計算において、第二の加減算手段に
よる加算結果及び減算結果を乗数とし、所定の行列の一
行中の一成分を被乗数とする部分積を求めて、前記第二
の累算手段は、前記N/2個の第二の定数乗算器のそれぞ
れに対応して接続されるN/2個の第二の加算器と、当該N
/2個の第二の加算器に対応して接続されるN/2個のN×2
段のシフトレジスタとを有し、各々の第二の加算器は、
第二の定数乗算器が出力した積と、N×2段のシフトレジ
スタの最終段から出力される成分とを加算し、各々のN
×2段のシフトレジスタは、第二の加算器が出力した成
分をシフトしながら二列分保持し、保持した成分を一成
分ずつシフトすることで最終段の出力を第二の加算器に
フィードバックして、N×N回シフトした後に、当該二列
分の成分を一成分ずつ書き込み手段に出力してもよい。
The second addition / subtraction means alternately performs addition and subtraction of the two components output by the second reading means, and the second constant multiplication means is connected to the second addition / subtraction means. N / 2 number of second constant multipliers, each second constant multiplier is a second addition / subtraction means in the one-row × one-column product-sum calculation in the second-stage one-dimensional DCT. The addition result and the subtraction result by the as a multiplier, the partial product in which one component in one row of a predetermined matrix is the multiplicand, the second accumulation means, the N / 2 second constant multiplier N / 2 second adders connected to each of the N
/ N / 2 N × 2 connected corresponding to 2 second adders
And a second stage adder, each second adder having
The product output from the second constant multiplier and the component output from the final stage of the N × 2 stage shift register are added, and each N
The × 2 stage shift register holds the components output by the second adder for two columns while shifting them, and shifts the retained components one component at a time to feed back the output of the final stage to the second adder. Then, after shifting N × N times, the components for the two columns may be output to the writing unit one by one.

【0012】また、前記累算手段は、更にN/2個のN×2
段のシフトレジスタのうち、所定の一個を除くN/2-1個
の最終段に接続されるN/2-1個の出力バッファと、出力
選択器とを有し、N/2-1個の出力バッファは、N×2段の
シフトレジスタからなり、接続されるシフトレジスタか
ら一成分ずつ出力される二列分の成分をシフトを行いな
がら保持し、保持している成分を一成分ずつ順次出力選
択器に出力してゆき、出力選択器は、それぞれのN×2段
のシフトレジスタ及びN/2-1個の出力バッファの出力を
選択して出力してもよい。
Further, the accumulating means further comprises N / 2 N × 2
Of the shift registers of the stages, N / 2-1 output buffers connected to the final stage of N / 2-1 excluding a predetermined one, and an output selector, N / 2-1 The output buffer of is composed of N × 2 stages of shift registers, holds the components for two columns output from the connected shift register one component at a time while shifting, and sequentially holds the held components one component at a time. The output may be output to the output selector, and the output selector may select and output the output of each N × 2 stage shift register and N / 2-1 output buffers.

【0013】また、前記定数乗算器は、所定の行列の成
分の倍数を予め格納しているROMを有していてもよい。
また、前記定数乗算器は、所定の行列として第一段目及
び第二段目の一次元DCTに用いられる定数行列の成分及
び/又は第一段目及び第二段目の離散余弦逆変換に用い
られる定数行列の成分を予め格納していることを特徴と
してもよい。
Further, the constant multiplier may have a ROM in which a multiple of a component of a predetermined matrix is stored in advance.
In addition, the constant multiplier converts the components of the constant matrix used for the one-dimensional DCT of the first and second stages and / or the inverse discrete cosine transform of the first and second stages as a predetermined matrix. The components of the constant matrix used may be stored in advance.

【0014】前記読み出し手段は、読み出し列生成手段
と、読み出し行生成手段と、読み出しアドレス生成手段
とを備え、読み出し列生成手段は、読み出すべき成分
の、N×Nの成分を持つデータ行列における列番号を指定
し、読み出し行生成手段は、読み出し列生成手段が指定
した列における読み出しを行う成分の行番号を指定し、
読み出しアドレス生成手段は、読み出し列生成手段が生
成した列番号と、読み出し行生成手段が生成した行番号
とから、読み出すべき成分の外部メモリ中のアドレスを
生成してもよい。
The read means comprises a read column generation means, a read row generation means, and a read address generation means, and the read column generation means is a column in the data matrix having N × N components of the component to be read. The read row generation means specifies the row number of the component to be read in the column specified by the read column generation means,
The read address generation means may generate an address in the external memory of the component to be read, from the column number generated by the read column generation means and the row number generated by the read row generation means.

【0015】前記書き込み手段は、書き込み列生成手段
と、書き込み行生手段と、書き込みアドレス生成手段と
を有し、書き込み列生成手段は、演算結果の行列の成分
のうち、書き込みを行うものの列番号を生成し、書き込
み行生成手段は、書き込み列生成手段が生成した列番号
の列における、書き込みを行う成分の行番号を生成し、
書き込みアドレス生成手段は、書き込み行生成手段が生
成した行番号と、書き込み列生成手段が生成した列番号
とから、演算行列の各成分を書き込むための外部メモリ
中のアドレスを生成してもよい。
The writing means has a write column generating means, a write row generating means, and a write address generating means, and the write column generating means is the column number of the element of the matrix of the operation result to be written. And the writing row generating means generates the row number of the component to be written in the column of the column number generated by the writing column generating means,
The write address generation means may generate an address in the external memory for writing each component of the operation matrix from the row number generated by the write row generation means and the column number generated by the write column generation means.

【0016】[0016]

【作用】上記の手段により本発明の二次元DCT演算装置
において、読み出し手段によって二次元DCTの対象とな
るデータ行列が(数1)に示す読み出し番号順に一成分
ずつ読み出される。読み出し手段によって読み出された
二成分ずつに対して第一の一次元DCT演算手段が作動
し、第一段目の一次元DCTが行われ、変換結果が一列分
ずつ生成される。前記第一の一次元DCT演算手段が生成
した二列分のそれぞれの成分が第二の読み出し手段によ
って行順に二成分ずつ読み出されてゆく。前記第二の読
み出し手段によって読み出された二成分に、第二の一次
元DCT演算手段によって第二段目の一次元DCTが行われ、
変換結果の行列が生成される。前記第二の一次元DCT演
算手段が生成した変換結果の行列が、書き込み手段によ
って一成分ずつ外部メモリに書き込まれる。
With the above-described means, in the two-dimensional DCT arithmetic device of the present invention, the data matrix to be subjected to the two-dimensional DCT is read by the reading means one by one in the order of the read numbers shown in (Equation 1). The first one-dimensional DCT calculation means is operated for each two components read by the reading means, the first-stage one-dimensional DCT is performed, and the conversion result is generated for each column. Each of the two columns of components generated by the first one-dimensional DCT calculation means is read by the second reading means, two components in row order. The two components read by the second reading means, second one-dimensional DCT is performed by the second one-dimensional DCT operation means,
A matrix of conversion results is generated. The matrix of the conversion result generated by the second one-dimensional DCT calculation means is written into the external memory by the writing means one component at a time.

【0017】また、上記手段により本発明の第一の一次
元DCT手段は、第一の加減算手段と、第一の定数乗算手
段と、第一の累算手段とを有し、読み出し手段によって
読み出された二成分同士の加算及び減算が、第一の加減
算手段によって行われ、第一段目の一次元DCTにおける
一行×一列の積和計算における第一の加減算手段による
加算結果及び減算結果を乗数とする部分積が第一の定数
乗算手段によって全て求められる。加減算結果一列分の
第一の定数乗算手段の部分積の累算値が第一の累算手段
によって求められ、求められた累算値が第二の読み出し
手段に出力される。
According to the above-mentioned means, the first one-dimensional DCT means of the present invention has the first adding / subtracting means, the first constant multiplying means, and the first accumulating means, and is read by the reading means. The addition and subtraction of the output two components are performed by the first addition / subtraction means, and the addition result and the subtraction result by the first addition / subtraction means in the product sum calculation of one row × one column in the first-stage one-dimensional DCT are calculated. The partial products that are multipliers are all obtained by the first constant multiplication means. The cumulative value of the partial product of the first constant multiplying means for one column of the addition / subtraction result is obtained by the first accumulating means, and the obtained accumulated value is output to the second reading means.

【0018】また、上記手段により本発明の第二の一次
元DCT手段は、第二の加減算手段と、第二の定数乗算手
段と、第二の累算手段とを有し、第二の読み出し手段に
よって読み出された二成分同士の加算及び減算が、第二
の加減算手段によって行われ、第二段目の一次元DCTに
おける一行×一列の積和計算における第二の加減算手段
による加算結果及び減算結果を乗数とする部分積が第二
の定数乗算手段によって全て求められ、加減算結果一行
分の第一の定数乗算手段の部分積の累算値が第二の累算
手段によって求められ、求められた累算値が書き込み手
段に出力される。
According to the above means, the second one-dimensional DCT means of the present invention has the second adding / subtracting means, the second constant multiplying means, and the second accumulating means. Addition and subtraction of the two components read by the means is performed by the second addition and subtraction means, the addition result by the second addition and subtraction means in the product sum calculation of one row × one column in the one-dimensional DCT of the second stage and The partial product with the subtraction result as a multiplier is all obtained by the second constant multiplying means, and the cumulative value of the partial product of the first constant multiplying means for one line of the addition / subtraction result is obtained by the second accumulating means. The accumulated value thus obtained is output to the writing means.

【0019】また、前記第一の加減算手段は、二段のシ
フトレジスタと、第一の入力バッファと、第二の入力バ
ッファと、第一の加減算器とを有し、二段のシフトレジ
スタが一成分ずつシフトすることにより、読み出し手段
によって読み出された入力信号系列の二成分が保持され
る。二段のシフトレジスタが二回シフトする度に前段の
保持する一成分が、第一の入力バッファによって受け取
られる。二段のシフトレジスタが二回シフトする度に後
段の保持する一成分が、第二の入力バッファによって受
け取られ、第一の入力バッファ及び第二の入力バッファ
内の二成分同士の加算及び減算が、第一の加減算器によ
って交互に行われる。
The first addition / subtraction means has a two-stage shift register, a first input buffer, a second input buffer, and a first adder / subtractor. By shifting one component at a time, the two components of the input signal sequence read by the reading means are held. Each time the two-stage shift register shifts twice, one component held by the previous stage is received by the first input buffer. Each time the two-stage shift register shifts twice, one component held in the latter stage is received by the second input buffer, and addition and subtraction of the two components in the first input buffer and the second input buffer are performed. , The first adder / subtractor alternates.

【0020】また、上記手段により本発明の第一の定数
乗算手段は、前記第一の加減算器に接続されるN/2個の
第一の定数乗算器を有し、第一の加減算器による加算結
果及び減算結果を乗数とし、所定の行列の一成分を被乗
数とする第一段目の一次元DCTにおける一行×一列の積
和計算における部分積が各々の第一の定数乗算器によっ
て求められる。
According to the above means, the first constant multiplication means of the present invention has N / 2 first constant multipliers connected to the first adder / subtractor, and The partial product in the one-row × one-column product-sum calculation in the first-stage one-dimensional DCT whose addition result and subtraction result are multipliers and one component of a predetermined matrix is the multiplicand is obtained by each first constant multiplier .

【0021】また、上記手段により本発明の第一の累算
手段は、前記N/2個の定数乗算器のそれぞれに対応して
接続されるN/2個の第一の加算器と、当該N/2個の第一の
加算器のそれぞれに対応して接続されるN/2個の二段の
シフトレジスタとを有し、第一の定数乗算器が出力した
積と、二段のシフトレジスタの後段から出力される成分
との加算が、各々の第一の加算器によって行われる。第
一の加算器が出力した成分が各々の二段のシフトレジス
タによってシフトしながら二成分保持され、保持された
二成分が一成分ずつシフトされることで後段の出力が第
一の加算器にフィードバックされ、N×2回シフトした後
に、当該一列中の二成分が一度に第二の読み出し手段に
出力される。
According to the above means, the first accumulating means of the present invention comprises N / 2 first adders connected corresponding to the N / 2 constant multipliers, respectively. And N / 2 two-stage shift registers connected corresponding to each of the N / 2 first adders, and the product output from the first constant multiplier and the two-stage shift Addition with the component output from the latter stage of the register is performed by each first adder. The components output from the first adder are held in two components while being shifted by each two-stage shift register, and the held two components are shifted by one component, so that the output of the subsequent stage is transferred to the first adder. After being fed back and shifted by N × 2 times, the two components in the one row are output to the second reading means at once.

【0022】また、上記手段により本発明の第二の読み
出し手段は、一列バッファと、第一のN段の並列/直列
変換用のシフトレジスタと、第二のN段の並列/直列変
換用のシフトレジスタとを有し、一列バッファは、第一
の一次元DCT演算手段によって順次生成される一列分の
成分を、一列おきに受け取って保持し、保持している成
分の次の列の成分が第一の一次元DCT演算手段から出力
されると、それまで保持していた一列分の成分が第一の
N段の並列/直列変換用のシフトレジスタに一度に出力
され、第一のN段の並列/直列変換用のシフトレジスタ
は、前記一列バッファが出力した一列分の成分を保持
し、保持した一列分の成分のシフトを一成分ずつ行い、
当該一列分の成分が一成分ずつ第二の一次元DCT演算手
段に出力してゆき、第二のN段の並列/直列変換用のシ
フトレジスタは、第一の一次元DCT演算手段が出力した
一列分の成分で、一列バッファが受け取らなかったもの
を保持し、保持した一列分の成分のシフトを一成分ずつ
行い、当該一列分の成分が一成分ずつ第二の一次元DCT
演算手段に出力され、前記第二の加減算手段によって、
第二の読み出し手段が出力した二成分同士の加算及び減
算が交互に行われる。
According to the above-mentioned means, the second reading means of the present invention comprises a one-column buffer, a first N-stage parallel / serial conversion shift register, and a second N-stage parallel / serial conversion. And a shift register, and the one-column buffer receives and holds the components of one column sequentially generated by the first one-dimensional DCT operation means, every other column, and stores the components of the column next to the held component. When it is output from the first one-dimensional DCT calculation means, the one-column component held until then is
It is output to the N-stage parallel / serial conversion shift register at once, and the first N-stage parallel / serial conversion shift register holds the one-column component output from the one-column buffer, and the one-column stored Shift the minute component one by one,
The components for one column are output one by one to the second one-dimensional DCT operation means, and the second N-stage shift register for parallel / serial conversion is output by the first one-dimensional DCT operation means. The one-column component that is not received by the one-column buffer is held, the held one-column component is shifted one component at a time, and the one-column component is one component by the second one-dimensional DCT.
Is output to the calculation means, and by the second addition and subtraction means,
The addition and subtraction of the two components output by the second reading unit are alternately performed.

【0023】また、上記手段により本発明の第二の定数
乗算手段は、前記第二の加減算手段と接続されるN/2個
の第二の定数乗算器を有し、各々の第二の定数乗算器に
よって第二の加減算手段による加算結果及び減算結果を
乗数とし、所定の行列の一行中の一成分を被乗数とする
第二段目の一次元DCTにおける一行×一列の積和計算に
おける部分積が求められる。
According to the above means, the second constant multiplication means of the present invention has N / 2 second constant multipliers connected to the second addition / subtraction means, and each second constant The partial product in the one-row × one-column product sum calculation in the second-stage one-dimensional DCT in which the addition result and the subtraction result by the second addition and subtraction means are set as multipliers by the multiplier, and one component in one row of a predetermined matrix is set as the multiplicand Is required.

【0024】また、上記手段により本発明の第二の累算
手段は、前記N/2個の第二の定数乗算器のそれぞれに対
応して接続されるN/2個の第二の加算器と、当該N/2個の
第二の加算器に対応して接続されるN/2個のN×2段のシ
フトレジスタとを有し、第二の定数乗算器が出力した積
と、N×2段のシフトレジスタの最終段から出力される成
分とが各々の第二の加算器によって加算され、第二の加
算器が出力した成分が各々のN×2段のシフトレジスタに
よって二列分保持され、保持された成分は、一成分ずつ
シフトすることで最終段の出力を第二の加算器にフィー
ドバックされる。N×N回シフトした後に、当該二列分の
成分が一成分ずつ書き込み手段に出力される。
Further, the second accumulating means of the present invention by the above means is the N / 2 second adders connected corresponding to each of the N / 2 second constant multipliers. And N / 2 N × 2 stages of shift registers connected corresponding to the N / 2 second adders, and the product output from the second constant multiplier, N The component output from the final stage of the × 2 stage shift register is added by each second adder, and the component output by the second adder is divided into two columns by each N × 2 stage shift register. The held component is shifted by one component and the output of the final stage is fed back to the second adder. After shifting N × N times, the components of the two columns are output to the writing unit one by one.

【0025】また、上記手段により本発明の累算手段
は、更にN/2個のN×2段のシフトレジスタのうち、所定
の一個を除くN/2-1個の最終段に接続されるN/2-1個の出
力バッファと、出力選択器とを有し、接続されるシフト
レジスタから一成分ずつ出力される二列分の成分が、N/
2-1個の出力バッファによってシフトを行いながら保持
され、保持される成分が一成分ずつ順次出力選択器に出
力される。
Further, by the above means, the accumulating means of the present invention is further connected to N / 2-1 final stages except a predetermined one of N / 2 N × 2 stages of shift registers. It has N / 2-1 output buffers and an output selector, and the components for two columns output from the connected shift register one component at a time are N / 2-1.
It is held while shifting by 2-1 output buffers, and the held components are sequentially output to the output selector one by one.

【0026】[0026]

【実施例】以下にDCTについての詳細な説明を行う。IDC
Tに対しては、同様に処理が可能であり、同等の演算装
置により計算できるので、IDCTの記述を省略する。以下
の説明中で、入力される信号系列をfijまたはf(i,j)
で、fijの一次元DCTをhmnまたはh(m,n)で、fijの二次元
DCTをguvまたはg(u,v)で表す。本発明はN×Nの二次元DC
Tに関するが、8×8の場合について以下に説明を行う。
また画素データ,内部数値表現及びDCT係数は16ビット
以下の固定小数点数であるとする。
EXAMPLE A detailed description of DCT will be given below. IDC
The processing for T can be performed in the same manner and can be calculated by an equivalent arithmetic unit, so the description of IDCT is omitted. In the following explanation, the input signal sequence is f ij or f (i, j)
And the one-dimensional DCT of f ij is the two-dimensional DCT of h ij in h mn or h (m, n)
DCT is represented by g uv or g (u, v). The present invention is an N × N two-dimensional DC
Regarding T, the case of 8 × 8 will be described below.
In addition, pixel data, internal numerical expressions, and DCT coefficients are fixed-point numbers of 16 bits or less.

【0027】DCTに対して幾つかの定義式が与えられる
が、ここでは典型的にMPEGやJPEGなどの画像符号化国際
標準で規定された定義式を参照する。即ち、8×8の二次
元DCTは次式で定義される。
Although some definition formulas are given to the DCT, here, reference is made to the definition formulas typically stipulated in the image coding international standard such as MPEG and JPEG. That is, the 8 × 8 two-dimensional DCT is defined by the following equation.

【0028】[0028]

【数2】 [Equation 2]

【0029】[0029]

【数3】 [Equation 3]

【0030】[0030]

【数4】 [Equation 4]

【0031】[0031]

【数5】 [Equation 5]

【0032】[0032]

【数6】 [Equation 6]

【0033】[0033]

【数7】 [Equation 7]

【0034】[0034]

【数8】 [Equation 8]

【0035】[0035]

【数9】 [Equation 9]

【0036】[0036]

【数10】 [Equation 10]

【0037】[0037]

【数11】 [Equation 11]

【0038】[0038]

【数12】 [Equation 12]

【0039】[0039]

【数13】 (図1)は、上記の演算を行えるように構成された本発
明の実施例における二次元DCT演算装置の構成を示す図
である。二次元DCT演算装置は、第一のDCT演算部100
と、中間バッファ110と、第二のDCT演算部120
と、アドレス生成部130とで構成される。
[Equation 13] (FIG. 1) is a diagram showing a configuration of a two-dimensional DCT computation device in an embodiment of the present invention configured to perform the above computation. The two-dimensional DCT calculation device is the first DCT calculation unit 100.
, Intermediate buffer 110, and second DCT operation unit 120
And an address generator 130.

【0040】アドレス生成部130は、線形読み出しア
ドレス生成部131と、線形書き込みアドレス生成部1
35とで構成される。線形読み出しアドレス生成部13
1は、列読み出しアドレスと行読み出しアドレスに基づ
き、外部線形メモリ中のN×Nの行列成分データ(本実施
例ではN=8)の線形アドレスを計算して、計算した線形
アドレスの成分を一成分ずつ第一のDCT演算部100に
読み出す。
The address generator 130 includes a linear read address generator 131 and a linear write address generator 1.
And 35. Linear read address generation unit 13
1 is for calculating the linear address of the N × N matrix component data (N = 8 in this embodiment) in the external linear memory based on the column read address and the row read address, and calculating the linear address component Each component is read out to the first DCT calculation unit 100.

【0041】(図2)は、線形読み出しアドレス生成部
131の構成を示す図である。線形読み出しアドレス生
成部131は、log2N×2ビットカウンタ132と、行読
み出しアドレス生成部133と、列読み出しアドレス生
成部134とで構成される。log2N×2ビットカウンタ1
32は、クロックパルスを入力する入力端子と、log2N
×2個の出力端子とが備えられ、クロックパルスが入力
される度にN×N回カウントを行う。本実施例においてN=
8であるから、log2N×2ビットカウンタ132は、r0〜r
5の出力端子を備えており、0〜63の数値をr0〜r5の出力
端子に発生する。
FIG. 2 is a diagram showing the configuration of the linear read address generator 131. The linear read address generation unit 131 includes a log 2 N × 2 bit counter 132, a row read address generation unit 133, and a column read address generation unit 134. log 2 N × 2 bit counter 1
32 is an input terminal for inputting a clock pulse and log 2 N
× 2 output terminals are provided, and counts N × N times each time a clock pulse is input. In this embodiment, N =
Therefore, the log 2 N × 2 bit counter 132 has r0 to r
It is equipped with 5 output terminals, and the numbers 0 to 63 are generated at the output terminals r0 to r5.

【0042】行読み出しアドレス生成部133は、log2
N×2ビットカウンタ132が発生した数値の下位3ビッ
トを入力し、log2N×2ビットカウンタ132にクロック
パルスが入力される度に行読み出しアドレスを発生す
る。log2N×2ビットカウンタ132が発生した数値の下
位3ビットが0,1,2,3,4,5,6,7の順に増加すれば、行読
み出しアドレス生成部133は、一つの列の第0,7,1,6,
2,5,3,4行を読み出すための読み出しアドレスを発生さ
せる。
The row read address generation unit 133 uses log 2
The lower 3 bits of the numerical value generated by the N × 2 bit counter 132 are input, and a row read address is generated each time a clock pulse is input to the log 2 N × 2 bit counter 132. When the lower 3 bits of the numerical value generated by the log 2 N × 2 bit counter 132 increase in the order of 0, 1, 2, 3, 4, 5, 6, 7, the row read address generation unit 133 determines that 0,7,1,6,
Generates read addresses for reading 2,5,3,4 rows.

【0043】列読み出しアドレス生成部134は、log2
N×2ビットカウンタ132が発生した数値の上位3ビッ
トを入力し、この上位3ビットがカウントアップする度
に列読み出しアドレスを発生する。log2N×2ビットカウ
ンタ132の出力端子の上位3ビットが0,1,2,3,4,5,6,7
をカウントすれば、列読み出しアドレス生成部134
は、第0,7,1,6,2,5,3,4列を読み出すための読み出しア
ドレスを発生させる。
The column read address generator 134 uses log 2
The upper 3 bits of the numerical value generated by the N × 2 bit counter 132 are input, and a column read address is generated each time the upper 3 bits are counted up. The upper 3 bits of the output terminal of the log 2 N × 2 bit counter 132 are 0,1,2,3,4,5,6,7.
Is counted, the column read address generation unit 134
Generates a read address for reading columns 0,7,1,6,2,5,3,4.

【0044】行読み出しアドレス生成部133,列読み
出しアドレス生成部134がこのようにして読み出しア
ドレスを発生させると、読む順序は列単位に、第0,7,1,
6,2,5,3,4列の順に、列の中では第0,7,1,6,2,5,3,4行の
順となる即ち、下の表に示す通りとなる。 1 17 33 49 57 41 25 9 3 19 35 51 59 43 27 11 5 21 37 53 61 45 29 13 7 23 39 55 63 47 31 15 8 24 40 56 64 48 32 16 6 22 38 54 62 46 30 14 4 20 36 52 60 44 28 12 2 18 34 50 58 42 26 10 第一のDCT演算部100は、(数12)に示す第一段目
の一次元DCT演算を64サイクルで行う。第一のDCT演算部
100が行列Hの各成分の計算を行う順序を(図3)に
示す。図中のh00の下に記されている"1+3+5+7"とは、h
00は、1サイクル目に乗算を行い、3,5,7サイクル目に乗
算及び累算を行うことで計算されることを意味する。h
67の下に記されている"57+59+61+63"とは、h67は、57サ
イクル目に乗算を行い、59,61,63サイクル目に乗算及び
累算を行うことで計算されることを意味する。このよう
な順序で計算が行えるように第一のDCT演算部100は
構成される。
When the row read address generation unit 133 and the column read address generation unit 134 generate read addresses in this way, the reading order is 0, 7, 1, 1 in column units.
The order is 6,2,5,3,4 columns, and the order is the 0,7,1,6,2,5,3,4 rows in the columns, that is, as shown in the table below. 1 17 33 49 57 41 25 9 3 19 35 51 59 43 27 11 5 21 37 53 61 45 29 13 7 23 39 55 63 47 31 15 8 24 40 56 64 48 32 16 6 22 38 54 62 46 30 14 4 20 36 52 60 44 28 12 2 18 34 50 58 42 26 10 The first DCT operation unit 100 performs the first stage one-dimensional DCT operation shown in (Equation 12) in 64 cycles. The order in which the first DCT calculation unit 100 calculates each component of the matrix H is shown in FIG. "1 + 3 + 5 + 7" written under h 00 in the figure means h
00 means that the multiplication is performed in the first cycle, and the multiplication and accumulation are performed in the third, fifth, and seventh cycles. h
"57 + 59 + 61 + 63" written under 67 means that h 67 is calculated by multiplying at the 57th cycle, and multiplying and accumulating at the 59,61,63th cycle. Means that. The first DCT calculation unit 100 is configured so that calculations can be performed in this order.

【0045】第一のDCT演算部100は、入力シフトレ
ジスタ101,入力バッファ102,第一の加減算器1
03,第一の定数乗算器104,第一の累算器105,
及び累算シフトレジスタ106で構成される。入力シフ
トレジスタ101は二成分のデータをシフトしながら格
納する二段のシフトレジスタで構成される。具体的に
は、入力シフトレジスタ101は、線形読み出しアドレ
ス生成部131によって外部線形メモリから読み出され
た一成分のデータを第一段目のレジスタに保持させる。
線形読み出しアドレス生成部131によって次の成分が
読み出されると、それまで保持していた内容を次段のレ
ジスタにシフトする。その結果、入力シフトレジスタ1
01には、2サイクルで二成分が充填される。充填され
ると同時に入力シフトレジスタ101は、それまで保持
していた二成分分のデータを一度に入力バッファ102
に転送する。
The first DCT calculator 100 includes an input shift register 101, an input buffer 102, a first adder / subtractor 1
03, the first constant multiplier 104, the first accumulator 105,
And a cumulative shift register 106. The input shift register 101 is composed of a two-stage shift register that stores two-component data while shifting it. Specifically, the input shift register 101 causes the first-stage register to hold the one-component data read from the external linear memory by the linear read address generation unit 131.
When the next component is read by the linear read address generation unit 131, the contents held until then are shifted to the register of the next stage. As a result, the input shift register 1
01 is filled with two components in two cycles. At the same time as the filling, the input shift register 101 stores the data of the two components held until then in the input buffer 102 at once.
Transfer to.

【0046】入力バッファ102は、入力シフトレジス
タ101が転送した二成分分のデータを、入力シフトレ
ジスタ101に次の二成分のデータが読み出されるまで
保持する(この保持は2サイクルの間行われる。)。次
の二成分分のデータが入力シフトレジスタ101に読み
出されると、入力バッファ102は、それまで保持して
いた二成分分のデータを第一の加減算器103に転送す
る。
The input buffer 102 holds the two-component data transferred by the input shift register 101 until the next two-component data is read to the input shift register 101 (this holding is performed for two cycles. ). When the next two-component data is read to the input shift register 101, the input buffer 102 transfers the two-component data held up to that point to the first adder / subtractor 103.

【0047】第一の加減算器103は、(数12)の右
辺第一項の行列の各成分(f0j+f7 j,f0j−f7j,f1j+f
6j,f1j−f6j,f2j+f5j,f2j−f5j,f3j+f4j,f3j−f
4jj=0,・・・・・,7)の計算を行う。具体的には、第一の加
減算器103は入力バッファ102が転送した二成分分
のデータを受け取り、受け取った時点でこれらの二成分
のデータの加算を1サイクルで行い、加算結果を第一の
定数乗算器104のそれぞれの段の定数乗算器に出力す
る。出力後、第一の加減算器103は、二成分分のデー
タの減算を1サイクルで行い、減算結果を第一の定数乗
算器104のそれぞれの定数乗算器に出力する。このよ
うに第一の加減算器103は、それぞれの二成分分のデ
ータに対して加算と減算を交互に繰り返す。j列データ
に対する演算はサイクル順にf0j+f7j,f0j−f7j,f1j
+f6j,f1j−f6j,f2j+f5j,f2j−f5j,f3j+f4j,f3j
−f4jであり、これを順に第0,7,1,6,2,5,3,4列について
繰り返す。
The first adder / subtractor 103 calculates each component (f 0j + f 7 j , f 0j −f 7j , f 1j + f) of the matrix of the first term on the right side of ( Equation 12).
6j , f1j- f6j , f2j + f5j , f2j- f5j , f3j + f4j , f3j- f
4j j = 0, ..., 7) is calculated. Specifically, the first adder / subtractor 103 receives the data of the two components transferred by the input buffer 102, adds the data of these two components in one cycle at the time of reception, and outputs the addition result as the first It outputs to the constant multiplier of each stage of the constant multiplier 104. After the output, the first adder / subtractor 103 subtracts the data of two components in one cycle, and outputs the subtraction result to each constant multiplier of the first constant multiplier 104. In this way, the first adder / subtractor 103 alternately repeats addition and subtraction for each two-component data. Operations on the j-column data are f 0j + f 7j , f 0j –f 7j , f 1j in cycle order.
+ F6j , f1j- f6j , f2j + f5j , f2j- f5j , f3j + f4j , f3j
−f 4j and this is repeated for the 0th, 7th, 1st, 6th, 2nd, 5th, 3rd, and 4th columns in order.

【0048】第一の定数乗算器104は、N/2個(四
つ)のROMより構成される。これらのROMには、(数1
2)の右辺第二項の行列成分と、(数12)の右辺第一
項の行列成分との乗算値が予め格納されている。定数乗
算器104を構成するN/2個のROMは、第一の加減算器1
03から出力される加算,減算結果を受け取り、格納し
ている乗算値のうち、第一の加減算器103から出力さ
れる(数12)の右辺第二項の行列成分を被乗数とする
ものを取り出して、第一の累算器105のN/2個のそれ
ぞれの加算器に出力する。
The first constant multiplier 104 is composed of N / 2 (four) ROMs. These ROMs contain (Equation 1
The multiplication value of the matrix component of the second term on the right side of 2) and the matrix component of the first term on the right side of (Equation 12) is stored in advance. The N / 2 ROMs forming the constant multiplier 104 are the first adder / subtractor 1
The result of addition and subtraction output from 03 is received, and the stored multiplication value that has the matrix component of the second term on the right side of (Equation 12) output from the first adder-subtractor 103 as the multiplicand is extracted. And outputs it to each of the N / 2 adders of the first accumulator 105.

【0049】第一の累算器105は、N/2個の加算器か
ら構成される。第一の累算器105は、第一の定数乗算
器104が出力したN/2の積と、累算シフトレジスタ1
06を経てフィードバックされるN/2の累算中の中間値
とを加算する。累算シフトレジスタ106は、N/2個の
二段のシフトレジスタから構成される。
The first accumulator 105 is composed of N / 2 adders. The first accumulator 105 calculates the product of N / 2 output from the first constant multiplier 104 and the accumulation shift register 1
And the intermediate value during accumulation of N / 2 that is fed back via 06 is added. The cumulative shift register 106 is composed of N / 2 two-stage shift registers.

【0050】累算シフトレジスタ106は、行列Hの成
分の中間値を保持し、一列中の奇数,偶数行に対応する
N/2個の累算が一サイクル毎に交互に行われるようにシ
フト動作を行い、累算途中の中間値を第一の累算器10
5へフィードバックする。このシフト動作をNサイクル
繰り返すことにより、累算シフトレジスタ106に行列
Hの一列分の成分が充填され、充填された時点で累算シ
フトレジスタ106は、一列分の全ての成分を中間バッ
ファ110に順次転送する。尚、図中のセルに書かれて
いる数字は、それぞれのレジスタに充填されている成分
が、一列中のどの行の成分であるかを示す。
The cumulative shift register 106 holds the intermediate values of the components of the matrix H and corresponds to the odd and even rows in one column.
The shift operation is performed so that N / 2 accumulations are alternately performed every cycle, and the intermediate value in the middle of accumulation is calculated by the first accumulator 10
Give feedback to 5. By repeating this shift operation for N cycles, the cumulative shift register 106 is filled with the components for one column of the matrix H, and at the time of filling, the cumulative shift register 106 stores all the components for one column in the intermediate buffer 110. Transfer sequentially. The numbers written in the cells in the figure indicate which row in one column the component filled in each register is.

【0051】中間バッファ110は、一列バッファ11
1と、二列シフトレジスタ112とで構成される。一列
バッファ111は、累算シフトレジスタ106が順次転
送する一列分のN個の成分を、一列おきに受け取り、行
列Hの次の一列分の成分が累算シフトレジスタ106に
計算されるまで、一列バッファ111は受け取った一列
分の成分を保持する。保持している一列分の次の一列分
の成分が累算シフトレジスタ106に計算されると、一
列バッファ111は、保持している一列分の成分を二列
シフトレジスタ112に一度に転送する。
The intermediate buffer 110 is the single column buffer 11
1 and a two-row shift register 112. The one-column buffer 111 receives N components for one column, which are sequentially transferred by the cumulative shift register 106, every other column, until one component for the next column of the matrix H is calculated in the cumulative shift register 106. The buffer 111 holds the received component for one column. When the component for the next one column for the held one column is calculated in the cumulative shift register 106, the one-column buffer 111 transfers the held component for one column to the two-column shift register 112 at once.

【0052】二列シフトレジスタ112は、N段の並列
/直列変換用のシフトレジスタが二列分並べられて構成
される。二列シフトレジスタ112を構成する二列分の
シフトレジスタは、累算シフトレジスタ106及び一列
バッファ111から転送される二列分の値を受け取る。
次に上記の二列分のシフトレジスタは、1サイクル毎に
シフトを行い、これらの成分を二成分ずつ第二のDCT演
算部120に転送してゆく。8サイクルで二列分の全て
の成分を第二のDCT演算部120に転送し終えると、二
列シフトレジスタ112は、次の二列分の成分を累算シ
フトレジスタ106,一列バッファ111から受け取
る。
The two-row shift register 112 is constructed by arranging two stages of N-stage shift registers for parallel / serial conversion. The two-column shift registers forming the two-column shift register 112 receive the two-column values transferred from the accumulation shift register 106 and the one-column buffer 111.
Next, the shift register for the above two columns shifts every cycle, and transfers these two components to the second DCT operation unit 120 two by two. When all the components for two columns have been transferred to the second DCT operation unit 120 in eight cycles, the two-column shift register 112 receives the components for the next two columns from the accumulation shift register 106 and the one-column buffer 111. .

【0053】第二のDCT演算部120は、(数13)に
示す第二段目の一次元DCT演算を64サイクルで行う。第
二のDCT演算部100が行列Gの各成分の計算を行う順
序を(図4)に示す。図中のg00の下に記されている"1+
17+33+49"とは、g00は、1サイクル目に乗算を行い、17,
33,49サイクル目に乗算及び累算を行うことで計算され
ることを意味する。g67の下に記されている"14+30+46+6
2"とは、g67は、14サイクル目に乗算を行い、30,46,62
サイクル目に乗算及び累算を行うことで計算されること
を意味する。このような順序で計算が行えるように第二
のDCT演算部120は構成される。
The second DCT calculation section 120 performs the second stage one-dimensional DCT calculation shown in (Equation 13) in 64 cycles. The order in which the second DCT calculation unit 100 calculates each component of the matrix G is shown in FIG. "1+" written under g 00 in the figure
17 + 33 + 49 "means g 00 multiplies in the first cycle,
It means that it is calculated by performing multiplication and accumulation at the 33rd and 49th cycles. written under g 67 "14 + 30 + 46 + 6
2 "means that g 67 multiplies in the 14th cycle to get 30,46,62
It means that it is calculated by performing multiplication and accumulation at the cycle. The second DCT calculator 120 is configured so that the calculation can be performed in this order.

【0054】第二のDCT演算部120は、第二の加減算
器121,第二の定数乗算器122,第二の累算器12
3,二列シフトレジスタ124a,124b,124
c,124d,二列出力バッファ125b,125c,
125dで構成される。第二の加減算器121は、(数
13)の右辺第一項の行列の各成分hm,0+hm,7,hm,0
hm,7,hm,1+hm,6,hm,1−hm,6,hm,2+hm,5,hm,2−h
m,5,hm,3+hm,4,hm,3−hm,4(m=0,・・・・,7)の計算を行
う。具体的には、第二の加減算器121は二列シフトレ
ジスタ112が転送した二成分を受け取り、受け取った
時点でこれらの二成分の加算を1サイクルで行い、加算
結果を第一の第二の定数乗算器122に出力する。出力
後、第二の加減算器121は、二成分の減算を1サイク
ルで行い、減算結果を第二の定数乗算器122のそれぞ
れの定数乗算器に出力する。
The second DCT calculator 120 includes a second adder / subtractor 121, a second constant multiplier 122, and a second accumulator 12.
3, two-row shift registers 124a, 124b, 124
c, 124d, two-column output buffers 125b, 125c,
It is composed of 125d. The second adder / subtractor 121 calculates each component h m, 0 + h m, 7 , h m, 0 − of the matrix of the first term on the right side of (Equation 13).
h m, 7 , h m, 1 + h m, 6 , h m, 1 −h m, 6 , h m, 2 + h m, 5 , h m, 2 −h
Calculate m, 5 , h m, 3 + h m, 4 , h m, 3 −h m, 4 (m = 0, ..., 7). Specifically, the second adder / subtractor 121 receives the two components transferred by the two-column shift register 112, adds these two components in one cycle at the time of reception, and outputs the addition result to the first second Output to the constant multiplier 122. After the output, the second adder / subtractor 121 performs the subtraction of the two components in one cycle, and outputs the subtraction result to each constant multiplier of the second constant multiplier 122.

【0055】第二の定数乗算器122は、N/2個(四
つ)のROMより構成される。これらのROMは、(数13)
の右辺第二項の行列成分と、(数13)の右辺第一項の
行列成分との乗算値を予め格納している。第二の定数乗
算器122を構成するN/2個のROMは第二の加減算器12
1から出力される加算,減算結果を受け取り、格納して
いる乗算値のうち、第二の加減算器121から出力され
る(数13)の右辺第二項の行列成分を被乗数とするも
のを全て取り出して、第二の累算器123のN/2個のそ
れぞれの加算器に出力する。
The second constant multiplier 122 is composed of N / 2 (four) ROMs. These ROMs are (Equation 13)
The multiplication value of the matrix component of the second term on the right side of the above and the matrix component of the first term on the right side of (Equation 13) is stored in advance. The N / 2 ROMs constituting the second constant multiplier 122 are the second adder / subtractor 12
Among the stored multiplication values that receive the addition and subtraction results output from 1 and all of which have the matrix component of the second term on the right side of (Equation 13) output from the second adder / subtractor 121 as the multiplicand, It is taken out and output to each of the N / 2 adders of the second accumulator 123.

【0056】第二の累算器123は、N/2個の加算器か
ら構成される。第二の累算器123は、第二の定数乗算
器122が出力したN/2の積と、二列シフトレジスタ1
24a,124b,124c,124dを経てフィード
バックされるN/2の累算中の中間値とを加算する。二列
シフトレジスタ124aは、N×2段のシフトレジスタで
構成される。二列シフトレジスタ124aは、行列Gの
成分の中間値を保持し、二列分の成分を求めるための累
算が、g0v,g0,v+1,g1v,g1,v+1,g2v,g2,v+1,g3v
g3,v+1,g4v,g4,v+1,g5v,g5,v+1,g6v,g6,v+1
g7v,g7,v+1 (v=0,2,4,6)の順に交互に行われるように
シフト動作を行い、累算途中の中間値を第二の累算器1
23へフィードバックする。このシフト動作を64サイク
ル繰り返すことにより、二列シフトレジスタ124aに
行列Gの二列分の成分が充填される。充填された時点で
二列シフトレジスタ124aはシフト動作を行い、二列
分の成分を、1サイクル毎に1つずつ出力選択器126
に出力してゆき、N×2サイクルで、二列分の成分を全て
出力選択器126に出力する。尚、図中のセルに書かれ
ている数字は、それぞれのレジスタに充填されている成
分が、一列中のどの成分であるかを示す。二列シフトレ
ジスタ124b,124c,124dは、二列シフトレ
ジスタ124aと同様の動作を行う。異なるのは、二列
シフトレジスタ124b,124c,124dは、出力
を二列出力バッファ125b,125c,125dに対
して行う点である。尚、図中のセルに書かれている数字
は、それぞれのレジスタに充填されている成分が、一列
中のどの成分であるかを示す。
The second accumulator 123 is composed of N / 2 adders. The second accumulator 123 has a product of N / 2 output from the second constant multiplier 122 and the two-column shift register 1
24a, 124b, 124c, and 124d are fed back, and the intermediate value of N / 2 being accumulated is added. The two-row shift register 124a is composed of N × 2 stages of shift registers. The two-column shift register 124a holds the intermediate values of the components of the matrix G, and the accumulation for obtaining the components of two columns is g 0v , g 0, v + 1 , g 1v , g 1, v + 1. , G 2v , g 2, v + 1 , g 3v ,
g 3, v + 1 , g 4v , g 4, v + 1 , g 5v , g 5, v + 1 , g 6v , g 6, v + 1 ,
The shift operation is performed so that g 7v , g 7, v + 1 (v = 0,2,4,6) are alternately performed in order, and the intermediate value in the middle of accumulation is set to the second accumulator 1
Give feedback to 23. By repeating this shift operation for 64 cycles, the two-column shift register 124a is filled with components for two columns of the matrix G. The two-row shift register 124a performs a shift operation at the time of filling, and outputs the two-row components one by one in each cycle of the output selector 126.
And outputs all the components for two columns to the output selector 126 in N × 2 cycles. It should be noted that the numbers written in the cells in the figure indicate which components in one column the components filled in each register are. The two-row shift register 124b, 124c, 124d performs the same operation as the two-row shift register 124a. The difference is that the two-row shift registers 124b, 124c, and 124d output to the two-row output buffers 125b, 125c, and 125d. It should be noted that the numbers written in the cells in the figure indicate which components in one column the components filled in each register are.

【0057】二列出力バッファ125b,125c,1
25dは、二列シフトレジスタ124b,124c,1
24dから出力される二列分の成分を一成分ずつ受け取
り、シフトを行いながら、N×2サイクルでこれらの成分
を全て格納する。二列シフトレジスタ124aがN×2サ
イクルをかけて二列分の成分を全て出力選択器126に
出力した後に、二列出力バッファ125b,125c,
125dは、N×2サイクルをかけて、二列分の成分を出
力選択器126に順序出力してゆく。尚、図中のセルに
書かれている数字は、それぞれのレジスタに充填されて
いる成分が、一列中のどの成分であるかを示す。
Two-column output buffers 125b, 125c, 1
25d is a two-row shift register 124b, 124c, 1
The components for two columns output from 24d are received one by one, and while shifting, all these components are stored in N × 2 cycles. After the two-row shift register 124a outputs all the components for two rows to the output selector 126 by taking N × 2 cycles, the two-row output buffers 125b, 125c,
The 125d takes N × 2 cycles and sequentially outputs the components of two columns to the output selector 126. It should be noted that the numbers written in the cells in the figure indicate which components in one column the components filled in each register are.

【0058】出力選択器126は、二列シフトレジスタ
124a,二列出力バッファ125b,125c,12
5dから出力される行列Gの各成分を、外部線形メモリ
に選択出力する。線形書き込みアドレス生成部135
は、出力選択器126から出力される行列Gの各成分を
外部線形メモリに書き込むための、行書き込みアドレス
及び列書き込みアドレスを生成する。(図5)に、線形
書き込みアドレス生成部135の構成を示す。線形書き
込みアドレス生成部135には、log2N×2ビットカウン
タ136が含まれており、log2N×2ビットカウンタ13
6の出力端子の順序が入れ替えられて外部に出力されて
いる。
The output selector 126 includes a two-column shift register 124a, two-column output buffers 125b, 125c, 12
Each element of the matrix G output from 5d is selectively output to the external linear memory. Linear write address generator 135
Generates a row write address and a column write address for writing each element of the matrix G output from the output selector 126 into the external linear memory. FIG. 5 shows the configuration of the linear write address generation unit 135. The linear write address generation unit 135 includes a log 2 N × 2 bit counter 136, and the log 2 N × 2 bit counter 13
The order of the output terminals of No. 6 is exchanged and output to the outside.

【0059】log2N×2ビットカウンタ136は、log2N
×2個の出力端子が備えられ、出力選択器126から行
列Gの各成分を受け取る毎にN×N回カウントを行う。本
実施例においてN=8であるから、log2N×2ビットカウン
タ136は、0〜63の数値を出力端子u0〜u5に発生す
る。log2N×2ビットカウンタ136が偶数値をカウント
する度に、行書き込みアドレスがインクリメントし、lo
g2N×2ビットカウンタ136が奇数値をカウントする度
に列書き込みアドレスがインクリメントする。アドレス
を行書き込みアドレス,列書き込みアドレスを生成する
ことにより、行列Gの成分が以下に示す順序で外部線形
メモリに書き込まれる。 1 2 17 18 33 34 49 50 3 4 19 20 35 36 51 52 5 6 21 22 37 38 53 54 7 8 23 24 39 40 55 56 9 10 25 26 41 42 57 58 11 12 27 28 43 44 59 60 13 14 29 30 45 46 61 62 15 16 31 32 47 48 63 64 (図6)は、(図1)の第一の定数乗算器104,第二
の定数乗算器122と第一の累算器105,第二の累算
器123とを構成する各定数乗算器、加算器の詳細図で
ある。以下に定数乗算器104及び第一の定数累算器1
05の構成の詳細について説明する。
The log 2 N × 2 bit counter 136 has a log 2 N
It is provided with × 2 output terminals and counts N × N times each time each element of the matrix G is received from the output selector 126. Since N = 8 in this embodiment, the log 2 N × 2 bit counter 136 generates the numerical values of 0 to 63 at the output terminals u0 to u5. Each time the log 2 N × 2 bit counter 136 counts an even value, the row write address is incremented and lo
The column write address is incremented each time the g 2 N × 2 bit counter 136 counts an odd value. By generating the address as the row write address and the column write address, the components of the matrix G are written in the external linear memory in the following order. 1 2 17 18 33 34 49 50 3 4 19 20 35 36 51 52 5 6 21 22 37 38 53 54 7 8 23 24 39 40 55 56 9 10 25 26 41 42 57 58 11 12 27 28 43 44 59 60 13 14 29 30 45 46 61 62 15 16 31 32 47 48 63 64 (FIG. 6) is the first constant multiplier 104, the second constant multiplier 122, the first accumulator 105, and the first accumulator 105 (FIG. 1). FIG. 3 is a detailed diagram of each constant multiplier and adder that form the second accumulator 123. Below, the constant multiplier 104 and the first constant accumulator 1
Details of the configuration of 05 will be described.

【0060】同図において、ROM501は四つの8×16語
の定数ROMからなり、(図1)の定数乗算器104,1
22に相当する。ROM501に被乗数biと定数との積の
値はあらかじめ計算されて格納されている。更に詳しく
は、16ビット長の被乗数は4ビット毎に四つに区切ら
れ、この4ビット分と定数との積、つまり、定数の0〜15
の倍数が上記の定数ROMに格納されている(このように
格納することでROM501の容量は小さくなる。)。ま
た、(数12)よりわかるように定数行列の半分の成分
は0(ゼロ)であり、一回の乗算で、被乗数biには四つ
の定数が乗ぜられるので、これらの四つの定数は共通の
アドレスに格納され、被乗数biが入力されると、これら
の四つの定数が取り出される。上記の一区切りの4ビッ
トと定数16ビットとの積は20ビット長であり、上記の四
つの定数が同一のアドレスに格納されるので、20×4=8
0ビット長が一語のビット長となる。更にROMに格納され
る定数行列の成分の半分は0であるので、ROM501に
は、8×24=128語が格納される。第一の加減算器103
から出力される(数12)の右辺第一項の行列の各成分
を上記のアドレス指定に用いることで、ROM501から1
6個の20ビット長の部分積が同時に取り出される。
In the figure, the ROM 501 is composed of four 8 × 16 word constant ROMs, and the constant multipliers 104, 1 of FIG. 1 are used.
Equivalent to 22. The value of the product of the multiplicand bi and the constant is precalculated and stored in the ROM 501. More specifically, the 16-bit multiplicand is divided into four every four bits, and the product of these four bits and a constant, that is, the constant 0 to 15
Is stored in the constant ROM (the capacity of the ROM 501 becomes smaller by storing in this way). Also, as can be seen from (Equation 12), half the components of the constant matrix are 0 (zero), and the multiplicand bi is multiplied by four constants in one multiplication, so these four constants are common. These four constants are retrieved when stored in the address and the multiplicand bi is input. The product of 4 bits for each division and 16 bits of constant is 20 bits long, and since the above 4 constants are stored in the same address, 20 × 4 = 8
The 0 bit length is the bit length of one word. Further, since half of the components of the constant matrix stored in the ROM are 0, the ROM 501 stores 8 × 2 4 = 128 words. First adder / subtractor 103
By using each element of the matrix of the first term on the right-hand side of (Equation 12) output from
Six 20-bit long partial products are retrieved simultaneously.

【0061】第一の累算器105は、5入力を二つの部
分和に桁上げ伝播なしに足し合わせるN/2個の桁上げ保
存加算器(以下CSA(carry save adder)と略す)及びN/2
個の桁上げ伝播加算器(以下CPA(carry propagate adde
r)と略す)で構成される。図中のCSA502は、5入力を
二つの部分和に桁上げ伝播なしに足し合わせる桁上げ保
存加算器である。(図7)に示すように、CSA502は
三段のCSAで構成される。ROM501から出力される20×
4ビットの積のそれぞれ20ビットを、下位のものから順
にm0,m1,m2,m3とすると、第一段目のCSAは、m0と累算値
とを加算する。第二段目のCSAは、第一段目のCSAの加算
結果と、m1を4ビット上位にずらしたものとを加算す
る。第三、四段目のCSAは、第二、三段目のCSAの加算結
果と、m2,m3を8ビット、12ビット上位にずらしたものを
加算する。尚、CSA502が行う以上の加算は、桁上げ
を保存したまま行われる。
The first accumulator 105 includes N / 2 carry save adders (hereinafter abbreviated as CSA (carry save adder)) for adding five inputs to two partial sums without carry propagation, and N. / 2
Carry carry adders (hereinafter CPA (carry propagate adde
abbreviated as r)). CSA502 in the figure is a carry save adder that adds five inputs to two partial sums without carry propagation. As shown in FIG. 7, the CSA 502 is composed of three stages of CSA. 20 × output from ROM 501
Assuming that 20 bits of each of the products of 4 bits are m0, m1, m2, and m3 in order from the lower one, CSA in the first stage adds m0 and the accumulated value. The CSA in the second stage adds the addition result of the CSA in the first stage and m1 shifted up by 4 bits. The third and fourth stage CSAs add the addition results of the second and third stage CSAs, with m2 and m3 shifted by 8 bits and 12 bits higher. It should be noted that the additions performed by the CSA 502 are performed with the carry retained.

【0062】図中のCPA503は、CSA502から出力さ
れる加算出力(S)と桁上げ出力(C)とを加算する。
加算結果は、適当なビット幅に丸められ、累算シフトレ
ジスタ106に出力される。(図8)は、(図1)の二
列シフトレジスタ124a及び二列出力バッファ125
b,125c,125dのシフト制御信号のタイミング
を表わす図である。同図において、右方向に実行サイク
ル数、即ち時間を表わす。縦軸に0または1のシフト制
御信号の論理値を表わす。シフト制御信号が0の間二列
出力バッファ125b,125c,125dは成分を保
持し、シフト制御信号が1の間、二列シフトレジスタ1
24a及び二列出力バッファ125b,125c,12
5dはシフト動作を行い、二成分ずつ出力選択器126
に出力してゆく。
The CPA 503 in the figure adds the addition output (S) output from the CSA 502 and the carry output (C).
The addition result is rounded to an appropriate bit width and output to the accumulation shift register 106. (FIG. 8) is a two-row shift register 124a and a two-row output buffer 125 (of FIG. 1).
It is a figure showing the timing of the shift control signal of b, 125c, 125d. In the figure, the number of execution cycles, that is, time is shown in the right direction. The vertical axis represents the logical value of the shift control signal of 0 or 1. The two-column output buffers 125b, 125c, and 125d hold components while the shift control signal is 0, and the two-column shift register 1 while the shift control signal is 1.
24a and two-column output buffers 125b, 125c, 12
5d performs the shift operation, and the output selector 126
Output to.

【0063】以上のように構成された本実施例の二次元
DCT演算装置の動作を以下に説明する。本実施例の二次
元DCT演算装置は、外部線形メモリに対して読み出しを
行い、読み出しによって生成する8×8の行列ブロックか
らなる入力信号系列fijを受け取り、受け取った入力信
号系列に対してDCT演算を多段のパイプライン処理を施
し、結果のDCT係数系列を外部線形メモリに出力する。 (1) 行読み出しアドレス生成部133が行読み出しアド
レスを発生させる。列読み出しアドレス生成部133に
よる読み出し列の指定は一データを読み込む度に第0,7,
1,6,2,5,3,4行の順に変わり、これを繰り返す。 (2) 列読み出しアドレス生成部133が一列中の行番号
を全て発生すれば、列読み出しアドレス生成部134が
列読み出しアドレスを発生させる。列読み出しアドレス
による読み出し列の指定は、一データを一列分読み込む
度に第0,7,1,6,2,5,3,4列の順に変わり、これを繰り返
す。 (3) 列読み出しアドレスと行読み出しアドレスに基づ
き、外部線形メモリ中の行列成分データの線形アドレス
が計算される。 (4) 線形読み出しアドレス生成部131によって一サイ
クル毎に8×8行列が、一成分ずつ読み出され、入力信号
系列が一成分ずつ生成する。この入力信号系列を入力シ
フトレジスタ101はシフトしながら読み込む。読む順
序は列単位に、第0,7,1,6,2,5,3,4列の順に、列の中で
は第0,7,1,6,2,5,3,4行の順である。 1 17 33 49 57 41 25 9 3 19 35 51 59 43 27 11 5 21 37 53 61 45 29 13 7 23 39 55 63 47 31 15 8 24 40 56 64 48 32 16 6 22 38 54 62 46 30 14 4 20 36 52 60 44 28 12 2 18 34 50 58 42 26 10 (5) 入力シフトレジスタ101は、読み込んだ二成分分
のデータを入力バッファ102に一度に転送する。入力
バッファ102は2サイクルの間このデータを保持す
る。 (6) 第一の加減算器103は最初に加算を行い、次に減
算を行う。以降加算と減算を交互に繰り返す。j列デー
タに対する演算はサイクル順にf0j+f7j,f0j−f7j,f1j
+f6j,f1j−f6j,f2j+f5j,f2j−f5j,f3j+f4j,f3j−f4j
であり、これを順に第0,7,1,6,2,5,3,4列について繰り
返す。 (7) 第一の定数乗算器104は、(数12)に基づいて
行列各成分の積を出力する。出力された積は、第一の累
算器105によって順次累積加算される。累算中の中間
値は、累算シフトレジスタ106に保持される。 (8) 累算シフトレジスタ106はシフトを行い、保持し
ている中間値を第一の累算器105にフィードバックす
る。上記積および累算のステップを4回繰り返せば一列
分の中間値が求められる。この中間値とは一次元DCT係
数である。一つの列中で第0,2,4,6行,第1,3,5,7行に関
する累算が交互に繰り返される。このようなシフトを64
サイクル繰り返せば、8×8行列の積が計算される。 (9) 累算シフトレジスタ106に二成分分の中間値が格
納されれば、これらを一列分の中間値として一列バッフ
ァ111に転送する。 (10) 累算シフトレジスタ106と一列バッファ111
とに二列分の中間値が格納されれば、二列シフトレジス
タ112に二列分の内容を一度に転送する。 (11) 二列シフトレジスタ112は、行番号0〜7の順に
シフトしながら、二成分のデータを第二の加減算器12
1に出力する。第二の加減算器121は、それらの和ま
たは差を計算する。第二の加減算器121は最初に加算
を行い、次に減算を行う。以降加算と減算を交互に繰り
返す。m行データに対する演算は、サイクル毎に順にh
m,0+hm,7,hm,0−hm,7,hm,1+hm,6,hm,1−hm,6,h
m,2+hm,5,hm,2−hm,5,hm,3+hm,4,hm,3−hm,4(m=0,
・・・・,7)の計算を行う。 (12) 第二の定数乗算器122は、(数13)に基づき
行列各成分の積を求め、求めた値を累算中の中間和に順
次累積加算する。 (13) 第二の累算器123で加算した結果を二列シフト
レジスタ124に出力する。二列シフトレジスタ124
は、加算結果を順次シフトしながら保持する。最初のサ
イクルで四つの二列シフトレジスタ124a,124
b,124c,124dそれぞれに第0,2,4,6列の第0行
の中間値が、次のサイクルで第1,3,5,7列の第0行の中間
値が保持され、以下これが交互に繰り返され行番号がイ
ンクリメントしてゆく。最初の16サイクルで行列の各成
分と計算される順番との関係を下の表に示す。同じ番号
の成分は同時に計算される。 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 5 6 5 6 5 6 5 6 7 8 7 8 7 8 7 8 9 10 9 10 9 10 9 10 11 12 11 12 11 12 11 12 13 14 13 14 13 14 13 14 15 16 15 16 15 16 15 16 上記16サイクルが四回繰り返されれば二次元DCTの演算
が完了する。各成分の位置に対し四回累算が行われる。 (14) 三つの二列出力バッファ125b,125c,1
25dへそれぞれ三つの二列シフトレジスタ124b,
124c,124dは、保持している成分をシフトしな
がら出力する。二列シフトレジスタ124aは上記の出
力バッファを介さずに出力選択器126に二成分を出力
してゆく。 (15) 線形書き込みアドレス生成部136で行書き込み
アドレス及び列書き込みアドレスを発生させる。行書き
込みアドレスは、二データを書き込む度に第0,0,1,1,2,
2,3,3,4,4,5,5,6,6,7,7行の順に変わり、この二列分の
指定を4回繰り返す。列書き込みアドレスは二データを
書き込む度に第0,1列の順に増加する。次の二列で第2,3
列を繰り返し、以後二列毎に第4,5列,第6,7列を指定す
る。 (16) 列書き込みアドレスと行書き込みアドレスに基づ
き、線形書き込みアドレス生成部136で外部線形メモ
リ中の行列成分データの線形アドレスを計算する。 (17)(図8)に示すように、出力選択器126は最初の
16サイクルで二列シフトレジスタ124a中に計算され
た二次元DCT係数を選択出力し、この間に三つの二列シ
フトレジスタ124b,124c,124dの内容は三
つの二列出力バッファ125b,125c,125dへ
シフトしながら転送される。以後三つの二列出力バッフ
ァ125b,125c,125dの内容が順次出力選択
器126で選択出力される。上記書き込みアドレスで制
御されるように、二次元DCT係数行列の中で書き込む順
序は下の表に示す通り。 1 2 17 18 33 34 49 50 3 4 19 20 35 36 51 52 5 6 21 22 37 38 53 54 7 8 23 24 39 40 55 56 9 10 25 26 41 42 57 58 11 12 27 28 43 44 59 60 13 14 29 30 45 46 61 62 15 16 31 32 47 48 63 64 以上のパイプライン処理のタイミングチャートを(図
9)に示す。尚、図中の1stDCTとは一段目の一次元DCT
を意味し、2nd DCT とは二段目の一次元DCT を意味す
る。上の多段のパイプライン処理は大きく次の三つの処
理部に分かれると見なせる。 第一段‥‥第一段目の一次元DCT演算部‥‥上の説明中
(1)〜(8)に相当 第二段‥‥中間バッファ‥‥上の説明中(9)〜(10)に相
当 第三段‥‥第二段目の一次元DCT演算部‥‥上の説明中
(11)〜(18)に相当 なお本実施例では8×8のDCTに関し記述したが、同じ算
法を用いて16×16などへ容易に拡張できる。またビット
幅や数表現も16ビット,固定小数点数だけでなく、32ビ
ット浮動小数点数などへ応用できる。また本実施例で
は、説明の便宜上列方向に読み出しを行うように述べた
が、定数行列Cを転置することにより上記の行と列に関
する記載を入れ替えた構成も実現できることはいうまで
もない。
Two-dimensional of the present embodiment constructed as described above
The operation of the DCT arithmetic unit will be described below. The two-dimensional DCT operation device of the present embodiment reads an external linear memory, receives an input signal sequence f ij consisting of 8 × 8 matrix blocks generated by the read, and receives a DCT for the received input signal sequence. Multi-stage pipeline processing is performed, and the resulting DCT coefficient sequence is output to the external linear memory. (1) The row read address generation unit 133 generates a row read address. The designation of the read column by the column read address generation unit 133 is 0, 7,
Change in the order of 1,6,2,5,3,4 lines and repeat this. (2) If the column read address generation unit 133 generates all the row numbers in one column, the column read address generation unit 134 generates the column read address. The designation of the read column by the column read address changes in the order of the 0th, 7th, 1st, 6th, 2nd, 5th, 3rd, and 4th columns each time one data is read, and this is repeated. (3) The linear address of the matrix component data in the external linear memory is calculated based on the column read address and the row read address. (4) The linear read address generation unit 131 reads out the 8 × 8 matrix for each component for each cycle, and generates the input signal sequence for each component. The input shift register 101 reads this input signal sequence while shifting it. The reading order is column by column, in the order of 0,7,1,6,2,5,3,4, and in the column the order of 0,7,1,6,2,5,3,4. Is. 1 17 33 49 57 41 25 9 3 19 35 51 59 43 27 11 5 21 37 53 61 45 29 13 7 23 39 55 63 47 31 15 8 24 40 56 64 48 32 16 6 22 38 54 62 46 30 14 4 20 36 52 60 44 28 12 2 18 34 50 58 42 26 10 (5) The input shift register 101 transfers the read two-component data to the input buffer 102 at a time. The input buffer 102 holds this data for two cycles. (6) The first adder / subtractor 103 first adds and then subtracts. After that, addition and subtraction are repeated alternately. Operations on j-th column data are f 0j + f 7j , f 0j −f 7j , f 1j in the order of cycle.
+ f 6j , f 1j −f 6j , f 2j + f 5j , f 2j −f 5j , f 3j + f 4j , f 3j −f 4j
And this is repeated for the 0th, 7th, 1st, 6th, 2nd, 5th, 3rd, and 4th columns in order. (7) The first constant multiplier 104 outputs the product of each matrix element based on (Equation 12). The output products are sequentially accumulated and added by the first accumulator 105. The intermediate value being accumulated is held in the accumulation shift register 106. (8) The cumulative shift register 106 shifts and feeds back the held intermediate value to the first accumulator 105. If the steps of product and accumulation are repeated four times, an intermediate value for one column can be obtained. This intermediate value is a one-dimensional DCT coefficient. Accumulation for the 0th, 2nd, 4th, 6th rows and the 1st, 3rd, 5th, 7th rows are alternately repeated in one column. 64 such shifts
By repeating the cycle, the product of 8 × 8 matrices is calculated. (9) When the intermediate values for two components are stored in the cumulative shift register 106, these are transferred to the one-column buffer 111 as intermediate values for one column. (10) Accumulation shift register 106 and single column buffer 111
If two columns of intermediate values are stored in and, the contents of two columns are transferred to the two-column shift register 112 at once. (11) The two-column shift register 112 shifts the row numbers 0 to 7 in this order, and outputs the two-component data to the second adder / subtractor 12
Output to 1. The second adder / subtractor 121 calculates their sum or difference. The second adder / subtractor 121 first performs addition and then subtraction. After that, addition and subtraction are repeated alternately. The operation on the m-row data is h for each cycle.
m, 0 + h m, 7 , h m, 0- h m, 7 , h m, 1 + h m, 6 , h m, 1 -h m, 6 , h
m, 2 + h m, 5 , h m, 2 −h m, 5 , h m, 3 + h m, 4 , h m, 3 −h m, 4 (m = 0,
・ ・ ・ ・, 7) is calculated. (12) The second constant multiplier 122 obtains the product of each matrix element based on (Equation 13), and sequentially adds the obtained value to the intermediate sum during accumulation. (13) The result of addition by the second accumulator 123 is output to the two-column shift register 124. Two-row shift register 124
Holds the addition result while sequentially shifting it. In the first cycle, four two-row shift registers 124a, 124
b, 124c, and 124d hold the intermediate value of the 0th row of the 0th, 2nd, 4th, and 6th columns, and the intermediate value of the 0th row of the 1st, 3rd, 5th, and 7th columns in the next cycle. This is repeated alternately and the line number is incremented. The relationship between each matrix element and the order of calculation in the first 16 cycles is shown in the table below. Components with the same number are calculated simultaneously. 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 5 6 5 6 5 6 5 6 7 8 7 8 7 8 7 8 9 10 9 10 9 10 9 10 11 12 11 12 11 12 11 12 13 14 13 14 13 14 13 14 15 16 15 16 15 16 15 16 If the above 16 cycles are repeated four times, the two-dimensional DCT operation is completed. Accumulation is performed four times for each component position. (14) Three two-column output buffers 125b, 125c, 1
25d, three two-row shift registers 124b,
124c and 124d output while holding the component that is being held. The two-row shift register 124a outputs the two components to the output selector 126 without going through the above output buffer. (15) The linear write address generator 136 generates a row write address and a column write address. The row write address is 0,0,1,1,2,
Change in the order of 2,3,3,4,4,5,5,6,6,7,7 lines, and repeat the specification for these two columns four times. The column write address increases in the order of the 0th and 1st columns every time two pieces of data are written. 2nd and 3rd in the next two rows
Repeat the columns, and then specify the 4th, 5th, and 6th and 7th columns every two columns. (16) Based on the column write address and the row write address, the linear write address generator 136 calculates the linear address of the matrix component data in the external linear memory. As shown in (17) (FIG. 8), the output selector 126 is
The calculated two-dimensional DCT coefficient is selectively output to the two-row shift register 124a in 16 cycles, and the contents of the three two-row shift registers 124b, 124c, and 124d are output to the three two-row output buffers 125b, 125c, and 125d during this period. Transferred while shifting. Thereafter, the contents of the three two-column output buffers 125b, 125c, 125d are sequentially selected and output by the output selector 126. The order of writing in the two-dimensional DCT coefficient matrix is as shown in the table below, as controlled by the write address. 1 2 17 18 33 34 49 50 3 4 19 20 35 36 51 52 5 6 21 22 37 38 53 54 7 8 23 24 39 40 55 56 9 10 25 26 41 42 57 58 11 12 27 28 43 44 59 60 13 14 29 30 45 46 61 62 15 16 31 32 47 48 63 64 The timing chart of the above pipeline processing is shown in (Fig. 9). The 1st DCT in the figure is the first-stage one-dimensional DCT.
2nd DCT means the second-stage one-dimensional DCT. It can be considered that the above multi-stage pipeline processing is roughly divided into the following three processing units. 1st stage: 1st dimensional DCT operation part of 1st stage: In the above explanation
Equivalent to (1) to (8) Second stage ... Intermediate buffer ... Equivalent to (9) to (10) in the above explanation Third stage ... One-dimensional DCT operation part of the second stage ... Above In explanation
Corresponding to (11) to (18) Although the 8 × 8 DCT is described in this embodiment, it can be easily expanded to 16 × 16 using the same arithmetic method. In addition to 16-bit bit width and number representation, it can be applied to 32-bit floating point numbers as well as fixed point numbers. Further, in the present embodiment, for convenience of description, the reading is performed in the column direction, but it is needless to say that a configuration in which the description regarding the rows and the columns is exchanged can be realized by transposing the constant matrix C.

【0064】[0064]

【発明の効果】以上のように本発明の二次元DCT演算装
置によれば、N×N画素ブロックの中でデータの入出力順
序を最適に入れ替えることにより、より少ない回路規模
で同等の性能を発揮できる。画素ブロック単位で成分デ
ータの入出力順を入れ替えることはシステム構成上容易
に実現できる。また内部のシフトレジスタや中間バッフ
ァが削減されるため、DCT演算の潜伏時間(latency)が小
さくなる。更に従来の二次元DCT演算装置をより少ない
コストで実現し、且つデータを入力してから演算結果を
得るまでの潜伏時間を短縮するのでその実用的効果は大
きい。
As described above, according to the two-dimensional DCT arithmetic device of the present invention, the data input / output order is optimally changed in the N × N pixel block, so that the same performance can be obtained with a smaller circuit scale. Can be demonstrated. Changing the input / output order of the component data in pixel block units can be easily realized in terms of system configuration. Moreover, since the internal shift register and the intermediate buffer are reduced, the latency of the DCT operation is reduced. Further, the conventional two-dimensional DCT arithmetic device is realized at a lower cost, and the latency time from inputting data to obtaining an arithmetic result is shortened, so that its practical effect is great.

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

【図1】本発明の二次元DCT演算装置の構成図である。FIG. 1 is a configuration diagram of a two-dimensional DCT calculation device of the present invention.

【図2】線形書き込みアドレス生成部131の構成図で
ある。
FIG. 2 is a configuration diagram of a linear write address generation unit 131.

【図3】第一のDCT演算部100が行う累算及び乗算の
順序を示す図である。
FIG. 3 is a diagram showing an order of accumulation and multiplication performed by a first DCT calculation unit 100.

【図4】第二のDCT演算部120が行う累算及び乗算の
順序を示す図である。
FIG. 4 is a diagram showing an order of accumulation and multiplication performed by a second DCT operation unit 120.

【図5】線形書き込みアドレス生成部134の構成を示
す図である。
5 is a diagram showing the configuration of a linear write address generation unit 134. FIG.

【図6】(図1)の定数乗算器104,122と累算器
105,123の詳細図である。
FIG. 6 is a detailed diagram of constant multipliers 104 and 122 and accumulators 105 and 123 of FIG. 1;

【図7】(図6)のCSA502の構成を示す図である。FIG. 7 is a diagram showing a configuration of a CSA 502 (FIG. 6).

【図8】(図1)の二列出力バッファ125b,125
c,125dのシフト制御信号のタイミングを示す図で
ある。
FIG. 8 is a dual column output buffer 125b, 125 of FIG. 1;
It is a figure which shows the timing of the shift control signal of c and 125d.

【図9】パイプライン処理のタイミングチャートであ
る。
FIG. 9 is a timing chart of pipeline processing.

【図10】従来の二次元DCT演算装置のブロック図であ
る。
FIG. 10 is a block diagram of a conventional two-dimensional DCT arithmetic device.

【図11】(図10)のN×1(特に8×1の場合)DCTプ
ロセッサ203,207の回路図である。
11 is a circuit diagram of N × 1 (in particular, 8 × 1) DCT processors 203 and 207 in FIG. 10;

【図12】(図11)のRAC317のブロック図であ
る。
FIG. 12 is a block diagram of the RAC 317 of (FIG. 11).

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

101 入力シフトレジスタ 102 入力バッファ 103,121 加減算器 104,122 定数乗算器 105,123 累算器 106 累積シフトレジスタ 111 一列バッファ 112 二列シフトレジスタ 124 二列シフトレジスタ 125 二列出力バッファ 126 出力選択器 131 線形読み出しアドレス生成部 132,136 log2N×2ビットカウンタ 133 行読み出しアドレス生成部 134 列書き込みアドレス生成部 135 線形書き込みアドレス生成部101 Input Shift Register 102 Input Buffer 103,121 Adder / Subtractor 104,122 Constant Multiplier 105,123 Accumulator 106 Accumulation Shift Register 111 One-row Buffer 112 Two-row Shift Register 124 Two-row Shift Register 125 Two-row Output Buffer 126 Output Selector 131 linear read address generation unit 132, 136 log 2 N × 2 bit counter 133 row read address generation unit 134 column write address generation unit 135 linear write address generation unit

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 二段の一次元DCT演算手段を備え、N×N
個の成分を有するデータ行列に対して二次元離散余弦変
換(DCT(Discrete Cosine Transform)と略す)を演算
し、変換結果の行列の各成分を外部メモリに書き込む二
次元DCT演算装置であって、 二次元DCTの対象となるデータ行列を、(数1)に示す
読み出し番号順に対応する成分を一成分ずつ読み出す読
み出し手段と、 【数1】 前記読み出し手段によって読み出された二成分ずつに対
して第一段目の一次元DCTを行い、変換結果を一列分ず
つ生成する第一の一次元DCT演算手段と、 前記第一の一次元DCT演算手段が生成した二列分のそれ
ぞれの成分を、行順に二成分ずつ読み出してゆく第二の
読み出し手段と、 前記第二の読み出し手段によって読み出された二成分に
第二段目の一次元DCTを行い、変換結果の行列を生成す
る第二の一次元DCT演算手段と、 前記第二の一次元DCT演算手段が生成した変換結果の行
列を一成分ずつ外部メモリに書き込む書き込み手段と、 を備えることを特徴とする二次元DCT演算装置。
1. A two-dimensional one-dimensional DCT calculation means, N × N
A two-dimensional DCT arithmetic device that performs a two-dimensional discrete cosine transform (abbreviated as DCT (Discrete Cosine Transform)) on a data matrix having a number of elements and writes each element of the transformation result matrix to an external memory, A reading means for reading the components corresponding to the order of the reading numbers shown in (Equation 1) one by one from the data matrix to be subjected to the two-dimensional DCT; A first one-dimensional DCT calculating means for performing a first-stage one-dimensional DCT on each of the two components read by the reading means, and generating a conversion result for each column; Second reading means for reading the two components of each of the two columns generated by the computing means in row order by two components, and the two components read by the second reading means for the second dimensional one-dimensional A second one-dimensional DCT operation means for performing a DCT to generate a matrix of the conversion result, and a writing means for writing the conversion result matrix generated by the second one-dimensional DCT operation means into the external memory one component at a time. A two-dimensional DCT calculation device characterized by being provided.
【請求項2】 前記第一の一次元DCT手段は、第一の加
減算手段と、第一の定数乗算手段と、第一の累算手段と
を有し、 第一の加減算手段は、読み出し手段によって読み出され
た二成分同士の加算及び減算を行い、 第一の定数乗算手段は、第一段目の一次元DCTにおける
一行×一列の積和計算において、第一の加減算手段によ
る加算結果及び減算結果を乗数とする部分積を全て求
め、 第一の累算手段は、加減算結果一列分の第一の定数乗算
手段の部分積の累算値を求めて、求めた累算値を第二の
読み出し手段に出力し、 前記第二の一次元DCT手段は、第二の加減算手段と、第
二の定数乗算手段と、第二の累算手段とを有し、 第二の加減算手段は、第二の読み出し手段によって読み
出された二成分同士の加算及び減算を行い、 第二の定数乗算手段は、第二段目の一次元DCTにおける
一行×一列の積和計算において、第二の加減算手段によ
る加算結果及び減算結果を乗数とする部分積を全て求め
て、 第二の累算手段は、加減算結果一行分の第一の定数乗算
手段の部分積の累算値を求めて、求めた累算値を書き込
み手段に出力することを特徴とする請求項1記載の二次
元DCT演算装置。
2. The first one-dimensional DCT means includes a first addition / subtraction means, a first constant multiplication means, and a first accumulation means, and the first addition / subtraction means is a reading means. The addition and subtraction of the two components read by the first constant multiplication means is the addition result by the first addition and subtraction means in the product sum calculation of one row × one column in the first-stage one-dimensional DCT. All partial products with the subtraction result as a multiplier are obtained, and the first accumulating means obtains the accumulated value of the partial products of the first constant multiplying means for one column of the addition / subtraction result, and the obtained accumulated value is the second value. The second one-dimensional DCT means has a second addition and subtraction means, a second constant multiplication means, and a second accumulation means, the second addition and subtraction means, The addition and subtraction of the two components read by the second reading means are performed, and the second constant multiplication means is In the one-row x one-column product-sum calculation in the second-stage one-dimensional DCT, all the partial products with the addition result and the subtraction result by the second addition and subtraction means as multipliers are obtained, and the second accumulation means is the addition and subtraction result. 2. The two-dimensional DCT arithmetic unit according to claim 1, wherein an accumulated value of partial products of the first constant multiplication means for one row is obtained, and the obtained accumulated value is output to the writing means.
【請求項3】 前記第一の加減算手段は、二段のシフト
レジスタと、第一の入力バッファと、第二の入力バッフ
ァと、第一の加減算器とを有し、 二段のシフトレジスタは、 一成分ずつシフトして、読み出し手段によって読み出さ
れた入力信号系列の二成分を保持し、 第一の入力バッファは、 二段のシフトレジスタが二回シフトする度に前段の保持
する一成分を受け取り、 第二の入力バッファは、 二段のシフトレジスタが二回シフトする度に後段の保持
する一成分を受け取り、第一の加減算器は、 第一の入力バッファ及び第二の入力バッファ内の二成分
同士の加算及び減算を交互に行い、 第一の定数乗算手段は、前記第一の加減算器に接続され
るN/2個の第一の定数乗算器を有し、 各々の第一の定数乗算器は、第一段目の一次元DCTにお
ける一行×一列の積和計算において、第一の加減算器に
よる加算結果及び減算結果を乗数とし、所定の行列の一
成分を被乗数とする部分積を求めて、 前記第一の累算手段は、前記N/2個の定数乗算器のそれ
ぞれに対応して接続されるN/2個の第一の加算器と、当
該N/2個の第一の加算器のそれぞれに対応して接続され
るN/2個の二段のシフトレジスタとを有し、 各々の第一の加算器は、第一の定数乗算器が出力した積
と、二段のシフトレジスタの後段から出力される成分と
を加算し、 各々の二段のシフトレジスタは、第一の加算器が出力し
た成分をシフトしながら二成分保持し、保持した二成分
を一成分ずつシフトすることで後段の出力を第一の加算
器にフィードバックして、N×2回シフトした後に、当該
一列中の二成分を一度に第二の読み出し手段に出力する
ことを特徴とする請求項2記載の二次元DCT演算装置。
3. The first addition / subtraction means has a two-stage shift register, a first input buffer, a second input buffer, and a first adder / subtractor, and the two-stage shift register is , The two components of the input signal sequence read out by the reading means are held by shifting by one component, and the first input buffer holds one component held by the preceding stage every time the two-stage shift register shifts twice. The second input buffer receives one component held by the second stage each time the two-stage shift register shifts twice, and the first adder / subtractor receives the components in the first input buffer and the second input buffer. The two constant components are alternately added and subtracted, and the first constant multiplication means has N / 2 first constant multipliers connected to the first adder / subtractor, Is a constant multiplier in the first-stage one-dimensional DCT. In the row-by-column product-sum calculation, the addition result and the subtraction result by the first adder-subtractor are used as multipliers, and a partial product in which one component of a predetermined matrix is used as a multiplicand is obtained, and the first accumulation means is N / 2 first adders connected to each of the N / 2 constant multipliers and N connected to each of the N / 2 first adders. / 2 two-stage shift register, and each first adder adds the product output from the first constant multiplier and the component output from the latter stage of the two-stage shift register. Then, each two-stage shift register holds the two components while shifting the components output by the first adder, and shifts the retained two components by one component to output the output of the subsequent stage to the first adder. To the second read-out means at once after feeding back to the second reading means after shifting N × 2 times Two-dimensional DCT operation device according to claim 2, wherein Rukoto.
【請求項4】 前記第二の読み出し手段は、一列バッフ
ァと、第一のN段の並列/直列変換用のシフトレジスタ
と、第二のN段の並列/直列変換用のシフトレジスタと
を有し、 一列バッファは、第一の一次元DCT演算手段によって順
次生成される一列分の成分を、一列おきに受け取って保
持し、保持している成分の次の列の成分が第一の一次元
DCT演算手段から出力されると、それまで保持していた
一列分の成分を第一のN段の並列/直列変換用のシフト
レジスタに一度に出力し、 第一のN段の並列/直列変換用のシフトレジスタは、前
記一列バッファが出力した一列分の成分を保持し、保持
した一列分の成分のシフトを一成分ずつ行い、当該一列
分の成分を一成分ずつ第二の一次元DCT演算手段に出力
してゆき、 第二のN段の並列/直列変換用のシフトレジスタは、第
一の一次元DCT演算手段が出力した一列分の成分で、一
列バッファが受け取らなかったものを保持し、保持した
一列分の成分のシフトを一成分ずつ行い、当該一列分の
成分を一成分ずつ第二の一次元DCT演算手段に出力して
ゆくことを特徴とする請求項3記載の二次元DCT演算装
置。
4. The second reading means includes a one-column buffer, a first N-stage parallel / serial conversion shift register, and a second N-stage parallel / serial conversion shift register. The one-column buffer receives the components of one column sequentially generated by the first one-dimensional DCT calculation unit and holds them every other column, and the component of the column next to the held component is the first one-dimensional buffer.
When output from the DCT calculation means, the one-column component held until then is output to the first N-stage parallel / serial conversion shift register at once, and the first N-stage parallel / serial conversion is performed. The shift register for use holds one-column components output from the one-column buffer, shifts the held one-column components one component at a time, and performs one-column components one component at a time on the second one-dimensional DCT operation. The second N-stage shift register for parallel / serial conversion holds the one-column component output from the first one-dimensional DCT operation unit that was not received by the one-column buffer. 4. The two-dimensional DCT according to claim 3, wherein the held one-row components are shifted one by one, and the one-row components are output one by one to the second one-dimensional DCT calculation means. Arithmetic unit.
【請求項5】 前記第二の加減算手段は、 第二の読み出し手段が出力した二成分同士の加算及び減
算を交互に行い、 前記第二の定数乗算手段は、前記第二の加減算手段と接
続されるN/2個の第二の定数乗算器を有し、 各々の第二の定数乗算器は、 第二段目の一次元DCTにおける一行×一列の積和計算に
おいて、第二の加減算手段による加算結果及び減算結果
を乗数とし、所定の行列の一行中の一成分を被乗数とす
る部分積を求めて、 前記第二の累算手段は、 前記N/2個の第二の定数乗算器のそれぞれに対応して接
続されるN/2個の第二の加算器と、当該N/2個の第二の加
算器に対応して接続されるN/2個のN×2段のシフトレジ
スタとを有し、 各々の第二の加算器は、第二の定数乗算器が出力した積
と、N×2段のシフトレジスタの最終段から出力される成
分とを加算し、 各々のN×2段のシフトレジスタは、第二の加算器が出力
した成分をシフトしながら二列分保持し、保持した成分
を一成分ずつシフトすることで最終段の出力を第二の加
算器にフィードバックして、N×N回シフトした後に、当
該二列分の成分を一成分ずつ書き込み手段に出力するこ
とを特徴とする請求項4記載の二次元DCT演算装置。
5. The second addition / subtraction means alternately performs addition and subtraction of the two components output by the second reading means, and the second constant multiplication means is connected to the second addition / subtraction means. N / 2 number of second constant multipliers, each of the second constant multipliers is the second addition / subtraction means in the 1-row × 1-column product-sum calculation in the second-stage one-dimensional DCT. The addition result and the subtraction result by, to obtain a partial product with one component in one row of a predetermined matrix as the multiplicand, the second accumulation means, the N / 2 second constant multiplier Of N / 2 second adders connected corresponding to each of, and N / 2 N × 2 shifts connected corresponding to the N / 2 second adders Each of the second adders has a product output from the second constant multiplier and a component output from the final stage of the N × 2 stage shift register. Each N × 2 stage shift register holds the two columns while shifting the component output from the second adder, and shifts the retained component one component at a time to output the final stage output. 5. The two-dimensional DCT calculation device according to claim 4, wherein the components of the two columns are output to the writing unit one by one after being fed back to the second adder and being shifted N × N times.
【請求項6】 前記累算手段は、更にN/2個のN×2段の
シフトレジスタのうち、所定の一個を除くN/2-1個の最
終段に接続されるN/2-1個の出力バッファと、出力選択
器とを有し、 N/2-1個の出力バッファは、N×2段のシフトレジスタか
らなり、接続されるシフトレジスタから一成分ずつ出力
される二列分の成分をシフトを行いながら保持し、保持
している成分を一成分ずつ順次出力選択器に出力してゆ
き、 出力選択器は、それぞれのN×2段のシフトレジスタ及び
N/2-1個の出力バッファの出力を選択して出力すること
を特徴とする請求項5記載の二次元DCT演算装置。
6. The accumulating means is further connected to N / 2-1 final stages other than a predetermined one of N / 2 N × 2 stages of shift registers, N / 2-1. It has N output buffers and an output selector, and N / 2-1 output buffers are composed of N × 2 stages of shift registers, and two columns for each component are output from the connected shift registers. Hold the components while shifting, and sequentially output the held components one by one to the output selector.The output selectors are each N × 2 stage shift register and
6. The two-dimensional DCT operation device according to claim 5, wherein the outputs of N / 2-1 output buffers are selected and output.
【請求項7】 前記定数乗算器は、 所定の行列の成分の倍数を予め格納しているROMを有し
ていることを特徴とする請求項3から6記載の何れかの
二次元DCT演算装置。
7. The two-dimensional DCT arithmetic device according to claim 3, wherein the constant multiplier has a ROM in which multiples of components of a predetermined matrix are stored in advance. .
【請求項8】 前記定数乗算器は、 所定の行列として第一段目及び第二段目の一次元DCTに
用いられる定数行列の成分及び/又は第一段目及び第二
段目の離散余弦逆変換(IDCT(Inverse Discrete Cosine
Transform)と略す)に用いられる定数行列の成分を予
め格納していることを特徴とする請求項7記載の二次元
DCT演算装置。
8. The constant multiplier is a component of a constant matrix used for the one-dimensional DCT of the first and second stages as a predetermined matrix and / or discrete cosine of the first and second stages. Inverse transform (IDCT (Inverse Discrete Cosine
The two-dimensional structure according to claim 7, wherein components of a constant matrix used for (Transform) are stored in advance.
DCT arithmetic unit.
【請求項9】 前記読み出し手段は、読み出し列生成手
段と、読み出し行生成手段と、読み出しアドレス生成手
段とを備え、 読み出し列生成手段は、読み出すべき成分の、N×Nの成
分を持つデータ行列における列番号を指定し、 読み出し行生成手段は、読み出し列生成手段が指定した
列における読み出しを行う成分の行番号を指定する読み
出しアドレス生成手段は、読み出し列生成手段が生成し
た列番号と、読み出し行生成手段が生成した行番号とか
ら、読み出すべき成分の外部メモリ中のアドレスを生成
することを特徴とする二次元DCT演算装置。
9. The read means comprises a read column generation means, a read row generation means, and a read address generation means, and the read column generation means has a data matrix having N × N components of components to be read. The read row generation means specifies the row number of the component to be read in the column designated by the read column generation means, and the read address generation means reads the column number generated by the read column generation means and the read number. A two-dimensional DCT arithmetic device, which generates an address in an external memory of a component to be read, from the line number generated by the line generation means.
【請求項10】 前記書き込み手段は、書き込み列生成
手段と、書き込み行生手段と、書き込みアドレス生成手
段とを有し、 書き込み列生成手段は、演算結果の行列の成分のうち、
書き込みを行うものの列番号を生成し、 書き込み行生成手段は、書き込み列生成手段が生成した
列番号の列における、書き込みを行う成分の行番号を生
成し、 書き込みアドレス生成手段は、書き込み行生成手段が生
成した行番号と、書き込み列生成手段が生成した列番号
とから、演算行列の各成分を書き込むための外部メモリ
中のアドレスを生成することを特徴とする請求項1から
9記載の何れかの二次元DCT演算装置。
10. The writing unit includes a write column generating unit, a write row generating unit, and a write address generating unit, and the write column generating unit is one of the elements of the matrix of the operation result.
The column number of the one to be written is generated, the write row generation means generates the row number of the component to be written in the column of the column number generated by the write column generation means, and the write address generation means is the write row generation means. 10. The address in the external memory for writing each component of the operation matrix is generated from the row number generated by the above and the column number generated by the write column generating means. 2D DCT computing device.
JP35255893A 1993-12-28 1993-12-28 Two-dimensional dct arithmetic unit Pending JPH07200539A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35255893A JPH07200539A (en) 1993-12-28 1993-12-28 Two-dimensional dct arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35255893A JPH07200539A (en) 1993-12-28 1993-12-28 Two-dimensional dct arithmetic unit

Publications (1)

Publication Number Publication Date
JPH07200539A true JPH07200539A (en) 1995-08-04

Family

ID=18424886

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35255893A Pending JPH07200539A (en) 1993-12-28 1993-12-28 Two-dimensional dct arithmetic unit

Country Status (1)

Country Link
JP (1) JPH07200539A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6525773B1 (en) 1997-06-09 2003-02-25 Sharp Kabushiki Kaisha Image processing device and method with data block flow control
KR100451147B1 (en) * 1997-02-25 2004-11-26 엘지전자 주식회사 High-speed multiplier, realized in small size so as to be used as a multiplier engine of a processor and designed in single structure having regularity
CN1305313C (en) * 2003-12-03 2007-03-14 威盛电子股份有限公司 System for discrete cosine transforms/inverse discrete cosine transforms based on pipeline architecture
JP2011509538A (en) * 2007-09-26 2011-03-24 クゥアルコム・インコーポレイテッド Efficient conversion technology for video coding
KR101226075B1 (en) * 2011-02-01 2013-01-24 에스케이하이닉스 주식회사 Apparatus and method for image processing
JP2018078572A (en) * 2013-07-12 2018-05-17 クゥアルコム・インコーポレイテッドQualcomm Incorporated Concurrent processing of horizontal and vertical transforms

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100451147B1 (en) * 1997-02-25 2004-11-26 엘지전자 주식회사 High-speed multiplier, realized in small size so as to be used as a multiplier engine of a processor and designed in single structure having regularity
US6525773B1 (en) 1997-06-09 2003-02-25 Sharp Kabushiki Kaisha Image processing device and method with data block flow control
CN1305313C (en) * 2003-12-03 2007-03-14 威盛电子股份有限公司 System for discrete cosine transforms/inverse discrete cosine transforms based on pipeline architecture
JP2011509538A (en) * 2007-09-26 2011-03-24 クゥアルコム・インコーポレイテッド Efficient conversion technology for video coding
US8654833B2 (en) 2007-09-26 2014-02-18 Qualcomm Incorporated Efficient transformation techniques for video coding
KR101226075B1 (en) * 2011-02-01 2013-01-24 에스케이하이닉스 주식회사 Apparatus and method for image processing
US8693796B2 (en) 2011-02-01 2014-04-08 SK Hynix Inc. Image processing apparatus and method for performing a discrete cosine transform
JP2018078572A (en) * 2013-07-12 2018-05-17 クゥアルコム・インコーポレイテッドQualcomm Incorporated Concurrent processing of horizontal and vertical transforms

Similar Documents

Publication Publication Date Title
EP0353223B1 (en) Two-dimensional discrete cosine transform processor
Sun et al. VLSI implementation of a 16* 16 discrete cosine transform
JP2646778B2 (en) Digital signal processor
EP2017743A2 (en) High speed and efficient matrix multiplication hardware module
US5331585A (en) Orthogonal transformation processor for compressing information
WO1995033241A1 (en) High-speed arithmetic unit for discrete cosine transform and associated operation
US4853887A (en) Binary adder having a fixed operand and parallel-serial binary multiplier incorporating such an adder
JPH07200539A (en) Two-dimensional dct arithmetic unit
JP2725544B2 (en) DCT and inverse DCT operation device and operation method thereof
EP0655694B1 (en) Discrete cosine transform processor
JPH09259115A (en) Very-large-scale integrated circuit for bit-serial matrix transposition
JPH07121507A (en) Discrete cosine transforming unit
JP2822684B2 (en) Discrete cosine transform device and inverse discrete cosine transform device
JP2901896B2 (en) Orthogonal transform processor
JPH05174046A (en) Arithmetic circuit
JPH05153402A (en) Discrete cosine transformation device
JP2864597B2 (en) Digital arithmetic circuit
JP2000137703A (en) Discrete cosine converting device and reverse discrete cosine converting device
JP3575991B2 (en) Orthogonal transform circuit
JP3397838B2 (en) Image processing apparatus and discrete cosine transform method
EP0321584A1 (en) System for calculating sum of products
JP3396818B2 (en) DCT operation circuit and IDCT operation circuit
JP2001067338A (en) High speed convolutional operation system, its arithmetic unit, high speed interpolation system and high speed interpolation device
KR940007569B1 (en) Array multiplication circuit
JPH07319849A (en) Fast discrete cosine computing element