libcamera: ipa: raspberrypi: Make sharpening mode_factor an ordinary double
No need for it to be std::atomic as SwitchMode runs synchronously with Prepare. Signed-off-by: David Plowman <david.plowman@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
f68c6eb17b
commit
58e63a6e7e
2 changed files with 4 additions and 5 deletions
|
@ -44,13 +44,12 @@ void Sharpen::Read(boost::property_tree::ptree const ¶ms)
|
||||||
|
|
||||||
void Sharpen::Prepare(Metadata *image_metadata)
|
void Sharpen::Prepare(Metadata *image_metadata)
|
||||||
{
|
{
|
||||||
double mode_factor = mode_factor_;
|
|
||||||
struct SharpenStatus status;
|
struct SharpenStatus status;
|
||||||
// Binned modes seem to need the sharpening toned down with this
|
// Binned modes seem to need the sharpening toned down with this
|
||||||
// pipeline.
|
// pipeline.
|
||||||
status.threshold = threshold_ * mode_factor;
|
status.threshold = threshold_ * mode_factor_;
|
||||||
status.strength = strength_ / mode_factor;
|
status.strength = strength_ / mode_factor_;
|
||||||
status.limit = limit_ / mode_factor;
|
status.limit = limit_ / mode_factor_;
|
||||||
image_metadata->Set("sharpen.status", status);
|
image_metadata->Set("sharpen.status", status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ private:
|
||||||
double threshold_;
|
double threshold_;
|
||||||
double strength_;
|
double strength_;
|
||||||
double limit_;
|
double limit_;
|
||||||
std::atomic<double> mode_factor_;
|
double mode_factor_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace RPi
|
} // namespace RPi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue