summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/ipa_context.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-11-18 21:11:08 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-11-26 19:05:20 +0200
commit01919308e9cce3fb9c785fa6be7e5f37515ba94f (patch)
tree4c6a3e53d916d81fd8269a3b8c419a2a593d1525 /src/ipa/rkisp1/ipa_context.h
parent16c15c428d22ad2a83598ee9665c58ec4ce547b9 (diff)
ipa: rkisp1: awb: Use RGB class to store colour gains
Replace the manual storage of gains in the IPA active state and frame context with usage of the RGB class. This simplifies the code thanks to usage of the arithmetic functions provided by the RGB class. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Diffstat (limited to 'src/ipa/rkisp1/ipa_context.h')
-rw-r--r--src/ipa/rkisp1/ipa_context.h20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h
index 0a165c13..0f8ab713 100644
--- a/src/ipa/rkisp1/ipa_context.h
+++ b/src/ipa/rkisp1/ipa_context.h
@@ -25,6 +25,7 @@
#include <libipa/camera_sensor_helper.h>
#include <libipa/fc_queue.h>
#include <libipa/matrix.h>
+#include <libipa/vector.h>
namespace libcamera {
@@ -87,16 +88,8 @@ struct IPAActiveState {
struct {
struct {
- struct {
- double red;
- double green;
- double blue;
- } manual;
- struct {
- double red;
- double green;
- double blue;
- } automatic;
+ RGB<double> manual;
+ RGB<double> automatic;
} gains;
unsigned int temperatureK;
@@ -140,12 +133,7 @@ struct IPAFrameContext : public FrameContext {
} agc;
struct {
- struct {
- double red;
- double green;
- double blue;
- } gains;
-
+ RGB<double> gains;
bool autoEnabled;
} awb;