Commit 341772b8 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Mauro Carvalho Chehab

media: cedrus: Specify H264 startcode and decoding mode

The cedrus VPU is slice-based and expects V4L2_PIX_FMT_H264_SLICE
buffers to contain H264 slices with no start code.

Expose this to userspace with the newly added menu control.

These two controls are specified as mandatory for applications,
but we mark them as non-required on the driver side for
backwards compatibility.
Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 3f715c64
...@@ -77,6 +77,24 @@ static const struct cedrus_control cedrus_controls[] = { ...@@ -77,6 +77,24 @@ static const struct cedrus_control cedrus_controls[] = {
.codec = CEDRUS_CODEC_H264, .codec = CEDRUS_CODEC_H264,
.required = true, .required = true,
}, },
{
.cfg = {
.id = V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE,
.max = V4L2_MPEG_VIDEO_H264_DECODE_MODE_SLICE_BASED,
.def = V4L2_MPEG_VIDEO_H264_DECODE_MODE_SLICE_BASED,
},
.codec = CEDRUS_CODEC_H264,
.required = false,
},
{
.cfg = {
.id = V4L2_CID_MPEG_VIDEO_H264_START_CODE,
.max = V4L2_MPEG_VIDEO_H264_START_CODE_NONE,
.def = V4L2_MPEG_VIDEO_H264_START_CODE_NONE,
},
.codec = CEDRUS_CODEC_H264,
.required = false,
},
}; };
#define CEDRUS_CONTROLS_COUNT ARRAY_SIZE(cedrus_controls) #define CEDRUS_CONTROLS_COUNT ARRAY_SIZE(cedrus_controls)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment