diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2011-10-03 11:14:25 +0200 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@collabora.com> | 2011-10-06 14:22:36 -0300 |
commit | dc6cb42e5a3125121fb8b553c3cbee9c80945667 (patch) | |
tree | 5cb66d45bdd171ee2362633aca458c8e7c63196a | |
parent | 5354e57e4cf27b30ad4bca8c103900c4fb9a8015 (diff) |
codecparsers: vc1: compute altpquant.
-rw-r--r-- | gst-libs/gst/codecparsers/gstvc1parser.c | 9 | ||||
-rw-r--r-- | gst-libs/gst/codecparsers/gstvc1parser.h | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c index 7f644f42e..2b2797746 100644 --- a/gst-libs/gst/codecparsers/gstvc1parser.c +++ b/gst-libs/gst/codecparsers/gstvc1parser.c @@ -493,11 +493,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); - else - vopdquant->abspq = framehdr->pquant + vopdquant->pqdiff + 1; - + vopdquant->altpquant = vopdquant->abspq; + } } else { READ_UINT8 (br, vopdquant->dquantfrm, 1); GST_DEBUG (" %u DquantFrm %u", gst_bit_reader_get_pos (br), diff --git a/gst-libs/gst/codecparsers/gstvc1parser.h b/gst-libs/gst/codecparsers/gstvc1parser.h index fc3698eb4..35d0b9b3c 100644 --- a/gst-libs/gst/codecparsers/gstvc1parser.h +++ b/gst-libs/gst/codecparsers/gstvc1parser.h @@ -379,6 +379,8 @@ struct _GstVC1VopDquant guint8 pqdiff; guint8 abspq; + /* Computed */ + guint8 altpquant; /* if dqant != 2*/ guint8 dquantfrm; |