Increase burst minimum (MR 28)

This commit is contained in:
Luigi311
2023-02-01 17:18:46 -07:00
committed by Martijn Braam
parent dac8c83457
commit f1ad116a23

View File

@@ -385,12 +385,12 @@ capture(MPPipeline *pipeline, const void *data)
info->camera, V4L2_CID_EXPOSURE_AUTO, V4L2_EXPOSURE_MANUAL);
// Get current gain to calculate a burst length;
// with low gain there's 2, with the max automatic gain of the ov5640
// with low gain there's 3, with the max automatic gain of the ov5640
// the value seems to be 248 which creates a 5 frame burst
// for manual gain you can go up to 11 frames
gain = mp_camera_control_get_int32(info->camera, V4L2_CID_GAIN);
gain_norm = (float)gain / (float)info->gain_max;
burst_length = (int)fmax(sqrt(gain_norm) * 10, 1) + 1;
burst_length = (int)fmax(sqrt(gain_norm) * 10, 2) + 1;
captures_remaining = burst_length;
// Change camera mode for capturing