Merge "video: driver: add support for main10StillPic profile"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
cfd1584e2a
@@ -920,12 +920,13 @@ static struct msm_platform_inst_capability instance_data_waipio[] = {
|
|||||||
{ENTROPY_MODE},
|
{ENTROPY_MODE},
|
||||||
NULL, msm_vidc_set_u32_enum},
|
NULL, msm_vidc_set_u32_enum},
|
||||||
|
|
||||||
{PROFILE, ENC|DEC, HEVC|HEIC,
|
{PROFILE, ENC|DEC, HEVC,
|
||||||
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
|
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
|
||||||
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10,
|
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE,
|
||||||
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN) |
|
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN) |
|
||||||
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE) |
|
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE) |
|
||||||
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10),
|
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10) |
|
||||||
|
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE),
|
||||||
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
|
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
|
||||||
V4L2_CID_MPEG_VIDEO_HEVC_PROFILE,
|
V4L2_CID_MPEG_VIDEO_HEVC_PROFILE,
|
||||||
HFI_PROP_PROFILE,
|
HFI_PROP_PROFILE,
|
||||||
@@ -1400,9 +1401,9 @@ static struct msm_platform_inst_capability instance_data_waipio[] = {
|
|||||||
{PROFILE}},
|
{PROFILE}},
|
||||||
{PROFILE, ENC|DEC, HEIC,
|
{PROFILE, ENC|DEC, HEIC,
|
||||||
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE,
|
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE,
|
||||||
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10,
|
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE,
|
||||||
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE) |
|
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE) |
|
||||||
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10),
|
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE),
|
||||||
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE,
|
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE,
|
||||||
V4L2_CID_MPEG_VIDEO_HEVC_PROFILE,
|
V4L2_CID_MPEG_VIDEO_HEVC_PROFILE,
|
||||||
HFI_PROP_PROFILE,
|
HFI_PROP_PROFILE,
|
||||||
|
@@ -94,9 +94,10 @@ enum hfi_avc_profile_type {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum hfi_hevc_profile_type {
|
enum hfi_hevc_profile_type {
|
||||||
HFI_H265_PROFILE_MAIN = 0,
|
HFI_H265_PROFILE_MAIN = 0,
|
||||||
HFI_H265_PROFILE_MAIN_STILL_PICTURE = 1,
|
HFI_H265_PROFILE_MAIN_STILL_PICTURE = 1,
|
||||||
HFI_H265_PROFILE_MAIN_10 = 2,
|
HFI_H265_PROFILE_MAIN_10 = 2,
|
||||||
|
HFI_H265_PROFILE_MAIN_10_STILL_PICTURE = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum hfi_vp9_profile_type {
|
enum hfi_vp9_profile_type {
|
||||||
|
@@ -29,6 +29,12 @@ static bool is_priv_ctrl(u32 id)
|
|||||||
* we have added custom values to the controls
|
* we have added custom values to the controls
|
||||||
*/
|
*/
|
||||||
switch (id) {
|
switch (id) {
|
||||||
|
/*
|
||||||
|
* TODO: V4L2_CID_MPEG_VIDEO_HEVC_PROFILE is std ctrl. But
|
||||||
|
* V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE support is not
|
||||||
|
* available yet. Hence, make this as private ctrl for time being
|
||||||
|
*/
|
||||||
|
case V4L2_CID_MPEG_VIDEO_HEVC_PROFILE:
|
||||||
/*
|
/*
|
||||||
* TODO: V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE is
|
* TODO: V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE is
|
||||||
* std ctrl. But needs some fixes in v4l2-ctrls.c. Hence,
|
* std ctrl. But needs some fixes in v4l2-ctrls.c. Hence,
|
||||||
@@ -108,6 +114,14 @@ static const char *const mpeg_video_avc_coding_layer[] = {
|
|||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char *const mpeg_video_hevc_profile[] = {
|
||||||
|
"Main",
|
||||||
|
"Main Still Picture",
|
||||||
|
"Main 10",
|
||||||
|
"Main 10 Still Picture",
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
static const char *const roi_map_type[] = {
|
static const char *const roi_map_type[] = {
|
||||||
"None",
|
"None",
|
||||||
"2-bit",
|
"2-bit",
|
||||||
@@ -148,6 +162,8 @@ static const char * const * msm_vidc_get_qmenu_type(
|
|||||||
return mpeg_video_blur_types;
|
return mpeg_video_blur_types;
|
||||||
case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE:
|
case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE:
|
||||||
return mpeg_video_avc_coding_layer;
|
return mpeg_video_avc_coding_layer;
|
||||||
|
case V4L2_CID_MPEG_VIDEO_HEVC_PROFILE:
|
||||||
|
return mpeg_video_hevc_profile;
|
||||||
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);
|
||||||
@@ -872,9 +888,11 @@ int msm_vidc_adjust_profile(void *instance, struct v4l2_ctrl *ctrl)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* 10 bit profile for 10 bit color format */
|
/* 10 bit profile for 10 bit color format */
|
||||||
if (pix_fmt == MSM_VIDC_FMT_TP10C ||
|
if (pix_fmt == MSM_VIDC_FMT_TP10C || pix_fmt == MSM_VIDC_FMT_P010) {
|
||||||
pix_fmt == MSM_VIDC_FMT_P010) {
|
if (is_image_session(inst))
|
||||||
adjusted_value = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10;
|
adjusted_value = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE;
|
||||||
|
else
|
||||||
|
adjusted_value = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10;
|
||||||
} else {
|
} else {
|
||||||
/* 8 bit profile for 8 bit color format */
|
/* 8 bit profile for 8 bit color format */
|
||||||
if (adjusted_value == V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10) {
|
if (adjusted_value == V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10) {
|
||||||
|
@@ -4758,7 +4758,7 @@ static bool msm_vidc_allow_image_encode_session(struct msm_vidc_inst *inst)
|
|||||||
|
|
||||||
/* is profile type Still Pic */
|
/* is profile type Still Pic */
|
||||||
if (is_10bit_colorformat(pix_fmt))
|
if (is_10bit_colorformat(pix_fmt))
|
||||||
allow = profile == V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10;
|
allow = profile == V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE;
|
||||||
else
|
else
|
||||||
allow = profile == V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE;
|
allow = profile == V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE;
|
||||||
if (!allow) {
|
if (!allow) {
|
||||||
|
@@ -46,6 +46,9 @@
|
|||||||
#define V4L2_YCBCR_VIDC_FCC47_73_682 302
|
#define V4L2_YCBCR_VIDC_FCC47_73_682 302
|
||||||
|
|
||||||
/* end of vidc specific colorspace definitions */
|
/* end of vidc specific colorspace definitions */
|
||||||
|
#ifndef V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE
|
||||||
|
#define V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE (3)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* vendor controls start */
|
/* vendor controls start */
|
||||||
#define V4L2_CID_MPEG_VIDC_BASE (V4L2_CTRL_CLASS_MPEG | 0x2000)
|
#define V4L2_CID_MPEG_VIDC_BASE (V4L2_CTRL_CLASS_MPEG | 0x2000)
|
||||||
|
Reference in New Issue
Block a user