Skip to content

Commit a936c56

Browse files
committed
Passed other parameters to try
1 parent 40d2dfd commit a936c56

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

rtengine/iplocallab.cc

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6139,7 +6139,7 @@ struct grad_params {
61396139
int h;
61406140
};
61416141

6142-
void calclocalGradientParams(int call, const struct local_params& lp, struct grad_params& gp, float ystart, float xstart, float yend, float xend, int bfw, int bfh, int oW, int oH, int tX, int tY, int tW, int tH, int indic, int sk, int fw, int fh, int cx, int cy, float ksk)
6142+
void calclocalGradientParams(int call, const struct local_params& lp, struct grad_params& gp, float ystart, float xstart, float yend, float xend, int bfw, int bfh, int oW, int oH, int tX, int tY, int tW, int tH, int indic, int sk, int fw, int fh, int cx, int cy, float &ksk)
61436143
{
61446144
int w = bfw;//??? oW, tW..
61456145
int h = bfh;//??? oH, tH..
@@ -6155,7 +6155,7 @@ void calclocalGradientParams(int call, const struct local_params& lp, struct gra
61556155

61566156
int kx = 0;
61576157
int ky = 0;
6158-
// kx = tX; or cx
6158+
// kx = tX; or cx //try to take account of position of window in preview
61596159
// ky = tY; or cy
61606160

61616161
// cannot be used for RT-Spot "normal" or "exclude" : only in fullimage or Global
@@ -6238,7 +6238,9 @@ void calclocalGradientParams(int call, const struct local_params& lp, struct gra
62386238
angs = lp.anggradcie;
62396239
varfeath = 0.01f * lp.feathercie;
62406240
}
6241-
6241+
float ktyoh = 1.f; //Try to take into account position of window in preview with various factors...ex: -2.f * ((float)(oH - tY) / (float)oH);
6242+
//printf("KTYOH=%f \n", (double) ktyoh);
6243+
ksk *= ktyoh;
62426244
int sk2 = 1;
62436245
double kstop = 0.5; // to simulate stops in GF main.
62446246
double gradient_stops = stops / sk2;//to test with Skip but does not work well
@@ -14455,19 +14457,27 @@ void ImProcFunctions::Lab_Local(
1445514457
if (!params->locallab.enabled) {
1445614458
return;
1445714459
}
14460+
/*
1445814461
//empirical correction to cx and cy in function of sk to apply to cx and cy
1445914462
float ksk = 1.f;
1446014463
if(sk == 1) {
14461-
ksk = 0.86f;
14464+
ksk = 0.86f * (1.f + params->locallab.angSH);
1446214465
} else if (sk == 2) {
14463-
ksk = 0.95f;
14466+
ksk = 0.95f * (1.f + );
1446414467
}
14465-
14468+
*/
1446614469
//BENCHFUN
1446714470
// printf("OHWTHW ow=%i oh=%i tw=%i th=%i sk=%i\n", oW, oH, tW, tH, sk);
1446814471
constexpr int del = 3; // to avoid crash with [loy - begy] and [lox - begx] and bfh bfw // with gtk2 [loy - begy-1] [lox - begx -1 ] and del = 1
1446914472
struct local_params lp;
1447014473
calcLocalParams(sp, oW, oH, params->locallab, lp, prevDeltaE, llColorMask, llColorMaskinv, llExpMask, llExpMaskinv, llSHMask, llSHMaskinv, llvibMask, lllcMask, llsharMask, llcbMask, llretiMask, llsoftMask, lltmMask, llblMask, lllogMask, ll_Mask, llcieMask, locwavCurveden, locwavdenutili);
14474+
14475+
float ksk = 1.f;
14476+
if(sk == 1) {
14477+
ksk = 0.86f;
14478+
} else if (sk == 2) {
14479+
ksk = 0.95f;
14480+
}
1447114481

1447214482
//avoidcolshi(lp, sp, transformed, reserved, cy, cx, sk);
1447314483

@@ -17348,7 +17358,7 @@ void ImProcFunctions::Lab_Local(
1734817358

1734917359
if (lp.strSH != 0.f && (call == ca1 || call == ca2 || call == ca3) && execgradsh) {//test to plain image
1735017360
calclocalGradientParams(call, lp, gp, ystart, xstart, yend, xend, bfw, bfh, oW, oH, tX, tY, tW, tH, 2, sk, fw, fh, cx, cy, ksk);
17351-
17361+
printf("KSK SH=%f\n", (double) ksk);
1735217362
#ifdef _OPENMP
1735317363
#pragma omp parallel for schedule(dynamic,16) if (multiThread)
1735417364
#endif

0 commit comments

Comments
 (0)