mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue