浏览代码

video: driver: Add Complexity vs. Operating Rate handling

For Quality mode decision, Complexity and Operating rate
are handled as below -
[1] If Complexity and operating rate both are set,
    then for NRT, complexity is honored, and operating
    rate can be adjusted. But for RT, Operating Rate is
    honored and complexity can be adjusted.
[2] If only Complexity is set, then complexity is honored.
[3] If only Operating rate set then Operating rate is honored
[4] If None set, then upto encoder to decide

Change-Id: Ib8008551d5ee7a9506f4d1586ed7a3ae967ac54b
Signed-off-by: Vedang Nagar <[email protected]>
Vedang Nagar 3 年之前
父节点
当前提交
dd262f5916
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. 7 3
      driver/variant/iris3/src/msm_vidc_iris3.c

+ 7 - 3
driver/variant/iris3/src/msm_vidc_iris3.c

@@ -1128,9 +1128,13 @@ int msm_vidc_decide_quality_mode_iris3(struct msm_vidc_inst* inst)
 	max_hq_mbpf = core->capabilities[MAX_MBPF_HQ].value;;
 	max_hq_mbps = core->capabilities[MAX_MBPS_HQ].value;;
 
-	if (!is_realtime_session(inst) && mbpf <= max_hq_mbpf) {
-		mode = MSM_VIDC_MAX_QUALITY_MODE;
-		goto decision_done;
+	if (!is_realtime_session(inst)) {
+		if (((capability->cap[COMPLEXITY].flags & CAP_FLAG_CLIENT_SET) &&
+			(capability->cap[COMPLEXITY].value >= DEFAULT_COMPLEXITY)) ||
+			mbpf <= max_hq_mbpf) {
+			mode = MSM_VIDC_MAX_QUALITY_MODE;
+			goto decision_done;
+		}
 	}
 
 	if (mbpf <= max_hq_mbpf && mbps <= max_hq_mbps)