video: driver: Add AV1 codec, profile and level in UAPI

Add AV1 codec, profile and level defintions and controls in UAPI.
Add these controls as private controls in video driver.

Change-Id: I58edec2d7fabceaa405708c99a75997c9f454022
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
This commit is contained in:
Mahesh Kumar Sharma
2021-10-07 19:25:19 -07:00
committed by Gerrit - the friendly Code Review server
parent 53d5efcd7c
commit 2a7cf79509
2 changed files with 90 additions and 1 deletions

View File

@@ -26,7 +26,8 @@
#define V4L2_META_FMT_VIDC v4l2_fourcc('Q', 'M', 'E', 'T')
/* HEIC encoder and decoder */
#define V4L2_PIX_FMT_HEIC v4l2_fourcc('H', 'E', 'I', 'C')
/* AV1 */
#define V4L2_PIX_FMT_AV1 v4l2_fourcc('A', 'V', '1', '0')
/* start of vidc specific colorspace definitions */
#define V4L2_COLORSPACE_VIDC_GENERIC_FILM 101
#define V4L2_COLORSPACE_VIDC_EG431 102
@@ -143,6 +144,47 @@ enum v4l2_mpeg_vidc_blur_types {
/* Decoder Max Number of Reorder Frames */
#define V4L2_CID_MPEG_VIDC_METADATA_MAX_NUM_REORDER_FRAMES \
(V4L2_CID_MPEG_VIDC_BASE + 0x30)
/* Control IDs for AV1 */
#define V4L2_CID_MPEG_VIDEO_AV1_PROFILE (V4L2_CID_MPEG_VIDC_BASE + 0x31)
enum v4l2_mpeg_video_av1_profile {
V4L2_MPEG_VIDEO_AV1_PROFILE_MAIN = 0,
V4L2_MPEG_VIDEO_AV1_PROFILE_HIGH = 1,
V4L2_MPEG_VIDEO_AV1_PROFILE_PROFESSIONAL = 2,
};
#define V4L2_CID_MPEG_VIDEO_AV1_LEVEL (V4L2_CID_MPEG_VIDC_BASE + 0x32)
enum v4l2_mpeg_video_av1_level {
V4L2_MPEG_VIDEO_AV1_LEVEL_2_0 = 0,
V4L2_MPEG_VIDEO_AV1_LEVEL_2_1 = 1,
V4L2_MPEG_VIDEO_AV1_LEVEL_2_2 = 2,
V4L2_MPEG_VIDEO_AV1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