Esempio n. 1
0
        /// <summary>
        /// Run the Inverse DCT method on all of the block data
        /// </summary>
        public void IdctData()
        {
            foreach (float[][][] t in scanData)
            {
                for (int v = 0; v < factorV; v++)
                {
                    for (int h = 0; h < factorH; h++)
                    {
                        float[] toDecode = t[h][v];
                        ZigZag.UnZigZag(toDecode, unZZ);
                        byte[][] decoded = scanDecodedBufferPool.GetNext();
                        switch (JpegConstants.SelectedIdct)
                        {
                        case IdctImplementation.Naive:
                            dct.DoIDCT_Naive(unZZ, decoded);
                            break;

                        case IdctImplementation.AAN:
                            dct.DoIDCT_AAN(unZZ, quantizationTable, decoded);
                            break;

                        case IdctImplementation.NVidia:
                            dct.DoIDCT_NVidia(unZZ, decoded);
                            break;
                        }
                        scanDecoded.Add(decoded);
                    }
                }
            }
        }