summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@collabora.com>2011-10-04 15:30:42 -0300
committerThibault Saunier <thibault.saunier@collabora.com>2011-10-04 15:30:42 -0300
commit582e8076b4636ffa3e9dcb4b21dab6819a6d800a (patch)
tree8fc4c86d707c51ed44f71c685333c78f01538c23
parent9a5e15cb073096c79524aea31dc1635386aab8a8 (diff)
codecparsers: VC1: Fix testsuite
-rw-r--r--gst-libs/gst/codecparsers/gstvc1parser.c10
-rw-r--r--tests/check/libs/vc1parser.c4
2 files changed, 8 insertions, 6 deletions
diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c
index 02ec30277..61300f89f 100644
--- a/gst-libs/gst/codecparsers/gstvc1parser.c
+++ b/gst-libs/gst/codecparsers/gstvc1parser.c
@@ -467,7 +467,7 @@ bitplane_decoding (GstBitReader * br, guint8 * data,
x = 0;
y = 0;
- if (!(height % 3) && (width % 3)) { // decode 2x3 "vertical" tiles
+ if (!(height % 3) && (width % 3)) { /* decode 2x3 "vertical" tiles */
for (y = 0; y < height; y += 3) {
for (x = width & 1; x < width; x += 2) {
if (!decode_vlc (br, &v, vc1_norm6_vlc_table,
@@ -488,7 +488,7 @@ bitplane_decoding (GstBitReader * br, guint8 * data,
}
x = width & 1;
y = 0;
- } else { // decode 3x2 "horizontal" tiles
+ } else { /* decode 3x2 "horizontal" tiles */
if (pdata)
pdata += (height & 1) * width;
for (y = height & 1; y < height; y += 2) {
@@ -506,12 +506,14 @@ bitplane_decoding (GstBitReader * br, guint8 * data,
pdata[x + 2 + stride] = (v >> 5) & 1;
}
}
+
if (pdata)
pdata += 2 * stride;
- x = width % 3;
- y = height & 1;
}
+ x = width % 3;
+ y = height & 1;
+
if (x) {
if (data)
pdata = data + y * stride;
diff --git a/tests/check/libs/vc1parser.c b/tests/check/libs/vc1parser.c
index c87a0e1ed..46ed3643a 100644
--- a/tests/check/libs/vc1parser.c
+++ b/tests/check/libs/vc1parser.c
@@ -880,7 +880,7 @@ 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_set_bitplanes (&b, &seqhdr);
+ gst_vc1_bitplanes_ensure_size (&b, &seqhdr);
assert_equals_int (b.size, 315);
@@ -912,7 +912,7 @@ GST_START_TEST (test_vc1_parse_b_frame_header_main)
assert_equals_int (framehdr.halfqp, 0);
assert_equals_int (framehdr.pquantizer, 0);
- gst_vc1_bitplanes_free (&b);
+ gst_vc1_bitplanes_free_1 (&b);
}
GST_END_TEST;