From acd5d9979fca93bf7a0ffa6f5d08f5cf43ba0cee Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Wed, 27 Jul 2022 09:55:18 +0100 Subject: ipa: raspberrypi: Change to C style code comments As part of the on-going refactor efforts for the source files in src/ipa/raspberrypi/, switch all C++ style comments to C style comments. Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/rpi/noise.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src/ipa/raspberrypi/controller/rpi/noise.cpp') diff --git a/src/ipa/raspberrypi/controller/rpi/noise.cpp b/src/ipa/raspberrypi/controller/rpi/noise.cpp index 97b0fd05..5d87822e 100644 --- a/src/ipa/raspberrypi/controller/rpi/noise.cpp +++ b/src/ipa/raspberrypi/controller/rpi/noise.cpp @@ -34,8 +34,10 @@ char const *Noise::name() const void Noise::switchMode(CameraMode const &cameraMode, [[maybe_unused]] Metadata *metadata) { - // For example, we would expect a 2x2 binned mode to have a "noise - // factor" of sqrt(2x2) = 2. (can't be less than one, right?) + /* + * For example, we would expect a 2x2 binned mode to have a "noise + * factor" of sqrt(2x2) = 2. (can't be less than one, right?) + */ modeFactor_ = std::max(1.0, cameraMode.noiseFactor); } @@ -48,14 +50,16 @@ void Noise::read(boost::property_tree::ptree const ¶ms) void Noise::prepare(Metadata *imageMetadata) { struct DeviceStatus deviceStatus; - deviceStatus.analogueGain = 1.0; // keep compiler calm + deviceStatus.analogueGain = 1.0; /* keep compiler calm */ if (imageMetadata->get("device.status", deviceStatus) == 0) { - // There is a slight question as to exactly how the noise - // profile, specifically the constant part of it, scales. For - // now we assume it all scales the same, and we'll revisit this - // if it proves substantially wrong. NOTE: we may also want to - // make some adjustments based on the camera mode (such as - // binning), if we knew how to discover it... + /* + * There is a slight question as to exactly how the noise + * profile, specifically the constant part of it, scales. For + * now we assume it all scales the same, and we'll revisit this + * if it proves substantially wrong. NOTE: we may also want to + * make some adjustments based on the camera mode (such as + * binning), if we knew how to discover it... + */ double factor = sqrt(deviceStatus.analogueGain) / modeFactor_; struct NoiseStatus status; status.noiseConstant = referenceConstant_ * factor; @@ -68,7 +72,7 @@ void Noise::prepare(Metadata *imageMetadata) LOG(RPiNoise, Warning) << " no metadata"; } -// Register algorithm with the system. +/* Register algorithm with the system. */ static Algorithm *create(Controller *controller) { return new Noise(controller); -- cgit v1.2.1