Commit 518f6b9a authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: vicodec: fix initial stateless sizeimage value

The initial sizeimage value was wrong for the stateless decoder.
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent d421ba0c
......@@ -1799,8 +1799,10 @@ static int vicodec_open(struct file *file)
raw_size = 1280 * 720 * info->sizeimage_mult / info->sizeimage_div;
comp_size = 1280 * 720 * pixfmt_fwht.sizeimage_mult /
pixfmt_fwht.sizeimage_div;
if (ctx->is_enc || ctx->is_stateless)
if (ctx->is_enc)
ctx->q_data[V4L2_M2M_SRC].sizeimage = raw_size;
else if (ctx->is_stateless)
ctx->q_data[V4L2_M2M_SRC].sizeimage = comp_size;
else
ctx->q_data[V4L2_M2M_SRC].sizeimage =
comp_size + sizeof(struct fwht_cframe_hdr);
......
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