Exemple #1
0
        public void TestIdct2()
        {
            float[] res     = new float[8];
            float[] resDct2 = { 2.6f, -0.22428036f, 0.70740109f, -0.6057955f, 0.98994949f, 0.3666513f, -0.13994175f, -0.41021575f };

            var invdct = new Dct2(8, 8);

            invdct.Inverse(resDct2, res);

            Assert.That(res, Is.EqualTo(_test).Within(1e-5));
        }
Exemple #2
0
        public void TestIdct2()
        {
            float[] output   = new float[8];
            float[] input    = { 5.2f, -0.44856072f, 1.41480218f, -1.21159099f, 1.97989899f, 0.73330259f };
            float[] expected = { 8.53433006f,  1.77122807f, 3.48148502f, 7.77645215f,
                                 2.99512072f, -0.84717044f, 5.19445736f, 12.69409707f };

            var invdct = new Dct2(8);

            invdct.Inverse(input, output);

            Assert.That(output, Is.EqualTo(expected).Within(1e-5));
        }