codecparsers: vc1: fix bitplanes decoding (DIFF6 or NORM6).
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 24 Jan 2013 16:28:22 +0000 (17:28 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 25 Jan 2013 08:39:01 +0000 (09:39 +0100)
Fix decoding of DIFF6 or NORM6 bitplanes with an odd number of lines
(3x2 "horizontal" tiles). In this case, we have to skip the first line
of macroblocks but <width> number of bytes was used to do so, instead
of the actual <stride> size.

This fixes decoding for the video sample attached to:
https://bugzilla.gnome.org/show_bug.cgi?id=668565

https://bugzilla.gnome.org/show_bug.cgi?id=692461

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
gst-libs/gst/codecparsers/gstvc1parser.c

index 093fec8..6df75e5 100644 (file)
@@ -529,7 +529,7 @@ bitplane_decoding (GstBitReader * br, guint8 * data,
       } else {                  /* decode 3x2 "horizontal" tiles */
 
         if (pdata)
-          pdata += (height & 1) * width;
+          pdata += (height & 1) * stride;
         for (y = height & 1; y < height; y += 2) {
           for (x = width % 3; x < width; x += 3) {
             if (!decode_vlc (br, &v, vc1_norm6_vlc_table,