media: v4l2-ctrl: Add VP9 codec levels

Add menu control for VP9 codec levels. A total of 14 levels are
defined for Profile 0 (8bit) and Profile 2 (10bit). Each level
is a set of constrained bitstreams coded with targeted resolutions,
frame rates, and bitrates.

The definitions have been taken from webm project [1].

[1] https://www.webmproject.org/vp9/levels/

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Stanimir Varbanov
2020-07-11 14:52:36 +02:00
committed by Mauro Carvalho Chehab
parent 0df720e59d
commit 5823833c9a
3 changed files with 81 additions and 0 deletions

View File

@@ -651,6 +651,23 @@ enum v4l2_mpeg_video_vp9_profile {
V4L2_MPEG_VIDEO_VP9_PROFILE_2 = 2,
V4L2_MPEG_VIDEO_VP9_PROFILE_3 = 3,
};
#define V4L2_CID_MPEG_VIDEO_VP9_LEVEL (V4L2_CID_MPEG_BASE+513)
enum v4l2_mpeg_video_vp9_level {
V4L2_MPEG_VIDEO_VP9_LEVEL_1_0 = 0,
V4L2_MPEG_VIDEO_VP9_LEVEL_1_1 = 1,
V4L2_MPEG_VIDEO_VP9_LEVEL_2_0 = 2,
V4L2_MPEG_VIDEO_VP9_LEVEL_2_1 = 3,
V4L2_MPEG_VIDEO_VP9_LEVEL_3_0 = 4,
V4L2_MPEG_VIDEO_VP9_LEVEL_3_1 = 5,
V4L2_MPEG_VIDEO_VP9_LEVEL_4_0 = 6,
V4L2_MPEG_VIDEO_VP9_LEVEL_4_1 = 7,
V4L2_MPEG_VIDEO_VP9_LEVEL_5_0 = 8,
V4L2_MPEG_VIDEO_VP9_LEVEL_5_1 = 9,
V4L2_MPEG_VIDEO_VP9_LEVEL_5_2 = 10,
V4L2_MPEG_VIDEO_VP9_LEVEL_6_0 = 11,
V4L2_MPEG_VIDEO_VP9_LEVEL_6_1 = 12,
V4L2_MPEG_VIDEO_VP9_LEVEL_6_2 = 13,
};
/* CIDs for HEVC encoding. */