[PATCH v3 00/16] Some rkisp1 awb improvements
Stefan Klug
stefan.klug at ideasonboard.com
Thu Apr 3 17:49:05 CEST 2025
Hi all,
This series contains a few fixes that greatly improve and stabilize the
AWB handling on rkisp1.
After the feedback from the first version, some parts were rewritten and
Laurent added a generic matrix inverse function.
Patches 1-8 add utility functions to Vector and Matrix.
The rest fixes some bugs and generally improves the AWB on rkisp1.
Please see the individual patches for details.
Best regards,
Stefan
Changes in v2:
- Replaced the matrix cast() and inverse() functions by better alternatives
- Added a manual CCM control
- Some small fixes (see logs in individual patches)
Changes in v3:
- Included feedback from review (See individual changelogs)
- Split patch 10 into 10 and 11
- Dropped patch 13 (Use gains from color temperature curve) because it
was actually doing the wrong thing when bayesian awb was active and
the benefit was not that big anymore, now that bayesian awb is
available.
- Dropped patch 15 (Set rgb mean limits to 180) because it was not
really necessary and the description was not sufficient.
Laurent Pinchart (2):
libcamera: matrix: Extend multiplication operator to heterogenous
types
libcamera: vector: Extend matrix multiplication operator to
heterogenous types
Stefan Klug (14):
libcamera: matrix: Replace SFINAE with static_asserts
libcamera: matrix: Make most functions constexpr
libcamera: matrix: Add a Span based constructor
libcamera: vector: Add a Span based constructor
libcamera: matrix: Add inverse() function
test: Add minimal test for Matrix
ipa: rkisp1: Refactor automatic/manual structure in IPAActiveState
ipa: rkisp1: algorithms: awb: Fix wrong colour temperature reporting
ipa: rkisp1: ccm/lsc: Fix CCM/LSC based on manual color temperature
ipa: rkisp1: Implement manual ColourCorrectionMatrix control
libipa: awb: Make result of gainsFromColourTemp optional
ipa: rkisp1: Damp color temperature regulation
ipa: rkisp1: awb: Take the CCM into account for the AWB gains
calculation
ipa: rkisp1: awb: Avoid division by zero
include/libcamera/internal/matrix.h | 71 +++++++----
include/libcamera/internal/vector.h | 17 ++-
src/ipa/libipa/awb.cpp | 2 +-
src/ipa/libipa/awb.h | 3 +-
src/ipa/libipa/awb_bayes.cpp | 4 +-
src/ipa/libipa/awb_bayes.h | 2 +-
src/ipa/libipa/awb_grey.cpp | 6 +-
src/ipa/libipa/awb_grey.h | 2 +-
src/ipa/rkisp1/algorithms/awb.cpp | 64 ++++++----
src/ipa/rkisp1/algorithms/awb.h | 2 -
src/ipa/rkisp1/algorithms/ccm.cpp | 66 ++++++++--
src/ipa/rkisp1/algorithms/ccm.h | 6 +
src/ipa/rkisp1/algorithms/lsc.cpp | 6 +-
src/ipa/rkisp1/ipa_context.cpp | 36 ++++--
src/ipa/rkisp1/ipa_context.h | 15 ++-
src/libcamera/matrix.cpp | 181 +++++++++++++++++++++++++++-
src/libcamera/vector.cpp | 13 +-
test/matrix.cpp | 53 ++++++++
test/meson.build | 1 +
19 files changed, 455 insertions(+), 95 deletions(-)
create mode 100644 test/matrix.cpp
--
2.43.0
More information about the libcamera-devel
mailing list