Exemple #1
0
        public unsafe void CopyEntropyCoefficientsTest()
        {
            VP8D_COMP  pbi = new VP8D_COMP();
            VP8_COMMON pc  = pbi.common;

            entropy.vp8_default_coef_probs(pc);

            //Assert.Equal(default_coef_probs_c.default_coef_probs, pc.fc.coef_probs);
        }
Exemple #2
0
        public unsafe void CopyEntropyMvTest()
        {
            VP8D_COMP  pbi = new VP8D_COMP();
            VP8_COMMON pc  = pbi.common;

            Array.Copy(entropymv.vp8_default_mv_context, pc.fc.mvc, entropymv.vp8_default_mv_context.Length);

            Assert.Equal(entropymv.vp8_default_mv_context, pc.fc.mvc);
        }
Exemple #3
0
        public unsafe void InitFrameTest()
        {
            VP8D_COMP pbi = new VP8D_COMP();
            int       res = alloccommon.vp8_alloc_frame_buffers(pbi.common, 640, 480);

            Assert.Equal(0, res);

            decodeframe.init_frame(pbi);

            Assert.Equal(0xffffffff, pbi.mb.fullpixel_mask);
        }
        public void CheckArrayDecrement()
        {
            VP8D_COMP pbi = onyxd.create_decompressor(new VP8D_CONFIG {
                Width = 640, Height = 480
            });
            VP8_COMMON pc = pbi.common;

            pc.fb_idx_ref_cnt[0] = 1;
            pc.fb_idx_ref_cnt[0]--;

            Assert.Equal(0, pc.fb_idx_ref_cnt[0]);
        }
Exemple #5
0
        public unsafe void DecodeInvalidFrameTest()
        {
            VP8D_COMP pbi = onyxd.create_decompressor(new VP8D_CONFIG {
                Width = 640, Height = 480
            });
            VP8_COMMON pc = pbi.common;

            alloccommon.vp8_alloc_frame_buffers(pc, 640, 480);
            onyxd.swap_frame_buffers(pc);

            byte[] encData = HexStr.ParseHexStr("5043009d012a8002e00102c708");
            fixed(byte *pEncData = encData)
            {
                pbi.fragments.ptrs[0]  = pEncData;
                pbi.fragments.sizes[0] = (uint)encData.Length;
                pbi.fragments.count    = 1;
            }

            var vpxExcp = Assert.Throws <VpxException>(() => onyxd.vp8dx_receive_compressed_data(pbi, 0));

            Assert.Equal(vpx_codec_err_t.VPX_CODEC_CORRUPT_FRAME, vpxExcp.ErrorCode);
        }
        public unsafe void DecodeKeyFrameMotionVectorTest()
        {
            VP8D_COMP pbi = onyxd.create_decompressor(new VP8D_CONFIG {
                Width = 32, Height = 24
            });
            VP8_COMMON pc = pbi.common;

            alloccommon.vp8_alloc_frame_buffers(pc, 32, 24);
            onyxd.swap_frame_buffers(pc);

            byte[] encData = HexStr.ParseHexStr("9019009d012a2000180000070885858899848802020275ba24f8de73c58dbdeeeb752712ff80fc8ee701f51cfee1f8e5c007f80ff0dfe73c003fa21e881d603fc07f8e7a287fa3ff25f023fab9fe6bfc4fc00ff1cfe65f3ff800ff46f00fbc5f6f3d5bfdb9cbc7f27fc6dfc88e101fc01f51bfca3f103f29f3817e19fd0ff1d3f243900fa07fe03fc6ff18bf93ed02ff2dfebdfcdff557fa07ba3fecdf8abeb97e10fe9bf8ddf403fc1ff8bff33feaffae5fd73ff9f801fd33f606fd1ff6c52ce5c70fb5b31d19c4d1585982a1d52c92d5044bc6aa90");
            fixed(byte *pEncData = encData)
            {
                pbi.fragments.ptrs[0]  = pEncData;
                pbi.fragments.sizes[0] = (uint)encData.Length;
                pbi.fragments.count    = 1;
            }

            decodemv.vp8_decode_mode_mvs(pbi);

            //DebugProbe.DumpMotionVectors(pbi.common.mip, pbi.common.mb_cols, pbi.common.mb_rows);
        }
Exemple #7
0
        public unsafe void IntiailiseDeQuantizerTest()
        {
            VP8D_COMP pbi = new VP8D_COMP();

            decodeframe.vp8cx_init_de_quantizer(pbi);
        }