From 25625c68425539187677c5476f92f7fd35a16e7e Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 16 Mar 2019 23:35:39 +0100 Subject: [PATCH 01/59] small speeduo for denoise --- rtengine/FTblockDN.cc | 74 ++++++++++++++++--------------------------- rtengine/color.cc | 57 +++++++++++++++++++++++++++++---- rtengine/color.h | 1 + 3 files changed, 78 insertions(+), 54 deletions(-) diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index 4e62e1c1f..62483c3d7 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -42,6 +42,7 @@ #ifdef _OPENMP #include #endif +#define BENCHMARK #include "StopWatch.h" #define TS 64 // Tile size @@ -839,6 +840,12 @@ BENCHFUN {static_cast(wprof[2][0]), static_cast(wprof[2][1]), static_cast(wprof[2][2])} }; + const float wpfast[3][3] = { + {static_cast(wprof[0][0]) / Color::D50x, static_cast(wprof[0][1]) / Color::D50x, static_cast(wprof[0][2]) / Color::D50x}, + {static_cast(wprof[1][0]), static_cast(wprof[1][1]), static_cast(wprof[1][2])}, + {static_cast(wprof[2][0]) / Color::D50z, static_cast(wprof[2][1]) / Color::D50z, static_cast(wprof[2][2]) / Color::D50z} + }; + // begin tile processing of image #ifdef _OPENMP #pragma omp parallel num_threads(numthreads) if (numthreads>1) @@ -925,51 +932,38 @@ BENCHFUN if (!denoiseMethodRgb) { //lab mode //modification Jacques feb 2013 and july 2014 #ifdef _OPENMP - #pragma omp parallel for num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) + #pragma omp parallel for schedule(dynamic,16) num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif for (int i = tiletop; i < tilebottom; ++i) { - int i1 = i - tiletop; + const int i1 = i - tiletop; for (int j = tileleft; j < tileright; ++j) { - int j1 = j - tileleft; - float R_ = gain * src->r(i, j); - float G_ = gain * src->g(i, j); - float B_ = gain * src->b(i, j); + const int j1 = j - tileleft; - R_ = Color::denoiseIGammaTab[R_]; - G_ = Color::denoiseIGammaTab[G_]; - B_ = Color::denoiseIGammaTab[B_]; + const float R_ = Color::denoiseIGammaTab[gain * src->r(i, j)]; + const float G_ = Color::denoiseIGammaTab[gain * src->g(i, j)]; + const float B_ = Color::denoiseIGammaTab[gain * src->b(i, j)]; //apply gamma noise standard (slider) - R_ = R_ < 65535.f ? gamcurve[R_] : (Color::gammanf(R_ / 65535.f, gam) * 32768.f); - G_ = G_ < 65535.f ? gamcurve[G_] : (Color::gammanf(G_ / 65535.f, gam) * 32768.f); - B_ = B_ < 65535.f ? gamcurve[B_] : (Color::gammanf(B_ / 65535.f, gam) * 32768.f); - - //true conversion xyz=>Lab - float X, Y, Z; - Color::rgbxyz(R_, G_, B_, X, Y, Z, wp); - - //convert to Lab - float L, a, b; - Color::XYZ2Lab(X, Y, Z, L, a, b); - - labdn->L[i1][j1] = L; - labdn->a[i1][j1] = a; - labdn->b[i1][j1] = b; + labdn->L[i1][j1] = R_ < 65535.f ? gamcurve[R_] : Color::gammanf(R_ / 65535.f, gam) * 32768.f; + labdn->a[i1][j1] = G_ < 65535.f ? gamcurve[G_] : Color::gammanf(G_ / 65535.f, gam) * 32768.f; + labdn->b[i1][j1] = B_ < 65535.f ? gamcurve[B_] : Color::gammanf(B_ / 65535.f, gam) * 32768.f; if (((i1 | j1) & 1) == 0) { if (numTries == 1) { - noisevarlum[(i1 >> 1)*width2 + (j1 >> 1)] = useNoiseLCurve ? lumcalc[i >> 1][j >> 1] : noisevarL; - noisevarchrom[(i1 >> 1)*width2 + (j1 >> 1)] = useNoiseCCurve ? maxNoiseVarab * ccalc[i >> 1][j >> 1] : 1.f; + noisevarlum[(i1 >> 1) * width2 + (j1 >> 1)] = useNoiseLCurve ? lumcalc[i >> 1][j >> 1] : noisevarL; + noisevarchrom[(i1 >> 1) * width2 + (j1 >> 1)] = useNoiseCCurve ? maxNoiseVarab * ccalc[i >> 1][j >> 1] : 1.f; } else { - noisevarlum[(i1 >> 1)*width2 + (j1 >> 1)] = lumcalc[i >> 1][j >> 1]; - noisevarchrom[(i1 >> 1)*width2 + (j1 >> 1)] = ccalc[i >> 1][j >> 1]; + noisevarlum[(i1 >> 1) * width2 + (j1 >> 1)] = lumcalc[i >> 1][j >> 1]; + noisevarchrom[(i1 >> 1) * width2 + (j1 >> 1)] = ccalc[i >> 1][j >> 1]; } } //end chroma } + //true conversion xyz=>Lab + Color::RGB2Lab(labdn->L[i1], labdn->a[i1], labdn->b[i1], labdn->L[i1], labdn->a[i1], labdn->b[i1], wpfast, width); } } else {//RGB mode #ifdef _OPENMP @@ -1605,27 +1599,13 @@ BENCHFUN for (int i = tiletop; i < tilebottom; ++i) { int i1 = i - tiletop; - + //true conversion Lab==>xyz + Color::Lab2RGBLimit(labdn->L[i1], labdn->a[i1], labdn->b[i1], labdn->L[i1], labdn->a[i1], labdn->b[i1], wip, 9000000.f, 1.f + qhighFactor * realred, 1.f + qhighFactor * realblue, width); for (int j = tileleft; j < tileright; ++j) { int j1 = j - tileleft; - //modification Jacques feb 2013 - //true conversion Lab==>xyz - float L = labdn->L[i1][j1]; - float a = labdn->a[i1][j1]; - float b = labdn->b[i1][j1]; - float c_h = SQR(a) + SQR(b); - - if (c_h > 9000000.f) { - a *= 1.f + qhighFactor * realred; - b *= 1.f + qhighFactor * realblue; - } - - //convert XYZ - float X, Y, Z; - Color::Lab2XYZ(L, a, b, X, Y, Z); - //apply inverse gamma noise - float r_, g_, b_; - Color::xyz2rgb(X, Y, Z, r_, g_, b_, wip); + float r_ = labdn->L[i1][j1]; + float g_ = labdn->a[i1][j1]; + float b_ = labdn->b[i1][j1]; //inverse gamma standard (slider) r_ = r_ < 32768.f ? igamcurve[r_] : (Color::gammanf(r_ / 32768.f, igam) * 65535.f); g_ = g_ < 32768.f ? igamcurve[g_] : (Color::gammanf(g_ / 32768.f, igam) * 65535.f); diff --git a/rtengine/color.cc b/rtengine/color.cc index 4ace03bc0..3f2a75788 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -1771,10 +1771,10 @@ void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b, { #ifdef __SSE2__ - vfloat minvalfv = F2V(0.f); - vfloat maxvalfv = F2V(MAXVALF); - vfloat c500v = F2V(500.f); - vfloat c200v = F2V(200.f); + const vfloat minvalfv = ZEROV; + const vfloat maxvalfv = F2V(MAXVALF); + const vfloat c500v = F2V(500.f); + const vfloat c200v = F2V(200.f); #endif int i = 0; @@ -1787,9 +1787,7 @@ void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b, const vfloat yv = F2V(wp[1][0]) * rv + F2V(wp[1][1]) * gv + F2V(wp[1][2]) * bv; const vfloat zv = F2V(wp[2][0]) * rv + F2V(wp[2][1]) * gv + F2V(wp[2][2]) * bv; - vmask maxMask = vmaskf_gt(vmaxf(xv, vmaxf(yv, zv)), maxvalfv); - vmask minMask = vmaskf_lt(vminf(xv, vminf(yv, zv)), minvalfv); - if (_mm_movemask_ps((vfloat)maxMask) || _mm_movemask_ps((vfloat)minMask)) { + if (_mm_movemask_ps((vfloat)vorm(vmaskf_gt(vmaxf(xv, vmaxf(yv, zv)), maxvalfv), vmaskf_lt(vminf(xv, vminf(yv, zv)), minvalfv)))) { // take slower code path for all 4 pixels if one of the values is > MAXVALF. Still faster than non SSE2 version for(int k = 0; k < 4; ++k) { float x = xv[k]; @@ -1872,6 +1870,51 @@ void Color::RGB2L(float *R, float *G, float *B, float *L, const float wp[3][3], } } +void Color::Lab2RGBLimit(float *L, float *a, float *b, float *R, float *G, float *B, const float wp[3][3], float limit, float afactor, float bfactor, int width) +{ + + int i = 0; + +#ifdef __SSE2__ + const vfloat wpv[3][3] = { + {F2V(wp[0][0]), F2V(wp[0][1]), F2V(wp[0][2])}, + {F2V(wp[1][0]), F2V(wp[1][1]), F2V(wp[1][2])}, + {F2V(wp[2][0]), F2V(wp[2][1]), F2V(wp[2][2])} + }; + const vfloat limitv = F2V(limit); + const vfloat afactorv = F2V(afactor); + const vfloat bfactorv = F2V(bfactor); + + for(;i < width - 3; i+=4) { + const vfloat Lv = LVFU(L[i]); + vfloat av = LVFU(a[i]); + vfloat bv = LVFU(b[i]); + + const vmask mask = vmaskf_gt(SQRV(av) + SQRV(bv), limitv); + av = vself(mask, av * afactorv, av); + bv = vself(mask, bv * bfactorv, bv); + vfloat Xv, Yv, Zv; + Lab2XYZ(Lv, av, bv, Xv, Yv, Zv); + vfloat Rv, Gv, Bv; + xyz2rgb(Xv, Yv, Zv, Rv, Gv, Bv, wpv); + STVFU(R[i], Rv); + STVFU(G[i], Gv); + STVFU(B[i], Bv); + } +#endif + for(;i < width; ++i) { + float X, Y, Z; + float av = a[i]; + float bv = b[i]; + if (SQR(av) + SQR(bv) > limit) { + av *= afactor; + bv *= bfactor; + } + Lab2XYZ(L[i], av, bv, X, Y, Z); + xyz2rgb(X, Y, Z, R[i], G[i], B[i], wp); + } +} + void Color::XYZ2Lab(float X, float Y, float Z, float &L, float &a, float &b) { diff --git a/rtengine/color.h b/rtengine/color.h index 9f8863343..c3d1cc50a 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -617,6 +617,7 @@ public: */ static void XYZ2Lab(float x, float y, float z, float &L, float &a, float &b); static void RGB2Lab(float *X, float *Y, float *Z, float *L, float *a, float *b, const float wp[3][3], int width); + static void Lab2RGBLimit(float *L, float *a, float *b, float *R, float *G, float *B, const float wp[3][3], float limit, float afactor, float bfactor, int width); static void RGB2L(float *X, float *Y, float *Z, float *L, const float wp[3][3], int width); /** From 9ee47c29a3d826bbb422cac2a45ec7e76d248177 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 17 Mar 2019 19:45:46 +0100 Subject: [PATCH 02/59] Small speedup for denoise (mainly for preview mode), #5225 --- rtengine/FTblockDN.cc | 85 +++++++++---------------------------------- rtengine/improcfun.h | 7 ++-- 2 files changed, 20 insertions(+), 72 deletions(-) diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index 62483c3d7..12344a25b 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -2112,52 +2112,7 @@ void ImProcFunctions::RGBoutput_tile_row(float *bloxrow_L, float ** Ldetail, flo #undef epsilon */ -//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -float ImProcFunctions::MadMax(float * DataList, int & max, int datalen) -{ - - //computes Median Absolute Deviation and Maximum of DataList - //DataList values should mostly have abs val < 65535 - - int * histo = new int[65536]; - - //memset(histo, 0, 65536*sizeof(histo)); - for (int i = 0; i < 65536; ++i) { - histo[i] = 0; - } - - //calculate histogram of absolute values of HH wavelet coeffs - for (int i = 0; i < datalen; ++i) { - histo[MAX(0, MIN(65535, abs((int)DataList[i])))]++; - } - - //find median of histogram - int median = 0, count = 0; - - while (count < datalen / 2) { - count += histo[median]; - ++median; - } - - //find max of histogram - max = 65535; - - while (histo[max] == 0) { - max--; - } - - int count_ = count - histo[median - 1]; - - delete[] histo; - - // interpolate - return (((median - 1) + (datalen / 2 - count_) / (static_cast(count - count_))) / 0.6745); - -} - -float ImProcFunctions::Mad(float * DataList, const int datalen) +float ImProcFunctions::Mad(const float * DataList, const int datalen) { if (datalen <= 1) { // Avoid possible buffer underrun return 0; @@ -2169,7 +2124,7 @@ float ImProcFunctions::Mad(float * DataList, const int datalen) //calculate histogram of absolute values of wavelet coeffs for (int i = 0; i < datalen; ++i) { - histo[min(255, abs(static_cast(DataList[i])))]++; + histo[static_cast(rtengine::min(255.f, fabsf(DataList[i])))]++; } //find median of histogram @@ -2186,7 +2141,7 @@ float ImProcFunctions::Mad(float * DataList, const int datalen) return (((median - 1) + (datalen / 2 - count_) / (static_cast(count - count_))) / 0.6745); } -float ImProcFunctions::MadRgb(float * DataList, const int datalen) +float ImProcFunctions::MadRgb(const float * DataList, const int datalen) { if (datalen <= 1) { // Avoid possible buffer underrun return 0; @@ -2201,10 +2156,8 @@ float ImProcFunctions::MadRgb(float * DataList, const int datalen) } //calculate histogram of absolute values of wavelet coeffs - int i; - - for (i = 0; i < datalen; ++i) { - histo[min(65535, abs(static_cast(DataList[i])))]++; + for (int i = 0; i < datalen; ++i) { + histo[static_cast(rtengine::min(65535.f, fabsf(DataList[i])))]++; } //find median of histogram @@ -2224,27 +2177,23 @@ float ImProcFunctions::MadRgb(float * DataList, const int datalen) -void ImProcFunctions::Noise_residualAB(wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb) +void ImProcFunctions::Noise_residualAB(const wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb) { - int maxlvl = WaveletCoeffs_ab.maxlevel(); + float resid = 0.f; - float madC; float maxresid = 0.f; - for (int lvl = 0; lvl < maxlvl; ++lvl) { +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic) collapse(2) reduction(+:resid) reduction(max:maxresid) num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) +#endif + for (int lvl = 0; lvl < WaveletCoeffs_ab.maxlevel(); ++lvl) { // compute median absolute deviation (MAD) of detail coefficients as robust noise estimator - - int Wlvl_ab = WaveletCoeffs_ab.level_W(lvl); - int Hlvl_ab = WaveletCoeffs_ab.level_H(lvl); - - float ** WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl); - for (int dir = 1; dir < 4; ++dir) { - if (denoiseMethodRgb) { - madC = SQR(MadRgb(WavCoeffs_ab[dir], Wlvl_ab * Hlvl_ab)); - } else { - madC = SQR(Mad(WavCoeffs_ab[dir], Wlvl_ab * Hlvl_ab)); - } + const int Wlvl_ab = WaveletCoeffs_ab.level_W(lvl); + const int Hlvl_ab = WaveletCoeffs_ab.level_H(lvl); + + float ** WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl); + const float madC = SQR(denoiseMethodRgb ? MadRgb(WavCoeffs_ab[dir], Wlvl_ab * Hlvl_ab) : Mad(WavCoeffs_ab[dir], Wlvl_ab * Hlvl_ab)); resid += madC; @@ -2624,7 +2573,7 @@ bool ImProcFunctions::WaveletDenoiseAllAB(wavelet_decomposition &WaveletCoeffs_L if (!memoryAllocationFailed) { #ifdef _OPENMP - #pragma omp for schedule(dynamic) collapse(2) + #pragma omp for schedule(dynamic) collapse(2) nowait #endif for (int lvl = 0; lvl < maxlvl; ++lvl) { diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 75e8341b9..e3e798b9e 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -326,11 +326,10 @@ public: void ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b, int W_ab, int H_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb); - void Noise_residualAB(wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb); + void Noise_residualAB(const wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb); void calcautodn_info(float &chaut, float &delta, int Nb, int levaut, float maxmax, float lumema, float chromina, int mode, int lissage, float redyel, float skinc, float nsknc); - float MadMax(float * DataList, int &max, int datalen); - float Mad(float * DataList, const int datalen); - float MadRgb(float * DataList, const int datalen); + float Mad(const float * DataList, const int datalen); + float MadRgb(const float * DataList, const int datalen); // pyramid wavelet void dirpyr_equalizer(float ** src, float ** dst, int srcwidth, int srcheight, float ** l_a, float ** l_b, const double * mult, const double dirpyrThreshold, const double skinprot, float b_l, float t_l, float t_r, int scale); //Emil's directional pyramid wavelet From 30120af8a29fda91cb59c51e3268968fb2104719 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 19 Mar 2019 20:54:10 +0100 Subject: [PATCH 03/59] remove some bogus consts --- rtengine/color.h | 24 ++++++++++++------------ rtengine/improcfun.h | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/rtengine/color.h b/rtengine/color.h index c3d1cc50a..e1ce1c08c 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -842,7 +842,7 @@ public: * @param go green channel of output color [0 ; 65535] (return value) * @param bo blue channel of output color [0 ; 65535] (return value) */ - static void interpolateRGBColor (const float balance, const float r1, const float g1, const float b1, const float r2, const float g2, const float b2, int channels, const double xyz_rgb[3][3], const double rgb_xyz[3][3], float &ro, float &go, float &bo); + static void interpolateRGBColor (float balance, float r1, float g1, float b1, float r2, float g2, float b2, int channels, const double xyz_rgb[3][3], const double rgb_xyz[3][3], float &ro, float &go, float &bo); /** * @brief Interpolate 2 colors from their respective red/green/blue channels, with a balance factor @@ -872,7 +872,7 @@ public: * @param go green channel of output color [0 ; 65535] (return value) * @param bo blue channel of output color [0 ; 65535] (return value) */ - static void interpolateRGBColor (float realL, float iplow, float iphigh, int algm, const float balance, int twoc, int metchrom, float chromat, float luma, const float r1, const float g1, const float b1, const float xl, const float yl, const float zl, const float x2, const float y2, const float z2, const double xyz_rgb[3][3], const double rgb_xyz[3][3], float &ro, float &go, float &bo); + static void interpolateRGBColor (float realL, float iplow, float iphigh, int algm, float balance, int twoc, int metchrom, float chromat, float luma, float r1, float g1, float b1, float xl, float yl, float zl, float x2, float y2, float z2, const double xyz_rgb[3][3], const double rgb_xyz[3][3], float &ro, float &go, float &bo); /** @@ -1429,15 +1429,15 @@ public: * @param moreRGB (Debug target only) to calculate iterations for values >65535 */ #ifdef _DEBUG - static void gamutLchonly (float HH, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef, bool &neg, bool &more_rgb); - static void gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef, bool &neg, bool &more_rgb); - static void gamutLchonly (float2 sincosval, float &Lprov1, float &Chprov1, const float wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef, bool &neg, bool &more_rgb); + static void gamutLchonly (float HH, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef, bool &neg, bool &more_rgb); + static void gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef, bool &neg, bool &more_rgb); + static void gamutLchonly (float2 sincosval, float &Lprov1, float &Chprov1, const float wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef, bool &neg, bool &more_rgb); #else - static void gamutLchonly (float HH, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef); - static void gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef); - static void gamutLchonly (float2 sincosval, float &Lprov1, float &Chprov1, const float wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef); + static void gamutLchonly (float HH, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef); + static void gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef); + static void gamutLchonly (float2 sincosval, float &Lprov1, float &Chprov1, const float wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef); #endif - static void gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &saturation, const float wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef); + static void gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &saturation, const float wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef); /** @@ -1461,7 +1461,7 @@ public: * @param wip matrix for working profile * @param multiThread whether to parallelize the loop or not */ - static void LabGamutMunsell (float *labL, float *laba, float *labb, const int N, bool corMunsell, bool lumaMuns, bool isHLEnabled, bool gamut, const double wip[3][3]); + static void LabGamutMunsell (float *labL, float *laba, float *labb, int N, bool corMunsell, bool lumaMuns, bool isHLEnabled, bool gamut, const double wip[3][3]); /* @@ -1497,8 +1497,8 @@ public: // -------------------------------- end Munsell - static void scalered ( const float rstprotection, const float param, const float limit, const float HH, const float deltaHH, float &scale, float &scaleext); - static void transitred (const float HH, const float Chprov1, const float dred, const float factorskin, const float protect_red, const float factorskinext, const float deltaHH, const float factorsat, float &factor); + static void scalered ( float rstprotection, float param, float limit, float HH, float deltaHH, float &scale, float &scaleext); + static void transitred (float HH, float Chprov1, float dred, float factorskin, float protect_red, float factorskinext, float deltaHH, float factorsat, float &factor); static void skinred ( double J, double h, double sres, double Sp, float dred, float protect_red, int sk, float rstprotection, float ko, double &s); static void skinredfloat ( float J, float h, float sres, float Sp, float dred, float protect_red, int sk, float rstprotection, float ko, float &s); // static void scaleredcdbl ( float skinprot, float param, float limit, float HH, float deltaHH, float &scale,float &scaleext); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index e3e798b9e..cd1650f6e 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -328,8 +328,8 @@ public: float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb); void Noise_residualAB(const wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb); void calcautodn_info(float &chaut, float &delta, int Nb, int levaut, float maxmax, float lumema, float chromina, int mode, int lissage, float redyel, float skinc, float nsknc); - float Mad(const float * DataList, const int datalen); - float MadRgb(const float * DataList, const int datalen); + float Mad(const float * DataList, int datalen); + float MadRgb(const float * DataList, int datalen); // pyramid wavelet void dirpyr_equalizer(float ** src, float ** dst, int srcwidth, int srcheight, float ** l_a, float ** l_b, const double * mult, const double dirpyrThreshold, const double skinprot, float b_l, float t_l, float t_r, int scale); //Emil's directional pyramid wavelet From 29196fb57c9d6c698f41ba5171a062c1db41f4b2 Mon Sep 17 00:00:00 2001 From: Hombre Date: Sun, 24 Mar 2019 20:45:05 +0100 Subject: [PATCH 04/59] Fix RTImage cached data cleanup (see #3636) --- rtgui/rtimage.cc | 15 +++++++++++++++ rtgui/rtimage.h | 1 + rtgui/rtwindow.cc | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/rtgui/rtimage.cc b/rtgui/rtimage.cc index cc734456e..6a289ead6 100644 --- a/rtgui/rtimage.cc +++ b/rtgui/rtimage.cc @@ -120,6 +120,10 @@ void RTImage::changeImage (const Glib::ustring& imageName) { clear (); + if (imageName.empty()) { + return; + } + if (pixbuf) { auto iterator = pixbufCache.find (imageName); assert(iterator != pixbufCache.end ()); @@ -169,6 +173,17 @@ void RTImage::init() scaleBack = RTScalable::getScale(); } +void RTImage::cleanup() +{ + for (auto& entry : pixbufCache) { + entry.second.reset(); + } + for (auto& entry : surfaceCache) { + entry.second.clear(); + } + RTScalable::cleanup(); +} + void RTImage::updateImages() { for (auto& entry : pixbufCache) { diff --git a/rtgui/rtimage.h b/rtgui/rtimage.h index 481772ad6..5679f6edc 100644 --- a/rtgui/rtimage.h +++ b/rtgui/rtimage.h @@ -52,6 +52,7 @@ public: static void init(); + static void cleanup(); static void updateImages (); static void setDPInScale (const double newDPI, const int newScale); static void setScale (const int newScale); diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index b5773dc9e..cc5945e7a 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -463,7 +463,7 @@ RTWindow::~RTWindow() delete fpanel; } - RTScalable::cleanup(); + RTImage::cleanup(); } void RTWindow::on_realize () From f4c6ba1f887c72145cae9f24b662e7a07eb88525 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 10 Apr 2019 14:39:54 +0200 Subject: [PATCH 05/59] Preparing for release 5.6-rc1 --- RELEASE_NOTES.txt | 21 ++-- rtdata/images/svg/splash.svg | 189 +++++++++++++++++++++-------------- 2 files changed, 126 insertions(+), 84 deletions(-) diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index 248d27f36..aa67398a1 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -1,17 +1,10 @@ -RAWTHERAPEE 5.5-dev RELEASE NOTES +RAWTHERAPEE 5.6-rc1 RELEASE NOTES -This is a development version of RawTherapee. We update the code almost daily. Every few months, once enough changes have accumulated and the code is stabilized, we make a new official release. Every code change between these releases is known as a "development" version, and this is one of them. +This is RawTherapee 5.6 Release Candidate 1, released on 2019-04-10. This is not the final release yet. Start by reading the "Getting Started" article on RawPedia: http://rawpedia.rawtherapee.com/ -While we only commit tested and relatively stable code and so the development versions should be fairly stable, you should be aware that: -- Development versions only had limited testing, so there may be bugs unknown to us. -- You should report these bugs so that they get fixed for the next stable release. See - www.rawpedia.rawtherapee.com/How_to_write_useful_bug_reports -- The way new tools work in the development versions is likely to change as we tweak and tune them, so your processing profiles may produce different results when used in a future stable version. -- Bugs present in the stable versions get fixed in the development versions, and make it into the next stable version when we make a new official release. That means that in some ways the development versions can be "more stable" than the latest stable release. At the same time, new features may introduce new bugs. This is a trade-off you should be aware of. - NEWS RELEVANT TO PHOTOGRAPHERS @@ -27,12 +20,20 @@ In order to use RawTherapee efficiently you should know that: - There are many keyboard shortcuts which make working with RawTherapee much faster and give you greater control. Make sure you familiarize yourself with them on RawPedia's "Keyboard Shortcuts" page! New features since 5.5: -TODO. +- HiDPI support, for a smooth and sharp user interface regardless of screen size. Scaling in RawTherapee depends on font size, DPI and display scaling. No scaling occurs when the font size is set to 9pt, DPI is set to 96 (or 72 for macOS) and scaling is set to 1 (100%). +- Ability to move tools to a new Favorites tab, http://rawpedia.rawtherapee.com/Favorites_Tab +- "Unclipped" processing profile, to make it easy to save an image while preserving data across the whole tonal range, http://rawpedia.rawtherapee.com/Unclipped +- User-adjustable tiles-per-thread settings in Preferences > Performance, for users who want to perform performance benchmarks to find optimal values for their system. The default value of 2 tiles-per-thread performs best overall. +- Hundreds of speed optimizations, bug fixes, and overall improvements. NEWS RELEVANT TO PACKAGE MAINTAINERS +New since 5.5: +- Requires librsvg >=2.40. +- GTK+ versions 3.24.2 - 3.24.6 have an issue where combobox menu scroll-arrows are missing when the combobox list does not fit vertically on the screen. As a result, users would not be able to scroll in the following comboboxes: Processing Profiles, Film Simulation, and the camera and lens profiles in Profiled Lens Correction. + In general: - To get the source code, either clone from git or use the tarball from http://rawtherapee.com/shared/source/ . Do not use the auto-generated GitHub release tarballs. - Requires GTK+ version >=3.16, though >=3.22.24 is recommended. diff --git a/rtdata/images/svg/splash.svg b/rtdata/images/svg/splash.svg index 0578fac27..2024fcd57 100644 --- a/rtdata/images/svg/splash.svg +++ b/rtdata/images/svg/splash.svg @@ -16,7 +16,7 @@ version="1.1" id="svg783" inkscape:version="0.92.2 2405546, 2018-03-11" - sodipodi:docname="rt-splash.svg" + sodipodi:docname="splash.svg" inkscape:export-filename="/tmp/splash.png" inkscape:export-xdpi="96" inkscape:export-ydpi="96" @@ -479,8 +479,8 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="2.3815029" - inkscape:cx="209.44539" + inkscape:zoom="2.3526012" + inkscape:cx="276" inkscape:cy="173" inkscape:document-units="px" inkscape:current-layer="layer1" @@ -574,14 +574,31 @@ RawTherapee splash screen - 2019-03-11 + 2019-04-10 Maciej Dworak www.rawtherapee.com + + + + + + + + + - - - - - - - - - - - - - - - @@ -903,20 +865,6 @@ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:80px;line-height:1.25;font-family:'Eras Bold ITC';-inkscape-font-specification:'Eras Bold ITC Bold'" id="path660" /> - - - - . 5 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:49.34799576px;line-height:1.25;font-family:'Eras Bold ITC';-inkscape-font-specification:'Eras Bold ITC Bold';letter-spacing:-7.09514618px">. 6 Raw + + + + + + + + + + + + + + + + + + + + + + + + + From e1c8f3a86de695e6b8cfa691977e6e98553d8966 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 10 Apr 2019 15:02:07 +0200 Subject: [PATCH 06/59] Bumped version in AppData file --- com.rawtherapee.RawTherapee.appdata.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/com.rawtherapee.RawTherapee.appdata.xml b/com.rawtherapee.RawTherapee.appdata.xml index 0dace6772..9b5f6d1d6 100644 --- a/com.rawtherapee.RawTherapee.appdata.xml +++ b/com.rawtherapee.RawTherapee.appdata.xml @@ -35,6 +35,7 @@ https://discuss.pixls.us/t/localization-how-to-translate-rawtherapee-and-rawpedia/2594 rawtherapee.desktop + From f237a9a0b647b31a03ee5efe5a3590106473c811 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Thu, 11 Apr 2019 12:00:26 +0200 Subject: [PATCH 07/59] Reduced repetition of "perform" in release notes --- RELEASE_NOTES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index aa67398a1..c585019d0 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -23,7 +23,7 @@ New features since 5.5: - HiDPI support, for a smooth and sharp user interface regardless of screen size. Scaling in RawTherapee depends on font size, DPI and display scaling. No scaling occurs when the font size is set to 9pt, DPI is set to 96 (or 72 for macOS) and scaling is set to 1 (100%). - Ability to move tools to a new Favorites tab, http://rawpedia.rawtherapee.com/Favorites_Tab - "Unclipped" processing profile, to make it easy to save an image while preserving data across the whole tonal range, http://rawpedia.rawtherapee.com/Unclipped -- User-adjustable tiles-per-thread settings in Preferences > Performance, for users who want to perform performance benchmarks to find optimal values for their system. The default value of 2 tiles-per-thread performs best overall. +- User-adjustable tiles-per-thread settings in Preferences > Performance, for users who want to find optimal values for their system. The default value of 2 tiles-per-thread performs best overall. - Hundreds of speed optimizations, bug fixes, and overall improvements. From d01d99481d1f630cbb91cfe50a607e03effa8e51 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Thu, 11 Apr 2019 22:23:07 +0200 Subject: [PATCH 08/59] Suppress baseDPI and baseHiDPI hardcoded values Should fix the issue reported here : https://discuss.pixls.us/t/test-rawtherapee-5-6-rc1/12073/13 --- rtgui/cursormanager.cc | 2 +- rtgui/editwindow.cc | 10 +++++----- rtgui/rtscalable.cc | 2 +- rtgui/rtscalable.h | 8 ++++---- rtgui/rtwindow.cc | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/rtgui/cursormanager.cc b/rtgui/cursormanager.cc index 9a28eb061..3181d288e 100644 --- a/rtgui/cursormanager.cc +++ b/rtgui/cursormanager.cc @@ -56,7 +56,7 @@ void CursorManager::init (Glib::RefPtr mainWindow) Glib::RefPtr rotate = RTImage::createPixbufFromFile("rotate-aroundnode-hicontrast.png"); Glib::RefPtr wait = RTImage::createPixbufFromFile("gears.png"); // Currently unused, create *-hicontrast once used. - double s = RTScalable::getTweakedDPI() / 96.; // RTScalable::getDPI() might be preferable, however it imply a lot of work to support this option + double s = RTScalable::getTweakedDPI() / RTScalable::baseDPI; // RTScalable::getDPI() might be preferable, however it imply a lot of work to support this option cAdd = add ? Gdk::Cursor::create(display, add, (int)(8.*s), (int)(8.*s)) : Gdk::Cursor::create(display, Gdk::PLUS); cAddPicker = colPickAdd ? Gdk::Cursor::create(display, colPickAdd, (int)(4.*s), (int)(21.*s)) : Gdk::Cursor::create(display, Gdk::PLUS); diff --git a/rtgui/editwindow.cc b/rtgui/editwindow.cc index 8ba829b26..ec7201f84 100644 --- a/rtgui/editwindow.cc +++ b/rtgui/editwindow.cc @@ -51,7 +51,7 @@ EditWindow* EditWindow::getInstance(RTWindow* p, bool restore) return &instance_.editWnd; } -EditWindow::EditWindow (RTWindow* p) : resolution(96.), parent(p) , isFullscreen(false), isClosed(true) +EditWindow::EditWindow (RTWindow* p) : resolution(RTScalable::baseDPI), parent(p) , isFullscreen(false), isClosed(true) { updateResolution(); @@ -128,7 +128,7 @@ bool EditWindow::updateResolution() double res = get_screen()->get_resolution(); if (scale == 2) { // from Windows' behavior : if scale==2, resolution = 192. (Gtk shows 96 dpi !?), there's no higher value - res = 192.; + res = RTScalable::baseHiDPI; } bool retVal = res != resolution; resolution = res; @@ -141,11 +141,11 @@ void EditWindow::setAppIcon() bool downsize = false; // findIconAbsolutePath won't be able to select the image based on resolution with the // storage of the images, we're doing the selection here - if (resolution == 96.) { + if (resolution == RTScalable::baseDPI) { fName = "rawtherapee-logo-24.png"; } else { fName = "rawtherapee-logo-48.png"; - if (resolution < 192.) { + if (resolution < RTScalable::baseHiDPI) { downsize = true; } } @@ -155,7 +155,7 @@ void EditWindow::setAppIcon() return; } if (downsize) { - int size = int((48. * resolution) / 192.); + int size = int((48. * resolution) / RTScalable::baseHiDPI); pixbuf->scale_simple(size, size, Gdk::InterpType::INTERP_BILINEAR); } diff --git a/rtgui/rtscalable.cc b/rtgui/rtscalable.cc index 7aa3c82c8..e497e3f08 100644 --- a/rtgui/rtscalable.cc +++ b/rtgui/rtscalable.cc @@ -225,7 +225,7 @@ Cairo::RefPtr RTScalable::loadImage(const Glib::ustring &fn RsvgDimensionData dim; rsvg_handle_get_dimensions(handle, &dim); - double r = dpi / 96.; + double r = dpi / baseDPI; Cairo::RefPtr surf = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, (int)(dim.width * r + 0.499), (int)(dim.height * r + 0.499)); Cairo::RefPtr c = Cairo::Context::create(surf); c->set_source_rgba (0., 0., 0., 0.); diff --git a/rtgui/rtscalable.h b/rtgui/rtscalable.h index c3ff19e60..a182dd2e0 100644 --- a/rtgui/rtscalable.h +++ b/rtgui/rtscalable.h @@ -40,11 +40,11 @@ protected: public: #ifdef __APPLE__ - static constexpr double baseDPI = 72; - static constexpr double baseHiDPI = 144; + static constexpr double baseDPI = 72.; + static constexpr double baseHiDPI = 144.; #else - static constexpr double baseDPI = 96; - static constexpr double baseHiDPI = 192; + static constexpr double baseDPI = 96.; + static constexpr double baseHiDPI = 192.; #endif static void init(Gtk::Window *window); diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 0d9017fbd..ce1d5151a 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -109,7 +109,7 @@ RTWindow::RTWindow () #if defined(__APPLE__) // This will force screen resolution regarding font, but I don't think it's compliant with Gtk guidelines... // Do not confuse with screen scaling, where everything is scaled up ! - screen->set_resolution (96.); + screen->set_resolution (RTScalable::baseDPI); #endif Glib::RefPtr regex = Glib::Regex::create (THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); @@ -184,15 +184,15 @@ RTWindow::RTWindow () int resolution = (int)style->get_screen()->get_resolution(); if (isPix) { // HOMBRE: guessing here... - // if resolution is lower than 192ppi, we're supposing that it's already expressed in a scale==1 scenario + // if resolution is lower than baseHiDPI, we're supposing that it's already expressed in a scale==1 scenario if (resolution >= int(RTScalable::baseHiDPI)) { // converting the resolution to a scale==1 scenario resolution /= 2; } // 1pt = 1/72in @ 96 ppi // HOMBRE: If the font unit is px, is it already scaled up to match the resolution ? - // px >inch >pt >"scaled pt" - pt = (int)(double(fontSize) / RTScalable::baseDPI * 72. * (RTScalable::baseHiDPI / resolution) + 0.49); + // px >inch >pt >"scaled pt" + pt = (int)(double(fontSize) / RTScalable::baseDPI * 72. * (RTScalable::baseDPI / resolution) + 0.49); } else { pt = fontSize / Pango::SCALE; } From 440dc86f34fea9cf997cdfdbc88fff4a6f97874c Mon Sep 17 00:00:00 2001 From: Desmis Date: Fri, 12 Apr 2019 09:55:27 +0200 Subject: [PATCH 09/59] Add Blur by level to CBDL --- rtdata/languages/default | 2 ++ rtengine/dirpyr_equalizer.cc | 60 ++++++++++-------------------------- rtengine/improcfun.h | 4 +-- rtengine/iplocallab.cc | 7 +++-- rtengine/procevents.h | 1 + rtengine/procparams.cc | 4 +++ rtengine/procparams.h | 1 + rtengine/refreshmap.cc | 3 +- rtgui/locallab.cc | 20 +++++++++++- rtgui/locallab.h | 1 + rtgui/paramsedited.cc | 7 +++++ rtgui/paramsedited.h | 1 + 12 files changed, 61 insertions(+), 50 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index e783c41b7..560d36a52 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -908,6 +908,7 @@ HISTORY_MSG_660;Local - cbdl clarity HISTORY_MSG_661;Local - cbdl contrast residual HISTORY_MSG_662;Local - deNoise lum f 0 HISTORY_MSG_663;Local - deNoise lum f 2 +HISTORY_MSG_664;Local - cbdl Blur HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -1965,6 +1966,7 @@ TP_LOCALLAB_BLUFR;Blur & Noise TP_LOCALLAB_BLURDE;Blur Shape detection TP_LOCALLAB_BLNORM;Normal TP_LOCALLAB_BLINV;Inverse +TP_LOCALLAB_BLURCBDL;Blur TP_LOCALLAB_BLSYM;Symmetric TP_LOCALLAB_CENTER_X;Center X TP_LOCALLAB_CENTER_Y;Center Y diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index 9ca8f0f69..b7f188889 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -24,6 +24,7 @@ #include "array2D.h" #include "rt_math.h" #include "opthelper.h" +#include "boxblur.h" #define RANGEFN(i) ((1000.0f / (i + 1000.0f))) #define DIRWT(i1,j1,i,j) ( domker[(i1-i)/scale+halfwin][(j1-j)/scale+halfwin] * RANGEFN(fabsf((data_fine[i1][j1]-data_fine[i][j]))) ) @@ -252,11 +253,11 @@ void ImProcFunctions :: dirpyr_equalizer(float ** src, float ** dst, int srcwidt } -void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scaleprev) +void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, const float blurcb, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scaleprev, bool multiThread) { int lastlevel = maxlevelloc; - if (settings->verbose) { + if (settings->verbose) { printf("Dirpyr scaleprev=%i\n", scaleprev); } @@ -407,12 +408,12 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwid for (int level = lastlevel - 1; level > 0; level--) { - idirpyr_eq_channel_loc(dirpyrlo[level], dirpyrlo[level - 1], residbuff, srcwidth, srcheight, level, multi, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice); + idirpyr_eq_channel_loc(dirpyrlo[level], dirpyrlo[level - 1], residbuff, srcwidth, srcheight, level, multi, blurcb, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice, multiThread); } scale = scalesloc[0]; - idirpyr_eq_channel_loc(dirpyrlo[0], src, residbuff, srcwidth, srcheight, 0, multi, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice); + idirpyr_eq_channel_loc(dirpyrlo[0], src, residbuff, srcwidth, srcheight, 0, multi, blurcb, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice, multiThread); //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% array2D loct(srcwidth, srcheight); @@ -790,7 +791,7 @@ void ImProcFunctions::dirpyr_channel(float ** data_fine, float ** data_coarse, i } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[5], const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice) +void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[5], const float blurcb, const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, bool multiThread) { // const float skinprotneg = -skinprot; // const float factorHard = (1.f - skinprotneg / 100.f); @@ -834,7 +835,9 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data } - // if (skinprot == 0.f) + + AlignedBuffer blurbufcbdl(width * height); + float rad = 0.05f * blurcb * fabs((level + 1) * (multbis[level] - 1.f)); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif @@ -845,45 +848,14 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data buffer[i][j] = CLIPLL(buffer[i][j]); } } + if(blurcb > 0.f) { +#ifdef _OPENMP + #pragma omp parallel if (multiThread) +#endif + boxblur(buffer, buffer, blurbufcbdl.data, rad, rad, width, height); + } irangefn.clear(); - /* - else if(skinprot > 0.f) - #ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) - #endif - for(int i = 0; i < height; i++) { - for(int j = 0; j < width; j++) { - float scale = 1.f; - float hipass = (data_fine[i][j] - data_coarse[i][j]); - // These values are precalculated now - float modhue = hue[i][j]; - float modchro = chrom[i][j]; - Color::SkinSatCbdl ((data_fine[i][j]) / 327.68f, modhue, modchro, skinprot, scale, true, b_l, t_l, t_r); - buffer[i][j] += (1.f + (irangefn[hipass + 0x10000]) * scale) * hipass ; - } - } - else - #ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) - #endif - for(int i = 0; i < height; i++) { - for(int j = 0; j < width; j++) { - float scale = 1.f; - float hipass = (data_fine[i][j] - data_coarse[i][j]); - // These values are precalculated now - float modhue = hue[i][j]; - float modchro = chrom[i][j]; - Color::SkinSatCbdl ((data_fine[i][j]) / 327.68f, modhue, modchro, skinprotneg, scale, false, b_l, t_l, t_r); - float correct = irangefn[hipass + 0x10000]; - - if (scale == 1.f) {//image hard - buffer[i][j] += (1.f + (correct) * (factorHard)) * hipass ; - } else { //image soft with scale < 1 ==> skin - buffer[i][j] += (1.f + (correct)) * hipass ; - } - } - } - */ + blurbufcbdl.resize(0); } void ImProcFunctions::idirpyr_eq_channel(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[maxlevel], const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, float b_l, float t_l, float t_r) diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 542bedf6b..a3f972285 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -386,8 +386,8 @@ public: float MadRgb(float * DataList, const int datalen); // pyramid wavelet - void cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale); - void idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float multi[5], const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice); + void cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, const float blurcb, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale, bool multiThread); + void idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float multi[5], const float blucb, const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, bool multiThread); void dirpyr_equalizer(float ** src, float ** dst, int srcwidth, int srcheight, float ** l_a, float ** l_b, const double * mult, const double dirpyrThreshold, const double skinprot, float b_l, float t_l, float t_r, int scale); //Emil's directional pyramid wavelet void dirpyr_equalizercam(CieImage* ncie, float ** src, float ** dst, int srcwidth, int srcheight, float ** h_p, float ** C_p, const double * mult, const double dirpyrThreshold, const double skinprot, bool execdir, float b_l, float t_l, float t_r, int scale); //Emil's directional pyramid wavelet void dirpyr_channel(float ** data_fine, float ** data_coarse, int width, int height, int level, int scale); diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 163bb3a03..8888ab5ab 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -165,6 +165,7 @@ struct local_params { int chro, cont, sens, sensh, senscb, sensbn, senstm, sensex, sensexclu, sensden, senslc, senssf, senshs; float clarityml; float contresid; + float blurcbdl; float struco; float strengrid; float struexc; @@ -472,6 +473,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall int local_sensicb = locallab.spots.at(sp).sensicb; float local_clarityml = (float) locallab.spots.at(sp).clarityml; float local_contresid = (float) locallab.spots.at(sp).contresid; + int local_blurcbdl = (float) locallab.spots.at(sp).blurcbdl; int local_contrast = locallab.spots.at(sp).contrast; float local_lightness = (float) locallab.spots.at(sp).lightness; float labgridALowloc = locallab.spots.at(sp).labgridALow; @@ -582,6 +584,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.senscb = local_sensicb; lp.clarityml = local_clarityml; lp.contresid = local_contresid; + lp.blurcbdl = local_blurcbdl; lp.cont = local_contrast; lp.ligh = local_lightness; lp.lowA = labgridALowloc; @@ -5209,7 +5212,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o lp.mulloc[4]= 1.001f; } - ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, lp.mulloc, 1.f, lp.threshol, lp.clarityml, lp.contresid, skinprot, false, b_l, t_l, t_r, b_r, choice, sk); + ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, lp.mulloc, 1.f, lp.threshol, lp.clarityml, lp.contresid, lp.blurcbdl, skinprot, false, b_l, t_l, t_r, b_r, choice, sk, multiThread); float minL = loctemp->L[0][0] - origcbdl->L[0][0]; float maxL = minL; @@ -5270,7 +5273,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o multc[lv] = rtengine::max((lp.chromacb * ((float) lp.mulloc[lv] - 1.f) / 100.f) + 1.f, 0.f); } - ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, multc, rtengine::max(lp.chromacb, 1.f), lp.threshol, clarich, 0.f, skinprot, false, b_l, t_l, t_r, b_r, choice, sk); + ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, multc, rtengine::max(lp.chromacb, 1.f), lp.threshol, clarich, 0.f, lp.blurcbdl, skinprot, false, b_l, t_l, t_r, b_r, choice, sk, multiThread); float minC = loctemp->L[0][0] - sqrt(SQR(loctemp->a[0][0]) + SQR(loctemp->b[0][0])); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 93cb9b9f4..2c49578af 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -690,6 +690,7 @@ enum ProcEventCode { EvLocallabcontresid = 660, Evlocallabnoiselumf0 = 661, Evlocallabnoiselumf2 = 662, + EvLocallabblurcbdl = 663, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 405d970fe..5c682fd60 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2499,6 +2499,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : sensicb(15), clarityml(0), contresid(0), + blurcbdl(0), softradiuscb(0.0), // Denoise expdenoi(false), @@ -2693,6 +2694,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && sensicb == other.sensicb && clarityml == other.clarityml && contresid == other.contresid + && blurcbdl == other.blurcbdl && softradiuscb == other.softradiuscb // Denoise && expdenoi == other.expdenoi @@ -3829,6 +3831,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensicb, "Locallab", "Sensicb_" + std::to_string(i), spot.sensicb, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).clarityml, "Locallab", "Clarityml_" + std::to_string(i), spot.clarityml, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).contresid, "Locallab", "Contresid_" + std::to_string(i), spot.contresid, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blurcbdl, "Locallab", "Blurcbdl_" + std::to_string(i), spot.blurcbdl, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).softradiuscb, "Locallab", "Softradiuscb_" + std::to_string(i), spot.softradiuscb, keyFile); // Denoise saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expdenoi, "Locallab", "Expdenoi_" + std::to_string(i), spot.expdenoi, keyFile); @@ -5111,6 +5114,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Sensicb_" + std::to_string(i), pedited, spot.sensicb, spotEdited.sensicb); assignFromKeyfile(keyFile, "Locallab", "Clarityml_" + std::to_string(i), pedited, spot.clarityml, spotEdited.clarityml); assignFromKeyfile(keyFile, "Locallab", "Contresid_" + std::to_string(i), pedited, spot.contresid, spotEdited.contresid); + assignFromKeyfile(keyFile, "Locallab", "Blurcbdl_" + std::to_string(i), pedited, spot.blurcbdl, spotEdited.blurcbdl); assignFromKeyfile(keyFile, "Locallab", "Softradiuscb_" + std::to_string(i), pedited, spot.softradiuscb, spotEdited.softradiuscb); // Denoise assignFromKeyfile(keyFile, "Locallab", "Expdenoi_" + std::to_string(i), pedited, spot.expdenoi, spotEdited.expdenoi); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 7abefd222..6de7b04c9 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1100,6 +1100,7 @@ struct LocallabParams { int sensicb; int clarityml; int contresid; + int blurcbdl; double softradiuscb; // Denoise bool expdenoi; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index d0f143d49..7488ab587 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -689,7 +689,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvLocallabclarityml LUMINANCECURVE, // EvLocallabcontresid LUMINANCECURVE, //Evlocallabnoiselumf0 - LUMINANCECURVE //Evlocallabnoiselumf2 + LUMINANCECURVE, //Evlocallabnoiselumf2 + LUMINANCECURVE //Evlocallabblurcbdl }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 2802e9e2a..b29e3b5e3 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -164,6 +164,7 @@ Locallab::Locallab(): threshold(Gtk::manage(new Adjuster(M("TP_DIRPYREQUALIZER_THRESHOLD"), 0, 1., 0.01, 0.2))), clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0, 100, 1, 0))), contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))), + blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0, 100, 1, 0))), sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))), softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), // Denoise @@ -928,6 +929,7 @@ Locallab::Locallab(): softradiuscb->setAdjusterListener(this); clarityml->setAdjusterListener(this); contresid->setAdjusterListener(this); + blurcbdl->setAdjusterListener(this); ToolParamBlock* const cbdlBox = Gtk::manage(new ToolParamBlock()); Gtk::HBox* buttonBox = Gtk::manage(new Gtk::HBox(true, 10)); @@ -947,6 +949,7 @@ Locallab::Locallab(): cbdlBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); cbdlBox->pack_start(*chromacbdl); cbdlBox->pack_start(*threshold); + cbdlBox->pack_start(*blurcbdl); residFrame->set_label_align(0.025, 0.5); ToolParamBlock* const residBox = Gtk::manage(new ToolParamBlock()); residBox->pack_start(*clarityml); @@ -1869,6 +1872,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).sensicb = sensicb->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).clarityml = clarityml->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).contresid = contresid->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiuscb = softradiuscb->getValue(); // Denoise pp->locallab.spots.at(pp->locallab.selspot).expdenoi = expdenoi->getEnabled(); @@ -2053,6 +2057,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).sensicb = pe->locallab.spots.at(pp->locallab.selspot).sensicb || sensicb->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).clarityml = pe->locallab.spots.at(pp->locallab.selspot).clarityml || clarityml->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).contresid = pe->locallab.spots.at(pp->locallab.selspot).contresid || contresid->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).blurcbdl = pe->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).softradiuscb = pe->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState(); // Denoise pe->locallab.spots.at(pp->locallab.selspot).expdenoi = pe->locallab.spots.at(pp->locallab.selspot).expdenoi || !expdenoi->get_inconsistent(); @@ -2239,6 +2244,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).sensicb = pedited->locallab.spots.at(pp->locallab.selspot).sensicb || sensicb->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).clarityml = pedited->locallab.spots.at(pp->locallab.selspot).clarityml || clarityml->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).contresid = pedited->locallab.spots.at(pp->locallab.selspot).contresid || contresid->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl = pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb = pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState(); // Denoise pedited->locallab.spots.at(pp->locallab.selspot).expdenoi = pedited->locallab.spots.at(pp->locallab.selspot).expdenoi || !expdenoi->get_inconsistent(); @@ -3106,6 +3112,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe sensicb->setDefault((double)defSpot->sensicb); clarityml->setDefault((double)defSpot->clarityml); contresid->setDefault((double)defSpot->contresid); + blurcbdl->setDefault((double)defSpot->blurcbdl); softradiuscb->setDefault(defSpot->softradiuscb); // Denoise noiselumf->setDefault((double)defSpot->noiselumf); @@ -3219,6 +3226,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe sensicb->setDefaultEditedState(Irrelevant); clarityml->setDefaultEditedState(Irrelevant); contresid->setDefaultEditedState(Irrelevant); + blurcbdl->setDefaultEditedState(Irrelevant); softradiuscb->setDefaultEditedState(Irrelevant); // Denoise noiselumf->setDefaultEditedState(Irrelevant); @@ -3336,6 +3344,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe sensicb->setDefaultEditedState(defSpotState->sensicb ? Edited : UnEdited); clarityml->setDefaultEditedState(defSpotState->clarityml ? Edited : UnEdited); contresid->setDefaultEditedState(defSpotState->contresid ? Edited : UnEdited); + blurcbdl->setDefaultEditedState(defSpotState->blurcbdl ? Edited : UnEdited); softradiuscb->setDefaultEditedState(defSpotState->softradiuscb ? Edited : UnEdited); // Denoise noiselumf->setDefaultEditedState(defSpotState->noiselumf ? Edited : UnEdited); @@ -3925,13 +3934,19 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } if (a == contresid) { - //clarityml->setValue(0.); if (listener) { listener->panelChanged(EvLocallabcontresid, contresid->getTextValue()); } } + if (a == blurcbdl) { + + if (listener) { + listener->panelChanged(EvLocallabblurcbdl, blurcbdl->getTextValue()); + } + } + if (a == softradiuscb) { if (listener) { listener->panelChanged(Evlocallabsoftradiuscb, softradiuscb->getTextValue()); @@ -4138,6 +4153,7 @@ void Locallab::setBatchMode(bool batchMode) sensicb->showEditedCB(); clarityml->showEditedCB(); contresid->showEditedCB(); + blurcbdl->showEditedCB(); softradiuscb->showEditedCB(); // Denoise noiselumf->showEditedCB(); @@ -4579,6 +4595,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con sensicb->setValue(pp->locallab.spots.at(index).sensicb); clarityml->setValue(pp->locallab.spots.at(index).clarityml); contresid->setValue(pp->locallab.spots.at(index).contresid); + blurcbdl->setValue(pp->locallab.spots.at(index).blurcbdl); softradiuscb->setValue(pp->locallab.spots.at(index).softradiuscb); // Denoise @@ -4800,6 +4817,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con sensicb->setEditedState(spotState->sensicb ? Edited : UnEdited); clarityml->setEditedState(spotState->clarityml ? Edited : UnEdited); contresid->setEditedState(spotState->contresid ? Edited : UnEdited); + blurcbdl->setEditedState(spotState->blurcbdl ? Edited : UnEdited); softradiuscb->setEditedState(spotState->softradiuscb ? Edited : UnEdited); // Denoise diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 273b29075..8be29fbdf 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -184,6 +184,7 @@ private: Adjuster* const threshold; Adjuster* const clarityml; Adjuster* const contresid; + Adjuster* const blurcbdl; Adjuster* const sensicb; Adjuster* const softradiuscb; // Denoise diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 9e7e7aa03..d8cc20385 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1093,6 +1093,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).sensicb = locallab.spots.at(j).sensicb && pSpot.sensicb == otherSpot.sensicb; locallab.spots.at(j).clarityml = locallab.spots.at(j).clarityml && pSpot.clarityml == otherSpot.clarityml; locallab.spots.at(j).contresid = locallab.spots.at(j).contresid && pSpot.contresid == otherSpot.contresid; + locallab.spots.at(j).blurcbdl = locallab.spots.at(j).blurcbdl && pSpot.blurcbdl == otherSpot.blurcbdl; locallab.spots.at(j).softradiuscb = locallab.spots.at(j).softradiuscb && pSpot.softradiuscb == otherSpot.softradiuscb; // Denoise locallab.spots.at(j).expdenoi = locallab.spots.at(j).expdenoi && pSpot.expdenoi == otherSpot.expdenoi; @@ -3147,6 +3148,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).contresid = mods.locallab.spots.at(i).contresid; } + if (locallab.spots.at(i).blurcbdl) { + toEdit.locallab.spots.at(i).blurcbdl = mods.locallab.spots.at(i).blurcbdl; + } + if (locallab.spots.at(i).softradiuscb) { toEdit.locallab.spots.at(i).softradiuscb = mods.locallab.spots.at(i).softradiuscb; } @@ -4307,6 +4312,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : sensicb(v), clarityml(v), contresid(v), + blurcbdl(v), softradiuscb(v), // Denoise expdenoi(v), @@ -4493,6 +4499,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) sensicb = v; clarityml = v; contresid = v; + blurcbdl = v; softradiuscb = v; // Denoise expdenoi = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 8be8f0a94..316730398 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -516,6 +516,7 @@ public: bool sensicb; bool clarityml; bool contresid; + bool blurcbdl; bool softradiuscb; // Denoise bool expdenoi; From 53e50ba0992af8f94040e34e9527c7c3a24a7097 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Fri, 12 Apr 2019 14:04:05 +0200 Subject: [PATCH 10/59] Theme: Smaller buttons and spacing --- rtdata/themes/size.css | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/rtdata/themes/size.css b/rtdata/themes/size.css index 86d2eaea5..f333ceeb0 100644 --- a/rtdata/themes/size.css +++ b/rtdata/themes/size.css @@ -297,7 +297,7 @@ window.csd:not(.fullscreen) #MainNotebook > header.top { #MyExpander image { min-width: 1.333333333333333333em; min-height: 0; - margin: -0.083333333333333333em 0.19em; + margin: -0.083333333333333333em 0.125em; } #MyExpander .drawingarea:not(.slider) { @@ -456,7 +456,7 @@ button, #BeforeAfterContainer button { min-height: 1.666666666666666666em; min-width: 1.666666666666666666em;/*x*/ - margin: 0.19em; + margin: 0.125em; border-radius: 0.2em; border-width: 0.083333333333333333em; } @@ -482,7 +482,7 @@ combobox entry.combo + button.combo { } #WB-Size-Helper { min-width: 3.5em; - margin: 0.19em; + margin: 0.125em; } combobox arrow { @@ -570,7 +570,7 @@ colorchooser colorswatch#add-color-button:first-child { button.font label{ min-height: 0; min-width: 0; - margin: 0 0.19em; + margin: 0 0.125em; } /* Save, Cancel, OK ... buttons */ @@ -603,9 +603,9 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { #RightNotebook > stack > scrolledwindow:last-child button.image-button, /* Fast Export */ #MetaPanelNotebook scrolledwindow + grid > button, #MetaPanelNotebook scrolledwindow + grid + grid > button { - min-height: 2.5em; - min-width: 2.5em; - margin: 0 0.19em; + min-height: 2.333333333333333333em; + min-width: 2.333333333333333333em; + margin: 0 0.125em; } #ToolBarPanelFileBrowser > button:first-child, #EditorTopPanel > button:first-child, @@ -625,12 +625,12 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { #MyExpander button.independent.toggle:not(.image-button):not(.text-button):first-child:only-child, /* Graduated filter button */ #MetaPanelNotebook scrolledwindow + grid > button, #MetaPanelNotebook scrolledwindow + grid + grid > button { - margin: 0.19em; + margin: 0.125em; } #EditorTopPanel button.narrowbutton { min-width: 0.833333333333333333em; - padding: 0 0.166666666666666666em; + padding: 0 0.13em; } /* Image close button */ @@ -647,21 +647,21 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { /* Filter buttons*/ #ToolBarPanelFileBrowser .smallbuttonbox { - min-height: 1.333333333333333333em; + min-height: 0; padding: 0; margin: 0; } #ToolBarPanelFileBrowser .smallbuttonbox:nth-child(2) { - margin: 0.083333333333333333em 0 -0.166666666666666666em; + margin: 0 0 -0.166666666666666666em; } #ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton image { - margin: -0.19em; - min-width: 1.333333333333333333em; - min-height: 1.333333333333333333em; + margin: -0.166666666666666666em; + min-width: 0; + min-height: 0; } #ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton { min-height: 0; - min-width: 1.333333333333333333em; + min-width: 1.166666666666666666em; padding: 0; margin: 0 0.25em; border: none; @@ -686,7 +686,7 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { #MyExpander .image-combo button.Left { border-top-right-radius: 0; border-bottom-right-radius: 0; - min-width: 2.5em; + min-width: 2.333333333333333333em; margin-right: 0; } #MyExpander .image-combo button.Left { @@ -820,7 +820,7 @@ button.text-button { checkbutton, radiobutton { padding: 0.083333333333333333em 0; - margin: 0.19em; + margin: 0.125em; min-height: 1.666666666666666666em;/*x*/ } @@ -852,7 +852,7 @@ frame > checkbutton check{ #PartialPaste checkbutton { padding: 0; - margin: 0.19em 0 0 0.583333333333333333em; + margin: 0.125em 0 0 0.583333333333333333em; } #PartialPaste checkbutton:not(#PartialPasteHeader) { margin: 0 0 0 1.166666666666666666em; @@ -864,7 +864,7 @@ frame > checkbutton check{ #MyExpander entry, entry, spinbutton { - margin: 0.19em; + margin: 0.125em; padding: 0 0.333333333333333333em; min-height: 1.666666666666666666em;/*x*/ min-width: 0; @@ -894,7 +894,7 @@ spinbutton { } #MyExpander spinbutton { - margin: 0.19em; + margin: 0.125em; padding: 0; min-height: 1.333333333333333333em; min-width: 0; From 4db265b00fca6d6ecbcb7a02ae25cfe85722f866 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Fri, 12 Apr 2019 14:05:05 +0200 Subject: [PATCH 11/59] Theme: Smaller buttons and spacing --- rtdata/themes/RawTherapee-GTK3-20_.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index 32efbb41f..45dec6e39 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -1225,11 +1225,12 @@ dialog frame > label:not(.dummy) { border-top-width: 0.083333333333333333em; } #Navigator { - padding-top: 0.75em; + padding-top: 0.25em; padding-bottom: 0.25em; } #Navigator label { padding: 0; + margin: 0.083333333333333333em 0; } /*** PartialPaste ******************************************************************************/ From 573176b52fb1f41148eece7e9c61d6892d1e39b2 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Fri, 12 Apr 2019 14:06:12 +0200 Subject: [PATCH 12/59] Theme: Smaller buttons and spacing --- rtdata/themes/TooWaBlue-GTK3-20_.css | 52 +++++++++++++--------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index a3214b45c..e1938617f 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -2,7 +2,7 @@ This file is part of RawTherapee. Copyright (c) 2016-2019 TooWaBoo - Version 3.05 + Version 3.06 RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -163,7 +163,7 @@ undershoot { label { padding: 0.083333333333333333em 0; - margin: 0.19em; + margin: 0.125em; min-height: 1.333333333333333333em; } @@ -1341,7 +1341,7 @@ button, #BeforeAfterContainer button { min-height: 1.666666666666666666em; min-width: 1.666666666666666666em;/*x*/ - margin: 0.19em; + margin: 0.125em; border-radius: 0.2em; border: 0.083333333333333333em solid @bg-button-border; background-color: transparent; @@ -1414,7 +1414,7 @@ combobox entry.combo + button.combo { } #WB-Size-Helper { min-width: 3.5em; - margin: 0.19em; + margin: 0.125em; } combobox arrow { @@ -1536,9 +1536,9 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { #RightNotebook > stack > scrolledwindow:last-child button.image-button, /* Fast Export */ #MetaPanelNotebook scrolledwindow + grid > button, #MetaPanelNotebook scrolledwindow + grid + grid > button { - min-height: 2.5em; - min-width: 2.5em; - margin: 0 0.19em; + min-height: 2.333333333333333333em; + min-width: 2.333333333333333333em; + margin: 0 0.125em; } #ToolBarPanelFileBrowser > button:first-child, #EditorTopPanel > button:first-child, @@ -1558,39 +1558,35 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { #MyExpander button.independent.toggle:not(.image-button):not(.text-button):first-child:only-child, /* Graduated filter button */ #MetaPanelNotebook scrolledwindow + grid > button, #MetaPanelNotebook scrolledwindow + grid + grid > button { - margin: 0.19em; + margin: 0.125em; } #EditorTopPanel button.narrowbutton { - min-width: 0.833333333333333333em; - padding: 0 0.166666666666666666em; + min-width: 0; + padding: 0 0.13em; } /* Image close button */ #MainNotebook > header tab #CloseButton { - padding: 0; - margin: 0.333333333333333333em 0 0.416666666666666666em 0.19em; - min-width: 1.5em; + padding: 0.166666666666666666em; + margin: 0.333333333333333333em 0 0.5em 0.19em; + min-width: 0; min-height: 0; } -#MainNotebook > header tab #CloseButton image{ - min-width: 1.333333333333333333em; - min-height: 1.333333333333333333em; -} /* Filter buttons*/ #ToolBarPanelFileBrowser .smallbuttonbox { - min-height: 1.333333333333333333em; + min-height: 0; padding: 0; margin: 0; } #ToolBarPanelFileBrowser .smallbuttonbox:nth-child(2) { - margin: 0.083333333333333333em 0 -0.166666666666666666em; + margin-top: 0.12em; } #ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton image { - margin: -0.19em; - min-width: 1.333333333333333333em; - min-height: 1.333333333333333333em; + margin: -0.12em; + min-width: 0; + min-height: 0; } #ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton { min-height: 0; @@ -1806,7 +1802,7 @@ popover button.text-button:active { checkbutton, radiobutton { padding: 0.083333333333333333em 0; - margin: 0.19em; + margin: 0.125em; min-height: 1.666666666666666666em;/*x*/ } @@ -1847,10 +1843,10 @@ frame > checkbutton check{ #PartialPaste checkbutton { padding: 0; - margin: 0.19em 0 0 0.583333333333333333em; + margin: 0 0 0 0.583333333333333333em; } #PartialPaste checkbutton:not(#PartialPasteHeader) { - margin: 0 0 0 1.166666666666666666em; + margin: 0 0 0 1.125em; } /*** end ***************************************************************************************/ @@ -1859,7 +1855,7 @@ frame > checkbutton check{ #MyExpander entry, entry, spinbutton { - margin: 0.19em; + margin: 0.125em; padding: 0 0.333333333333333333em; min-height: 1.666666666666666666em;/*x*/ min-width: 0; @@ -1891,7 +1887,7 @@ spinbutton { } #MyExpander spinbutton { - margin: 0.19em; + margin: 0.125em; padding: 0; min-height: 1.333333333333333333em; min-width: 0; @@ -1996,7 +1992,7 @@ entry:focus > selection { /* Curves **************************************************************************************/ .curve-mainbox { - margin: 0.19em; + margin: 0.125em; border: 0.083333333333333333em solid @border-color; } .curve-mainbox .curve-curvebox { From e36adfbc096e8360e7fa3b60ad97e729e7bddada Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 12 Apr 2019 15:18:10 +0200 Subject: [PATCH 13/59] locallab: speedup for blur, also some cleanups --- rtengine/iplocallab.cc | 262 ++++++++++++----------------------------- 1 file changed, 77 insertions(+), 185 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 163bb3a03..3dac11cb7 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -1241,18 +1241,18 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in // BENCHFUN const float ach = (float)lp.trans / 100.f; + const float factnoise1 = 1.f + (lp.noisecf) / 500.f; + const float factnoise2 = 1.f + (lp.noisecc) / 500.f; + const float factnoise = factnoise1 * factnoise2; - float factnoise1 = 1.f + (lp.noisecf) / 500.f; - float factnoise2 = 1.f + (lp.noisecc) / 500.f; + const int GW = transformed->W; + const int GH = transformed->H; + const float refa = chromaref * cos(hueref); + const float refb = chromaref * sin(hueref); - int GW = transformed->W; - int GH = transformed->H; - float refa = chromaref * cos(hueref); - float refb = chromaref * sin(hueref); + std::unique_ptr origblur(new LabImage(GW, GH)); - LabImage *origblur = new LabImage(GW, GH); - - float radius = 3.f / sk; + const float radius = 3.f / sk; #ifdef _OPENMP #pragma omp parallel #endif @@ -1260,9 +1260,11 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in gaussianBlur(original->L, origblur->L, GW, GH, radius); gaussianBlur(original->a, origblur->a, GW, GH, radius); gaussianBlur(original->b, origblur->b, GW, GH, radius); - } + const int begx = int (lp.xc - lp.lxL); + const int begy = int (lp.yc - lp.lyT); + #ifdef _OPENMP #pragma omp parallel if (multiThread) #endif @@ -1283,19 +1285,11 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in const bool isZone0 = loy > lp.yc + lp.ly || loy < lp.yc - lp.lyT; // whole line is zone 0 => we can skip a lot of processing if (isZone0) { // outside selection and outside transition zone => no effect, keep original values - for (int x = 0; x < transformed->W; x++) { - transformed->L[y][x] = original->L[y][x]; - transformed->a[y][x] = original->a[y][x]; - transformed->b[y][x] = original->b[y][x]; - } - continue; } for (int x = 0, lox = cx + x; x < transformed->W; x++, lox++) { int zone = 0; - int begx = int (lp.xc - lp.lxL); - int begy = int (lp.yc - lp.lyT); float localFactor = 1.f; @@ -1305,11 +1299,7 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in calcTransitionrect(lox, loy, ach, lp, zone, localFactor); } - if (zone == 0) { // outside selection and outside transition zone => no effect, keep original values - transformed->L[y][x] = original->L[y][x]; - transformed->a[y][x] = original->a[y][x]; - transformed->b[y][x] = original->b[y][x]; continue; } @@ -1332,15 +1322,7 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in } switch (zone) { - case 0: { // outside selection and outside transition zone => no effect, keep original values - transformed->L[y][x] = original->L[y][x]; - transformed->a[y][x] = original->a[y][x]; - transformed->b[y][x] = original->b[y][x]; - break; - } - case 1: { // inside transition zone - float factorx = localFactor; float difL, difa, difb; if (call == 2 /*|| call == 1 || call == 3 */) { //simpleprocess @@ -1354,12 +1336,12 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in } - difL *= factorx * reducdEL; - difa *= factorx * reducdEa; - difb *= factorx * reducdEb; + difL *= localFactor * reducdEL; + difa *= localFactor * reducdEa; + difb *= localFactor * reducdEb; transformed->L[y][x] = CLIP(original->L[y][x] + difL); - transformed->a[y][x] = CLIPC((original->a[y][x] + difa) * factnoise1 * factnoise2); - transformed->b[y][x] = CLIPC((original->b[y][x] + difb) * factnoise1 * factnoise2) ; + transformed->a[y][x] = CLIPC((original->a[y][x] + difa) * factnoise); + transformed->b[y][x] = CLIPC((original->b[y][x] + difb) * factnoise) ; break; } @@ -1382,23 +1364,26 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in difb *= reducdEb; transformed->L[y][x] = CLIP(original->L[y][x] + difL); - transformed->a[y][x] = CLIPC((original->a[y][x] + difa) * factnoise1 * factnoise2); - transformed->b[y][x] = CLIPC((original->b[y][x] + difb) * factnoise1 * factnoise2); + transformed->a[y][x] = CLIPC((original->a[y][x] + difa) * factnoise); + transformed->b[y][x] = CLIPC((original->b[y][x] + difb) * factnoise); } } } } } - delete origblur; - } -void ImProcFunctions::BlurNoise_Local(LabImage * tmp1, const float hueref, const float chromaref, const float lumaref, const local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk) +void ImProcFunctions::BlurNoise_Local(LabImage *tmp1, const float hueref, const float chromaref, const float lumaref, const local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk) { //local BLUR BENCHFUN + const int ystart = std::max(static_cast(lp.yc - lp.lyT) - cy, 0); + const int yend = std::min(static_cast(lp.yc + lp.ly) - cy, original->H); + const int xstart = std::max(static_cast(lp.xc - lp.lxL) - cx, 0); + const int xend = std::min(static_cast(lp.xc + lp.lx) - cx, original->W); + const float ach = lp.trans / 100.f; const int GW = transformed->W; const int GH = transformed->H; @@ -1430,8 +1415,6 @@ void ImProcFunctions::BlurNoise_Local(LabImage * tmp1, const float hueref, const #endif { const int limscope = 80; - const int begy = int (lp.yc - lp.lyT); - const int begx = int (lp.xc - lp.lxL); const float mindE = 4.f + MINSCOPE * lp.sensbn * lp.thr;//best usage ?? with blurnoise const float maxdE = 5.f + MAXSCOPE * lp.sensbn * (1 + 0.1f * lp.thr); const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; @@ -1441,16 +1424,9 @@ void ImProcFunctions::BlurNoise_Local(LabImage * tmp1, const float hueref, const #pragma omp for schedule(dynamic,16) #endif - for (int y = 0; y < transformed->H; y++) { + for (int y = ystart; y < yend; y++) { const int loy = cy + y; - - const bool isZone0 = loy > lp.yc + lp.ly || loy < lp.yc - lp.lyT; // whole line is zone 0 => we can skip a lot of processing - - if (isZone0) { // outside selection and outside transition zone => no effect, keep original values - continue; - } - - for (int x = 0, lox = cx + x; x < transformed->W; x++, lox++) { + for (int x = xstart, lox = cx + x; x < xend; x++, lox++) { int zone = 0; float localFactor = 1.f; @@ -1460,7 +1436,6 @@ void ImProcFunctions::BlurNoise_Local(LabImage * tmp1, const float hueref, const calcTransitionrect(lox, loy, ach, lp, zone, localFactor); } - if (zone == 0) { // outside selection and outside transition zone => no effect, keep original values continue; } @@ -1470,55 +1445,20 @@ void ImProcFunctions::BlurNoise_Local(LabImage * tmp1, const float hueref, const float reducdE; calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, lp.sensbn , reducdE); - switch (zone) { + const float difL = (tmp1->L[y - ystart][x - xstart] - original->L[y][x]) * localFactor * reducdE; + transformed->L[y][x] = CLIP(original->L[y][x] + difL); - case 1: { // inside transition zone - float difL, difa, difb; - difL = tmp1->L[loy - begy][lox - begx] - original->L[y][x]; - difa = tmp1->a[loy - begy][lox - begx] - original->a[y][x]; - difb = tmp1->b[loy - begy][lox - begx] - original->b[y][x]; - difL *= localFactor * reducdE; - - transformed->L[y][x] = CLIP(original->L[y][x] + difL); - - if (!lp.actsp) { - difa *= localFactor * reducdE; - difb *= localFactor * reducdE; - - transformed->a[y][x] = CLIPC(original->a[y][x] + difa); - transformed->b[y][x] = CLIPC(original->b[y][x] + difb); - } - - break; - } - - case 2: { // inside selection => full effect, no transition - float difL, difa, difb; - - difL = tmp1->L[loy - begy][lox - begx] - original->L[y][x]; - difa = tmp1->a[loy - begy][lox - begx] - original->a[y][x]; - difb = tmp1->b[loy - begy][lox - begx] - original->b[y][x]; - - difL *= reducdE;//(100.f + realstrdE) / 100.f; - - transformed->L[y][x] = CLIP(original->L[y][x] + difL); - - if (!lp.actsp) { - difa *= reducdE; - difb *= reducdE; - - transformed->a[y][x] = CLIPC(original->a[y][x] + difa); ; - transformed->b[y][x] = CLIPC(original->b[y][x] + difb); - } - } + if (!lp.actsp) { + const float difa = (tmp1->a[y - ystart][x - xstart] - original->a[y][x]) * localFactor * reducdE;; + const float difb = (tmp1->b[y - ystart][x - xstart] - original->b[y][x]) * localFactor * reducdE;; + transformed->a[y][x] = CLIPC(original->a[y][x] + difa); + transformed->b[y][x] = CLIPC(original->b[y][x] + difb); } } } } } - - void ImProcFunctions::InverseReti_Local(const struct local_params & lp, const float hueref, const float chromaref, const float lumaref, LabImage * original, LabImage * transformed, const LabImage * const tmp1, int cx, int cy, int chro, int sk) { // BENCHFUN @@ -3910,40 +3850,29 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o //Blur and noise if (((radius >= 1.5 * GAUSS_SKIP && lp.rad > 1.) || lp.stren > 0.1) && lp.blurena) { // radius < GAUSS_SKIP means no gauss, just copy of original image + StopWatch Stop1("blur"); std::unique_ptr tmp1; - std::unique_ptr bufgb; - // LabImage *deltasobelL = nullptr; - int GW = transformed->W; - int GH = transformed->H; - int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone - int bfw = int (lp.lx + lp.lxL) + del; - if (call <= 3 && lp.blurmet != 1) { - bufgb.reset(new LabImage(bfw, bfh, true)); - - int begy = lp.yc - lp.lyT; - int begx = lp.xc - lp.lxL; - int yEn = lp.yc + lp.ly; - int xEn = lp.xc + lp.lx; + if (call <= 3 && lp.blurmet == 0) { + const int ystart = std::max(static_cast(lp.yc - lp.lyT) - cy, 0); + const int yend = std::min(static_cast(lp.yc + lp.ly) - cy, original->H); + const int xstart = std::max(static_cast(lp.xc - lp.lxL) - cx, 0); + const int xend = std::min(static_cast(lp.xc + lp.lx) - cx, original->W); + const int bfh = yend - ystart; + const int bfw = xend - xstart; + tmp1.reset(new LabImage(bfw, bfh)); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif - for (int y = 0; y < transformed->H ; y++) { - const int loy = cy + y; - if (loy >= begy && loy < yEn) { - for (int x = 0; x < transformed->W; x++) { - const int lox = cx + x; - if (lox >= begx && lox < xEn) { - bufgb->L[loy - begy][lox - begx] = original->L[y][x]; - bufgb->a[loy - begy][lox - begx] = original->a[y][x]; - bufgb->b[loy - begy][lox - begx] = original->b[y][x]; - } - } + for (int y = ystart; y < yend ; y++) { + for (int x = xstart; x < xend; x++) { + tmp1->L[y - ystart][x - xstart] = original->L[y][x]; + tmp1->a[y - ystart][x - xstart] = original->a[y][x]; + tmp1->b[y - ystart][x - xstart] = original->b[y][x]; } } - tmp1.reset(new LabImage(bfw, bfh)); #ifdef _OPENMP @@ -3951,13 +3880,15 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o #endif { - gaussianBlur(bufgb->L, tmp1->L, bfw, bfh, radius); - gaussianBlur(bufgb->a, tmp1->a, bfw, bfh, radius); - gaussianBlur(bufgb->b, tmp1->b, bfw, bfh, radius); + gaussianBlur(tmp1->L, tmp1->L, bfw, bfh, radius); + gaussianBlur(tmp1->a, tmp1->a, bfw, bfh, radius); + gaussianBlur(tmp1->b, tmp1->b, bfw, bfh, radius); } } else { + const int GW = transformed->W; + const int GH = transformed->H; tmp1.reset(new LabImage(transformed->W, transformed->H)); #ifdef _OPENMP @@ -3972,11 +3903,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } if (lp.stren > 0.1f) { - if (lp.blurmet <= 1) { - float mean = 0.f;//0 best result - float variance = lp.stren ; //(double) SQR(lp.stren)/sk; - addGaNoise(tmp1.get(), tmp1.get(), mean, variance, sk) ; - } + float mean = 0.f;//0 best result + float variance = lp.stren ; //(double) SQR(lp.stren)/sk; + addGaNoise(tmp1.get(), tmp1.get(), mean, variance, sk) ; } if (lp.blurmet == 0) { //blur and noise (center) @@ -3989,81 +3918,44 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o //local impulse if ((lp.bilat > 0.f) && lp.denoiena) { - int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone - int bfw = int (lp.lx + lp.lxL) + del; + const int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone + const int bfw = int (lp.lx + lp.lxL) + del; - LabImage *bufwv = nullptr; + std::unique_ptr bufwv; if (call == 2) {//simpleprocess - bufwv = new LabImage(bfw, bfh); //buffer for data in zone limit + bufwv.reset(new LabImage(bfw, bfh)); //buffer for data in zone limit - - int begy = lp.yc - lp.lyT; - int begx = lp.xc - lp.lxL; - int yEn = lp.yc + lp.ly; - int xEn = lp.xc + lp.lx; + const int begy = lp.yc - lp.lyT; + const int begx = lp.xc - lp.lxL; + const int yEn = lp.yc + lp.ly; + const int xEn = lp.xc + lp.lx; #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif - for (int y = 0; y < transformed->H ; y++) //{ - for (int x = 0; x < transformed->W; x++) { - int lox = cx + x; - int loy = cy + y; - - if (lox >= begx && lox < xEn && loy >= begy && loy < yEn) { - bufwv->L[loy - begy][lox - begx] = original->L[y][x]; - bufwv->a[loy - begy][lox - begx] = original->a[y][x]; - bufwv->b[loy - begy][lox - begx] = original->b[y][x]; - } - + for (int y = rtengine::max(0, begy - cy); y < rtengine::min(transformed->H, yEn - cy); y++) { + const int loy = cy + y; + for (int x = rtengine::max(0, begx - cx); x < rtengine::min(transformed->W, xEn - cx); x++) { + const int lox = cx + x; + bufwv->L[loy - begy][lox - begx] = original->L[y][x]; + bufwv->a[loy - begy][lox - begx] = original->a[y][x]; + bufwv->b[loy - begy][lox - begx] = original->b[y][x]; } + } } else {//dcrop.cc - - int GH = transformed->H; - int GW = transformed->W; - - bufwv = new LabImage(GW, GH); -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) -#endif - - for (int ir = 0; ir < GH; ir++) - for (int jr = 0; jr < GW; jr++) { - bufwv->L[ir][jr] = original->L[ir][jr]; - bufwv->a[ir][jr] = original->a[ir][jr]; - bufwv->b[ir][jr] = original->b[ir][jr]; - } - - + bufwv.reset(new LabImage(transformed->W, transformed->H)); + bufwv->CopyFrom(original); } //end dcrop - double thr = (float) lp.bilat / 20.0; + const double threshold = lp.bilat / 20.0; if (bfh > 8 && bfw > 8) { - ImProcFunctions::impulse_nr(bufwv, thr); + ImProcFunctions::impulse_nr(bufwv.get(), threshold); } - LabImage tmp1(bufwv->W, bufwv->H); - //copy bufwv to tmp1 to use same algo for Denoise_local and DeNoise_Local_imp - -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) -#endif - - for (int ir = 0; ir < bufwv->H; ir++) - for (int jr = 0; jr < bufwv->W; jr++) { - tmp1.L[ir][jr] = bufwv->L[ir][jr]; - tmp1.a[ir][jr] = bufwv->a[ir][jr]; - tmp1.b[ir][jr] = bufwv->b[ir][jr]; - } - - - - DeNoise_Local(call, lp, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, tmp1, cx, cy, sk); - - delete bufwv; + DeNoise_Local(call, lp, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, *(bufwv.get()), cx, cy, sk); } //local denoise From 74c713b39215927d4327794552eac55f301e0095 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 12 Apr 2019 15:20:34 +0200 Subject: [PATCH 14/59] removed stopwatch --- rtengine/iplocallab.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 3dac11cb7..838132d81 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -3850,7 +3850,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o //Blur and noise if (((radius >= 1.5 * GAUSS_SKIP && lp.rad > 1.) || lp.stren > 0.1) && lp.blurena) { // radius < GAUSS_SKIP means no gauss, just copy of original image - StopWatch Stop1("blur"); std::unique_ptr tmp1; if (call <= 3 && lp.blurmet == 0) { From 5338d68482167f027ab190e5cbbd2960a677b789 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Fri, 12 Apr 2019 19:40:29 +0200 Subject: [PATCH 15/59] Theme: Smaller buttons and spacing (label fix) --- rtdata/themes/TooWaBlue-GTK3-20_.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index e1938617f..f0852d310 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -163,7 +163,7 @@ undershoot { label { padding: 0.083333333333333333em 0; - margin: 0.125em; + margin: 0.125em 0.166666666666666666em; min-height: 1.333333333333333333em; } From 7493a4edae807f2631034c3ed3103868f87b64b3 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 12 Apr 2019 21:26:23 +0200 Subject: [PATCH 16/59] locallab: cleanup for retinex code --- rtengine/improcfun.h | 2 +- rtengine/iplocallab.cc | 235 ++++++++++------------------------------- 2 files changed, 54 insertions(+), 183 deletions(-) diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index a3f972285..ebdbc2bd4 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -312,7 +312,7 @@ public: static void strcurv_data(std::string retistr, int *s_datc, int &siz); void blendstruc(int bfw, int bfh, LabImage* bufcolorig, float radius, float stru, array2D & blend2, int sk, bool multiThread); - void transit_shapedetect_retinex(int senstype, LabImage * bufexporig, float **buflight, float **bufchro, float ** bufhh, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); + void transit_shapedetect_retinex(int senstype, LabImage * bufexporig, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); void transit_shapedetect(int senstype, const LabImage *bufexporig, LabImage * originalmask, float **buflight, float **bufchro, float **buf_a_cat, float ** buf_b_cat, float ** bufhh, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); void exlabLocal(const local_params& lp, int bfh, int bfw, LabImage* bufexporig, LabImage* lab, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve); void Exclude_Local(float **deltaso, float hueref, float chromaref, float lumaref, float sobelref, float meansobel, const struct local_params & lp, const LabImage * original, LabImage * transformed, const LabImage * rsv, const LabImage * reserv, int cx, int cy, int sk); diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index a9e8f95f3..07492ceb7 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2205,40 +2205,27 @@ void ImProcFunctions::Exclude_Local(float **deltaso, float hueref, float chromar } } -void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufexporig, float **buflight, float **bufchro, float ** bufhh, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk) +void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufexporig, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk) { BENCHFUN { const float ach = (float)lp.trans / 100.f; - float varsens = lp.sensh; - - //sobel - sobelref /= 100.; - meansobel /= 100.f; - - if (sobelref > 60.) - { - sobelref = 60.; - } - - sobelref = log1p(sobelref); + const float varsens = lp.sensh; int GW = transformed->W; int GH = transformed->H; - float refa = chromaref * cos(hueref); - float refb = chromaref * sin(hueref); - - - LabImage *origblur = new LabImage(GW, GH); - - float radius = 3.f / sk; + const float refa = chromaref * cos(hueref); + const float refb = chromaref * sin(hueref); //balance deltaE float kL = lp.balance; float kab = 1.f; balancedeltaE(kL, kab); + std::unique_ptr origblur(new LabImage(GW, GH)); + const float radius = 3.f / sk; + #ifdef _OPENMP #pragma omp parallel #endif @@ -2259,11 +2246,6 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex const float maxdE = 5.f + MAXSCOPE * varsens * (1 + 0.1f * lp.thr); const float mindElim = 2.f + MINSCOPE * limscope * lp.thr; const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr); - - -#ifdef __SSE2__ - float atan2Buffer[transformed->W] ALIGNED16; -#endif #ifdef _OPENMP #pragma omp for schedule(dynamic,16) @@ -2278,24 +2260,6 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex continue; } -#ifdef __SSE2__ - - if (HHutili) { - int i = 0; - - for (; i < transformed->W - 3; i += 4) { - vfloat av = LVFU(origblur->a[y][i]); - vfloat bv = LVFU(origblur->b[y][i]); - STVF(atan2Buffer[i], xatan2f(bv, av)); - } - - for (; i < transformed->W; i++) { - atan2Buffer[i] = xatan2f(origblur->b[y][i], origblur->a[y][i]); - } - } - -#endif - for (int x = 0; x < transformed->W; x++) { const int lox = cx + x; const int begx = int (lp.xc - lp.lxL); @@ -2315,136 +2279,47 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex continue; } - float rhue = 0; - - if (HHutili) { -#ifdef __SSE2__ - rhue = atan2Buffer[x]; -#else - rhue = xatan2f(origblur->b[y][x], origblur->a[y][x]); -#endif - } - float rL = origblur->L[y][x] / 327.68f; - float rsob = 0.f; + const float dE = sqrt(kab * SQR(refa - origblur->a[y][x] / 327.68f) + kab * SQR(refb - origblur->b[y][x] / 327.68f) + kL * SQR(lumaref - rL)); - float dE = rsob + sqrt(kab * SQR(refa - origblur->a[y][x] / 327.68f) + kab * SQR(refb - origblur->b[y][x] / 327.68f) + kL * SQR(lumaref - rL)); - - float cli = 0.f; - float clc = 0.f; - float hhro = 0.f; - - if (HHutili) { - hhro = bufhh[loy - begy][lox - begx]; - } - - cli = buflight[loy - begy][lox - begx]; - clc = bufchro[loy - begy][lox - begx]; + float cli = buflight[loy - begy][lox - begx]; + float clc = bufchro[loy - begy][lox - begx]; float reducdE; calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, varsens , reducdE); - float realstrdE = reducdE * cli; - float realstrchdE = reducdE * clc; - float realhhdE = reducdE * hhro; - - - float tempa = 0.f; - float tempb = 0.f; + reducdE /= 100.f; + cli *= reducdE; + clc *= reducdE; if (rL > 0.1f) { //to avoid crash with very low gamut in rare cases ex : L=0.01 a=0.5 b=-0.9 - - - - switch (zone) { - case 1: { // inside transition zone - float factorx = localFactor; - float newhr = 0.f; - - if (senstype == 4) {//all except color and light (TODO) and exposure - float lightc = bufexporig->L[loy - begy][lox - begx]; - float fli = ((100.f + realstrdE) / 100.f); - float diflc = lightc * fli - original->L[y][x]; - diflc *= factorx; - transformed->L[y][x] = CLIP(original->L[y][x] + diflc); - } - - if (HHutili && hhro != 0.f) { - float addh = 0.01f * realhhdE * factorx; - newhr = rhue + addh; - - if (newhr > rtengine::RT_PI) { - newhr -= 2 * rtengine::RT_PI; - } else if (newhr < -rtengine::RT_PI) { - newhr += 2 * rtengine::RT_PI; - } - } - - float flia = 1.f; - float flib = 1.f; - float chra = bufexporig->a[loy - begy][lox - begx]; - float chrb = bufexporig->b[loy - begy][lox - begx]; - - if (senstype == 4) { - flia = flib = ((100.f + realstrchdE) / 100.f); - } - - float difa = chra * flia - original->a[y][x]; - float difb = chrb * flib - original->b[y][x]; - difa *= factorx; - difb *= factorx; - - transformed->a[y][x] = tempa = CLIPC(original->a[y][x] + difa); - transformed->b[y][x] = tempb = CLIPC(original->b[y][x] + difb); - - break; - - } - - case 2: { // inside selection => full effect, no transition - float newhr = 0.f; - - if (senstype == 4) { //retinex & cbdl - float lightc = bufexporig->L[loy - begy][lox - begx]; - float fli = ((100.f + realstrdE) / 100.f); - float diflc = lightc * fli - original->L[y][x]; - transformed->L[y][x] = CLIP(original->L[y][x] + diflc); - } - - if (HHutili && hhro != 0.f) { - float addh = 0.01f * realhhdE; - newhr = rhue + addh; - - if (newhr > rtengine::RT_PI) { - newhr -= 2 * rtengine::RT_PI; - } else if (newhr < -rtengine::RT_PI) { - newhr += 2 * rtengine::RT_PI; - } - } - - float flia = 1.f; - float flib = 1.f; - float chra = bufexporig->a[loy - begy][lox - begx]; - float chrb = bufexporig->b[loy - begy][lox - begx]; - - if (senstype == 4) { - flia = flib = (100.f + realstrchdE) / 100.f; - } - - float difa = chra * flia - original->a[y][x]; - float difb = chrb * flib - original->b[y][x]; - - transformed->a[y][x] = tempa = CLIPC(original->a[y][x] + difa); - transformed->b[y][x] = tempb = CLIPC(original->b[y][x] + difb); - } + if (senstype == 4) {//all except color and light (TODO) and exposure + float lightc = bufexporig->L[loy - begy][lox - begx]; + float fli = 1.f + cli; + float diflc = lightc * fli - original->L[y][x]; + diflc *= localFactor; + transformed->L[y][x] = CLIP(original->L[y][x] + diflc); } + + float fliab = 1.f; + const float chra = bufexporig->a[loy - begy][lox - begx]; + const float chrb = bufexporig->b[loy - begy][lox - begx]; + + if (senstype == 4) { + fliab = 1.f + clc; + } + + const float difa = (chra * fliab - original->a[y][x]) * localFactor; + const float difb = (chrb * fliab - original->b[y][x]) * localFactor; + + transformed->a[y][x] = CLIPC(original->a[y][x] + difa); + transformed->b[y][x] = CLIPC(original->b[y][x] + difb); } } } } - delete origblur; } } @@ -5730,7 +5605,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o softprocess(bufreti, buflight, lp.softradiusret, Hd, Wd, sk, multiThread); } - transit_shapedetect_retinex(4, bufreti, buflight, bufchro, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, lp, original, transformed, cx, cy, sk); + transit_shapedetect_retinex(4, bufreti, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); } else { InverseReti_Local(lp, hueref, chromaref, lumaref, original, transformed, tmpl, cx, cy, 0, sk); } @@ -5767,14 +5642,13 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o if (!lp.invret && call <= 3) { - float Chprov; #ifdef _OPENMP #pragma omp parallel for #endif for (int ir = 0; ir < Hd; ir += 1) for (int jr = 0; jr < Wd; jr += 1) { - Chprov = orig1[ir][jr]; + const float Chprov = orig1[ir][jr]; float2 sincosval; sincosval.y = Chprov == 0.0f ? 1.f : bufreti->a[ir][jr] / Chprov; sincosval.x = Chprov == 0.0f ? 0.f : bufreti->b[ir][jr] / Chprov; @@ -5782,31 +5656,28 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o tmpl->b[ir][jr] = orig[ir][jr] * sincosval.x; } - if (!lp.invret) { - float minC = sqrt(SQR(tmpl->a[0][0]) + SQR(tmpl->b[0][0])) - Chprov; - float maxC = minC; + float minC = sqrt(SQR(tmpl->a[0][0]) + SQR(tmpl->b[0][0])); + float maxC = minC; #ifdef _OPENMP - #pragma omp parallel for reduction(min:minC) reduction(max:maxC) schedule(dynamic,16) + #pragma omp parallel for reduction(min:minC) reduction(max:maxC) schedule(dynamic,16) #endif - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - bufchro[ir][jr] = sqrt(SQR(tmpl->a[ir][jr]) + SQR(tmpl->b[ir][jr])) - Chprov; - minC = rtengine::min(minC, bufchro[ir][jr]); - maxC = rtengine::max(maxC, bufchro[ir][jr]); - } - } - - float coefC = 0.01f * (max(fabs(minC), fabs(maxC))); - // printf("minC=%f maxC=%f coefC=%f\n", minC, maxC, coefC); - - for (int ir = 0; ir < Hd; ir++) { - for (int jr = 0; jr < Wd; jr++) { - bufchro[ir][jr] /= coefC; - } + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + bufchro[ir][jr] = sqrt(SQR(tmpl->a[ir][jr]) + SQR(tmpl->b[ir][jr])); + minC = rtengine::min(minC, bufchro[ir][jr]); + maxC = rtengine::max(maxC, bufchro[ir][jr]); } } - } else { + + const float coefC = 0.01f * (max(fabs(minC), fabs(maxC))); + + for (int ir = 0; ir < Hd; ir++) { + for (int jr = 0; jr < Wd; jr++) { + bufchro[ir][jr] /= coefC; + } + } + } else { #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) @@ -5826,7 +5697,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o if (!lp.invret) { - transit_shapedetect_retinex(5, tmpl, buflight, bufchro, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, lp, original, transformed, cx, cy, sk); + transit_shapedetect_retinex(5, tmpl, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); } else { InverseReti_Local(lp, hueref, chromaref, lumaref, original, transformed, tmpl, cx, cy, 1, sk); From 11d93cd24bf4364615d726df6759504f294fe5cf Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Sat, 13 Apr 2019 20:40:53 +0200 Subject: [PATCH 17/59] Curve fix in TWB-theme --- rtdata/themes/TooWaBlue-GTK3-20_.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index f0852d310..4b26ce11c 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -1992,7 +1992,7 @@ entry:focus > selection { /* Curves **************************************************************************************/ .curve-mainbox { - margin: 0.125em; + margin: 0.19em; border: 0.083333333333333333em solid @border-color; } .curve-mainbox .curve-curvebox { From 3398f7ae20394d349a39a4f92a218097a2dd130b Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 14 Apr 2019 08:11:23 +0200 Subject: [PATCH 18/59] de-fixed bug in CBDL - improve dE - save work --- rtengine/dirpyr_equalizer.cc | 13 +++-- rtengine/procevents.h | 6 +- rtengine/procparams.cc | 20 +++++++ rtengine/procparams.h | 5 ++ rtengine/refreshmap.cc | 9 ++- rtgui/controlspotpanel.cc | 30 +++++----- rtgui/locallab.cc | 103 ++++++++++++++++++++++++++++++++++- rtgui/locallab.h | 6 ++ rtgui/options.cc | 2 +- rtgui/paramsedited.cc | 35 ++++++++++++ rtgui/paramsedited.h | 6 ++ 11 files changed, 214 insertions(+), 21 deletions(-) diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index b7f188889..85b9c2bd6 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -28,7 +28,8 @@ #define RANGEFN(i) ((1000.0f / (i + 1000.0f))) #define DIRWT(i1,j1,i,j) ( domker[(i1-i)/scale+halfwin][(j1-j)/scale+halfwin] * RANGEFN(fabsf((data_fine[i1][j1]-data_fine[i][j]))) ) -#define CLIPLL(x) LIM(x,0.f,32768.f) // limit L to about L=120 probably engh ? +#define CLIPLL(x) LIM(x,0.f,32768.f) +#define CLIPLLN(x) LIM(-32768.f,0.f,32768.f) namespace rtengine { @@ -424,6 +425,9 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwid } float clar = 0.01f * mergeL; + if(clar == 0.f) { + clar = 0.001f; + } #pragma omp parallel for for (int i = 0; i < srcheight; i++) @@ -814,7 +818,7 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data // if(level == 5 && mult[level] > 1.f) { // multbis[level] = 1.f + 0.45f * (mult[level] - 1.f); // } - double sensicrash = settings->cbdlsensi; + double sensicrash = 1.;//settings->cbdlsensi; LUTf irangefn(0x20000); { const float noisehi = 1.33f * noise * sensicrash * dirpyrThreshold / expf(level * log(3.0)), noiselo = 0.66f * noise * sensicrash * dirpyrThreshold / expf(level * log(3.0)); @@ -843,9 +847,10 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data #endif for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { + float hipass = (data_fine[i][j] - data_coarse[i][j]); - buffer[i][j] += CLIPLL(irangefn[hipass + 0x10000] * hipass); - buffer[i][j] = CLIPLL(buffer[i][j]); + buffer[i][j] += irangefn[hipass + 0x10000] * hipass; + } } if(blurcb > 0.f) { diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 2c49578af..f1bc421fe 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -691,7 +691,11 @@ enum ProcEventCode { Evlocallabnoiselumf0 = 661, Evlocallabnoiselumf2 = 662, EvLocallabblurcbdl = 663, - + Evlocallabblendmaskcb = 664, + Evlocallabradmaskcb = 665, + Evlocallabchromaskcb = 666, + Evlocallabgammaskcb = 667, + Evlocallabslomaskcb = 668, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 5c682fd60..3feb52a5e 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2501,6 +2501,11 @@ LocallabParams::LocallabSpot::LocallabSpot() : contresid(0), blurcbdl(0), softradiuscb(0.0), + blendmaskcb(0), + radmaskcb(10.0), + chromaskcb(0.0), + gammaskcb(1.0), + slomaskcb(0.0), // Denoise expdenoi(false), noiselumf(0), @@ -2696,6 +2701,11 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && contresid == other.contresid && blurcbdl == other.blurcbdl && softradiuscb == other.softradiuscb + && blendmaskcb == other.blendmaskcb + && radmaskcb == other.radmaskcb + && chromaskcb == other.chromaskcb + && gammaskcb == other.gammaskcb + && slomaskcb == other.slomaskcb // Denoise && expdenoi == other.expdenoi && noiselumf == other.noiselumf @@ -3833,6 +3843,11 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).contresid, "Locallab", "Contresid_" + std::to_string(i), spot.contresid, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blurcbdl, "Locallab", "Blurcbdl_" + std::to_string(i), spot.blurcbdl, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).softradiuscb, "Locallab", "Softradiuscb_" + std::to_string(i), spot.softradiuscb, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blendmaskcb, "Locallab", "Blendmaskcb_" + std::to_string(i), spot.blendmaskcb, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).radmaskcb, "Locallab", "Radmaskcb_" + std::to_string(i), spot.radmaskcb, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskcb, "Locallab", "Chromaskcb_" + std::to_string(i), spot.chromaskcb, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskcb, "Locallab", "Gammaskcb_" + std::to_string(i), spot.gammaskcb, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskcb, "Locallab", "Slomaskcb_" + std::to_string(i), spot.slomaskcb, keyFile); // Denoise saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expdenoi, "Locallab", "Expdenoi_" + std::to_string(i), spot.expdenoi, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).noiselumf, "Locallab", "noiselumf_" + std::to_string(i), spot.noiselumf, keyFile); @@ -5116,6 +5131,11 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Contresid_" + std::to_string(i), pedited, spot.contresid, spotEdited.contresid); assignFromKeyfile(keyFile, "Locallab", "Blurcbdl_" + std::to_string(i), pedited, spot.blurcbdl, spotEdited.blurcbdl); assignFromKeyfile(keyFile, "Locallab", "Softradiuscb_" + std::to_string(i), pedited, spot.softradiuscb, spotEdited.softradiuscb); + assignFromKeyfile(keyFile, "Locallab", "Blendmaskcb_" + std::to_string(i), pedited, spot.blendmaskcb, spotEdited.blendmaskcb); + assignFromKeyfile(keyFile, "Locallab", "Radmaskcb_" + std::to_string(i), pedited, spot.radmaskcb, spotEdited.radmaskcb); + assignFromKeyfile(keyFile, "Locallab", "Chromaskcb_" + std::to_string(i), pedited, spot.chromaskcb, spotEdited.chromaskcb); + assignFromKeyfile(keyFile, "Locallab", "Gammaskcb_" + std::to_string(i), pedited, spot.gammaskcb, spotEdited.gammaskcb); + assignFromKeyfile(keyFile, "Locallab", "Slomaskcb_" + std::to_string(i), pedited, spot.slomaskcb, spotEdited.slomaskcb); // Denoise assignFromKeyfile(keyFile, "Locallab", "Expdenoi_" + std::to_string(i), pedited, spot.expdenoi, spotEdited.expdenoi); assignFromKeyfile(keyFile, "Locallab", "noiselumf_" + std::to_string(i), pedited, spot.noiselumf, spotEdited.noiselumf); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 6de7b04c9..d1d0b6074 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1102,6 +1102,11 @@ struct LocallabParams { int contresid; int blurcbdl; double softradiuscb; + int blendmaskcb; + double radmaskcb; + double chromaskcb; + double gammaskcb; + double slomaskcb; // Denoise bool expdenoi; int noiselumf; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 7488ab587..9f09b5382 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -690,7 +690,14 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvLocallabcontresid LUMINANCECURVE, //Evlocallabnoiselumf0 LUMINANCECURVE, //Evlocallabnoiselumf2 - LUMINANCECURVE //Evlocallabblurcbdl + LUMINANCECURVE, //Evlocallabblurcbdl + LUMINANCECURVE, //Evlocallabblendmaskcb + LUMINANCECURVE, // Evlocallabradmaskcb + LUMINANCECURVE, //Evlocallabchromaskcb + LUMINANCECURVE, //Evlocallabgammaskcb + LUMINANCECURVE //Evlocallabslomaskcb + + }; diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index 0fecf9b54..a69db5375 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -23,8 +23,10 @@ #include "multilangmgr.h" #include #include "editwidgets.h" +#include "options.h" using namespace rtengine; +extern Options options; //----------------------------------------------------------------------------- // ControlSpotPanel @@ -58,10 +60,10 @@ ControlSpotPanel::ControlSpotPanel(): centerY_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CENTER_Y"), -1000, 1000, 1, 0))), circrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CIRCRADIUS"), 2, 150, 1, 18))), transit_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITVALUE"), 5, 95, 1, 60))), - thresh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESDELTAE"), 0.0, 8.0, 0.1, 2.0))), - iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 0.2, 4.0, 0.1, 2.0))), - balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.3, 1.7, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), - transitweak_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITWEAK"), 0.5, 4.0, 0.1, 1.0))), + thresh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESDELTAE"), 0.0, 10.0, 0.1, 2.0))), + iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 0.2, 10.0, 0.1, 2.0))), + balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), + transitweak_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITWEAK"), 0.5, 8.0, 0.1, 1.0))), avoid_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AVOID")))), @@ -74,6 +76,8 @@ ControlSpotPanel::ControlSpotPanel(): eventType(0), excluFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_EXCLUF")))) { + bool showtooltip = options.showtooltip; + Gtk::HBox* const hbox1_ = Gtk::manage(new Gtk::HBox(true, 4)); hbox1_->pack_start(button_add_); hbox1_->pack_start(button_delete_); @@ -157,7 +161,7 @@ ControlSpotPanel::ControlSpotPanel(): Gtk::HBox* const ctboxspotmethod = Gtk::manage(new Gtk::HBox()); Gtk::Label* const labelspotmethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_EXCLUTYPE") + ":")); ctboxspotmethod->pack_start(*labelspotmethod, Gtk::PACK_SHRINK, 4); - ctboxspotmethod->set_tooltip_markup(M("TP_LOCALLAB_EXCLUTYPE_TOOLTIP")); + if(showtooltip) ctboxspotmethod->set_tooltip_markup(M("TP_LOCALLAB_EXCLUTYPE_TOOLTIP")); spotMethod_->append(M("TP_LOCALLAB_EXNORM")); spotMethod_->append(M("TP_LOCALLAB_EXECLU")); spotMethod_->set_active(0); @@ -168,9 +172,9 @@ ControlSpotPanel::ControlSpotPanel(): pack_start(*ctboxspotmethod); excluFrame->set_label_align(0.025, 0.5); - excluFrame->set_tooltip_text(M("TP_LOCALLAB_EXCLUF_TOOLTIP")); + if(showtooltip) excluFrame->set_tooltip_text(M("TP_LOCALLAB_EXCLUF_TOOLTIP")); ToolParamBlock* const excluBox = Gtk::manage(new ToolParamBlock()); - sensiexclu_->set_tooltip_text(M("TP_LOCALLAB_SENSIEXCLU_TOOLTIP")); + if(showtooltip) sensiexclu_->set_tooltip_text(M("TP_LOCALLAB_SENSIEXCLU_TOOLTIP")); sensiexclu_->setAdjusterListener(this); structexclu_->setAdjusterListener(this); excluBox->pack_start(*sensiexclu_); @@ -181,7 +185,7 @@ ControlSpotPanel::ControlSpotPanel(): Gtk::HBox* const ctboxshapemethod = Gtk::manage(new Gtk::HBox()); Gtk::Label* const labelshapemethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_STYPE") + ":")); ctboxshapemethod->pack_start(*labelshapemethod, Gtk::PACK_SHRINK, 4); - ctboxshapemethod->set_tooltip_markup(M("TP_LOCALLAB_STYPE_TOOLTIP")); + if(showtooltip) ctboxshapemethod->set_tooltip_markup(M("TP_LOCALLAB_STYPE_TOOLTIP")); shapeMethod_->append(M("TP_LOCALLAB_IND")); shapeMethod_->append(M("TP_LOCALLAB_SYM")); shapeMethod_->append(M("TP_LOCALLAB_INDSL")); @@ -217,7 +221,7 @@ ControlSpotPanel::ControlSpotPanel(): Gtk::HBox* const ctboxqualitymethod = Gtk::manage(new Gtk::HBox()); Gtk::Label* const labelqualitymethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_QUAL_METHOD") + ":")); ctboxqualitymethod->pack_start(*labelqualitymethod, Gtk::PACK_SHRINK, 4); - ctboxqualitymethod->set_tooltip_markup(M("TP_LOCALLAB_METHOD_TOOLTIP")); + if(showtooltip) ctboxqualitymethod->set_tooltip_markup(M("TP_LOCALLAB_METHOD_TOOLTIP")); // qualityMethod_->append(M("TP_LOCALLAB_STD")); qualityMethod_->append(M("TP_LOCALLAB_ENH")); qualityMethod_->append(M("TP_LOCALLAB_ENHDEN")); @@ -230,10 +234,10 @@ ControlSpotPanel::ControlSpotPanel(): Gtk::Frame* const transitFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TRANSIT"))); transitFrame->set_label_align(0.025, 0.5); - transitFrame->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP")); + if(showtooltip) transitFrame->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP")); ToolParamBlock* const transitBox = Gtk::manage(new ToolParamBlock()); - transit_->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP")); - transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP")); + if(showtooltip) transit_->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP")); + if(showtooltip) transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP")); transit_->setAdjusterListener(this); transitweak_->setAdjusterListener(this); @@ -245,7 +249,7 @@ ControlSpotPanel::ControlSpotPanel(): Gtk::Frame* const artifFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_ARTIF"))); artifFrame->set_label_align(0.025, 0.5); - artifFrame->set_tooltip_text(M("TP_LOCALLAB_ARTIF_TOOLTIP")); + if(showtooltip) artifFrame->set_tooltip_text(M("TP_LOCALLAB_ARTIF_TOOLTIP")); ToolParamBlock* const artifBox = Gtk::manage(new ToolParamBlock()); thresh_->setAdjusterListener(this); struc_->setAdjusterListener(this); diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index b29e3b5e3..521bd4557 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -167,6 +167,11 @@ Locallab::Locallab(): blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0, 100, 1, 0))), sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))), softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), + blendmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), + radmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 10.))), + chromaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), + gammaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), + slomaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), // Denoise noiselumf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINE"), MINCHRO, MAXCHRO, 1, 0))), noiselumf0(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINEZERO"), MINCHRO, MAXCHRO, 1, 0))), @@ -930,6 +935,11 @@ Locallab::Locallab(): clarityml->setAdjusterListener(this); contresid->setAdjusterListener(this); blurcbdl->setAdjusterListener(this); + blendmaskcb->setAdjusterListener(this); + radmaskcb->setAdjusterListener(this); + chromaskcb->setAdjusterListener(this); + gammaskcb->setAdjusterListener(this); + slomaskcb->setAdjusterListener(this); ToolParamBlock* const cbdlBox = Gtk::manage(new ToolParamBlock()); Gtk::HBox* buttonBox = Gtk::manage(new Gtk::HBox(true, 10)); @@ -958,6 +968,11 @@ Locallab::Locallab(): cbdlBox->pack_start(*residFrame); cbdlBox->pack_start(*softradiuscb); cbdlBox->pack_start(*sensicb); + //cbdlBox->pack_start(*blendmaskcb); + //cbdlBox->pack_start(*radmaskcb); + //cbdlBox->pack_start(*chromaskcb); + //cbdlBox->pack_start(*gammaskcb); + //cbdlBox->pack_start(*slomaskcb); expcbdl->add(*cbdlBox); expcbdl->setLevel(2); @@ -1874,6 +1889,13 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).contresid = contresid->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiuscb = softradiuscb->getValue(); + + pp->locallab.spots.at(pp->locallab.selspot).blendmaskcb = blendmaskcb->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).radmaskcb = radmaskcb->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).chromaskcb = chromaskcb->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).gammaskcb = gammaskcb->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).slomaskcb = slomaskcb->getValue(); + // Denoise pp->locallab.spots.at(pp->locallab.selspot).expdenoi = expdenoi->getEnabled(); pp->locallab.spots.at(pp->locallab.selspot).noiselumf = noiselumf->getIntValue(); @@ -2059,6 +2081,13 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).contresid = pe->locallab.spots.at(pp->locallab.selspot).contresid || contresid->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).blurcbdl = pe->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).softradiuscb = pe->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState(); + + pe->locallab.spots.at(pp->locallab.selspot).blendmaskcb = pe->locallab.spots.at(pp->locallab.selspot).blendmaskcb || blendmaskcb->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).radmaskcb = pe->locallab.spots.at(pp->locallab.selspot).radmaskcb || radmaskcb->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).chromaskcb = pe->locallab.spots.at(pp->locallab.selspot).chromaskcb || chromaskcb->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).gammaskcb = pe->locallab.spots.at(pp->locallab.selspot).gammaskcb || gammaskcb->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).slomaskcb = pe->locallab.spots.at(pp->locallab.selspot).slomaskcb || slomaskcb->getEditedState(); + // Denoise pe->locallab.spots.at(pp->locallab.selspot).expdenoi = pe->locallab.spots.at(pp->locallab.selspot).expdenoi || !expdenoi->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).noiselumf = pe->locallab.spots.at(pp->locallab.selspot).noiselumf || noiselumf->getEditedState(); @@ -2246,6 +2275,13 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).contresid = pedited->locallab.spots.at(pp->locallab.selspot).contresid || contresid->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl = pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb = pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState(); + + pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcb = pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcb || blendmaskcb->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).radmaskcb = pedited->locallab.spots.at(pp->locallab.selspot).radmaskcb || radmaskcb->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).chromaskcb = pedited->locallab.spots.at(pp->locallab.selspot).chromaskcb || chromaskcb->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).gammaskcb = pedited->locallab.spots.at(pp->locallab.selspot).gammaskcb || gammaskcb->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).slomaskcb = pedited->locallab.spots.at(pp->locallab.selspot).slomaskcb || slomaskcb->getEditedState(); + // Denoise pedited->locallab.spots.at(pp->locallab.selspot).expdenoi = pedited->locallab.spots.at(pp->locallab.selspot).expdenoi || !expdenoi->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).noiselumf = pedited->locallab.spots.at(pp->locallab.selspot).noiselumf || noiselumf->getEditedState(); @@ -3114,6 +3150,12 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe contresid->setDefault((double)defSpot->contresid); blurcbdl->setDefault((double)defSpot->blurcbdl); softradiuscb->setDefault(defSpot->softradiuscb); + blendmaskcb->setDefault((double)defSpot->blendmaskcb); + radmaskcb->setDefault(defSpot->radmaskcb); + chromaskcb->setDefault(defSpot->chromaskcb); + gammaskcb->setDefault(defSpot->gammaskcb); + slomaskcb->setDefault(defSpot->slomaskcb); + // Denoise noiselumf->setDefault((double)defSpot->noiselumf); noiselumf0->setDefault((double)defSpot->noiselumf0); @@ -3228,6 +3270,12 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe contresid->setDefaultEditedState(Irrelevant); blurcbdl->setDefaultEditedState(Irrelevant); softradiuscb->setDefaultEditedState(Irrelevant); + blendmaskcb->setDefaultEditedState(Irrelevant); + radmaskcb->setDefaultEditedState(Irrelevant); + chromaskcb->setDefaultEditedState(Irrelevant); + gammaskcb->setDefaultEditedState(Irrelevant); + slomaskcb->setDefaultEditedState(Irrelevant); + // Denoise noiselumf->setDefaultEditedState(Irrelevant); noiselumf0->setDefaultEditedState(Irrelevant); @@ -3346,6 +3394,13 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe contresid->setDefaultEditedState(defSpotState->contresid ? Edited : UnEdited); blurcbdl->setDefaultEditedState(defSpotState->blurcbdl ? Edited : UnEdited); softradiuscb->setDefaultEditedState(defSpotState->softradiuscb ? Edited : UnEdited); + + blendmaskcb->setDefaultEditedState(defSpotState->blendmaskcb ? Edited : UnEdited); + radmaskcb->setDefaultEditedState(defSpotState->radmaskcb ? Edited : UnEdited); + chromaskcb->setDefaultEditedState(defSpotState->chromaskcb ? Edited : UnEdited); + gammaskcb->setDefaultEditedState(defSpotState->gammaskcb ? Edited : UnEdited); + slomaskcb->setDefaultEditedState(defSpotState->slomaskcb ? Edited : UnEdited); + // Denoise noiselumf->setDefaultEditedState(defSpotState->noiselumf ? Edited : UnEdited); noiselumf0->setDefaultEditedState(defSpotState->noiselumf0 ? Edited : UnEdited); @@ -3952,7 +4007,37 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) listener->panelChanged(Evlocallabsoftradiuscb, softradiuscb->getTextValue()); } } - + + if (a == blendmaskcb) { + if (listener) { + listener->panelChanged(Evlocallabblendmaskcb, blendmaskcb->getTextValue()); + } + } + + if (a == radmaskcb) { + if (listener) { + listener->panelChanged(Evlocallabradmaskcb, radmaskcb->getTextValue()); + } + } + + if (a == chromaskcb) { + if (listener) { + listener->panelChanged(Evlocallabchromaskcb, chromaskcb->getTextValue()); + } + } + + if (a == gammaskcb) { + if (listener) { + listener->panelChanged(Evlocallabgammaskcb, gammaskcb->getTextValue()); + } + } + + if (a == slomaskcb) { + if (listener) { + listener->panelChanged(Evlocallabslomaskcb, slomaskcb->getTextValue()); + } + } + } // Denoise @@ -4155,6 +4240,12 @@ void Locallab::setBatchMode(bool batchMode) contresid->showEditedCB(); blurcbdl->showEditedCB(); softradiuscb->showEditedCB(); + blendmaskcb->showEditedCB(); + radmaskcb->showEditedCB(); + chromaskcb->showEditedCB(); + gammaskcb->showEditedCB(); + slomaskcb->showEditedCB(); + // Denoise noiselumf->showEditedCB(); noiselumc->showEditedCB(); @@ -4597,6 +4688,11 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con contresid->setValue(pp->locallab.spots.at(index).contresid); blurcbdl->setValue(pp->locallab.spots.at(index).blurcbdl); softradiuscb->setValue(pp->locallab.spots.at(index).softradiuscb); + blendmaskcb->setValue(pp->locallab.spots.at(index).blendmaskcb); + radmaskcb->setValue(pp->locallab.spots.at(index).radmaskcb); + chromaskcb->setValue(pp->locallab.spots.at(index).chromaskcb); + gammaskcb->setValue(pp->locallab.spots.at(index).gammaskcb); + slomaskcb->setValue(pp->locallab.spots.at(index).slomaskcb); // Denoise expdenoi->setEnabled(pp->locallab.spots.at(index).expdenoi); @@ -4819,6 +4915,11 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con contresid->setEditedState(spotState->contresid ? Edited : UnEdited); blurcbdl->setEditedState(spotState->blurcbdl ? Edited : UnEdited); softradiuscb->setEditedState(spotState->softradiuscb ? Edited : UnEdited); + blendmaskcb->setEditedState(spotState->blendmaskcb ? Edited : UnEdited); + radmaskcb->setEditedState(spotState->radmaskcb ? Edited : UnEdited); + chromaskcb->setEditedState(spotState->chromaskcb ? Edited : UnEdited); + gammaskcb->setEditedState(spotState->gammaskcb ? Edited : UnEdited); + slomaskcb->setEditedState(spotState->slomaskcb ? Edited : UnEdited); // Denoise expdenoi->set_inconsistent(!spotState->expdenoi); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 8be29fbdf..a2dc79281 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -187,6 +187,12 @@ private: Adjuster* const blurcbdl; Adjuster* const sensicb; Adjuster* const softradiuscb; + Adjuster* const blendmaskcb; + Adjuster* const radmaskcb; + Adjuster* const chromaskcb; + Adjuster* const gammaskcb; + Adjuster* const slomaskcb; + // Denoise Adjuster* const noiselumf; Adjuster* const noiselumf0; diff --git a/rtgui/options.cc b/rtgui/options.cc index 01cfe0e10..41fd72011 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -594,7 +594,7 @@ void Options::setDefaults() rtSettings.reduclow = 0.85;//transition for luminance out scope rtSettings.detectshape = true;//experimental new detection shape rtSettings.previewselection = 5;//betwen 1 to 40 - rtSettings.cbdlsensi = 0.4;//betwen 0.001 to 1 + rtSettings.cbdlsensi = 1.0;//betwen 0.001 to 1 // end locallab diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index d8cc20385..c3bde6e57 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1094,6 +1094,11 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).clarityml = locallab.spots.at(j).clarityml && pSpot.clarityml == otherSpot.clarityml; locallab.spots.at(j).contresid = locallab.spots.at(j).contresid && pSpot.contresid == otherSpot.contresid; locallab.spots.at(j).blurcbdl = locallab.spots.at(j).blurcbdl && pSpot.blurcbdl == otherSpot.blurcbdl; + locallab.spots.at(j).blendmaskcb = locallab.spots.at(j).blendmaskcb && pSpot.blendmaskcb == otherSpot.blendmaskcb; + locallab.spots.at(j).radmaskcb = locallab.spots.at(j).radmaskcb && pSpot.radmaskcb == otherSpot.radmaskcb; + locallab.spots.at(j).chromaskcb = locallab.spots.at(j).chromaskcb && pSpot.chromaskcb == otherSpot.chromaskcb; + locallab.spots.at(j).gammaskcb = locallab.spots.at(j).gammaskcb && pSpot.gammaskcb == otherSpot.gammaskcb; + locallab.spots.at(j).slomaskcb = locallab.spots.at(j).slomaskcb && pSpot.slomaskcb == otherSpot.slomaskcb; locallab.spots.at(j).softradiuscb = locallab.spots.at(j).softradiuscb && pSpot.softradiuscb == otherSpot.softradiuscb; // Denoise locallab.spots.at(j).expdenoi = locallab.spots.at(j).expdenoi && pSpot.expdenoi == otherSpot.expdenoi; @@ -3152,6 +3157,26 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).blurcbdl = mods.locallab.spots.at(i).blurcbdl; } + if (locallab.spots.at(i).blendmaskcb) { + toEdit.locallab.spots.at(i).blendmaskcb = mods.locallab.spots.at(i).blendmaskcb; + } + + if (locallab.spots.at(i).radmaskcb) { + toEdit.locallab.spots.at(i).radmaskcb = mods.locallab.spots.at(i).radmaskcb; + } + + if (locallab.spots.at(i).chromaskcb) { + toEdit.locallab.spots.at(i).chromaskcb = mods.locallab.spots.at(i).chromaskcb; + } + + if (locallab.spots.at(i).gammaskcb) { + toEdit.locallab.spots.at(i).gammaskcb = mods.locallab.spots.at(i).gammaskcb; + } + + if (locallab.spots.at(i).slomaskcb) { + toEdit.locallab.spots.at(i).slomaskcb = mods.locallab.spots.at(i).slomaskcb; + } + if (locallab.spots.at(i).softradiuscb) { toEdit.locallab.spots.at(i).softradiuscb = mods.locallab.spots.at(i).softradiuscb; } @@ -4313,6 +4338,11 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : clarityml(v), contresid(v), blurcbdl(v), + blendmaskcb(v), + radmaskcb(v), + chromaskcb(v), + gammaskcb(v), + slomaskcb(v), softradiuscb(v), // Denoise expdenoi(v), @@ -4500,6 +4530,11 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) clarityml = v; contresid = v; blurcbdl = v; + blendmaskcb = v; + radmaskcb = v; + chromaskcb = v; + gammaskcb = v; + slomaskcb = v; softradiuscb = v; // Denoise expdenoi = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 316730398..3283cd400 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -517,7 +517,13 @@ public: bool clarityml; bool contresid; bool blurcbdl; + bool blendmaskcb; + bool radmaskcb; + bool chromaskcb; + bool gammaskcb; + bool slomaskcb; bool softradiuscb; + // Denoise bool expdenoi; bool noiselumf; From 031613abe5861a1a1ae5cddcca512f71e5fb60d5 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Sun, 14 Apr 2019 09:44:21 +0200 Subject: [PATCH 19/59] Fix for Auto - Reset button height --- rtdata/themes/TooWaBlue-GTK3-20_.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index 4b26ce11c..3ed352c74 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -1900,12 +1900,12 @@ spinbutton { } /* Needed for Reset & and Auto button height*/ #MyExpander button + label + spinbutton { - margin-top: 0.333333333333333333em; - margin-bottom: 0.333333333333333333em; + margin-top: 0.25em; + margin-bottom: 0.25em; } #MyExpander checkbutton + label + spinbutton { - margin-top: 0.416666666666666666em; - margin-bottom: 0.416666666666666666em; + margin-top: 0.333333333333333333em; + margin-bottom: 0.333333333333333333em; } /**/ From ace5a011369f60928f8c975155dd93c19a911d9f Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Sun, 14 Apr 2019 11:10:01 +0200 Subject: [PATCH 20/59] Setting 12pt as base font size for MacOS (see issue #5282) --- rtgui/rtscalable.h | 2 ++ rtgui/rtwindow.cc | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rtgui/rtscalable.h b/rtgui/rtscalable.h index a182dd2e0..e6180eaa1 100644 --- a/rtgui/rtscalable.h +++ b/rtgui/rtscalable.h @@ -42,9 +42,11 @@ public: #ifdef __APPLE__ static constexpr double baseDPI = 72.; static constexpr double baseHiDPI = 144.; + static constexpr int baseFontSize = 12; #else static constexpr double baseDPI = 96.; static constexpr double baseHiDPI = 192.; + static constexpr int baseFontSize = 9; #endif static void init(Gtk::Window *window); diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index ce1d5151a..4e5c6f753 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -170,7 +170,7 @@ RTWindow::RTWindow () css = Glib::ustring::compose ("* { font-family: %1; font-size: %2pt}", options.fontFamily, options.fontSize * (int)initialGdkScale); #endif //GTK318 - fontScale = options.fontSize / 9.f; + fontScale = options.fontSize / (float)RTScalable::baseFontSize; if (options.rtSettings.verbose) { printf("\"Non-Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", options.fontSize, (int)initialGdkScale, fontScale); } @@ -192,12 +192,12 @@ RTWindow::RTWindow () // 1pt = 1/72in @ 96 ppi // HOMBRE: If the font unit is px, is it already scaled up to match the resolution ? // px >inch >pt >"scaled pt" - pt = (int)(double(fontSize) / RTScalable::baseDPI * 72. * (RTScalable::baseDPI / resolution) + 0.49); + pt = (int)(double(fontSize) / RTScalable::baseDPI * 72. * (96. / (double)resolution) + 0.49); } else { pt = fontSize / Pango::SCALE; } - fontScale = (float)pt / 9.f; - if ((int)initialGdkScale > 1 || pt != 9) { + fontScale = (float)pt / (float)RTScalable::baseFontSize; + if ((int)initialGdkScale > 1 || pt != RTScalable::baseFontSize) { css = Glib::ustring::compose ("* { font-size: %1pt}", pt * (int)initialGdkScale); if (options.rtSettings.verbose) { printf("\"Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", pt, (int)initialGdkScale, fontScale); From 585ed54c3cb1d971c773b16b539f163a209b44d5 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 14 Apr 2019 11:29:05 +0200 Subject: [PATCH 21/59] Save GUI part of Mask CBDL - disabled --- rtengine/curves.cc | 140 +++++++++++++++++++++++++++++++++++ rtengine/curves.h | 88 ++++++++++++++++++++++ rtengine/procevents.h | 5 ++ rtengine/procparams.cc | 16 ++++ rtengine/procparams.h | 4 + rtengine/refreshmap.cc | 9 ++- rtgui/locallab.cc | 162 +++++++++++++++++++++++++++++++++++++++-- rtgui/locallab.h | 24 ++++-- rtgui/paramsedited.cc | 28 +++++++ rtgui/paramsedited.h | 4 + 10 files changed, 465 insertions(+), 15 deletions(-) diff --git a/rtengine/curves.cc b/rtengine/curves.cc index c9b549896..aa54a307f 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -1563,6 +1563,146 @@ void LocretigainCurverab::Set(const std::vector &curvePoints) } } +LocHHmaskcbCurve::LocHHmaskcbCurve() : sum(0.f) {}; + +void LocHHmaskcbCurve::Reset() +{ + lutLocHHmaskcbCurve.reset(); + sum = 0.f; +} + + +void LocHHmaskcbCurve::Set(const Curve &pCurve) +{ + if (pCurve.isIdentity()) { + Reset(); // raise this value if the quality suffers from this number of samples + return; + } + + lutLocHHmaskcbCurve(501); // raise this value if the quality suffers from this number of samples + sum = 0.f; + + for (int i = 0; i < 501; i++) { + lutLocHHmaskcbCurve[i] = pCurve.getVal(double (i) / 500.); + + if (lutLocHHmaskcbCurve[i] < 0.02f) { + lutLocHHmaskcbCurve[i] = 0.02f; + } + + sum += lutLocHHmaskcbCurve[i]; + } + + //lutLocHHCurve.dump("wav"); +} + +void LocHHmaskcbCurve::Set(const std::vector &curvePoints, bool & lhmascbutili) +{ + // if (HHutili && !curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) { + if (!curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) { + FlatCurve ttcurve(curvePoints, false, CURVES_MIN_POLY_POINTS / 2); + ttcurve.setIdentityValue(0.); + lhmascbutili = true; + Set(ttcurve); + } else { + Reset(); + } +} + +LocLLmaskcbCurve::LocLLmaskcbCurve() : sum(0.f) {}; + +void LocLLmaskcbCurve::Reset() +{ + lutLocLLmaskcbCurve.reset(); + sum = 0.f; +} + +void LocLLmaskcbCurve::Set(const Curve &pCurve) +{ + if (pCurve.isIdentity()) { + Reset(); // raise this value if the quality suffers from this number of samples + return; + } + + lutLocLLmaskcbCurve(501); // raise this value if the quality suffers from this number of samples + sum = 0.f; + + for (int i = 0; i < 501; i++) { + lutLocLLmaskcbCurve[i] = pCurve.getVal(double (i) / 500.); + + if (lutLocLLmaskcbCurve[i] < 0.02f) { + lutLocLLmaskcbCurve[i] = 0.02f; //avoid 0.f for wavelet : under 0.01f quasi no action for each value + } + + sum += lutLocLLmaskcbCurve[i]; + } + + //lutLocHHCurve.dump("wav"); +} + + + +void LocLLmaskcbCurve::Set(const std::vector &curvePoints, bool & llmascbutili) +{ + // if (HHutili && !curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) { + if (!curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) { + FlatCurve ttcurve(curvePoints, false, CURVES_MIN_POLY_POINTS / 2); + ttcurve.setIdentityValue(0.); + llmascbutili = true; + Set(ttcurve); + } else { + Reset(); + } +} + +LocCCmaskcbCurve::LocCCmaskcbCurve() : sum(0.f) {}; + +void LocCCmaskcbCurve::Reset() +{ + lutLocCCmaskcbCurve.reset(); + sum = 0.f; +} + +void LocCCmaskcbCurve::Set(const Curve &pCurve) +{ + if (pCurve.isIdentity()) { + Reset(); // raise this value if the quality suffers from this number of samples + return; + } + + lutLocCCmaskcbCurve(501); // raise this value if the quality suffers from this number of samples + sum = 0.f; + + for (int i = 0; i < 501; i++) { + lutLocCCmaskcbCurve[i] = pCurve.getVal(double (i) / 500.); + + if (lutLocCCmaskcbCurve[i] < 0.02f) { + lutLocCCmaskcbCurve[i] = 0.02f; //avoid 0.f for wavelet : under 0.01f quasi no action for each value + } + + sum += lutLocCCmaskcbCurve[i]; + } + + //lutLocHHCurve.dump("wav"); +} + + + +void LocCCmaskcbCurve::Set(const std::vector &curvePoints, bool & lcmascbutili) +{ + // if (HHutili && !curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) { + if (!curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) { + FlatCurve ttcurve(curvePoints, false, CURVES_MIN_POLY_POINTS / 2); + ttcurve.setIdentityValue(0.); + lcmascbutili = true; + Set(ttcurve); + } else { + Reset(); + } +} + + + + LocHHmaskSHCurve::LocHHmaskSHCurve() : sum(0.f) {}; void LocHHmaskSHCurve::Reset() diff --git a/rtengine/curves.h b/rtengine/curves.h index a1f2321d1..fda8adcd6 100644 --- a/rtengine/curves.h +++ b/rtengine/curves.h @@ -647,6 +647,94 @@ public: } }; +class LocHHmaskcbCurve +{ +private: + LUTf lutLocHHmaskcbCurve; // 0xffff range + void Set(const Curve &pCurve); + +public: + float sum; + + virtual ~LocHHmaskcbCurve() {}; + LocHHmaskcbCurve(); + void Reset(); + void Set(const std::vector &curvePoints, bool & lhmascbutili); + float getSum() const + { + return sum; + } + + float operator[](float index) const + { + return lutLocHHmaskcbCurve[index]; + } + operator bool (void) const + { + return lutLocHHmaskcbCurve; + } +}; + + +class LocCCmaskcbCurve +{ +private: + LUTf lutLocCCmaskcbCurve; // 0xffff range + void Set(const Curve &pCurve); + +public: + float sum; + + virtual ~LocCCmaskcbCurve() {}; + LocCCmaskcbCurve(); + void Reset(); + void Set(const std::vector &curvePoints, bool & lcmascbutili); + float getSum() const + { + return sum; + } + + float operator[](float index) const + { + return lutLocCCmaskcbCurve[index]; + } + operator bool (void) const + { + return lutLocCCmaskcbCurve; + } +}; + +class LocLLmaskcbCurve +{ +private: + LUTf lutLocLLmaskcbCurve; // 0xffff range + void Set(const Curve &pCurve); + +public: + float sum; + + virtual ~LocLLmaskcbCurve() {}; + LocLLmaskcbCurve(); + void Reset(); + void Set(const std::vector &curvePoints, bool & llmascbutili); + float getSum() const + { + return sum; + } + + float operator[](float index) const + { + return lutLocLLmaskcbCurve[index]; + } + operator bool (void) const + { + return lutLocLLmaskcbCurve; + } +}; + + + + class LocHHmaskexpCurve { private: diff --git a/rtengine/procevents.h b/rtengine/procevents.h index f1bc421fe..8c470e1d7 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -696,6 +696,11 @@ enum ProcEventCode { Evlocallabchromaskcb = 666, Evlocallabgammaskcb = 667, Evlocallabslomaskcb = 668, + EvlocallabCCmaskcbshape = 669, + EvlocallabLLmaskcbshape = 670, + EvlocallabHHmaskcbshape = 671, + EvLocallabEnacbMask = 672, + EvlocallabshowmaskcbMethod = 673, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 3feb52a5e..8c411ce05 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2501,6 +2501,10 @@ LocallabParams::LocallabSpot::LocallabSpot() : contresid(0), blurcbdl(0), softradiuscb(0.0), + enacbMask(false), + CCmaskcbcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35 }, + LLmaskcbcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35}, + HHmaskcbcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35}, blendmaskcb(0), radmaskcb(10.0), chromaskcb(0.0), @@ -2701,6 +2705,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && contresid == other.contresid && blurcbdl == other.blurcbdl && softradiuscb == other.softradiuscb + && enacbMask == other.enacbMask + && CCmaskcbcurve == other.CCmaskcbcurve + && LLmaskcbcurve == other.LLmaskcbcurve + && HHmaskcbcurve == other.HHmaskcbcurve && blendmaskcb == other.blendmaskcb && radmaskcb == other.radmaskcb && chromaskcb == other.chromaskcb @@ -3843,6 +3851,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).contresid, "Locallab", "Contresid_" + std::to_string(i), spot.contresid, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blurcbdl, "Locallab", "Blurcbdl_" + std::to_string(i), spot.blurcbdl, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).softradiuscb, "Locallab", "Softradiuscb_" + std::to_string(i), spot.softradiuscb, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).enacbMask, "Locallab", "EnacbMask_" + std::to_string(i), spot.enacbMask, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).CCmaskcbcurve, "Locallab", "CCmaskcbCurve_" + std::to_string(i), spot.CCmaskcbcurve, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).LLmaskcbcurve, "Locallab", "LLmaskcbCurve_" + std::to_string(i), spot.LLmaskcbcurve, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).HHmaskcbcurve, "Locallab", "HHmaskcbCurve_" + std::to_string(i), spot.HHmaskcbcurve, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blendmaskcb, "Locallab", "Blendmaskcb_" + std::to_string(i), spot.blendmaskcb, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).radmaskcb, "Locallab", "Radmaskcb_" + std::to_string(i), spot.radmaskcb, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskcb, "Locallab", "Chromaskcb_" + std::to_string(i), spot.chromaskcb, keyFile); @@ -5132,6 +5144,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Blurcbdl_" + std::to_string(i), pedited, spot.blurcbdl, spotEdited.blurcbdl); assignFromKeyfile(keyFile, "Locallab", "Softradiuscb_" + std::to_string(i), pedited, spot.softradiuscb, spotEdited.softradiuscb); assignFromKeyfile(keyFile, "Locallab", "Blendmaskcb_" + std::to_string(i), pedited, spot.blendmaskcb, spotEdited.blendmaskcb); + assignFromKeyfile(keyFile, "Locallab", "EnacbMask_" + std::to_string(i), pedited, spot.enacbMask, spotEdited.enacbMask); + assignFromKeyfile(keyFile, "Locallab", "CCmaskcbCurve_" + std::to_string(i), pedited, spot.CCmaskcbcurve, spotEdited.CCmaskcbcurve); + assignFromKeyfile(keyFile, "Locallab", "LLmaskcbCurve_" + std::to_string(i), pedited, spot.LLmaskcbcurve, spotEdited.LLmaskcbcurve); + assignFromKeyfile(keyFile, "Locallab", "HHmaskcbCurve_" + std::to_string(i), pedited, spot.HHmaskcbcurve, spotEdited.HHmaskcbcurve); assignFromKeyfile(keyFile, "Locallab", "Radmaskcb_" + std::to_string(i), pedited, spot.radmaskcb, spotEdited.radmaskcb); assignFromKeyfile(keyFile, "Locallab", "Chromaskcb_" + std::to_string(i), pedited, spot.chromaskcb, spotEdited.chromaskcb); assignFromKeyfile(keyFile, "Locallab", "Gammaskcb_" + std::to_string(i), pedited, spot.gammaskcb, spotEdited.gammaskcb); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index d1d0b6074..604a1936e 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1102,6 +1102,10 @@ struct LocallabParams { int contresid; int blurcbdl; double softradiuscb; + bool enacbMask; + std::vector CCmaskcbcurve; + std::vector LLmaskcbcurve; + std::vector HHmaskcbcurve; int blendmaskcb; double radmaskcb; double chromaskcb; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 9f09b5382..085272c24 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -695,9 +695,12 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // Evlocallabradmaskcb LUMINANCECURVE, //Evlocallabchromaskcb LUMINANCECURVE, //Evlocallabgammaskcb - LUMINANCECURVE //Evlocallabslomaskcb - - + LUMINANCECURVE, //Evlocallabslomaskcb + LUMINANCECURVE, //EvlocallabCCmaskcbshape + LUMINANCECURVE, //EvlocallabLLmaskcbshape + LUMINANCECURVE, //EvlocallabHHmaskcbshape + LUMINANCECURVE, //EvLocallabEnacbMask + LUMINANCECURVE //EvlocallabshowmaskcbMethod }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 521bd4557..8e075890b 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -73,7 +73,9 @@ Locallab::Locallab(): curveEditorGG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL"))), // Retinex LocalcurveEditorgainT(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_TRANSMISSIONGAIN"))), - + //CBDL + maskcbCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), + // Adjuster widgets // Color & Light lightness(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LIGHTNESS"), -100, 100, 1, 0))), @@ -207,7 +209,9 @@ Locallab::Locallab(): inversret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), // Sharpening inverssha(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), - + //CBDL + enacbMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), + // ComboBox widgets // Color & Light qualitycurveMethod(Gtk::manage(new MyComboBoxText())), @@ -221,6 +225,8 @@ Locallab::Locallab(): blurMethod(Gtk::manage(new MyComboBoxText())), // Retinex retinexMethod(Gtk::manage(new MyComboBoxText())), + //CBDL + showmaskcbMethod(Gtk::manage(new MyComboBoxText())), // ThresholdAdjuster widgets // Vibrance @@ -234,6 +240,7 @@ Locallab::Locallab(): maskcolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))), maskexpFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))), maskSHFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))), + maskcbFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))), gridFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABGRID")))), residFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RESID")))), @@ -941,6 +948,44 @@ Locallab::Locallab(): gammaskcb->setAdjusterListener(this); slomaskcb->setAdjusterListener(this); + enacbMaskConn = enacbMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::enacbMaskChanged)); + + showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMNONE")); + showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIF")); + showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); + showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMASK")); + showmaskcbMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); + + + showmaskcbMethod->set_active(0); + if(showtooltip) showmaskcbMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); + showmaskcbMethodConn = showmaskcbMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::showmaskcbMethodChanged)); + + maskcbCurveEditorG->setCurveListener(this); + + CCmaskcbshape = static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false)); + CCmaskcbshape->setIdentityValue(0.); + CCmaskcbshape->setResetCurve(FlatCurveType(defSpot.CCmaskcbcurve.at(0)), defSpot.CCmaskcbcurve); + if(showtooltip) CCmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + CCmaskcbshape->setBottomBarColorProvider(this, 7); + + LLmaskcbshape = static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false)); + LLmaskcbshape->setIdentityValue(0.); + LLmaskcbshape->setResetCurve(FlatCurveType(defSpot.LLmaskcbcurve.at(0)), defSpot.LLmaskcbcurve); + if(showtooltip) LLmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + LLmaskcbshape->setBottomBarBgGradient(mllshape); + + HHmaskcbshape = static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true)); + HHmaskcbshape->setIdentityValue(0.); + HHmaskcbshape->setResetCurve(FlatCurveType(defSpot.HHmaskcbcurve.at(0)), defSpot.HHmaskcbcurve); + if(showtooltip) HHmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + HHmaskcbshape->setCurveColorProvider(this, 6); + HHmaskcbshape->setBottomBarColorProvider(this, 6); + + maskcbCurveEditorG->curveListComplete(); + + + ToolParamBlock* const cbdlBox = Gtk::manage(new ToolParamBlock()); Gtk::HBox* buttonBox = Gtk::manage(new Gtk::HBox(true, 10)); buttonBox->pack_start(*lumacontrastMinusButton); @@ -955,6 +1000,18 @@ Locallab::Locallab(): cbdlBox->pack_start(*multiplier[i]); } + maskcbFrame->set_label_align(0.025, 0.5); + ToolParamBlock* const maskcbBox = Gtk::manage(new ToolParamBlock()); + maskcbBox->pack_start(*showmaskcbMethod, Gtk::PACK_SHRINK, 4); + maskcbBox->pack_start(*enacbMask, Gtk::PACK_SHRINK, 0); + maskcbBox->pack_start(*maskcbCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + maskcbBox->pack_start(*blendmaskcb, Gtk::PACK_SHRINK, 0); + maskcbBox->pack_start(*radmaskcb, Gtk::PACK_SHRINK, 0); + maskcbBox->pack_start(*chromaskcb, Gtk::PACK_SHRINK, 0); + maskcbBox->pack_start(*gammaskcb, Gtk::PACK_SHRINK, 0); + maskcbBox->pack_start(*slomaskcb, Gtk::PACK_SHRINK, 0); + maskcbFrame->add(*maskcbBox); + Gtk::HSeparator *separator = Gtk::manage(new Gtk::HSeparator()); cbdlBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); cbdlBox->pack_start(*chromacbdl); @@ -968,11 +1025,7 @@ Locallab::Locallab(): cbdlBox->pack_start(*residFrame); cbdlBox->pack_start(*softradiuscb); cbdlBox->pack_start(*sensicb); - //cbdlBox->pack_start(*blendmaskcb); - //cbdlBox->pack_start(*radmaskcb); - //cbdlBox->pack_start(*chromaskcb); - //cbdlBox->pack_start(*gammaskcb); - //cbdlBox->pack_start(*slomaskcb); +// cbdlBox->pack_start(*maskcbFrame); expcbdl->add(*cbdlBox); expcbdl->setLevel(2); @@ -1200,6 +1253,11 @@ void Locallab::refChanged(double huer, double lumar, double chromar) LLmaskSHshape->updateLocallabBackground(normLumar); HHmaskSHshape->updateLocallabBackground(normHuer); + // Update CBDL mask background + CCmaskcbshape->updateLocallabBackground(normChromar); + LLmaskcbshape->updateLocallabBackground(normLumar); + HHmaskcbshape->updateLocallabBackground(normHuer); + return false; } ); @@ -1889,6 +1947,11 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).contresid = contresid->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiuscb = softradiuscb->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).enacbMask = enacbMask->get_active(); + + pp->locallab.spots.at(pp->locallab.selspot).LLmaskcbcurve = LLmaskcbshape->getCurve(); + pp->locallab.spots.at(pp->locallab.selspot).CCmaskcbcurve = CCmaskcbshape->getCurve(); + pp->locallab.spots.at(pp->locallab.selspot).HHmaskcbcurve = HHmaskcbshape->getCurve(); pp->locallab.spots.at(pp->locallab.selspot).blendmaskcb = blendmaskcb->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).radmaskcb = radmaskcb->getValue(); @@ -2081,6 +2144,11 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).contresid = pe->locallab.spots.at(pp->locallab.selspot).contresid || contresid->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).blurcbdl = pe->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).softradiuscb = pe->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).enacbMask = pe->locallab.spots.at(pp->locallab.selspot).enacbMask || !enacbMask->get_inconsistent(); + + pe->locallab.spots.at(pp->locallab.selspot).CCmaskcbcurve = pe->locallab.spots.at(pp->locallab.selspot).CCmaskcbcurve || !CCmaskcbshape->isUnChanged(); + pe->locallab.spots.at(pp->locallab.selspot).LLmaskcbcurve = pe->locallab.spots.at(pp->locallab.selspot).LLmaskcbcurve || !LLmaskcbshape->isUnChanged(); + pe->locallab.spots.at(pp->locallab.selspot).HHmaskcbcurve = pe->locallab.spots.at(pp->locallab.selspot).HHmaskcbcurve || !HHmaskcbshape->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).blendmaskcb = pe->locallab.spots.at(pp->locallab.selspot).blendmaskcb || blendmaskcb->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).radmaskcb = pe->locallab.spots.at(pp->locallab.selspot).radmaskcb || radmaskcb->getEditedState(); @@ -2276,6 +2344,11 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl = pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb = pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).enacbMask = pedited->locallab.spots.at(pp->locallab.selspot).enacbMask || !enacbMask->get_inconsistent(); + pedited->locallab.spots.at(pp->locallab.selspot).CCmaskcbcurve = pedited->locallab.spots.at(pp->locallab.selspot).CCmaskcbcurve || !CCmaskcbshape->isUnChanged(); + pedited->locallab.spots.at(pp->locallab.selspot).LLmaskcbcurve = pedited->locallab.spots.at(pp->locallab.selspot).LLmaskcbcurve || !LLmaskcbshape->isUnChanged(); + pedited->locallab.spots.at(pp->locallab.selspot).HHmaskcbcurve = pedited->locallab.spots.at(pp->locallab.selspot).HHmaskcbcurve || !HHmaskcbshape->isUnChanged(); + pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcb = pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcb || blendmaskcb->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).radmaskcb = pedited->locallab.spots.at(pp->locallab.selspot).radmaskcb || radmaskcb->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).chromaskcb = pedited->locallab.spots.at(pp->locallab.selspot).chromaskcb || chromaskcb->getEditedState(); @@ -2492,6 +2565,28 @@ void Locallab::curveChanged(CurveEditor* ce) } } + //CBDL + if (getEnabled() && expcbdl->getEnabled()) { + + if (ce == CCmaskcbshape) { + if (listener) { + listener->panelChanged(EvlocallabCCmaskcbshape, M("HISTORY_CUSTOMCURVE")); + } + } + + if (ce == LLmaskcbshape) { + if (listener) { + listener->panelChanged(EvlocallabLLmaskcbshape, M("HISTORY_CUSTOMCURVE")); + } + } + + if (ce == HHmaskcbshape) { + if (listener) { + listener->panelChanged(EvlocallabHHmaskcbshape, M("HISTORY_CUSTOMCURVE")); + } + } + } + // Vibrance if (getEnabled() && expvibrance->getEnabled()) { if (ce == skinTonesCurve) { @@ -2598,6 +2693,20 @@ void Locallab::showmaskSHMethodChanged() } } +void Locallab::showmaskcbMethodChanged() +{ + // printf("showmaskSHMethodChanged\n"); + + // When one mask state is changed, other masks are deactivated + disableListener(); + showmaskcbMethod->set_active(0); + enableListener(); + + if (listener) { + listener->panelChanged(EvlocallabshowmaskcbMethod, ""); + } +} + void Locallab::resetMaskVisibility() { // printf("resetMaskVisibility\n"); @@ -2606,6 +2715,7 @@ void Locallab::resetMaskVisibility() showmaskcolMethod->set_active(0); showmaskexpMethod->set_active(0); showmaskSHMethod->set_active(0); + showmaskcbMethod->set_active(0); enableListener(); } @@ -2615,6 +2725,7 @@ Locallab::llMaskVisibility* Locallab::getMaskVisibility() maskStruct->colorMask = showmaskcolMethod->get_active_row_number(); maskStruct->expMask = showmaskexpMethod->get_active_row_number(); maskStruct->SHMask = showmaskSHMethod->get_active_row_number(); + maskStruct->cbMask = showmaskcbMethod->get_active_row_number(); return maskStruct; } @@ -2690,6 +2801,30 @@ void Locallab::enaSHMaskChanged() } } +void Locallab::enacbMaskChanged() +{ + // printf("enacbMaskChanged\n"); + + if (multiImage) { + if (enacbMask->get_inconsistent()) { + enacbMask->set_inconsistent(false); + enacbMaskConn.block(true); + enacbMask->set_active(false); + enacbMaskConn.block(false); + } + } + + if (getEnabled() && expcbdl->getEnabled()) { + if (listener) { + if (enacbMask->get_active()) { + listener->panelChanged(EvLocallabEnacbMask, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(EvLocallabEnacbMask, M("GENERAL_DISABLED")); + } + } + } +} + void Locallab::inversChanged() { // printf("inversChanged\n"); @@ -4272,6 +4407,7 @@ void Locallab::setBatchMode(bool batchMode) showmaskcolMethod->hide(); showmaskexpMethod->hide(); showmaskSHMethod->hide(); + showmaskcbMethod->hide(); } std::vector Locallab::getCurvePoints(ThresholdSelector* tAdjuster) const @@ -4449,6 +4585,8 @@ void Locallab::enableListener() enablecontrastConn.block(false); // Contrast by detail levels enablecbdlConn.block(false); + enacbMaskConn.block(false); + showmaskcbMethodConn.block(false); // Denoise enabledenoiConn.block(false); } @@ -4500,6 +4638,8 @@ void Locallab::disableListener() enablecontrastConn.block(true); // Contrast by detail levels enablecbdlConn.block(true); + enacbMaskConn.block(true); + showmaskSHMethodConn.block(true); // Denoise enabledenoiConn.block(true); } @@ -4693,6 +4833,10 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con chromaskcb->setValue(pp->locallab.spots.at(index).chromaskcb); gammaskcb->setValue(pp->locallab.spots.at(index).gammaskcb); slomaskcb->setValue(pp->locallab.spots.at(index).slomaskcb); + enacbMask->set_active(pp->locallab.spots.at(index).enacbMask); + CCmaskcbshape->setCurve(pp->locallab.spots.at(index).CCmaskcbcurve); + LLmaskcbshape->setCurve(pp->locallab.spots.at(index).LLmaskcbcurve); + HHmaskcbshape->setCurve(pp->locallab.spots.at(index).HHmaskcbcurve); // Denoise expdenoi->setEnabled(pp->locallab.spots.at(index).expdenoi); @@ -4920,6 +5064,10 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con chromaskcb->setEditedState(spotState->chromaskcb ? Edited : UnEdited); gammaskcb->setEditedState(spotState->gammaskcb ? Edited : UnEdited); slomaskcb->setEditedState(spotState->slomaskcb ? Edited : UnEdited); + enacbMask->set_inconsistent(multiImage && !spotState->enacbMask); + CCmaskcbshape->setUnChanged(!spotState->CCmaskcbcurve); + LLmaskcbshape->setUnChanged(!spotState->LLmaskcbcurve); + HHmaskcbshape->setUnChanged(!spotState->HHmaskcbcurve); // Denoise expdenoi->set_inconsistent(!spotState->expdenoi); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index a2dc79281..32b2e8fc5 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -92,7 +92,12 @@ private: // Retinex CurveEditorGroup* const LocalcurveEditorgainT; FlatCurveEditor* cTgainshape; - + //Cbdl + CurveEditorGroup* const maskcbCurveEditorG; + FlatCurveEditor* CCmaskcbshape; + FlatCurveEditor* LLmaskcbshape; + FlatCurveEditor* HHmaskcbshape; + // Adjuster widgets // Color & Light Adjuster* const lightness; @@ -237,7 +242,10 @@ private: // Sharpening Gtk::CheckButton* const inverssha; sigc::connection inversshaConn; - + //CBDL + Gtk::CheckButton* const enacbMask; + sigc::connection enacbMaskConn; + // ComboBox widgets // Color & Light MyComboBoxText* const qualitycurveMethod; @@ -258,7 +266,9 @@ private: // Retinex MyComboBoxText* const retinexMethod; sigc::connection retinexMethodConn; - + //CBDL + MyComboBoxText* const showmaskcbMethod; + sigc::connection showmaskcbMethodConn; // ThresholdAdjuster widgets // Vibrance ThresholdAdjuster* const psThreshold; @@ -272,6 +282,7 @@ private: Gtk::Frame* maskcolFrame; Gtk::Frame* maskexpFrame; Gtk::Frame* maskSHFrame; + Gtk::Frame* maskcbFrame; Gtk::Frame* gridFrame; Gtk::Frame* residFrame; LabGrid *labgrid; @@ -317,7 +328,8 @@ private: void inversretChanged(); // Sharpening void inversshaChanged(); - + //CBDL + void enacbMaskChanged(); // ComboBox event functions // Color & Light void qualitycurveMethodChanged(); @@ -331,7 +343,8 @@ private: void blurMethodChanged(); // Retinex void retinexMethodChanged(); - + //CBDL + void showmaskcbMethodChanged(); // Other widgets event functions void lumacontrastMinusPressed(); void lumaneutralPressed(); @@ -366,6 +379,7 @@ public: int colorMask; int expMask; int SHMask; + int cbMask; }; void resetMaskVisibility(); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index c3bde6e57..bcdf1bd91 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1100,6 +1100,10 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).gammaskcb = locallab.spots.at(j).gammaskcb && pSpot.gammaskcb == otherSpot.gammaskcb; locallab.spots.at(j).slomaskcb = locallab.spots.at(j).slomaskcb && pSpot.slomaskcb == otherSpot.slomaskcb; locallab.spots.at(j).softradiuscb = locallab.spots.at(j).softradiuscb && pSpot.softradiuscb == otherSpot.softradiuscb; + locallab.spots.at(j).enacbMask = locallab.spots.at(j).enacbMask && pSpot.enacbMask == otherSpot.enacbMask; + locallab.spots.at(j).CCmaskcbcurve = locallab.spots.at(j).CCmaskcbcurve && pSpot.CCmaskcbcurve == otherSpot.CCmaskcbcurve; + locallab.spots.at(j).LLmaskcbcurve = locallab.spots.at(j).LLmaskcbcurve && pSpot.LLmaskcbcurve == otherSpot.LLmaskcbcurve; + locallab.spots.at(j).HHmaskcbcurve = locallab.spots.at(j).HHmaskcbcurve && pSpot.HHmaskcbcurve == otherSpot.HHmaskcbcurve; // Denoise locallab.spots.at(j).expdenoi = locallab.spots.at(j).expdenoi && pSpot.expdenoi == otherSpot.expdenoi; locallab.spots.at(j).noiselumf = locallab.spots.at(j).noiselumf && pSpot.noiselumf == otherSpot.noiselumf; @@ -3177,6 +3181,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).slomaskcb = mods.locallab.spots.at(i).slomaskcb; } + if (locallab.spots.at(i).enacbMask) { + toEdit.locallab.spots.at(i).enacbMask = mods.locallab.spots.at(i).enacbMask; + } + + if (locallab.spots.at(i).CCmaskcbcurve) { + toEdit.locallab.spots.at(i).CCmaskcbcurve = mods.locallab.spots.at(i).CCmaskcbcurve; + } + + if (locallab.spots.at(i).LLmaskcbcurve) { + toEdit.locallab.spots.at(i).LLmaskcbcurve = mods.locallab.spots.at(i).LLmaskcbcurve; + } + + if (locallab.spots.at(i).HHmaskcbcurve) { + toEdit.locallab.spots.at(i).HHmaskcbcurve = mods.locallab.spots.at(i).HHmaskcbcurve; + } + if (locallab.spots.at(i).softradiuscb) { toEdit.locallab.spots.at(i).softradiuscb = mods.locallab.spots.at(i).softradiuscb; } @@ -4344,6 +4364,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : gammaskcb(v), slomaskcb(v), softradiuscb(v), + enacbMask(v), + CCmaskcbcurve(v), + LLmaskcbcurve(v), + HHmaskcbcurve(v), // Denoise expdenoi(v), noiselumf(v), @@ -4536,6 +4560,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) gammaskcb = v; slomaskcb = v; softradiuscb = v; + enacbMask = v; + CCmaskcbcurve = v; + LLmaskcbcurve = v; + HHmaskcbcurve = v; // Denoise expdenoi = v; noiselumf = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 3283cd400..a30b758f7 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -523,6 +523,10 @@ public: bool gammaskcb; bool slomaskcb; bool softradiuscb; + bool enacbMask; + bool CCmaskcbcurve; + bool LLmaskcbcurve; + bool HHmaskcbcurve; // Denoise bool expdenoi; From c3b3ecddec34d8c657466dbac1c5b8f835ca86c6 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 14 Apr 2019 13:17:26 +0200 Subject: [PATCH 22/59] save provisory work --- rtengine/dcrop.cc | 17 +++++++++++++++++ rtengine/improccoordinator.cc | 17 +++++++++++++++++ rtengine/improccoordinator.h | 6 ++++++ rtengine/improcfun.h | 1 + rtengine/iplocallab.cc | 1 + rtengine/simpleprocess.cc | 10 ++++++++++ 6 files changed, 52 insertions(+) diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 56eda0159..bdb240cf6 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -904,6 +904,9 @@ void Crop::update(int todo) bool lhmasSHutili = parent->lhmasSHutili; bool lcmasSHutili = parent->lcmasSHutili; bool llmasSHutili = parent->llmasSHutili; + bool lhmascbutili = parent->lhmascbutili; + bool lcmascbutili = parent->lcmascbutili; + bool llmascbutili = parent->llmascbutili; float avg = parent->avg; LUTu dummy; @@ -920,6 +923,9 @@ void Crop::update(int todo) LocCCmaskSHCurve locccmasSHCurve; LocLLmaskSHCurve locllmasSHCurve; LocHHmaskSHCurve lochhmasSHCurve; + LocCCmaskcbCurve locccmascbCurve; + LocLLmaskcbCurve locllmascbCurve; + LocHHmaskcbCurve lochhmascbCurve; LocretigainCurverab locRETgainCurverab; locallutili = false; @@ -942,6 +948,9 @@ void Crop::update(int todo) locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve, lcmasSHutili); locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve, llmasSHutili); lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve, lhmasSHutili); + locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve, lcmascbutili); + locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve, llmascbutili); + lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve, lhmascbutili); locallutili = false; CurveFactory::curveLocal(locallutili, params.locallab.spots.at(sp).llcurve, lllocalcurve2, sca); localcutili = false; @@ -973,11 +982,13 @@ void Crop::update(int todo) parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, + locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, parent->locallColorMask, parent->locallExpMask, parent->locallSHMask); } else { parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, + locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0); } lllocalcurve2.clear(); @@ -995,6 +1006,12 @@ void Crop::update(int todo) locllmasexpCurve.Reset(); locccmasexpCurve.Reset(); lochhmasexpCurve.Reset(); + locllmasSHCurve.Reset(); + locccmasSHCurve.Reset(); + lochhmasSHCurve.Reset(); + locllmascbCurve.Reset(); + locccmascbCurve.Reset(); + lochhmascbCurve.Reset(); if (skip <= 2) { usleep(settings->cropsleep); //wait to avoid crash when crop 100% and move window diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 9433a07c5..3ded7d3df 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -180,6 +180,9 @@ ImProcCoordinator::ImProcCoordinator() : lcmasSHutili(false), lhmasSHutili(false), llmasSHutili(false), + lcmascbutili(false), + lhmascbutili(false), + llmascbutili(false), LHutili(false), HHutili(false), huerefs(500, -100000.f), @@ -875,6 +878,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) lcmasSHutili = false; lhmasSHutili = false; llmasSHutili = false; + lcmascbutili = false; + lhmascbutili = false; + llmascbutili = false; lhmasutili = false; lcmasutili = false; locRETgainCurve.Set(params->locallab.spots.at(sp).localTgaincurve); @@ -889,6 +895,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) locllmasSHCurve.Set(params->locallab.spots.at(sp).LLmaskSHcurve, llmasSHutili); locccmasSHCurve.Set(params->locallab.spots.at(sp).CCmaskSHcurve, lcmasSHutili); lochhmasSHCurve.Set(params->locallab.spots.at(sp).HHmaskSHcurve, lhmasSHutili); + locllmascbCurve.Set(params->locallab.spots.at(sp).LLmaskcbcurve, llmascbutili); + locccmascbCurve.Set(params->locallab.spots.at(sp).CCmaskcbcurve, lcmascbutili); + lochhmascbCurve.Set(params->locallab.spots.at(sp).HHmaskSHcurve, lhmascbutili); CurveFactory::curveLocal(locallutili, params->locallab.spots.at(sp).llcurve, lllocalcurve, sca); CurveFactory::curveCCLocal(localcutili, params->locallab.spots.at(sp).cccurve, cclocalcurve, sca); CurveFactory::curveexLocal(localexutili, params->locallab.spots.at(sp).excurve, exlocalcurve, sca); @@ -934,10 +943,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) if (sp == params->locallab.selspot) { ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, + locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, locallColorMask, locallExpMask, locallSHMask); } else { ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, + locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, 0, 0, 0); } //recalculate references after @@ -962,6 +973,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) locllmasexpCurve.Reset(); locccmasexpCurve.Reset(); lochhmasexpCurve.Reset(); + locllmasSHCurve.Reset(); + locccmasSHCurve.Reset(); + lochhmasSHCurve.Reset(); + locllmascbCurve.Reset(); + locccmascbCurve.Reset(); + lochhmascbCurve.Reset(); } } diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index b19fdaa7d..d726fe116 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -245,6 +245,9 @@ protected: LocCCmaskSHCurve locccmasSHCurve; LocLLmaskSHCurve locllmasSHCurve; LocHHmaskSHCurve lochhmasSHCurve; + LocCCmaskcbCurve locccmascbCurve; + LocLLmaskcbCurve locllmascbCurve; + LocHHmaskcbCurve lochhmascbCurve; bool locallutili; bool localcutili; @@ -258,6 +261,9 @@ protected: bool lcmasSHutili; bool lhmasSHutili; bool llmasSHutili; + bool lcmascbutili; + bool lhmascbutili; + bool llmascbutili; bool LHutili; bool HHutili; LUTf huerefs; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index ebdbc2bd4..cda96da64 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -303,6 +303,7 @@ public: void paste_ref(LabImage* spotbuffer, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp); void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, bool & locallutili, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, const LocHHmaskCurve & lochhmasCurve, bool & lhmasutili, const LocCCmaskexpCurve & locccmasexpCurve, bool &lcmasexputili, const LocLLmaskexpCurve & locllmasexpCurve, bool &llmasexputili, const LocHHmaskexpCurve & lochhmasexpCurve, bool & lhmasexputili, const LocCCmaskSHCurve & locccmasSHCurve, bool &lcmasSHutili, const LocLLmaskSHCurve & locllmasSHCurve, bool &llmasSHutili, const LocHHmaskSHCurve & lochhmasSHCurve, bool & lhmasSHutili, + const LocCCmaskcbCurve & locccmascbCurve, bool &lcmascbutili, const LocLLmaskcbCurve & locllmascbCurve, bool &llmascbutili, const LocHHmaskcbCurve & lochhmascbCurve, bool & lhmascbutili, bool &LHutili, bool &HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int llColorMask, int llExpMask, int llSHMask); void addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk); void BlurNoise_Localold(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy); diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 07492ceb7..5cb9ce9f4 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -3618,6 +3618,7 @@ void ImProcFunctions::fftw_denoise(int GW, int GH, int max_numblox_W, int min_nu void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * original, LabImage * transformed, LabImage * reserved, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, bool & locallutili, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, const LocHHmaskCurve & lochhmasCurve, bool &lhmasutili, const LocCCmaskexpCurve & locccmasexpCurve, bool &lcmasexputili, const LocLLmaskexpCurve & locllmasexpCurve, bool &llmasexputili, const LocHHmaskexpCurve & lochhmasexpCurve, bool & lhmasexputili, const LocCCmaskSHCurve & locccmasSHCurve, bool &lcmasSHutili, const LocLLmaskSHCurve & locllmasSHCurve, bool &llmasSHutili, const LocHHmaskSHCurve & lochhmasSHCurve, bool & lhmasSHutili, + const LocCCmaskcbCurve & locccmascbCurve, bool &lcmascbutili, const LocLLmaskcbCurve & locllmascbCurve, bool &llmascbutili, const LocHHmaskcbCurve & lochhmascbCurve, bool & lhmascbutili, bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref, int llColorMask, int llExpMask, int llSHMask) { //general call of others functions : important return hueref, chromaref, lumaref diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index f138483ae..977bf98b1 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1095,6 +1095,9 @@ private: LocCCmaskSHCurve locccmasSHCurve; LocLLmaskSHCurve locllmasSHCurve; LocHHmaskSHCurve lochhmasSHCurve; + LocCCmaskcbCurve locccmascbCurve; + LocLLmaskcbCurve locllmascbCurve; + LocHHmaskcbCurve lochhmascbCurve; LUTf lllocalcurve(65536, 0); LUTf cclocalcurve(65536, 0); LUTf hltonecurveloc(65536, 0); @@ -1128,6 +1131,9 @@ private: bool lcmasSHutili = false; bool lhmasSHutili = false; bool llmasSHutili = false; + bool lcmascbutili = false; + bool lhmascbutili = false; + bool llmascbutili = false; bool lcmasutili = false; bool lhmasutili = false; locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve); @@ -1142,6 +1148,9 @@ private: locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve, lcmasSHutili); locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve, llmasSHutili); lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve, lhmasSHutili); + locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve, lcmascbutili); + locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve, llmascbutili); + lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve, lhmascbutili); CurveFactory::curveLocal(locallutili, params.locallab.spots.at(sp).llcurve, lllocalcurve, 1); CurveFactory::curveCCLocal(localcutili, params.locallab.spots.at(sp).cccurve, cclocalcurve, 1); CurveFactory::curveexLocal(localexutili, params.locallab.spots.at(sp).excurve, exlocalcurve, 1); @@ -1169,6 +1178,7 @@ private: // No Locallab mask is shown in exported picture ipf.Lab_Local(2, sp, (float**)shbuffer, labView, labView, reservView, 0, 0, fw, fh, 1, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, + locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0); From 89e63639be155bb22ee4b4bf0bbe9ec4f0565424 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Sun, 14 Apr 2019 16:58:11 +0200 Subject: [PATCH 23/59] Making pseudo-HiDPI tweaks optional, disabled by default (see issue #5276) --- rtdata/languages/Francais | 1 + rtdata/languages/default | 1 + rtgui/main.cc | 18 ++++++++++-------- rtgui/options.cc | 6 ++++++ rtgui/options.h | 1 + rtgui/preferences.cc | 8 ++++++++ rtgui/preferences.h | 2 ++ rtgui/rtscalable.cc | 6 ++++++ rtgui/rtwindow.cc | 16 ++++++---------- 9 files changed, 41 insertions(+), 18 deletions(-) diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 36ffa2afa..2036a2ce3 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -1036,6 +1036,7 @@ PREFERENCES_APPEARANCE_COLORPICKERFONT;Police des ancres de vérification couleu PREFERENCES_APPEARANCE_CROPMASKCOLOR;Couleur du masque de recadrage PREFERENCES_APPEARANCE_MAINFONT;Police principale PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Couleur du cadre dans le Navigateur +PREFERENCES_APPEARANCE_PSEUDOHIDPI;Mode pseudo-HiDPI PREFERENCES_APPEARANCE_THEME;Thème PREFERENCES_APPLNEXTSTARTUP;appliqué au prochain lancement PREFERENCES_AUTOMONPROFILE;Utiliser automatiquement le profil de l'écran principal diff --git a/rtdata/languages/default b/rtdata/languages/default index 91535be42..81b4eeaa4 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1039,6 +1039,7 @@ PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color PREFERENCES_APPEARANCE_MAINFONT;Main font PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Navigator guide color +PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode PREFERENCES_APPEARANCE_THEME;Theme PREFERENCES_APPLNEXTSTARTUP;restart required PREFERENCES_AUTOMONPROFILE;Use operating system's main monitor color profile diff --git a/rtgui/main.cc b/rtgui/main.cc index 322081b69..5cfe93718 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -375,14 +375,6 @@ int main (int argc, char **argv) Glib::init(); // called by Gtk::Main, but this may be important for thread handling, so we call it ourselves now Gio::init (); - // Reading/updating GDK_SCALE early if it exists - const gchar *gscale = g_getenv("GDK_SCALE"); - if (gscale && gscale[0] == '2') { - initialGdkScale = 2; - } - // HOMBRE: On Windows, if resolution is set to 200%, Gtk internal variables are SCALE=2 and DPI=96 - g_setenv("GDK_SCALE", "1", true); - #ifdef WIN32 if (GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)) == 0x0003) { // started from msys2 console => do not buffer stdout @@ -536,6 +528,16 @@ int main (int argc, char **argv) int ret = 0; + if (options.pseudoHiDPISupport) { + // Reading/updating GDK_SCALE early if it exists + const gchar *gscale = g_getenv("GDK_SCALE"); + if (gscale && gscale[0] == '2') { + initialGdkScale = 2; + } + // HOMBRE: On Windows, if resolution is set to 200%, Gtk internal variables are SCALE=2 and DPI=96 + g_setenv("GDK_SCALE", "1", true); + } + gdk_threads_set_lock_functions (G_CALLBACK (myGdkLockEnter), (G_CALLBACK (myGdkLockLeave))); gdk_threads_init(); gtk_init (&argc, &argv); // use the "--g-fatal-warnings" command line flag to make warnings fatal diff --git a/rtgui/options.cc b/rtgui/options.cc index 0df70a4fd..4ba6ee5fc 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -345,6 +345,7 @@ void Options::setDefaults() fontSize = 10; CPFontFamily = "default"; CPFontSize = 8; + pseudoHiDPISupport = false; lastScale = 5; lastShowAllExif = false; panAccelFactor = 5; @@ -1252,6 +1253,10 @@ void Options::readFromFile(Glib::ustring fname) CPFontSize = keyFile.get_integer("GUI", "CPFontSize"); } + if (keyFile.has_key("GUI", "ScaledIcons")) { + pseudoHiDPISupport = keyFile.get_boolean("GUI", "PseudoHiDPISupport"); + } + if (keyFile.has_key("GUI", "LastPreviewScale")) { lastScale = keyFile.get_integer("GUI", "LastPreviewScale"); } @@ -2062,6 +2067,7 @@ void Options::saveToFile(Glib::ustring fname) keyFile.set_integer("GUI", "FontSize", fontSize); keyFile.set_string("GUI", "CPFontFamily", CPFontFamily); keyFile.set_integer("GUI", "CPFontSize", CPFontSize); + keyFile.set_boolean("GUI", "PseudoHiDPISupport", pseudoHiDPISupport); keyFile.set_integer("GUI", "LastPreviewScale", lastScale); keyFile.set_boolean("GUI", "LastShowAllExif", lastShowAllExif); keyFile.set_integer("GUI", "PanAccelFactor", panAccelFactor); diff --git a/rtgui/options.h b/rtgui/options.h index c06d9df30..304a1e220 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -212,6 +212,7 @@ public: int fontSize; // RT's main font size (units: pt) Glib::ustring CPFontFamily; // ColorPicker font family int CPFontSize; // ColorPicker font size (units: pt) + bool pseudoHiDPISupport; bool fbOnlyRaw; bool fbShowDateTime; bool fbShowBasicExif; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index cc517d4e0..42cb9a607 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -1048,6 +1048,9 @@ Gtk::Widget* Preferences::getGeneralPanel () navGuideColorCB = Gtk::manage(new Gtk::ColorButton()); navGuideColorCB->set_use_alpha(true); + pseudoHiDPI = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_APPEARANCE_PSEUDOHIDPI") + Glib::ustring (" (") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")")); + setExpandAlignProperties(pseudoHiDPI, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + Gtk::VSeparator *vSep = Gtk::manage(new Gtk::VSeparator()); appearanceGrid->attach(*themeLbl, 0, 0, 1, 1); @@ -1062,6 +1065,7 @@ Gtk::Widget* Preferences::getGeneralPanel () appearanceGrid->attach(*colorPickerFontFB, 1, 2, 1, 1); appearanceGrid->attach(*navGuideColorLbl, 3, 2, 1, 1); appearanceGrid->attach(*navGuideColorCB, 4, 2, 1, 1); + appearanceGrid->attach(*pseudoHiDPI, 0, 3, 5, 1); appearanceFrame->add(*appearanceGrid); vbGeneral->attach_next_to(*appearanceFrame, *flang, Gtk::POS_BOTTOM, 2, 1); @@ -1642,6 +1646,8 @@ void Preferences::storePreferences () moptions.CPFontSize = cpfd.get_size() / Pango::SCALE; } + moptions.pseudoHiDPISupport = pseudoHiDPI->get_active(); + #ifdef WIN32 moptions.gimpDir = gimpDir->get_filename (); moptions.psDir = psDir->get_filename (); @@ -1906,6 +1912,8 @@ void Preferences::fillPreferences () colorPickerFontFB->set_font_name (Glib::ustring::compose ("%1 %2", options.CPFontFamily, options.CPFontSize)); } + pseudoHiDPI->set_active(options.pseudoHiDPISupport); + showDateTime->set_active (moptions.fbShowDateTime); showBasicExif->set_active (moptions.fbShowBasicExif); showExpComp->set_active (moptions.fbShowExpComp); diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 6f434c477..4f92e9e22 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -145,6 +145,8 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Gtk::FontButton* colorPickerFontFB; Gtk::ColorButton* cropMaskColorCB; Gtk::ColorButton* navGuideColorCB; + Gtk::CheckButton* pseudoHiDPI; + Gtk::SpinButton* maxRecentFolders; Gtk::SpinButton* maxThumbHeightSB; diff --git a/rtgui/rtscalable.cc b/rtgui/rtscalable.cc index e497e3f08..aaa10bd21 100644 --- a/rtgui/rtscalable.cc +++ b/rtgui/rtscalable.cc @@ -36,6 +36,12 @@ Gtk::TextDirection RTScalable::direction = Gtk::TextDirection::TEXT_DIR_NONE; void RTScalable::setDPInScale (const double newDPI, const int newScale) { + if (!options.pseudoHiDPISupport) { + scale = 1; + dpi = baseDPI; + return; + } + if (scale != newScale || (scale == 1 && dpi != newDPI)) { // reload all images scale = newScale; diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 4e5c6f753..3d7f01e84 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -106,12 +106,6 @@ RTWindow::RTWindow () Gtk::Settings::get_for_screen (screen)->property_gtk_theme_name() = "Adwaita"; Gtk::Settings::get_for_screen (screen)->property_gtk_application_prefer_dark_theme() = true; -#if defined(__APPLE__) - // This will force screen resolution regarding font, but I don't think it's compliant with Gtk guidelines... - // Do not confuse with screen scaling, where everything is scaled up ! - screen->set_resolution (RTScalable::baseDPI); -#endif - Glib::RefPtr regex = Glib::Regex::create (THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); Glib::ustring filename; Glib::MatchInfo mInfo; @@ -170,7 +164,9 @@ RTWindow::RTWindow () css = Glib::ustring::compose ("* { font-family: %1; font-size: %2pt}", options.fontFamily, options.fontSize * (int)initialGdkScale); #endif //GTK318 - fontScale = options.fontSize / (float)RTScalable::baseFontSize; + if (options.pseudoHiDPISupport) { + fontScale = options.fontSize / (float)RTScalable::baseFontSize; + } if (options.rtSettings.verbose) { printf("\"Non-Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", options.fontSize, (int)initialGdkScale, fontScale); } @@ -196,15 +192,15 @@ RTWindow::RTWindow () } else { pt = fontSize / Pango::SCALE; } - fontScale = (float)pt / (float)RTScalable::baseFontSize; + if (options.pseudoHiDPISupport) { + fontScale = (float)pt / (float)RTScalable::baseFontSize; + } if ((int)initialGdkScale > 1 || pt != RTScalable::baseFontSize) { css = Glib::ustring::compose ("* { font-size: %1pt}", pt * (int)initialGdkScale); if (options.rtSettings.verbose) { printf("\"Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", pt, (int)initialGdkScale, fontScale); } } - } else { - fontScale = 1.f; } } if (!css.empty()) { From feb122553e5ddfa81b8054ee6cc62c5e7e02d73a Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Sun, 14 Apr 2019 17:19:48 +0200 Subject: [PATCH 24/59] Minor bugfix --- rtgui/options.cc | 2 +- rtgui/preferences.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rtgui/options.cc b/rtgui/options.cc index 4ba6ee5fc..8f601b764 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -1253,7 +1253,7 @@ void Options::readFromFile(Glib::ustring fname) CPFontSize = keyFile.get_integer("GUI", "CPFontSize"); } - if (keyFile.has_key("GUI", "ScaledIcons")) { + if (keyFile.has_key("GUI", "PseudoHiDPISupport")) { pseudoHiDPISupport = keyFile.get_boolean("GUI", "PseudoHiDPISupport"); } diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 42cb9a607..b37fc537a 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -1056,7 +1056,7 @@ Gtk::Widget* Preferences::getGeneralPanel () appearanceGrid->attach(*themeLbl, 0, 0, 1, 1); appearanceGrid->attach(*themeCBT, 1, 0, 1, 1); appearanceGrid->attach(*themeRestartLbl, 2, 0, 2, 1); - appearanceGrid->attach(*vSep, 2, 1, 1, 3); + appearanceGrid->attach(*vSep, 2, 1, 1, 2); appearanceGrid->attach(*mainFontLbl, 0, 1, 1, 1); appearanceGrid->attach(*mainFontFB, 1, 1, 1, 1); appearanceGrid->attach(*cropMaskColorLbl, 3, 1, 1, 1); From 35de3e72edf3d9a01828ebb6805b0679f4f8217a Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 14 Apr 2019 17:42:55 +0200 Subject: [PATCH 25/59] Add CBDL mask to rtengine - but disabled --- rtdata/languages/default | 9 ++ rtengine/dcrop.cc | 4 +- rtengine/improccoordinator.cc | 5 +- rtengine/improccoordinator.h | 4 +- rtengine/improcfun.h | 2 +- rtengine/iplocallab.cc | 185 ++++++++++++++++++++++++++++++---- rtengine/rtengine.h | 2 +- rtengine/simpleprocess.cc | 2 +- rtgui/locallab.cc | 9 +- rtgui/toolpanelcoord.cc | 6 +- 10 files changed, 193 insertions(+), 35 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 560d36a52..df8882dd3 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -909,6 +909,15 @@ HISTORY_MSG_661;Local - cbdl contrast residual HISTORY_MSG_662;Local - deNoise lum f 0 HISTORY_MSG_663;Local - deNoise lum f 2 HISTORY_MSG_664;Local - cbdl Blur +HISTORY_MSG_665;Local - cbdl mask Blend +HISTORY_MSG_666;Local - cbdl mask radius +HISTORY_MSG_667;Local - cbdl mask chroma +HISTORY_MSG_668;Local - cbdl mask gamma +HISTORY_MSG_669;Local - cbdl mask slope +HISTORY_MSG_670;Local - cbdl mask C +HISTORY_MSG_671;Local - cbdl mask L +HISTORY_MSG_672;Local - cbdl mask CL +HISTORY_MSG_673;Local - Use cbdl mask HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index bdb240cf6..400353153 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -983,13 +983,13 @@ void Crop::update(int todo) loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, - LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, parent->locallColorMask, parent->locallExpMask, parent->locallSHMask); + LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, parent->locallColorMask, parent->locallExpMask, parent->locallSHMask, parent->locallcbMask); } else { parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, - LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0); + LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0, 0); } lllocalcurve2.clear(); cclocalcurve2.clear(); diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 3ded7d3df..cb63f025f 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -203,6 +203,7 @@ ImProcCoordinator::ImProcCoordinator() : locallColorMask(0), locallExpMask(0), locallSHMask(0), + locallcbMask(0), avg(0), retistrsav(nullptr) @@ -944,12 +945,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, - LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, locallColorMask, locallExpMask, locallSHMask); + LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, locallColorMask, locallExpMask, locallSHMask, locallcbMask); } else { ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, - LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, 0, 0, 0); + LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, 0, 0, 0, 0); } //recalculate references after if (params->locallab.spots.at(sp).spotMethod == "exc") { diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index d726fe116..05795e7d5 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -278,6 +278,7 @@ protected: int locallColorMask; int locallExpMask; int locallSHMask; + int locallcbMask; float avg; public: @@ -347,11 +348,12 @@ public: updaterThreadStart.unlock(); } - void setLocallabMaskVisibility (int locallColorMask, int locallExpMask, int locallSHMask) override + void setLocallabMaskVisibility (int locallColorMask, int locallExpMask, int locallSHMask, int locallcbMask) override { this->locallColorMask = locallColorMask; this->locallExpMask = locallExpMask; this->locallSHMask = locallSHMask; + this->locallcbMask = locallcbMask; } void setProgressListener (ProgressListener* pl) override diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index cda96da64..7b3e69995 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -304,7 +304,7 @@ public: void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, bool & locallutili, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, const LocHHmaskCurve & lochhmasCurve, bool & lhmasutili, const LocCCmaskexpCurve & locccmasexpCurve, bool &lcmasexputili, const LocLLmaskexpCurve & locllmasexpCurve, bool &llmasexputili, const LocHHmaskexpCurve & lochhmasexpCurve, bool & lhmasexputili, const LocCCmaskSHCurve & locccmasSHCurve, bool &lcmasSHutili, const LocLLmaskSHCurve & locllmasSHCurve, bool &llmasSHutili, const LocHHmaskSHCurve & lochhmasSHCurve, bool & lhmasSHutili, const LocCCmaskcbCurve & locccmascbCurve, bool &lcmascbutili, const LocLLmaskcbCurve & locllmascbCurve, bool &llmascbutili, const LocHHmaskcbCurve & lochhmascbCurve, bool & lhmascbutili, - bool &LHutili, bool &HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int llColorMask, int llExpMask, int llSHMask); + bool &LHutili, bool &HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int llColorMask, int llExpMask, int llSHMask, int llcbMask); void addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk); void BlurNoise_Localold(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy); void InverseBlurNoise_Local(const struct local_params& lp, const float hueref, const float chromaref, const float lumaref, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy, int sk); diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 5cb9ce9f4..7c8e1c112 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -188,6 +188,11 @@ struct local_params { float chromaSH; float gammaSH; float slomaSH; + float radmacb; + float blendmacb; + float chromacb; + float gammacb; + float slomacb; float struexp; float blurexp; float blurcol; @@ -220,6 +225,7 @@ struct local_params { int showmaskcolmet; int showmaskexpmet; int showmaskSHmet; + int showmaskcbmet; int blurmet; float noiself; float noiself0; @@ -233,7 +239,7 @@ struct local_params { float noisecc; float mulloc[5]; float threshol; - float chromacb; +// float chromacb; float strengt; float gamm; float esto; @@ -267,6 +273,7 @@ struct local_params { bool enaColorMask; bool enaExpMask; bool enaSHMask; + bool enacbMask; int highlihs; int shadowhs; int radiushs; @@ -354,7 +361,7 @@ static void SobelCannyLuma(float **sobelL, float **luma, int bfw, int bfh, float -static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locallab, struct local_params& lp, int llColorMask, int llExpMask, int llSHMask) +static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locallab, struct local_params& lp, int llColorMask, int llExpMask, int llSHMask, int llcbMask) { int w = oW; int h = oH; @@ -412,13 +419,17 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall } else if (locallab.spots.at(sp).gridMethod == "two") { lp.gridmet = 1; } +printf("llcbmask=%i\n", llcbMask); +printf("llSHmask=%i\n", llSHMask); lp.showmaskcolmet = llColorMask; lp.showmaskexpmet = llExpMask; lp.showmaskSHmet = llSHMask; - lp.enaColorMask = locallab.spots.at(sp).enaColorMask && llColorMask == 0 && llExpMask == 0 && llSHMask == 0; // Color & Light mask is deactivated if Exposure mask is visible - lp.enaExpMask = locallab.spots.at(sp).enaExpMask && llExpMask == 0 && llColorMask == 0 && llSHMask == 0; // Exposure mask is deactivated if Color & Light mask is visible - lp.enaSHMask = locallab.spots.at(sp).enaSHMask && llSHMask == 0 && llColorMask == 0 && llExpMask == 0; // SH mask is deactivated if Color & Light mask is visible + lp.showmaskcbmet = llcbMask; + lp.enaColorMask = locallab.spots.at(sp).enaColorMask && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0;; // Color & Light mask is deactivated if Exposure mask is visible + lp.enaExpMask = locallab.spots.at(sp).enaExpMask && llExpMask == 0 && llColorMask == 0 && llSHMask == 0 && llcbMask == 0;; // Exposure mask is deactivated if Color & Light mask is visible + lp.enaSHMask = locallab.spots.at(sp).enaSHMask && llSHMask == 0 && llColorMask == 0 && llExpMask == 0 && llcbMask == 0;; // + lp.enacbMask = locallab.spots.at(sp).enacbMask && llcbMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0;; if (locallab.spots.at(sp).blurMethod == "norm") { @@ -539,6 +550,11 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall int shadhs = locallab.spots.at(sp).shadows; int shtonals = locallab.spots.at(sp).s_tonalwidth; int radhs = locallab.spots.at(sp).sh_radius; + float blendmaskcb = ((float) locallab.spots.at(sp).blendmaskcb) / 100.f ; + float radmaskcb = ((float) locallab.spots.at(sp).radmaskcb); + float chromaskcb = ((float) locallab.spots.at(sp).chromaskcb); + float gammaskcb = ((float) locallab.spots.at(sp).gammaskcb); + float slomaskcb = ((float) locallab.spots.at(sp).slomaskcb); lp.cir = circr; lp.actsp = acti; @@ -573,6 +589,11 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.chromaSH = chromaskSH; lp.gammaSH = gammaskSH; lp.slomaSH = slomaskSH; + lp.blendmacb = blendmaskcb; + lp.radmacb = radmaskcb; + lp.chromacb = chromaskcb; + lp.gammacb = gammaskcb; + lp.slomacb = slomaskcb; lp.struexp = structexpo; lp.blurexp = blurexpo; @@ -2378,9 +2399,11 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const bool expshow = ((lp.showmaskexpmet == 1 || lp.showmaskexpmet == 2) && senstype == 1); const bool colshow = ((lp.showmaskcolmet == 1 || lp.showmaskcolmet == 2) && senstype == 0); const bool SHshow = ((lp.showmaskSHmet == 1 || lp.showmaskSHmet == 2) && senstype == 9); + const bool cbshow = ((lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) && senstype == 6); const bool previewcol = ((lp.showmaskcolmet == 5) && senstype == 0); const bool previewexp = ((lp.showmaskexpmet == 5) && senstype == 1); const bool previewSH = ((lp.showmaskSHmet == 4) && senstype == 9); + const bool previewcb = ((lp.showmaskcbmet == 4) && senstype == 6); std::unique_ptr origblur(new LabImage(bfw, bfh)); std::unique_ptr origblurmask; @@ -2407,7 +2430,8 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const bool usemaskexp = (lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 5) && senstype == 1; const bool usemaskcol = (lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 5) && senstype == 0; const bool usemaskSH = (lp.showmaskSHmet == 2 || lp.enaSHMask || lp.showmaskSHmet == 4) && senstype == 9; - const bool usemaskall = (usemaskSH || usemaskcol || usemaskexp); + const bool usemaskcb = (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 4) && senstype == 6; + const bool usemaskall = (usemaskSH || usemaskcol || usemaskexp || usemaskcb); if (usemaskall) { @@ -2541,7 +2565,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor float clb = 0.f; const float cli = buflight[y - ystart][x - xstart]; - const float clc = (previewcol || previewexp || previewSH) ? settings->previewselection * 100.f : bufchro[y - ystart][x - xstart]; + const float clc = (previewcol || previewexp || previewSH || previewcb) ? settings->previewselection * 100.f : bufchro[y - ystart][x - xstart]; if (senstype <= 1) { @@ -2612,7 +2636,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor flia = (100.f + realstradE + 100.f * realstrchdE) / 100.f; flib = (100.f + realstrbdE + 100.f * realstrchdE) / 100.f; - if (previewcol || previewexp || previewSH) { + if (previewcol || previewexp || previewSH || previewcb) { flia = (100.f + realstradE + realstrchdE) / 100.f; flib = (100.f + realstrbdE + realstrchdE) / 100.f; } @@ -2620,7 +2644,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor flia = (100.f + 0.3f * lp.strengrid * realstradE + realstrchdE) / 100.f; flib = (100.f + 0.3f * lp.strengrid * realstrbdE + realstrchdE) / 100.f; - if (previewcol || previewexp || previewSH) { + if (previewcol || previewexp || previewSH || previewcb) { flia = (100.f + realstradE + realstrchdE) / 100.f; flib = (100.f + realstrbdE + realstrchdE) / 100.f; } @@ -2663,11 +2687,11 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor } } - if (expshow || colshow || SHshow) { + if (expshow || colshow || SHshow || cbshow) { transformed->L[y][x] = CLIP(12000.f + diflc); transformed->a[y][x] = CLIPC(difa); transformed->b[y][x] = CLIPC(difb); - } else if (previewcol || previewexp || previewSH) { + } else if (previewcol || previewexp || previewSH || previewcb) { transformed->a[y][x] = 0.f; transformed->b[y][x] = (difb); } @@ -2727,7 +2751,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor flia = (100.f + realstradE + 100.f * realstrchdE) / 100.f; flib = (100.f + realstrbdE + 100.f * realstrchdE) / 100.f; - if (previewcol || previewexp || previewSH) { + if (previewcol || previewexp || previewSH || previewcb) { flia = (100.f + realstradE + realstrchdE) / 100.f; flib = (100.f + realstrbdE + realstrchdE) / 100.f; } @@ -2735,7 +2759,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor flia = (100.f + 0.3f * lp.strengrid * realstradE + realstrchdE) / 100.f; flib = (100.f + 0.3f * lp.strengrid * realstrbdE + realstrchdE) / 100.f; - if (previewcol || previewexp || previewSH) { + if (previewcol || previewexp || previewSH || previewcb) { flia = (100.f + realstradE + realstrchdE) / 100.f; flib = (100.f + realstrbdE + realstrchdE) / 100.f; } @@ -2776,11 +2800,11 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor } } - if (expshow || colshow || SHshow) { + if (expshow || colshow || SHshow || cbshow) { transformed->L[y][x] = CLIP(12000.f + diflc); transformed->a[y][x] = CLIPC(difa); transformed->b[y][x] = CLIPC(difb); - } else if (previewcol || previewexp || previewSH) { + } else if (previewcol || previewexp || previewSH || previewcb) { transformed->a[y][x] = 0.f; transformed->b[y][x] = difb; } @@ -3196,7 +3220,7 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform if (params->locallab.enabled) { //always calculate hueref, chromaref, lumaref before others operations use in normal mode for all modules exceprt denoise struct local_params lp; - calcLocalParams(sp, oW, oH, params->locallab, lp, 0, 0, 0); + calcLocalParams(sp, oW, oH, params->locallab, lp, 0, 0, 0, 0); int begy = lp.yc - lp.lyT; int begx = lp.xc - lp.lxL; int yEn = lp.yc + lp.ly; @@ -3619,7 +3643,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, bool & locallutili, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, const LocHHmaskCurve & lochhmasCurve, bool &lhmasutili, const LocCCmaskexpCurve & locccmasexpCurve, bool &lcmasexputili, const LocLLmaskexpCurve & locllmasexpCurve, bool &llmasexputili, const LocHHmaskexpCurve & lochhmasexpCurve, bool & lhmasexputili, const LocCCmaskSHCurve & locccmasSHCurve, bool &lcmasSHutili, const LocLLmaskSHCurve & locllmasSHCurve, bool &llmasSHutili, const LocHHmaskSHCurve & lochhmasSHCurve, bool & lhmasSHutili, const LocCCmaskcbCurve & locccmascbCurve, bool &lcmascbutili, const LocLLmaskcbCurve & locllmascbCurve, bool &llmascbutili, const LocHHmaskcbCurve & lochhmascbCurve, bool & lhmascbutili, - bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref, int llColorMask, int llExpMask, int llSHMask) + bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref, int llColorMask, int llExpMask, int llSHMask, int llcbMask) { //general call of others functions : important return hueref, chromaref, lumaref if (params->locallab.enabled) { @@ -3632,7 +3656,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o int del = 3; // to avoid crash with [loy - begy] and [lox - begx] and bfh bfw // with gtk2 [loy - begy-1] [lox - begx -1 ] and del = 1 struct local_params lp; - calcLocalParams(sp, oW, oH, params->locallab, lp, llColorMask, llExpMask, llSHMask); + calcLocalParams(sp, oW, oH, params->locallab, lp, llColorMask, llExpMask, llSHMask, llcbMask); const float radius = lp.rad / (sk * 1.4f); //0 to 70 ==> see skip int strred = 1;//(lp.strucc - 1); @@ -4934,7 +4958,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o //end TM //begin cbdl - if ((lp.mulloc[0] != 1.f || lp.mulloc[1] != 1.f || lp.mulloc[2] != 1.f || lp.mulloc[3] != 1.f || lp.mulloc[4] != 1.f || lp.clarityml != 0.f || lp.contresid != 0.f) && lp.cbdlena) { + if ((lp.mulloc[0] != 1.f || lp.mulloc[1] != 1.f || lp.mulloc[2] != 1.f || lp.mulloc[3] != 1.f || lp.mulloc[4] != 1.f || lp.clarityml != 0.f || lp.contresid != 0.f || lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) && lp.cbdlena) { if (call <= 3) { //call from simpleprocess dcrop improcc const int ystart = std::max(static_cast(lp.yc - lp.lyT) - cy, 0); const int yend = std::min(static_cast(lp.yc + lp.ly) - cy, original->H); @@ -4951,6 +4975,124 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o JaggedArray bufchrom(bfw, bfh, true); std::unique_ptr loctemp(new LabImage(bfw, bfh)); std::unique_ptr origcbdl(new LabImage(bfw, bfh)); + std::unique_ptr bufmaskorigcb; + std::unique_ptr bufmaskblurcb; + std::unique_ptr originalmaskcb; +printf("showmet=%i \n", lp.showmaskcbmet); + if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) { + bufmaskorigcb.reset(new LabImage(bfw, bfh)); + bufmaskblurcb.reset(new LabImage(bfw, bfh)); + originalmaskcb.reset(new LabImage(bfw, bfh)); + } + + array2D ble(bfw, bfh); + array2D guid(bfw, bfh); + float meanfab, fab; + + mean_fab(xstart, ystart, bfw, bfh, loctemp.get(), original, fab, meanfab, lp.chromaSH); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for (int y = 0; y < bfh; y++) { + for (int x = 0; x < bfw; x++) { + loctemp->L[y][x] = original->L[y + ystart][x + xstart]; + } + } + + if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) { +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for (int ir = 0; ir < bfh; ir++) { + for (int jr = 0; jr < bfw; jr++) { + float kmaskLexp = 0; + float kmaskCH = 0; + + if (locllmascbCurve && llmascbutili) { + float ligh = loctemp->L[ir][jr] / 32768.f; + kmaskLexp = 32768.f * LIM01(1.f - locllmascbCurve[500.f * ligh]); + } + + if (lp.showmaskcbmet != 4) { + if (locccmascbCurve && lcmascbutili) { + float chromask = 0.0001f + sqrt(SQR((loctemp->a[ir][jr]) / fab) + SQR((loctemp->b[ir][jr]) / fab)); + kmaskCH = LIM01(1.f - locccmascbCurve[500.f * chromask]); + } + } + + if (lochhmascbCurve && lhmascbutili) { + float huema = xatan2f(loctemp->b[ir][jr], loctemp->a[ir][jr]); + float h = Color::huelab_to_huehsv2(huema); + h += 1.f / 6.f; + + if (h > 1.f) { + h -= 1.f; + } + + float valHH = LIM01(1.f - lochhmascbCurve[500.f * h]); + + if (lp.showmaskcbmet != 4) { + kmaskCH += valHH; + } + + kmaskLexp += 32768.f * valHH; + } + + bufmaskblurcb->L[ir][jr] = CLIPLOC(kmaskLexp); + bufmaskblurcb->a[ir][jr] = kmaskCH; + bufmaskblurcb->b[ir][jr] = kmaskCH; + ble[ir][jr] = bufmaskblurcb->L[ir][jr] / 32768.f; + guid[ir][jr] = loctemp->L[ir][jr] / 32768.f; + + } + } + + if (lp.radmacb > 0.f) { + guidedFilter(guid, ble, ble, lp.radmacb * 10.f / sk, 0.001, multiThread, 4); + } + + LUTf lutTonemaskcb(65536); + calcGammaLut(lp.gammacb, lp.slomacb, lutTonemaskcb); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for (int ir = 0; ir < bfh; ir++) + for (int jr = 0; jr < bfw; jr++) { + float L_; + bufmaskblurcb->L[ir][jr] = LIM01(ble[ir][jr]) * 32768.f; + L_ = 2.f * bufmaskblurcb->L[ir][jr]; + bufmaskblurcb->L[ir][jr] = lutTonemaskcb[L_]; + } + + } + + float radiusb = 1.f / sk; + + if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) { +printf("OK show\n"); + +#ifdef _OPENMP + #pragma omp parallel +#endif + { + gaussianBlur(bufmaskblurcb->L, bufmaskorigcb->L, bfw, bfh, radiusb); + gaussianBlur(bufmaskblurcb->a, bufmaskorigcb->a, bfw, bfh, 1.f + (0.5f * lp.radmacb) / sk); + gaussianBlur(bufmaskblurcb->b, bufmaskorigcb->b, bfw, bfh, 1.f + (0.5f * lp.radmacb) / sk); + } + + if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 4 || lp.enacbMask) { + blendmask(lp, xstart, ystart, cx, cy, bfw, bfh, loctemp.get(), original, bufmaskorigcb.get(), originalmaskcb.get(), lp.blendmacb); + + } else if (lp.showmaskcbmet == 3) { + showmask(lp, xstart, ystart, cx, cy, bfw, bfh, loctemp.get(), transformed, bufmaskorigcb.get()); + return; + } + } constexpr float b_l = -5.f; constexpr float t_l = 25.f; @@ -4958,6 +5100,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o constexpr float b_r = 170.f; constexpr double skinprot = 0.; constexpr int choice = 0; + if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 4 || lp.enacbMask) { #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) @@ -5009,9 +5152,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o if (lp.softradiuscb > 0.f) { softprocess(origcbdl.get(), buflight, lp.softradiuscb, bfh, bfw, sk, multiThread); } + } - - transit_shapedetect(6, loctemp.get(), nullptr, buflight, bufchrom, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); + transit_shapedetect(6, loctemp.get(), originalmaskcb.get(), buflight, bufchrom, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); //chroma CBDL begin here if (lp.chromacb > 0.f) { diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 981f4c73a..a2d745127 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -499,7 +499,7 @@ public: virtual void updateUnLock() = 0; - virtual void setLocallabMaskVisibility(int locallColorMask, int locallExpMask, int locallSHMask) = 0; + virtual void setLocallabMaskVisibility(int locallColorMask, int locallExpMask, int locallSHMask, int locallcbMask) = 0; /** Creates and returns a Crop instance that acts as a window on the image * @param editDataProvider pointer to the EditDataProvider that communicates with the EditSubscriber diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 977bf98b1..f3379b0c5 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1179,7 +1179,7 @@ private: ipf.Lab_Local(2, sp, (float**)shbuffer, labView, labView, reservView, 0, 0, fw, fh, 1, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, - LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0); + LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0, 0); // Clear local curves diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 8e075890b..cdf1be708 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -1025,7 +1025,7 @@ Locallab::Locallab(): cbdlBox->pack_start(*residFrame); cbdlBox->pack_start(*softradiuscb); cbdlBox->pack_start(*sensicb); -// cbdlBox->pack_start(*maskcbFrame); + // cbdlBox->pack_start(*maskcbFrame); expcbdl->add(*cbdlBox); expcbdl->setLevel(2); @@ -2699,7 +2699,7 @@ void Locallab::showmaskcbMethodChanged() // When one mask state is changed, other masks are deactivated disableListener(); - showmaskcbMethod->set_active(0); + //showmaskcbMethod->set_active(0); enableListener(); if (listener) { @@ -2726,6 +2726,9 @@ Locallab::llMaskVisibility* Locallab::getMaskVisibility() maskStruct->expMask = showmaskexpMethod->get_active_row_number(); maskStruct->SHMask = showmaskSHMethod->get_active_row_number(); maskStruct->cbMask = showmaskcbMethod->get_active_row_number(); + printf("SHmask=%i \n", maskStruct->SHMask); + printf("cbmask=%i \n", maskStruct->cbMask); + return maskStruct; } @@ -4639,7 +4642,7 @@ void Locallab::disableListener() // Contrast by detail levels enablecbdlConn.block(true); enacbMaskConn.block(true); - showmaskSHMethodConn.block(true); + showmaskcbMethodConn.block(true); // Denoise enabledenoiConn.block(true); } diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index b3072326e..902a9d350 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -460,9 +460,9 @@ void ToolPanelCoordinator::panelChanged(const rtengine::ProcEvent& event, const } // Manage Locallab mask visibility - if (event == rtengine::EvlocallabshowmaskcolMethod || event == rtengine::EvlocallabshowmaskexpMethod || event == rtengine::EvlocallabshowmaskSHMethod) { + if (event == rtengine::EvlocallabshowmaskcolMethod || event == rtengine::EvlocallabshowmaskexpMethod || event == rtengine::EvlocallabshowmaskSHMethod || event == rtengine::EvlocallabshowmaskcbMethod) { Locallab::llMaskVisibility* maskStruc = locallab->getMaskVisibility(); - ipc->setLocallabMaskVisibility(maskStruc->colorMask, maskStruc->expMask, maskStruc->SHMask); + ipc->setLocallabMaskVisibility(maskStruc->colorMask, maskStruc->expMask, maskStruc->SHMask, maskStruc->cbMask); } ipc->endUpdateParams(changeFlags); // starts the IPC processing @@ -570,7 +570,7 @@ void ToolPanelCoordinator::profileChange( // Reset Locallab mask visibility when a picture is loaded if (event == rtengine::EvPhotoLoaded) { locallab->resetMaskVisibility(); - ipc->setLocallabMaskVisibility(0, 0, 0); + ipc->setLocallabMaskVisibility(0, 0, 0, 0); } // start the IPC processing From e6d1ff5cf43dc749715fbe00a3fe798976edc4cd Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 14 Apr 2019 18:39:38 +0200 Subject: [PATCH 26/59] Active mask for CBDL and some improvments --- rtengine/iplocallab.cc | 16 ++++++---------- rtgui/locallab.cc | 22 +++++++++++++++------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 7c8e1c112..44bf10a11 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -419,8 +419,6 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall } else if (locallab.spots.at(sp).gridMethod == "two") { lp.gridmet = 1; } -printf("llcbmask=%i\n", llcbMask); -printf("llSHmask=%i\n", llSHMask); lp.showmaskcolmet = llColorMask; lp.showmaskexpmet = llExpMask; @@ -2589,11 +2587,11 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor float diflc = 0.f; float newhr = 0.f; - if (senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8) {//all except color and light (TODO) and exposure + if (senstype == 2 || senstype == 3 || senstype == 8) {//all except color and light (TODO) and exposure const float lightc = bufexporig->L[y - ystart][x - xstart]; const float fli = (100.f + realstrdE) / 100.f; transformed->L[y][x] = CLIP(original->L[y][x] + (lightc * fli - original->L[y][x]) * factorx); - } else if (senstype == 1 || senstype == 0 || senstype == 9) { + } else if (senstype == 1 || senstype == 0 || senstype == 9 || senstype == 6) { if (HHutili) { const float hhro = bufhh[y - ystart][x - xstart]; @@ -2705,11 +2703,11 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor float diflc = 0.f; float newhr = 0.f; - if (senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8) { //retinex & cbdl - float lightc = bufexporig->L[y - ystart][x - xstart]; - float fli = ((100.f + realstrdE) / 100.f); + if (senstype == 2 || senstype == 3 || senstype == 8) { //retinex & cbdl + const float lightc = bufexporig->L[y - ystart][x - xstart]; + const float fli = (100.f + realstrdE) / 100.f; transformed->L[y][x] = CLIP(original->L[y][x] + lightc * fli - original->L[y][x]); - } else if (senstype == 1 || senstype == 0 || senstype == 9) { + } else if (senstype == 1 || senstype == 0 || senstype == 9 || senstype == 6) { if (HHutili) { const float hhro = bufhh[y - ystart][x - xstart]; @@ -4978,7 +4976,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o std::unique_ptr bufmaskorigcb; std::unique_ptr bufmaskblurcb; std::unique_ptr originalmaskcb; -printf("showmet=%i \n", lp.showmaskcbmet); if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) { bufmaskorigcb.reset(new LabImage(bfw, bfh)); bufmaskblurcb.reset(new LabImage(bfw, bfh)); @@ -5074,7 +5071,6 @@ printf("showmet=%i \n", lp.showmaskcbmet); float radiusb = 1.f / sk; if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) { -printf("OK show\n"); #ifdef _OPENMP #pragma omp parallel diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index cdf1be708..44fbbb623 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -1025,7 +1025,7 @@ Locallab::Locallab(): cbdlBox->pack_start(*residFrame); cbdlBox->pack_start(*softradiuscb); cbdlBox->pack_start(*sensicb); - // cbdlBox->pack_start(*maskcbFrame); + cbdlBox->pack_start(*maskcbFrame); expcbdl->add(*cbdlBox); expcbdl->setLevel(2); @@ -2657,7 +2657,9 @@ void Locallab::showmaskcolMethodChanged() // When one mask state is changed, other masks are deactivated disableListener(); - showmaskexpMethod->set_active(0); + showmaskexpMethod->set_active(0); + showmaskSHMethod->set_active(0); + showmaskcbMethod->set_active(0); enableListener(); if (listener) { @@ -2671,7 +2673,9 @@ void Locallab::showmaskexpMethodChanged() // When one mask state is changed, other masks are deactivated disableListener(); - showmaskcolMethod->set_active(0); + showmaskcolMethod->set_active(0); + showmaskcbMethod->set_active(0); + showmaskSHMethod->set_active(0); enableListener(); if (listener) { @@ -2685,7 +2689,9 @@ void Locallab::showmaskSHMethodChanged() // When one mask state is changed, other masks are deactivated disableListener(); - showmaskcolMethod->set_active(0); + showmaskcolMethod->set_active(0); + showmaskexpMethod->set_active(0); + showmaskcbMethod->set_active(0); enableListener(); if (listener) { @@ -2699,7 +2705,9 @@ void Locallab::showmaskcbMethodChanged() // When one mask state is changed, other masks are deactivated disableListener(); - //showmaskcbMethod->set_active(0); + showmaskcolMethod->set_active(0); + showmaskSHMethod->set_active(0); + showmaskexpMethod->set_active(0); enableListener(); if (listener) { @@ -2726,8 +2734,8 @@ Locallab::llMaskVisibility* Locallab::getMaskVisibility() maskStruct->expMask = showmaskexpMethod->get_active_row_number(); maskStruct->SHMask = showmaskSHMethod->get_active_row_number(); maskStruct->cbMask = showmaskcbMethod->get_active_row_number(); - printf("SHmask=%i \n", maskStruct->SHMask); - printf("cbmask=%i \n", maskStruct->cbMask); + // printf("SHmask=%i \n", maskStruct->SHMask); + // printf("cbmask=%i \n", maskStruct->cbMask); return maskStruct; } From 63f0a1d31acb1c5dc7280be6691d07a413430cf9 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 14 Apr 2019 19:38:15 +0200 Subject: [PATCH 27/59] Change a mistake in CBDL --- rtengine/iplocallab.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 44bf10a11..4f424d116 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2587,11 +2587,12 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor float diflc = 0.f; float newhr = 0.f; - if (senstype == 2 || senstype == 3 || senstype == 8) {//all except color and light (TODO) and exposure + if ( senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8) {//all except color and light (TODO) and exposure const float lightc = bufexporig->L[y - ystart][x - xstart]; const float fli = (100.f + realstrdE) / 100.f; transformed->L[y][x] = CLIP(original->L[y][x] + (lightc * fli - original->L[y][x]) * factorx); - } else if (senstype == 1 || senstype == 0 || senstype == 9 || senstype == 6) { + diflc = 328.f * realstrdE * factorx; + } else if (senstype == 1 || senstype == 0 || senstype == 9) { if (HHutili) { const float hhro = bufhh[y - ystart][x - xstart]; @@ -2703,11 +2704,12 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor float diflc = 0.f; float newhr = 0.f; - if (senstype == 2 || senstype == 3 || senstype == 8) { //retinex & cbdl + if (senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8) { //retinex & cbdl const float lightc = bufexporig->L[y - ystart][x - xstart]; const float fli = (100.f + realstrdE) / 100.f; transformed->L[y][x] = CLIP(original->L[y][x] + lightc * fli - original->L[y][x]); - } else if (senstype == 1 || senstype == 0 || senstype == 9 || senstype == 6) { + diflc = 328.f * realstrdE; + } else if (senstype == 1 || senstype == 0 || senstype == 9 ) { if (HHutili) { const float hhro = bufhh[y - ystart][x - xstart]; From 0ceda4c462faab7187fb2af69955f00a3e2a6c62 Mon Sep 17 00:00:00 2001 From: Desmis Date: Mon, 15 Apr 2019 09:15:10 +0200 Subject: [PATCH 28/59] Replace Frame by Expander for all masks --- rtgui/locallab.cc | 95 +++++++++++++++++++++++++++++------------------ rtgui/locallab.h | 8 ++-- 2 files changed, 63 insertions(+), 40 deletions(-) diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 44fbbb623..7e882a688 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -1,7 +1,7 @@ /* * This file is part of RawTherapee. * - * Copyright (c) 2004-2010 Gabor Horvath + * Copyright (c) 2004-2010 Gabor Horvath frame * * * RawTherapee is free software: you can redistribute it and/or modify @@ -58,6 +58,10 @@ Locallab::Locallab(): expcontrast(new MyExpander(true, M("TP_LOCALLAB_LOC_CONTRAST"))), expcbdl(new MyExpander(true, new Gtk::HBox())), expdenoi(new MyExpander(true, new Gtk::HBox())), + expmaskcol(new MyExpander(false, M("TP_LOCALLAB_SHOW"))), + expmaskexp(new MyExpander(false, M("TP_LOCALLAB_SHOW"))), + expmasksh(new MyExpander(false, M("TP_LOCALLAB_SHOW"))), + expmaskcb(new MyExpander(false, M("TP_LOCALLAB_SHOW"))), // CurveEditorGroup widgets // Color & Light @@ -237,10 +241,6 @@ Locallab::Locallab(): lumacontrastMinusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS")))), lumaneutralButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL")))), lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS")))), - maskcolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))), - maskexpFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))), - maskSHFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))), - maskcbFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))), gridFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABGRID")))), residFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RESID")))), @@ -266,6 +266,9 @@ Locallab::Locallab(): expcolor->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expcolor)); enablecolorConn = expcolor->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expcolor)); // expcolor->set_tooltip_text(M("TP_LOCALLAB_EXPCOLOR_TOOLTIP")); + setExpandAlignProperties (expmaskcol, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + expmaskcol->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmaskcol)); + expmaskcol->setLevel (2); curvactivConn = curvactiv->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::curvactivChanged)); lightness->setAdjusterListener(this); @@ -424,7 +427,6 @@ Locallab::Locallab(): colorBox->pack_start(*llCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor colorBox->pack_start(*HCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor colorBox->pack_start(*invers); - maskcolFrame->set_label_align(0.025, 0.5); ToolParamBlock* const maskcolBox = Gtk::manage(new ToolParamBlock()); maskcolBox->pack_start(*showmaskcolMethod, Gtk::PACK_SHRINK, 4); maskcolBox->pack_start(*enaColorMask, Gtk::PACK_SHRINK, 0); @@ -434,8 +436,8 @@ Locallab::Locallab(): maskcolBox->pack_start(*chromaskcol, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*gammaskcol, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*slomaskcol, Gtk::PACK_SHRINK, 0); - maskcolFrame->add(*maskcolBox); - colorBox->pack_start(*maskcolFrame); + expmaskcol->add(*maskcolBox); + colorBox->pack_start(*expmaskcol); expcolor->add(*colorBox); expcolor->setLevel(2); @@ -447,6 +449,10 @@ Locallab::Locallab(): enableexposeConn = expexpose->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expexpose)); if(showtooltip) expexpose->set_tooltip_text(M("TP_LOCALLAB_EXPOSURE_TOOLTIP")); + setExpandAlignProperties (expmaskexp, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + expmaskexp->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmaskexp)); + expmaskexp->setLevel (2); + expcomp->setAdjusterListener(this); hlcompr->setAdjusterListener(this); @@ -539,7 +545,6 @@ Locallab::Locallab(): exposeBox->pack_start(*softradiusexp); exposeBox->pack_start(*curveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor exposeBox->pack_start(*inversex); - maskexpFrame->set_label_align(0.025, 0.5); ToolParamBlock* const maskexpBox = Gtk::manage(new ToolParamBlock()); maskexpBox->pack_start(*showmaskexpMethod, Gtk::PACK_SHRINK, 4); maskexpBox->pack_start(*enaExpMask, Gtk::PACK_SHRINK, 0); @@ -549,8 +554,8 @@ Locallab::Locallab(): maskexpBox->pack_start(*chromaskexp, Gtk::PACK_SHRINK, 0); maskexpBox->pack_start(*gammaskexp, Gtk::PACK_SHRINK, 0); maskexpBox->pack_start(*slomaskexp, Gtk::PACK_SHRINK, 0); - maskexpFrame->add(*maskexpBox); - exposeBox->pack_start(*maskexpFrame); + expmaskexp->add(*maskexpBox); + exposeBox->pack_start(*expmaskexp); expexpose->add(*exposeBox); expexpose->setLevel(2); @@ -564,6 +569,10 @@ Locallab::Locallab(): enableshadhighConn = expshadhigh->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expshadhigh)); if(showtooltip) expshadhigh->set_tooltip_text(M("TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP")); + setExpandAlignProperties (expmasksh, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + expmasksh->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmasksh)); + expmasksh->setLevel (2); + highlights->setAdjusterListener(this); h_tonalwidth->setAdjusterListener(this); shadows->setAdjusterListener(this); @@ -625,7 +634,6 @@ Locallab::Locallab(): shadhighBox->pack_start(*blurSHde); shadhighBox->pack_start(*inverssh); - maskSHFrame->set_label_align(0.025, 0.5); ToolParamBlock* const maskSHBox = Gtk::manage(new ToolParamBlock()); maskSHBox->pack_start(*showmaskSHMethod, Gtk::PACK_SHRINK, 4); @@ -636,8 +644,8 @@ Locallab::Locallab(): maskSHBox->pack_start(*chromaskSH, Gtk::PACK_SHRINK, 0); maskSHBox->pack_start(*gammaskSH, Gtk::PACK_SHRINK, 0); maskSHBox->pack_start(*slomaskSH, Gtk::PACK_SHRINK, 0); - maskSHFrame->add(*maskSHBox); - shadhighBox->pack_start(*maskSHFrame); + expmasksh->add(*maskSHBox); + shadhighBox->pack_start(*expmasksh); expshadhigh->add(*shadhighBox); expshadhigh->setLevel(2); @@ -917,6 +925,10 @@ Locallab::Locallab(): enablecbdlConn = expcbdl->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expcbdl)); if(showtooltip) expcbdl->set_tooltip_text(M("TP_LOCALLAB_EXPCBDL_TOOLTIP")); + setExpandAlignProperties (expmaskcb, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + expmaskcb->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmaskcb)); + expmaskcb->setLevel (2); + for (int i = 0; i < 5; i++) { Glib::ustring ss; ss = Glib::ustring::format(i); @@ -1000,7 +1012,6 @@ Locallab::Locallab(): cbdlBox->pack_start(*multiplier[i]); } - maskcbFrame->set_label_align(0.025, 0.5); ToolParamBlock* const maskcbBox = Gtk::manage(new ToolParamBlock()); maskcbBox->pack_start(*showmaskcbMethod, Gtk::PACK_SHRINK, 4); maskcbBox->pack_start(*enacbMask, Gtk::PACK_SHRINK, 0); @@ -1010,7 +1021,7 @@ Locallab::Locallab(): maskcbBox->pack_start(*chromaskcb, Gtk::PACK_SHRINK, 0); maskcbBox->pack_start(*gammaskcb, Gtk::PACK_SHRINK, 0); maskcbBox->pack_start(*slomaskcb, Gtk::PACK_SHRINK, 0); - maskcbFrame->add(*maskcbBox); + expmaskcb->add(*maskcbBox); Gtk::HSeparator *separator = Gtk::manage(new Gtk::HSeparator()); cbdlBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); @@ -1025,7 +1036,7 @@ Locallab::Locallab(): cbdlBox->pack_start(*residFrame); cbdlBox->pack_start(*softradiuscb); cbdlBox->pack_start(*sensicb); - cbdlBox->pack_start(*maskcbFrame); + cbdlBox->pack_start(*expmaskcb); expcbdl->add(*cbdlBox); expcbdl->setLevel(2); @@ -1123,6 +1134,10 @@ void Locallab::foldAllButMe(GdkEventButton* event, MyExpander *expander) expcontrast->set_expanded(expcontrast == expander); expcbdl->set_expanded(expcbdl == expander); expdenoi->set_expanded(expdenoi == expander); + expmaskcol->set_expanded(expmaskcol == expander); + expmaskexp->set_expanded(expmaskexp == expander); + expmasksh->set_expanded(expmasksh == expander); + expmaskcb->set_expanded(expmaskcb == expander); } } @@ -1209,6 +1224,10 @@ void Locallab::writeOptions(std::vector &tpOpen) tpOpen.push_back(expcontrast->get_expanded()); tpOpen.push_back(expcbdl->get_expanded()); tpOpen.push_back(expdenoi->get_expanded()); + tpOpen.push_back(expmaskcol->get_expanded()); + tpOpen.push_back(expmaskexp->get_expanded()); + tpOpen.push_back(expmasksh->get_expanded()); + tpOpen.push_back(expmaskcb->get_expanded()); } @@ -1266,7 +1285,7 @@ void Locallab::refChanged(double huer, double lumar, double chromar) void Locallab::updateToolState(std::vector &tpOpen) { - if (tpOpen.size() >= 14) { + if (tpOpen.size() >= 18) { expsettings->setExpanded(tpOpen.at(0)); expcolor->set_expanded(tpOpen.at(1)); expexpose->set_expanded(tpOpen.at(2)); @@ -1280,6 +1299,10 @@ void Locallab::updateToolState(std::vector &tpOpen) expcontrast->set_expanded(tpOpen.at(10)); expcbdl->set_expanded(tpOpen.at(11)); expdenoi->set_expanded(tpOpen.at(12)); + expmaskcol->set_expanded(tpOpen.at(13)); + expmaskexp->set_expanded(tpOpen.at(14)); + expmasksh->set_expanded(tpOpen.at(15)); + expmaskcb->set_expanded(tpOpen.at(16)); } } @@ -2857,7 +2880,7 @@ void Locallab::inversChanged() curvactiv->hide(); qualitycurveMethod->show(); labqualcurv->show(); - maskcolFrame->show(); + expmaskcol->show(); structcol->show(); strengthgrid->hide(); blurcolde->show(); @@ -2871,7 +2894,7 @@ void Locallab::inversChanged() curvactiv->hide(); qualitycurveMethod->hide(); labqualcurv->hide(); - maskcolFrame->hide(); + expmaskcol->hide(); structcol->hide(); blurcolde->show(); gridFrame->hide(); @@ -2885,7 +2908,7 @@ void Locallab::inversChanged() curvactiv->hide(); qualitycurveMethod->show(); labqualcurv->show(); - maskcolFrame->show(); + expmaskcol->show(); structcol->show(); blurcolde->show(); gridFrame->show(); @@ -2925,7 +2948,7 @@ void Locallab::inversexChanged() if (multiImage && inversex->get_inconsistent()) { sensiex->show(); curveEditorG->show(); - maskexpFrame->show(); + expmaskexp->show(); structexp->show(); blurexpde->show(); softradiusexp->show(); @@ -2933,7 +2956,7 @@ void Locallab::inversexChanged() } else if (inversex->get_active()) { sensiex->show(); curveEditorG->show(); - maskexpFrame->hide(); + expmaskexp->hide(); structexp->hide(); blurexpde->show(); softradiusexp->hide(); @@ -2941,7 +2964,7 @@ void Locallab::inversexChanged() } else { sensiex->show(); curveEditorG->show(); - maskexpFrame->show(); + expmaskexp->show(); structexp->show(); blurexpde->show(); softradiusexp->show(); @@ -2980,17 +3003,17 @@ void Locallab::inversshChanged() sensihs->show(); blurSHde->show(); - maskSHFrame->show(); + expmasksh->show(); showmaskSHMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode } else if (inverssh->get_active()) { sensihs->show(); - maskSHFrame->hide(); + expmasksh->hide(); blurSHde->show(); } else { sensihs->show(); - maskSHFrame->show(); + expmasksh->show(); blurSHde->show(); if (batchMode) { @@ -5109,7 +5132,7 @@ void Locallab::updateSpecificGUIState() curvactiv->hide(); qualitycurveMethod->show(); labqualcurv->show(); - maskcolFrame->show(); + expmaskcol->show(); structcol->show(); blurcolde->show(); softradiuscol->show(); @@ -5122,7 +5145,7 @@ void Locallab::updateSpecificGUIState() curvactiv->hide(); qualitycurveMethod->hide(); labqualcurv->hide(); - maskcolFrame->hide(); + expmaskcol->hide(); softradiuscol->hide(); structcol->hide(); blurcolde->show(); @@ -5134,7 +5157,7 @@ void Locallab::updateSpecificGUIState() curvactiv->hide(); qualitycurveMethod->show(); labqualcurv->show(); - maskcolFrame->show(); + expmaskcol->show(); structcol->show(); blurcolde->show(); gridFrame->show(); @@ -5149,7 +5172,7 @@ void Locallab::updateSpecificGUIState() if (multiImage && inversex->get_inconsistent()) { sensiex->show(); curveEditorG->show(); - maskexpFrame->show(); + // maskexpFrame->show(); structexp->show(); blurexpde->show(); softradiusexp->show(); @@ -5157,14 +5180,14 @@ void Locallab::updateSpecificGUIState() } else if (inversex->get_active()) { sensiex->show(); curveEditorG->show(); - maskexpFrame->hide(); + // maskexpFrame->hide(); structexp->hide(); blurexpde->show(); softradiusexp->hide(); } else { sensiex->show(); curveEditorG->show(); - maskexpFrame->show(); + // maskexpFrame->show(); structexp->show(); blurexpde->show(); softradiusexp->show(); @@ -5177,16 +5200,16 @@ void Locallab::updateSpecificGUIState() // Update SH GUI according to black adjuster state (to be compliant with adjusterChanged function) if (multiImage && inversex->get_inconsistent()) { sensihs->show(); - maskSHFrame->show(); + // maskSHFrame->show(); blurSHde->show(); showmaskSHMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode } else if (inverssh->get_active()) { sensihs->show(); - maskSHFrame->hide(); + // maskSHFrame->hide(); blurSHde->show(); } else { sensihs->show(); - maskSHFrame->show(); + // maskSHFrame->show(); blurSHde->show(); if (batchMode) { diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 32b2e8fc5..770e75092 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -60,6 +60,10 @@ private: MyExpander* const expcontrast; MyExpander* const expcbdl; MyExpander* const expdenoi; + MyExpander* const expmaskcol; + MyExpander* const expmaskexp; + MyExpander* const expmasksh; + MyExpander* const expmaskcb; sigc::connection enablecolorConn, enableexposeConn, enableshadhighConn, enablevibranceConn, enablesoftConn, enableblurConn, enabletonemapConn, enableretiConn, enablesharpConn, enablecontrastConn, enablecbdlConn, enabledenoiConn; // Curve widgets @@ -279,10 +283,6 @@ private: Gtk::Button* const lumaneutralButton; Gtk::Button* const lumacontrastPlusButton; sigc::connection lumacontrastMinusPressedConn, lumaneutralPressedConn, lumacontrastPlusPressedConn; - Gtk::Frame* maskcolFrame; - Gtk::Frame* maskexpFrame; - Gtk::Frame* maskSHFrame; - Gtk::Frame* maskcbFrame; Gtk::Frame* gridFrame; Gtk::Frame* residFrame; LabGrid *labgrid; From 2e2d981dacb17e0a94bbc0cf6cac67053ac07291 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 15 Apr 2019 12:08:37 +0200 Subject: [PATCH 29/59] Excluding libatomic needed by Clang/FreeBSD, #3636 --- rtgui/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt index 72df9fba0..3af955be8 100644 --- a/rtgui/CMakeLists.txt +++ b/rtgui/CMakeLists.txt @@ -234,7 +234,8 @@ else() ) endif() -if(OPENMP_FOUND AND NOT APPLE) +# Excluding libatomic needed by Clang/FreeBSD, #3636 +if(OPENMP_FOUND AND NOT APPLE AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") set(EXTRA_LIB_RTGUI ${EXTRA_LIB_RTGUI} "atomic") endif() From 6a038a4d9fd13f8a30261fb1d305f5cd002cb00b Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 15 Apr 2019 15:46:50 +0200 Subject: [PATCH 30/59] locallab: fix segfault when blur spot is out of view --- rtengine/iplocallab.cc | 46 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 4f424d116..7f034cac8 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -3763,31 +3763,30 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o const int bfh = yend - ystart; const int bfw = xend - xstart; - tmp1.reset(new LabImage(bfw, bfh)); + if (bfw > 0 && bfh > 0) { + tmp1.reset(new LabImage(bfw, bfh)); #ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) + #pragma omp parallel for schedule(dynamic,16) #endif - for (int y = ystart; y < yend ; y++) { - for (int x = xstart; x < xend; x++) { - tmp1->L[y - ystart][x - xstart] = original->L[y][x]; - tmp1->a[y - ystart][x - xstart] = original->a[y][x]; - tmp1->b[y - ystart][x - xstart] = original->b[y][x]; + for (int y = ystart; y < yend ; y++) { + for (int x = xstart; x < xend; x++) { + tmp1->L[y - ystart][x - xstart] = original->L[y][x]; + tmp1->a[y - ystart][x - xstart] = original->a[y][x]; + tmp1->b[y - ystart][x - xstart] = original->b[y][x]; + } + } + +#ifdef _OPENMP + #pragma omp parallel +#endif + + { + gaussianBlur(tmp1->L, tmp1->L, bfw, bfh, radius); + gaussianBlur(tmp1->a, tmp1->a, bfw, bfh, radius); + gaussianBlur(tmp1->b, tmp1->b, bfw, bfh, radius); } } - - -#ifdef _OPENMP - #pragma omp parallel -#endif - - { - gaussianBlur(tmp1->L, tmp1->L, bfw, bfh, radius); - gaussianBlur(tmp1->a, tmp1->a, bfw, bfh, radius); - gaussianBlur(tmp1->b, tmp1->b, bfw, bfh, radius); - } - - } else { const int GW = transformed->W; const int GH = transformed->H; @@ -3800,18 +3799,19 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o gaussianBlur(original->L, tmp1->L, GW, GH, radius); gaussianBlur(original->a, tmp1->a, GW, GH, radius); gaussianBlur(original->b, tmp1->b, GW, GH, radius); - } } - if (lp.stren > 0.1f) { + if (tmp1.get() && lp.stren > 0.1f) { float mean = 0.f;//0 best result float variance = lp.stren ; //(double) SQR(lp.stren)/sk; addGaNoise(tmp1.get(), tmp1.get(), mean, variance, sk) ; } if (lp.blurmet == 0) { //blur and noise (center) - BlurNoise_Local(tmp1.get(), hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); + if (tmp1.get()) { + BlurNoise_Local(tmp1.get(), hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); + } } else { InverseBlurNoise_Local(lp, hueref, chromaref, lumaref, original, transformed, tmp1.get(), cx, cy, sk); } From 3579fc4fb37c0489d74cfbdf6e421ba4da00d06e Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 15 Apr 2019 15:47:26 +0200 Subject: [PATCH 31/59] use attach_next_to instead of attach --- rtgui/preferences.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index da0a5773e..999a412a2 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -960,7 +960,7 @@ Gtk::Widget* Preferences::getGeneralPanel() ckbshowtooltiplocallab = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_SHOWTOOLTIP"))); setExpandAlignProperties(ckbshowtooltiplocallab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); - workflowGrid->attach(*ckbshowtooltiplocallab,0, 3); + workflowGrid->attach_next_to(*ckbshowtooltiplocallab, *ckbFileBrowserToolbarSingleRow, Gtk::POS_RIGHT, 1, 1); fworklflow->add(*workflowGrid); From f674ebbe76d0534bd633c1cbd7b4587ac454db32 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Tue, 16 Apr 2019 00:00:39 +0200 Subject: [PATCH 32/59] Update Deutsch locale --- rtdata/languages/Deutsch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index db136f330..34c81e820 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -79,6 +79,7 @@ #78 19.01.2019 Erweiterung (TooWaBoo) RT 5.5 #79 24.02.2019 Erweiterung (TooWaBoo) RT 5.5 #80 25.03.2019 Erweiterung (TooWaBoo) RT 5.6 +#81 15.04.2019 Erweiterung (TooWaBoo) RT 5.6 ABOUT_TAB_BUILD;Version ABOUT_TAB_CREDITS;Danksagungen @@ -2359,4 +2360,5 @@ ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! -!QUEUE_LOCATION_TITLE;Output Location +QUEUE_LOCATION_TITLE;Ausgabeverzeichnis +PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI-Modus From e8ac6fb09f3ea8dee50e93f4862de8067e82a030 Mon Sep 17 00:00:00 2001 From: Desmis Date: Tue, 16 Apr 2019 13:57:22 +0200 Subject: [PATCH 33/59] Small changes to blur cbdl --- rtdata/languages/default | 2 +- rtengine/dirpyr_equalizer.cc | 4 +++- rtengine/procparams.cc | 2 +- rtgui/locallab.cc | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index ddf45853e..adbdf68e6 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1976,7 +1976,7 @@ TP_LOCALLAB_BLUFR;Blur & Noise TP_LOCALLAB_BLURDE;Blur Shape detection TP_LOCALLAB_BLNORM;Normal TP_LOCALLAB_BLINV;Inverse -TP_LOCALLAB_BLURCBDL;Blur +TP_LOCALLAB_BLURCBDL;Blur levels TP_LOCALLAB_BLSYM;Symmetric TP_LOCALLAB_CENTER_X;Center X TP_LOCALLAB_CENTER_Y;Center Y diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index 85b9c2bd6..c0b10202d 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -425,8 +425,10 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwid } float clar = 0.01f * mergeL; + + if(clar == 0.f) { - clar = 0.001f; + clar = 0.0005f; } #pragma omp parallel for diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 8c411ce05..9b8bbce07 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2499,7 +2499,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : sensicb(15), clarityml(0), contresid(0), - blurcbdl(0), + blurcbdl(0.), softradiuscb(0.0), enacbMask(false), CCmaskcbcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35 }, diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 7e882a688..557f3b92e 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -170,7 +170,7 @@ Locallab::Locallab(): threshold(Gtk::manage(new Adjuster(M("TP_DIRPYREQUALIZER_THRESHOLD"), 0, 1., 0.01, 0.2))), clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0, 100, 1, 0))), contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))), - blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0, 100, 1, 0))), + blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0., 100., 0.1, 0.))), sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))), softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), blendmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), @@ -1968,7 +1968,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).sensicb = sensicb->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).clarityml = clarityml->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).contresid = contresid->getIntValue(); - pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiuscb = softradiuscb->getValue(); pp->locallab.spots.at(pp->locallab.selspot).enacbMask = enacbMask->get_active(); @@ -3317,7 +3317,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe sensicb->setDefault((double)defSpot->sensicb); clarityml->setDefault((double)defSpot->clarityml); contresid->setDefault((double)defSpot->contresid); - blurcbdl->setDefault((double)defSpot->blurcbdl); + blurcbdl->setDefault(defSpot->blurcbdl); softradiuscb->setDefault(defSpot->softradiuscb); blendmaskcb->setDefault((double)defSpot->blendmaskcb); radmaskcb->setDefault(defSpot->radmaskcb); From 5ea56b6611dc7976d6c8f99a43e1072fed097b26 Mon Sep 17 00:00:00 2001 From: Desmis Date: Tue, 16 Apr 2019 16:24:46 +0200 Subject: [PATCH 34/59] Fixed small bug in CBDL clarity --- rtengine/dirpyr_equalizer.cc | 15 ++++++++++++--- rtengine/iplocallab.cc | 1 + rtengine/procparams.cc | 2 +- rtengine/procparams.h | 4 ++-- rtgui/locallab.cc | 6 +++--- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index c0b10202d..0d13ad2e4 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -426,16 +426,25 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwid float clar = 0.01f * mergeL; - +/* if(clar == 0.f) { - clar = 0.0005f; + clar = 0.0f; } - +// printf("clar=%f \n", clar); +*/ + if(clar > 0.f) { #pragma omp parallel for for (int i = 0; i < srcheight; i++) for (int j = 0; j < srcwidth; j++) { loctemp[i][j] = CLIPLL((1.f + clar) * loct[i][j] - clar * resid5[i][j]); } + } else { + #pragma omp parallel for + for (int i = 0; i < srcheight; i++) + for (int j = 0; j < srcwidth; j++) { + loctemp[i][j] = CLIPLL(loct[i][j]); + } + } } diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 7f034cac8..e891fbd3e 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -602,6 +602,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.dehaze = local_dehaze; lp.senscb = local_sensicb; lp.clarityml = local_clarityml; + //printf("lpclari=%f \n", lp.clarityml); lp.contresid = local_contresid; lp.blurcbdl = local_blurcbdl; lp.cont = local_contrast; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 9b8bbce07..0e5bc2597 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2497,7 +2497,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : chromacbdl(0), threshold(0.2), sensicb(15), - clarityml(0), + clarityml(0.), contresid(0), blurcbdl(0.), softradiuscb(0.0), diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 604a1936e..9d95f78b0 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1098,9 +1098,9 @@ struct LocallabParams { int chromacbdl; double threshold; int sensicb; - int clarityml; + double clarityml; int contresid; - int blurcbdl; + double blurcbdl; double softradiuscb; bool enacbMask; std::vector CCmaskcbcurve; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 557f3b92e..d6a387c19 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -168,7 +168,7 @@ Locallab::Locallab(): // Contrast by detail levels chromacbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMACBDL"), 0, 300, 1, 0))), threshold(Gtk::manage(new Adjuster(M("TP_DIRPYREQUALIZER_THRESHOLD"), 0, 1., 0.01, 0.2))), - clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0, 100, 1, 0))), + clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0.0, 100., 0.1, 0.0))), contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))), blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0., 100., 0.1, 0.))), sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))), @@ -1966,7 +1966,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).chromacbdl = chromacbdl->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).threshold = threshold->getValue(); pp->locallab.spots.at(pp->locallab.selspot).sensicb = sensicb->getIntValue(); - pp->locallab.spots.at(pp->locallab.selspot).clarityml = clarityml->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).clarityml = clarityml->getValue(); pp->locallab.spots.at(pp->locallab.selspot).contresid = contresid->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiuscb = softradiuscb->getValue(); @@ -3315,7 +3315,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe chromacbdl->setDefault((double)defSpot->chromacbdl); threshold->setDefault(defSpot->threshold); sensicb->setDefault((double)defSpot->sensicb); - clarityml->setDefault((double)defSpot->clarityml); + clarityml->setDefault(defSpot->clarityml); contresid->setDefault((double)defSpot->contresid); blurcbdl->setDefault(defSpot->blurcbdl); softradiuscb->setDefault(defSpot->softradiuscb); From cf1bdcfb4f9b07c8bcaa5a9448a588cc466f0309 Mon Sep 17 00:00:00 2001 From: Desmis Date: Tue, 16 Apr 2019 18:34:22 +0200 Subject: [PATCH 35/59] Suppress view modif CBDL --- rtengine/iplocallab.cc | 36 ++++++++++++++++++------------------ rtengine/procparams.cc | 2 +- rtgui/locallab.cc | 6 +++--- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index e891fbd3e..535c2b1c7 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2398,11 +2398,11 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const bool expshow = ((lp.showmaskexpmet == 1 || lp.showmaskexpmet == 2) && senstype == 1); const bool colshow = ((lp.showmaskcolmet == 1 || lp.showmaskcolmet == 2) && senstype == 0); const bool SHshow = ((lp.showmaskSHmet == 1 || lp.showmaskSHmet == 2) && senstype == 9); - const bool cbshow = ((lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) && senstype == 6); + // const bool cbshow = ((lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) && senstype == 6); const bool previewcol = ((lp.showmaskcolmet == 5) && senstype == 0); const bool previewexp = ((lp.showmaskexpmet == 5) && senstype == 1); const bool previewSH = ((lp.showmaskSHmet == 4) && senstype == 9); - const bool previewcb = ((lp.showmaskcbmet == 4) && senstype == 6); + const bool previewcb = ((lp.showmaskcbmet == 2) && senstype == 6); std::unique_ptr origblur(new LabImage(bfw, bfh)); std::unique_ptr origblurmask; @@ -2429,7 +2429,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const bool usemaskexp = (lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 5) && senstype == 1; const bool usemaskcol = (lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 5) && senstype == 0; const bool usemaskSH = (lp.showmaskSHmet == 2 || lp.enaSHMask || lp.showmaskSHmet == 4) && senstype == 9; - const bool usemaskcb = (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 4) && senstype == 6; + const bool usemaskcb = (lp.enacbMask || lp.showmaskcbmet == 2) && senstype == 6; const bool usemaskall = (usemaskSH || usemaskcol || usemaskexp || usemaskcb); if (usemaskall) @@ -2592,7 +2592,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const float lightc = bufexporig->L[y - ystart][x - xstart]; const float fli = (100.f + realstrdE) / 100.f; transformed->L[y][x] = CLIP(original->L[y][x] + (lightc * fli - original->L[y][x]) * factorx); - diflc = 328.f * realstrdE * factorx; + diflc = (lightc * fli - original->L[y][x]) * factorx; //328.f * realstrdE * factorx; } else if (senstype == 1 || senstype == 0 || senstype == 9) { if (HHutili) { const float hhro = bufhh[y - ystart][x - xstart]; @@ -2687,8 +2687,8 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor } } - if (expshow || colshow || SHshow || cbshow) { - transformed->L[y][x] = CLIP(12000.f + diflc); + if (expshow || colshow || SHshow) { + transformed->L[y][x] = CLIP(diflc); transformed->a[y][x] = CLIPC(difa); transformed->b[y][x] = CLIPC(difb); } else if (previewcol || previewexp || previewSH || previewcb) { @@ -2709,7 +2709,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const float lightc = bufexporig->L[y - ystart][x - xstart]; const float fli = (100.f + realstrdE) / 100.f; transformed->L[y][x] = CLIP(original->L[y][x] + lightc * fli - original->L[y][x]); - diflc = 328.f * realstrdE; + diflc = lightc * fli - original->L[y][x];//328.f * realstrdE; } else if (senstype == 1 || senstype == 0 || senstype == 9 ) { if (HHutili) { const float hhro = bufhh[y - ystart][x - xstart]; @@ -2801,8 +2801,8 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor } } - if (expshow || colshow || SHshow || cbshow) { - transformed->L[y][x] = CLIP(12000.f + diflc); + if (expshow || colshow || SHshow) { + transformed->L[y][x] = CLIP( diflc); transformed->a[y][x] = CLIPC(difa); transformed->b[y][x] = CLIPC(difb); } else if (previewcol || previewexp || previewSH || previewcb) { @@ -4959,7 +4959,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o //end TM //begin cbdl - if ((lp.mulloc[0] != 1.f || lp.mulloc[1] != 1.f || lp.mulloc[2] != 1.f || lp.mulloc[3] != 1.f || lp.mulloc[4] != 1.f || lp.clarityml != 0.f || lp.contresid != 0.f || lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) && lp.cbdlena) { + if ((lp.mulloc[0] != 1.f || lp.mulloc[1] != 1.f || lp.mulloc[2] != 1.f || lp.mulloc[3] != 1.f || lp.mulloc[4] != 1.f || lp.clarityml != 0.f || lp.contresid != 0.f || lp.enacbMask || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) && lp.cbdlena) { if (call <= 3) { //call from simpleprocess dcrop improcc const int ystart = std::max(static_cast(lp.yc - lp.lyT) - cy, 0); const int yend = std::min(static_cast(lp.yc + lp.ly) - cy, original->H); @@ -4979,7 +4979,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o std::unique_ptr bufmaskorigcb; std::unique_ptr bufmaskblurcb; std::unique_ptr originalmaskcb; - if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) { + if ( lp.enacbMask || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) { bufmaskorigcb.reset(new LabImage(bfw, bfh)); bufmaskblurcb.reset(new LabImage(bfw, bfh)); originalmaskcb.reset(new LabImage(bfw, bfh)); @@ -5001,7 +5001,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } } - if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) { + if (lp.enacbMask || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) { #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif @@ -5016,7 +5016,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o kmaskLexp = 32768.f * LIM01(1.f - locllmascbCurve[500.f * ligh]); } - if (lp.showmaskcbmet != 4) { + if (lp.showmaskcbmet != 2) { if (locccmascbCurve && lcmascbutili) { float chromask = 0.0001f + sqrt(SQR((loctemp->a[ir][jr]) / fab) + SQR((loctemp->b[ir][jr]) / fab)); kmaskCH = LIM01(1.f - locccmascbCurve[500.f * chromask]); @@ -5034,7 +5034,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float valHH = LIM01(1.f - lochhmascbCurve[500.f * h]); - if (lp.showmaskcbmet != 4) { + if (lp.showmaskcbmet != 2) { kmaskCH += valHH; } @@ -5073,7 +5073,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float radiusb = 1.f / sk; - if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) { + if (lp.enacbMask || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) { #ifdef _OPENMP #pragma omp parallel @@ -5084,10 +5084,10 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o gaussianBlur(bufmaskblurcb->b, bufmaskorigcb->b, bfw, bfh, 1.f + (0.5f * lp.radmacb) / sk); } - if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 4 || lp.enacbMask) { + if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 2 || lp.enacbMask) { blendmask(lp, xstart, ystart, cx, cy, bfw, bfh, loctemp.get(), original, bufmaskorigcb.get(), originalmaskcb.get(), lp.blendmacb); - } else if (lp.showmaskcbmet == 3) { + } else if (lp.showmaskcbmet == 1) { showmask(lp, xstart, ystart, cx, cy, bfw, bfh, loctemp.get(), transformed, bufmaskorigcb.get()); return; } @@ -5099,7 +5099,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o constexpr float b_r = 170.f; constexpr double skinprot = 0.; constexpr int choice = 0; - if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 4 || lp.enacbMask) { + if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 2 || lp.enacbMask) { #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 0e5bc2597..409178dad 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2497,7 +2497,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : chromacbdl(0), threshold(0.2), sensicb(15), - clarityml(0.), + clarityml(0.1), contresid(0), blurcbdl(0.), softradiuscb(0.0), diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index d6a387c19..6e7eb3200 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -168,7 +168,7 @@ Locallab::Locallab(): // Contrast by detail levels chromacbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMACBDL"), 0, 300, 1, 0))), threshold(Gtk::manage(new Adjuster(M("TP_DIRPYREQUALIZER_THRESHOLD"), 0, 1., 0.01, 0.2))), - clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0.0, 100., 0.1, 0.0))), + clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0.1, 100., 0.1, 0.1))), contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))), blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0., 100., 0.1, 0.))), sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))), @@ -963,8 +963,8 @@ Locallab::Locallab(): enacbMaskConn = enacbMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::enacbMaskChanged)); showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMNONE")); - showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIF")); - showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); +// showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIF")); +// showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMASK")); showmaskcbMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); From c8a59c95c492574722ef50278dc681f22f8e0869 Mon Sep 17 00:00:00 2001 From: Desmis Date: Tue, 16 Apr 2019 19:25:28 +0200 Subject: [PATCH 36/59] re-put grey background modification --- rtengine/iplocallab.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 535c2b1c7..b29cce729 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2688,7 +2688,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor } if (expshow || colshow || SHshow) { - transformed->L[y][x] = CLIP(diflc); + transformed->L[y][x] = CLIP(12000.f + diflc); transformed->a[y][x] = CLIPC(difa); transformed->b[y][x] = CLIPC(difb); } else if (previewcol || previewexp || previewSH || previewcb) { @@ -2802,7 +2802,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor } if (expshow || colshow || SHshow) { - transformed->L[y][x] = CLIP( diflc); + transformed->L[y][x] = CLIP(12000.f + diflc); transformed->a[y][x] = CLIPC(difa); transformed->b[y][x] = CLIPC(difb); } else if (previewcol || previewexp || previewSH || previewcb) { From 5e8675cf5239faf373cc690e940ac1b3758823a9 Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 17 Apr 2019 09:14:50 +0200 Subject: [PATCH 37/59] Add view modifications to CBDL --- rtengine/iplocallab.cc | 67 ++++++++++++++++++++++++++---------------- rtgui/locallab.cc | 4 +-- 2 files changed, 44 insertions(+), 27 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index b29cce729..2298e6b93 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2398,11 +2398,11 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const bool expshow = ((lp.showmaskexpmet == 1 || lp.showmaskexpmet == 2) && senstype == 1); const bool colshow = ((lp.showmaskcolmet == 1 || lp.showmaskcolmet == 2) && senstype == 0); const bool SHshow = ((lp.showmaskSHmet == 1 || lp.showmaskSHmet == 2) && senstype == 9); - // const bool cbshow = ((lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) && senstype == 6); + const bool cbshow = ((lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) && senstype == 6); const bool previewcol = ((lp.showmaskcolmet == 5) && senstype == 0); const bool previewexp = ((lp.showmaskexpmet == 5) && senstype == 1); const bool previewSH = ((lp.showmaskSHmet == 4) && senstype == 9); - const bool previewcb = ((lp.showmaskcbmet == 2) && senstype == 6); + const bool previewcb = ((lp.showmaskcbmet == 4) && senstype == 6); std::unique_ptr origblur(new LabImage(bfw, bfh)); std::unique_ptr origblurmask; @@ -2429,7 +2429,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const bool usemaskexp = (lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 5) && senstype == 1; const bool usemaskcol = (lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 5) && senstype == 0; const bool usemaskSH = (lp.showmaskSHmet == 2 || lp.enaSHMask || lp.showmaskSHmet == 4) && senstype == 9; - const bool usemaskcb = (lp.enacbMask || lp.showmaskcbmet == 2) && senstype == 6; + const bool usemaskcb = (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 4) && senstype == 6; const bool usemaskall = (usemaskSH || usemaskcol || usemaskexp || usemaskcb); if (usemaskall) @@ -2587,12 +2587,15 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor float factorx = localFactor; float diflc = 0.f; float newhr = 0.f; + float difL = 0.f; - if ( senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8) {//all except color and light (TODO) and exposure + if (senstype == 2 || senstype == 3 || senstype == 8) {//all except color and light (TODO) and exposure const float lightc = bufexporig->L[y - ystart][x - xstart]; const float fli = (100.f + realstrdE) / 100.f; transformed->L[y][x] = CLIP(original->L[y][x] + (lightc * fli - original->L[y][x]) * factorx); - diflc = (lightc * fli - original->L[y][x]) * factorx; //328.f * realstrdE * factorx; + } else if (senstype == 6) { + difL = (bufexporig->L[y - ystart][x - xstart] - original->L[y][x]) * localFactor * reducdE; + transformed->L[y][x] = CLIP(original->L[y][x] + difL); } else if (senstype == 1 || senstype == 0 || senstype == 9) { if (HHutili) { const float hhro = bufhh[y - ystart][x - xstart]; @@ -2629,14 +2632,15 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const float chra = bufexporig->a[y - ystart][x - xstart]; const float chrb = bufexporig->b[y - ystart][x - xstart]; - if (senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8 || senstype == 9) { + if (senstype == 2 || senstype == 3 || senstype == 8 || senstype == 9 || senstype == 6) { + flia = flib = ((100.f + realstrchdE) / 100.f); - } else if (senstype == 1) { + } else if (senstype == 1) { // printf("rdE=%f chdE=%f", realstradE, realstrchdE); flia = (100.f + realstradE + 100.f * realstrchdE) / 100.f; flib = (100.f + realstrbdE + 100.f * realstrchdE) / 100.f; - if (previewcol || previewexp || previewSH || previewcb) { + if (previewcol || previewexp || previewSH) { flia = (100.f + realstradE + realstrchdE) / 100.f; flib = (100.f + realstrbdE + realstrchdE) / 100.f; } @@ -2644,7 +2648,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor flia = (100.f + 0.3f * lp.strengrid * realstradE + realstrchdE) / 100.f; flib = (100.f + 0.3f * lp.strengrid * realstrbdE + realstrchdE) / 100.f; - if (previewcol || previewexp || previewSH || previewcb) { + if (previewcol || previewexp || previewSH || previewcb) { flia = (100.f + realstradE + realstrchdE) / 100.f; flib = (100.f + realstrbdE + realstrchdE) / 100.f; } @@ -2691,7 +2695,11 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor transformed->L[y][x] = CLIP(12000.f + diflc); transformed->a[y][x] = CLIPC(difa); transformed->b[y][x] = CLIPC(difb); - } else if (previewcol || previewexp || previewSH || previewcb) { + } else if (cbshow) { + transformed->L[y][x] = CLIP(12000.f + difL); + transformed->a[y][x] = CLIPC(difa); + transformed->b[y][x] = CLIPC(difb); + } else if (previewcol || previewexp || previewSH || previewcb) { transformed->a[y][x] = 0.f; transformed->b[y][x] = (difb); } @@ -2704,12 +2712,14 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor case 2: { // inside selection => full effect, no transition float diflc = 0.f; float newhr = 0.f; - - if (senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8) { //retinex & cbdl + float difL = 0.f; + if (senstype == 2 || senstype == 3 || senstype == 8) { //retinex & cbdl const float lightc = bufexporig->L[y - ystart][x - xstart]; const float fli = (100.f + realstrdE) / 100.f; transformed->L[y][x] = CLIP(original->L[y][x] + lightc * fli - original->L[y][x]); - diflc = lightc * fli - original->L[y][x];//328.f * realstrdE; + } else if (senstype == 6) { + difL = (bufexporig->L[y - ystart][x - xstart] - original->L[y][x]) * reducdE; + transformed->L[y][x] = CLIP(original->L[y][x] + difL); } else if (senstype == 1 || senstype == 0 || senstype == 9 ) { if (HHutili) { const float hhro = bufhh[y - ystart][x - xstart]; @@ -2746,13 +2756,13 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const float chra = bufexporig->a[y - ystart][x - xstart]; const float chrb = bufexporig->b[y - ystart][x - xstart]; - if (senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8 || senstype == 9) { + if (senstype == 2 || senstype == 3 || senstype == 8 || senstype == 9 || senstype == 6) { flia = flib = (100.f + realstrchdE) / 100.f; } else if (senstype == 1) { flia = (100.f + realstradE + 100.f * realstrchdE) / 100.f; flib = (100.f + realstrbdE + 100.f * realstrchdE) / 100.f; - if (previewcol || previewexp || previewSH || previewcb) { + if (previewcol || previewexp || previewSH) { flia = (100.f + realstradE + realstrchdE) / 100.f; flib = (100.f + realstrbdE + realstrchdE) / 100.f; } @@ -2760,7 +2770,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor flia = (100.f + 0.3f * lp.strengrid * realstradE + realstrchdE) / 100.f; flib = (100.f + 0.3f * lp.strengrid * realstrbdE + realstrchdE) / 100.f; - if (previewcol || previewexp || previewSH || previewcb) { + if (previewcol || previewexp || previewSH) { flia = (100.f + realstradE + realstrchdE) / 100.f; flib = (100.f + realstrbdE + realstrchdE) / 100.f; } @@ -2805,6 +2815,10 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor transformed->L[y][x] = CLIP(12000.f + diflc); transformed->a[y][x] = CLIPC(difa); transformed->b[y][x] = CLIPC(difb); + } else if (cbshow) { + transformed->L[y][x] = CLIP(12000.f + difL); + transformed->a[y][x] = CLIPC(difa); + transformed->b[y][x] = CLIPC(difb); } else if (previewcol || previewexp || previewSH || previewcb) { transformed->a[y][x] = 0.f; transformed->b[y][x] = difb; @@ -4959,7 +4973,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o //end TM //begin cbdl - if ((lp.mulloc[0] != 1.f || lp.mulloc[1] != 1.f || lp.mulloc[2] != 1.f || lp.mulloc[3] != 1.f || lp.mulloc[4] != 1.f || lp.clarityml != 0.f || lp.contresid != 0.f || lp.enacbMask || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) && lp.cbdlena) { + if ((lp.mulloc[0] != 1.f || lp.mulloc[1] != 1.f || lp.mulloc[2] != 1.f || lp.mulloc[3] != 1.f || lp.mulloc[4] != 1.f || lp.clarityml != 0.f || lp.contresid != 0.f || lp.enacbMask || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) && lp.cbdlena) { if (call <= 3) { //call from simpleprocess dcrop improcc const int ystart = std::max(static_cast(lp.yc - lp.lyT) - cy, 0); const int yend = std::min(static_cast(lp.yc + lp.ly) - cy, original->H); @@ -4969,6 +4983,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o int bfw = xend - xstart; // int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone // int bfw = int (lp.lx + lp.lxL) + del; + printf("mascb0=%i \n", lp.showmaskcbmet); if (bfw > 32 && bfh > 32) { array2D bufsh(bfw, bfh); @@ -4979,7 +4994,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o std::unique_ptr bufmaskorigcb; std::unique_ptr bufmaskblurcb; std::unique_ptr originalmaskcb; - if ( lp.enacbMask || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) { + if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) { bufmaskorigcb.reset(new LabImage(bfw, bfh)); bufmaskblurcb.reset(new LabImage(bfw, bfh)); originalmaskcb.reset(new LabImage(bfw, bfh)); @@ -5001,7 +5016,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } } - if (lp.enacbMask || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) { + if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) { + #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif @@ -5016,7 +5032,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o kmaskLexp = 32768.f * LIM01(1.f - locllmascbCurve[500.f * ligh]); } - if (lp.showmaskcbmet != 2) { + if (lp.showmaskcbmet != 4) { if (locccmascbCurve && lcmascbutili) { float chromask = 0.0001f + sqrt(SQR((loctemp->a[ir][jr]) / fab) + SQR((loctemp->b[ir][jr]) / fab)); kmaskCH = LIM01(1.f - locccmascbCurve[500.f * chromask]); @@ -5034,7 +5050,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float valHH = LIM01(1.f - lochhmascbCurve[500.f * h]); - if (lp.showmaskcbmet != 2) { + if (lp.showmaskcbmet != 4) { kmaskCH += valHH; } @@ -5073,7 +5089,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float radiusb = 1.f / sk; - if (lp.enacbMask || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) { + if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) { #ifdef _OPENMP #pragma omp parallel @@ -5084,10 +5100,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o gaussianBlur(bufmaskblurcb->b, bufmaskorigcb->b, bfw, bfh, 1.f + (0.5f * lp.radmacb) / sk); } - if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 2 || lp.enacbMask) { + if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 4 || lp.enacbMask) { + blendmask(lp, xstart, ystart, cx, cy, bfw, bfh, loctemp.get(), original, bufmaskorigcb.get(), originalmaskcb.get(), lp.blendmacb); - } else if (lp.showmaskcbmet == 1) { + } else if (lp.showmaskcbmet == 3) { showmask(lp, xstart, ystart, cx, cy, bfw, bfh, loctemp.get(), transformed, bufmaskorigcb.get()); return; } @@ -5099,7 +5116,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o constexpr float b_r = 170.f; constexpr double skinprot = 0.; constexpr int choice = 0; - if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 2 || lp.enacbMask) { + if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 4 || lp.enacbMask) { #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 6e7eb3200..d80336190 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -963,8 +963,8 @@ Locallab::Locallab(): enacbMaskConn = enacbMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::enacbMaskChanged)); showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMNONE")); -// showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIF")); -// showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); + showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIF")); + showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMASK")); showmaskcbMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); From 7e5e8ea8a72572052e09b9f53b1d3a0faa2d4541 Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 17 Apr 2019 12:58:39 +0200 Subject: [PATCH 38/59] re-enabled softprocess CBDL --- rtengine/iplocallab.cc | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 2298e6b93..093f19e97 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -5139,7 +5139,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, lp.mulloc, 1.f, lp.threshol, lp.clarityml, lp.contresid, lp.blurcbdl, skinprot, false, b_l, t_l, t_r, b_r, choice, sk, multiThread); - +/* float minL = loctemp->L[0][0] - origcbdl->L[0][0]; float maxL = minL; #ifdef _OPENMP @@ -5164,12 +5164,34 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o buflight[ir][jr] /= coef; } } - +*/ if (lp.softradiuscb > 0.f) { - softprocess(origcbdl.get(), buflight, lp.softradiuscb, bfh, bfw, sk, multiThread); - } - } + array2D ble(bfw, bfh); + array2D guid(bfw, bfh); +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int ir = 0; ir < bfh; ir++) + for (int jr = 0; jr < bfw; jr++) { + ble[ir][jr] = (loctemp->L[ir][jr] - origcbdl->L[ir][jr]) / 32768.f; + guid[ir][jr] = origcbdl->L[ir][jr] / 32768.f; + } + rtengine::guidedFilter(guid, ble, ble, (lp.softradiuscb * 10.f / sk), 0.04, multiThread); +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int ir = 0; ir < bfh; ir++) + for (int jr = 0; jr < bfw; jr++) { + loctemp->L[ir][jr] = origcbdl->L[ir][jr] + 32768.f * ble[ir][jr]; + } + } + + // softprocess(origcbdl.get(), buflight, lp.softradiuscb, bfh, bfw, sk, multiThread); + // } + + + } transit_shapedetect(6, loctemp.get(), originalmaskcb.get(), buflight, bufchrom, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); //chroma CBDL begin here From 36cd5dbe3d6797f178e1e8040e6d03a4a7a698d7 Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 17 Apr 2019 13:57:22 +0200 Subject: [PATCH 39/59] Clean code - chnage radius softprocees CBDL --- rtengine/iplocallab.cc | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 093f19e97..b1d2a6787 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -5139,32 +5139,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, lp.mulloc, 1.f, lp.threshol, lp.clarityml, lp.contresid, lp.blurcbdl, skinprot, false, b_l, t_l, t_r, b_r, choice, sk, multiThread); -/* - float minL = loctemp->L[0][0] - origcbdl->L[0][0]; - float maxL = minL; -#ifdef _OPENMP - #pragma omp parallel for reduction(max:maxL) reduction(min:minL) schedule(dynamic,16) -#endif - for (int ir = 0; ir < bfh; ir++) { - for (int jr = 0; jr < bfw; jr++) { - buflight[ir][jr] = loctemp->L[ir][jr] - origcbdl->L[ir][jr]; - minL = rtengine::min(minL, buflight[ir][jr]); - maxL = rtengine::max(maxL, buflight[ir][jr]); - } - } - float coef = 0.01f * (max(fabs(minL), fabs(maxL))); - -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) -#endif - - for (int ir = 0; ir < bfh; ir++) { - for (int jr = 0; jr < bfw; jr++) { - buflight[ir][jr] /= coef; - } - } -*/ if (lp.softradiuscb > 0.f) { array2D ble(bfw, bfh); array2D guid(bfw, bfh); @@ -5177,7 +5152,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o guid[ir][jr] = origcbdl->L[ir][jr] / 32768.f; } - rtengine::guidedFilter(guid, ble, ble, (lp.softradiuscb * 10.f / sk), 0.04, multiThread); + rtengine::guidedFilter(guid, ble, ble, (lp.softradiuscb * 2.f / sk), 0.001, multiThread); #ifdef _OPENMP #pragma omp parallel for #endif @@ -5186,11 +5161,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o loctemp->L[ir][jr] = origcbdl->L[ir][jr] + 32768.f * ble[ir][jr]; } } - - // softprocess(origcbdl.get(), buflight, lp.softradiuscb, bfh, bfw, sk, multiThread); - // } - - + } transit_shapedetect(6, loctemp.get(), originalmaskcb.get(), buflight, bufchrom, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); From b3cf43025e91610b6bfdd769816c0ae76f187ac1 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 17 Apr 2019 14:31:32 +0200 Subject: [PATCH 40/59] Updates for 5.6-rc2 --- RELEASE_NOTES.txt | 6 +- com.rawtherapee.RawTherapee.appdata.xml | 1 + rtdata/images/svg/splash.svg | 158 ++++++++++++------------ 3 files changed, 83 insertions(+), 82 deletions(-) diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index c585019d0..450bae2d6 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -1,6 +1,6 @@ -RAWTHERAPEE 5.6-rc1 RELEASE NOTES +RAWTHERAPEE 5.6-rc2 RELEASE NOTES -This is RawTherapee 5.6 Release Candidate 1, released on 2019-04-10. This is not the final release yet. +This is RawTherapee 5.6 Release Candidate 2, released on 2019-04-17. This is not the final release yet. Start by reading the "Getting Started" article on RawPedia: http://rawpedia.rawtherapee.com/ @@ -20,7 +20,7 @@ In order to use RawTherapee efficiently you should know that: - There are many keyboard shortcuts which make working with RawTherapee much faster and give you greater control. Make sure you familiarize yourself with them on RawPedia's "Keyboard Shortcuts" page! New features since 5.5: -- HiDPI support, for a smooth and sharp user interface regardless of screen size. Scaling in RawTherapee depends on font size, DPI and display scaling. No scaling occurs when the font size is set to 9pt, DPI is set to 96 (or 72 for macOS) and scaling is set to 1 (100%). +- Pseudo-HiDPI support, for a smooth and sharp user interface regardless of screen size. Pseudo-HiDPI mode is disabled by default, enable it in Preferences > General > Appearance. Scaling in RawTherapee depends on font size, DPI and display scaling. While scaling has been tested to work well in Windows, Linux and macOS, there are some macOS display modes which are incompatible with it, specifically those modes suffixed by "(HiDPI)" in macOS Display settings. Some versions of macOS (10.14.*) seem to not list any modes, in which case the user must just give it a try. - Ability to move tools to a new Favorites tab, http://rawpedia.rawtherapee.com/Favorites_Tab - "Unclipped" processing profile, to make it easy to save an image while preserving data across the whole tonal range, http://rawpedia.rawtherapee.com/Unclipped - User-adjustable tiles-per-thread settings in Preferences > Performance, for users who want to find optimal values for their system. The default value of 2 tiles-per-thread performs best overall. diff --git a/com.rawtherapee.RawTherapee.appdata.xml b/com.rawtherapee.RawTherapee.appdata.xml index 9b5f6d1d6..d7a1a4071 100644 --- a/com.rawtherapee.RawTherapee.appdata.xml +++ b/com.rawtherapee.RawTherapee.appdata.xml @@ -35,6 +35,7 @@ https://discuss.pixls.us/t/localization-how-to-translate-rawtherapee-and-rawpedia/2594 rawtherapee.desktop + diff --git a/rtdata/images/svg/splash.svg b/rtdata/images/svg/splash.svg index 2024fcd57..392298cc0 100644 --- a/rtdata/images/svg/splash.svg +++ b/rtdata/images/svg/splash.svg @@ -1047,85 +1047,6 @@ x="61.72514" id="tspan611" sodipodi:role="line">Raw - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + From 4a0a6251bb1fed86bce35471989396f478d67047 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 17 Apr 2019 14:33:36 +0200 Subject: [PATCH 41/59] generateTranslationDiffs --- rtdata/languages/Catala | 1 + rtdata/languages/Chinese (Simplified) | 1 + rtdata/languages/Czech | 1 + rtdata/languages/Deutsch | 1 + rtdata/languages/English (UK) | 1 + rtdata/languages/English (US) | 1 + rtdata/languages/Espanol | 1 + rtdata/languages/Italiano | 1 + rtdata/languages/Japanese | 1 + rtdata/languages/Magyar | 1 + rtdata/languages/Nederlands | 1 + rtdata/languages/Polish | 1 + rtdata/languages/Portugues | 1 + rtdata/languages/Portugues (Brasil) | 1 + rtdata/languages/Russian | 1 + rtdata/languages/Serbian (Cyrilic Characters) | 1 + rtdata/languages/Swedish | 1 + 17 files changed, 17 insertions(+) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 38d8c7588..1a8a7ccac 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -1470,6 +1470,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color !PREFERENCES_APPEARANCE_MAINFONT;Main font !PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Navigator guide color +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_APPEARANCE_THEME;Theme !PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit !PREFERENCES_BEHADDALL;All to 'Add' diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index df3093b9d..45d9b912a 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -1495,6 +1495,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font !PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color !PREFERENCES_APPEARANCE_MAINFONT;Main font +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_APPEARANCE_THEME;Theme !PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit !PREFERENCES_BEHADDALLHINT;Set all parameters to the Add mode.\nAdjustments of parameters in the batch tool panel will be deltas to the stored values. diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index ff8293acb..1a7cff0d4 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -2296,6 +2296,7 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !MAIN_FRAME_PLACES_DEL;Remove !MAIN_TAB_FAVORITES;Favorites !MAIN_TAB_FAVORITES_TOOLTIP;Shortcut: Alt-u +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_CHUNKSIZES;Tiles per thread !PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE demosaic !PREFERENCES_CHUNKSIZE_RAW_CA;Raw CA correction diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index db136f330..623848843 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -2359,4 +2359,5 @@ ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !QUEUE_LOCATION_TITLE;Output Location diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index ac4b15e3d..45493ac97 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -1115,6 +1115,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_ADD;Add !PREFERENCES_APPEARANCE;Appearance !PREFERENCES_APPEARANCE_MAINFONT;Main font +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_APPEARANCE_THEME;Theme !PREFERENCES_APPLNEXTSTARTUP;restart required !PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index 10ad1f740..4d510c4b5 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -1040,6 +1040,7 @@ !PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color !PREFERENCES_APPEARANCE_MAINFONT;Main font !PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Navigator guide color +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_APPEARANCE_THEME;Theme !PREFERENCES_APPLNEXTSTARTUP;restart required !PREFERENCES_AUTOMONPROFILE;Use operating system's main monitor color profile diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 9ffbb0323..dfb4d8acc 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -2324,6 +2324,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nTecla de Atajo: - !MAIN_FRAME_PLACES_DEL;Remove !MAIN_TAB_FAVORITES;Favorites !MAIN_TAB_FAVORITES_TOOLTIP;Shortcut: Alt-u +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_CHUNKSIZES;Tiles per thread !PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE demosaic !PREFERENCES_CHUNKSIZE_RAW_CA;Raw CA correction diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index cece7e78b..3c5a0201a 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1671,6 +1671,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font !PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color !PREFERENCES_APPEARANCE_MAINFONT;Main font +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_APPEARANCE_THEME;Theme !PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit !PREFERENCES_CACHECLEAR;Clear diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 2e5e103bf..96b509789 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -2311,4 +2311,5 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !QUEUE_LOCATION_TITLE;Output Location diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index 692c02c83..8c77b48a5 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -1409,6 +1409,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color !PREFERENCES_APPEARANCE_MAINFONT;Main font !PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Navigator guide color +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_APPEARANCE_THEME;Theme !PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit !PREFERENCES_BEHADDALL;All to 'Add' diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index 3ac4d8d6c..5cf76e569 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -2129,6 +2129,7 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font !PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color !PREFERENCES_APPEARANCE_MAINFONT;Main font +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_APPEARANCE_THEME;Theme !PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit !PREFERENCES_CACHECLEAR;Clear diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 75453e6e7..1e60f840b 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1748,6 +1748,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font !PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color !PREFERENCES_APPEARANCE_MAINFONT;Main font +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_APPEARANCE_THEME;Theme !PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit !PREFERENCES_CACHECLEAR;Clear diff --git a/rtdata/languages/Portugues b/rtdata/languages/Portugues index 57b2758a7..912687542 100644 --- a/rtdata/languages/Portugues +++ b/rtdata/languages/Portugues @@ -2264,6 +2264,7 @@ ZOOMPANEL_ZOOMOUT;Afastar\nAtalho: - !FILEBROWSER_BROWSEPATHBUTTONHINT;Click to open specified path, reload folder and apply "find" keywords. !MAIN_FRAME_PLACES_DEL;Remove +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PROGRESSBAR_DECODING;Decoding... !PROGRESSBAR_GREENEQUIL;Green equilibration... !PROGRESSBAR_HLREC;Highlight reconstruction... diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index 8e6dbd45d..0493dfc6a 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -2258,6 +2258,7 @@ ZOOMPANEL_ZOOMOUT;Menos Zoom\nAtalho: - !HISTORY_MSG_COLORTONING_LABREGION_OFFSET;CT - region offset !HISTORY_MSG_COLORTONING_LABREGION_POWER;CT - region power !MAIN_FRAME_PLACES_DEL;Remove +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_CACHECLEAR_SAFETY;Only files in the cache are cleared. Processing profiles stored alongside the source images are not touched. !PROGRESSBAR_DECODING;Decoding... !PROGRESSBAR_GREENEQUIL;Green equilibration... diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index 62c3d797d..1da4584f3 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -1784,6 +1784,7 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: - !PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_PIXELSHIFT;Pixel Shift !PARTIALPASTE_RETINEX;Retinex +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_CACHECLEAR_ALL;Clear all cached files: !PREFERENCES_CACHECLEAR_ALLBUTPROFILES;Clear all cached files except for cached processing profiles: !PREFERENCES_CACHECLEAR_ONLYPROFILES;Clear only cached processing profiles: diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 066169b04..484d4f20b 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1657,6 +1657,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color !PREFERENCES_APPEARANCE_MAINFONT;Main font !PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Navigator guide color +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_APPEARANCE_THEME;Theme !PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit !PREFERENCES_CACHECLEAR;Clear diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index aa6fcb340..8394d306b 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1986,6 +1986,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font !PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color !PREFERENCES_APPEARANCE_MAINFONT;Main font +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode !PREFERENCES_APPEARANCE_THEME;Theme !PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit !PREFERENCES_CACHECLEAR;Clear From 2ffaf4baa21183f34292e1760067b4b312c6b6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mari=C3=A1n=20Kyral?= Date: Wed, 17 Apr 2019 15:37:58 +0200 Subject: [PATCH 42/59] Update Czech translation --- rtdata/languages/Czech | 72 ++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index ff8293acb..dab8d8ad3 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -42,6 +42,7 @@ #41 2018-03-03 updated by mkyral #42 2018-04-28 updated by mkyral #43 2018-12-13 updated by mkyral +#44 2019-04-17 updated by mkyral ABOUT_TAB_BUILD;Verze ABOUT_TAB_CREDITS;Zásluhy @@ -152,6 +153,7 @@ FILEBROWSER_APPLYPROFILE;Použít FILEBROWSER_APPLYPROFILE_PARTIAL;Aplikovat - částečně FILEBROWSER_AUTODARKFRAME;Automatický tmavý snímek FILEBROWSER_AUTOFLATFIELD;Auto Flat Field +FILEBROWSER_BROWSEPATHBUTTONHINT;Klikněte pro otevření zadané cesty, obnovte složku a aplikujte klíčové slovo "find". FILEBROWSER_BROWSEPATHHINT;Vložte cestu pro procházení.\n\nKlávesové zkratky:\nCtrl-o pro přepnutí do adresního řádku.\nEnter/ Ctrl-Enter pro procházení ;\nEsc pro zrušení změn.\nShift-Esc pro zrušení přepnutí.\n\nZkratky pro cesty:\n~\t- domácí složka uživatele.\n!\t- složka s obrázky uživatele. FILEBROWSER_CACHE;Mezipaměť FILEBROWSER_CACHECLEARFROMFULL;Smazat vše včetně profilů zpracování v mezipaměti @@ -808,6 +810,7 @@ HISTORY_MSG_RAWCACORR_AUTOIT;Raw korekce CA - Iterace HISTORY_MSG_RAWCACORR_COLORSHIFT;Raw korekce CA - Zabránit posunu barev HISTORY_MSG_RAW_BORDER;Okraj Raw HISTORY_MSG_RESIZE_ALLOWUPSCALING;Změna rozměrů - Povolit zvětšení +HISTORY_MSG_SHARPENING_BLUR;Doostření - Poloměr rozmazání HISTORY_MSG_SHARPENING_CONTRAST;Doostření - Práh kontrastu HISTORY_MSG_SH_COLORSPACE;S/S - Barevný prostor HISTORY_MSG_SOFTLIGHT_ENABLED;Měkké světlo @@ -918,6 +921,7 @@ MAIN_FRAME_FILEBROWSER;Prohlížeč souborů MAIN_FRAME_FILEBROWSER_TOOLTIP;Prohlížeč souborů.\nZkratka: Ctrl-F2 MAIN_FRAME_PLACES;Místa MAIN_FRAME_PLACES_ADD;Přidat +MAIN_FRAME_PLACES_DEL;Smazat MAIN_FRAME_QUEUE;Fronta MAIN_FRAME_QUEUE_TOOLTIP;Fronta zpracování.\nZkratka: Ctrl-F3 MAIN_FRAME_RECENT;Poslední složky @@ -946,6 +950,8 @@ MAIN_TAB_EXIF;Exif MAIN_TAB_EXPORT; Rychlý export MAIN_TAB_EXPOSURE;Expozice MAIN_TAB_EXPOSURE_TOOLTIP;Zkratka: Alt-e +MAIN_TAB_FAVORITES;Oblíbené +MAIN_TAB_FAVORITES_TOOLTIP;Zkratka: Alt-u MAIN_TAB_FILTER; Filtr MAIN_TAB_INSPECT; Prohlížení MAIN_TAB_IPTC;IPTC @@ -1093,6 +1099,12 @@ PREFERENCES_CACHECLEAR_SAFETY;Jsou smazány pouze soubory ve vyrovnávací pamě PREFERENCES_CACHEMAXENTRIES;Maximální počet záznamů v mezipaměti PREFERENCES_CACHEOPTS;Vlastnosti mezipaměti PREFERENCES_CACHETHUMBHEIGHT;Maximální výška náhledu +PREFERENCES_CHUNKSIZES;Dlaždic na vlákno +PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE demozajkování +PREFERENCES_CHUNKSIZE_RAW_CA;Raw korekce CA +PREFERENCES_CHUNKSIZE_RAW_RCD;RCD demozajkování +PREFERENCES_CHUNKSIZE_RAW_XT;Xtrans demozajkování +PREFERENCES_CHUNKSIZE_RGB;RGB zpracování PREFERENCES_CLIPPINGIND;Indikace oříznutí PREFERENCES_CLUTSCACHE;Mezipaměť HaldCLUT PREFERENCES_CLUTSCACHE_LABEL;Maximální počet přednačtených CLUTů @@ -1180,6 +1192,8 @@ PREFERENCES_PARSEDEXTADDHINT;Vymazat označenou příponu ze seznamu. PREFERENCES_PARSEDEXTDELHINT;Vymazat označenou příponu ze seznamu. PREFERENCES_PARSEDEXTDOWNHINT;Vybranou příponu posunout na seznamu níže. PREFERENCES_PARSEDEXTUPHINT;Vybranou příponu posunout na seznamu výše. +PREFERENCES_PERFORMANCE_MEASURE;Měřit +PREFERENCES_PERFORMANCE_MEASURE_HINT;Vypisovat časy zpracování v konzoli PREFERENCES_PERFORMANCE_THREADS;Vlákna PREFERENCES_PERFORMANCE_THREADS_LABEL;Maximální počet vláken pro Redukci šumu a Úrovně vlnky (0 = Automaticky) PREFERENCES_PREVDEMO;Metoda demozajkování náhledu @@ -1254,6 +1268,11 @@ PROFILEPANEL_TOOLTIPCOPY;Kopírovat současný profil do schránky.\nCtrl-kli PROFILEPANEL_TOOLTIPLOAD;Nahrát profil ze souboru.\nCtrl-klik umožní vybrat parametry pro nahrání. PROFILEPANEL_TOOLTIPPASTE;Vložit profil ze schránky.\nCtrl-klik umožní vybrat parametry pro vložení. PROFILEPANEL_TOOLTIPSAVE;Uložit současný profil.\nCtrl-klik umožní vybrat parametry pro uložení. +PROGRESSBAR_DECODING;Dekodování... +PROGRESSBAR_GREENEQUIL;Vyrovnání zelené... +PROGRESSBAR_HLREC;Rekonstrukce světel... +PROGRESSBAR_HOTDEADPIXELFILTER;Filtr vypálených/mrtvých pixelů... +PROGRESSBAR_LINEDENOISE;Filtr linkového rušení... PROGRESSBAR_LOADING;Načítání obrázku... PROGRESSBAR_LOADINGTHUMBS;Načítání náhledů... PROGRESSBAR_LOADJPEG;Načítání JPEG... @@ -1262,6 +1281,7 @@ PROGRESSBAR_LOADTIFF;Načítání TIFF... PROGRESSBAR_NOIMAGES;Složka neobsahuje obrázky PROGRESSBAR_PROCESSING;Zpracovávaní obrázku... PROGRESSBAR_PROCESSING_PROFILESAVED;Profil zpracování uložen +PROGRESSBAR_RAWCACORR;RAW korekce chromatické aberace... PROGRESSBAR_READY;Připraven PROGRESSBAR_SAVEJPEG;Ukládání JPEG souboru... PROGRESSBAR_SAVEPNG;Ukládání PNG souboru... @@ -1279,7 +1299,8 @@ QUEUE_DESTFILENAME;Cesta a název souboru QUEUE_FORMAT_TITLE;Formát souboru QUEUE_LOCATION_FOLDER;Ulož do souboru QUEUE_LOCATION_TEMPLATE;Použít šablonu -QUEUE_LOCATION_TEMPLATE_TOOLTIP;Lze použít následující formátovací řetězce:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nTyto formátovací řetězce reprezentují různé části cesty k uložené fotografii, některé vlastnosti fotografie nebo pořadí v dávce.\n\nNapříklad pokud má zpracovávaná fotografie následující cestu:\n/home/tomas/fotky/2010-10-31/dsc0042.nef,\nmají jednotlivé formátovací řetězce tento význam:\n%d4 = home\n%d3 = tomas\n%d2 = fotky\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tomas/fotky/2010-10-31/\n%p2 = /home/tomas/fotky/\n%p3 = /home/tomas/\n%p4 = /home/\n\n%r bude nahrazeno hodnocením fotografie. Pokud není fotografie ohodnocena, bude %r nahrazeno '0'. Pokud je fotografie v koši, bude %r nahrazeno 'x'.\n\n%s1, %s2, atd. bude nahrazeno pořadím v dávce doplněném na 1 až 9 číslic. Každé spuštění zpracování fronty jej vždy nastaví na jedna a po každé zpracované fotografii se o jedna zvýší .\n\nPokud si přejete uložit výstupní obrázek vedle originálu, napište:\n%p1/%f\n\nPokud si jej ale přejete uložit do adresáře "zpracovano" ve stejném adresáři jako otevřený obrázek, napište:\n%p1/zpracovano/%f\n\nPro uložení výstupního obrázku do adresáře\n"/home/tom/fotky/zpracovano/2010-10-31", napište:\n%p2/zpracovano/%d1/%f +QUEUE_LOCATION_TEMPLATE_TOOLTIP;Specifikujte kam se mají uložit výstupy. Lze použít umístění zdrojových souborů, pořadí, stav koše nebo pozice ve frontě.\n\nNapříklad pokud má zpracovávaná fotografie následující cestu:\n/home/tomas/fotky/2010-10-31/dsc0042.nef,\nmají jednotlivé formátovací řetězce tento význam:\n%d4 = home\n%d3 = tomas\n%d2 = fotky\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tomas/fotky/2010-10-31/\n%p2 = /home/tomas/fotky/\n%p3 = /home/tomas/\n%p4 = /home/\n\n%r bude nahrazeno hodnocením fotografie.Pokud není fotografie ohodnocena, bude %r nahrazeno '0'.Pokud je fotografie v koši, bude %r nahrazeno 'x'.\n\nPokud si přejete uložit výstupní obrázek vedle originálu, napište:\n%p1/%f\n\nPokud si jej ale přejete uložit do adresáře "converted" ve stejném adresáři jako otevřený obrázek, napište:\n%p1/converted/%f\n\nPro uložení výstupního obrázku do adresáře"/home/tom/photos/converted/2010-10-31", napište:\n%p2/converted/%d1/%f +QUEUE_LOCATION_TITLE;Výstupní umístění QUEUE_STARTSTOP_TOOLTIP;Spustit nebo zastavit zpracování obrázků ve frontě.\n\nZkratka: Ctrl+s SAMPLEFORMAT_0;Neznámý datový formát SAMPLEFORMAT_1;8-bitový neznaménkový @@ -1316,7 +1337,7 @@ THRESHOLDSELECTOR_HINT;Držte klávesu Shift pro přesun individuálních THRESHOLDSELECTOR_T;Nahoře THRESHOLDSELECTOR_TL;Nahoře vlevo THRESHOLDSELECTOR_TR;Nahoře vpravo -TOOLBAR_TOOLTIP_COLORPICKER;Uzamykatelný Průzkumník barev\n\nPokud je nástroj aktivní:\n- Přidání sondy: levý-klik.\n- Posunutí sondy: levý-klik a posunutí.\n- Smazání sondy: pravý-klik.\n- Smazání všech sond: shift+pravý-klik.\n- Návrat k nástroji posunu: pravý-klik. +TOOLBAR_TOOLTIP_COLORPICKER;Uzamykatelný Průzkumník barev\n\nPokud je nástroj aktivní:\n- Přidání sondy: levý-klik.\n- Posunutí sondy: levý-klik a posunutí.\n- Smazání sondy: pravý-klik.\n- Smazání všech sond: Ctrl+Shift+pravý-klik.\n- Návrat k nástroji posunu: pravý-klik mimo průzkumníky. TOOLBAR_TOOLTIP_CROP;Oříznutí výběru.\nZkratka: c\nVýřez posunete pomocí Shift + tažení myši TOOLBAR_TOOLTIP_HAND;Posun.\nZkratka: h TOOLBAR_TOOLTIP_STRAIGHTEN;Vyznačení roviny / rotace.\nZkratka: s\n\nZobrazení míry rotace pomocí vodící linky na náhledu snímky. Úhel rotace je zobrazen vedle vodící linky. Střed rotace je geometrický střed snímku. @@ -1533,6 +1554,7 @@ TP_CROP_GTTRIANGLE2;Zlaté trojúhelníky 2 TP_CROP_GUIDETYPE;Druh vodítek: TP_CROP_H;Výška TP_CROP_LABEL;Ořez +TP_CROP_PPI;PPI TP_CROP_RESETCROP;Obnovit TP_CROP_SELECTCROP;Vybrat TP_CROP_W;Šířka @@ -1773,10 +1795,15 @@ TP_LABCURVE_RSTPRO_TOOLTIP;Pracuje s posuvníkem barevnosti a CC křivkou. TP_LENSGEOM_AUTOCROP;Automatický ořez TP_LENSGEOM_FILL;Automatické vyplnění TP_LENSGEOM_LABEL;Objektiv / Geometrie +TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automaticky vybráno TP_LENSPROFILE_CORRECTION_LCPFILE;LCP soubor +TP_LENSPROFILE_CORRECTION_MANUAL;Ručně vybráno TP_LENSPROFILE_LABEL;Korekční profily objektivů TP_LENSPROFILE_LENS_WARNING;Varování: crop factor použitý pro profilování objektivu je větší než crop factor fotoaparátu. Výsledek může být nesprávný. +TP_LENSPROFILE_MODE_HEADER;Profil objektivu TP_LENSPROFILE_USE_CA;Chromatická aberace +TP_LENSPROFILE_USE_GEOMETRIC;Geometrické zkreslení +TP_LENSPROFILE_USE_HEADER;Opravit TP_LENSPROFILE_USE_VIGNETTING;Vinětace TP_LOCALCONTRAST_AMOUNT;Míra TP_LOCALCONTRAST_DARKNESS;Úroveň tmavé @@ -1861,7 +1888,8 @@ TP_RAW_HD_TOOLTIP;Nižší hodnoty učiní detekci vypálených/mrtvých bodů a TP_RAW_HPHD;HPHD TP_RAW_IGV;IGV TP_RAW_IMAGENUM;Dílčí snímek -TP_RAW_IMAGENUM_TOOLTIP;Některé raw snímky obsahují několik podsnímků (Pentax/Sony Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nV případě, že je pro demozajkování použita jiná metoda než Pixel Shift, tato volba určí, který podsnímek se použije.\n\nPokud je použita Pixel Shift metoda demozajkování na Pixel Shift raw soubory, budou použity všechny podsnímky a tato volba určí, který snímek bude použit pro pohyblivé části. +TP_RAW_IMAGENUM_SN;Režim SN +TP_RAW_IMAGENUM_TOOLTIP;Některé raw snímky obsahují několik podsnímků (Pentax/Sony Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel, Fuji EXR).\n\nV případě, že je pro demozajkování použita jiná metoda než Pixel Shift, tato volba určí, který podsnímek se použije.\n\nPokud je použita Pixel Shift metoda demozajkování na Pixel Shift raw soubory, budou použity všechny podsnímky a tato volba určí, který snímek bude použit pro pohyblivé části. TP_RAW_LABEL;Demozajkování TP_RAW_LMMSE;LMMSE TP_RAW_LMMSEITERATIONS;Kroky rozšíření LMMSE @@ -1901,6 +1929,8 @@ TP_RAW_SENSOR_BAYER_LABEL;Snímač s Bayerovou maskou TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;Tří průchodová dává lepší výsledky (doporučeno pro fotky s nízkým ISO).\nJednoprůchodová je téměř k nerozeznání od tří průchodové pro vysoké ISO a je rychlejší.\n+rychlá vytváří méně artefaktů v plochých oblastech TP_RAW_SENSOR_XTRANS_LABEL;Senzory s X-Trans maticí TP_RAW_VNG4;VNG4 +TP_RAW_XTRANS;X-Trans +TP_RAW_XTRANSFAST;Fast X-Trans TP_RESIZE_ALLOW_UPSCALING;Povolit zvětšení TP_RESIZE_APPLIESTO;Aplikovat na: TP_RESIZE_CROPPEDAREA;Oblast ořezu @@ -2017,6 +2047,7 @@ TP_SHARPENEDGE_LABEL;Hrany TP_SHARPENEDGE_PASSES;Počet průchodů TP_SHARPENEDGE_THREE;Pouze jas TP_SHARPENING_AMOUNT;Míra +TP_SHARPENING_BLUR;Poloměr rozostření TP_SHARPENING_CONTRAST;Práh kontrastu TP_SHARPENING_EDRADIUS;Poloměr TP_SHARPENING_EDTOLERANCE;Tolerance k hranám @@ -2286,38 +2317,3 @@ ZOOMPANEL_ZOOMFITCROPSCREEN;Přizpůsobit ořez obrazovce\nZkratka: f ZOOMPANEL_ZOOMFITSCREEN;Přizpůsobit celý obrázek obrazovce\nZkratka: Alt-f ZOOMPANEL_ZOOMIN;Přiblížit\nZkratka: + ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - - -!!!!!!!!!!!!!!!!!!!!!!!!! -! Untranslated keys follow; remove the ! prefix after an entry is translated. -!!!!!!!!!!!!!!!!!!!!!!!!! - -!FILEBROWSER_BROWSEPATHBUTTONHINT;Click to open specified path, reload folder and apply "find" keywords. -!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius -!MAIN_FRAME_PLACES_DEL;Remove -!MAIN_TAB_FAVORITES;Favorites -!MAIN_TAB_FAVORITES_TOOLTIP;Shortcut: Alt-u -!PREFERENCES_CHUNKSIZES;Tiles per thread -!PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE demosaic -!PREFERENCES_CHUNKSIZE_RAW_CA;Raw CA correction -!PREFERENCES_CHUNKSIZE_RAW_RCD;RCD demosaic -!PREFERENCES_CHUNKSIZE_RAW_XT;Xtrans demosaic -!PREFERENCES_CHUNKSIZE_RGB;RGB processing -!PREFERENCES_PERFORMANCE_MEASURE;Measure -!PREFERENCES_PERFORMANCE_MEASURE_HINT;Logs processing times in console -!PROGRESSBAR_DECODING;Decoding... -!PROGRESSBAR_GREENEQUIL;Green equilibration... -!PROGRESSBAR_HLREC;Highlight reconstruction... -!PROGRESSBAR_HOTDEADPIXELFILTER;Hot/dead pixel filter... -!PROGRESSBAR_LINEDENOISE;Line noise filter... -!PROGRESSBAR_RAWCACORR;Raw CA correction... -!QUEUE_LOCATION_TITLE;Output Location -!TP_CROP_PPI;PPI -!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected -!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected -!TP_LENSPROFILE_MODE_HEADER;Lens Profile -!TP_LENSPROFILE_USE_GEOMETRIC;Geometric distortion -!TP_LENSPROFILE_USE_HEADER;Correct -!TP_RAW_IMAGENUM_SN;SN mode -!TP_RAW_XTRANS;X-Trans -!TP_RAW_XTRANSFAST;Fast X-Trans -!TP_SHARPENING_BLUR;Blur radius From 4f06d38c84628db9b2b7586b862e2ccfc8e943ae Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 17 Apr 2019 17:37:02 +0200 Subject: [PATCH 43/59] Improve softlight --- rtengine/iplocallab.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index b1d2a6787..4ee92de09 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2589,14 +2589,14 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor float newhr = 0.f; float difL = 0.f; - if (senstype == 2 || senstype == 3 || senstype == 8) {//all except color and light (TODO) and exposure + if (senstype == 2 || senstype == 8) { const float lightc = bufexporig->L[y - ystart][x - xstart]; const float fli = (100.f + realstrdE) / 100.f; transformed->L[y][x] = CLIP(original->L[y][x] + (lightc * fli - original->L[y][x]) * factorx); } else if (senstype == 6) { difL = (bufexporig->L[y - ystart][x - xstart] - original->L[y][x]) * localFactor * reducdE; transformed->L[y][x] = CLIP(original->L[y][x] + difL); - } else if (senstype == 1 || senstype == 0 || senstype == 9) { + } else if (senstype == 1 || senstype == 0 || senstype == 9 || senstype == 3) { if (HHutili) { const float hhro = bufhh[y - ystart][x - xstart]; @@ -2713,14 +2713,14 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor float diflc = 0.f; float newhr = 0.f; float difL = 0.f; - if (senstype == 2 || senstype == 3 || senstype == 8) { //retinex & cbdl + if (senstype == 2 || senstype == 8) { //retinex & cbdl const float lightc = bufexporig->L[y - ystart][x - xstart]; const float fli = (100.f + realstrdE) / 100.f; transformed->L[y][x] = CLIP(original->L[y][x] + lightc * fli - original->L[y][x]); } else if (senstype == 6) { difL = (bufexporig->L[y - ystart][x - xstart] - original->L[y][x]) * reducdE; transformed->L[y][x] = CLIP(original->L[y][x] + difL); - } else if (senstype == 1 || senstype == 0 || senstype == 9 ) { + } else if (senstype == 1 || senstype == 0 || senstype == 9 || senstype == 3) { if (HHutili) { const float hhro = bufhh[y - ystart][x - xstart]; From 241fb8fdb9af18fa7d6665ebd579f557236740de Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 18 Apr 2019 07:58:44 +0200 Subject: [PATCH 44/59] Add sofradius TM --- rtdata/languages/default | 1 + rtengine/iplocallab.cc | 10 +++++++++- rtengine/procevents.h | 1 + rtengine/procparams.cc | 4 ++++ rtengine/procparams.h | 1 + rtengine/refreshmap.cc | 3 ++- rtgui/locallab.cc | 19 +++++++++++++++++++ rtgui/locallab.h | 1 + rtgui/paramsedited.cc | 7 +++++++ rtgui/paramsedited.h | 1 + 10 files changed, 46 insertions(+), 2 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index adbdf68e6..ad48702a3 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -918,6 +918,7 @@ HISTORY_MSG_670;Local - cbdl mask C HISTORY_MSG_671;Local - cbdl mask L HISTORY_MSG_672;Local - cbdl mask CL HISTORY_MSG_673;Local - Use cbdl mask +HISTORY_MSG_675;Local - TM soft radius HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 4ee92de09..75a2a8bcc 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -182,6 +182,7 @@ struct local_params { float softradiuscol; float softradiuscb; float softradiusret; + float softradiustm; float blendmaexp; float radmaSH; float blendmaSH; @@ -505,6 +506,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float softradiusexpo = ((float) locallab.spots.at(sp).softradiusexp); float softradiuscolor = ((float) locallab.spots.at(sp).softradiuscol); float softradiusreti = ((float) locallab.spots.at(sp).softradiusret); + float softradiustma = ((float) locallab.spots.at(sp).softradiustm); float softradiuscbdl = ((float) locallab.spots.at(sp).softradiuscb); float blendmaskSH = ((float) locallab.spots.at(sp).blendmaskSH) / 100.f ; float radmaskSH = ((float) locallab.spots.at(sp).radmaskSH); @@ -580,6 +582,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.softradiuscol = softradiuscolor; lp.softradiusret = softradiusreti; lp.softradiuscb = softradiuscbdl; + lp.softradiustm = softradiustma; lp.struexc = structexclude; lp.blendmaexp = blendmaskexpo; lp.blendmaSH = blendmaskSH; @@ -4916,7 +4919,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o const int bfw = xend - xstart; if (bfw > 0 && bfh > 0) { - JaggedArray buflight(bfw, bfh); + array2D buflight(bfw, bfh); JaggedArray bufchro(bfw, bfh); std::unique_ptr bufgb(new LabImage(bfw, bfh)); //buffer for data in zone limit std::unique_ptr tmp1(new LabImage(bfw, bfh)); //buffer for data in zone limit @@ -4965,6 +4968,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bufchro[y][x] /= coefC; } } + + if (lp.softradiustm > 0.f) { + softprocess(bufgb.get(), buflight, lp.softradiustm, bfh, bfw, sk, multiThread); + } + bufgb.reset(); transit_shapedetect(8, tmp1.get(), nullptr, buflight, bufchro, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); } diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 8c470e1d7..621585a6a 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -701,6 +701,7 @@ enum ProcEventCode { EvlocallabHHmaskcbshape = 671, EvLocallabEnacbMask = 672, EvlocallabshowmaskcbMethod = 673, + Evlocallabsoftradiustm = 674, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 409178dad..e97b30777 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2462,6 +2462,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : scaltm(10), rewei(0), sensitm(19), + softradiustm(0.0), // Retinex expreti(false), retinexMethod("high"), @@ -2657,6 +2658,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && scaltm == other.scaltm && rewei == other.rewei && sensitm == other.sensitm + && softradiustm == other.softradiustm // Retinex && expreti == other.expreti && retinexMethod == other.retinexMethod @@ -3808,6 +3810,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).scaltm, "Locallab", "Scaltm_" + std::to_string(i), spot.scaltm, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).rewei, "Locallab", "Rewei_" + std::to_string(i), spot.rewei, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensitm, "Locallab", "Sensitm_" + std::to_string(i), spot.sensitm, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).softradiustm, "Locallab", "Softradiustm_" + std::to_string(i), spot.softradiustm, keyFile); // Retinex saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expreti, "Locallab", "Expreti_" + std::to_string(i), spot.expreti, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).retinexMethod, "Locallab", "retinexMethod_" + std::to_string(i), spot.retinexMethod, keyFile); @@ -5100,6 +5103,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Scaltm_" + std::to_string(i), pedited, spot.scaltm, spotEdited.scaltm); assignFromKeyfile(keyFile, "Locallab", "Rewei_" + std::to_string(i), pedited, spot.rewei, spotEdited.rewei); assignFromKeyfile(keyFile, "Locallab", "Sensitm_" + std::to_string(i), pedited, spot.sensitm, spotEdited.sensitm); + assignFromKeyfile(keyFile, "Locallab", "Softradiustm_" + std::to_string(i), pedited, spot.softradiustm, spotEdited.softradiustm); // Retinex assignFromKeyfile(keyFile, "Locallab", "Expreti_" + std::to_string(i), pedited, spot.expreti, spotEdited.expreti); assignFromKeyfile(keyFile, "Locallab", "retinexMethod_" + std::to_string(i), pedited, spot.retinexMethod, spotEdited.retinexMethod); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 9d95f78b0..6fb35ac71 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1063,6 +1063,7 @@ struct LocallabParams { int scaltm; int rewei; int sensitm; + double softradiustm; // Retinex bool expreti; Glib::ustring retinexMethod; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 085272c24..9760f0aa8 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -700,7 +700,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //EvlocallabLLmaskcbshape LUMINANCECURVE, //EvlocallabHHmaskcbshape LUMINANCECURVE, //EvLocallabEnacbMask - LUMINANCECURVE //EvlocallabshowmaskcbMethod + LUMINANCECURVE, //EvlocallabshowmaskcbMethod + LUMINANCECURVE //Evlocallabsoftradiustm }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index d80336190..5e9b67cbb 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -143,6 +143,7 @@ Locallab::Locallab(): scaltm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALTM"), 1, 100, 1, 10))), rewei(Gtk::manage(new Adjuster(M("TP_LOCALLAB_REWEI"), 0, 9, 1, 0))), sensitm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), + softradiustm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), // Retinex str(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STR"), 0, 100, 1, 0))), chrrt(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHRRT"), 0, 100, 1, 0))), @@ -768,6 +769,7 @@ Locallab::Locallab(): if(showtooltip) sensitm->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); sensitm->setAdjusterListener(this); + softradiustm->setAdjusterListener(this); ToolParamBlock* const tmBox = Gtk::manage(new ToolParamBlock()); tmBox->pack_start(*stren); @@ -775,6 +777,7 @@ Locallab::Locallab(): tmBox->pack_start(*estop); tmBox->pack_start(*scaltm); tmBox->pack_start(*rewei); + tmBox->pack_start(*softradiustm); tmBox->pack_start(*sensitm); exptonemap->add(*tmBox); exptonemap->setLevel(2); @@ -1919,6 +1922,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).scaltm = scaltm->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).rewei = rewei->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).sensitm = sensitm->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).softradiustm = softradiustm->getValue(); // Retinex pp->locallab.spots.at(pp->locallab.selspot).expreti = expreti->getEnabled(); @@ -2124,6 +2128,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).scaltm = pe->locallab.spots.at(pp->locallab.selspot).scaltm || scaltm->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).rewei = pe->locallab.spots.at(pp->locallab.selspot).rewei || rewei->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).sensitm = pe->locallab.spots.at(pp->locallab.selspot).sensitm || sensitm->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).softradiustm = pe->locallab.spots.at(pp->locallab.selspot).softradiustm || softradiustm->getEditedState(); // Retinex pe->locallab.spots.at(pp->locallab.selspot).expreti = pe->locallab.spots.at(pp->locallab.selspot).expreti || !expreti->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).retinexMethod = pe->locallab.spots.at(pp->locallab.selspot).retinexMethod || retinexMethod->get_active_text() != M("GENERAL_UNCHANGED"); @@ -2323,6 +2328,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).scaltm = pedited->locallab.spots.at(pp->locallab.selspot).scaltm || scaltm->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).rewei = pedited->locallab.spots.at(pp->locallab.selspot).rewei || rewei->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).sensitm = pedited->locallab.spots.at(pp->locallab.selspot).sensitm || sensitm->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).softradiustm = pedited->locallab.spots.at(pp->locallab.selspot).softradiustm || softradiustm->getEditedState(); // Retinex pedited->locallab.spots.at(pp->locallab.selspot).expreti = pedited->locallab.spots.at(pp->locallab.selspot).expreti || !expreti->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).retinexMethod = pedited->locallab.spots.at(pp->locallab.selspot).retinexMethod || retinexMethod->get_active_text() != M("GENERAL_UNCHANGED"); @@ -3285,6 +3291,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe scaltm->setDefault((double)defSpot->scaltm); rewei->setDefault((double)defSpot->rewei); sensitm->setDefault((double)defSpot->sensitm); + softradiustm->setDefault(defSpot->softradiustm); // Retinex str->setDefault((double)defSpot->str); chrrt->setDefault((double)defSpot->chrrt); @@ -3405,6 +3412,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe scaltm->setDefaultEditedState(Irrelevant); rewei->setDefaultEditedState(Irrelevant); sensitm->setDefaultEditedState(Irrelevant); + softradiustm->setDefaultEditedState(Irrelevant); // Retinex str->setDefaultEditedState(Irrelevant); chrrt->setDefaultEditedState(Irrelevant); @@ -3529,6 +3537,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe scaltm->setDefaultEditedState(defSpotState->scaltm ? Edited : UnEdited); rewei->setDefaultEditedState(defSpotState->rewei ? Edited : UnEdited); sensitm->setDefaultEditedState(defSpotState->sensitm ? Edited : UnEdited); + softradiustm->setDefaultEditedState(defSpotState->softradiustm ? Edited : UnEdited); // Retinex str->setDefaultEditedState(defSpotState->str ? Edited : UnEdited); chrrt->setDefaultEditedState(defSpotState->chrrt ? Edited : UnEdited); @@ -3991,6 +4000,13 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) listener->panelChanged(Evlocallabsensitm, sensitm->getTextValue()); } } + + if (a == softradiustm) { + if (listener) { + listener->panelChanged(Evlocallabsoftradiustm, softradiustm->getTextValue()); + } + } + } // Retinex @@ -4377,6 +4393,7 @@ void Locallab::setBatchMode(bool batchMode) scaltm->showEditedCB(); rewei->showEditedCB(); sensitm->showEditedCB(); + softradiustm->showEditedCB(); // Retinex str->showEditedCB(); chrrt->showEditedCB(); @@ -4807,6 +4824,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con scaltm->setValue(pp->locallab.spots.at(index).scaltm); rewei->setValue(pp->locallab.spots.at(index).rewei); sensitm->setValue(pp->locallab.spots.at(index).sensitm); + softradiustm->setValue(pp->locallab.spots.at(index).softradiustm); // Retinex expreti->setEnabled(pp->locallab.spots.at(index).expreti); @@ -5042,6 +5060,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con scaltm->setEditedState(spotState->scaltm ? Edited : UnEdited); rewei->setEditedState(spotState->rewei ? Edited : UnEdited); sensitm->setEditedState(spotState->sensitm ? Edited : UnEdited); + softradiustm->setEditedState(spotState->softradiustm ? Edited : UnEdited); // Retinex expreti->set_inconsistent(!spotState->expreti); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 770e75092..8fbb3830c 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -165,6 +165,7 @@ private: Adjuster* const scaltm; Adjuster* const rewei; Adjuster* const sensitm; + Adjuster* const softradiustm; // Retinex Adjuster* const str; Adjuster* const chrrt; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index bcdf1bd91..5cf0125e1 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1052,6 +1052,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).scaltm = locallab.spots.at(j).scaltm && pSpot.scaltm == otherSpot.scaltm; locallab.spots.at(j).rewei = locallab.spots.at(j).rewei && pSpot.rewei == otherSpot.rewei; locallab.spots.at(j).sensitm = locallab.spots.at(j).sensitm && pSpot.sensitm == otherSpot.sensitm; + locallab.spots.at(j).softradiustm = locallab.spots.at(j).softradiustm && pSpot.softradiustm == otherSpot.softradiustm; // Retinex locallab.spots.at(j).expreti = locallab.spots.at(j).expreti && pSpot.expreti == otherSpot.expreti; locallab.spots.at(j).retinexMethod = locallab.spots.at(j).retinexMethod && pSpot.retinexMethod == otherSpot.retinexMethod; @@ -3019,6 +3020,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).sensitm = mods.locallab.spots.at(i).sensitm; } + if (locallab.spots.at(i).softradiustm) { + toEdit.locallab.spots.at(i).softradiustm = mods.locallab.spots.at(i).softradiustm; + } + // Retinex if (locallab.spots.at(i).expreti) { toEdit.locallab.spots.at(i).expreti = mods.locallab.spots.at(i).expreti; @@ -4320,6 +4325,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : scaltm(v), rewei(v), sensitm(v), + softradiustm(v), // Retinex expreti(v), retinexMethod(v), @@ -4512,6 +4518,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) scaltm = v; rewei = v; sensitm = v; + softradiustm = v; // Retinex expreti = v; retinexMethod = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index a30b758f7..6636f877c 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -479,6 +479,7 @@ public: bool scaltm; bool rewei; bool sensitm; + bool softradiustm; // Retinex bool expreti; bool retinexMethod; From 4a01c5a52ba1fd424d5055c3739afaff945d7eba Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 18 Apr 2019 09:49:10 +0200 Subject: [PATCH 45/59] Comment on use of deltaE --- rtengine/iplocallab.cc | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 75a2a8bcc..012fb2048 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2582,7 +2582,22 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const float realstradE = reducdE * cla; const float realstrbdE = reducdE * clb; const float realstrchdE = reducdE * clc; - +/* comment on processus deltaE + * the algo uses 3 different ways to manage deltaE according to the type of intervention + * if we call "applyproc" the datas produced upstream in bfw, bfh coordinate by the function producing something curves, retinex, exposure, etc. + + * direct : in this case we use directly the datas produced upstream by "applyproc", with only a reguation produce for deltaE by reducdE + * direct we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, DEnoise + + * with first use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type 328.f * factorx * realstrdE + * in this case we found "applyproc" which result in direct use on L : Exposure, Color and Light, Shadows highlight, softLight + + * with second use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type fli = (100.f + realstrdE) / 100.f; + * in this case we found "applyproc" which result in large variations of L : Retinex, TM, and others + + * if you change you must test before + +*/ if (rL > 0.1f) { //to avoid crash with very low gamut in rare cases ex : L=0.01 a=0.5 b=-0.9 switch (zone) { @@ -3663,6 +3678,24 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o const LocCCmaskcbCurve & locccmascbCurve, bool &lcmascbutili, const LocLLmaskcbCurve & locllmascbCurve, bool &llmascbutili, const LocHHmaskcbCurve & lochhmascbCurve, bool & lhmascbutili, bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref, int llColorMask, int llExpMask, int llSHMask, int llcbMask) { + +/* comment on processus deltaE + * the algo uses 3 different ways to manage deltaE according to the type of intervention + * if we call "applyproc" the datas produced upstream in bfw, bfh coordinate by the function producing something curves, retinex, exposure, etc. + + * direct : in this case we use directly the datas produced upstream by "applyproc", with only a reguation produce for deltaE by reducdE + * direct we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, DEnoise + + * with first use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type 328.f * factorx * realstrdE + * in this case we found "applyproc" which result in direct use on L : Exposure, Color and Light, Shadows highlight, softLight + + * with second use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type fli = (100.f + realstrdE) / 100.f; + * in this case we found "applyproc" which result in large variations of L : Retinex, TM, and others + + * if you change you must test before + +*/ + //general call of others functions : important return hueref, chromaref, lumaref if (params->locallab.enabled) { BENCHFUN From 37b8b1161c5d0cafa16c121b86e63b81331a2e47 Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 18 Apr 2019 16:45:45 +0200 Subject: [PATCH 46/59] disabled chroma if view modification CBDL enable --- rtengine/iplocallab.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 012fb2048..fdf3dd8e4 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -5205,9 +5205,10 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } transit_shapedetect(6, loctemp.get(), originalmaskcb.get(), buflight, bufchrom, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); - + + bool nochroma = (lp.showmaskcbmet == 2 || lp.showmaskcbmet == 1); //chroma CBDL begin here - if (lp.chromacb > 0.f) { + if (lp.chromacb > 0.f && !nochroma) { #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif From 2c0c6c443a19e300b336d9b9e89b788268e9e4b7 Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 18 Apr 2019 17:21:06 +0200 Subject: [PATCH 47/59] clean code --- rtengine/iplocallab.cc | 63 ++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 42 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index fdf3dd8e4..f2b6b4b6f 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -700,7 +700,6 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.expcomp = CLIP24(lp.expcomp); //to prevent crash with Old pp3 with integer lp.expchroma = locallab.spots.at(sp).expchroma / 100.; lp.sensex = local_sensiex; -// lp.strucc = local_struc; lp.war = local_warm; lp.hsena = locallab.spots.at(sp).expshadhigh && llColorMask == 0 && llExpMask == 0;// Shadow Highlight tool is deactivated if Color & Light mask or SHmask is visible lp.highlihs = highhs; @@ -1719,7 +1718,6 @@ void ImProcFunctions::InverseBlurNoise_Local(const struct local_params & lp, co } static void calclight(float lum, float koef, float &lumnew, const LUTf &lightCurveloc) -//replace L-curve that does not work in local or bad { lumnew = koef != -100.f ? CLIPLOC(lightCurveloc[lum]) : 0.f; } @@ -2584,13 +2582,13 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor const float realstrchdE = reducdE * clc; /* comment on processus deltaE * the algo uses 3 different ways to manage deltaE according to the type of intervention - * if we call "applyproc" the datas produced upstream in bfw, bfh coordinate by the function producing something curves, retinex, exposure, etc. + * if we call "applyproc" : the datas produced upstream in bfw, bfh coordinate by the function producing something curves, retinex, exposure, etc. - * direct : in this case we use directly the datas produced upstream by "applyproc", with only a reguation produce for deltaE by reducdE - * direct we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, DEnoise + * direct : in this case we use directly the datas produced upstream by "applyproc", with only a regulation produce for deltaE by reducdE + * direct : we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, Denoise - * with first use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type 328.f * factorx * realstrdE - * in this case we found "applyproc" which result in direct use on L : Exposure, Color and Light, Shadows highlight, softLight + * with first use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type 328.f * realstrdE + * in this case we found "applyproc" which result in direct use on Luminance : Exposure, Color and Light, Shadows highlight, SoftLight * with second use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type fli = (100.f + realstrdE) / 100.f; * in this case we found "applyproc" which result in large variations of L : Retinex, TM, and others @@ -2654,7 +2652,6 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor flia = flib = ((100.f + realstrchdE) / 100.f); } else if (senstype == 1) { - // printf("rdE=%f chdE=%f", realstradE, realstrchdE); flia = (100.f + realstradE + 100.f * realstrchdE) / 100.f; flib = (100.f + realstrbdE + 100.f * realstrchdE) / 100.f; @@ -2731,7 +2728,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor float diflc = 0.f; float newhr = 0.f; float difL = 0.f; - if (senstype == 2 || senstype == 8) { //retinex & cbdl + if (senstype == 2 || senstype == 8) { const float lightc = bufexporig->L[y - ystart][x - xstart]; const float fli = (100.f + realstrdE) / 100.f; transformed->L[y][x] = CLIP(original->L[y][x] + lightc * fli - original->L[y][x]); @@ -3274,7 +3271,6 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform avg2 /= 32768.f; avg = avg2 / nc2; -// printf("calc avg=%f \n", avg); // double precision for large summations double aveA = 0.; double aveB = 0.; @@ -3297,9 +3293,6 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform int spotSise2; // = 0.88623f * max (1, lp.cir / sk); //18 // very small region, don't use omp here -// printf("cy=%i cx=%i yc=%f xc=%f circ=%i spot=%i tH=%i tW=%i sk=%i\n", cy, cx, lp.yc, lp.xc, lp.cir, spotSize, transformed->H, transformed->W, sk); -// printf("ymin=%i ymax=%i\n", max (cy, (int) (lp.yc - spotSize)),min (transformed->H + cy, (int) (lp.yc + spotSize + 1)) ); -// printf("xmin=%i xmax=%i\n", max (cx, (int) (lp.xc - spotSize)),min (transformed->W + cx, (int) (lp.xc + spotSize + 1)) ); LabImage *sobelL; LabImage *deltasobelL; LabImage *origsob; @@ -3371,7 +3364,6 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform aveL += original->L[y - cy][x - cx]; aveA += original->a[y - cy][x - cx]; aveB += original->b[y - cy][x - cx]; - // aveblend += 100.f * blend2[y - cy][x - cx]; aveChro += sqrtf(SQR(original->b[y - cy][x - cx]) + SQR(original->a[y - cy][x - cx])); nab++; } @@ -3436,7 +3428,6 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform lumarefblur = 0.f; } - // printf("hueblur=%f hue=%f\n", huerefblur, hueref); chromaref = aveChro; lumaref = avL; @@ -3678,16 +3669,15 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o const LocCCmaskcbCurve & locccmascbCurve, bool &lcmascbutili, const LocLLmaskcbCurve & locllmascbCurve, bool &llmascbutili, const LocHHmaskcbCurve & lochhmascbCurve, bool & lhmascbutili, bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref, int llColorMask, int llExpMask, int llSHMask, int llcbMask) { - /* comment on processus deltaE * the algo uses 3 different ways to manage deltaE according to the type of intervention - * if we call "applyproc" the datas produced upstream in bfw, bfh coordinate by the function producing something curves, retinex, exposure, etc. + * if we call "applyproc" : the datas produced upstream in bfw, bfh coordinate by the function producing something curves, retinex, exposure, etc. - * direct : in this case we use directly the datas produced upstream by "applyproc", with only a reguation produce for deltaE by reducdE - * direct we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, DEnoise + * direct : in this case we use directly the datas produced upstream by "applyproc", with only a regulation produce for deltaE by reducdE + * direct : we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, Denoise - * with first use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type 328.f * factorx * realstrdE - * in this case we found "applyproc" which result in direct use on L : Exposure, Color and Light, Shadows highlight, softLight + * with first use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type 328.f * realstrdE + * in this case we found "applyproc" which result in direct use on Luminance : Exposure, Color and Light, Shadows highlight, SoftLight * with second use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type fli = (100.f + realstrdE) / 100.f; * in this case we found "applyproc" which result in large variations of L : Retinex, TM, and others @@ -3725,11 +3715,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } -// we must here detect : general case, skin, sky,...foliages ??? - - - - if (lp.excmet == 1 && call <= 3) {//exclude const int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone const int bfw = int (lp.lx + lp.lxL) + del; @@ -3855,7 +3840,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o if (tmp1.get() && lp.stren > 0.1f) { float mean = 0.f;//0 best result - float variance = lp.stren ; //(double) SQR(lp.stren)/sk; + float variance = lp.stren ; addGaNoise(tmp1.get(), tmp1.get(), mean, variance, sk) ; } @@ -4894,8 +4879,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o if (bfw > 0 && bfh > 0) { JaggedArray buflight(bfw, bfh); JaggedArray bufl_ab(bfw, bfh); - std::unique_ptr bufexporig(new LabImage(bfw, bfh)); //buffer for data in zone limit - std::unique_ptr bufexpfin(new LabImage(bfw, bfh)); //buffer for data in zone limit + std::unique_ptr bufexporig(new LabImage(bfw, bfh)); + std::unique_ptr bufexpfin(new LabImage(bfw, bfh)); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) @@ -4954,8 +4939,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o if (bfw > 0 && bfh > 0) { array2D buflight(bfw, bfh); JaggedArray bufchro(bfw, bfh); - std::unique_ptr bufgb(new LabImage(bfw, bfh)); //buffer for data in zone limit - std::unique_ptr tmp1(new LabImage(bfw, bfh)); //buffer for data in zone limit + std::unique_ptr bufgb(new LabImage(bfw, bfh)); + std::unique_ptr tmp1(new LabImage(bfw, bfh)); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) @@ -5022,9 +5007,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o const int xend = std::min(static_cast(lp.xc + lp.lx) - cx, original->W); int bfh = yend - ystart; int bfw = xend - xstart; - // int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone - // int bfw = int (lp.lx + lp.lxL) + del; - printf("mascb0=%i \n", lp.showmaskcbmet); if (bfw > 32 && bfh > 32) { array2D bufsh(bfw, bfh); @@ -5517,7 +5499,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o if (call == 2) { //call from simpleprocess bufloca.reset(new LabImage(bfw, bfh)); - // JaggedArray hbuffer(bfw, bfh); int begy = lp.yc - lp.lyT; int begx = lp.xc - lp.lxL; int yEn = lp.yc + lp.ly; @@ -5788,7 +5769,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float coef = 0.01f * (max(fabs(minL), fabs(maxL))); - //printf("minL=%f maxL=%f coef=%f\n", minL, maxL, coef); for (int ir = 0; ir < Hd; ir++) { for (int jr = 0; jr < Wd; jr++) { @@ -6131,7 +6111,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o if (lp.expchroma != 0.f) { constexpr float ampli = 70.f; const float ch = (1.f + 0.02f * lp.expchroma); - //convert data curve near values of slider -100 + 100, to be used after to detection shape const float chprosl = ch <= 1.f ? 99.f * ch - 99.f : CLIPCHRO(ampli * ch - ampli); #ifdef _OPENMP @@ -6409,13 +6388,13 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float chprosl = 1.f; if (lp.chro != 0.f) { - const float ch = (1.f + 0.01f * lp.chro) ; //* (chromat * adjustr) / ((chromat + 0.00001f) * adjustr); //ch between 0 and 0 50 or more; + const float ch = (1.f + 0.01f * lp.chro) ; - if (ch <= 1.f) {//convert data curve near values of slider -100 + 100, to be used after to detection shape + if (ch <= 1.f) { chprosl = 99.f * ch - 99.f; } else { constexpr float ampli = 70.f; - chprosl = CLIPCHRO(ampli * ch - ampli); //ampli = 25.f arbitrary empirical coefficient between 5 and 50 + chprosl = CLIPCHRO(ampli * ch - ampli); } } @@ -6435,7 +6414,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o const float chromat = sqrt(SQR(bufcolcalca) + SQR(bufcolcalcb)); const float ch = cclocalcurve[chromat * adjustr] / ((chromat + 0.00001f) * adjustr); //ch between 0 and 0 50 or more constexpr float ampli = 25.f; - chprocu = CLIPCHRO(ampli * ch - ampli); //ampli = 25.f arbitrary empirical coefficient between 5 and 50 + chprocu = CLIPCHRO(ampli * ch - ampli); } bufchro[ir][jr] = chprosl + chprocu; @@ -6452,7 +6431,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } if (lllocalcurve && locallutili && lp.qualcurvemet != 0) {// L=f(L) curve enhanced - bufcolcalcL = 0.5f * lllocalcurve[bufcolcalcL * 2.f];// / ((lighn + 0.00001f) * 1.9f) ; // / ((lighn) / 1.9f) / 3.61f; //lh between 0 and 0 50 or more + bufcolcalcL = 0.5f * lllocalcurve[bufcolcalcL * 2.f]; } if (loclhCurve && LHutili && lp.qualcurvemet != 0) { From de9f416e8080aa6f47618ecde622c309000bee90 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Thu, 18 Apr 2019 18:05:19 +0200 Subject: [PATCH 48/59] TWB theme - Mac-gradient-fix --- rtdata/themes/TooWaBlue-GTK3-20_.css | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index 3ed352c74..78bdb10b1 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -2,7 +2,7 @@ This file is part of RawTherapee. Copyright (c) 2016-2019 TooWaBoo - Version 3.06 + Version 3.07 RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -274,13 +274,13 @@ textview:selected, treeview:selected { margin-top: 0.25em; } #RightNotebook #HistoryPanel { - margin-top: 0.333333333333333333em; + margin-top: 0.416666666666666666em; } #HistoryPanel > border { margin-top: 1.75em; } #HistoryPanel > label { - margin: 0 0 -1.5em 0; + margin: 0 0 -1.416666666666666666em 0; padding: 0 0 0 0.083333333333333333em; } @@ -325,6 +325,7 @@ fontchooser scrolledwindow, } #Navigator label { padding: 0; + margin: 0.083333333333333333em 0 0; } /*** end ***************************************************************************************/ @@ -692,7 +693,7 @@ scrollbar:not(.overlay-indicator):hover { /*** Scale**************************************************************************************/ scale { padding: 0; - min-height: 1.833333333333333333em; + min-height: 1.833333333333333333em; margin: 0 -0.333333333333333333em; } @@ -727,7 +728,7 @@ scale.color trough { } scale trough highlight { - background-color: transparent; + background-color: @accent-color2; background-image: linear-gradient(to bottom, shade (@accent-color2,1.22), shade(@accent-color2,.88)); border: 0.083333333333333333em solid shade(@bg-dark-grey,0.9); margin: 0 -0.583333333333333333em; @@ -779,7 +780,7 @@ progressbar trough { } progressbar trough progress { - background-color: transparent; + background-color: @accent-color2; border-radius: 0.416666666666666666em; border: 0.083333333333333333em solid @bg-button-border; } @@ -816,6 +817,7 @@ progressbar.vertical trough.empty { progressbar trough.empty progress { border-color: transparent; background-image: none; + background-color:transparent; box-shadow: none; } From 73b336a3f18e43e3497d699b268313012db2af60 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Thu, 18 Apr 2019 20:43:40 +0200 Subject: [PATCH 49/59] Update FTblockDN.cc Disable StopWatch --- rtengine/FTblockDN.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index 12344a25b..ccffbe59c 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -42,7 +42,7 @@ #ifdef _OPENMP #include #endif -#define BENCHMARK +//#define BENCHMARK #include "StopWatch.h" #define TS 64 // Tile size From c07374ec9d94ad342ab44dbceb61a5a42f96dd63 Mon Sep 17 00:00:00 2001 From: Desmis Date: Fri, 19 Apr 2019 08:32:14 +0200 Subject: [PATCH 50/59] small changes on comment --- rtengine/iplocallab.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index f2b6b4b6f..12f38d9b8 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2585,7 +2585,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor * if we call "applyproc" : the datas produced upstream in bfw, bfh coordinate by the function producing something curves, retinex, exposure, etc. * direct : in this case we use directly the datas produced upstream by "applyproc", with only a regulation produce for deltaE by reducdE - * direct : we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, Denoise + * direct : we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, Denoise, Sharp, Localcontrast * with first use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type 328.f * realstrdE * in this case we found "applyproc" which result in direct use on Luminance : Exposure, Color and Light, Shadows highlight, SoftLight @@ -3674,7 +3674,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o * if we call "applyproc" : the datas produced upstream in bfw, bfh coordinate by the function producing something curves, retinex, exposure, etc. * direct : in this case we use directly the datas produced upstream by "applyproc", with only a regulation produce for deltaE by reducdE - * direct : we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, Denoise + * direct : we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, Denoise, Sharp, Local contrast * with first use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type 328.f * realstrdE * in this case we found "applyproc" which result in direct use on Luminance : Exposure, Color and Light, Shadows highlight, SoftLight From 6f7528818a5e708da60a886030397649e7f6d8ed Mon Sep 17 00:00:00 2001 From: Desmis Date: Sat, 20 Apr 2019 06:59:39 +0200 Subject: [PATCH 51/59] Change labels Local l*a*b by Local Adjustements --- rtdata/languages/default | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index ad48702a3..a9e8ee8d2 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -740,28 +740,28 @@ HISTORY_MSG_489;DRC - Detail HISTORY_MSG_490;DRC - Amount HISTORY_MSG_491;White Balance HISTORY_MSG_492;RGB Curves -HISTORY_MSG_493;L*a*b* Adjustments -HISTORY_MSG_495;L*a*b Spot created -HISTORY_MSG_496;L*a*b Spot deleted -HISTORY_MSG_497;L*a*b Spot selected -HISTORY_MSG_498;L*a*b Spot name -HISTORY_MSG_499;L*a*b Spot visibility -HISTORY_MSG_500;L*a*b Spot shape -HISTORY_MSG_501;L*a*b Spot method -HISTORY_MSG_502;L*a*b Spot shape method -HISTORY_MSG_503;L*a*b Spot locX -HISTORY_MSG_504;L*a*b Spot locXL -HISTORY_MSG_505;L*a*b Spot locY -HISTORY_MSG_506;L*a*b Spot locYT -HISTORY_MSG_507;L*a*b Spot center -HISTORY_MSG_508;L*a*b Spot circrad -HISTORY_MSG_509;L*a*b Spot quality method -HISTORY_MSG_510;L*a*b Spot transition -HISTORY_MSG_511;L*a*b Spot thresh -HISTORY_MSG_512;L*a*b Spot deltaE-weakening -HISTORY_MSG_513;L*a*b Spot scope -HISTORY_MSG_514;L*a*b Spot structure -HISTORY_MSG_515;Local L*a*b* +HISTORY_MSG_493;Local Adjustments +HISTORY_MSG_495;Local Spot created +HISTORY_MSG_496;Local Spot deleted +HISTORY_MSG_497;Local Spot selected +HISTORY_MSG_498;Local Spot name +HISTORY_MSG_499;Local Spot visibility +HISTORY_MSG_500;Local Spot shape +HISTORY_MSG_501;Local Spot method +HISTORY_MSG_502;Local Spot shape method +HISTORY_MSG_503;Local Spot locX +HISTORY_MSG_504;Local Spot locXL +HISTORY_MSG_505;Local Spot locY +HISTORY_MSG_506;Local Spot locYT +HISTORY_MSG_507;Local Spot center +HISTORY_MSG_508;Local Spot circrad +HISTORY_MSG_509;Local Spot quality method +HISTORY_MSG_510;Local Spot transition +HISTORY_MSG_511;Local Spot thresh +HISTORY_MSG_512;Local Spot deltaE-weakening +HISTORY_MSG_513;Local Spot scope +HISTORY_MSG_514;Local Spot structure +HISTORY_MSG_515;Local Adjustements HISTORY_MSG_516;Local - Color and light HISTORY_MSG_517;Local - Enable super HISTORY_MSG_518;Local - Lightness @@ -903,7 +903,7 @@ HISTORY_MSG_655;Local - SH mask slope HISTORY_MSG_656;Local - Color soft radius HISTORY_MSG_657;Local - Retinex soft radius HISTORY_MSG_658;Local - CBDL soft radius -HISTORY_MSG_659;L*a*b Spot transition-weakening +HISTORY_MSG_659;Local Spot transition-weakening HISTORY_MSG_660;Local - cbdl clarity HISTORY_MSG_661;Local - cbdl contrast residual HISTORY_MSG_662;Local - deNoise lum f 0 @@ -1151,7 +1151,7 @@ NAVIGATOR_XY_NA;x: --, y: -- OPTIONS_BUNDLED_MISSING;The bundled profile "%1" could not be found!\n\nYour installation could be damaged.\n\nDefault internal values will be used instead. OPTIONS_DEFIMG_MISSING;The default profile for non-raw photos could not be found or is not set.\n\nPlease check your profiles' directory, it may be missing or damaged.\n\n"%1" will be used instead. OPTIONS_DEFRAW_MISSING;The default profile for raw photos could not be found or is not set.\n\nPlease check your profiles' directory, it may be missing or damaged.\n\n"%1" will be used instead. -PARTIALPASTE_LOCALLABGROUP;Local L*a*b Settings +PARTIALPASTE_LOCALLABGROUP;Local Adjustements Settings PARTIALPASTE_ADVANCEDGROUP;Advanced Settings PARTIALPASTE_BASICGROUP;Basic Settings PARTIALPASTE_CACORRECTION;Chromatic aberration correction @@ -1191,7 +1191,7 @@ PARTIALPASTE_IMPULSEDENOISE;Impulse noise reduction PARTIALPASTE_IPTCINFO;IPTC PARTIALPASTE_LABCURVE;L*a*b* adjustments PARTIALPASTE_LENSGROUP;Lens Related Settings -PARTIALPASTE_LOCALLAB;Local L*a*b* +PARTIALPASTE_LOCALLAB;Local Adjustements PARTIALPASTE_LOCGROUP;Local PARTIALPASTE_LENSPROFILE;Profiled lens correction PARTIALPASTE_LOCALCONTRAST;Local contrast @@ -2049,7 +2049,7 @@ TP_LOCALLAB_REWEI;Reweighting iterates TP_LOCALLAB_INDSL;Independent (mouse + sliders) TP_LOCALLAB_IND;Independent (mouse) TP_LOCALLAB_INVERS;Inverse -TP_LOCALLAB_LABEL;Local L*a*b* +TP_LOCALLAB_LABEL;Local Adjustements TP_LOCALLAB_STD;Standard TP_LOCALLAB_ENH;Enhanced TP_LOCALLAB_ENHDEN;Enhanced + chroma denoise From b21d6cc6dd3c19a8f33a4b2a86e66d0f220dbaf7 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Sat, 20 Apr 2019 11:08:09 +0200 Subject: [PATCH 52/59] Small button fix (TWB & RT theme) #5292 --- rtdata/themes/TooWaBlue-GTK3-20_.css | 16 +++++++++++----- rtdata/themes/size.css | 10 ++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index 78bdb10b1..7b5089430 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -2,7 +2,7 @@ This file is part of RawTherapee. Copyright (c) 2016-2019 TooWaBoo - Version 3.07 + Version 3.08 RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1568,6 +1568,10 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { padding: 0 0.13em; } +#EditorTopPanel button.narrowbutton image{ + min-width: 0.833333333333333333em; +} + /* Image close button */ #MainNotebook > header tab #CloseButton { padding: 0.166666666666666666em; @@ -1578,21 +1582,23 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { /* Filter buttons*/ #ToolBarPanelFileBrowser .smallbuttonbox { - min-height: 0; + min-height: 1.166666666666666666em; padding: 0; margin: 0; } #ToolBarPanelFileBrowser .smallbuttonbox:nth-child(2) { - margin-top: 0.12em; + margin-top: 0.166666666666666666em; + margin-bottom: -0.166666666666666666em; } #ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton image { - margin: -0.12em; + margin: -1em; + padding: 0; min-width: 0; min-height: 0; } #ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton { min-height: 0; - min-width: 1.333333333333333333em; + min-width: 1.166666666666666666em; padding: 0; margin: 0 0.25em; border: none; diff --git a/rtdata/themes/size.css b/rtdata/themes/size.css index f333ceeb0..e3a22f337 100644 --- a/rtdata/themes/size.css +++ b/rtdata/themes/size.css @@ -647,15 +647,17 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { /* Filter buttons*/ #ToolBarPanelFileBrowser .smallbuttonbox { - min-height: 0; + min-height: 1.166666666666666666em; padding: 0; margin: 0; } #ToolBarPanelFileBrowser .smallbuttonbox:nth-child(2) { - margin: 0 0 -0.166666666666666666em; + margin-top: 0.166666666666666666em; + margin-bottom: -0.166666666666666666em; } #ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton image { - margin: -0.166666666666666666em; + margin: -1em 0; + padding: 0; min-width: 0; min-height: 0; } @@ -663,7 +665,7 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { min-height: 0; min-width: 1.166666666666666666em; padding: 0; - margin: 0 0.25em; + margin: 0 0.166666666666666666em; border: none; border-radius: 0; } From a948c4a22a74da1b7ce44d9cd1bc988a7c526c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mari=C3=A1n=20Kyral?= Date: Wed, 17 Apr 2019 15:37:58 +0200 Subject: [PATCH 53/59] Update Czech translation --- rtdata/languages/Czech | 73 ++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 1a7cff0d4..3ac2273c0 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -42,6 +42,7 @@ #41 2018-03-03 updated by mkyral #42 2018-04-28 updated by mkyral #43 2018-12-13 updated by mkyral +#44 2019-04-17 updated by mkyral ABOUT_TAB_BUILD;Verze ABOUT_TAB_CREDITS;Zásluhy @@ -152,6 +153,7 @@ FILEBROWSER_APPLYPROFILE;Použít FILEBROWSER_APPLYPROFILE_PARTIAL;Aplikovat - částečně FILEBROWSER_AUTODARKFRAME;Automatický tmavý snímek FILEBROWSER_AUTOFLATFIELD;Auto Flat Field +FILEBROWSER_BROWSEPATHBUTTONHINT;Klikněte pro otevření zadané cesty, obnovte složku a aplikujte klíčové slovo "find". FILEBROWSER_BROWSEPATHHINT;Vložte cestu pro procházení.\n\nKlávesové zkratky:\nCtrl-o pro přepnutí do adresního řádku.\nEnter/ Ctrl-Enter pro procházení ;\nEsc pro zrušení změn.\nShift-Esc pro zrušení přepnutí.\n\nZkratky pro cesty:\n~\t- domácí složka uživatele.\n!\t- složka s obrázky uživatele. FILEBROWSER_CACHE;Mezipaměť FILEBROWSER_CACHECLEARFROMFULL;Smazat vše včetně profilů zpracování v mezipaměti @@ -808,6 +810,7 @@ HISTORY_MSG_RAWCACORR_AUTOIT;Raw korekce CA - Iterace HISTORY_MSG_RAWCACORR_COLORSHIFT;Raw korekce CA - Zabránit posunu barev HISTORY_MSG_RAW_BORDER;Okraj Raw HISTORY_MSG_RESIZE_ALLOWUPSCALING;Změna rozměrů - Povolit zvětšení +HISTORY_MSG_SHARPENING_BLUR;Doostření - Poloměr rozmazání HISTORY_MSG_SHARPENING_CONTRAST;Doostření - Práh kontrastu HISTORY_MSG_SH_COLORSPACE;S/S - Barevný prostor HISTORY_MSG_SOFTLIGHT_ENABLED;Měkké světlo @@ -918,6 +921,7 @@ MAIN_FRAME_FILEBROWSER;Prohlížeč souborů MAIN_FRAME_FILEBROWSER_TOOLTIP;Prohlížeč souborů.\nZkratka: Ctrl-F2 MAIN_FRAME_PLACES;Místa MAIN_FRAME_PLACES_ADD;Přidat +MAIN_FRAME_PLACES_DEL;Smazat MAIN_FRAME_QUEUE;Fronta MAIN_FRAME_QUEUE_TOOLTIP;Fronta zpracování.\nZkratka: Ctrl-F3 MAIN_FRAME_RECENT;Poslední složky @@ -946,6 +950,8 @@ MAIN_TAB_EXIF;Exif MAIN_TAB_EXPORT; Rychlý export MAIN_TAB_EXPOSURE;Expozice MAIN_TAB_EXPOSURE_TOOLTIP;Zkratka: Alt-e +MAIN_TAB_FAVORITES;Oblíbené +MAIN_TAB_FAVORITES_TOOLTIP;Zkratka: Alt-u MAIN_TAB_FILTER; Filtr MAIN_TAB_INSPECT; Prohlížení MAIN_TAB_IPTC;IPTC @@ -1093,6 +1099,12 @@ PREFERENCES_CACHECLEAR_SAFETY;Jsou smazány pouze soubory ve vyrovnávací pamě PREFERENCES_CACHEMAXENTRIES;Maximální počet záznamů v mezipaměti PREFERENCES_CACHEOPTS;Vlastnosti mezipaměti PREFERENCES_CACHETHUMBHEIGHT;Maximální výška náhledu +PREFERENCES_CHUNKSIZES;Dlaždic na vlákno +PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE demozajkování +PREFERENCES_CHUNKSIZE_RAW_CA;Raw korekce CA +PREFERENCES_CHUNKSIZE_RAW_RCD;RCD demozajkování +PREFERENCES_CHUNKSIZE_RAW_XT;Xtrans demozajkování +PREFERENCES_CHUNKSIZE_RGB;RGB zpracování PREFERENCES_CLIPPINGIND;Indikace oříznutí PREFERENCES_CLUTSCACHE;Mezipaměť HaldCLUT PREFERENCES_CLUTSCACHE_LABEL;Maximální počet přednačtených CLUTů @@ -1180,6 +1192,8 @@ PREFERENCES_PARSEDEXTADDHINT;Vymazat označenou příponu ze seznamu. PREFERENCES_PARSEDEXTDELHINT;Vymazat označenou příponu ze seznamu. PREFERENCES_PARSEDEXTDOWNHINT;Vybranou příponu posunout na seznamu níže. PREFERENCES_PARSEDEXTUPHINT;Vybranou příponu posunout na seznamu výše. +PREFERENCES_PERFORMANCE_MEASURE;Měřit +PREFERENCES_PERFORMANCE_MEASURE_HINT;Vypisovat časy zpracování v konzoli PREFERENCES_PERFORMANCE_THREADS;Vlákna PREFERENCES_PERFORMANCE_THREADS_LABEL;Maximální počet vláken pro Redukci šumu a Úrovně vlnky (0 = Automaticky) PREFERENCES_PREVDEMO;Metoda demozajkování náhledu @@ -1254,6 +1268,11 @@ PROFILEPANEL_TOOLTIPCOPY;Kopírovat současný profil do schránky.\nCtrl-kli PROFILEPANEL_TOOLTIPLOAD;Nahrát profil ze souboru.\nCtrl-klik umožní vybrat parametry pro nahrání. PROFILEPANEL_TOOLTIPPASTE;Vložit profil ze schránky.\nCtrl-klik umožní vybrat parametry pro vložení. PROFILEPANEL_TOOLTIPSAVE;Uložit současný profil.\nCtrl-klik umožní vybrat parametry pro uložení. +PROGRESSBAR_DECODING;Dekodování... +PROGRESSBAR_GREENEQUIL;Vyrovnání zelené... +PROGRESSBAR_HLREC;Rekonstrukce světel... +PROGRESSBAR_HOTDEADPIXELFILTER;Filtr vypálených/mrtvých pixelů... +PROGRESSBAR_LINEDENOISE;Filtr linkového rušení... PROGRESSBAR_LOADING;Načítání obrázku... PROGRESSBAR_LOADINGTHUMBS;Načítání náhledů... PROGRESSBAR_LOADJPEG;Načítání JPEG... @@ -1262,6 +1281,7 @@ PROGRESSBAR_LOADTIFF;Načítání TIFF... PROGRESSBAR_NOIMAGES;Složka neobsahuje obrázky PROGRESSBAR_PROCESSING;Zpracovávaní obrázku... PROGRESSBAR_PROCESSING_PROFILESAVED;Profil zpracování uložen +PROGRESSBAR_RAWCACORR;RAW korekce chromatické aberace... PROGRESSBAR_READY;Připraven PROGRESSBAR_SAVEJPEG;Ukládání JPEG souboru... PROGRESSBAR_SAVEPNG;Ukládání PNG souboru... @@ -1279,7 +1299,8 @@ QUEUE_DESTFILENAME;Cesta a název souboru QUEUE_FORMAT_TITLE;Formát souboru QUEUE_LOCATION_FOLDER;Ulož do souboru QUEUE_LOCATION_TEMPLATE;Použít šablonu -QUEUE_LOCATION_TEMPLATE_TOOLTIP;Lze použít následující formátovací řetězce:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nTyto formátovací řetězce reprezentují různé části cesty k uložené fotografii, některé vlastnosti fotografie nebo pořadí v dávce.\n\nNapříklad pokud má zpracovávaná fotografie následující cestu:\n/home/tomas/fotky/2010-10-31/dsc0042.nef,\nmají jednotlivé formátovací řetězce tento význam:\n%d4 = home\n%d3 = tomas\n%d2 = fotky\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tomas/fotky/2010-10-31/\n%p2 = /home/tomas/fotky/\n%p3 = /home/tomas/\n%p4 = /home/\n\n%r bude nahrazeno hodnocením fotografie. Pokud není fotografie ohodnocena, bude %r nahrazeno '0'. Pokud je fotografie v koši, bude %r nahrazeno 'x'.\n\n%s1, %s2, atd. bude nahrazeno pořadím v dávce doplněném na 1 až 9 číslic. Každé spuštění zpracování fronty jej vždy nastaví na jedna a po každé zpracované fotografii se o jedna zvýší .\n\nPokud si přejete uložit výstupní obrázek vedle originálu, napište:\n%p1/%f\n\nPokud si jej ale přejete uložit do adresáře "zpracovano" ve stejném adresáři jako otevřený obrázek, napište:\n%p1/zpracovano/%f\n\nPro uložení výstupního obrázku do adresáře\n"/home/tom/fotky/zpracovano/2010-10-31", napište:\n%p2/zpracovano/%d1/%f +QUEUE_LOCATION_TEMPLATE_TOOLTIP;Specifikujte kam se mají uložit výstupy. Lze použít umístění zdrojových souborů, pořadí, stav koše nebo pozice ve frontě.\n\nNapříklad pokud má zpracovávaná fotografie následující cestu:\n/home/tomas/fotky/2010-10-31/dsc0042.nef,\nmají jednotlivé formátovací řetězce tento význam:\n%d4 = home\n%d3 = tomas\n%d2 = fotky\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tomas/fotky/2010-10-31/\n%p2 = /home/tomas/fotky/\n%p3 = /home/tomas/\n%p4 = /home/\n\n%r bude nahrazeno hodnocením fotografie.Pokud není fotografie ohodnocena, bude %r nahrazeno '0'.Pokud je fotografie v koši, bude %r nahrazeno 'x'.\n\nPokud si přejete uložit výstupní obrázek vedle originálu, napište:\n%p1/%f\n\nPokud si jej ale přejete uložit do adresáře "converted" ve stejném adresáři jako otevřený obrázek, napište:\n%p1/converted/%f\n\nPro uložení výstupního obrázku do adresáře"/home/tom/photos/converted/2010-10-31", napište:\n%p2/converted/%d1/%f +QUEUE_LOCATION_TITLE;Výstupní umístění QUEUE_STARTSTOP_TOOLTIP;Spustit nebo zastavit zpracování obrázků ve frontě.\n\nZkratka: Ctrl+s SAMPLEFORMAT_0;Neznámý datový formát SAMPLEFORMAT_1;8-bitový neznaménkový @@ -1316,7 +1337,7 @@ THRESHOLDSELECTOR_HINT;Držte klávesu Shift pro přesun individuálních THRESHOLDSELECTOR_T;Nahoře THRESHOLDSELECTOR_TL;Nahoře vlevo THRESHOLDSELECTOR_TR;Nahoře vpravo -TOOLBAR_TOOLTIP_COLORPICKER;Uzamykatelný Průzkumník barev\n\nPokud je nástroj aktivní:\n- Přidání sondy: levý-klik.\n- Posunutí sondy: levý-klik a posunutí.\n- Smazání sondy: pravý-klik.\n- Smazání všech sond: shift+pravý-klik.\n- Návrat k nástroji posunu: pravý-klik. +TOOLBAR_TOOLTIP_COLORPICKER;Uzamykatelný Průzkumník barev\n\nPokud je nástroj aktivní:\n- Přidání sondy: levý-klik.\n- Posunutí sondy: levý-klik a posunutí.\n- Smazání sondy: pravý-klik.\n- Smazání všech sond: Ctrl+Shift+pravý-klik.\n- Návrat k nástroji posunu: pravý-klik mimo průzkumníky. TOOLBAR_TOOLTIP_CROP;Oříznutí výběru.\nZkratka: c\nVýřez posunete pomocí Shift + tažení myši TOOLBAR_TOOLTIP_HAND;Posun.\nZkratka: h TOOLBAR_TOOLTIP_STRAIGHTEN;Vyznačení roviny / rotace.\nZkratka: s\n\nZobrazení míry rotace pomocí vodící linky na náhledu snímky. Úhel rotace je zobrazen vedle vodící linky. Střed rotace je geometrický střed snímku. @@ -1533,6 +1554,7 @@ TP_CROP_GTTRIANGLE2;Zlaté trojúhelníky 2 TP_CROP_GUIDETYPE;Druh vodítek: TP_CROP_H;Výška TP_CROP_LABEL;Ořez +TP_CROP_PPI;PPI TP_CROP_RESETCROP;Obnovit TP_CROP_SELECTCROP;Vybrat TP_CROP_W;Šířka @@ -1773,10 +1795,15 @@ TP_LABCURVE_RSTPRO_TOOLTIP;Pracuje s posuvníkem barevnosti a CC křivkou. TP_LENSGEOM_AUTOCROP;Automatický ořez TP_LENSGEOM_FILL;Automatické vyplnění TP_LENSGEOM_LABEL;Objektiv / Geometrie +TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automaticky vybráno TP_LENSPROFILE_CORRECTION_LCPFILE;LCP soubor +TP_LENSPROFILE_CORRECTION_MANUAL;Ručně vybráno TP_LENSPROFILE_LABEL;Korekční profily objektivů TP_LENSPROFILE_LENS_WARNING;Varování: crop factor použitý pro profilování objektivu je větší než crop factor fotoaparátu. Výsledek může být nesprávný. +TP_LENSPROFILE_MODE_HEADER;Profil objektivu TP_LENSPROFILE_USE_CA;Chromatická aberace +TP_LENSPROFILE_USE_GEOMETRIC;Geometrické zkreslení +TP_LENSPROFILE_USE_HEADER;Opravit TP_LENSPROFILE_USE_VIGNETTING;Vinětace TP_LOCALCONTRAST_AMOUNT;Míra TP_LOCALCONTRAST_DARKNESS;Úroveň tmavé @@ -1861,7 +1888,8 @@ TP_RAW_HD_TOOLTIP;Nižší hodnoty učiní detekci vypálených/mrtvých bodů a TP_RAW_HPHD;HPHD TP_RAW_IGV;IGV TP_RAW_IMAGENUM;Dílčí snímek -TP_RAW_IMAGENUM_TOOLTIP;Některé raw snímky obsahují několik podsnímků (Pentax/Sony Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nV případě, že je pro demozajkování použita jiná metoda než Pixel Shift, tato volba určí, který podsnímek se použije.\n\nPokud je použita Pixel Shift metoda demozajkování na Pixel Shift raw soubory, budou použity všechny podsnímky a tato volba určí, který snímek bude použit pro pohyblivé části. +TP_RAW_IMAGENUM_SN;Režim SN +TP_RAW_IMAGENUM_TOOLTIP;Některé raw snímky obsahují několik podsnímků (Pentax/Sony Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel, Fuji EXR).\n\nV případě, že je pro demozajkování použita jiná metoda než Pixel Shift, tato volba určí, který podsnímek se použije.\n\nPokud je použita Pixel Shift metoda demozajkování na Pixel Shift raw soubory, budou použity všechny podsnímky a tato volba určí, který snímek bude použit pro pohyblivé části. TP_RAW_LABEL;Demozajkování TP_RAW_LMMSE;LMMSE TP_RAW_LMMSEITERATIONS;Kroky rozšíření LMMSE @@ -1901,6 +1929,8 @@ TP_RAW_SENSOR_BAYER_LABEL;Snímač s Bayerovou maskou TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;Tří průchodová dává lepší výsledky (doporučeno pro fotky s nízkým ISO).\nJednoprůchodová je téměř k nerozeznání od tří průchodové pro vysoké ISO a je rychlejší.\n+rychlá vytváří méně artefaktů v plochých oblastech TP_RAW_SENSOR_XTRANS_LABEL;Senzory s X-Trans maticí TP_RAW_VNG4;VNG4 +TP_RAW_XTRANS;X-Trans +TP_RAW_XTRANSFAST;Fast X-Trans TP_RESIZE_ALLOW_UPSCALING;Povolit zvětšení TP_RESIZE_APPLIESTO;Aplikovat na: TP_RESIZE_CROPPEDAREA;Oblast ořezu @@ -2017,6 +2047,7 @@ TP_SHARPENEDGE_LABEL;Hrany TP_SHARPENEDGE_PASSES;Počet průchodů TP_SHARPENEDGE_THREE;Pouze jas TP_SHARPENING_AMOUNT;Míra +TP_SHARPENING_BLUR;Poloměr rozostření TP_SHARPENING_CONTRAST;Práh kontrastu TP_SHARPENING_EDRADIUS;Poloměr TP_SHARPENING_EDTOLERANCE;Tolerance k hranám @@ -2287,38 +2318,4 @@ ZOOMPANEL_ZOOMFITSCREEN;Přizpůsobit celý obrázek obrazovce\nZkratka: Alt< ZOOMPANEL_ZOOMIN;Přiblížit\nZkratka: + ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - -!!!!!!!!!!!!!!!!!!!!!!!!! -! Untranslated keys follow; remove the ! prefix after an entry is translated. -!!!!!!!!!!!!!!!!!!!!!!!!! - -!FILEBROWSER_BROWSEPATHBUTTONHINT;Click to open specified path, reload folder and apply "find" keywords. -!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius -!MAIN_FRAME_PLACES_DEL;Remove -!MAIN_TAB_FAVORITES;Favorites -!MAIN_TAB_FAVORITES_TOOLTIP;Shortcut: Alt-u -!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode -!PREFERENCES_CHUNKSIZES;Tiles per thread -!PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE demosaic -!PREFERENCES_CHUNKSIZE_RAW_CA;Raw CA correction -!PREFERENCES_CHUNKSIZE_RAW_RCD;RCD demosaic -!PREFERENCES_CHUNKSIZE_RAW_XT;Xtrans demosaic -!PREFERENCES_CHUNKSIZE_RGB;RGB processing -!PREFERENCES_PERFORMANCE_MEASURE;Measure -!PREFERENCES_PERFORMANCE_MEASURE_HINT;Logs processing times in console -!PROGRESSBAR_DECODING;Decoding... -!PROGRESSBAR_GREENEQUIL;Green equilibration... -!PROGRESSBAR_HLREC;Highlight reconstruction... -!PROGRESSBAR_HOTDEADPIXELFILTER;Hot/dead pixel filter... -!PROGRESSBAR_LINEDENOISE;Line noise filter... -!PROGRESSBAR_RAWCACORR;Raw CA correction... -!QUEUE_LOCATION_TITLE;Output Location -!TP_CROP_PPI;PPI -!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected -!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected -!TP_LENSPROFILE_MODE_HEADER;Lens Profile -!TP_LENSPROFILE_USE_GEOMETRIC;Geometric distortion -!TP_LENSPROFILE_USE_HEADER;Correct -!TP_RAW_IMAGENUM_SN;SN mode -!TP_RAW_XTRANS;X-Trans -!TP_RAW_XTRANSFAST;Fast X-Trans -!TP_SHARPENING_BLUR;Blur radius +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode \ No newline at end of file From 1eed354813c017e5e67a53db7aadec5ec9d0b3a9 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Tue, 16 Apr 2019 00:00:39 +0200 Subject: [PATCH 54/59] Update Deutsch locale --- rtdata/languages/Deutsch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 623848843..34c81e820 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -79,6 +79,7 @@ #78 19.01.2019 Erweiterung (TooWaBoo) RT 5.5 #79 24.02.2019 Erweiterung (TooWaBoo) RT 5.5 #80 25.03.2019 Erweiterung (TooWaBoo) RT 5.6 +#81 15.04.2019 Erweiterung (TooWaBoo) RT 5.6 ABOUT_TAB_BUILD;Version ABOUT_TAB_CREDITS;Danksagungen @@ -2359,5 +2360,5 @@ ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! -!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode -!QUEUE_LOCATION_TITLE;Output Location +QUEUE_LOCATION_TITLE;Ausgabeverzeichnis +PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI-Modus From 541084eb0615853214c50f02172ce63f85945317 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Thu, 18 Apr 2019 18:05:19 +0200 Subject: [PATCH 55/59] TWB theme - Mac-gradient-fix --- rtdata/themes/TooWaBlue-GTK3-20_.css | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index 3ed352c74..78bdb10b1 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -2,7 +2,7 @@ This file is part of RawTherapee. Copyright (c) 2016-2019 TooWaBoo - Version 3.06 + Version 3.07 RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -274,13 +274,13 @@ textview:selected, treeview:selected { margin-top: 0.25em; } #RightNotebook #HistoryPanel { - margin-top: 0.333333333333333333em; + margin-top: 0.416666666666666666em; } #HistoryPanel > border { margin-top: 1.75em; } #HistoryPanel > label { - margin: 0 0 -1.5em 0; + margin: 0 0 -1.416666666666666666em 0; padding: 0 0 0 0.083333333333333333em; } @@ -325,6 +325,7 @@ fontchooser scrolledwindow, } #Navigator label { padding: 0; + margin: 0.083333333333333333em 0 0; } /*** end ***************************************************************************************/ @@ -692,7 +693,7 @@ scrollbar:not(.overlay-indicator):hover { /*** Scale**************************************************************************************/ scale { padding: 0; - min-height: 1.833333333333333333em; + min-height: 1.833333333333333333em; margin: 0 -0.333333333333333333em; } @@ -727,7 +728,7 @@ scale.color trough { } scale trough highlight { - background-color: transparent; + background-color: @accent-color2; background-image: linear-gradient(to bottom, shade (@accent-color2,1.22), shade(@accent-color2,.88)); border: 0.083333333333333333em solid shade(@bg-dark-grey,0.9); margin: 0 -0.583333333333333333em; @@ -779,7 +780,7 @@ progressbar trough { } progressbar trough progress { - background-color: transparent; + background-color: @accent-color2; border-radius: 0.416666666666666666em; border: 0.083333333333333333em solid @bg-button-border; } @@ -816,6 +817,7 @@ progressbar.vertical trough.empty { progressbar trough.empty progress { border-color: transparent; background-image: none; + background-color:transparent; box-shadow: none; } From de28109b83f317c5e8555ef5210315139b31e9fe Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Sat, 20 Apr 2019 11:08:09 +0200 Subject: [PATCH 56/59] Small button fix (TWB & RT theme) #5292 --- rtdata/themes/TooWaBlue-GTK3-20_.css | 16 +++++++++++----- rtdata/themes/size.css | 10 ++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index 78bdb10b1..7b5089430 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -2,7 +2,7 @@ This file is part of RawTherapee. Copyright (c) 2016-2019 TooWaBoo - Version 3.07 + Version 3.08 RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1568,6 +1568,10 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { padding: 0 0.13em; } +#EditorTopPanel button.narrowbutton image{ + min-width: 0.833333333333333333em; +} + /* Image close button */ #MainNotebook > header tab #CloseButton { padding: 0.166666666666666666em; @@ -1578,21 +1582,23 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { /* Filter buttons*/ #ToolBarPanelFileBrowser .smallbuttonbox { - min-height: 0; + min-height: 1.166666666666666666em; padding: 0; margin: 0; } #ToolBarPanelFileBrowser .smallbuttonbox:nth-child(2) { - margin-top: 0.12em; + margin-top: 0.166666666666666666em; + margin-bottom: -0.166666666666666666em; } #ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton image { - margin: -0.12em; + margin: -1em; + padding: 0; min-width: 0; min-height: 0; } #ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton { min-height: 0; - min-width: 1.333333333333333333em; + min-width: 1.166666666666666666em; padding: 0; margin: 0 0.25em; border: none; diff --git a/rtdata/themes/size.css b/rtdata/themes/size.css index f333ceeb0..e3a22f337 100644 --- a/rtdata/themes/size.css +++ b/rtdata/themes/size.css @@ -647,15 +647,17 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { /* Filter buttons*/ #ToolBarPanelFileBrowser .smallbuttonbox { - min-height: 0; + min-height: 1.166666666666666666em; padding: 0; margin: 0; } #ToolBarPanelFileBrowser .smallbuttonbox:nth-child(2) { - margin: 0 0 -0.166666666666666666em; + margin-top: 0.166666666666666666em; + margin-bottom: -0.166666666666666666em; } #ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton image { - margin: -0.166666666666666666em; + margin: -1em 0; + padding: 0; min-width: 0; min-height: 0; } @@ -663,7 +665,7 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { min-height: 0; min-width: 1.166666666666666666em; padding: 0; - margin: 0 0.25em; + margin: 0 0.166666666666666666em; border: none; border-radius: 0; } From ec059cb38d8b599c4ef851a193675a02dbff5885 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 20 Apr 2019 19:55:51 +0200 Subject: [PATCH 57/59] generateTranslationDiffs --- rtdata/languages/Czech | 6 +++++- rtdata/languages/Deutsch | 8 ++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 3ac2273c0..5b714bc36 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -2318,4 +2318,8 @@ ZOOMPANEL_ZOOMFITSCREEN;Přizpůsobit celý obrázek obrazovce\nZkratka: Alt< ZOOMPANEL_ZOOMIN;Přiblížit\nZkratka: + ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - -!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode \ No newline at end of file +!!!!!!!!!!!!!!!!!!!!!!!!! +! Untranslated keys follow; remove the ! prefix after an entry is translated. +!!!!!!!!!!!!!!!!!!!!!!!!! + +!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 34c81e820..2398c1bb6 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -1119,6 +1119,7 @@ PREFERENCES_APPEARANCE_COLORPICKERFONT;Schriftart Farbwähler PREFERENCES_APPEARANCE_CROPMASKCOLOR;Farbe/Transparenz für Schnittmaske PREFERENCES_APPEARANCE_MAINFONT;Schriftart: PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Farbe der Navigationshilfe +PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI-Modus PREFERENCES_APPEARANCE_THEME;Oberflächendesign PREFERENCES_APPLNEXTSTARTUP;erfordert Neustart PREFERENCES_AUTOMONPROFILE;Automatisch das für den aktuellen Monitor festgelegte Profil verwenden @@ -1338,6 +1339,7 @@ QUEUE_FORMAT_TITLE;Dateiformat QUEUE_LOCATION_FOLDER;In dieses Verzeichnis speichern QUEUE_LOCATION_TEMPLATE;Dynamisches Verzeichnis verwenden QUEUE_LOCATION_TEMPLATE_TOOLTIP;Die folgenden Variablen können verwendet werden:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nDiese Variablen beinhalten bestimmte Teile des Verzeichnispfades, in welchem sich das Bild befindet, oder Attribute des Bildes.\n\nWenn zum Beispiel /home/tom/photos/2010-10-31/dsc0042.nef geöffnet wurde, dann haben die Variablen den folgenden Inhalt:\n%d4 = home\n%d3 = tom\n%d2 = photos\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tom/photos/2010-10-31\n%p2 = /home/tom/photos\n%p3 = /home/tom\n%p4 = /home\n\nWenn Sie die Ausgabedatei in dasselbe Verzeichnis wie das Originalbild speichern wollen, dann wählen Sie:\n%p1/%f\n\nWenn Sie die Ausgabedatei in ein Unterverzeichnis mit dem Namen "converted" schreiben wollen, dann wählen Sie:\n%p1/converted/%f\n\nWenn Sie die Ausgabedatei im Verzeichnispfad "/home/tom/photos/converted" speichern wollen, dort jedoch in einem mit dem Namen des Ursprungsverzeichnisses betitelten Unterverzeichnis, dann wählen Sie:\n%p2/converted/%d1/%f\n\nDie Variable %r enthält die Bewertung des Bildes. +QUEUE_LOCATION_TITLE;Ausgabeverzeichnis QUEUE_STARTSTOP_TOOLTIP;Startet / Stoppt die Verarbeitung\nder Warteschlange.\n\nTaste: Strg + s SAMPLEFORMAT_0;Unbekanntes Datenformat SAMPLEFORMAT_1;8 Bit ohne Vorzeichen @@ -2356,9 +2358,3 @@ ZOOMPANEL_ZOOMFITSCREEN;An Bildschirm anpassen.\nTaste: Alt + f ZOOMPANEL_ZOOMIN;Hineinzoomen\nTaste: + ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - -!!!!!!!!!!!!!!!!!!!!!!!!! -! Untranslated keys follow; remove the ! prefix after an entry is translated. -!!!!!!!!!!!!!!!!!!!!!!!!! - -QUEUE_LOCATION_TITLE;Ausgabeverzeichnis -PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI-Modus From 5a4ed7317a1f9f45d0009a2f4085757927029ecf Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 20 Apr 2019 21:56:55 +0200 Subject: [PATCH 58/59] Preparing for release 5.6 --- RELEASE_NOTES.txt | 4 +- com.rawtherapee.RawTherapee.appdata.xml | 1 + rtdata/images/svg/splash.svg | 85 +------------------------ 3 files changed, 6 insertions(+), 84 deletions(-) diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index 450bae2d6..7a13d7cbb 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -1,6 +1,6 @@ -RAWTHERAPEE 5.6-rc2 RELEASE NOTES +RAWTHERAPEE 5.6 RELEASE NOTES -This is RawTherapee 5.6 Release Candidate 2, released on 2019-04-17. This is not the final release yet. +This is RawTherapee 5.6, released on 2019-04-20. Start by reading the "Getting Started" article on RawPedia: http://rawpedia.rawtherapee.com/ diff --git a/com.rawtherapee.RawTherapee.appdata.xml b/com.rawtherapee.RawTherapee.appdata.xml index d7a1a4071..32cfe30c7 100644 --- a/com.rawtherapee.RawTherapee.appdata.xml +++ b/com.rawtherapee.RawTherapee.appdata.xml @@ -35,6 +35,7 @@ https://discuss.pixls.us/t/localization-how-to-translate-rawtherapee-and-rawpedia/2594 rawtherapee.desktop + diff --git a/rtdata/images/svg/splash.svg b/rtdata/images/svg/splash.svg index 392298cc0..c5f7c9708 100644 --- a/rtdata/images/svg/splash.svg +++ b/rtdata/images/svg/splash.svg @@ -479,9 +479,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="2.3526012" - inkscape:cx="276" - inkscape:cy="173" + inkscape:zoom="0.93979686" + inkscape:cx="-60.77221" + inkscape:cy="136.48859" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" @@ -1061,84 +1061,5 @@ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:49.34799576px;line-height:1.25;font-family:'Eras Bold ITC';-inkscape-font-specification:'Eras Bold ITC Bold';letter-spacing:-7.09514618px" id="path1156" /> - - - - - - - - - - - - - - - - - - - - - From 1dfa49233961cfdb32d098efeca1bda09b394059 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 20 Apr 2019 22:36:11 +0200 Subject: [PATCH 59/59] Changes for merging release 5.6 back into dev --- RELEASE_NOTES.txt | 25 +++++++-------- rtdata/images/svg/splash.svg | 61 ++++++++++++++++++++++++++++++++++-- 2 files changed, 70 insertions(+), 16 deletions(-) diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index 7a13d7cbb..17cf14fd6 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -1,10 +1,17 @@ -RAWTHERAPEE 5.6 RELEASE NOTES +RAWTHERAPEE 5.6-dev RELEASE NOTES -This is RawTherapee 5.6, released on 2019-04-20. +This is a development version of RawTherapee. We update the code almost daily. Every few months, once enough changes have accumulated and the code is stabilized, we make a new official release. Every code change between these releases is known as a "development" version, and this is one of them. Start by reading the "Getting Started" article on RawPedia: http://rawpedia.rawtherapee.com/ +While we only commit tested and relatively stable code and so the development versions should be fairly stable, you should be aware that: +- Development versions only had limited testing, so there may be bugs unknown to us. +- You should report these bugs so that they get fixed for the next stable release. See + www.rawpedia.rawtherapee.com/How_to_write_useful_bug_reports +- The way new tools work in the development versions is likely to change as we tweak and tune them, so your processing profiles may produce different results when used in a future stable version. +- Bugs present in the stable versions get fixed in the development versions, and make it into the next stable version when we make a new official release. That means that in some ways the development versions can be "more stable" than the latest stable release. At the same time, new features may introduce new bugs. This is a trade-off you should be aware of. + NEWS RELEVANT TO PHOTOGRAPHERS @@ -19,24 +26,16 @@ In order to use RawTherapee efficiently you should know that: - All curves support the Shift and Ctrl keys while dragging a point. Shift+drag makes the point snap to a meaningful axis (top, bottom, diagonal, other), while Ctrl+drag makes your mouse movement super-fine for precise point positioning. - There are many keyboard shortcuts which make working with RawTherapee much faster and give you greater control. Make sure you familiarize yourself with them on RawPedia's "Keyboard Shortcuts" page! -New features since 5.5: -- Pseudo-HiDPI support, for a smooth and sharp user interface regardless of screen size. Pseudo-HiDPI mode is disabled by default, enable it in Preferences > General > Appearance. Scaling in RawTherapee depends on font size, DPI and display scaling. While scaling has been tested to work well in Windows, Linux and macOS, there are some macOS display modes which are incompatible with it, specifically those modes suffixed by "(HiDPI)" in macOS Display settings. Some versions of macOS (10.14.*) seem to not list any modes, in which case the user must just give it a try. -- Ability to move tools to a new Favorites tab, http://rawpedia.rawtherapee.com/Favorites_Tab -- "Unclipped" processing profile, to make it easy to save an image while preserving data across the whole tonal range, http://rawpedia.rawtherapee.com/Unclipped -- User-adjustable tiles-per-thread settings in Preferences > Performance, for users who want to find optimal values for their system. The default value of 2 tiles-per-thread performs best overall. -- Hundreds of speed optimizations, bug fixes, and overall improvements. +New features since 5.6: +TODO. NEWS RELEVANT TO PACKAGE MAINTAINERS -New since 5.5: -- Requires librsvg >=2.40. -- GTK+ versions 3.24.2 - 3.24.6 have an issue where combobox menu scroll-arrows are missing when the combobox list does not fit vertically on the screen. As a result, users would not be able to scroll in the following comboboxes: Processing Profiles, Film Simulation, and the camera and lens profiles in Profiled Lens Correction. - In general: - To get the source code, either clone from git or use the tarball from http://rawtherapee.com/shared/source/ . Do not use the auto-generated GitHub release tarballs. -- Requires GTK+ version >=3.16, though >=3.22.24 is recommended. +- Requires GTK+ version >=3.16, though >=3.22.24 is recommended. GTK+ versions 3.24.2 - 3.24.6 have an issue with missing combobox menu arrows and are to be avoided. - RawTherapee 5 requires GCC-4.9 or higher, or Clang. - Do not use -ffast-math, it will not make RawTherapee faster but will introduce artifacts. - Use -O3, it will make RawTherapee faster with no known side-effects. diff --git a/rtdata/images/svg/splash.svg b/rtdata/images/svg/splash.svg index c5f7c9708..2e46f0e6d 100644 --- a/rtdata/images/svg/splash.svg +++ b/rtdata/images/svg/splash.svg @@ -480,8 +480,8 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.93979686" - inkscape:cx="-60.77221" - inkscape:cy="136.48859" + inkscape:cx="-66.836581" + inkscape:cy="136.82017" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" @@ -574,7 +574,7 @@ RawTherapee splash screen - 2019-04-10 + 2019-02-27 Maciej Dworak @@ -1061,5 +1061,60 @@ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:49.34799576px;line-height:1.25;font-family:'Eras Bold ITC';-inkscape-font-specification:'Eras Bold ITC Bold';letter-spacing:-7.09514618px" id="path1156" /> + + + + + + + + + + + + + + +