Code covered by the BSD License  

Highlights from
idctt

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 3.13 KB File ID: #18974

idctt

by Stephen Becker

 

28 Feb 2008 (Updated 29 Feb 2008)

type II Inverse DCT (i.e. type III DCT)

| Watch this File

File Information
Description

This code does the same as matlab's idct with a few improvements:

1) on the first call, it's a bit faster than the builtin idct

2) on subsequent calls, due to persistent variables, it's about 2x or more faster than the builtin idct, and only about 1.5x slower than a fft call

3) you can specify which version of the type II IDCT you want: either matlab's orthogonal version, or the standard version (cf. fftw website, or wikipedia). With the "fftw" version, there are two further choices: 1) compute the true inverse (up to scaling) to the forward "fftw" type II DCT, or 2) compute the adjoint (i.e. transpose) to the forward "fftw" type II DCT.

4) If the forward transform sampled the "rows" of the (implicit) DCT matrix, then giving the dimension and the index of sampled rows will allow idctt to return the appropriate inverse or adjoint.

This complements the code "dctt".

The extra "t" at the end of the filename has no meaning other than to distinguish it from the builtin dct.

Type "help idctt" for usage instructions.

Ex. test if dctt and idctt (w/o fftw arguments) are really adjoints:

n = 10;
F = dctt(eye(n));
Ft = idctt(eye(n));
F.' - Ft % this should be a zero matrix

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
dctt

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
spectral analysis Stephen Becker 22 Oct 2008 09:51:08
idct dct fft persistent sampling Stephen Becker 22 Oct 2008 09:51:08

Contact us at files@mathworks.com