Class FloatDCT_2D


  • public class FloatDCT_2D
    extends java.lang.Object
    Computes 2D Discrete Cosine Transform (DCT) of single precision data. The sizes of both dimensions can be arbitrary numbers. This is a parallel implementation of split-radix and mixed-radix algorithms optimized for SMP systems.

    Part of the code is derived from General Purpose FFT Package written by Takuya Ooura (http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html)
    Author:
    Piotr Wendykier (piotr.wendykier@gmail.com)
    • Constructor Summary

      Constructors 
      Constructor Description
      FloatDCT_2D​(int rows, int columns)
      Creates new instance of FloatDCT_2D.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void forward​(float[][] a, boolean scale)
      Computes 2D forward DCT (DCT-II) leaving the result in a.
      void forward​(float[] a, boolean scale)
      Computes 2D forward DCT (DCT-II) leaving the result in a.
      void inverse​(float[][] a, boolean scale)
      Computes 2D inverse DCT (DCT-III) leaving the result in a.
      void inverse​(float[] a, boolean scale)
      Computes 2D inverse DCT (DCT-III) leaving the result in a.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FloatDCT_2D

        public FloatDCT_2D​(int rows,
                           int columns)
        Creates new instance of FloatDCT_2D.
        Parameters:
        rows - number of rows
        columns - number of columns
    • Method Detail

      • forward

        public void forward​(float[] a,
                            boolean scale)
        Computes 2D forward DCT (DCT-II) leaving the result in a. The data is stored in 1D array in row-major order.
        Parameters:
        a - data to transform
        scale - if true then scaling is performed
      • forward

        public void forward​(float[][] a,
                            boolean scale)
        Computes 2D forward DCT (DCT-II) leaving the result in a. The data is stored in 2D array.
        Parameters:
        a - data to transform
        scale - if true then scaling is performed
      • inverse

        public void inverse​(float[] a,
                            boolean scale)
        Computes 2D inverse DCT (DCT-III) leaving the result in a. The data is stored in 1D array in row-major order.
        Parameters:
        a - data to transform
        scale - if true then scaling is performed
      • inverse

        public void inverse​(float[][] a,
                            boolean scale)
        Computes 2D inverse DCT (DCT-III) leaving the result in a. The data is stored in 2D array.
        Parameters:
        a - data to transform
        scale - if true then scaling is performed