Film negative processing: first usable version. Only supports bayer raw files, thumbnails don't work
Added performance improvements suggested by heckflosse. Lowered median sampling step from 7 to 5 since calculation is now much faster. Added support for Fuji X-Trans raw files. Applied SSE2 patch provided by @heckflosse, improves performance in main processing loop. Moved film negative processing stuff in its own compilation unit. Code cleanup: removed redundant omp directives. Added check for dead pixels, going above threshold after inversion. ST_BAYER only for now. Reverted leftover hack in cropwindow.cc
This commit is contained in:
@@ -277,6 +277,11 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
imgsrc->getRAWHistogram(histRedRaw, histGreenRaw, histBlueRaw);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1250,6 +1255,32 @@ 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);
|
||||
|
||||
auto xlate = [this](int x, int y) {
|
||||
std::vector<Coord2D> points, red, green, blue;
|
||||
|
||||
points.push_back(Coord2D(x, y));
|
||||
ipf.transCoord(fw, fh, points, red, green, blue);
|
||||
return green[0];
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ImProcCoordinator::getAutoCrop(double ratio, int &x, int &y, int &w, int &h)
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user