Merge pull request #3798 from Beep6581/wallfix
Compiling with -Wall shows a large amount of warnings which should be fixed , fixes #3790
This commit is contained in:
commit
aaf5f80645
@ -296,7 +296,7 @@ endif (WITH_PROF)
|
|||||||
if (OPTION_OMP)
|
if (OPTION_OMP)
|
||||||
find_package(OpenMP)
|
find_package(OpenMP)
|
||||||
if (OPENMP_FOUND)
|
if (OPENMP_FOUND)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -Werror=unknown-pragmas")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -Werror=unknown-pragmas -Wall -Wno-unused-result -Wno-deprecated-declarations")
|
||||||
endif (OPENMP_FOUND)
|
endif (OPENMP_FOUND)
|
||||||
endif (OPTION_OMP)
|
endif (OPTION_OMP)
|
||||||
|
|
||||||
|
@ -241,7 +241,6 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const
|
|||||||
for (int row = rr + top, cc = ccmin; cc < ccmax; cc++) {
|
for (int row = rr + top, cc = ccmin; cc < ccmax; cc++) {
|
||||||
int col = cc + left;
|
int col = cc + left;
|
||||||
int c = FC(rr, cc);
|
int c = FC(rr, cc);
|
||||||
int indx = row * width + col;
|
|
||||||
int indx1 = rr * ts + cc;
|
int indx1 = rr * ts + cc;
|
||||||
rgb[c][indx1] = (rawData[row][col]) / 65535.0f;
|
rgb[c][indx1] = (rawData[row][col]) / 65535.0f;
|
||||||
}
|
}
|
||||||
@ -966,10 +965,9 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const
|
|||||||
|
|
||||||
// copy CA corrected results to temporary image matrix
|
// copy CA corrected results to temporary image matrix
|
||||||
for (int rr = border; rr < rr1 - border; rr++) {
|
for (int rr = border; rr < rr1 - border; rr++) {
|
||||||
int c = FC(rr + top, left + border + FC(rr + top, 2) & 1);
|
int c = FC(rr + top, left + border + (FC(rr + top, 2) & 1));
|
||||||
|
|
||||||
for (int row = rr + top, cc = border + (FC(rr, 2) & 1), indx = (row * width + cc + left) >> 1; cc < cc1 - border; cc += 2, indx++) {
|
for (int row = rr + top, cc = border + (FC(rr, 2) & 1), indx = (row * width + cc + left) >> 1; cc < cc1 - border; cc += 2, indx++) {
|
||||||
int col = cc + left;
|
|
||||||
RawDataTmp[indx] = 65535.0f * rgb[c][(rr) * ts + cc] + 0.5f;
|
RawDataTmp[indx] = 65535.0f * rgb[c][(rr) * ts + cc] + 0.5f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ Takes less memory with OkToModify_b = true, and Preconditioner = nullptr. */
|
|||||||
float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b,
|
float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b,
|
||||||
float *x, float RMSResidual, void *Pass, int MaximumIterates, void Preconditioner(float *Product, float *x, void *Pass))
|
float *x, float RMSResidual, void *Pass, int MaximumIterates, void Preconditioner(float *Product, float *x, void *Pass))
|
||||||
{
|
{
|
||||||
int iterate, i;
|
int iterate;
|
||||||
|
|
||||||
float* buffer = (float*)malloc(2 * n * sizeof(float) + 128);
|
float* buffer = (float*)malloc(2 * n * sizeof(float) + 128);
|
||||||
float *r = (buffer + 16);
|
float *r = (buffer + 16);
|
||||||
@ -411,7 +411,7 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max
|
|||||||
|
|
||||||
//How many diagonals in the decomposition?
|
//How many diagonals in the decomposition?
|
||||||
MaxFillAbove++; //Conceptually, now "fill" includes an existing diagonal. Simpler in the math that follows.
|
MaxFillAbove++; //Conceptually, now "fill" includes an existing diagonal. Simpler in the math that follows.
|
||||||
int i, j, mic, fp;
|
int j, mic, fp;
|
||||||
mic = 1;
|
mic = 1;
|
||||||
fp = 1;
|
fp = 1;
|
||||||
|
|
||||||
@ -441,8 +441,8 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max
|
|||||||
}
|
}
|
||||||
|
|
||||||
//It's all initialized? Uhkay. Do the actual math then.
|
//It's all initialized? Uhkay. Do the actual math then.
|
||||||
int sss, ss;
|
int sss;
|
||||||
int MaxStartRow = StartRows[m - 1]; //Handy number.
|
// int MaxStartRow = StartRows[m - 1]; //Handy number.
|
||||||
float **l = ic->Diagonals;
|
float **l = ic->Diagonals;
|
||||||
float *d = ic->Diagonals[0]; //Describes D in LDLt.
|
float *d = ic->Diagonals[0]; //Describes D in LDLt.
|
||||||
int icm = ic->m;
|
int icm = ic->m;
|
||||||
|
@ -125,7 +125,7 @@ void ImProcFunctions::Median_Denoise(float **src, float **dst, const int width,
|
|||||||
medBuffer[1] = dst;
|
medBuffer[1] = dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
float ** medianIn, ** medianOut;
|
float ** medianIn, ** medianOut = nullptr;
|
||||||
int BufferIndex = 0;
|
int BufferIndex = 0;
|
||||||
|
|
||||||
for (int iteration = 1; iteration <= iterations; ++iteration) {
|
for (int iteration = 1; iteration <= iterations; ++iteration) {
|
||||||
@ -454,10 +454,10 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef
|
|||||||
const bool useNoiseLCurve = (noiseLCurve && noiseLCurve.getSum() >= 7.f);
|
const bool useNoiseLCurve = (noiseLCurve && noiseLCurve.getSum() >= 7.f);
|
||||||
const bool autoch = (settings->leveldnautsimpl == 1 && (dnparams.Cmethod == "AUT" || dnparams.Cmethod == "PRE")) || (settings->leveldnautsimpl == 0 && (dnparams.C2method == "AUTO" || dnparams.C2method == "PREV"));
|
const bool autoch = (settings->leveldnautsimpl == 1 && (dnparams.Cmethod == "AUT" || dnparams.Cmethod == "PRE")) || (settings->leveldnautsimpl == 0 && (dnparams.C2method == "AUTO" || dnparams.C2method == "PREV"));
|
||||||
|
|
||||||
float** lumcalc;
|
float** lumcalc = nullptr;
|
||||||
float* lumcalcBuffer;
|
float* lumcalcBuffer = nullptr;
|
||||||
float** ccalc;
|
float** ccalc = nullptr;
|
||||||
float* ccalcBuffer;
|
float* ccalcBuffer = nullptr;
|
||||||
|
|
||||||
bool ponder = false;
|
bool ponder = false;
|
||||||
float ponderCC = 1.f;
|
float ponderCC = 1.f;
|
||||||
@ -518,7 +518,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef
|
|||||||
ccalc[i] = ccalcBuffer + (i * wid);
|
ccalc[i] = ccalcBuffer + (i * wid);
|
||||||
}
|
}
|
||||||
|
|
||||||
float cn100Precalc;
|
float cn100Precalc = 0.f;
|
||||||
|
|
||||||
if (useNoiseCCurve) {
|
if (useNoiseCCurve) {
|
||||||
cn100Precalc = SQR(1.f + ponderCC * (4.f * noiseCCurve[100.f / 60.f]));
|
cn100Precalc = SQR(1.f + ponderCC * (4.f * noiseCCurve[100.f / 60.f]));
|
||||||
|
@ -599,7 +599,7 @@ public:
|
|||||||
vint sumv = (vint)ZEROV;
|
vint sumv = (vint)ZEROV;
|
||||||
vfloat avgv = ZEROV;
|
vfloat avgv = ZEROV;
|
||||||
|
|
||||||
for(; i < size - 3; i += 4) {
|
for(; i < static_cast<int>(size) - 3; i += 4) {
|
||||||
vint datav = _mm_loadu_si128((__m128i*)&data[i]);
|
vint datav = _mm_loadu_si128((__m128i*)&data[i]);
|
||||||
sumv += datav;
|
sumv += datav;
|
||||||
avgv += iv * _mm_cvtepi32_ps(datav);
|
avgv += iv * _mm_cvtepi32_ps(datav);
|
||||||
@ -611,7 +611,7 @@ public:
|
|||||||
avg = vhadd(avgv);
|
avg = vhadd(avgv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (; i < size; i++) {
|
for (; i < static_cast<int>(size); i++) {
|
||||||
T val = data[i];
|
T val = data[i];
|
||||||
sum += val;
|
sum += val;
|
||||||
avg += i * val;
|
avg += i * val;
|
||||||
|
@ -113,7 +113,7 @@ public:
|
|||||||
// use as empty declaration, resize before use!
|
// use as empty declaration, resize before use!
|
||||||
// very useful as a member object
|
// very useful as a member object
|
||||||
array2D() :
|
array2D() :
|
||||||
x(0), y(0), owner(0), ptr(nullptr), data(nullptr), lock(0), flags(0)
|
x(0), y(0), owner(0), flags(0), ptr(nullptr), data(nullptr), lock(0)
|
||||||
{
|
{
|
||||||
//printf("got empty array2D init\n");
|
//printf("got empty array2D init\n");
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ bool loadFile(
|
|||||||
bool res = false;
|
bool res = false;
|
||||||
|
|
||||||
if (fw == fh) {
|
if (fw == fh) {
|
||||||
unsigned int level = 1;
|
int level = 1;
|
||||||
|
|
||||||
while (level * level * level < fw) {
|
while (level * level * level < fw) {
|
||||||
++level;
|
++level;
|
||||||
|
@ -1530,7 +1530,7 @@ void Color::interpolateRGBColor (float realL, float iplow, float iphigh, int alg
|
|||||||
int toDo, const double xyz_rgb[3][3], const double rgb_xyz[3][3], float &ro, float &go, float &bo)
|
int toDo, const double xyz_rgb[3][3], const double rgb_xyz[3][3], float &ro, float &go, float &bo)
|
||||||
{
|
{
|
||||||
float X1, Y1, Z1, X2, Y2, Z2, X, Y, Z, XL, YL, ZL;
|
float X1, Y1, Z1, X2, Y2, Z2, X, Y, Z, XL, YL, ZL;
|
||||||
float L1, L2, LL, a_1 = 0.f, b_1 = 0.f, a_2, b_2, a_L, b_L;
|
float L1 = 0.f, L2, LL, a_1 = 0.f, b_1 = 0.f, a_2, b_2, a_L, b_L;
|
||||||
|
|
||||||
// converting color 1 to Lab (image)
|
// converting color 1 to Lab (image)
|
||||||
Color::rgbxyz(r1, g1, b1, X1, Y1, Z1, xyz_rgb);
|
Color::rgbxyz(r1, g1, b1, X1, Y1, Z1, xyz_rgb);
|
||||||
|
@ -309,8 +309,6 @@ double xyCoordToTemperature(const std::array<double, 2>& white_xy)
|
|||||||
{ 600, 0.33724, 0.36051, -116.45 }
|
{ 600, 0.33724, 0.36051, -116.45 }
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr double tint_scale = -3000.0;
|
|
||||||
|
|
||||||
double res = 0;
|
double res = 0;
|
||||||
|
|
||||||
// Convert to uv space.
|
// Convert to uv space.
|
||||||
@ -847,7 +845,7 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) :
|
|||||||
// Saturation maps. Need to be unwinded.
|
// Saturation maps. Need to be unwinded.
|
||||||
tag = tagDir->getTag(toUnderlying(TagKey::PROFILE_HUE_SAT_MAP_DATA_2));
|
tag = tagDir->getTag(toUnderlying(TagKey::PROFILE_HUE_SAT_MAP_DATA_2));
|
||||||
|
|
||||||
for (int i = 0; i < delta_info.array_count; ++i) {
|
for (unsigned int i = 0; i < delta_info.array_count; ++i) {
|
||||||
deltas_2[i].hue_shift = tag->toDouble((i * 3) * tiff_float_size);
|
deltas_2[i].hue_shift = tag->toDouble((i * 3) * tiff_float_size);
|
||||||
deltas_2[i].sat_scale = tag->toDouble((i * 3 + 1) * tiff_float_size);
|
deltas_2[i].sat_scale = tag->toDouble((i * 3 + 1) * tiff_float_size);
|
||||||
deltas_2[i].val_scale = tag->toDouble((i * 3 + 2) * tiff_float_size);
|
deltas_2[i].val_scale = tag->toDouble((i * 3 + 2) * tiff_float_size);
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||||
|
#pragma GCC diagnostic ignored "-Wsign-compare"
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||||
|
#pragma GCC diagnostic ignored "-Wparentheses"
|
||||||
|
#if (__GNUC__ == 6)
|
||||||
|
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/*RT*/#include <glib.h>
|
/*RT*/#include <glib.h>
|
||||||
/*RT*/#include <glib/gstdio.h>
|
/*RT*/#include <glib/gstdio.h>
|
||||||
/*RT*/#undef MAX
|
/*RT*/#undef MAX
|
||||||
@ -251,7 +262,11 @@ void CLASS derror()
|
|||||||
if (feof(ifp))
|
if (feof(ifp))
|
||||||
fprintf (stderr,_("Unexpected end of file\n"));
|
fprintf (stderr,_("Unexpected end of file\n"));
|
||||||
else
|
else
|
||||||
|
#ifdef WIN32
|
||||||
|
fprintf (stderr,_("Corrupt data near 0x%I64x\n"), (INT64) ftello(ifp));
|
||||||
|
#else
|
||||||
fprintf (stderr,_("Corrupt data near 0x%llx\n"), (INT64) ftello(ifp));
|
fprintf (stderr,_("Corrupt data near 0x%llx\n"), (INT64) ftello(ifp));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
data_error++;
|
data_error++;
|
||||||
/*RT Issue 2467 longjmp (failure, 1);*/
|
/*RT Issue 2467 longjmp (failure, 1);*/
|
||||||
@ -1840,8 +1855,8 @@ void CLASS parse_hasselblad_gain()
|
|||||||
not be seen as clipped).
|
not be seen as clipped).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ushort raw_h, count, ch_count, u16;
|
ushort raw_h;
|
||||||
int i, offset;
|
int offset;
|
||||||
off_t base;
|
off_t base;
|
||||||
|
|
||||||
base = ftell(ifp);
|
base = ftell(ifp);
|
||||||
@ -5897,7 +5912,7 @@ int CLASS parse_tiff_ifd (int base)
|
|||||||
break;
|
break;
|
||||||
case 33422: /* CFAPattern */
|
case 33422: /* CFAPattern */
|
||||||
if (filters == 9) {
|
if (filters == 9) {
|
||||||
FORC(36) ((char *)xtrans)[c] = fgetc(ifp) & 3;
|
FORC(36) ((int *)xtrans)[c] = fgetc(ifp) & 3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 64777: /* Kodak P-series */
|
case 64777: /* Kodak P-series */
|
||||||
@ -9020,7 +9035,7 @@ canon_a5:
|
|||||||
}
|
}
|
||||||
if (fuji_layout) raw_width *= is_raw;
|
if (fuji_layout) raw_width *= is_raw;
|
||||||
if (filters == 9)
|
if (filters == 9)
|
||||||
FORC(36) ((char *)xtrans)[c] =
|
FORC(36) ((int *)xtrans)[c] =
|
||||||
xtrans_abs[(c/6+top_margin) % 6][(c+left_margin) % 6];
|
xtrans_abs[(c/6+top_margin) % 6][(c+left_margin) % 6];
|
||||||
} else if (!strcmp(model,"KD-400Z")) {
|
} else if (!strcmp(model,"KD-400Z")) {
|
||||||
height = 1712;
|
height = 1712;
|
||||||
@ -9881,3 +9896,6 @@ struct tiff_hdr {
|
|||||||
/*RT*/#undef LIM
|
/*RT*/#undef LIM
|
||||||
/*RT*/#undef ULIM
|
/*RT*/#undef ULIM
|
||||||
/*RT*/#undef CLIP
|
/*RT*/#undef CLIP
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
@ -76,7 +76,8 @@ protected:
|
|||||||
FILE *ofp;
|
FILE *ofp;
|
||||||
short order;
|
short order;
|
||||||
const char *ifname;
|
const char *ifname;
|
||||||
char *meta_data, xtrans[6][6],xtrans_abs[6][6];
|
char *meta_data;
|
||||||
|
int xtrans[6][6],xtrans_abs[6][6];
|
||||||
char cdesc[5], desc[512], make[64], model[64], model2[64], model3[64], artist[64];
|
char cdesc[5], desc[512], make[64], model[64], model2[64], model3[64], artist[64];
|
||||||
float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len;
|
float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len;
|
||||||
time_t timestamp;
|
time_t timestamp;
|
||||||
|
@ -806,7 +806,6 @@ void Crop::update (int todo)
|
|||||||
bool wavcontlutili = parent->wavcontlutili;
|
bool wavcontlutili = parent->wavcontlutili;
|
||||||
|
|
||||||
LUTu dummy;
|
LUTu dummy;
|
||||||
int moderetinex;
|
|
||||||
// parent->ipf.MSR(labnCrop, labnCrop->W, labnCrop->H, 1);
|
// parent->ipf.MSR(labnCrop, labnCrop->W, labnCrop->H, 1);
|
||||||
parent->ipf.chromiLuminanceCurve (this, 1, labnCrop, labnCrop, parent->chroma_acurve, parent->chroma_bcurve, parent->satcurve, parent->lhskcurve, parent->clcurve, parent->lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy);
|
parent->ipf.chromiLuminanceCurve (this, 1, labnCrop, labnCrop, parent->chroma_acurve, parent->chroma_bcurve, parent->satcurve, parent->lhskcurve, parent->clcurve, parent->lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy);
|
||||||
parent->ipf.vibrance (labnCrop);
|
parent->ipf.vibrance (labnCrop);
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/*
|
|
||||||
/*
|
/*
|
||||||
* This file is part of RawTherapee.
|
* This file is part of RawTherapee.
|
||||||
*
|
*
|
||||||
@ -602,7 +601,7 @@ void RawImageSource::vng4_demosaic ()
|
|||||||
|
|
||||||
const unsigned prefilters = ri->prefilters;
|
const unsigned prefilters = ri->prefilters;
|
||||||
const int width = W, height = H;
|
const int width = W, height = H;
|
||||||
const int colors = 4;
|
constexpr unsigned int colors = 4;
|
||||||
float (*image)[4];
|
float (*image)[4];
|
||||||
|
|
||||||
image = (float (*)[4]) calloc (height * width, sizeof * image);
|
image = (float (*)[4]) calloc (height * width, sizeof * image);
|
||||||
@ -648,7 +647,7 @@ void RawImageSource::vng4_demosaic ()
|
|||||||
|
|
||||||
int colcount = 0;
|
int colcount = 0;
|
||||||
|
|
||||||
for (int c = 0; c < colors; c++)
|
for (unsigned int c = 0; c < colors; c++)
|
||||||
if (c != fc(row, col)) {
|
if (c != fc(row, col)) {
|
||||||
*ip++ = c;
|
*ip++ = c;
|
||||||
csum[row][col][colcount] = sum[c];
|
csum[row][col][colcount] = sum[c];
|
||||||
@ -671,7 +670,7 @@ void RawImageSource::vng4_demosaic ()
|
|||||||
sum[ip[1]] += pix[ip[0]] * mul[row & 15][col & 15][i];
|
sum[ip[1]] += pix[ip[0]] * mul[row & 15][col & 15][i];
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < colors - 1; i++, ip++) {
|
for (unsigned int i = 0; i < colors - 1; i++, ip++) {
|
||||||
pix[ip[0]] = sum[ip[0]] / csum[row & 15][col & 15][i];
|
pix[ip[0]] = sum[ip[0]] / csum[row & 15][col & 15][i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -694,7 +693,7 @@ void RawImageSource::vng4_demosaic ()
|
|||||||
int x2 = *cp++;
|
int x2 = *cp++;
|
||||||
int weight = *cp++;
|
int weight = *cp++;
|
||||||
int grads = *cp++;
|
int grads = *cp++;
|
||||||
int color = fc(row + y1, col + x1);
|
unsigned int color = fc(row + y1, col + x1);
|
||||||
|
|
||||||
if (fc(row + y2, col + x2) != color) {
|
if (fc(row + y2, col + x2) != color) {
|
||||||
continue;
|
continue;
|
||||||
@ -724,7 +723,7 @@ void RawImageSource::vng4_demosaic ()
|
|||||||
int y = *cp++;
|
int y = *cp++;
|
||||||
int x = *cp++;
|
int x = *cp++;
|
||||||
*ip++ = (y * width + x) * 4;
|
*ip++ = (y * width + x) * 4;
|
||||||
int color = fc(row, col);
|
unsigned int color = fc(row, col);
|
||||||
|
|
||||||
if (fc(row + y, col + x) != color && fc(row + y * 2, col + x * 2) == color) {
|
if (fc(row + y, col + x) != color && fc(row + y * 2, col + x * 2) == color) {
|
||||||
*ip++ = (y * width + x) * 8 + color;
|
*ip++ = (y * width + x) * 8 + color;
|
||||||
@ -878,7 +877,7 @@ void RawImageSource::vng4_demosaic ()
|
|||||||
#define fc(row,col) \
|
#define fc(row,col) \
|
||||||
(ri->get_filters() >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)
|
(ri->get_filters() >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)
|
||||||
|
|
||||||
#define FORCC for (int c=0; c < colors; c++)
|
#define FORCC for (unsigned int c=0; c < colors; c++)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Patterned Pixel Grouping Interpolation by Alain Desbiolles
|
Patterned Pixel Grouping Interpolation by Alain Desbiolles
|
||||||
@ -887,7 +886,7 @@ void RawImageSource::ppg_demosaic()
|
|||||||
{
|
{
|
||||||
int width = W, height = H;
|
int width = W, height = H;
|
||||||
int dir[5] = { 1, width, -1, -width, 1 };
|
int dir[5] = { 1, width, -1, -width, 1 };
|
||||||
int row, col, diff[2], guess[2], c, d, i;
|
int row, col, diff[2] = {}, guess[2], c, d, i;
|
||||||
float (*pix)[4];
|
float (*pix)[4];
|
||||||
|
|
||||||
float (*image)[4];
|
float (*image)[4];
|
||||||
@ -998,7 +997,7 @@ void RawImageSource::ppg_demosaic()
|
|||||||
|
|
||||||
void RawImageSource::border_interpolate(unsigned int border, float (*image)[4], unsigned int start, unsigned int end)
|
void RawImageSource::border_interpolate(unsigned int border, float (*image)[4], unsigned int start, unsigned int end)
|
||||||
{
|
{
|
||||||
unsigned row, col, y, x, f, c, sum[8];
|
unsigned row, col, y, x, f, sum[8];
|
||||||
unsigned int width = W, height = H;
|
unsigned int width = W, height = H;
|
||||||
unsigned int colors = 3;
|
unsigned int colors = 3;
|
||||||
|
|
||||||
@ -1338,8 +1337,8 @@ SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, array
|
|||||||
h2 /= hs;
|
h2 /= hs;
|
||||||
h3 /= hs;
|
h3 /= hs;
|
||||||
h4 /= hs;
|
h4 /= hs;
|
||||||
int passref;
|
int passref = 0;
|
||||||
int iter;
|
int iter = 0;
|
||||||
|
|
||||||
if(iterations <= 4) {
|
if(iterations <= 4) {
|
||||||
iter = iterations - 1;
|
iter = iterations - 1;
|
||||||
@ -2631,7 +2630,7 @@ void RawImageSource::ahd_demosaic(int winx, int winy, int winw, int winh)
|
|||||||
|
|
||||||
int width = W, height = H;
|
int width = W, height = H;
|
||||||
float (*image)[4];
|
float (*image)[4];
|
||||||
int colors = 3;
|
unsigned int colors = 3;
|
||||||
|
|
||||||
const double xyz_rgb[3][3] = { /* XYZ from RGB */
|
const double xyz_rgb[3][3] = { /* XYZ from RGB */
|
||||||
{ 0.412453, 0.357580, 0.180423 },
|
{ 0.412453, 0.357580, 0.180423 },
|
||||||
@ -2661,7 +2660,7 @@ void RawImageSource::ahd_demosaic(int winx, int winy, int winw, int winh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
for (j = 0; j < colors; j++)
|
for (unsigned int j = 0; j < colors; j++)
|
||||||
for (xyz_cam[i][j] = k = 0; k < 3; k++) {
|
for (xyz_cam[i][j] = k = 0; k < 3; k++) {
|
||||||
xyz_cam[i][j] += xyz_rgb[i][k] * imatrices.rgb_cam[k][j] / d65_white[i];
|
xyz_cam[i][j] += xyz_rgb[i][k] * imatrices.rgb_cam[k][j] / d65_white[i];
|
||||||
}
|
}
|
||||||
@ -3293,12 +3292,12 @@ void RawImageSource::fill_raw( float (*cache )[3], int x0, int y0, float** rawDa
|
|||||||
|
|
||||||
void RawImageSource::fill_border( float (*cache )[3], int border, int x0, int y0)
|
void RawImageSource::fill_border( float (*cache )[3], int border, int x0, int y0)
|
||||||
{
|
{
|
||||||
unsigned row, col, y, x, f, c;
|
unsigned f;
|
||||||
float sum[8];
|
float sum[8];
|
||||||
const unsigned int colors = 3; // used in FORCC
|
constexpr unsigned int colors = 3; // used in FORCC
|
||||||
|
|
||||||
for (row = y0; row < y0 + TILESIZE + TILEBORDER && row < H; row++) {
|
for (int row = y0; row < y0 + TILESIZE + TILEBORDER && row < H; row++) {
|
||||||
for (col = x0; col < x0 + TILESIZE + TILEBORDER && col < W; col++) {
|
for (int col = x0; col < x0 + TILESIZE + TILEBORDER && col < W; col++) {
|
||||||
if (col >= border && col < W - border && row >= border && row < H - border) {
|
if (col >= border && col < W - border && row >= border && row < H - border) {
|
||||||
col = W - border;
|
col = W - border;
|
||||||
|
|
||||||
@ -3309,8 +3308,8 @@ void RawImageSource::fill_border( float (*cache )[3], int border, int x0, int y0
|
|||||||
|
|
||||||
memset(sum, 0, sizeof sum);
|
memset(sum, 0, sizeof sum);
|
||||||
|
|
||||||
for (y = row - 1; y != row + 2; y++)
|
for (int y = row - 1; y != row + 2; y++)
|
||||||
for (x = col - 1; x != col + 2; x++)
|
for (int x = col - 1; x != col + 2; x++)
|
||||||
if (y < H && y < y0 + TILESIZE + TILEBORDER && x < W && x < x0 + TILESIZE + TILEBORDER) {
|
if (y < H && y < y0 + TILESIZE + TILEBORDER && x < W && x < x0 + TILESIZE + TILEBORDER) {
|
||||||
f = fc(y, x);
|
f = fc(y, x);
|
||||||
sum[f] += cache[(y - y0 + TILEBORDER) * CACHESIZE + TILEBORDER + x - x0][f];
|
sum[f] += cache[(y - y0 + TILEBORDER) * CACHESIZE + TILEBORDER + x - x0][f];
|
||||||
@ -3361,13 +3360,13 @@ void RawImageSource::restore_from_buffer(float (*image)[3], float (*buffer)[2])
|
|||||||
void RawImageSource::dcb_hid(float (*image)[3], int x0, int y0)
|
void RawImageSource::dcb_hid(float (*image)[3], int x0, int y0)
|
||||||
{
|
{
|
||||||
const int u = CACHESIZE;
|
const int u = CACHESIZE;
|
||||||
int rowMin, colMin, rowMax, colMax, c;
|
int rowMin, colMin, rowMax, colMax;
|
||||||
dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 2);
|
dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 2);
|
||||||
|
|
||||||
// simple green bilinear in R and B pixels
|
// simple green bilinear in R and B pixels
|
||||||
for (int row = rowMin; row < rowMax; row++)
|
for (int row = rowMin; row < rowMax; row++)
|
||||||
for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col); col < colMax; col += 2, indx += 2) {
|
for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col; col < colMax; col += 2, indx += 2) {
|
||||||
assert(indx - u - 1 >= 0 && indx + u + 1 < u * u && c >= 0 && c < 3);
|
assert(indx - u - 1 >= 0 && indx + u + 1 < u * u);
|
||||||
|
|
||||||
image[indx][1] = 0.25*(image[indx-1][1]+image[indx+1][1]+image[indx-u][1]+image[indx+u][1]);
|
image[indx][1] = 0.25*(image[indx-1][1]+image[indx+1][1]+image[indx-u][1]+image[indx+u][1]);
|
||||||
}
|
}
|
||||||
@ -3418,13 +3417,13 @@ void RawImageSource::dcb_color(float (*image)[3], int x0, int y0)
|
|||||||
// green correction
|
// green correction
|
||||||
void RawImageSource::dcb_hid2(float (*image)[3], int x0, int y0)
|
void RawImageSource::dcb_hid2(float (*image)[3], int x0, int y0)
|
||||||
{
|
{
|
||||||
const int u = CACHESIZE, v = 2 * CACHESIZE;
|
const int v = 2 * CACHESIZE;
|
||||||
int rowMin, colMin, rowMax, colMax;
|
int rowMin, colMin, rowMax, colMax;
|
||||||
dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 2);
|
dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 2);
|
||||||
|
|
||||||
for (int row = rowMin; row < rowMax; row++) {
|
for (int row = rowMin; row < rowMax; row++) {
|
||||||
for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col); col < colMax; col += 2, indx += 2) {
|
for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col); col < colMax; col += 2, indx += 2) {
|
||||||
assert(indx - v >= 0 && indx + v < u * u);
|
assert(indx - v >= 0 && indx + v < CACHESIZE * CACHESIZE);
|
||||||
|
|
||||||
//Jacek comment: one multiplication less
|
//Jacek comment: one multiplication less
|
||||||
image[indx][1] = image[indx][c] +
|
image[indx][1] = image[indx][c] +
|
||||||
@ -3592,11 +3591,11 @@ void RawImageSource::dcb_correction2(float (*image)[3], uint8_t *map, int x0, in
|
|||||||
// image refinement
|
// image refinement
|
||||||
void RawImageSource::dcb_refinement(float (*image)[3], uint8_t *map, int x0, int y0)
|
void RawImageSource::dcb_refinement(float (*image)[3], uint8_t *map, int x0, int y0)
|
||||||
{
|
{
|
||||||
const int u = CACHESIZE, v = 2 * CACHESIZE, w = 3 * CACHESIZE;
|
const int u = CACHESIZE, v = 2 * CACHESIZE;
|
||||||
int rowMin, colMin, rowMax, colMax;
|
int rowMin, colMin, rowMax, colMax;
|
||||||
dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 4);
|
dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 4);
|
||||||
|
|
||||||
float f0, f1, f2, g1, h0, h1, h2, g2, current;
|
float f0, f1, f2, g1, h0, h1, h2, g2;
|
||||||
|
|
||||||
for (int row = rowMin; row < rowMax; row++)
|
for (int row = rowMin; row < rowMax; row++)
|
||||||
for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col); col < colMax; col += 2, indx += 2) {
|
for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col); col < colMax; col += 2, indx += 2) {
|
||||||
@ -3937,7 +3936,7 @@ void RawImageSource::xtransborder_interpolate (int border)
|
|||||||
{
|
{
|
||||||
const int height = H, width = W;
|
const int height = H, width = W;
|
||||||
|
|
||||||
char xtrans[6][6];
|
int xtrans[6][6];
|
||||||
ri->getXtransMatrix(xtrans);
|
ri->getXtransMatrix(xtrans);
|
||||||
|
|
||||||
for (int row = 0; row < height; row++)
|
for (int row = 0; row < height; row++)
|
||||||
@ -4001,7 +4000,7 @@ void RawImageSource::xtrans_interpolate (const int passes, const bool useCieLab)
|
|||||||
plistener->setProgress (progress);
|
plistener->setProgress (progress);
|
||||||
}
|
}
|
||||||
|
|
||||||
char xtrans[6][6];
|
int xtrans[6][6];
|
||||||
ri->getXtransMatrix(xtrans);
|
ri->getXtransMatrix(xtrans);
|
||||||
|
|
||||||
constexpr short orth[12] = { 1, 0, 0, 1, -1, 0, 0, -1, 1, 0, 0, 1 },
|
constexpr short orth[12] = { 1, 0, 0, 1, -1, 0, 0, -1, 1, 0, 0, 1 },
|
||||||
@ -4012,7 +4011,7 @@ void RawImageSource::xtrans_interpolate (const int passes, const bool useCieLab)
|
|||||||
|
|
||||||
// sgrow/sgcol is the offset in the sensor matrix of the solitary
|
// sgrow/sgcol is the offset in the sensor matrix of the solitary
|
||||||
// green pixels
|
// green pixels
|
||||||
ushort sgrow, sgcol;
|
ushort sgrow = 0, sgcol = 0;
|
||||||
|
|
||||||
const int height = H, width = W;
|
const int height = H, width = W;
|
||||||
|
|
||||||
@ -4721,17 +4720,16 @@ void RawImageSource::xtrans_interpolate (const int passes, const bool useCieLab)
|
|||||||
|
|
||||||
|
|
||||||
/* Average the most homogeneous pixels for the final result: */
|
/* Average the most homogeneous pixels for the final result: */
|
||||||
uint8_t hm[8];
|
uint8_t hm[8] = {};
|
||||||
|
|
||||||
for (int row = MIN(top, 8); row < mrow - 8; row++)
|
for (int row = MIN(top, 8); row < mrow - 8; row++)
|
||||||
for (int col = MIN(left, 8); col < mcol - 8; col++) {
|
for (int col = MIN(left, 8); col < mcol - 8; col++) {
|
||||||
int d = 0;
|
|
||||||
|
|
||||||
for (; d < 4; d++) {
|
for (int d = 0; d < 4; d++) {
|
||||||
hm[d] = homosum[d][row][col];
|
hm[d] = homosum[d][row][col];
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; d < ndir; d++) {
|
for (int d = 4; d < ndir; d++) {
|
||||||
hm[d] = homosum[d][row][col];
|
hm[d] = homosum[d][row][col];
|
||||||
|
|
||||||
if (hm[d - 4] < hm[d]) {
|
if (hm[d - 4] < hm[d]) {
|
||||||
@ -4745,7 +4743,7 @@ void RawImageSource::xtrans_interpolate (const int passes, const bool useCieLab)
|
|||||||
|
|
||||||
uint8_t maxval = homosummax[row][col];
|
uint8_t maxval = homosummax[row][col];
|
||||||
|
|
||||||
for (d = 0; d < ndir; d++)
|
for (int d = 0; d < ndir; d++)
|
||||||
if (hm[d] >= maxval) {
|
if (hm[d] >= maxval) {
|
||||||
FORC3 avg[c] += rgb[d][row][col][c];
|
FORC3 avg[c] += rgb[d][row][col][c];
|
||||||
avg[3]++;
|
avg[3]++;
|
||||||
@ -4792,7 +4790,7 @@ void RawImageSource::fast_xtrans_interpolate ()
|
|||||||
const int height = H, width = W;
|
const int height = H, width = W;
|
||||||
|
|
||||||
xtransborder_interpolate (1);
|
xtransborder_interpolate (1);
|
||||||
char xtrans[6][6];
|
int xtrans[6][6];
|
||||||
ri->getXtransMatrix(xtrans);
|
ri->getXtransMatrix(xtrans);
|
||||||
|
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
|
@ -149,7 +149,7 @@ SSEFUNCTION void ImProcFunctions :: dirpyr_equalizer(float ** src, float ** dst,
|
|||||||
level ++;
|
level ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
float **tmpHue, **tmpChr;
|
float **tmpHue = nullptr, **tmpChr = nullptr;
|
||||||
|
|
||||||
if(skinprot != 0.f) {
|
if(skinprot != 0.f) {
|
||||||
// precalculate hue and chroma, use SSE, if available
|
// precalculate hue and chroma, use SSE, if available
|
||||||
|
@ -277,7 +277,6 @@ SSEFUNCTION void RawImageSource::fast_demosaic(int winx, int winy, int winw, int
|
|||||||
int j, cc;
|
int j, cc;
|
||||||
__m128 wtuv, wtdv, wtlv, wtrv;
|
__m128 wtuv, wtdv, wtlv, wtrv;
|
||||||
__m128 greenv, tempv, absv, abs2v;
|
__m128 greenv, tempv, absv, abs2v;
|
||||||
__m128 onev = _mm_set1_ps( 1.0f );
|
|
||||||
__m128 c16v = _mm_set1_ps( 16.0f );
|
__m128 c16v = _mm_set1_ps( 16.0f );
|
||||||
__m128 fourv = _mm_set1_ps( 4.0f );
|
__m128 fourv = _mm_set1_ps( 4.0f );
|
||||||
vmask selmask;
|
vmask selmask;
|
||||||
|
@ -20,7 +20,7 @@ it under the terms of the one of three licenses as you choose:
|
|||||||
|
|
||||||
void CLASS init_fuji_compr (struct fuji_compressed_params* info)
|
void CLASS init_fuji_compr (struct fuji_compressed_params* info)
|
||||||
{
|
{
|
||||||
int cur_val, i;
|
int cur_val;
|
||||||
char *qt;
|
char *qt;
|
||||||
|
|
||||||
if ((fuji_block_width % 3 && fuji_raw_type == 16) || (fuji_block_width & 1 && fuji_raw_type == 0)) {
|
if ((fuji_block_width % 3 && fuji_raw_type == 16) || (fuji_block_width & 1 && fuji_raw_type == 0)) {
|
||||||
@ -171,7 +171,7 @@ void CLASS copy_line_to_xtrans (struct fuji_compressed_block* info, int cur_line
|
|||||||
while (row_count < 6) {
|
while (row_count < 6) {
|
||||||
pixel_count = 0;
|
pixel_count = 0;
|
||||||
|
|
||||||
while (pixel_count < cur_block_width) {
|
while (static_cast<int>(pixel_count) < cur_block_width) {
|
||||||
switch (xtrans_abs[row_count][ (pixel_count % 6)]) {
|
switch (xtrans_abs[row_count][ (pixel_count % 6)]) {
|
||||||
case 0: // red
|
case 0: // red
|
||||||
line_buf = lineBufR[row_count >> 1];
|
line_buf = lineBufR[row_count >> 1];
|
||||||
@ -182,11 +182,12 @@ void CLASS copy_line_to_xtrans (struct fuji_compressed_block* info, int cur_line
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // blue
|
case 2: // blue
|
||||||
|
default:
|
||||||
line_buf = lineBufB[row_count >> 1];
|
line_buf = lineBufB[row_count >> 1];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
index = (((pixel_count * 2 / 3) & 0x7FFFFFFE) | (pixel_count % 3) & 1) + ((pixel_count % 3) >> 1);
|
index = (((pixel_count * 2 / 3) & 0x7FFFFFFE) | ((pixel_count % 3) & 1)) + ((pixel_count % 3) >> 1);
|
||||||
raw_block_data[pixel_count] = line_buf[index];
|
raw_block_data[pixel_count] = line_buf[index];
|
||||||
|
|
||||||
++pixel_count;
|
++pixel_count;
|
||||||
@ -228,7 +229,7 @@ void CLASS copy_line_to_bayer (struct fuji_compressed_block *info, int cur_line,
|
|||||||
while (row_count < 6) {
|
while (row_count < 6) {
|
||||||
pixel_count = 0;
|
pixel_count = 0;
|
||||||
|
|
||||||
while (pixel_count < cur_block_width) {
|
while (static_cast<int>(pixel_count) < cur_block_width) {
|
||||||
switch (fuji_bayer[row_count & 1][pixel_count & 1]) {
|
switch (fuji_bayer[row_count & 1][pixel_count & 1]) {
|
||||||
case 0: // red
|
case 0: // red
|
||||||
line_buf = lineBufR[row_count >> 1];
|
line_buf = lineBufR[row_count >> 1];
|
||||||
@ -897,12 +898,11 @@ void CLASS fuji_compressed_load_raw()
|
|||||||
{
|
{
|
||||||
struct fuji_compressed_params common_info;
|
struct fuji_compressed_params common_info;
|
||||||
int cur_block;
|
int cur_block;
|
||||||
unsigned line_size, *block_sizes;
|
unsigned *block_sizes;
|
||||||
INT64 raw_offset, *raw_block_offsets;
|
INT64 raw_offset, *raw_block_offsets;
|
||||||
//struct fuji_compressed_block info;
|
//struct fuji_compressed_block info;
|
||||||
|
|
||||||
init_fuji_compr (&common_info);
|
init_fuji_compr (&common_info);
|
||||||
line_size = sizeof (ushort) * (common_info.line_width + 2);
|
|
||||||
|
|
||||||
// read block sizes
|
// read block sizes
|
||||||
block_sizes = (unsigned*) malloc (sizeof (unsigned) * fuji_total_blocks);
|
block_sizes = (unsigned*) malloc (sizeof (unsigned) * fuji_total_blocks);
|
||||||
|
@ -231,8 +231,8 @@ template<class T> void gaussHorizontal3 (T** src, T** dst, int W, int H, const f
|
|||||||
#ifdef __SSE2__
|
#ifdef __SSE2__
|
||||||
template<class T> SSEFUNCTION void gaussVertical3 (T** src, T** dst, int W, int H, const float c0, const float c1)
|
template<class T> SSEFUNCTION void gaussVertical3 (T** src, T** dst, int W, int H, const float c0, const float c1)
|
||||||
{
|
{
|
||||||
vfloat Tv, Tm1v, Tp1v;
|
vfloat Tv = F2V(0.f), Tm1v, Tp1v;
|
||||||
vfloat Tv1, Tm1v1, Tp1v1;
|
vfloat Tv1 = F2V(0.f), Tm1v1, Tp1v1;
|
||||||
vfloat c0v, c1v;
|
vfloat c0v, c1v;
|
||||||
c0v = F2V(c0);
|
c0v = F2V(c0);
|
||||||
c1v = F2V(c1);
|
c1v = F2V(c1);
|
||||||
@ -921,7 +921,7 @@ template<class T> void gaussVertical (T** src, T** dst, const int W, const int H
|
|||||||
#pragma omp for nowait
|
#pragma omp for nowait
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < W - numcols + 1; i += numcols) {
|
for (unsigned int i = 0; i < static_cast<unsigned>(std::max(0, W - numcols + 1)); i += numcols) {
|
||||||
for (int k = 0; k < numcols; k++) {
|
for (int k = 0; k < numcols; k++) {
|
||||||
temp2[0][k] = B * src[0][i + k] + b1 * src[0][i + k] + b2 * src[0][i + k] + b3 * src[0][i + k];
|
temp2[0][k] = B * src[0][i + k] + b1 * src[0][i + k] + b2 * src[0][i + k] + b3 * src[0][i + k];
|
||||||
temp2[1][k] = B * src[1][i + k] + b1 * temp2[0][k] + b2 * src[0][i + k] + b3 * src[0][i + k];
|
temp2[1][k] = B * src[1][i + k] + b1 * temp2[0][k] + b2 * src[0][i + k] + b3 * src[0][i + k];
|
||||||
|
@ -398,23 +398,20 @@ void RawImageSource :: HLRecovery_inpaint (float** red, float** green, float** b
|
|||||||
int height = H;
|
int height = H;
|
||||||
int width = W;
|
int width = W;
|
||||||
|
|
||||||
static const int range = 2;
|
constexpr int range = 2;
|
||||||
static const int pitch = 4;
|
constexpr int pitch = 4;
|
||||||
|
|
||||||
static const int numdirs = 4;
|
constexpr float threshpct = 0.25f;
|
||||||
|
constexpr float maxpct = 0.95f;
|
||||||
static const float threshpct = 0.25f;
|
constexpr float epsilon = 0.00001f;
|
||||||
static const float fixthreshpct = 0.7f;
|
|
||||||
static const float maxpct = 0.95f;
|
|
||||||
static const float epsilon = 0.00001f;
|
|
||||||
//%%%%%%%%%%%%%%%%%%%%
|
//%%%%%%%%%%%%%%%%%%%%
|
||||||
//for blend algorithm:
|
//for blend algorithm:
|
||||||
static const float blendthresh = 1.0;
|
constexpr float blendthresh = 1.0;
|
||||||
static const int ColorCount = 3;
|
constexpr int ColorCount = 3;
|
||||||
// Transform matrixes rgb>lab and back
|
// Transform matrixes rgb>lab and back
|
||||||
static const float trans[ColorCount][ColorCount] =
|
constexpr float trans[ColorCount][ColorCount] =
|
||||||
{ { 1.f, 1.f, 1.f }, { 1.7320508f, -1.7320508f, 0.f }, { -1.f, -1.f, 2.f } };
|
{ { 1.f, 1.f, 1.f }, { 1.7320508f, -1.7320508f, 0.f }, { -1.f, -1.f, 2.f } };
|
||||||
static const float itrans[ColorCount][ColorCount] =
|
constexpr float itrans[ColorCount][ColorCount] =
|
||||||
{ { 1.f, 0.8660254f, -0.5f }, { 1.f, -0.8660254f, -0.5f }, { 1.f, 0.f, 1.f } };
|
{ { 1.f, 0.8660254f, -0.5f }, { 1.f, -0.8660254f, -0.5f }, { 1.f, 0.f, 1.f } };
|
||||||
|
|
||||||
if(settings->verbose)
|
if(settings->verbose)
|
||||||
|
@ -216,9 +216,8 @@ int ImageIO::getPNGSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat,
|
|||||||
|
|
||||||
//reading PNG header
|
//reading PNG header
|
||||||
unsigned char header[8];
|
unsigned char header[8];
|
||||||
fread (header, 1, 8, file);
|
|
||||||
|
|
||||||
if (png_sig_cmp (header, 0, 8)) {
|
if (fread (header, 1, 8, file) != 8 || png_sig_cmp (header, 0, 8)) {
|
||||||
fclose(file);
|
fclose(file);
|
||||||
return IMIO_HEADERERROR;
|
return IMIO_HEADERERROR;
|
||||||
}
|
}
|
||||||
@ -295,9 +294,8 @@ int ImageIO::loadPNG (Glib::ustring fname)
|
|||||||
|
|
||||||
//reading PNG header
|
//reading PNG header
|
||||||
unsigned char header[8];
|
unsigned char header[8];
|
||||||
fread (header, 1, 8, file);
|
|
||||||
|
|
||||||
if (png_sig_cmp (header, 0, 8)) {
|
if (fread (header, 1, 8, file) != 8 || png_sig_cmp (header, 0, 8)) {
|
||||||
fclose(file);
|
fclose(file);
|
||||||
return IMIO_HEADERERROR;
|
return IMIO_HEADERERROR;
|
||||||
}
|
}
|
||||||
@ -1245,7 +1243,7 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed)
|
|||||||
|
|
||||||
// The maximum lenght is strangely not the same than for the JPEG file...
|
// The maximum lenght is strangely not the same than for the JPEG file...
|
||||||
// Which maximum length is the good one ?
|
// Which maximum length is the good one ?
|
||||||
if (size > 0 && size <= bufferSize) {
|
if (size > 0 && size <= static_cast<int>(bufferSize)) {
|
||||||
fwrite (buffer, size, 1, file);
|
fwrite (buffer, size, 1, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,6 @@ ImProcCoordinator::ImProcCoordinator ()
|
|||||||
softProof(false), gamutCheck(false), scale(10), highDetailPreprocessComputed(false), highDetailRawComputed(false),
|
softProof(false), gamutCheck(false), scale(10), highDetailPreprocessComputed(false), highDetailRawComputed(false),
|
||||||
allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN),
|
allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN),
|
||||||
|
|
||||||
ctColorCurve(),
|
|
||||||
hltonecurve(65536),
|
hltonecurve(65536),
|
||||||
shtonecurve(65536),
|
shtonecurve(65536),
|
||||||
tonecurve(65536, 0), //,1);
|
tonecurve(65536, 0), //,1);
|
||||||
@ -48,6 +47,7 @@ ImProcCoordinator::ImProcCoordinator ()
|
|||||||
satcurve(65536, 0),
|
satcurve(65536, 0),
|
||||||
lhskcurve(65536, 0),
|
lhskcurve(65536, 0),
|
||||||
clcurve(65536, 0),
|
clcurve(65536, 0),
|
||||||
|
conversionBuffer(1, 1),
|
||||||
wavclCurve(65536, 0),
|
wavclCurve(65536, 0),
|
||||||
clToningcurve(65536, 0),
|
clToningcurve(65536, 0),
|
||||||
cl2Toningcurve(65536, 0),
|
cl2Toningcurve(65536, 0),
|
||||||
@ -81,15 +81,16 @@ ImProcCoordinator::ImProcCoordinator ()
|
|||||||
rCurve(),
|
rCurve(),
|
||||||
gCurve(),
|
gCurve(),
|
||||||
bCurve(),
|
bCurve(),
|
||||||
|
ctColorCurve(),
|
||||||
rcurvehist(256), rcurvehistCropped(256), rbeforehist(256),
|
rcurvehist(256), rcurvehistCropped(256), rbeforehist(256),
|
||||||
gcurvehist(256), gcurvehistCropped(256), gbeforehist(256),
|
gcurvehist(256), gcurvehistCropped(256), gbeforehist(256),
|
||||||
bcurvehist(256), bcurvehistCropped(256), bbeforehist(256),
|
bcurvehist(256), bcurvehistCropped(256), bbeforehist(256),
|
||||||
fw(0), fh(0), tr(0),
|
fw(0), fh(0), tr(0),
|
||||||
fullw(1), fullh(1),
|
fullw(1), fullh(1),
|
||||||
pW(-1), pH(-1),
|
pW(-1), pH(-1),
|
||||||
plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), awbListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), frameCountListener(nullptr), imageTypeListener(nullptr), hListener(nullptr),
|
plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), awbListener(nullptr), frameCountListener(nullptr), imageTypeListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), hListener(nullptr),
|
||||||
resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), thread(nullptr), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false),
|
resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), thread(nullptr), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false),
|
||||||
butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1), colourToningSatLimit(0.f), colourToningSatLimitOpacity(0.f)
|
butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), wavcontlutili(false), colourToningSatLimit(0.f), colourToningSatLimitOpacity(0.f)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void ImProcCoordinator::assign (ImageSource* imgsrc)
|
void ImProcCoordinator::assign (ImageSource* imgsrc)
|
||||||
|
@ -246,9 +246,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
|||||||
//end preparate histogram
|
//end preparate histogram
|
||||||
int width = lab->W, height = lab->H;
|
int width = lab->W, height = lab->H;
|
||||||
float minQ = 10000.f;
|
float minQ = 10000.f;
|
||||||
float minM = 10000.f;
|
|
||||||
float maxQ = -1000.f;
|
float maxQ = -1000.f;
|
||||||
float maxM = -1000.f;
|
|
||||||
float w_h;
|
float w_h;
|
||||||
float a_w;
|
float a_w;
|
||||||
float c_;
|
float c_;
|
||||||
@ -256,9 +254,9 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
|||||||
double Yw;
|
double Yw;
|
||||||
Yw = 1.0;
|
Yw = 1.0;
|
||||||
double Xw, Zw;
|
double Xw, Zw;
|
||||||
double f, c, nc, yb, la, xw, yw, zw, f2, c2, nc2, yb2, la2;
|
double f, c, nc, yb = 0., la, xw, yw, zw, f2 = 0., c2 = 0., nc2 = 0., yb2 = 0., la2;
|
||||||
double fl, n, nbb, ncb, aw;
|
double fl, n, nbb, ncb, aw;
|
||||||
double xwd, ywd, zwd;
|
double xwd = 0., ywd, zwd = 0.;
|
||||||
int alg = 0;
|
int alg = 0;
|
||||||
bool algepd = false;
|
bool algepd = false;
|
||||||
float sum = 0.f;
|
float sum = 0.f;
|
||||||
@ -1199,9 +1197,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
|||||||
float t_l = static_cast<float>(params->dirpyrequalizer.hueskin.value[1]) / 100.0f;
|
float t_l = static_cast<float>(params->dirpyrequalizer.hueskin.value[1]) / 100.0f;
|
||||||
float b_r = static_cast<float>(params->dirpyrequalizer.hueskin.value[2]) / 100.0f;
|
float b_r = static_cast<float>(params->dirpyrequalizer.hueskin.value[2]) / 100.0f;
|
||||||
float t_r = static_cast<float>(params->dirpyrequalizer.hueskin.value[3]) / 100.0f;
|
float t_r = static_cast<float>(params->dirpyrequalizer.hueskin.value[3]) / 100.0f;
|
||||||
int choice = 0;
|
|
||||||
|
|
||||||
bool alread = false;
|
|
||||||
float artifact = (float) settings->artifact_cbdl;
|
float artifact = (float) settings->artifact_cbdl;
|
||||||
|
|
||||||
if(artifact > 6.f) {
|
if(artifact > 6.f) {
|
||||||
@ -1216,7 +1212,6 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
|||||||
float chrom = 50.f;
|
float chrom = 50.f;
|
||||||
{
|
{
|
||||||
ImProcFunctions::badpixcam (ncie, artifact, 5, 2 , b_l, t_l, t_r, b_r, params->dirpyrequalizer.skinprotect , chrom, hotbad); //enabled remove artifacts for cbDL
|
ImProcFunctions::badpixcam (ncie, artifact, 5, 2 , b_l, t_l, t_r, b_r, params->dirpyrequalizer.skinprotect , chrom, hotbad); //enabled remove artifacts for cbDL
|
||||||
alread = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1479,7 +1474,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
|||||||
float Yw;
|
float Yw;
|
||||||
Yw = 1.0;
|
Yw = 1.0;
|
||||||
double Xw, Zw;
|
double Xw, Zw;
|
||||||
float f, nc, yb, la, c, xw, yw, zw, f2, c2, nc2, yb2;
|
float f, nc, yb = 0.f, la, c, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2;
|
||||||
float fl, n, nbb, ncb, aw; //d
|
float fl, n, nbb, ncb, aw; //d
|
||||||
float xwd, ywd, zwd;
|
float xwd, ywd, zwd;
|
||||||
int alg = 0;
|
int alg = 0;
|
||||||
@ -1658,24 +1653,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
|||||||
// extracting datas from 'params' to avoid cache flush (to be confirmed)
|
// extracting datas from 'params' to avoid cache flush (to be confirmed)
|
||||||
const ColorAppearanceParams::eTCModeId curveMode = params->colorappearance.curveMode;
|
const ColorAppearanceParams::eTCModeId curveMode = params->colorappearance.curveMode;
|
||||||
const bool hasColCurve1 = bool(customColCurve1);
|
const bool hasColCurve1 = bool(customColCurve1);
|
||||||
bool t1L = false;
|
const bool t1L = hasColCurve1 && curveMode == ColorAppearanceParams::TC_MODE_LIGHT;
|
||||||
bool t1B = false;
|
|
||||||
|
|
||||||
if (hasColCurve1 && curveMode == ColorAppearanceParams::TC_MODE_LIGHT) {
|
|
||||||
t1L = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(hasColCurve1 && curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) {
|
|
||||||
t1B = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ColorAppearanceParams::eTCModeId curveMode2 = params->colorappearance.curveMode2;
|
const ColorAppearanceParams::eTCModeId curveMode2 = params->colorappearance.curveMode2;
|
||||||
const bool hasColCurve2 = bool(customColCurve2);
|
const bool hasColCurve2 = bool(customColCurve2);
|
||||||
bool t2B = false;
|
|
||||||
|
|
||||||
if(hasColCurve2 && curveMode2 == ColorAppearanceParams::TC_MODE_BRIGHT) {
|
|
||||||
t2B = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ColorAppearanceParams::eCTCModeId curveMode3 = params->colorappearance.curveMode3;
|
const ColorAppearanceParams::eCTCModeId curveMode3 = params->colorappearance.curveMode3;
|
||||||
const bool hasColCurve3 = bool(customColCurve3);
|
const bool hasColCurve3 = bool(customColCurve3);
|
||||||
@ -2472,10 +2453,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
|||||||
|
|
||||||
// gamut control in Lab mode; I must study how to do with cIECAM only
|
// gamut control in Lab mode; I must study how to do with cIECAM only
|
||||||
if(gamu == 1) {
|
if(gamu == 1) {
|
||||||
float HH, Lprov1, Chprov1;
|
float Lprov1, Chprov1;
|
||||||
Lprov1 = Ll / 327.68f;
|
Lprov1 = Ll / 327.68f;
|
||||||
Chprov1 = sqrtf(SQR(aa) + SQR(bb)) / 327.68f;
|
Chprov1 = sqrtf(SQR(aa) + SQR(bb)) / 327.68f;
|
||||||
HH = xatan2f(bb, aa);
|
|
||||||
float2 sincosval;
|
float2 sincosval;
|
||||||
|
|
||||||
if(Chprov1 == 0.0f) {
|
if(Chprov1 == 0.0f) {
|
||||||
@ -2953,9 +2933,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
BENCHFUN
|
BENCHFUN
|
||||||
Imagefloat *tmpImage = nullptr;
|
Imagefloat *tmpImage = nullptr;
|
||||||
|
|
||||||
// NOTE: We're getting all 3 pointers here, but this function may not need them all, so one could optimize this
|
|
||||||
Imagefloat* editImgFloat = nullptr;
|
Imagefloat* editImgFloat = nullptr;
|
||||||
LabImage* editLab = nullptr;
|
|
||||||
PlanarWhateverData<float>* editWhatever = nullptr;
|
PlanarWhateverData<float>* editWhatever = nullptr;
|
||||||
EditUniqueID editID = pipetteBuffer ? pipetteBuffer->getEditID() : EUID_None;
|
EditUniqueID editID = pipetteBuffer ? pipetteBuffer->getEditID() : EUID_None;
|
||||||
|
|
||||||
@ -2966,7 +2944,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case (BT_LABIMAGE):
|
case (BT_LABIMAGE):
|
||||||
editLab = pipetteBuffer->getLabBuffer();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (BT_SINGLEPLANE_FLOAT):
|
case (BT_SINGLEPLANE_FLOAT):
|
||||||
@ -2975,7 +2952,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int h_th, s_th;
|
int h_th = 0, s_th = 0;
|
||||||
|
|
||||||
if (shmap) {
|
if (shmap) {
|
||||||
h_th = shmap->max_f - params->sh.htonalwidth * (shmap->max_f - shmap->avg) / 100;
|
h_th = shmap->max_f - params->sh.htonalwidth * (shmap->max_f - shmap->avg) / 100;
|
||||||
@ -3030,10 +3007,10 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
params->chmixer.green[0] != 0 || params->chmixer.green[1] != 100 || params->chmixer.green[2] != 0 ||
|
params->chmixer.green[0] != 0 || params->chmixer.green[1] != 100 || params->chmixer.green[2] != 0 ||
|
||||||
params->chmixer.blue[0] != 0 || params->chmixer.blue[1] != 0 || params->chmixer.blue[2] != 100);
|
params->chmixer.blue[0] != 0 || params->chmixer.blue[1] != 0 || params->chmixer.blue[2] != 100);
|
||||||
|
|
||||||
FlatCurve* hCurve;
|
FlatCurve* hCurve = nullptr;
|
||||||
FlatCurve* sCurve;
|
FlatCurve* sCurve = nullptr;
|
||||||
FlatCurve* vCurve;
|
FlatCurve* vCurve = nullptr;
|
||||||
FlatCurve* bwlCurve;
|
FlatCurve* bwlCurve = nullptr;
|
||||||
|
|
||||||
FlatCurveType hCurveType = (FlatCurveType)params->hsvequalizer.hcurve.at(0);
|
FlatCurveType hCurveType = (FlatCurveType)params->hsvequalizer.hcurve.at(0);
|
||||||
FlatCurveType sCurveType = (FlatCurveType)params->hsvequalizer.scurve.at(0);
|
FlatCurveType sCurveType = (FlatCurveType)params->hsvequalizer.scurve.at(0);
|
||||||
@ -3087,7 +3064,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
|
|
||||||
std::shared_ptr<HaldCLUT> hald_clut;
|
std::shared_ptr<HaldCLUT> hald_clut;
|
||||||
bool clutAndWorkingProfilesAreSame = false;
|
bool clutAndWorkingProfilesAreSame = false;
|
||||||
TMatrix xyz2clut, clut2xyz;
|
TMatrix xyz2clut = {}, clut2xyz = {};
|
||||||
#ifdef __SSE2__
|
#ifdef __SSE2__
|
||||||
vfloat v_work2xyz[3][3] ALIGNED16;
|
vfloat v_work2xyz[3][3] ALIGNED16;
|
||||||
vfloat v_xyz2clut[3][3] ALIGNED16;
|
vfloat v_xyz2clut[3][3] ALIGNED16;
|
||||||
@ -3274,12 +3251,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
tmpImage = new Imagefloat(working->getWidth(), working->getHeight());
|
tmpImage = new Imagefloat(working->getWidth(), working->getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
int W = working->getWidth();
|
|
||||||
int H = working->getHeight();
|
|
||||||
|
|
||||||
// For tonecurve histogram
|
// For tonecurve histogram
|
||||||
int toneCurveHistSize = histToneCurve ? histToneCurve.getSize() : 0;
|
int toneCurveHistSize = histToneCurve ? histToneCurve.getSize() : 0;
|
||||||
int histToneCurveCompression;
|
int histToneCurveCompression = 0;
|
||||||
|
|
||||||
if(toneCurveHistSize > 0) {
|
if(toneCurveHistSize > 0) {
|
||||||
histToneCurve.clear();
|
histToneCurve.clear();
|
||||||
@ -3310,7 +3284,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
int tH;
|
int tH;
|
||||||
|
|
||||||
// Allocating buffer for the PipetteBuffer
|
// Allocating buffer for the PipetteBuffer
|
||||||
float *editIFloatTmpR, *editIFloatTmpG, *editIFloatTmpB, *editWhateverTmp;
|
float *editIFloatTmpR = nullptr, *editIFloatTmpG = nullptr, *editIFloatTmpB = nullptr, *editWhateverTmp = nullptr;
|
||||||
|
|
||||||
if (editImgFloat) {
|
if (editImgFloat) {
|
||||||
editIFloatBuffer = (char *) malloc(3 * sizeof(float) * TS * TS + 20 * 64 + 63);
|
editIFloatBuffer = (char *) malloc(3 * sizeof(float) * TS * TS + 20 * 64 + 63);
|
||||||
@ -3952,7 +3926,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
else if (params->colorToning.method == "Lab" && opautili) {
|
else if (params->colorToning.method == "Lab" && opautili) {
|
||||||
int algm = 0;
|
int algm = 0;
|
||||||
bool twocol = true;//true=500 color false=2 color
|
bool twocol = true;//true=500 color false=2 color
|
||||||
int metchrom;
|
int metchrom = 0;
|
||||||
|
|
||||||
if (params->colorToning.twocolor == "Std" ) {
|
if (params->colorToning.twocolor == "Std" ) {
|
||||||
metchrom = 0;
|
metchrom = 0;
|
||||||
@ -3968,7 +3942,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
twocol = false;
|
twocol = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
float iplow, iphigh;
|
float iplow = 0.f, iphigh = 0.f;
|
||||||
|
|
||||||
if(!twocol) {
|
if(!twocol) {
|
||||||
iplow = (float)ctColorCurve.low;
|
iplow = (float)ctColorCurve.low;
|
||||||
@ -4660,7 +4634,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
else if (params->colorToning.method == "Lab" && opautili) {
|
else if (params->colorToning.method == "Lab" && opautili) {
|
||||||
int algm = 0;
|
int algm = 0;
|
||||||
bool twocol = true;
|
bool twocol = true;
|
||||||
int metchrom;
|
int metchrom = 0;
|
||||||
|
|
||||||
if (params->colorToning.twocolor == "Std" ) {
|
if (params->colorToning.twocolor == "Std" ) {
|
||||||
metchrom = 0;
|
metchrom = 0;
|
||||||
@ -4676,7 +4650,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
|||||||
twocol = false;
|
twocol = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
float iplow, iphigh;
|
float iplow = 0.f, iphigh = 0.f;
|
||||||
|
|
||||||
if(!twocol) {
|
if(!twocol) {
|
||||||
iplow = (float)ctColorCurve.low;
|
iplow = (float)ctColorCurve.low;
|
||||||
@ -5205,8 +5179,6 @@ void ImProcFunctions::toning2col (float r, float g, float b, float &ro, float &g
|
|||||||
Color::rgb2hsv(r, g, b, h, s, v);
|
Color::rgb2hsv(r, g, b, h, s, v);
|
||||||
float ksat = 1.f;
|
float ksat = 1.f;
|
||||||
float ksatlow = 1.f;
|
float ksatlow = 1.f;
|
||||||
float s_0 = 0.55f;
|
|
||||||
float s_1 = 0.85f;
|
|
||||||
/*
|
/*
|
||||||
if(mode==0) {//color
|
if(mode==0) {//color
|
||||||
if(s < s_0) ksat=SQR((1.f/s_0)*s);
|
if(s < s_0) ksat=SQR((1.f/s_0)*s);
|
||||||
@ -5223,7 +5195,7 @@ void ImProcFunctions::toning2col (float r, float g, float b, float &ro, float &g
|
|||||||
float aa, bb, cc;
|
float aa, bb, cc;
|
||||||
//fixed value of reducac =0.4;
|
//fixed value of reducac =0.4;
|
||||||
secondeg_end (reducac, iplow, aa, bb, cc);
|
secondeg_end (reducac, iplow, aa, bb, cc);
|
||||||
float aab, bbb, ccb;
|
float aab, bbb;
|
||||||
|
|
||||||
secondeg_begin (0.7f, iplow, aab, bbb);
|
secondeg_begin (0.7f, iplow, aab, bbb);
|
||||||
|
|
||||||
@ -5458,9 +5430,6 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu
|
|||||||
// lhskcurve.dump("lh_curve");
|
// lhskcurve.dump("lh_curve");
|
||||||
//init Flatcurve for C=f(H)
|
//init Flatcurve for C=f(H)
|
||||||
|
|
||||||
// NOTE: We're getting all 3 pointers here, but this function may not need them all, so one could optimize this
|
|
||||||
Imagefloat* editImgFloat = nullptr;
|
|
||||||
LabImage* editLab = nullptr;
|
|
||||||
PlanarWhateverData<float>* editWhatever = nullptr;
|
PlanarWhateverData<float>* editWhatever = nullptr;
|
||||||
EditUniqueID editID = EUID_None;
|
EditUniqueID editID = EUID_None;
|
||||||
bool editPipette = false;
|
bool editPipette = false;
|
||||||
@ -5473,11 +5442,9 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu
|
|||||||
|
|
||||||
switch (pipetteBuffer->getDataProvider()->getCurrSubscriber()->getPipetteBufferType()) {
|
switch (pipetteBuffer->getDataProvider()->getCurrSubscriber()->getPipetteBufferType()) {
|
||||||
case (BT_IMAGEFLOAT):
|
case (BT_IMAGEFLOAT):
|
||||||
editImgFloat = pipetteBuffer->getImgFloatBuffer();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (BT_LABIMAGE):
|
case (BT_LABIMAGE):
|
||||||
editLab = pipetteBuffer->getLabBuffer();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (BT_SINGLEPLANE_FLOAT):
|
case (BT_SINGLEPLANE_FLOAT):
|
||||||
@ -6404,7 +6371,6 @@ void ImProcFunctions::EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w
|
|||||||
float sca = params->epd.scale;
|
float sca = params->epd.scale;
|
||||||
float gamm = params->epd.gamma;
|
float gamm = params->epd.gamma;
|
||||||
float rew = params->epd.reweightingIterates;
|
float rew = params->epd.reweightingIterates;
|
||||||
unsigned int i, N = Wid * Hei;
|
|
||||||
float Qpro = ( 4.0 / c_) * ( a_w + 4.0 ) ; //estimate Q max if J=100.0
|
float Qpro = ( 4.0 / c_) * ( a_w + 4.0 ) ; //estimate Q max if J=100.0
|
||||||
float *Qpr = ncie->Q_p[0];
|
float *Qpr = ncie->Q_p[0];
|
||||||
|
|
||||||
@ -6519,7 +6485,7 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip)
|
|||||||
float *L = lab->L[0];
|
float *L = lab->L[0];
|
||||||
float *a = lab->a[0];
|
float *a = lab->a[0];
|
||||||
float *b = lab->b[0];
|
float *b = lab->b[0];
|
||||||
unsigned int i, N = lab->W * lab->H;
|
size_t N = lab->W * lab->H;
|
||||||
EdgePreservingDecomposition epd(lab->W, lab->H);
|
EdgePreservingDecomposition epd(lab->W, lab->H);
|
||||||
|
|
||||||
//Due to the taking of logarithms, L must be nonnegative. Further, scale to 0 to 1 using nominal range of L, 0 to 15 bit.
|
//Due to the taking of logarithms, L must be nonnegative. Further, scale to 0 to 1 using nominal range of L, 0 to 15 bit.
|
||||||
@ -6531,7 +6497,7 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip)
|
|||||||
float lmaxL = 0.f;
|
float lmaxL = 0.f;
|
||||||
#pragma omp for
|
#pragma omp for
|
||||||
|
|
||||||
for(i = 0; i < N; i++) {
|
for(size_t i = 0; i < N; i++) {
|
||||||
if(L[i] < lminL) {
|
if(L[i] < lminL) {
|
||||||
lminL = L[i];
|
lminL = L[i];
|
||||||
}
|
}
|
||||||
@ -6542,7 +6508,7 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#pragma omp critical
|
#pragma omp critical
|
||||||
|
{
|
||||||
if(lminL < minL) {
|
if(lminL < minL) {
|
||||||
minL = lminL;
|
minL = lminL;
|
||||||
}
|
}
|
||||||
@ -6550,7 +6516,7 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip)
|
|||||||
if(lmaxL > maxL) {
|
if(lmaxL > maxL) {
|
||||||
maxL = lmaxL;
|
maxL = lmaxL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(minL > 0.0f) {
|
if(minL > 0.0f) {
|
||||||
@ -6559,7 +6525,7 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip)
|
|||||||
|
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
|
|
||||||
for(i = 0; i < N; i++)
|
for(size_t i = 0; i < N; ++i)
|
||||||
//{L[i] = (L[i] - minL)/32767.0f;
|
//{L[i] = (L[i] - minL)/32767.0f;
|
||||||
{
|
{
|
||||||
L[i] = (L[i] - minL) / maxL;
|
L[i] = (L[i] - minL) / maxL;
|
||||||
@ -6594,7 +6560,7 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip)
|
|||||||
#pragma omp parallel for // removed schedule(dynamic,10)
|
#pragma omp parallel for // removed schedule(dynamic,10)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for(int ii = 0; ii < N; ii++) {
|
for(size_t ii = 0; ii < N; ++ii) {
|
||||||
a[ii] *= s;
|
a[ii] *= s;
|
||||||
b[ii] *= s;
|
b[ii] *= s;
|
||||||
L[ii] = L[ii] * maxL * (1.f / gamm) + minL;
|
L[ii] = L[ii] * maxL * (1.f / gamm) + minL;
|
||||||
@ -6730,7 +6696,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double
|
|||||||
|
|
||||||
|
|
||||||
// compute clipping points based on the original histograms (linear, without exp comp.)
|
// compute clipping points based on the original histograms (linear, without exp comp.)
|
||||||
int clipped = 0;
|
unsigned int clipped = 0;
|
||||||
int rawmax = (imax) - 1;
|
int rawmax = (imax) - 1;
|
||||||
|
|
||||||
while (histogram[rawmax] + clipped <= 0 && rawmax > 1) {
|
while (histogram[rawmax] + clipped <= 0 && rawmax > 1) {
|
||||||
@ -6739,17 +6705,15 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double
|
|||||||
}
|
}
|
||||||
|
|
||||||
//compute clipped white point
|
//compute clipped white point
|
||||||
int clippable = (int)(sum * clip / 100.f );
|
unsigned int clippable = (int)(sum * clip / 100.f );
|
||||||
int somm = sum;
|
|
||||||
clipped = 0;
|
clipped = 0;
|
||||||
int whiteclip = (imax) - 1;
|
int whiteclip = (imax) - 1;
|
||||||
|
|
||||||
while (whiteclip > 1 && histogram[whiteclip] + clipped <= clippable) {
|
while (whiteclip > 1 && (histogram[whiteclip] + clipped) <= clippable) {
|
||||||
clipped += histogram[whiteclip];
|
clipped += histogram[whiteclip];
|
||||||
whiteclip--;
|
whiteclip--;
|
||||||
}
|
}
|
||||||
|
|
||||||
int clipwh = clipped;
|
|
||||||
//compute clipped black point
|
//compute clipped black point
|
||||||
clipped = 0;
|
clipped = 0;
|
||||||
int shc = 0;
|
int shc = 0;
|
||||||
@ -6759,8 +6723,6 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double
|
|||||||
shc++;
|
shc++;
|
||||||
}
|
}
|
||||||
|
|
||||||
int clipbl = clipped;
|
|
||||||
|
|
||||||
//rescale to 65535 max
|
//rescale to 65535 max
|
||||||
rawmax <<= histcompr;
|
rawmax <<= histcompr;
|
||||||
whiteclip <<= histcompr;
|
whiteclip <<= histcompr;
|
||||||
@ -6776,7 +6738,6 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double
|
|||||||
//compute exposure compensation as geometric mean of the amount that
|
//compute exposure compensation as geometric mean of the amount that
|
||||||
//sets the mean or median at middle gray, and the amount that sets the estimated top
|
//sets the mean or median at middle gray, and the amount that sets the estimated top
|
||||||
//of the histogram at or near clipping.
|
//of the histogram at or near clipping.
|
||||||
float expo = log(midgray * scale / (ave - shc + midgray * shc));
|
|
||||||
//float expcomp1 = (log(/*(median/ave)*//*(hidev/lodev)*/midgray*scale/(ave-shc+midgray*shc))+log((hidev/lodev)))/log(2.f);
|
//float expcomp1 = (log(/*(median/ave)*//*(hidev/lodev)*/midgray*scale/(ave-shc+midgray*shc))+log((hidev/lodev)))/log(2.f);
|
||||||
float expcomp1 = (log(/*(median/ave)*//*(hidev/lodev)*/midgray * scale / (ave - shc + midgray * shc))) / log(2.f);
|
float expcomp1 = (log(/*(median/ave)*//*(hidev/lodev)*/midgray * scale / (ave - shc + midgray * shc))) / log(2.f);
|
||||||
float expcomp2;
|
float expcomp2;
|
||||||
|
@ -82,7 +82,6 @@ SSEFUNCTION void ImProcFunctions::impulse_nr (LabImage* lab, double thresh)
|
|||||||
#ifdef __SSE2__
|
#ifdef __SSE2__
|
||||||
vfloat hfnbravev, hpfabsv;
|
vfloat hfnbravev, hpfabsv;
|
||||||
vfloat impthrDiv24v = F2V( impthrDiv24 );
|
vfloat impthrDiv24v = F2V( impthrDiv24 );
|
||||||
vfloat onev = F2V( 1.0f );
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp for
|
#pragma omp for
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
# include <iostream>
|
# include <iostream>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float varx;
|
float varx = 0.f;
|
||||||
float limdx, ilimdx;
|
float limdx, ilimdx;
|
||||||
|
|
||||||
if(gradvart != 0) {
|
if(gradvart != 0) {
|
||||||
@ -345,7 +345,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
|
|||||||
src[i] = &srcBuffer[i * W_L];
|
src[i] = &srcBuffer[i * W_L];
|
||||||
}
|
}
|
||||||
|
|
||||||
int h_th, s_th;
|
int h_th = 0, s_th = 0;
|
||||||
|
|
||||||
int shHighlights = deh.highlights;
|
int shHighlights = deh.highlights;
|
||||||
int shShadows = deh.shadows;
|
int shShadows = deh.shadows;
|
||||||
|
@ -934,7 +934,7 @@ void ImProcFunctions::sharpeningcam (CieImage* ncie, float** b2)
|
|||||||
// Rest is UNSHARP MASK
|
// Rest is UNSHARP MASK
|
||||||
|
|
||||||
int W = ncie->W, H = ncie->H;
|
int W = ncie->W, H = ncie->H;
|
||||||
float** b3;
|
float** b3 = nullptr;
|
||||||
|
|
||||||
if (params->sharpening.edgesonly) {
|
if (params->sharpening.edgesonly) {
|
||||||
b3 = new float*[H];
|
b3 = new float*[H];
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "rt_math.h"
|
#include "rt_math.h"
|
||||||
#include "sleef.c"
|
#include "sleef.c"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
@ -447,7 +448,6 @@ static float calcGradientFactor(const struct grad_params& gp, int x, int y)
|
|||||||
{
|
{
|
||||||
if (gp.angle_is_zero) {
|
if (gp.angle_is_zero) {
|
||||||
int gy = gp.transpose ? x : y;
|
int gy = gp.transpose ? x : y;
|
||||||
int gx = gp.transpose ? y : x;
|
|
||||||
|
|
||||||
if (gy < gp.top_edge_0) {
|
if (gy < gp.top_edge_0) {
|
||||||
return gp.topmul;
|
return gp.topmul;
|
||||||
@ -805,7 +805,7 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr
|
|||||||
x_d = ascale * (x_d + cx - w2); // centering x coord & scale
|
x_d = ascale * (x_d + cx - w2); // centering x coord & scale
|
||||||
y_d = ascale * (y_d + cy - h2); // centering y coord & scale
|
y_d = ascale * (y_d + cy - h2); // centering y coord & scale
|
||||||
|
|
||||||
double vig_x_d, vig_y_d;
|
double vig_x_d = 0., vig_y_d = 0.;
|
||||||
|
|
||||||
if (needsVignetting()) {
|
if (needsVignetting()) {
|
||||||
vig_x_d = ascale * (x + cx - vig_w2); // centering x coord & scale
|
vig_x_d = ascale * (x + cx - vig_w2); // centering x coord & scale
|
||||||
@ -834,7 +834,7 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr
|
|||||||
s = 1.0 - distAmount + distAmount * r ;
|
s = 1.0 - distAmount + distAmount * r ;
|
||||||
}
|
}
|
||||||
|
|
||||||
double r2;
|
double r2 = 0.;
|
||||||
|
|
||||||
if (needsVignetting()) {
|
if (needsVignetting()) {
|
||||||
double vig_Dx = vig_x_d * cost - vig_y_d * sint;
|
double vig_Dx = vig_x_d * cost - vig_y_d * sint;
|
||||||
@ -982,7 +982,7 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf
|
|||||||
y_d = ascale * (y_d + cy - h2); // centering y coord & scale
|
y_d = ascale * (y_d + cy - h2); // centering y coord & scale
|
||||||
x_d = ascale * (x_d + cx - w2); // centering x coord & scale
|
x_d = ascale * (x_d + cx - w2); // centering x coord & scale
|
||||||
|
|
||||||
double vig_x_d, vig_y_d;
|
double vig_x_d = 0., vig_y_d = 0.;
|
||||||
|
|
||||||
if (needsVignetting()) {
|
if (needsVignetting()) {
|
||||||
vig_x_d = ascale * (x + cx - vig_w2); // centering x coord & scale
|
vig_x_d = ascale * (x + cx - vig_w2); // centering x coord & scale
|
||||||
@ -1013,7 +1013,7 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf
|
|||||||
Dy *= s;
|
Dy *= s;
|
||||||
}
|
}
|
||||||
|
|
||||||
double r2;
|
double r2 = 0.;
|
||||||
|
|
||||||
if (needsVignetting()) {
|
if (needsVignetting()) {
|
||||||
double vig_Dx = vig_x_d * cost - vig_y_d * sint;
|
double vig_Dx = vig_x_d * cost - vig_y_d * sint;
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
@ -534,7 +535,7 @@ void ImProcFunctions::vibrance (LabImage* lab)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float chmodpastel, chmodsat;
|
float chmodpastel = 0.f, chmodsat = 0.f;
|
||||||
// variables to improve transitions
|
// variables to improve transitions
|
||||||
float pa, pb;// transition = pa*saturation + pb
|
float pa, pb;// transition = pa*saturation + pb
|
||||||
float chl00 = chromaPastel * satredu * sathue[4];
|
float chl00 = chromaPastel * satredu * sathue[4];
|
||||||
|
@ -250,7 +250,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int
|
|||||||
cp.edgampl = (float) params->wavelet.edgeampli;
|
cp.edgampl = (float) params->wavelet.edgeampli;
|
||||||
}
|
}
|
||||||
|
|
||||||
int N = imheight * imwidth;
|
//int N = imheight * imwidth;
|
||||||
int maxmul = params->wavelet.thres;
|
int maxmul = params->wavelet.thres;
|
||||||
cp.maxilev = maxmul;
|
cp.maxilev = maxmul;
|
||||||
static const float scales[10] = {1.f, 2.f, 4.f, 8.f, 16.f, 32.f, 64.f, 128.f, 256.f, 512.f};
|
static const float scales[10] = {1.f, 2.f, 4.f, 8.f, 16.f, 32.f, 64.f, 128.f, 256.f, 512.f};
|
||||||
@ -699,7 +699,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int
|
|||||||
int width = tileright - tileleft;
|
int width = tileright - tileleft;
|
||||||
int height = tilebottom - tiletop;
|
int height = tilebottom - tiletop;
|
||||||
LabImage * labco;
|
LabImage * labco;
|
||||||
float **Lold;
|
float **Lold = nullptr;
|
||||||
float *LoldBuffer = nullptr;
|
float *LoldBuffer = nullptr;
|
||||||
|
|
||||||
if(numtiles == 1) { // untiled processing => we can use output buffer for labco
|
if(numtiles == 1) { // untiled processing => we can use output buffer for labco
|
||||||
@ -2597,7 +2597,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit
|
|||||||
float bedstr = 1.f - 10.f * aedstr;
|
float bedstr = 1.f - 10.f * aedstr;
|
||||||
|
|
||||||
if(cp.val > 0 && cp.edgeena) {
|
if(cp.val > 0 && cp.edgeena) {
|
||||||
float * koe;
|
float * koe = nullptr;
|
||||||
float maxkoe = 0.f;
|
float maxkoe = 0.f;
|
||||||
|
|
||||||
if(!lipschitz) {
|
if(!lipschitz) {
|
||||||
@ -2766,7 +2766,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit
|
|||||||
float asig = 0.166f / sigma[level];
|
float asig = 0.166f / sigma[level];
|
||||||
float bsig = 0.5f - asig * mean[level];
|
float bsig = 0.5f - asig * mean[level];
|
||||||
float amean = 0.5f / mean[level];
|
float amean = 0.5f / mean[level];
|
||||||
float absciss;
|
float absciss = 0.f;
|
||||||
float kinterm;
|
float kinterm;
|
||||||
float kmul;
|
float kmul;
|
||||||
int borderL = 1;
|
int borderL = 1;
|
||||||
|
@ -640,31 +640,31 @@ static void _am_getGradientWinAffine(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
///*********************************************************************
|
||||||
* _computeAffineMappedImage
|
// * _computeAffineMappedImage
|
||||||
* used only for DEBUG output
|
// * used only for DEBUG output
|
||||||
*
|
// *
|
||||||
*/
|
//*/
|
||||||
|
//
|
||||||
static void _am_computeAffineMappedImage(
|
//static void _am_computeAffineMappedImage(
|
||||||
_KLT_FloatImage img, /* images */
|
// _KLT_FloatImage img, /* images */
|
||||||
float x, float y, /* center of window */
|
// float x, float y, /* center of window */
|
||||||
float Axx, float Ayx , float Axy, float Ayy, /* affine mapping */
|
// float Axx, float Ayx , float Axy, float Ayy, /* affine mapping */
|
||||||
int width, int height, /* size of window */
|
// int width, int height, /* size of window */
|
||||||
_FloatWindow imgdiff) /* output */
|
// _FloatWindow imgdiff) /* output */
|
||||||
{
|
//{
|
||||||
int hw = width/2, hh = height/2;
|
// int hw = width/2, hh = height/2;
|
||||||
int i, j;
|
// int i, j;
|
||||||
float mi, mj;
|
// float mi, mj;
|
||||||
|
//
|
||||||
/* Compute values */
|
// /* Compute values */
|
||||||
for (j = -hh ; j <= hh ; j++)
|
// for (j = -hh ; j <= hh ; j++)
|
||||||
for (i = -hw ; i <= hw ; i++) {
|
// for (i = -hw ; i <= hw ; i++) {
|
||||||
mi = Axx * i + Axy * j;
|
// mi = Axx * i + Axy * j;
|
||||||
mj = Ayx * i + Ayy * j;
|
// mj = Ayx * i + Ayy * j;
|
||||||
*imgdiff++ = _interpolate(x+mi, y+mj, img);
|
// *imgdiff++ = _interpolate(x+mi, y+mj, img);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
@ -986,7 +986,7 @@ static int _am_trackFeatureAffine(
|
|||||||
|
|
||||||
|
|
||||||
_FloatWindow imgdiff, gradx, grady;
|
_FloatWindow imgdiff, gradx, grady;
|
||||||
float gxx, gxy, gyy, ex, ey, dx, dy;
|
float gxx, gxy, gyy, ex, ey, dx = 0.f, dy = 0.f;
|
||||||
int iteration = 0;
|
int iteration = 0;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
int hw = width/2;
|
int hw = width/2;
|
||||||
@ -1253,7 +1253,7 @@ void KLTTrackFeatures(
|
|||||||
pyramid2, pyramid2_gradx, pyramid2_grady;
|
pyramid2, pyramid2_gradx, pyramid2_grady;
|
||||||
float subsampling = (float) tc->subsampling;
|
float subsampling = (float) tc->subsampling;
|
||||||
float xloc, yloc, xlocout, ylocout;
|
float xloc, yloc, xlocout, ylocout;
|
||||||
int val;
|
int val = 0;
|
||||||
int indx, r;
|
int indx, r;
|
||||||
KLT_BOOL floatimg1_created = FALSE;
|
KLT_BOOL floatimg1_created = FALSE;
|
||||||
int i;
|
int i;
|
||||||
|
@ -866,7 +866,6 @@ Glib::ustring LCPStore::getDefaultCommonDirectory() const
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
WCHAR pathW[MAX_PATH] = {0};
|
WCHAR pathW[MAX_PATH] = {0};
|
||||||
char pathA[MAX_PATH];
|
|
||||||
|
|
||||||
if (SHGetSpecialFolderPathW(NULL, pathW, CSIDL_COMMON_APPDATA, false)) {
|
if (SHGetSpecialFolderPathW(NULL, pathW, CSIDL_COMMON_APPDATA, false)) {
|
||||||
char pathA[MAX_PATH];
|
char pathA[MAX_PATH];
|
||||||
|
@ -364,7 +364,7 @@ int fscanf (IMFILE* f, const char* s ...)
|
|||||||
char buf[50], *endptr = nullptr;
|
char buf[50], *endptr = nullptr;
|
||||||
int copy_sz = f->size - f->pos;
|
int copy_sz = f->size - f->pos;
|
||||||
|
|
||||||
if (copy_sz > sizeof(buf)) {
|
if (copy_sz > static_cast<int>(sizeof(buf))) {
|
||||||
copy_sz = sizeof(buf) - 1;
|
copy_sz = sizeof(buf) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,8 +68,11 @@ inline void fseek (IMFILE* f, int p, int how)
|
|||||||
} else if (how == SEEK_CUR) {
|
} else if (how == SEEK_CUR) {
|
||||||
f->pos += p;
|
f->pos += p;
|
||||||
} else if (how == SEEK_END) {
|
} else if (how == SEEK_END) {
|
||||||
|
if(p <= 0 && -p <= f->size) {
|
||||||
f->pos = f->size + p;
|
f->pos = f->size + p;
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (f->pos < 0 || f->pos > f->size) {
|
if (f->pos < 0 || f->pos > f->size) {
|
||||||
f->pos = fpos;
|
f->pos = fpos;
|
||||||
|
@ -71,9 +71,7 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext
|
|||||||
int w, h;
|
int w, h;
|
||||||
double scale = 1.;
|
double scale = 1.;
|
||||||
|
|
||||||
if (tpp) {
|
|
||||||
tpp->getDimensions(w, h, scale);
|
tpp->getDimensions(w, h, scale);
|
||||||
}
|
|
||||||
|
|
||||||
previewImage = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24, w, h);
|
previewImage = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24, w, h);
|
||||||
previewImage->flush();
|
previewImage->flush();
|
||||||
@ -141,7 +139,7 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext
|
|||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
int w, h;
|
int w, h;
|
||||||
double scale = 1.;
|
// double scale = 1.;
|
||||||
w = output->getWidth();
|
w = output->getWidth();
|
||||||
h = output->getHeight();
|
h = output->getHeight();
|
||||||
previewImage = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24, w, h);
|
previewImage = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24, w, h);
|
||||||
|
@ -442,7 +442,7 @@ int RawImage::loadRaw (bool loadData, unsigned int imageNum, bool closeFile, Pro
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!strcmp(make,"Fujifilm") && raw_height * raw_width * 2 != raw_size) {
|
if(!strcmp(make,"Fujifilm") && raw_height * raw_width * 2u != raw_size) {
|
||||||
parse_fuji_compressed_header();
|
parse_fuji_compressed_header();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -779,7 +779,7 @@ RawImage::is_ppmThumb() const
|
|||||||
!thumb_load_raw );
|
!thumb_load_raw );
|
||||||
}
|
}
|
||||||
|
|
||||||
void RawImage::getXtransMatrix( char XtransMatrix[6][6])
|
void RawImage::getXtransMatrix( int XtransMatrix[6][6])
|
||||||
{
|
{
|
||||||
for(int row = 0; row < 6; row++)
|
for(int row = 0; row < 6; row++)
|
||||||
for(int col = 0; col < 6; col++) {
|
for(int col = 0; col < 6; col++) {
|
||||||
|
@ -180,7 +180,7 @@ public:
|
|||||||
eSensorType getSensorType();
|
eSensorType getSensorType();
|
||||||
|
|
||||||
void getRgbCam (float rgbcam[3][4]);
|
void getRgbCam (float rgbcam[3][4]);
|
||||||
void getXtransMatrix ( char xtransMatrix[6][6]);
|
void getXtransMatrix ( int xtransMatrix[6][6]);
|
||||||
void clearXtransCblack( )
|
void clearXtransCblack( )
|
||||||
{
|
{
|
||||||
for(int c = 0; c < 4; c++) {
|
for(int c = 0; c < 4; c++) {
|
||||||
|
@ -425,25 +425,6 @@ RawImageSource::RawImageSource ()
|
|||||||
: ImageSource()
|
: ImageSource()
|
||||||
, W(0), H(0)
|
, W(0), H(0)
|
||||||
, plistener(nullptr)
|
, plistener(nullptr)
|
||||||
, border(4)
|
|
||||||
, ri(nullptr)
|
|
||||||
, cache(nullptr)
|
|
||||||
, rawData(0, 0)
|
|
||||||
, green(0, 0)
|
|
||||||
, red(0, 0)
|
|
||||||
, blue(0, 0)
|
|
||||||
, lc00(0.0)
|
|
||||||
, lc01(0.0)
|
|
||||||
, lc02(0.0)
|
|
||||||
, lc10(0.0)
|
|
||||||
, lc11(0.0)
|
|
||||||
, lc12(0.0)
|
|
||||||
, lc20(0.0)
|
|
||||||
, lc21(0.0)
|
|
||||||
, lc22(0.0)
|
|
||||||
, hlmax{}
|
|
||||||
, clmax{}
|
|
||||||
, chmax{}
|
|
||||||
, scale_mul{}
|
, scale_mul{}
|
||||||
, c_black{}
|
, c_black{}
|
||||||
, c_white{}
|
, c_white{}
|
||||||
@ -458,10 +439,29 @@ RawImageSource::RawImageSource ()
|
|||||||
, cam_xyz{}
|
, cam_xyz{}
|
||||||
, fuji(false)
|
, fuji(false)
|
||||||
, d1x(false)
|
, d1x(false)
|
||||||
|
, border(4)
|
||||||
|
, chmax{}
|
||||||
|
, hlmax{}
|
||||||
|
, clmax{}
|
||||||
, initialGain(0.0)
|
, initialGain(0.0)
|
||||||
, camInitialGain(0.0)
|
, camInitialGain(0.0)
|
||||||
, defGain(0.0)
|
, defGain(0.0)
|
||||||
|
, ri(nullptr)
|
||||||
|
, lc00(0.0)
|
||||||
|
, lc01(0.0)
|
||||||
|
, lc02(0.0)
|
||||||
|
, lc10(0.0)
|
||||||
|
, lc11(0.0)
|
||||||
|
, lc12(0.0)
|
||||||
|
, lc20(0.0)
|
||||||
|
, lc21(0.0)
|
||||||
|
, lc22(0.0)
|
||||||
|
, cache(nullptr)
|
||||||
, threshold(0)
|
, threshold(0)
|
||||||
|
, rawData(0, 0)
|
||||||
|
, green(0, 0)
|
||||||
|
, red(0, 0)
|
||||||
|
, blue(0, 0)
|
||||||
{
|
{
|
||||||
camProfile = nullptr;
|
camProfile = nullptr;
|
||||||
embProfile = nullptr;
|
embProfile = nullptr;
|
||||||
@ -672,7 +672,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima
|
|||||||
|
|
||||||
defGain = 0.0;
|
defGain = 0.0;
|
||||||
// compute image area to render in order to provide the requested part of the image
|
// compute image area to render in order to provide the requested part of the image
|
||||||
int sx1, sy1, imwidth, imheight, fw, d1xHeightOdd;
|
int sx1, sy1, imwidth, imheight, fw, d1xHeightOdd = 0;
|
||||||
transformRect (pp, tran, sx1, sy1, imwidth, imheight, fw);
|
transformRect (pp, tran, sx1, sy1, imwidth, imheight, fw);
|
||||||
|
|
||||||
// check possible overflows
|
// check possible overflows
|
||||||
@ -748,7 +748,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima
|
|||||||
|
|
||||||
if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1) {
|
if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1) {
|
||||||
for (int j = 0, jx = sx1; j < imwidth; j++, jx += skip) {
|
for (int j = 0, jx = sx1; j < imwidth; j++, jx += skip) {
|
||||||
jx = jx >= (maxx - skip) ? jx = maxx - skip - 1 : jx; // avoid trouble
|
jx = std::min(jx, maxx - skip - 1); // avoid trouble
|
||||||
|
|
||||||
float rtot = 0.f, gtot = 0.f, btot = 0.f;
|
float rtot = 0.f, gtot = 0.f, btot = 0.f;
|
||||||
|
|
||||||
@ -896,6 +896,11 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima
|
|||||||
|
|
||||||
case ST_FUJI_XTRANS:
|
case ST_FUJI_XTRANS:
|
||||||
processFalseColorCorrection (image, raw.xtranssensor.ccSteps);
|
processFalseColorCorrection (image, raw.xtranssensor.ccSteps);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ST_FOVEON:
|
||||||
|
case ST_NONE:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1169,8 +1174,7 @@ int RawImageSource::interpolateBadPixelsXtrans( PixelsMap &bitmapBads )
|
|||||||
}
|
}
|
||||||
|
|
||||||
float wtdsum = 0.f, norm = 0.f;
|
float wtdsum = 0.f, norm = 0.f;
|
||||||
int pixelColor = ri->XTRANSFC(row, col);
|
unsigned int pixelColor = ri->XTRANSFC(row, col);
|
||||||
float oldval = rawData[row][col];
|
|
||||||
|
|
||||||
if(pixelColor == 1) {
|
if(pixelColor == 1) {
|
||||||
// green channel. A green pixel can either be a solitary green pixel or a member of a 2x2 square of green pixels
|
// green channel. A green pixel can either be a solitary green pixel or a member of a 2x2 square of green pixels
|
||||||
@ -1782,7 +1786,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
|
|||||||
|
|
||||||
if(numFrames == 4) {
|
if(numFrames == 4) {
|
||||||
int bufferNumber = 0;
|
int bufferNumber = 0;
|
||||||
for(int i=0; i<4; ++i) {
|
for(unsigned int i=0; i<4; ++i) {
|
||||||
if(i==currFrame) {
|
if(i==currFrame) {
|
||||||
copyOriginalPixels(raw, ri, rid, rif, rawData);
|
copyOriginalPixels(raw, ri, rid, rif, rawData);
|
||||||
rawDataFrames[i] = &rawData;
|
rawDataFrames[i] = &rawData;
|
||||||
@ -2107,7 +2111,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar
|
|||||||
conversionBuffer[2] (W - 2 * border, H - 2 * border);
|
conversionBuffer[2] (W - 2 * border, H - 2 * border);
|
||||||
conversionBuffer[3] (W - 2 * border, H - 2 * border);
|
conversionBuffer[3] (W - 2 * border, H - 2 * border);
|
||||||
|
|
||||||
LUTf *retinexgamtab;//gamma before and after Retinex to restore tones
|
LUTf *retinexgamtab = nullptr;//gamma before and after Retinex to restore tones
|
||||||
LUTf lutTonereti;
|
LUTf lutTonereti;
|
||||||
|
|
||||||
if(retinexParams.gammaretinex == "low") {
|
if(retinexParams.gammaretinex == "low") {
|
||||||
@ -2380,7 +2384,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC
|
|||||||
LUTf lutToneireti;
|
LUTf lutToneireti;
|
||||||
lutToneireti(65536);
|
lutToneireti(65536);
|
||||||
|
|
||||||
LUTf *retinexigamtab;//gamma before and after Retinex to restore tones
|
LUTf *retinexigamtab = nullptr;//gamma before and after Retinex to restore tones
|
||||||
|
|
||||||
if(deh.gammaretinex == "low") {
|
if(deh.gammaretinex == "low") {
|
||||||
retinexigamtab = &(Color::igammatab_115_2);
|
retinexigamtab = &(Color::igammatab_115_2);
|
||||||
@ -2840,7 +2844,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile
|
|||||||
float limitFactor = 1.f;
|
float limitFactor = 1.f;
|
||||||
|
|
||||||
if(raw.ff_AutoClipControl) {
|
if(raw.ff_AutoClipControl) {
|
||||||
int clipControlGui = 0;
|
// int clipControlGui = 0;
|
||||||
|
|
||||||
for (int m = 0; m < 2; m++)
|
for (int m = 0; m < 2; m++)
|
||||||
for (int n = 0; n < 2; n++) {
|
for (int n = 0; n < 2; n++) {
|
||||||
@ -2885,7 +2889,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clipControlGui = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui
|
// clipControlGui = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui
|
||||||
} else {
|
} else {
|
||||||
limitFactor = max((float)(100 - raw.ff_clipControl) / 100.f, 0.01f);
|
limitFactor = max((float)(100 - raw.ff_clipControl) / 100.f, 0.01f);
|
||||||
}
|
}
|
||||||
@ -5019,7 +5023,7 @@ ColorTemp RawImageSource::getSpotWB (std::vector<Coord2D> &red, std::vector<Coor
|
|||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
double reds = 0, greens = 0, blues = 0;
|
double reds = 0, greens = 0, blues = 0;
|
||||||
int rn = 0;
|
unsigned int rn = 0;
|
||||||
|
|
||||||
if (ri->getSensorType() != ST_BAYER) {
|
if (ri->getSensorType() != ST_BAYER) {
|
||||||
if(ri->getSensorType() == ST_FUJI_XTRANS) {
|
if(ri->getSensorType() == ST_FUJI_XTRANS) {
|
||||||
@ -5210,7 +5214,7 @@ ColorTemp RawImageSource::getSpotWB (std::vector<Coord2D> &red, std::vector<Coor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (2 * rn < red.size()) {
|
if (2u * rn < red.size()) {
|
||||||
return ColorTemp (equal);
|
return ColorTemp (equal);
|
||||||
} else {
|
} else {
|
||||||
reds = reds / rn * refwb_red;
|
reds = reds / rn * refwb_red;
|
||||||
@ -5343,7 +5347,7 @@ void RawImageSource::init ()
|
|||||||
std::vector<double> cInversePoints;
|
std::vector<double> cInversePoints;
|
||||||
cInversePoints.push_back(double(DCT_Spline)); // The first value is the curve type
|
cInversePoints.push_back(double(DCT_Spline)); // The first value is the curve type
|
||||||
|
|
||||||
for (int i = 0; i < sizeof(phase_one_forward) / sizeof(phase_one_forward[0]); i += 2) {
|
for (unsigned int i = 0; i < sizeof(phase_one_forward) / sizeof(phase_one_forward[0]); i += 2) {
|
||||||
cForwardPoints.push_back(phase_one_forward[i + 0]);
|
cForwardPoints.push_back(phase_one_forward[i + 0]);
|
||||||
cForwardPoints.push_back(phase_one_forward[i + 1]);
|
cForwardPoints.push_back(phase_one_forward[i + 1]);
|
||||||
cInversePoints.push_back(phase_one_forward[i + 1]);
|
cInversePoints.push_back(phase_one_forward[i + 1]);
|
||||||
|
@ -50,7 +50,7 @@ namespace
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::size_t length =
|
const ssize_t length =
|
||||||
fdata(raw_image.get_thumbOffset(), raw_image.get_file())[1] != 0xD8 && raw_image.is_ppmThumb()
|
fdata(raw_image.get_thumbOffset(), raw_image.get_file())[1] != 0xD8 && raw_image.is_ppmThumb()
|
||||||
? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3
|
? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3
|
||||||
: raw_image.get_thumbLength();
|
: raw_image.get_thumbLength();
|
||||||
@ -254,7 +254,7 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL
|
|||||||
std::string fname = ri->get_filename();
|
std::string fname = ri->get_filename();
|
||||||
std::string suffix = fname.length() > 4 ? fname.substr(fname.length() - 3) : "";
|
std::string suffix = fname.length() > 4 ? fname.substr(fname.length() - 3) : "";
|
||||||
|
|
||||||
for (int i = 0; i < suffix.length(); i++) {
|
for (unsigned int i = 0; i < suffix.length(); i++) {
|
||||||
suffix[i] = std::tolower(suffix[i]);
|
suffix[i] = std::tolower(suffix[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,8 +500,8 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
|
|||||||
|
|
||||||
for (int row = 0; row < high; row++)
|
for (int row = 0; row < high; row++)
|
||||||
for (int col = 0; col < wide; col++) {
|
for (int col = 0; col < wide; col++) {
|
||||||
unsigned ur = r = fw + (row - col) * step;
|
int ur = r = fw + (row - col) * step;
|
||||||
unsigned uc = c = (row + col) * step;
|
int uc = c = (row + col) * step;
|
||||||
|
|
||||||
if (ur > tmph - 2 || uc > tmpw - 2) {
|
if (ur > tmph - 2 || uc > tmpw - 2) {
|
||||||
continue;
|
continue;
|
||||||
@ -779,17 +779,33 @@ void Thumbnail::init ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Thumbnail::Thumbnail () :
|
Thumbnail::Thumbnail () :
|
||||||
iColorMatrix{}, cam2xyz{}, scale(1.0), colorMatrix{}, isRaw(true),
|
camProfile(nullptr),
|
||||||
camProfile(nullptr), thumbImg(nullptr),
|
iColorMatrix{},
|
||||||
camwbRed(1.0), camwbGreen(1.0), camwbBlue(1.0),
|
cam2xyz{},
|
||||||
redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0),
|
thumbImg(nullptr),
|
||||||
autoWBTemp(2700), autoWBGreen(1.0), wbEqual(-1.0), wbTempBias(0.0),
|
camwbRed(1.0),
|
||||||
embProfileLength(0), embProfileData(nullptr), embProfile(nullptr),
|
camwbGreen(1.0),
|
||||||
redMultiplier(1.0), greenMultiplier(1.0), blueMultiplier(1.0),
|
camwbBlue(1.0),
|
||||||
|
redAWBMul(-1.0),
|
||||||
|
greenAWBMul(-1.0),
|
||||||
|
blueAWBMul(-1.0),
|
||||||
|
autoWBTemp(2700),
|
||||||
|
autoWBGreen(1.0),
|
||||||
|
wbEqual(-1.0),
|
||||||
|
wbTempBias(0.0),
|
||||||
|
aeHistCompression(3),
|
||||||
|
embProfileLength(0),
|
||||||
|
embProfileData(nullptr),
|
||||||
|
embProfile(nullptr),
|
||||||
|
redMultiplier(1.0),
|
||||||
|
greenMultiplier(1.0),
|
||||||
|
blueMultiplier(1.0),
|
||||||
|
scale(1.0),
|
||||||
defGain(1.0),
|
defGain(1.0),
|
||||||
scaleForSave(8192),
|
scaleForSave(8192),
|
||||||
gammaCorrected(false),
|
gammaCorrected(false),
|
||||||
aeHistCompression(3)
|
colorMatrix{},
|
||||||
|
isRaw(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -959,7 +975,6 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei
|
|||||||
|
|
||||||
LUTu hist16 (65536);
|
LUTu hist16 (65536);
|
||||||
|
|
||||||
double gamma = isRaw ? Color::sRGBGamma : 0; // usually in ImageSource, but we don't have that here
|
|
||||||
ipf.firstAnalysis (baseImg, params, hist16);
|
ipf.firstAnalysis (baseImg, params, hist16);
|
||||||
|
|
||||||
// perform transform
|
// perform transform
|
||||||
@ -967,7 +982,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei
|
|||||||
Imagefloat* trImg = new Imagefloat (fw, fh);
|
Imagefloat* trImg = new Imagefloat (fw, fh);
|
||||||
int origFW;
|
int origFW;
|
||||||
int origFH;
|
int origFH;
|
||||||
double tscale;
|
double tscale = 0.0;
|
||||||
getDimensions(origFW, origFH, tscale);
|
getDimensions(origFW, origFH, tscale);
|
||||||
ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, focalLen, focalLen35mm, focusDist, 0, true); // Raw rotate degree not detectable here
|
ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, focalLen, focalLen35mm, focusDist, 0, true); // Raw rotate degree not detectable here
|
||||||
delete baseImg;
|
delete baseImg;
|
||||||
@ -1193,7 +1208,6 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei
|
|||||||
LUTf CAMBrightCurveQ;
|
LUTf CAMBrightCurveQ;
|
||||||
float CAMMean;
|
float CAMMean;
|
||||||
int sk;
|
int sk;
|
||||||
int scale;
|
|
||||||
sk = 16;
|
sk = 16;
|
||||||
int rtt = 0;
|
int rtt = 0;
|
||||||
CieImage* cieView = new CieImage (fw, fh);
|
CieImage* cieView = new CieImage (fw, fh);
|
||||||
|
@ -376,7 +376,7 @@ SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, i
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if defined( __SSE2__ ) && defined( __x86_64__ )
|
#if defined( __SSE2__ ) && defined( __x86_64__ )
|
||||||
__m128 dirwtv, valv, normv, dftemp1v, dftemp2v, fg;
|
vfloat dirwtv, valv, normv, dftemp1v, dftemp2v;
|
||||||
#endif // __SSE2__
|
#endif // __SSE2__
|
||||||
int j;
|
int j;
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
@ -483,7 +483,7 @@ SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, i
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if defined( __SSE2__ ) && defined( __x86_64__ )
|
#if defined( __SSE2__ ) && defined( __x86_64__ )
|
||||||
__m128 dirwtv, valv, normv, dftemp1v, dftemp2v, fgg;
|
vfloat dirwtv, valv, normv, dftemp1v, dftemp2v;
|
||||||
float domkerv[5][5][4] ALIGNED16 = {{{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}};
|
float domkerv[5][5][4] ALIGNED16 = {{{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}};
|
||||||
|
|
||||||
#endif // __SSE2__
|
#endif // __SSE2__
|
||||||
|
@ -20,7 +20,6 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_)
|
|||||||
|
|
||||||
TagDirectory *exif = exif_->getDirectory();
|
TagDirectory *exif = exif_->getDirectory();
|
||||||
char *value = (char *)textualInfo->getValue();
|
char *value = (char *)textualInfo->getValue();
|
||||||
int valuesize = textualInfo->getValueSize();
|
|
||||||
|
|
||||||
char *p = value;
|
char *p = value;
|
||||||
char *pc, *plf;
|
char *pc, *plf;
|
||||||
|
@ -781,7 +781,7 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam
|
|||||||
|
|
||||||
if (options.savePathTemplate[ix] == 'p') {
|
if (options.savePathTemplate[ix] == 'p') {
|
||||||
ix++;
|
ix++;
|
||||||
int i = options.savePathTemplate[ix] - '0';
|
unsigned int i = options.savePathTemplate[ix] - '0';
|
||||||
|
|
||||||
if (i < pa.size()) {
|
if (i < pa.size()) {
|
||||||
path = path + pa[pa.size() - i - 1] + '/';
|
path = path + pa[pa.size() - i - 1] + '/';
|
||||||
@ -790,7 +790,7 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam
|
|||||||
ix++;
|
ix++;
|
||||||
} else if (options.savePathTemplate[ix] == 'd') {
|
} else if (options.savePathTemplate[ix] == 'd') {
|
||||||
ix++;
|
ix++;
|
||||||
int i = options.savePathTemplate[ix] - '0';
|
unsigned i = options.savePathTemplate[ix] - '0';
|
||||||
|
|
||||||
if (i < da.size()) {
|
if (i < da.size()) {
|
||||||
path = path + da[da.size() - i - 1];
|
path = path + da[da.size() - i - 1];
|
||||||
|
@ -32,7 +32,7 @@ Glib::RefPtr<Gdk::Pixbuf> BatchQueueEntry::savedAsIcon;
|
|||||||
BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm)
|
BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm)
|
||||||
: ThumbBrowserEntryBase(fname),
|
: ThumbBrowserEntryBase(fname),
|
||||||
opreview(nullptr), origpw(prevw), origph(prevh), opreviewDone(false),
|
opreview(nullptr), origpw(prevw), origph(prevh), opreviewDone(false),
|
||||||
job(pjob), progress(0), outFileName(""), sequence(0), forceFormatOpts(false), params(pparams)
|
job(pjob), params(pparams), progress(0), outFileName(""), sequence(0), forceFormatOpts(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
thumbnail = thm;
|
thumbnail = thm;
|
||||||
|
@ -18,11 +18,12 @@
|
|||||||
*/
|
*/
|
||||||
#include "browserfilter.h"
|
#include "browserfilter.h"
|
||||||
|
|
||||||
BrowserFilter::BrowserFilter () : exifFilterEnabled (false),
|
BrowserFilter::BrowserFilter () :
|
||||||
showTrash (true),
|
showTrash (true),
|
||||||
showNotTrash (true),
|
showNotTrash (true),
|
||||||
showOriginal (false),
|
showOriginal (false),
|
||||||
multiselect (false)
|
multiselect (false),
|
||||||
|
exifFilterEnabled (false)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
showRanked[i] = true;
|
showRanked[i] = true;
|
||||||
|
@ -27,7 +27,6 @@ CheckBox::CheckBox (Glib::ustring label, bool const& multiImageVal)
|
|||||||
: Gtk::CheckButton (label)
|
: Gtk::CheckButton (label)
|
||||||
, listener (nullptr)
|
, listener (nullptr)
|
||||||
, lastActive (false)
|
, lastActive (false)
|
||||||
, inBatchMode (false)
|
|
||||||
, multiImage (multiImageVal)
|
, multiImage (multiImageVal)
|
||||||
{
|
{
|
||||||
conn = signal_toggled().connect( sigc::mem_fun(*this, &CheckBox::buttonToggled) );
|
conn = signal_toggled().connect( sigc::mem_fun(*this, &CheckBox::buttonToggled) );
|
||||||
@ -36,7 +35,7 @@ CheckBox::CheckBox (Glib::ustring label, bool const& multiImageVal)
|
|||||||
void CheckBox::buttonToggled ()
|
void CheckBox::buttonToggled ()
|
||||||
{
|
{
|
||||||
|
|
||||||
CheckValue newValue;
|
CheckValue newValue = CheckValue::unchanged;
|
||||||
|
|
||||||
if (multiImage) {
|
if (multiImage) {
|
||||||
if (get_inconsistent()) {
|
if (get_inconsistent()) {
|
||||||
|
@ -48,7 +48,6 @@ class CheckBox : public Gtk::CheckButton // Should ideally be private, but in t
|
|||||||
|
|
||||||
CheckBoxListener *listener;
|
CheckBoxListener *listener;
|
||||||
bool lastActive;
|
bool lastActive;
|
||||||
bool inBatchMode;
|
|
||||||
bool const& multiImage;
|
bool const& multiImage;
|
||||||
sigc::connection conn;
|
sigc::connection conn;
|
||||||
void buttonToggled ();
|
void buttonToggled ();
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
Clipboard clipboard;
|
Clipboard clipboard;
|
||||||
|
|
||||||
Clipboard::Clipboard () : partProfile (false), _hasIPTC(false), hasDiagonalCurveDataType(DCT_Empty), hasFlatCurveDataType(FCT_Empty) {}
|
Clipboard::Clipboard () : _hasIPTC(false), partProfile (false), hasDiagonalCurveDataType(DCT_Empty), hasFlatCurveDataType(FCT_Empty) {}
|
||||||
|
|
||||||
Clipboard::~Clipboard ()
|
Clipboard::~Clipboard ()
|
||||||
{
|
{
|
||||||
|
@ -1055,7 +1055,7 @@ bool ColorAppearance::adapCamComputed_ ()
|
|||||||
void ColorAppearance::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
void ColorAppearance::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
float R, G, B;
|
float R = 0.f, G = 0.f, B = 0.f;
|
||||||
|
|
||||||
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
||||||
valY = 0.5;
|
valY = 0.5;
|
||||||
|
@ -952,7 +952,7 @@ void ColorToning::autoOpenCurve ()
|
|||||||
void ColorToning::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
void ColorToning::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
float R, G, B;
|
float R = 0.f, G = 0.f, B = 0.f;
|
||||||
|
|
||||||
if (callerId == 1) { // ch - main curve
|
if (callerId == 1) { // ch - main curve
|
||||||
Color::hsv2rgb01(float(valY), 1.0f, 0.5f, R, G, B);
|
Color::hsv2rgb01(float(valY), 1.0f, 0.5f, R, G, B);
|
||||||
|
@ -50,7 +50,7 @@ public:
|
|||||||
void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller);
|
void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gtk::HSeparator* satLimiterSep;
|
//Gtk::HSeparator* satLimiterSep;
|
||||||
Gtk::HSeparator* colorSep;
|
Gtk::HSeparator* colorSep;
|
||||||
CurveEditorGroup* colorCurveEditorG;
|
CurveEditorGroup* colorCurveEditorG;
|
||||||
CurveEditorGroup* opacityCurveEditorG;
|
CurveEditorGroup* opacityCurveEditorG;
|
||||||
@ -83,20 +83,16 @@ private:
|
|||||||
Adjuster* satProtectionThreshold;
|
Adjuster* satProtectionThreshold;
|
||||||
Adjuster* saturatedOpacity;
|
Adjuster* saturatedOpacity;
|
||||||
Adjuster* strength;
|
Adjuster* strength;
|
||||||
Gtk::Image* itot;
|
|
||||||
Gtk::Image* iby;
|
Gtk::Image* iby;
|
||||||
Gtk::Image* irg;
|
Gtk::Image* irg;
|
||||||
|
|
||||||
Gtk::Button* neutral;
|
Gtk::Button* neutral;
|
||||||
Gtk::HBox* neutrHBox;
|
Gtk::HBox* neutrHBox;
|
||||||
Gtk::HBox* chromaHbox;
|
|
||||||
Gtk::Label* chroLabel;
|
|
||||||
int nextbw;
|
int nextbw;
|
||||||
int nextsatth;
|
int nextsatth;
|
||||||
int nextsatpr;
|
int nextsatpr;
|
||||||
Glib::ustring nextbalcolor;
|
Glib::ustring nextbalcolor;
|
||||||
Glib::ustring balcolor;
|
Glib::ustring balcolor;
|
||||||
bool lasttwocolor;
|
|
||||||
sigc::connection neutralconn, twocconn; //, neutralcurvesconn;
|
sigc::connection neutralconn, twocconn; //, neutralcurvesconn;
|
||||||
bool lastautosat;
|
bool lastautosat;
|
||||||
sigc::connection autosatConn;
|
sigc::connection autosatConn;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
|
|
||||||
CropHandler::CropHandler ()
|
CropHandler::CropHandler ()
|
||||||
: zoom(100), ww(0), wh(0), imx(-1), imy(-1), imw(0), imh(0), cax(-1), cay(-1),
|
: zoom(100), ww(0), wh(0), cax(-1), cay(-1),
|
||||||
cx(0), cy(0), cw(0), ch(0), cropX(0), cropY(0), cropW(0), cropH(0), enabled(false),
|
cx(0), cy(0), cw(0), ch(0), cropX(0), cropY(0), cropW(0), cropH(0), enabled(false),
|
||||||
cropimg(nullptr), cropimgtrue(nullptr), cropimg_width(0), cropimg_height(0),
|
cropimg(nullptr), cropimgtrue(nullptr), cropimg_width(0), cropimg_height(0),
|
||||||
cix(0), ciy(0), ciw(0), cih(0), cis(1),
|
cix(0), ciy(0), ciw(0), cih(0), cis(1),
|
||||||
|
@ -108,7 +108,6 @@ private:
|
|||||||
|
|
||||||
int zoom; // scale factor (e.g. 5 if 1:5 scale) ; if 1:1 scale and bigger, factor is multiplied by 1000 (i.e. 1000 for 1:1 scale, 2000 for 2:1, etc...)
|
int zoom; // scale factor (e.g. 5 if 1:5 scale) ; if 1:1 scale and bigger, factor is multiplied by 1000 (i.e. 1000 for 1:1 scale, 2000 for 2:1, etc...)
|
||||||
int ww, wh; // size of the crop's canvas on the screen ; might be bigger than the displayed image, but not smaller
|
int ww, wh; // size of the crop's canvas on the screen ; might be bigger than the displayed image, but not smaller
|
||||||
int imx, imy, imw, imh; // this is a copy of the cropwindow's parameters
|
|
||||||
int cax, cay; // clamped crop anchor's coordinate, i.e. point of the image that coincide to the center of the display area, expressed in image coordinates; cannot be outside the image's bounds; but if cax==cay==-1, designate the center of the image
|
int cax, cay; // clamped crop anchor's coordinate, i.e. point of the image that coincide to the center of the display area, expressed in image coordinates; cannot be outside the image's bounds; but if cax==cay==-1, designate the center of the image
|
||||||
int cx, cy, cw, ch; // position and size of the requested crop ; position expressed in image coordinates, so cx and cy might be negative and cw and ch higher than the image's 1:1 size
|
int cx, cy, cw, ch; // position and size of the requested crop ; position expressed in image coordinates, so cx and cy might be negative and cw and ch higher than the image's 1:1 size
|
||||||
int cropX, cropY, cropW, cropH; // cropPixbuf's displayed area (position and size), i.e. coordinates in 1:1 scale, i.e. cx, cy, cw & ch trimmed to the image's bounds
|
int cropX, cropY, cropW, cropH; // cropPixbuf's displayed area (position and size), i.e. coordinates in 1:1 scale, i.e. cx, cy, cw & ch trimmed to the image's bounds
|
||||||
|
@ -36,7 +36,7 @@ using namespace rtengine;
|
|||||||
|
|
||||||
CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow)
|
CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow)
|
||||||
: ObjectMOBuffer(parent), state(SNormal), press_x(0), press_y(0), action_x(0), action_y(0), pickedObject(-1), pickModifierKey(0), rot_deg(0), onResizeArea(false), deleted(false),
|
: ObjectMOBuffer(parent), state(SNormal), press_x(0), press_y(0), action_x(0), action_y(0), pickedObject(-1), pickModifierKey(0), rot_deg(0), onResizeArea(false), deleted(false),
|
||||||
fitZoomEnabled(true), fitZoom(false), isLowUpdatePriority(isLowUpdatePriority_), hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")),
|
fitZoomEnabled(true), fitZoom(false), /*isLowUpdatePriority(isLowUpdatePriority_),*/ hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")),
|
||||||
backColor(options.bgcolor), decorated(true), isFlawnOver(false), titleHeight(30), sideBorderWidth(3), lowerBorderWidth(3),
|
backColor(options.bgcolor), decorated(true), isFlawnOver(false), titleHeight(30), sideBorderWidth(3), lowerBorderWidth(3),
|
||||||
upperBorderWidth(1), sepWidth(2), xpos(30), ypos(30), width(0), height(0), imgAreaX(0), imgAreaY(0), imgAreaW(0), imgAreaH(0),
|
upperBorderWidth(1), sepWidth(2), xpos(30), ypos(30), width(0), height(0), imgAreaX(0), imgAreaY(0), imgAreaW(0), imgAreaH(0),
|
||||||
imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(nullptr),
|
imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(nullptr),
|
||||||
@ -1627,7 +1627,7 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
|
|||||||
int delta = 0;
|
int delta = 0;
|
||||||
// for efficiency, pre-calculate currWS_L as it may be needed in both
|
// for efficiency, pre-calculate currWS_L as it may be needed in both
|
||||||
// if (showch) and if (showcs) branches
|
// if (showch) and if (showcs) branches
|
||||||
int currWS_L;
|
int currWS_L = 0;
|
||||||
|
|
||||||
if (showL && (showch || showcs)) {
|
if (showL && (showch || showcs)) {
|
||||||
currWS_L = (int)(0.299f * currWS[0] + 0.587f * currWS[1] + 0.114f * currWS[2]);
|
currWS_L = (int)(0.299f * currWS[0] + 0.587f * currWS[1] + 0.114f * currWS[2]);
|
||||||
|
@ -58,7 +58,7 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed
|
|||||||
bool deleted;
|
bool deleted;
|
||||||
bool fitZoomEnabled;
|
bool fitZoomEnabled;
|
||||||
bool fitZoom;
|
bool fitZoom;
|
||||||
bool isLowUpdatePriority;
|
//bool isLowUpdatePriority;
|
||||||
CursorShape cursor_type;
|
CursorShape cursor_type;
|
||||||
|
|
||||||
// color pickers
|
// color pickers
|
||||||
|
@ -68,7 +68,7 @@ Defringe::~Defringe ()
|
|||||||
void Defringe::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
void Defringe::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
float R, G, B;
|
float R = 0.f, G = 0.f, B = 0.f;
|
||||||
|
|
||||||
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
||||||
valY = 0.5;
|
valY = 0.5;
|
||||||
|
@ -40,7 +40,6 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt,
|
|||||||
|
|
||||||
Gtk::PositionType sideStart = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_LEFT : Gtk::POS_TOP;
|
Gtk::PositionType sideStart = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_LEFT : Gtk::POS_TOP;
|
||||||
Gtk::PositionType sideEnd = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_RIGHT : Gtk::POS_BOTTOM;
|
Gtk::PositionType sideEnd = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_RIGHT : Gtk::POS_BOTTOM;
|
||||||
bool vExpand = options.curvebboxpos == 0 || options.curvebboxpos == 2;
|
|
||||||
|
|
||||||
valLinear = (int)DCT_Linear;
|
valLinear = (int)DCT_Linear;
|
||||||
valUnchanged = (int)DCT_Unchanged;
|
valUnchanged = (int)DCT_Unchanged;
|
||||||
|
@ -21,7 +21,8 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32_WINNT
|
||||||
|
#undef _WIN32_WINNT
|
||||||
#define _WIN32_WINNT 0x0600
|
#define _WIN32_WINNT 0x0600
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
@ -348,7 +349,7 @@ void DirBrowser::updateDir (const Gtk::TreeModel::iterator& iter)
|
|||||||
auto dir = Gio::File::create_for_path (iter->get_value (dtColumns.dirname));
|
auto dir = Gio::File::create_for_path (iter->get_value (dtColumns.dirname));
|
||||||
auto subDirs = listSubDirs (dir, options.fbShowHidden);
|
auto subDirs = listSubDirs (dir, options.fbShowHidden);
|
||||||
|
|
||||||
for (int i = 0; i < subDirs.size(); i++) {
|
for (size_t i = 0; i < subDirs.size(); i++) {
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
for (Gtk::TreeModel::iterator it = iter->children().begin(); it != iter->children().end() && !found ; ++it) {
|
for (Gtk::TreeModel::iterator it = iter->children().begin(); it != iter->children().end() && !found ; ++it) {
|
||||||
|
@ -1247,7 +1247,7 @@ void DirPyrDenoise::setAdjusterBehavior (bool lumaadd, bool lumdetadd, bool chro
|
|||||||
void DirPyrDenoise::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
void DirPyrDenoise::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
float R, G, B;
|
float R = 0.f, G = 0.f, B = 0.f;
|
||||||
|
|
||||||
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
||||||
valY = 0.5;
|
valY = 0.5;
|
||||||
|
@ -505,7 +505,6 @@ void DynamicProfilePanel::on_button_edit()
|
|||||||
}
|
}
|
||||||
EditDialog d(M("DYNPROFILEEDITOR_EDIT_RULE"),
|
EditDialog d(M("DYNPROFILEEDITOR_EDIT_RULE"),
|
||||||
static_cast<Gtk::Window &>(*get_toplevel()));
|
static_cast<Gtk::Window &>(*get_toplevel()));
|
||||||
auto it = s->get_selected();
|
|
||||||
Gtk::TreeModel::Row row = *(s->get_selected());
|
Gtk::TreeModel::Row row = *(s->get_selected());
|
||||||
d.set_rule(to_rule(row));
|
d.set_rule(to_rule(row));
|
||||||
int status = d.run();
|
int status = d.run();
|
||||||
|
@ -374,7 +374,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
EditorPanel::EditorPanel (FilePanel* filePanel)
|
EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||||
: realized(false), iHistoryShow(nullptr), iHistoryHide(nullptr), iTopPanel_1_Show(nullptr), iTopPanel_1_Hide(nullptr), iRightPanel_1_Show(nullptr), iRightPanel_1_Hide(nullptr), iBeforeLockON(nullptr), iBeforeLockOFF(nullptr), beforePreviewHandler(nullptr), beforeIarea(nullptr), beforeBox(nullptr), afterBox(nullptr), afterHeaderBox(nullptr), parent(nullptr), openThm(nullptr), ipc(nullptr), beforeIpc(nullptr), isProcessing(false), catalogPane(nullptr)
|
: catalogPane(nullptr), realized(false), iHistoryShow(nullptr), iHistoryHide(nullptr), iTopPanel_1_Show(nullptr), iTopPanel_1_Hide(nullptr), iRightPanel_1_Show(nullptr), iRightPanel_1_Hide(nullptr), iBeforeLockON(nullptr), iBeforeLockOFF(nullptr), beforePreviewHandler(nullptr), beforeIarea(nullptr), beforeBox(nullptr), afterBox(nullptr), afterHeaderBox(nullptr), parent(nullptr), openThm(nullptr), ipc(nullptr), beforeIpc(nullptr), isProcessing(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
epih = new EditorPanelIdleHelper;
|
epih = new EditorPanelIdleHelper;
|
||||||
|
@ -193,7 +193,6 @@ private:
|
|||||||
ToolPanelCoordinator* tpc;
|
ToolPanelCoordinator* tpc;
|
||||||
RTWindow* parent;
|
RTWindow* parent;
|
||||||
//SaveAsDialog* saveAsDialog;
|
//SaveAsDialog* saveAsDialog;
|
||||||
BatchToolPanelCoordinator* btpCoordinator;
|
|
||||||
FilePanel* fPanel;
|
FilePanel* fPanel;
|
||||||
|
|
||||||
bool firstProcessingDone;
|
bool firstProcessingDone;
|
||||||
|
@ -36,8 +36,8 @@ public:
|
|||||||
double shutterTo;
|
double shutterTo;
|
||||||
double focalFrom;
|
double focalFrom;
|
||||||
double focalTo;
|
double focalTo;
|
||||||
int isoFrom;
|
unsigned isoFrom;
|
||||||
int isoTo;
|
unsigned isoTo;
|
||||||
|
|
||||||
bool filterFNumber;
|
bool filterFNumber;
|
||||||
bool filterShutter;
|
bool filterShutter;
|
||||||
|
@ -27,8 +27,6 @@ class ExifPanel : public Gtk::VBox, public ToolPanel
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
const rtengine::ImageMetaData* idata;
|
const rtengine::ImageMetaData* idata;
|
||||||
int fullw, fullh, cx, cy, cw, ch;
|
|
||||||
bool crenabled;
|
|
||||||
rtengine::procparams::ExifPairs changeList;
|
rtengine::procparams::ExifPairs changeList;
|
||||||
rtengine::procparams::ExifPairs defChangeList;
|
rtengine::procparams::ExifPairs defChangeList;
|
||||||
bool recursiveOp;
|
bool recursiveOp;
|
||||||
|
@ -325,9 +325,7 @@ bool ExtProgStore::openInCustomEditor (const Glib::ustring& fileName)
|
|||||||
|
|
||||||
const auto cmdLine = Glib::ustring("\"") + options.customEditorProg + Glib::ustring("\"");
|
const auto cmdLine = Glib::ustring("\"") + options.customEditorProg + Glib::ustring("\"");
|
||||||
auto success = ShellExecute( NULL, "open", cmdLine.c_str(), fileName.c_str(), NULL, SW_SHOWNORMAL );
|
auto success = ShellExecute( NULL, "open", cmdLine.c_str(), fileName.c_str(), NULL, SW_SHOWNORMAL );
|
||||||
if ((uintptr_t)success > 32) {
|
return (uintptr_t)success > 32;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
|
|
||||||
|
@ -405,7 +405,7 @@ FileBrowser::FileBrowser ()
|
|||||||
colorlabel[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), colorlabel[i]));
|
colorlabel[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), colorlabel[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < mMenuExtProgs.size(); i++) {
|
for (size_t i = 0; i < mMenuExtProgs.size(); i++) {
|
||||||
amiExtProg[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), amiExtProg[i]));
|
amiExtProg[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), amiExtProg[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -730,14 +730,14 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < mMenuExtProgs.size(); j++) {
|
for (size_t j = 0; j < mMenuExtProgs.size(); j++) {
|
||||||
if (m == amiExtProg[j]) {
|
if (m == amiExtProg[j]) {
|
||||||
const auto pAct = mMenuExtProgs[m->get_label()];
|
const auto pAct = mMenuExtProgs[m->get_label()];
|
||||||
|
|
||||||
// Build vector of all file names
|
// Build vector of all file names
|
||||||
std::vector<Glib::ustring> selFileNames;
|
std::vector<Glib::ustring> selFileNames;
|
||||||
|
|
||||||
for (int i = 0; i < mselected.size(); i++) {
|
for (size_t i = 0; i < mselected.size(); i++) {
|
||||||
Glib::ustring fn = mselected[i]->thumbnail->getFileName();
|
Glib::ustring fn = mselected[i]->thumbnail->getFileName();
|
||||||
|
|
||||||
// Maybe batch processed version
|
// Maybe batch processed version
|
||||||
@ -1505,11 +1505,11 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry
|
|||||||
int iFilenameMatch = 0;
|
int iFilenameMatch = 0;
|
||||||
std::vector<Glib::ustring> vFilterStrings = Glib::Regex::split_simple(",", decodedQueryFileName.uppercase());
|
std::vector<Glib::ustring> vFilterStrings = Glib::Regex::split_simple(",", decodedQueryFileName.uppercase());
|
||||||
|
|
||||||
for(int i = 0; i < vFilterStrings.size(); i++) {
|
for(size_t i = 0; i < vFilterStrings.size(); i++) {
|
||||||
// ignore empty vFilterStrings. Otherwise filter will always return true if
|
// ignore empty vFilterStrings. Otherwise filter will always return true if
|
||||||
// e.g. filter.queryFileName ends on "," and will stop being a filter
|
// e.g. filter.queryFileName ends on "," and will stop being a filter
|
||||||
if (!vFilterStrings.at(i).empty()) {
|
if (!vFilterStrings.at(i).empty()) {
|
||||||
if (FileName.find(vFilterStrings.at(i)) != -1) {
|
if (FileName.find(vFilterStrings.at(i)) != Glib::ustring::npos) {
|
||||||
iFilenameMatch++;
|
iFilenameMatch++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -635,6 +635,7 @@ bool FileBrowserEntry::onArea (CursorArea a, int x, int y)
|
|||||||
y1 < cropParams.y + cropParams.h - 1 &&
|
y1 < cropParams.y + cropParams.h - 1 &&
|
||||||
x1 > cropParams.x &&
|
x1 > cropParams.x &&
|
||||||
x1 < cropParams.x + cropParams.w - 1;
|
x1 < cropParams.x + cropParams.w - 1;
|
||||||
|
default: /* do nothing */ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -748,12 +748,12 @@ void FileCatalog::previewReady (int dir_id, FileBrowserEntry* fdn)
|
|||||||
dirEFS.shutterTo = cfs->shutter;
|
dirEFS.shutterTo = cfs->shutter;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfs->iso > 0 && (int)cfs->iso < dirEFS.isoFrom) {
|
if (cfs->iso > 0 && cfs->iso < dirEFS.isoFrom) {
|
||||||
dirEFS.isoFrom = (int)cfs->iso;
|
dirEFS.isoFrom = cfs->iso;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfs->iso > 0 && (int)cfs->iso > dirEFS.isoTo) {
|
if (cfs->iso > 0 && cfs->iso > dirEFS.isoTo) {
|
||||||
dirEFS.isoTo = (int)cfs->iso;
|
dirEFS.isoTo = cfs->iso;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfs->focalLen < dirEFS.focalFrom) {
|
if (cfs->focalLen < dirEFS.focalFrom) {
|
||||||
|
@ -1478,7 +1478,7 @@ void BackBuffer::copyRGBCharData(const unsigned char *srcData, int srcX, int src
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned int i = 0; i < (unsigned int)(srcH); ++i) {
|
for (int i = 0; i < srcH; ++i) {
|
||||||
if (dstY + i >= surfH) {
|
if (dstY + i >= surfH) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1486,7 +1486,7 @@ void BackBuffer::copyRGBCharData(const unsigned char *srcData, int srcX, int src
|
|||||||
src = srcData + i * srcRowStride;
|
src = srcData + i * srcRowStride;
|
||||||
dst = dstData + ((dstY + i) * surfW + dstX) * 4;
|
dst = dstData + ((dstY + i) * surfW + dstX) * 4;
|
||||||
|
|
||||||
for (unsigned int j = 0; j < (unsigned int)(srcW); ++j) {
|
for (int j = 0; j < srcW; ++j) {
|
||||||
if (dstX + j >= surfW) {
|
if (dstX + j >= surfW) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1620,8 +1620,8 @@ void BackBuffer::copySurface(Cairo::RefPtr<Cairo::Context> crDest, Gdk::Rectangl
|
|||||||
int offsetY = rtengine::LIM<int>(offset.y, 0, surface->get_height());
|
int offsetY = rtengine::LIM<int>(offset.y, 0, surface->get_height());
|
||||||
|
|
||||||
// now copy the off-screen Surface to the destination Surface
|
// now copy the off-screen Surface to the destination Surface
|
||||||
int srcSurfW = surface->get_width();
|
// int srcSurfW = surface->get_width();
|
||||||
int srcSurfH = surface->get_height();
|
// int srcSurfH = surface->get_height();
|
||||||
//printf("srcSurf: w: %d, h: %d\n", srcSurfW, srcSurfH);
|
//printf("srcSurf: w: %d, h: %d\n", srcSurfW, srcSurfH);
|
||||||
crDest->set_line_width(0.);
|
crDest->set_line_width(0.);
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ public:
|
|||||||
class ConnectionBlocker
|
class ConnectionBlocker
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ConnectionBlocker (Gtk::Widget *associatedWidget, sigc::connection& connection) : connection (associatedWidget ? &connection : nullptr)
|
explicit ConnectionBlocker (Gtk::Widget *associatedWidget, sigc::connection& connection) : connection (associatedWidget ? &connection : nullptr), wasBlocked(false)
|
||||||
{
|
{
|
||||||
if (this->connection) {
|
if (this->connection) {
|
||||||
wasBlocked = connection.block();
|
wasBlocked = connection.block();
|
||||||
|
@ -1007,7 +1007,7 @@ SSEFUNCTION void HistogramArea::updateBackBuffer ()
|
|||||||
// does not take into account 0 and 255 values
|
// does not take into account 0 and 255 values
|
||||||
// them are handled separately
|
// them are handled separately
|
||||||
|
|
||||||
int fullhistheight = 0;
|
unsigned int fullhistheight = 0;
|
||||||
|
|
||||||
for (int i = 1; i < 255; i++) {
|
for (int i = 1; i < 255; i++) {
|
||||||
if (needLuma && lhisttemp[i] > fullhistheight) {
|
if (needLuma && lhisttemp[i] > fullhistheight) {
|
||||||
@ -1042,7 +1042,7 @@ SSEFUNCTION void HistogramArea::updateBackBuffer ()
|
|||||||
vint iv = (vint)ZEROV;
|
vint iv = (vint)ZEROV;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < fullhistheight; i++) {
|
for (unsigned i = 0; i < fullhistheight; i++) {
|
||||||
#ifdef __SSE2__
|
#ifdef __SSE2__
|
||||||
vint areatempv = (vint)ZEROV;
|
vint areatempv = (vint)ZEROV;
|
||||||
|
|
||||||
|
@ -88,8 +88,6 @@ private:
|
|||||||
sigc::connection onamesconn;
|
sigc::connection onamesconn;
|
||||||
PopUpButton* ointent;
|
PopUpButton* ointent;
|
||||||
sigc::connection ointentconn;
|
sigc::connection ointentconn;
|
||||||
Gtk::RadioButton* ofromdir;
|
|
||||||
Gtk::RadioButton* ofromfile;
|
|
||||||
Gtk::RadioButton* iunchanged;
|
Gtk::RadioButton* iunchanged;
|
||||||
MyFileChooserButton* ipDialog;
|
MyFileChooserButton* ipDialog;
|
||||||
Gtk::RadioButton::Group opts;
|
Gtk::RadioButton::Group opts;
|
||||||
@ -99,7 +97,6 @@ private:
|
|||||||
ICMPanelListener* icmplistener;
|
ICMPanelListener* icmplistener;
|
||||||
|
|
||||||
double dcpTemperatures[2];
|
double dcpTemperatures[2];
|
||||||
bool enableLastICCWorkDirChange;
|
|
||||||
Glib::ustring lastRefFilename;
|
Glib::ustring lastRefFilename;
|
||||||
Glib::ustring camName;
|
Glib::ustring camName;
|
||||||
void updateDCP(int dcpIlluminant, Glib::ustring dcp_name);
|
void updateDCP(int dcpIlluminant, Glib::ustring dcp_name);
|
||||||
|
@ -559,7 +559,7 @@ void LCurve::adjusterChanged (Adjuster* a, double newval)
|
|||||||
void LCurve::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
void LCurve::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
float R, G, B;
|
float R = 0.f, G = 0.f, B = 0.f;
|
||||||
|
|
||||||
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
||||||
valY = 0.5;
|
valY = 0.5;
|
||||||
|
@ -72,7 +72,7 @@ void LWButtonSet::arrangeButtons (int x, int y, int w, int h)
|
|||||||
|
|
||||||
for (size_t i = 0; i < buttons.size(); i++) {
|
for (size_t i = 0; i < buttons.size(); i++) {
|
||||||
LWButton::Alignment halign, valign;
|
LWButton::Alignment halign, valign;
|
||||||
int bx, by, bw, bh;
|
int bx = 0, by = 0, bw = 0, bh = 0;
|
||||||
buttons[i]->getSize (bw, bh);
|
buttons[i]->getSize (bw, bh);
|
||||||
buttons[i]->getAlignment (halign, valign);
|
buttons[i]->getAlignment (halign, valign);
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ bool MyCurve::snapCoordinateY(double testedVal, double realVal)
|
|||||||
|
|
||||||
float MyCurve::getVal(LUTf &curve, int x)
|
float MyCurve::getVal(LUTf &curve, int x)
|
||||||
{
|
{
|
||||||
if ((graphW - 2) == curve.getSize()) {
|
if (size_t(graphW - 2) == curve.getSize()) {
|
||||||
return curve[x];
|
return curve[x];
|
||||||
} else {
|
} else {
|
||||||
return curve.getVal01(float(x) / (graphW - 3));
|
return curve.getVal01(float(x) / (graphW - 3));
|
||||||
|
@ -398,7 +398,7 @@ void MyDiagonalCurve::draw (int handle)
|
|||||||
double y2 = double(graphY) - 1.5 - double(graphH - 3) * points[pos + 1]; // project (curve.y.at(i), 0, 1, graphH);
|
double y2 = double(graphY) - 1.5 - double(graphH - 3) * points[pos + 1]; // project (curve.y.at(i), 0, 1, graphH);
|
||||||
|
|
||||||
// set the color of the line when the point is snapped to the cage
|
// set the color of the line when the point is snapped to the cage
|
||||||
if (curve.x.size() == nbPoints && snapToElmt >= 1000 && ((i == (snapToElmt - 1000)) || (i == (snapToElmt - 999)))) {
|
if (curve.x.size() == nbPoints && snapToElmt >= 1000 && ((int(i) == (snapToElmt - 1000)) || (int(i) == (snapToElmt - 999)))) {
|
||||||
cr->set_source_rgb (1.0, 0.0, 0.0);
|
cr->set_source_rgb (1.0, 0.0, 0.0);
|
||||||
} else {
|
} else {
|
||||||
cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue());
|
cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue());
|
||||||
@ -606,7 +606,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
|
|||||||
|
|
||||||
edited_point = lit_point;
|
edited_point = lit_point;
|
||||||
std::vector<CoordinateAdjuster::Boundaries> newBoundaries(2);
|
std::vector<CoordinateAdjuster::Boundaries> newBoundaries(2);
|
||||||
unsigned int size = curve.x.size();
|
int size = curve.x.size();
|
||||||
|
|
||||||
if (edited_point == 0) {
|
if (edited_point == 0) {
|
||||||
newBoundaries.at(0).minVal = 0.;
|
newBoundaries.at(0).minVal = 0.;
|
||||||
@ -655,7 +655,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
|
|||||||
draw (lit_point);
|
draw (lit_point);
|
||||||
std::vector<CoordinateAdjuster::Boundaries> newBoundaries;
|
std::vector<CoordinateAdjuster::Boundaries> newBoundaries;
|
||||||
newBoundaries.resize(2);
|
newBoundaries.resize(2);
|
||||||
unsigned int size = curve.x.size();
|
int size = curve.x.size();
|
||||||
|
|
||||||
if (edited_point == 0) {
|
if (edited_point == 0) {
|
||||||
newBoundaries.at(0).minVal = 0.;
|
newBoundaries.at(0).minVal = 0.;
|
||||||
@ -888,7 +888,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
|
|||||||
} else {
|
} else {
|
||||||
// snapping point to specific values
|
// snapping point to specific values
|
||||||
if (snapTo && curve.x.at(grab_point) != -1.) {
|
if (snapTo && curve.x.at(grab_point) != -1.) {
|
||||||
if (grab_point > 0 && grab_point < (curve.y.size() - 1)) {
|
if (grab_point > 0 && unsigned(grab_point) < (curve.y.size() - 1)) {
|
||||||
double prevX = curve.x.at(grab_point - 1);
|
double prevX = curve.x.at(grab_point - 1);
|
||||||
double prevY = curve.y.at(grab_point - 1);
|
double prevY = curve.y.at(grab_point - 1);
|
||||||
double nextX = curve.x.at(grab_point + 1);
|
double nextX = curve.x.at(grab_point + 1);
|
||||||
@ -910,7 +910,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (grab_point < (curve.y.size() - 1)) {
|
if (grab_point < int(curve.y.size() - 1)) {
|
||||||
int nextP = grab_point + 1;
|
int nextP = grab_point + 1;
|
||||||
|
|
||||||
if (snapCoordinateY(curve.y.at(nextP), ugpY)) {
|
if (snapCoordinateY(curve.y.at(nextP), ugpY)) {
|
||||||
@ -1208,7 +1208,7 @@ void MyDiagonalCurve::pipetteDrag(EditDataProvider *provider, int modifierKey)
|
|||||||
|
|
||||||
// snapping point to specific values
|
// snapping point to specific values
|
||||||
if (snapTo && curve.x.at(grab_point) != -1.) {
|
if (snapTo && curve.x.at(grab_point) != -1.) {
|
||||||
if (grab_point > 0 && grab_point < (curve.y.size() - 1)) {
|
if (grab_point > 0 && unsigned(grab_point) < (curve.y.size() - 1)) {
|
||||||
double prevX = curve.x.at(grab_point - 1);
|
double prevX = curve.x.at(grab_point - 1);
|
||||||
double prevY = curve.y.at(grab_point - 1);
|
double prevY = curve.y.at(grab_point - 1);
|
||||||
double nextX = curve.x.at(grab_point + 1);
|
double nextX = curve.x.at(grab_point + 1);
|
||||||
@ -1230,7 +1230,7 @@ void MyDiagonalCurve::pipetteDrag(EditDataProvider *provider, int modifierKey)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (grab_point < (curve.y.size() - 1)) {
|
if (grab_point < int(curve.y.size() - 1)) {
|
||||||
int nextP = grab_point + 1;
|
int nextP = grab_point + 1;
|
||||||
|
|
||||||
if (snapCoordinateY(curve.y.at(nextP), ugpY)) {
|
if (snapCoordinateY(curve.y.at(nextP), ugpY)) {
|
||||||
|
@ -711,7 +711,7 @@ bool MyFlatCurve::handleEvents (GdkEvent* event)
|
|||||||
setDirty(true);
|
setDirty(true);
|
||||||
draw ();
|
draw ();
|
||||||
std::vector<CoordinateAdjuster::Boundaries> newBoundaries(4);
|
std::vector<CoordinateAdjuster::Boundaries> newBoundaries(4);
|
||||||
unsigned int size = curve.x.size();
|
int size = curve.x.size();
|
||||||
|
|
||||||
if (edited_point == 0) {
|
if (edited_point == 0) {
|
||||||
newBoundaries.at(0).minVal = 0.;
|
newBoundaries.at(0).minVal = 0.;
|
||||||
@ -761,7 +761,7 @@ bool MyFlatCurve::handleEvents (GdkEvent* event)
|
|||||||
setDirty(true);
|
setDirty(true);
|
||||||
draw ();
|
draw ();
|
||||||
std::vector<CoordinateAdjuster::Boundaries> newBoundaries(4);
|
std::vector<CoordinateAdjuster::Boundaries> newBoundaries(4);
|
||||||
unsigned int size = curve.x.size();
|
int size = curve.x.size();
|
||||||
|
|
||||||
if (edited_point == 0) {
|
if (edited_point == 0) {
|
||||||
newBoundaries.at(0).minVal = 0.;
|
newBoundaries.at(0).minVal = 0.;
|
||||||
@ -1544,7 +1544,7 @@ void MyFlatCurve::movePoint(bool moveX, bool moveY, bool pipetteDrag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (curve.y.size() > 2) {
|
if (curve.y.size() > 2) {
|
||||||
if (lit_point == (curve.y.size() - 1)) {
|
if (lit_point == int(curve.y.size()) - 1) {
|
||||||
if (snapCoordinateY(curve.y.at(0), ugpY)) {
|
if (snapCoordinateY(curve.y.at(0), ugpY)) {
|
||||||
snapToElmt = 0;
|
snapToElmt = 0;
|
||||||
}
|
}
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
|
||||||
PopUpCommon::PopUpCommon (Gtk::Button* thisButton, const Glib::ustring& label)
|
PopUpCommon::PopUpCommon (Gtk::Button* thisButton, const Glib::ustring& label)
|
||||||
: selected (-1) // -1 means that the button is invalid
|
: buttonImage (nullptr)
|
||||||
, menu (nullptr)
|
, menu (nullptr)
|
||||||
, buttonImage (nullptr)
|
, selected (-1) // -1 means that the button is invalid
|
||||||
{
|
{
|
||||||
button = thisButton;
|
button = thisButton;
|
||||||
hasMenu = false;
|
hasMenu = false;
|
||||||
@ -107,8 +107,8 @@ void PopUpCommon::entrySelected (int i)
|
|||||||
|
|
||||||
void PopUpCommon::setItemSensitivity (int index, bool isSensitive) {
|
void PopUpCommon::setItemSensitivity (int index, bool isSensitive) {
|
||||||
const auto items = menu->get_children ();
|
const auto items = menu->get_children ();
|
||||||
if (index < items.size ()) {
|
if (size_t(index) < items.size ()) {
|
||||||
items[index]->set_sensitive (isSensitive);
|
items[size_t(index)]->set_sensitive (isSensitive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1513,7 +1513,7 @@ void Retinex::updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histL
|
|||||||
void Retinex::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
void Retinex::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
float R, G, B;
|
float R = 0.f, G = 0.f, B = 0.f;
|
||||||
|
|
||||||
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
||||||
valY = 0.5;
|
valY = 0.5;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
ThumbBrowserBase::ThumbBrowserBase ()
|
ThumbBrowserBase::ThumbBrowserBase ()
|
||||||
: lastClicked(nullptr), previewHeight(options.thumbSize), numOfCols(1), inspector(nullptr), isInspectorActive(false), location(THLOC_FILEBROWSER)
|
: location(THLOC_FILEBROWSER), inspector(nullptr), isInspectorActive(false), lastClicked(nullptr), previewHeight(options.thumbSize), numOfCols(1)
|
||||||
{
|
{
|
||||||
inW = -1;
|
inW = -1;
|
||||||
inH = -1;
|
inH = -1;
|
||||||
|
@ -64,7 +64,7 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageDa
|
|||||||
|
|
||||||
Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::string& md5)
|
Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::string& md5)
|
||||||
: fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(nullptr), pparamsValid(false),
|
: fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(nullptr), pparamsValid(false),
|
||||||
pparamsSet(false), needsReProcessing(true), imageLoading(false), lastImg(nullptr),
|
needsReProcessing(true), imageLoading(false), lastImg(nullptr),
|
||||||
lastW(0), lastH(0), lastScale(0.0), initial_(true)
|
lastW(0), lastH(0), lastScale(0.0), initial_(true)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@ class Thumbnail
|
|||||||
|
|
||||||
rtengine::procparams::ProcParams pparams;
|
rtengine::procparams::ProcParams pparams;
|
||||||
bool pparamsValid;
|
bool pparamsValid;
|
||||||
bool pparamsSet;
|
|
||||||
bool needsReProcessing;
|
bool needsReProcessing;
|
||||||
bool imageLoading;
|
bool imageLoading;
|
||||||
|
|
||||||
|
@ -2863,7 +2863,7 @@ void Wavelet::tmrToggled ()
|
|||||||
void Wavelet::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
void Wavelet::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
float R, G, B;
|
float R = 0.f, G = 0.f, B = 0.f;
|
||||||
|
|
||||||
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
if (elemType == ColorCaller::CCET_VERTICAL_BAR) {
|
||||||
valY = 0.5;
|
valY = 0.5;
|
||||||
|
@ -355,7 +355,6 @@ void WhiteBalance::adjusterChanged (Adjuster* a, double newval)
|
|||||||
int tVal = (int)temp->getValue();
|
int tVal = (int)temp->getValue();
|
||||||
double gVal = green->getValue();
|
double gVal = green->getValue();
|
||||||
double eVal = equal->getValue();
|
double eVal = equal->getValue();
|
||||||
double tempBiasVal = tempBias->getValue();
|
|
||||||
Gtk::TreeModel::Row row = getActiveMethod();
|
Gtk::TreeModel::Row row = getActiveMethod();
|
||||||
|
|
||||||
if (row == refTreeModel->children().end()) {
|
if (row == refTreeModel->children().end()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user