Skip to content

Commit

Permalink
media: verisilicon: av1: Fix reference video buffer pointer assignment
Browse files Browse the repository at this point in the history
commit 672f24e upstream.

Always get new destination buffer for reference frame because nothing
garantees the one set previously is still valid or unused.

Fixes this chromium test suite:
https://chromium.googlesource.com/chromium/src/media/+/refs/heads/main/test/data/test-25fps.av1.ivf

Fixes: 727a400 ("media: verisilicon: Add Rockchip AV1 decoder")
Cc: <[email protected]>
Signed-off-by: Benjamin Gaignard <[email protected]>
Reviewed-by: Nicolas Dufresne <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
[hverkuil: fix typo and add link to chromium test suite]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Benjamin Gaignard authored and gregkh committed Dec 9, 2024
1 parent b7a830b commit 9ca2c2a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ static int rockchip_vpu981_av1_dec_frame_ref(struct hantro_ctx *ctx,
av1_dec->frame_refs[i].timestamp = timestamp;
av1_dec->frame_refs[i].frame_type = frame->frame_type;
av1_dec->frame_refs[i].order_hint = frame->order_hint;
if (!av1_dec->frame_refs[i].vb2_ref)
av1_dec->frame_refs[i].vb2_ref = hantro_get_dst_buf(ctx);
av1_dec->frame_refs[i].vb2_ref = hantro_get_dst_buf(ctx);

for (j = 0; j < V4L2_AV1_TOTAL_REFS_PER_FRAME; j++)
av1_dec->frame_refs[i].order_hints[j] = frame->order_hints[j];
Expand Down

0 comments on commit 9ca2c2a

Please sign in to comment.