Esempio n. 1
0
        public void InterWaveCodecTest()
        {
            InterWaveMap   map   = new InterWaveMap();
            InterWaveCodec codec = new InterWaveCodec(map);

            Assert.NotNull(codec._QuantHigh);
            Assert.Equal(10, codec._QuantHigh.Length);
            Assert.NotNull(codec._QuantLow);
            Assert.Equal(16, codec._QuantLow.Length);
            Assert.NotNull(codec._CoefficientState);
            Assert.Equal(256, codec._CoefficientState.Length);
            Assert.NotNull(codec._BucketState);
            Assert.Equal(16, codec._BucketState.Length);
            Assert.Equal(0, codec._CurrentBand);
            Assert.Equal(1, codec._CurrentBitPlane);
            Assert.NotNull(codec._CtxStart);
            Assert.Equal(32, codec._CtxStart.Length);

            Assert.NotNull(codec._CtxBucket);
            Assert.Equal(10, codec._CtxBucket.Length);

            foreach (var b in codec._CtxBucket)
            {
                Assert.NotNull(b);
                Assert.Equal(8, b.Length);
            }
        }
Esempio n. 2
0
        public void NextQuantFastBenchmarkTest()
        {
            InterWaveMap map   = new InterWaveMap(32, 32);
            var          codec = new InterWaveCodec(map);

            for (int i = 0; i < 500000000; i++)
            {
                codec.NextQuantFast();
            }
        }