diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-07-25 02:37:28 +0300 |
---|---|---|
committer | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-03-08 13:18:10 +0100 |
commit | da67ba6d35de73767bd8872c74f9c2ba91a34424 (patch) | |
tree | 7071b57801270eea3cfebae7fe4ff08eba990b31 /include/android/hardware | |
parent | ebe733ed985eaea8f74dcfdd3cea860501b10763 (diff) |
[RFC] ipa: rkisp1: dpcc: Generalize YAML parsing
The DefectPixelClusterCorrection::init() function contains a large
manually written piece of tuning data parsing code, with duplication of
similar but slightly different sections. This is error-prone as copy and
paste errors easily creep in and can be hard to spot.
As an attempt to address this issue, replace that code with two generic
functions tbat operate over a data table which describes the structure
of the tuning data and where it fits in the ISP configuration structure
(which maps directly to registers).
At the same time, restructure the tuning data to group parameter per
method, to organize the data in a set-method-parameter structure. The
line-threshold and line-mad-factor parameters are grouped in a "lc"
(line check) method, and the rnd-threshold and rnd-offset parameters in
a "rnd" (rank neighbour difference) method. The other parameters
(pg-factor, rg-factor and ro-limits) are directly specified in a "pg",
"rg" or "ro" method respectively without a parameter name for
simplicity.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
A few questions (hence the RFC):
- Should methods that have a single parameter (e.g. "pg") have an
explicit parameter name in YAML, to match methods that have multiple
parameters ? This would result in
pg:
green:
factor: 10
red-blue:
factor: 10
instead of
pg:
green: 10
red-blue: 10
- Should the method names be spelled out fully in YAML, instead of being
abbreviated to 2 or 3 letters ?
- Is this actually worth it ?
Diffstat (limited to 'include/android/hardware')
0 files changed, 0 insertions, 0 deletions