[PATCH 3/9] vicodec: fix initial stateless sizeimage value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The initial sizeimage value was wrong for the stateless decoder.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
---
 drivers/media/platform/vicodec/vicodec-core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/vicodec/vicodec-core.c b/drivers/media/platform/vicodec/vicodec-core.c
index b23d57f50c94..7a7082808a23 100644
--- a/drivers/media/platform/vicodec/vicodec-core.c
+++ b/drivers/media/platform/vicodec/vicodec-core.c
@@ -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);
-- 
2.20.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux