Peripheral cleanups and a fix

- Whitespace, braces, sorting
- Fixed missing filmnegative in `ProcParams::operator ==(ProcParams)`
This commit is contained in:
Flössie
2019-06-13 09:52:13 +02:00
parent a686a94a62
commit 015cffc73a
11 changed files with 457 additions and 471 deletions

View File

@@ -279,8 +279,15 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
highDetailPreprocessComputed = highDetailNeeded;
// After preprocess, run film negative processing if enabled
if((todo & M_RAW) && (imgsrc->getSensorType() == ST_BAYER || imgsrc->getSensorType() == ST_FUJI_XTRANS) && params->filmNegative.enabled) {
imgsrc->filmNegativeProcess (params->filmNegative);
if (
(todo & M_RAW)
&& (
imgsrc->getSensorType() == ST_BAYER
|| imgsrc->getSensorType() == ST_FUJI_XTRANS
)
&& params->filmNegative.enabled
) {
imgsrc->filmNegativeProcess(params->filmNegative);
}
}
@@ -1257,30 +1264,29 @@ void ImProcCoordinator::getSpotWB(int x, int y, int rect, double& temp, double&
bool ImProcCoordinator::getFilmNegativeExponents(int xA, int yA, int xB, int yB, float* newExps)
{
MyMutex::MyLock lock(mProcessing);
{
MyMutex::MyLock lock(mProcessing);
const auto xlate =
[this](int x, int y) -> Coord2D
{
const std::vector<Coord2D> points = {Coord2D(x, y)};
auto xlate = [this](int x, int y) {
std::vector<Coord2D> points, red, green, blue;
points.push_back(Coord2D(x, y));
std::vector<Coord2D> red;
std::vector<Coord2D> green;
std::vector<Coord2D> blue;
ipf.transCoord(fw, fh, points, red, green, blue);
return green[0];
};
int tr = getCoarseBitMask(params->coarse);
const int tr = getCoarseBitMask(params->coarse);
Coord2D p1 = xlate(xA, yA);
Coord2D p2 = xlate(xB, yB);
return imgsrc->getFilmNegativeExponents(p1, p2, tr, params->filmNegative, newExps);
} // end of mutex locking
const Coord2D p1 = xlate(xA, yA);
const Coord2D p2 = xlate(xB, yB);
return imgsrc->getFilmNegativeExponents(p1, p2, tr, params->filmNegative, newExps);
}
void ImProcCoordinator::getAutoCrop(double ratio, int &x, int &y, int &w, int &h)
{