summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2011-08-16 16:19:02 +0200
committerThibault Saunier <thibault.saunier@collabora.com>2011-08-31 09:31:05 -0300
commit66098502ccbc7fb3128ee4151a1e18387e1ed0ce (patch)
treef8e2f07008c7e699d3e9b1a9564f0b6b10008bf7
parentac02111e57fcdf32a62b0a4ca663544b13c30cac (diff)
codecparsers: h264: fix pred_weight_table() parsing.
Use 16-bit signed integer values for weight values because valid ranges are -128 to +128 inclusive.
-rw-r--r--gst-libs/gst/codecparsers/gsth264parser.c1
-rw-r--r--gst-libs/gst/codecparsers/gsth264parser.h17
2 files changed, 10 insertions, 8 deletions
diff --git a/gst-libs/gst/codecparsers/gsth264parser.c b/gst-libs/gst/codecparsers/gsth264parser.c
index a89dc1cfd..ad7a067fb 100644
--- a/gst-libs/gst/codecparsers/gsth264parser.c
+++ b/gst-libs/gst/codecparsers/gsth264parser.c
@@ -827,6 +827,7 @@ gst_h264_slice_parse_pred_weight_table (GstH264SliceHdr * slice,
NalReader * nr, guint8 chroma_array_type)
{
GstH264PredWeightTable *p;
+ gint16 default_luma_weight, default_chroma_weight;
gint i;
GST_DEBUG ("parsing \"Prediction weight table\"");
diff --git a/gst-libs/gst/codecparsers/gsth264parser.h b/gst-libs/gst/codecparsers/gsth264parser.h
index b8de5759f..56c9883ed 100644
--- a/gst-libs/gst/codecparsers/gsth264parser.h
+++ b/gst-libs/gst/codecparsers/gsth264parser.h
@@ -474,19 +474,20 @@ struct _GstH264PredWeightTable
guint8 luma_log2_weight_denom;
guint8 chroma_log2_weight_denom;
- guint8 luma_weight_l0[32];
- guint8 luma_offset_l0[32];
+ gint16 luma_weight_l0[32];
+ gint8 luma_offset_l0[32];
/* if seq->ChromaArrayType != 0 */
- guint8 chroma_weight_l0[32][2];
- guint8 chroma_offset_l0[32][2];
+ gint16 chroma_weight_l0[32][2];
+ gint8 chroma_offset_l0[32][2];
/* if slice->slice_type % 5 == 1 */
- guint8 luma_weight_l1[32];
- guint8 luma_offset_l1[32];
+ gint16 luma_weight_l1[32];
+ gint8 luma_offset_l1[32];
+
/* and if seq->ChromaArrayType != 0 */
- guint8 chroma_weight_l1[32][2];
- guint8 chroma_offset_l1[32][2];
+ gint16 chroma_weight_l1[32][2];
+ gint8 chroma_offset_l1[32][2];
};
struct _GstH264RefPicMarking