media: mediatek: vdec: Remove useless loop
Simplify code by removing useless loop by using video buffer index. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> CC: Bin Liu <bin.liu@mediatek.com> CC: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
a6e8618518
commit
066f7c4199
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user