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 <quic_shrikara@quicinc.com>
This commit is contained in:
@@ -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();
|
||||
|
Referens i nytt ärende
Block a user