codecparsers: vc1: fix calculation of ALTPQUANT.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 22 Jan 2013 09:38:20 +0000 (10:38 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 22 Jan 2013 10:19:56 +0000 (11:19 +0100)
Fix calculation of ALTPQUANT when DQUANT == 1. PQDIFF alters ALTPQUANT
in any case. See 7.1.1.31.6.

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

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

index 557cc06fb34f43ccc9db668ac3f0ebac71e89326..225a7c0ee14599f26ff7be3a987b62449e060347 100644 (file)
@@ -659,8 +659,12 @@ parse_vopdquant (GstBitReader * br, GstVC1FrameHdr * framehdr, guint8 dquant)
         {
           READ_UINT8 (br, vopdquant->pqdiff, 3);
 
-          if (vopdquant->pqdiff == 7)
+          if (vopdquant->pqdiff != 7)
+            vopdquant->altpquant = framehdr->pquant + vopdquant->pqdiff + 1;
+          else {
             READ_UINT8 (br, vopdquant->abspq, 5);
+            vopdquant->altpquant = vopdquant->abspq;
+          }
         }
       }
     }