43f57f26b4
Remove any hard-coded assumptions about the target hardware platform from the autofocus algorithm. Instead, use the "target" string provided by the camera tuning config and generalised statistics structures to determing parameters such as grid and region sizes. Additionally, PDAF statistics are represented by a generalised region statistics structure to be device agnostic. These changes also require the autofocus algorithm to initialise region weights on the first frame's prepare()/process() call rather than during initialisation. Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Tested-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
25 lines
428 B
C++
25 lines
428 B
C++
/* SPDX-License-Identifier: BSD-2-Clause */
|
|
/*
|
|
* Copyright (C) 2022, Raspberry Pi Ltd
|
|
*
|
|
* pdaf_data.h - PDAF Metadata
|
|
*/
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "region_stats.h"
|
|
|
|
namespace RPiController {
|
|
|
|
struct PdafData {
|
|
/* Confidence, in arbitrary units */
|
|
uint16_t conf;
|
|
/* Phase error, in s16 Q4 format (S.11.4) */
|
|
int16_t phase;
|
|
};
|
|
|
|
using PdafRegions = RegionStats<PdafData>;
|
|
|
|
} /* namespace RPiController */
|