diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-06-06 12:23:42 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-11 18:29:03 +0300 |
commit | 518f6b9a145a6994ce3838d8a917abd71ad98b70 (patch) | |
tree | d71cdf7deeaad84881ff94d2c548d470af5f55a2 /drivers/media/platform/vicodec | |
parent | d421ba0c165f711a80f0ec29af4b2cff17f3a1c3 (diff) | |
download | linux-518f6b9a145a6994ce3838d8a917abd71ad98b70.tar.xz |
media: vicodec: fix initial stateless sizeimage value
The initial sizeimage value was wrong for the stateless decoder.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/vicodec')
-rw-r--r-- | drivers/media/platform/vicodec/vicodec-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |