summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2011-10-04 15:16:04 +0200
committerThibault Saunier <thibault.saunier@collabora.com>2011-10-17 13:17:39 +0200
commitef5b8ef5811fbc1ffdc0d10330fb432dfc4ce122 (patch)
treebc382ec2a610abcba6e2ab4d53765fc543e7bf6d /tests
parentac552a4f82f170fb314d42e5919395f2af2fc555 (diff)
codecparsers: vc1: Implement bitplanes handling properly
Add a new GstVC1BitPlanes API.
Diffstat (limited to 'tests')
-rw-r--r--tests/check/libs/vc1parser.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/tests/check/libs/vc1parser.c b/tests/check/libs/vc1parser.c
index 0553efc3f..1136fac3c 100644
--- a/tests/check/libs/vc1parser.c
+++ b/tests/check/libs/vc1parser.c
@@ -847,7 +847,7 @@ GST_START_TEST (test_vc1_parse_p_frame_header_main)
assert_equals_int (structc->maxbframes, 1);
assert_equals_int (gst_vc1_parse_frame_header (pframe_main,
- sizeof (pframe_main), &framehdr, &seqhdr), GST_VC1_PARSER_OK);
+ sizeof (pframe_main), &framehdr, &seqhdr, NULL), GST_VC1_PARSER_OK);
assert_equals_int (framehdr.ptype, GST_VC1_PICTURE_TYPE_P);
assert_equals_int (framehdr.interpfrm, 0);
assert_equals_int (pic->frmcnt, 1);
@@ -865,6 +865,7 @@ GST_START_TEST (test_vc1_parse_b_frame_header_main)
{
GstVC1FrameHdr framehdr;
GstVC1SeqHdr seqhdr;
+ GstVC1BitPlanes b = { 0, };
GstVC1SeqStructC *structc = &seqhdr.struct_c;
GstVC1PicSimpleMain *pic = &framehdr.pic.simple;
@@ -879,6 +880,10 @@ GST_START_TEST (test_vc1_parse_b_frame_header_main)
assert_equals_int (seqhdr.mb_height, 15);
assert_equals_int (seqhdr.mb_width, 20);
+ gst_vc1_bitplanes_ensure_size (&b, &seqhdr);
+
+ assert_equals_int (b.size, 315);
+
assert_equals_int (structc->frmrtq_postproc, 7);
assert_equals_int (structc->bitrtq_postproc, 3);
assert_equals_int (structc->loop_filter, 1);
@@ -893,7 +898,7 @@ GST_START_TEST (test_vc1_parse_b_frame_header_main)
assert_equals_int (structc->maxbframes, 1);
assert_equals_int (gst_vc1_parse_frame_header (bframe_main,
- sizeof (bframe_main), &framehdr, &seqhdr), GST_VC1_PARSER_OK);
+ sizeof (bframe_main), &framehdr, &seqhdr, &b), GST_VC1_PARSER_OK);
assert_equals_int (framehdr.ptype, GST_VC1_PICTURE_TYPE_B);
assert_equals_int (framehdr.interpfrm, 0);
@@ -906,6 +911,8 @@ GST_START_TEST (test_vc1_parse_b_frame_header_main)
assert_equals_int (framehdr.pquant, 7);
assert_equals_int (framehdr.halfqp, 0);
assert_equals_int (framehdr.pquantizer, 0);
+
+ gst_vc1_bitplanes_free_1 (&b);
}
GST_END_TEST;
@@ -939,7 +946,7 @@ GST_START_TEST (test_vc1_parse_bi_frame_header_main)
assert_equals_int (structc->maxbframes, 1);
assert_equals_int (gst_vc1_parse_frame_header (biframe_main,
- sizeof (biframe_main), &framehdr, &seqhdr), GST_VC1_PARSER_OK);
+ sizeof (biframe_main), &framehdr, &seqhdr, NULL), GST_VC1_PARSER_OK);
assert_equals_int (framehdr.ptype, GST_VC1_PICTURE_TYPE_BI);
assert_equals_int (framehdr.interpfrm, 0);
@@ -982,7 +989,7 @@ GST_START_TEST (test_vc1_parse_i_frame_header_main)
assert_equals_int (structc->maxbframes, 1);
assert_equals_int (gst_vc1_parse_frame_header (iframe_main,
- sizeof (iframe_main), &framehdr, &seqhdr), GST_VC1_PARSER_OK);
+ sizeof (iframe_main), &framehdr, &seqhdr, NULL), GST_VC1_PARSER_OK);
assert_equals_int (framehdr.ptype, GST_VC1_PICTURE_TYPE_I);
assert_equals_int (framehdr.interpfrm, 0);
@@ -1041,7 +1048,7 @@ GST_START_TEST (test_vc1_parse_i_frame_header_adv)
assert_equals_int (entrypt->coded_width, 1920);
assert_equals_int (gst_vc1_parse_frame_header (iframe_adv,
- sizeof (iframe_adv), &framehdr, &seqhdr), GST_VC1_PARSER_OK);
+ sizeof (iframe_adv), &framehdr, &seqhdr, NULL), GST_VC1_PARSER_OK);
assert_equals_int (framehdr.ptype, GST_VC1_PICTURE_TYPE_I);
assert_equals_int (framehdr.pqindex, 3);
@@ -1100,7 +1107,7 @@ GST_START_TEST (test_vc1_parse_b_frame_header_adv)
assert_equals_int (entrypt->quantizer, 0);
assert_equals_int (gst_vc1_parse_frame_header (bframe_adv,
- sizeof (bframe_adv), &framehdr, &seqhdr), GST_VC1_PARSER_OK);
+ sizeof (bframe_adv), &framehdr, &seqhdr, NULL), GST_VC1_PARSER_OK);
assert_equals_int (framehdr.ptype, GST_VC1_PICTURE_TYPE_B);
assert_equals_int (framehdr.pqindex, 1);
@@ -1112,7 +1119,7 @@ GST_START_TEST (test_vc1_parse_b_frame_header_adv)
assert_equals_int (framehdr.transacfrm, 1);
assert_equals_int (gst_vc1_parse_frame_header (bframe2_adv,
- sizeof (bframe2_adv), &framehdr, &seqhdr), GST_VC1_PARSER_OK);
+ sizeof (bframe2_adv), &framehdr, &seqhdr, NULL), GST_VC1_PARSER_OK);
assert_equals_int (framehdr.ptype, GST_VC1_PICTURE_TYPE_B);
assert_equals_int (framehdr.pqindex, 4);
assert_equals_int (framehdr.pquant, 4);
@@ -1172,7 +1179,7 @@ GST_START_TEST (test_vc1_parse_p_frame_header_adv)
assert_equals_int (gst_vc1_parse_frame_header (pframe_adv,
- sizeof (pframe_adv), &framehdr, &seqhdr), GST_VC1_PARSER_OK);
+ sizeof (pframe_adv), &framehdr, &seqhdr, NULL), GST_VC1_PARSER_OK);
assert_equals_int (framehdr.ptype, GST_VC1_PICTURE_TYPE_P);
assert_equals_int (framehdr.pqindex, 1);
assert_equals_int (framehdr.pquant, 1);
@@ -1183,7 +1190,7 @@ GST_START_TEST (test_vc1_parse_p_frame_header_adv)
assert_equals_int (pic->mvrange, 0);
assert_equals_int (gst_vc1_parse_frame_header (pframe2_adv,
- sizeof (pframe2_adv), &framehdr, &seqhdr), GST_VC1_PARSER_OK);
+ sizeof (pframe2_adv), &framehdr, &seqhdr, NULL), GST_VC1_PARSER_OK);
assert_equals_int (framehdr.ptype, GST_VC1_PICTURE_TYPE_P);
assert_equals_int (framehdr.pqindex, 1);
assert_equals_int (framehdr.pquant, 1);