[libcamera-devel,v2,0/2] Take into account color temperature during LSC algorithm for rkisp1
mbox series

Message ID 20220929091245.2159838-1-fsylvestre@baylibre.com
Headers show
Series
  • Take into account color temperature during LSC algorithm for rkisp1
Related show

Message

Florian Sylvestre Sept. 29, 2022, 9:12 a.m. UTC
First brick to have an adaptive LSC algorithm on Rkisp1: add LSC coefficients
sets in YAML tuning file depending of color temperature.
For this version the computation of coefficients regarding the current computed
color temperature is done inside prepare() method.
For reference: the computation time has been measured at an average 135us on an
Imx8Mp board.

The different coefficients are computed by doing a linear interpolation with the
two coefficients sets that have the closer color temperature values.
In case the current color temperature is 'out of bound' the closest set is used.
The LSC can work with a single set in case of monochrome sensor for example.

The 'grad' and 'size' tables are now computed in configure() to gain some
time by doing only a memcpy() of them during prepare().

Modifications in V2:
- The single commit has been splited into two commits. The first one only
contains the move of LSC parameters computation in configure().
- LSC parameters are no more re-computed when there is small color temperature
variations between two frames.
- LSC parameters are not interpolated when the actual color temperature is
close to one defined in the tuning parameters sets.
- Minor typo/cleanups

Florian Sylvestre (2):
  ipa: rkisp1: Compute LSC algorithm parameter during configure
  ipa: rkisp1: Take into account color temperature during LSC algorithm

 src/ipa/rkisp1/algorithms/lsc.cpp | 183 ++++++++++++++++++-----
 src/ipa/rkisp1/algorithms/lsc.h   |  28 +++-
 src/ipa/rkisp1/data/ov5640.yaml   | 231 ++++++++++++++++++++----------
 3 files changed, 321 insertions(+), 121 deletions(-)