media: coda: round up decoded buffer size for all codecs
The BIT decoders always write 16x16 macroblocks. Align stride and height to avoid spilling luma data into the top of the chroma planes. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
58d4c14ed8
commit
dbe939814c
@ -637,8 +637,8 @@ static int coda_try_fmt_vid_cap(struct file *file, void *priv,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* The h.264 decoder only returns complete 16x16 macroblocks */
|
||||
if (codec && codec->src_fourcc == V4L2_PIX_FMT_H264) {
|
||||
/* The decoders always write complete macroblocks */
|
||||
if (ctx->inst_type == CODA_INST_DECODER) {
|
||||
f->fmt.pix.height = round_up(f->fmt.pix.height, 16);
|
||||
f->fmt.pix.bytesperline = round_up(f->fmt.pix.width, 16);
|
||||
f->fmt.pix.sizeimage = f->fmt.pix.bytesperline *
|
||||
|
Loading…
Reference in New Issue
Block a user