From ddaaa4202029ddbc04f01302e366f10a35f87087 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Fri, 8 Feb 2013 11:56:54 +0100 Subject: [PATCH] h264: set {luma,chroma}_log2_weight_denom to 0 if no pred_weight_table(). Force luma_log2_weight_denom and chroma_log2_weight_denom to zero if there is no pred_weight_table() that was parsed. This is a workaround for the VA intel-driver on Ivy Bridge. --- gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index 0a20335e22..bd318d7684 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -2574,8 +2574,8 @@ fill_pred_weight_table(GstVaapiDecoderH264 *decoder, else num_weight_tables = 0; - slice_param->luma_log2_weight_denom = w->luma_log2_weight_denom; - slice_param->chroma_log2_weight_denom = w->chroma_log2_weight_denom; + slice_param->luma_log2_weight_denom = 0; + slice_param->chroma_log2_weight_denom = 0; slice_param->luma_weight_l0_flag = 0; slice_param->chroma_weight_l0_flag = 0; slice_param->luma_weight_l1_flag = 0; @@ -2584,6 +2584,9 @@ fill_pred_weight_table(GstVaapiDecoderH264 *decoder, if (num_weight_tables < 1) return TRUE; + slice_param->luma_log2_weight_denom = w->luma_log2_weight_denom; + slice_param->chroma_log2_weight_denom = w->chroma_log2_weight_denom; + slice_param->luma_weight_l0_flag = 1; for (i = 0; i <= slice_param->num_ref_idx_l0_active_minus1; i++) { slice_param->luma_weight_l0[i] = w->luma_weight_l0[i];