From cc8e1ca2acfb344836d48d856313823f58024ebf Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 22 Jul 2020 15:40:14 -0400 Subject: [PATCH] v4l2slh264dec: Fix B-Frame weight table We where not setting the luma l1 weight table. Part-of: --- sys/v4l2codecs/gstv4l2codech264dec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/v4l2codecs/gstv4l2codech264dec.c b/sys/v4l2codecs/gstv4l2codech264dec.c index 85f31772b3..5caf15f028 100644 --- a/sys/v4l2codecs/gstv4l2codech264dec.c +++ b/sys/v4l2codecs/gstv4l2codech264dec.c @@ -566,15 +566,15 @@ gst_v4l2_codec_h264_dec_fill_slice_params (GstV4l2CodecH264Dec * self, } } - /* Skip l1 if this is not a B-Frames. */ + /* Skip l1 if this is not a B-Frame. */ if (slice->header.type % 5 != GST_H264_B_SLICE) return; - for (i = 0; i <= slice->header.num_ref_idx_l0_active_minus1; i++) { - params->pred_weight_table.weight_factors[0].luma_weight[i] = - slice->header.pred_weight_table.luma_weight_l0[i]; - params->pred_weight_table.weight_factors[0].luma_offset[i] = - slice->header.pred_weight_table.luma_offset_l0[i]; + for (i = 0; i <= slice->header.num_ref_idx_l1_active_minus1; i++) { + params->pred_weight_table.weight_factors[1].luma_weight[i] = + slice->header.pred_weight_table.luma_weight_l1[i]; + params->pred_weight_table.weight_factors[1].luma_offset[i] = + slice->header.pred_weight_table.luma_offset_l1[i]; } if (slice->header.pps->sequence->chroma_array_type != 0) {