Commit 066f7c41 authored by Benjamin Gaignard's avatar Benjamin Gaignard Committed by Mauro Carvalho Chehab

media: mediatek: vdec: Remove useless loop

Simplify code by removing useless loop by using video buffer index.
Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: default avatarAndrzej Pietrasiewicz <andrzej.p@collabora.com>
CC: Bin Liu <bin.liu@mediatek.com>
CC: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent a6e86185
......@@ -1695,13 +1695,8 @@ static int vdec_vp9_slice_setup_core_buffer(struct vdec_vp9_slice_instance *inst
return -EINVAL;
/* update internal buffer's width/height */
for (i = 0; i < vq->num_buffers; i++) {
if (vb == vq->bufs[i]) {
instance->dpb[i].width = w;
instance->dpb[i].height = h;
break;
}
}
instance->dpb[vb->index].width = w;
instance->dpb[vb->index].height = h;
/*
* get buffer's width/height from instance
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment