Class Dct


  • final class Dct
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static float A1  
      private static float A2  
      private static float A3  
      private static float A4  
      private static float A5  
      private static float C2  
      private static float C4  
      private static float C6  
      private static float[] DCT_SCALING_FACTORS  
      private static float[] IDCT_SCALING_FACTORS  
      private static float Q  
      private static float R  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Dct()  
    • Field Detail

      • DCT_SCALING_FACTORS

        private static final float[] DCT_SCALING_FACTORS
      • IDCT_SCALING_FACTORS

        private static final float[] IDCT_SCALING_FACTORS
      • A1

        private static final float A1
      • A2

        private static final float A2
      • A3

        private static final float A3
      • A4

        private static final float A4
      • A5

        private static final float A5
      • C2

        private static final float C2
      • C4

        private static final float C4
      • C6

        private static final float C6
      • Q

        private static final float Q
      • R

        private static final float R
    • Constructor Detail

      • Dct

        private Dct()
    • Method Detail

      • scaleQuantizationVector

        public static void scaleQuantizationVector​(float[] vector)
      • scaleDequantizationVector

        public static void scaleDequantizationVector​(float[] vector)
      • scaleQuantizationMatrix

        public static void scaleQuantizationMatrix​(float[] matrix)
      • scaleDequantizationMatrix

        public static void scaleDequantizationMatrix​(float[] matrix)
      • forwardDCT8

        public static void forwardDCT8​(float[] vector)
        Fast forward Dct using AA&N. Taken from the book "JPEG still image data compression standard", by Pennebaker and Mitchell, chapter 4, figure "4-8".
      • forwardDCT8x8

        public static void forwardDCT8x8​(float[] matrix)
      • inverseDCT8

        public static void inverseDCT8​(float[] vector)
        Fast inverse Dct using AA&N. This is taken from the beautiful http://vsr.finermatik.tu-chemnitz.de/~jan/MPEG/HTML/IDCT.html which gives easy equations and properly explains constants and scaling factors. Terms have been inlined and the negation optimized out of existence.
      • inverseDCT8x8

        public static void inverseDCT8x8​(float[] matrix)