Browse Source

video: driver: Compute Average Bitrate only for Queued/Deffered buffers

For Decode batching enabled case, max_data_size is being calculated
as the average of the data_size for all the buffers.
These buffers may contains EBD as well having data_size as 0,
which may reduce the average value by significant numbers and
hence reducing vsp numbers which may lead to vote clock to low
corners.
This may lead to slow decoding and hence Framework may drop the
frames.
Therefore, compute Average data_size only for Queued/Deffered bufs.

Change-Id: I12f155852dd750701b9448d3900b75f470eac126
Signed-off-by: Vedang Nagar <[email protected]>
Vedang Nagar 2 năm trước cách đây
mục cha
commit
246d7ad413
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      driver/vidc/src/msm_vidc_power.c

+ 5 - 2
driver/vidc/src/msm_vidc_power.c

@@ -588,8 +588,11 @@ int msm_vidc_scale_power(struct msm_vidc_inst *inst, bool scale_buses)
 	 */
 	if (inst->decode_batch.enable) {
 		list_for_each_entry(vbuf, &inst->buffers.input.list, list) {
-			data_size += vbuf->data_size;
-			cnt++;
+			if (vbuf->attr & MSM_VIDC_ATTR_DEFERRED ||
+				vbuf->attr & MSM_VIDC_ATTR_QUEUED) {
+				data_size += vbuf->data_size;
+				cnt++;
+			}
 		}
 		if (cnt)
 			data_size /= cnt;