mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
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 <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
177df04d2b
commit
acd5d9979f
55 changed files with 887 additions and 630 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue