summaryrefslogtreecommitdiff
path: root/src/ipa/rpi
diff options
context:
space:
mode:
authorStefan Klug <stefan.klug@ideasonboard.com>2025-02-06 15:10:10 +0100
committerStefan Klug <stefan.klug@ideasonboard.com>2025-02-12 14:26:27 +0100
commit82cf918b5bd70cf6cf60c2ba7a08353c993a8d82 (patch)
tree33520c109d2b9845857425d563e19b7fb997b54f /src/ipa/rpi
parentcfd94e5f854431a1575f52cee779eb8299267485 (diff)
ipa: Use Vector class from libcamera
Now that there is a Vector class in libcamera, use that one. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Diffstat (limited to 'src/ipa/rpi')
-rw-r--r--src/ipa/rpi/controller/rpi/agc_channel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ipa/rpi/controller/rpi/agc_channel.cpp b/src/ipa/rpi/controller/rpi/agc_channel.cpp
index e79184b7..a5562760 100644
--- a/src/ipa/rpi/controller/rpi/agc_channel.cpp
+++ b/src/ipa/rpi/controller/rpi/agc_channel.cpp
@@ -12,8 +12,9 @@
#include <libcamera/base/log.h>
+#include "libcamera/internal/vector.h"
+
#include "libipa/colours.h"
-#include "libipa/vector.h"
#include "../awb_status.h"
#include "../device_status.h"
@@ -700,7 +701,7 @@ static double computeInitialY(StatisticsPtr &stats, AwbStatus const &awb,
* Note that the weights are applied by the IPA to the statistics directly,
* before they are given to us here.
*/
- ipa::RGB<double> sum{ 0.0 };
+ RGB<double> sum{ 0.0 };
double pixelSum = 0;
for (unsigned int i = 0; i < stats->agcRegions.numRegions(); i++) {
auto &region = stats->agcRegions.get(i);
@@ -716,7 +717,7 @@ static double computeInitialY(StatisticsPtr &stats, AwbStatus const &awb,
/* Factor in the AWB correction if needed. */
if (stats->agcStatsPos == Statistics::AgcStatsPos::PreWb)
- sum *= ipa::RGB<double>{{ awb.gainR, awb.gainR, awb.gainB }};
+ sum *= RGB<double>{ { awb.gainR, awb.gainR, awb.gainB } };
double ySum = ipa::rec601LuminanceFromRGB(sum);