6
151 Unified Matrix Processor Design for FCT-IV and FST-IV Hartley Based Transforms Qadri Hamarsheh Abstract- A new Unified Fast Shifted Cosine and Sine According to these matrixes we have different kinds of Transform Matrix Processor based on Fast Hartley Transform DCT and DST: DCT-I, DCT-II, DCT-III, DCT-IV, DST-I, is presented and described. It is also shown that the decimation- DST-IL, DST-III and DST-IV. For DCT-IV, transform in-frequency (DIF) FCT-IV and FST-IV can be computed using matrix PN (n, k) (CIVN) is defined as follows: the same building blocks which are used for computing decimation-in-time FCT-IV and FST-IV. A Unified Fast Shifted CIVN = N[qkqn cos(fT(2n + 1)(2k + 1) (4N)], Cosine and Sine Transform Matrix Processor can be designed n,k = 0,1,2, ,N-1, (1. 3) to compute either the DCT-IV or DST-IV. Where q0 1, qn 1/X when n.WO [1]. Keywords: Matrix Processor, Discrete Cosine Transform, Discrete Sine Transform, Hartley Transform and FCT-IV and Analog variant for Sine DST-IV transform matrix has the FST-IV algorithms. following formula: I. INRODUCTION Discrete Cosine Transform (DCT) and Discrete Sine Transform (DST) are techniques for converting a signal into elementary frequency components; they are widely used in Image Compression, Desktop Publishing, Multimedia and High-Definition Television (HDTV). In general case, N -point Discrete Cosine and Sine Transforms (DCT and DST) in matrix form are given by the following formulae (1. 1) or (1.2): YN PN XN, N-1 yn(k)O= X PN (n, k n=O (1.1) (1.2) Where XN = x(O),x(1),...,x(N -1) and YN = y(O),y(l),...,y(N -1) represent two vectors that define N -point input (spatial) and output (spectrum) sequences, and PN = [PN (n, k)], n, k = O,1,2,...,N -1 represents quadratic N x N -point matrix that gives the transforms coefficients. Each of DCT and DST has four different PN matrixes that describe the shifted and non shifted transforms in spatial and frequency domains. SIVN =2 N[qkq sin(w(2n + 1)(2k + 1) 1(4N)], n,k O,1,2,...,N-1, (1.4) Where qN-1 1/J2 and qn = 1 when n N-1 [1]. Matrices (1.3) and (1.4) describe shifted simultaneously in time and frequency domains and have symmetric property, which means that direct and inverse Matrices are equal. The following relations are hold for these matrices: CIVN = CIVN , SIVN = SIVN' (1.5) The benefits of DCT-IV and DST-IV can be summarized as follows: ) Their near optimal concentration of the signal energy in a narrow frequency band, and therefore near optimal data compression. ) Shifted DCT-IV and DST-IV are approximated to the Karuhnen-Loeve transform by the criteria of the quadratic median error among the orthogonal transforms. For that reason, DCT-IV and DST-IV are the most popular transform techniques for image compression and are adopted on various coding schemes to construct effective data compression standards: JPEG, MPEG,JFI and MPEG2 [2, 3]. ) DCT-IV and DST-IV are real type transforms which work only with real signals; hence they reduce the computation complexity. MEMSTECH'2006, May 24-27, 2006, Lviv-Polyana, UKRAINE Dr. Qadri Hamarsheh - MIS Department, Faculty of IT, Philadelphia University, Amman, Jordan, E-mail: qhamarshehgphiladelphia.edujo

[IEEE 2nd International Conference on Perspective Technologies and Methods in MEMS Design - Lviv, Ukraine (2006.05.24-2006.05.27)] Proceedings of the 2nd International Conference on

  • Upload
    qadri

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

Page 1: [IEEE 2nd International Conference on Perspective Technologies and Methods in MEMS Design - Lviv, Ukraine (2006.05.24-2006.05.27)] Proceedings of the 2nd International Conference on

151

Unified Matrix Processor Design for FCT-IV and FST-IV

Hartley Based TransformsQadri Hamarsheh

Abstract- A new Unified Fast Shifted Cosine and Sine According to these matrixes we have different kinds of

Transform Matrix Processor based on Fast Hartley Transform DCT and DST: DCT-I, DCT-II, DCT-III, DCT-IV, DST-I,

is presented and described. It is also shown that the decimation- DST-IL, DST-III and DST-IV. For DCT-IV, transform

in-frequency (DIF) FCT-IV and FST-IV can be computed usingmatrix PN (n, k) (CIVN) is defined as follows:

the same building blocks which are used for computing

decimation-in-time FCT-IV and FST-IV. A Unified Fast Shifted CIVN = N[qkqn cos(fT(2n + 1)(2k + 1) (4N)],

Cosine and Sine Transform Matrix Processor can be designed n,k = 0,1,2, ,N-1, (1. 3)

to compute either the DCT-IV or DST-IV.Where q0 1, qn 1/X when n.WO [1].

Keywords: Matrix Processor, Discrete Cosine Transform,

Discrete Sine Transform, Hartley Transform and FCT-IV and Analog variant for Sine DST-IV transform matrix has the

FST-IV algorithms. following formula:

I. INRODUCTION

Discrete Cosine Transform (DCT) and Discrete Sine

Transform (DST) are techniques for converting a signal into

elementary frequency components; they are widely used in

Image Compression, Desktop Publishing, Multimedia and

High-Definition Television (HDTV).

In general case, N -point Discrete Cosine and Sine

Transforms (DCT and DST) in matrix form are given by the

following formulae (1. 1) or (1.2):

YN PN XN,

N-1

yn(k)O= X PN (n, kn=O

(1.1)

(1.2)

Where XN = x(O),x(1),...,x(N -1) and

YN = y(O),y(l),...,y(N -1) represent two vectors that define

N -point input (spatial) and output (spectrum) sequences,

and PN = [PN (n, k)], n,k = O,1,2,...,N -1 represents

quadratic N x N -point matrix that gives the transforms

coefficients.

Each of DCT and DST has four different PN matrixes

that describe the shifted and non shifted transforms in spatial

and frequency domains.

SIVN =2 N[qkq sin(w(2n + 1)(2k + 1) 1(4N)],

n,k O,1,2,...,N-1, (1.4)

Where qN-1 1/J2 and qn = 1 when n N-1 [1].

Matrices (1.3) and (1.4) describe shifted simultaneously in

time and frequency domains and have symmetric property,

which means that direct and inverse Matrices are equal. The

following relations are hold for these matrices:

CIVN = CIVN , SIVN = SIVN' (1.5)

The benefits of DCT-IV and DST-IV can be summarized

as follows:

) Their near optimal concentration of the signal

energy in a narrow frequency band, and therefore near

optimal data compression.

) Shifted DCT-IV and DST-IV are approximated to

the Karuhnen-Loeve transform by the criteria of the

quadratic median error among the orthogonal

transforms. For that reason, DCT-IV and DST-IV are

the most popular transform techniques for image

compression and are adopted on various coding

schemes to construct effective data compression

standards: JPEG, MPEG,JFI and MPEG2 [2, 3].

) DCT-IV and DST-IV are real type transforms

which work only with real signals; hence they reduce

the computation complexity.

MEMSTECH'2006, May 24-27, 2006, Lviv-Polyana, UKRAINE

Dr. Qadri Hamarsheh - MIS Department, Faculty of IT,Philadelphia University, Amman, Jordan,E-mail: qhamarshehgphiladelphia.edujo

Page 2: [IEEE 2nd International Conference on Perspective Technologies and Methods in MEMS Design - Lviv, Ukraine (2006.05.24-2006.05.27)] Proceedings of the 2nd International Conference on

152

) DCT-IV transforms are used to avoid artifacts

stemming from the block boundaries.

According to the construction method, FCT-IV and

FST-IV are classified to: direct algorithms, based on DCT

and DST matrix factorization directly [4, 5, 6, 7], indirect

algorithms where fast algorithms of another transforms are

used to calculate these algorithms [4, 8, 9, 10, 11, 12, 13],

recursive algorithms [14] and algorithms represented by

systolic structures.

In the proposed processor, the indirect algorithms of Fast

Shifted Cosine and Sine Transforms use fast Hartley

transform as the base transform, so let talk a little about fast

algorithms of Hartley transforms and how we can use these

algorithms to calculate our destination algorithms.

II. FAST ALGORITHMS OF HARTLEY

TRANSFORM (FHT)The discrete version of the Hartley transform for the real

sequence x(n) can be written explicitly as:

N-1H(k) = Ex(n)C ~'+YS')n

n=O

k =0,,...,N -1 (2.1)

And the inverse transform can be written explicitly as:

x(n) = H(k)(cN + SNk)k=O

n =0,,...,N -1

) They have computational advantages over the

discrete Fourier transform.

The decomposition formula for Radix-2 FHT with

decimation-in-time (DIT)-FHT2 (which is used in the

proposed processor) can be written as [4]:

H(k) = HI(k) + H2(k)Cj + H2(N-k)Sk,k=0,1...,N-1, (2.3)

Where H(k) =DHTN{x(n)},

HP(k) = DHTNX24x(2n+p-l)} and p=1,2.

The FHT2 Graph for N = 16 is shown in Fig. 2.1.The

FHT2 base operations (simple and vector rotation) are shown

in Fig. 2.2.

(2.2)

Where x(n) denotes the input sequence of elements,

CN cos(2r/N) and SN = sin(2r/N).The advantages ofDHT are:

) Direct and inverse transforms are defined in real

numbers domains; the diffrence feature from the DFT

is that it transforms real inputs to real outputs, with no

intrinsic involvement of complex numbers.

) Direct and inverse transforms have a symmetry

property, which means that we can use universal

algorithm (program or device) to calculate the

spectrum of the signals.) There is a very simple way to convert DHT to DFT

(Discrete Fourier Transform) [4].) There are a wide range of Fast Hartley Algorithms:

Radix-2, Radix-4, Radix-24 FHT, etc [4].

Fig. 2.1 FHT2 Graph for N=16

a

b

a

a+b a k a CN+b SkN

*a-b b ba SkN-b CkNb

Fig. 2.2 FHT2 base operations: a) simple b) vector rotation

In Eq. (2.4) the FHT2 computation complexity is

calculated, taking into account, that the operation "vector

rotation" is calculated effectively using 3 additions and 3

multiplications of real numbers [4].

ulm (FHT2)=2 -2 (3m-10) +4;

am(FHT2)= 2m-2 (7m-10)+4, (2.4)

MEMSTECH'2006, May 24-27, 2006, Lviv-Polyana, UKRAINE

Page 3: [IEEE 2nd International Conference on Perspective Technologies and Methods in MEMS Design - Lviv, Ukraine (2006.05.24-2006.05.27)] Proceedings of the 2nd International Conference on

153

III. INDIRECT CALCULATION OF FCT-IV

AND FST-IV

The fast algorithm to calculate N- point DCT-IV (FCT-

IVH (LNv (k) ) [15] can be summarized as follows:

Step 1. Perform a permutation of the input sequence

x(n) of N points to obtain a new sequence a(n) using the

following equation:

a(n) =x(2n), a(N -1- n) =- x(2n + 1),n = 0,1,...,N/2 -1. (3.1)

Step2. Compute Nl 2 -1 butterflies operations with a(n)

sequence to obtain a new sequence Y2 (n) using the

following formula:

Y2(n) =a(n)CN+a(N -n)S2N,

Y2(N -n) =a(n)SN -a(N -n)C2N,n =1,2,...,N 2 -l;Y2()= a(0),

Y2 (N 2) = a(NI 2). (3.2)Step3. Fulfillment of N - point DHT for Y2 (n) sequence:

Y2 (k) = DHTN{Y2 (n) }.

Step4. Fulfillment of operations "vector rotation" to get

the required values of DHT:

LNv(k)=Y2(k)RN(2k+1)+-Y2(N- 1 -k)R8N(2k+1)LN(N-1-k)=Y2(k)R8N(2k+1)-Y2(N-1-k)R8N(2k+1),

k = 0,l,...,N/2 1. (3.3)

Step5. End ofFCT-IVH algorithm.

To calculate N - point DST-IV (FST-IVH (QNV (k)) [1 5]

do the following:

Step 1. Sequence permutation ofx(n):

a(n) =x(2n), a(N 1- n) =x(2n + 1),

n = 0,1,...,N/2 -1. (3.4)

Step2. Fulfillment of operations "vector rotation" with

the a(n) sequence to get Y2 (n):

Y2(n) =a(n)CN+a(N -)S.N,

Y2(N -n) =a(n)SN -a(N -n)C2N,n = 0,1,...,N/ 2 - 1;

Y2(0)= a(0),

Y2(Nl2) = a(N 2).

Step3. Fulfillment of N - point DHT for Y2 (n) sequence:

Y2(k) = DHTN{Y2 (n)}

Step4: Fulfillment of operations "vector rotation" to get

the required values ofDHT:

QV (k)=Y2 (k)R8N (2k+1)+Y2(N- 1 -k)R8N (2k+1)

QJV(N-1-k)=Y2(k)R+N(2k+1)- Y2(N-1-k)RNN(2k + 1)

k = 0,1,...,N/2 -1 (3.6)

Step5. End ofFST-IVH algorithm.

We can conclude that DCT-IV and DST-IV are symmetric

transforms, so if we invert the FCT-IVH and FST-IVH we

will obtain the FCT-IVH and FST-IVH algorithms with

decimation-in-frequency (DIF).

We can see that, the DIT N- point DCT-IV and DST-IV

based on fast algorithm Hartley contain the following steps:

1. Retrograde indexing the elements of the input

sequence

2. First step of vectors rotation ( computation of

FCT-IV or FST-IV butterflies).

3. N - point DHT calculation

4. Second step of vectors rotation (post calculation

reordering).

With DIF algorithms we will have the inverse order of

above steps.

The computation complexity for the obtained algorithms is:

/lIV (FCT) 2m1 (m + 3) -2,afv (FCT) 2m1 (3m + 1) + 2,

jN4 (FCT) = v (FST),

a<v(FCT)= akV(FST) (3.7)

In Eq. (3.7), we assume that, the vector rotation can be

calculated through 3 real additions and 3 real multiplications,

Computation complexity for N point FHT2 equals: [4]

pm (FHT) = 2m1 (m - 3) + 2 ;

am(FHT) = 2`1 (3m -5) + 6. (3.8)

And vector rotation step in all FCT-IV and FST-IV

algorithms contains 3 2m-l multiplications and 3 2m-

additions.

(3.5)

MEMSTECH'2006, May 24-27, 2006, Lviv-Polyana, UKRAINE

Page 4: [IEEE 2nd International Conference on Perspective Technologies and Methods in MEMS Design - Lviv, Ukraine (2006.05.24-2006.05.27)] Proceedings of the 2nd International Conference on

154

IV. FCT-IVH MATRIX PROCESSOR

ARCHITECTURE

According to the algorithm FCT-IVH in the previous

section, Fig. 4.1 illustrates the general architecture of the

matrix processor (MP).

Fig. 4.1 System Block Diagram for FCT-IVH Matrix Processor

FCT-IVH Matrix Processor contains three sub blocks:

memory, operational unit and control unit. Sorted Memory

Block (SMB) is used for storing, sorting and indexing the

input values from input bus x(n) in order to give output the

same rate that input data; this block performs this process of

data using the formula 3.1.

Control Unit Block (CUB) contains Address Generation

Unit (AGU) and Control Unit (CU).These units contain

control lines that select the memory or I/0 and cause them to

perform a read or write operation, address processor memory

space and choose the length of transform (Kn control

signal).

Operational Unit Block (OUB) contains the following sub

blocks:

4 Inverter Block, this computation block is

used for inversing the sign using formula 3.1.

Vector Rotation Block VR1, first vector

rotation block fulfills the rotation before Hartley,

it's a butterflies' computation block of adders and

subtractors, addition and subtractions are

straightway performed as defined in formula 3.2.

4 ~ FHT Processor that fulfills the N-point

DHT.

14+ Vector Rotation Block VR2, second vector

rotation block fulfills the rotation after Hartley, it's

a butterflies' computation block of adders and

subtractors, addition and subtractions are

straightway performed as defined in formula 3.3.,

this block is called FHT-÷FCT-IV Converter block,

using this block the required values of FCT are

calculated.

The internal structures of VR1 and VR2 are shown in

Figs. 4.2 and 4.3. These structures contain (N 1 2 - 1)

Computation blocks vrl, vr2... vrN/2 1 for VR1 and Nl 2

Computation blocks forVR2.

In general, each block computes the vector rotation using

the following formula:

Y1 X1*CK +X2SK,

Y2 XI SK -X2 CK (4.1)Where: X1, X2 - input of the base operation; Y1, Y2 -

output of the base operation, and Ck, Sk - phase multiplier

factors values.

((na W) Y2(O)

.Y2(1)

Y2(2)

Y2(N/2-1)

Y2N/2)

Y2(N/2+1

Y2(N-2)

Y2(N-1)

Fig. 4.2 VR1 Structure

MEMSTECH'2006, May 24-27, 2006, Lviv-Polyana, UKRAINE

Input Bus x(n)

1 11 ***l___

OUB

Output Bus LIv (k)

--------------------------------------------------

51

Page 5: [IEEE 2nd International Conference on Perspective Technologies and Methods in MEMS Design - Lviv, Ukraine (2006.05.24-2006.05.27)] Proceedings of the 2nd International Conference on

155

Fig. 4.3 VR2 Structure

VI. CONCLUSION

This paper has been dedicated to describe and represent

the Unified FCST-IVH Matrix Processor based on fast

Hartley Transform, in this paper the characteristics of the

indirectly FCT-IV and FST-IV algorithms' realization using

Hartley Transforms on the base of matrix processors are

presented, the proposed matrix processor consists of highly

regular, parallel elements which are suitable for VLSI

implementation, this Matrix Processor projects the graph of

the algorithm, so the execution time of the algorithm is equal

to the sum of the execution time for all algorithm stages.

It is also shown that different FCT-IV and FST-IV

algorithms can be computed using the same building blocks

REFERENCESV. UNIFIED FCST IVH PROCESSOR

Fig. 4.4 represents the proposed unified processor.

Comparing Fig. 4.1 and Fig. 4.4 we can see that the FCT-

IVH Matrix Processor and FCST-IVH Matrix Processor

share the same building blocks therefore, we can design a

FCT - FST processor with additional multiplexer and a

single line control signal (S in Fig. 4.4). The S flagdetermines if the processor computes FCT or FST (formula3.1 or formula 3.4): S =0 it computes FCT-IVH, S =1 it

computes FST-IVH. The output of multiplexer is connected

directly to VR1 in Sine Transform case, or the output is

connected to the inverter block in Cosine Transform case.

[1] Wang Z. Fast Algorithms for the Discrete W

Transform and for the Discrete Fourier Transform//IEEE

Trans. ASSP-32. - 1984. - N 4. - P. 803-816.

[2] Murthe R.N., Swamy M.N.S. On the Hardware

Implementation of the Lapped Orthogonal Transform and

the Modulated Lapped Transform// ProceedingsInternational Symposium on Circuits and Systems.- 1992.-

p. 145-148.

[3] Wallace G. K. The JPEG Still Picture CompressionStandard// Communications of the ACM, Vol 34, No 4,

April 1991. -P. 30-44.

[4] Yatsymirskyy M.N. Fast Algorithms of orthogonal

trigonometric transforms. Lviv: Academic Express, 1997. -

219c.

[5] Bi G., Li G., Ma K.-K., Tan T.C. On the Computation

of Two - Dimensional DCT//IEEE Transaction on Signal

Processing. - 2000. - N 4. - P. 1171 - 1183.

[6] Byelong G.L. A new algorithm to compute the discrete

cosine transform// IEEE Trans. ASSP-32. - 1984. -N 6. - P.

1243-1245.

[7] Chan S. C. , Ho K. L. A New Two - Dimensional Fast

Cosine Transform Algorithms// IEEE Trans. SignalProcessing. - 1991. - J27. -P. 481-482.

[8] Ahmed N., Natarajan T. and Rao K. R. "Discrete

cosine transform." IEEE Trans. Comput.. pp. 90-93. Jan.

1974.

Fig. 4.4 Unified FCST-IVH Processor StructureMEMSTECH'2006, May 24-27, 2006, Lviv-Polyana, UKRAINE

IV(o

NLV (1)

LNv(N/2-1)LIN(N/2)

LNv(N-2)VN(N-1)

Inp ut B us x(n)

k. Control Unit Block |

C UB _ SM B (RAM )

-l 111 1

c~~~~ P r ess

I nverters)oc

ectk)orRotaIon"k

..................................................

--------------------------------------------------

Page 6: [IEEE 2nd International Conference on Perspective Technologies and Methods in MEMS Design - Lviv, Ukraine (2006.05.24-2006.05.27)] Proceedings of the 2nd International Conference on

156

[9] Coley J.W., Lewis P.A., Welch P.D. The fat Fourier

transform algorithm: Programming consideration in the

calculation of sine, cosine and Laplase transform //J. Sound

Vib. - 1970. - N3, July. - P. 315-337.

[10] Heideman M.T. Computation of an Odd-Length DCT

from a Real-Valued DFT of the Same Length 11 IEEE

Transaction on Signal Processing.- 1992.- N 1. - P. 54 - 61.

[11] Lee B.G. A New Algorithms to Compute the Discrete

Cosine Transform// IEEE Trans. V.ASSP-32. - 1984. - N 6. -

P. 1243-1245.

[12] Lun D.P.-K., Siu W.-C. An Improved Fast Radon

Transform algorithm for two-dimensional Discrete Fourier

and Hartley Transform// Proceedings International

Symposium on Circuits and Systems.-San Diego, 1992.- p.

726-729.

[13] Malvar H. Fast computation of discrete cosine

transform through fast Hartley transform //Electronics

Letters, 1986.- V.22.N 7.- P.352-353.

[14] Liu R. K.J., Chiu C.-T. Unified Parallel Lattice

Structures for Time-Recursive Discrete Cosine/Sine/Hartley

Transforms// IEEE Transaction on Signal Processing.-

1993.- N 3. - P. 1357 - 1377.

[15] Hamarsheh Q.J., Yatsymirskyy M.N. Fast algorithms

of one-dimentional cosine and sine transforms 1I the Bulletin

of Kharkov State Polytechnic University. Systems Analysis,

Control and Information Technologies. -2000. - J297. -

P.100-105.

MEMSTECH'2006, May 24-27, 2006, Lviv-Polyana, UKRAINE