summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/sdn.cpp
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2021-01-25 18:48:57 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-01-26 10:46:10 +0200
commitd97b1bcd2a756dbbd12b14f462dcf7620adabe14 (patch)
tree120f8d64b3aec2e49045daf835fa351e980b818f /src/ipa/raspberrypi/controller/rpi/sdn.cpp
parenteb605eab5b3df765082549bda2dc45215cda16f9 (diff)
ipa: raspberrypi: Replace Raspberry Pi debug with libcamera debug
This commit deals with all the "small" algorithms (that is, not Agc/Awb/Alsc). A few unnecessary debug messages have also been removed. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/sdn.cpp')
-rw-r--r--src/ipa/raspberrypi/controller/rpi/sdn.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/sdn.cpp b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
index aa82830b..0fad2550 100644
--- a/src/ipa/raspberrypi/controller/rpi/sdn.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
@@ -5,12 +5,17 @@
* sdn.cpp - SDN (spatial denoise) control algorithm
*/
+#include "libcamera/internal/log.h"
+
#include "../noise_status.h"
#include "../sdn_status.h"
#include "sdn.hpp"
using namespace RPiController;
+using namespace libcamera;
+
+LOG_DEFINE_CATEGORY(RPiSdn)
// Calculate settings for the spatial denoise block using the noise profile in
// the image metadata.
@@ -40,19 +45,19 @@ void Sdn::Prepare(Metadata *image_metadata)
struct NoiseStatus noise_status = {};
noise_status.noise_slope = 3.0; // in case no metadata
if (image_metadata->Get("noise.status", noise_status) != 0)
- RPI_WARN("Sdn: no noise profile found");
- RPI_LOG("Noise profile: constant " << noise_status.noise_constant
- << " slope "
- << noise_status.noise_slope);
+ LOG(RPiSdn, Warning) << "no noise profile found";
+ LOG(RPiSdn, Debug)
+ << "Noise profile: constant " << noise_status.noise_constant
+ << " slope " << noise_status.noise_slope;
struct SdnStatus status;
status.noise_constant = noise_status.noise_constant * deviation_;
status.noise_slope = noise_status.noise_slope * deviation_;
status.strength = strength_;
image_metadata->Set("sdn.status", status);
- RPI_LOG("Sdn: programmed constant " << status.noise_constant
- << " slope " << status.noise_slope
- << " strength "
- << status.strength);
+ LOG(RPiSdn, Debug)
+ << "programmed constant " << status.noise_constant
+ << " slope " << status.noise_slope
+ << " strength " << status.strength;
}
// Register algorithm with the system.