From b449e0827b26671409f5cd5173041f66ecd48bab Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 11 Feb 2016 18:21:56 +0100 Subject: [PATCH 01/57] Init new process gain with curve --- rtdata/languages/default | 6 +++- rtengine/curves.cc | 33 ++++++++++++++++++ rtengine/curves.h | 24 +++++++++++++ rtengine/imagesource.h | 6 ++-- rtengine/improccoordinator.cc | 7 ++-- rtengine/improccoordinator.h | 1 + rtengine/ipretinex.cc | 63 +++++++++++++++++++++++++++++---- rtengine/procevents.h | 1 + rtengine/procparams.cc | 38 +++++++++++++++++++- rtengine/procparams.h | 6 +++- rtengine/rawimagesource.cc | 10 +++--- rtengine/rawimagesource.h | 6 ++-- rtengine/refreshmap.cc | 4 ++- rtengine/simpleprocess.cc | 5 +-- rtgui/paramsedited.cc | 6 ++++ rtgui/paramsedited.h | 1 + rtgui/retinex.cc | 66 +++++++++++++++++++++++++++-------- rtgui/retinex.h | 3 ++ 18 files changed, 244 insertions(+), 42 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 6bedd3443..ae3a81050 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -670,6 +670,7 @@ HISTORY_MSG_436;Retinex - M - Radius HISTORY_MSG_437;Retinex - M - Method HISTORY_MSG_438;Retinex - M - Equalizer HISTORY_MSG_439;Retinex - Preview +HISTORY_MSG_440;Retinex - Gain transmission HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot @@ -1667,6 +1668,7 @@ TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gau TP_RETINEX_FREEGAMMA;Free gamma TP_RETINEX_GAIN;Gain TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. +TP_RETINEX_GAINOFFS;Gain and Brightness (offset) TP_RETINEX_GAMMA;Gamma TP_RETINEX_GAMMA_FREE;Free TP_RETINEX_GAMMA_HIGH;High @@ -1705,7 +1707,7 @@ TP_RETINEX_MLABEL_TOOLTIP;Should be near min=0 max=32768\nRestored image with no TP_RETINEX_NEIGHBOR;Radius TP_RETINEX_NEUTRAL;Reset TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -TP_RETINEX_OFFSET;Brightness +TP_RETINEX_OFFSET;Brightness (offset) TP_RETINEX_SCALES;Gaussian gradient TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. TP_RETINEX_SETTINGS;Settings @@ -1717,6 +1719,8 @@ TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. TP_RETINEX_TRANSMISSION;Transmission map +TP_RETINEX_GAINTRANSMISSION;Gain transmission +TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplfy or reduce transmission-map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate : gain TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. TP_RETINEX_UNIFORM;Uniform TP_RETINEX_VARIANCE;Contrast diff --git a/rtengine/curves.cc b/rtengine/curves.cc index d0b4c026f..a0ac2c381 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -1429,6 +1429,39 @@ void RetinextransmissionCurve::Set(const std::vector &curvePoints) } } + +RetinexgaintransmissionCurve::RetinexgaintransmissionCurve() {}; + +void RetinexgaintransmissionCurve::Reset() +{ + lutgaintransmission.reset(); +} + +void RetinexgaintransmissionCurve::Set(const Curve &pCurve) +{ + if (pCurve.isIdentity()) { + lutgaintransmission.reset(); // raise this value if the quality suffers from this number of samples + return; + } + + lutgaintransmission(501); // raise this value if the quality suffers from this number of samples + + for (int i = 0; i < 501; i++) { + lutgaintransmission[i] = pCurve.getVal(double(i) / 500.); + } +} + +void RetinexgaintransmissionCurve::Set(const std::vector &curvePoints) +{ + if (!curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) { + FlatCurve tcurve(curvePoints, false, CURVES_MIN_POLY_POINTS / 2); + tcurve.setIdentityValue(0.); + Set(tcurve); + } else { + Reset(); + } +} + void ToneCurve::Reset() { lutToneCurve.reset(); diff --git a/rtengine/curves.h b/rtengine/curves.h index e55d7bc2a..330b5c5ce 100644 --- a/rtengine/curves.h +++ b/rtengine/curves.h @@ -454,6 +454,30 @@ public: } }; +class RetinexgaintransmissionCurve +{ +private: + LUTf lutgaintransmission; // 0xffff range + void Set(const Curve &pCurve); + +public: + virtual ~RetinexgaintransmissionCurve() {}; + RetinexgaintransmissionCurve(); + + void Reset(); + void Set(const Curve *pCurve); + void Set(const std::vector &curvePoints); + float operator[](float index) const + { + return lutgaintransmission[index]; + } + + operator bool (void) const + { + return lutgaintransmission; + } +}; + class ToneCurve diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 80fc53f23..905c8c50e 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -69,14 +69,14 @@ public: virtual int load (Glib::ustring fname, bool batch = false) = 0; virtual void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse) {}; virtual void demosaic (const RAWParams &raw) {}; - virtual void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {}; - virtual void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {}; + virtual void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {}; + virtual void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {}; virtual void retinexPrepareBuffers (ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI) {}; virtual void flushRawData () {}; virtual void flushRGB () {}; virtual void HLRecovery_Global (ToneCurveParams hrp) {}; virtual void HLRecovery_inpaint (float** red, float** green, float** blue) {}; - virtual void MSR(LabImage* lab, LUTf & mapcurve, bool &mapcontlutili, int width, int height, int skip, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) {}; + virtual void MSR(LabImage* lab, LUTf & mapcurve, bool &mapcontlutili, int width, int height, int skip, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) {}; virtual bool IsrgbSourceModified() = 0; // tracks whether cached rgb output of demosaic has been modified diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index ee75e831a..d24427be9 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -242,16 +242,16 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } } - if ((todo & (M_RETINEX|M_INIT)) && params.retinex.enabled) { + if ((todo & (M_RETINEX | M_INIT)) && params.retinex.enabled) { bool dehacontlutili = false; bool mapcontlutili = false; bool useHsl = false; LUTf cdcurve (65536, 0); LUTf mapcurve (65536, 0); - imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI); + imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI); float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI);//enabled Retinex + imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI);//enabled Retinex if(dehaListener) { dehaListener->minmaxChanged(maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); @@ -782,6 +782,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } } } + // Update the monitor color transform if necessary if (todo & M_MONITOR) { ipf.updateColorProfiles(params.icm, monitorProfile, monitorIntent); diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 4d442482e..6a6c203d2 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -136,6 +136,7 @@ protected: WavOpacityCurveW waOpacityCurveW; WavOpacityCurveWL waOpacityCurveWL; RetinextransmissionCurve dehatransmissionCurve; + RetinexgaintransmissionCurve dehagaintransmissionCurve; ColorAppearance customColCurve1; ColorAppearance customColCurve2; diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index 090841a9e..d3d276c43 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -45,7 +45,6 @@ #include "rawimagesource.h" #include "improcfun.h" #include "opthelper.h" -#define BENCHMARK #include "StopWatch.h" #define MAX_RETINEX_SCALES 8 @@ -207,9 +206,8 @@ void mean_stddv( float **dst, float &mean, float &stddv, int W_L, int H_L, const stddv = (float)sqrt(stddv); } -void RawImageSource::MSR(float** luminance, float** originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) +void RawImageSource::MSR(float** luminance, float** originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) { - BENCHFUN if (deh.enabled) {//enabled float mean, stddv, maxtr, mintr; @@ -733,7 +731,8 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e delta = 1.0f; } - float cdfactor = gain2 * 32768.f / delta; + // float cdfactor = gain2 * 32768.f / delta; + float cdfactor = 32768.f / delta; maxCD = -9999999.f; minCD = 9999999.f; // coeff for auto "transmission" with 2 sigma #95% datas @@ -742,22 +741,72 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e float bza = 16300.f / (2.f * stddv); float bzb = 16300.f - bza * (mean); +//prepare work for curve gain +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int i = 0; i < H_L; i++) { + for (int j = 0; j < W_L; j++) { + luminance[i][j] = luminance[i][j] - mini; + } + } + + mean = 0.f; + stddv = 0.f; + // I call mean_stddv2 instead of mean_stddv ==> logBetaGain + + mean_stddv2( luminance, mean, stddv, W_L, H_L, maxtr, mintr); + float asig, bsig, amax, bmax, amin, bmin; + + if (dehagaintransmissionCurve && mean != 0.f && stddv != 0.f) { //if curve + asig = 0.166666f / stddv; + bsig = 0.5f - asig * mean; + amax = 0.333333f / (maxtr - mean - stddv); + bmax = 1.f - amax * maxtr; + amin = 0.333333f / (mean - stddv - mintr); + bmin = -amin * mintr; + + asig *= 500.f; + bsig *= 500.f; + amax *= 500.f; + bmax *= 500.f; + amin *= 500.f; + bmin *= 500.f; + } #ifdef _OPENMP #pragma omp parallel #endif { + float absciss; float cdmax = -999999.f, cdmin = 999999.f; - #ifdef _OPENMP #pragma omp for #endif for ( int i = 0; i < H_L; i ++ ) for (int j = 0; j < W_L; j++) { - //float cd = cdfactor * ( luminance[i][j] * logBetaGain - mini ) + offse; - float cd = cdfactor * ( luminance[i][j] - mini ) + offse; + float gan; + + if (dehagaintransmissionCurve && mean != 0.f && stddv != 0.f) { + + if (LIKELY(fabsf(luminance[i][j] - mean) < stddv)) { + absciss = asig * luminance[i][j] + bsig; + } else if (luminance[i][j] >= mean) { + absciss = amax * luminance[i][j] + bmax; + } else { /*if(luminance[i][j] <= mean - stddv)*/ + absciss = amin * luminance[i][j] + bmin; + } + + + // float cd = cdfactor * ( luminance[i][j] - mini ) + offse; + gan = 2.f * (dehagaintransmissionCurve[absciss]); //new gain function transmission + } else { + gan = 0.5f; + } + + float cd = gan * cdfactor * ( luminance[i][j] ) + offse; if(cd > cdmax) { cdmax = cd; diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 558f509c2..cd6fc2cb2 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -466,6 +466,7 @@ enum ProcEvent { EvmapMethod = 436, EvRetinexmapcurve = 437, EvviewMethod = 438, + EvRetinexgaintransmission = 439, NUMOFEVENTS }; } diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index f79f51c91..988bd20dc 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -136,6 +136,23 @@ void RetinexParams::getDefaulttransmissionCurve(std::vector &curve) curve.at(i) = v[i - 1]; } } +void RetinexParams::getDefaultgaintransmissionCurve(std::vector &curve) +{ + double v[16] = { 0.00, 0.1, 0.35, 0.00, + 0.25, 0.25, 0.35, 0.35, + 0.70, 0.25, 0.35, 0.35, + 1.00, 0.1, 0.00, 0.00 + }; + + + curve.resize(17); + curve.at(0 ) = double(FCT_MinMaxCPoints); + + for (size_t i = 1; i < curve.size(); ++i) { + curve.at(i) = v[i - 1]; + } +} + void RetinexParams::setDefaults() { @@ -175,13 +192,16 @@ void RetinexParams::setDefaults() lhcurve.push_back(DCT_Linear); mapcurve.clear(); mapcurve.push_back(DCT_Linear); + getDefaultgaintransmissionCurve(gaintransmissionCurve); getDefaulttransmissionCurve(transmissionCurve); } -void RetinexParams::getCurves(RetinextransmissionCurve &transmissionCurveLUT) const +void RetinexParams::getCurves(RetinextransmissionCurve &transmissionCurveLUT, RetinexgaintransmissionCurve &gaintransmissionCurveLUT) const { transmissionCurveLUT.Set(this->transmissionCurve); + gaintransmissionCurveLUT.Set(this->gaintransmissionCurve); + } @@ -1585,6 +1605,11 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, bool fnameAbsol keyFile.set_double_list("Retinex", "TransmissionCurve", transmissionCurve); } + if (!pedited || pedited->retinex.gaintransmissionCurve) { + Glib::ArrayHandle gaintransmissionCurve = retinex.gaintransmissionCurve; + keyFile.set_double_list("Retinex", "GainTransmissionCurve", gaintransmissionCurve); + } + // save channel mixer if (!pedited || pedited->chmixer.red[0] || pedited->chmixer.red[1] || pedited->chmixer.red[2]) { Glib::ArrayHandle rmix (chmixer.red, 3, Glib::OWNERSHIP_NONE); @@ -4129,6 +4154,16 @@ int ProcParams::load (Glib::ustring fname, ParamsEdited* pedited) pedited->retinex.transmissionCurve = true; } } + + + if (keyFile.has_key ("Retinex", "GainTransmissionCurve")) { + retinex.gaintransmissionCurve = keyFile.get_double_list ("Retinex", "GainTransmissionCurve"); + + if (pedited) { + pedited->retinex.gaintransmissionCurve = true; + } + } + } @@ -7514,6 +7549,7 @@ bool ProcParams::operator== (const ProcParams& other) && retinex.cdHcurve == other.retinex.cdHcurve && retinex.lhcurve == other.retinex.lhcurve && retinex.transmissionCurve == other.retinex.transmissionCurve + && retinex.gaintransmissionCurve == other.retinex.gaintransmissionCurve && retinex.str == other.retinex.str && retinex.scal == other.retinex.scal && retinex.iter == other.retinex.iter diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 47b8f1cf1..0b45e7d7a 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -41,6 +41,7 @@ class WavOpacityCurveBY; class WavOpacityCurveW; class WavOpacityCurveWL; class RetinextransmissionCurve; +class RetinexgaintransmissionCurve; enum RenderingIntent { RI_PERCEPTUAL = INTENT_PERCEPTUAL, @@ -282,6 +283,7 @@ public: std::vector cdHcurve; std::vector lhcurve; std::vector transmissionCurve; + std::vector gaintransmissionCurve; std::vector mapcurve; int str; int scal; @@ -312,7 +314,9 @@ public: bool medianmap; RetinexParams (); void setDefaults(); - void getCurves(RetinextransmissionCurve &transmissionCurveLUT) const; + void getCurves(RetinextransmissionCurve &transmissionCurveLUT, RetinexgaintransmissionCurve &gaintransmissionCurveLUT) const; + + static void getDefaultgaintransmissionCurve(std::vector &curve); static void getDefaulttransmissionCurve(std::vector &curve); }; diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index d1d4da54f..2251c15dd 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1422,6 +1422,7 @@ SSEFUNCTION int RawImageSource::findHotDeadPixels( PixelsMap &bpMap, float thres } #else + // 25 fabs function calls and 25 float additions without SSE for (int mm = rr - 2; mm <= rr + 2; mm++) { for (int nn = cc - 2; nn <= cc + 2; nn++) { @@ -2216,7 +2217,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } -void RawImageSource::retinexPrepareCurves(RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) +void RawImageSource::retinexPrepareCurves(RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) { useHsl = (retinexParams.retinexcolorspace == "HSLLOG" || retinexParams.retinexcolorspace == "HSLLIN"); @@ -2228,11 +2229,10 @@ void RawImageSource::retinexPrepareCurves(RetinexParams retinexParams, LUTf &cdc CurveFactory::mapcurve (mapcontlutili, retinexParams.mapcurve, mapcurve, 1, lhist16RETI, histLRETI); - retinexParams.getCurves(retinextransmissionCurve); + retinexParams.getCurves(retinextransmissionCurve, retinexgaintransmissionCurve); } -//void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) -void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) +void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) { MyTime t4, t5; @@ -2384,7 +2384,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC } } - MSR(LBuffer, conversionBuffer[2], conversionBuffer[3], mapcurve, mapcontlutili, WNew, HNew, deh, dehatransmissionCurve, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); + MSR(LBuffer, conversionBuffer[2], conversionBuffer[3], mapcurve, mapcontlutili, WNew, HNew, deh, dehatransmissionCurve, dehagaintransmissionCurve, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); if(useHsl) { if(chutili) { diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index bef4ad4e2..0f4ca2402 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -118,8 +118,8 @@ public: int load (Glib::ustring fname, bool batch = false); void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse); void demosaic (const RAWParams &raw); - void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI); - void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI); + void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI); + void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI); void retinexPrepareBuffers (ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI); void flushRawData (); void flushRGB (); @@ -196,7 +196,7 @@ public: void boxblur2(float** src, float** dst, float** temp, int H, int W, int box ); void boxblur_resamp(float **src, float **dst, float** temp, int H, int W, int box, int samp ); - void MSR(float** luminance, float **originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax); + void MSR(float** luminance, float **originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax); void HLRecovery_inpaint (float** red, float** green, float** blue); static void HLRecovery_Luminance (float* rin, float* gin, float* bin, float* rout, float* gout, float* bout, int width, float maxval); static void HLRecovery_CIELab (float* rin, float* gin, float* bin, float* rout, float* gout, float* bout, int width, float maxval, double cam[3][3], double icam[3][3]); diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 6a2925be9..10f911529 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -465,6 +465,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { RETINEX, // EvLradius RETINEX, // EvmapMethod DEMOSAIC, // EvRetinexmapcurve - DEMOSAIC // EvviewMethod + DEMOSAIC, // EvviewMethod + RETINEX // EvRetinexgaintransmission + }; diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 9ae940980..9916c9f38 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -129,15 +129,16 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p LUTf mapcurve (65536, 0); LUTu dummy; RetinextransmissionCurve dehatransmissionCurve; + RetinexgaintransmissionCurve dehagaintransmissionCurve; bool dehacontlutili = false; bool mapcontlutili = false; bool useHsl = false; // multi_array2D conversionBuffer(1, 1); multi_array2D conversionBuffer(1, 1); imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, dummy); - imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy ); + imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy ); float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy); + imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy); } if (pl) { diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 062c61ba2..1183b8260 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -76,6 +76,7 @@ void ParamsEdited::set (bool v) // retinex.grbl = v; retinex.medianmap = v; retinex.transmissionCurve = v; + retinex.gaintransmissionCurve = v; retinex.highlights = v; retinex.htonalwidth = v; retinex.shadows = v; @@ -544,6 +545,7 @@ void ParamsEdited::initFrom (const std::vector retinex.cdHcurve = retinex.cdHcurve && p.retinex.cdHcurve == other.retinex.cdHcurve; retinex.lhcurve = retinex.lhcurve && p.retinex.lhcurve == other.retinex.lhcurve; retinex.transmissionCurve = retinex.transmissionCurve && p.retinex.transmissionCurve == other.retinex.transmissionCurve; + retinex.gaintransmissionCurve = retinex.gaintransmissionCurve && p.retinex.gaintransmissionCurve == other.retinex.gaintransmissionCurve; retinex.retinexMethod = retinex.retinexMethod && p.retinex.retinexMethod == other.retinex.retinexMethod; retinex.mapMethod = retinex.mapMethod && p.retinex.mapMethod == other.retinex.mapMethod; retinex.viewMethod = retinex.viewMethod && p.retinex.viewMethod == other.retinex.viewMethod; @@ -1088,6 +1090,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.retinex.transmissionCurve = mods.retinex.transmissionCurve; } + if (retinex.gaintransmissionCurve) { + toEdit.retinex.gaintransmissionCurve = mods.retinex.gaintransmissionCurve; + } + if (retinex.retinexMethod) { toEdit.retinex.retinexMethod = mods.retinex.retinexMethod; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 261da1753..8e21ef5ad 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -81,6 +81,7 @@ public: // bool grbl; bool method; bool transmissionCurve; + bool gaintransmissionCurve; bool cdcurve; bool mapcurve; bool cdHcurve; diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index 561a28edf..bad21cfe7 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -161,7 +161,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), grad = Gtk::manage (new Adjuster (M("TP_RETINEX_GRAD"), -2., 2., 1., 1.)); grads = Gtk::manage (new Adjuster (M("TP_RETINEX_GRADS"), -2., 2., 1., 1.)); gain = Gtk::manage (new Adjuster (M("TP_RETINEX_GAIN"), 20, 200, 1, 50)); - offs = Gtk::manage (new Adjuster (M("TP_RETINEX_OFFSET"), -10000, 10000, 1, 0)); + offs = Gtk::manage (new Adjuster (M("TP_RETINEX_OFFSET"), -1000, 5000, 1, 0)); // vart = Gtk::manage (new Adjuster (M("TP_RETINEX_VARIANCE"), 50, 500, 1, 125)); limd = Gtk::manage (new Adjuster (M("TP_RETINEX_THRESHOLD"), 2, 100, 1, 8)); baselog = Gtk::manage (new Adjuster (M("TP_RETINEX_BASELOG"), 1.1, 100., 0.001, 2.718)); @@ -175,6 +175,21 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), limd->set_tooltip_markup (M("TP_RETINEX_THRESHOLD_TOOLTIP")); baselog->set_tooltip_markup (M("TP_RETINEX_BASELOG_TOOLTIP")); + // Gain Transmission map curve + gaintransmissionCurve = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_GAINTRANSMISSION")); + gaintransmissionCurve->setCurveListener (this); + +// std::vector defaultCurve; + rtengine::RetinexParams::getDefaultgaintransmissionCurve(defaultCurve); + gaintransmissionShape = static_cast(gaintransmissionCurve->addCurve(CT_Flat, "", NULL, false)); + gaintransmissionShape->setIdentityValue(0.); + gaintransmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); + gaintransmissionShape->setBottomBarBgGradient(milestones); + gaintransmissionCurve->set_tooltip_markup (M("TP_RETINEX_GAINTRANSMISSION_TOOLTIP")); + + gaintransmissionCurve->curveListComplete(); + + Gtk::Frame *p1Frame; p1Frame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_LABEL_MASK")) ); p1Frame->set_border_width(0); @@ -285,19 +300,34 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), settingsVBox->pack_start (*grads); grads->show (); - settingsVBox->pack_start (*gain); - gain->show (); - - settingsVBox->pack_start (*offs); - offs->show (); - -// settingsVBox->pack_start (*vart); -// vart->show (); - settingsVBox->pack_start (*limd); limd->show (); - // settingsVBox->pack_start (*Gtk::manage (new Gtk::HSeparator())); + settingsVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2); + transmissionCurveEditorG->show(); + + settingsVBox->pack_start (*medianmap); + medianmap->show (); + + // settingsVBox->pack_start (*gain); + // gain->show (); + + +// settingsVBox->pack_start (*vart); +// vart->show (); + Gtk::VBox *gainBox = Gtk::manage (new Gtk::VBox()); + + Gtk::HSeparator *separator = Gtk::manage (new Gtk::HSeparator()); + settingsVBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); + gainFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_GAINOFFS"))); + + gainBox->pack_start( *gaintransmissionCurve, Gtk::PACK_SHRINK, 2); + gaintransmissionCurve->show(); + + gainBox->pack_start (*offs); + offs->show (); + gainFrame->add(*gainBox); + settingsVBox->pack_start (*gainFrame); viewbox->pack_start(*viewMethod); // settingsVBox->pack_start(*viewbox); @@ -334,11 +364,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), // grbl->show (); // settingsVBox->pack_start (*Gtk::manage (new Gtk::HSeparator())); - settingsVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2); - transmissionCurveEditorG->show(); - settingsVBox->pack_start (*medianmap); - medianmap->show (); expsettings->add(*settingsVBox); neutrHBox = Gtk::manage (new Gtk::HBox ()); @@ -495,6 +521,7 @@ Retinex::~Retinex() delete curveEditorGD; delete curveEditorGDH; delete transmissionCurveEditorG; + delete gaintransmissionCurve; delete curveEditorGH; delete curveEditormap; @@ -526,6 +553,7 @@ void Retinex::neutral_pressed () retinexcolorspace->set_active(0); gammaretinex->set_active(0); transmissionShape->reset(); + gaintransmissionShape->reset(); cdshape->reset(); cdshapeH->reset(); lhshape->reset(); @@ -690,6 +718,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) cdshape->setUnChanged (!pedited->retinex.cdcurve); cdshapeH->setUnChanged (!pedited->retinex.cdHcurve); transmissionShape->setUnChanged (!pedited->retinex.transmissionCurve); + gaintransmissionShape->setUnChanged (!pedited->retinex.gaintransmissionCurve); lhshape->setUnChanged (!pedited->retinex.lhcurve); mapshape->setUnChanged (!pedited->retinex.mapcurve); @@ -810,6 +839,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) mapMethodConn.block(false); viewMethodConn.block(false); transmissionShape->setCurve (pp->retinex.transmissionCurve); + gaintransmissionShape->setCurve (pp->retinex.gaintransmissionCurve); enableListener (); @@ -840,6 +870,7 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) pp->retinex.cdHcurve = cdshapeH->getCurve (); pp->retinex.mapcurve = mapshape->getCurve (); pp->retinex.transmissionCurve = transmissionShape->getCurve (); + pp->retinex.gaintransmissionCurve = gaintransmissionShape->getCurve (); pp->retinex.enabled = getEnabled(); pp->retinex.medianmap = medianmap->get_active(); @@ -875,6 +906,7 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) pedited->retinex.cdcurve = !cdshape->isUnChanged (); pedited->retinex.cdHcurve = !cdshapeH->isUnChanged (); pedited->retinex.transmissionCurve = !transmissionShape->isUnChanged (); + pedited->retinex.gaintransmissionCurve = !gaintransmissionShape->isUnChanged (); pedited->retinex.mapcurve = !mapshape->isUnChanged (); pedited->retinex.enabled = !get_inconsistent(); pedited->retinex.medianmap = !medianmap->get_inconsistent(); @@ -1275,6 +1307,7 @@ void Retinex::autoOpenCurve () cdshape->openIfNonlinear(); cdshapeH->openIfNonlinear(); transmissionShape->openIfNonlinear(); + gaintransmissionShape->openIfNonlinear(); lhshape->openIfNonlinear(); mapshape->openIfNonlinear(); @@ -1290,6 +1323,8 @@ void Retinex::curveChanged (CurveEditor* ce) listener->panelChanged (EvLCDHCurve, M("HISTORY_CUSTOMCURVE")); } else if (ce == transmissionShape) { listener->panelChanged (EvRetinextransmission, M("HISTORY_CUSTOMCURVE")); + } else if (ce == gaintransmissionShape) { + listener->panelChanged (EvRetinexgaintransmission, M("HISTORY_CUSTOMCURVE")); } else if (ce == lhshape) { listener->panelChanged (EvRetinexlhcurve, M("HISTORY_CUSTOMCURVE")); } else if (ce == mapshape) { @@ -1415,6 +1450,7 @@ void Retinex::setBatchMode (bool batchMode) curveEditorGD->setBatchMode (batchMode); curveEditorGDH->setBatchMode (batchMode); transmissionCurveEditorG->setBatchMode (batchMode); + gaintransmissionCurve->setBatchMode (batchMode); curveEditorGH->setBatchMode (batchMode); curveEditormap->setBatchMode (batchMode); diff --git a/rtgui/retinex.h b/rtgui/retinex.h index d24254757..b8034ccb9 100644 --- a/rtgui/retinex.h +++ b/rtgui/retinex.h @@ -76,15 +76,18 @@ protected: Gtk::Label* mMLabels; Gtk::Label* transLabels; Gtk::Label* transLabels2; + Gtk::Frame *gainFrame; DiagonalCurveEditor* cdshape; DiagonalCurveEditor* cdshapeH; DiagonalCurveEditor* mapshape; CurveEditorGroup* transmissionCurveEditorG; + CurveEditorGroup* gaintransmissionCurve; sigc::connection retinexMethodConn, neutralconn, mapMethodConn, viewMethodConn; sigc::connection retinexColorSpaceConn; sigc::connection gammaretinexConn; FlatCurveEditor* transmissionShape; + FlatCurveEditor* gaintransmissionShape; FlatCurveEditor* lhshape; bool lastmedianmap; sigc::connection medianmapConn; From a21deef3deda7af52ca9546e0872bc4cd172ae2a Mon Sep 17 00:00:00 2001 From: Desmis Date: Fri, 12 Feb 2016 12:51:46 +0100 Subject: [PATCH 02/57] GUI improvment and re-introduce scale --- rtdata/languages/default | 9 +++- rtengine/ipretinex.cc | 11 +++-- rtengine/procevents.h | 1 + rtengine/procparams.cc | 26 +++++------ rtengine/procparams.h | 2 +- rtengine/refreshmap.cc | 3 +- rtgui/paramsedited.cc | 10 ++--- rtgui/paramsedited.h | 2 +- rtgui/retinex.cc | 96 +++++++++++++++++++++++----------------- rtgui/retinex.h | 5 ++- 10 files changed, 98 insertions(+), 67 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index ae3a81050..6c3561efb 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -671,6 +671,7 @@ HISTORY_MSG_437;Retinex - M - Method HISTORY_MSG_438;Retinex - M - Equalizer HISTORY_MSG_439;Retinex - Preview HISTORY_MSG_440;Retinex - Gain transmission +HISTORY_MSG_441;Retinex - Scale HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot @@ -1665,10 +1666,11 @@ TP_RETINEX_CURVEEDITOR_LH;Strength=f(H) TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. TP_RETINEX_CURVEEDITOR_MAP;L=f(L) TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +TP_RETINEX_EQUAL;Equalizer TP_RETINEX_FREEGAMMA;Free gamma TP_RETINEX_GAIN;Gain TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. -TP_RETINEX_GAINOFFS;Gain and Brightness (offset) +TP_RETINEX_GAINOFFS;Gain and Offset (brightness) TP_RETINEX_GAMMA;Gamma TP_RETINEX_GAMMA_FREE;Free TP_RETINEX_GAMMA_HIGH;High @@ -1686,6 +1688,7 @@ TP_RETINEX_HIGHLIGHT;Highlight threshold TP_RETINEX_HIGHLIGHT_TOOLTIP;Increase action of High algorithm.\nMay require you to re-adjust "Neighboring pixels" and to increase the "White-point correction" in the Raw tab -> Raw White Points tool. TP_RETINEX_HSLSPACE_LIN;HSL-Linear TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic +TP_RETINEX_ITERF;Tone mapping TP_RETINEX_ITER;Iterations (Tone-mapping) TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. TP_RETINEX_LABEL;Retinex @@ -1707,17 +1710,19 @@ TP_RETINEX_MLABEL_TOOLTIP;Should be near min=0 max=32768\nRestored image with no TP_RETINEX_NEIGHBOR;Radius TP_RETINEX_NEUTRAL;Reset TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -TP_RETINEX_OFFSET;Brightness (offset) +TP_RETINEX_OFFSET;Offset (brightness) TP_RETINEX_SCALES;Gaussian gradient TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. TP_RETINEX_SETTINGS;Settings TP_RETINEX_SLOPE;Free gamma slope +TP_RETINEX_SKAL;Scale TP_RETINEX_STRENGTH;Strength TP_RETINEX_THRESHOLD;Threshold TP_RETINEX_THRESHOLD_TOOLTIP;Limits in/out.\nIn = image source,\nOut = image gauss. TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +TP_RETINEX_TRANF;Transmission TP_RETINEX_TRANSMISSION;Transmission map TP_RETINEX_GAINTRANSMISSION;Gain transmission TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplfy or reduce transmission-map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate : gain diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index d3d276c43..bab98ef0c 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -236,6 +236,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e bool higplus = false ; float elogt; float hl = deh.baselog; + scal = deh.skal; if(hl >= 2.71828f) { elogt = 2.71828f + SQR(SQR(hl - 2.71828f)); @@ -292,11 +293,11 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e float grads; float grad = 1.f; - float sc = 3.f; + float sc = scal; if(gradient == 0) { grad = 1.f; - sc = 3.f; + sc = scal;//3.f } else if(gradient == 1) { grad = 0.25f * it + 0.75f; sc = -0.5f * it + 4.5f; @@ -336,6 +337,10 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e sc = 3.f; } + if(iter == 1) { + sc = scal; + } + float varx; float limdx, ilimdx; @@ -396,7 +401,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } strengthx = ks * strength; - + //printf("scale=%d\n", scal); retinex_scales( RetinexScales, scal, moderetinex, nei / grad, high ); float *src[H_L] ALIGNED16; diff --git a/rtengine/procevents.h b/rtengine/procevents.h index cd6fc2cb2..2a12516ce 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -467,6 +467,7 @@ enum ProcEvent { EvRetinexmapcurve = 437, EvviewMethod = 438, EvRetinexgaintransmission = 439, + EvLskal = 440, NUMOFEVENTS }; } diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 988bd20dc..1252fc0b4 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -158,7 +158,7 @@ void RetinexParams::setDefaults() { enabled = false; str = 20; - scal = 3; + scal = 0; iter = 1; grad = 1; grads = 1; @@ -177,7 +177,7 @@ void RetinexParams::setDefaults() radius = 40; baselog = 2.71828; -// grbl = 50; + skal = 3; retinexMethod = "high"; mapMethod = "none"; viewMethod = "none"; @@ -1536,9 +1536,9 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, bool fnameAbsol keyFile.set_double ("Retinex", "baselog", retinex.baselog); } -// if (!pedited || pedited->retinex.grbl) { -// keyFile.set_integer ("Retinex", "grbl", retinex.grbl); -// } + if (!pedited || pedited->retinex.skal) { + keyFile.set_integer ("Retinex", "skal", retinex.skal); + } if (!pedited || pedited->retinex.retinexMethod) { keyFile.set_string ("Retinex", "RetinexMethod", retinex.retinexMethod); @@ -4065,14 +4065,14 @@ int ProcParams::load (Glib::ustring fname, ParamsEdited* pedited) } } - /* if (keyFile.has_key ("Retinex", "grbl")) { - retinex.grbl = keyFile.get_integer ("Retinex", "grbl"); + if (keyFile.has_key ("Retinex", "skal")) { + retinex.skal = keyFile.get_integer ("Retinex", "skal"); + + if (pedited) { + pedited->retinex.skal = true; + } + } - if (pedited) { - pedited->retinex.grbl = true; - } - } - */ if (keyFile.has_key ("Retinex", "CDCurve")) { retinex.cdcurve = keyFile.get_double_list ("Retinex", "CDCurve"); @@ -7568,7 +7568,7 @@ bool ProcParams::operator== (const ProcParams& other) && retinex.radius == other.retinex.radius && retinex.baselog == other.retinex.baselog -// && retinex.grbl == other.retinex.grbl + && retinex.skal == other.retinex.skal && retinex.offs == other.retinex.offs && retinex.retinexMethod == other.retinex.retinexMethod && retinex.mapMethod == other.retinex.mapMethod diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 0b45e7d7a..f07de9523 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -310,7 +310,7 @@ public: int limd; int highl; double baselog; -// int grbl; + int skal; bool medianmap; RetinexParams (); void setDefaults(); diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 10f911529..240c871b5 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -466,7 +466,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { RETINEX, // EvmapMethod DEMOSAIC, // EvRetinexmapcurve DEMOSAIC, // EvviewMethod - RETINEX // EvRetinexgaintransmission + RETINEX, // EvRetinexgaintransmission + RETINEX //EvLskal }; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 1183b8260..5608590ca 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -73,7 +73,7 @@ void ParamsEdited::set (bool v) retinex.limd = v; retinex.highl = v; retinex.baselog = v; -// retinex.grbl = v; + retinex.skal = v; retinex.medianmap = v; retinex.transmissionCurve = v; retinex.gaintransmissionCurve = v; @@ -565,7 +565,7 @@ void ParamsEdited::initFrom (const std::vector retinex.limd = retinex.limd && p.retinex.limd == other.retinex.limd; retinex.highl = retinex.highl && p.retinex.highl == other.retinex.highl; retinex.baselog = retinex.baselog && p.retinex.baselog == other.retinex.baselog; -// retinex.grbl = retinex.grbl && p.retinex.grbl == other.retinex.grbl; + retinex.skal = retinex.skal && p.retinex.skal == other.retinex.skal; retinex.medianmap = retinex.medianmap && p.retinex.medianmap == other.retinex.medianmap; retinex.highlights = retinex.highlights && p.retinex.highlights == other.retinex.highlights; retinex.htonalwidth = retinex.htonalwidth && p.retinex.htonalwidth == other.retinex.htonalwidth; @@ -1166,9 +1166,9 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.retinex.baselog = mods.retinex.baselog; } -// if (retinex.grbl) { -// toEdit.retinex.grbl = mods.retinex.grbl; -// } + if (retinex.skal) { + toEdit.retinex.skal = mods.retinex.skal; + } if (retinex.gain) { toEdit.retinex.gain = dontforceSet && options.baBehav[ADDSET_RETI_GAIN] ? toEdit.retinex.gain + mods.retinex.gain : mods.retinex.gain; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 8e21ef5ad..3e2583bf2 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -78,7 +78,7 @@ public: bool limd; bool highl; bool baselog; -// bool grbl; + bool skal; bool method; bool transmissionCurve; bool gaintransmissionCurve; diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index bad21cfe7..b0db92448 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -54,6 +54,9 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), dhbox->pack_start(*retinexcolorspace); retinexVBox->pack_start(*dhbox); + Gtk::VBox *equalVBox = Gtk::manage (new Gtk::VBox()); + + equalFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_EQUAL"))); // Histogram equalizer Lab curve curveEditorGD = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LAB")); @@ -164,8 +167,8 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), offs = Gtk::manage (new Adjuster (M("TP_RETINEX_OFFSET"), -1000, 5000, 1, 0)); // vart = Gtk::manage (new Adjuster (M("TP_RETINEX_VARIANCE"), 50, 500, 1, 125)); limd = Gtk::manage (new Adjuster (M("TP_RETINEX_THRESHOLD"), 2, 100, 1, 8)); - baselog = Gtk::manage (new Adjuster (M("TP_RETINEX_BASELOG"), 1.1, 100., 0.001, 2.718)); -// grbl = Gtk::manage (new Adjuster (M("TP_RETINEX_HIGHLIGHT3"), 1, 100, 1, 50)); + baselog = Gtk::manage (new Adjuster (M("TP_RETINEX_BASELOG"), 1., 10., 1., 3.)); + skal = Gtk::manage (new Adjuster (M("TP_RETINEX_SKAL"), 1, 10, 1, 3)); gain->set_tooltip_markup (M("TP_RETINEX_GAIN_TOOLTIP")); scal->set_tooltip_markup (M("TP_RETINEX_SCALES_TOOLTIP")); iter->set_tooltip_markup (M("TP_RETINEX_ITER_TOOLTIP")); @@ -267,54 +270,68 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), settingsVBox->pack_start (*transLabels2); transLabels2->show (); - settingsVBox->pack_start (*curveEditorGD, Gtk::PACK_SHRINK, 4); + equalVBox->pack_start (*curveEditorGD, Gtk::PACK_SHRINK, 4); curveEditorGD->show(); - settingsVBox->pack_start (*curveEditorGDH, Gtk::PACK_SHRINK, 4); + equalVBox->pack_start (*curveEditorGDH, Gtk::PACK_SHRINK, 4); curveEditorGDH->show(); - settingsVBox->pack_start (*curveEditorGH, Gtk::PACK_SHRINK, 4); + equalVBox->pack_start (*curveEditorGH, Gtk::PACK_SHRINK, 4); curveEditorGH->show(); gambox->pack_start(*gammaretinex); - settingsVBox->pack_start(*gambox); + equalVBox->pack_start(*gambox); gammaretinex->show(); - settingsVBox->pack_start (*gam); + equalVBox->pack_start (*gam); gam->show (); - settingsVBox->pack_start (*slope); + equalVBox->pack_start (*slope); slope->show (); + equalFrame->add(*equalVBox); + settingsVBox->pack_start (*equalFrame); - settingsVBox->pack_start (*iter); + + Gtk::VBox *iterVBox = Gtk::manage (new Gtk::VBox()); + + iterFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_ITERF"))); + + iterVBox->pack_start (*iter); iter->show (); - settingsVBox->pack_start (*scal); + iterVBox->pack_start (*scal); scal->show (); - settingsVBox->pack_start (*grad); + iterVBox->pack_start (*grad); grad->show (); - settingsVBox->pack_start (*grads); + iterVBox->pack_start (*grads); grads->show (); - settingsVBox->pack_start (*limd); - limd->show (); + iterFrame->add(*iterVBox); + settingsVBox->pack_start (*iterFrame); - settingsVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2); + Gtk::VBox *tranVBox = Gtk::manage (new Gtk::VBox()); + + tranFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_TRANF"))); + + tranVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2); transmissionCurveEditorG->show(); - settingsVBox->pack_start (*medianmap); + tranVBox->pack_start (*skal); + skal->show (); + + tranVBox->pack_start (*limd); + limd->show (); + + tranVBox->pack_start (*medianmap); medianmap->show (); - // settingsVBox->pack_start (*gain); - // gain->show (); + tranFrame->add(*tranVBox); + settingsVBox->pack_start (*tranFrame); - -// settingsVBox->pack_start (*vart); -// vart->show (); Gtk::VBox *gainBox = Gtk::manage (new Gtk::VBox()); Gtk::HSeparator *separator = Gtk::manage (new Gtk::HSeparator()); @@ -357,11 +374,9 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), // settingsVBox->pack_start (*highl); // highl->show (); -// settingsVBox->pack_start (*baselog); -// baselog->show (); +// settingsVBox->pack_start (*baselog); +// baselog->show (); -// settingsVBox->pack_start (*grbl); -// grbl->show (); // settingsVBox->pack_start (*Gtk::manage (new Gtk::HSeparator())); @@ -495,12 +510,12 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), s_tonalwidth->delay = 200; } - /* grbl->setAdjusterListener (this); + skal->setAdjusterListener (this); + + if (skal->delay < 200) { + skal->delay = 200; + } - if (grbl->delay < 200) { - grbl->delay = 200; - } - */ pack_start (*retinexVBox); p1Frame->add(*p1VBox); pack_start (*p1Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -685,7 +700,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) limd->setEditedState (pedited->retinex.limd ? Edited : UnEdited); highl->setEditedState (pedited->retinex.highl ? Edited : UnEdited); baselog->setEditedState (pedited->retinex.baselog ? Edited : UnEdited); -// grbl->setEditedState (pedited->retinex.grbl ? Edited : UnEdited); + skal->setEditedState (pedited->retinex.skal ? Edited : UnEdited); set_inconsistent (multiImage && !pedited->retinex.enabled); medianmap->set_inconsistent (!pedited->retinex.medianmap); radius->setEditedState (pedited->retinex.radius ? Edited : UnEdited); @@ -745,7 +760,8 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) shadows->setValue (pp->retinex.shadows); s_tonalwidth->setValue (pp->retinex.stonalwidth); -// grbl->setValue (pp->retinex.grbl); + skal->setValue (pp->retinex.skal); + if(pp->retinex.iter == 1) { grad->set_sensitive(false); scal->set_sensitive(false); @@ -864,7 +880,7 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) pp->retinex.limd = (int)limd->getValue (); pp->retinex.highl = (int)highl->getValue (); pp->retinex.baselog = baselog->getValue (); -// pp->retinex.grbl = (int)grbl->getValue (); + pp->retinex.skal = (int)skal->getValue (); pp->retinex.cdcurve = cdshape->getCurve (); pp->retinex.lhcurve = lhshape->getCurve (); pp->retinex.cdHcurve = cdshapeH->getCurve (); @@ -902,7 +918,7 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) pedited->retinex.limd = limd->getEditedState (); pedited->retinex.highl = highl->getEditedState (); pedited->retinex.baselog = baselog->getEditedState (); -// pedited->retinex.grbl = grbl->getEditedState (); + pedited->retinex.skal = skal->getEditedState (); pedited->retinex.cdcurve = !cdshape->isUnChanged (); pedited->retinex.cdHcurve = !cdshapeH->isUnChanged (); pedited->retinex.transmissionCurve = !transmissionShape->isUnChanged (); @@ -1164,7 +1180,7 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi limd->setDefault (defParams->retinex.limd); highl->setDefault (defParams->retinex.highl); baselog->setDefault (defParams->retinex.baselog); -// grbl->setDefault (defParams->retinex.grbl); + skal->setDefault (defParams->retinex.skal); gam->setDefault (defParams->retinex.gam); slope->setDefault (defParams->retinex.slope); @@ -1187,7 +1203,7 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi limd->setDefaultEditedState (pedited->retinex.limd ? Edited : UnEdited); highl->setDefaultEditedState (pedited->retinex.highl ? Edited : UnEdited); baselog->setDefaultEditedState (pedited->retinex.baselog ? Edited : UnEdited); -// grbl->setDefaultEditedState (pedited->retinex.grbl ? Edited : UnEdited); + skal->setDefaultEditedState (pedited->retinex.skal ? Edited : UnEdited); gam->setDefaultEditedState (pedited->retinex.gam ? Edited : UnEdited); slope->setDefaultEditedState (pedited->retinex.slope ? Edited : UnEdited); @@ -1205,7 +1221,7 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi limd->setDefaultEditedState (Irrelevant); highl->setDefaultEditedState (Irrelevant); baselog->setDefaultEditedState (Irrelevant); -// grbl->setDefaultEditedState (Irrelevant); + skal->setDefaultEditedState (Irrelevant); str->setDefaultEditedState (Irrelevant); scal->setDefaultEditedState (Irrelevant); iter->setDefaultEditedState (Irrelevant); @@ -1278,8 +1294,8 @@ void Retinex::adjusterChanged (Adjuster* a, double newval) listener->panelChanged (EvLhighl, highl->getTextValue()); } else if (a == baselog) { listener->panelChanged (EvLbaselog, baselog->getTextValue()); -// } else if (a == grbl) { -// listener->panelChanged (EvLgrbl, grbl->getTextValue()); + } else if (a == skal) { + listener->panelChanged (EvLskal, skal->getTextValue()); } else if (a == gam) { listener->panelChanged (EvLgam, gam->getTextValue()); } else if (a == slope) { @@ -1446,7 +1462,7 @@ void Retinex::setBatchMode (bool batchMode) shadows->showEditedCB (); s_tonalwidth->showEditedCB (); -// grbl->showEditedCB (); + skal->showEditedCB (); curveEditorGD->setBatchMode (batchMode); curveEditorGDH->setBatchMode (batchMode); transmissionCurveEditorG->setBatchMode (batchMode); diff --git a/rtgui/retinex.h b/rtgui/retinex.h index b8034ccb9..064756a7b 100644 --- a/rtgui/retinex.h +++ b/rtgui/retinex.h @@ -35,7 +35,7 @@ protected: Adjuster* limd; Adjuster* highl; Adjuster* baselog; - Adjuster* grbl; + Adjuster* skal; Adjuster* gam; Adjuster* slope; Adjuster* highlights; @@ -77,6 +77,9 @@ protected: Gtk::Label* transLabels; Gtk::Label* transLabels2; Gtk::Frame *gainFrame; + Gtk::Frame *tranFrame; + Gtk::Frame *iterFrame; + Gtk::Frame *equalFrame; DiagonalCurveEditor* cdshape; DiagonalCurveEditor* cdshapeH; From ba5161d446bee8d3273963faa3fe295a5c1f431d Mon Sep 17 00:00:00 2001 From: Desmis Date: Fri, 12 Feb 2016 13:36:32 +0100 Subject: [PATCH 03/57] change default Tansmission curve --- rtengine/procparams.cc | 2 +- rtgui/retinex.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 1252fc0b4..96f8be01f 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -123,7 +123,7 @@ RetinexParams::RetinexParams () void RetinexParams::getDefaulttransmissionCurve(std::vector &curve) { - double v[12] = { 0.00, 0.34, 0.35, 0.35, + double v[12] = { 0.00, 0.50, 0.35, 0.35, 0.60, 0.75, 0.35, 0.35, 1.00, 0.50, 0.35, 0.35, }; diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index b0db92448..167e8efeb 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -168,7 +168,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), // vart = Gtk::manage (new Adjuster (M("TP_RETINEX_VARIANCE"), 50, 500, 1, 125)); limd = Gtk::manage (new Adjuster (M("TP_RETINEX_THRESHOLD"), 2, 100, 1, 8)); baselog = Gtk::manage (new Adjuster (M("TP_RETINEX_BASELOG"), 1., 10., 1., 3.)); - skal = Gtk::manage (new Adjuster (M("TP_RETINEX_SKAL"), 1, 10, 1, 3)); + skal = Gtk::manage (new Adjuster (M("TP_RETINEX_SKAL"), 1, 8, 1, 3)); gain->set_tooltip_markup (M("TP_RETINEX_GAIN_TOOLTIP")); scal->set_tooltip_markup (M("TP_RETINEX_SCALES_TOOLTIP")); iter->set_tooltip_markup (M("TP_RETINEX_ITER_TOOLTIP")); From 73b0bb14c0fd6b621b3e61bfbf6bced3b6fd6d4c Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 12 Feb 2016 18:42:08 +0100 Subject: [PATCH 04/57] Retinex, precalculate some expensive stuff (sin, cos, atan2) using SSE and line buffers --- rtengine/rawimagesource.cc | 119 +++++++++++++++++++++++++++++-------- 1 file changed, 93 insertions(+), 26 deletions(-) diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 2251c15dd..5b5ad6a99 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -2447,46 +2447,113 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC // gamut control only in Lab mode const bool highlight = Tc.hrenabled; #ifdef _OPENMP - #pragma omp parallel for + #pragma omp parallel +#endif + { +#ifdef __SSE2__ + // we need some line buffers to precalculate some expensive stuff using SSE + float atan2Buffer[W] ALIGNED16; + float sqrtBuffer[W] ALIGNED16; + float sincosxBuffer[W] ALIGNED16; + float sincosyBuffer[W] ALIGNED16; + const vfloat c327d68v = F2V(327.68); + const vfloat onev = F2V(1.f); +#endif // __SSE2__ +#ifdef _OPENMP + #pragma omp for #endif - for (int i = border; i < H - border; i++ ) { - for (int j = border; j < W - border; j++) { + for (int i = border; i < H - border; i++ ) { +#ifdef __SSE2__ + // vectorized precalculation + { + int j = border; - float Lprov1 = (LBuffer[i - border][j - border]) / 327.68f; - float Chprov1 = sqrt(SQR(conversionBuffer[0][i - border][j - border]) + SQR(conversionBuffer[1][i - border][j - border])) / 327.68f; - float HH = xatan2f(conversionBuffer[1][i - border][j - border], conversionBuffer[0][i - border][j - border]); - float2 sincosval; - float valp; - float chr; - - if(chutili) { // c=f(H) + for (; j < W - border - 3; j += 4) { - valp = float((chcurve->getVal(Color::huelab_to_huehsv2(HH)) - 0.5f)); - Chprov1 *= (1.f + 2.f * valp); + vfloat av = LVFU(conversionBuffer[0][i - border][j - border]); + vfloat bv = LVFU(conversionBuffer[1][i - border][j - border]); + vfloat chprovv = vsqrtf(SQRV(av) + SQRV(bv)); + STVF(sqrtBuffer[j - border], chprovv / c327d68v); + vfloat HHv = xatan2f(bv, av); + STVF(atan2Buffer[j - border], HHv); + av /= chprovv; + bv /= chprovv; + vmask selMask = vmaskf_eq(chprovv, ZEROV); + STVF(sincosyBuffer[j - border], vself(selMask, onev, av)); + STVF(sincosxBuffer[j - border], vselfnotzero(selMask, bv)); + } + + for (; j < W - border; j++) + { + float aa = conversionBuffer[0][i - border][j - border]; + float bb = conversionBuffer[1][i - border][j - border]; + float Chprov1 = sqrt(SQR(aa) + SQR(bb)) / 327.68f; + sqrtBuffer[j - border] = Chprov1; + float HH = xatan2f(bb, aa); + atan2Buffer[j - border] = HH; + + if(Chprov1 == 0.0f) { + sincosyBuffer[j - border] = 1.f; + sincosxBuffer[j - border] = 0.0f; + } else { + sincosyBuffer[j - border] = aa / (Chprov1 * 327.68f); + sincosxBuffer[j - border] = bb / (Chprov1 * 327.68f); + } } } +#endif // __SSE2__ + + for (int j = border; j < W - border; j++) { + float Lprov1 = (LBuffer[i - border][j - border]) / 327.68f; +#ifdef __SSE2__ + float Chprov1 = sqrtBuffer[j - border]; + float HH = atan2Buffer[j - border]; + float2 sincosval; + sincosval.x = sincosxBuffer[j - border]; + sincosval.y = sincosyBuffer[j - border]; - sincosval = xsincosf(HH); - float R, G, B; -#ifdef _DEBUG - bool neg = false; - bool more_rgb = false; - //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f, neg, more_rgb); #else - //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f); + float aa = conversionBuffer[0][i - border][j - border]; + float bb = conversionBuffer[1][i - border][j - border]; + float Chprov1 = sqrt(SQR(aa) + SQR(bb)) / 327.68f; + float HH = xatan2f(bb, aa); + float2 sincosval;// = xsincosf(HH); + + if(Chprov1 == 0.0f) { + sincosval.y = 1.f; + sincosval.x = 0.0f; + } else { + sincosval.y = aa / (Chprov1 * 327.68f); + sincosval.x = bb / (Chprov1 * 327.68f); + } + +#endif + + if(chutili) { // c=f(H) + float valp = float((chcurve->getVal(Color::huelab_to_huehsv2(HH)) - 0.5f)); + Chprov1 *= (1.f + 2.f * valp); + } + + float R, G, B; +#ifdef _DEBUG + bool neg = false; + bool more_rgb = false; + //gamut control : Lab values are in gamut + Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f, neg, more_rgb); +#else + //gamut control : Lab values are in gamut + Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f); #endif - conversionBuffer[0][i - border][j - border] = 327.68f * Chprov1 * sincosval.y; - conversionBuffer[1][i - border][j - border] = 327.68f * Chprov1 * sincosval.x; - LBuffer[i - border][j - border] = Lprov1 * 327.68f; + conversionBuffer[0][i - border][j - border] = 327.68f * Chprov1 * sincosval.y; + conversionBuffer[1][i - border][j - border] = 327.68f * Chprov1 * sincosval.x; + LBuffer[i - border][j - border] = Lprov1 * 327.68f; + } } } - //end gamut control #ifdef __SSE2__ vfloat wipv[3][3]; From 67a19d0cc97fbb289e2cc5db91f2211c1d3255fc Mon Sep 17 00:00:00 2001 From: Desmis Date: Sat, 13 Feb 2016 08:02:04 +0100 Subject: [PATCH 05/57] small change to take into account new scale with iterations --- rtengine/ipretinex.cc | 15 ++++++++++++++- rtengine/procparams.cc | 2 +- rtengine/rawimagesource.cc | 1 - 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index bab98ef0c..f66fb39af 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -297,7 +297,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e if(gradient == 0) { grad = 1.f; - sc = scal;//3.f + sc = 3.f; } else if(gradient == 1) { grad = 0.25f * it + 0.75f; sc = -0.5f * it + 4.5f; @@ -339,6 +339,19 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e if(iter == 1) { sc = scal; + } else { + //adjust sc in function of choice of scale by user if iterations + if(scal < 3) { + sc -= 1; + + if(sc < 1.f) {//avoid 0 + sc = 1.f; + } + } + + if(scal > 4) { + sc += 1; + } } float varx; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 96f8be01f..7575564c5 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -158,7 +158,7 @@ void RetinexParams::setDefaults() { enabled = false; str = 20; - scal = 0; + scal = 3; iter = 1; grad = 1; grads = 1; diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 5b5ad6a99..b29348c9f 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -2234,7 +2234,6 @@ void RawImageSource::retinexPrepareCurves(RetinexParams retinexParams, LUTf &cdc void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) { - MyTime t4, t5; t4.set(); From e495093b187b647b6585604d2827fb0eb1776871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sat, 16 Apr 2016 22:20:18 +0200 Subject: [PATCH 06/57] Clean up clutstore.* and add LRU cache This commit adds a true LRU cache to `rtengine` which is used in the new `CLUTStore` class. The code in `clutstore.*` was cleaned up with C++11 features and small optimizations taken from my `clutbench` project. The `CLUTStore` class was converted to a true singleton. --- rtengine/cache.h | 236 ++++++++++++++++ rtengine/clutstore.cc | 571 ++++++++++++-------------------------- rtengine/clutstore.h | 119 +++----- rtengine/improcfun.cc | 14 +- rtengine/simpleprocess.cc | 2 +- rtgui/filmsimulation.cc | 6 +- 6 files changed, 476 insertions(+), 472 deletions(-) create mode 100644 rtengine/cache.h diff --git a/rtengine/cache.h b/rtengine/cache.h new file mode 100644 index 000000000..2e53aab2a --- /dev/null +++ b/rtengine/cache.h @@ -0,0 +1,236 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2016 Flössie + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#pragma once + +#include +#include +#include +#include +#include + +#include "../rtgui/threadutils.h" + +namespace rtengine +{ + +namespace cache_helper +{ + + // See http://stackoverflow.com/a/20790050 + template + struct has_hash + : std::false_type + { + }; + + template + struct has_hash()(std::declval()), void())> + : std::true_type + { + }; + +} + +template +class Cache +{ +public: + class Hook + { + public: + virtual ~Hook() + { + } + virtual void onDiscard(const K& key, const V& value) = 0; + virtual void onDisplace(const K& key, const V& value) = 0; + virtual void onRemove(const K& key, const V& value) = 0; + virtual void onDestroy() = 0; + }; + + Cache(unsigned long _size, Hook* _hook = 0) : + store_size(_size), + hook(_hook) + { + } + + ~Cache() + { + if (hook) { + resize(0); + hook->onDestroy(); + } + } + + bool get(const K& key, V& value) const + { + mutex.lock(); + const StoreConstIterator store_it = store.find(key); + const bool present = store_it != store.end(); + if (present) { + lru_list.splice( + lru_list.begin(), + lru_list, + store_it->second.lru_list_it + ); + value = store_it->second.value; + } + mutex.unlock(); + + return present; + } + + bool set(const K& key, const V& value) + { + return set(key, value, Mode::UNCOND); + } + + bool replace(const K& key, const V& value) + { + return set(key, value, Mode::KNOWN); + } + + bool insert(const K& key, const V& value) + { + return set(key, value, Mode::UNKNOWN); + } + + bool remove(const K& key) + { + mutex.lock(); + const StoreIterator store_it = store.find(key); + const bool present = store_it != store.end(); + if (present) { + remove(store_it); + } + mutex.unlock(); + + return present; + } + + void resize(unsigned long size) + { + mutex.lock(); + while (lru_list.size() > size) { + discard(); + } + store_size = size; + mutex.unlock(); + } + + void clear() + { + mutex.lock(); + if (hook) { + for (const auto& entry : store) { + hook->onRemove(entry.first, entry.second.value); + } + } + lru_list.clear(); + store.clear(); + mutex.unlock(); + } + +private: + struct Value; + + using Store = typename std::conditional< + cache_helper::has_hash::value, + std::unordered_map, + std::map + >::type; + using StoreIterator = typename Store::iterator; + using StoreConstIterator = typename Store::const_iterator; + + typedef std::list LruList; + using LruListIterator = typename LruList::iterator; + + struct Value { + V value; + LruListIterator lru_list_it; + }; + + enum class Mode { + UNCOND, + KNOWN, + UNKNOWN + }; + + void discard() + { + const StoreIterator store_it = lru_list.back(); + if (hook) { + hook->onDiscard(store_it->first, store_it->second.value); + } + store.erase(store_it); + lru_list.pop_back(); + } + + bool set(const K& key, const V& value, Mode mode) + { + mutex.lock(); + const StoreIterator store_it = store.find(key); + const bool is_new_key = store_it == store.end(); + if (is_new_key) { + if (mode == Mode::UNCOND || mode == Mode::UNKNOWN) { + if (lru_list.size() >= store_size) { + discard(); + } + lru_list.push_front(store.end()); + const Value v = { + value, + lru_list.begin() + }; + lru_list.front() = store.emplace(key, v).first; + } + } else { + if (mode == Mode::UNCOND || mode == Mode::KNOWN) { + if (hook) { + hook->onDisplace(key, store_it->second.value); + } + lru_list.splice( + lru_list.begin(), + lru_list, + store_it->second.lru_list_it + ); + store_it->second.value = value; + } + } + mutex.unlock(); + + return is_new_key; + } + + void remove(const StoreIterator& store_it) + { + if (hook) { + hook->onRemove(store_it->first, store_it->second.value); + } + lru_list.erase(store_it->second.lru_list_it); + store.erase(store_it); + } + + unsigned long store_size; + Hook* const hook; + mutable MyMutex mutex; + Store store; + mutable LruList lru_list; +}; + +} diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index a0ea5afb4..533d1e89d 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -3,440 +3,233 @@ #include "stdimagesource.h" #include "../rtgui/options.h" -rtengine::CLUTStore clutStore; - -using namespace rtengine; - -const float MAXVAL8 = 255.; - -CLUTStore::CLUTStore() +namespace { -} -CLUT* CLUTStore::getClut( const Glib::ustring& filename ) +std::unique_ptr loadFile( + const Glib::ustring& filename, + const Glib::ustring& working_color_space, + unsigned int& clut_level +) { - CLUT *result = 0; - m_mutex.lock(); - Cluts::iterator cluts_it = m_cluts.find(filename); + std::unique_ptr result; - if (cluts_it == m_cluts.end()) { - if (m_cluts.size() >= options.clutCacheSize) { - // Evict a "random" entry from cache - Cluts::iterator victim_it = m_cluts.begin(); + rtengine::StdImageSource img_src; - if (--victim_it->second.first == -1) { - delete victim_it->second.second; - m_cluts.erase(victim_it); - } - } - - cluts_it = m_cluts.insert(std::make_pair(filename, std::make_pair(0, new HaldCLUT))).first; - cluts_it->second.second->load( filename ); - } - - if (cluts_it->second.second->isValid()) { - result = cluts_it->second.second; - ++cluts_it->second.first; - } else { - delete cluts_it->second.second; - m_cluts.erase(cluts_it); - } - - m_mutex.unlock(); - - return result; -} - -void CLUTStore::releaseClut( const CLUT* clut ) -{ - m_mutex.lock(); - - for (Cluts::iterator cluts_it = m_cluts.begin(); cluts_it != m_cluts.end(); ++cluts_it) { - if (cluts_it->second.second == clut) { - if (--cluts_it->second.first == -1) { - delete cluts_it->second.second; - m_cluts.erase(cluts_it); - } - - break; - } - } - - m_mutex.unlock(); -} - -void CLUTStore::clearCache() -{ - m_mutex.lock(); - - for (Cluts::iterator cluts_it = m_cluts.begin(); cluts_it != m_cluts.end();) { - if (--cluts_it->second.first == -1) { - delete cluts_it->second.second; - Cluts::iterator tmp = cluts_it; - ++cluts_it; - m_cluts.erase(tmp); - } else { - ++cluts_it; - } - } - - m_mutex.unlock(); -} - -void rtengine::splitClutFilename( Glib::ustring filename, Glib::ustring &name, Glib::ustring &extension, Glib::ustring &profileName ) -{ - filename = Glib::path_get_basename( filename ); - name = filename; - //remove dirs - size_t lastSlashPos = filename.find_last_of( "/" ); - - if ( lastSlashPos == Glib::ustring::npos ) { - lastSlashPos = filename.find_last_of( "\\" ); - } - - size_t lastDotPos = filename.find_last_of( '.' ); - - if ( lastDotPos != Glib::ustring::npos ) { - name = filename.substr( 0, lastDotPos ); - extension = filename.substr( lastDotPos + 1, Glib::ustring::npos ); - } - - profileName = "sRGB"; // sRGB by default - static std::vector workingProfiles = rtengine::getWorkingProfiles(); - - for ( std::vector::iterator it = workingProfiles.begin(); it != workingProfiles.end(); ++it ) { - Glib::ustring ¤tProfile = *it; - - if ( std::search( name.rbegin(), name.rend(), currentProfile.rbegin(), currentProfile.rend() ) == name.rbegin() ) { - profileName = currentProfile; - name = name.substr( 0, name.size() - currentProfile.size() ); - break; - } - } -} - -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HaldCLUT::HaldCLUT() - : m_clutImage( 0 ), - m_level (0), - m_profile( "sRGB" ) -{ -} - -HaldCLUT::~HaldCLUT() -{ - if ( m_clutImage ) { - m_clutImage->free(); - m_clutImage = 0; - } -} - -void HaldCLUT::load( Glib::ustring filename ) -{ - m_clutImage = loadFile( filename, "", m_level ); - Glib::ustring name, ext; - splitClutFilename( filename, name, ext, m_profile ); - - if ( m_clutImage ) { - m_filename = filename; - } -} - -Glib::ustring HaldCLUT::profile() const -{ - return m_profile; -} - -Imagefloat* HaldCLUT::loadFile( Glib::ustring filename, Glib::ustring workingColorSpace, int &outLevel ) -{ - Imagefloat *result = 0; - StdImageSource imgSrc; - - if ( !Glib::file_test( filename, Glib::FILE_TEST_EXISTS ) || imgSrc.load(filename) ) { + if (!Glib::file_test(filename, Glib::FILE_TEST_EXISTS) || img_src.load(filename)) { return result; } int fw, fh; - imgSrc.getFullSize (fw, fh, TR_NONE); + img_src.getFullSize(fw, fh, TR_NONE); bool valid = false; - //test on Hald format, copypasted from http://www.quelsolaar.com/technology/clut.html - if ( fw == fh ) { - outLevel = 1; - - for(; outLevel * outLevel * outLevel < fw; outLevel++); - - if( !( outLevel * outLevel * outLevel > fw ) ) { + if (fw == fh) { + unsigned int level = 1; + while (level * level * level < fw) { + ++level; + } + if (level * level * level == fw && level > 1) { + clut_level = level; valid = true; } } - if ( valid ) { - ColorTemp currWB = imgSrc.getWB(); - Imagefloat* baseImg = new Imagefloat (fw, fh); - PreviewProps pp (0, 0, fw, fh, 1); + if (valid) { + rtengine::ColorTemp curr_wb = img_src.getWB(); + result = std::unique_ptr(new rtengine::Imagefloat(fw, fh)); + const PreviewProps pp(0, 0, fw, fh, 1); - procparams::ColorManagementParams icm; - icm.working = workingColorSpace; + rtengine::procparams::ColorManagementParams icm; + icm.working = working_color_space; - imgSrc.getImage (currWB, TR_NONE, baseImg, pp, procparams::ToneCurveParams(), icm, procparams::RAWParams()); + img_src.getImage(curr_wb, TR_NONE, result.get(), pp, rtengine::procparams::ToneCurveParams(), icm, rtengine::procparams::RAWParams()); - if ( !workingColorSpace.empty() ) { - imgSrc.convertColorSpace(baseImg, icm, currWB); + if (!working_color_space.empty()) { + img_src.convertColorSpace(result.get(), icm, curr_wb); } - - result = baseImg; } return result; } -void HaldCLUT::loadClut( Imagefloat *img, RawClut &outClut ) +inline void posToXy(unsigned int pos, unsigned int width, unsigned int (&x)[2], unsigned int (&y)[2]) { - img->normalizeFloatTo1(); - int y_size = img->getH(); - int x_size = img->getW(); - outClut.resize( x_size * y_size * 3 ); - int clutIdx = 0; + x[0] = pos % width; + y[0] = pos / width; + x[1] = (pos + 1) % width; + y[1] = (pos + 1) / width; +} - //int level = m_level * m_level; (unused) - for(int y = 0; y < y_size; y++) { - for(int x = 0; x < x_size; x++) { - outClut[ clutIdx * 3 ] = img->r( y, x ) * MAXVAL8; - outClut[ clutIdx * 3 + 1 ] = img->g( y, x ) * MAXVAL8; - outClut[ clutIdx * 3 + 2 ] = img->b( y, x ) * MAXVAL8; +} - ++clutIdx; +void rtengine::CLUT::splitClutFilename( + const Glib::ustring& filename, + Glib::ustring& name, + Glib::ustring& extension, + Glib::ustring& profile_name +) +{ + Glib::ustring basename = Glib::path_get_basename(filename); + + Glib::ustring::size_type last_slash_pos = basename.rfind('/'); + if (last_slash_pos == Glib::ustring::npos) { + last_slash_pos = basename.rfind('\\'); + } + + const Glib::ustring::size_type last_dot_pos = basename.rfind('.'); + + if (last_dot_pos != Glib::ustring::npos) { + name.assign(basename, 0, last_dot_pos); + extension.assign(basename, last_dot_pos + 1, Glib::ustring::npos); + } else { + name = basename; + } + + profile_name = "sRGB"; + + for (const auto& working_profile : rtengine::getWorkingProfiles()) { + if ( std::search( name.rbegin(), name.rend(), working_profile.rbegin(), working_profile.rend() ) == name.rbegin() ) { + profile_name = working_profile; + name.erase(name.size() - working_profile.size()); + break; } } } -Imagefloat* HaldCLUT::generateIdentImage( int level ) +rtengine::HaldCLUT::HaldCLUT() : + clut_level(0), + clut_profile("sRGB") { - int imageWidth = level * level * level; - Imagefloat *resultImg = new Imagefloat( imageWidth, imageWidth ); +} - int cubeSideSize = level * level; - float step = MAXVALF / (cubeSideSize - 1); - int pos = 0; +rtengine::HaldCLUT::~HaldCLUT() +{ +} - for( int b = 0; b < cubeSideSize; ++b ) { - for ( int g = 0; g < cubeSideSize; ++g ) { - for ( int r = 0; r < cubeSideSize; ++r ) { - int x = pos / imageWidth; - int y = pos % imageWidth; - resultImg->r( x, y ) = step * r; - resultImg->g( x, y ) = step * g; - resultImg->b( x, y ) = step * b; - ++pos; - } +bool rtengine::HaldCLUT::load(const Glib::ustring& filename) +{ + clut_image = loadFile(filename, "", clut_level); + Glib::ustring name, ext; + splitClutFilename(filename, name, ext, clut_profile); + + if (clut_image) { + clut_filename = filename; + return true; + } + + return false; +} + +rtengine::HaldCLUT::operator bool() const +{ + return static_cast(clut_image); +} + +Glib::ustring rtengine::HaldCLUT::getFilename() const +{ + return clut_filename; +} + +Glib::ustring rtengine::HaldCLUT::getProfile() const +{ + return clut_profile; +} + +void rtengine::HaldCLUT::getRGB(float r, float g, float b, float& out_r, float& out_g, float& out_b) const +{ + const unsigned int level = clut_level * clut_level; + + const float flevel_minus_one = static_cast(level - 1) / 65535.0f; + const float flevel_minus_two = static_cast(level - 2); + + const unsigned int red = std::min(flevel_minus_two, r * flevel_minus_one); + const unsigned int green = std::min(flevel_minus_two, g * flevel_minus_one); + const unsigned int blue = std::min(flevel_minus_two, b * flevel_minus_one); + + r = r * flevel_minus_one - red; + g = g * flevel_minus_one - green; + b = b * flevel_minus_one - blue; + + const unsigned int level_square = level * level; + + const unsigned int color = red + green * level + blue * level_square; + + unsigned int x[2]; + unsigned int y[2]; + posToXy(color, clut_image->getWidth(), x, y); + + float tmp1[4] __attribute__((aligned(16))); + tmp1[0] = clut_image->r(y[0], x[0]) * (1 - r) + clut_image->r(y[1], x[1]) * r; + tmp1[1] = clut_image->g(y[0], x[0]) * (1 - r) + clut_image->g(y[1], x[1]) * r; + tmp1[2] = clut_image->b(y[0], x[0]) * (1 - r) + clut_image->b(y[1], x[1]) * r; + + posToXy(color + level, clut_image->getWidth(), x, y); + + float tmp2[4] __attribute__((aligned(16))); + tmp2[0] = clut_image->r(y[0], x[0]) * (1 - r) + clut_image->r(y[1], x[1]) * r; + tmp2[1] = clut_image->g(y[0], x[0]) * (1 - r) + clut_image->g(y[1], x[1]) * r; + tmp2[2] = clut_image->b(y[0], x[0]) * (1 - r) + clut_image->b(y[1], x[1]) * r; + + float out[4] __attribute__((aligned(16))); + out[0] = tmp1[0] * (1 - g) + tmp2[0] * g; + out[1] = tmp1[1] * (1 - g) + tmp2[1] * g; + out[2] = tmp1[2] * (1 - g) + tmp2[2] * g; + + posToXy(color + level_square, clut_image->getWidth(), x, y); + + tmp1[0] = clut_image->r(y[0], x[0]) * (1 - r) + clut_image->r(y[1], x[1]) * r; + tmp1[1] = clut_image->g(y[0], x[0]) * (1 - r) + clut_image->g(y[1], x[1]) * r; + tmp1[2] = clut_image->b(y[0], x[0]) * (1 - r) + clut_image->b(y[1], x[1]) * r; + + posToXy(color + level + level_square, clut_image->getWidth(), x, y); + + tmp2[0] = clut_image->r(y[0], x[0]) * (1 - r) + clut_image->r(y[1], x[1]) * r; + tmp2[1] = clut_image->g(y[0], x[0]) * (1 - r) + clut_image->g(y[1], x[1]) * r; + tmp2[2] = clut_image->b(y[0], x[0]) * (1 - r) + clut_image->b(y[1], x[1]) * r; + + tmp1[0] = tmp1[0] * (1 - g) + tmp2[0] * g; + tmp1[1] = tmp1[1] * (1 - g) + tmp2[1] * g; + tmp1[2] = tmp1[2] * (1 - g) + tmp2[2] * g; + + out_r = out[0] * (1 - b) + tmp1[0] * b; + out_g = out[1] * (1 - b) + tmp1[1] * b; + out_b = out[2] * (1 - b) + tmp1[2] * b; +} + +rtengine::CLUTStore& rtengine::CLUTStore::getInstance() +{ + static CLUTStore instance; + return instance; +} + +std::shared_ptr rtengine::CLUTStore::getClut(const Glib::ustring& filename) +{ + std::shared_ptr result; + + if (!cache.get(filename, result)) { + std::unique_ptr clut(new rtengine::HaldCLUT); + if (clut->load(filename)) { + result = std::move(clut); + cache.insert(filename, result); } } - return resultImg; + return result; } - -bool HaldCLUT::isValid() const +void rtengine::CLUTStore::releaseClut(const std::shared_ptr& clut) { - return m_clutImage != 0; + cache.remove(clut->getFilename()); } -void HaldCLUT::getRGB( float rr, float gg, float bb, float &outR, float &outG, float &outB ) const +void rtengine::CLUTStore::clearCache() { - rr /= MAXVALF; - gg /= MAXVALF; - bb /= MAXVALF; - correct( *m_clutImage, m_level, rr, gg, bb, outR, outG, outB ); + cache.clear(); } -inline float valF( unsigned char val ) +rtengine::CLUTStore::CLUTStore() : + cache(options.clutCacheSize) { - return float( val ) / MAXVAL8; -} - -// copypasted from http://www.quelsolaar.com/technology/clut.html -void HaldCLUT::correct( const HaldCLUT::RawClut& clut, int level, float rr, float gg, float bb, float &outR, float &outG, float &outB ) -{ - int color, red, green, blue, i, j; - float tmp[6], r, g, b; - level = level * level; - - red = rr * (float)(level - 1); - - if(red > level - 2) { - red = (float)level - 2; - } - - if(red < 0) { - red = 0; - } - - green = gg * (float)(level - 1); - - if(green > level - 2) { - green = (float)level - 2; - } - - if(green < 0) { - green = 0; - } - - blue = bb * (float)(level - 1); - - if(blue > level - 2) { - blue = (float)level - 2; - } - - if(blue < 0) { - blue = 0; - } - - r = rr * (float)(level - 1) - red; - g = gg * (float)(level - 1) - green; - b = bb * (float)(level - 1) - blue; - - color = red + green * level + blue * level * level; - - i = color * 3; - j = (color + 1) * 3; - - tmp[0] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[1] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[2] = valF( clut[i] ) * (1 - r) + valF( clut[j] ) * r; - - i = (color + level) * 3; - j = (color + level + 1) * 3; - - tmp[3] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[4] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[5] = valF( clut[i] ) * (1 - r) + valF( clut[j] ) * r; - - outR = tmp[0] * (1 - g) + tmp[3] * g; - outG = tmp[1] * (1 - g) + tmp[4] * g; - outB = tmp[2] * (1 - g) + tmp[5] * g; - - i = (color + level * level) * 3; - j = (color + level * level + 1) * 3; - - tmp[0] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[1] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[2] = valF( clut[i] ) * (1 - r) + valF( clut[j] ) * r; - - i = (color + level + level * level) * 3; - j = (color + level + level * level + 1) * 3; - - tmp[3] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[4] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[5] = valF( clut[i] ) * (1 - r) + valF( clut[j] ) * r; - - tmp[0] = tmp[0] * (1 - g) + tmp[3] * g; - tmp[1] = tmp[1] * (1 - g) + tmp[4] * g; - tmp[2] = tmp[2] * (1 - g) + tmp[5] * g; - - outR = outR * (1 - b) + tmp[0] * b; - outG = outG * (1 - b) + tmp[1] * b; - outB = outB * (1 - b) + tmp[2] * b; -} - -inline void pos2xy( int pos, int imageSideSize, int &outX, int &outY ) -{ - outX = pos / imageSideSize; - outY = pos % imageSideSize; -} - -void HaldCLUT::correct( Imagefloat &clutImage, int level, float rr, float gg, float bb, float &outR, float &outG, float &outB ) -{ - int color, red, green, blue, i, j; - float tmp[6], r, g, b; - level = level * level; - int imageSideSize = clutImage.getW(); - - red = rr * (float)(level - 1); - - if(red > level - 2) { - red = (float)level - 2; - } - - if(red < 0) { - red = 0; - } - - green = gg * (float)(level - 1); - - if(green > level - 2) { - green = (float)level - 2; - } - - if(green < 0) { - green = 0; - } - - blue = bb * (float)(level - 1); - - if(blue > level - 2) { - blue = (float)level - 2; - } - - if(blue < 0) { - blue = 0; - } - - r = rr * (float)(level - 1) - red; - g = gg * (float)(level - 1) - green; - b = bb * (float)(level - 1) - blue; - - color = red + green * level + blue * level * level; - - - i = color; - j = color + 1; - int xi, yi, xj, yj; - pos2xy( i, imageSideSize, xi, yi ); - pos2xy( j, imageSideSize, xj, yj ); - - tmp[0] = clutImage.r( xi, yi ) * (1 - r) + clutImage.r( xj, yj ) * r; - tmp[1] = clutImage.g( xi, yi ) * (1 - r) + clutImage.g( xj, yj ) * r; - tmp[2] = clutImage.b( xi, yi ) * (1 - r) + clutImage.b( xj, yj ) * r; - - i = color + level; - j = color + level + 1; - pos2xy( i, imageSideSize, xi, yi ); - pos2xy( j, imageSideSize, xj, yj ); - - tmp[3] = clutImage.r( xi, yi ) * (1 - r) + clutImage.r( xj, yj ) * r; - tmp[4] = clutImage.g( xi, yi ) * (1 - r) + clutImage.g( xj, yj ) * r; - tmp[5] = clutImage.b( xi, yi ) * (1 - r) + clutImage.b( xj, yj ) * r; - - outR = tmp[0] * (1 - g) + tmp[3] * g; - outG = tmp[1] * (1 - g) + tmp[4] * g; - outB = tmp[2] * (1 - g) + tmp[5] * g; - - i = color + level * level; - j = color + level * level + 1; - pos2xy( i, imageSideSize, xi, yi ); - pos2xy( j, imageSideSize, xj, yj ); - - tmp[0] = clutImage.r( xi, yi ) * (1 - r) + clutImage.r( xj, yj ) * r; - tmp[1] = clutImage.g( xi, yi ) * (1 - r) + clutImage.g( xj, yj ) * r; - tmp[2] = clutImage.b( xi, yi ) * (1 - r) + clutImage.b( xj, yj ) * r; - - i = color + level + level * level; - j = color + level + level * level + 1; - pos2xy( i, imageSideSize, xi, yi ); - pos2xy( j, imageSideSize, xj, yj ); - - tmp[3] = clutImage.r( xi, yi ) * (1 - r) + clutImage.r( xj, yj ) * r; - tmp[4] = clutImage.g( xi, yi ) * (1 - r) + clutImage.g( xj, yj ) * r; - tmp[5] = clutImage.b( xi, yi ) * (1 - r) + clutImage.b( xj, yj ) * r; - - tmp[0] = tmp[0] * (1 - g) + tmp[3] * g; - tmp[1] = tmp[1] * (1 - g) + tmp[4] * g; - tmp[2] = tmp[2] * (1 - g) + tmp[5] * g; - - outR = outR * (1 - b) + tmp[0] * b; - outG = outG * (1 - b) + tmp[1] * b; - outB = outB * (1 - b) + tmp[2] * b; } diff --git a/rtengine/clutstore.h b/rtengine/clutstore.h index de080b737..ce8fd9627 100644 --- a/rtengine/clutstore.h +++ b/rtengine/clutstore.h @@ -1,107 +1,78 @@ -#ifndef CLUT_STORE_INCLUDED -#define CLUT_STORE_INCLUDED +#pragma once + +#include #include -#include "../rtgui/threadutils.h" + #include "imagefloat.h" -#include -#include +#include "cache.h" namespace rtengine { -// simple CLUT interface class CLUT { public: - virtual void getRGB( float r, float g, float b, float &outR, float &outG, float &outB ) const = 0; - virtual Glib::ustring profile() const = 0; -protected: - virtual ~CLUT() {}; + CLUT() = default; + CLUT(const CLUT& other) = delete; + CLUT& operator =(const CLUT& other) = delete; + virtual ~CLUT() = default; + + virtual explicit operator bool() const = 0; + + virtual Glib::ustring getFilename() const = 0; + virtual Glib::ustring getProfile() const = 0; + + virtual void getRGB(float r, float g, float b, float& out_r, float& out_g, float& out_b) const = 0; + + static void splitClutFilename( + const Glib::ustring& filename, + Glib::ustring& name, + Glib::ustring& extension, + Glib::ustring& profile_name + ); }; -class HaldCLUT : public CLUT +class HaldCLUT + : public CLUT { public: HaldCLUT(); ~HaldCLUT(); - void load( Glib::ustring filename ); - bool isValid() const; - void getRGB( float r, float g, float b, float &outR, float &outG, float &outB ) const; - Glib::ustring profile() const; + bool load(const Glib::ustring& filename); - typedef std::vector RawClut; // using 8 bit for reduce memory usage - static void correct( const RawClut&, int level, float r, float g, float b, float &outR, float &outG, float &outB ); - static void correct( Imagefloat &clutImage, int level, float rr, float gg, float bb, float &outR, float &outG, float &outB ); - static Imagefloat* generateIdentImage( int level ); - static Imagefloat* loadFile( Glib::ustring filename, Glib::ustring workingColorSpace, int &outLevel ); + explicit operator bool() const; + + Glib::ustring getFilename() const; + Glib::ustring getProfile() const; + + void getRGB(float r, float g, float b, float& out_r, float& out_g, float& out_b) const; private: - - void loadClut( Imagefloat *img, RawClut &outClut ); - - Imagefloat *m_clutImage; - int m_level; - Glib::ustring m_filename; - Glib::ustring m_profile; + std::unique_ptr clut_image; + unsigned int clut_level; + Glib::ustring clut_filename; + Glib::ustring clut_profile; }; -// CLUT cache class CLUTStore { public: - CLUTStore(); + static CLUTStore& getInstance(); - CLUT* getClut( const Glib::ustring& filename ); - void releaseClut( const CLUT* clut ); + CLUTStore(const CLUTStore& other) = delete; + CLUTStore& operator =(const CLUTStore& other) = delete; + + std::shared_ptr getClut(const Glib::ustring& filename); + void releaseClut(const std::shared_ptr& clut); void clearCache(); private: - typedef std::map > Cluts; + CLUTStore(); - Cluts m_cluts; - MyMutex m_mutex; + Cache> cache; }; -void splitClutFilename( Glib::ustring filename, Glib::ustring &name, Glib::ustring &extension, Glib::ustring &profileName ); - -}; //namespace rtengine - -extern rtengine::CLUTStore clutStore; - -namespace rtengine -{ - -//support class for automate call of clutStore.releaseClut() -class ClutPtr -{ -public: - ClutPtr() : m_point( 0 ) {} - explicit ClutPtr(CLUT *p) : m_point( p ) {} - ~ClutPtr() - { - clutStore.releaseClut( m_point ); - } - const CLUT* operator-> () const - { - return m_point; - } - operator bool() const - { - return m_point != 0; - } - void set( CLUT *p ) - { - m_point = p; - } - -private: - ClutPtr& operator=(ClutPtr const& cp ); - CLUT *m_point; -}; - -}; //namespace rtengine - -#endif +} diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 989d9c6a7..2732c567d 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -3205,21 +3205,21 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } } - ClutPtr colorLUT; + std::shared_ptr colorLUT; bool clutAndWorkingProfilesAreSame = false; TMatrix work2xyz, xyz2clut, clut2xyz, xyz2work; if ( params->filmSimulation.enabled && !params->filmSimulation.clutFilename.empty() ) { - colorLUT.set( clutStore.getClut( params->filmSimulation.clutFilename ) ); + colorLUT = CLUTStore::getInstance().getClut( params->filmSimulation.clutFilename ); if ( colorLUT ) { - clutAndWorkingProfilesAreSame = colorLUT->profile() == params->icm.working; + clutAndWorkingProfilesAreSame = colorLUT->getProfile() == params->icm.working; if ( !clutAndWorkingProfilesAreSame ) { work2xyz = iccStore->workingSpaceMatrix( params->icm.working ); - xyz2clut = iccStore->workingSpaceInverseMatrix( colorLUT->profile() ); + xyz2clut = iccStore->workingSpaceInverseMatrix( colorLUT->getProfile() ); xyz2work = iccStore->workingSpaceInverseMatrix( params->icm.working ); - clut2xyz = iccStore->workingSpaceMatrix( colorLUT->profile() ); + clut2xyz = iccStore->workingSpaceMatrix( colorLUT->getProfile() ); } } } @@ -4337,6 +4337,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer //Film Simulations if ( colorLUT ) { + MyTime start, stop; + start.set(); for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { float &sourceR = rtemp[ti * TS + tj]; @@ -4375,6 +4377,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } } + stop.set(); + printf("Film simulation took %dus.\n", stop.etime(start)); } diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index c03addb42..bda0f84b0 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -857,7 +857,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // if clut was used and size of clut cache == 1 we free the memory used by the clutstore (default clut cache size = 1 for 32 bit OS) if ( params.filmSimulation.enabled && !params.filmSimulation.clutFilename.empty() && options.clutCacheSize == 1) { - clutStore.clearCache(); + CLUTStore::getInstance().clearCache(); } // freeing up some memory diff --git a/rtgui/filmsimulation.cc b/rtgui/filmsimulation.cc index 07f85df94..3ee1f4742 100644 --- a/rtgui/filmsimulation.cc +++ b/rtgui/filmsimulation.cc @@ -72,7 +72,7 @@ void FilmSimulation::onClutSelected() if ( getEnabled() && !currentClutFilename.empty() && listener && currentClutFilename != m_oldClutFilename ) { Glib::ustring clutName, dummy; - splitClutFilename( currentClutFilename, clutName, dummy, dummy ); + CLUT::splitClutFilename( currentClutFilename, clutName, dummy, dummy ); listener->panelChanged( EvFilmSimulationFilename, clutName ); m_oldClutFilename = currentClutFilename; @@ -132,7 +132,7 @@ void FilmSimulation::read( const rtengine::procparams::ProcParams* pp, const Par if ( !get_inconsistent() && !pp->filmSimulation.enabled ) { if (options.clutCacheSize == 1) { - clutStore.clearCache(); + CLUTStore::getInstance().clearCache(); } } @@ -279,7 +279,7 @@ int ClutComboBox::parseDir (const Glib::ustring& path) for (const auto& entry : entries) { Glib::ustring name, extension, profileName; - splitClutFilename (entry, name, extension, profileName); + CLUT::splitClutFilename (entry, name, extension, profileName); extension = extension.casefold (); if (extension.compare ("tif") != 0 && extension.compare ("png") != 0) { From f639cd6b82849a7e3bd3ade4d5e0aaf6507b75c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Mon, 18 Apr 2016 20:38:23 +0200 Subject: [PATCH 07/57] Use Image16 instead of Imagefloat for CLUT Gain speed and reduce memory by using Image16 instead of Imagefloat for the CLUT. --- rtengine/clutstore.cc | 28 ++++++++++++++++++---------- rtengine/clutstore.h | 7 +++++-- rtengine/improcfun.cc | 4 ---- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index 533d1e89d..53adcc013 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -1,18 +1,22 @@ +#include + #include "clutstore.h" -#include "rt_math.h" + +#include "image16.h" +#include "imagefloat.h" #include "stdimagesource.h" #include "../rtgui/options.h" namespace { -std::unique_ptr loadFile( +std::unique_ptr loadFile( const Glib::ustring& filename, const Glib::ustring& working_color_space, unsigned int& clut_level ) { - std::unique_ptr result; + std::unique_ptr result; rtengine::StdImageSource img_src; @@ -38,17 +42,19 @@ std::unique_ptr loadFile( if (valid) { rtengine::ColorTemp curr_wb = img_src.getWB(); - result = std::unique_ptr(new rtengine::Imagefloat(fw, fh)); + std::unique_ptr img_float = std::unique_ptr(new rtengine::Imagefloat(fw, fh)); const PreviewProps pp(0, 0, fw, fh, 1); rtengine::procparams::ColorManagementParams icm; icm.working = working_color_space; - img_src.getImage(curr_wb, TR_NONE, result.get(), pp, rtengine::procparams::ToneCurveParams(), icm, rtengine::procparams::RAWParams()); + img_src.getImage(curr_wb, TR_NONE, img_float.get(), pp, rtengine::procparams::ToneCurveParams(), icm, rtengine::procparams::RAWParams()); if (!working_color_space.empty()) { - img_src.convertColorSpace(result.get(), icm, curr_wb); + img_src.convertColorSpace(img_float.get(), icm, curr_wb); } + + result = std::unique_ptr(img_float->to16()); } return result; @@ -100,6 +106,8 @@ void rtengine::CLUT::splitClutFilename( rtengine::HaldCLUT::HaldCLUT() : clut_level(0), + flevel_minus_one(0.0f), + flevel_minus_two(0.0f), clut_profile("sRGB") { } @@ -116,6 +124,9 @@ bool rtengine::HaldCLUT::load(const Glib::ustring& filename) if (clut_image) { clut_filename = filename; + clut_level *= clut_level; + flevel_minus_one = static_cast(clut_level - 1) / 65535.0f; + flevel_minus_two = static_cast(clut_level - 2); return true; } @@ -139,10 +150,7 @@ Glib::ustring rtengine::HaldCLUT::getProfile() const void rtengine::HaldCLUT::getRGB(float r, float g, float b, float& out_r, float& out_g, float& out_b) const { - const unsigned int level = clut_level * clut_level; - - const float flevel_minus_one = static_cast(level - 1) / 65535.0f; - const float flevel_minus_two = static_cast(level - 2); + const unsigned int level = clut_level; // This is important const unsigned int red = std::min(flevel_minus_two, r * flevel_minus_one); const unsigned int green = std::min(flevel_minus_two, g * flevel_minus_one); diff --git a/rtengine/clutstore.h b/rtengine/clutstore.h index ce8fd9627..b084c67fe 100644 --- a/rtengine/clutstore.h +++ b/rtengine/clutstore.h @@ -4,12 +4,13 @@ #include -#include "imagefloat.h" #include "cache.h" namespace rtengine { +class Image16; + class CLUT { public: @@ -50,8 +51,10 @@ public: void getRGB(float r, float g, float b, float& out_r, float& out_g, float& out_b) const; private: - std::unique_ptr clut_image; + std::unique_ptr clut_image; unsigned int clut_level; + float flevel_minus_one; + float flevel_minus_two; Glib::ustring clut_filename; Glib::ustring clut_profile; }; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 2732c567d..d61c79513 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -4337,8 +4337,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer //Film Simulations if ( colorLUT ) { - MyTime start, stop; - start.set(); for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { float &sourceR = rtemp[ti * TS + tj]; @@ -4377,8 +4375,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } } - stop.set(); - printf("Film simulation took %dus.\n", stop.etime(start)); } From b1a9e968365c5cafcd499dd706268d6f26ddf98d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sat, 23 Apr 2016 22:46:21 +0200 Subject: [PATCH 08/57] Store HaldCLUT as flat RGBx array Instead of using an `Image16`, which is organized in planes, store the HaldCLUT in an `AlignedBuffer` with sequential RGBx values. This gives a speedup of roughly 23% here. --- rtengine/alignedbuffer.h | 31 +++----- rtengine/clutstore.cc | 163 ++++++++++++++++++++++++++------------- rtengine/clutstore.h | 16 ++-- rtengine/improcfun.cc | 10 +-- 4 files changed, 131 insertions(+), 89 deletions(-) diff --git a/rtengine/alignedbuffer.h b/rtengine/alignedbuffer.h index a33d4dfe8..ac8471b7e 100644 --- a/rtengine/alignedbuffer.h +++ b/rtengine/alignedbuffer.h @@ -18,9 +18,10 @@ */ #ifndef _ALIGNEDBUFFER_ #define _ALIGNEDBUFFER_ -#include +#include #include #include +#include #include #include "../rtgui/threadutils.h" @@ -58,7 +59,7 @@ public: /** @brief Return true if there's no memory allocated */ - bool isEmpty() + bool isEmpty() const { return allocatedSize == 0; } @@ -120,28 +121,14 @@ public: void swap(AlignedBuffer &other) { - void *tmpReal = other.real; - other.real = real; - real = tmpReal; - - char tmpAlignt = other.alignment; - other.alignment = alignment; - alignment = tmpAlignt; - - size_t tmpAllocSize = other.allocatedSize; - other.allocatedSize = allocatedSize; - allocatedSize = tmpAllocSize; - - T* tmpData = other.data; - other.data = data; - data = tmpData; - - bool tmpInUse = other.inUse; - other.inUse = inUse; - inUse = tmpInUse; + std::swap(real, other.real); + std::swap(alignment, other.alignment); + std::swap(allocatedSize, other.allocatedSize); + std::swap(data, other.data); + std::swap(inUse, other.inUse); } - unsigned int getSize() + unsigned int getSize() const { return unitSize ? allocatedSize / unitSize : 0; } diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index 53adcc013..add051254 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -1,8 +1,11 @@ #include +#ifdef __SSE2__ +#include +#endif + #include "clutstore.h" -#include "image16.h" #include "imagefloat.h" #include "stdimagesource.h" #include "../rtgui/options.h" @@ -10,24 +13,23 @@ namespace { -std::unique_ptr loadFile( +bool loadFile( const Glib::ustring& filename, const Glib::ustring& working_color_space, + AlignedBuffer& clut_image, unsigned int& clut_level ) { - std::unique_ptr result; - rtengine::StdImageSource img_src; if (!Glib::file_test(filename, Glib::FILE_TEST_EXISTS) || img_src.load(filename)) { - return result; + return false; } int fw, fh; img_src.getFullSize(fw, fh, TR_NONE); - bool valid = false; + bool res = false; if (fw == fh) { unsigned int level = 1; @@ -36,11 +38,11 @@ std::unique_ptr loadFile( } if (level * level * level == fw && level > 1) { clut_level = level; - valid = true; + res = true; } } - if (valid) { + if (res) { rtengine::ColorTemp curr_wb = img_src.getWB(); std::unique_ptr img_float = std::unique_ptr(new rtengine::Imagefloat(fw, fh)); const PreviewProps pp(0, 0, fw, fh, 1); @@ -54,20 +56,39 @@ std::unique_ptr loadFile( img_src.convertColorSpace(img_float.get(), icm, curr_wb); } - result = std::unique_ptr(img_float->to16()); + AlignedBuffer image(fw * fh * 4 + 1); + + std::size_t index = 0; + for (int y = 0; y < fh; ++y) { + for (int x = 0; x < fw; ++x) { + image.data[index] = img_float->r(y, x); + ++index; + image.data[index] = img_float->g(y, x); + ++index; + image.data[index] = img_float->b(y, x); + index += 2; + } + } + + clut_image.swap(image); } - return result; + return res; } -inline void posToXy(unsigned int pos, unsigned int width, unsigned int (&x)[2], unsigned int (&y)[2]) +inline void posToIndex(unsigned int pos, size_t (&index)[2]) { - x[0] = pos % width; - y[0] = pos / width; - x[1] = (pos + 1) % width; - y[1] = (pos + 1) / width; + index[0] = static_cast(pos) * 4; + index[1] = static_cast(pos + 1) * 4; } +#ifdef __SSE2__ +inline __m128 getClutValue(const AlignedBuffer& clut_image, size_t index) +{ + return _mm_cvtpu16_ps(*reinterpret_cast(clut_image.data + index)); +} +#endif + } void rtengine::CLUT::splitClutFilename( @@ -118,11 +139,10 @@ rtengine::HaldCLUT::~HaldCLUT() bool rtengine::HaldCLUT::load(const Glib::ustring& filename) { - clut_image = loadFile(filename, "", clut_level); - Glib::ustring name, ext; - splitClutFilename(filename, name, ext, clut_profile); + if (loadFile(filename, "", clut_image, clut_level)) { + Glib::ustring name, ext; + splitClutFilename(filename, name, ext, clut_profile); - if (clut_image) { clut_filename = filename; clut_level *= clut_level; flevel_minus_one = static_cast(clut_level - 1) / 65535.0f; @@ -135,7 +155,7 @@ bool rtengine::HaldCLUT::load(const Glib::ustring& filename) rtengine::HaldCLUT::operator bool() const { - return static_cast(clut_image); + return !clut_image.isEmpty(); } Glib::ustring rtengine::HaldCLUT::getFilename() const @@ -148,62 +168,97 @@ Glib::ustring rtengine::HaldCLUT::getProfile() const return clut_profile; } -void rtengine::HaldCLUT::getRGB(float r, float g, float b, float& out_r, float& out_g, float& out_b) const +void rtengine::HaldCLUT::getRGB(float r, float g, float b, float out_rgbx[4]) const { - const unsigned int level = clut_level; // This is important + const unsigned int level = clut_level; // This is important const unsigned int red = std::min(flevel_minus_two, r * flevel_minus_one); const unsigned int green = std::min(flevel_minus_two, g * flevel_minus_one); const unsigned int blue = std::min(flevel_minus_two, b * flevel_minus_one); + const unsigned int level_square = level * level; + + const unsigned int color = red + green * level + blue * level_square; + +#ifndef __SSE2__ r = r * flevel_minus_one - red; g = g * flevel_minus_one - green; b = b * flevel_minus_one - blue; - const unsigned int level_square = level * level; + size_t index[2]; + posToIndex(color, index); - const unsigned int color = red + green * level + blue * level_square; + float tmp1[4] ALIGNED16; + tmp1[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; + tmp1[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; + tmp1[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; - unsigned int x[2]; - unsigned int y[2]; - posToXy(color, clut_image->getWidth(), x, y); + posToIndex(color + level, index); - float tmp1[4] __attribute__((aligned(16))); - tmp1[0] = clut_image->r(y[0], x[0]) * (1 - r) + clut_image->r(y[1], x[1]) * r; - tmp1[1] = clut_image->g(y[0], x[0]) * (1 - r) + clut_image->g(y[1], x[1]) * r; - tmp1[2] = clut_image->b(y[0], x[0]) * (1 - r) + clut_image->b(y[1], x[1]) * r; + float tmp2[4] ALIGNED16; + tmp2[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; + tmp2[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; + tmp2[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; - posToXy(color + level, clut_image->getWidth(), x, y); + out_rgbx[0] = tmp1[0] * (1 - g) + tmp2[0] * g; + out_rgbx[1] = tmp1[1] * (1 - g) + tmp2[1] * g; + out_rgbx[2] = tmp1[2] * (1 - g) + tmp2[2] * g; - float tmp2[4] __attribute__((aligned(16))); - tmp2[0] = clut_image->r(y[0], x[0]) * (1 - r) + clut_image->r(y[1], x[1]) * r; - tmp2[1] = clut_image->g(y[0], x[0]) * (1 - r) + clut_image->g(y[1], x[1]) * r; - tmp2[2] = clut_image->b(y[0], x[0]) * (1 - r) + clut_image->b(y[1], x[1]) * r; + posToIndex(color + level_square, index); - float out[4] __attribute__((aligned(16))); - out[0] = tmp1[0] * (1 - g) + tmp2[0] * g; - out[1] = tmp1[1] * (1 - g) + tmp2[1] * g; - out[2] = tmp1[2] * (1 - g) + tmp2[2] * g; + tmp1[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; + tmp1[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; + tmp1[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; - posToXy(color + level_square, clut_image->getWidth(), x, y); + posToIndex(color + level + level_square, index); - tmp1[0] = clut_image->r(y[0], x[0]) * (1 - r) + clut_image->r(y[1], x[1]) * r; - tmp1[1] = clut_image->g(y[0], x[0]) * (1 - r) + clut_image->g(y[1], x[1]) * r; - tmp1[2] = clut_image->b(y[0], x[0]) * (1 - r) + clut_image->b(y[1], x[1]) * r; + tmp2[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; + tmp2[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; + tmp2[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; - posToXy(color + level + level_square, clut_image->getWidth(), x, y); + tmp1[0] = tmp1[0] * (1 - g) + tmp2[0] * g; + tmp1[1] = tmp1[1] * (1 - g) + tmp2[1] * g; + tmp1[2] = tmp1[2] * (1 - g) + tmp2[2] * g; - tmp2[0] = clut_image->r(y[0], x[0]) * (1 - r) + clut_image->r(y[1], x[1]) * r; - tmp2[1] = clut_image->g(y[0], x[0]) * (1 - r) + clut_image->g(y[1], x[1]) * r; - tmp2[2] = clut_image->b(y[0], x[0]) * (1 - r) + clut_image->b(y[1], x[1]) * r; + out_rgbx[0] = out_rgbx[0] * (1 - b) + tmp1[0] * b; + out_rgbx[1] = out_rgbx[1] * (1 - b) + tmp1[1] * b; + out_rgbx[2] = out_rgbx[2] * (1 - b) + tmp1[2] * b; +#else + const __m128 v_rgb = _mm_set_ps(0.0f, b, g, r) *_mm_load_ps1(&flevel_minus_one) - _mm_set_ps(0.0f, blue, green, red); - tmp1[0] = tmp1[0] * (1 - g) + tmp2[0] * g; - tmp1[1] = tmp1[1] * (1 - g) + tmp2[1] * g; - tmp1[2] = tmp1[2] * (1 - g) + tmp2[2] * g; + size_t index[2]; + posToIndex(color, index); - out_r = out[0] * (1 - b) + tmp1[0] * b; - out_g = out[1] * (1 - b) + tmp1[1] * b; - out_b = out[2] * (1 - b) + tmp1[2] * b; + const __m128 v_r = _mm_shuffle_ps(v_rgb, v_rgb, 0x00); + + __m128 v_cv0 = getClutValue(clut_image, index[0]); + __m128 v_tmp1 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; + + posToIndex(color + level, index); + + v_cv0 = getClutValue(clut_image, index[0]); + __m128 v_tmp2 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; + + const __m128 v_g = _mm_shuffle_ps(v_rgb, v_rgb, 0x55); + + __m128 v_out = v_g * (v_tmp2 - v_tmp1) + v_tmp1; + + posToIndex(color + level_square, index); + + v_cv0 = getClutValue(clut_image, index[0]); + v_tmp1 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; + + posToIndex(color + level + level_square, index); + + v_cv0 = getClutValue(clut_image, index[0]); + v_tmp2 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; + + v_tmp1 = v_g * (v_tmp2 - v_tmp1) + v_tmp1; + + const __m128 v_b = _mm_shuffle_ps(v_rgb, v_rgb, 0xAA); + + _mm_store_ps(out_rgbx, v_b * (v_tmp1 - v_out) + v_out); +#endif } rtengine::CLUTStore& rtengine::CLUTStore::getInstance() diff --git a/rtengine/clutstore.h b/rtengine/clutstore.h index b084c67fe..ed3491fbe 100644 --- a/rtengine/clutstore.h +++ b/rtengine/clutstore.h @@ -1,16 +1,16 @@ #pragma once #include +#include #include #include "cache.h" +#include "alignedbuffer.h" namespace rtengine { -class Image16; - class CLUT { public: @@ -24,7 +24,7 @@ public: virtual Glib::ustring getFilename() const = 0; virtual Glib::ustring getProfile() const = 0; - virtual void getRGB(float r, float g, float b, float& out_r, float& out_g, float& out_b) const = 0; + virtual void getRGB(float r, float g, float b, float out_rgbx[4]) const = 0; static void splitClutFilename( const Glib::ustring& filename, @@ -43,15 +43,15 @@ public: bool load(const Glib::ustring& filename); - explicit operator bool() const; + explicit operator bool() const override; - Glib::ustring getFilename() const; - Glib::ustring getProfile() const; + Glib::ustring getFilename() const override; + Glib::ustring getProfile() const override; - void getRGB(float r, float g, float b, float& out_r, float& out_g, float& out_b) const; + void getRGB(float r, float g, float b, float out_rgbx[4]) const override; private: - std::unique_ptr clut_image; + AlignedBuffer clut_image; unsigned int clut_level; float flevel_minus_one; float flevel_minus_two; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index d61c79513..2e15da916 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -4355,12 +4355,12 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer sourceG = CLIP( Color::gamma_srgb( sourceG ) ); sourceB = CLIP( Color::gamma_srgb( sourceB ) ); - float r, g, b; - colorLUT->getRGB( sourceR, sourceG, sourceB, r, g, b ); + float out_rgbx[4] ALIGNED16; + colorLUT->getRGB( sourceR, sourceG, sourceB, out_rgbx ); // apply strength - sourceR = r * filmSimCorrectedStrength + sourceR * filmSimSourceStrength; - sourceG = g * filmSimCorrectedStrength + sourceG * filmSimSourceStrength; - sourceB = b * filmSimCorrectedStrength + sourceB * filmSimSourceStrength; + sourceR = out_rgbx[0] * filmSimCorrectedStrength + sourceR * filmSimSourceStrength; + sourceG = out_rgbx[1] * filmSimCorrectedStrength + sourceG * filmSimSourceStrength; + sourceB = out_rgbx[2] * filmSimCorrectedStrength + sourceB * filmSimSourceStrength; // apply inverse gamma sRGB sourceR = Color::igamma_srgb( sourceR ); sourceG = Color::igamma_srgb( sourceG ); From 56f8ea086cdc95a0d177e6f83391b1ebba165344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sat, 23 Apr 2016 23:02:02 +0200 Subject: [PATCH 09/57] Correct whitespace Last commit messed up some whitespace, this one fixes it. --- rtengine/clutstore.cc | 86 +++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index add051254..9619eff0f 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -170,94 +170,94 @@ Glib::ustring rtengine::HaldCLUT::getProfile() const void rtengine::HaldCLUT::getRGB(float r, float g, float b, float out_rgbx[4]) const { - const unsigned int level = clut_level; // This is important + const unsigned int level = clut_level; // This is important const unsigned int red = std::min(flevel_minus_two, r * flevel_minus_one); const unsigned int green = std::min(flevel_minus_two, g * flevel_minus_one); const unsigned int blue = std::min(flevel_minus_two, b * flevel_minus_one); - const unsigned int level_square = level * level; + const unsigned int level_square = level * level; - const unsigned int color = red + green * level + blue * level_square; + const unsigned int color = red + green * level + blue * level_square; #ifndef __SSE2__ r = r * flevel_minus_one - red; g = g * flevel_minus_one - green; b = b * flevel_minus_one - blue; - size_t index[2]; - posToIndex(color, index); + size_t index[2]; + posToIndex(color, index); - float tmp1[4] ALIGNED16; - tmp1[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; - tmp1[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; - tmp1[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; + float tmp1[4] ALIGNED16; + tmp1[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; + tmp1[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; + tmp1[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; - posToIndex(color + level, index); + posToIndex(color + level, index); - float tmp2[4] ALIGNED16; - tmp2[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; - tmp2[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; - tmp2[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; + float tmp2[4] ALIGNED16; + tmp2[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; + tmp2[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; + tmp2[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; - out_rgbx[0] = tmp1[0] * (1 - g) + tmp2[0] * g; - out_rgbx[1] = tmp1[1] * (1 - g) + tmp2[1] * g; - out_rgbx[2] = tmp1[2] * (1 - g) + tmp2[2] * g; + out_rgbx[0] = tmp1[0] * (1 - g) + tmp2[0] * g; + out_rgbx[1] = tmp1[1] * (1 - g) + tmp2[1] * g; + out_rgbx[2] = tmp1[2] * (1 - g) + tmp2[2] * g; - posToIndex(color + level_square, index); + posToIndex(color + level_square, index); - tmp1[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; - tmp1[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; - tmp1[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; + tmp1[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; + tmp1[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; + tmp1[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; - posToIndex(color + level + level_square, index); + posToIndex(color + level + level_square, index); - tmp2[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; - tmp2[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; - tmp2[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; + tmp2[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; + tmp2[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; + tmp2[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; - tmp1[0] = tmp1[0] * (1 - g) + tmp2[0] * g; - tmp1[1] = tmp1[1] * (1 - g) + tmp2[1] * g; - tmp1[2] = tmp1[2] * (1 - g) + tmp2[2] * g; + tmp1[0] = tmp1[0] * (1 - g) + tmp2[0] * g; + tmp1[1] = tmp1[1] * (1 - g) + tmp2[1] * g; + tmp1[2] = tmp1[2] * (1 - g) + tmp2[2] * g; out_rgbx[0] = out_rgbx[0] * (1 - b) + tmp1[0] * b; out_rgbx[1] = out_rgbx[1] * (1 - b) + tmp1[1] * b; out_rgbx[2] = out_rgbx[2] * (1 - b) + tmp1[2] * b; #else - const __m128 v_rgb = _mm_set_ps(0.0f, b, g, r) *_mm_load_ps1(&flevel_minus_one) - _mm_set_ps(0.0f, blue, green, red); + const __m128 v_rgb = _mm_set_ps(0.0f, b, g, r) *_mm_load_ps1(&flevel_minus_one) - _mm_set_ps(0.0f, blue, green, red); - size_t index[2]; - posToIndex(color, index); + size_t index[2]; + posToIndex(color, index); - const __m128 v_r = _mm_shuffle_ps(v_rgb, v_rgb, 0x00); + const __m128 v_r = _mm_shuffle_ps(v_rgb, v_rgb, 0x00); __m128 v_cv0 = getClutValue(clut_image, index[0]); __m128 v_tmp1 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; - posToIndex(color + level, index); + posToIndex(color + level, index); v_cv0 = getClutValue(clut_image, index[0]); - __m128 v_tmp2 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; + __m128 v_tmp2 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; - const __m128 v_g = _mm_shuffle_ps(v_rgb, v_rgb, 0x55); + const __m128 v_g = _mm_shuffle_ps(v_rgb, v_rgb, 0x55); - __m128 v_out = v_g * (v_tmp2 - v_tmp1) + v_tmp1; + __m128 v_out = v_g * (v_tmp2 - v_tmp1) + v_tmp1; - posToIndex(color + level_square, index); + posToIndex(color + level_square, index); v_cv0 = getClutValue(clut_image, index[0]); - v_tmp1 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; + v_tmp1 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; - posToIndex(color + level + level_square, index); + posToIndex(color + level + level_square, index); v_cv0 = getClutValue(clut_image, index[0]); - v_tmp2 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; + v_tmp2 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; - v_tmp1 = v_g * (v_tmp2 - v_tmp1) + v_tmp1; + v_tmp1 = v_g * (v_tmp2 - v_tmp1) + v_tmp1; - const __m128 v_b = _mm_shuffle_ps(v_rgb, v_rgb, 0xAA); + const __m128 v_b = _mm_shuffle_ps(v_rgb, v_rgb, 0xAA); - _mm_store_ps(out_rgbx, v_b * (v_tmp1 - v_out) + v_out); + _mm_store_ps(out_rgbx, v_b * (v_tmp1 - v_out) + v_out); #endif } From 78c08e9e5c4287e7b00351732a395cbe9d2c6120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 26 Apr 2016 20:48:11 +0200 Subject: [PATCH 10/57] Add Ingo's optimizations Add Ingo's SSE optimizations and clean up the non-SSE part of `getRGB()` with `intp()`. --- rtengine/clutstore.cc | 105 +++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 57 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index 9619eff0f..692dcbcb9 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -1,11 +1,9 @@ #include -#ifdef __SSE2__ -#include -#endif - #include "clutstore.h" +#include "opthelper.h" +#include "rt_math.h" #include "imagefloat.h" #include "stdimagesource.h" #include "../rtgui/options.h" @@ -76,16 +74,14 @@ bool loadFile( return res; } -inline void posToIndex(unsigned int pos, size_t (&index)[2]) -{ - index[0] = static_cast(pos) * 4; - index[1] = static_cast(pos + 1) * 4; -} - #ifdef __SSE2__ -inline __m128 getClutValue(const AlignedBuffer& clut_image, size_t index) +inline vfloat getClutValue(const AlignedBuffer& clut_image, size_t index) { +#ifdef __SSE4_1__ + return _mm_cvtepi32_ps(_mm_cvtepu16_epi32(*reinterpret_cast(clut_image.data + index))); +#else return _mm_cvtpu16_ps(*reinterpret_cast(clut_image.data + index)); +#endif } #endif @@ -185,79 +181,74 @@ void rtengine::HaldCLUT::getRGB(float r, float g, float b, float out_rgbx[4]) co g = g * flevel_minus_one - green; b = b * flevel_minus_one - blue; - size_t index[2]; - posToIndex(color, index); + size_t index = color * 4; float tmp1[4] ALIGNED16; - tmp1[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; - tmp1[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; - tmp1[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; + tmp1[0] = intp(r, clut_image.data[index + 4], clut_image.data[index]); + tmp1[1] = intp(r, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp1[2] = intp(r, clut_image.data[index + 6], clut_image.data[index + 2]); - posToIndex(color + level, index); + index = (color + level) * 4; float tmp2[4] ALIGNED16; - tmp2[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; - tmp2[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; - tmp2[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; + tmp2[0] = intp(r, clut_image.data[index + 4], clut_image.data[index]); + tmp2[1] = intp(r, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp2[2] = intp(r, clut_image.data[index + 6], clut_image.data[index + 2]); - out_rgbx[0] = tmp1[0] * (1 - g) + tmp2[0] * g; - out_rgbx[1] = tmp1[1] * (1 - g) + tmp2[1] * g; - out_rgbx[2] = tmp1[2] * (1 - g) + tmp2[2] * g; + out_rgbx[0] = intp(g, tmp2[0], tmp1[0]); + out_rgbx[1] = intp(g, tmp2[1], tmp1[1]); + out_rgbx[2] = intp(g, tmp2[2], tmp1[2]); - posToIndex(color + level_square, index); + index = (color + level_square) * 4; - tmp1[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; - tmp1[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; - tmp1[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; + tmp1[0] = intp(r, clut_image.data[index + 4], clut_image.data[index]); + tmp1[1] = intp(r, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp1[2] = intp(r, clut_image.data[index + 6], clut_image.data[index + 2]); - posToIndex(color + level + level_square, index); + index = (color + level + level_square) * 4; - tmp2[0] = clut_image.data[index[0]] * (1 - r) + clut_image.data[index[1]] * r; - tmp2[1] = clut_image.data[index[0] + 1] * (1 - r) + clut_image.data[index[1] + 1] * r; - tmp2[2] = clut_image.data[index[0] + 2] * (1 - r) + clut_image.data[index[1] + 2] * r; + tmp2[0] = intp(r, clut_image.data[index + 4], clut_image.data[index]); + tmp2[1] = intp(r, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp2[2] = intp(r, clut_image.data[index + 6], clut_image.data[index + 2]); - tmp1[0] = tmp1[0] * (1 - g) + tmp2[0] * g; - tmp1[1] = tmp1[1] * (1 - g) + tmp2[1] * g; - tmp1[2] = tmp1[2] * (1 - g) + tmp2[2] * g; + tmp1[0] = intp(g, tmp2[0], tmp1[0]); + tmp1[1] = intp(g, tmp2[1], tmp1[1]); + tmp1[2] = intp(g, tmp2[2], tmp1[2]); - out_rgbx[0] = out_rgbx[0] * (1 - b) + tmp1[0] * b; - out_rgbx[1] = out_rgbx[1] * (1 - b) + tmp1[1] * b; - out_rgbx[2] = out_rgbx[2] * (1 - b) + tmp1[2] * b; + out_rgbx[0] = intp(b, tmp1[0], out_rgbx[0]); + out_rgbx[1] = intp(b, tmp1[1], out_rgbx[1]); + out_rgbx[2] = intp(b, tmp1[2], out_rgbx[2]); #else - const __m128 v_rgb = _mm_set_ps(0.0f, b, g, r) *_mm_load_ps1(&flevel_minus_one) - _mm_set_ps(0.0f, blue, green, red); + const vfloat v_tmp = _mm_set_ps(0.0f, b, g, r) * _mm_load_ps1(&flevel_minus_one); + const vfloat v_rgb = v_tmp - _mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_min_ps(_mm_load_ps1(&flevel_minus_two), v_tmp))); - size_t index[2]; - posToIndex(color, index); + size_t index = color * 4; - const __m128 v_r = _mm_shuffle_ps(v_rgb, v_rgb, 0x00); + const vfloat v_r = PERMUTEPS(v_rgb, 0x00); - __m128 v_cv0 = getClutValue(clut_image, index[0]); - __m128 v_tmp1 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; + vfloat v_tmp1 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); - posToIndex(color + level, index); + index = (color + level) * 4; - v_cv0 = getClutValue(clut_image, index[0]); - __m128 v_tmp2 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; + vfloat v_tmp2 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); - const __m128 v_g = _mm_shuffle_ps(v_rgb, v_rgb, 0x55); + const vfloat v_g = PERMUTEPS(v_rgb, 0x55); - __m128 v_out = v_g * (v_tmp2 - v_tmp1) + v_tmp1; + vfloat v_out = vintpf(v_g, v_tmp2, v_tmp1); - posToIndex(color + level_square, index); + index = (color + level_square) * 4; - v_cv0 = getClutValue(clut_image, index[0]); - v_tmp1 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; + v_tmp1 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); - posToIndex(color + level + level_square, index); + index = (color + level + level_square) * 4; - v_cv0 = getClutValue(clut_image, index[0]); - v_tmp2 = v_r * (getClutValue(clut_image, index[1]) - v_cv0) + v_cv0; + v_tmp2 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); - v_tmp1 = v_g * (v_tmp2 - v_tmp1) + v_tmp1; + v_tmp1 = vintpf(v_g, v_tmp2, v_tmp1); - const __m128 v_b = _mm_shuffle_ps(v_rgb, v_rgb, 0xAA); + const vfloat v_b = PERMUTEPS(v_rgb, 0xAA); - _mm_store_ps(out_rgbx, v_b * (v_tmp1 - v_out) + v_out); + _mm_store_ps(out_rgbx, vintpf(v_b, v_tmp1, v_out)); #endif } From bf499055e182563f36e26ac3b309a8ee260e1b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 26 Apr 2016 21:57:58 +0200 Subject: [PATCH 11/57] Apply `HaldCLUT::getRGB()` per tile line `getRGB()` now takes a whole tile line instead of a single pixel. --- rtengine/clutstore.cc | 106 +++++++++++++++++++++--------------------- rtengine/clutstore.h | 4 +- rtengine/improcfun.cc | 26 ++++++++--- 3 files changed, 75 insertions(+), 61 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index 692dcbcb9..c9d4645a2 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -164,92 +164,94 @@ Glib::ustring rtengine::HaldCLUT::getProfile() const return clut_profile; } -void rtengine::HaldCLUT::getRGB(float r, float g, float b, float out_rgbx[4]) const +void rtengine::HaldCLUT::getRGB(std::size_t line_size, const float* r, const float* g, const float* b, float* out_rgbx) const { const unsigned int level = clut_level; // This is important - const unsigned int red = std::min(flevel_minus_two, r * flevel_minus_one); - const unsigned int green = std::min(flevel_minus_two, g * flevel_minus_one); - const unsigned int blue = std::min(flevel_minus_two, b * flevel_minus_one); - const unsigned int level_square = level * level; - const unsigned int color = red + green * level + blue * level_square; + for (std::size_t column = 0; column < line_size; ++column, ++r, ++g, ++b, out_rgbx += 4) { + const unsigned int red = std::min(flevel_minus_two, *r * flevel_minus_one); + const unsigned int green = std::min(flevel_minus_two, *g * flevel_minus_one); + const unsigned int blue = std::min(flevel_minus_two, *b * flevel_minus_one); + + const unsigned int color = red + green * level + blue * level_square; #ifndef __SSE2__ - r = r * flevel_minus_one - red; - g = g * flevel_minus_one - green; - b = b * flevel_minus_one - blue; + const float re = *r * flevel_minus_one - red; + const float gr = *g * flevel_minus_one - green; + const float bl = *b * flevel_minus_one - blue; - size_t index = color * 4; + size_t index = color * 4; - float tmp1[4] ALIGNED16; - tmp1[0] = intp(r, clut_image.data[index + 4], clut_image.data[index]); - tmp1[1] = intp(r, clut_image.data[index + 5], clut_image.data[index + 1]); - tmp1[2] = intp(r, clut_image.data[index + 6], clut_image.data[index + 2]); + float tmp1[4] ALIGNED16; + tmp1[0] = intp(re, clut_image.data[index + 4], clut_image.data[index]); + tmp1[1] = intp(re, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp1[2] = intp(re, clut_image.data[index + 6], clut_image.data[index + 2]); - index = (color + level) * 4; + index = (color + level) * 4; - float tmp2[4] ALIGNED16; - tmp2[0] = intp(r, clut_image.data[index + 4], clut_image.data[index]); - tmp2[1] = intp(r, clut_image.data[index + 5], clut_image.data[index + 1]); - tmp2[2] = intp(r, clut_image.data[index + 6], clut_image.data[index + 2]); + float tmp2[4] ALIGNED16; + tmp2[0] = intp(re, clut_image.data[index + 4], clut_image.data[index]); + tmp2[1] = intp(re, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp2[2] = intp(re, clut_image.data[index + 6], clut_image.data[index + 2]); - out_rgbx[0] = intp(g, tmp2[0], tmp1[0]); - out_rgbx[1] = intp(g, tmp2[1], tmp1[1]); - out_rgbx[2] = intp(g, tmp2[2], tmp1[2]); + out_rgbx[0] = intp(gr, tmp2[0], tmp1[0]); + out_rgbx[1] = intp(gr, tmp2[1], tmp1[1]); + out_rgbx[2] = intp(gr, tmp2[2], tmp1[2]); - index = (color + level_square) * 4; + index = (color + level_square) * 4; - tmp1[0] = intp(r, clut_image.data[index + 4], clut_image.data[index]); - tmp1[1] = intp(r, clut_image.data[index + 5], clut_image.data[index + 1]); - tmp1[2] = intp(r, clut_image.data[index + 6], clut_image.data[index + 2]); + tmp1[0] = intp(re, clut_image.data[index + 4], clut_image.data[index]); + tmp1[1] = intp(re, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp1[2] = intp(re, clut_image.data[index + 6], clut_image.data[index + 2]); - index = (color + level + level_square) * 4; + index = (color + level + level_square) * 4; - tmp2[0] = intp(r, clut_image.data[index + 4], clut_image.data[index]); - tmp2[1] = intp(r, clut_image.data[index + 5], clut_image.data[index + 1]); - tmp2[2] = intp(r, clut_image.data[index + 6], clut_image.data[index + 2]); + tmp2[0] = intp(re, clut_image.data[index + 4], clut_image.data[index]); + tmp2[1] = intp(re, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp2[2] = intp(re, clut_image.data[index + 6], clut_image.data[index + 2]); - tmp1[0] = intp(g, tmp2[0], tmp1[0]); - tmp1[1] = intp(g, tmp2[1], tmp1[1]); - tmp1[2] = intp(g, tmp2[2], tmp1[2]); + tmp1[0] = intp(gr, tmp2[0], tmp1[0]); + tmp1[1] = intp(gr, tmp2[1], tmp1[1]); + tmp1[2] = intp(gr, tmp2[2], tmp1[2]); - out_rgbx[0] = intp(b, tmp1[0], out_rgbx[0]); - out_rgbx[1] = intp(b, tmp1[1], out_rgbx[1]); - out_rgbx[2] = intp(b, tmp1[2], out_rgbx[2]); + out_rgbx[0] = intp(bl, tmp1[0], out_rgbx[0]); + out_rgbx[1] = intp(bl, tmp1[1], out_rgbx[1]); + out_rgbx[2] = intp(bl, tmp1[2], out_rgbx[2]); #else - const vfloat v_tmp = _mm_set_ps(0.0f, b, g, r) * _mm_load_ps1(&flevel_minus_one); - const vfloat v_rgb = v_tmp - _mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_min_ps(_mm_load_ps1(&flevel_minus_two), v_tmp))); + const vfloat v_tmp = _mm_set_ps(0.0f, *b, *g, *r) * _mm_load_ps1(&flevel_minus_one); + const vfloat v_rgb = v_tmp - _mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_min_ps(_mm_load_ps1(&flevel_minus_two), v_tmp))); - size_t index = color * 4; + size_t index = color * 4; - const vfloat v_r = PERMUTEPS(v_rgb, 0x00); + const vfloat v_r = PERMUTEPS(v_rgb, 0x00); - vfloat v_tmp1 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); + vfloat v_tmp1 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); - index = (color + level) * 4; + index = (color + level) * 4; - vfloat v_tmp2 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); + vfloat v_tmp2 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); - const vfloat v_g = PERMUTEPS(v_rgb, 0x55); + const vfloat v_g = PERMUTEPS(v_rgb, 0x55); - vfloat v_out = vintpf(v_g, v_tmp2, v_tmp1); + vfloat v_out = vintpf(v_g, v_tmp2, v_tmp1); - index = (color + level_square) * 4; + index = (color + level_square) * 4; - v_tmp1 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); + v_tmp1 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); - index = (color + level + level_square) * 4; + index = (color + level + level_square) * 4; - v_tmp2 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); + v_tmp2 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); - v_tmp1 = vintpf(v_g, v_tmp2, v_tmp1); + v_tmp1 = vintpf(v_g, v_tmp2, v_tmp1); - const vfloat v_b = PERMUTEPS(v_rgb, 0xAA); + const vfloat v_b = PERMUTEPS(v_rgb, 0xAA); - _mm_store_ps(out_rgbx, vintpf(v_b, v_tmp1, v_out)); + _mm_store_ps(out_rgbx, vintpf(v_b, v_tmp1, v_out)); #endif + } } rtengine::CLUTStore& rtengine::CLUTStore::getInstance() diff --git a/rtengine/clutstore.h b/rtengine/clutstore.h index ed3491fbe..6203e4e61 100644 --- a/rtengine/clutstore.h +++ b/rtengine/clutstore.h @@ -24,7 +24,7 @@ public: virtual Glib::ustring getFilename() const = 0; virtual Glib::ustring getProfile() const = 0; - virtual void getRGB(float r, float g, float b, float out_rgbx[4]) const = 0; + virtual void getRGB(std::size_t line_size, const float* r, const float* g, const float* b, float* out_rgbx) const = 0; static void splitClutFilename( const Glib::ustring& filename, @@ -48,7 +48,7 @@ public: Glib::ustring getFilename() const override; Glib::ustring getProfile() const override; - void getRGB(float r, float g, float b, float out_rgbx[4]) const override; + void getRGB(std::size_t line_size, const float* r, const float* g, const float* b, float* out_rgbx) const override; private: AlignedBuffer clut_image; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 2e15da916..d274806bb 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -16,6 +16,7 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ +#include #include #include #include @@ -3224,8 +3225,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } } - double filmSimCorrectedStrength = double(params->filmSimulation.strength) / 100.; - double filmSimSourceStrength = double(100 - params->filmSimulation.strength) / 100.; + float filmSimCorrectedStrength = static_cast(params->filmSimulation.strength) / 100.0f; + float filmSimSourceStrength = 1.0f - filmSimCorrectedStrength; const float exp_scale = pow (2.0, expcomp); const float comp = (max(0.0, expcomp) + 1.0) * hlcompr / 100.0; @@ -4354,13 +4355,24 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer sourceR = CLIP( Color::gamma_srgb( sourceR ) ); sourceG = CLIP( Color::gamma_srgb( sourceG ) ); sourceB = CLIP( Color::gamma_srgb( sourceB ) ); + } + + const std::size_t line_size = std::min(TS, tW - jstart); + std::size_t out_rgbx_size = 4 * (line_size + 16); + std::unique_ptr out_rgbx_buf(new float[out_rgbx_size]); + void* out_rgbx_ptr = out_rgbx_buf.get(); + float* const out_rgbx = reinterpret_cast(std::align(16, 4 * line_size, out_rgbx_ptr, out_rgbx_size)); + colorLUT->getRGB(line_size, rtemp + ti * TS, gtemp + ti * TS, btemp + ti * TS, out_rgbx); + + for (int j = jstart, tj = 0; j < tW; j++, tj++) { + float &sourceR = rtemp[ti * TS + tj]; + float &sourceG = gtemp[ti * TS + tj]; + float &sourceB = btemp[ti * TS + tj]; - float out_rgbx[4] ALIGNED16; - colorLUT->getRGB( sourceR, sourceG, sourceB, out_rgbx ); // apply strength - sourceR = out_rgbx[0] * filmSimCorrectedStrength + sourceR * filmSimSourceStrength; - sourceG = out_rgbx[1] * filmSimCorrectedStrength + sourceG * filmSimSourceStrength; - sourceB = out_rgbx[2] * filmSimCorrectedStrength + sourceB * filmSimSourceStrength; + sourceR = out_rgbx[tj * 4 + 0] * filmSimCorrectedStrength + sourceR * filmSimSourceStrength; + sourceG = out_rgbx[tj * 4 + 1] * filmSimCorrectedStrength + sourceG * filmSimSourceStrength; + sourceB = out_rgbx[tj * 4 + 2] * filmSimCorrectedStrength + sourceB * filmSimSourceStrength; // apply inverse gamma sRGB sourceR = Color::igamma_srgb( sourceR ); sourceG = Color::igamma_srgb( sourceG ); From 9dee6dddf1a114f32fccead94e851205ba110077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 26 Apr 2016 22:16:23 +0200 Subject: [PATCH 12/57] Hoist `out_rgbx` allocation out of the loops --- rtengine/improcfun.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index d274806bb..2fd2bfb17 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -4338,6 +4338,11 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer //Film Simulations if ( colorLUT ) { + std::size_t out_rgbx_size = 4 * (TS + 16); + std::unique_ptr out_rgbx_buf(new float[out_rgbx_size]); + void* out_rgbx_ptr = out_rgbx_buf.get(); + float* const out_rgbx = reinterpret_cast(std::align(16, 4 * TS, out_rgbx_ptr, out_rgbx_size)); + for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { float &sourceR = rtemp[ti * TS + tj]; @@ -4357,12 +4362,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer sourceB = CLIP( Color::gamma_srgb( sourceB ) ); } - const std::size_t line_size = std::min(TS, tW - jstart); - std::size_t out_rgbx_size = 4 * (line_size + 16); - std::unique_ptr out_rgbx_buf(new float[out_rgbx_size]); - void* out_rgbx_ptr = out_rgbx_buf.get(); - float* const out_rgbx = reinterpret_cast(std::align(16, 4 * line_size, out_rgbx_ptr, out_rgbx_size)); - colorLUT->getRGB(line_size, rtemp + ti * TS, gtemp + ti * TS, btemp + ti * TS, out_rgbx); + colorLUT->getRGB(std::min(TS, tW - jstart), rtemp + ti * TS, gtemp + ti * TS, btemp + ti * TS, out_rgbx); for (int j = jstart, tj = 0; j < tW; j++, tj++) { float &sourceR = rtemp[ti * TS + tj]; From b97ed08987f7b1bec966db9e37ebd79637a9e2f0 Mon Sep 17 00:00:00 2001 From: Desmis Date: Fri, 29 Apr 2016 07:41:17 +0200 Subject: [PATCH 13/57] Add working profile Rec2020 --- rtengine/iccmatrices.h | 10 + rtengine/iccstore.cc | 52 ++-- rtengine/iplab2rgb.cc | 10 +- rtengine/settings.h | 1 + rtengine/simpleprocess.cc | 12 +- rtgui/options.cc | 564 +++++++++++++++++++------------------- 6 files changed, 349 insertions(+), 300 deletions(-) diff --git a/rtengine/iccmatrices.h b/rtengine/iccmatrices.h index 9e9682a73..62ac7f150 100644 --- a/rtengine/iccmatrices.h +++ b/rtengine/iccmatrices.h @@ -84,6 +84,16 @@ const double prophoto_xyz[3][3] = {{1.3459433, -0.2556075, -0.0511118}, {0.0000000, 0.0000000, 1.2118128} }; +const double xyz_rec2020[3][3] = {{0.636958, 0.144617, 0.168881}, + {0.262700, 0.677998, 0.059302}, + {0.0000000, 0.028073, 1.060985} +}; + +const double rec2020_xyz[3][3] = {{1.716651, -0.355671, -0.253366}, + { -0.666684, 1.616481, 0.015769}, + {0.017640, -0.042771, 0.942103} +}; + const double xyz_widegamut[3][3] = {{0.7161046, 0.1009296, 0.1471858}, {0.2581874, 0.7249378, 0.0168748}, {0.0000000, 0.0517813, 0.7734287} diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index cb5314489..66099199c 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -41,8 +41,9 @@ void loadProfiles (const Glib::ustring& dirName, std::map* profileNames, bool nameUpper, bool onlyRgb) { - if (dirName.empty ()) + if (dirName.empty ()) { return; + } try { @@ -52,23 +53,27 @@ void loadProfiles (const Glib::ustring& dirName, const Glib::ustring fileName = *entry; - if (fileName.size () < 4) + if (fileName.size () < 4) { continue; + } const Glib::ustring extension = fileName.substr (fileName.size () - 4).casefold (); - if (extension.compare (".icc") != 0 && extension.compare (".icm") != 0) + if (extension.compare (".icc") != 0 && extension.compare (".icm") != 0) { continue; + } const Glib::ustring filePath = Glib::build_filename (dirName, fileName); - if (!Glib::file_test (filePath, Glib::FILE_TEST_IS_REGULAR)) + if (!Glib::file_test (filePath, Glib::FILE_TEST_IS_REGULAR)) { continue; + } Glib::ustring name = fileName.substr (0, fileName.size() - 4); - if (nameUpper) + if (nameUpper) { name = name.uppercase (); + } if (profiles) { const rtengine::ProfileContent content (filePath); @@ -77,28 +82,31 @@ void loadProfiles (const Glib::ustring& dirName, if (profile && (!onlyRgb || cmsGetColorSpace (profile) == cmsSigRgbData)) { profiles->insert (std::make_pair (name, profile)); - if (profileContents) + if (profileContents) { profileContents->insert (std::make_pair (name, content)); + } } } - if (profileNames) + if (profileNames) { profileNames->insert (std::make_pair (name, filePath)); + } } - } - catch (Glib::Exception&) {} + } catch (Glib::Exception&) {} } inline void getSupportedIntent (cmsHPROFILE profile, cmsUInt32Number intent, cmsUInt32Number direction, std::uint8_t& result) { - if (cmsIsIntentSupported (profile, intent, direction)) + if (cmsIsIntentSupported (profile, intent, direction)) { result |= 1 << intent; + } } inline std::uint8_t getSupportedIntents (cmsHPROFILE profile, cmsUInt32Number direction) { - if (!profile) + if (!profile) { return 0; + } std::uint8_t result = 0; @@ -116,9 +124,9 @@ inline cmsHPROFILE createXYZProfile () return rtengine::ICCStore::createFromMatrix (mat, false, "XYZ"); } -const double (*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best}; -const double (*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, bruce_xyz, beta_xyz, best_xyz}; -const char* wpnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "BruceRGB", "Beta RGB", "BestRGB"}; +const double (*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best, xyz_rec2020}; +const double (*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, bruce_xyz, beta_xyz, best_xyz, rec2020_xyz}; +const char* wpnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "BruceRGB", "Beta RGB", "BestRGB", "Rec2020"}; const char* wpgamma[] = {"default", "BT709_g2.2_s4.5", "sRGB_g2.4_s12.92", "linear_g1.0", "standard_g2.2", "standard_g1.8", "High_g1.3_s3.35", "Low_g2.6_s6.9"}; //gamma free //default = gamma inside profile //BT709 g=2.22 s=4.5 sRGB g=2.4 s=12.92 @@ -163,8 +171,9 @@ std::vector ICCStore::getProfiles () const std::vector res; - for (ProfileMap::const_iterator profile = fileProfiles.begin (); profile != fileProfiles.end (); ++profile) + for (ProfileMap::const_iterator profile = fileProfiles.begin (); profile != fileProfiles.end (); ++profile) { res.push_back (profile->first); + } return res; } @@ -181,8 +190,9 @@ std::vector ICCStore::getProfilesFromDir (const Glib::ustring& di loadProfiles (profilesDir, &profiles, NULL, NULL, false, true); loadProfiles (dirName, &profiles, NULL, NULL, false, true); - for (ProfileMap::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) + for (ProfileMap::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) { res.push_back (profile->first); + } return res; } @@ -388,22 +398,25 @@ cmsHPROFILE ICCStore::getStdProfile (const Glib::ustring& name) const const ProfileMap::const_iterator r = fileStdProfiles.find (nameUpper); // return profile from store - if (r != fileStdProfiles.end ()) + if (r != fileStdProfiles.end ()) { return r->second; + } // profile is not yet in store const NameMap::const_iterator f = fileStdProfilesFileNames.find (nameUpper); // profile does not exist - if (f == fileStdProfilesFileNames.end ()) + if (f == fileStdProfilesFileNames.end ()) { return NULL; + } // but there exists one => load it const ProfileContent content (f->second); const cmsHPROFILE profile = content.toProfile (); - if (profile) + if (profile) { const_cast(fileStdProfiles).insert (std::make_pair (f->first, profile)); + } // profile is not valid or it is now stored => remove entry from fileStdProfilesFileNames const_cast(fileStdProfilesFileNames).erase (f); @@ -481,6 +494,7 @@ void ICCStore::findDefaultMonitorProfile () defaultMonitorProfile = Glib::ustring(profileName); defaultMonitorProfile = Glib::path_get_basename(defaultMonitorProfile); size_t pos = defaultMonitorProfile.rfind("."); + if (pos != Glib::ustring::npos) { defaultMonitorProfile = defaultMonitorProfile.substr(0, pos); } diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 4510044aa..21e5ca794 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -429,6 +429,14 @@ Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int p5 = 0.1300; p6 = 0.0350; select_temp = 1; + } else if (profi == "Rec2020") { + p1 = 0.7080; // Rec2020 primaries + p2 = 0.2920; + p3 = 0.1700; + p4 = 0.7970; + p5 = 0.1310; + p6 = 0.0460; + select_temp = 2; } else { p1 = 0.7347; //ProPhoto and default primaries p2 = 0.2653; @@ -511,7 +519,7 @@ Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int if(select_temp == 1) { t50 = 5003; // for Widegamut, Prophoto Best, Beta D50 } else if (select_temp == 2) { - t50 = 6504; // for sRGB, AdobeRGB, Bruce D65 + t50 = 6504; // for sRGB, AdobeRGB, Bruce Rec2020 D65 } cmsCIExyY xyD; diff --git a/rtengine/settings.h b/rtengine/settings.h index 3e9c9d38a..4053a547f 100644 --- a/rtengine/settings.h +++ b/rtengine/settings.h @@ -56,6 +56,7 @@ public: Glib::ustring bruce; // default name of Bruce Glib::ustring srgb; // default name of SRGB space profile Glib::ustring srgb10; // default name of SRGB space profile + Glib::ustring rec2020; // default name of rec2020 bool gamutICC; // no longer used bool gamutLch; diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index c03addb42..daa0a45e8 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -293,6 +293,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p adjustr = 1.f / 1.3f; } else if (params.icm.working == "WideGamut") { adjustr = 1.f / 1.1f; + } else if (params.icm.working == "Rec2020") { + adjustr = 1.f / 1.1f; } else if (params.icm.working == "Beta RGB") { adjustr = 1.f / 1.2f; } else if (params.icm.working == "BestRGB") { @@ -532,6 +534,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p adjustr = 1.f / 1.3f; } else if (params.icm.working == "WideGamut") { adjustr = 1.f / 1.1f; + } else if (params.icm.working == "Rec2020") { + adjustr = 1.f / 1.1f; } else if (params.icm.working == "Beta RGB") { adjustr = 1.f / 1.2f; } else if (params.icm.working == "BestRGB") { @@ -1177,11 +1181,11 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p useLCMS = false; bool pro = false; Glib::ustring chpro, outProfile; - bool present_space[9] = {false, false, false, false, false, false, false, false, false}; + bool present_space[10] = {false, false, false, false, false, false, false, false, false, false}; std::vector opnames = iccStore->getProfiles (); //test if files are in system - for (int j = 0; j < 9; j++) { + for (int j = 0; j < 10; j++) { // one can modify "option" [Color Management] to adapt the profile's name if they are different for windows, MacOS, Linux ?? // some of them are actually provided by RT, thanks to Jacques Desmis if (j == 0) { @@ -1202,6 +1206,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p chpro = options.rtSettings.srgb10; //gamma 1.0 } else if(j == 8) { chpro = options.rtSettings.prophoto10; //gamma 1.0 + } else if(j == 9) { + chpro = options.rtSettings.rec2020; } for (unsigned int i = 0; i < opnames.size(); i++) { @@ -1241,6 +1247,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p outProfile = options.rtSettings.srgb10; } else if (params.icm.working == "ProPhoto" && present_space[8] && pro) { outProfile = options.rtSettings.prophoto10; + } else if (params.icm.working == "Rec2020" && present_space[9]) { + outProfile = options.rtSettings.rec2020; } else { // Should not occurs if (settings->verbose) { diff --git a/rtgui/options.cc b/rtgui/options.cc index 88b795687..e723361be 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -644,6 +644,7 @@ void Options::setDefaults () rtSettings.bruce = "Bruce"; rtSettings.beta = "BetaRGB"; rtSettings.best = "BestRGB"; + rtSettings.rec2020 = "Rec2020"; rtSettings.verbose = false; rtSettings.gamutICC = true; rtSettings.gamutLch = true; @@ -1542,6 +1543,10 @@ int Options::readFromFile (Glib::ustring fname) rtSettings.best = keyFile.get_string("Color Management", "Best"); } + if( keyFile.has_key ("Color Management", "Rec2020")) { + rtSettings.rec2020 = keyFile.get_string("Color Management", "Rec2020"); + } + if( keyFile.has_key ("Color Management", "Bruce")) { rtSettings.bruce = keyFile.get_string("Color Management", "Bruce"); } @@ -1776,11 +1781,13 @@ int Options::readFromFile (Glib::ustring fname) if (options.rtSettings.verbose) { printf("Options::readFromFile / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); } + setDefaults (); } catch (...) { if (options.rtSettings.verbose) { printf("Options::readFromFile / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); } + setDefaults (); } @@ -1810,309 +1817,310 @@ int Options::saveToFile (Glib::ustring fname) try { - Glib::KeyFile keyFile; + Glib::KeyFile keyFile; - keyFile.set_boolean ("General", "TabbedEditor", tabbedUI); - keyFile.set_boolean ("General", "StoreLastProfile", savesParamsAtExit); + keyFile.set_boolean ("General", "TabbedEditor", tabbedUI); + keyFile.set_boolean ("General", "StoreLastProfile", savesParamsAtExit); - if (startupDir == STARTUPDIR_HOME) { - keyFile.set_string ("General", "StartupDirectory", "home"); - } else if (startupDir == STARTUPDIR_CURRENT) { - keyFile.set_string ("General", "StartupDirectory", "current"); - } else if (startupDir == STARTUPDIR_CUSTOM) { - keyFile.set_string ("General", "StartupDirectory", "custom"); - } else if (startupDir == STARTUPDIR_LAST) { - keyFile.set_string ("General", "StartupDirectory", "last"); - } - - keyFile.set_string ("General", "StartupPath", startupPath); - keyFile.set_string ("General", "DateFormat", dateFormat); - keyFile.set_integer ("General", "AdjusterMinDelay", adjusterMinDelay); - keyFile.set_integer ("General", "AdjusterMaxDelay", adjusterMaxDelay); - keyFile.set_boolean ("General", "MultiUser", multiUser); - keyFile.set_string ("General", "Language", language); - keyFile.set_boolean ("General", "LanguageAutoDetect", languageAutoDetect); - keyFile.set_string ("General", "Theme", theme); - keyFile.set_boolean ("General", "SlimUI", slimUI); - keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme); - keyFile.set_string ("General", "Version", VERSION); - keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath); - keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath); - keyFile.set_boolean ("General", "Verbose", rtSettings.verbose); - keyFile.set_double ("General", "BotLeft", rtSettings.bot_left); - keyFile.set_double ("General", "TopLeft", rtSettings.top_left); - keyFile.set_double ("General", "TopRight", rtSettings.top_right); - keyFile.set_double ("General", "BotRight", rtSettings.bot_right); - keyFile.set_double ("General", "EDdetec", rtSettings.ed_detec); - keyFile.set_double ("General", "EDdetecStr", rtSettings.ed_detecStr); - keyFile.set_double ("General", "EDLow", rtSettings.ed_low); - keyFile.set_double ("General", "EDLipinfl", rtSettings.ed_lipinfl); - keyFile.set_double ("General", "EDLipampl", rtSettings.ed_lipampl); - - - keyFile.set_integer ("External Editor", "EditorKind", editorToSendTo); - keyFile.set_string ("External Editor", "GimpDir", gimpDir); - keyFile.set_string ("External Editor", "PhotoshopDir", psDir); - keyFile.set_string ("External Editor", "CustomEditor", customEditorProg); - - keyFile.set_boolean ("File Browser", "BrowseOnlyRaw", fbOnlyRaw); - keyFile.set_boolean ("File Browser", "BrowserShowsDate", fbShowDateTime); - keyFile.set_boolean ("File Browser", "BrowserShowsExif", fbShowBasicExif); - keyFile.set_boolean ("File Browser", "BrowserShowsExpComp", fbShowExpComp); - keyFile.set_boolean ("File Browser", "BrowserShowsHidden", fbShowHidden); - keyFile.set_integer ("File Browser", "ThumbnailSize", thumbSize); - keyFile.set_integer ("File Browser", "ThumbnailSizeTab", thumbSizeTab); - keyFile.set_integer ("File Browser", "ThumbnailSizeQueue", thumbSizeQueue); - keyFile.set_integer ("File Browser", "SameThumbSize", sameThumbSize); - keyFile.set_integer ("File Browser", "MaxPreviewHeight", maxThumbnailHeight); - keyFile.set_integer ("File Browser", "MaxCacheEntries", maxCacheEntries); - Glib::ArrayHandle pext = parseExtensions; - keyFile.set_string_list ("File Browser", "ParseExtensions", pext); - Glib::ArrayHandle pextena = parseExtensionsEnabled; - keyFile.set_integer_list ("File Browser", "ParseExtensionsEnabled", pextena); - keyFile.set_integer ("File Browser", "ThumbnailArrangement", fbArrangement); - keyFile.set_integer ("File Browser", "ThumbnailInterpolation", thumbInterp); - keyFile.set_boolean ("File Browser", "LiveThumbnails", liveThumbnails); - Glib::ArrayHandle pfav = favoriteDirs; - keyFile.set_string_list ("File Browser", "FavoriteDirs", pfav); - Glib::ArrayHandle pren = renameTemplates; - keyFile.set_string_list ("File Browser", "RenameTemplates", pren); - keyFile.set_boolean ("File Browser", "RenameUseTemplates", renameUseTemplates); - Glib::ArrayHandle ptzoom = thumbnailZoomRatios; - keyFile.set_double_list ("File Browser", "ThumbnailZoomRatios", ptzoom); - keyFile.set_boolean ("File Browser", "OverlayedFileNames", overlayedFileNames); - keyFile.set_boolean ("File Browser", "FilmStripOverlayedFileNames", filmStripOverlayedFileNames); - keyFile.set_boolean ("File Browser", "ShowFileNames", showFileNames ); - keyFile.set_boolean ("File Browser", "FilmStripShowFileNames", filmStripShowFileNames ); - keyFile.set_boolean ("File Browser", "InternalThumbIfUntouched", internalThumbIfUntouched ); - keyFile.set_boolean ("File Browser", "menuGroupRank", menuGroupRank); - keyFile.set_boolean ("File Browser", "menuGroupLabel", menuGroupLabel); - keyFile.set_boolean ("File Browser", "menuGroupFileOperations", menuGroupFileOperations); - keyFile.set_boolean ("File Browser", "menuGroupProfileOperations", menuGroupProfileOperations); - keyFile.set_boolean ("File Browser", "menuGroupExtProg", menuGroupExtProg); - keyFile.set_integer ("File Browser", "MaxRecentFolders", maxRecentFolders); - { - std::vector temp; - temp.reserve(maxRecentFolders); - - for(unsigned int i = 0; i < std::min(recentFolders.size(), maxRecentFolders); i++) { - temp.push_back(recentFolders[i]); + if (startupDir == STARTUPDIR_HOME) { + keyFile.set_string ("General", "StartupDirectory", "home"); + } else if (startupDir == STARTUPDIR_CURRENT) { + keyFile.set_string ("General", "StartupDirectory", "current"); + } else if (startupDir == STARTUPDIR_CUSTOM) { + keyFile.set_string ("General", "StartupDirectory", "custom"); + } else if (startupDir == STARTUPDIR_LAST) { + keyFile.set_string ("General", "StartupDirectory", "last"); } - keyFile.set_string_list ("File Browser", "RecentFolders", temp); - } - keyFile.set_integer ("Clipping Indication", "HighlightThreshold", highlightThreshold); - keyFile.set_integer ("Clipping Indication", "ShadowThreshold", shadowThreshold); - keyFile.set_boolean ("Clipping Indication", "BlinkClipped", blinkClipped); + keyFile.set_string ("General", "StartupPath", startupPath); + keyFile.set_string ("General", "DateFormat", dateFormat); + keyFile.set_integer ("General", "AdjusterMinDelay", adjusterMinDelay); + keyFile.set_integer ("General", "AdjusterMaxDelay", adjusterMaxDelay); + keyFile.set_boolean ("General", "MultiUser", multiUser); + keyFile.set_string ("General", "Language", language); + keyFile.set_boolean ("General", "LanguageAutoDetect", languageAutoDetect); + keyFile.set_string ("General", "Theme", theme); + keyFile.set_boolean ("General", "SlimUI", slimUI); + keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme); + keyFile.set_string ("General", "Version", VERSION); + keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath); + keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath); + keyFile.set_boolean ("General", "Verbose", rtSettings.verbose); + keyFile.set_double ("General", "BotLeft", rtSettings.bot_left); + keyFile.set_double ("General", "TopLeft", rtSettings.top_left); + keyFile.set_double ("General", "TopRight", rtSettings.top_right); + keyFile.set_double ("General", "BotRight", rtSettings.bot_right); + keyFile.set_double ("General", "EDdetec", rtSettings.ed_detec); + keyFile.set_double ("General", "EDdetecStr", rtSettings.ed_detecStr); + keyFile.set_double ("General", "EDLow", rtSettings.ed_low); + keyFile.set_double ("General", "EDLipinfl", rtSettings.ed_lipinfl); + keyFile.set_double ("General", "EDLipampl", rtSettings.ed_lipampl); - keyFile.set_integer ("Performance", "RgbDenoiseThreadLimit", rgbDenoiseThreadLimit); - keyFile.set_double ("Performance", "NRauto", rtSettings.nrauto); - keyFile.set_double ("Performance", "NRautomax", rtSettings.nrautomax); - keyFile.set_double ("Performance", "NRhigh", rtSettings.nrhigh); - keyFile.set_integer ("Performance", "NRWavlevel", rtSettings.nrwavlevel); - keyFile.set_integer ("Performance", "LevNR", rtSettings.leveldnv); - keyFile.set_integer ("Performance", "LevNRTI", rtSettings.leveldnti); - keyFile.set_integer ("Performance", "LevNRAUT", rtSettings.leveldnaut); - keyFile.set_integer ("Performance", "LevNRLISS", rtSettings.leveldnliss); - keyFile.set_integer ("Performance", "SIMPLNRAUT", rtSettings.leveldnautsimpl); - keyFile.set_integer ("Performance", "ClutCacheSize", clutCacheSize); - keyFile.set_integer ("Performance", "MaxInspectorBuffers", maxInspectorBuffers); - keyFile.set_integer ("Performance", "PreviewDemosaicFromSidecar", prevdemo); - keyFile.set_boolean ("Performance", "Daubechies", rtSettings.daubech); - keyFile.set_boolean ("Performance", "SerializeTiffRead", serializeTiffRead); - keyFile.set_string ("Output", "Format", saveFormat.format); - keyFile.set_integer ("Output", "JpegQuality", saveFormat.jpegQuality); - keyFile.set_integer ("Output", "JpegSubSamp", saveFormat.jpegSubSamp); - keyFile.set_integer ("Output", "PngCompression", saveFormat.pngCompression); - keyFile.set_integer ("Output", "PngBps", saveFormat.pngBits); - keyFile.set_integer ("Output", "TiffBps", saveFormat.tiffBits); - keyFile.set_boolean ("Output", "TiffUncompressed", saveFormat.tiffUncompressed); - keyFile.set_boolean ("Output", "SaveProcParams", saveFormat.saveParams); + keyFile.set_integer ("External Editor", "EditorKind", editorToSendTo); + keyFile.set_string ("External Editor", "GimpDir", gimpDir); + keyFile.set_string ("External Editor", "PhotoshopDir", psDir); + keyFile.set_string ("External Editor", "CustomEditor", customEditorProg); - keyFile.set_string ("Output", "FormatBatch", saveFormatBatch.format); - keyFile.set_integer ("Output", "JpegQualityBatch", saveFormatBatch.jpegQuality); - keyFile.set_integer ("Output", "JpegSubSampBatch", saveFormatBatch.jpegSubSamp); - keyFile.set_integer ("Output", "PngCompressionBatch", saveFormatBatch.pngCompression); - keyFile.set_integer ("Output", "PngBpsBatch", saveFormatBatch.pngBits); - keyFile.set_integer ("Output", "TiffBpsBatch", saveFormatBatch.tiffBits); - keyFile.set_boolean ("Output", "TiffUncompressedBatch", saveFormatBatch.tiffUncompressed); - keyFile.set_boolean ("Output", "SaveProcParamsBatch", saveFormatBatch.saveParams); + keyFile.set_boolean ("File Browser", "BrowseOnlyRaw", fbOnlyRaw); + keyFile.set_boolean ("File Browser", "BrowserShowsDate", fbShowDateTime); + keyFile.set_boolean ("File Browser", "BrowserShowsExif", fbShowBasicExif); + keyFile.set_boolean ("File Browser", "BrowserShowsExpComp", fbShowExpComp); + keyFile.set_boolean ("File Browser", "BrowserShowsHidden", fbShowHidden); + keyFile.set_integer ("File Browser", "ThumbnailSize", thumbSize); + keyFile.set_integer ("File Browser", "ThumbnailSizeTab", thumbSizeTab); + keyFile.set_integer ("File Browser", "ThumbnailSizeQueue", thumbSizeQueue); + keyFile.set_integer ("File Browser", "SameThumbSize", sameThumbSize); + keyFile.set_integer ("File Browser", "MaxPreviewHeight", maxThumbnailHeight); + keyFile.set_integer ("File Browser", "MaxCacheEntries", maxCacheEntries); + Glib::ArrayHandle pext = parseExtensions; + keyFile.set_string_list ("File Browser", "ParseExtensions", pext); + Glib::ArrayHandle pextena = parseExtensionsEnabled; + keyFile.set_integer_list ("File Browser", "ParseExtensionsEnabled", pextena); + keyFile.set_integer ("File Browser", "ThumbnailArrangement", fbArrangement); + keyFile.set_integer ("File Browser", "ThumbnailInterpolation", thumbInterp); + keyFile.set_boolean ("File Browser", "LiveThumbnails", liveThumbnails); + Glib::ArrayHandle pfav = favoriteDirs; + keyFile.set_string_list ("File Browser", "FavoriteDirs", pfav); + Glib::ArrayHandle pren = renameTemplates; + keyFile.set_string_list ("File Browser", "RenameTemplates", pren); + keyFile.set_boolean ("File Browser", "RenameUseTemplates", renameUseTemplates); + Glib::ArrayHandle ptzoom = thumbnailZoomRatios; + keyFile.set_double_list ("File Browser", "ThumbnailZoomRatios", ptzoom); + keyFile.set_boolean ("File Browser", "OverlayedFileNames", overlayedFileNames); + keyFile.set_boolean ("File Browser", "FilmStripOverlayedFileNames", filmStripOverlayedFileNames); + keyFile.set_boolean ("File Browser", "ShowFileNames", showFileNames ); + keyFile.set_boolean ("File Browser", "FilmStripShowFileNames", filmStripShowFileNames ); + keyFile.set_boolean ("File Browser", "InternalThumbIfUntouched", internalThumbIfUntouched ); + keyFile.set_boolean ("File Browser", "menuGroupRank", menuGroupRank); + keyFile.set_boolean ("File Browser", "menuGroupLabel", menuGroupLabel); + keyFile.set_boolean ("File Browser", "menuGroupFileOperations", menuGroupFileOperations); + keyFile.set_boolean ("File Browser", "menuGroupProfileOperations", menuGroupProfileOperations); + keyFile.set_boolean ("File Browser", "menuGroupExtProg", menuGroupExtProg); + keyFile.set_integer ("File Browser", "MaxRecentFolders", maxRecentFolders); + { + std::vector temp; + temp.reserve(maxRecentFolders); - keyFile.set_string ("Output", "PathTemplate", savePathTemplate); - keyFile.set_string ("Output", "PathFolder", savePathFolder); - keyFile.set_boolean ("Output", "AutoSuffix", autoSuffix); - keyFile.set_boolean ("Output", "ForceFormatOpts", forceFormatOpts); - keyFile.set_integer ("Output", "SaveMethodNum", saveMethodNum); - keyFile.set_boolean ("Output", "UsePathTemplate", saveUsePathTemplate); - keyFile.set_string ("Output", "LastSaveAsPath", lastSaveAsPath); - keyFile.set_boolean ("Output", "OverwriteOutputFile", overwriteOutputFile); - keyFile.set_boolean ("Output", "TunnelMetaData", tunnelMetaData); + for(unsigned int i = 0; i < std::min(recentFolders.size(), maxRecentFolders); i++) { + temp.push_back(recentFolders[i]); + } - keyFile.set_string ("Profiles", "Directory", profilePath); - keyFile.set_boolean ("Profiles", "UseBundledProfiles", useBundledProfiles); - keyFile.set_string ("Profiles", "LoadSaveProfilePath", loadSaveProfilePath); - keyFile.set_string ("Profiles", "RawDefault", defProfRaw); - keyFile.set_string ("Profiles", "ImgDefault", defProfImg); - keyFile.set_boolean ("Profiles", "FilledProfile", filledProfile); - keyFile.set_boolean ("Profiles", "SaveParamsWithFile", saveParamsFile); - keyFile.set_boolean ("Profiles", "SaveParamsToCache", saveParamsCache); - keyFile.set_integer ("Profiles", "LoadParamsFromLocation", paramsLoadLocation); - keyFile.set_string ("Profiles", "CustomProfileBuilderPath", CPBPath); - keyFile.set_integer ("Profiles", "CustomProfileBuilderKeys", CPBKeys); + keyFile.set_string_list ("File Browser", "RecentFolders", temp); + } + keyFile.set_integer ("Clipping Indication", "HighlightThreshold", highlightThreshold); + keyFile.set_integer ("Clipping Indication", "ShadowThreshold", shadowThreshold); + keyFile.set_boolean ("Clipping Indication", "BlinkClipped", blinkClipped); - keyFile.set_string ("GUI", "Font", font); - keyFile.set_integer ("GUI", "WindowWidth", windowWidth); - keyFile.set_integer ("GUI", "WindowHeight", windowHeight); - keyFile.set_integer ("GUI", "WindowX", windowX); - keyFile.set_integer ("GUI", "WindowY", windowY); - keyFile.set_boolean ("GUI", "WindowMaximized", windowMaximized); - keyFile.set_integer ("GUI", "DetailWindowWidth", detailWindowWidth); - keyFile.set_integer ("GUI", "DetailWindowHeight", detailWindowHeight); - keyFile.set_integer ("GUI", "DirBrowserWidth", dirBrowserWidth); - keyFile.set_integer ("GUI", "DirBrowserHeight", dirBrowserHeight); - keyFile.set_integer ("GUI", "SortType", dirBrowserSortType); - keyFile.set_integer ("GUI", "PreferencesWidth", preferencesWidth); - keyFile.set_integer ("GUI", "PreferencesHeight", preferencesHeight); - keyFile.set_integer ("GUI", "SaveAsDialogWidth", saveAsDialogWidth); - keyFile.set_integer ("GUI", "SaveAsDialogHeight", saveAsDialogHeight); - keyFile.set_integer ("GUI", "ToolPanelWidth", toolPanelWidth); - keyFile.set_integer ("GUI", "BrowserToolPanelWidth", browserToolPanelWidth); - keyFile.set_integer ("GUI", "BrowserToolPanelHeight", browserToolPanelHeight); - keyFile.set_boolean ("GUI", "BrowserToolPanelOpened", browserToolPanelOpened); - keyFile.set_boolean ("GUI", "EditorFilmStripOpened", editorFilmStripOpened); - keyFile.set_boolean ("GUI", "BrowserDirPanelOpened", browserDirPanelOpened); - keyFile.set_integer ("GUI", "HistoryPanelWidth", historyPanelWidth); - keyFile.set_integer ("GUI", "LastPreviewScale", lastScale); - keyFile.set_integer ("GUI", "PanAccelFactor", panAccelFactor); - keyFile.set_boolean ("GUI", "RememberZoomAndPan", rememberZoomAndPan); - keyFile.set_integer ("GUI", "LastCropSize", lastCropSize); - keyFile.set_boolean ("GUI", "ShowHistory", showHistory); - keyFile.set_integer ("GUI", "ShowFilePanelState", showFilePanelState); - keyFile.set_boolean ("GUI", "ShowInfo", showInfo); - keyFile.set_boolean ("GUI", "MainNBVertical", mainNBVertical); - keyFile.set_boolean ("GUI", "ShowClippedHighlights", showClippedHighlights); - keyFile.set_boolean ("GUI", "ShowClippedShadows", showClippedShadows); - keyFile.set_integer ("GUI", "FrameColor", bgcolor); - keyFile.set_boolean ("GUI", "ProcessingQueueEnbled", procQueueEnabled); - Glib::ArrayHandle tpopen = tpOpen; - keyFile.set_integer_list ("GUI", "ToolPanelsExpanded", tpopen); - keyFile.set_integer ("GUI", "MultiDisplayMode", multiDisplayMode); - keyFile.set_double_list ("GUI", "CutOverlayBrush", cutOverlayBrush); - keyFile.set_double_list ("GUI", "NavGuideBrush", navGuideBrush); - keyFile.set_integer ("GUI", "HistogramPosition", histogramPosition); - keyFile.set_boolean ("GUI", "HistogramBar", histogramBar); - keyFile.set_boolean ("GUI", "HistogramFullMode", histogramFullMode); - keyFile.set_boolean ("GUI", "ShowFilmStripToolBar", showFilmStripToolBar); - keyFile.set_boolean ("GUI", "FileBrowserToolbarSingleRow", FileBrowserToolbarSingleRow); - keyFile.set_boolean ("GUI", "HideTPVScrollbar", hideTPVScrollbar); - keyFile.set_boolean ("GUI", "UseIconNoText", UseIconNoText); - keyFile.set_boolean ("GUI", "HistogramWorking", rtSettings.HistogramWorking); - keyFile.set_integer ("GUI", "CurveBBoxPosition", curvebboxpos); + keyFile.set_integer ("Performance", "RgbDenoiseThreadLimit", rgbDenoiseThreadLimit); + keyFile.set_double ("Performance", "NRauto", rtSettings.nrauto); + keyFile.set_double ("Performance", "NRautomax", rtSettings.nrautomax); + keyFile.set_double ("Performance", "NRhigh", rtSettings.nrhigh); + keyFile.set_integer ("Performance", "NRWavlevel", rtSettings.nrwavlevel); + keyFile.set_integer ("Performance", "LevNR", rtSettings.leveldnv); + keyFile.set_integer ("Performance", "LevNRTI", rtSettings.leveldnti); + keyFile.set_integer ("Performance", "LevNRAUT", rtSettings.leveldnaut); + keyFile.set_integer ("Performance", "LevNRLISS", rtSettings.leveldnliss); + keyFile.set_integer ("Performance", "SIMPLNRAUT", rtSettings.leveldnautsimpl); + keyFile.set_integer ("Performance", "ClutCacheSize", clutCacheSize); + keyFile.set_integer ("Performance", "MaxInspectorBuffers", maxInspectorBuffers); + keyFile.set_integer ("Performance", "PreviewDemosaicFromSidecar", prevdemo); + keyFile.set_boolean ("Performance", "Daubechies", rtSettings.daubech); + keyFile.set_boolean ("Performance", "SerializeTiffRead", serializeTiffRead); - //Glib::ArrayHandle crvopen = crvOpen; - //keyFile.set_integer_list ("GUI", "CurvePanelsExpanded", crvopen); + keyFile.set_string ("Output", "Format", saveFormat.format); + keyFile.set_integer ("Output", "JpegQuality", saveFormat.jpegQuality); + keyFile.set_integer ("Output", "JpegSubSamp", saveFormat.jpegSubSamp); + keyFile.set_integer ("Output", "PngCompression", saveFormat.pngCompression); + keyFile.set_integer ("Output", "PngBps", saveFormat.pngBits); + keyFile.set_integer ("Output", "TiffBps", saveFormat.tiffBits); + keyFile.set_boolean ("Output", "TiffUncompressed", saveFormat.tiffUncompressed); + keyFile.set_boolean ("Output", "SaveProcParams", saveFormat.saveParams); - keyFile.set_integer ("Crop Settings", "PPI", cropPPI); + keyFile.set_string ("Output", "FormatBatch", saveFormatBatch.format); + keyFile.set_integer ("Output", "JpegQualityBatch", saveFormatBatch.jpegQuality); + keyFile.set_integer ("Output", "JpegSubSampBatch", saveFormatBatch.jpegSubSamp); + keyFile.set_integer ("Output", "PngCompressionBatch", saveFormatBatch.pngCompression); + keyFile.set_integer ("Output", "PngBpsBatch", saveFormatBatch.pngBits); + keyFile.set_integer ("Output", "TiffBpsBatch", saveFormatBatch.tiffBits); + keyFile.set_boolean ("Output", "TiffUncompressedBatch", saveFormatBatch.tiffUncompressed); + keyFile.set_boolean ("Output", "SaveProcParamsBatch", saveFormatBatch.saveParams); - keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory); - keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile); - keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile); - keyFile.set_boolean ("Color Management", "Autocielab", rtSettings.autocielab); - keyFile.set_boolean ("Color Management", "RGBcurvesLumamode_Gamut", rtSettings.rgbcurveslumamode_gamut); - keyFile.set_integer ("Color Management", "Intent", rtSettings.monitorIntent); - keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); - keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); - keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); + keyFile.set_string ("Output", "PathTemplate", savePathTemplate); + keyFile.set_string ("Output", "PathFolder", savePathFolder); + keyFile.set_boolean ("Output", "AutoSuffix", autoSuffix); + keyFile.set_boolean ("Output", "ForceFormatOpts", forceFormatOpts); + keyFile.set_integer ("Output", "SaveMethodNum", saveMethodNum); + keyFile.set_boolean ("Output", "UsePathTemplate", saveUsePathTemplate); + keyFile.set_string ("Output", "LastSaveAsPath", lastSaveAsPath); + keyFile.set_boolean ("Output", "OverwriteOutputFile", overwriteOutputFile); + keyFile.set_boolean ("Output", "TunnelMetaData", tunnelMetaData); - keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe); - keyFile.set_string ("Color Management", "ProPhoto", rtSettings.prophoto); - keyFile.set_string ("Color Management", "ProPhoto10", rtSettings.prophoto10); - keyFile.set_string ("Color Management", "WideGamut", rtSettings.widegamut); - keyFile.set_string ("Color Management", "sRGB", rtSettings.srgb); - keyFile.set_string ("Color Management", "sRGB10", rtSettings.srgb10); - keyFile.set_string ("Color Management", "Beta", rtSettings.beta); - keyFile.set_string ("Color Management", "Best", rtSettings.best); - keyFile.set_string ("Color Management", "Bruce", rtSettings.bruce); - keyFile.set_integer ("Color Management", "WhiteBalanceSpotSize", whiteBalanceSpotSize); - keyFile.set_boolean ("Color Management", "GamutICC", rtSettings.gamutICC); + keyFile.set_string ("Profiles", "Directory", profilePath); + keyFile.set_boolean ("Profiles", "UseBundledProfiles", useBundledProfiles); + keyFile.set_string ("Profiles", "LoadSaveProfilePath", loadSaveProfilePath); + keyFile.set_string ("Profiles", "RawDefault", defProfRaw); + keyFile.set_string ("Profiles", "ImgDefault", defProfImg); + keyFile.set_boolean ("Profiles", "FilledProfile", filledProfile); + keyFile.set_boolean ("Profiles", "SaveParamsWithFile", saveParamsFile); + keyFile.set_boolean ("Profiles", "SaveParamsToCache", saveParamsCache); + keyFile.set_integer ("Profiles", "LoadParamsFromLocation", paramsLoadLocation); + keyFile.set_string ("Profiles", "CustomProfileBuilderPath", CPBPath); + keyFile.set_integer ("Profiles", "CustomProfileBuilderKeys", CPBKeys); + + keyFile.set_string ("GUI", "Font", font); + keyFile.set_integer ("GUI", "WindowWidth", windowWidth); + keyFile.set_integer ("GUI", "WindowHeight", windowHeight); + keyFile.set_integer ("GUI", "WindowX", windowX); + keyFile.set_integer ("GUI", "WindowY", windowY); + keyFile.set_boolean ("GUI", "WindowMaximized", windowMaximized); + keyFile.set_integer ("GUI", "DetailWindowWidth", detailWindowWidth); + keyFile.set_integer ("GUI", "DetailWindowHeight", detailWindowHeight); + keyFile.set_integer ("GUI", "DirBrowserWidth", dirBrowserWidth); + keyFile.set_integer ("GUI", "DirBrowserHeight", dirBrowserHeight); + keyFile.set_integer ("GUI", "SortType", dirBrowserSortType); + keyFile.set_integer ("GUI", "PreferencesWidth", preferencesWidth); + keyFile.set_integer ("GUI", "PreferencesHeight", preferencesHeight); + keyFile.set_integer ("GUI", "SaveAsDialogWidth", saveAsDialogWidth); + keyFile.set_integer ("GUI", "SaveAsDialogHeight", saveAsDialogHeight); + keyFile.set_integer ("GUI", "ToolPanelWidth", toolPanelWidth); + keyFile.set_integer ("GUI", "BrowserToolPanelWidth", browserToolPanelWidth); + keyFile.set_integer ("GUI", "BrowserToolPanelHeight", browserToolPanelHeight); + keyFile.set_boolean ("GUI", "BrowserToolPanelOpened", browserToolPanelOpened); + keyFile.set_boolean ("GUI", "EditorFilmStripOpened", editorFilmStripOpened); + keyFile.set_boolean ("GUI", "BrowserDirPanelOpened", browserDirPanelOpened); + keyFile.set_integer ("GUI", "HistoryPanelWidth", historyPanelWidth); + keyFile.set_integer ("GUI", "LastPreviewScale", lastScale); + keyFile.set_integer ("GUI", "PanAccelFactor", panAccelFactor); + keyFile.set_boolean ("GUI", "RememberZoomAndPan", rememberZoomAndPan); + keyFile.set_integer ("GUI", "LastCropSize", lastCropSize); + keyFile.set_boolean ("GUI", "ShowHistory", showHistory); + keyFile.set_integer ("GUI", "ShowFilePanelState", showFilePanelState); + keyFile.set_boolean ("GUI", "ShowInfo", showInfo); + keyFile.set_boolean ("GUI", "MainNBVertical", mainNBVertical); + keyFile.set_boolean ("GUI", "ShowClippedHighlights", showClippedHighlights); + keyFile.set_boolean ("GUI", "ShowClippedShadows", showClippedShadows); + keyFile.set_integer ("GUI", "FrameColor", bgcolor); + keyFile.set_boolean ("GUI", "ProcessingQueueEnbled", procQueueEnabled); + Glib::ArrayHandle tpopen = tpOpen; + keyFile.set_integer_list ("GUI", "ToolPanelsExpanded", tpopen); + keyFile.set_integer ("GUI", "MultiDisplayMode", multiDisplayMode); + keyFile.set_double_list ("GUI", "CutOverlayBrush", cutOverlayBrush); + keyFile.set_double_list ("GUI", "NavGuideBrush", navGuideBrush); + keyFile.set_integer ("GUI", "HistogramPosition", histogramPosition); + keyFile.set_boolean ("GUI", "HistogramBar", histogramBar); + keyFile.set_boolean ("GUI", "HistogramFullMode", histogramFullMode); + keyFile.set_boolean ("GUI", "ShowFilmStripToolBar", showFilmStripToolBar); + keyFile.set_boolean ("GUI", "FileBrowserToolbarSingleRow", FileBrowserToolbarSingleRow); + keyFile.set_boolean ("GUI", "HideTPVScrollbar", hideTPVScrollbar); + keyFile.set_boolean ("GUI", "UseIconNoText", UseIconNoText); + keyFile.set_boolean ("GUI", "HistogramWorking", rtSettings.HistogramWorking); + keyFile.set_integer ("GUI", "CurveBBoxPosition", curvebboxpos); + + //Glib::ArrayHandle crvopen = crvOpen; + //keyFile.set_integer_list ("GUI", "CurvePanelsExpanded", crvopen); + + keyFile.set_integer ("Crop Settings", "PPI", cropPPI); + + keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory); + keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile); + keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile); + keyFile.set_boolean ("Color Management", "Autocielab", rtSettings.autocielab); + keyFile.set_boolean ("Color Management", "RGBcurvesLumamode_Gamut", rtSettings.rgbcurveslumamode_gamut); + keyFile.set_integer ("Color Management", "Intent", rtSettings.monitorIntent); + keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); + keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); + keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); + + keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe); + keyFile.set_string ("Color Management", "ProPhoto", rtSettings.prophoto); + keyFile.set_string ("Color Management", "ProPhoto10", rtSettings.prophoto10); + keyFile.set_string ("Color Management", "WideGamut", rtSettings.widegamut); + keyFile.set_string ("Color Management", "sRGB", rtSettings.srgb); + keyFile.set_string ("Color Management", "sRGB10", rtSettings.srgb10); + keyFile.set_string ("Color Management", "Beta", rtSettings.beta); + keyFile.set_string ("Color Management", "Best", rtSettings.best); + keyFile.set_string ("Color Management", "Rec2020", rtSettings.rec2020); + keyFile.set_string ("Color Management", "Bruce", rtSettings.bruce); + keyFile.set_integer ("Color Management", "WhiteBalanceSpotSize", whiteBalanceSpotSize); + keyFile.set_boolean ("Color Management", "GamutICC", rtSettings.gamutICC); // keyFile.set_boolean ("Color Management", "BWcomplement", rtSettings.bw_complementary); - keyFile.set_boolean ("Color Management", "Ciecamfloat", rtSettings.ciecamfloat); - keyFile.set_boolean ("Color Management", "GamutLch", rtSettings.gamutLch); - keyFile.set_integer ("Color Management", "ProtectRed", rtSettings.protectred); - keyFile.set_integer ("Color Management", "Amountchroma", rtSettings.amchroma); - keyFile.set_double ("Color Management", "ProtectRedH", rtSettings.protectredh); - keyFile.set_integer ("Color Management", "CRI", rtSettings.CRI_color); - keyFile.set_integer ("Color Management", "DenoiseLabgamma", rtSettings.denoiselabgamma); + keyFile.set_boolean ("Color Management", "Ciecamfloat", rtSettings.ciecamfloat); + keyFile.set_boolean ("Color Management", "GamutLch", rtSettings.gamutLch); + keyFile.set_integer ("Color Management", "ProtectRed", rtSettings.protectred); + keyFile.set_integer ("Color Management", "Amountchroma", rtSettings.amchroma); + keyFile.set_double ("Color Management", "ProtectRedH", rtSettings.protectredh); + keyFile.set_integer ("Color Management", "CRI", rtSettings.CRI_color); + keyFile.set_integer ("Color Management", "DenoiseLabgamma", rtSettings.denoiselabgamma); // keyFile.set_boolean ("Color Management", "Ciebadpixgauss", rtSettings.ciebadpixgauss); - keyFile.set_double ("Color Management", "CBDLArtif", rtSettings.artifact_cbdl); - keyFile.set_double ("Color Management", "CBDLlevel0", rtSettings.level0_cbdl); - keyFile.set_double ("Color Management", "CBDLlevel123", rtSettings.level123_cbdl); + keyFile.set_double ("Color Management", "CBDLArtif", rtSettings.artifact_cbdl); + keyFile.set_double ("Color Management", "CBDLlevel0", rtSettings.level0_cbdl); + keyFile.set_double ("Color Management", "CBDLlevel123", rtSettings.level123_cbdl); // keyFile.set_double ("Color Management", "Colortoningab", rtSettings.colortoningab); // keyFile.set_double ("Color Management", "Decaction", rtSettings.decaction); - keyFile.set_string ("Color Management", "ClutsDirectory", clutsDir); + keyFile.set_string ("Color Management", "ClutsDirectory", clutsDir); - Glib::ArrayHandle bab = baBehav; - keyFile.set_integer_list ("Batch Processing", "AdjusterBehavior", bab); + Glib::ArrayHandle bab = baBehav; + keyFile.set_integer_list ("Batch Processing", "AdjusterBehavior", bab); - keyFile.set_boolean ("Sounds", "Enable", sndEnable); - keyFile.set_string ("Sounds", "BatchQueueDone", sndBatchQueueDone); - keyFile.set_string ("Sounds", "LngEditProcDone", sndLngEditProcDone); - keyFile.set_double ("Sounds", "LngEditProcDoneSecs", sndLngEditProcDoneSecs); + keyFile.set_boolean ("Sounds", "Enable", sndEnable); + keyFile.set_string ("Sounds", "BatchQueueDone", sndBatchQueueDone); + keyFile.set_string ("Sounds", "LngEditProcDone", sndLngEditProcDone); + keyFile.set_double ("Sounds", "LngEditProcDoneSecs", sndLngEditProcDoneSecs); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpening" , fastexport_bypass_sharpening ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenEdge" , fastexport_bypass_sharpenEdge ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenMicro" , fastexport_bypass_sharpenMicro ); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" , fastexport_bypass_lumaDenoise ); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_defringe" , fastexport_bypass_defringe ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" , fastexport_bypass_dirpyrDenoise ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sh_hq" , fastexport_bypass_sh_hq ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" , fastexport_bypass_dirpyrequalizer ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_wavelet" , fastexport_bypass_wavelet ); - keyFile.set_string ("Fast Export", "fastexport_raw_bayer_method" , fastexport_raw_bayer_method ); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_bayer_raw_all_enhance" , fastexport_bypass_raw_bayer_all_enhance ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" , fastexport_bypass_raw_bayer_dcb_iterations ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" , fastexport_bypass_raw_bayer_dcb_enhance ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations", fastexport_bypass_raw_bayer_lmmse_iterations); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" , fastexport_bypass_raw_bayer_linenoise ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" , fastexport_bypass_raw_bayer_greenthresh ); - keyFile.set_string ("Fast Export", "fastexport_raw_xtrans_method" , fastexport_raw_xtrans_method ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps" , fastexport_bypass_raw_ccSteps ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ca" , fastexport_bypass_raw_ca ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_df" , fastexport_bypass_raw_df ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ff" , fastexport_bypass_raw_ff ); - keyFile.set_string ("Fast Export", "fastexport_icm_input" , fastexport_icm_input ); - keyFile.set_string ("Fast Export", "fastexport_icm_working" , fastexport_icm_working ); - keyFile.set_string ("Fast Export", "fastexport_icm_output" , fastexport_icm_output ); - keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent" , fastexport_icm_outputIntent ); - keyFile.set_string ("Fast Export", "fastexport_icm_gamma" , fastexport_icm_gamma ); - keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled" , fastexport_resize_enabled ); - keyFile.set_double ("Fast Export", "fastexport_resize_scale" , fastexport_resize_scale ); - keyFile.set_string ("Fast Export", "fastexport_resize_appliesTo" , fastexport_resize_appliesTo ); - keyFile.set_string ("Fast Export", "fastexport_resize_method" , fastexport_resize_method ); - keyFile.set_integer ("Fast Export", "fastexport_resize_dataspec" , fastexport_resize_dataspec ); - keyFile.set_integer ("Fast Export", "fastexport_resize_width" , fastexport_resize_width ); - keyFile.set_integer ("Fast Export", "fastexport_resize_height" , fastexport_resize_height ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpening" , fastexport_bypass_sharpening ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenEdge" , fastexport_bypass_sharpenEdge ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenMicro" , fastexport_bypass_sharpenMicro ); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" , fastexport_bypass_lumaDenoise ); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_defringe" , fastexport_bypass_defringe ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" , fastexport_bypass_dirpyrDenoise ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sh_hq" , fastexport_bypass_sh_hq ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" , fastexport_bypass_dirpyrequalizer ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_wavelet" , fastexport_bypass_wavelet ); + keyFile.set_string ("Fast Export", "fastexport_raw_bayer_method" , fastexport_raw_bayer_method ); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_bayer_raw_all_enhance" , fastexport_bypass_raw_bayer_all_enhance ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" , fastexport_bypass_raw_bayer_dcb_iterations ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" , fastexport_bypass_raw_bayer_dcb_enhance ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations", fastexport_bypass_raw_bayer_lmmse_iterations); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" , fastexport_bypass_raw_bayer_linenoise ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" , fastexport_bypass_raw_bayer_greenthresh ); + keyFile.set_string ("Fast Export", "fastexport_raw_xtrans_method" , fastexport_raw_xtrans_method ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps" , fastexport_bypass_raw_ccSteps ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ca" , fastexport_bypass_raw_ca ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_df" , fastexport_bypass_raw_df ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ff" , fastexport_bypass_raw_ff ); + keyFile.set_string ("Fast Export", "fastexport_icm_input" , fastexport_icm_input ); + keyFile.set_string ("Fast Export", "fastexport_icm_working" , fastexport_icm_working ); + keyFile.set_string ("Fast Export", "fastexport_icm_output" , fastexport_icm_output ); + keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent" , fastexport_icm_outputIntent ); + keyFile.set_string ("Fast Export", "fastexport_icm_gamma" , fastexport_icm_gamma ); + keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled" , fastexport_resize_enabled ); + keyFile.set_double ("Fast Export", "fastexport_resize_scale" , fastexport_resize_scale ); + keyFile.set_string ("Fast Export", "fastexport_resize_appliesTo" , fastexport_resize_appliesTo ); + keyFile.set_string ("Fast Export", "fastexport_resize_method" , fastexport_resize_method ); + keyFile.set_integer ("Fast Export", "fastexport_resize_dataspec" , fastexport_resize_dataspec ); + keyFile.set_integer ("Fast Export", "fastexport_resize_width" , fastexport_resize_width ); + keyFile.set_integer ("Fast Export", "fastexport_resize_height" , fastexport_resize_height ); - keyFile.set_string ("Dialogs", "LastIccDir", lastIccDir); - keyFile.set_string ("Dialogs", "LastDarkframeDir", lastDarkframeDir); - keyFile.set_string ("Dialogs", "LastFlatfieldDir", lastFlatfieldDir); - keyFile.set_string ("Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); - keyFile.set_string ("Dialogs", "LastLabCurvesDir", lastLabCurvesDir); - keyFile.set_string ("Dialogs", "LastRetinexDir", lastRetinexDir); - keyFile.set_string ("Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); - keyFile.set_string ("Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); - keyFile.set_string ("Dialogs", "LastPFCurvesDir", lastPFCurvesDir); - keyFile.set_string ("Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); - keyFile.set_string ("Dialogs", "LastBWCurvesDir", lastBWCurvesDir); - keyFile.set_string ("Dialogs", "LastToneCurvesDir", lastToneCurvesDir); - keyFile.set_string ("Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); - keyFile.set_string ("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); + keyFile.set_string ("Dialogs", "LastIccDir", lastIccDir); + keyFile.set_string ("Dialogs", "LastDarkframeDir", lastDarkframeDir); + keyFile.set_string ("Dialogs", "LastFlatfieldDir", lastFlatfieldDir); + keyFile.set_string ("Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); + keyFile.set_string ("Dialogs", "LastLabCurvesDir", lastLabCurvesDir); + keyFile.set_string ("Dialogs", "LastRetinexDir", lastRetinexDir); + keyFile.set_string ("Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); + keyFile.set_string ("Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); + keyFile.set_string ("Dialogs", "LastPFCurvesDir", lastPFCurvesDir); + keyFile.set_string ("Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); + keyFile.set_string ("Dialogs", "LastBWCurvesDir", lastBWCurvesDir); + keyFile.set_string ("Dialogs", "LastToneCurvesDir", lastToneCurvesDir); + keyFile.set_string ("Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); + keyFile.set_string ("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); - keyData = keyFile.to_data (); + keyData = keyFile.to_data (); } catch (Glib::KeyFileError&) {} From e9beb1b69ce07d0a335d0acc2224537bff549424 Mon Sep 17 00:00:00 2001 From: Desmis Date: Fri, 29 Apr 2016 07:53:41 +0200 Subject: [PATCH 14/57] Add rec2020.icm --- rtdata/iccprofiles/output/Rec2020.icm | Bin 0 -> 9120 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 rtdata/iccprofiles/output/Rec2020.icm diff --git a/rtdata/iccprofiles/output/Rec2020.icm b/rtdata/iccprofiles/output/Rec2020.icm new file mode 100644 index 0000000000000000000000000000000000000000..0decaf6dc1de06aec45db6979f89a65cb9091c73 GIT binary patch literal 9120 zcmb7~cTiMK_vi2A92jPRAr3j`oO8}O=bVuoC4)#*L9!A>2`V563W$Irf*=Ygpb`}o zMNv^ek=6I9t@o*4)zpUa?fU`%`a60m`Zv~p?f*}N_wkML z1^|%AA9aLxL}c_IuKC0MKA~Yg004&m;Y6QMpTC^;hvTDty#xO6{vXE1MMwP6L;h;W zUcvuiroSBdr-(oHzcI=F|FFh?H2?75TF8+$R@#3we`3+F{{LdHf3as|bQAz^|H%P} z{4>u#1ON!0rbD)^W7|Af)L@qhCI+L6AV(Y`)3 zuLPQYq^EDFFU?+zrXLs*B1W_F4e|Ai`r``>iw>tn2l&z=V!T2Ey=gw-p`L+ZVl=aG zn!RUaq-R)kf(Xqv%9rLDO-l%miKK^`hRUgfdJ6H2>^(W z|JrB}0Kjwrz~r%aOl0gok%)gEPyhj706ahfC;$~;1!w>dzz+xmVt^DN3n&6AfCiug z=mW-p8DIt20*-(S-~spm{y;Dg21EieKmw2qqybq#E|3ot0cU|Spc1G7>VPJo1!x1V z0$o54&<_j%!@w9Y4om{mz!P8|SOi`GtH36(1#AO5z!zW-H~@}700;^~fG{9Dhy4S_xW*{q&Eyxk%3i1H?fc!zhpfFG*CrXjbOio$=D`Rs28;)jz!WeQ%m$``dBFT&VXzoj3M>m&1gnBI zz&c=kurb&SYz4LjJAz%o9$+7^KR6g1295;BfD^ze;52X+I2W7`E&`tgmw_w6wct8% z6SxK32EGdJ0{4LX!Gqvo@ECX;JPDo#KLO8!7r`&VtKd!W7I+)H1O5X34n6=MK>!F8 zf`DKkcn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Bv%#~cW}9b6W>;o^J)u64dt&`0;z{9?)+ggnHlKo?vOiUR z>hLt?>A9!ZpFVo}ehx9mGp9A@K9@XKIoCTkH@7>FpBJ7tocEj0oUfZ7nqQvZUtm~} zUa(jQTgYFyyl{VE;~DUb{h9JJ$7iw6&OPgVHvR0wbJTPG=Q_{5o~J&qeSYit^XGeu z^otUUW{bg#d5bNJV~gvH$4hKW%1aJQu}h^(ol7%IAD7X~0?T^K-plFB7ncW@mzMWm zFuag?VfiBbMd6FK7ZWeGUP51Tz0`Q=_A>cp)yuw@^Dn=?qI)I&%Jfz6tGrh&ukO9t zSOKkYtf;OyuOzILuk@@uUD;hFtctE0uLiE>u3lOlTU}oR*4Won)|}Q7*2>p<)}F5I zt`pY9)=k!f)=#astlwMT*Z^(NHqgx-y2VO6~K6u0QM(&O6o2WNu-&}t)^JZrYyCuA3xD~LKv(>ycwzd8i z^p^Hk?XBzEp`rU{3nD;{O4c`a6&w1bce(e3m zHh7zJTVva8J7v3O`}X$I_Q40H5Aq-EKE!+|{m}j4$%oyK#E;@1%|3>HEcn>=@!`jJ zJIEdW9lagjo$Q^aozb23PoPhK;CPU5PZil zQQ}e6(XFGUqo2Q7ek=cW{+;x@=J&ww7r%cUvmL7*yB?oBzHmHrymEXTd~zX0HH5PARr literal 0 HcmV?d00001 From 29fe23e517fa8dde0a31f33de9a00f0d5e286085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Fri, 29 Apr 2016 17:26:56 +0200 Subject: [PATCH 15/57] Move `film_simulation_strength` calculation into `HaldCLUT::getRGB()` - Moved `film_simulation_strength` calculation into `HaldCLUT::getRGB()` - Removed unneeded base class `CLUT` - Used `_MM_SHUFFLE` --- rtengine/clutstore.cc | 103 ++++++++++++++++++++++------------------ rtengine/clutstore.h | 49 ++++++++----------- rtengine/improcfun.cc | 43 ++++++++--------- rtgui/filmsimulation.cc | 4 +- 4 files changed, 99 insertions(+), 100 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index c9d4645a2..b5f07c121 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -87,40 +87,6 @@ inline vfloat getClutValue(const AlignedBuffer& clut_image, size_ } -void rtengine::CLUT::splitClutFilename( - const Glib::ustring& filename, - Glib::ustring& name, - Glib::ustring& extension, - Glib::ustring& profile_name -) -{ - Glib::ustring basename = Glib::path_get_basename(filename); - - Glib::ustring::size_type last_slash_pos = basename.rfind('/'); - if (last_slash_pos == Glib::ustring::npos) { - last_slash_pos = basename.rfind('\\'); - } - - const Glib::ustring::size_type last_dot_pos = basename.rfind('.'); - - if (last_dot_pos != Glib::ustring::npos) { - name.assign(basename, 0, last_dot_pos); - extension.assign(basename, last_dot_pos + 1, Glib::ustring::npos); - } else { - name = basename; - } - - profile_name = "sRGB"; - - for (const auto& working_profile : rtengine::getWorkingProfiles()) { - if ( std::search( name.rbegin(), name.rend(), working_profile.rbegin(), working_profile.rend() ) == name.rbegin() ) { - profile_name = working_profile; - name.erase(name.size() - working_profile.size()); - break; - } - } -} - rtengine::HaldCLUT::HaldCLUT() : clut_level(0), flevel_minus_one(0.0f), @@ -164,7 +130,14 @@ Glib::ustring rtengine::HaldCLUT::getProfile() const return clut_profile; } -void rtengine::HaldCLUT::getRGB(std::size_t line_size, const float* r, const float* g, const float* b, float* out_rgbx) const +void rtengine::HaldCLUT::getRGB( + float strength, + std::size_t line_size, + const float* r, + const float* g, + const float* b, + float* out_rgbx +) const { const unsigned int level = clut_level; // This is important @@ -219,13 +192,18 @@ void rtengine::HaldCLUT::getRGB(std::size_t line_size, const float* r, const flo out_rgbx[0] = intp(bl, tmp1[0], out_rgbx[0]); out_rgbx[1] = intp(bl, tmp1[1], out_rgbx[1]); out_rgbx[2] = intp(bl, tmp1[2], out_rgbx[2]); + + out_rgbx[0] = intp(strength, out_rgbx[0], *r); + out_rgbx[1] = intp(strength, out_rgbx[1], *g); + out_rgbx[2] = intp(strength, out_rgbx[2], *b); #else - const vfloat v_tmp = _mm_set_ps(0.0f, *b, *g, *r) * _mm_load_ps1(&flevel_minus_one); + const vfloat v_in = _mm_set_ps(0.0f, *b, *g, *r); + const vfloat v_tmp = v_in * _mm_load_ps1(&flevel_minus_one); const vfloat v_rgb = v_tmp - _mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_min_ps(_mm_load_ps1(&flevel_minus_two), v_tmp))); size_t index = color * 4; - const vfloat v_r = PERMUTEPS(v_rgb, 0x00); + const vfloat v_r = PERMUTEPS(v_rgb, _MM_SHUFFLE(0, 0, 0, 0)); vfloat v_tmp1 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); @@ -233,7 +211,7 @@ void rtengine::HaldCLUT::getRGB(std::size_t line_size, const float* r, const flo vfloat v_tmp2 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); - const vfloat v_g = PERMUTEPS(v_rgb, 0x55); + const vfloat v_g = PERMUTEPS(v_rgb, _MM_SHUFFLE(1, 1, 1, 1)); vfloat v_out = vintpf(v_g, v_tmp2, v_tmp1); @@ -247,22 +225,58 @@ void rtengine::HaldCLUT::getRGB(std::size_t line_size, const float* r, const flo v_tmp1 = vintpf(v_g, v_tmp2, v_tmp1); - const vfloat v_b = PERMUTEPS(v_rgb, 0xAA); + const vfloat v_b = PERMUTEPS(v_rgb, _MM_SHUFFLE(2, 2, 2, 2)); - _mm_store_ps(out_rgbx, vintpf(v_b, v_tmp1, v_out)); + v_out = vintpf(v_b, v_tmp1, v_out); + + _mm_store_ps(out_rgbx, vintpf(_mm_load_ps1(&strength), v_out, v_in)); #endif } } +void rtengine::HaldCLUT::splitClutFilename( + const Glib::ustring& filename, + Glib::ustring& name, + Glib::ustring& extension, + Glib::ustring& profile_name +) +{ + Glib::ustring basename = Glib::path_get_basename(filename); + + Glib::ustring::size_type last_slash_pos = basename.rfind('/'); + if (last_slash_pos == Glib::ustring::npos) { + last_slash_pos = basename.rfind('\\'); + } + + const Glib::ustring::size_type last_dot_pos = basename.rfind('.'); + + if (last_dot_pos != Glib::ustring::npos) { + name.assign(basename, 0, last_dot_pos); + extension.assign(basename, last_dot_pos + 1, Glib::ustring::npos); + } else { + name = basename; + } + + profile_name = "sRGB"; + + for (const auto& working_profile : rtengine::getWorkingProfiles()) { + if ( std::search( name.rbegin(), name.rend(), working_profile.rbegin(), working_profile.rend() ) == name.rbegin() ) { + profile_name = working_profile; + name.erase(name.size() - working_profile.size()); + break; + } + } +} + rtengine::CLUTStore& rtengine::CLUTStore::getInstance() { static CLUTStore instance; return instance; } -std::shared_ptr rtengine::CLUTStore::getClut(const Glib::ustring& filename) +std::shared_ptr rtengine::CLUTStore::getClut(const Glib::ustring& filename) { - std::shared_ptr result; + std::shared_ptr result; if (!cache.get(filename, result)) { std::unique_ptr clut(new rtengine::HaldCLUT); @@ -275,11 +289,6 @@ std::shared_ptr rtengine::CLUTStore::getClut(const Glib::ustring return result; } -void rtengine::CLUTStore::releaseClut(const std::shared_ptr& clut) -{ - cache.remove(clut->getFilename()); -} - void rtengine::CLUTStore::clearCache() { cache.clear(); diff --git a/rtengine/clutstore.h b/rtengine/clutstore.h index 6203e4e61..7383b597f 100644 --- a/rtengine/clutstore.h +++ b/rtengine/clutstore.h @@ -11,20 +11,29 @@ namespace rtengine { -class CLUT +class HaldCLUT { public: - CLUT() = default; - CLUT(const CLUT& other) = delete; - CLUT& operator =(const CLUT& other) = delete; - virtual ~CLUT() = default; + HaldCLUT(); + HaldCLUT(const HaldCLUT& other) = delete; + HaldCLUT& operator =(const HaldCLUT& other) = delete; + ~HaldCLUT(); - virtual explicit operator bool() const = 0; + bool load(const Glib::ustring& filename); - virtual Glib::ustring getFilename() const = 0; - virtual Glib::ustring getProfile() const = 0; + explicit operator bool() const; - virtual void getRGB(std::size_t line_size, const float* r, const float* g, const float* b, float* out_rgbx) const = 0; + Glib::ustring getFilename() const; + Glib::ustring getProfile() const; + + void getRGB( + float strength, + std::size_t line_size, + const float* r, + const float* g, + const float* b, + float* out_rgbx + ) const; static void splitClutFilename( const Glib::ustring& filename, @@ -32,23 +41,6 @@ public: Glib::ustring& extension, Glib::ustring& profile_name ); -}; - -class HaldCLUT - : public CLUT -{ -public: - HaldCLUT(); - ~HaldCLUT(); - - bool load(const Glib::ustring& filename); - - explicit operator bool() const override; - - Glib::ustring getFilename() const override; - Glib::ustring getProfile() const override; - - void getRGB(std::size_t line_size, const float* r, const float* g, const float* b, float* out_rgbx) const override; private: AlignedBuffer clut_image; @@ -67,15 +59,14 @@ public: CLUTStore(const CLUTStore& other) = delete; CLUTStore& operator =(const CLUTStore& other) = delete; - std::shared_ptr getClut(const Glib::ustring& filename); - void releaseClut(const std::shared_ptr& clut); + std::shared_ptr getClut(const Glib::ustring& filename); void clearCache(); private: CLUTStore(); - Cache> cache; + Cache> cache; }; } diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 2fd2bfb17..4bc95e5fa 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -16,7 +16,6 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include #include #include #include @@ -3206,27 +3205,26 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } } - std::shared_ptr colorLUT; + std::shared_ptr hald_clut; bool clutAndWorkingProfilesAreSame = false; TMatrix work2xyz, xyz2clut, clut2xyz, xyz2work; if ( params->filmSimulation.enabled && !params->filmSimulation.clutFilename.empty() ) { - colorLUT = CLUTStore::getInstance().getClut( params->filmSimulation.clutFilename ); + hald_clut = CLUTStore::getInstance().getClut( params->filmSimulation.clutFilename ); - if ( colorLUT ) { - clutAndWorkingProfilesAreSame = colorLUT->getProfile() == params->icm.working; + if ( hald_clut ) { + clutAndWorkingProfilesAreSame = hald_clut->getProfile() == params->icm.working; if ( !clutAndWorkingProfilesAreSame ) { work2xyz = iccStore->workingSpaceMatrix( params->icm.working ); - xyz2clut = iccStore->workingSpaceInverseMatrix( colorLUT->getProfile() ); + xyz2clut = iccStore->workingSpaceInverseMatrix( hald_clut->getProfile() ); xyz2work = iccStore->workingSpaceInverseMatrix( params->icm.working ); - clut2xyz = iccStore->workingSpaceMatrix( colorLUT->getProfile() ); + clut2xyz = iccStore->workingSpaceMatrix( hald_clut->getProfile() ); } } } - float filmSimCorrectedStrength = static_cast(params->filmSimulation.strength) / 100.0f; - float filmSimSourceStrength = 1.0f - filmSimCorrectedStrength; + const float film_simulation_strength = static_cast(params->filmSimulation.strength) / 100.0f; const float exp_scale = pow (2.0, expcomp); const float comp = (max(0.0, expcomp) + 1.0) * hlcompr / 100.0; @@ -4337,11 +4335,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer //Film Simulations - if ( colorLUT ) { - std::size_t out_rgbx_size = 4 * (TS + 16); - std::unique_ptr out_rgbx_buf(new float[out_rgbx_size]); - void* out_rgbx_ptr = out_rgbx_buf.get(); - float* const out_rgbx = reinterpret_cast(std::align(16, 4 * TS, out_rgbx_ptr, out_rgbx_size)); + if ( hald_clut ) { + float out_rgbx[4 * TS] ALIGNED16; for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { @@ -4362,21 +4357,25 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer sourceB = CLIP( Color::gamma_srgb( sourceB ) ); } - colorLUT->getRGB(std::min(TS, tW - jstart), rtemp + ti * TS, gtemp + ti * TS, btemp + ti * TS, out_rgbx); + const std::size_t line_offset = ti * TS; + hald_clut->getRGB( + film_simulation_strength, + std::min(TS, tW - jstart), + rtemp + line_offset, + gtemp + line_offset, + btemp + line_offset, + out_rgbx + ); for (int j = jstart, tj = 0; j < tW; j++, tj++) { float &sourceR = rtemp[ti * TS + tj]; float &sourceG = gtemp[ti * TS + tj]; float &sourceB = btemp[ti * TS + tj]; - // apply strength - sourceR = out_rgbx[tj * 4 + 0] * filmSimCorrectedStrength + sourceR * filmSimSourceStrength; - sourceG = out_rgbx[tj * 4 + 1] * filmSimCorrectedStrength + sourceG * filmSimSourceStrength; - sourceB = out_rgbx[tj * 4 + 2] * filmSimCorrectedStrength + sourceB * filmSimSourceStrength; // apply inverse gamma sRGB - sourceR = Color::igamma_srgb( sourceR ); - sourceG = Color::igamma_srgb( sourceG ); - sourceB = Color::igamma_srgb( sourceB ); + sourceR = Color::igamma_srgb(out_rgbx[tj * 4 + 0]); + sourceG = Color::igamma_srgb(out_rgbx[tj * 4 + 1]); + sourceB = Color::igamma_srgb(out_rgbx[tj * 4 + 2]); if (!clutAndWorkingProfilesAreSame) { //convert from clut to working profile diff --git a/rtgui/filmsimulation.cc b/rtgui/filmsimulation.cc index 3ee1f4742..f916a5397 100644 --- a/rtgui/filmsimulation.cc +++ b/rtgui/filmsimulation.cc @@ -72,7 +72,7 @@ void FilmSimulation::onClutSelected() if ( getEnabled() && !currentClutFilename.empty() && listener && currentClutFilename != m_oldClutFilename ) { Glib::ustring clutName, dummy; - CLUT::splitClutFilename( currentClutFilename, clutName, dummy, dummy ); + HaldCLUT::splitClutFilename( currentClutFilename, clutName, dummy, dummy ); listener->panelChanged( EvFilmSimulationFilename, clutName ); m_oldClutFilename = currentClutFilename; @@ -279,7 +279,7 @@ int ClutComboBox::parseDir (const Glib::ustring& path) for (const auto& entry : entries) { Glib::ustring name, extension, profileName; - CLUT::splitClutFilename (entry, name, extension, profileName); + HaldCLUT::splitClutFilename (entry, name, extension, profileName); extension = extension.casefold (); if (extension.compare ("tif") != 0 && extension.compare ("png") != 0) { From beaea22779abe3732a7cee4dfa2a4ef4ad1785e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Fri, 29 Apr 2016 20:35:37 +0200 Subject: [PATCH 16/57] Vectorize color space conversion for HaldCLUT Vectorize color space conversion for HaldCLUT depending on the definition of `VECTLENSP`. It's not fully AVX compatible because `F2V`, `LVF`, and `STVF` are SSE only. --- rtengine/color.cc | 9 ++++ rtengine/color.h | 4 +- rtengine/improcfun.cc | 99 +++++++++++++++++++++++++++++++++++++------ 3 files changed, 98 insertions(+), 14 deletions(-) diff --git a/rtengine/color.cc b/rtengine/color.cc index f5a8c86a3..dc0710a2f 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -819,6 +819,15 @@ void Color::rgbxyz (float r, float g, float b, float &x, float &y, float &z, con z = ((xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b)) ; } +#ifdef __SSE2__ +void Color::rgbxyz (vfloat r, vfloat g, vfloat b, vfloat &x, vfloat &y, vfloat &z, const vfloat xyz_rgb[3][3]) +{ + x = ((xyz_rgb[0][0] * r + xyz_rgb[0][1] * g + xyz_rgb[0][2] * b)) ; + y = ((xyz_rgb[1][0] * r + xyz_rgb[1][1] * g + xyz_rgb[1][2] * b)) ; + z = ((xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b)) ; +} +#endif + void Color::xyz2rgb (float x, float y, float z, float &r, float &g, float &b, const double rgb_xyz[3][3]) { //Transform to output color. Standard sRGB is D65, but internal representation is D50 diff --git a/rtengine/color.h b/rtengine/color.h index 3f78692d8..9ff00034c 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -325,7 +325,9 @@ public: */ static void rgbxyz (float r, float g, float b, float &x, float &y, float &z, const double xyz_rgb[3][3]); static void rgbxyz (float r, float g, float b, float &x, float &y, float &z, const float xyz_rgb[3][3]); - +#ifdef __SSE2__ + static void rgbxyz (vfloat r, vfloat g, vfloat b, vfloat &x, vfloat &y, vfloat &z, const vfloat xyz_rgb[3][3]); +#endif /** * @brief Convert Lab in xyz diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 4bc95e5fa..c1de37474 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -3208,6 +3208,12 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer std::shared_ptr hald_clut; bool clutAndWorkingProfilesAreSame = false; TMatrix work2xyz, xyz2clut, clut2xyz, xyz2work; +#ifdef VECTLENSP + vfloat v_work2xyz[3][3]; + vfloat v_xyz2clut[3][3]; + vfloat v_clut2xyz[3][3]; + vfloat v_xyz2work[3][3]; +#endif if ( params->filmSimulation.enabled && !params->filmSimulation.clutFilename.empty() ) { hald_clut = CLUTStore::getInstance().getClut( params->filmSimulation.clutFilename ); @@ -3220,6 +3226,16 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer xyz2clut = iccStore->workingSpaceInverseMatrix( hald_clut->getProfile() ); xyz2work = iccStore->workingSpaceInverseMatrix( params->icm.working ); clut2xyz = iccStore->workingSpaceMatrix( hald_clut->getProfile() ); +#ifdef VECTLENSP + for (int i = 0; i < 3; ++i) { + for (int j = 0; j < 3; ++j) { + v_work2xyz[i][j] = F2V(work2xyz[i][j]); + v_xyz2clut[i][j] = F2V(xyz2clut[i][j]); + v_xyz2work[i][j] = F2V(xyz2work[i][j]); + v_clut2xyz[i][j] = F2V(clut2xyz[i][j]); + } + } +#endif } } } @@ -4335,22 +4351,51 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer //Film Simulations - if ( hald_clut ) { + if (hald_clut) { float out_rgbx[4 * TS] ALIGNED16; for (int i = istart, ti = 0; i < tH; i++, ti++) { + if (!clutAndWorkingProfilesAreSame) { +#ifdef VECTLENSP + if (!(std::min(TS, tW - jstart) & ~(VECTLENSP - 1))) { + for (int j = jstart, tj = 0; j < tW; j += VECTLENSP, tj += VECTLENSP) { + vfloat sourceR = LVF(rtemp[ti * TS + tj]); + vfloat sourceG = LVF(gtemp[ti * TS + tj]); + vfloat sourceB = LVF(btemp[ti * TS + tj]); + + //convert from working to clut profile + vfloat x; + vfloat y; + vfloat z; + Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, v_work2xyz ); + Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, v_xyz2clut ); + + STVF(rtemp[ti * TS + tj], sourceR); + STVF(gtemp[ti * TS + tj], sourceG); + STVF(btemp[ti * TS + tj], sourceB); + } + } + else +#endif + { + for (int j = jstart, tj = 0; j < tW; j++, tj++) { + float &sourceR = rtemp[ti * TS + tj]; + float &sourceG = gtemp[ti * TS + tj]; + float &sourceB = btemp[ti * TS + tj]; + + //convert from working to clut profile + float x, y, z; + Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, work2xyz ); + Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, xyz2clut ); + } + } + } + for (int j = jstart, tj = 0; j < tW; j++, tj++) { float &sourceR = rtemp[ti * TS + tj]; float &sourceG = gtemp[ti * TS + tj]; float &sourceB = btemp[ti * TS + tj]; - if (!clutAndWorkingProfilesAreSame) { - //convert from working to clut profile - float x, y, z; - Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, work2xyz ); - Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, xyz2clut ); - } - //appply gamma sRGB (default RT) sourceR = CLIP( Color::gamma_srgb( sourceR ) ); sourceG = CLIP( Color::gamma_srgb( sourceG ) ); @@ -4376,14 +4421,42 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer sourceR = Color::igamma_srgb(out_rgbx[tj * 4 + 0]); sourceG = Color::igamma_srgb(out_rgbx[tj * 4 + 1]); sourceB = Color::igamma_srgb(out_rgbx[tj * 4 + 2]); + } - if (!clutAndWorkingProfilesAreSame) { - //convert from clut to working profile - float x, y, z; - Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, clut2xyz ); - Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, xyz2work ); + if (!clutAndWorkingProfilesAreSame) { +#ifdef VECTLENSP + if (!(std::min(TS, tW - jstart) & ~(VECTLENSP - 1))) { + for (int j = jstart, tj = 0; j < tW; j += VECTLENSP, tj += VECTLENSP) { + vfloat sourceR = LVF(rtemp[ti * TS + tj]); + vfloat sourceG = LVF(gtemp[ti * TS + tj]); + vfloat sourceB = LVF(btemp[ti * TS + tj]); + + //convert from clut to working profile + vfloat x; + vfloat y; + vfloat z; + Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, v_clut2xyz ); + Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, v_xyz2work ); + + STVF(rtemp[ti * TS + tj], sourceR); + STVF(gtemp[ti * TS + tj], sourceG); + STVF(btemp[ti * TS + tj], sourceB); + } } + else +#endif + { + for (int j = jstart, tj = 0; j < tW; j++, tj++) { + float &sourceR = rtemp[ti * TS + tj]; + float &sourceG = gtemp[ti * TS + tj]; + float &sourceB = btemp[ti * TS + tj]; + //convert from clut to working profile + float x, y, z; + Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, clut2xyz ); + Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, xyz2work ); + } + } } } } From 130337578ee64ec7beec34171453942f305c4536 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Fri, 29 Apr 2016 23:17:54 +0200 Subject: [PATCH 17/57] Updated Sony ILCE-6000.dcp, #3220 --- rtdata/dcpprofiles/Sony ILCE-6000.dcp | Bin 1045602 -> 1045602 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/rtdata/dcpprofiles/Sony ILCE-6000.dcp b/rtdata/dcpprofiles/Sony ILCE-6000.dcp index 6d7e7c1e6cc48fec4b1affa84bf42d9fb9661137..5ef8c4d31549e2c243636dddd87d2cb06f3d017d 100644 GIT binary patch delta 32857 zcmZ6z1z41A*EMVh*Z~GAHmxWID6CTyySoz$TM)&XhM8fQVwj=3ThfBLP81~+TkJ%| zx)Hnm&*y!<|NU-1j>BUvba0q`?Q`$7*IIj?)Z!5CR1M4~Q~+jmNfUu#4N42oI$=9G(UfYWYSF?nxkumUp5iFZB4mB?u+IyHb6i9*=63IFQ$!?zk3$1?Fnp zXlq8j?&vVaN`o;~-KkS`FoqA%qW8A$wCJQ3if+MpYTBK?%+kQOxeiswy3vJ6YLEsU zPHfL;>NV*V^3KqVupU^f>$2GmCj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zIvSTqWIEZ(h`$;TghfNs?QTzJ{g7rI9!Zf?AyK+vupX~b4#b+SQE1tw z$1Umma+*0S3O%dOeMN-VAxT{PNqw$Ce=&6RzoD+Q)8rm>+C4no5zkku@U0zae2SG5 z{sJy@s4Dy*~>dcBG?lyBIrXycEK{C=b}@f~GCc1ku-I1lqY`#_!jHNhy_h zg5A)+{|~|9R-y>2=-~LNyfZ(emWW9MY4GIAzI?S^0zRJb!pnn0__v4gSoMiYvAxFf zh$Zp3@8gRdpQdohTxtqcG}gFpAQ3xk4HNCoMV?dW&?pOizjnJIN%tUYl>G>c%Sx4GcD&$+x?ZTeUJA zs>`(at8t;oc_+n`5=|aT;^UQlh~2wblOLtB`=O~(2pXWtM^FNyxrC5<3LPHRF%adm zqo5R`!(UQFt?HsMo5KF$WB_Vufd?+oh5DJ?ZL2S8uxd6dq9R`{CyQ2lp3sOaK4? From 12a5d90fe6be16d9495d696037b6da2e034cdeed Mon Sep 17 00:00:00 2001 From: Desmis Date: Sat, 30 Apr 2016 07:41:34 +0200 Subject: [PATCH 18/57] chanhe matrix rgb-xyz and xyz-rgb --- rtengine/iccmatrices.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/rtengine/iccmatrices.h b/rtengine/iccmatrices.h index 62ac7f150..d70aedd0c 100644 --- a/rtengine/iccmatrices.h +++ b/rtengine/iccmatrices.h @@ -54,7 +54,7 @@ const double sRGB_xyz[3][3] = {{3.13593293538656, -1.61878246026431, // Color space conversion to/from XYZ; color spaces adapted to D50 using Bradford transform -const double xyz_sRGB[3][3] = {{0.4360747, 0.3850649, 0.1430804}, +const double xyz_sRGB[3][3] = {{0.4360747, 0.385061, 0.1430804}, {0.2225045, 0.7168786, 0.0606169}, {0.0139322, 0.0971045, 0.7141733} }; @@ -83,7 +83,7 @@ const double prophoto_xyz[3][3] = {{1.3459433, -0.2556075, -0.0511118}, { -0.5445989, 1.5081673, 0.0205351}, {0.0000000, 0.0000000, 1.2118128} }; - +/* const double xyz_rec2020[3][3] = {{0.636958, 0.144617, 0.168881}, {0.262700, 0.677998, 0.059302}, {0.0000000, 0.028073, 1.060985} @@ -93,6 +93,16 @@ const double rec2020_xyz[3][3] = {{1.716651, -0.355671, -0.253366}, { -0.666684, 1.616481, 0.015769}, {0.017640, -0.042771, 0.942103} }; +*/ +const double xyz_rec2020[3][3] = {{0.6734241, 0.1656411, 0.1251286}, + {0.2790177, 0.6753402, 0.0456377}, + { -0.0019300, 0.0299784, 0.7973330} +}; + +const double rec2020_xyz[3][3] = {{1.6473376, -0.3935675, -0.2359961}, + { -0.6826036, 1.6475887, 0.0128190}, + {0.0296524, -0.0628993, 1.2531279} +}; const double xyz_widegamut[3][3] = {{0.7161046, 0.1009296, 0.1471858}, {0.2581874, 0.7249378, 0.0168748}, From 06611c04bab09ddae0fa79a34cb432dcae8c39f9 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sat, 30 Apr 2016 07:47:21 +0200 Subject: [PATCH 19/57] small change --- rtengine/iccmatrices.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/iccmatrices.h b/rtengine/iccmatrices.h index d70aedd0c..292f45612 100644 --- a/rtengine/iccmatrices.h +++ b/rtengine/iccmatrices.h @@ -54,7 +54,7 @@ const double sRGB_xyz[3][3] = {{3.13593293538656, -1.61878246026431, // Color space conversion to/from XYZ; color spaces adapted to D50 using Bradford transform -const double xyz_sRGB[3][3] = {{0.4360747, 0.385061, 0.1430804}, +const double xyz_sRGB[3][3] = {{0.4360747, 0.3850649, 0.1430804}, {0.2225045, 0.7168786, 0.0606169}, {0.0139322, 0.0971045, 0.7141733} }; From eceb024ba88fa5303071b799ff05ca2669b5d238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sun, 1 May 2016 10:41:21 +0200 Subject: [PATCH 20/57] Add Ingo's `gamma_srgbclipped` patch --- rtengine/color.h | 4 ++++ rtengine/improcfun.cc | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/rtengine/color.h b/rtengine/color.h index 9ff00034c..be7740e2a 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -1079,6 +1079,10 @@ public: { return gammatab_srgb[x]; } + static inline float gamma_srgbclipped (float x) + { + return gamma2curve[x]; + } static inline float gamma (float x) { return gammatab[x]; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index c1de37474..4660ed6cb 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -19,6 +19,9 @@ #include #include #include +#ifdef _OPENMP +#include +#endif #include "rtengine.h" #include "improcfun.h" @@ -38,9 +41,6 @@ #include "clutstore.h" #include "ciecam02.h" -#ifdef _OPENMP -#include -#endif #undef CLIPD #define CLIPD(a) ((a)>0.0f?((a)<1.0f?(a):1.0f):0.0f) @@ -4396,10 +4396,10 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float &sourceG = gtemp[ti * TS + tj]; float &sourceB = btemp[ti * TS + tj]; - //appply gamma sRGB (default RT) - sourceR = CLIP( Color::gamma_srgb( sourceR ) ); - sourceG = CLIP( Color::gamma_srgb( sourceG ) ); - sourceB = CLIP( Color::gamma_srgb( sourceB ) ); + //apply gamma sRGB (default RT) + sourceR = Color::gamma_srgbclipped( sourceR ); + sourceG = Color::gamma_srgbclipped( sourceG ); + sourceB = Color::gamma_srgbclipped( sourceB ); } const std::size_t line_offset = ti * TS; From 39f4db609a7c589043d84ef7e9a3ce13eb8aa972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sun, 1 May 2016 11:10:11 +0200 Subject: [PATCH 21/57] Final code cleanup - Corrected whitespace and comments - Replaced `VECTLENSP` with `__SSE2__` and `4` - Removed redundant `inline` (see: http://programmers.stackexchange.com/a/35436 and http://stackoverflow.com/a/5971755) --- rtengine/clutstore.cc | 4 ++-- rtengine/improcfun.cc | 52 +++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index b5f07c121..5e96046ae 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -75,7 +75,7 @@ bool loadFile( } #ifdef __SSE2__ -inline vfloat getClutValue(const AlignedBuffer& clut_image, size_t index) +vfloat getClutValue(const AlignedBuffer& clut_image, size_t index) { #ifdef __SSE4_1__ return _mm_cvtepi32_ps(_mm_cvtepu16_epi32(*reinterpret_cast(clut_image.data + index))); @@ -260,7 +260,7 @@ void rtengine::HaldCLUT::splitClutFilename( profile_name = "sRGB"; for (const auto& working_profile : rtengine::getWorkingProfiles()) { - if ( std::search( name.rbegin(), name.rend(), working_profile.rbegin(), working_profile.rend() ) == name.rbegin() ) { + if (std::search(name.rbegin(), name.rend(), working_profile.rbegin(), working_profile.rend()) == name.rbegin()) { profile_name = working_profile; name.erase(name.size() - working_profile.size()); break; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 4660ed6cb..c1079c8b1 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -3208,7 +3208,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer std::shared_ptr hald_clut; bool clutAndWorkingProfilesAreSame = false; TMatrix work2xyz, xyz2clut, clut2xyz, xyz2work; -#ifdef VECTLENSP +#ifdef __SSE2__ vfloat v_work2xyz[3][3]; vfloat v_xyz2clut[3][3]; vfloat v_clut2xyz[3][3]; @@ -3226,7 +3226,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer xyz2clut = iccStore->workingSpaceInverseMatrix( hald_clut->getProfile() ); xyz2work = iccStore->workingSpaceInverseMatrix( params->icm.working ); clut2xyz = iccStore->workingSpaceMatrix( hald_clut->getProfile() ); -#ifdef VECTLENSP +#ifdef __SSE2__ for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { v_work2xyz[i][j] = F2V(work2xyz[i][j]); @@ -4350,25 +4350,25 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } - //Film Simulations + // Film Simulations if (hald_clut) { float out_rgbx[4 * TS] ALIGNED16; for (int i = istart, ti = 0; i < tH; i++, ti++) { if (!clutAndWorkingProfilesAreSame) { -#ifdef VECTLENSP - if (!(std::min(TS, tW - jstart) & ~(VECTLENSP - 1))) { - for (int j = jstart, tj = 0; j < tW; j += VECTLENSP, tj += VECTLENSP) { + // Convert from working to clut profile +#ifdef __SSE2__ + if (!(std::min(TS, tW - jstart) & ~3)) { + for (int j = jstart, tj = 0; j < tW; j += 4, tj += 4) { vfloat sourceR = LVF(rtemp[ti * TS + tj]); vfloat sourceG = LVF(gtemp[ti * TS + tj]); vfloat sourceB = LVF(btemp[ti * TS + tj]); - //convert from working to clut profile vfloat x; vfloat y; vfloat z; - Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, v_work2xyz ); - Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, v_xyz2clut ); + Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_work2xyz); + Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2clut); STVF(rtemp[ti * TS + tj], sourceR); STVF(gtemp[ti * TS + tj], sourceG); @@ -4383,10 +4383,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float &sourceG = gtemp[ti * TS + tj]; float &sourceB = btemp[ti * TS + tj]; - //convert from working to clut profile float x, y, z; - Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, work2xyz ); - Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, xyz2clut ); + Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, work2xyz); + Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, xyz2clut); } } } @@ -4396,10 +4395,10 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float &sourceG = gtemp[ti * TS + tj]; float &sourceB = btemp[ti * TS + tj]; - //apply gamma sRGB (default RT) - sourceR = Color::gamma_srgbclipped( sourceR ); - sourceG = Color::gamma_srgbclipped( sourceG ); - sourceB = Color::gamma_srgbclipped( sourceB ); + // Apply gamma sRGB (default RT) + sourceR = Color::gamma_srgbclipped(sourceR); + sourceG = Color::gamma_srgbclipped(sourceG); + sourceB = Color::gamma_srgbclipped(sourceB); } const std::size_t line_offset = ti * TS; @@ -4417,26 +4416,26 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float &sourceG = gtemp[ti * TS + tj]; float &sourceB = btemp[ti * TS + tj]; - // apply inverse gamma sRGB + // Apply inverse gamma sRGB sourceR = Color::igamma_srgb(out_rgbx[tj * 4 + 0]); sourceG = Color::igamma_srgb(out_rgbx[tj * 4 + 1]); sourceB = Color::igamma_srgb(out_rgbx[tj * 4 + 2]); } if (!clutAndWorkingProfilesAreSame) { -#ifdef VECTLENSP - if (!(std::min(TS, tW - jstart) & ~(VECTLENSP - 1))) { - for (int j = jstart, tj = 0; j < tW; j += VECTLENSP, tj += VECTLENSP) { + // Convert from clut to working profile +#ifdef __SSE2__ + if (!(std::min(TS, tW - jstart) & ~3)) { + for (int j = jstart, tj = 0; j < tW; j += 4, tj += 4) { vfloat sourceR = LVF(rtemp[ti * TS + tj]); vfloat sourceG = LVF(gtemp[ti * TS + tj]); vfloat sourceB = LVF(btemp[ti * TS + tj]); - //convert from clut to working profile vfloat x; vfloat y; vfloat z; - Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, v_clut2xyz ); - Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, v_xyz2work ); + Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_clut2xyz); + Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2work); STVF(rtemp[ti * TS + tj], sourceR); STVF(gtemp[ti * TS + tj], sourceG); @@ -4451,10 +4450,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float &sourceG = gtemp[ti * TS + tj]; float &sourceB = btemp[ti * TS + tj]; - //convert from clut to working profile float x, y, z; - Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, clut2xyz ); - Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, xyz2work ); + Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, clut2xyz); + Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, xyz2work); } } } @@ -4462,7 +4460,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } - if(!blackwhite) { + if (!blackwhite) { // ready, fill lab for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { From 17635cf53565b4fed6fc4cced16cd5dd2ec5e901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sun, 1 May 2016 11:17:40 +0200 Subject: [PATCH 22/57] Add myself to AUTHORS.txt With permission by [Ingo][1] I added myself to AUTHORS.txt. [1]: https://github.com/Beep6581/RawTherapee/pull/3260#issuecomment-212565582 --- AUTHORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.txt b/AUTHORS.txt index 8c87a42c3..37ac98993 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -12,6 +12,7 @@ Developement contributors, in last name alphabetical order: Oliver Duis Maciek Dworak Michael Ezra + Flössie Jean-Christophe Frisch Ilias Giarimis Steve Herrell From d530617ae19b72de01b883ae6385c1fc3753ec68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sun, 1 May 2016 20:49:17 +0200 Subject: [PATCH 23/57] Include last remarks from Ingo - Changed `_mm_store_ps` to `STVF` - Increased number of cached CLUTs by factor 1.5 --- rtengine/clutstore.cc | 2 +- rtgui/preferences.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index 5e96046ae..e96614e4c 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -229,7 +229,7 @@ void rtengine::HaldCLUT::getRGB( v_out = vintpf(v_b, v_tmp1, v_out); - _mm_store_ps(out_rgbx, vintpf(_mm_load_ps1(&strength), v_out, v_in)); + STVF(*out_rgbx, vintpf(_mm_load_ps1(&strength), v_out, v_in)); #endif } } diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 10800d527..14c9cb0eb 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -572,9 +572,9 @@ Gtk::Widget* Preferences::getPerformancePanel () clutCacheSizeSB->set_increments (1, 5); clutCacheSizeSB->set_max_length(2); // Will this be sufficient? :) #ifdef _OPENMP - clutCacheSizeSB->set_range (1, 2 * omp_get_num_procs()); + clutCacheSizeSB->set_range (1, 3 * omp_get_num_procs()); #else - clutCacheSizeSB->set_range (1, 8); + clutCacheSizeSB->set_range (1, 12); #endif clutCacheSizeHB->pack_start (*CLUTLl, Gtk::PACK_SHRINK, 0); clutCacheSizeHB->pack_end (*clutCacheSizeSB, Gtk::PACK_SHRINK, 0); From 2b9f6e3355390ced1a81975f60713f5b0f6cd48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sun, 1 May 2016 21:36:13 +0200 Subject: [PATCH 24/57] Add Ingo's clutspeed.patch --- rtengine/clutstore.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index e96614e4c..a4c177b3d 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -143,6 +143,10 @@ void rtengine::HaldCLUT::getRGB( const unsigned int level_square = level * level; +#ifdef __SSE2__ + const vfloat v_strength = F2V(strength); +#endif + for (std::size_t column = 0; column < line_size; ++column, ++r, ++g, ++b, out_rgbx += 4) { const unsigned int red = std::min(flevel_minus_two, *r * flevel_minus_one); const unsigned int green = std::min(flevel_minus_two, *g * flevel_minus_one); @@ -229,7 +233,7 @@ void rtengine::HaldCLUT::getRGB( v_out = vintpf(v_b, v_tmp1, v_out); - STVF(*out_rgbx, vintpf(_mm_load_ps1(&strength), v_out, v_in)); + STVF(*out_rgbx, vintpf(v_strength, v_out, v_in)); #endif } } From add88cc62c8ba06d801e1488e1777398f952a54b Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Sun, 1 May 2016 22:49:10 +0200 Subject: [PATCH 25/57] astyle'd rtengine/clutstore.cc --- rtengine/clutstore.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index a4c177b3d..ea3a2a7fc 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -31,9 +31,11 @@ bool loadFile( if (fw == fh) { unsigned int level = 1; + while (level * level * level < fw) { ++level; } + if (level * level * level == fw && level > 1) { clut_level = level; res = true; @@ -57,6 +59,7 @@ bool loadFile( AlignedBuffer image(fw * fh * 4 + 1); std::size_t index = 0; + for (int y = 0; y < fh; ++y) { for (int x = 0; x < fw; ++x) { image.data[index] = img_float->r(y, x); @@ -248,6 +251,7 @@ void rtengine::HaldCLUT::splitClutFilename( Glib::ustring basename = Glib::path_get_basename(filename); Glib::ustring::size_type last_slash_pos = basename.rfind('/'); + if (last_slash_pos == Glib::ustring::npos) { last_slash_pos = basename.rfind('\\'); } @@ -284,6 +288,7 @@ std::shared_ptr rtengine::CLUTStore::getClut(const Glib::ust if (!cache.get(filename, result)) { std::unique_ptr clut(new rtengine::HaldCLUT); + if (clut->load(filename)) { result = std::move(clut); cache.insert(filename, result); From 5e0a859ceabb49e2f07f6bbebec05d0a47ace46b Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 3 May 2016 20:01:59 +0200 Subject: [PATCH 26/57] Fix buffer overrun in rgbProc() --- rtengine/improcfun.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index c1079c8b1..cabfa38eb 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -3388,7 +3388,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } bool hasgammabw = gammabwr != 1.f || gammabwg != 1.f || gammabwb != 1.f; - fGammaLUTf(65535); + fGammaLUTf(65536); #pragma omp parallel for for (int i = 0; i < 65536; i++) { From 9622bbc2ba8a5c9f78cbe528f23575e0c60705f8 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 3 May 2016 20:50:45 +0200 Subject: [PATCH 27/57] Fix buffer overrun in clutstore.cc --- rtengine/clutstore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index ea3a2a7fc..9d0cea35a 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -56,7 +56,7 @@ bool loadFile( img_src.convertColorSpace(img_float.get(), icm, curr_wb); } - AlignedBuffer image(fw * fh * 4 + 1); + AlignedBuffer image(fw * fh * 4 + 4); std::size_t index = 0; From 2ad89f9464ad1d8e61349bba620d2b03e5bf0530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 4 May 2016 20:15:15 +0200 Subject: [PATCH 28/57] Fix buffer overrun when applying HaldCLUT (#3154) Ingo found a buffer overrun due to an inverted mask when deciding whether to take the SSE path or not. This fix applies his suggested pattern for boder cases. Kudos to @heckflosse. --- rtengine/improcfun.cc | 91 ++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 48 deletions(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index cabfa38eb..4a0fe684e 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -4354,39 +4354,37 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer if (hald_clut) { float out_rgbx[4 * TS] ALIGNED16; + for (int i = istart, ti = 0; i < tH; i++, ti++) { if (!clutAndWorkingProfilesAreSame) { // Convert from working to clut profile + int j = jstart; + int tj = 0; #ifdef __SSE2__ - if (!(std::min(TS, tW - jstart) & ~3)) { - for (int j = jstart, tj = 0; j < tW; j += 4, tj += 4) { - vfloat sourceR = LVF(rtemp[ti * TS + tj]); - vfloat sourceG = LVF(gtemp[ti * TS + tj]); - vfloat sourceB = LVF(btemp[ti * TS + tj]); + for (; j < tW - 3; j += 4, tj += 4) { + vfloat sourceR = LVF(rtemp[ti * TS + tj]); + vfloat sourceG = LVF(gtemp[ti * TS + tj]); + vfloat sourceB = LVF(btemp[ti * TS + tj]); - vfloat x; - vfloat y; - vfloat z; - Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_work2xyz); - Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2clut); + vfloat x; + vfloat y; + vfloat z; + Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_work2xyz); + Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2clut); - STVF(rtemp[ti * TS + tj], sourceR); - STVF(gtemp[ti * TS + tj], sourceG); - STVF(btemp[ti * TS + tj], sourceB); - } + STVF(rtemp[ti * TS + tj], sourceR); + STVF(gtemp[ti * TS + tj], sourceG); + STVF(btemp[ti * TS + tj], sourceB); } - else #endif - { - for (int j = jstart, tj = 0; j < tW; j++, tj++) { - float &sourceR = rtemp[ti * TS + tj]; - float &sourceG = gtemp[ti * TS + tj]; - float &sourceB = btemp[ti * TS + tj]; + for (; j < tW; j++, tj++) { + float &sourceR = rtemp[ti * TS + tj]; + float &sourceG = gtemp[ti * TS + tj]; + float &sourceB = btemp[ti * TS + tj]; - float x, y, z; - Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, work2xyz); - Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, xyz2clut); - } + float x, y, z; + Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, work2xyz); + Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, xyz2clut); } } @@ -4424,36 +4422,33 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer if (!clutAndWorkingProfilesAreSame) { // Convert from clut to working profile + int j = jstart; + int tj = 0; #ifdef __SSE2__ - if (!(std::min(TS, tW - jstart) & ~3)) { - for (int j = jstart, tj = 0; j < tW; j += 4, tj += 4) { - vfloat sourceR = LVF(rtemp[ti * TS + tj]); - vfloat sourceG = LVF(gtemp[ti * TS + tj]); - vfloat sourceB = LVF(btemp[ti * TS + tj]); + for (; j < tW - 3; j += 4, tj += 4) { + vfloat sourceR = LVF(rtemp[ti * TS + tj]); + vfloat sourceG = LVF(gtemp[ti * TS + tj]); + vfloat sourceB = LVF(btemp[ti * TS + tj]); - vfloat x; - vfloat y; - vfloat z; - Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_clut2xyz); - Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2work); + vfloat x; + vfloat y; + vfloat z; + Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_clut2xyz); + Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2work); - STVF(rtemp[ti * TS + tj], sourceR); - STVF(gtemp[ti * TS + tj], sourceG); - STVF(btemp[ti * TS + tj], sourceB); - } + STVF(rtemp[ti * TS + tj], sourceR); + STVF(gtemp[ti * TS + tj], sourceG); + STVF(btemp[ti * TS + tj], sourceB); } - else #endif - { - for (int j = jstart, tj = 0; j < tW; j++, tj++) { - float &sourceR = rtemp[ti * TS + tj]; - float &sourceG = gtemp[ti * TS + tj]; - float &sourceB = btemp[ti * TS + tj]; + for (; j < tW; j++, tj++) { + float &sourceR = rtemp[ti * TS + tj]; + float &sourceG = gtemp[ti * TS + tj]; + float &sourceB = btemp[ti * TS + tj]; - float x, y, z; - Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, clut2xyz); - Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, xyz2work); - } + float x, y, z; + Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, clut2xyz); + Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, xyz2work); } } } From 31b2589b9b67450cfbfe5f014b37a89ef186f12f Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 6 May 2016 17:16:45 +0200 Subject: [PATCH 29/57] Fix crashes caused by aligned access to unaligned memory in CLUT code, fixes #3154, fixes #3278, fixes #3277 --- rtengine/clutstore.cc | 10 ++++----- rtengine/improcfun.cc | 48 ++++++++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index 9d0cea35a..5d859f90c 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -56,7 +56,7 @@ bool loadFile( img_src.convertColorSpace(img_float.get(), icm, curr_wb); } - AlignedBuffer image(fw * fh * 4 + 4); + AlignedBuffer image(fw * fh * 4 + 8); // + 8 because of SSE4_1 version of getClutValue std::size_t index = 0; @@ -81,9 +81,9 @@ bool loadFile( vfloat getClutValue(const AlignedBuffer& clut_image, size_t index) { #ifdef __SSE4_1__ - return _mm_cvtepi32_ps(_mm_cvtepu16_epi32(*reinterpret_cast(clut_image.data + index))); + return _mm_cvtepi32_ps(_mm_cvtepu16_epi32(_mm_loadu_si128(reinterpret_cast(clut_image.data + index)))); #else - return _mm_cvtpu16_ps(*reinterpret_cast(clut_image.data + index)); + return _mm_set_ps(clut_image.data[index + 3], clut_image.data[index + 2], clut_image.data[index + 1], clut_image.data[index]); #endif } #endif @@ -205,8 +205,8 @@ void rtengine::HaldCLUT::getRGB( out_rgbx[2] = intp(strength, out_rgbx[2], *b); #else const vfloat v_in = _mm_set_ps(0.0f, *b, *g, *r); - const vfloat v_tmp = v_in * _mm_load_ps1(&flevel_minus_one); - const vfloat v_rgb = v_tmp - _mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_min_ps(_mm_load_ps1(&flevel_minus_two), v_tmp))); + const vfloat v_tmp = v_in * F2V(flevel_minus_one); + const vfloat v_rgb = v_tmp - _mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_min_ps(F2V(flevel_minus_two), v_tmp))); size_t index = color * 4; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 4a0fe684e..e9ae98e2a 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -3209,10 +3209,10 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer bool clutAndWorkingProfilesAreSame = false; TMatrix work2xyz, xyz2clut, clut2xyz, xyz2work; #ifdef __SSE2__ - vfloat v_work2xyz[3][3]; - vfloat v_xyz2clut[3][3]; - vfloat v_clut2xyz[3][3]; - vfloat v_xyz2work[3][3]; + vfloat v_work2xyz[3][3] ALIGNED16; + vfloat v_xyz2clut[3][3] ALIGNED16; + vfloat v_clut2xyz[3][3] ALIGNED16; + vfloat v_xyz2work[3][3] ALIGNED16; #endif if ( params->filmSimulation.enabled && !params->filmSimulation.clutFilename.empty() ) { @@ -3227,6 +3227,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer xyz2work = iccStore->workingSpaceInverseMatrix( params->icm.working ); clut2xyz = iccStore->workingSpaceMatrix( hald_clut->getProfile() ); #ifdef __SSE2__ + for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { v_work2xyz[i][j] = F2V(work2xyz[i][j]); @@ -3235,6 +3236,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer v_clut2xyz[i][j] = F2V(clut2xyz[i][j]); } } + #endif } } @@ -3452,6 +3454,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer editWhateverTmp = (float(*))data; } + float out_rgbx[4 * TS] ALIGNED16; // Line buffer for CLUT #ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) @@ -4352,8 +4355,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer // Film Simulations if (hald_clut) { - float out_rgbx[4 * TS] ALIGNED16; - for (int i = istart, ti = 0; i < tH; i++, ti++) { if (!clutAndWorkingProfilesAreSame) { @@ -4361,10 +4362,11 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int j = jstart; int tj = 0; #ifdef __SSE2__ + for (; j < tW - 3; j += 4, tj += 4) { - vfloat sourceR = LVF(rtemp[ti * TS + tj]); - vfloat sourceG = LVF(gtemp[ti * TS + tj]); - vfloat sourceB = LVF(btemp[ti * TS + tj]); + vfloat sourceR = LVFU(rtemp[ti * TS + tj]); + vfloat sourceG = LVFU(gtemp[ti * TS + tj]); + vfloat sourceB = LVFU(btemp[ti * TS + tj]); vfloat x; vfloat y; @@ -4372,11 +4374,13 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_work2xyz); Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2clut); - STVF(rtemp[ti * TS + tj], sourceR); - STVF(gtemp[ti * TS + tj], sourceG); - STVF(btemp[ti * TS + tj], sourceB); + STVFU(rtemp[ti * TS + tj], sourceR); + STVFU(gtemp[ti * TS + tj], sourceG); + STVFU(btemp[ti * TS + tj], sourceB); } + #endif + for (; j < tW; j++, tj++) { float &sourceR = rtemp[ti * TS + tj]; float &sourceG = gtemp[ti * TS + tj]; @@ -4425,10 +4429,11 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int j = jstart; int tj = 0; #ifdef __SSE2__ + for (; j < tW - 3; j += 4, tj += 4) { - vfloat sourceR = LVF(rtemp[ti * TS + tj]); - vfloat sourceG = LVF(gtemp[ti * TS + tj]); - vfloat sourceB = LVF(btemp[ti * TS + tj]); + vfloat sourceR = LVFU(rtemp[ti * TS + tj]); + vfloat sourceG = LVFU(gtemp[ti * TS + tj]); + vfloat sourceB = LVFU(btemp[ti * TS + tj]); vfloat x; vfloat y; @@ -4436,11 +4441,13 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_clut2xyz); Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2work); - STVF(rtemp[ti * TS + tj], sourceR); - STVF(gtemp[ti * TS + tj], sourceG); - STVF(btemp[ti * TS + tj], sourceB); + STVFU(rtemp[ti * TS + tj], sourceR); + STVFU(gtemp[ti * TS + tj], sourceG); + STVFU(btemp[ti * TS + tj], sourceB); } + #endif + for (; j < tW; j++, tj++) { float &sourceR = rtemp[ti * TS + tj]; float &sourceG = gtemp[ti * TS + tj]; @@ -7185,6 +7192,7 @@ SSEFUNCTION void ImProcFunctions::lab2rgb(const LabImage &src, Imagefloat &dst, wipv[i][j] = F2V(wiprof[i][j]); } } + #endif #ifdef _OPENMP @@ -7194,9 +7202,10 @@ SSEFUNCTION void ImProcFunctions::lab2rgb(const LabImage &src, Imagefloat &dst, for(int i = 0; i < H; i++) { int j = 0; #ifdef __SSE2__ + for(; j < W - 3; j += 4) { vfloat X, Y, Z; - vfloat R,G,B; + vfloat R, G, B; Color::Lab2XYZ(LVFU(src.L[i][j]), LVFU(src.a[i][j]), LVFU(src.b[i][j]), X, Y, Z); Color::xyz2rgb(X, Y, Z, R, G, B, wipv); STVFU(dst.r(i, j), R); @@ -7205,6 +7214,7 @@ SSEFUNCTION void ImProcFunctions::lab2rgb(const LabImage &src, Imagefloat &dst, } #endif + for(; j < W; j++) { float X, Y, Z; Color::Lab2XYZ(src.L[i][j], src.a[i][j], src.b[i][j], X, Y, Z); From 721de446f456ed1cf06b58cc05d76673e0fbcb43 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 9 May 2016 20:00:12 +0200 Subject: [PATCH 30/57] Fix crash caused by uninitialized variables when using ciecam02 on files without exif data, fixes #3084 --- rtengine/imagedata.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index c0da10761..bbfc303fc 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -44,7 +44,7 @@ ImageMetaData* ImageMetaData::fromFile (const Glib::ustring& fname, RawMetaDataL return new ImageData (fname, rml); } -ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) +ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) : iso_speed(0), aperture(0.), shutter(0.) { size_t dotpos = fname.find_last_of ('.'); From 1edfb0c6f79d72acb6f759e2df30a11503404b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 10 May 2016 20:39:20 +0200 Subject: [PATCH 31/57] Switch `getClutValue` to vfloat2 and load/store source[RGB] unaligned Ingo had some cleanup suggestions in #3154 which I tried to realize with this commit. Although switching to `vfloat2` is a clever idea, I can see no further speedup. --- rtengine/clutstore.cc | 27 +++++++++++++++++++-------- rtengine/improcfun.cc | 34 ++++++++++++++++------------------ 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index 5d859f90c..fc167734c 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -56,7 +56,7 @@ bool loadFile( img_src.convertColorSpace(img_float.get(), icm, curr_wb); } - AlignedBuffer image(fw * fh * 4 + 8); // + 8 because of SSE4_1 version of getClutValue + AlignedBuffer image(fw * fh * 4 + 8); // + 8 because of SSE4_1 version of getClutValues std::size_t index = 0; @@ -78,12 +78,19 @@ bool loadFile( } #ifdef __SSE2__ -vfloat getClutValue(const AlignedBuffer& clut_image, size_t index) +vfloat2 getClutValues(const AlignedBuffer& clut_image, size_t index) { + const __m128i v_values = _mm_loadu_si128(reinterpret_cast(clut_image.data + index)); #ifdef __SSE4_1__ - return _mm_cvtepi32_ps(_mm_cvtepu16_epi32(_mm_loadu_si128(reinterpret_cast(clut_image.data + index)))); + return { + _mm_cvtepi32_ps(_mm_cvtepu16_epi32(v_values)), + _mm_cvtepi32_ps(_mm_cvtepu16_epi32(_mm_srli_si128(v_values, 8))) + }; #else - return _mm_set_ps(clut_image.data[index + 3], clut_image.data[index + 2], clut_image.data[index + 1], clut_image.data[index]); + return { + _mm_cvtpu16_ps(_mm_movepi64_pi64(v_values)), + _mm_cvtpu16_ps(_mm_movepi64_pi64(_mm_srli_si128(v_values, 8))) + }; #endif } #endif @@ -212,11 +219,13 @@ void rtengine::HaldCLUT::getRGB( const vfloat v_r = PERMUTEPS(v_rgb, _MM_SHUFFLE(0, 0, 0, 0)); - vfloat v_tmp1 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); + vfloat2 v_clut_values = getClutValues(clut_image, index); + vfloat v_tmp1 = vintpf(v_r, v_clut_values.y, v_clut_values.x); index = (color + level) * 4; - vfloat v_tmp2 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); + v_clut_values = getClutValues(clut_image, index); + vfloat v_tmp2 = vintpf(v_r, v_clut_values.y, v_clut_values.x); const vfloat v_g = PERMUTEPS(v_rgb, _MM_SHUFFLE(1, 1, 1, 1)); @@ -224,11 +233,13 @@ void rtengine::HaldCLUT::getRGB( index = (color + level_square) * 4; - v_tmp1 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); + v_clut_values = getClutValues(clut_image, index); + v_tmp1 = vintpf(v_r, v_clut_values.y, v_clut_values.x); index = (color + level + level_square) * 4; - v_tmp2 = vintpf(v_r, getClutValue(clut_image, index + 4), getClutValue(clut_image, index)); + v_clut_values = getClutValues(clut_image, index); + v_tmp2 = vintpf(v_r, v_clut_values.y, v_clut_values.x); v_tmp1 = vintpf(v_g, v_tmp2, v_tmp1); diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index e9ae98e2a..bc70bf5e5 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -3226,8 +3226,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer xyz2clut = iccStore->workingSpaceInverseMatrix( hald_clut->getProfile() ); xyz2work = iccStore->workingSpaceInverseMatrix( params->icm.working ); clut2xyz = iccStore->workingSpaceMatrix( hald_clut->getProfile() ); -#ifdef __SSE2__ +#ifdef __SSE2__ for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { v_work2xyz[i][j] = F2V(work2xyz[i][j]); @@ -3236,8 +3236,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer v_clut2xyz[i][j] = F2V(clut2xyz[i][j]); } } - #endif + } } } @@ -4361,12 +4361,12 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer // Convert from working to clut profile int j = jstart; int tj = 0; -#ifdef __SSE2__ +#ifdef __SSE2__ for (; j < tW - 3; j += 4, tj += 4) { - vfloat sourceR = LVFU(rtemp[ti * TS + tj]); - vfloat sourceG = LVFU(gtemp[ti * TS + tj]); - vfloat sourceB = LVFU(btemp[ti * TS + tj]); + vfloat sourceR = LVF(rtemp[ti * TS + tj]); + vfloat sourceG = LVF(gtemp[ti * TS + tj]); + vfloat sourceB = LVF(btemp[ti * TS + tj]); vfloat x; vfloat y; @@ -4374,11 +4374,10 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_work2xyz); Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2clut); - STVFU(rtemp[ti * TS + tj], sourceR); - STVFU(gtemp[ti * TS + tj], sourceG); - STVFU(btemp[ti * TS + tj], sourceB); + STVF(rtemp[ti * TS + tj], sourceR); + STVF(gtemp[ti * TS + tj], sourceG); + STVF(btemp[ti * TS + tj], sourceB); } - #endif for (; j < tW; j++, tj++) { @@ -4428,12 +4427,12 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer // Convert from clut to working profile int j = jstart; int tj = 0; -#ifdef __SSE2__ +#ifdef __SSE2__ for (; j < tW - 3; j += 4, tj += 4) { - vfloat sourceR = LVFU(rtemp[ti * TS + tj]); - vfloat sourceG = LVFU(gtemp[ti * TS + tj]); - vfloat sourceB = LVFU(btemp[ti * TS + tj]); + vfloat sourceR = LVF(rtemp[ti * TS + tj]); + vfloat sourceG = LVF(gtemp[ti * TS + tj]); + vfloat sourceB = LVF(btemp[ti * TS + tj]); vfloat x; vfloat y; @@ -4441,11 +4440,10 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_clut2xyz); Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2work); - STVFU(rtemp[ti * TS + tj], sourceR); - STVFU(gtemp[ti * TS + tj], sourceG); - STVFU(btemp[ti * TS + tj], sourceB); + STVF(rtemp[ti * TS + tj], sourceR); + STVF(gtemp[ti * TS + tj], sourceG); + STVF(btemp[ti * TS + tj], sourceB); } - #endif for (; j < tW; j++, tj++) { From f4d5c645de112bf9e5423707513115eaf82653e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 11 May 2016 20:01:17 +0200 Subject: [PATCH 32/57] Add Ingo's `clutstore_no_mmx.patch` Ingo has provided a solution for the strange Windows crash with `_mm_cvtpu16_ps()`: It was not an alignment problem, but the use of MMX instructions which led to the SEGV. Now Ingo's solutions omits MMX instructions altogether and is nevertheless faster than the `_mm_set_ps()` workaround. Many thanks to @heckflosse! --- rtengine/clutstore.cc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index fc167734c..2724ed34e 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -87,9 +87,18 @@ vfloat2 getClutValues(const AlignedBuffer& clut_image, size_t ind _mm_cvtepi32_ps(_mm_cvtepu16_epi32(_mm_srli_si128(v_values, 8))) }; #else + vint lowval = _mm_shuffle_epi32(v_values, _MM_SHUFFLE(1, 0, 1, 0)); + vint highval = _mm_shuffle_epi32(v_values, _MM_SHUFFLE(3, 2, 3, 2)); + lowval = _mm_shufflelo_epi16(lowval, _MM_SHUFFLE(1, 1, 0, 0)); + highval = _mm_shufflelo_epi16(highval, _MM_SHUFFLE(1, 1, 0, 0)); + lowval = _mm_shufflehi_epi16(lowval, _MM_SHUFFLE(3, 3, 2, 2)); + highval = _mm_shufflehi_epi16(highval, _MM_SHUFFLE(3, 3, 2, 2)); + lowval = vandm(lowval, _mm_set1_epi32(0x0000ffff)); + highval = vandm(highval, _mm_set1_epi32(0x0000ffff)); + return { - _mm_cvtpu16_ps(_mm_movepi64_pi64(v_values)), - _mm_cvtpu16_ps(_mm_movepi64_pi64(_mm_srli_si128(v_values, 8))) + _mm_cvtepi32_ps(lowval), + _mm_cvtepi32_ps(highval) }; #endif } @@ -261,12 +270,6 @@ void rtengine::HaldCLUT::splitClutFilename( { Glib::ustring basename = Glib::path_get_basename(filename); - Glib::ustring::size_type last_slash_pos = basename.rfind('/'); - - if (last_slash_pos == Glib::ustring::npos) { - last_slash_pos = basename.rfind('\\'); - } - const Glib::ustring::size_type last_dot_pos = basename.rfind('.'); if (last_dot_pos != Glib::ustring::npos) { From 12656796517cfd733cc9747a47de3a51ee39b682 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 11 May 2016 21:04:32 +0200 Subject: [PATCH 33/57] Retinex: some small improvements and some cleanup --- rtengine/improccoordinator.cc | 3 +- rtengine/ipretinex.cc | 246 +++++++++++----------------------- rtengine/rawimagesource.cc | 139 ++++++++++--------- 3 files changed, 158 insertions(+), 230 deletions(-) diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index b6862ab66..7434776d5 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -55,7 +55,7 @@ ImProcCoordinator::ImProcCoordinator () lhist16(65536), lhist16Cropped(65536), lhist16CAM(65536), lhist16CroppedCAM(65536), lhist16CCAM(65536), - lhist16RETI(65536), + lhist16RETI(), histCropped(65536), lhist16Clad(65536), lhist16CLlad(65536), lhist16LClad(65536), lhist16LLClad(65536), @@ -236,6 +236,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } if (params.retinex.enabled) { + lhist16RETI(32768); lhist16RETI.clear(); imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, lhist16RETI); diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index f66fb39af..6773e7a12 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -47,7 +47,6 @@ #include "opthelper.h" #include "StopWatch.h" -#define MAX_RETINEX_SCALES 8 #define clipretinex( val, minv, maxv ) (( val = (val < minv ? minv : val ) ) > maxv ? maxv : val ) #define med3(a0,a1,a2,a3,a4,a5,a6,a7,a8,median) { \ @@ -60,13 +59,9 @@ PIX_SORT(pp[3],pp[6]); PIX_SORT(pp[1],pp[4]); PIX_SORT(pp[2],pp[5]); \ PIX_SORT(pp[4],pp[7]); PIX_SORT(pp[4],pp[2]); PIX_SORT(pp[6],pp[4]); \ PIX_SORT(pp[4],pp[2]); median=pp[4];} //pp4 = median -namespace rtengine + +namespace { - -extern const Settings* settings; - -static float RetinexScales[MAX_RETINEX_SCALES]; - void retinex_scales( float* scales, int nscales, int mode, int s, float high) { if ( nscales == 1 ) { @@ -102,6 +97,7 @@ void retinex_scales( float* scales, int nscales, int mode, int s, float high) } } } + void mean_stddv2( float **dst, float &mean, float &stddv, int W_L, int H_L, float &maxtr, float &mintr) { // summation using double precision to avoid too large summation error for large pictures @@ -123,14 +119,8 @@ void mean_stddv2( float **dst, float &mean, float &stddv, int W_L, int H_L, floa sum += dst[i][j]; vsquared += (dst[i][j] * dst[i][j]); - if ( dst[i][j] > lmax) { - lmax = dst[i][j] ; - } - - if ( dst[i][j] < lmin) { - lmin = dst[i][j] ; - } - + lmax = dst[i][j] > lmax ? dst[i][j] : lmax; + lmin = dst[i][j] < lmin ? dst[i][j] : lmin; } #ifdef _OPENMP @@ -148,81 +138,30 @@ void mean_stddv2( float **dst, float &mean, float &stddv, int W_L, int H_L, floa stddv = (float)sqrt(stddv); } - - - - - -void mean_stddv( float **dst, float &mean, float &stddv, int W_L, int H_L, const float factor, float &maxtr, float &mintr) - -{ - // summation using double precision to avoid too large summation error for large pictures - double vsquared = 0.f; - double sum = 0.f; - maxtr = 0.f; - mintr = 0.f; -#ifdef _OPENMP - #pragma omp parallel -#endif - { - float lmax = 0.f, lmin = 0.f; - -#ifdef _OPENMP - #pragma omp for reduction(+:sum,vsquared) // this can lead to differences, but parallel summation is more accurate -#endif - - for (int i = 0; i < H_L; i++ ) - for (int j = 0; j < W_L; j++) { - sum += dst[i][j]; - vsquared += (dst[i][j] * dst[i][j]); - - if ( dst[i][j] > lmax) { - lmax = dst[i][j] ; - } - - if ( dst[i][j] < lmin) { - lmin = dst[i][j] ; - } - - } - -#ifdef _OPENMP - #pragma omp critical -#endif - { - maxtr = maxtr > lmax ? maxtr : lmax; - mintr = mintr < lmin ? mintr : lmin; - } - - } - - sum *= factor; - maxtr *= factor; - mintr *= factor; - vsquared *= (factor * factor); - mean = sum / (float) (W_L * H_L); - vsquared /= (float) W_L * H_L; - stddv = ( vsquared - (mean * mean) ); - stddv = (float)sqrt(stddv); } + +namespace rtengine +{ + +extern const Settings* settings; + void RawImageSource::MSR(float** luminance, float** originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) { if (deh.enabled) {//enabled float mean, stddv, maxtr, mintr; - //float mini, delta, maxi; float delta; - float eps = 2.f; + constexpr float eps = 2.f; bool useHsl = deh.retinexcolorspace == "HSLLOG"; bool useHslLin = deh.retinexcolorspace == "HSLLIN"; float gain2 = (float) deh.gain / 100.f; //def =1 not use gain2 = useHslLin ? gain2 * 0.5f : gain2; float offse = (float) deh.offs; //def = 0 not use int iter = deh.iter; - int gradient = deh.scal; + int gradient = deh.scal; int scal = 3;//disabled scal - int nei = (int) 2.8f * deh.neigh; //def = 220 + int nei = (int) (2.8f * deh.neigh); //def = 220 float vart = (float)deh.vart / 100.f;//variance float gradvart = (float)deh.grad; float gradstr = (float)deh.grads; @@ -231,9 +170,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e limD = pow(limD, 1.7f);//about 2500 enough limD *= useHslLin ? 10.f : 1.f; float ilimD = 1.f / limD; - int moderetinex = 2; // default to 2 ( deh.retinexMethod == "high" ) float hig = ((float) deh.highl) / 100.f; - bool higplus = false ; float elogt; float hl = deh.baselog; scal = deh.skal; @@ -248,50 +185,43 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e int W_L = width; float *tran[H_L] ALIGNED16; - float *tranBuffer; - int viewmet = 0; + float *tranBuffer = nullptr; elogt = 2.71828f;//disabled baselog - FlatCurve* shcurve = NULL;//curve L=f(H) bool lhutili = false; - if (deh.enabled) { - shcurve = new FlatCurve(deh.lhcurve); + FlatCurve* shcurve = new FlatCurve(deh.lhcurve); //curve L=f(H) - if (!shcurve || shcurve->isIdentity()) { - if (shcurve) { - delete shcurve; - shcurve = NULL; - } - } else { - lhutili = true; + if (!shcurve || shcurve->isIdentity()) { + if (shcurve) { + delete shcurve; + shcurve = nullptr; } + } else { + lhutili = true; } + bool higplus = false ; + int moderetinex = 2; // default to 2 ( deh.retinexMethod == "high" ) + if(deh.retinexMethod == "highliplus") { higplus = true; - } - - if (deh.retinexMethod == "uni") { + moderetinex = 3; + } else if (deh.retinexMethod == "uni") { moderetinex = 0; - } - - if (deh.retinexMethod == "low") { + } else if (deh.retinexMethod == "low") { moderetinex = 1; - } - - if (deh.retinexMethod == "highli" || deh.retinexMethod == "highliplus") { + } else { /*if (deh.retinexMethod == "highli") */ moderetinex = 3; } - for(int it = 1; it < iter + 1; it++) { //iter nb max of iterations - float aahi = 49.f / 99.f; ////reduce sensibility 50% - float bbhi = 1.f - aahi; - float high; - high = bbhi + aahi * (float) deh.highl; + constexpr float aahi = 49.f / 99.f; ////reduce sensibility 50% + constexpr float bbhi = 1.f - aahi; + + for(int it = 1; it < iter + 1; it++) { //iter nb max of iterations + float high = bbhi + aahi * (float) deh.highl; - float grads; float grad = 1.f; float sc = scal; @@ -382,7 +312,6 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } scal = round(sc); - float strengthx; float ks = 1.f; if(gradstr != 0) { @@ -413,8 +342,11 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } } - strengthx = ks * strength; - //printf("scale=%d\n", scal); + float strengthx = ks * strength; + + constexpr auto maxRetinexScales = 8; + float RetinexScales[maxRetinexScales]; + retinex_scales( RetinexScales, scal, moderetinex, nei / grad, high ); float *src[H_L] ALIGNED16; @@ -428,39 +360,28 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e int shHighlights = deh.highlights; int shShadows = deh.shadows; + int mapmet = 0; if(deh.mapMethod == "map") { mapmet = 2; - } - - if(deh.mapMethod == "mapT") { + } else if(deh.mapMethod == "mapT") { mapmet = 3; - } - - /*if(deh.mapMethod == "curv") { - mapmet = 1; - }*/ - - if(deh.mapMethod == "gaus") { + } else if(deh.mapMethod == "gaus") { mapmet = 4; } const double shradius = mapmet == 4 ? (double) deh.radius : 40.; + int viewmet = 0; + if(deh.viewMethod == "mask") { viewmet = 1; - } - - if(deh.viewMethod == "tran") { + } else if(deh.viewMethod == "tran") { viewmet = 2; - } - - if(deh.viewMethod == "tran2") { + } else if(deh.viewMethod == "tran2") { viewmet = 3; - } - - if(deh.viewMethod == "unsharp") { + } else if(deh.viewMethod == "unsharp") { viewmet = 4; } @@ -554,6 +475,12 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e #endif if(mapmet > 0 && mapcontlutili && it == 1) { + // TODO: When rgbcurvespeedup branch is merged into master we can simplify the code by + // 1) in rawimagesource.retinexPrepareCurves() insert + // mapcurve *= 0.5f; + // after + // CurveFactory::mapcurve (mapcontlutili, retinexParams.mapcurve, mapcurve, 1, lhist16RETI, histLRETI); + // 2) remove the division by 2.f from the code 7 lines below this line #ifdef _OPENMP #pragma omp parallel for #endif @@ -567,21 +494,21 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } if(((mapmet == 2 && scale > 2) || mapmet == 3 || mapmet == 4) && it == 1) { - - + float hWeight = (100.f - shHighlights) / 100.f; + float sWeight = (100.f - shShadows) / 100.f; #ifdef _OPENMP - #pragma omp parallel for + #pragma omp parallel for schedule(dynamic,16) #endif for (int i = 0; i < H_L; i++) { for (int j = 0; j < W_L; j++) { - double mapval = 1.0 + shmap->map[i][j]; - double factor = 1.0; + float mapval = 1.f + shmap->map[i][j]; + float factor = 1.f; if (mapval > h_th) { - factor = (h_th + (100.0 - shHighlights) * (mapval - h_th) / 100.0) / mapval; + factor = (h_th + hWeight * (mapval - h_th)) / mapval; } else if (mapval < s_th) { - factor = (s_th - (100.0 - shShadows) * (s_th - mapval) / 100.0) / mapval; + factor = (s_th - sWeight * (s_th - mapval)) / mapval; } out[i][j] *= factor; @@ -629,10 +556,9 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } } - shmap = NULL; + shmap = nullptr; delete [] buffer; - //delete [] outBuffer; delete [] srcBuffer; mean = 0.f; @@ -657,6 +583,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e bmax *= 500.f; amin *= 500.f; bmin *= 500.f; + #ifdef _OPENMP #pragma omp parallel #endif @@ -676,6 +603,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e absciss = amin * luminance[i][j] + bmin; } + //TODO : move multiplication by 4.f and subtraction of 1.f inside the curve luminance[i][j] *= (-1.f + 4.f * dehatransmissionCurve[absciss]); //new transmission if(viewmet == 3 || viewmet == 2) { @@ -797,10 +725,9 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e #pragma omp parallel #endif { - float absciss; float cdmax = -999999.f, cdmin = 999999.f; #ifdef _OPENMP - #pragma omp for + #pragma omp for schedule(dynamic,16) nowait #endif for ( int i = 0; i < H_L; i ++ ) @@ -808,6 +735,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e float gan; if (dehagaintransmissionCurve && mean != 0.f && stddv != 0.f) { + float absciss; if (LIKELY(fabsf(luminance[i][j] - mean) < stddv)) { absciss = asig * luminance[i][j] + bsig; @@ -819,6 +747,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e // float cd = cdfactor * ( luminance[i][j] - mini ) + offse; + // TODO : move multiplication by 2.f inside the curve gan = 2.f * (dehagaintransmissionCurve[absciss]); //new gain function transmission } else { gan = 0.5f; @@ -826,17 +755,12 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e float cd = gan * cdfactor * ( luminance[i][j] ) + offse; - if(cd > cdmax) { - cdmax = cd; - } - - if(cd < cdmin) { - cdmin = cd; - } + cdmax = cd > cdmax ? cd : cdmax; + cdmin = cd < cdmin ? cd : cdmin; float str = strengthx; - if(lhutili && it == 1) { // S=f(H) + if(lhutili && it == 1) { // S=f(H) { float HH = exLuminance[i][j]; float valparam; @@ -851,31 +775,23 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } } - if(exLuminance[i][j] > 65535.f * hig && higplus) { + if(higplus && exLuminance[i][j] > 65535.f * hig) { str *= hig; } if(viewmet == 0) { - luminance[i][j] = clipretinex( cd, 0.f, 32768.f ) * str + (1.f - str) * originalLuminance[i][j]; - } - - if(viewmet == 1) { + luminance[i][j] = intp(str, clipretinex( cd, 0.f, 32768.f ), originalLuminance[i][j]); + } else if(viewmet == 1) { luminance[i][j] = out[i][j]; - } - - if(viewmet == 4) { - luminance[i][j] = (1.f + str) * originalLuminance[i][j] - str * out[i][j]; //unsharp - } - - if(viewmet == 2) { + } else if(viewmet == 4) { + luminance[i][j] = originalLuminance[i][j] + str * (originalLuminance[i][j] - out[i][j]);//unsharp + } else if(viewmet == 2) { if(tran[i][j] <= mean) { luminance[i][j] = azb + aza * tran[i][j]; //auto values } else { luminance[i][j] = bzb + bza * tran[i][j]; } - } - - if(viewmet == 3) { + } else { /*if(viewmet == 3) */ luminance[i][j] = 1000.f + tran[i][j] * 700.f; //arbitrary values to help display log values which are between -20 to + 30 - usage values -4 + 5 } @@ -890,23 +806,23 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } } + delete [] outBuffer; - outBuffer = NULL; + outBuffer = nullptr; //printf("cdmin=%f cdmax=%f\n",minCD, maxCD); Tmean = mean; Tsigma = stddv; Tmin = mintr; Tmax = maxtr; - - if (shcurve && it == 1) { + if (shcurve) { delete shcurve; + shcurve = nullptr; } } - if(viewmet == 3 || viewmet == 2) { + if(tranBuffer) { delete [] tranBuffer; - tranBuffer = NULL; } } diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 27ddb6b3c..2780c033f 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1764,7 +1764,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le LCPProfile *pLCPProf = lcpStore->getProfile(lensProf.lcpFile); if (pLCPProf) { // don't check focal length to allow distortion correction for lenses without chip, also pass dummy focal length 1 in case of 0 - LCPMapper map(pLCPProf, max(idata->getFocalLen(),1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1); + LCPMapper map(pLCPProf, max(idata->getFocalLen(), 1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1); #ifdef _OPENMP #pragma omp parallel for @@ -1970,7 +1970,6 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar LUTf *retinexgamtab;//gamma before and after Retinex to restore tones LUTf lutTonereti; - lutTonereti(65536); if(retinexParams.gammaretinex == "low") { retinexgamtab = &(Color::gammatab_115_2); @@ -1986,24 +1985,33 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar double gamm2 = retinexParams.gam; if(gamm2 < 1.) { - pwr = 1. / pwr; - gamm = 1. / gamm; + std::swap(pwr, gamm); } int mode = 0, imax = 0; Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope // printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); + double start; + double add; + + if(gamm2 < 1.) { + start = g_a2; + add = g_a4; + } else { + start = g_a3; + add = g_a4; + } + + double mul = 1. + g_a4; + + lutTonereti(65536); + for (int i = 0; i < 65536; i++) { double val = (i) / 65535.; - double start = g_a3; - double add = g_a4; - double mul = 1. + g_a4; double x; if(gamm2 < 1.) { - start = g_a2; - add = g_a4; x = Color::igammareti (val, gamm, start, ts, mul , add); } else { x = Color::gammareti (val, gamm, start, ts, mul , add); @@ -2055,6 +2063,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } */ if(retinexParams.gammaretinex != "none" && retinexParams.str != 0) {//gamma + #ifdef _OPENMP #pragma omp parallel for #endif @@ -2083,7 +2092,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar if(lhist16RETI) { - lhist16RETIThr(32769, 0); + lhist16RETIThr(lhist16RETI.getSize()); lhist16RETIThr.clear(); } @@ -2101,7 +2110,6 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar for (; j < W - border - 3; j += 4) { vfloat H, S, L; - int pos; Color::rgb2hsl(LVFU(red[i][j]), LVFU(green[i][j]), LVFU(blue[i][j]), H, S, L); STVFU(conversionBuffer[0][i - border][j - border], H); STVFU(conversionBuffer[1][i - border][j - border], S); @@ -2111,7 +2119,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar if(lhist16RETI) { for(int p = 0; p < 4; p++) { - pos = (int) clipretinex( conversionBuffer[2][i - border][j - border + p], 0.f, 32768.f);//histogram in curve HSL + int pos = ( conversionBuffer[2][i - border][j - border + p]);//histogram in curve HSL lhist16RETIThr[pos]++; } } @@ -2121,14 +2129,13 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar for (; j < W - border; j++) { float H, S, L; - int pos; //rgb=>lab Color::rgb2hslfloat(red[i][j], green[i][j], blue[i][j], conversionBuffer[0][i - border][j - border], conversionBuffer[1][i - border][j - border], L); L *= 32768.f; conversionBuffer[2][i - border][j - border] = L; if(lhist16RETI) { - pos = (int) clipretinex(L, 0, 32768); + int pos = L; lhist16RETIThr[pos]++; } } @@ -2139,10 +2146,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar { if(lhist16RETI) { - // Add per Thread LUT to global LUT - for(int i = 0; i < 32769; i++) { - lhist16RETI[i] += lhist16RETIThr[i]; - } + lhist16RETI += lhist16RETIThr; // Add per Thread LUT to global LUT } } #endif @@ -2150,10 +2154,10 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } } else { TMatrix wprof = iccStore->workingSpaceMatrix (cmp.working); - double wp[3][3] = { - {wprof[0][0], wprof[0][1], wprof[0][2]}, - {wprof[1][0], wprof[1][1], wprof[1][2]}, - {wprof[2][0], wprof[2][1], wprof[2][2]} + float wp[3][3] = { + {static_cast(wprof[0][0]), static_cast(wprof[0][1]), static_cast(wprof[0][2])}, + {static_cast(wprof[1][0]), static_cast(wprof[1][1]), static_cast(wprof[1][2])}, + {static_cast(wprof[2][0]), static_cast(wprof[2][1]), static_cast(wprof[2][2])} }; // Conversion rgb -> lab is hard to vectorize because it uses a lut (that's not the main problem) @@ -2166,25 +2170,19 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar LUTu lhist16RETIThr; if(lhist16RETI) { - lhist16RETIThr(32769, 0); + lhist16RETIThr(lhist16RETI.getSize()); lhist16RETIThr.clear(); } #ifdef _OPENMP - #pragma omp for + #pragma omp for schedule(dynamic,16) #endif for (int i = border; i < H - border; i++ ) for (int j = border; j < W - border; j++) { float X, Y, Z, L, aa, bb; - int pos; - float R_, G_, B_; - R_ = red[i][j]; - G_ = green[i][j]; - B_ = blue[i][j]; - float k; //rgb=>lab - Color::rgbxyz(R_, G_, B_, X, Y, Z, wp); + Color::rgbxyz(red[i][j], green[i][j], blue[i][j], X, Y, Z, wp); //convert Lab Color::XYZ2Lab(X, Y, Z, L, aa, bb); conversionBuffer[0][i - border][j - border] = aa; @@ -2195,7 +2193,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar // if(R_>40000.f && G_ > 30000.f && B_ > 30000.f) conversionBuffer[3][i - border][j - border] = R_; // else conversionBuffer[3][i - border][j - border] = 0.f; if(lhist16RETI) { - pos = (int) clipretinex(L, 0, 32768); + int pos = L; lhist16RETIThr[pos]++;//histogram in Curve Lab } } @@ -2204,10 +2202,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar #pragma omp critical { if(lhist16RETI) { - // Add per Thread LUT to global LUT - for(int i = 0; i < 32769; i++) { - lhist16RETI[i] += lhist16RETIThr[i]; - } + lhist16RETI += lhist16RETIThr; // Add per Thread LUT to global LUT } } #endif @@ -2263,23 +2258,29 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC int mode = 0, imax = 0; if(gamm2 < 1.) { - pwr = 1. / pwr; - gamm = 1. / gamm; + std::swap(pwr, gamm); } Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope + double mul = 1. + g_a4; + double add; + double start; + + if(gamm2 < 1.) { + start = g_a3; + add = g_a3; + } else { + add = g_a4; + start = g_a2; + } + // printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); for (int i = 0; i < 65536; i++) { double val = (i) / 65535.; double x; - double mul = 1. + g_a4; - double add = g_a4; - double start = g_a2; if(gamm2 < 1.) { - start = g_a3; - add = g_a3; x = Color::gammareti (val, gamm, start, ts, mul , add); } else { x = Color::igammareti (val, gamm, start, ts, mul , add); @@ -2303,11 +2304,10 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC float val; if(dehacontlutili && histLRETI) { - hist16RET(32769, 0); + hist16RET(32768); hist16RET.clear(); histLRETI.clear(); - dLcurve(32769, 0); - dLcurve.clear(); + dLcurve(32768); } FlatCurve* chcurve = NULL;//curve c=f(H) @@ -2335,8 +2335,8 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC // one LUT per thread LUTu hist16RETThr; - if(dehacontlutili && histLRETI) { - hist16RETThr(32769, 0); + if(hist16RET) { + hist16RETThr(hist16RET.getSize()); hist16RETThr.clear(); } @@ -2350,7 +2350,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC LBuffer[i][j] = cdcurve[2.f * temp[i][j]] / 2.f; if(histLRETI) { - int pos = (int) clipretinex(LBuffer[i][j], 0.f, 32768.f); + int pos = LBuffer[i][j]; hist16RETThr[pos]++; //histogram in Curve } } @@ -2363,24 +2363,24 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC #pragma omp critical #endif { - if(dehacontlutili && histLRETI) { - // Add per Thread LUT to global LUT - for(int i = 0; i < 32769; i++) { - hist16RET[i] += hist16RETThr[i]; - } + if(hist16RET) { + hist16RET += hist16RETThr; // Add per Thread LUT to global LUT } } } - if(dehacontlutili && histLRETI) {//update histogram + if(hist16RET) {//update histogram + // TODO : When rgbcurvesspeedup branch is merged into master, replace this by the following 1-liner + // hist16RET.compressTo(histLRETI); + // also remove declaration and init of dLcurve some lines above then and finally remove this comment :) for (int i = 0; i < 32768; i++) { val = (double)i / 32767.0; - dLcurve[i] = CLIPD(val); + dLcurve[i] = val; } for (int i = 0; i < 32768; i++) { float hval = dLcurve[i]; - int hi = (int)(255.0f * CLIPD(hval)); + int hi = (int)(255.0f * hval); histLRETI[hi] += hist16RET[i]; } } @@ -2399,7 +2399,6 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC for (; j < W - border; j++) { float valp; - float chr; // if(chutili) { // c=f(H) { valp = float((chcurve->getVal(conversionBuffer[3][i - border][j - border]) - 0.5f)); @@ -4365,12 +4364,12 @@ void RawImageSource::hlRecovery (std::string method, float* red, float* green, f void RawImageSource::getAutoExpHistogram (LUTu & histogram, int& histcompr) { -BENCHFUN + BENCHFUN histcompr = 3; histogram(65536 >> histcompr); histogram.clear(); - const float refwb[3] = {static_cast(refwb_red),static_cast(refwb_green),static_cast(refwb_blue)}; + const float refwb[3] = {static_cast(refwb_red), static_cast(refwb_green), static_cast(refwb_blue)}; #ifdef _OPENMP #pragma omp parallel @@ -4388,11 +4387,11 @@ BENCHFUN if (ri->getSensorType() == ST_BAYER) { for (int j = start; j < end; j++) { - tmphistogram[(int)(refwb[ri->FC(i,j)] * rawData[i][j]) >> histcompr] += 4; + tmphistogram[(int)(refwb[ri->FC(i, j)] * rawData[i][j]) >> histcompr] += 4; } } else if (ri->getSensorType() == ST_FUJI_XTRANS) { for (int j = start; j < end; j++) { - tmphistogram[(int)(refwb[ri->XTRANSFC(i,j)] * rawData[i][j]) >> histcompr] += 4; + tmphistogram[(int)(refwb[ri->XTRANSFC(i, j)] * rawData[i][j]) >> histcompr] += 4; } } else if (ri->get_colors() == 1) { for (int j = start; j < end; j++) { @@ -4419,7 +4418,7 @@ BENCHFUN // Histogram MUST be 256 in size; gamma is applied, blackpoint and gain also void RawImageSource::getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw) { -BENCHFUN + BENCHFUN histRedRaw.clear(); histGreenRaw.clear(); histBlueRaw.clear(); @@ -4429,17 +4428,19 @@ BENCHFUN 65535.0f / ri->get_white(3) }; - const bool fourColours = ri->getSensorType() == ST_BAYER && ((mult[1] != mult[3] || cblacksom[1] != cblacksom[3]) || FC(0,0) == 3 || FC(0,1) == 3 || FC(1,0) == 3 || FC(1,1) == 3); + const bool fourColours = ri->getSensorType() == ST_BAYER && ((mult[1] != mult[3] || cblacksom[1] != cblacksom[3]) || FC(0, 0) == 3 || FC(0, 1) == 3 || FC(1, 0) == 3 || FC(1, 1) == 3); LUTu hist[4]; hist[0](65536); hist[0].clear(); + if (ri->get_colors() > 1) { hist[1](65536); hist[1].clear(); hist[2](65536); hist[2].clear(); } + if (fourColours) { hist[3](65536); hist[3].clear(); @@ -4458,16 +4459,19 @@ BENCHFUN LUTu tmphist[4]; tmphist[0](65536); tmphist[0].clear(); + if (ri->get_colors() > 1) { tmphist[1](65536); tmphist[1].clear(); tmphist[2](65536); tmphist[2].clear(); + if (fourColours) { tmphist[3](65536); tmphist[3].clear(); } } + #ifdef _OPENMP #pragma omp for nowait #endif @@ -4514,9 +4518,11 @@ BENCHFUN #endif { hist[0] += tmphist[0]; + if (ri->get_colors() > 1) { hist[1] += tmphist[1]; hist[2] += tmphist[2]; + if (fourColours) { hist[3] += tmphist[3]; } @@ -4528,13 +4534,16 @@ BENCHFUN int idx; idx = CLIP((int)Color::gamma(mult[0] * (i - (cblacksom[0]/*+black_lev[0]*/)))); histRedRaw[idx >> 8] += hist[0][i]; + if (ri->get_colors() > 1) { idx = CLIP((int)Color::gamma(mult[1] * (i - (cblacksom[1]/*+black_lev[1]*/)))); histGreenRaw[idx >> 8] += hist[1][i]; + if (fourColours) { idx = CLIP((int)Color::gamma(mult[3] * (i - (cblacksom[3]/*+black_lev[3]*/)))); histGreenRaw[idx >> 8] += hist[3][i]; } + idx = CLIP((int)Color::gamma(mult[2] * (i - (cblacksom[2]/*+black_lev[2]*/)))); histBlueRaw[idx >> 8] += hist[2][i]; } @@ -4574,6 +4583,7 @@ void RawImageSource::getAutoWBMultipliers (double &rm, double &gm, double &bm) { BENCHFUN constexpr double clipHigh = 64000.0; + if (ri->get_colors() == 1) { rm = gm = bm = 1; return; @@ -4653,6 +4663,7 @@ void RawImageSource::getAutoWBMultipliers (double &rm, double &gm, double &bm) #ifdef _OPENMP #pragma omp for schedule(dynamic,16) nowait #endif + for (int i = 32; i < H - 32; i++) { for (int j = 32; j < W - 32; j++) { // each loop read 1 rgb triplet value From e8595890c5bf2dffa1d2cbd6e95c35b502e8fc68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Thu, 12 May 2016 20:21:17 +0200 Subject: [PATCH 34/57] Final cleanups --- rtengine/clutstore.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index 2724ed34e..f738c3da9 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -80,21 +80,23 @@ bool loadFile( #ifdef __SSE2__ vfloat2 getClutValues(const AlignedBuffer& clut_image, size_t index) { - const __m128i v_values = _mm_loadu_si128(reinterpret_cast(clut_image.data + index)); + const vint v_values = _mm_loadu_si128(reinterpret_cast(clut_image.data + index)); #ifdef __SSE4_1__ return { _mm_cvtepi32_ps(_mm_cvtepu16_epi32(v_values)), _mm_cvtepi32_ps(_mm_cvtepu16_epi32(_mm_srli_si128(v_values, 8))) }; #else - vint lowval = _mm_shuffle_epi32(v_values, _MM_SHUFFLE(1, 0, 1, 0)); - vint highval = _mm_shuffle_epi32(v_values, _MM_SHUFFLE(3, 2, 3, 2)); - lowval = _mm_shufflelo_epi16(lowval, _MM_SHUFFLE(1, 1, 0, 0)); - highval = _mm_shufflelo_epi16(highval, _MM_SHUFFLE(1, 1, 0, 0)); - lowval = _mm_shufflehi_epi16(lowval, _MM_SHUFFLE(3, 3, 2, 2)); - highval = _mm_shufflehi_epi16(highval, _MM_SHUFFLE(3, 3, 2, 2)); - lowval = vandm(lowval, _mm_set1_epi32(0x0000ffff)); - highval = vandm(highval, _mm_set1_epi32(0x0000ffff)); + const vint v_mask = _mm_set1_epi32(0x0000FFFF); + + vint v_low = _mm_shuffle_epi32(v_values, _MM_SHUFFLE(1, 0, 1, 0)); + vint v_high = _mm_shuffle_epi32(v_values, _MM_SHUFFLE(3, 2, 3, 2)); + v_low = _mm_shufflelo_epi16(v_low, _MM_SHUFFLE(1, 1, 0, 0)); + v_high = _mm_shufflelo_epi16(v_high, _MM_SHUFFLE(1, 1, 0, 0)); + v_low = _mm_shufflehi_epi16(v_low, _MM_SHUFFLE(3, 3, 2, 2)); + v_high = _mm_shufflehi_epi16(v_high, _MM_SHUFFLE(3, 3, 2, 2)); + v_low = vandm(v_low, m_mask); + v_high = vandm(v_high, v_mask); return { _mm_cvtepi32_ps(lowval), From aa2912531644cf66c2565c73776f13de67ef3e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Thu, 12 May 2016 21:44:20 +0200 Subject: [PATCH 35/57] Read-ahead of `getClutValues()` is only one pixel now --- rtengine/clutstore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index f738c3da9..5fd2cfae3 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -56,7 +56,7 @@ bool loadFile( img_src.convertColorSpace(img_float.get(), icm, curr_wb); } - AlignedBuffer image(fw * fh * 4 + 8); // + 8 because of SSE4_1 version of getClutValues + AlignedBuffer image(fw * fh * 4 + 4); // getClutValues() loads one pixel in advance std::size_t index = 0; From e8d90698cfe2bfb5c5a05ffe4d7b4cf113829c8f Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 14 May 2016 14:26:56 +0200 Subject: [PATCH 36/57] Fix copy/paste bugs --- rtengine/clutstore.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index 5fd2cfae3..e8f1c920e 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -95,12 +95,12 @@ vfloat2 getClutValues(const AlignedBuffer& clut_image, size_t ind v_high = _mm_shufflelo_epi16(v_high, _MM_SHUFFLE(1, 1, 0, 0)); v_low = _mm_shufflehi_epi16(v_low, _MM_SHUFFLE(3, 3, 2, 2)); v_high = _mm_shufflehi_epi16(v_high, _MM_SHUFFLE(3, 3, 2, 2)); - v_low = vandm(v_low, m_mask); + v_low = vandm(v_low, v_mask); v_high = vandm(v_high, v_mask); return { - _mm_cvtepi32_ps(lowval), - _mm_cvtepi32_ps(highval) + _mm_cvtepi32_ps(v_low), + _mm_cvtepi32_ps(v_high) }; #endif } From 80f86c7189c4b88ee51fddbef5874e312aedf648 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 14 May 2016 19:29:26 +0200 Subject: [PATCH 37/57] Histogram of working space does not show 'gray2C' for gray regions, fixes #3283, fixes #3213, kudos to mmmtok for providing the patch --- rtengine/iplab2rgb.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 21e5ca794..79a45c99e 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -202,7 +202,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, } } else { - const auto rgb_xyz = iccStore->workingSpaceMatrix (profile); + const auto xyz_rgb = iccStore->workingSpaceInverseMatrix (profile); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) @@ -227,7 +227,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, float z_ = 65535.0 * Color::f2xyz(fz) * Color::D50z; float y_ = (LL > Color::epskap) ? 65535.0 * fy * fy * fy : 65535.0 * LL / Color::kappa; - Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyz); + Color::xyz2rgb(x_, y_, z_, R, G, B, xyz_rgb); image->data[ix++] = (int)Color::gamma2curve[CLIP(R)] >> 8; image->data[ix++] = (int)Color::gamma2curve[CLIP(G)] >> 8; From 89a7ebac166483a6f3deb5bd139a4c5917083558 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 16 May 2016 19:13:35 +0200 Subject: [PATCH 38/57] fix wrong condition in Color::transitred --- rtengine/color.cc | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/rtengine/color.cc b/rtengine/color.cc index dc0710a2f..3684891df 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -1844,21 +1844,13 @@ void Color::transitred (const float HH, float const Chprov1, const float dred, c if(HH >= 0.15f && HH < 1.3f) { if (Chprov1 < dred) { factor = factorskin; - } else if(Chprov1 < (dred + protect_red)) - // factor = (factorsat-factorskin)/protect_red*Chprov1+factorsat-(dred+protect_red)*(factorsat-factorskin)/protect_red; - // optimized formula - { + } else if(Chprov1 < (dred + protect_red)) { factor = ((factorsat - factorskin) * Chprov1 + factorsat * protect_red - (dred + protect_red) * (factorsat - factorskin)) / protect_red; } - } - // then test if chroma is in the extanded range - else if ( HH > (0.15f - deltaHH) || HH < (1.3f + deltaHH) ) { + } else if ( HH > (0.15f - deltaHH) && HH < (1.3f + deltaHH) ) { // test if chroma is in the extended range if (Chprov1 < dred) { factor = factorskinext; // C=dred=55 => real max of skin tones - } else if (Chprov1 < (dred + protect_red)) // transition - // factor = (factorsat-factorskinext)/protect_red*Chprov1+factorsat-(dred+protect_red)*(factorsat-factorskinext)/protect_red; - // optimized formula - { + } else if (Chprov1 < (dred + protect_red)) {// transition factor = ((factorsat - factorskinext) * Chprov1 + factorsat * protect_red - (dred + protect_red) * (factorsat - factorskinext)) / protect_red; } } From 68a77f26f631651c11716d3f609eedc8dea8a0de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 17 May 2016 20:51:14 +0200 Subject: [PATCH 39/57] Fix std::out_of_range exception with empty HaldCLUT basename User jgschaefer [reported an error on pixls.us](https://discuss.pixls.us/t/rt-build-from-git-crash-on-launch-debian-testing-64-bit/1425) which could be traced down to an empty basename for a HaldCLUT. The original implementation did not throw an exception due to the use of `std::string::substr()` instead of `std::string::erase()`, but silently assigned the first working profile to `profile_name`. --- rtengine/clutstore.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index e8f1c920e..f3ef27a79 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -283,11 +283,16 @@ void rtengine::HaldCLUT::splitClutFilename( profile_name = "sRGB"; - for (const auto& working_profile : rtengine::getWorkingProfiles()) { - if (std::search(name.rbegin(), name.rend(), working_profile.rbegin(), working_profile.rend()) == name.rbegin()) { - profile_name = working_profile; - name.erase(name.size() - working_profile.size()); - break; + if (!name.empty()) { + for (const auto& working_profile : rtengine::getWorkingProfiles()) { + if ( + !working_profile.empty() // This isn't strictly needed, but an empty wp name should be skipped anyway + && std::search(name.rbegin(), name.rend(), working_profile.rbegin(), working_profile.rend()) == name.rbegin() + ) { + profile_name = working_profile; + name.erase(name.size() - working_profile.size()); + break; + } } } } From 53f03bd00cf337d0743eb2009094047ca8bb8184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 18 May 2016 20:57:46 +0200 Subject: [PATCH 40/57] Fix ODR violation When building with LTO, the compiler warns about a violation of the ODR. This commit fixes the two competing places by moving the structs into anonymous namespaces. --- rtengine/jdatasrc.cc | 4 ++++ rtengine/jpeg_memsrc.cc | 3 +++ 2 files changed, 7 insertions(+) diff --git a/rtengine/jdatasrc.cc b/rtengine/jdatasrc.cc index c8567387b..ff509301d 100644 --- a/rtengine/jdatasrc.cc +++ b/rtengine/jdatasrc.cc @@ -32,6 +32,8 @@ /* Expanded data source object for stdio input */ +namespace +{ typedef struct { struct jpeg_source_mgr pub; /* public fields */ @@ -44,6 +46,8 @@ typedef struct { typedef my_source_mgr * my_src_ptr; +} + #define INPUT_BUF_SIZE 4096 /* choose an efficiently fread'able size */ diff --git a/rtengine/jpeg_memsrc.cc b/rtengine/jpeg_memsrc.cc index 75a0b25bc..ab4ecf7d6 100644 --- a/rtengine/jpeg_memsrc.cc +++ b/rtengine/jpeg_memsrc.cc @@ -26,6 +26,8 @@ /* Expanded data source object for memory input */ +namespace +{ typedef struct { struct jpeg_source_mgr pub; /* public fields */ @@ -36,6 +38,7 @@ typedef struct { typedef my_source_mgr * my_src_ptr; +} /* * Initialize source --- called by jpeg_read_header From c556771843cd7d39ff90144b9ea352c32cbf740d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 18 May 2016 21:16:27 +0200 Subject: [PATCH 41/57] Prevent narrowing conversion when building for PowerPC --- rtengine/iccstore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 66099199c..82f280e54 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -263,7 +263,7 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) tags[i].sig == 0x6B545243) { // kTRC if (gamma_offset == 0) { gamma_offset = offset; - uint32_t pcurve[] = { htonl(0x63757276), htonl(0), htonl(gamma_size == 12 ? 0 : 1) }; + uint32_t pcurve[] = { htonl(0x63757276), htonl(0), htonl(gamma_size == 12 ? 0U : 1U) }; memcpy(&nd[offset], pcurve, 12); if (gamma_size == 14) { From 7d97d0da9311650331869db594574452524c91d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20P=C3=A9rez?= Date: Thu, 19 May 2016 15:23:37 +0200 Subject: [PATCH 42/57] Use "find_program" to search for git executable CMake's "find_file" can return non-executable files or folders, thus "find_program" must be used to ensure that only executable files are detected. Fixes issue #3290 --- AboutThisBuild.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AboutThisBuild.cmake b/AboutThisBuild.cmake index 68dea478d..2163ed0cb 100644 --- a/AboutThisBuild.cmake +++ b/AboutThisBuild.cmake @@ -5,13 +5,13 @@ find_file(REL_INFO_FILE ReleaseInfo.cmake PATHS "${PROJECT_SOURCE_DIR}" NO_DEFAU if (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) # we look for the git command in this paths by order of preference if (WIN32) - find_file(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../) + find_program(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../) elseif (APPLE) - find_file(GIT_CMD git PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin") - find_file(GIT_CMD git) + find_program(GIT_CMD git PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin") + find_program(GIT_CMD git) set (SHELL "/bin/bash") else (WIN32) # Linux - find_file(GIT_CMD git) + find_program(GIT_CMD git) set (SHELL "/bin/bash") endif (WIN32) From 6185ce3da7db1d2547d2e9f068c58e261f68dfc1 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Sun, 22 May 2016 13:48:35 +0200 Subject: [PATCH 43/57] Regenerated translation files. --- rtdata/languages/Catala | 19 ++++++++++++++----- rtdata/languages/Chinese (Simplified) | 19 ++++++++++++++----- rtdata/languages/Chinese (Traditional) | 19 ++++++++++++++----- rtdata/languages/Czech | 11 ++++++++++- rtdata/languages/Dansk | 19 ++++++++++++++----- rtdata/languages/Deutsch | 13 +++++++++++++ rtdata/languages/English (UK) | 19 ++++++++++++++----- rtdata/languages/English (US) | 19 ++++++++++++++----- rtdata/languages/Espanol | 19 ++++++++++++++----- rtdata/languages/Euskara | 19 ++++++++++++++----- rtdata/languages/Francais | 19 ++++++++++++++----- rtdata/languages/Greek | 19 ++++++++++++++----- rtdata/languages/Hebrew | 19 ++++++++++++++----- rtdata/languages/Italiano | 19 ++++++++++++++----- rtdata/languages/Japanese | 19 ++++++++++++++----- rtdata/languages/Latvian | 19 ++++++++++++++----- rtdata/languages/Magyar | 19 ++++++++++++++----- rtdata/languages/Nederlands | 11 ++++++++++- rtdata/languages/Norsk BM | 19 ++++++++++++++----- rtdata/languages/Polish | 19 ++++++++++++++----- rtdata/languages/Polish (Latin Characters) | 19 ++++++++++++++----- rtdata/languages/Portugues (Brasil) | 19 ++++++++++++++----- rtdata/languages/Russian | 19 ++++++++++++++----- rtdata/languages/Serbian (Cyrilic Characters) | 19 ++++++++++++++----- rtdata/languages/Serbian (Latin Characters) | 19 ++++++++++++++----- rtdata/languages/Slovak | 19 ++++++++++++++----- rtdata/languages/Suomi | 19 ++++++++++++++----- rtdata/languages/Swedish | 19 ++++++++++++++----- rtdata/languages/Turkish | 19 ++++++++++++++----- rtdata/languages/default | 18 +++++++++--------- 30 files changed, 406 insertions(+), 141 deletions(-) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 7ed78149f..afcb829a2 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -1271,14 +1271,14 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1300,8 +1300,10 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1780,8 +1782,12 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1801,6 +1807,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1820,10 +1827,11 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1831,6 +1839,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 5c6f5a39f..48b139f0f 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -1188,14 +1188,14 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1217,8 +1217,10 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 !MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronize the File Browser or Filmstrip with the Editor to reveal the thumbnail of the currently opened image, and clear any active filters.\nShortcut: x\n\nAs above, but without clearing active filters:\nShortcut: y\n(Note that the thumbnail of the opened image will not be shown if filtered out). @@ -1750,8 +1752,12 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1771,6 +1777,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1790,10 +1797,11 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1801,6 +1809,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index c79d07525..055d1f2b2 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -923,14 +923,14 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -952,8 +952,10 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1712,8 +1714,12 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1733,6 +1739,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1752,10 +1759,11 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1763,6 +1771,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index e1c7bc704..4a2e3a9bd 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -2009,8 +2009,10 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening @@ -2030,11 +2032,16 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !TP_RETINEX_CONTEDIT_MAP;Mask equalizer !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GRAD;Transmission gradient !TP_RETINEX_GRADS;Strength gradient !TP_RETINEX_GRADS_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Strength is reduced when iterations increase, and conversely. !TP_RETINEX_GRAD_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Variance and Threshold are reduced when iterations increase, and conversely. !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL_MASK;Mask !TP_RETINEX_MAP;Mask method @@ -2045,6 +2052,8 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !TP_RETINEX_MAP_NONE;None !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. +!TP_RETINEX_SKAL;Scale +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_VIEW;Process !TP_RETINEX_VIEW_MASK;Mask !TP_RETINEX_VIEW_METHOD_TOOLTIP;Standard - Normal display.\nMask - Displays the mask.\nUnsharp mask - Displays the image with a high radius unsharp mask.\nTransmission - Auto/Fixed - Displays the file transmission-map, before any action on contrast and brightness.\n\nAttention: the mask does not correspond to reality, but is amplified to make it more visible. diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index 46e8049d6..c22a60c37 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 48a293051..79675b740 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -2043,3 +2043,16 @@ ZOOMPANEL_ZOOMFITSCREEN;An Bildschirm anpassen\nTaste: f ZOOMPANEL_ZOOMIN;Hineinzoomen\nTaste: + ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - +!!!!!!!!!!!!!!!!!!!!!!!!! +! Untranslated keys follow; remove the ! prefix after an entry is translated. +!!!!!!!!!!!!!!!!!!!!!!!!! + +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale +!TP_RETINEX_EQUAL;Equalizer +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. +!TP_RETINEX_ITERF;Tone mapping +!TP_RETINEX_SKAL;Scale +!TP_RETINEX_TRANF;Transmission diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index d0979941b..2f97b36d1 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -718,14 +718,14 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_420;Retinex - Histogram - HSL !HISTORY_MSG_421;Retinex - Gamma @@ -746,8 +746,10 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -1679,8 +1681,12 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1700,6 +1706,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1719,10 +1726,11 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1730,6 +1738,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index 677771240..f7a82441c 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -640,14 +640,14 @@ !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -669,8 +669,10 @@ !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -1669,8 +1671,12 @@ !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1690,6 +1696,7 @@ !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1709,10 +1716,11 @@ !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1720,6 +1728,7 @@ !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 7be7aa516..215c21390 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -1674,14 +1674,14 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1703,8 +1703,10 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1853,8 +1855,12 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1874,6 +1880,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1893,10 +1900,11 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1904,6 +1912,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index 251fa4673..5a7e068d2 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 7cfe47960..d35371458 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -1893,14 +1893,14 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1922,8 +1922,10 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening @@ -1955,8 +1957,12 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1976,6 +1982,7 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1995,10 +2002,11 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -2006,6 +2014,7 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index 61a6f844f..1929b0059 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -918,14 +918,14 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -947,8 +947,10 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1710,8 +1712,12 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1731,6 +1737,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1750,10 +1757,11 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1761,6 +1769,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index e007ebcd7..54396a92f 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index 82061c24d..94329b411 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1539,14 +1539,14 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1568,8 +1568,10 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1794,8 +1796,12 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1815,6 +1821,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1834,10 +1841,11 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1845,6 +1853,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 78cfa3275..967e57e4d 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -1927,14 +1927,14 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1956,8 +1956,10 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening @@ -1987,8 +1989,12 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -2008,6 +2014,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -2027,10 +2034,11 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -2038,6 +2046,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index 4d4415e58..bfbbf4d76 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index 9600eb0ce..5183cb9de 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -1200,14 +1200,14 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1229,8 +1229,10 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1773,8 +1775,12 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1794,6 +1800,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1813,10 +1820,11 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1824,6 +1832,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index fa1dbcd09..7806899b6 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -1977,8 +1977,10 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening @@ -2002,13 +2004,18 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !TP_RETINEX_CONTEDIT_MAP;Mask equalizer !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAMMA_TOOLTIP;Restore tones by applying gamma before and after Retinex. Different from Retinex curves or others curves (Lab, Exposure, etc.). !TP_RETINEX_GRAD;Transmission gradient !TP_RETINEX_GRADS;Strength gradient !TP_RETINEX_GRADS_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Strength is reduced when iterations increase, and conversely. !TP_RETINEX_GRAD_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Variance and Threshold are reduced when iterations increase, and conversely. !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL_MASK;Mask !TP_RETINEX_MAP;Mask method @@ -2021,6 +2028,8 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !TP_RETINEX_MLABEL_TOOLTIP;Should be near min=0 max=32768\nRestored image with no mixture. !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. +!TP_RETINEX_SKAL;Scale +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_VIEW;Process !TP_RETINEX_VIEW_MASK;Mask diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index 105277339..222667cd5 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -918,14 +918,14 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -947,8 +947,10 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1710,8 +1712,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1731,6 +1737,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1750,10 +1757,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1761,6 +1769,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 5f3c30045..323d6ac8a 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1631,14 +1631,14 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1660,8 +1660,10 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1800,8 +1802,12 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1821,6 +1827,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1840,10 +1847,11 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1851,6 +1859,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index 79bf35bea..1967a9e4e 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -1631,14 +1631,14 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1660,8 +1660,10 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1800,8 +1802,12 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1821,6 +1827,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1840,10 +1847,11 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1851,6 +1859,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index a665b17e4..06cc8b37d 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index 778500cbb..5b9625741 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -1482,14 +1482,14 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1511,8 +1511,10 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1796,8 +1798,12 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1817,6 +1823,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1836,10 +1843,11 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1847,6 +1855,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index c48c5528f..dce9bfd10 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1123,14 +1123,14 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1152,8 +1152,10 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1730,8 +1732,12 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1751,6 +1757,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1770,10 +1777,11 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1781,6 +1789,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index ee2df3cdf..5a5f9d454 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -1123,14 +1123,14 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1152,8 +1152,10 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1730,8 +1732,12 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1751,6 +1757,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1770,10 +1777,11 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1781,6 +1789,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index 7ea5ead8a..a3ed2994b 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -982,14 +982,14 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1011,8 +1011,10 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1719,8 +1721,12 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1740,6 +1746,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1759,10 +1766,11 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1770,6 +1778,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index 5017c2066..f7962a735 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -920,14 +920,14 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -949,8 +949,10 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index 3f979abaf..f3ba72af8 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1758,14 +1758,14 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1787,8 +1787,10 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_COLORTONING;Color toning @@ -1881,8 +1883,12 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1902,6 +1908,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1921,10 +1928,11 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1932,6 +1940,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index d7f6fa405..b3de5a01f 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1710,8 +1712,12 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1731,6 +1737,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1750,10 +1757,11 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1761,6 +1769,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/default b/rtdata/languages/default index f4b042ec7..5998c585d 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -639,14 +639,14 @@ HISTORY_MSG_406;W - ES - Neighboring pixels HISTORY_MSG_407;Retinex - Method HISTORY_MSG_408;Retinex - Radius HISTORY_MSG_409;Retinex - Contrast -HISTORY_MSG_410;Retinex - Brightness +HISTORY_MSG_410;Retinex - Offset HISTORY_MSG_411;Retinex - Strength HISTORY_MSG_412;Retinex - Gaussian Gradient -HISTORY_MSG_413;Retinex - Variance +HISTORY_MSG_413;Retinex - Contrast HISTORY_MSG_414;Retinex - Histogram - Lab HISTORY_MSG_415;Retinex - Transmission HISTORY_MSG_416;Retinex -HISTORY_MSG_417;Retinex - Transmission median +HISTORY_MSG_417;Retinex - Transmission Median HISTORY_MSG_418;Retinex - Threshold HISTORY_MSG_419;Retinex - Color space HISTORY_MSG_420;Retinex - Histogram - HSL @@ -668,7 +668,7 @@ HISTORY_MSG_435;Retinex - M - Shadows TW HISTORY_MSG_436;Retinex - M - Radius HISTORY_MSG_437;Retinex - M - Method HISTORY_MSG_438;Retinex - M - Equalizer -HISTORY_MSG_439;Retinex - Preview +HISTORY_MSG_439;Retinex - Process HISTORY_MSG_440;CbDL - Method HISTORY_MSG_441;Retinex - Gain transmission HISTORY_MSG_442;Retinex - Scale @@ -1673,8 +1673,10 @@ TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gau TP_RETINEX_EQUAL;Equalizer TP_RETINEX_FREEGAMMA;Free gamma TP_RETINEX_GAIN;Gain -TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +TP_RETINEX_GAINTRANSMISSION;Gain transmission +TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. +TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. TP_RETINEX_GAMMA;Gamma TP_RETINEX_GAMMA_FREE;Free TP_RETINEX_GAMMA_HIGH;High @@ -1692,8 +1694,8 @@ TP_RETINEX_HIGHLIGHT;Highlight threshold TP_RETINEX_HIGHLIGHT_TOOLTIP;Increase action of High algorithm.\nMay require you to re-adjust "Neighboring pixels" and to increase the "White-point correction" in the Raw tab -> Raw White Points tool. TP_RETINEX_HSLSPACE_LIN;HSL-Linear TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic -TP_RETINEX_ITERF;Tone mapping TP_RETINEX_ITER;Iterations (Tone-mapping) +TP_RETINEX_ITERF;Tone mapping TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. TP_RETINEX_LABEL;Retinex TP_RETINEX_LABEL_MASK;Mask @@ -1717,8 +1719,8 @@ TP_RETINEX_OFFSET;Offset (brightness) TP_RETINEX_SCALES;Gaussian gradient TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. TP_RETINEX_SETTINGS;Settings -TP_RETINEX_SLOPE;Free gamma slope TP_RETINEX_SKAL;Scale +TP_RETINEX_SLOPE;Free gamma slope TP_RETINEX_STRENGTH;Strength TP_RETINEX_THRESHOLD;Threshold TP_RETINEX_THRESHOLD_TOOLTIP;Limits in/out.\nIn = image source,\nOut = image gauss. @@ -1727,8 +1729,6 @@ TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. TP_RETINEX_TRANF;Transmission TP_RETINEX_TRANSMISSION;Transmission map -TP_RETINEX_GAINTRANSMISSION;Gain transmission -TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplfy or reduce transmission-map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate : gain TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. TP_RETINEX_UNIFORM;Uniform TP_RETINEX_VARIANCE;Contrast From f490c6468221913e72626def9d9e09178c42a06b Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Sun, 22 May 2016 14:08:30 +0200 Subject: [PATCH 44/57] Updated camconst.json, #3298 --- rtengine/camconst.json | 401 +++++++++++++++++++++++++++++++++++------ 1 file changed, 341 insertions(+), 60 deletions(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 05e21576c..4dd84c829 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -179,14 +179,14 @@ we want conservative values. By conservative values we mean that if you see a white level of most often 15760 and occassionally 15759 (ie very small variation of white level which -is a common case), you set the white level around 40-80 14bit units below or -10-20 12bit units. Say at 15700 in this example, or 4080 instead of 4095 for -12bit raws. This way we get a little margin from noise and camera variation. -Since sensor raw values are linear you lose in this example log2(1-50/15760) = --0.005 stop of detail, ie irrelevant. Thus it's better to provide RawTherapee -with knowledge where the image clips rather than keeping that last 0.005 stop -of highlight information and risking that clipping will not be detected -properly. +is a common case), you set the white level around 50-100 14-bit units below or +10-20 12-bit units. Say at 15700 in this example, or 4080 instead of 4095 for +12-bit raws. This way we get a little margin from noise and camera variation. +Since sensor raw values are linear, you lose, for example, +log2(1-50/15760) = -0.005 stops of detail, i.e. irrelevant. Thus it is better +to provide RawTherapee with knowledge where the image clips rather than keeping +that last 0.005 stop of highlight information and risking that clipping will +not be detected properly. It is very usual for white level to be a bell distribution instead of a candle when the camera applies long exposure noise reduction by subtracting a black frame @@ -201,7 +201,13 @@ whole fuzzy noise peak. If a little of the starting edge of the noise will be included it's not harmful, but 99% of it should be above. This would mean that it's better to measure white level on long exposure/ high temp raws but since this if difficult and time consuming we choose to measure on normal -raws and cover the abnormalities whith the conservative WL values. +raws and cover the abnormalities with the conservative WL values. + A more detailed approach when we only have non LENR measures is to subtract +a value according to per ISO read noise. +We can find data regarding read noise (stdev of gaussian distribution) at +http://www.photonstophotos.net/Charts/RN_ADU.htm . We find the per ISO tead_noise and +subtract from the measured value 6*read_noise. This gives confidence that 99.5% of +the bell is clipped out. If you have used Adobe's DNG Converter and analyzed it's output you may have noticed that it's very conservative regarding white levels, ie it cuts away @@ -326,7 +332,7 @@ About black levels: Unlike for white levels it's much more common that black levels can be derived from the format. Either it's simply 0 (typical for old Nikon cameras, -newer Nikons (year2013-14) have a BL at around 150 12bit or 600/768 14bit ), +newer Nikons (year2013-14) have a BL at around 150 12-bit or 600/768 14-bit ), or it can be derived from masked pixels (typical for Canon cameras) or otherwise be extracted from some tag. Some formats have built-in subtraction information and are pre-processed by DCRaw @@ -412,6 +418,46 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ] } }, + { // quality C, INTERMEDIATE ISO SAMPLES MISSING + "make_model": "Canon EOS-1D X Mark II", + "dcraw_matrix": [ 7596,-978,-967,-4808,12571,2503,-1398,2567,5752 ], + // "raw_crop": [ 192, 96, 8696, 5800 ], // Full sensor 5568x3708 top38, left72, official crop left84, top50, right5555, bottom3697, 5472X3648 + // "masked_areas": [ 50, 4, 3697, 68 ], // left out 4 first columns from calculations because possibly the BL is still imbalanced there + "ranges": { + // black levels are read from raw masked pixels + // white levels are same for all colors all ISOs, but safety margin vary on ISO + "white": [ + { "iso": 50, "levels": 16350 }, // typical for all ISOs: 16383, stdev 2.25 + { "iso": 100, "levels": 16350 }, // stdev 2.25 + { "iso": [ 125, 160, 200, 250 ], "levels": 16340 }, // stdev 2.5 + { "iso": [ 320, 400, 500 ], "levels": 16330 }, // stdev 2.95 + { "iso": [ 640, 800, 1000 ], "levels": 16320 },// stdev x, 4.0 , x + { "iso": [ 1250, 1600, 2000 ], "levels": 16300 },// stdev x, 6.0 , x + { "iso": [ 2500, 3200, 4000 ], "levels": 16250 }, // STDEV x, 9.8 , x + { "iso": [ 5000, 6400, 8000 ], "levels": 16150 }, // stdev x, 17, x + { "iso": [ 10000, 12800, 16000 ], "levels": 16100 },// stdev x, 34 , x + { "iso": [ 20000, 25600, 32000 ], "levels": 16000 },// stdev x, 68 , x + { "iso": [ 40000, 51200, 64000 ], "levels": 15700 },// stdev x, 125, x + { "iso": [ 80000, 102400 ], "levels": 15100 },// stdev x, 245 + { "iso": [ 204800 ], "levels": 14000 }, + { "iso": [ 409600 ], "levels": 13000 } + ], + "white_max": 16383, + "aperture_scaling": [ + /* no need for aperture scaling because typical WL is 16383 at all ISOs .. */ + { "aperture": 1.2, "scale_factor": 1.130 }, // guessed by relative 6D data + { "aperture": 1.4, "scale_factor": 1.090 }, + { "aperture": 1.6, "scale_factor": 1.060 }, + { "aperture": 1.8, "scale_factor": 1.040 }, + { "aperture": 2.0, "scale_factor": 1.030 }, + { "aperture": 2.2, "scale_factor": 1.020 }, + { "aperture": 2.5, "scale_factor": 1.015 }, + { "aperture": 2.8, "scale_factor": 1.010 }, + { "aperture": 3.2, "scale_factor": 1.005 }, + { "aperture": 3.5, "scale_factor": 1.003 } + ] + } + }, { // quality A, "make_model": "Canon EOS 5D Mark III", "dcraw_matrix": [ 6722,-635,-963,-4287,12460,2028,-908,2162,5668 ], @@ -468,14 +514,18 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, - { // Quality A, some missing scaling factors are safelly guessed - most samples by sfink16 at RT forums + { // Quality A, some missing scaling factors are safely guessed - samples by sfink16 & RawConvert at RT forums "make_model": "Canon EOS 6D", "dcraw_matrix": [ 7034,-804,-1014,-4420,12564,2058,-851,1994,5758 ], "ranges": { "white": [ - { "iso": [ 50, 100, 125, 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800, 16000, 25600 ], "levels": 15180 }, // typical 15283 - { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000, 20000 ], "levels": 13100 }, // typical 13225 - { "iso": [ 51200, 102400 ], "levels": 16280 } // typical 16383 + { "iso": [ 50, 100, 125, 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200 ], "levels": 15180 }, // typical 15283 + { "iso": [ 4000, 6400, 8000, 12800 ], "levels": 15100 }, // typical 15283 + { "iso": [ 16000, 25600 ], "levels": 14900 }, // typical 15283 + { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 13100 }, // typical 13225 + { "iso": [ 5000, 10000 ], "levels": 13000 }, // typical 13225 + { "iso": [ 20000 ], "levels": 12800 }, // typical 13225 + { "iso": [ 51200, 102400 ], "levels": 15900 } // typical 16383 ], "white_max": 16383, "aperture_scaling": [ @@ -484,7 +534,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "aperture": 1.2, "scale_factor": 1.130 }, // from histogramm 1 gap in every 7 levels { "aperture": 1.4, "scale_factor": 1.090 }, // histogram 3 gaps in every 32 levels { "aperture": 1.6, "scale_factor": 1.060 }, // 16213/15283 - { "aperture": 1.8, "scale_factor": 1.040 }, // guessed + { "aperture": 1.8, "scale_factor": 1.040 }, // 16004/15283 { "aperture": 2.0, "scale_factor": 1.030 }, // 15800/15283 { "aperture": 2.2, "scale_factor": 1.020 }, // guessed { "aperture": 2.5, "scale_factor": 1.015 }, // 15541/15283 @@ -728,8 +778,35 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, - { // Quality A, only one scaling factor missing and guessed safely - "make_model": [ "Canon EOS 650D", "Canon EOS Rebel T4i" ], + { // Quality B, .. integer ISOs measured, intermediate ISO samples missing, + // scaling factors safely guessed to be same as 1200D .. + "make_model": [ "Canon EOS 1300D", "Canon EOS Rebel T6" ], + "dcraw_matrix": [ 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 ], // Dcraw 9.27 + "ranges": { + "white": [ + { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 + { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 + { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800 ], "levels": 15200 } // typical 15303 + ], + "white_max": 16383, + "aperture_scaling": [ + /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ + { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data + { "aperture": 1.6, "scale_factor": 1.190 }, // guessed + { "aperture": 1.8, "scale_factor": 1.140 }, // guessed + { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 + { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 + { "aperture": 2.5, "scale_factor": 1.050 }, // guessed + { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } + }, + + { // Quality A, only one scaling factor missing and guessed safely, EOS 700D not tested but available samples look same as 650D + "make_model": [ "Canon EOS 650D", "Canon EOS Rebel T4i", "Canon EOS 700D", "Canon EOS Rebel T5i" ], "dcraw_matrix": [ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 ], "ranges": { "white": [ @@ -811,6 +888,38 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, + { // Quality C, inconsistent WL per ISO, missing scaling factors + "make_model": "Canon EOS M10", + "dcraw_matrix": [ 6400,-480,-888,-5294,13416,2047,-1296,2203,6137 ], // DNGv9.3 D65 + "ranges": { + "white": [ + { "iso": [ 100, 125, 160, 320, 500, 2000, 4000, 6400 ], "levels": 16300 }, // typical 16383 + { "iso": 200, "levels": 12900 }, // typical 12940-15570-15376 + { "iso": 250, "levels": 14100 }, // typical 14200 + { "iso": 800, "levels": 13400 }, // typical 13500-16383x2 + { "iso": 1000, "levels": 14900 }, // typical 15010-16383 + { "iso": 1250, "levels": 12300 }, // typical 12400 + { "iso": 1600, "levels": 15200 }, // typical 15290-16075-16380 + { "iso": 2500, "levels": 12200 }, // typical 12300 + { "iso": 3200, "levels": 15000 }, // typical 15080-16383-16100-13660 + { "iso": 5000, "levels": 12800 }, // typical 12840 + { "iso": [ 12800, 25600 ], "levels": 16200 } // typical 16383 + ], + "white_max": 16383, + "aperture_scaling": [ + /* note: all scale factors are copied from EOS M3 */ + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.020 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } + }, { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed "make_model": "Canon EOS M3", "dcraw_matrix": [ 6362,-823,-847,-4426,12109,2616,-743,1857,5635 ], // DNG_V8.8 D65 @@ -838,7 +947,54 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ] } }, - { /* Quality B, needs a way to auto apply 3/2 or 4/3 crops (read exif tags ..) to work better with auto distortion, + { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed + "make_model": "Canon EOS 80D", + "dcraw_matrix": [ 7457,-671,-937,-4849,12495,2643,-1213,2354,5492 ], // DNG_V9.5 D65 + "raw_crop": [ 264, 34, 6024, 4022 ], // full size 6288x4056, official crop 276,46,6275,4045 + "masked_areas": [ 40, 96, 4000, 260 ], + "ranges": { + "white": [ + { "iso": [ 100, 125, 200, 250 ], "levels": 16200 }, // nominal 16383, LENR blue 16243 + { "iso": [ 160 ], "levels": 13000 }, // nominal 13097, + { "iso": [ 320, 640, 1250, 2500, 5000, 10000 ], "levels": 13200 }, // G1,G2 13415 + { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 16150 }, // nominal 16383, LENR ISO3200 16150 + { "iso": [ 6400, 8000, 12800, 16000, 25600 ], "levels": 16000 } // R,G1,G2 16383, B 16243, LENR B 16000 + ], + "white_max": 16383, + "aperture_scaling": [ + /* note: need for more data to properly fill all scale factors */ + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.020 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } + }, + + { // Quality B, experimental infrared support commented out + "make_model": "Canon PowerShot G9", + "dcraw_matrix": [ 7368,-2141,-598,-5621,13254,2625,-1419,1696,5743 ], // DNG_V8.7 D65 + // "dcraw_matrix": [ 8796,-3770,311,-4148,11362,3197,-598,983,5880 ], // DNG_V8.7 A + // "dcraw_matrix": [ 15669,-8084,-2453,-2940,5756,101,126,-401,2463 ], // Infrared guessed 111 + // "dcraw_matrix": [ 13254,-6296,-1798,184,2753,90,1438,-566,1129 ], // Infrared guessed + "ranges": { "white": 4080 } + }, + { // Quality C, experimental infrared support commented out + "make_model": "Canon PowerShot A480", + "dcraw_matrix": [ 8275,-2905,-1261,-128,5305,505,52,482,2450 ], // DNG_CHDK_V1.3.0 Daylight + // "dcraw_matrix": [ 15906,-7425,-2014,-2010,5554,264,404,-265,2706 ], // Infrared guessed + "raw_crop": [ 6, 12, 3684, 2760 ], // full size 3720X2772, official Canon crop 3648x2736 + "masked_areas": [ 12, 3694, 2760, 3716 ], // only left side optically black area is considered + "ranges": { "white": 4080 } + }, + + + { /* Quality B, needs a way to auto apply 3/2 or 4/3 crops (read exif tags ..) to work better with auto distortion, for the moment just comment-uncomment the desired raw crop */ "make_model": "Canon PowerShot G1 X Mark II", "dcraw_matrix": [ 7378,-1255,-1043,-4088,12251,2048,-876,1946,5805 ], // D65 matrix from adobe dcp @@ -858,6 +1014,14 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "masked_areas": [ 40, 4, 3680, 76 ], "ranges": { "white": 4080 } }, + { // Quality B, + "make_model": [ "Canon PowerShot G9 X", "Canon PowerShot G5 X" ], + "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 + // "raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 + "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 + "masked_areas": [ 40, 4, 3680, 76 ], + "ranges": { "white": 16300 } + }, { // Quality B, "make_model": "Canon PowerShot G3 X", @@ -902,16 +1066,36 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 10592,-4262,-1008,-3514,11355,2465,-870,2025,6386 ], // DNG_v8.7 D65 "ranges": { "white": 16100 } }, + { // Quality B, + "make_model": "FUJIFILM X70", + "dcraw_matrix": [ 10450,-4329,-878,-3217,11105,2421,-752,1758,6519 ], // DNG_v9.4 D65 + // "raw_crop": [ 4, 0, 4988, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop + "ranges": { "white": 16100 } + }, - { // Quality B + { // Quality B "make_model": "FUJIFILM X-A2", "dcraw_matrix": [ 10763,-4560,-917,-3346,11311,2322,-475,1135,5843 ], // DNG D65 "ranges": { "white": 4050 } }, + { // Quality B "make_model": [ "FUJIFILM X-T1", "FUJIFILM X-T10", "FUJIFILM X-E2" ], "dcraw_matrix": [ 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 ], // DNG D65 // "dcraw_matrix": [ 9289,-3279,-632,-3539,11137,2758,-1049,1950,6544 ], // X-RITE D55 +// "raw_crop": [ 4, 0, 4936, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop + "ranges": { "white": 16100 } + }, + { // Quality B + "make_model": "FUJIFILM X-E2S", + "dcraw_matrix": [ 11562,-5118,-961,-3022,11007,2311,-525,1569,6097 ], // DNG_v9.4 D65 + "ranges": { "white": 16100 } + }, + + { // Quality B + "make_model": "FUJIFILM X-PRO2", + "dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65 + "raw_crop": [ 0, 0, 6032, 4032 ], // full raw 6160,4032, Usable 6032,4032 - experimental crop "ranges": { "white": 16100 } }, @@ -926,19 +1110,16 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 9252,-2704,-1064,-5893,14265,1717,-1101,2341,4349 ], // DNG_v8.8 D65 "ranges": { "white": 4040 } }, - - { // Quality B - "make_model": "FUJIFILM X-PRO2", - "dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65 - "raw_crop": [ 0, 0, 6032, 4032 ], // full raw 6160,4032, Usable 6032,4032 - experimental crop - "ranges": { "white": 16100 } - }, - { // Quality B, Matrix from Adobe's dcp D65 instead of the internal in Leica's DNG - "make_model": [ "LEICA SL (Typ 601)", "LEICA Q (Typ 116)" ], + "make_model": "LEICA Q (Typ 116)", "dcraw_matrix": [ 10068,-4043,-1068,-5319,14268,1044,-765,1701,6522 ], // DCP D65 "raw_crop": [ 4, 4, -4, -4 ] // full raw 6016x4016, Official 6000x4000 }, + { // Quality B, Matrix from Adobe's dcp D65 instead of the internal in Leica's DNG + "make_model": "LEICA SL (Typ 601)", + "dcraw_matrix": [ 11492,-4930,-1188,-5593,14673,873,-609,1474,6343 ], // DNGv9.3 D65 + "raw_crop": [ 4, 4, -4, -4 ] // full raw 6016x4016, Official 6000x4000 + }, { // Quality B, frame corrections "make_model": "LG mobile LG-H815", @@ -991,34 +1172,69 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "white_max": 16383 } }, + { // quality B, intermediate ISO samples missing + "make_model": "Nikon D500", + "dcraw_matrix": [ 8813,-3210,-1036,-4703,12868,2021,-1054,1940,6129 ], // DNG_v9.5 D65 + "ranges": { + "white": [ // measured at integer ISOs. Safety margin per ISO groups according to expected WL spread after LENR + { "iso": [ 100, 200, 400, 800, 1600 ], "levels": [ 16300, 16100, 16300 ] }, // typical G1,G2 16180 R,B 16383 + { "iso": [ 3200, 6400 ], "levels": [ 16250, 16050, 16250 ] }, // typical G1,G2,16200 R,B 16383 + { "iso": [ 12800, 25600 ], "levels": 16000 }, // typical G1,G2, R,B 16383 + { "iso": [ 51200, 102400 ], "levels": 15800 }, // typical G1,G2, R,B 16383 + { "iso": [ 204800, 409600 ], "levels": 15500 }, // typical G1,G2,R,B 16383 + { "iso": [ 819200, 1638400 ], "levels": 15000 } // typical G1,G2, R,B 16383 + ], + "white_max": 16383 + } + }, { // quality B, lacks aperture and ISO scaling, known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D7000", "dcraw_matrix": [ 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 ], // matrix provided by Tanveer(tsk1979) "ranges": { // measured at ISO 100. ISO differences not measured, but known to exist - "white": [ 16370, 15760, 16370 ], // typical R 16383, G 15778, B 16383 + "white": [ 16300, 15700, 16300 ], // typical R 16383, G 15778, B 16383 "white_max": 16383 // aperture scaling not measured, but known to exist, at f/1.8 the G channels hits white_max } }, + { // quality B, + "make_model": "NIKON COOLPIX A", + "dcraw_matrix": [ 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 ], // dng_d65 + "ranges": { + "white": [ + { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500, 640, 800 ], "levels": [ 16300, 15700, 16300 ] }, // typical G1,G2 15760-15800 R,B 16383 + { "iso": [ 1000, 1250, 1600, 2000, 2500, 3200 ], "levels": 16300 }, // typical G1,G2, R,B 16383 + { "iso": [ 4000, 5000, 6400 ], "levels": 16200 }, // typical G1,G2, R,B 16383 + { "iso": [ 8000, 10000, 12800 ], "levels": 16000 }, // typical G1,G2,R,B 16383 + { "iso": [ 16000, 20000, 25600 ], "levels": 15700 } // typical G1,G2, R,B 16383 + ], + "white_max": 16383 + } + }, + + { // Quality B, NO LENR SAMPLES + "make_model": "Nikon D5", + "dcraw_matrix": [ 9200,-3522,-992,-5755,13803,2117,-753,1486,6338 ], // adobe dng_v9.5 d65 + "ranges": { "black": 0, "white": 16300 } // WL typical 16383 set to 16300 for safety + }, { // Quality B, aperture scaling used to scale WL at safer levels "make_model": "Nikon D5300", "dcraw_matrix": [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v8.8 d65 - "ranges": { "white": 16300 } // attention.. WL value is for 14bit files, has to be 4070 for 12bit files. WL typical 16383 set to 16300 for safety + "ranges": { "white": 16300 } // attention.. WL value is for 14-bit files, has to be 4070 for 12-bit files. WL typical 16383 set to 16300 for safety }, { // Quality B, aperture scaling used to scale WL at safer levels "make_model": "Nikon D5500", "dcraw_matrix": [ 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 ], // adobe dng_v9.0 d65 - "ranges": { "white": 16300 } // attention.. WL value is for 14bit files, has to be 4070 for 12bit files. WL typical 16383 set to 16300 for safety + "ranges": { "white": 16300 } // attention.. WL value is for 14-bit files, has to be 4070 for 12-bit files. WL typical 16383 set to 16300 for safety }, { // Quality B, color matrix from DNG_v9.0 instead of internal Dcraw_v9.25_r1.475, "make_model": "Nikon D7200", "dcraw_matrix": [ 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 ], // adobe dng_v9.0 d65 - "ranges": { "white": 16300 } // attention.. WL values are for 14bit files, has to be WL4070 for 12bit files. WL typical 16383 set to 16300 for safety, + "ranges": { "white": 16300 } // attention.. WL values are for 14-bit files, has to be WL4070 for 12-bit files. WL typical 16383 set to 16300 for safety, }, { // quality B, samples by joachip at RT forums, are measures at long exposures with LongExposureNoiseReduction @@ -1030,7 +1246,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "white": [ { "iso": [ 50, 100 ], "levels": [ 15800, 15800, 15350 ] }, // typical G1/G2/R 15879, B 15395-15670 lowered to 15800, 15350, 3969 B3917 { "iso": [ 200, 400, 800 ], "levels": [ 16300, 15700, 16300 ] }, // 15878, 16383 - { "iso": 1000, "levels": [ 16300, 16100, 16300 ] }, // 12bit lossless r4095, 3981-10, b4041- 12bit lossy r,g1,g2 3961 - b3917, + { "iso": 1000, "levels": [ 16300, 16100, 16300 ] }, // 12-bit lossless r4095, 3981-10, b4041- 12-bit lossy r,g1,g2 3961 - b3917, { "iso": 1600, "levels": [ 16300, 16100, 16300 ] }, // 16145-165, 16383 { "iso": [ 3200, 6400, 12800, 25600 ], "levels": [ 16300, 16300, 16300 ] } // 16383 ], @@ -1056,14 +1272,17 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { // quality B; Data from RusselCottrell at RT forums. sensor is not uniform "make_model": "Nikon D700", "dcraw_matrix": [ 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 ], - "ranges": { "white": 15750 } // Non linearities start at 15750 (hi ISOs) 15850 (low ISOs) with long exposures (>2sec) and LENR ON .. nominal 15892 - // white 15750 is correct for 14bit files, 12 bit files need white level at 3900 + // "dcraw_matrix": [ 9336,-3405,14,-7321,14779,2764,-914,1171,8248 ], // illum a + // "raw_crop": [ 1400, 600, 1600, 1600 ], // experimental - Dcraw 2 0 4284 2844, + "ranges": { "white": [ 15500, 15500, 15500 ] } + // Non linearities start at 15750 (hi ISOs) 15850 (low ISOs) with long exposures (>2sec) and LENR ON .. nominal 15892 + // white 15750 is correct for 14-bit files, for 12-bit files RT auto_calculates it 15750*4095/16383=3936 }, { // Quality B, "make_model": "Nikon D750", "dcraw_matrix": [ 9020,-2890,-715,-4535,12436,2348,-934,1919,7086 ], // adobe dcp d65 DNGv8.7 - "ranges": { "white": 16300 } // attention.. WL values are for 14bit files, has to be WL4070 for 12bit files. WL typical 16383 set to 16300 for safety + "ranges": { "white": 16300 } // attention.. WL values are for 14-bit files, has to be WL4070 for 12-bit files. WL typical 16383 set to 16300 for safety }, { // quality B; Data from RussellCottrell at RT forums. Largest aperture scale factor is 1.013, about 1/50th of a stop @@ -1081,7 +1300,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Nikon D810", "dcraw_matrix": [ 9369,-3195,-791,-4488,12430,2301,-893,1796,6872 ], // dcp_v8.6 d65 "raw_crop": [ 0, 0, 7380, 4928 ], // Official raw crop 7380x4928, - "ranges": { "white": 16300 } // attention WL 16300 is for 14bit raws and has to be 4070 for 12 bit raws. Typical WL at 16383 + "ranges": { "white": 16300 } // WL 16300 is for 14-bit raws, for 12-bit files RT auto calculates the correct WL. Typical WL at 16383 }, { // Quality b, 16Mp and 64Mp raw frames "make_model": "OLYMPUS E-M5MarkII", @@ -1095,9 +1314,27 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ] } }, + { // Quality B, 20Mp and 80Mp raw frames + "make_model": "OLYMPUS PEN-F", + "dcraw_matrix": [ 9476,-3182,-765,-2613,10958,1893,-449,1315,5268 ], // dng_v9.5 D65 + // "raw_crop": [ 0, 0, 10372, -7780 ], // largest valid, full 80Mp 10400X7796, official crop 10 10 10368 7776 - + "ranges": { + "white": [ + { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 + { "iso": [ 400, 800, 1600, 3200 ], "levels": 4070 }, // 4070-4095 + { "iso": [ 6400, 12800, 25600 ], "levels": 4040 } // 4000-4095 + ] + } + }, + + { // Quality b, missing per ISO samples + "make_model": "OLYMPUS E-M1", + "dcraw_matrix": [ 7687,-1984,-606,-4327,11928,2721,-1381,2339,6452 ], // dng d65 + "ranges": { "white": 4080 } // nominal 4095-4094, spread with some settings as long exposure + }, { // Quality b, crop correction - "make_model": "OLYMPUS E-M10", + "make_model": [ "OLYMPUS E-M10", "OLYMPUS E-M10 Mark II" ], "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], "raw_crop": [ 0, 0, 4624, 3472 ], // largest valid - full frame is 4640x3472 // "raw_crop": [ 4, 4, 4616, 3464 ], // olympus jpeg crop 8, 8, 4608, 3456 @@ -1109,14 +1346,14 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4040 } // nominal 4056 }, - { // Quality B, with long exposure noise reduction White Level gets WL-BL = around 256_12bit levels less + { // Quality B, with long exposure noise reduction White Level gets WL-BL = around 256_12-bit levels less "make_model": "OLYMPUS E-PL7", "dcraw_matrix": [ 9197,-3190,-659,-2606,10830,2039,-458,1250,5458 ], // DNG_V8.7 D65 "ranges": { "white": 4080 } // nominal 4093 }, { // Quality B, per ISO WL measures missing - "make_model": "OLYMPUS SH-2", + "make_model": [ "OLYMPUS SH-2", "Olympus SH-3" ], "dcraw_matrix": [ 10156,-3425,-1077,-2611,11177,1624,-385,1592,5080 ], // DNG_V9.1 D65 "ranges": { "white": 4050 } // safe for worst case detected, nominal is 4093 }, @@ -1126,7 +1363,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know and we define here the needed offset of around 15. The total BL is base+offset */ { // Quality B, CameraPhone, some samples are missing but has the same sensor as FZ1000 .. - "make_model": "Panasonic DMC-CM1", + "make_model": [ "Panasonic DMC-CM1", "Panasonic DMC-CM10" ], "dcraw_matrix": [ 8770,-3194,-820,-2871,11281,1803,-513,1552,4434 ], // dcp_v8.7 d65 "ranges": { "black": 15, // 15 is BL offstet. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset @@ -1162,7 +1399,18 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ] } }, - + { // Quality A, samples by helices at Rt forums + "make_model": [ "Panasonic DMC-ZS100", "Panasonic DMC-ZS110", "Panasonic DMC-TZ100", "Panasonic DMC-TZ101", "Panasonic DMC-TZ110", "Panasonic DMC-TX1" ], + "dcraw_matrix": [ 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 ], // dcp_v8.6 d65 + "ranges": { + "black": 15, // 15 is BL offstet. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 + { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 + { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // exif 4095 distribution 4080-4095 + ] + } + }, { // Quality A "make_model": [ "Panasonic DMC-LF1", "Leica C (Typ 112)" ], "dcraw_matrix": [ 9379,-3267,-816,-3227,11560,1881,-926,1928,5340 ], @@ -1319,7 +1567,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, { // Quality A, - "make_model": [ "Panasonic DMC-GX7", "Panasonic DMC-GF7" ], + "make_model": [ "Panasonic DMC-GX7", "Panasonic DMC-GF7", "Panasonic DMC-GF8" ], "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ], "ranges": { "black": 15, // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset @@ -1331,12 +1579,11 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, - { // Quality A, - "make_model": [ "Panasonic DMC-G7", "Panasonic DMC-G70" ], + { // G7 Quality A, GX80 Quality B, BLs and WLs are same, color matrix looks to also be same as G7 + "make_model": [ "Panasonic DMC-G7", "Panasonic DMC-G70", "Panasonic DMC-GX80", "Panasonic DMC-GX85" ], "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ],// DNG_v9.1 D65 - // "dcraw_matrix": [ 8844,-3538,-768,-3709,11762,2200,-698,1792,5220 ], // LX100, DNG_V8.7 d65 "ranges": { - "black": 16, // 16 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "black": 16, // 16 is BL offset. Dcraw/RT read the BLbase from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 exif_linearitylimit 2111 { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 exif_linearitylimit 2626 @@ -1350,7 +1597,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "black": 15, // 16 is BL offstet. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset "white": [ - { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 exif_linearitylimit 2111 + { "iso": 100, "levels": 2800 }, // gaussian 2900-3200 exif_linearitylimit 2111 { "iso": 125, "levels": 3180 }, // guessed gaussian 3200-3600 exif_linearitylimit 2626 { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 ] @@ -1369,6 +1616,12 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, + { // Quality B, per ISO info missing + "make_model": "PENTAX K-x", + "dcraw_matrix": [ 8843,-2837,-625,-5025,12644,2668,-411,1234,7410 ], // adobe dcp d65 + "ranges": { "white": 4080 } // nominal at ISO200 4094 + }, + { // Quality B, intermediate ISOs info missing "make_model": [ "RICOH PENTAX K-3", "PENTAX K-3" ], "dcraw_matrix": [ 7415,-2052,-721,-5186,12788,2682,-1446,2157,6773 ], // adobe dcp d65 @@ -1386,10 +1639,25 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, + { // Quality B, intermediate ISOs info missing + "make_model": [ "RICOH PENTAX 645Z", "PENTAX 645Z" ], + "dcraw_matrix": [ 9519,-3591,-664,-4074,11725,2671,-624,1501,6653 ], // adobe dcp d65 + "raw_crop": [ 48, 0, 8276, 6208 ],// full sensor 8384x6208 - official jpeg 8256x6192 + "ranges": { + "white": [ + { "iso": 100, "levels": 16310 }, // 16317 or 16350 + { "iso": 200, "levels": 16120 }, // 16254 or 16125 + { "iso": 400, "levels": 15860 }, // 16125 or 15868 + { "iso": 800, "levels": 15360 }, // 15868 or 15364-15370 + { "iso": [ 1600, 3200, 6400, 12800, 25600, 51200 ], "levels": 16300 } // 16383 - pentax dng tag is 15868-15350 + ] + } + }, + { // Quality B, intermediate ISOs info missing, spread due to blackframe subtraction guessed to be around 10levels "make_model": "PENTAX K10D", "dcraw_matrix": [ 9566,-2863,-803,-7170,15172,2112,-818,803,9705 ], // adobe DNG d65 - // "raw_crop": [ 0, 0, 3888, 2608 ], + // "raw_crop": [ 0, , 3888, 2608 ], "ranges": { "white": [ { "iso": 100, "levels": 4080 }, // R,G1,B = 4095 G2= 4087 @@ -1408,7 +1676,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4030 } // double clipping point for each channel at a) 4095 and b) bell distribution with peak at 4038 .. used the conservative one }, { // Quality A, Conflict with "Samsung NX30" in Dcraw_v9.21_r1.414, frame corrections and color data - "make_model": "Samsung NX3000", + "make_model": [ "Samsung NX3000", "Samsung NX3300" ], "dcraw_matrix": [ 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 ], // DNG_v8.7.1 D65 "raw_crop": [ 92, 38, 5480, 3656 ] // jpeg 5472x3648 - full raw: 5600 x 3714 - Samsung's official crop: 96, 42, 5568, 3690 }, @@ -1417,10 +1685,11 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": [ "Samsung NX1", "Samsung NX500" ], "dcraw_matrix": [ 10686,-4042,-1052,-3595,13238,276,-464,1259,5931 ], // DNG_v8.7 D65 // "dcraw_matrix": [ 13298,-6099,-296,-5243,16153,-1235,-508,1220,7758 ], // DNG_v8.7 Standard Light A - // "dcraw_matrix": [ 9598,-3268,-634,-5678,14795,824,-1255,2675,4523 ], // SAMSUNG DNG CONVERTER + // "dcraw_matrix": [ 9598,-3268,-634,-5678,14795,824,-1255,2675,4523 ], // SAMSUNG DNG CONVERTER v1.0 + "raw_crop": [ 1200, 500, 1600, 3600 ],// TRIAL CROP "ranges": { "white": [ - { "iso": 100, "levels": 16000 }, // typical 16084, LE 16120 and 16383, LENR 16280 + { "iso": 100, "levels": 16000 }, // 16000 typical 16084, LE 16120 and 16383, LENR 16280 { "iso": [ 200, 400, 800, 1600, 3200, 6400, 12800 ], "levels": 16300 }, // 16383 { "iso": [ 25600, 51200 ], "levels": 16300 } // 16383 ] @@ -1465,14 +1734,14 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "black": 16, "white": 4070 }, // BL is 16 or 31, should be measured at the horizontal black stripe at the top "raw_crop": [ 12, 52, -110, -8 ] // for small size all numbers/2 }, - { // Quality C, correction for frame width, color matrix guessed .. + { // Quality C, correction for frame width, color matrix measured on a DP1 sample .. "make_model": [ "Sigma DP1 Merrill", "Sigma DP2 Merrill", "Sigma DP3 Merrill" ], - "dcraw_matrix": [ 5666,139,-892,3780,5428,270,1366,9757,4526 ], // copy fron SD1 Merrill icc cloudy8140 d65 + // "dcraw_matrix": [ 2149,1003,-530,-494,6073,344,-3935,10665,3608 ], // experimental, inverted icc DP1_Merrill_dpreview_daylight WP1.2 + "dcraw_matrix": [ 2517,1175,-621,-587,7080,404,-4677,12402,4231 ], // experimental, inverted icc DP1_Merrill_dpreview_daylight WP1.4 "ranges": { "black": 16, "white": 4070 }, // BL is 16 or 31, should be measured at the horizontal black stripe at the bottom "raw_crop": [ 12, 0, -110, -62 ] // for small size all numbers/2 }, - { // Quality A, correction for color matrix from Colin Walker's d50 to dng d65 "make_model": "Sony NEX-C3", // "dcraw_matrix": [ 5130,-1055,-269,-4473,11797,3050,-701,1310,7121 ], // Colin walker's d50 kept for possible consistency issues @@ -1486,13 +1755,20 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 0, 0, 4920, 3276 ], "ranges": { "black": 512, "white": 16300 } }, - { // Quality A, + { // Quality A, "make_model": "Sony ILCA-77M2", "dcraw_matrix": [ 5991,-1732,-443,-4100,11989,2381,-704,1467,5992 ], // adobe dcp d65 "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, + { // Quality B, + "make_model": "Sony ILCA-68", + "dcraw_matrix": [ 6435,-1903,-536,-4722,12449,2550,-663,1363,6517 ], // adobe DNGv9.5 d65 + "raw_crop": [ 0, 0, -30, 0 ], + "ranges": { "black": 512, "white": 16300 } + }, + { // Quality A, correction for frame width "make_model": [ "Sony ILCE-3000", "Sony ILCE-3500", "Sony ILCE-5000", "Sony ILCE-QX1" ], "dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], // adobe dcp d65 @@ -1511,6 +1787,12 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, + { // Quality A + "make_model": "Sony ILCE-6300", + "dcraw_matrix": [ 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 ], // DNG_v9.5 D65 + "raw_crop": [ 0, 0, 6024, 4024 ], + "ranges": { "black": 512, "white": 16300 } + }, { // Quality A "make_model": "Sony ILCE-7M2", "dcraw_matrix": [ 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 ], // DNGv8.7.1 @@ -1523,10 +1805,10 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "black": 512, "white": 16300 } }, - { // Quality B, correction for frame width, crop modes not covered - "make_model": "Sony ILCE-7RM2", + { // Quality B, correction for frame width, crop modes covered + "make_model": [ "Sony ILCE-7RM2", "Sony DSC-RX1RM2" ], "dcraw_matrix": [ 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 ], // DNG_v9.1.1 D65 - "raw_crop": [ 0, 0, 7964, 5320 ], // full raw frame 8000x5320 - 36 rightmost columns are garbage + "raw_crop": [ 0, 0, -36, 0 ], // full raw frame 8000x5320 - 36 rightmost columns are garbage "ranges": { "black": 512, "white": 16300 } }, @@ -1592,7 +1874,6 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 4479,-895,-536,-5818,13569,2742,-1186,2190,7909], "ranges": { "black": 0, "white": 64400 } }, - { // Quality A for tested CFV, the other models have the same sensor (16 megapixel square sensor) "make_model": [ "Hasselblad V96C", "Hasselblad CFV", "Hasselblad CFV-II" ], "dcraw_matrix": [ 8519, -3260, -280, -5081, 13459, 1738, -1449, 2960, 7809 ] // borrowed from Adobe's DNG converter From 023e7d36956a0fefa7a0d99fc9e1316468eff5f7 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 22 May 2016 14:35:53 +0200 Subject: [PATCH 45/57] Copied poke255_uc implementation from gtk3 into master --- rtengine/previewimage.cc | 29 +++++--------------------- rtengine/previewimage.h | 2 +- rtengine/utils.cc | 45 ++++++++++++++++++++++++++++++++++++++++ rtengine/utils.h | 7 +++++++ 4 files changed, 58 insertions(+), 25 deletions(-) diff --git a/rtengine/previewimage.cc b/rtengine/previewimage.cc index f9f6c12a1..9de5c81cb 100644 --- a/rtengine/previewimage.cc +++ b/rtengine/previewimage.cc @@ -84,26 +84,16 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext unsigned char *dst; #pragma omp for schedule(static,10) - for (unsigned int i = 0; i < (unsigned int)(h); i++) { + for (unsigned int i = 0; i < (unsigned int)(h); ++i) { src = data + i * w * 3; dst = previewImage->get_data() + i * w * 4; - for (unsigned int j = 0; j < (unsigned int)(w); j++) { + for (unsigned int j = 0; j < (unsigned int)(w); ++j) { unsigned char r = *(src++); unsigned char g = *(src++); unsigned char b = *(src++); -#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ - *(dst++) = b; - *(dst++) = g; - *(dst++) = r; - *(dst++) = 0; -#else - *(dst++) = 0; - *(dst++) = r; - *(dst++) = g; - *(dst++) = b; -#endif + poke255_uc(dst, r, g, b); } } } @@ -178,17 +168,8 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext unsigned char r = *(src++); unsigned char g = *(src++); unsigned char b = *(src++); -#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ - *(dst++) = b; - *(dst++) = g; - *(dst++) = r; - *(dst++) = 0; -#else - *(dst++) = 0; - *(dst++) = r; - *(dst++) = g; - *(dst++) = b; -#endif + + poke255_uc(dst, r, g, b); } } } diff --git a/rtengine/previewimage.h b/rtengine/previewimage.h index 5135ddd9a..26b9a85d2 100644 --- a/rtengine/previewimage.h +++ b/rtengine/previewimage.h @@ -20,7 +20,7 @@ #define _PREVIEWIMAGE_ #include -#include "cairomm/cairomm.h" +#include namespace rtengine { diff --git a/rtengine/utils.cc b/rtengine/utils.cc index b45e4b436..2366f3a0c 100644 --- a/rtengine/utils.cc +++ b/rtengine/utils.cc @@ -29,6 +29,51 @@ using namespace std; namespace rtengine { +void poke255_uc(unsigned char* &dest, unsigned char r, unsigned char g, unsigned char b) +{ +#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ + *(dest++) = b; + *(dest++) = g; + *(dest++) = r; + *(dest++) = 0; +#else + *(dest++) = 0; + *(dest++) = r; + *(dest++) = g; + *(dest++) = b; +#endif +} + +void poke01_d(unsigned char* &dest, double r, double g, double b) +{ +#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ + *(dest++) = (unsigned char)(b * 255.); + *(dest++) = (unsigned char)(g * 255.); + *(dest++) = (unsigned char)(r * 255.); + *(dest++) = 0; +#else + *(dest++) = 0; + *(dest++) = (unsigned char)(r * 255.); + *(dest++) = (unsigned char)(g * 255.); + *(dest++) = (unsigned char)(b * 255.); +#endif +} + +void poke01_f(unsigned char* &dest, float r, float g, float b) +{ +#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ + *(dest++) = (unsigned char)(b * 255.f); + *(dest++) = (unsigned char)(g * 255.f); + *(dest++) = (unsigned char)(r * 255.f); + *(dest++) = 0; +#else + *(dest++) = 0; + *(dest++) = (unsigned char)(r * 255.f); + *(dest++) = (unsigned char)(g * 255.f); + *(dest++) = (unsigned char)(b * 255.f); +#endif +} + void bilinearInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh) { diff --git a/rtengine/utils.h b/rtengine/utils.h index 3040e39b9..1e742ffb3 100644 --- a/rtengine/utils.h +++ b/rtengine/utils.h @@ -22,6 +22,13 @@ namespace rtengine { +// update a point of a Cairo::Surface by accessing the raw data +void poke255_uc(unsigned char* &dest, unsigned char r, unsigned char g, unsigned char b); +// update a point of a Cairo::Surface by accessing the raw data +void poke01_d(unsigned char* &dest, double r, double g, double b); +// update a point of a Cairo::Surface by accessing the raw data +void poke01_f(unsigned char* &dest, float r, float g, float b); + void bilinearInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh); void nearestInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh); void rotate (unsigned char* img, int& w, int& h, int deg); From 18243db5bafb63595fd561c89a7b7676483ef843 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 22 May 2016 21:57:52 +0200 Subject: [PATCH 46/57] Update to dcraw 9.27 --- rtengine/dcraw.c | 572 +++++++++++++++++++++++++++++++--------------- rtengine/dcraw.cc | 437 +++++++++++++++++++++++++---------- rtengine/dcraw.h | 7 +- 3 files changed, 714 insertions(+), 302 deletions(-) diff --git a/rtengine/dcraw.c b/rtengine/dcraw.c index cf1afe4ac..441f967da 100644 --- a/rtengine/dcraw.c +++ b/rtengine/dcraw.c @@ -1,6 +1,6 @@ /* dcraw.c -- Dave Coffin's raw photo decoder - Copyright 1997-2015 by Dave Coffin, dcoffin a cybercom o net + Copyright 1997-2016 by Dave Coffin, dcoffin a cybercom o net This is a command-line ANSI C program to convert raw photos from any digital camera on any computer running any operating system. @@ -19,11 +19,11 @@ *If you have not modified dcraw.c in any way, a link to my homepage qualifies as "full source code". - $Revision: 1.475 $ - $Date: 2015/04/11 00:08:36 $ + $Revision: 1.477 $ + $Date: 2016/05/10 21:30:43 $ */ -#define DCRAW_VERSION "9.25" +#define DCRAW_VERSION "9.27" #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -89,15 +89,6 @@ typedef unsigned long long UINT64; #define _(String) (String) #endif -#ifdef LJPEG_DECODE -#error Please compile dcraw.c by itself. -#error Do not link it with ljpeg_decode. -#endif - -#ifndef LONG_BIT -#define LONG_BIT (8 * sizeof (long)) -#endif - #if !defined(uchar) #define uchar unsigned char #endif @@ -158,6 +149,7 @@ struct decode { struct tiff_ifd { int width, height, bps, comp, phint, offset, flip, samples, bytes; int tile_width, tile_length; + float shutter; } tiff_ifd[10]; struct ph1 { @@ -179,7 +171,7 @@ struct ph1 { #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define LIM(x,min,max) MAX(min,MIN(x,max)) #define ULIM(x,y,z) ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y)) -#define CLIP(x) LIM(x,0,65535) +#define CLIP(x) LIM((int)(x),0,65535) #define SWAP(a,b) { a=a+b; b=a-b; a=a-b; } /* @@ -813,27 +805,22 @@ void CLASS canon_load_raw() FORC(2) free (huff[c]); } -/* - Not a full implementation of Lossless JPEG, just - enough to decode Canon, Kodak and Adobe DNG images. - */ struct jhead { - int bits, high, wide, clrs, sraw, psv, restart, vpred[6]; - ushort *huff[6], *free[4], *row; + int algo, bits, high, wide, clrs, sraw, psv, restart, vpred[6]; + ushort quant[64], idct[64], *huff[20], *free[20], *row; }; int CLASS ljpeg_start (struct jhead *jh, int info_only) { - int c, tag, len; + ushort c, tag, len; uchar data[0x10000]; const uchar *dp; memset (jh, 0, sizeof *jh); jh->restart = INT_MAX; - fread (data, 2, 1, ifp); - if (data[1] != 0xd8) return 0; + if ((fgetc(ifp),fgetc(ifp)) != 0xd8) return 0; do { - fread (data, 2, 2, ifp); + if (!fread (data, 2, 2, ifp)) return 0; tag = data[0] << 8 | data[1]; len = (data[2] << 8 | data[3]) - 2; if (tag <= 0xff00) return 0; @@ -841,7 +828,9 @@ int CLASS ljpeg_start (struct jhead *jh, int info_only) switch (tag) { case 0xffc3: jh->sraw = ((data[7] >> 4) * (data[7] & 15) - 1) & 3; + case 0xffc1: case 0xffc0: + jh->algo = tag & 0xff; jh->bits = data[0]; jh->high = data[1] << 8 | data[2]; jh->wide = data[3] << 8 | data[4]; @@ -850,20 +839,25 @@ int CLASS ljpeg_start (struct jhead *jh, int info_only) break; case 0xffc4: if (info_only) break; - for (dp = data; dp < data+len && (c = *dp++) < 4; ) + for (dp = data; dp < data+len && !((c = *dp++) & -20); ) jh->free[c] = jh->huff[c] = make_decoder_ref (&dp); break; case 0xffda: jh->psv = data[1+data[0]*2]; jh->bits -= data[3+data[0]*2] & 15; break; + case 0xffdb: + FORC(64) jh->quant[c] = data[c*2+1] << 8 | data[c*2+2]; + break; case 0xffdd: jh->restart = data[0] << 8 | data[1]; } } while (tag != 0xffda); + if (jh->bits > 16 || jh->clrs > 6 || + !jh->bits || !jh->high || !jh->wide || !jh->clrs) return 0; if (info_only) return 1; - if (jh->clrs > 6 || !jh->huff[0]) return 0; - FORC(5) if (!jh->huff[c+1]) jh->huff[c+1] = jh->huff[c]; + if (!jh->huff[0]) return 0; + FORC(19) if (!jh->huff[c+1]) jh->huff[c+1] = jh->huff[c]; if (jh->sraw) { FORC(4) jh->huff[2+c] = jh->huff[1]; FORC(jh->sraw) jh->huff[1+c] = jh->huff[0]; @@ -1042,23 +1036,59 @@ void CLASS adobe_copy_pixel (unsigned row, unsigned col, ushort **rp) { int c; - if (is_raw == 2 && shot_select) (*rp)++; + if (tiff_samples == 2 && shot_select) (*rp)++; if (raw_image) { if (row < raw_height && col < raw_width) RAW(row,col) = curve[**rp]; - *rp += is_raw; + *rp += tiff_samples; } else { if (row < height && col < width) FORC(tiff_samples) image[row*width+col][c] = curve[(*rp)[c]]; *rp += tiff_samples; } - if (is_raw == 2 && shot_select) (*rp)--; + if (tiff_samples == 2 && shot_select) (*rp)--; +} + +void CLASS ljpeg_idct (struct jhead *jh) +{ + int c, i, j, len, skip, coef; + float work[3][8][8]; + static float cs[106] = { 0 }; + static const uchar zigzag[80] = + { 0, 1, 8,16, 9, 2, 3,10,17,24,32,25,18,11, 4, 5,12,19,26,33, + 40,48,41,34,27,20,13, 6, 7,14,21,28,35,42,49,56,57,50,43,36, + 29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54, + 47,55,62,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 }; + + if (!cs[0]) + FORC(106) cs[c] = cos((c & 31)*M_PI/16)/2; + memset (work, 0, sizeof work); + work[0][0][0] = jh->vpred[0] += ljpeg_diff (jh->huff[0]) * jh->quant[0]; + for (i=1; i < 64; i++ ) { + len = gethuff (jh->huff[16]); + i += skip = len >> 4; + if (!(len &= 15) && skip < 15) break; + coef = getbits(len); + if ((coef & (1 << (len-1))) == 0) + coef -= (1 << len) - 1; + ((float *)work)[zigzag[i]] = coef * jh->quant[i]; + } + FORC(8) work[0][0][c] *= M_SQRT1_2; + FORC(8) work[0][c][0] *= M_SQRT1_2; + for (i=0; i < 8; i++) + for (j=0; j < 8; j++) + FORC(8) work[1][i][j] += work[0][i][c] * cs[(j*2+1)*c]; + for (i=0; i < 8; i++) + for (j=0; j < 8; j++) + FORC(8) work[2][i][j] += work[1][c][j] * cs[(i*2+1)*c]; + + FORC(64) jh->idct[c] = CLIP(((float *)work[2])[c]+0.5); } void CLASS lossless_dng_load_raw() { - unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col; + unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col, i, j; struct jhead jh; ushort *rp; @@ -1069,14 +1099,32 @@ void CLASS lossless_dng_load_raw() if (!ljpeg_start (&jh, 0)) break; jwide = jh.wide; if (filters) jwide *= jh.clrs; - jwide /= is_raw; - for (row=col=jrow=0; jrow < jh.high; jrow++) { - rp = ljpeg_row (jrow, &jh); - for (jcol=0; jcol < jwide; jcol++) { - adobe_copy_pixel (trow+row, tcol+col, &rp); - if (++col >= tile_width || col >= raw_width) - row += 1 + (col = 0); - } + jwide /= MIN (is_raw, tiff_samples); + switch (jh.algo) { + case 0xc1: + jh.vpred[0] = 16384; + getbits(-1); + for (jrow=0; jrow+7 < jh.high; jrow += 8) { + for (jcol=0; jcol+7 < jh.wide; jcol += 8) { + ljpeg_idct (&jh); + rp = jh.idct; + row = trow + jcol/tile_width + jrow*2; + col = tcol + jcol%tile_width; + for (i=0; i < 16; i+=2) + for (j=0; j < 8; j++) + adobe_copy_pixel (row+i, col+j, &rp); + } + } + break; + case 0xc3: + for (row=col=jrow=0; jrow < jh.high; jrow++) { + rp = ljpeg_row (jrow, &jh); + for (jcol=0; jcol < jwide; jcol++) { + adobe_copy_pixel (trow+row, tcol+col, &rp); + if (++col >= tile_width || col >= raw_width) + row += 1 + (col = 0); + } + } } fseek (ifp, save+4, SEEK_SET); if ((tcol += tile_width) >= raw_width) @@ -1721,7 +1769,7 @@ void CLASS phase_one_load_raw_c() pixel[col] = curve[pixel[col]]; } for (col=0; col < raw_width; col++) { - i = (pixel[col] << 2) - ph1.black + i = (pixel[col] << 2*(ph1.format != 8)) - ph1.black + cblack[row][col >= ph1.split_col] + rblack[col][row >= ph1.split_row]; if (i > 0) RAW(row,col) = i; @@ -2813,6 +2861,8 @@ void CLASS smal_decode_segment (unsigned seg[2][2], int holes) fseek (ifp, seg[0][1]+1, SEEK_SET); getbits(-1); + if (seg[1][0] > raw_width*raw_height) + seg[1][0] = raw_width*raw_height; for (pix=seg[0][0]; pix < seg[1][0]; pix++) { for (s=0; s < 3; s++) { data = data << nbits | getbits(nbits); @@ -5261,7 +5311,7 @@ nf: order = 0x4949; FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get4(); } if (tag == 0x3d && type == 3 && len == 4) - FORC4 cblack[c ^ c >> 1] = get2() >> (14-tiff_ifd[2].bps); + FORC4 cblack[c ^ c >> 1] = get2() >> (14-tiff_bps); if (tag == 0x81 && type == 4) { data_offset = get4(); fseek (ifp, data_offset + 41, SEEK_SET); @@ -5291,7 +5341,8 @@ nf: order = 0x4949; break; case 102: fseek (ifp, 6, SEEK_CUR); - goto get2_rggb; + FORC4 cam_mul[c ^ (c >> 1)] = get2(); + break; case 103: fseek (ifp, 16, SEEK_CUR); FORC4 cam_mul[c] = get2(); @@ -5325,7 +5376,7 @@ nf: order = 0x4949; if (tag == 0x200 && len == 4) FORC4 cblack[c ^ c >> 1] = get2(); if (tag == 0x201 && len == 4) - goto get2_rggb; + FORC4 cam_mul[c ^ (c >> 1)] = get2(); if (tag == 0x220 && type == 7) meta_offset = ftell(ifp); if (tag == 0x401 && type == 4 && len == 4) @@ -5371,7 +5422,7 @@ get2_256: } if ((tag | 0x70) == 0x2070 && (type == 4 || type == 13)) fseek (ifp, get4()+base, SEEK_SET); - if (tag == 0x2020) + if (tag == 0x2020 && !strncmp(buf,"OLYMP",5)) parse_thumb_note (base, 257, 258); if (tag == 0x2040) parse_makernote (base, 0x2040); @@ -5382,11 +5433,12 @@ get2_256: if (tag == 0x4001 && len > 500) { i = len == 582 ? 50 : len == 653 ? 68 : len == 5120 ? 142 : 126; fseek (ifp, i, SEEK_CUR); -get2_rggb: FORC4 cam_mul[c ^ (c >> 1)] = get2(); - i = len >> 3 == 164 || len == 1506 ? 112:22; - fseek (ifp, i, SEEK_CUR); - FORC4 sraw_mul[c ^ (c >> 1)] = get2(); + for (i+=18; i <= len; i+=10) { + get2(); + FORC4 sraw_mul[c ^ (c >> 1)] = get2(); + if (sraw_mul[1] == 1170) break; + } } if (tag == 0x4021 && get4() && get4()) FORC4 cam_mul[c] = 1024; @@ -5439,12 +5491,14 @@ void CLASS parse_exif (int base) while (entries--) { tiff_get (base, &tag, &type, &len, &save); switch (tag) { - case 33434: shutter = getreal(type); break; + case 33434: tiff_ifd[tiff_nifds-1].shutter = + shutter = getreal(type); break; case 33437: aperture = getreal(type); break; case 34855: iso_speed = get2(); break; case 36867: case 36868: get_timestamp(0); break; case 37377: if ((expo = -getreal(type)) < 128) + tiff_ifd[tiff_nifds-1].shutter = shutter = pow (2, expo); break; case 37378: aperture = pow (2, getreal(type)/2); break; case 37386: focal_len = getreal(type); break; @@ -5682,6 +5736,8 @@ int CLASS parse_tiff_ifd (int base) case 61443: tiff_ifd[ifd].samples = len & 7; tiff_ifd[ifd].bps = getint(type); + if (tiff_bps < tiff_ifd[ifd].bps) + tiff_bps = tiff_ifd[ifd].bps; break; case 61446: raw_height = 0; @@ -5843,7 +5899,7 @@ int CLASS parse_tiff_ifd (int base) parse_kodak_ifd (base); break; case 33434: /* ExposureTime */ - shutter = getreal(type); + tiff_ifd[ifd].shutter = shutter = getreal(type); break; case 33437: /* FNumber */ aperture = getreal(type); @@ -5971,6 +6027,14 @@ int CLASS parse_tiff_ifd (int base) if (!make[0]) strcpy (make, "DNG"); is_raw = 1; break; + case 50708: /* UniqueCameraModel */ + if (model[0]) break; + fgets (make, 64, ifp); + if ((cp = strchr(make,' '))) { + strcpy(model,cp+1); + *cp = 0; + } + break; case 50710: /* CFAPlaneColor */ if (filters == 9) break; if (len > 4) len = 4; @@ -5984,10 +6048,7 @@ guess_cfa_pc: filters -= !filters; break; case 50711: /* CFALayout */ - if (get2() == 2) { - fuji_width = 1; - filters = 0x49494949; - } + if (get2() == 2) fuji_width = 1; break; case 291: case 50712: /* LinearizationTable */ @@ -6010,7 +6071,7 @@ guess_cfa_pc: break; case 50715: /* BlackLevelDeltaH */ case 50716: /* BlackLevelDeltaV */ - for (num=i=0; i < len; i++) + for (num=i=0; i < (len & 0xffff); i++) num += getreal(type); black += num/len + 0.5; break; @@ -6128,7 +6189,7 @@ int CLASS parse_tiff (int base) void CLASS apply_tiff() { - int max_samp=0, raw=-1, thm=-1, i; + int max_samp=0, ties=0, os, ns, raw=-1, thm=-1, i; struct jhead jh; thumb_misc = 16; @@ -6140,13 +6201,25 @@ void CLASS apply_tiff() thumb_height = jh.high; } } + for (i=tiff_nifds; i--; ) { + if (tiff_ifd[i].shutter) + shutter = tiff_ifd[i].shutter; + tiff_ifd[i].shutter = shutter; + } for (i=0; i < tiff_nifds; i++) { if (max_samp < tiff_ifd[i].samples) max_samp = tiff_ifd[i].samples; if (max_samp > 3) max_samp = 3; + os = raw_width*raw_height; + ns = tiff_ifd[i].width*tiff_ifd[i].height; + if (tiff_bps) { + os *= tiff_bps; + ns *= tiff_ifd[i].bps; + } if ((tiff_ifd[i].comp != 6 || tiff_ifd[i].samples != 3) && (tiff_ifd[i].width | tiff_ifd[i].height) < 0x10000 && - tiff_ifd[i].width*tiff_ifd[i].height > raw_width*raw_height) { + ns && ((ns > os && (ties = 1)) || + (ns == os && shot_select == ties++))) { raw_width = tiff_ifd[i].width; raw_height = tiff_ifd[i].height; tiff_bps = tiff_ifd[i].bps; @@ -6156,9 +6229,11 @@ void CLASS apply_tiff() tiff_samples = tiff_ifd[i].samples; tile_width = tiff_ifd[i].tile_width; tile_length = tiff_ifd[i].tile_length; + shutter = tiff_ifd[i].shutter; raw = i; } } + if (is_raw == 1 && ties) is_raw = ties; if (!tile_width ) tile_width = INT_MAX; if (!tile_length) tile_length = INT_MAX; for (i=tiff_nifds; i--; ) @@ -6235,8 +6310,8 @@ void CLASS apply_tiff() if (!dng_version) if ( (tiff_samples == 3 && tiff_ifd[raw].bytes && tiff_bps != 14 && (tiff_compress & -16) != 32768) - || (tiff_bps == 8 && !strcasestr(make,"Kodak") && - !strstr(model2,"DEBUG RAW"))) + || (tiff_bps == 8 && strncmp(make,"Phase",5) && + !strcasestr(make,"Kodak") && !strstr(model2,"DEBUG RAW"))) is_raw = 0; for (i=0; i < tiff_nifds; i++) if (i != raw && tiff_ifd[i].samples == max_samp && @@ -6377,9 +6452,7 @@ void CLASS ciff_block_1030() bitbuf = bitbuf << 16 | (get2() ^ key[i++ & 1]); vbits += 16; } - white[row][col] = - bitbuf << (LONG_BIT - vbits) >> (LONG_BIT - bpp); - vbits -= bpp; + white[row][col] = bitbuf >> (vbits -= bpp) & ~(-1 << bpp); } } @@ -6658,7 +6731,7 @@ void CLASS parse_fuji (int offset) } else if (tag == 0xc000) { c = order; order = 0x4949; - if ((tag = get4()) > 10000) tag = get4(); + while ((tag = get4()) > raw_width); width = tag; height = get4(); order = c; @@ -6680,7 +6753,7 @@ int CLASS parse_jpeg (int offset) order = 0x4d4d; len = get2() - 2; save = ftell(ifp); - if (mark == 0xc0 || mark == 0xc3) { + if (mark == 0xc0 || mark == 0xc3 || mark == 0xc9) { fgetc(ifp); raw_height = get2(); raw_width = get2(); @@ -6974,8 +7047,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9805,-2689,-1312,-5803,13064,3068,-2438,3075,8775 } }, { "Canon EOS D60", 0, 0xfa0, { 6188,-1341,-890,-7168,14489,2937,-2640,3228,8483 } }, - { "Canon EOS 5DS", 0, 0x3c96, /* DJC */ - { 6885,-753,-856,-4416,11752,2665,-1266,2393,5468 } }, + { "Canon EOS 5DS", 0, 0x3c96, + { 6250,-711,-808,-5153,12794,2636,-1249,2198,5610 } }, { "Canon EOS 5D Mark III", 0, 0x3c80, { 6722,-635,-963,-4287,12460,2028,-908,2162,5668 } }, { "Canon EOS 5D Mark II", 0, 0x3cf0, @@ -7004,6 +7077,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6719,-994,-925,-4408,12426,2211,-887,2129,6051 } }, { "Canon EOS 70D", 0, 0x3bc7, { 7034,-804,-1014,-4420,12564,2058,-851,1994,5758 } }, + { "Canon EOS 80D", 0, 0, + { 7457,-671,-937,-4849,12495,2643,-1213,2354,5492 } }, { "Canon EOS 100D", 0, 0x350f, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS 300D", 0, 0xfa0, @@ -7024,12 +7099,22 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS 700D", 0, 0x3c00, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, + { "Canon EOS 750D", 0, 0x368e, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, + { "Canon EOS 760D", 0, 0x350f, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, { "Canon EOS 1000D", 0, 0xe43, { 6771,-1139,-977,-7818,15123,2928,-1244,1437,7533 } }, { "Canon EOS 1100D", 0, 0x3510, { 6444,-904,-893,-4563,12308,2535,-903,2016,6728 } }, { "Canon EOS 1200D", 0, 0x37c2, { 6461,-907,-882,-4300,12184,2378,-819,1944,5931 } }, + { "Canon EOS 1300D", 0, 0x3510, + { 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 } }, + { "Canon EOS M3", 0, 0, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, + { "Canon EOS M10", 0, 0, + { 6400,-480,-888,-5294,13416,2047,-1296,2203,6137 } }, { "Canon EOS M", 0, 0, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS-1Ds Mark III", 0, 0x3bb0, @@ -7048,6 +7133,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 4374,3631,-1743,-7520,15212,2472,-2892,3632,8161 } }, { "Canon EOS-1D C", 0, 0x3c4e, { 6847,-614,-1014,-4669,12737,2139,-1197,2488,6846 } }, + { "Canon EOS-1D X Mark II", 0, 0, + { 7596,-978,-967,-4808,12571,2503,-1398,2567,5752 } }, { "Canon EOS-1D X", 0, 0x3c4e, { 6847,-614,-1014,-4669,12737,2139,-1197,2488,6846 } }, { "Canon EOS-1D", 0, 0xe20, @@ -7076,14 +7163,20 @@ void CLASS adobe_coeff (const char *make, const char *model) { -4778,9467,2172,4743,-1141,4344,-5146,9908,6077,-1566,11051,557 } }, { "Canon PowerShot G2", 0, 0, { 9087,-2693,-1049,-6715,14382,2537,-2291,2819,7790 } }, + { "Canon PowerShot G3 X", 0, 0, + { 9701,-3857,-921,-3149,11537,1817,-786,1817,5147 } }, { "Canon PowerShot G3", 0, 0, { 9212,-2781,-1073,-6573,14189,2605,-2300,2844,7664 } }, + { "Canon PowerShot G5 X", 0, 0, + { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, { "Canon PowerShot G5", 0, 0, { 9757,-2872,-933,-5972,13861,2301,-1622,2328,7212 } }, { "Canon PowerShot G6", 0, 0, { 9877,-3775,-871,-7613,14807,3072,-1448,1305,7485 } }, { "Canon PowerShot G7 X", 0, 0, { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, + { "Canon PowerShot G9 X", 0, 0, + { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, { "Canon PowerShot G9", 0, 0, { 7368,-2141,-598,-5621,13254,2625,-1418,1696,5743 } }, { "Canon PowerShot Pro1", 0, 0, @@ -7142,6 +7235,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 14134,-5576,-1527,-1991,10719,1273,-1158,1929,3581 } }, { "Canon PowerShot SX220", 0, 0, /* DJC */ { 13898,-5076,-1447,-1405,10109,1297,-244,1860,3687 } }, + { "Canon IXUS 160", 0, 0, /* DJC */ + { 11657,-3781,-1136,-3544,11262,2283,-160,1219,4700 } }, { "Casio EX-S20", 0, 0, /* DJC */ { 11634,-3924,-1128,-4968,12954,2015,-1588,2648,7206 } }, { "Casio EX-Z750", 0, 0, /* DJC */ @@ -7156,6 +7251,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 20183,-4295,-423,-3940,15330,3985,-280,4870,9800 } }, { "Contax N Digital", 0, 0xf1e, { 7777,1285,-1053,-9280,16543,2916,-3677,5679,7060 } }, + { "DXO ONE", 0, 0, + { 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 } }, { "Epson R-D1", 0, 0, { 6827,-1878,-732,-8429,16012,2564,-704,592,7145 } }, { "Fujifilm E550", 0, 0, @@ -7236,25 +7333,31 @@ void CLASS adobe_coeff (const char *make, const char *model) { 11768,-4971,-1133,-4904,12927,2183,-480,1723,4605 } }, { "Fujifilm X30", 0, 0, { 12328,-5256,-1144,-4469,12927,1675,-87,1291,4351 } }, + { "Fujifilm X70", 0, 0, + { 10450,-4329,-878,-3217,11105,2421,-752,1758,6519 } }, { "Fujifilm X-Pro1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, + { "Fujifilm X-Pro2", 0, 0, + { 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 } }, { "Fujifilm X-A1", 0, 0, { 11086,-4555,-839,-3512,11310,2517,-815,1341,5940 } }, { "Fujifilm X-A2", 0, 0, { 10763,-4560,-917,-3346,11311,2322,-475,1135,5843 } }, { "Fujifilm X-E1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, + { "Fujifilm X-E2S", 0, 0, + { 11562,-5118,-961,-3022,11007,2311,-525,1569,6097 } }, { "Fujifilm X-E2", 0, 0, { 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 } }, { "Fujifilm X-M1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, { "Fujifilm X-S1", 0, 0, { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "Fujifilm X-T1", 0, 0, + { "Fujifilm X-T1", 0, 0, /* also X-T10 */ { 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 } }, { "Fujifilm XF1", 0, 0, { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "Fujifilm XQ", 0, 0, // XQ1 and XQ2 + { "Fujifilm XQ", 0, 0, /* XQ1 and XQ2 */ { 9252,-2704,-1064,-5893,14265,1717,-1101,2341,4349 } }, { "Imacon Ixpress", 0, 0, /* DJC */ { 7025,-1415,-704,-5188,13765,1424,-1248,2742,6038 } }, @@ -7396,8 +7499,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 } }, { "Nikon D5500", 0, 0, { 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 } }, + { "Nikon D500", 0, 0, + { 8813,-3210,-1036,-4703,12868,2021,-1054,1940,6129 } }, { "Nikon D50", 0, 0, { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, + { "Nikon D5", 0, 0, + { 9200,-3522,-992,-5755,13803,2117,-753,1486,6338 } }, { "Nikon D600", 0, 0x3e07, { 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 } }, { "Nikon D610", 0, 0, @@ -7408,8 +7515,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } }, { "Nikon D7100", 0, 0, { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } }, - { "Nikon D7200", 0, 0, /* DJC */ - { 6111,-2759,-358,-5108,10766,4343,-769,1691,8030 } }, + { "Nikon D7200", 0, 0, + { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } }, { "Nikon D750", 0, 0, { 9020,-2890,-715,-4535,12436,2348,-934,1919,7086 } }, { "Nikon D700", 0, 0, @@ -7474,8 +7581,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } }, { "Nikon 1 J4", 0, 0, { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } }, - { "Nikon 1 J5", 0, 0, /* DJC */ - { 2621,-856,500,-4471,8761,5711,-1321,2644,11945 } }, + { "Nikon 1 J5", 0, 0, + { 7520,-2518,-645,-3844,12102,1945,-913,2249,6835 } }, { "Nikon 1 S2", 200, 0, { 6612,-1342,-618,-3338,11055,2623,-174,1792,5075 } }, { "Nikon 1 V2", 0, 0, @@ -7486,6 +7593,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } }, { "Nikon 1 ", 0, 0, /* J1, J2, S1, V1 */ { 8994,-2667,-865,-4594,12324,2552,-699,1786,6260 } }, + { "Olympus AIR A01", 0, 0, + { 8992,-3093,-639,-2563,10721,2122,-437,1270,5473 } }, { "Olympus C5050", 0, 0, { 10508,-3124,-1273,-6079,14294,1901,-1653,2306,6237 } }, { "Olympus C5060", 0, 0, @@ -7556,7 +7665,7 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, { "Olympus E-PM2", 0, 0, { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, - { "Olympus E-M10", 0, 0, + { "Olympus E-M10", 0, 0, /* also E-M10 Mark II */ { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, { "Olympus E-M1", 0, 0, { 7687,-1984,-606,-4327,11928,2721,-1381,2339,6452 } }, @@ -7564,6 +7673,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 } }, { "Olympus E-M5", 0, 0xfe1, { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, + { "Olympus PEN-F", 0, 0, + { 9476,-3182,-765,-2613,10958,1893,-449,1315,5268 } }, + { "Olympus SH-2", 0, 0, + { 10156,-3425,-1077,-2611,11177,1624,-385,1592,5080 } }, { "Olympus SP350", 0, 0, { 12078,-4836,-1069,-6671,14306,2578,-786,939,7418 } }, { "Olympus SP3", 0, 0, @@ -7580,6 +7693,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 11522,-4044,-1146,-4736,12172,2904,-988,1829,6039 } }, { "Olympus STYLUS1", 0, 0, { 8360,-2420,-880,-3928,12353,1739,-1381,2416,5173 } }, + { "Olympus TG-4", 0, 0, + { 11426,-4159,-1126,-2066,10678,1593,-120,1327,4998 } }, { "Olympus XZ-10", 0, 0, { 9777,-3483,-925,-2886,11297,1800,-602,1663,5134 } }, { "Olympus XZ-1", 0, 0, @@ -7614,6 +7729,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8843,-2837,-625,-5025,12644,2668,-411,1234,7410 } }, { "Pentax K-r", 0, 0, { 9895,-3077,-850,-5304,13035,2521,-883,1768,6936 } }, + { "Pentax K-1", 0, 0, + { 8566,-2746,-1201,-3612,12204,1550,-893,1680,6264 } }, + { "Pentax K-30", 0, 0, + { 8710,-2632,-1167,-3995,12301,1881,-981,1719,6535 } }, + { "Pentax K-3 II", 0, 0, + { 8626,-2607,-1155,-3995,12301,1881,-1039,1822,6925 } }, { "Pentax K-3", 0, 0, { 7415,-2052,-721,-5186,12788,2682,-1446,2157,6773 } }, { "Pentax K-5 II", 0, 0, @@ -7624,6 +7745,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9142,-2947,-678,-8648,16967,1663,-2224,2898,8615 } }, { "Pentax K-S1", 0, 0, { 8512,-3211,-787,-4167,11966,2487,-638,1288,6054 } }, + { "Pentax K-S2", 0, 0, + { 8662,-3280,-798,-3928,11771,2444,-586,1232,6054 } }, + { "Pentax Q-S1", 0, 0, + { 12995,-5593,-1107,-1879,10139,2027,-64,1233,4919 } }, { "Pentax 645D", 0, 0x3e00, { 10646,-3593,-1158,-3329,11699,1831,-667,2874,6287 } }, { "Panasonic DMC-CM1", 15, 0, @@ -7634,6 +7759,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9932,-3060,-935,-5809,13331,2753,-1267,2155,5575 } }, { "Panasonic DMC-FZ28", 15, 0xf96, { 10109,-3488,-993,-5412,12812,2916,-1305,2140,5543 } }, + { "Panasonic DMC-FZ330", 15, 0, + { 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 } }, + { "Panasonic DMC-FZ300", 15, 0, + { 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 } }, { "Panasonic DMC-FZ30", 0, 0xf94, { 10976,-4029,-1141,-7918,15491,2600,-1670,2071,8246 } }, { "Panasonic DMC-FZ3", 15, 0, @@ -7714,6 +7843,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7798,-2562,-740,-3879,11584,2613,-1055,2248,5434 } }, { "Panasonic DMC-G6", 15, 0xfff, { 8294,-2891,-651,-3869,11590,2595,-1183,2267,5352 } }, + { "Panasonic DMC-G7", 15, 0xfff, + { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, { "Panasonic DMC-GF1", 15, 0xf92, { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } }, { "Panasonic DMC-GF2", 15, 0xfff, @@ -7726,6 +7857,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8130,-2801,-946,-3520,11289,2552,-1314,2511,5791 } }, { "Panasonic DMC-GF7", 15, 0, { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, + { "Panasonic DMC-GF8", 15, 0, + { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, { "Panasonic DMC-GH1", 15, 0xf92, { 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } }, { "Panasonic DMC-GH2", 15, 0xf95, @@ -7742,6 +7875,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6763,-1919,-863,-3868,11515,2684,-1216,2387,5879 } }, { "Panasonic DMC-GX7", 15, 0, { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, + { "Panasonic DMC-GX8", 15, 0, + { 7564,-2263,-606,-3148,11239,2177,-540,1435,4853 } }, + { "Panasonic DMC-TZ1", 15, 0, + { 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 } }, + { "Panasonic DMC-ZS1", 15, 0, + { 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 } }, { "Panasonic DMC-TZ6", 15, 0, { 8607,-2822,-808,-3755,11930,2049,-820,2060,5224 } }, { "Panasonic DMC-ZS4", 15, 0, @@ -7750,6 +7889,20 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 } }, { "Panasonic DMC-ZS5", 15, 0, { 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 } }, + { "Panasonic DMC-TZ8", 15, 0, + { 8550,-2908,-842,-3195,11529,1881,-338,1603,4631 } }, + { "Panasonic DMC-ZS6", 15, 0, + { 8550,-2908,-842,-3195,11529,1881,-338,1603,4631 } }, + { "Leica S (Typ 007)", 0, 0, + { 6063,-2234,-231,-5210,13787,1500,-1043,2866,6997 } }, + { "Leica X", 0, 0, /* X and X-U, both (Typ 113) */ + { 7712,-2059,-653,-3882,11494,2726,-710,1332,5958 } }, + { "Leica Q (Typ 116)", 0, 0, + { 11865,-4523,-1441,-5423,14458,935,-1587,2687,4830 } }, + { "Leica M (Typ 262)", 0, 0, + { 6653,-1486,-611,-4221,13303,929,-881,2416,7226 } }, + { "Leica SL (Typ 601)", 0, 0, + { 11865,-4523,-1441,-5423,14458,935,-1587,2687,4830} }, { "Phase One H 20", 0, 0, /* DJC */ { 1313,1855,-109,-6715,15908,808,-327,1840,6020 } }, { "Phase One H 25", 0, 0, @@ -7764,8 +7917,14 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, { "Phase One P65", 0, 0, { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, + { "Photron BC2-HD", 0, 0, /* DJC */ + { 14603,-4122,-528,-1810,9794,2017,-297,2763,5936 } }, { "Red One", 704, 0xffff, /* DJC */ { 21014,-7891,-2613,-3056,12201,856,-2203,5125,8042 } }, + { "Ricoh GR II", 0, 0, + { 4630,-834,-423,-4977,12805,2417,-638,1467,6115 } }, + { "Ricoh GR", 0, 0, + { 3708,-543,-160,-5381,12254,3556,-1471,1929,8234 } }, { "Samsung EX1", 0, 0x3e00, { 8898,-2498,-994,-3144,11328,2066,-760,1381,4576 } }, { "Samsung EX2F", 0, 0x7ff, @@ -7774,6 +7933,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7557,-2522,-739,-4679,12949,1894,-840,1777,5311 } }, { "Samsung NX mini", 0, 0, { 5222,-1196,-550,-6540,14649,2009,-1666,2819,5657 } }, + { "Samsung NX3300", 0, 0, + { 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 } }, { "Samsung NX3000", 0, 0, { 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 } }, { "Samsung NX30", 0, 0, /* NX30, NX300, NX300M */ @@ -7790,8 +7951,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, { "Samsung NX10", 0, 0, /* also NX100 */ { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, - { "Samsung NX500", 0, 0, /* DJC */ - { 10196,-4532,-272,-3888,11489,2400,-1203,2424,9173 } }, + { "Samsung NX500", 0, 0, + { 10686,-4042,-1052,-3595,13238,276,-464,1259,5931 } }, { "Samsung NX5", 0, 0, { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, { "Samsung NX1", 0, 0, @@ -7808,17 +7969,19 @@ void CLASS adobe_coeff (const char *make, const char *model) { 16442,-2956,-2422,-2877,12128,750,-1136,6066,4559 } }, { "Sony DSC-F828", 0, 0, { 7924,-1910,-777,-8226,15459,2998,-1517,2199,6818,-7242,11401,3481 } }, - { "Sony DSC-R1", 512, 0, + { "Sony DSC-R1", 0, 0, { 8512,-2641,-694,-8042,15670,2526,-1821,2117,7414 } }, { "Sony DSC-V3", 0, 0, { 7511,-2571,-692,-7894,15088,3060,-948,1111,8128 } }, - { "Sony DSC-RX100M", 200, 0, /* M2 and M3 */ + { "Sony DSC-RX100M", 0, 0, /* M2, M3, and M4 */ { 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 } }, - { "Sony DSC-RX100", 200, 0, + { "Sony DSC-RX100", 0, 0, { 8651,-2754,-1057,-3464,12207,1373,-568,1398,4434 } }, - { "Sony DSC-RX10", 200, 0, + { "Sony DSC-RX10", 0, 0, /* also RX10M2 */ { 6679,-1825,-745,-5047,13256,1953,-1580,2422,5183 } }, - { "Sony DSC-RX1", 128, 0, + { "Sony DSC-RX1RM2", 0, 0, + { 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 } }, + { "Sony DSC-RX1", 0, 0, { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, { "Sony DSLR-A100", 0, 0xfeb, { 9437,-2811,-774,-8405,16215,2290,-710,596,7181 } }, @@ -7836,71 +7999,77 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, { "Sony DSLR-A390", 0, 0, { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, - { "Sony DSLR-A450", 128, 0xfeb, + { "Sony DSLR-A450", 0, 0xfeb, { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "Sony DSLR-A580", 128, 0xfeb, + { "Sony DSLR-A580", 0, 0xfeb, { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "Sony DSLR-A500", 128, 0xfeb, + { "Sony DSLR-A500", 0, 0xfeb, { 6046,-1127,-278,-5574,13076,2786,-691,1419,7625 } }, - { "Sony DSLR-A5", 128, 0xfeb, + { "Sony DSLR-A5", 0, 0xfeb, { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "Sony DSLR-A700", 128, 0, + { "Sony DSLR-A700", 0, 0, { 5775,-805,-359,-8574,16295,2391,-1943,2341,7249 } }, - { "Sony DSLR-A850", 128, 0, + { "Sony DSLR-A850", 0, 0, { 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } }, - { "Sony DSLR-A900", 128, 0, + { "Sony DSLR-A900", 0, 0, { 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } }, - { "Sony ILCA-77M2", 128, 0, + { "Sony ILCA-68", 0, 0, + { 6435,-1903,-536,-4722,12449,2550,-663,1363,6517 } }, + { "Sony ILCA-77M2", 0, 0, { 5991,-1732,-443,-4100,11989,2381,-704,1467,5992 } }, - { "Sony ILCE-7M2", 128, 0, + { "Sony ILCE-6300", 0, 0, + { 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 } }, + { "Sony ILCE-7M2", 0, 0, { 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 } }, - { "Sony ILCE-7S", 128, 0, + { "Sony ILCE-7S", 0, 0, /* also ILCE-7SM2 */ { 5838,-1430,-246,-3497,11477,2297,-748,1885,5778 } }, - { "Sony ILCE-7R", 128, 0, + { "Sony ILCE-7RM2", 0, 0, + { 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 } }, + { "Sony ILCE-7R", 0, 0, { 4913,-541,-202,-6130,13513,2906,-1564,2151,7183 } }, - { "Sony ILCE-7", 128, 0, + { "Sony ILCE-7", 0, 0, { 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 } }, - { "Sony ILCE", 128, 0, /* 3000, 5000, 5100, 6000, and QX1 */ + { "Sony ILCE", 0, 0, /* 3000, 5000, 5100, 6000, and QX1 */ { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony NEX-5N", 128, 0, + { "Sony NEX-5N", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony NEX-5R", 128, 0, + { "Sony NEX-5R", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-5T", 128, 0, + { "Sony NEX-5T", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-3N", 128, 0, + { "Sony NEX-3N", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, { "Sony NEX-3", 138, 0, /* DJC */ { 6907,-1256,-645,-4940,12621,2320,-1710,2581,6230 } }, { "Sony NEX-5", 116, 0, /* DJC */ { 6807,-1350,-342,-4216,11649,2567,-1089,2001,6420 } }, - { "Sony NEX-3", 128, 0, /* Adobe */ + { "Sony NEX-3", 0, 0, /* Adobe */ { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "Sony NEX-5", 128, 0, /* Adobe */ + { "Sony NEX-5", 0, 0, /* Adobe */ { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "Sony NEX-6", 128, 0, + { "Sony NEX-6", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-7", 128, 0, + { "Sony NEX-7", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony NEX", 128, 0, /* NEX-C3, NEX-F3 */ + { "Sony NEX", 0, 0, /* NEX-C3, NEX-F3 */ { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A33", 128, 0, + { "Sony SLT-A33", 0, 0, { 6069,-1221,-366,-5221,12779,2734,-1024,2066,6834 } }, - { "Sony SLT-A35", 128, 0, + { "Sony SLT-A35", 0, 0, { 5986,-1618,-415,-4557,11820,3120,-681,1404,6971 } }, - { "Sony SLT-A37", 128, 0, + { "Sony SLT-A37", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A55", 128, 0, + { "Sony SLT-A55", 0, 0, { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "Sony SLT-A57", 128, 0, + { "Sony SLT-A57", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A58", 128, 0, + { "Sony SLT-A58", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A65", 128, 0, + { "Sony SLT-A65", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony SLT-A77", 128, 0, + { "Sony SLT-A77", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony SLT-A99", 128, 0, + { "Sony SLT-A99", 0, 0, { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, }; double cam_xyz[4][3]; @@ -8057,6 +8226,8 @@ void CLASS identify() { 5712, 3774, 62, 20, 10, 2 }, { 5792, 3804, 158, 51, 0, 0 }, { 5920, 3950, 122, 80, 2, 0 }, + { 6096, 4056, 72, 34, 0, 0 }, + { 6288, 4056, 264, 34, 0, 0 }, { 8896, 5920, 160, 64, 0, 0 }, }; static const struct { @@ -8070,6 +8241,7 @@ void CLASS identify() { 0x261, "EOS 50D" }, { 0x281, "EOS-1D Mark IV" }, { 0x287, "EOS 60D" }, { 0x167, "EOS-1DS" }, { 0x325, "EOS 70D" }, + { 0x350, "EOS 80D" }, { 0x328, "EOS-1D X Mark II" }, { 0x170, "EOS 300D" }, { 0x188, "EOS-1Ds Mark II" }, { 0x176, "EOS 450D" }, { 0x215, "EOS-1Ds Mark III" }, { 0x189, "EOS 350D" }, { 0x324, "EOS-1D C" }, @@ -8079,9 +8251,12 @@ void CLASS identify() { 0x286, "EOS 600D" }, { 0x285, "EOS 5D Mark III" }, { 0x301, "EOS 650D" }, { 0x302, "EOS 6D" }, { 0x326, "EOS 700D" }, { 0x250, "EOS 7D" }, + { 0x393, "EOS 750D" }, { 0x289, "EOS 7D Mark II" }, + { 0x347, "EOS 760D" }, { 0x254, "EOS 1000D" }, { 0x288, "EOS 1100D" }, - { 0x327, "EOS 1200D" }, + { 0x327, "EOS 1200D" }, { 0x382, "Canon EOS 5DS" }, + { 0x404, "EOS 1300D" }, { 0x401, "Canon EOS 5DS R" }, { 0x346, "EOS 100D" }, }, sonique[] = { { 0x002, "DSC-R1" }, { 0x100, "DSLR-A100" }, @@ -8109,7 +8284,10 @@ void CLASS identify() { 0x139, "ILCE-5000" }, { 0x13d, "DSC-RX100M3" }, { 0x13e, "ILCE-7S" }, { 0x13f, "ILCA-77M2" }, { 0x153, "ILCE-5100" }, { 0x154, "ILCE-7M2" }, - { 0x15a, "ILCE-QX1" }, + { 0x155, "DSC-RX100M4" },{ 0x156, "DSC-RX10M2" }, + { 0x158, "DSC-RX1RM2" }, { 0x15a, "ILCE-QX1" }, + { 0x15b, "ILCE-7RM2" }, { 0x15e, "ILCE-7SM2" }, + { 0x161, "ILCA-68" }, { 0x165, "ILCE-6300" }, }; static const struct { unsigned fsize; @@ -8146,6 +8324,7 @@ void CLASS identify() { 19131120,4168,3060,92,16, 4, 1,40,0x94,0,2,"Canon","PowerShot SX220 HS" }, { 21936096,4464,3276,25,10,73,12,40,0x16,0,2,"Canon","PowerShot SX30 IS" }, { 24724224,4704,3504, 8,16,56, 8,40,0x94,0,2,"Canon","PowerShot A3300 IS" }, + { 30858240,5248,3920, 8,16,56,16,40,0x94,0,2,"Canon","IXUS 160" }, { 1976352,1632,1211, 0, 2, 0, 1, 0,0x94,0,1,"Casio","QV-2000UX" }, { 3217760,2080,1547, 0, 0,10, 1, 0,0x94,0,1,"Casio","QV-3*00EX" }, { 6218368,2585,1924, 0, 0, 9, 0, 0,0x94,0,1,"Casio","QV-5700" }, @@ -8204,6 +8383,8 @@ void CLASS identify() { 4841984,2090,1544, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S" }, { 6114240,2346,1737, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S4" }, { 10702848,3072,2322, 0, 0, 0,21,30,0x94,0,1,"Pentax","Optio 750Z" }, + { 4147200,1920,1080, 0, 0, 0, 0, 0,0x49,0,0,"Photron","BC2-HD" }, + { 4151666,1920,1080, 0, 0, 0, 0, 0,0x49,0,0,"Photron","BC2-HD",8 }, { 13248000,2208,3000, 0, 0, 0, 0,13,0x61,0,0,"Pixelink","A782" }, { 6291456,2048,1536, 0, 0, 0, 0,96,0x61,0,0,"RoverShot","3320AF" }, { 311696, 644, 484, 0, 0, 0, 0, 0,0x16,0,8,"ST Micro","STV680 VGA" }, @@ -8220,7 +8401,7 @@ void CLASS identify() static const char *corp[] = { "AgfaPhoto", "Canon", "Casio", "Epson", "Fujifilm", "Mamiya", "Minolta", "Motorola", "Kodak", "Konica", "Leica", - "Nikon", "Nokia", "Olympus", "Pentax", "Phase One", "Ricoh", + "Nikon", "Nokia", "Olympus", "Ricoh", "Pentax", "Phase One", "Samsung", "Sigma", "Sinar", "Sony" }; char head[32], *cp; int hlen, flen, fsize, zero_fsize=1, i, c; @@ -8387,7 +8568,7 @@ void CLASS identify() parse_foveon(); else if (!memcmp (head,"CI",2)) parse_cine(); - else + if (make[0] == 0) for (zero_fsize=i=0; i < sizeof table / sizeof *table; i++) if (fsize == table[i].fsize) { strcpy (make, table[i].make ); @@ -8482,9 +8663,10 @@ void CLASS identify() width = 4014; if (dng_version) { if (filters == UINT_MAX) filters = 0; - if (filters) is_raw = tiff_samples; - else colors = tiff_samples; + if (filters) is_raw *= tiff_samples; + else colors = tiff_samples; switch (tiff_compress) { + case 0: case 1: load_raw = &CLASS packed_dng_load_raw; break; case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; @@ -8536,6 +8718,8 @@ void CLASS identify() top_margin = filters = 0; strcpy (model,"C603"); } + if (!strcmp(make,"Sony") && raw_width > 3888) + black = 128 << (tiff_bps - 12); if (is_foveon) { if (height*2 < width) pixel_aspect = 0.5; if (height > width) pixel_aspect = 2; @@ -8550,6 +8734,10 @@ void CLASS identify() SWAP(height,width); SWAP(raw_height,raw_width); } + if (width == 7200 && height == 3888) { + raw_width = width = 6480; + raw_height = height = 4320; + } filters = 0; tiff_samples = colors = 3; load_raw = &CLASS canon_sraw_load_raw; @@ -8725,7 +8913,7 @@ canon_a5: top_margin = (raw_height - height) >> 2 << 1; left_margin = (raw_width - width ) >> 2 << 1; if (width == 2848 || width == 3664) filters = 0x16161616; - if (width == 4032 || width == 4952) left_margin = 0; + if (width == 4032 || width == 4952 || width == 6032) left_margin = 0; if (width == 3328 && (width -= 66)) left_margin = 34; if (width == 4936) left_margin = 4; if (!strcmp(model,"HS50EXR") || @@ -8968,6 +9156,8 @@ konica_400z: thumb_length = flen - (thumb_offset = 0xa39800); thumb_height = 480; thumb_width = 640; + } else if (!strcmp(model,"TG-4")) { + width -= 16; } } else if (!strcmp(model,"N Digital")) { height = 2047; @@ -8995,16 +9185,29 @@ konica_400z: order = 0x4d4d; } else if (!strcmp(make,"Sony") && raw_width == 4288) { width -= 32; + } else if (!strcmp(make,"Sony") && raw_width == 4600) { + if (!strcmp(model,"DSLR-A350")) + height -= 4; + black = 0; } else if (!strcmp(make,"Sony") && raw_width == 4928) { if (height < 3280) width -= 8; } else if (!strcmp(make,"Sony") && raw_width == 5504) { width -= height > 3664 ? 8 : 32; + if (!strncmp(model,"DSC",3)) + black = 200 << (tiff_bps - 12); } else if (!strcmp(make,"Sony") && raw_width == 6048) { width -= 24; if (strstr(model,"RX1") || strstr(model,"A99")) width -= 6; } else if (!strcmp(make,"Sony") && raw_width == 7392) { width -= 30; + } else if (!strcmp(make,"Sony") && raw_width == 8000) { + width -= 32; + if (!strncmp(model,"DSC",3)) { + tiff_bps = 14; + load_raw = &CLASS unpacked_load_raw; + black = 512; + } } else if (!strcmp(model,"DSLR-A100")) { if (width == 3880) { height--; @@ -9016,8 +9219,6 @@ konica_400z: load_flags = 2; } filters = 0x61616161; - } else if (!strcmp(model,"DSLR-A350")) { - height -= 4; } else if (!strcmp(model,"PIXL")) { height -= top_margin = 4; width -= left_margin = 32; @@ -9082,6 +9283,7 @@ bw: colors = 1; width = 768; data_offset = 1152; load_raw = &CLASS kodak_radc_load_raw; + tiff_bps = 12; } else if (strstr(model,"DC50")) { strcpy (model, "DC50"); height = 512; @@ -9160,7 +9362,7 @@ dng_skip: if (raw_color) adobe_coeff ("Apple","Quicktake"); if (fuji_width) { fuji_width = width >> !fuji_layout; - if (~fuji_width & 1) filters = 0x49494949; + filters = fuji_width & 1 ? 0x94949494 : 0x49494949; width = (height >> fuji_layout) + fuji_width; height = width - 1; pixel_aspect = 1; @@ -9274,10 +9476,14 @@ void CLASS convert_to_rgb() { { 0.529317, 0.330092, 0.140588 }, { 0.098368, 0.873465, 0.028169 }, { 0.016879, 0.117663, 0.865457 } }; + static const double aces_rgb[3][3] = + { { 0.432996, 0.375380, 0.189317 }, + { 0.089427, 0.816523, 0.102989 }, + { 0.019165, 0.118150, 0.941914 } }; static const double (*out_rgb[])[3] = - { rgb_rgb, adobe_rgb, wide_rgb, prophoto_rgb, xyz_rgb }; + { rgb_rgb, adobe_rgb, wide_rgb, prophoto_rgb, xyz_rgb, aces_rgb }; static const char *name[] = - { "sRGB", "Adobe RGB (1998)", "WideGamut D65", "ProPhoto D65", "XYZ" }; + { "sRGB", "Adobe RGB (1998)", "WideGamut D65", "ProPhoto D65", "XYZ", "ACES" }; static const unsigned phead[] = { 1024, 0, 0x2100000, 0x6d6e7472, 0x52474220, 0x58595a20, 0, 0, 0, 0x61637370, 0, 0, 0x6e6f6e65, 0, 0, 0, 0, 0xf6d6, 0x10000, 0xd32d }; @@ -9298,7 +9504,7 @@ void CLASS convert_to_rgb() gamma_curve (gamm[0], gamm[1], 0, 0); memcpy (out_cam, rgb_cam, sizeof out_cam); raw_color |= colors == 1 || document_mode || - output_color < 1 || output_color > 5; + output_color < 1 || output_color > 6; if (!raw_color) { oprof = (unsigned *) calloc (phead[0], 1); merror (oprof, "convert_to_rgb()"); @@ -9461,21 +9667,25 @@ struct tiff_hdr { char desc[512], make[64], model[64], soft[32], date[20], artist[64]; }; -void CLASS tiff_set (ushort *ntag, +void CLASS tiff_set (struct tiff_hdr *th, ushort *ntag, ushort tag, ushort type, int count, int val) { struct tiff_tag *tt; int c; tt = (struct tiff_tag *)(ntag+1) + (*ntag)++; - tt->tag = tag; - tt->type = type; - tt->count = count; - if (type < 3 && count <= 4) + tt->val.i = val; + if (type == 1 && count <= 4) FORC(4) tt->val.c[c] = val >> (c << 3); - else if (type == 3 && count <= 2) + else if (type == 2) { + count = strnlen((char *)th + val, count-1) + 1; + if (count <= 4) + FORC(4) tt->val.c[c] = ((char *)th)[val+c]; + } else if (type == 3 && count <= 2) FORC(2) tt->val.s[c] = val >> (c << 4); - else tt->val.i = val; + tt->count = count; + tt->type = type; + tt->tag = tag; } #define TOFF(ptr) ((char *)(&(ptr)) - (char *)th) @@ -9489,55 +9699,6 @@ void CLASS tiff_head (struct tiff_hdr *th, int full) th->order = htonl(0x4d4d4949) >> 16; th->magic = 42; th->ifd = 10; - if (full) { - tiff_set (&th->ntag, 254, 4, 1, 0); - tiff_set (&th->ntag, 256, 4, 1, width); - tiff_set (&th->ntag, 257, 4, 1, height); - tiff_set (&th->ntag, 258, 3, colors, output_bps); - if (colors > 2) - th->tag[th->ntag-1].val.i = TOFF(th->bps); - FORC4 th->bps[c] = output_bps; - tiff_set (&th->ntag, 259, 3, 1, 1); - tiff_set (&th->ntag, 262, 3, 1, 1 + (colors > 1)); - } - tiff_set (&th->ntag, 270, 2, 512, TOFF(th->desc)); - tiff_set (&th->ntag, 271, 2, 64, TOFF(th->make)); - tiff_set (&th->ntag, 272, 2, 64, TOFF(th->model)); - if (full) { - if (oprof) psize = ntohl(oprof[0]); - tiff_set (&th->ntag, 273, 4, 1, sizeof *th + psize); - tiff_set (&th->ntag, 277, 3, 1, colors); - tiff_set (&th->ntag, 278, 4, 1, height); - tiff_set (&th->ntag, 279, 4, 1, height*width*colors*output_bps/8); - } else - tiff_set (&th->ntag, 274, 3, 1, "12435867"[flip]-'0'); - tiff_set (&th->ntag, 282, 5, 1, TOFF(th->rat[0])); - tiff_set (&th->ntag, 283, 5, 1, TOFF(th->rat[2])); - tiff_set (&th->ntag, 284, 3, 1, 1); - tiff_set (&th->ntag, 296, 3, 1, 2); - tiff_set (&th->ntag, 305, 2, 32, TOFF(th->soft)); - tiff_set (&th->ntag, 306, 2, 20, TOFF(th->date)); - tiff_set (&th->ntag, 315, 2, 64, TOFF(th->artist)); - tiff_set (&th->ntag, 34665, 4, 1, TOFF(th->nexif)); - if (psize) tiff_set (&th->ntag, 34675, 7, psize, sizeof *th); - tiff_set (&th->nexif, 33434, 5, 1, TOFF(th->rat[4])); - tiff_set (&th->nexif, 33437, 5, 1, TOFF(th->rat[6])); - tiff_set (&th->nexif, 34855, 3, 1, iso_speed); - tiff_set (&th->nexif, 37386, 5, 1, TOFF(th->rat[8])); - if (gpsdata[1]) { - tiff_set (&th->ntag, 34853, 4, 1, TOFF(th->ngps)); - tiff_set (&th->ngps, 0, 1, 4, 0x202); - tiff_set (&th->ngps, 1, 2, 2, gpsdata[29]); - tiff_set (&th->ngps, 2, 5, 3, TOFF(th->gps[0])); - tiff_set (&th->ngps, 3, 2, 2, gpsdata[30]); - tiff_set (&th->ngps, 4, 5, 3, TOFF(th->gps[6])); - tiff_set (&th->ngps, 5, 1, 1, gpsdata[31]); - tiff_set (&th->ngps, 6, 5, 1, TOFF(th->gps[18])); - tiff_set (&th->ngps, 7, 5, 3, TOFF(th->gps[12])); - tiff_set (&th->ngps, 18, 2, 12, TOFF(th->gps[20])); - tiff_set (&th->ngps, 29, 2, 12, TOFF(th->gps[23])); - memcpy (th->gps, gpsdata, sizeof th->gps); - } th->rat[0] = th->rat[2] = 300; th->rat[1] = th->rat[3] = 1; FORC(6) th->rat[4+c] = 1000000; @@ -9552,6 +9713,55 @@ void CLASS tiff_head (struct tiff_hdr *th, int full) sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); strncpy (th->artist, artist, 64); + if (full) { + tiff_set (th, &th->ntag, 254, 4, 1, 0); + tiff_set (th, &th->ntag, 256, 4, 1, width); + tiff_set (th, &th->ntag, 257, 4, 1, height); + tiff_set (th, &th->ntag, 258, 3, colors, output_bps); + if (colors > 2) + th->tag[th->ntag-1].val.i = TOFF(th->bps); + FORC4 th->bps[c] = output_bps; + tiff_set (th, &th->ntag, 259, 3, 1, 1); + tiff_set (th, &th->ntag, 262, 3, 1, 1 + (colors > 1)); + } + tiff_set (th, &th->ntag, 270, 2, 512, TOFF(th->desc)); + tiff_set (th, &th->ntag, 271, 2, 64, TOFF(th->make)); + tiff_set (th, &th->ntag, 272, 2, 64, TOFF(th->model)); + if (full) { + if (oprof) psize = ntohl(oprof[0]); + tiff_set (th, &th->ntag, 273, 4, 1, sizeof *th + psize); + tiff_set (th, &th->ntag, 277, 3, 1, colors); + tiff_set (th, &th->ntag, 278, 4, 1, height); + tiff_set (th, &th->ntag, 279, 4, 1, height*width*colors*output_bps/8); + } else + tiff_set (th, &th->ntag, 274, 3, 1, "12435867"[flip]-'0'); + tiff_set (th, &th->ntag, 282, 5, 1, TOFF(th->rat[0])); + tiff_set (th, &th->ntag, 283, 5, 1, TOFF(th->rat[2])); + tiff_set (th, &th->ntag, 284, 3, 1, 1); + tiff_set (th, &th->ntag, 296, 3, 1, 2); + tiff_set (th, &th->ntag, 305, 2, 32, TOFF(th->soft)); + tiff_set (th, &th->ntag, 306, 2, 20, TOFF(th->date)); + tiff_set (th, &th->ntag, 315, 2, 64, TOFF(th->artist)); + tiff_set (th, &th->ntag, 34665, 4, 1, TOFF(th->nexif)); + if (psize) tiff_set (th, &th->ntag, 34675, 7, psize, sizeof *th); + tiff_set (th, &th->nexif, 33434, 5, 1, TOFF(th->rat[4])); + tiff_set (th, &th->nexif, 33437, 5, 1, TOFF(th->rat[6])); + tiff_set (th, &th->nexif, 34855, 3, 1, iso_speed); + tiff_set (th, &th->nexif, 37386, 5, 1, TOFF(th->rat[8])); + if (gpsdata[1]) { + tiff_set (th, &th->ntag, 34853, 4, 1, TOFF(th->ngps)); + tiff_set (th, &th->ngps, 0, 1, 4, 0x202); + tiff_set (th, &th->ngps, 1, 2, 2, gpsdata[29]); + tiff_set (th, &th->ngps, 2, 5, 3, TOFF(th->gps[0])); + tiff_set (th, &th->ngps, 3, 2, 2, gpsdata[30]); + tiff_set (th, &th->ngps, 4, 5, 3, TOFF(th->gps[6])); + tiff_set (th, &th->ngps, 5, 1, 1, gpsdata[31]); + tiff_set (th, &th->ngps, 6, 5, 1, TOFF(th->gps[18])); + tiff_set (th, &th->ngps, 7, 5, 3, TOFF(th->gps[12])); + tiff_set (th, &th->ngps, 18, 2, 12, TOFF(th->gps[20])); + tiff_set (th, &th->ngps, 29, 2, 12, TOFF(th->gps[23])); + memcpy (th->gps, gpsdata, sizeof th->gps); + } } void CLASS jpeg_thumb() @@ -9672,7 +9882,7 @@ int CLASS main (int argc, const char **argv) puts(_("-n Set threshold for wavelet denoising")); puts(_("-H [0-9] Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild)")); puts(_("-t [0-7] Flip image (0=none, 3=180, 5=90CCW, 6=90CW)")); - puts(_("-o [0-5] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ)")); + puts(_("-o [0-6] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ,ACES)")); #ifndef NO_LCMS puts(_("-o Apply output ICC profile from file")); puts(_("-p Apply camera ICC profile from file or \"embed\"")); diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index c0dbd816d..8ebc073d1 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -12,7 +12,7 @@ /* dcraw.c -- Dave Coffin's raw photo decoder - Copyright 1997-2015 by Dave Coffin, dcoffin a cybercom o net + Copyright 1997-2016 by Dave Coffin, dcoffin a cybercom o net This is a command-line ANSI C program to convert raw photos from any digital camera on any computer running any operating system. @@ -31,11 +31,11 @@ *If you have not modified dcraw.c in any way, a link to my homepage qualifies as "full source code". - $Revision: 1.475 $ - $Date: 2015/04/11 00:08:36 $ + $Revision: 1.477 $ + $Date: 2016/05/10 21:30:43 $ */ -#define DCRAW_VERSION "9.25" +#define DCRAW_VERSION "9.27" #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -100,15 +100,6 @@ typedef unsigned long long UINT64; #define _(String) (String) #endif -#ifdef LJPEG_DECODE -#error Please compile dcraw.c by itself. -#error Do not link it with ljpeg_decode. -#endif - -#ifndef LONG_BIT -#define LONG_BIT (8 * sizeof (long)) -#endif - #define ushort UshORt typedef unsigned char uchar; typedef unsigned short ushort; @@ -787,17 +778,15 @@ struct jhead { int CLASS ljpeg_start (struct jhead *jh, int info_only) { - int c, tag; - ushort len; + ushort c, tag, len; uchar data[0x10000]; const uchar *dp; memset (jh, 0, sizeof *jh); jh->restart = INT_MAX; - fread (data, 2, 1, ifp); - if (data[1] != 0xd8) return 0; + if ((fgetc(ifp),fgetc(ifp)) != 0xd8) return 0; do { - fread (data, 2, 2, ifp); + if (!fread (data, 2, 2, ifp)) return 0; tag = data[0] << 8 | data[1]; len = (data[2] << 8 | data[3]) - 2; if (tag <= 0xff00) return 0; @@ -805,7 +794,9 @@ int CLASS ljpeg_start (struct jhead *jh, int info_only) switch (tag) { case 0xffc3: jh->sraw = ((data[7] >> 4) * (data[7] & 15) - 1) & 3; + case 0xffc1: case 0xffc0: + jh->algo = tag & 0xff; jh->bits = data[0]; jh->high = data[1] << 8 | data[2]; jh->wide = data[3] << 8 | data[4]; @@ -814,20 +805,25 @@ int CLASS ljpeg_start (struct jhead *jh, int info_only) break; case 0xffc4: if (info_only) break; - for (dp = data; dp < data+len && (c = *dp++) < 4; ) + for (dp = data; dp < data+len && !((c = *dp++) & -20); ) jh->free[c] = jh->huff[c] = make_decoder_ref (&dp); break; case 0xffda: jh->psv = data[1+data[0]*2]; jh->bits -= data[3+data[0]*2] & 15; break; + case 0xffdb: + FORC(64) jh->quant[c] = data[c*2+1] << 8 | data[c*2+2]; + break; case 0xffdd: jh->restart = data[0] << 8 | data[1]; } } while (tag != 0xffda); + if (jh->bits > 16 || jh->clrs > 6 || + !jh->bits || !jh->high || !jh->wide || !jh->clrs) return 0; if (info_only) return 1; - if (jh->clrs > 6 || !jh->huff[0]) return 0; - FORC(5) if (!jh->huff[c+1]) jh->huff[c+1] = jh->huff[c]; + if (!jh->huff[0]) return 0; + FORC(19) if (!jh->huff[c+1]) jh->huff[c+1] = jh->huff[c]; if (jh->sraw) { FORC(4) jh->huff[2+c] = jh->huff[1]; FORC(jh->sraw) jh->huff[1+c] = jh->huff[0]; @@ -1006,23 +1002,59 @@ void CLASS adobe_copy_pixel (unsigned row, unsigned col, ushort **rp) { int c; - if (is_raw == 2 && shot_select) (*rp)++; + if (tiff_samples == 2 && shot_select) (*rp)++; if (raw_image) { if (row < raw_height && col < raw_width) RAW(row,col) = curve[**rp]; - *rp += is_raw; + *rp += tiff_samples; } else { if (row < height && col < width) FORC(tiff_samples) image[row*width+col][c] = curve[(*rp)[c]]; *rp += tiff_samples; } - if (is_raw == 2 && shot_select) (*rp)--; + if (tiff_samples == 2 && shot_select) (*rp)--; +} + +void CLASS ljpeg_idct (struct jhead *jh) +{ + int c, i, j, len, skip, coef; + float work[3][8][8]; + static float cs[106] = { 0 }; + static const uchar zigzag[80] = + { 0, 1, 8,16, 9, 2, 3,10,17,24,32,25,18,11, 4, 5,12,19,26,33, + 40,48,41,34,27,20,13, 6, 7,14,21,28,35,42,49,56,57,50,43,36, + 29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54, + 47,55,62,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 }; + + if (!cs[0]) + FORC(106) cs[c] = cos((c & 31)*M_PI/16)/2; + memset (work, 0, sizeof work); + work[0][0][0] = jh->vpred[0] += ljpeg_diff (jh->huff[0]) * jh->quant[0]; + for (i=1; i < 64; i++ ) { + len = gethuff (jh->huff[16]); + i += skip = len >> 4; + if (!(len &= 15) && skip < 15) break; + coef = getbits(len); + if ((coef & (1 << (len-1))) == 0) + coef -= (1 << len) - 1; + ((float *)work)[zigzag[i]] = coef * jh->quant[i]; + } + FORC(8) work[0][0][c] *= M_SQRT1_2; + FORC(8) work[0][c][0] *= M_SQRT1_2; + for (i=0; i < 8; i++) + for (j=0; j < 8; j++) + FORC(8) work[1][i][j] += work[0][i][c] * cs[(j*2+1)*c]; + for (i=0; i < 8; i++) + for (j=0; j < 8; j++) + FORC(8) work[2][i][j] += work[1][c][j] * cs[(i*2+1)*c]; + + FORC(64) jh->idct[c] = CLIP(((float *)work[2])[c]+0.5); } void CLASS lossless_dng_load_raw() { - unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col; + unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col, i, j; struct jhead jh; ushort *rp; @@ -1033,15 +1065,32 @@ void CLASS lossless_dng_load_raw() if (!ljpeg_start (&jh, 0)) break; jwide = jh.wide; if (filters) jwide *= jh.clrs; - jwide /= is_raw; - for (row=col=jrow=0; jrow < jh.high; jrow++) { - rp = ljpeg_row (jrow, &jh); - for (jcol=0; jcol < jwide; jcol++) { - adobe_copy_pixel (trow+row, tcol+col, &rp); - if (++col >= tile_width || col >= raw_width) - row += 1 + (col = 0); - } - } + jwide /= MIN (is_raw, tiff_samples); + switch (jh.algo) { + case 0xc1: + jh.vpred[0] = 16384; + getbits(-1); + for (jrow=0; jrow+7 < jh.high; jrow += 8) { + for (jcol=0; jcol+7 < jh.wide; jcol += 8) { + ljpeg_idct (&jh); + rp = jh.idct; + row = trow + jcol/tile_width + jrow*2; + col = tcol + jcol%tile_width; + for (i=0; i < 16; i+=2) + for (j=0; j < 8; j++) + adobe_copy_pixel (row+i, col+j, &rp); + } + } + break; + case 0xc3: + for (row=col=jrow=0; jrow < jh.high; jrow++) { + rp = ljpeg_row (jrow, &jh); + for (jcol=0; jcol < jwide; jcol++) { + adobe_copy_pixel (trow+row, tcol+col, &rp); + if (++col >= tile_width || col >= raw_width) + row += 1 + (col = 0); + } + } } fseek (ifp, save+4, SEEK_SET); if ((tcol += tile_width) >= raw_width) trow += tile_length + (tcol = 0); @@ -1685,8 +1734,7 @@ void CLASS phase_one_load_raw_c() pixel[col] = curve[pixel[col]]; } for (col=0; col < raw_width; col++) { - if (ph1.format != 8) pixel[col] <<= 2; - i = pixel[col] - ph1.black + i = (pixel[col] << 2*(ph1.format != 8)) - ph1.black + cblack[row][col >= ph1.split_col] + rblack[col][row >= ph1.split_row]; if (i > 0) RAW(row,col) = i; @@ -3111,6 +3159,8 @@ void CLASS smal_decode_segment (unsigned seg[2][2], int holes) fseek (ifp, seg[0][1]+1, SEEK_SET); getbits(-1); + if (seg[1][0] > raw_width*raw_height) + seg[1][0] = raw_width*raw_height; for (pix=seg[0][0]; pix < seg[1][0]; pix++) { for (s=0; s < 3; s++) { data = data << nbits | getbits(nbits); @@ -5237,7 +5287,7 @@ nf: order = 0x4949; FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get4(); } if (tag == 0x3d && type == 3 && len == 4) - FORC4 cblack[c ^ c >> 1] = get2() >> (14-tiff_ifd[2].bps); + FORC4 cblack[c ^ c >> 1] = get2() >> (14-tiff_bps); if (tag == 0x81 && type == 4) { data_offset = get4(); fseek (ifp, data_offset + 41, SEEK_SET); @@ -5267,7 +5317,8 @@ nf: order = 0x4949; break; case 102: fseek (ifp, 6, SEEK_CUR); - goto get2_rggb; + FORC4 cam_mul[c ^ (c >> 1)] = get2(); + break; case 103: fseek (ifp, 16, SEEK_CUR); FORC4 cam_mul[c] = get2(); @@ -5301,7 +5352,7 @@ nf: order = 0x4949; if (tag == 0x200 && len == 4) FORC4 cblack[c ^ c >> 1] = get2(); if (tag == 0x201 && len == 4) - goto get2_rggb; + FORC4 cam_mul[c ^ (c >> 1)] = get2(); if (tag == 0x220 && type == 7) meta_offset = ftell(ifp); if (tag == 0x401 && type == 4 && len == 4) @@ -5347,7 +5398,7 @@ get2_256: } if ((tag | 0x70) == 0x2070 && (type == 4 || type == 13)) fseek (ifp, get4()+base, SEEK_SET); - if (tag == 0x2020) + if (tag == 0x2020 && !strncmp(buf,"OLYMP",5)) parse_thumb_note (base, 257, 258); if (tag == 0x2040) parse_makernote (base, 0x2040); @@ -5358,11 +5409,12 @@ get2_256: if (tag == 0x4001 && len > 500) { i = len == 582 ? 50 : len == 653 ? 68 : len == 5120 ? 142 : 126; fseek (ifp, i, SEEK_CUR); -get2_rggb: FORC4 cam_mul[c ^ (c >> 1)] = get2(); - i = len >> 3 == 164 || len == 1506 ? 112:22; - fseek (ifp, i, SEEK_CUR); - FORC4 sraw_mul[c ^ (c >> 1)] = get2(); + for (i+=18; i <= len; i+=10) { + get2(); + FORC4 sraw_mul[c ^ (c >> 1)] = get2(); + if (sraw_mul[1] == 1170) break; + } } if (tag == 0x4021 && get4() && get4()) FORC4 cam_mul[c] = 1024; @@ -5415,13 +5467,14 @@ void CLASS parse_exif (int base) while (entries--) { tiff_get (base, &tag, &type, &len, &save); switch (tag) { - case 33434: shutter = getreal(type); break; + case 33434: tiff_ifd[tiff_nifds-1].shutter = shutter = getreal(type); break; case 33437: aperture = getreal(type); break; case 34855: iso_speed = get2(); break; case 34866: if((!iso_speed) || iso_speed == 65535) iso_speed = get4();break; case 36867: case 36868: get_timestamp(0); break; case 37377: if ((expo = -getreal(type)) < 128) + tiff_ifd[tiff_nifds-1].shutter = shutter = pow (2, expo); break; case 37378: aperture = pow (2, getreal(type)/2); break; case 37386: focal_len = getreal(type); break; @@ -5664,6 +5717,8 @@ int CLASS parse_tiff_ifd (int base) case 61443: tiff_ifd[ifd].samples = len & 7; tiff_ifd[ifd].bps = getint(type); + if (tiff_bps < tiff_ifd[ifd].bps) + tiff_bps = tiff_ifd[ifd].bps; break; case 61446: raw_height = 0; @@ -5835,7 +5890,7 @@ int CLASS parse_tiff_ifd (int base) parse_kodak_ifd (base); break; case 33434: /* ExposureTime */ - shutter = getreal(type); + tiff_ifd[ifd].shutter = shutter = getreal(type); break; case 33437: /* FNumber */ aperture = getreal(type); @@ -5964,7 +6019,12 @@ int CLASS parse_tiff_ifd (int base) is_raw = 1; break; case 50708: /* UniqueCameraModel */ - fgets (model3, 64, ifp); + if (model[0]) break; + fgets (make, 64, ifp); + if ((cp = strchr(make,' '))) { + strcpy(model,cp+1); + *cp = 0; + } break; case 50710: /* CFAPlaneColor */ if (filters == 9) break; @@ -5979,10 +6039,7 @@ guess_cfa_pc: filters -= !filters; break; case 50711: /* CFALayout */ - if (get2() == 2) { - fuji_width = 1; - filters = 0x49494949; - } + if (get2() == 2) fuji_width = 1; break; case 291: case 50712: /* LinearizationTable */ @@ -6014,7 +6071,7 @@ guess_cfa_pc: break; case 50715: /* BlackLevelDeltaH */ case 50716: /* BlackLevelDeltaV */ - for (num=i=0; i < len; i++) + for (num=i=0; i < (len & 0xffff); i++) num += getreal(type); black += num/len + 0.5; break; @@ -6144,7 +6201,7 @@ int CLASS parse_tiff (int base) void CLASS apply_tiff() { - int max_samp=0, raw=-1, thm=-1, i; + int max_samp=0, ties=0, os, ns, raw=-1, thm=-1, i; struct jhead jh; thumb_misc = 16; @@ -6156,13 +6213,26 @@ void CLASS apply_tiff() thumb_height = jh.high; } } + for (i=tiff_nifds; i--; ) { + if (tiff_ifd[i].shutter) + shutter = tiff_ifd[i].shutter; + tiff_ifd[i].shutter = shutter; + } + for (i=0; i < tiff_nifds; i++) { if (max_samp < tiff_ifd[i].samples) max_samp = tiff_ifd[i].samples; if (max_samp > 3) max_samp = 3; + os = raw_width*raw_height; + ns = tiff_ifd[i].width*tiff_ifd[i].height; + if (tiff_bps) { + os *= tiff_bps; + ns *= tiff_ifd[i].bps; + } if ((tiff_ifd[i].comp != 6 || tiff_ifd[i].samples != 3) && (tiff_ifd[i].width | tiff_ifd[i].height) < 0x10000 && - tiff_ifd[i].width*tiff_ifd[i].height > raw_width*raw_height) { + ns && ((ns > os && (ties = 1)) || + (ns == os && shot_select == ties++))) { raw_width = tiff_ifd[i].width; raw_height = tiff_ifd[i].height; tiff_bps = tiff_ifd[i].bps; @@ -6172,9 +6242,11 @@ void CLASS apply_tiff() tiff_samples = tiff_ifd[i].samples; tile_width = tiff_ifd[i].tile_width; tile_length = tiff_ifd[i].tile_length; + shutter = tiff_ifd[i].shutter; raw = i; } } + if (is_raw == 1 && ties) is_raw = ties; if (!tile_width ) tile_width = INT_MAX; if (!tile_length) tile_length = INT_MAX; for (i=tiff_nifds; i--; ) @@ -6257,8 +6329,8 @@ void CLASS apply_tiff() if (!dng_version) if ( (tiff_samples == 3 && tiff_ifd[raw].bytes && tiff_bps != 14 && (tiff_compress & -16) != 32768) - || (tiff_bps == 8 && !strcasestr(make,"Kodak") && - !strstr(model2,"DEBUG RAW"))) + || (tiff_bps == 8 && strncmp(make,"Phase",5) && + !strcasestr(make,"Kodak") && !strstr(model2,"DEBUG RAW"))) is_raw = 0; for (i=0; i < tiff_nifds; i++) if (i != raw && tiff_ifd[i].samples == max_samp && @@ -6400,9 +6472,7 @@ void CLASS ciff_block_1030() bitbuf = bitbuf << 16 | (get2() ^ key[i++ & 1]); vbits += 16; } - white[row][col] = - bitbuf << (LONG_BIT - vbits) >> (LONG_BIT - bpp); - vbits -= bpp; + white[row][col] = bitbuf >> (vbits -= bpp) & ~(-1 << bpp); } } @@ -6682,7 +6752,7 @@ void CLASS parse_fuji (int offset) } else if (tag == 0xc000) { c = order; order = 0x4949; - while ((tag = get4()) > 10000); + while ((tag = get4()) > raw_width); width = tag; height = get4(); order = c; @@ -6704,7 +6774,7 @@ int CLASS parse_jpeg (int offset) order = 0x4d4d; len = get2() - 2; save = ftell(ifp); - if (mark == 0xc0 || mark == 0xc3) { + if (mark == 0xc0 || mark == 0xc3 || mark == 0xc9) { fgetc(ifp); raw_height = get2(); raw_width = get2(); @@ -7003,8 +7073,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9805,-2689,-1312,-5803,13064,3068,-2438,3075,8775 } }, { "Canon EOS D60", 0, 0xfa0, { 6188,-1341,-890,-7168,14489,2937,-2640,3228,8483 } }, - { "Canon EOS 5DS", 0, 0x3c96, /* DJC */ - { 6885,-753,-856,-4416,11752,2665,-1266,2393,5468 } }, + { "Canon EOS 5DS", 0, 0x3c96, + { 6250,-711,-808,-5153,12794,2636,-1249,2198,5610 } }, { "Canon EOS 5D Mark III", 0, 0x3c80, { 6722,-635,-963,-4287,12460,2028,-908,2162,5668 } }, { "Canon EOS 5D Mark II", 0, 0x3cf0, @@ -7033,6 +7103,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6719,-994,-925,-4408,12426,2211,-887,2129,6051 } }, { "Canon EOS 70D", 0, 0x3bc7, { 7034,-804,-1014,-4420,12564,2058,-851,1994,5758 } }, + { "Canon EOS 80D", 0, 0, + { 7457,-671,-937,-4849,12495,2643,-1213,2354,5492 } }, { "Canon EOS 100D", 0, 0x350f, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS 300D", 0, 0xfa0, @@ -7053,12 +7125,22 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS 700D", 0, 0x3c00, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, + { "Canon EOS 750D", 0, 0x368e, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, + { "Canon EOS 760D", 0, 0x350f, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, { "Canon EOS 1000D", 0, 0xe43, { 6771,-1139,-977,-7818,15123,2928,-1244,1437,7533 } }, { "Canon EOS 1100D", 0, 0x3510, { 6444,-904,-893,-4563,12308,2535,-903,2016,6728 } }, { "Canon EOS 1200D", 0, 0x37c2, { 6461,-907,-882,-4300,12184,2378,-819,1944,5931 } }, + { "Canon EOS 1300D", 0, 0x3510, + { 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 } }, + { "Canon EOS M3", 0, 0, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, + { "Canon EOS M10", 0, 0, + { 6400,-480,-888,-5294,13416,2047,-1296,2203,6137 } }, { "Canon EOS M", 0, 0, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS-1Ds Mark III", 0, 0x3bb0, @@ -7077,6 +7159,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 4374,3631,-1743,-7520,15212,2472,-2892,3632,8161 } }, { "Canon EOS-1D C", 0, 0x3c4e, { 6847,-614,-1014,-4669,12737,2139,-1197,2488,6846 } }, + { "Canon EOS-1D X Mark II", 0, 0, + { 7596,-978,-967,-4808,12571,2503,-1398,2567,5752 } }, { "Canon EOS-1D X", 0, 0x3c4e, { 6847,-614,-1014,-4669,12737,2139,-1197,2488,6846 } }, { "Canon EOS-1D", 0, 0xe20, @@ -7105,14 +7189,20 @@ void CLASS adobe_coeff (const char *make, const char *model) { -4778,9467,2172,4743,-1141,4344,-5146,9908,6077,-1566,11051,557 } }, { "Canon PowerShot G2", 0, 0, { 9087,-2693,-1049,-6715,14382,2537,-2291,2819,7790 } }, + { "Canon PowerShot G3 X", 0, 0, + { 9701,-3857,-921,-3149,11537,1817,-786,1817,5147 } }, { "Canon PowerShot G3", 0, 0, { 9212,-2781,-1073,-6573,14189,2605,-2300,2844,7664 } }, + { "Canon PowerShot G5 X", 0, 0, + { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, { "Canon PowerShot G5", 0, 0, { 9757,-2872,-933,-5972,13861,2301,-1622,2328,7212 } }, { "Canon PowerShot G6", 0, 0, { 9877,-3775,-871,-7613,14807,3072,-1448,1305,7485 } }, { "Canon PowerShot G7 X", 0, 0, { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, + { "Canon PowerShot G9 X", 0, 0, + { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, { "Canon PowerShot G9", 0, 0, { 7368,-2141,-598,-5621,13254,2625,-1418,1696,5743 } }, { "Canon PowerShot Pro1", 0, 0, @@ -7171,6 +7261,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 14134,-5576,-1527,-1991,10719,1273,-1158,1929,3581 } }, { "Canon PowerShot SX220", 0, 0, /* DJC */ { 13898,-5076,-1447,-1405,10109,1297,-244,1860,3687 } }, + { "Canon IXUS 160", 0, 0, /* DJC */ + { 11657,-3781,-1136,-3544,11262,2283,-160,1219,4700 } }, { "Casio EX-S20", 0, 0, /* DJC */ { 11634,-3924,-1128,-4968,12954,2015,-1588,2648,7206 } }, { "Casio EX-Z750", 0, 0, /* DJC */ @@ -7185,6 +7277,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 20183,-4295,-423,-3940,15330,3985,-280,4870,9800 } }, { "Contax N Digital", 0, 0xf1e, { 7777,1285,-1053,-9280,16543,2916,-3677,5679,7060 } }, + { "DXO ONE", 0, 0, + { 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 } }, { "Epson R-D1", 0, 0, { 6827,-1878,-732,-8429,16012,2564,-704,592,7145 } }, { "Fujifilm E550", 0, 0, @@ -7265,25 +7359,31 @@ void CLASS adobe_coeff (const char *make, const char *model) { 11768,-4971,-1133,-4904,12927,2183,-480,1723,4605 } }, { "Fujifilm X30", 0, 0, { 12328,-5256,-1144,-4469,12927,1675,-87,1291,4351 } }, + { "Fujifilm X70", 0, 0, + { 10450,-4329,-878,-3217,11105,2421,-752,1758,6519 } }, { "Fujifilm X-Pro1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, + { "Fujifilm X-Pro2", 0, 0, + { 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 } }, { "Fujifilm X-A1", 0, 0, { 11086,-4555,-839,-3512,11310,2517,-815,1341,5940 } }, { "Fujifilm X-A2", 0, 0, { 10763,-4560,-917,-3346,11311,2322,-475,1135,5843 } }, { "Fujifilm X-E1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, + { "Fujifilm X-E2S", 0, 0, + { 11562,-5118,-961,-3022,11007,2311,-525,1569,6097 } }, { "Fujifilm X-E2", 0, 0, { 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 } }, { "Fujifilm X-M1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, { "Fujifilm X-S1", 0, 0, { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "Fujifilm X-T1", 0, 0, + { "Fujifilm X-T1", 0, 0, /* also X-T10 */ { 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 } }, { "Fujifilm XF1", 0, 0, { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "Fujifilm XQ", 0, 0, // XQ1 and XQ2 + { "Fujifilm XQ", 0, 0, /* XQ1 and XQ2 */ { 9252,-2704,-1064,-5893,14265,1717,-1101,2341,4349 } }, { "Imacon Ixpress", 0, 0, /* DJC */ { 7025,-1415,-704,-5188,13765,1424,-1248,2742,6038 } }, @@ -7425,8 +7525,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 } }, { "Nikon D5500", 0, 0, { 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 } }, + { "Nikon D500", 0, 0, + { 8813,-3210,-1036,-4703,12868,2021,-1054,1940,6129 } }, { "Nikon D50", 0, 0, { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, + { "Nikon D5", 0, 0, + { 9200,-3522,-992,-5755,13803,2117,-753,1486,6338 } }, { "Nikon D600", 0, 0x3e07, { 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 } }, { "Nikon D610", 0, 0, @@ -7437,8 +7541,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } }, { "Nikon D7100", 0, 0, { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } }, - { "Nikon D7200", 0, 0, /* DJC */ - { 6111,-2759,-358,-5108,10766,4343,-769,1691,8030 } }, + { "Nikon D7200", 0, 0, + { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } }, { "Nikon D750", 0, 0, { 9020,-2890,-715,-4535,12436,2348,-934,1919,7086 } }, { "Nikon D700", 0, 0, @@ -7503,8 +7607,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } }, { "Nikon 1 J4", 0, 0, { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } }, - { "Nikon 1 J5", 0, 0, /* DJC */ - { 2621,-856,500,-4471,8761,5711,-1321,2644,11945 } }, + { "Nikon 1 J5", 0, 0, + { 7520,-2518,-645,-3844,12102,1945,-913,2249,6835 } }, { "Nikon 1 S2", 200, 0, { 6612,-1342,-618,-3338,11055,2623,-174,1792,5075 } }, { "Nikon 1 V2", 0, 0, @@ -7515,6 +7619,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } }, { "Nikon 1 ", 0, 0, /* J1, J2, S1, V1 */ { 8994,-2667,-865,-4594,12324,2552,-699,1786,6260 } }, + { "Olympus AIR A01", 0, 0, + { 8992,-3093,-639,-2563,10721,2122,-437,1270,5473 } }, { "Olympus C5050", 0, 0, { 10508,-3124,-1273,-6079,14294,1901,-1653,2306,6237 } }, { "Olympus C5060", 0, 0, @@ -7585,7 +7691,7 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, { "Olympus E-PM2", 0, 0, { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, - { "Olympus E-M10", 0, 0, + { "Olympus E-M10", 0, 0, /* also E-M10 Mark II */ { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, { "Olympus E-M1", 0, 0, { 7687,-1984,-606,-4327,11928,2721,-1381,2339,6452 } }, @@ -7593,6 +7699,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 } }, { "Olympus E-M5", 0, 0xfe1, { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, + { "Olympus PEN-F", 0, 0, + { 9476,-3182,-765,-2613,10958,1893,-449,1315,5268 } }, + { "Olympus SH-2", 0, 0, + { 10156,-3425,-1077,-2611,11177,1624,-385,1592,5080 } }, { "Olympus SP350", 0, 0, { 12078,-4836,-1069,-6671,14306,2578,-786,939,7418 } }, { "Olympus SP3", 0, 0, @@ -7609,6 +7719,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 11522,-4044,-1146,-4736,12172,2904,-988,1829,6039 } }, { "Olympus STYLUS1", 0, 0, { 8360,-2420,-880,-3928,12353,1739,-1381,2416,5173 } }, + { "Olympus TG-4", 0, 0, + { 11426,-4159,-1126,-2066,10678,1593,-120,1327,4998 } }, { "Olympus XZ-10", 0, 0, { 9777,-3483,-925,-2886,11297,1800,-602,1663,5134 } }, { "Olympus XZ-1", 0, 0, @@ -7643,6 +7755,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8843,-2837,-625,-5025,12644,2668,-411,1234,7410 } }, { "Pentax K-r", 0, 0, { 9895,-3077,-850,-5304,13035,2521,-883,1768,6936 } }, + { "Pentax K-1", 0, 0, + { 8566,-2746,-1201,-3612,12204,1550,-893,1680,6264 } }, + { "Pentax K-30", 0, 0, + { 8710,-2632,-1167,-3995,12301,1881,-981,1719,6535 } }, + { "Pentax K-3 II", 0, 0, + { 8626,-2607,-1155,-3995,12301,1881,-1039,1822,6925 } }, { "Pentax K-3", 0, 0, { 7415,-2052,-721,-5186,12788,2682,-1446,2157,6773 } }, { "Pentax K-5 II", 0, 0, @@ -7653,6 +7771,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9142,-2947,-678,-8648,16967,1663,-2224,2898,8615 } }, { "Pentax K-S1", 0, 0, { 8512,-3211,-787,-4167,11966,2487,-638,1288,6054 } }, + { "Pentax K-S2", 0, 0, + { 8662,-3280,-798,-3928,11771,2444,-586,1232,6054 } }, + { "Pentax Q-S1", 0, 0, + { 12995,-5593,-1107,-1879,10139,2027,-64,1233,4919 } }, { "Pentax 645D", 0, 0x3e00, { 10646,-3593,-1158,-3329,11699,1831,-667,2874,6287 } }, { "Panasonic DMC-CM1", 15, 0, @@ -7663,6 +7785,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9932,-3060,-935,-5809,13331,2753,-1267,2155,5575 } }, { "Panasonic DMC-FZ28", 15, 0xf96, { 10109,-3488,-993,-5412,12812,2916,-1305,2140,5543 } }, + { "Panasonic DMC-FZ330", 15, 0, + { 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 } }, + { "Panasonic DMC-FZ300", 15, 0, + { 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 } }, { "Panasonic DMC-FZ30", 0, 0xf94, { 10976,-4029,-1141,-7918,15491,2600,-1670,2071,8246 } }, { "Panasonic DMC-FZ3", 15, 0, @@ -7743,6 +7869,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7798,-2562,-740,-3879,11584,2613,-1055,2248,5434 } }, { "Panasonic DMC-G6", 15, 0xfff, { 8294,-2891,-651,-3869,11590,2595,-1183,2267,5352 } }, + { "Panasonic DMC-G7", 15, 0xfff, + { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, { "Panasonic DMC-GF1", 15, 0xf92, { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } }, { "Panasonic DMC-GF2", 15, 0xfff, @@ -7755,6 +7883,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8130,-2801,-946,-3520,11289,2552,-1314,2511,5791 } }, { "Panasonic DMC-GF7", 15, 0, { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, + { "Panasonic DMC-GF8", 15, 0, + { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, { "Panasonic DMC-GH1", 15, 0xf92, { 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } }, { "Panasonic DMC-GH2", 15, 0xf95, @@ -7771,6 +7901,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6763,-1919,-863,-3868,11515,2684,-1216,2387,5879 } }, { "Panasonic DMC-GX7", 15, 0, { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, + { "Panasonic DMC-GX8", 15, 0, + { 7564,-2263,-606,-3148,11239,2177,-540,1435,4853 } }, + { "Panasonic DMC-TZ1", 15, 0, + { 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 } }, + { "Panasonic DMC-ZS1", 15, 0, + { 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 } }, { "Panasonic DMC-TZ6", 15, 0, { 8607,-2822,-808,-3755,11930,2049,-820,2060,5224 } }, { "Panasonic DMC-ZS4", 15, 0, @@ -7779,6 +7915,20 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 } }, { "Panasonic DMC-ZS5", 15, 0, { 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 } }, + { "Panasonic DMC-TZ8", 15, 0, + { 8550,-2908,-842,-3195,11529,1881,-338,1603,4631 } }, + { "Panasonic DMC-ZS6", 15, 0, + { 8550,-2908,-842,-3195,11529,1881,-338,1603,4631 } }, + { "Leica S (Typ 007)", 0, 0, + { 6063,-2234,-231,-5210,13787,1500,-1043,2866,6997 } }, + { "Leica X", 0, 0, /* X and X-U, both (Typ 113) */ + { 7712,-2059,-653,-3882,11494,2726,-710,1332,5958 } }, + { "Leica Q (Typ 116)", 0, 0, + { 11865,-4523,-1441,-5423,14458,935,-1587,2687,4830 } }, + { "Leica M (Typ 262)", 0, 0, + { 6653,-1486,-611,-4221,13303,929,-881,2416,7226 } }, + { "Leica SL (Typ 601)", 0, 0, + { 11865,-4523,-1441,-5423,14458,935,-1587,2687,4830} }, { "Phase One H 20", 0, 0, /* DJC */ { 1313,1855,-109,-6715,15908,808,-327,1840,6020 } }, { "Phase One H 25", 0, 0, @@ -7793,8 +7943,14 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, { "Phase One P65", 0, 0, { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, + { "Photron BC2-HD", 0, 0, /* DJC */ + { 14603,-4122,-528,-1810,9794,2017,-297,2763,5936 } }, { "Red One", 704, 0xffff, /* DJC */ { 21014,-7891,-2613,-3056,12201,856,-2203,5125,8042 } }, + { "Ricoh GR II", 0, 0, + { 4630,-834,-423,-4977,12805,2417,-638,1467,6115 } }, + { "Ricoh GR", 0, 0, + { 3708,-543,-160,-5381,12254,3556,-1471,1929,8234 } }, { "Samsung EX1", 0, 0x3e00, { 8898,-2498,-994,-3144,11328,2066,-760,1381,4576 } }, { "Samsung EX2F", 0, 0x7ff, @@ -7803,6 +7959,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7557,-2522,-739,-4679,12949,1894,-840,1777,5311 } }, { "Samsung NX mini", 0, 0, { 5222,-1196,-550,-6540,14649,2009,-1666,2819,5657 } }, + { "Samsung NX3300", 0, 0, + { 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 } }, { "Samsung NX3000", 0, 0, { 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 } }, { "Samsung NX30", 0, 0, /* NX30, NX300, NX300M */ @@ -7819,8 +7977,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, { "Samsung NX10", 0, 0, /* also NX100 */ { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, - { "Samsung NX500", 0, 0, /* DJC */ - { 10196,-4532,-272,-3888,11489,2400,-1203,2424,9173 } }, + { "Samsung NX500", 0, 0, + { 10686,-4042,-1052,-3595,13238,276,-464,1259,5931 } }, { "Samsung NX5", 0, 0, { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, { "Samsung NX1", 0, 0, @@ -7837,18 +7995,20 @@ void CLASS adobe_coeff (const char *make, const char *model) { 16442,-2956,-2422,-2877,12128,750,-1136,6066,4559 } }, { "Sony DSC-F828", 0, 0, { 7924,-1910,-777,-8226,15459,2998,-1517,2199,6818,-7242,11401,3481 } }, - { "Sony DSC-R1", 512, 0, + { "Sony DSC-R1", 0, 0, { 8512,-2641,-694,-8042,15670,2526,-1821,2117,7414 } }, { "Sony DSC-V3", 0, 0, { 7511,-2571,-692,-7894,15088,3060,-948,1111,8128 } }, - { "Sony DSC-RX100M", 200, 0, /* M2 and M3 */ + { "Sony DSC-RX100M", 0, 0, /* M2, M3, and M4 */ { 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 } }, - { "Sony DSC-RX100", 200, 0, + { "Sony DSC-RX100", 0, 0, { 8651,-2754,-1057,-3464,12207,1373,-568,1398,4434 } }, - { "Sony DSC-RX10", 200, 0, + { "Sony DSC-RX10", 0, 0, { 6679,-1825,-745,-5047,13256,1953,-1580,2422,5183 } }, - { "Sony DSC-RX1", 128, 0, - { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, + { "Sony DSC-RX1RM2", 0, 0, + { 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 } }, + { "Sony DSC-RX1", 0, 0, + { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, { "Sony DSLR-A100", 0, 0xfeb, { 9437,-2811,-774,-8405,16215,2290,-710,596,7181 } }, { "Sony DSLR-A290", 0, 0, @@ -7865,71 +8025,77 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, { "Sony DSLR-A390", 0, 0, { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, - { "Sony DSLR-A450", 128, 0xfeb, + { "Sony DSLR-A450", 0, 0xfeb, { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "Sony DSLR-A580", 128, 0xfeb, + { "Sony DSLR-A580", 0, 0xfeb, { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "Sony DSLR-A500", 128, 0xfeb, + { "Sony DSLR-A500", 0, 0xfeb, { 6046,-1127,-278,-5574,13076,2786,-691,1419,7625 } }, - { "Sony DSLR-A5", 128, 0xfeb, + { "Sony DSLR-A5", 0, 0xfeb, { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "Sony DSLR-A700", 128, 0, + { "Sony DSLR-A700", 0, 0, { 5775,-805,-359,-8574,16295,2391,-1943,2341,7249 } }, - { "Sony DSLR-A850", 128, 0, + { "Sony DSLR-A850", 0, 0, { 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } }, - { "Sony DSLR-A900", 128, 0, + { "Sony DSLR-A900", 0, 0, { 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } }, - { "Sony ILCA-77M2", 128, 0, + { "Sony ILCA-68", 0, 0, + { 6435,-1903,-536,-4722,12449,2550,-663,1363,6517 } }, + { "Sony ILCA-77M2", 0, 0, { 5991,-1732,-443,-4100,11989,2381,-704,1467,5992 } }, - { "Sony ILCE-7M2", 128, 0, + { "Sony ILCE-6300", 0, 0, + { 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 } }, + { "Sony ILCE-7M2", 0, 0, { 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 } }, - { "Sony ILCE-7S", 128, 0, + { "Sony ILCE-7S", 0, 0, /* also ILCE-7SM2 */ { 5838,-1430,-246,-3497,11477,2297,-748,1885,5778 } }, - { "Sony ILCE-7R", 128, 0, + { "Sony ILCE-7RM2", 0, 0, + { 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 } }, + { "Sony ILCE-7R", 0, 0, { 4913,-541,-202,-6130,13513,2906,-1564,2151,7183 } }, - { "Sony ILCE-7", 128, 0, + { "Sony ILCE-7", 0, 0, { 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 } }, - { "Sony ILCE", 128, 0, /* 3000, 5000, 5100, 6000, and QX1 */ + { "Sony ILCE", 0, 0, /* 3000, 5000, 5100, 6000, and QX1 */ { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony NEX-5N", 128, 0, + { "Sony NEX-5N", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony NEX-5R", 128, 0, + { "Sony NEX-5R", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-5T", 128, 0, + { "Sony NEX-5T", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-3N", 128, 0, + { "Sony NEX-3N", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, { "Sony NEX-3", 138, 0, /* DJC */ { 6907,-1256,-645,-4940,12621,2320,-1710,2581,6230 } }, { "Sony NEX-5", 116, 0, /* DJC */ { 6807,-1350,-342,-4216,11649,2567,-1089,2001,6420 } }, - { "Sony NEX-3", 128, 0, /* Adobe */ + { "Sony NEX-3", 0, 0, /* Adobe */ { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "Sony NEX-5", 128, 0, /* Adobe */ + { "Sony NEX-5", 0, 0, /* Adobe */ { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "Sony NEX-6", 128, 0, + { "Sony NEX-6", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-7", 128, 0, + { "Sony NEX-7", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony NEX", 128, 0, /* NEX-C3, NEX-F3 */ + { "Sony NEX", 0, 0, /* NEX-C3, NEX-F3 */ { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A33", 128, 0, + { "Sony SLT-A33", 0, 0, { 6069,-1221,-366,-5221,12779,2734,-1024,2066,6834 } }, - { "Sony SLT-A35", 128, 0, + { "Sony SLT-A35", 0, 0, { 5986,-1618,-415,-4557,11820,3120,-681,1404,6971 } }, - { "Sony SLT-A37", 128, 0, + { "Sony SLT-A37", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A55", 128, 0, + { "Sony SLT-A55", 0, 0, { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "Sony SLT-A57", 128, 0, + { "Sony SLT-A57", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A58", 128, 0, + { "Sony SLT-A58", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A65", 128, 0, + { "Sony SLT-A65", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony SLT-A77", 128, 0, + { "Sony SLT-A77", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony SLT-A99", 128, 0, + { "Sony SLT-A99", 0, 0, { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, }; double cam_xyz[4][3]; @@ -8113,6 +8279,8 @@ void CLASS identify() { 5712, 3774, 62, 20, 10, 2 }, { 5792, 3804, 158, 51, 0, 0 }, { 5920, 3950, 122, 80, 2, 0 }, + { 6096, 4056, 72, 34, 0, 0 }, + { 6288, 4056, 264, 34, 0, 0 }, { 8896, 5920, 160, 64, 0, 0 }, }; static const struct { @@ -8126,6 +8294,7 @@ void CLASS identify() { 0x261, "EOS 50D" }, { 0x281, "EOS-1D Mark IV" }, { 0x287, "EOS 60D" }, { 0x167, "EOS-1DS" }, { 0x325, "EOS 70D" }, + { 0x350, "EOS 80D" }, { 0x328, "EOS-1D X Mark II" }, { 0x170, "EOS 300D" }, { 0x188, "EOS-1Ds Mark II" }, { 0x176, "EOS 450D" }, { 0x215, "EOS-1Ds Mark III" }, { 0x189, "EOS 350D" }, { 0x324, "EOS-1D C" }, @@ -8135,9 +8304,12 @@ void CLASS identify() { 0x286, "EOS 600D" }, { 0x285, "EOS 5D Mark III" }, { 0x301, "EOS 650D" }, { 0x302, "EOS 6D" }, { 0x326, "EOS 700D" }, { 0x250, "EOS 7D" }, + { 0x393, "EOS 750D" }, { 0x289, "EOS 7D Mark II" }, + { 0x347, "EOS 760D" }, { 0x254, "EOS 1000D" }, { 0x288, "EOS 1100D" }, - { 0x327, "EOS 1200D" }, + { 0x327, "EOS 1200D" }, { 0x382, "Canon EOS 5DS" }, + { 0x404, "EOS 1300D" }, { 0x401, "Canon EOS 5DS R" }, { 0x346, "EOS 100D" }, }, sonique[] = { { 0x002, "DSC-R1" }, { 0x100, "DSLR-A100" }, @@ -8165,7 +8337,10 @@ void CLASS identify() { 0x139, "ILCE-5000" }, { 0x13d, "DSC-RX100M3" }, { 0x13e, "ILCE-7S" }, { 0x13f, "ILCA-77M2" }, { 0x153, "ILCE-5100" }, { 0x154, "ILCE-7M2" }, - { 0x15a, "ILCE-QX1" }, + { 0x155, "DSC-RX100M4" },{ 0x156, "DSC-RX10M2" }, + { 0x158, "DSC-RX1RM2" }, { 0x15a, "ILCE-QX1" }, + { 0x15b, "ILCE-7RM2" }, { 0x15e, "ILCE-7SM2" }, + { 0x161, "ILCA-68" }, { 0x165, "ILCE-6300" }, }; static const struct { unsigned fsize; @@ -8202,6 +8377,7 @@ void CLASS identify() { 19131120,4168,3060,92,16, 4, 1,40,0x94,0,2,"Canon","PowerShot SX220 HS" }, { 21936096,4464,3276,25,10,73,12,40,0x16,0,2,"Canon","PowerShot SX30 IS" }, { 24724224,4704,3504, 8,16,56, 8,40,0x94,0,2,"Canon","PowerShot A3300 IS" }, + { 30858240,5248,3920, 8,16,56,16,40,0x94,0,2,"Canon","IXUS 160" }, { 1976352,1632,1211, 0, 2, 0, 1, 0,0x94,0,1,"Casio","QV-2000UX" }, { 3217760,2080,1547, 0, 0,10, 1, 0,0x94,0,1,"Casio","QV-3*00EX" }, { 6218368,2585,1924, 0, 0, 9, 0, 0,0x94,0,1,"Casio","QV-5700" }, @@ -8260,6 +8436,8 @@ void CLASS identify() { 4841984,2090,1544, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S" }, { 6114240,2346,1737, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S4" }, { 10702848,3072,2322, 0, 0, 0,21,30,0x94,0,1,"Pentax","Optio 750Z" }, + { 4147200,1920,1080, 0, 0, 0, 0, 0,0x49,0,0,"Photron","BC2-HD" }, + { 4151666,1920,1080, 0, 0, 0, 0, 0,0x49,0,0,"Photron","BC2-HD",8 }, { 13248000,2208,3000, 0, 0, 0, 0,13,0x61,0,0,"Pixelink","A782" }, { 6291456,2048,1536, 0, 0, 0, 0,96,0x61,0,0,"RoverShot","3320AF" }, { 311696, 644, 484, 0, 0, 0, 0, 0,0x16,0,8,"ST Micro","STV680 VGA" }, @@ -8276,7 +8454,7 @@ void CLASS identify() static const char *corp[] = { "AgfaPhoto", "Canon", "Casio", "Epson", "Fujifilm", "Mamiya", "Minolta", "Motorola", "Kodak", "Konica", "Leica", - "Nikon", "Nokia", "Olympus", "Pentax", "Phase One", "Ricoh", + "Nikon", "Nokia", "Olympus", "Ricoh", "Pentax", "Phase One", "Samsung", "Sigma", "Sinar", "Sony" }; char head[32], *cp; int hlen, flen, fsize, zero_fsize=1, i, c; @@ -8451,7 +8629,7 @@ void CLASS identify() parse_foveon(); else if (!memcmp (head,"CI",2)) parse_cine(); - else + if (make[0] == 0) for (zero_fsize=i=0; i < sizeof table / sizeof *table; i++) if (fsize == table[i].fsize) { strcpy (make, table[i].make ); @@ -8548,9 +8726,10 @@ void CLASS identify() width = 4014; if (dng_version) { if (filters == UINT_MAX) filters = 0; - if (filters) is_raw = tiff_samples; - else colors = tiff_samples; + if (filters) is_raw *= tiff_samples; + else colors = tiff_samples; switch (tiff_compress) { + case 0: case 1: load_raw = &CLASS packed_dng_load_raw; break; case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 8: load_raw = &CLASS deflate_dng_load_raw; break; @@ -8603,6 +8782,8 @@ void CLASS identify() top_margin = filters = 0; strcpy (model,"C603"); } + if (!strcmp(make,"Sony") && raw_width > 3888) + black = 128 << (tiff_bps - 12); if (is_foveon) { if (height*2 < width) pixel_aspect = 0.5; if (height > width) pixel_aspect = 2; @@ -8618,6 +8799,10 @@ void CLASS identify() SWAP(height,width); SWAP(raw_height,raw_width); } + if (width == 7200 && height == 3888) { + raw_width = width = 6480; + raw_height = height = 4320; + } filters = 0; tiff_samples = colors = 3; load_raw = &CLASS canon_sraw_load_raw; @@ -8793,7 +8978,7 @@ canon_a5: top_margin = (raw_height - height) >> 2 << 1; left_margin = (raw_width - width ) >> 2 << 1; if (width == 2848 || width == 3664) filters = 0x16161616; - if (width == 4032 || width == 4952) left_margin = 0; + if (width == 4032 || width == 4952 || width == 6032) left_margin = 0; if (width == 3328 && (width -= 66)) left_margin = 34; if (width == 4936) left_margin = 4; if (!strcmp(model,"HS50EXR") || @@ -9067,6 +9252,8 @@ konica_400z: thumb_length = flen - (thumb_offset = 0xa39800); thumb_height = 480; thumb_width = 640; + } else if (!strcmp(model,"TG-4")) { + width -= 16; } } else if (!strcmp(model,"N Digital")) { height = 2047; @@ -9094,16 +9281,29 @@ konica_400z: order = 0x4d4d; } else if (!strcmp(make,"Sony") && raw_width == 4288) { width -= 32; + } else if (!strcmp(make,"Sony") && raw_width == 4600) { + if (!strcmp(model,"DSLR-A350")) + height -= 4; + black = 0; } else if (!strcmp(make,"Sony") && raw_width == 4928) { if (height < 3280) width -= 8; } else if (!strcmp(make,"Sony") && raw_width == 5504) { width -= height > 3664 ? 8 : 32; + if (!strncmp(model,"DSC",3)) + black = 200 << (tiff_bps - 12); } else if (!strcmp(make,"Sony") && raw_width == 6048) { width -= 24; if (strstr(model,"RX1") || strstr(model,"A99")) width -= 6; } else if (!strcmp(make,"Sony") && raw_width == 7392) { width -= 30; + } else if (!strcmp(make,"Sony") && raw_width == 8000) { + width -= 32; + if (!strncmp(model,"DSC",3)) { + tiff_bps = 14; + load_raw = &CLASS unpacked_load_raw; + black = 512; + } } else if (!strcmp(model,"DSLR-A100")) { if (width == 3880) { height--; @@ -9115,8 +9315,6 @@ konica_400z: load_flags = 2; } filters = 0x61616161; - } else if (!strcmp(model,"DSLR-A350")) { - height -= 4; } else if (!strcmp(model,"PIXL")) { height -= top_margin = 4; width -= left_margin = 32; @@ -9181,6 +9379,7 @@ bw: colors = 1; width = 768; data_offset = 1152; load_raw = &CLASS kodak_radc_load_raw; + tiff_bps = 12; } else if (strstr(model,"DC50")) { strcpy (model, "DC50"); height = 512; @@ -9271,7 +9470,7 @@ dng_skip: if (raw_color) adobe_coeff ("Apple","Quicktake"); if (fuji_width) { fuji_width = width >> !fuji_layout; - if (~fuji_width & 1) filters = 0x49494949; + filters = fuji_width & 1 ? 0x94949494 : 0x49494949; width = (height >> fuji_layout) + fuji_width; height = width - 1; pixel_aspect = 1; diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h index 856da84d1..405f202bd 100644 --- a/rtengine/dcraw.h +++ b/rtengine/dcraw.h @@ -127,6 +127,7 @@ protected: struct tiff_ifd { int width, height, bps, comp, phint, offset, flip, samples, bytes; int tile_width, tile_length, sample_format, predictor; + float shutter; } tiff_ifd[10]; struct ph1 { @@ -139,8 +140,8 @@ protected: } hbd; struct jhead { - int bits, high, wide, clrs, sraw, psv, restart, vpred[6]; - ushort *huff[6], *free[4], *row; + int algo, bits, high, wide, clrs, sraw, psv, restart, vpred[6]; + ushort quant[64], idct[64], *huff[20], *free[20], *row; }; struct tiff_tag { @@ -217,6 +218,8 @@ void ljpeg_end (struct jhead *jh); int ljpeg_diff (ushort *huff); ushort * ljpeg_row (int jrow, struct jhead *jh); void lossless_jpeg_load_raw(); +void ljpeg_idct (struct jhead *jh); + void canon_sraw_load_raw(); void adobe_copy_pixel (unsigned row, unsigned col, ushort **rp); From d0158efadfd8d6c96d22b97bd6c57d078db315b5 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 23 May 2016 19:31:22 +0200 Subject: [PATCH 47/57] Small correction to Deutsch file, thanks to hi-tower for the hint --- rtdata/languages/Deutsch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 79675b740..ae2a5c5eb 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -108,8 +108,8 @@ EXPORT_BYPASS_SHARPENMICRO;Mikrokontrast überspringen EXPORT_BYPASS_SH_HQ;Schatten/Lichter überspringen\n(Schärfemaske) EXPORT_FASTEXPORTOPTIONS;Schnell-Export - Einstellungen EXPORT_INSTRUCTIONS;Die Einstellungen zum schnellen Export\nerlauben es, zeit- und ressourcenintensive\nEntwicklungsschritte zu überspringen und dafür\ndie Warteschlangenverarbeitung mit\nschnellen Export-Einstellungen auszuführen.\nDieses Vorgehen wird zur schnelleren\nGenerierung von gering aufgelösten Bildern\nempfohlen, falls es auf die Geschwindigkeit\nankommt oder für ein oder mehrere Bilder\nandere Ausgabegrößen gewünscht werden,\nohne Änderungen an deren gespeicherten\nParameter vornehmen zu müssen. -EXPORT_MAXHEIGHT;Maximale Höhe: -EXPORT_MAXWIDTH;Maximale Breite: +EXPORT_MAXHEIGHT;Maximale Höhe: +EXPORT_MAXWIDTH;Maximale Breite: EXPORT_PUTTOQUEUEFAST; Zur Warteschlange “Schneller Export“ hinzufügen EXPORT_RAW_DMETHOD;Demosaikmethode EXTPROGTARGET_1;RAW @@ -226,7 +226,7 @@ FILECHOOSER_FILTER_TIFF;TIFF-Dateien GENERAL_ABOUT;Über GENERAL_AFTER;Nachher GENERAL_APPLY;Anwenden -GENERAL_ASIMAGE;Als Bild +GENERAL_ASIMAGE;Wie Bild GENERAL_AUTO;Automatisch GENERAL_BEFORE;Vorher GENERAL_CANCEL;Abbrechen @@ -235,7 +235,7 @@ GENERAL_DISABLE;Deaktivieren GENERAL_DISABLED;Deaktiviert GENERAL_ENABLE;Aktivieren GENERAL_ENABLED;Aktiviert -GENERAL_FILE;Datei: +GENERAL_FILE;Datei: GENERAL_LANDSCAPE;Quer GENERAL_NA;n/a GENERAL_NO;Nein @@ -1209,7 +1209,7 @@ TP_BWMIX_RGBLABEL;R: %1%% G: %2%% B: %3%% Gesamt: %4%% TP_BWMIX_RGBLABEL_HINT;RGB-Faktoren\n\nGesamt: Summe aller RGB-Werte.\n- immer 100% im Modus Relativ\n- höher (heller), oder niedriger (dunkler) 100% im Modus Absolut TP_BWMIX_RGB_TOOLTIP;Mischen Sie die Kanäle. Verwenden Sie die Vorgaben zur Orientierung.\nNegative Werte können zu Artefakten führen. TP_BWMIX_SETTING;Voreinstellung -TP_BWMIX_SETTING_TOOLTIP;Voreinstellungen für den Kanalmixer (Film, Landschaft, ...). +TP_BWMIX_SETTING_TOOLTIP;Voreinstellungen für den Kanalmixer (Film, Landschaft, ...). TP_BWMIX_SET_HIGHCONTAST;Hoher Kontrast TP_BWMIX_SET_HIGHSENSIT;Hohe Empfindlichkeit TP_BWMIX_SET_HYPERPANCHRO;Hyper-Panchromatisch From 918179f621cbd5c863825bd6f720ef5a79c89baa Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 23 May 2016 20:01:15 +0200 Subject: [PATCH 48/57] Correction to last commit --- rtdata/languages/Deutsch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index ae2a5c5eb..8d810c585 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -108,8 +108,8 @@ EXPORT_BYPASS_SHARPENMICRO;Mikrokontrast überspringen EXPORT_BYPASS_SH_HQ;Schatten/Lichter überspringen\n(Schärfemaske) EXPORT_FASTEXPORTOPTIONS;Schnell-Export - Einstellungen EXPORT_INSTRUCTIONS;Die Einstellungen zum schnellen Export\nerlauben es, zeit- und ressourcenintensive\nEntwicklungsschritte zu überspringen und dafür\ndie Warteschlangenverarbeitung mit\nschnellen Export-Einstellungen auszuführen.\nDieses Vorgehen wird zur schnelleren\nGenerierung von gering aufgelösten Bildern\nempfohlen, falls es auf die Geschwindigkeit\nankommt oder für ein oder mehrere Bilder\nandere Ausgabegrößen gewünscht werden,\nohne Änderungen an deren gespeicherten\nParameter vornehmen zu müssen. -EXPORT_MAXHEIGHT;Maximale Höhe: -EXPORT_MAXWIDTH;Maximale Breite: +EXPORT_MAXHEIGHT;Maximale Höhe: +EXPORT_MAXWIDTH;Maximale Breite: EXPORT_PUTTOQUEUEFAST; Zur Warteschlange “Schneller Export“ hinzufügen EXPORT_RAW_DMETHOD;Demosaikmethode EXTPROGTARGET_1;RAW @@ -235,7 +235,7 @@ GENERAL_DISABLE;Deaktivieren GENERAL_DISABLED;Deaktiviert GENERAL_ENABLE;Aktivieren GENERAL_ENABLED;Aktiviert -GENERAL_FILE;Datei: +GENERAL_FILE;Datei: GENERAL_LANDSCAPE;Quer GENERAL_NA;n/a GENERAL_NO;Nein @@ -1209,7 +1209,7 @@ TP_BWMIX_RGBLABEL;R: %1%% G: %2%% B: %3%% Gesamt: %4%% TP_BWMIX_RGBLABEL_HINT;RGB-Faktoren\n\nGesamt: Summe aller RGB-Werte.\n- immer 100% im Modus Relativ\n- höher (heller), oder niedriger (dunkler) 100% im Modus Absolut TP_BWMIX_RGB_TOOLTIP;Mischen Sie die Kanäle. Verwenden Sie die Vorgaben zur Orientierung.\nNegative Werte können zu Artefakten führen. TP_BWMIX_SETTING;Voreinstellung -TP_BWMIX_SETTING_TOOLTIP;Voreinstellungen für den Kanalmixer (Film, Landschaft, ...). +TP_BWMIX_SETTING_TOOLTIP;Voreinstellungen für den Kanalmixer (Film, Landschaft, ...). TP_BWMIX_SET_HIGHCONTAST;Hoher Kontrast TP_BWMIX_SET_HIGHSENSIT;Hohe Empfindlichkeit TP_BWMIX_SET_HYPERPANCHRO;Hyper-Panchromatisch From f86a0811aae311739615530976b3180b02c82ffd Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 24 May 2016 18:14:09 +0200 Subject: [PATCH 49/57] treat black levels > 0xffff in camconst.json as absolute level & 0xffff --- rtengine/rawimage.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 3f4b2ac3f..919b1c7be 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -580,7 +580,9 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene if (cc) { for (int i = 0; i < 4; i++) { if (RT_blacklevel_from_constant) { - black_c4[i] = cblack[i] + cc->get_BlackLevel(i, iso_speed); + int blackFromCc = cc->get_BlackLevel(i, iso_speed); + // if black level from camconst > 0xffff it is an absolute value. + black_c4[i] = blackFromCc > 0xffff ? (blackFromCc & 0xffff) : blackFromCc + cblack[i]; } // load 4 channel white level here, will be used if available From d0cef55aada8e51321d44982a2a8ca258eaa6139 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 24 May 2016 19:06:41 +0200 Subject: [PATCH 50/57] Fix wrong crop for Samsung NX1 and NX500 --- rtengine/camconst.json | 1 - 1 file changed, 1 deletion(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 4dd84c829..d56eb05a6 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1686,7 +1686,6 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 10686,-4042,-1052,-3595,13238,276,-464,1259,5931 ], // DNG_v8.7 D65 // "dcraw_matrix": [ 13298,-6099,-296,-5243,16153,-1235,-508,1220,7758 ], // DNG_v8.7 Standard Light A // "dcraw_matrix": [ 9598,-3268,-634,-5678,14795,824,-1255,2675,4523 ], // SAMSUNG DNG CONVERTER v1.0 - "raw_crop": [ 1200, 500, 1600, 3600 ],// TRIAL CROP "ranges": { "white": [ { "iso": 100, "levels": 16000 }, // 16000 typical 16084, LE 16120 and 16383, LENR 16280 From 6603577f5cac52e12c2cae0ae7db960459ed9c05 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Tue, 24 May 2016 21:45:05 +0200 Subject: [PATCH 51/57] Deutsch update --- rtdata/languages/Deutsch | 61 +++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 8d810c585..58dc186a4 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -27,6 +27,7 @@ #26 2015-12-22 Korrekturen (TooWaBoo) RT4.2.536 #27 2016-02-12 Retinexübersetzung (TooWaBoo) RT4.2.730 #28 2016-03-19 Erweiterung/Korrekturen (TooWaBoo) RT4.2.880 +#29 2016-05-24 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1005 ABOUT_TAB_BUILD;Version ABOUT_TAB_CREDITS;Danksagungen @@ -45,7 +46,7 @@ CURVEEDITOR_CURVE;Kurve CURVEEDITOR_CURVES;Kurven CURVEEDITOR_CUSTOM;Angepasst CURVEEDITOR_DARKS;Tiefen -CURVEEDITOR_EDITPOINT_HINT;Bearbeitung der Kurvenpunkte über Zahlenwerte.\n\nRechtsklick auf einen Kurvenpunkt um ihn auszuwählen. Rechtsklick in einen leeren Bereich um ihn abzuwählen. +CURVEEDITOR_EDITPOINT_HINT;Bearbeitung der Kurvenpunkte über Zahlenwerte.\n\nRechtsklick auf einen Kurvenpunkt um ihn auszuwählen.\nRechtsklick in einen leeren Bereich um ihn abzuwählen. CURVEEDITOR_HIGHLIGHTS;Spitzlichter CURVEEDITOR_LIGHTS;Lichter CURVEEDITOR_LINEAR;Linear @@ -109,7 +110,7 @@ EXPORT_BYPASS_SH_HQ;Schatten/Lichter überspringen\n(Schärfemaske) EXPORT_FASTEXPORTOPTIONS;Schnell-Export - Einstellungen EXPORT_INSTRUCTIONS;Die Einstellungen zum schnellen Export\nerlauben es, zeit- und ressourcenintensive\nEntwicklungsschritte zu überspringen und dafür\ndie Warteschlangenverarbeitung mit\nschnellen Export-Einstellungen auszuführen.\nDieses Vorgehen wird zur schnelleren\nGenerierung von gering aufgelösten Bildern\nempfohlen, falls es auf die Geschwindigkeit\nankommt oder für ein oder mehrere Bilder\nandere Ausgabegrößen gewünscht werden,\nohne Änderungen an deren gespeicherten\nParameter vornehmen zu müssen. EXPORT_MAXHEIGHT;Maximale Höhe: -EXPORT_MAXWIDTH;Maximale Breite: +EXPORT_MAXWIDTH;Maximale Breite: EXPORT_PUTTOQUEUEFAST; Zur Warteschlange “Schneller Export“ hinzufügen EXPORT_RAW_DMETHOD;Demosaikmethode EXTPROGTARGET_1;RAW @@ -226,7 +227,7 @@ FILECHOOSER_FILTER_TIFF;TIFF-Dateien GENERAL_ABOUT;Über GENERAL_AFTER;Nachher GENERAL_APPLY;Anwenden -GENERAL_ASIMAGE;Wie Bild +GENERAL_ASIMAGE;Als Bild GENERAL_AUTO;Automatisch GENERAL_BEFORE;Vorher GENERAL_CANCEL;Abbrechen @@ -367,7 +368,7 @@ HISTORY_MSG_105;(Farbsaum entfernen) HISTORY_MSG_106;(Farbsaum entfernen)\nRadius HISTORY_MSG_107;(Farbsaum entfernen)\nSchwellenwert HISTORY_MSG_108;(Belichtung)\nLichterkompression\nSchwellenwert -HISTORY_MSG_109;(Skalieren) - Breite & Höhe +HISTORY_MSG_109;(Skalieren) - Begrenzungsrahmen HISTORY_MSG_110;(Skalieren) - Anwenden auf: HISTORY_MSG_111;(L*a*b*) - Farbverschiebung\nvermeiden HISTORY_MSG_112;--unused-- @@ -667,28 +668,28 @@ HISTORY_MSG_406;(Wavelet)\nKantenschärfung\nBenachbarte Pixel HISTORY_MSG_407;(Retinex) - Methode HISTORY_MSG_408;(Retinex) - Radius HISTORY_MSG_409;(Retinex) - Einstellungen\nKontrast -HISTORY_MSG_410;(Retinex) - Einstellungen\nHelligkeit +HISTORY_MSG_410;(Retinex) - Einstellungen\nVerstärkung und Ausgleich\nAusgleich HISTORY_MSG_411;(Retinex) - Intensität -HISTORY_MSG_412;(Retinex)\nGaußscher Gradient +HISTORY_MSG_412;(Retinex) - Einstellungen\nDynamikkompression\nGaußscher Gradient HISTORY_MSG_413;(Retinex) - Kontrast -HISTORY_MSG_414;(Retinex) - Einstellungen\nLuminanz(L) - L*a*b* -HISTORY_MSG_415;(Retinex) - Einstellungen\nTransmissionskurve +HISTORY_MSG_414;(Retinex) - Einstellungen\nKorrekturen\nLuminanz(L) - L*a*b* +HISTORY_MSG_415;(Retinex) - Einstellungen\nTransmission\nTransmissionskurve HISTORY_MSG_416;(Retinex) -HISTORY_MSG_417;(Retinex) - Einstellungen\nTransmission Median-\nfilter +HISTORY_MSG_417;(Retinex) - Einstellungen\nTransmission\nMedianfilter HISTORY_MSG_418;(Retinex) - Einstellungen\nTransmission\nSchwellenwert HISTORY_MSG_419;(Retinex) - Farbraum HISTORY_MSG_420;(Retinex) - Einstellungen\nHSL-Kurve -HISTORY_MSG_421;(Retinex) - Einstellungen\nGammakorrektur +HISTORY_MSG_421;(Retinex) - Einstellungen\nKorrekturen\nGammakorrektur HISTORY_MSG_422;(Retinex) - Einstellungen\nGamma HISTORY_MSG_423;(Retinex) - Einstellungen\nGammasteigung HISTORY_MSG_424;(Retinex) - Einstellungen\nHL-Schwellenwert HISTORY_MSG_425;(Retinex) - Einstellungen\nBasis-Logarithmus -HISTORY_MSG_426;(Retinex) - Einstellungen\nFarbton (H) +HISTORY_MSG_426;(Retinex) - Einstellungen\nKorrekturen - Farbton (H) HISTORY_MSG_427;Ausgabe-Rendering-Intent HISTORY_MSG_428;Monitor-Rendering-Intent -HISTORY_MSG_429;(Retinex) - Einstellungen\nIterationen -HISTORY_MSG_430;(Retinex) - Einstellungen\nTransmission Gradient -HISTORY_MSG_431;(Retinex) - Einstellungen\nIntensität Gradient +HISTORY_MSG_429;(Retinex) - Einstellungen\nDynamikkompression\nIterationen +HISTORY_MSG_430;(Retinex) - Einstellungen\nDynamikkompression\nTransmission Gradient +HISTORY_MSG_431;(Retinex) - Einstellungen\nDynamikkompression\nIntensität Gradient HISTORY_MSG_432;(Retinex) - Maske\nLichter HISTORY_MSG_433;(Retinex) - Maske\nTonwertbreite Lichter HISTORY_MSG_434;(Retinex) - Maske\nSchatten @@ -698,6 +699,8 @@ HISTORY_MSG_437;(Retinex) - Maske\nMethode HISTORY_MSG_438;(Retinex) - Maske\nKurve HISTORY_MSG_439;(Retinex) - Vorschau HISTORY_MSG_440;(Detailebenenkontrast)\nProzessreihenfolge +HISTORY_MSG_441;(Retinex) - Einstellungen\nVerstärkung und Ausgleich\nTransmissionsverstärkung +HISTORY_MSG_442;(Retinex) - Einstellungen\nTransmission - Skalierung HISTORY_NEWSNAPSHOT;Hinzufügen HISTORY_NEWSNAPSHOT_TOOLTIP;Taste: Alt + s HISTORY_SNAPSHOT;Schnappschuss @@ -1674,7 +1677,7 @@ TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;Mit “3-pass“ erzielt man die besten Erg TP_RAW_SENSOR_XTRANS_LABEL;Sensor mit X-Trans-Matrix TP_RESIZE_APPLIESTO;Anwenden auf: TP_RESIZE_CROPPEDAREA;Ausschnitt -TP_RESIZE_FITBOX;Breite & Höhe +TP_RESIZE_FITBOX;Begrenzungsrahmen TP_RESIZE_FULLIMAGE;Ganzes Bild TP_RESIZE_H;Höhe: TP_RESIZE_HEIGHT;Höhe @@ -1696,8 +1699,12 @@ TP_RETINEX_CURVEEDITOR_LH;Intensität=f(H) TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Intensität in Abhängigkeit des Farbtons (H)\nBei der Retinex-Methode "Spitzlichter" wirken sich die Änderungen auch auf die Chromakorrektur aus. TP_RETINEX_CURVEEDITOR_MAP;L=f(L) TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;Die Kurve kann entweder alleine, oder mit der Gaußschen- oder Waveletmaske angewendet werden.\nArtefakte beachten! +TP_RETINEX_EQUAL;Korrekturen TP_RETINEX_FREEGAMMA;Gamma TP_RETINEX_GAIN;Kontrast +TP_RETINEX_GAINOFFS;Verstärkung und Ausgleich (Helligkeit) +TP_RETINEX_GAINTRANSMISSION;Transmissionsverstärkung +TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Ändert die Helligkeit durch Verstärken oder\nReduzieren der Transmissionskarte. TP_RETINEX_GAIN_TOOLTIP;Wirkt sich auf das verarbeitete Bild aus. Wird für schwarze oder weiße Pixel verwendet und hilft das Histogramm auszugleichen. TP_RETINEX_GAMMA;Gammakorrektur TP_RETINEX_GAMMA_FREE;Benutzerdefiniert @@ -1716,7 +1723,8 @@ TP_RETINEX_HIGHLIGHT;Spitzlichter Schwellenwert TP_RETINEX_HIGHLIGHT_TOOLTIP;Benötigt unter Umständen Korrekturen der Einstellungen "Benachbarte Pixel" und "Weißpunkt" unter dem Reiter "RAW". TP_RETINEX_HSLSPACE_LIN;HSL-Linear TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmisch -TP_RETINEX_ITER;Iterationen (Dynamikkompression) +TP_RETINEX_ITER;Iterationen +TP_RETINEX_ITERF;Dynamikkompression TP_RETINEX_ITER_TOOLTIP;Simuliert eine Dynamikkompression.\nHöhere Werte erhöhen die Prozessorzeit. TP_RETINEX_LABEL;Retinex (Bildschleier entfernen) TP_RETINEX_LABEL_MASK;Maske @@ -1728,7 +1736,7 @@ TP_RETINEX_MAP_MAPP;Schärfemaske (Teil-Wavelet) TP_RETINEX_MAP_MAPT;Schärfemaske (Wavelet) TP_RETINEX_MAP_METHOD_TOOLTIP;Keine: Wendet die Maske, die mit der gaußschen Funktion (Radius, Methode) erstellt wurde an, um Halos und Artefakte zu reduzieren.\n\nNur Kurve: Wendet eine diagonale Kontrastkurve auf die Maske an.\nArtefakte beachten.\n\nGaußschenmaske: Wendet eine gaußsche Unschärfe auf die originale Maske an.\n(Schnell)\n\nSchärfemaske: Wendet ein Wavelet auf die originale Maske an.\n(Langsam) TP_RETINEX_MAP_NONE;Keine -TP_RETINEX_MEDIAN;Transmission Medianfilter +TP_RETINEX_MEDIAN;Medianfilter TP_RETINEX_METHOD;Methode TP_RETINEX_METHOD_TOOLTIP;"Schatten" wirkt sich auf dunkle Bereiche aus.\n"Schatten & Lichter" wirkt sich auf dunkle und helle Bereiche aus.\n"Lichter" wirkt sich auf helle Bereiche aus.\n"Spitzlichter" wirkt sich auf sehr helle Bereiche aus und reduziert Magenta-Falschfarben. TP_RETINEX_MLABEL;Schleierreduzierung: Min=%1 Max=%2 @@ -1736,17 +1744,19 @@ TP_RETINEX_MLABEL_TOOLTIP;Sollte nahe bei Min=0 und Max=32768 sein TP_RETINEX_NEIGHBOR;Radius TP_RETINEX_NEUTRAL;Zurücksetzen TP_RETINEX_NEUTRAL_TIP;Setzt alle Regler und Kurven auf ihre Standardwerte zurück. -TP_RETINEX_OFFSET;Helligkeit +TP_RETINEX_OFFSET;Ausgleich (Helligkeit) TP_RETINEX_SCALES;Gaußscher Gradient TP_RETINEX_SCALES_TOOLTIP;Steht der Regler auf 0 sind alle Iterationen identisch.\nBei > 0 werden Skalierung und Radius reduziert und umgekehrt. TP_RETINEX_SETTINGS;Einstellungen +TP_RETINEX_SKAL;Skalierung TP_RETINEX_SLOPE;Gammasteigung TP_RETINEX_STRENGTH;Intensität -TP_RETINEX_THRESHOLD;Transmission Schwellenwert +TP_RETINEX_THRESHOLD;Schwellenwert TP_RETINEX_THRESHOLD_TOOLTIP;Limitiert den Bereich der Transmissionskurve. TP_RETINEX_TLABEL;T: Min=%1 Max=%2 Mittel=%3 Sigma=%4 TP_RETINEX_TLABEL2;T: Tmin=%1 Tmax=%2 TP_RETINEX_TLABEL_TOOLTIP;Ergebnis der Transmissionskurve: Min, Max, Mittel und Sigma\nMin und Max hat Einfluss auf die Abweichung.\n\nTmin = Kleinster Wert der Transmissionskurve\nTmax = Größter Wert der Transmissionskurve +TP_RETINEX_TRANF;Transmission TP_RETINEX_TRANSMISSION;Transmissionskurve TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission in Abhängigkeit der Transmission.\nx-Achse: Transmission negativer Werte (Min), Mittel und positiver Werte (Max).\ny-Achse: Verstärkung oder Reduzierung. TP_RETINEX_UNIFORM;Schatten & Lichter @@ -2043,16 +2053,3 @@ ZOOMPANEL_ZOOMFITSCREEN;An Bildschirm anpassen\nTaste: f ZOOMPANEL_ZOOMIN;Hineinzoomen\nTaste: + ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - -!!!!!!!!!!!!!!!!!!!!!!!!! -! Untranslated keys follow; remove the ! prefix after an entry is translated. -!!!!!!!!!!!!!!!!!!!!!!!!! - -!HISTORY_MSG_441;Retinex - Gain transmission -!HISTORY_MSG_442;Retinex - Scale -!TP_RETINEX_EQUAL;Equalizer -!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) -!TP_RETINEX_GAINTRANSMISSION;Gain transmission -!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. -!TP_RETINEX_ITERF;Tone mapping -!TP_RETINEX_SKAL;Scale -!TP_RETINEX_TRANF;Transmission From 6e97875d814b3907f02fb38d355be71fa173ade6 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 24 May 2016 22:00:21 +0200 Subject: [PATCH 52/57] Small correction to Deutsch file --- rtdata/languages/Deutsch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 58dc186a4..1f2a579ac 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -227,7 +227,7 @@ FILECHOOSER_FILTER_TIFF;TIFF-Dateien GENERAL_ABOUT;Über GENERAL_AFTER;Nachher GENERAL_APPLY;Anwenden -GENERAL_ASIMAGE;Als Bild +GENERAL_ASIMAGE;Wie Bild GENERAL_AUTO;Automatisch GENERAL_BEFORE;Vorher GENERAL_CANCEL;Abbrechen From 5cd202ddb563b52044a27a9c46adaafacd6e872f Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 24 May 2016 23:46:43 +0200 Subject: [PATCH 53/57] Fix build on Arch 32bit non SSE using gcc-6.6.1, fixes #3305, kudos to mbajor for reporting and to Floessie for providing a fix for the bug --- rtexif/rtexif.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index 2d6c800fc..471f9fbe3 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -558,7 +558,7 @@ protected: lensAperture = exp( log(a1) + (log(a2) - log(a1)) / (log(f2) - log(f1)) * (log(focalLength) - log(f1)) ); } - dif = abs(lensAperture - maxApertureAtFocal); + dif = std::abs(lensAperture - maxApertureAtFocal); } else { dif = 0; } From 119fbfcd0bea125fb878e5814bcc91e45bdf7700 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 29 May 2016 22:35:15 +0200 Subject: [PATCH 54/57] Updated dcraw.patch file --- rtengine/dcraw.patch | 382 ++++++++++++++++++++++++------------------- 1 file changed, 212 insertions(+), 170 deletions(-) diff --git a/rtengine/dcraw.patch b/rtengine/dcraw.patch index 88a56068c..2b4ee4102 100644 --- a/rtengine/dcraw.patch +++ b/rtengine/dcraw.patch @@ -1,5 +1,5 @@ ---- dcraw.c 2016-02-11 22:56:58.043957200 +0100 -+++ dcraw.cc 2016-02-11 23:13:28.708268000 +0100 +--- dcraw.c 2016-05-29 22:32:01.173135400 +0200 ++++ dcraw.cc 2016-05-29 21:57:44.144527700 +0200 @@ -1,3 +1,15 @@ +/*RT*/#include +/*RT*/#include @@ -15,7 +15,7 @@ + /* dcraw.c -- Dave Coffin's raw photo decoder - Copyright 1997-2015 by Dave Coffin, dcoffin a cybercom o net + Copyright 1997-2016 by Dave Coffin, dcoffin a cybercom o net @@ -29,17 +41,17 @@ #define _GNU_SOURCE #endif @@ -52,8 +52,8 @@ #define snprintf _snprintf #define strcasecmp stricmp #define strncasecmp strnicmp -@@ -98,88 +109,38 @@ - #define LONG_BIT (8 * sizeof (long)) +@@ -89,89 +100,38 @@ + #define _(String) (String) #endif -#if !defined(uchar) @@ -123,6 +123,7 @@ -struct tiff_ifd { - int width, height, bps, comp, phint, offset, flip, samples, bytes; - int tile_width, tile_length; +- float shutter; -} tiff_ifd[10]; - -struct ph1 { @@ -147,7 +148,7 @@ -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define LIM(x,min,max) MAX(min,MIN(x,max)) -#define ULIM(x,y,z) ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y)) --#define CLIP(x) LIM(x,0,65535) +-#define CLIP(x) LIM((int)(x),0,65535) +#define MIN(a,b) rtengine::min(a,static_cast<__typeof__(a)>(b)) +#define MAX(a,b) rtengine::max(a,static_cast<__typeof__(a)>(b)) +#define LIM(x,min,max) rtengine::LIM(x,static_cast<__typeof__(x)>(min),static_cast<__typeof__(x)>(max)) @@ -156,7 +157,7 @@ #define SWAP(a,b) { a=a+b; b=a-b; a=a-b; } /* -@@ -255,6 +216,7 @@ +@@ -247,6 +207,7 @@ if (filters == 1) return filter[(row+top_margin)&15][(col+left_margin)&15]; if (filters == 9) return xtrans[(row+6) % 6][(col+6) % 6]; @@ -164,7 +165,7 @@ return FC(row,col); } -@@ -297,6 +259,7 @@ +@@ -289,6 +250,7 @@ fprintf (stderr,_("Corrupt data near 0x%llx\n"), (INT64) ftello(ifp)); } data_error++; @@ -172,7 +173,7 @@ } ushort CLASS sget2 (uchar *s) -@@ -370,7 +333,7 @@ +@@ -362,7 +324,7 @@ { if (fread (pixel, 2, count, ifp) < count) derror(); if ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) @@ -181,7 +182,7 @@ } void CLASS cubic_spline (const int *x_, const int *y_, const int len) -@@ -597,10 +560,10 @@ +@@ -589,10 +551,10 @@ return 0; } @@ -195,17 +196,45 @@ unsigned c; if (nbits > 25) return 0; -@@ -824,7 +787,8 @@ +@@ -805,9 +767,13 @@ + FORC(2) free (huff[c]); + } + ++/* ++ Not a full implementation of Lossless JPEG, just ++ enough to decode Canon, Kodak and Adobe DNG images. ++ */ + struct jhead { +- int algo, bits, high, wide, clrs, sraw, psv, restart, vpred[6]; +- ushort quant[64], idct[64], *huff[20], *free[20], *row; ++ int bits, high, wide, clrs, sraw, psv, restart, vpred[6]; ++ ushort *huff[6], *free[4], *row; + }; int CLASS ljpeg_start (struct jhead *jh, int info_only) - { -- int c, tag, len; -+ int c, tag; -+ ushort len; - uchar data[0x10000]; - const uchar *dp; - -@@ -1284,14 +1248,14 @@ +@@ -828,9 +794,9 @@ + switch (tag) { + case 0xffc3: + jh->sraw = ((data[7] >> 4) * (data[7] & 15) - 1) & 3; +- case 0xffc1: ++ case 0xffc1: + case 0xffc0: +- jh->algo = tag & 0xff; ++ jh->algo = tag & 0xff; + jh->bits = data[0]; + jh->high = data[1] << 8 | data[2]; + jh->wide = data[3] << 8 | data[4]; +@@ -1124,8 +1090,7 @@ + if (++col >= tile_width || col >= raw_width) + row += 1 + (col = 0); + } +- } +- } ++ } } + fseek (ifp, save+4, SEEK_SET); + if ((tcol += tile_width) >= raw_width) + trow += tile_length + (tcol = 0); +@@ -1332,14 +1297,14 @@ int i, nz; char tail[424]; @@ -222,7 +251,7 @@ void CLASS ppm_thumb() { -@@ -1653,10 +1617,10 @@ +@@ -1701,10 +1666,10 @@ } } @@ -236,17 +265,7 @@ unsigned c; if (nbits == -1) -@@ -1721,7 +1685,8 @@ - pixel[col] = curve[pixel[col]]; - } - for (col=0; col < raw_width; col++) { -- i = (pixel[col] << 2) - ph1.black -+ if (ph1.format != 8) pixel[col] <<= 2; -+ i = pixel[col] - ph1.black - + cblack[row][col >= ph1.split_col] - + rblack[col][row >= ph1.split_row]; - if (i > 0) RAW(row,col) = i; -@@ -1731,6 +1696,338 @@ +@@ -1779,6 +1744,338 @@ maximum = 0xfffc - ph1.black; } @@ -585,7 +604,7 @@ void CLASS hasselblad_load_raw() { struct jhead jh; -@@ -1954,10 +2251,10 @@ +@@ -2002,10 +2299,10 @@ maximum = curve[0x3ff]; } @@ -599,7 +618,7 @@ int byte; if (!nbits) return vbits=0; -@@ -2140,7 +2437,7 @@ +@@ -2188,7 +2485,7 @@ void CLASS kodak_radc_load_raw() { @@ -608,7 +627,7 @@ 1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8, 1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8, 2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8, -@@ -2246,11 +2543,11 @@ +@@ -2294,11 +2591,11 @@ METHODDEF(boolean) fill_input_buffer (j_decompress_ptr cinfo) { @@ -622,7 +641,7 @@ cinfo->src->next_input_byte = jpeg_buffer; cinfo->src->bytes_in_buffer = nbytes; return TRUE; -@@ -2600,10 +2897,9 @@ +@@ -2648,10 +2945,9 @@ maximum = (1 << (thumb_misc & 31)) - 1; } @@ -635,7 +654,7 @@ if (start) { for (p=0; p < 4; p++) pad[p] = key = key * 48828125 + 1; -@@ -2688,11 +2984,13 @@ +@@ -2736,11 +3032,13 @@ bit += 7; } for (i=0; i < 16; i++, col+=2) @@ -650,7 +669,7 @@ } void CLASS samsung_load_raw() -@@ -2988,7 +3286,7 @@ +@@ -3038,7 +3336,7 @@ void CLASS foveon_decoder (unsigned size, unsigned code) { @@ -659,7 +678,7 @@ struct decode *cur; int i, len; -@@ -3085,7 +3383,7 @@ +@@ -3135,7 +3433,7 @@ pred[c] += diff[dindex->leaf]; if (pred[c] >> 16 && ~pred[c] >> 16) derror(); } @@ -668,7 +687,7 @@ } } } -@@ -3696,6 +3994,8 @@ +@@ -3746,6 +4044,8 @@ if (load_raw == &CLASS phase_one_load_raw || load_raw == &CLASS phase_one_load_raw_c) phase_one_correct(); @@ -677,7 +696,7 @@ if (fuji_width) { for (row=0; row < raw_height-top_margin*2; row++) { for (col=0; col < fuji_width << !fuji_layout; col++) { -@@ -3711,10 +4011,13 @@ +@@ -3761,10 +4061,13 @@ } } } else { @@ -693,7 +712,7 @@ if (mask[0][3] > 0) goto mask_set; if (load_raw == &CLASS canon_load_raw || load_raw == &CLASS lossless_jpeg_load_raw) { -@@ -4316,239 +4619,8 @@ +@@ -4366,239 +4669,8 @@ } } @@ -702,8 +721,7 @@ - int code[16][16][32], size=16, *ip, sum[4]; - int f, c, i, x, y, row, col, shift, color; - ushort *pix; -+/* RT: delete interpolation functions */ - +- - if (verbose) fprintf (stderr,_("Bilinear interpolation...\n")); - if (filters == 9) size = 6; - border_interpolate(1); @@ -886,7 +904,8 @@ - int dir[5] = { 1, width, -1, -width, 1 }; - int row, col, diff[2], guess[2], c, d, i; - ushort (*pix)[4]; -- ++/* RT: delete interpolation functions */ + - border_interpolate(3); - if (verbose) fprintf (stderr,_("PPG interpolation...\n")); - @@ -934,7 +953,7 @@ void CLASS cielab (ushort rgb[3], short lab[3]) { -@@ -4814,112 +4886,7 @@ +@@ -4864,112 +4936,7 @@ } #undef fcol @@ -952,7 +971,7 @@ - char (*homo)[TS][TS], *buffer; - - if (verbose) fprintf (stderr,_("AHD interpolation...\n")); - +- - cielab (0,0); - border_interpolate(5); - buffer = (char *) malloc (26*TS*TS); @@ -960,7 +979,7 @@ - rgb = (ushort(*)[TS][TS][3]) buffer; - lab = (short (*)[TS][TS][3])(buffer + 12*TS*TS); - homo = (char (*)[TS][TS]) (buffer + 24*TS*TS); -- + - for (top=2; top < height-5; top += TS-6) - for (left=2; left < width-5; left += TS-6) { - @@ -1047,7 +1066,7 @@ #undef TS void CLASS median_filter() -@@ -5089,7 +5056,7 @@ +@@ -5139,7 +5106,7 @@ } } @@ -1056,7 +1075,7 @@ void CLASS parse_makernote (int base, int uptag) { -@@ -5194,6 +5161,11 @@ +@@ -5244,6 +5211,11 @@ tag |= uptag << 16; if (tag == 2 && strstr(make,"NIKON") && !iso_speed) iso_speed = (get2(),get2()); @@ -1068,7 +1087,7 @@ if (tag == 4 && len > 26 && len < 35) { if ((i=(get4(),get2())) != 0x7fff && !iso_speed) iso_speed = 50 * pow (2, i/32.0 - 4); -@@ -5246,12 +5218,16 @@ +@@ -5296,12 +5268,16 @@ cam_mul[2] = get4() << 2; } } @@ -1086,15 +1105,25 @@ if (tag == 0x1d) while ((c = fgetc(ifp)) && c != EOF) serial = serial*10 + (isdigit(c) ? c - '0' : c % 10); -@@ -5442,6 +5418,7 @@ - case 33434: shutter = getreal(type); break; +@@ -5491,14 +5467,14 @@ + while (entries--) { + tiff_get (base, &tag, &type, &len, &save); + switch (tag) { +- case 33434: tiff_ifd[tiff_nifds-1].shutter = +- shutter = getreal(type); break; ++ case 33434: tiff_ifd[tiff_nifds-1].shutter = shutter = getreal(type); break; case 33437: aperture = getreal(type); break; case 34855: iso_speed = get2(); break; + case 34866: if((!iso_speed) || iso_speed == 65535) iso_speed = get4();break; case 36867: case 36868: get_timestamp(0); break; case 37377: if ((expo = -getreal(type)) < 128) -@@ -5613,28 +5590,33 @@ +- tiff_ifd[tiff_nifds-1].shutter = ++ tiff_ifd[tiff_nifds-1].shutter = + shutter = pow (2, expo); break; + case 37378: aperture = pow (2, getreal(type)/2); break; + case 37386: focal_len = getreal(type); break; +@@ -5667,28 +5643,33 @@ } } @@ -1134,7 +1163,7 @@ entries = get2(); if (entries > 512) return 1; while (entries--) { -@@ -5702,7 +5684,8 @@ +@@ -5758,7 +5739,8 @@ fgets (make, 64, ifp); break; case 272: /* Model */ @@ -1144,7 +1173,7 @@ break; case 280: /* Panasonic RW2 offset */ if (type != 4) break; -@@ -5762,6 +5745,9 @@ +@@ -5818,6 +5800,9 @@ case 315: /* Artist */ fread (artist, 64, 1, ifp); break; @@ -1154,7 +1183,7 @@ case 322: /* TileWidth */ tiff_ifd[ifd].tile_width = getint(type); break; -@@ -5777,6 +5763,9 @@ +@@ -5833,6 +5818,9 @@ is_raw = 5; } break; @@ -1164,7 +1193,7 @@ case 330: /* SubIFDs */ if (!strcmp(model,"DSLR-A100") && tiff_ifd[ifd].width == 3872) { load_raw = &CLASS sony_arw_load_raw; -@@ -5790,6 +5779,9 @@ +@@ -5846,6 +5834,9 @@ fseek (ifp, i+4, SEEK_SET); } break; @@ -1174,17 +1203,7 @@ case 400: strcpy (make, "Sarnoff"); maximum = 0xfff; -@@ -5971,6 +5963,9 @@ - if (!make[0]) strcpy (make, "DNG"); - is_raw = 1; - break; -+ case 50708: /* UniqueCameraModel */ -+ fgets (model3, 64, ifp); -+ break; - case 50710: /* CFAPlaneColor */ - if (filters == 9) break; - if (len > 4) len = 4; -@@ -6002,12 +5997,21 @@ +@@ -6063,12 +6054,21 @@ case 61450: cblack[4] = cblack[5] = MIN(sqrt(len),64); case 50714: /* BlackLevel */ @@ -1211,8 +1230,8 @@ + break; case 50715: /* BlackLevelDeltaH */ case 50716: /* BlackLevelDeltaV */ - for (num=i=0; i < len; i++) -@@ -6024,13 +6028,13 @@ + for (num=i=0; i < (len & 0xffff); i++) +@@ -6085,13 +6085,13 @@ case 50721: /* ColorMatrix1 */ case 50722: /* ColorMatrix2 */ FORCC for (j=0; j < 3; j++) @@ -1228,7 +1247,7 @@ break; case 50727: /* AnalogBalance */ FORCC ab[c] = getreal(type); -@@ -6053,6 +6057,11 @@ +@@ -6114,6 +6114,11 @@ case 50752: read_shorts (cr2_slice, 3); break; @@ -1240,7 +1259,7 @@ case 50829: /* ActiveArea */ top_margin = getint(type); left_margin = getint(type); -@@ -6085,21 +6094,27 @@ +@@ -6146,21 +6151,27 @@ fread (buf, sony_length, 1, ifp); sony_decrypt (buf, sony_length/4, 1, sony_key); sfp = ifp; @@ -1276,7 +1295,7 @@ cam_xyz_coeff (cmatrix, cam_xyz); } if (asn[0]) { -@@ -6107,13 +6122,14 @@ +@@ -6168,13 +6179,14 @@ FORCC cam_mul[c] = 1 / asn[c]; } if (!use_cm) @@ -1292,7 +1311,15 @@ fseek (ifp, base, SEEK_SET); order = get2(); -@@ -6191,7 +6207,12 @@ +@@ -6206,6 +6218,7 @@ + shutter = tiff_ifd[i].shutter; + tiff_ifd[i].shutter = shutter; + } ++ + for (i=0; i < tiff_nifds; i++) { + if (max_samp < tiff_ifd[i].samples) + max_samp = tiff_ifd[i].samples; +@@ -6266,7 +6279,12 @@ case 8: load_raw = &CLASS eight_bit_load_raw; break; case 12: if (tiff_ifd[raw].phint == 2) load_flags = 6; @@ -1306,7 +1333,7 @@ case 14: load_flags = 0; case 16: load_raw = &CLASS unpacked_load_raw; if (!strncmp(make,"OLYMPUS",7) && -@@ -6230,6 +6251,7 @@ +@@ -6305,6 +6323,7 @@ case 32803: load_raw = &CLASS kodak_65000_load_raw; } case 32867: case 34892: break; @@ -1314,7 +1341,7 @@ default: is_raw = 0; } if (!dng_version) -@@ -6315,7 +6337,7 @@ +@@ -6390,7 +6409,7 @@ { const char *file, *ext; char *jname, *jfile, *jext; @@ -1323,7 +1350,7 @@ ext = strrchr (ifname, '.'); file = strrchr (ifname, '/'); -@@ -6337,13 +6359,14 @@ +@@ -6412,13 +6431,14 @@ } else while (isdigit(*--jext)) { if (*jext != '9') { @@ -1340,7 +1367,7 @@ if (verbose) fprintf (stderr,_("Reading metadata from %s ...\n"), jname); parse_tiff (12); -@@ -6620,6 +6643,7 @@ +@@ -6693,6 +6713,7 @@ load_raw = ph1.format < 3 ? &CLASS phase_one_load_raw : &CLASS phase_one_load_raw_c; maximum = 0xffff; @@ -1348,16 +1375,7 @@ strcpy (make, "Phase One"); if (model[0]) return; switch (raw_height) { -@@ -6658,7 +6682,7 @@ - } else if (tag == 0xc000) { - c = order; - order = 0x4949; -- if ((tag = get4()) > 10000) tag = get4(); -+ while ((tag = get4()) > 10000); - width = tag; - height = get4(); - order = c; -@@ -6688,7 +6712,11 @@ +@@ -6761,7 +6782,11 @@ order = get2(); hlen = get4(); if (get4() == 0x48454150) /* "HEAP" */ @@ -1369,7 +1387,7 @@ if (parse_tiff (save+6)) apply_tiff(); fseek (ifp, save+len, SEEK_SET); } -@@ -6960,7 +6988,8 @@ +@@ -7033,7 +7058,8 @@ { static const struct { const char *prefix; @@ -1379,7 +1397,22 @@ } table[] = { { "AgfaPhoto DC-833m", 0, 0, /* DJC */ { 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } }, -@@ -7919,6 +7948,33 @@ +@@ -7977,12 +8003,12 @@ + { 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 } }, + { "Sony DSC-RX100", 0, 0, + { 8651,-2754,-1057,-3464,12207,1373,-568,1398,4434 } }, +- { "Sony DSC-RX10", 0, 0, /* also RX10M2 */ ++ { "Sony DSC-RX10", 0, 0, + { 6679,-1825,-745,-5047,13256,1953,-1580,2422,5183 } }, + { "Sony DSC-RX1RM2", 0, 0, + { 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 } }, + { "Sony DSC-RX1", 0, 0, +- { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, ++ { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, + { "Sony DSLR-A100", 0, 0xfeb, + { 9437,-2811,-774,-8405,16215,2290,-710,596,7181 } }, + { "Sony DSLR-A290", 0, 0, +@@ -8088,6 +8114,33 @@ } break; } @@ -1413,7 +1446,7 @@ } void CLASS simple_coeff (int index) -@@ -8229,7 +8285,7 @@ +@@ -8410,7 +8463,7 @@ tiff_flip = flip = filters = UINT_MAX; /* unknown */ raw_height = raw_width = fuji_width = fuji_layout = cr2_slice[0] = 0; maximum = height = width = top_margin = left_margin = 0; @@ -1422,7 +1455,7 @@ iso_speed = shutter = aperture = focal_len = unique_id = 0; tiff_nifds = 0; memset (tiff_ifd, 0, sizeof tiff_ifd); -@@ -8261,13 +8317,20 @@ +@@ -8442,13 +8495,20 @@ fread (head, 1, 32, ifp); fseek (ifp, 0, SEEK_END); flen = fsize = ftell(ifp); @@ -1445,7 +1478,7 @@ parse_ciff (hlen, flen-hlen, 0); load_raw = &CLASS canon_load_raw; } else if (parse_tiff(0)) apply_tiff(); -@@ -8313,6 +8376,7 @@ +@@ -8494,6 +8554,7 @@ fseek (ifp, 100+28*(shot_select > 0), SEEK_SET); parse_tiff (data_offset = get4()); parse_tiff (thumb_offset+12); @@ -1453,7 +1486,7 @@ apply_tiff(); } else if (!memcmp (head,"RIFF",4)) { fseek (ifp, 0, SEEK_SET); -@@ -8426,9 +8490,10 @@ +@@ -8607,9 +8668,10 @@ if (make[0] == 0) parse_smal (0, flen); if (make[0] == 0) { parse_jpeg(0); @@ -1467,7 +1500,7 @@ strcpy (make, "OmniVision"); data_offset = ftell(ifp) + 0x8000-32; width = raw_width; -@@ -8437,6 +8502,7 @@ +@@ -8618,6 +8680,7 @@ filters = 0x16161616; } else is_raw = 0; } @@ -1475,7 +1508,7 @@ for (i=0; i < sizeof corp / sizeof *corp; i++) if (strcasestr (make, corp[i])) /* Simplify company names */ -@@ -8468,7 +8534,7 @@ +@@ -8649,7 +8712,7 @@ if (height == 3136 && width == 4864) /* Pentax K20D and Samsung GX20 */ { height = 3124; width = 4688; filters = 0x16161616; } if (width == 4352 && (!strcmp(model,"K-r") || !strcmp(model,"K-x"))) @@ -1484,15 +1517,15 @@ if (width >= 4960 && !strncmp(model,"K-5",3)) { left_margin = 10; width = 4950; filters = 0x16161616; } if (width == 4736 && !strcmp(model,"K-7")) -@@ -8487,6 +8553,7 @@ - switch (tiff_compress) { +@@ -8669,6 +8732,7 @@ + case 0: case 1: load_raw = &CLASS packed_dng_load_raw; break; case 7: load_raw = &CLASS lossless_dng_load_raw; break; + case 8: load_raw = &CLASS deflate_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; default: load_raw = 0; } -@@ -8541,6 +8608,7 @@ +@@ -8725,6 +8789,7 @@ if (height > width) pixel_aspect = 2; filters = 0; simple_coeff(0); @@ -1500,7 +1533,7 @@ } else if (!strcmp(make,"Canon") && tiff_bps == 15) { switch (width) { case 3344: width -= 66; -@@ -8846,24 +8914,53 @@ +@@ -9034,24 +9099,53 @@ if (load_raw == &CLASS lossless_jpeg_load_raw) load_raw = &CLASS hasselblad_load_raw; if (raw_width == 7262) { @@ -1559,7 +1592,7 @@ } else if (raw_width == 4090) { strcpy (model, "V96C"); height -= (top_margin = 6); -@@ -8921,6 +9018,7 @@ +@@ -9109,6 +9203,7 @@ filters = 0x16161616; } } else if (!strcmp(make,"Leica") || !strcmp(make,"Panasonic")) { @@ -1567,7 +1600,7 @@ if ((flen - data_offset) / (raw_width*8/7) == raw_height) load_raw = &CLASS panasonic_load_raw; if (!load_raw) { -@@ -8938,6 +9036,7 @@ +@@ -9126,6 +9221,7 @@ } filters = 0x01010101 * (uchar) "\x94\x61\x49\x16" [((filters-1) ^ (left_margin & 1) ^ (top_margin << 1)) & 3]; @@ -1575,7 +1608,7 @@ } else if (!strcmp(model,"C770UZ")) { height = 1718; width = 2304; -@@ -9155,6 +9254,18 @@ +@@ -9357,6 +9453,18 @@ memcpy (rgb_cam, cmatrix, sizeof cmatrix); raw_color = 0; } @@ -1594,7 +1627,7 @@ if (raw_color) adobe_coeff (make, model); if (load_raw == &CLASS kodak_radc_load_raw) if (raw_color) adobe_coeff ("Apple","Quicktake"); -@@ -9169,9 +9280,9 @@ +@@ -9371,9 +9479,9 @@ if (raw_width < width ) raw_width = width; } if (!tiff_bps) tiff_bps = 12; @@ -1606,7 +1639,7 @@ is_raw = 0; #ifdef NO_JASPER if (load_raw == &CLASS redcine_load_raw) { -@@ -9250,194 +9361,249 @@ +@@ -9452,199 +9560,250 @@ } #endif @@ -1634,10 +1667,14 @@ - { { 0.529317, 0.330092, 0.140588 }, - { 0.098368, 0.873465, 0.028169 }, - { 0.016879, 0.117663, 0.865457 } }; +- static const double aces_rgb[3][3] = +- { { 0.432996, 0.375380, 0.189317 }, +- { 0.089427, 0.816523, 0.102989 }, +- { 0.019165, 0.118150, 0.941914 } }; - static const double (*out_rgb[])[3] = -- { rgb_rgb, adobe_rgb, wide_rgb, prophoto_rgb, xyz_rgb }; +- { rgb_rgb, adobe_rgb, wide_rgb, prophoto_rgb, xyz_rgb, aces_rgb }; - static const char *name[] = -- { "sRGB", "Adobe RGB (1998)", "WideGamut D65", "ProPhoto D65", "XYZ" }; +- { "sRGB", "Adobe RGB (1998)", "WideGamut D65", "ProPhoto D65", "XYZ", "ACES" }; - static const unsigned phead[] = - { 1024, 0, 0x2100000, 0x6d6e7472, 0x52474220, 0x58595a20, 0, 0, 0, - 0x61637370, 0, 0, 0x6e6f6e65, 0, 0, 0, 0, 0xf6d6, 0x10000, 0xd32d }; @@ -1658,7 +1695,7 @@ - gamma_curve (gamm[0], gamm[1], 0, 0); - memcpy (out_cam, rgb_cam, sizeof out_cam); - raw_color |= colors == 1 || document_mode || -- output_color < 1 || output_color > 5; +- output_color < 1 || output_color > 6; - if (!raw_color) { - oprof = (unsigned *) calloc (phead[0], 1); - merror (oprof, "convert_to_rgb()"); @@ -2023,37 +2060,42 @@ + + delete [] cBuffer; + delete [] uBuffer; - } ++} + } + + if (ifd->sample_format == 3) { // Floating point data + copyFloatDataToInt(float_raw_image, raw_image, raw_width*raw_height, maximum); + } -+} -+ -+/* RT: removed unused functions */ + } ++/* RT: removed unused functions */ ++ struct tiff_tag { ushort tag, type; -@@ -9461,590 +9627,11 @@ + int count; +@@ -9667,594 +9826,11 @@ char desc[512], make[64], model[64], soft[32], date[20], artist[64]; }; --void CLASS tiff_set (ushort *ntag, +-void CLASS tiff_set (struct tiff_hdr *th, ushort *ntag, - ushort tag, ushort type, int count, int val) -{ - struct tiff_tag *tt; - int c; - - tt = (struct tiff_tag *)(ntag+1) + (*ntag)++; -- tt->tag = tag; -- tt->type = type; -- tt->count = count; -- if (type < 3 && count <= 4) +- tt->val.i = val; +- if (type == 1 && count <= 4) - FORC(4) tt->val.c[c] = val >> (c << 3); -- else if (type == 3 && count <= 2) +- else if (type == 2) { +- count = strnlen((char *)th + val, count-1) + 1; +- if (count <= 4) +- FORC(4) tt->val.c[c] = ((char *)th)[val+c]; +- } else if (type == 3 && count <= 2) - FORC(2) tt->val.s[c] = val >> (c << 4); -- else tt->val.i = val; +- tt->count = count; +- tt->type = type; +- tt->tag = tag; -} - -#define TOFF(ptr) ((char *)(&(ptr)) - (char *)th) @@ -2067,55 +2109,6 @@ - th->order = htonl(0x4d4d4949) >> 16; - th->magic = 42; - th->ifd = 10; -- if (full) { -- tiff_set (&th->ntag, 254, 4, 1, 0); -- tiff_set (&th->ntag, 256, 4, 1, width); -- tiff_set (&th->ntag, 257, 4, 1, height); -- tiff_set (&th->ntag, 258, 3, colors, output_bps); -- if (colors > 2) -- th->tag[th->ntag-1].val.i = TOFF(th->bps); -- FORC4 th->bps[c] = output_bps; -- tiff_set (&th->ntag, 259, 3, 1, 1); -- tiff_set (&th->ntag, 262, 3, 1, 1 + (colors > 1)); -- } -- tiff_set (&th->ntag, 270, 2, 512, TOFF(th->desc)); -- tiff_set (&th->ntag, 271, 2, 64, TOFF(th->make)); -- tiff_set (&th->ntag, 272, 2, 64, TOFF(th->model)); -- if (full) { -- if (oprof) psize = ntohl(oprof[0]); -- tiff_set (&th->ntag, 273, 4, 1, sizeof *th + psize); -- tiff_set (&th->ntag, 277, 3, 1, colors); -- tiff_set (&th->ntag, 278, 4, 1, height); -- tiff_set (&th->ntag, 279, 4, 1, height*width*colors*output_bps/8); -- } else -- tiff_set (&th->ntag, 274, 3, 1, "12435867"[flip]-'0'); -- tiff_set (&th->ntag, 282, 5, 1, TOFF(th->rat[0])); -- tiff_set (&th->ntag, 283, 5, 1, TOFF(th->rat[2])); -- tiff_set (&th->ntag, 284, 3, 1, 1); -- tiff_set (&th->ntag, 296, 3, 1, 2); -- tiff_set (&th->ntag, 305, 2, 32, TOFF(th->soft)); -- tiff_set (&th->ntag, 306, 2, 20, TOFF(th->date)); -- tiff_set (&th->ntag, 315, 2, 64, TOFF(th->artist)); -- tiff_set (&th->ntag, 34665, 4, 1, TOFF(th->nexif)); -- if (psize) tiff_set (&th->ntag, 34675, 7, psize, sizeof *th); -- tiff_set (&th->nexif, 33434, 5, 1, TOFF(th->rat[4])); -- tiff_set (&th->nexif, 33437, 5, 1, TOFF(th->rat[6])); -- tiff_set (&th->nexif, 34855, 3, 1, iso_speed); -- tiff_set (&th->nexif, 37386, 5, 1, TOFF(th->rat[8])); -- if (gpsdata[1]) { -- tiff_set (&th->ntag, 34853, 4, 1, TOFF(th->ngps)); -- tiff_set (&th->ngps, 0, 1, 4, 0x202); -- tiff_set (&th->ngps, 1, 2, 2, gpsdata[29]); -- tiff_set (&th->ngps, 2, 5, 3, TOFF(th->gps[0])); -- tiff_set (&th->ngps, 3, 2, 2, gpsdata[30]); -- tiff_set (&th->ngps, 4, 5, 3, TOFF(th->gps[6])); -- tiff_set (&th->ngps, 5, 1, 1, gpsdata[31]); -- tiff_set (&th->ngps, 6, 5, 1, TOFF(th->gps[18])); -- tiff_set (&th->ngps, 7, 5, 3, TOFF(th->gps[12])); -- tiff_set (&th->ngps, 18, 2, 12, TOFF(th->gps[20])); -- tiff_set (&th->ngps, 29, 2, 12, TOFF(th->gps[23])); -- memcpy (th->gps, gpsdata, sizeof th->gps); -- } - th->rat[0] = th->rat[2] = 300; - th->rat[1] = th->rat[3] = 1; - FORC(6) th->rat[4+c] = 1000000; @@ -2130,6 +2123,55 @@ - sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", - t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); - strncpy (th->artist, artist, 64); +- if (full) { +- tiff_set (th, &th->ntag, 254, 4, 1, 0); +- tiff_set (th, &th->ntag, 256, 4, 1, width); +- tiff_set (th, &th->ntag, 257, 4, 1, height); +- tiff_set (th, &th->ntag, 258, 3, colors, output_bps); +- if (colors > 2) +- th->tag[th->ntag-1].val.i = TOFF(th->bps); +- FORC4 th->bps[c] = output_bps; +- tiff_set (th, &th->ntag, 259, 3, 1, 1); +- tiff_set (th, &th->ntag, 262, 3, 1, 1 + (colors > 1)); +- } +- tiff_set (th, &th->ntag, 270, 2, 512, TOFF(th->desc)); +- tiff_set (th, &th->ntag, 271, 2, 64, TOFF(th->make)); +- tiff_set (th, &th->ntag, 272, 2, 64, TOFF(th->model)); +- if (full) { +- if (oprof) psize = ntohl(oprof[0]); +- tiff_set (th, &th->ntag, 273, 4, 1, sizeof *th + psize); +- tiff_set (th, &th->ntag, 277, 3, 1, colors); +- tiff_set (th, &th->ntag, 278, 4, 1, height); +- tiff_set (th, &th->ntag, 279, 4, 1, height*width*colors*output_bps/8); +- } else +- tiff_set (th, &th->ntag, 274, 3, 1, "12435867"[flip]-'0'); +- tiff_set (th, &th->ntag, 282, 5, 1, TOFF(th->rat[0])); +- tiff_set (th, &th->ntag, 283, 5, 1, TOFF(th->rat[2])); +- tiff_set (th, &th->ntag, 284, 3, 1, 1); +- tiff_set (th, &th->ntag, 296, 3, 1, 2); +- tiff_set (th, &th->ntag, 305, 2, 32, TOFF(th->soft)); +- tiff_set (th, &th->ntag, 306, 2, 20, TOFF(th->date)); +- tiff_set (th, &th->ntag, 315, 2, 64, TOFF(th->artist)); +- tiff_set (th, &th->ntag, 34665, 4, 1, TOFF(th->nexif)); +- if (psize) tiff_set (th, &th->ntag, 34675, 7, psize, sizeof *th); +- tiff_set (th, &th->nexif, 33434, 5, 1, TOFF(th->rat[4])); +- tiff_set (th, &th->nexif, 33437, 5, 1, TOFF(th->rat[6])); +- tiff_set (th, &th->nexif, 34855, 3, 1, iso_speed); +- tiff_set (th, &th->nexif, 37386, 5, 1, TOFF(th->rat[8])); +- if (gpsdata[1]) { +- tiff_set (th, &th->ntag, 34853, 4, 1, TOFF(th->ngps)); +- tiff_set (th, &th->ngps, 0, 1, 4, 0x202); +- tiff_set (th, &th->ngps, 1, 2, 2, gpsdata[29]); +- tiff_set (th, &th->ngps, 2, 5, 3, TOFF(th->gps[0])); +- tiff_set (th, &th->ngps, 3, 2, 2, gpsdata[30]); +- tiff_set (th, &th->ngps, 4, 5, 3, TOFF(th->gps[6])); +- tiff_set (th, &th->ngps, 5, 1, 1, gpsdata[31]); +- tiff_set (th, &th->ngps, 6, 5, 1, TOFF(th->gps[18])); +- tiff_set (th, &th->ngps, 7, 5, 3, TOFF(th->gps[12])); +- tiff_set (th, &th->ngps, 18, 2, 12, TOFF(th->gps[20])); +- tiff_set (th, &th->ngps, 29, 2, 12, TOFF(th->gps[23])); +- memcpy (th->gps, gpsdata, sizeof th->gps); +- } -} - -void CLASS jpeg_thumb() @@ -2250,7 +2292,7 @@ - puts(_("-n Set threshold for wavelet denoising")); - puts(_("-H [0-9] Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild)")); - puts(_("-t [0-7] Flip image (0=none, 3=180, 5=90CCW, 6=90CW)")); -- puts(_("-o [0-5] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ)")); +- puts(_("-o [0-6] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ,ACES)")); -#ifndef NO_LCMS - puts(_("-o Apply output ICC profile from file")); - puts(_("-p Apply camera ICC profile from file or \"embed\"")); From d57eec162823b0188c6193403c1c50fc008cdd68 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 30 May 2016 13:46:08 +0200 Subject: [PATCH 55/57] Update for camconst.json, kudos to Ilias --- rtengine/camconst.json | 376 +++++++++++++++++++++++------------------ 1 file changed, 207 insertions(+), 169 deletions(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index d56eb05a6..c7bef9ee2 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -36,7 +36,7 @@ missing. That's why this file is needed. It's read once during startup, so if the file is updated you need to restart RawTherapee in order to take effect. The file is not intended for modification by the casual user, but advanced users can add missing camera information to this file. -If you do so please report at http://code.google.com/p/rawtherapee/issues so we can +If you do so please report at https://github.com/Beep6581/RawTherapee/issues so we can extend the distributed version of this file so your provided camera information becomes available to all. @@ -58,9 +58,20 @@ Examples: // make and model separated with single space, must match make // and model as provided by dcraw (case-insensitive). "make_model": "ManufacturerA ModelB", + Some Panasonics and some Canon Dslrs (of the low category like Canon 550D) exist + under alternate naming in various marketplaces (EOS 550D, EOS Rebel T2i, EOS Kiss X4). + For new models that are still not supported by the Dcraw version used in current RT, + we have to fill all the alternate names or else RT will not recognize the alternate model names + For models supported by Dcraw, filling the alternate names is simply desired (for better user info). + The format of multiple naming is to write all names in brackets i.e + instead of .. "make_model": "Canon EOS 550D", + type .. "make_model": [ "Canon EOS 550D", "Canon EOS Rebel T2i", "Canon EOS Kiss X4" ], // ColorMatrix with D65 Calibration Illuminant, in dcraw format "dcraw_matrix": [ 7530, -1942, -255, -4318, 11390, 3362, -926, 1694, 7649 ], // black level (or black offset if a base black is already extracted from exif by Dcraw, see Panasonic, resent Nikon ) + // For some rare cases where Dcraw detects wrong Black Level we need to correct it with absolute black i.e one that is not added up + // the detected. For this job we have to define "black" as 65535+desired_black. For example to correct a wrongly detected black level + of 9 instead of the correct 600 we define "black": 66135 i.e. 65535+600. // and white level same for all colors at all ISOs "ranges": { "black": 10, "white": 1000 }, // crop away masked sensor borders, 10 pixels left, 20 pixels top, resulting image width/height 4000x3000 @@ -68,14 +79,18 @@ Examples: that should be removed but keep in mind that sometimes after converting to DNG the borders are already cropped so the "negative number" way is not totally safe. "raw_crop": [ 10, 20, 4000, 3000 ], - // Almost same as MaskedAreas DNG tag, used for black level measuring here two areas defined - "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], - The difference here is the meaning of the numbers which here are expressing the absolute distance (in pixels) + // Almost same as MaskedAreas DNG tag, used for black level measuring. Here up to two areas can be defined + by tetrads of numbers + "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], // two tetrads define two areas + The difference vs "raw_crop" is the meaning of the numbers which here are expressing the absolute distance (in pixels) of each side of each rectangular "masked area" from the top and left side of the sensor - the first number is the distance of the top edge from the sensor's top - the second is the distance of the left side from the sensor's left - the third is the distance of the bottom side from the sensor's top - the fourth is the distance of the right side from the sensor's left + It is useful after detecting the masked areas, to not fully use these areas but leave a border of + 2-4 pixels instead, to take care of possible light leaks from the light sensing area to the optically + black (masked) area or sensor imperfections at the outer borders. }, { @@ -571,31 +586,6 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, - { // Quality b, ISO and aperture WL data by ..... at RawTherapee forums, missing samples safely guessed - "make_model": "Canon EOS 550D", - "dcraw_matrix": [ 6941,-1164,-857,-3825,11597,2534,-416,1540,6039 ], // dcraw 550d - "ranges": { - "white": [ - { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 - { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 - { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 - ], - "white_max": 16383, - "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.250 }, // guessed - { "aperture": 1.6, "scale_factor": 1.150 }, // guessed - { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 - { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 - { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 - { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 - { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 - { "aperture": 3.2, "scale_factor": 1.015 }, // guessed - { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible - ] - } - }, { // Quality A, f/1.6 aperture scale factor missing but safely guessed, ISO and aperture data by charlyw at RT forums "make_model": "Canon EOS 7D Mark II", "dcraw_matrix": [ 7268,-1082,-969,-4186,11839,2663,-825,2029,5839 ], // dng_v8.7 d65 @@ -752,8 +742,65 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, + { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed + "make_model": "Canon EOS 80D", + "dcraw_matrix": [ 7457,-671,-937,-4849,12495,2643,-1213,2354,5492 ], // DNG_V9.5 D65 + "raw_crop": [ 264, 34, 6024, 4022 ], // full size 6288x4056, official crop 276,46,6275,4045 + "masked_areas": [ 40, 96, 4000, 260 ], + "ranges": { + "white": [ + { "iso": [ 100, 125, 200, 250 ], "levels": 16200 }, // nominal 16383, LENR blue 16243 + { "iso": [ 160 ], "levels": 13000 }, // nominal 13097, + { "iso": [ 320, 640, 1250, 2500, 5000, 10000 ], "levels": 13200 }, // G1,G2 13415 + { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 16150 }, // nominal 16383, LENR ISO3200 16150 + { "iso": [ 6400, 8000, 12800, 16000, 25600 ], "levels": 16000 } // R,G1,G2 16383, B 16243, LENR B 16000 + ], + "white_max": 16383, + "aperture_scaling": [ + /* note: need for more data to properly fill all scale factors */ + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.020 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } + }, + +// Canon Mid category DSLRs (Rebels) + + { // Quality b, ISO and aperture WL data by ..... at RawTherapee forums, missing samples safely guessed + "make_model": [ "Canon EOS 550D", "Canon EOS Rebel T2i", "Canon EOS Kiss X4" ], + "dcraw_matrix": [ 6941,-1164,-857,-3825,11597,2534,-416,1540,6039 ], // dcraw 550d + "ranges": { + "white": [ + { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 + { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 + { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 + ], + "white_max": 16383, + "aperture_scaling": [ + /* note: no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the + typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ + { "aperture": 1.4, "scale_factor": 1.250 }, // guessed + { "aperture": 1.6, "scale_factor": 1.150 }, // guessed + { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 + { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 + { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 + { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 + { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 + { "aperture": 3.2, "scale_factor": 1.015 }, // guessed + { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible + ] + } + }, + { // Quality b, scaling factors missing but guessed safely - "make_model": [ "Canon EOS 1200D", "Canon EOS Rebel T5", "Canon EOS 600D", "Canon EOS Rebel T3i" ], + "make_model": [ "Canon EOS 600D", "Canon EOS Rebel T3i", "Canon EOS Kiss X5", "Canon EOS 1200D", "Canon EOS Rebel T5", "Canon EOS Kiss X70" ], "dcraw_matrix": [ 6461,-907,-882,-4300,12184,2378,-819,1944,5931 ], // dcp D65 colormatrix2 "ranges": { "white": [ @@ -772,41 +819,13 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 { "aperture": 2.5, "scale_factor": 1.050 }, // guessed { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // - ] - } - }, - - { // Quality B, .. integer ISOs measured, intermediate ISO samples missing, - // scaling factors safely guessed to be same as 1200D .. - "make_model": [ "Canon EOS 1300D", "Canon EOS Rebel T6" ], - "dcraw_matrix": [ 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 ], // Dcraw 9.27 - "ranges": { - "white": [ - { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 - { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 - { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800 ], "levels": 15200 } // typical 15303 - ], - "white_max": 16383, - "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data - { "aperture": 1.6, "scale_factor": 1.190 }, // guessed - { "aperture": 1.8, "scale_factor": 1.140 }, // guessed - { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 - { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 - { "aperture": 2.5, "scale_factor": 1.050 }, // guessed - { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // + { "aperture": 3.2, "scale_factor": 1.000 } // ] } }, { // Quality A, only one scaling factor missing and guessed safely, EOS 700D not tested but available samples look same as 650D - "make_model": [ "Canon EOS 650D", "Canon EOS Rebel T4i", "Canon EOS 700D", "Canon EOS Rebel T5i" ], + "make_model": [ "Canon EOS 650D", "Canon EOS Rebel T4i", "Canon EOS Kiss X6i", "Canon EOS 700D", "Canon EOS Rebel T5i", "Canon EOS Kiss X7i" ], "dcraw_matrix": [ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 ], "ranges": { "white": [ @@ -826,14 +845,13 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "aperture": 2.2, "scale_factor": 1.025 }, // 13921/13583 { "aperture": 2.5, "scale_factor": 1.020 }, // { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // + { "aperture": 3.2, "scale_factor": 1.000 } // ] } }, { // Quality C, aperture scale factors and intermediate ISOs missing but safely guessed - "make_model": [ "Canon EOS 750D", "Canon EOS Rebel T6i", "Canon EOS 760D", "Canon EOS Rebel T6s" ], + "make_model": [ "Canon EOS 750D", "Canon EOS Rebel T6i", "Canon EOS Kiss X8i", "Canon EOS 760D", "Canon EOS Rebel T6s", "Canon EOS 8000D" ], "dcraw_matrix": [ 6362,-823,-847,-4426,12109,2616,-743,1857,5635 ], // dng_v9.0 d65 "raw_crop": [ 72, 34, 6024, 4022 ], // full size 6096x4056, official crop 84,46,6083,4045 "masked_areas": [ 40, 16, 4000, 54 ], @@ -861,6 +879,38 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, +// Canon Low End DSLRs +// Canon EOS 1200D/Rebel T5/Kiss X70" is upper at the same item as 600D/T3i/X5 + + { // Quality B, integer ISOs measured, intermediate ISO samples missing, + // scaling factors safely guessed to be same as 1200D .. + "make_model": [ "Canon EOS 1300D", "Canon EOS Rebel T6", "Canon EOS Kiss X80" ], + "dcraw_matrix": [ 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 ], // Dcraw 9.27 + "ranges": { + "white": [ + { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 + { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 + { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800 ], "levels": 15200 } // typical 15303 + ], + "white_max": 16383, + "aperture_scaling": [ + /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ + { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data + { "aperture": 1.6, "scale_factor": 1.190 }, // guessed + { "aperture": 1.8, "scale_factor": 1.140 }, // guessed + { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 + { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 + { "aperture": 2.5, "scale_factor": 1.050 }, // guessed + { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } + }, + +// Canon Mirrorless with Interchangable Lens + { // Quality B, missing scaling factors are guessed safely from 650D relative data "make_model": "Canon EOS M", "dcraw_matrix": [ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 ], @@ -920,6 +970,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ] } }, + { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed "make_model": "Canon EOS M3", "dcraw_matrix": [ 6362,-823,-847,-4426,12109,2616,-743,1857,5635 ], // DNG_V8.8 D65 @@ -947,33 +998,16 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ] } }, - { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed - "make_model": "Canon EOS 80D", - "dcraw_matrix": [ 7457,-671,-937,-4849,12495,2643,-1213,2354,5492 ], // DNG_V9.5 D65 - "raw_crop": [ 264, 34, 6024, 4022 ], // full size 6288x4056, official crop 276,46,6275,4045 - "masked_areas": [ 40, 96, 4000, 260 ], - "ranges": { - "white": [ - { "iso": [ 100, 125, 200, 250 ], "levels": 16200 }, // nominal 16383, LENR blue 16243 - { "iso": [ 160 ], "levels": 13000 }, // nominal 13097, - { "iso": [ 320, 640, 1250, 2500, 5000, 10000 ], "levels": 13200 }, // G1,G2 13415 - { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 16150 }, // nominal 16383, LENR ISO3200 16150 - { "iso": [ 6400, 8000, 12800, 16000, 25600 ], "levels": 16000 } // R,G1,G2 16383, B 16243, LENR B 16000 - ], - "white_max": 16383, - "aperture_scaling": [ - /* note: need for more data to properly fill all scale factors */ - { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // guessed - { "aperture": 2.2, "scale_factor": 1.025 }, // guessed - { "aperture": 2.5, "scale_factor": 1.020 }, // guessed - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // - ] - } + +// Canon Powershot + + { // Quality C, CHDK DNGs, raw frame corrections, experimental infrared support commented out + "make_model": "Canon PowerShot A480", + "dcraw_matrix": [ 8275,-2905,-1261,-128,5305,505,52,482,2450 ], // DNG_CHDK_V1.3.0 Daylight + // "dcraw_matrix": [ 15906,-7425,-2014,-2010,5554,264,404,-265,2706 ], // Infrared guessed + "raw_crop": [ 6, 12, 3684, 2760 ], // full size 3720X2772, official Canon crop 3648x2736 + "masked_areas": [ 12, 3694, 2760, 3716 ], // only left side optically black area is considered + "ranges": { "white": 4080 } }, { // Quality B, experimental infrared support commented out @@ -984,17 +1018,17 @@ Quality X: unknown, ie we knowing to little about the camera properties to know // "dcraw_matrix": [ 13254,-6296,-1798,184,2753,90,1438,-566,1129 ], // Infrared guessed "ranges": { "white": 4080 } }, - { // Quality C, experimental infrared support commented out - "make_model": "Canon PowerShot A480", - "dcraw_matrix": [ 8275,-2905,-1261,-128,5305,505,52,482,2450 ], // DNG_CHDK_V1.3.0 Daylight - // "dcraw_matrix": [ 15906,-7425,-2014,-2010,5554,264,404,-265,2706 ], // Infrared guessed - "raw_crop": [ 6, 12, 3684, 2760 ], // full size 3720X2772, official Canon crop 3648x2736 - "masked_areas": [ 12, 3694, 2760, 3716 ], // only left side optically black area is considered - "ranges": { "white": 4080 } + + { // Quality A, changes for raw crop which is optimistic in Dcraw + "make_model": "Canon PowerShot G12", + "dcraw_matrix": [ 13244,-5501,-1248,-1508,9858,1935,-270,1083,4366 ], + // "raw_crop": [ 62, 18, 3666, 2748 ],// max usable + "raw_crop": [ 68, 20, 3656, 2744 ],// equal to official Canon frame, 72,24,3719,2759 = 3648x2736 + "masked_areas": [ 24, 40, 2770, 44 ],// as declared in maker data + "ranges": { "white": 4080 } // }, - - { /* Quality B, needs a way to auto apply 3/2 or 4/3 crops (read exif tags ..) to work better with auto distortion, + { /* Quality B, needs a way to auto apply 3/2 or 4/3 crops (read exif tags ..) to work better with auto distortion, for the moment just comment-uncomment the desired raw crop */ "make_model": "Canon PowerShot G1 X Mark II", "dcraw_matrix": [ 7378,-1255,-1043,-4088,12251,2048,-876,1946,5805 ], // D65 matrix from adobe dcp @@ -1006,6 +1040,14 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 16300 } }, + { // Quality B, + "make_model": "Canon PowerShot G3 X", + "dcraw_matrix": [ 9701,-3857,-921,-3149,11537,1817,-786,1817,5147 ], // DNG_V9.1.1 D65 + "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 + "masked_areas": [ 40, 4, 3680, 76 ], + "ranges": { "white": 16300 } + }, + { // Quality B, "make_model": "Canon PowerShot G7 X", "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 @@ -1014,18 +1056,11 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "masked_areas": [ 40, 4, 3680, 76 ], "ranges": { "white": 4080 } }, - { // Quality B, - "make_model": [ "Canon PowerShot G9 X", "Canon PowerShot G5 X" ], - "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 - // "raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 - "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 - "masked_areas": [ 40, 4, 3680, 76 ], - "ranges": { "white": 16300 } - }, { // Quality B, - "make_model": "Canon PowerShot G3 X", - "dcraw_matrix": [ 9701,-3857,-921,-3149,11537,1817,-786,1817,5147 ], // DNG_V9.1.1 D65 + "make_model": [ "Canon PowerShot G5 X", "Canon PowerShot G9 X" ], + "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 + // "raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 "masked_areas": [ 40, 4, 3680, 76 ], "ranges": { "white": 16300 } @@ -1039,15 +1074,6 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4050 } }, - { // Quality A, changes for raw crop which is optimistic in Dcraw - "make_model": "Canon PowerShot G12", - "dcraw_matrix": [ 13244,-5501,-1248,-1508,9858,1935,-270,1083,4366 ], - // "raw_crop": [ 62, 18, 3666, 2748 ],// max usable - "raw_crop": [ 68, 20, 3656, 2744 ],// equal to official Canon frame, 72,24,3719,2759 = 3648x2736 - "masked_areas": [ 24, 40, 2770, 44 ],// as declared in maker data - "ranges": { "white": 4080 } // - }, - { // Quality B "make_model": "Canon PowerShot SX60 HS", "dcraw_matrix": [ 13161,-5451,-1344,-1989,10654,1531,-47,1271,4955 ], // DNG_V8.7 D65 @@ -1086,12 +1112,19 @@ Quality X: unknown, ie we knowing to little about the camera properties to know // "raw_crop": [ 4, 0, 4936, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop "ranges": { "white": 16100 } }, + { // Quality B "make_model": "FUJIFILM X-E2S", "dcraw_matrix": [ 11562,-5118,-961,-3022,11007,2311,-525,1569,6097 ], // DNG_v9.4 D65 "ranges": { "white": 16100 } }, + { // Quality B + "make_model": "FUJIFILM X-PRO1", + "dcraw_matrix": [ 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 ], // DNG_v9.4 D65 + "ranges": { "white": 4080 } + }, + { // Quality B "make_model": "FUJIFILM X-PRO2", "dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65 @@ -1110,6 +1143,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 9252,-2704,-1064,-5893,14265,1717,-1101,2341,4349 ], // DNG_v8.8 D65 "ranges": { "white": 4040 } }, + { // Quality B, Matrix from Adobe's dcp D65 instead of the internal in Leica's DNG "make_model": "LEICA Q (Typ 116)", "dcraw_matrix": [ 10068,-4043,-1068,-5319,14268,1044,-765,1701,6522 ], // DCP D65 @@ -1154,6 +1188,9 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4080 } // BL autodetected from exif }, +// For all Nikon Dslrs which have multiple bitdepth options (14 and 12 bit) we define the 14-bit value and RT adapts it to 12-bit +// when a 12-bit bitdepth is detected (WL12 = WL14*4095/16383) + { // quality B, samples by Johan Thor at RT.Issues, measures at long exposures with LENR are missing // but a safety margin is included - aperture scaling makes no significant difference "make_model": "Nikon D3S", @@ -1219,22 +1256,22 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "black": 0, "white": 16300 } // WL typical 16383 set to 16300 for safety }, - { // Quality B, aperture scaling used to scale WL at safer levels + { // Quality B "make_model": "Nikon D5300", "dcraw_matrix": [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v8.8 d65 - "ranges": { "white": 16300 } // attention.. WL value is for 14-bit files, has to be 4070 for 12-bit files. WL typical 16383 set to 16300 for safety + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety }, - { // Quality B, aperture scaling used to scale WL at safer levels + { // Quality B "make_model": "Nikon D5500", "dcraw_matrix": [ 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 ], // adobe dng_v9.0 d65 - "ranges": { "white": 16300 } // attention.. WL value is for 14-bit files, has to be 4070 for 12-bit files. WL typical 16383 set to 16300 for safety + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety }, - { // Quality B, color matrix from DNG_v9.0 instead of internal Dcraw_v9.25_r1.475, + { // Quality B "make_model": "Nikon D7200", "dcraw_matrix": [ 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 ], // adobe dng_v9.0 d65 - "ranges": { "white": 16300 } // attention.. WL values are for 14-bit files, has to be WL4070 for 12-bit files. WL typical 16383 set to 16300 for safety, + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety, }, { // quality B, samples by joachip at RT forums, are measures at long exposures with LongExposureNoiseReduction @@ -1252,12 +1289,12 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ], "white_max": 16383 } - }, - { // quality B, lacks WL measures at intermediate ISOs (160-250-320 ..) and measures at long exposures with LongExposureNoiseReduction + }, + { // quality B, missing WL measures at intermediate ISOs (160-250-320 ..) and at long exposures with LongExposureNoiseReduction set to ON // aperture scaling known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D610", "dcraw_matrix": [ 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 ], // dcp d65 - "raw_crop": [ 0, 0, 6034, 4028 ], // Dcraw has no raw crop for D610 + "raw_crop": [ 0, 0, 6034, 4028 ], "ranges": { "white": [ { "iso": [ 50, 100 ], "levels": [ 15800, 15700, 15800 ] }, // typical G1/G2 15778, R/B 15879 lowered to 15700, 15800 for possible WL distribution under LENR @@ -1267,25 +1304,24 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ], "white_max": 16383 } - }, + }, - { // quality B; Data from RusselCottrell at RT forums. sensor is not uniform + { // quality B; Data from RusselCottrell at RT forums. sensor is not uniform "make_model": "Nikon D700", "dcraw_matrix": [ 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 ], - // "dcraw_matrix": [ 9336,-3405,14,-7321,14779,2764,-914,1171,8248 ], // illum a - // "raw_crop": [ 1400, 600, 1600, 1600 ], // experimental - Dcraw 2 0 4284 2844, + // "dcraw_matrix": [ 9336,-3405,14,-7321,14779,2764,-914,1171,8248 ], // illuminant A "ranges": { "white": [ 15500, 15500, 15500 ] } - // Non linearities start at 15750 (hi ISOs) 15850 (low ISOs) with long exposures (>2sec) and LENR ON .. nominal 15892 - // white 15750 is correct for 14-bit files, for 12-bit files RT auto_calculates it 15750*4095/16383=3936 - }, + // Non linearities start at 15500 (hi ISOs) 15850 (low ISOs) with long exposures (>2sec) and LENR ON .. nominal 15892 + // white 15500 is correct for 14-bit files, for 12-bit files RT auto_calculates it 15750*4095/16383=3936 + }, - { // Quality B, + { // Quality B, "make_model": "Nikon D750", "dcraw_matrix": [ 9020,-2890,-715,-4535,12436,2348,-934,1919,7086 ], // adobe dcp d65 DNGv8.7 - "ranges": { "white": 16300 } // attention.. WL values are for 14-bit files, has to be WL4070 for 12-bit files. WL typical 16383 set to 16300 for safety - }, + "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. TypicalWL 16383 set to 16300 for safety + }, - { // quality B; Data from RussellCottrell at RT forums. Largest aperture scale factor is 1.013, about 1/50th of a stop + { // quality B; Data from RussellCottrell at RT forums. Largest aperture scale factor is 1.013, about 1/50th of a stop "make_model": "Nikon D800E", "dcraw_matrix": [ 7866,-2108,-555,-4869,12483,2681,-1176,2069,7501 ], // D800/D800E from dcraw.c "ranges": { @@ -1295,17 +1331,18 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": [ 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 16300 } // 16383 ] } - }, - { // quality B, WL set at 16300 from nominal 16380 for possible non linearities with LENR + }, + { // quality B, WL set at 16300 from nominal 16380 for possible non linearities with LENR "make_model": "Nikon D810", "dcraw_matrix": [ 9369,-3195,-791,-4488,12430,2301,-893,1796,6872 ], // dcp_v8.6 d65 "raw_crop": [ 0, 0, 7380, 4928 ], // Official raw crop 7380x4928, - "ranges": { "white": 16300 } // WL 16300 is for 14-bit raws, for 12-bit files RT auto calculates the correct WL. Typical WL at 16383 + "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. Typical WL at 16383 }, + { // Quality b, 16Mp and 64Mp raw frames "make_model": "OLYMPUS E-M5MarkII", "dcraw_matrix": [ 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 ], // DNG_v8.8 D65 - "raw_crop": [ 0, 0, -6, -6 ], // largest valid, full 64Mp 9280x6938, official crop 0 0 9216 6912 - safe 5755 + "raw_crop": [ 0, 0, -6, -6 ], // largest valid, full 64Mp 9280x6938, official crop 0 0 9216 6912 "ranges": { "white": [ { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 @@ -1317,7 +1354,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { // Quality B, 20Mp and 80Mp raw frames "make_model": "OLYMPUS PEN-F", "dcraw_matrix": [ 9476,-3182,-765,-2613,10958,1893,-449,1315,5268 ], // dng_v9.5 D65 - // "raw_crop": [ 0, 0, 10372, -7780 ], // largest valid, full 80Mp 10400X7796, official crop 10 10 10368 7776 - + // "raw_crop": [ 0, 0, 10372, -7780 ], // Highres mode largest valid, full 80Mp 10400X7796, official crop 10 10 10368 7776 "ranges": { "white": [ { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 @@ -1358,15 +1395,15 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4050 } // safe for worst case detected, nominal is 4093 }, - /* since Dcraw_v9.21 Panasonic base BL is read from exif (tags 0x001c BlackLevelRed15 is BL offstet. - Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue + /* since Dcraw_v9.21 Panasonic base BL is read from exif (tags 0x001c BlackLevelRed15 is BL offset. + Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue and we define here the needed offset of around 15. The total BL is base+offset */ { // Quality B, CameraPhone, some samples are missing but has the same sensor as FZ1000 .. "make_model": [ "Panasonic DMC-CM1", "Panasonic DMC-CM10" ], "dcraw_matrix": [ 8770,-3194,-820,-2871,11281,1803,-513,1552,4434 ], // dcp_v8.7 d65 "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 @@ -1378,20 +1415,20 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { // Quality A , replicated from rawimage.cc "make_model": "Panasonic DMC-FZ150", "dcraw_matrix": [ 10435,-3208,-72,-2293,10506,2067,-486,1725,4682 ], // RT, copy from custom dcp d55 - "ranges": { "black": 15, "white": 4050 } // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset }, { // Quality Β, "make_model": [ "Panasonic DMC-FZ300", "Panasonic DMC-FZ330" ], "dcraw_matrix": [ 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 ], // DNG-V9.1.1 - "ranges": { "black": 15, "white": 4050 } // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset }, { // Quality A, samples by helices at Rt forums "make_model": [ "Panasonic DMC-FZ1000", "Leica V-LUX (Typ 114)" ], "dcraw_matrix": [ 7830,-2696,-763,-3325,11667,1866,-641,1712,4824 ], // dcp_v8.6 d65 "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 @@ -1399,11 +1436,12 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ] } }, - { // Quality A, samples by helices at Rt forums + { // Quality A, samples by helices at Rt forums and Chris Power at github "make_model": [ "Panasonic DMC-ZS100", "Panasonic DMC-ZS110", "Panasonic DMC-TZ100", "Panasonic DMC-TZ101", "Panasonic DMC-TZ110", "Panasonic DMC-TX1" ], "dcraw_matrix": [ 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 ], // dcp_v8.6 d65 + "raw_crop": [ 4, 4, -4, -4 ], // full raw frame 5488x3664 exif crop 5472X3648 with 8pixel borders. Set the borders at 4 pixels which added with RT's 4 pixels border gives exactly the official frame. "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 @@ -1414,13 +1452,13 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { // Quality A "make_model": [ "Panasonic DMC-LF1", "Leica C (Typ 112)" ], "dcraw_matrix": [ 9379,-3267,-816,-3227,11560,1881,-926,1928,5340 ], - "ranges": { "black": 15, "white": 4050 } // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset }, { // Quality A "make_model": [ "Panasonic DMC-TZ60", "Panasonic DMC-TZ61", "Panasonic DMC-ZS40", "Panasonic DMC-ZS41" ], "dcraw_matrix": [ 8607,-2822,-808,-3755,11930,2049,-820,2060,5224 ], // matrix from Adobe dcp v8.4 "raw_crop": [ 8, 8, -8, -8 ], // crop according to exif 4896 X 3672 plus 4 pixels borders. RT's frame gets smaller than Dcraw but works better with auto distortion - "ranges": { "black": 14, "white": 4050 } // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 14, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset }, { // Quality B, "make_model": [ "Panasonic DMC-TZ70", "Panasonic DMC-TZ71", "Panasonic DMC-ZS50", "Panasonic DMC-ZS51" ], @@ -1446,7 +1484,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-G1", "dcraw_matrix": [ 7477,-1615,-651,-5016,12769,2506,-1380,2475,7240 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // exif:4095 distribution peak at 3977 +/- up to 50 { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 @@ -1457,21 +1495,21 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-G3", "dcraw_matrix": [ 6051,-1406,-671,-4015,11505,2868,-1654,2667,6219 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": 4060 } // exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR }, { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-G5", "dcraw_matrix": [ 7122,-2092,-419,-4643,11769,3283,-1363,2413,5944 ], // RT "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": 4060 } // exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR }, { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GF1", "dcraw_matrix": [ 7863,-2080,-668,-4623,12331,2578,-1020,2066,7266 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // exif:4095 distribution peak at 3977 +/- up to 50 { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 @@ -1483,21 +1521,21 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GF2", "dcraw_matrix": [ 7694,-1791,-745,-4917,12818,2332,-1221,2322,7197 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": 4050 } // exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR }, { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GF3", "dcraw_matrix": [ 8074,-1846,-861,-5026,12999,2239,-1320,2375,7422 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": 4050 } // exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR }, { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GH1", "dcraw_matrix": [ 6360,-1557,-375,-4201,11504,3086,-1378,2518,5843 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // exif:4095 distribution peak at 3982 +/- up to 50 { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 @@ -1509,7 +1547,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know // "dcraw_matrix": [ 6855,-1765,-456,-4223,11600,2996,-1450,2602,5761 ], // Colin Walker - disabled due to problems with underwater "dcraw_matrix": [ 7780,-2410,-806,-3913,11724,2484,-1018,2390,5298 ], // Dcraw d65 "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // exif:4095 distribution peak at 3982 +/- up to 50 { "iso": [ 1600, 3200, 6400, 12800 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 @@ -1521,7 +1559,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GH3", "dcraw_matrix": [ 6559,-1752,-491,-3672,11407,2586,-962,1875,5130 ], // dcp d65 "ranges": { - "black": 16, // 16 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 125, "levels": 3500 }, // gaussian 3600-4095 { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 @@ -1533,7 +1571,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GH4", "dcraw_matrix": [ 7122,-2108,-512,-3155,11201,2231,-541,1423,5045 ], // dng_v8.5 d65 "ranges": { - "black": 16, // 16 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 100, "levels": 2700 }, // gaussian center at 2870-2920 range +/- 150, exif 2111 { "iso": 125, "levels": 3100 }, // guessed @@ -1546,7 +1584,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GM1", "dcraw_matrix": [ 6770,-1895,-744,-5232,13145,2303,-1664,2691,5703 ], "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 125, "levels": 3100 }, // bell shape 3150-3650 - exif 2616 { "iso": 160, "levels": 3600 }, // guessed from relative GX7 data @@ -1559,7 +1597,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GM5", "dcraw_matrix": [ 8238,-3244,-679,-3921,11814,2384,-836,2022,5852 ], // dng_v8.7 d65 "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 100, "levels": 2800 }, // bell shape 2850-3250 - exif 2111 { "iso": [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 @@ -1570,7 +1608,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": [ "Panasonic DMC-GX7", "Panasonic DMC-GF7", "Panasonic DMC-GF8" ], "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ], "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 125, "levels": 3100 }, { "iso": 160, "levels": 3600 }, @@ -1583,7 +1621,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": [ "Panasonic DMC-G7", "Panasonic DMC-G70", "Panasonic DMC-GX80", "Panasonic DMC-GX85" ], "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ],// DNG_v9.1 D65 "ranges": { - "black": 16, // 16 is BL offset. Dcraw/RT read the BLbase from exif and calculates total BL = BLbase+BLoffset + "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 exif_linearitylimit 2111 { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 exif_linearitylimit 2626 @@ -1595,7 +1633,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GX8", "dcraw_matrix": [ 7564,-2263,-606,-3148,11239,2177,-540,1435,4853 ], // DNG_v9.1.1 D65 "ranges": { - "black": 15, // 16 is BL offstet. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 16 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 100, "levels": 2800 }, // gaussian 2900-3200 exif_linearitylimit 2111 { "iso": 125, "levels": 3180 }, // guessed gaussian 3200-3600 exif_linearitylimit 2626 @@ -1608,7 +1646,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 8844,-3538,-768,-3709,11762,2200,-698,1792,5220 ], // DNG_V8.7 d65 // "dcraw_matrix": [ 6538,-1614,-549,-5475,13096,2646,-1780,2799,5612 ], // calculated from DxO D50 "ranges": { - "black": 15, // 15 is BL offset calculated from exif data. + "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset. "white": [ { "iso": 100, "levels": 2300 }, // gaussian 2400-2700 exif_linearitylimit 2111 { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 From da86b8154ace0d21b746008ff0ae8b402a964c0c Mon Sep 17 00:00:00 2001 From: Pat David Date: Mon, 30 May 2016 21:43:06 -0500 Subject: [PATCH 56/57] Fix minor spelling & capitalization --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9dfd4c324..e90807b73 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ RawTherapee is a powerful, cross-platform raw photo processing program, released ## Target audience -Rawtherapee is a [libre software](https://en.wikipedia.org/wiki/Free_software) designed for developing raw files from a broad range of digital cameras, as well as [HDR DNG](https://helpx.adobe.com/photoshop/digital-negative.html) files and non-raw image formats ([JPEG](https://en.wikipedia.org/wiki/JPEG), [TIFF](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) and [PNG](https://en.wikipedia.org/wiki/Portable_Network_Graphics)). The target audience ranges from enthusiast newcomers who whish to broaden their understanding of how digital imaging works to semi-professional photographers. Knowledge in color science is not compulsory, but it is recommended that you are eager to learn and ready to read our documentation ([RawPedia](http://rawpedia.rawtherapee.com/)) as well as look up basic concepts which lie outside the scope of RawPedia, such as [color balance](https://en.wikipedia.org/wiki/Color_balance), elsewhere. +RawTherapee is a [libre software](https://en.wikipedia.org/wiki/Free_software) designed for developing raw files from a broad range of digital cameras, as well as [HDR DNG](https://helpx.adobe.com/photoshop/digital-negative.html) files and non-raw image formats ([JPEG](https://en.wikipedia.org/wiki/JPEG), [TIFF](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) and [PNG](https://en.wikipedia.org/wiki/Portable_Network_Graphics)). The target audience ranges from enthusiast newcomers who wish to broaden their understanding of how digital imaging works to semi-professional photographers. Knowledge in color science is not compulsory, but it is recommended that you are eager to learn and ready to read our documentation ([RawPedia](http://rawpedia.rawtherapee.com/)) as well as look up basic concepts which lie outside the scope of RawPedia, such as [color balance](https://en.wikipedia.org/wiki/Color_balance), elsewhere. Of course, professionals may use RawTherapee too while enjoying complete freedom, but will probably lack some peripheral features such as [Digital Asset Management](https://en.wikipedia.org/wiki/Digital_asset_management), printing, uploading, etc. RawTherapee is not aimed at being an inclusive all-in-one program, and the [open-source community](https://en.wikipedia.org/wiki/Open-source_movement) is sufficiently developed by now to offer all those peripheral features in other specialized software. From ba534817502c7f02930efb567c6dd6f74cfe995a Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 2 Jun 2016 18:15:55 +0200 Subject: [PATCH 57/57] Disable #pragma omp simd statement for clang builds, fixes #3324 --- rtengine/LUT.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/LUT.h b/rtengine/LUT.h index 76bcf0ccd..27b742a58 100644 --- a/rtengine/LUT.h +++ b/rtengine/LUT.h @@ -262,7 +262,7 @@ public: LUT & operator+=(LUT &rhs) { if (rhs.size == this->size) { -#ifdef _OPENMP +#ifdef _RT_NESTED_OPENMP // temporary solution to fix Issue #3324 #pragma omp simd #endif