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:

committed by
Gerrit - the friendly Code Review server

parent
53d5efcd7c
commit
2a7cf79509
@@ -130,6 +130,47 @@ static const char *const roi_map_type[] = {
|
|||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char * const av1_profile[] = {
|
||||||
|
"Main",
|
||||||
|
"High",
|
||||||
|
"Professional",
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char * const av1_level[] = {
|
||||||
|
"2.0",
|
||||||
|
"2.1",
|
||||||
|
"2.2",
|
||||||
|
"2.3",
|
||||||
|
"3.0",
|
||||||
|
"3.1",
|
||||||
|
"3.2",
|
||||||
|
"3.3",
|
||||||
|
"4.0",
|
||||||
|
"4.1",
|
||||||
|
"4.2",
|
||||||
|
"4.3",
|
||||||
|
"5.0",
|
||||||
|
"5.1",
|
||||||
|
"5.2",
|
||||||
|
"5.3",
|
||||||
|
"6.0",
|
||||||
|
"6.1",
|
||||||
|
"6.2",
|
||||||
|
"6.3",
|
||||||
|
"7.0",
|
||||||
|
"7.1",
|
||||||
|
"7.2",
|
||||||
|
"7.3",
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char * const av1_tier[] = {
|
||||||
|
"Main",
|
||||||
|
"High",
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
static u32 msm_vidc_get_port_info(struct msm_vidc_inst *inst,
|
static u32 msm_vidc_get_port_info(struct msm_vidc_inst *inst,
|
||||||
enum msm_vidc_inst_capability_type cap_id)
|
enum msm_vidc_inst_capability_type cap_id)
|
||||||
{
|
{
|
||||||
@@ -165,6 +206,12 @@ static const char * const * msm_vidc_get_qmenu_type(
|
|||||||
return mpeg_video_avc_coding_layer;
|
return mpeg_video_avc_coding_layer;
|
||||||
case V4L2_CID_MPEG_VIDEO_HEVC_PROFILE:
|
case V4L2_CID_MPEG_VIDEO_HEVC_PROFILE:
|
||||||
return mpeg_video_hevc_profile;
|
return mpeg_video_hevc_profile;
|
||||||
|
case V4L2_CID_MPEG_VIDEO_AV1_PROFILE:
|
||||||
|
return av1_profile;
|
||||||
|
case V4L2_CID_MPEG_VIDEO_AV1_LEVEL:
|
||||||
|
return av1_level;
|
||||||
|
case V4L2_CID_MPEG_VIDEO_AV1_TIER:
|
||||||
|
return av1_tier;
|
||||||
default:
|
default:
|
||||||
i_vpr_e(inst, "%s: No available qmenu for ctrl %#x\n",
|
i_vpr_e(inst, "%s: No available qmenu for ctrl %#x\n",
|
||||||
__func__, control_id);
|
__func__, control_id);
|
||||||
|
@@ -26,7 +26,8 @@
|
|||||||
#define V4L2_META_FMT_VIDC v4l2_fourcc('Q', 'M', 'E', 'T')
|
#define V4L2_META_FMT_VIDC v4l2_fourcc('Q', 'M', 'E', 'T')
|
||||||
/* HEIC encoder and decoder */
|
/* HEIC encoder and decoder */
|
||||||
#define V4L2_PIX_FMT_HEIC v4l2_fourcc('H', 'E', 'I', 'C')
|
#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 */
|
/* start of vidc specific colorspace definitions */
|
||||||
#define V4L2_COLORSPACE_VIDC_GENERIC_FILM 101
|
#define V4L2_COLORSPACE_VIDC_GENERIC_FILM 101
|
||||||
#define V4L2_COLORSPACE_VIDC_EG431 102
|
#define V4L2_COLORSPACE_VIDC_EG431 102
|
||||||
@@ -143,6 +144,47 @@ enum v4l2_mpeg_vidc_blur_types {
|
|||||||
/* Decoder Max Number of Reorder Frames */
|
/* Decoder Max Number of Reorder Frames */
|
||||||
#define V4L2_CID_MPEG_VIDC_METADATA_MAX_NUM_REORDER_FRAMES \
|
#define V4L2_CID_MPEG_VIDC_METADATA_MAX_NUM_REORDER_FRAMES \
|
||||||
(V4L2_CID_MPEG_VIDC_BASE + 0x30)
|
(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_LEVEL_2_3 = 3,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_3_0 = 4,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_3_1 = 5,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_3_2 = 6,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_3_3 = 7,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_4_0 = 8,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_4_1 = 9,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_4_2 = 10,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_4_3 = 11,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_5_0 = 12,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_5_1 = 13,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_5_2 = 14,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_5_3 = 15,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_6_0 = 16,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_6_1 = 17,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_6_2 = 18,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_6_3 = 19,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_7_0 = 20,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_7_1 = 21,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_7_2 = 22,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_LEVEL_7_3 = 23,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define V4L2_CID_MPEG_VIDEO_AV1_TIER (V4L2_CID_MPEG_VIDC_BASE + 0x33)
|
||||||
|
enum v4l2_mpeg_video_av1_tier {
|
||||||
|
V4L2_MPEG_VIDEO_AV1_TIER_MAIN = 0,
|
||||||
|
V4L2_MPEG_VIDEO_AV1_TIER_HIGH = 1,
|
||||||
|
};
|
||||||
|
|
||||||
/* Deprecate below controls once availble in gki and gsi bionic header */
|
/* Deprecate below controls once availble in gki and gsi bionic header */
|
||||||
#ifndef V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID
|
#ifndef V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID
|
||||||
|
Reference in New Issue
Block a user