[PATCH v4 05/24] media: h264: Use v4l2_h264_reference for reflist
Dmitry Osipenko
dmitry.osipenko at collabora.com
Wed May 4 17:42:03 PDT 2022
On 4/26/22 15:57, Nicolas Dufresne wrote:
> static int tegra_vde_wait_mbe(struct tegra_vde *vde)
> @@ -768,7 +768,7 @@ static int tegra_vde_h264_setup_frames(struct tegra_ctx *ctx,
> struct h264_reflists reflists;
> struct vb2_buffer *ref;
> unsigned int i;
> - u8 *dpb_id;
> + struct v4l2_h264_reference *dpb_id;
nit: will be nice to preserve to reverse Xmas coding style, but only if
you'll need to make v5 with more important changes
> int err;
>
> /*
> @@ -811,14 +811,16 @@ static int tegra_vde_h264_setup_frames(struct tegra_ctx *ctx,
> }
>
> for (i = 0; i < b.num_valid; i++) {
> - ref = get_ref_buf(ctx, dst, dpb_id[i]);
> + int dpb_idx = dpb_id[i].index;
>
> - err = tegra_vde_h264_setup_frame(ctx, h264, &b, ref, dpb_id[i],
> + ref = get_ref_buf(ctx, dst, dpb_idx);
> +
> + err = tegra_vde_h264_setup_frame(ctx, h264, &b, ref, dpb_idx,
> h264->dpb_frames_nb++);
> if (err)
> return err;
>
> - if (b.refs[dpb_id[i]].pic_order_count < b.cur_pic_order_count)
> + if (b.refs[dpb_idx].top_field_order_cnt < b.cur_pic_order_count)
> h264->dpb_ref_frames_with_earlier_poc_nb++;
Tested-by: Dmitry Osipenko <dmitry.osipenko at collabora.com>
More information about the Linux-mediatek
mailing list