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.
This commit is contained in:
Gwenole Beauchesne 2013-02-08 11:56:54 +01:00
parent 0c3650e7e8
commit ddaaa42020

View file

@ -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];