libcamera: ipa: raspberrypi: Populate focus FoM from the ISP statistics

Switch FocusStatus::num to unsigned int for convenience.

Fill in libcamera::controls::FocusFoM with the average of the middle two
regions (across a 4x3 grid) FoM statistics from the ISP.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Naushir Patuck 2020-06-26 11:25:31 +01:00 committed by Laurent Pinchart
parent 64652e26d7
commit e0c583871d
2 changed files with 13 additions and 1 deletions

View file

@ -17,7 +17,7 @@ extern "C" {
#endif
struct FocusStatus {
int num;
unsigned int num;
uint32_t focus_measures[FOCUS_REGIONS];
};