media: vicodec: set flags for vdec/stateful OUTPUT coded formats
authorMaxime Jourdan <mjourdan@baylibre.com>
Thu, 15 Aug 2019 14:44:50 +0000 (11:44 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 19 Aug 2019 17:58:08 +0000 (14:58 -0300)
Tag all the coded formats where the vicodec stateful decoder supports
dynamic resolution switching and bytestream parsing.

Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vicodec/vicodec-core.c

index 7e7c1e80f29fffa4dc1742a6dfad415478f97327..5152f44bcc0a08afe5443fc17beeb072cf9245bf 100644 (file)
@@ -742,6 +742,9 @@ static int enum_fmt(struct v4l2_fmtdesc *f, struct vicodec_ctx *ctx,
                        return -EINVAL;
                f->pixelformat = ctx->is_stateless ?
                        V4L2_PIX_FMT_FWHT_STATELESS : V4L2_PIX_FMT_FWHT;
+               if (!ctx->is_enc && !ctx->is_stateless)
+                       f->flags = V4L2_FMT_FLAG_DYN_RESOLUTION |
+                                  V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM;
        }
        return 0;
 }