Table Of Contents

DCT (G Dataflow)

Last Modified: January 9, 2017

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

connector_pane_image
datatype_icon

x

A real vector.

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

datatype_icon

DCT size

The length of the DCT you want to perform. If DCT size is greater than the number of elements in x, this node adds zeros to the end of x to match the size of DCT size. If DCT size is less than the number of elements in x, this node uses only the leading DCT size elements in x to perform the DCT. If DCT size is less than or equal to zero, this node uses the length of x as the DCT size.

datatype_icon

error in

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

Default: No error

datatype_icon

DCT{x}

The DCT of the input sequence.

datatype_icon

error out

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

Algorithm Definition for 1D DCT

The one-dimensional Discrete Cosine Transform DCT{x} of a 1D array x is defined by the following equations:

y k = 2 N α k n = 0 N 1 x n cos ( 2 n + 1 ) k π 2 N

and

α k = { 1 2 k = 0 1 k = 1 , 2 , ... , N 1

where

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

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

Algorithm Definition for 2D DCT

The two-dimensional Discrete Cosine Transform DCT{x} of a 2D array x is defined by the following equation:

y ( u , v ) = 2 M 2 N α u α v m = 0 M 1 n = 0 N 1 x ( m , n ) cos ( 2 m + 1 ) u π 2 M cos ( 2 n + 1 ) v π 2 N

where

  • M is the number of rows of x
  • N is the number of columns of 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 DCT using the following two steps:

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

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported


Recently Viewed Topics