- About this Journal ·
- Abstracting and Indexing ·
- Advance Access ·
- Aims and Scope ·
- Article Processing Charges ·
- Articles in Press ·
- Author Guidelines ·
- Bibliographic Information ·
- Citations to this Journal ·
- Contact Information ·
- Editorial Board ·
- Editorial Workflow ·
- Free eTOC Alerts ·
- Publication Ethics ·
- Reviewers Acknowledgment ·
- Submit a Manuscript ·
- Subscription Information ·
- Table of Contents

Journal of Electrical and Computer Engineering

Volume 2012 (2012), Article ID 879626, 10 pages

http://dx.doi.org/10.1155/2012/879626

## Improved Algorithm for ODCT Computation of a Running Data Sequence

ECE Department, Jaypee Institute of Information Technology, Noida 201307, India

Received 23 May 2012; Revised 16 October 2012; Accepted 3 November 2012

Academic Editor: Chi Ko

Copyright © 2012 S. Akhter et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Fast windowed update algorithms capable of independently updating the odd discrete cosine transform (ODCT) and odd discrete sine transform (ODST) of a running data sequence are analytically developed. In this algorithm, to compute the ODCT coefficients of a real-time sequence, we do not require the ODST coefficients. Similarly, the ODST coefficients of the shifted sequence can be calculated without using ODCT coefficients. The running input data sequence is sampled using a rectangular window. However, this idea can be easily extended for other windows. The update algorithm derived herein can be used to compute the transform coefficients of the shifted sequence as new data points are available. The complexity of developed algorithm is . The validity of algorithm is tested by MATLAB simulations.

#### 1. Introduction

The DCT transform [1] has been extensively used in various digital image coding schemes and image compression standards. It is known that in most practical cases, the DCT-based schemes outperform in terms of compression ratio. In any real-time data processing system, a new data point is input at every sampling instant. One method to find the DCT can be to compute it for the entire data vector or data matrix. Although this looks easy, it is a cumbersome task. Another method is to reduce the dataset and then compute DCT coefficients for a smaller dataset. Hence, a part of incoming data stream is sampled using window of size , and its transform coefficient is computed. An example is a tapped delay line adaptive filter [2]. In this case as new samples arrive, the transform of the updated data is computed. One computationally attractive method given by Yip and Rao [3] uses the shift property of the discrete transform wherein the transform of the shifted data can be obtained from respective transforms (both DCT and DST) of the unshifted data plus the data points shifting in, That is, the transform of the updated sequence is obtained without having to perform complete -point transform at every instant of time. However, this scheme of Yip and Rao [3] had a drawback of dependency between DCT and DST coefficients.

Update algorithm initially developed was limited to one-point update at a time [3, 4]. Later algorithms for -point, , and update for DCT, and DST were developed [5, 6] but all these algorithms needed simultaneous update of DCT and DST coefficients, that is, to compute the updated DCT coefficients, the DST coefficients need to be calculated simultaneously and vice versa. Thereafter, independent update algorithms were developed in [5] based on second-order shift properties of DCT and DST coefficients, these algorithms were limited to one-point update for even discrete cosine transform (EDCT) and even discrete sine transform (EDST). This concept was extended to include new points at a time for EDCT/EDST in [7–9]. The DCT and DST transforms of type I–IV form a group of-so-called even DCT/DST. These transforms are very well studied and a number of efficient implementation techniques exist in the literature.

Another group of transforms, namely, DCT/DST V–VIII, are called “Odd” DCT/DST. Not much work has been reported in developing efficient implementation techniques for odd DCT/DST computation [10]. In this paper, we give an efficient algorithm for real-time computation of transform coefficients capable of independently updating odd DCT and odd DST coefficients. We have derived *r*-point independent update algorithm for independently processing ODCT and ODST coefficients in the presence of rectangular window. The algorithms are analytically derived and the results verified with MATLAB simulations for various different values of sequence length and different data points. Our interest in this work is based on new application of odd DCT/DST-VI/VII transforms with a possible application in ISO/IEC/ITU-T high efficiency video coding (HEVC) standards [10].

To compute the transform of an infinite input sequence, first a suitable sequence of length is extracted. To calculate the effect of inclusion of new points, update algorithms can be used for fast computation of transform coefficient of the updated sequence. In this paper, we have derived the update algorithms for ODCT type-II and ODST type-II that have the capability of independently updating the ODCT and ODST coefficients. These algorithms would be useful in applications where we need only the ODCT coefficients or only the ODST coefficients. These algorithms provide lower complexity implementation as compared to the previously available algorithms as we do not need to calculate and store values of both ODST and ODCT coefficients.

The ODCT-II and ODST-II of input signal of length is defined by where and are the ODCT and ODST coefficients, respectively.

Modifying the original equations of ODCT and ODST to include a sequence pointer [5], we get The input data in the above expressions is indexed from to .

This paper is organized as follows. In Section 2, the -point independent update algorithm is derived analytically for the ODST independent ODCT-II, in the presence of rectangular window. ODCT independent ODST-II update algorithm can be derived similarly and results is given for brevity. In Section 3, MATLAB implementation is discussed followed by Section 4 where comparison of computational complexities is given in terms of number of multiplications and additions followed by Section 5 that lists the conclusion.

#### 2. Derivation of the *-*Point Update Algorithm for Independent ODCT-II

Let for represent the updated ODCT-II coefficients including the effect of new data points. From (3), we get
Defining and fragmenting the summation into two parts, to and to yields,
The term is equal to unity in the first summation term for the given range. Substituting in first term and in the second term, we get
Breaking the 1st term into two summations, we get
Therefore,
Introducing term in the first summation since it is equal to unity for the given range, we get
After modifying the 1st summation term, we have
Expanding the first summation term yields
first term can be written as . Modifying the 2nd term in summation from to as to , we get
It can be observed in 2nd term that is unity for to . Using (4), this term can be rewritten as follows:
Replacing
Putting in the 1st summation term, and in the 2nd summation term, we get
Rewriting the last summation term from to and adding th term, we get,
in the 5th term is equal to unity for the given range of summation. Rewriting the 5th term with the summation limits changed from to as to and subtracting th term, we get
The expression given in (18) shows that for finding ODCT coefficient of -point updated signal, we require both ODCT and ODST coefficients of previous data points. We need a way to derive ODST independent update equation. For making independent ODCT update, we calculate as follows, which is ODCT coefficient of -point update of previous data points:
Substituting in the above equation yields
Breaking the summation into two terms, we get
Changing the first summation limit to to , and adding th term, we get,
is unity in the range of 1st summation as well as in 2nd summation. Introducing in the first term which is unity in the given range, we get,
Changing the summation of the first term from to and subtract th term, we get
Solving further yields
Expanding 1st term, substituting in the 2nd term and in the 3rd term, we have
Using the definition of ODCT and ODST as given in (3) and (4) and substituting
Adding (18) and (27) results in
where represent the ODCT coefficients of the previous time-step sequence, represents the ODCT coefficients in the current time step sequence, and represents ODCT coefficients of *r*-point updated sequence.

Equation (28) yields ODCT-II independent update equation that is independent of the ODST coefficients hence it can be used for fast computation of ODCT coefficients in the presence of new data points. The above derived algorithm can be used to compute the ODCT transform for any value of sequence length and value of ranging from 1 to . From (28), it can be easily seen that while computing the ODCT coefficients of updated sequence, we require ODCT coefficients of the two previous times-step sequence.

Therefore, there will be two stages for computing coefficients for updated sequence. One is the preprocessing stage where we calculate coefficients of two previous time-step data points using the conventional definition of the transform, and the second is the update stage where update algorithm is used to calculate coefficients of the shifted sequence. Once the pre-processing stage is over, the algorithm enters into update stage and the last two time-step coefficients are saved in and . The algorithm remains in update stage thereafter. The conventional definitions are to be used only once in pre-processing stage and thereafter update algorithm is used each time new data points are shifted in the input sequence.

The signal point represents the oldest data points shifted out and represents recent data shifted out. The signal point indicates the newest data points shifted in and shows earlier data entered into. Analogous ODCT-II independent ODST-II fast update algorithms in the presence of new data points for can be similarly derived and the final result is listed below. The detailed derivation of ODST-II fast update algorithm is excluded for brevity as
is the ODST coefficients of the previous time-step sequence, is the ODST coefficients in the current time step, and represents the updated ODST coefficients in the presence of *r*-points shifted in. In (29), the signal points represent recent data shifted out and represent the oldest data points shifted out. The signal point indicates data point shifted in the previous time-step and indicates newest data point shifted in.

Steps for computing ODCT -point independent update are given in Figure 1. Signal represents the initial data points, is the signal after -point shift and represents the signal after another -point shift.

Independent update algorithm can be implemented in two major steps: one is the pre-processing step wherein we use the conventional ODCT definitions to compute the transforms and once we have the transform of two time steps then we can use the independent update algorithm, analytically derived earlier in this section. The pre-processing step is used only once to compute the two time-step transforms then the algorithm enters the update stage and remains in this stage thereafter.

*( a) Preprocessing Step*

Compute the ODCT coefficients values of and from the definition and save these values as and , respectively.

*( b) Update Step*

This involves the computation of ODCT coefficients of -point shifted data, , using update algorithm listed in (28).

*Step 1. *Using the values of and (computed in part ()) and the new data pointed shifting in, we compute the ODCT coefficients of the new -point shifted data using (28) and save it as .

*Step 2. *Overwrite with , and with .

Repeat the update step for each time new -point data is entered.

The flow chart for this algorithm is given in Figure 1. Similarly, the ODCT independent ODST independent update algorithm can be implemented in the presence of rectangular window.

#### 3. MATLAB Implementation

The independent update algorithms derived in (28) and (29) for ODCT and ODST, respectively, were tested in MATLAB for different values of and . The code snippet is given in Algorithm 1 for and .

In the program shown in Algorithm 1 program represents the oldest ODCT coefficient of input signal say . Two new data points “9” and “10” are shifted in, are the modified data array becomes and its coefficients are denoted by . This is the pre-processing stage. When two new data points “11” and “12” are shifted in, the coefficients of the shifted sequence are calculated using the update algorithm derived in (28). Array “*fold*” is used for storing the four data points shifting out and array “*fnew*” is used for storing the four new data point shifting in.

After simulating the program shown in Algorithm 1, value calculated using the update algorithm is found to be the same as that computed from definition of ODCT for the shifted sequence . This verifies the algorithm.

Similarly, the code for ODST-II independent update algorithm was written to test the correctness of the derived algorithm.

#### 4. Performance Analysis

The computation of running ODCT and ODST based on independent update algorithm is expected to provide certain advantages over simultaneous update algorithm proposed by Murthy and Swamy [2], and Sherlock and Kakad [6] for EDCT/EDST. The comparison is done on the basis of total number of operations (multiplications and additions) used for the computation of transform coefficients for *r*-point updated data. If ODCT-II is to be computed for using basic definition as given by (3), then it requires 46 multiplication and 56 addition operations. Similarly for ODST-II computation from definition requires 33 multiplication and 38 addition operations.

The expression for simultaneous update of ODST-II is given below Computation of ODST coefficients of the updated sequence, for sample length , using simultaneous update algorithm requires multiplications and additions. The above values are computed after expanding (30) for different values of . We have done analysis for and 2, and it can be extended for other values of also.

For , Computing the ODST coefficients to using (31) requires 21 multiplication and 14 addition operations. Similarly for , we have Computing the ODST coefficients to using (32) requires 35 multiplication and 28 addition operations. In general we require multiplication and addition operation for computing all ODST coefficients for any value of .

Similarly, computational requirement for simultaneous ODCT-II coefficients computation using (18) can be derived and analysis for and 2 are discussed below.

For , For computing the ODCT coefficients to using (33), we require 37 multiplication and 32 addition operations. Similarly for , we have Computing the ODCT coefficients to using (34) requires 51 multiplication and 48 addition operations. In general, for computing ODCT coefficients, we require multiplication and addition operation. It is to be noted that simultaneous update requires both ODCT and ODST coefficients to be updated simultaneously, so overall requirement is multiplications and additions plus multiplications and additions operations that are required during the pre-processing stage.

Multiplication and addition operation required for ODCT-II independent update algorithm are given below.

For , In general, we require multiplications and additions for independent update algorithm for ODCT computation.

The comparative analysis for power consumption for different approaches for ODCT/ODST computation is given below. To compute ODCT-II coefficient of -point shifted data using the definition requires using 46 multiplications and 56 additions operation, times. For example, to compute ODCT coefficient for data point using conventional definition for 7 time shifted data points requires 46 multiplications and 56 additions, eight times. If power consumption by one multiplication operation is *P*_{cm} and that by one addition operation is *P*_{ca}, then total power consumed by multiplications is 368Pcm and that by additions is 448*P*_{ca}.

For the same sample length of and for the same set of ODCT/ODST coefficient computation, and hence simultaneous update algorithm require using 121 multiplications and 128 additions for ODCT update and 105 multiplications and 98 additions for ODST update. Additional 79 multiplications and 94 additions are required during the pre-processing stage for calculating the ODCT/ODST coefficients from definition. Hence power consumed by multiplications is 305 and that by additions is 320.

Similarly, for the same sample length of and for the same set of ODCT coefficient computation , independent update algorithm requires 201 multiplications and 320 additions. Hence power consumed by multiplications is 201 and that by additions is 320. Table 1 shows the power consumed during addition and multiplication operation, for and . The computation of running ODCT and ODST based on independent update algorithm provides advantage over the simultaneous update for different value of . Comparison for computational burden between independent update algorithm and simultaneous update algorithm for different value of *r*-point update is given in Table 2.

From (31), for , ODST computation requires multiplication and addition operation. Similarly from (33), for , ODCT computation requires multiplication and 4*N* addition operations. So we can say that simultaneous update algorithm requires total 8*N* multiplication and 6*N* addition operations. Similarly from (35), we can see that ODCT independent update algorithm for requires 5*N* multiplication and 6*N* addition operations. In general, the simultaneous update algorithm requires (4*r* + 4)*N* multiplication operations while independent update algorithm requires (2*r* + 3)*N* multiplication operations, whereas the additions operation requirement for both algorithms are (4*r* + 2)*N*. From Table 2, it can be seen that independent update algorithm requires less number of multiplications as compared to those required for simultaneous update algorithm, and hence we have less power consumption. Next we consider the memory requirement. Memory is needed in both the algorithms to store the following:(a)the coefficients of the recursive equations, (b)transform result,(c)input signal samples. Table 3 shows the memory requirement for both the update algorithms. It can be seen that simultaneous update requires more storage as compared to that required in independent update, since in simultaneous update algorithm both ODCT as well as ODST coefficients are to be stored. Thus it can be concluded that independent update algorithm is better in terms of storage requirement as compared to simultaneous update algorithm.

#### 5. Conclusion

The use of recursive method is very appropriate for machine-based computation. The shift properties of DCT and DST transforms gives a set of recursive equations that can be used for updating DCT and DST coefficient of a running data sequence. We have given an efficient algorithm for computation of ODST-II and ODCT-II coefficients in the presence of rectangular window. In the given algorithm, the computation of ODCT coefficients does not require simultaneous computation of ODST coefficients. The recursive equations are analytically derived and tested using MATLAB. The algorithms developed in this paper are an improvement over existing update algorithms as it provides independence between ODCT and ODST coefficient’s computation, thereby reducing computation and memory requirement. The algorithm derived is tested for different values of sample length and . The complexity of the analytically derived independent update algorithms is of the order of .

#### References

- K. R. Rao and P. Yip,
*Discrete Cosine Transform: Algorithms, Advantages, Applications*, Academic Press, 1990. - N. R. Murthy and M. N. S. Swamy, “On the computation of running discrete cosine and sine transform,”
*IEEE Transactions on Signal Processing*, vol. 40, no. 6, pp. 1430–1437, 1992. View at Publisher · View at Google Scholar · View at Scopus - P. Yip and K. R. Rao, “On the shift property of DCT's and DST's,”
*IEEE Transactions on Acoustics, Speech, and Signal Processing*, vol. 35, no. 3, pp. 404–406, 1987. View at Google Scholar · View at Scopus - L. N. Wu, “Comments on 'On the shift property of DCT's and DST's,”
*IEEE Transactions on Acoustics, Speech, and Signal Processing*, vol. 38, no. 1, pp. 186–188, 1990. View at Publisher · View at Google Scholar · View at Scopus - J. Xi and J. F. Chicharo, “Computing running DCT's and DST's based on their second-order shift properties,”
*IEEE Transactions on Circuits and Systems I*, vol. 47, no. 5, pp. 779–783, 2000. View at Publisher · View at Google Scholar · View at Scopus - B. G. Sherlock and Y. P. Kakad, “Transform domain technique for windowing the DCT and DST,”
*Journal of the Franklin Institute*, vol. 339, no. 1, pp. 111–120, 2002. View at Publisher · View at Google Scholar · View at Scopus - B. G. Sherlock, Y. P. Kakad, and A. Shukla, “Rapid update of odd DCT and DST for real-time signal processing,” in
*14th Signal Processing, Sensor Fusion, and Target Recognition*, vol. 5809 of*Proceedings of SPIE*, pp. 464–471, Orlando, Fla, USA, March 2005. View at Publisher · View at Google Scholar · View at Scopus - V. Karwal, B. G. Sherlock, and Y. P. Kakad, “Windowed DST-independent discrete cosine transform for shifting data,” in
*Proceeding of the 20th International Conference on Systems Engineering*, pp. 252–257, Coventry, UK, September 2009. - V. Karwal,
*Discrete cosine transform-only and discrete sine transform-only windowed update algorithms for shifting data with hardware implementation [Ph.D. thesis]*, University of North Carolina at Charlotte, 2009. - R. K. Chivukula and Y. A. Reznik, “Fast computing of discrete cosine and sine transforms of type VI and VII,” in
*34th Applications of Digital Image Processing*, vol. 8135 of*Proceedings of SPIE*, San Diego, Calif, USA, August 2011. View at Publisher · View at Google Scholar