The document summarizes several functions for performing discrete cosine and sine transforms, including dcth(), idcth(), dct4(), idct4(), and dst(). It provides brief descriptions of the transforms and their bases. dcth() and idcth() use the discrete cosine transform of type I, while dct4() and idct4() use a variant of the DCT with a different basis. dst() performs the discrete sine transform.
The document summarizes several functions for performing discrete cosine and sine transforms, including dcth(), idcth(), dct4(), idct4(), and dst(). It provides brief descriptions of the transforms and their bases. dcth() and idcth() use the discrete cosine transform of type I, while dct4() and idct4() use a variant of the DCT with a different basis. dst() performs the discrete sine transform.
The document summarizes several functions for performing discrete cosine and sine transforms, including dcth(), idcth(), dct4(), idct4(), and dst(). It provides brief descriptions of the transforms and their bases. dcth() and idcth() use the discrete cosine transform of type I, while dct4() and idct4() use a variant of the DCT with a different basis. dst() performs the discrete sine transform.
The document summarizes several functions for performing discrete cosine and sine transforms, including dcth(), idcth(), dct4(), idct4(), and dst(). It provides brief descriptions of the transforms and their bases. dcth() and idcth() use the discrete cosine transform of type I, while dct4() and idct4() use a variant of the DCT with a different basis. dst() performs the discrete sine transform.
// ----- SRCFILE=src/dctdst/cosrot.cc: ----- void cos_rot(const double *x, double *y, ulong n); // aux // Auxiliary routine for dcth() and dct4() // x and y may be identical // Self-inverse.
// inverse transform wrt. basis: cos(k*(i+0.5)*PI/n) * (k==0?1.0:sqrt(2)) // H.Malvars algorithm: idct by fht // if a (size-n) srcatch space is supplied (tmp!=0) // then the slightly faster version of zip_rev is used
void dcth_basis(double *f, ulong n, ulong k);
// ----- SRCFILE=src/dctdst/dctzapata.cc: -----
static void coseno(double *x, ulong ldn); // Auxiliary routine called by dct_zapata(). // Input: // x[k] = \sum_{m=0}^{n-1}{ \prod_{i=0}^{ldn-1}{ 2^{b_i} \cos(b_i 2^i \Theta_m) x(m)} } // where n=2^ldn, \Theta_m=\pi (1+4m)/(2n) // and b_i is bit #i of k // Output: // x[k] = \sum_{m=0}^{n-1}{ \cos(\Theta_m) x(m)}
// Transform wrt. basis: cos(k*(i+0.5)*PI/n) * (k==0?1.0:sqrt(2)) // Algorithm as described in F.Arguello, E.L.Zapata: // "Fast Cosine Transform on the Successive Doubling Method" // If a (size-n) srcatch space is supplied (tmp!=0) // then the slightly faster version of unzip_rev() is used. // Note the unzip_rev() step is not mentioned in the paper!