Prechádzať zdrojové kódy

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 rokov pred
rodič
commit
dd262f5916
1 zmenil súbory, kde vykonal 7 pridanie a 3 odobranie
  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)