summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-01-22 10:38:20 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-01-22 11:19:56 +0100
commit73213e273f04389660d8ab9b5ae88743d3a1e55c (patch)
tree5e7fef1bb8beea630a66a5bffef8c979fd2475d7
parentf3698c62897bcbd5b7ae4c86a401d5220d95b70e (diff)
downloadgstreamer-plugins-bad-73213e273f04389660d8ab9b5ae88743d3a1e55c.tar.gz
codecparsers: vc1: fix calculation of ALTPQUANT.
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>
-rw-r--r--gst-libs/gst/codecparsers/gstvc1parser.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c
index 557cc06fb..225a7c0ee 100644
--- a/gst-libs/gst/codecparsers/gstvc1parser.c
+++ b/gst-libs/gst/codecparsers/gstvc1parser.c
@@ -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;
+ }
}
}
}