Merge d8e78d23c3 on remote branch

Change-Id: Iba420d74b0709474d7a42e4f9624c72fe4f4b4d7
This commit is contained in:
Linux Build Service Account 2021-06-23 05:12:59 -07:00
commit 35795cf95d
3 changed files with 21 additions and 0 deletions

View file

@ -261,6 +261,8 @@ enum v4l2_mpeg_vidc_video_bitrate_savings_type {
(V4L2_CID_MPEG_MSM_VIDC_BASE + 135)
#define V4L2_CID_MPEG_VIDC_VIDEO_DISABLE_TIMESTAMP_REORDER \
(V4L2_CID_MPEG_MSM_VIDC_BASE + 136)
#define V4L2_CID_MPEG_VIDC_VENC_COMPLEXITY \
(V4L2_CID_MPEG_MSM_VIDC_BASE + 137)
#define V4L2_CID_MPEG_VIDC_VIDEO_UNKNOWN \
(V4L2_CID_MPEG_MSM_VIDC_BASE + 0xFFF)

View file

@ -596,6 +596,16 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = {
.step = 1,
.menu_skip_mask = 0,
},
{
.id = V4L2_CID_MPEG_VIDC_VENC_COMPLEXITY,
.name = "Encoder complexity",
.type = V4L2_CTRL_TYPE_INTEGER,
.minimum = 0,
.maximum = 100,
.default_value = 100,
.step = 1,
.qmenu = NULL,
},
{
.id = V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE,
.name = "Set Hier coding type",
@ -1976,6 +1986,11 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
case V4L2_CID_MPEG_VIDC_VENC_BITRATE_BOOST:
inst->boost_enabled = true;
break;
case V4L2_CID_MPEG_VIDC_VENC_COMPLEXITY:
if (is_realtime_session(inst)) {
s_vpr_h(sid, "Client is setting complexity for RT session\n");
}
break;
case V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE:
inst->entropy_mode = msm_comm_v4l2_to_hfi(
V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE,

View file

@ -1434,6 +1434,7 @@ static inline int msm_vidc_power_save_mode_enable(struct msm_vidc_inst *inst,
void *pdata = NULL;
struct hfi_device *hdev = NULL;
u32 hfi_perf_mode;
struct v4l2_ctrl *ctrl;
hdev = inst->core->device;
if (inst->session_type != MSM_VIDC_ENCODER) {
@ -1443,6 +1444,9 @@ static inline int msm_vidc_power_save_mode_enable(struct msm_vidc_inst *inst,
return 0;
}
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VENC_COMPLEXITY);
if (!is_realtime_session(inst) && !ctrl->val)
enable = true;
prop_id = HFI_PROPERTY_CONFIG_VENC_PERF_MODE;
hfi_perf_mode = enable ? HFI_VENC_PERFMODE_POWER_SAVE :
HFI_VENC_PERFMODE_MAX_QUALITY;