summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-01-24 18:14:28 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-01-25 09:53:05 +0100
commit10639eb88972bf89656af694b8bf8c4b41255c69 (patch)
tree1ffdadec021fa53d59c3009b581d19c6947b8da6 /gst-libs
parentfa2a526f04b1f51201fbb837fa430f93609938e8 (diff)
downloadgstreamer-plugins-bad-10639eb88972bf89656af694b8bf8c4b41255c69.tar.gz
codecparsers: vc1: fix bitplanes decoding (DIFF6 or NORM6 residual bytes).
Fix parsing of residual bytes. This is a two-step process. First, remaining colums of full vertical resolution (<height>) need to be processed. Next, remaining bytes in the first row can be processed, while taking into account the fact that we may have filled in the first columns already. So, this is not full horizontal resolution. The following figure helps in understanding the expected order of operations, for a 8x5 MBs bitplane. 5 5 6 6 6 6 6 6 5 5 1 1 1 2 2 2 5 5 1 1 1 2 2 2 5 5 3 3 3 4 4 4 5 5 3 3 3 4 4 4 So, after tiles 1 to 4 are decoded, vertical tile 5 needs to be processed (2x5 MBs) and then the horizontal tile 6 (6x1 MBs). https://bugzilla.gnome.org/show_bug.cgi?id=692461 Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/codecparsers/gstvc1parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c
index 6df75e51c..a7ab430ad 100644
--- a/gst-libs/gst/codecparsers/gstvc1parser.c
+++ b/gst-libs/gst/codecparsers/gstvc1parser.c
@@ -556,7 +556,7 @@ bitplane_decoding (GstBitReader * br, guint8 * data,
if (x) {
if (data)
- pdata = data + y * stride;
+ pdata = data;
if (!decode_colskip (br, pdata, x, height, stride, invert_mask))
goto failed;
}
@@ -564,7 +564,7 @@ bitplane_decoding (GstBitReader * br, guint8 * data,
if (y) {
if (data)
pdata = data + x;
- if (!decode_rowskip (br, pdata, width, y, stride, invert_mask))
+ if (!decode_rowskip (br, pdata, width - x, y, stride, invert_mask))
goto failed;
}
break;