ipa: raspberrypi: Generalise the ALSC algorithm
Remove any hard-coded assumptions about the target hardware platform from the ALSC 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. The ALSC calculations use run-time allocated arrays/vectors on every frame. Allocating these might add a non-trivial run-time penalty. Replace these dynamic allocations with a set of reusable pre-allocated vectors during the init phase. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
f6cc78b446
commit
af946958da
4 changed files with 224 additions and 168 deletions
|
@ -6,16 +6,17 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
/*
|
||||
* The ALSC algorithm should post the following structure into the image's
|
||||
* "alsc.status" metadata.
|
||||
*/
|
||||
|
||||
constexpr unsigned int AlscCellsX = 16;
|
||||
constexpr unsigned int AlscCellsY = 12;
|
||||
|
||||
struct AlscStatus {
|
||||
double r[AlscCellsY][AlscCellsX];
|
||||
double g[AlscCellsY][AlscCellsX];
|
||||
double b[AlscCellsY][AlscCellsX];
|
||||
std::vector<double> r;
|
||||
std::vector<double> g;
|
||||
std::vector<double> b;
|
||||
unsigned int rows;
|
||||
unsigned int cols;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue