Main Content


Compute 2-D inverse discrete cosine transform (IDCT)

  • 2-D IDCT block

Computer Vision Toolbox / Transforms


The 2-D IDCT block calculates the two-dimensional inverse discrete cosine transform of the input signal. The equation for the two-dimensional IDCT of an input signal is:


where F(m,n) is the discrete cosine transform (DCT) of the signal f(x,y). If m=n=0, then C(m)=C(n)=1/2. Otherwise C(m)=C(n)=1.



expand all

Specify input data as a vector or matrix of intensity values. The number of elements in the input data must be a power of two.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | fixed point


expand all

Output data containing the 2-D IDCT of the input, returned as a matrix or vector. The size and data type of the output are the same as those of the input.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | fixed point


expand all


Specify how the block computes the sine and cosine terms to find the 2-D IDCT.

  • Table lookup — The block computes and stores the trigonometric values before the simulation starts. This option requires more memory than the Trigonometric fcn option.

  • Trigonometric fcn — The block computes the sine and cosine values during the simulation.

Data Types

For details on the fixed-point block parameters, see Specify Fixed-Point Attributes for Blocks (DSP System Toolbox).

Select this parameter to prevent the fixed-point tools from overriding the data types you specify in this block. For more information, see Lock the Output Data Type Setting (Fixed-Point Designer).

Block Characteristics

Data Types

double | fixed point | integer | single

Multidimensional Signals


Variable-Size Signals


More About

expand all


[1] Wen-Hsiung Chen, C. Smith, and S. Fralick. “A Fast Computational Algorithm for the Discrete Cosine Transform.” IEEE Transactions on Communications 25, no. 9 (September 1977): 1004–9.

[2] Zhongde Wang. “Fast Algorithms for the Discrete W Transform and for the Discrete Fourier Transform.” IEEE Transactions on Acoustics, Speech, and Signal Processing 32, no. 4 (August 1984): 803–16.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced before R2006a

See Also