ipa: raspberrypi: Limit the calculated vblank based on the sensor mode

The existing framerate/vblank calculations did not account for the
sensor mode limits. This commit extracts vblank limits from the sensor
v4l2 controls, and stores it in the camera modes structure.

Exposure and vblank value calculations now use values clamped to the
sensor mode limits. The libcamera::controls::FrameDurations metadata
return values now reflect the minimum and maximum after clamping.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Naushir Patuck 2021-01-29 11:16:14 +00:00 committed by Laurent Pinchart
parent d7fd40ea2b
commit 362301b131
7 changed files with 48 additions and 39 deletions

View file

@ -37,6 +37,8 @@ struct CameraMode {
double line_length;
// any camera transform *not* reflected already in the camera tuning
libcamera::Transform transform;
// minimum and maximum fame lengths in units of lines
uint32_t min_frame_length, max_frame_length;
};
#ifdef __cplusplus