Table of Contents

NAME

QccVectorDCT, QccVectorInverseDCT - one-dimensional discrete cosine transform (DCT) and inverse tranform of a signal vector

SYNOPSIS

#include "libQccPack.h"

int QccVectorDCT(const QccVector input_signal, QccVector output_signal, int signal_length);
int QccVectorInverseDCT(const QccVector input_signal, QccVector output_signal, int signal_length);

DESCRIPTION

QccVectorDCT() calculates the one-dimensional discrete cosine transform (DCT) of input_signal. The result is returned in output_signal, which must be allocated prior to calling QccVectorDCT(). Both input_signal and output_signal have the same length, signal_length.

QccVectorInverseDCT() calculates the inverse DCT of input_signal, returning its results in output_signal.

RETURN VALUE

Both QccVectorDCT() and QccVectorInverseDCT() return 0 on success, 1 on error.

IMPLEMENTATION

These routines implement the type-II DCT; the implementation is slow, and uses calls directly to cos(3) . Most applications should probably use QccFastDCTForwardTransform1D(3) and QccFastDCTInverseTransform1D(3) which are based on a faster FFT-based implementation, but rely on the GNU Scientific Library (GSL) for the FFT. QccVectorDCT() and QccVectorInverseDCT() are provided for use when GSL is not available.

SEE ALSO

QccFastDCTForwardTransform1D(3) , QccFastDCTInverseTransform1D(3) , QccVector(3) , QccPack(3)

A. K. Jain, Fundamentals of Digital Image Processing. Englewood Cliffs, NJ: Prentice Hall, 1989.

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads