فهرست منبع

video: driver: convert ts scale before calculating auto framerate

Convert the vb2 timestamp, which is in nanosec scale to microsec
scale before calculating the auto framerate.
Auto framerate calculation requires timestamp values in microsec
to calculate the framerate correctly. Due to wrong timestamp scale,
framerate of 0 was getting set to FW

Change-Id: I49b8ae5cfb2ee89dd283f07a2643238989d43d0a
Signed-off-by: Shrikara B <[email protected]>
Shrikara B 3 سال پیش
والد
کامیت
b2d8ec9191
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      driver/vidc/src/msm_vidc_vb2.c

+ 1 - 1
driver/vidc/src/msm_vidc_vb2.c

@@ -407,7 +407,7 @@ void msm_vidc_buf_queue(struct vb2_buffer *vb2)
 	}
 
 	if (is_encode_session(inst) && vb2->type == INPUT_MPLANE) {
-		timestamp_us = vb2->timestamp;
+		timestamp_us = div_u64(vb2->timestamp, 1000);
 		msm_vidc_set_auto_framerate(inst, timestamp_us);
 	}
 	inst->last_qbuf_time_ns = ktime_get_ns();