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>
This commit is contained in:
parent
cfd94e5f85
commit
82cf918b5b
6 changed files with 10 additions and 8 deletions
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <libcamera/geometry.h>
|
||||
|
||||
#include "libipa/vector.h"
|
||||
#include "libcamera/internal/vector.h"
|
||||
|
||||
#include "algorithm.h"
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "vector.h"
|
||||
#include "libcamera/internal/vector.h"
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "vector.h"
|
||||
#include "libcamera/internal/vector.h"
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
|
|
|
@ -9,8 +9,9 @@
|
|||
|
||||
#include <optional>
|
||||
|
||||
#include "libcamera/internal/vector.h"
|
||||
|
||||
#include "libipa/interpolator.h"
|
||||
#include "libipa/vector.h"
|
||||
|
||||
#include "algorithm.h"
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
|
||||
#include "libcamera/internal/debug_controls.h"
|
||||
#include "libcamera/internal/matrix.h"
|
||||
#include "libcamera/internal/vector.h"
|
||||
|
||||
#include <libipa/camera_sensor_helper.h>
|
||||
#include <libipa/fc_queue.h>
|
||||
#include <libipa/vector.h>
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
|
|
|
@ -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 ®ion = 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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue