# Inverse DCT (G Dataflow)

Version:

Computes the inverse Discrete Cosine Transform (DCT) of a sequence.

## DCT{x}

The real input sequence.

This input can be a 1D or 2D array of double-precision, floating-point numbers.

## error in

Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

Default: No error

## x

The inverse DCT of the real input sequence.

## error out

Error information. The node produces this output according to standard error behavior.

## Algorithm Definition for 1D Inverse DCT

If y represents a 1D array as the input sequence DCT{x}, the one-dimensional inverse Discrete Cosine Transform of y is defined as:

${x}_{n}=\sqrt{\frac{2}{N}}\underset{k=0}{\overset{N-1}{\sum }}{{\alpha }_{k}y}_{k}\mathrm{cos}\frac{\left(2n+1\right)k\pi }{2N}$

and

${\alpha }_{k}=\left\{\begin{array}{c}\frac{1}{\sqrt{2}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}k=0\\ 1\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}k=1,\text{\hspace{0.17em}}2,\text{\hspace{0.17em}}...,\text{\hspace{0.17em}}N-1\end{array}$

where

• N is the length of DCT{x}
• yk is the kth element of DCT{x}
• xn is the nth element of x

This node applies a fast inverse DCT algorithm instead of calculating the inverse Discrete Cosine Transform directly. This node implements the fast inverse DCT algorithm using an FFT-based technique.

## Algorithm Definition for 2D Inverse DCT

If y represents a 2D array as the input sequence DCT{x}, the two-dimensional inverse Discrete Cosine Transform of y is defined as:

$x\left(m,n\right)=\sqrt{\frac{2}{M}}\sqrt{\frac{2}{N}}\underset{u=0}{\overset{M-1}{\sum }}\underset{v=0}{\overset{N-1}{\sum }}{\alpha }_{u}{\alpha }_{v}y\left(u,v\right)\mathrm{cos}\frac{\left(2m+1\right)u\pi }{2M}\mathrm{cos}\frac{\left(2n+1\right)v\pi }{2N}$

where

• M is the number of rows of DCT{x}
• N is the number of columns of DCT{x}
• x(m, n) is the element of x with row number m and column number n
• y(u, v) is the element of DCT{x} with row number u and column number v

This node performs a two-dimensional inverse DCT using the following two steps:

1. Perform a one-dimensional inverse DCT row-by-row on DCT{x}. The output is Y'.
2. Perform a one-dimensional inverse DCT column-by-column on Y'. The output is x.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported