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:
@@ -2735,6 +2735,32 @@ bool MetaDataParams::operator!=(const MetaDataParams &other) const
|
||||
}
|
||||
|
||||
|
||||
FilmNegativeParams::FilmNegativeParams() :
|
||||
enabled(false),
|
||||
redExp(1.36),
|
||||
greenExp(1.0),
|
||||
blueExp(0.86)
|
||||
{
|
||||
}
|
||||
|
||||
bool FilmNegativeParams::operator ==(const FilmNegativeParams& other) const
|
||||
{
|
||||
return
|
||||
enabled == other.enabled
|
||||
&& redExp == other.redExp
|
||||
&& greenExp == other.greenExp
|
||||
&& blueExp == other.blueExp;
|
||||
}
|
||||
|
||||
bool FilmNegativeParams::operator !=(const FilmNegativeParams& other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ProcParams::ProcParams()
|
||||
{
|
||||
setDefaults();
|
||||
@@ -3566,6 +3592,13 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
||||
// MetaData
|
||||
saveToKeyfile(!pedited || pedited->metadata.mode, "MetaData", "Mode", metadata.mode, keyFile);
|
||||
|
||||
// Film negative
|
||||
saveToKeyfile(!pedited || pedited->filmNegative.enabled, "Film Negative", "Enabled", filmNegative.enabled, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->filmNegative.redExp, "Film Negative", "RedExponent", filmNegative.redExp, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->filmNegative.greenExp, "Film Negative", "GreenExponent", filmNegative.greenExp, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->filmNegative.blueExp, "Film Negative", "BlueExponent", filmNegative.blueExp, keyFile);
|
||||
|
||||
|
||||
// EXIF change list
|
||||
if (!pedited || pedited->exif) {
|
||||
for (ExifPairs::const_iterator i = exif.begin(); i != exif.end(); ++i) {
|
||||
@@ -5109,6 +5142,14 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
||||
assignFromKeyfile(keyFile, "RAW X-Trans", "PreBlackBlue", pedited, raw.xtranssensor.blackblue, pedited->raw.xtranssensor.exBlackBlue);
|
||||
}
|
||||
|
||||
if (keyFile.has_group("Film Negative")) {
|
||||
assignFromKeyfile(keyFile, "Film Negative", "Enabled", pedited, filmNegative.enabled, pedited->filmNegative.enabled);
|
||||
assignFromKeyfile(keyFile, "Film Negative", "RedExponent", pedited, filmNegative.redExp, pedited->filmNegative.redExp);
|
||||
assignFromKeyfile(keyFile, "Film Negative", "GreenExponent", pedited, filmNegative.greenExp, pedited->filmNegative.greenExp);
|
||||
assignFromKeyfile(keyFile, "Film Negative", "BlueExponent", pedited, filmNegative.blueExp, pedited->filmNegative.blueExp);
|
||||
}
|
||||
|
||||
|
||||
if (keyFile.has_group("MetaData")) {
|
||||
int mode = int(MetaDataParams::TUNNEL);
|
||||
assignFromKeyfile(keyFile, "MetaData", "Mode", pedited, mode, pedited->metadata.mode);
|
||||
|
Reference in New Issue
Block a user