Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);