media: venus: vdec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION
Tag all the coded formats where the venus vdec supports dynamic resolution switching. Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com> Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> 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>
This commit is contained in:
parent
60a039eb27
commit
5aecb7d030
|
@ -46,6 +46,7 @@ struct venus_format {
|
||||||
u32 pixfmt;
|
u32 pixfmt;
|
||||||
unsigned int num_planes;
|
unsigned int num_planes;
|
||||||
u32 type;
|
u32 type;
|
||||||
|
u32 flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_PLANES 4
|
#define MAX_PLANES 4
|
||||||
|
|
|
@ -37,42 +37,52 @@ static const struct venus_format vdec_formats[] = {
|
||||||
.pixfmt = V4L2_PIX_FMT_MPEG4,
|
.pixfmt = V4L2_PIX_FMT_MPEG4,
|
||||||
.num_planes = 1,
|
.num_planes = 1,
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||||
|
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||||
}, {
|
}, {
|
||||||
.pixfmt = V4L2_PIX_FMT_MPEG2,
|
.pixfmt = V4L2_PIX_FMT_MPEG2,
|
||||||
.num_planes = 1,
|
.num_planes = 1,
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||||
|
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||||
}, {
|
}, {
|
||||||
.pixfmt = V4L2_PIX_FMT_H263,
|
.pixfmt = V4L2_PIX_FMT_H263,
|
||||||
.num_planes = 1,
|
.num_planes = 1,
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||||
|
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||||
}, {
|
}, {
|
||||||
.pixfmt = V4L2_PIX_FMT_VC1_ANNEX_G,
|
.pixfmt = V4L2_PIX_FMT_VC1_ANNEX_G,
|
||||||
.num_planes = 1,
|
.num_planes = 1,
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||||
|
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||||
}, {
|
}, {
|
||||||
.pixfmt = V4L2_PIX_FMT_VC1_ANNEX_L,
|
.pixfmt = V4L2_PIX_FMT_VC1_ANNEX_L,
|
||||||
.num_planes = 1,
|
.num_planes = 1,
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||||
|
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||||
}, {
|
}, {
|
||||||
.pixfmt = V4L2_PIX_FMT_H264,
|
.pixfmt = V4L2_PIX_FMT_H264,
|
||||||
.num_planes = 1,
|
.num_planes = 1,
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||||
|
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||||
}, {
|
}, {
|
||||||
.pixfmt = V4L2_PIX_FMT_VP8,
|
.pixfmt = V4L2_PIX_FMT_VP8,
|
||||||
.num_planes = 1,
|
.num_planes = 1,
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||||
|
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||||
}, {
|
}, {
|
||||||
.pixfmt = V4L2_PIX_FMT_VP9,
|
.pixfmt = V4L2_PIX_FMT_VP9,
|
||||||
.num_planes = 1,
|
.num_planes = 1,
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||||
|
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||||
}, {
|
}, {
|
||||||
.pixfmt = V4L2_PIX_FMT_XVID,
|
.pixfmt = V4L2_PIX_FMT_XVID,
|
||||||
.num_planes = 1,
|
.num_planes = 1,
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||||
|
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||||
}, {
|
}, {
|
||||||
.pixfmt = V4L2_PIX_FMT_HEVC,
|
.pixfmt = V4L2_PIX_FMT_HEVC,
|
||||||
.num_planes = 1,
|
.num_planes = 1,
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||||
|
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -379,6 +389,7 @@ static int vdec_enum_fmt(struct file *file, void *fh, struct v4l2_fmtdesc *f)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
f->pixelformat = fmt->pixfmt;
|
f->pixelformat = fmt->pixfmt;
|
||||||
|
f->flags = fmt->flags;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue