diff --git a/rtdata/languages/default b/rtdata/languages/default
index fdb1ebfe9..382e7dfaa 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -689,104 +689,108 @@ HISTORY_MSG_440;CbDL - Method
HISTORY_MSG_441;Retinex - Gain transmission
HISTORY_MSG_442;Retinex - Scale
HISTORY_MSG_443;Output Black Point Compensation
-HISTORY_MSG_444;Local L*a*b*
-HISTORY_MSG_445;Local - Bottom
-HISTORY_MSG_446;Local - Right
-HISTORY_MSG_447;Local - Center
-HISTORY_MSG_448;Local - Lightness/
-HISTORY_MSG_449;Local - Lightness
-HISTORY_MSG_450;Local - Contrast
-HISTORY_MSG_451;Local - Chrominance
-HISTORY_MSG_452;Local - Transition
-HISTORY_MSG_453;Local - Avoid color shift
-HISTORY_MSG_454;Local - Top
-HISTORY_MSG_455;Local - Left
-HISTORY_MSG_456;Local - Method
-HISTORY_MSG_457;Local - Color Inverse
-HISTORY_MSG_458;Local - Radius
-HISTORY_MSG_459;Local - Blur Inverse
-HISTORY_MSG_460;Local - Noise
-HISTORY_MSG_461;Local - Scope
-HISTORY_MSG_462;Local - Retinex method
-HISTORY_MSG_463;Local - Retinex strength
-HISTORY_MSG_464;Local - Retinex radius
-HISTORY_MSG_465;Local - Retinex contrast
-HISTORY_MSG_466;Local - Retinex Gain curve
-HISTORY_MSG_467;Local - Retinex chroma
-HISTORY_MSG_468;Local - Retinex Inverse
-HISTORY_MSG_469;Local - Hue scope
-HISTORY_MSG_470;Local - Spot
-HISTORY_MSG_471;Local - Blur Luminance only
-HISTORY_MSG_472;Local - Update GUI and Mip -1
-HISTORY_MSG_473;Local - Sh Radius
-HISTORY_MSG_474;Local - Sh Amount
-HISTORY_MSG_475;Local - Sh Damping
-HISTORY_MSG_476;Local - Sh Iterations
-HISTORY_MSG_477;Local - Sh Scope
-HISTORY_MSG_478;Local - Sh Inverse
-HISTORY_MSG_479;Local - Spot size
-HISTORY_MSG_480;Local - artifacts theshold
-HISTORY_MSG_481;Local - artifacts iterations
-HISTORY_MSG_482;Local - Quality
-HISTORY_MSG_483;Local - Noise lum f
-HISTORY_MSG_484;Local - Noise lum c
-HISTORY_MSG_485;Local - Noise chro f
-HISTORY_MSG_486;Local - Noise chro c
-HISTORY_MSG_487;Local - cbdl threshold
-HISTORY_MSG_488;Local - cbdl mult
-HISTORY_MSG_489;Local - cbdl scope
-HISTORY_MSG_490;Local - Blur scope
-HISTORY_MSG_491;Local - TM strength
-HISTORY_MSG_492;Local - TM gamma
-HISTORY_MSG_493;Local - TM edge stopping
-HISTORY_MSG_494;Local - TM scale
-HISTORY_MSG_495;Local - TM Reweighting
-HISTORY_MSG_496;Local - TM scope
-HISTORY_MSG_497;Local - Update GUI and Mip -2
-HISTORY_MSG_498;Local - Update GUI and Mip -3
-HISTORY_MSG_499;Local - LL Curve
-HISTORY_MSG_500;Local - Color and light
-HISTORY_MSG_501;Local - Blur and noise
-HISTORY_MSG_502;Local - Tone mapping
-HISTORY_MSG_503;Local - Retinex
-HISTORY_MSG_504;Local - Sharpening
-HISTORY_MSG_505;Local - CBDL
-HISTORY_MSG_506;Local - Denoise
-HISTORY_MSG_507;Local - LH Curve
-HISTORY_MSG_508;Local - Enable super
-HISTORY_MSG_509;Local - CC curve
-HISTORY_MSG_510;Local - curve method
-HISTORY_MSG_511;WB - Temp bias
-HISTORY_MSG_515;Raw Sub-Image
-HISTORY_MSG_516;EvPixelShiftMotion
-HISTORY_MSG_517;EvPixelShiftMotionCorrection
-HISTORY_MSG_518;EvPixelShiftStddevFactorGreen
-HISTORY_MSG_519;PS ISO adaption
-HISTORY_MSG_520;EvPixelShiftNreadIso
-HISTORY_MSG_521;EvPixelShiftPrnu
-HISTORY_MSG_522;PS Show motion
-HISTORY_MSG_523;PS Show mask only
-HISTORY_MSG_524;EvPixelShiftAutomatic
-HISTORY_MSG_525;EvPixelShiftNonGreenHorizontal
-HISTORY_MSG_526;EvPixelShiftNonGreenVertical
-HISTORY_MSG_527;PS Check red/blue
-HISTORY_MSG_528;EvPixelShiftStddevFactorRed
-HISTORY_MSG_529;EvPixelShiftStddevFactorBlue
-HISTORY_MSG_530;EvPixelShiftGreenAmaze
-HISTORY_MSG_531;EvPixelShiftNonGreenAmaze
-HISTORY_MSG_532;PS Check green
-HISTORY_MSG_533;EvPixelShiftRedBlueWeight
-HISTORY_MSG_534;PS Blur motion mask
-HISTORY_MSG_535;PS Blur radius
-HISTORY_MSG_536;EvPixelShiftSum
-HISTORY_MSG_537;EvPixelShiftExp0
-HISTORY_MSG_538;PS Fill holes
-HISTORY_MSG_539;PS Median
-HISTORY_MSG_540;EvPixelShiftMedian3
-HISTORY_MSG_541;PS Motion correction
-HISTORY_MSG_542;PS Smooth transitions
-HISTORY_MSG_543;PS Use lmmse
-HISTORY_MSG_544;PS Equalize
+HISTORY_MSG_444;WB - Temp bias
+HISTORY_MSG_445;Raw Sub-Image
+HISTORY_MSG_446;EvPixelShiftMotion
+HISTORY_MSG_447;EvPixelShiftMotionCorrection
+HISTORY_MSG_448;EvPixelShiftStddevFactorGreen
+HISTORY_MSG_449;PS ISO adaption
+HISTORY_MSG_450;EvPixelShiftNreadIso
+HISTORY_MSG_451;EvPixelShiftPrnu
+HISTORY_MSG_452;PS Show motion
+HISTORY_MSG_453;PS Show mask only
+HISTORY_MSG_454;EvPixelShiftAutomatic
+HISTORY_MSG_455;EvPixelShiftNonGreenHorizontal
+HISTORY_MSG_456;EvPixelShiftNonGreenVertical
+HISTORY_MSG_457;PS Check red/blue
+HISTORY_MSG_458;EvPixelShiftStddevFactorRed
+HISTORY_MSG_459;EvPixelShiftStddevFactorBlue
+HISTORY_MSG_460;EvPixelShiftGreenAmaze
+HISTORY_MSG_461;EvPixelShiftNonGreenAmaze
+HISTORY_MSG_462;PS Check green
+HISTORY_MSG_463;EvPixelShiftRedBlueWeight
+HISTORY_MSG_464;PS Blur motion mask
+HISTORY_MSG_465;PS Blur radius
+HISTORY_MSG_466;EvPixelShiftSum
+HISTORY_MSG_467;EvPixelShiftExp0
+HISTORY_MSG_468;PS Fill holes
+HISTORY_MSG_469;PS Median
+HISTORY_MSG_470;EvPixelShiftMedian3
+HISTORY_MSG_471;PS Motion correction
+HISTORY_MSG_472;PS Smooth transitions
+HISTORY_MSG_473;PS Use lmmse
+HISTORY_MSG_474;PS Equalize
+HISTORY_MSG_475;PS Equalize channel
+HISTORY_MSG_476;Local L*a*b*
+HISTORY_MSG_477;Local - Bottom
+HISTORY_MSG_478;Local - Right
+HISTORY_MSG_479;Local - Center
+HISTORY_MSG_480;Local - Lightness/
+HISTORY_MSG_481;Local - Lightness
+HISTORY_MSG_482;Local - Contrast
+HISTORY_MSG_483;Local - Chrominance
+HISTORY_MSG_484;Local - Transition
+HISTORY_MSG_485;Local - Avoid color shift
+HISTORY_MSG_486;Local - Top
+HISTORY_MSG_487;Local - Left
+HISTORY_MSG_488;Local - Method
+HISTORY_MSG_489;Local - Color Inverse
+HISTORY_MSG_490;Local - Radius
+HISTORY_MSG_491;Local - Blur Inverse
+HISTORY_MSG_492;Local - Noise
+HISTORY_MSG_493;Local - Scope
+HISTORY_MSG_494;Local - Retinex method
+HISTORY_MSG_495;Local - Retinex strength
+HISTORY_MSG_496;Local - Retinex radius
+HISTORY_MSG_497;Local - Retinex contrast
+HISTORY_MSG_498;Local - Retinex Gain curve
+HISTORY_MSG_499;Local - Retinex chroma
+HISTORY_MSG_500;Local - Retinex Inverse
+HISTORY_MSG_501;Local - Hue scope
+HISTORY_MSG_502;Local - Spot
+HISTORY_MSG_503;Local - Blur Luminance only
+HISTORY_MSG_504;Local - Update GUI and Mip -1
+HISTORY_MSG_505;Local - Sh Radius
+HISTORY_MSG_506;Local - Sh Amount
+HISTORY_MSG_507;Local - Sh Damping
+HISTORY_MSG_508;Local - Sh Iterations
+HISTORY_MSG_509;Local - Sh Scope
+HISTORY_MSG_510;Local - Sh Inverse
+HISTORY_MSG_511;Local - Spot size
+HISTORY_MSG_512;Local - artifacts theshold
+HISTORY_MSG_513;Local - artifacts iterations
+HISTORY_MSG_514;Local - Quality
+HISTORY_MSG_515;Local - Noise lum f
+HISTORY_MSG_516;Local - Noise lum c
+HISTORY_MSG_517;Local - Noise chro f
+HISTORY_MSG_518;Local - Noise chro c
+HISTORY_MSG_519;Local - cbdl threshold
+HISTORY_MSG_520;Local - cbdl mult
+HISTORY_MSG_521;Local - cbdl scope
+HISTORY_MSG_522;Local - Blur scope
+HISTORY_MSG_523;Local - TM strength
+HISTORY_MSG_524;Local - TM gamma
+HISTORY_MSG_525;Local - TM edge stopping
+HISTORY_MSG_526;Local - TM scale
+HISTORY_MSG_527;Local - TM Reweighting
+HISTORY_MSG_528;Local - TM scope
+HISTORY_MSG_529;Local - Update GUI and Mip -2
+HISTORY_MSG_530;Local - Update GUI and Mip -3
+HISTORY_MSG_531;Local - LL Curve
+HISTORY_MSG_532;Local - Color and light
+HISTORY_MSG_533;Local - Blur and noise
+HISTORY_MSG_534;Local - Tone mapping
+HISTORY_MSG_535;Local - Retinex
+HISTORY_MSG_536;Local - Sharpening
+HISTORY_MSG_537;Local - CBDL
+HISTORY_MSG_538;Local - Denoise
+HISTORY_MSG_539;Local - LH Curve
+HISTORY_MSG_540;Local - Enable super
+HISTORY_MSG_541;Local - CC curve
+HISTORY_MSG_542;Local - curve method
+HISTORY_MSG_543;Local - hueref
+HISTORY_MSG_544;Local - chromaref
+HISTORY_MSG_545;Local - lumaref
HISTORY_NEWSNAPSHOT;Add
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s
HISTORY_SNAPSHOT;Snapshot
@@ -1889,6 +1893,8 @@ TP_RAW_PIXELSHIFTEPERISO;ISO adaption
TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value (0.0) should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing.
TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames
TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction.
+TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel
+TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the channels (RGB) individually.\nDisabled: Use same equalization factor for all channels.
TP_RAW_PIXELSHIFTEXP0;Experimental
TP_RAW_PIXELSHIFTGREEN;Check green channel for motion
TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask
diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc
index eca373337..330741630 100644
--- a/rtengine/dcraw.cc
+++ b/rtengine/dcraw.cc
@@ -2,7 +2,6 @@
#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"
@@ -1855,13 +1854,12 @@ void CLASS parse_hasselblad_gain()
not be seen as clipped).
*/
- ushort raw_h;
int offset;
off_t base;
base = ftell(ifp);
fseek(ifp, 2 * 23, SEEK_CUR);
- raw_h = get2();
+ get2();
fseek(ifp, 48, SEEK_CUR);
offset = get4();
hbd.levels = offset ? base + offset : 0;
@@ -6700,7 +6698,7 @@ void CLASS parse_sinar_ia()
void CLASS parse_phase_one (int base)
{
- unsigned entries, tag, type, len, data, save, i, c;
+ unsigned entries, tag, len, data, save, i, c;
float romm_cam[3][3];
char *cp;
@@ -6713,7 +6711,7 @@ void CLASS parse_phase_one (int base)
get4();
while (entries--) {
tag = get4();
- type = get4();
+ get4();
len = get4();
data = get4();
save = ftell(ifp);
diff --git a/rtengine/pixelshift.cc b/rtengine/pixelshift.cc
index 0a6d24688..835aa7631 100644
--- a/rtengine/pixelshift.cc
+++ b/rtengine/pixelshift.cc
@@ -304,6 +304,29 @@ void floodFill4(int xStart, int xEnd, int yStart, int yEnd, array2D &ma
}
}
+void calcFrameBrightnessFactor(unsigned int frame, uint32_t datalen, LUT *histo[4], float brightnessFactor[4])
+{
+ float medians[4];
+ for(int i = 0; i < 4; ++i) {
+ //find median of histogram
+ uint32_t median = 0, count = 0;
+
+ while (count < datalen / 2) {
+ count += (*histo[i])[median];
+ ++median;
+ }
+
+ const float weight = (count - datalen / 2.f) / (*histo[i])[median - 1];
+ medians[i] = rtengine::intp(weight, (float)(median - 2), (float)(median - 1));
+ }
+
+ for(int i = 0; i < 4; ++i) {
+ brightnessFactor[i] = medians[frame] / medians[i];
+ }
+
+}
+
+
}
using namespace std;
@@ -372,7 +395,7 @@ void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, const RA
multi_array2D redTmp(W,H);
multi_array2D greenTmp(W,H);
multi_array2D blueTmp(W,H);
- for(int i=0, frameIndex = 0;i<4;++i) {
+ for(unsigned int i=0, frameIndex = 0;i<4;++i) {
if(i != currFrame) {
if(bayerParams.pixelShiftLmmse) {
lmmse_interpolate_omp(winw, winh, *(rawDataFrames[i]), redTmp[frameIndex], greenTmp[frameIndex], blueTmp[frameIndex], bayerParams.lmmse_iterations);
@@ -487,12 +510,12 @@ void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, const RA
const bool checkNonGreenCross2 = bayerParams.pixelShiftNonGreenCross2;
const float threshold = bayerParams.pixelShiftSum + 9.f;
const bool experimental0 = bayerParams.pixelShiftExp0;
- const bool automatic = bayerParams.pixelShiftMotionCorrectionMethod == RAWParams::BayerSensor::Automatic;
#else
constexpr float threshold = 3.f + 9.f;
#endif
const bool holeFill = bayerParams.pixelShiftHoleFill;
const bool equalBrightness = bayerParams.pixelShiftEqualBright;
+ const bool equalChannel = bayerParams.pixelShiftEqualBrightChannel;
const bool smoothTransitions = blurMap && bayerParams.pixelShiftSmoothFactor > 0. && !showOnlyMask;
const float smoothFactor = 1.0 - bayerParams.pixelShiftSmoothFactor;
@@ -741,24 +764,38 @@ void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, const RA
// calculate average green brightness for each frame
float greenBrightness[4] = {1.f, 1.f, 1.f, 1.f};
+ float redBrightness[4] = {1.f, 1.f, 1.f, 1.f};
+ float blueBrightness[4] = {1.f, 1.f, 1.f, 1.f};
if(equalBrightness) {
- LUT *histo[4];
+ LUT *histogreen[4];
+ LUT *histored[4];
+ LUT *histoblue[4];
for(int i = 0; i < 4; ++i) {
- histo[i] = new LUT(65536);
- histo[i]->clear();
+ histogreen[i] = new LUT(65536);
+ histogreen[i]->clear();
+ histored[i] = new LUT(65536);
+ histored[i]->clear();
+ histoblue[i] = new LUT(65536);
+ histoblue[i]->clear();
}
#ifdef _OPENMP
#pragma omp parallel
#endif
{
- LUT *histoThr[4];
+ LUT *histogreenThr[4];
+ LUT *historedThr[4];
+ LUT *histoblueThr[4];
for(int i = 0; i < 4; ++i) {
- histoThr[i] = new LUT(65536);
- histoThr[i]->clear();
+ histogreenThr[i] = new LUT(65536);
+ histogreenThr[i]->clear();
+ historedThr[i] = new LUT(65536);
+ historedThr[i]->clear();
+ histoblueThr[i] = new LUT(65536);
+ histoblueThr[i]->clear();
}
#ifdef _OPENMP
@@ -766,44 +803,51 @@ void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, const RA
#endif
for(int i = winy + 1; i < winh - 1; ++i) {
+ int j = winx + 1;
+ int c = FC(i, j);
+
+ bool bluerow = (c + FC(i, j + 1)) == 3;
+
for(int j = winx + 1, offset = FC(i, j) & 1; j < winw - 1; ++j, offset ^= 1) {
- (*histoThr[1 - offset])[(*rawDataFrames[1 - offset])[i - offset + 1][j]]++;
- (*histoThr[3 - offset])[(*rawDataFrames[3 - offset])[i + offset][j + 1]]++;
+ (*histogreenThr[1 - offset])[(*rawDataFrames[1 - offset])[i - offset + 1][j]]++;
+ (*histogreenThr[3 - offset])[(*rawDataFrames[3 - offset])[i + offset][j + 1]]++;
+ if(bluerow) {
+ (*historedThr[2 - offset])[(*rawDataFrames[2 - offset])[i + 1][j - offset + 1]]++;
+ (*histoblueThr[(offset << 1) + offset])[(*rawDataFrames[(offset << 1) + offset])[i][j + offset]]++;
+ } else {
+ (*historedThr[(offset << 1) + offset])[(*rawDataFrames[(offset << 1) + offset])[i][j + offset]]++;
+ (*histoblueThr[2 - offset])[(*rawDataFrames[2 - offset])[i + 1][j - offset + 1]]++;
+ }
}
}
#pragma omp critical
{
for(int i = 0; i < 4; ++i) {
- (*histo[i]) += (*histoThr[i]);
- delete histoThr[i];
+ (*histogreen[i]) += (*histogreenThr[i]);
+ delete histogreenThr[i];
+ (*histored[i]) += (*historedThr[i]);
+ delete historedThr[i];
+ (*histoblue[i]) += (*histoblueThr[i]);
+ delete histoblueThr[i];
}
}
}
- float medians[4];
+ calcFrameBrightnessFactor(frame, (winh - 2) * (winw - 2) / 4, histored, redBrightness);
+ calcFrameBrightnessFactor(frame, (winh - 2) * (winw - 2) / 4, histoblue, blueBrightness);
+ calcFrameBrightnessFactor(frame, (winh - 2) * (winw - 2) / 2, histogreen, greenBrightness);
for(int i = 0; i < 4; ++i) {
- //find median of histogram
- uint32_t median = 0, count = 0;
- uint32_t datalen = (winh - 2) * (winw - 2) / 2;
-
- while (count < datalen / 2) {
- count += (*histo[i])[median];
- ++median;
- }
-
- const float weight = (count - datalen / 2.f) / (*histo[i])[median - 1];
- medians[i] = intp(weight, (float)(median - 2), (float)(median - 1));
- delete histo[i];
- }
-
- for(int i = 0; i < 4; ++i) {
- greenBrightness[i] = medians[frame] / medians[i];
+ delete histored[i];
+ delete histoblue[i];
+ delete histogreen[i];
}
#ifdef PIXELSHIFTDEV
- std::cout << "brightness factors by median : " << greenBrightness[0] << " " << greenBrightness[1] << " " << greenBrightness[2] << " " << greenBrightness[3] << std::endl;
+ std::cout << "blue brightness factors by median : " << blueBrightness[0] << " " << blueBrightness[1] << " " << blueBrightness[2] << " " << blueBrightness[3] << std::endl;
+ std::cout << "red brightness factors by median : " << redBrightness[0] << " " << redBrightness[1] << " " << redBrightness[2] << " " << redBrightness[3] << std::endl;
+ std::cout << "green brightness factors by median : " << greenBrightness[0] << " " << greenBrightness[1] << " " << greenBrightness[2] << " " << greenBrightness[3] << std::endl;
#endif
}
@@ -814,6 +858,12 @@ void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, const RA
array2D psG2(winw + 32, winh);
array2D psBlue(winw + 32, winh);
+ if(!equalChannel) {
+ for(int i = 0; i < 4; ++i ) {
+ redBrightness[i] = blueBrightness[i] = greenBrightness[i];
+ }
+ }
+
// fill channels psRed, psG1, psG2 and psBlue
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@@ -824,6 +874,10 @@ void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, const RA
float *greenDest2 = psG2[i];
float *nonGreenDest0 = psRed[i];
float *nonGreenDest1 = psBlue[i];
+ float ngbright[2][4] = {{redBrightness[0],redBrightness[1],redBrightness[2],redBrightness[3]},
+ {blueBrightness[0],blueBrightness[1],blueBrightness[2],blueBrightness[3]}
+ };
+ int ng = 0;
int j = winx + 1;
int c = FC(i, j);
@@ -831,6 +885,7 @@ void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, const RA
// row with blue pixels => swap destination pointers for non green pixels
std::swap(nonGreenDest0, nonGreenDest1);
std::swap(greenDest1, greenDest2);
+ ng ^= 1;
}
// offset to keep the code short. It changes its value between 0 and 1 for each iteration of the loop
@@ -840,8 +895,8 @@ void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, const RA
// store the values from the 4 frames into 4 different temporary planes
greenDest1[j] = (*rawDataFrames[1 - offset])[i - offset + 1][j] * greenBrightness[1 - offset];
greenDest2[j] = (*rawDataFrames[3 - offset])[i + offset][j + 1] * greenBrightness[3 - offset];
- nonGreenDest0[j] = (*rawDataFrames[(offset << 1) + offset])[i][j + offset] * greenBrightness[(offset << 1) + offset];
- nonGreenDest1[j] = (*rawDataFrames[2 - offset])[i + 1][j - offset + 1] * greenBrightness[2 - offset];
+ nonGreenDest0[j] = (*rawDataFrames[(offset << 1) + offset])[i][j + offset] * ngbright[ng][(offset << 1) + offset];
+ nonGreenDest1[j] = (*rawDataFrames[2 - offset])[i + 1][j - offset + 1] * ngbright[ng^1][2 - offset];
offset ^= 1; // 0 => 1 or 1 => 0
}
}
diff --git a/rtengine/procevents.h b/rtengine/procevents.h
index 79d73c19d..a282830a2 100644
--- a/rtengine/procevents.h
+++ b/rtengine/procevents.h
@@ -470,107 +470,108 @@ enum ProcEvent {
EvRetinexgaintransmission = 440,
EvLskal = 441,
EvOBPCompens = 442,
- EvlocallabEnabled = 443,
- EvlocallablocY = 444,
- EvlocallablocX = 445,
- EvlocallabCenter = 446,
- EvlocallabDegree = 447,
- Evlocallablightness = 448,
- Evlocallabcontrast = 449,
- Evlocallabchroma = 450,
- Evlocallabtransit = 451,
- Evlocallabavoid = 452,
- EvlocallablocYT = 453,
- EvlocallablocXL = 454,
- EvlocallabSmet = 455,
- Evlocallabinvers = 456,
- Evlocallabradius = 457,
- Evlocallabinversrad = 458,
- Evlocallabstrength = 459,
- Evlocallabsensi = 460,
- EvlocallabretinexMethod = 461,
- Evlocallabstr = 462,
- Evlocallabneigh = 463,
- Evlocallabvart = 464,
- EvlocallabCTgainCurve = 465,
- Evlocallabchrrt = 466,
- Evlocallabinversret = 467,
- Evlocallabsensih = 468,
- Evlocallabnbspot = 469,
- Evlocallabactivlum = 470,
- Evlocallabanbspot = 471,
- Evlocallabsharradius = 472,
- Evlocallabsharamount = 473,
- Evlocallabshardamping = 474,
- Evlocallabshariter = 475,
- Evlocallabsensis = 476,
- Evlocallabinverssha = 477,
- Evlocallabcircrad = 478,
- Evlocallabthres = 479,
- Evlocallabproxi = 480,
- EvlocallabqualityMethod = 481,
- Evlocallabnoiselumf = 482,
- Evlocallabnoiselumc = 483,
- Evlocallabnoisechrof = 484,
- Evlocallabnoisechroc = 485,
- EvlocallabThresho = 486,
- EvlocallabEqualizer = 487,
- Evlocallabsensicb = 488,
- Evlocallabsensibn = 489,
- Evlocallabstren = 490,
- Evlocallabgamma = 491,
- Evlocallabestop = 492,
- Evlocallabscaltm = 493,
- Evlocallabrewei = 494,
- Evlocallabsensitm = 495,
- EvlocallabCTgainCurverab = 496,
- Evlocallabretrab = 497,
- Evlocallabllshape = 498,
- EvLocenacolor = 499,
- EvLocenablur = 500,
- EvLocenatonemap = 501,
- EvLocenareti = 502,
- EvLocenasharp = 503,
- EvLocenacbdl = 504,
- EvLocenadenoi = 505,
- EvlocallabLHshape = 506,
- Evlocallabcurvactiv = 507,
- Evlocallabccshape = 508,
- EvlocallabqualitycurveMethod = 509,
- EvWBtempBias = 510,
- Evlocallabhueref = 511,
- Evlocallabchromaref = 512,
- Evlocallablumaref = 513,
- EvRawImageNum = 514,
- EvPixelShiftMotion = 515,
- EvPixelShiftMotionCorrection = 516,
- EvPixelShiftStddevFactorGreen = 517,
- EvPixelShiftEperIso = 518,
- EvPixelShiftNreadIso = 519,
- EvPixelShiftPrnu = 520,
- EvPixelshiftShowMotion = 521,
- EvPixelshiftShowMotionMaskOnly = 522,
- EvPixelShiftAutomatic = 523,
- EvPixelShiftNonGreenHorizontal = 524,
- EvPixelShiftNonGreenVertical = 525,
- EvPixelShiftNonGreenCross = 526,
- EvPixelShiftStddevFactorRed = 527,
- EvPixelShiftStddevFactorBlue = 528,
- EvPixelShiftGreenAmaze = 529,
- EvPixelShiftNonGreenAmaze = 530,
- EvPixelShiftGreen = 531,
- EvPixelShiftRedBlueWeight = 532,
- EvPixelShiftBlur = 533,
- EvPixelShiftSigma = 534,
- EvPixelShiftSum = 535,
- EvPixelShiftExp0 = 536,
- EvPixelShiftHoleFill = 537,
- EvPixelShiftMedian = 538,
- EvPixelShiftMedian3 = 539,
- EvPixelShiftMotionMethod = 540,
- EvPixelShiftSmooth = 541,
- EvPixelShiftLmmse = 542,
- EvPixelShiftEqualBright = 543,
+ EvWBtempBias = 443,
+ EvRawImageNum = 444,
+ EvPixelShiftMotion = 445,
+ EvPixelShiftMotionCorrection = 446,
+ EvPixelShiftStddevFactorGreen = 447,
+ EvPixelShiftEperIso = 448,
+ EvPixelShiftNreadIso = 449,
+ EvPixelShiftPrnu = 450,
+ EvPixelshiftShowMotion = 451,
+ EvPixelshiftShowMotionMaskOnly = 452,
+ EvPixelShiftAutomatic = 453,
+ EvPixelShiftNonGreenHorizontal = 454,
+ EvPixelShiftNonGreenVertical = 455,
+ EvPixelShiftNonGreenCross = 456,
+ EvPixelShiftStddevFactorRed = 457,
+ EvPixelShiftStddevFactorBlue = 458,
+ EvPixelShiftGreenAmaze = 459,
+ EvPixelShiftNonGreenAmaze = 460,
+ EvPixelShiftGreen = 461,
+ EvPixelShiftRedBlueWeight = 462,
+ EvPixelShiftBlur = 463,
+ EvPixelShiftSigma = 464,
+ EvPixelShiftSum = 465,
+ EvPixelShiftExp0 = 466,
+ EvPixelShiftHoleFill = 467,
+ EvPixelShiftMedian = 468,
+ EvPixelShiftMedian3 = 469,
+ EvPixelShiftMotionMethod = 470,
+ EvPixelShiftSmooth = 471,
+ EvPixelShiftLmmse = 472,
+ EvPixelShiftEqualBright = 473,
+ EvPixelShiftEqualBrightChannel = 474,
+ EvlocallabEnabled = 475,
+ EvlocallablocY = 476,
+ EvlocallablocX = 477,
+ EvlocallabCenter = 478,
+ EvlocallabDegree = 479,
+ Evlocallablightness = 480,
+ Evlocallabcontrast = 481,
+ Evlocallabchroma = 482,
+ Evlocallabtransit = 483,
+ Evlocallabavoid = 484,
+ EvlocallablocYT = 485,
+ EvlocallablocXL = 486,
+ EvlocallabSmet = 487,
+ Evlocallabinvers = 488,
+ Evlocallabradius = 489,
+ Evlocallabinversrad = 490,
+ Evlocallabstrength = 491,
+ Evlocallabsensi = 492,
+ EvlocallabretinexMethod = 493,
+ Evlocallabstr = 494,
+ Evlocallabneigh = 495,
+ Evlocallabvart = 496,
+ EvlocallabCTgainCurve = 497,
+ Evlocallabchrrt = 498,
+ Evlocallabinversret = 499,
+ Evlocallabsensih = 500,
+ Evlocallabnbspot = 501,
+ Evlocallabactivlum = 502,
+ Evlocallabanbspot = 503,
+ Evlocallabsharradius = 504,
+ Evlocallabsharamount = 505,
+ Evlocallabshardamping = 506,
+ Evlocallabshariter = 507,
+ Evlocallabsensis = 508,
+ Evlocallabinverssha = 509,
+ Evlocallabcircrad = 510,
+ Evlocallabthres = 511,
+ Evlocallabproxi = 512,
+ EvlocallabqualityMethod = 513,
+ Evlocallabnoiselumf = 514,
+ Evlocallabnoiselumc = 515,
+ Evlocallabnoisechrof = 516,
+ Evlocallabnoisechroc = 517,
+ EvlocallabThresho = 518,
+ EvlocallabEqualizer = 519,
+ Evlocallabsensicb = 520,
+ Evlocallabsensibn = 521,
+ Evlocallabstren = 522,
+ Evlocallabgamma = 523,
+ Evlocallabestop = 524,
+ Evlocallabscaltm = 525,
+ Evlocallabrewei = 526,
+ Evlocallabsensitm = 527,
+ EvlocallabCTgainCurverab = 528,
+ Evlocallabretrab = 529,
+ Evlocallabllshape = 530,
+ EvLocenacolor = 531,
+ EvLocenablur = 532,
+ EvLocenatonemap = 533,
+ EvLocenareti = 534,
+ EvLocenasharp = 535,
+ EvLocenacbdl = 536,
+ EvLocenadenoi = 537,
+ EvlocallabLHshape = 538,
+ Evlocallabcurvactiv = 539,
+ Evlocallabccshape = 540,
+ EvlocallabqualitycurveMethod = 541,
+ Evlocallabhueref = 542,
+ Evlocallabchromaref = 543,
+ Evlocallablumaref = 544,
NUMOFEVENTS
diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc
index ae1ec9ba8..19c9c576a 100644
--- a/rtengine/procparams.cc
+++ b/rtengine/procparams.cc
@@ -900,6 +900,7 @@ void RAWParams::BayerSensor::setPixelShiftDefaults()
pixelShiftExp0 = false;
pixelShiftLmmse = false;
pixelShiftEqualBright = false;
+ pixelShiftEqualBrightChannel = false;
pixelShiftNonGreenCross = true;
pixelShiftNonGreenCross2 = false;
pixelShiftNonGreenAmaze = false;
@@ -3989,6 +3990,10 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b
keyFile.set_boolean ("RAW Bayer", "pixelShiftEqualBright", raw.bayersensor.pixelShiftEqualBright );
}
+ if (!pedited || pedited->raw.bayersensor.pixelShiftEqualBrightChannel) {
+ keyFile.set_boolean ("RAW Bayer", "pixelShiftEqualBrightChannel", raw.bayersensor.pixelShiftEqualBrightChannel );
+ }
+
if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenCross) {
keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenCross", raw.bayersensor.pixelShiftNonGreenCross );
}
@@ -8861,6 +8866,14 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited)
}
}
+ if (keyFile.has_key ("RAW Bayer", "pixelShiftEqualBrightChannel")) {
+ raw.bayersensor.pixelShiftEqualBrightChannel = keyFile.get_boolean("RAW Bayer", "pixelShiftEqualBrightChannel");
+
+ if (pedited) {
+ pedited->raw.bayersensor.pixelShiftEqualBrightChannel = true;
+ }
+ }
+
if (keyFile.has_key ("RAW Bayer", "pixelShiftNonGreenCross")) {
raw.bayersensor.pixelShiftNonGreenCross = keyFile.get_boolean("RAW Bayer", "pixelShiftNonGreenCross");
@@ -9435,6 +9448,7 @@ bool ProcParams::operator== (const ProcParams& other)
&& raw.bayersensor.pixelShiftExp0 == other.raw.bayersensor.pixelShiftExp0
&& raw.bayersensor.pixelShiftLmmse == other.raw.bayersensor.pixelShiftLmmse
&& raw.bayersensor.pixelShiftEqualBright == other.raw.bayersensor.pixelShiftEqualBright
+ && raw.bayersensor.pixelShiftEqualBrightChannel == other.raw.bayersensor.pixelShiftEqualBrightChannel
&& raw.bayersensor.pixelShiftNonGreenCross == other.raw.bayersensor.pixelShiftNonGreenCross
&& raw.bayersensor.pixelShiftNonGreenCross2 == other.raw.bayersensor.pixelShiftNonGreenCross2
&& raw.bayersensor.pixelShiftNonGreenAmaze == other.raw.bayersensor.pixelShiftNonGreenAmaze
diff --git a/rtengine/procparams.h b/rtengine/procparams.h
index 8b341269e..e9cf691ce 100644
--- a/rtengine/procparams.h
+++ b/rtengine/procparams.h
@@ -1337,6 +1337,7 @@ public:
bool pixelShiftExp0;
bool pixelShiftLmmse;
bool pixelShiftEqualBright;
+ bool pixelShiftEqualBrightChannel;
bool pixelShiftNonGreenCross;
bool pixelShiftNonGreenCross2;
bool pixelShiftNonGreenAmaze;
diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc
index 85c9ee481..40bcba548 100644
--- a/rtengine/refreshmap.cc
+++ b/rtengine/refreshmap.cc
@@ -470,6 +470,38 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
RETINEX, // EvRetinexgaintransmission
RETINEX, // EvLskal
OUTPUTPROFILE, // EvOBPCompens
+ ALLNORAW, // EvWBtempBias
+ DARKFRAME, // EvRawImageNum
+ DEMOSAIC, // EvPixelShiftMotion
+ DEMOSAIC, // EvPixelShiftMotionCorrection
+ DEMOSAIC, // EvPixelShiftStddevFactorGreen
+ DEMOSAIC, // EvPixelShiftEperIso
+ DEMOSAIC, // EvPixelShiftNreadIso
+ DEMOSAIC, // EvPixelShiftPrnu
+ DEMOSAIC, // EvPixelshiftShowMotion
+ DEMOSAIC, // EvPixelshiftShowMotionMaskOnly
+ DEMOSAIC, // EvPixelShiftAutomatic
+ DEMOSAIC, // EvPixelShiftNonGreenHorizontal
+ DEMOSAIC, // EvPixelShiftNonGreenVertical
+ DEMOSAIC, // EvPixelShiftNonGreenCross
+ DEMOSAIC, // EvPixelShiftStddevFactorRed
+ DEMOSAIC, // EvPixelShiftStddevFactorBlue
+ DEMOSAIC, // EvPixelShiftNonGreenCross2
+ DEMOSAIC, // EvPixelShiftNonGreenAmaze
+ DEMOSAIC, // EvPixelShiftGreen
+ DEMOSAIC, // EvPixelShiftRedBlueWeight
+ DEMOSAIC, // EvPixelShiftBlur
+ DEMOSAIC, // EvPixelShiftSigma
+ DEMOSAIC, // EvPixelShiftSum
+ DEMOSAIC, // EvPixelShiftExp0
+ DEMOSAIC, // EvPixelShiftHoleFill
+ DEMOSAIC, // EvPixelShiftMedian
+ DEMOSAIC, // EvPixelShiftMedian3
+ DEMOSAIC, // EvPixelShiftMotionMethod
+ DEMOSAIC, // EvPixelShiftSmooth
+ DEMOSAIC, // EvPixelShiftLmmse
+ DEMOSAIC, // EvPixelShiftEqualBright
+ DEMOSAIC, // EvPixelShiftEqualBrightChannel
LUMINANCECURVE, // EvlocallabEnabled
LUMINANCECURVE, // EvlocallablocY
LUMINANCECURVE, // EvlocallablocX
@@ -539,38 +571,6 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, // EvlocallabqualitycurveMethod
LUMINANCECURVE, // Evlocallabhueref
LUMINANCECURVE, // Evlocallabchromaref
- LUMINANCECURVE, // Evlocallablumaref
- ALLNORAW, // EvWBtempBias
- DARKFRAME, // EvRawImageNum
- DEMOSAIC, // EvPixelShiftMotion
- DEMOSAIC, // EvPixelShiftMotionCorrection
- DEMOSAIC, // EvPixelShiftStddevFactorGreen
- DEMOSAIC, // EvPixelShiftEperIso
- DEMOSAIC, // EvPixelShiftNreadIso
- DEMOSAIC, // EvPixelShiftPrnu
- DEMOSAIC, // EvPixelshiftShowMotion
- DEMOSAIC, // EvPixelshiftShowMotionMaskOnly
- DEMOSAIC, // EvPixelShiftAutomatic
- DEMOSAIC, // EvPixelShiftNonGreenHorizontal
- DEMOSAIC, // EvPixelShiftNonGreenVertical
- DEMOSAIC, // EvPixelShiftNonGreenCross
- DEMOSAIC, // EvPixelShiftStddevFactorRed
- DEMOSAIC, // EvPixelShiftStddevFactorBlue
- DEMOSAIC, // EvPixelShiftNonGreenCross2
- DEMOSAIC, // EvPixelShiftNonGreenAmaze
- DEMOSAIC, // EvPixelShiftGreen
- DEMOSAIC, // EvPixelShiftRedBlueWeight
- DEMOSAIC, // EvPixelShiftBlur
- DEMOSAIC, // EvPixelShiftSigma
- DEMOSAIC, // EvPixelShiftSum
- DEMOSAIC, // EvPixelShiftExp0
- DEMOSAIC, // EvPixelShiftHoleFill
- DEMOSAIC, // EvPixelShiftMedian
- DEMOSAIC, // EvPixelShiftMedian3
- DEMOSAIC, // EvPixelShiftMotionMethod
- DEMOSAIC, // EvPixelShiftSmooth
- DEMOSAIC, // EvPixelShiftLmmse
- DEMOSAIC // EvPixelShiftEqualBright
-
+ LUMINANCECURVE // Evlocallablumaref
};
diff --git a/rtgui/bayerprocess.cc b/rtgui/bayerprocess.cc
index bc2809971..eee97c2ad 100644
--- a/rtgui/bayerprocess.cc
+++ b/rtgui/bayerprocess.cc
@@ -101,6 +101,11 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA
pixelShiftEqualBright->set_tooltip_text (M("TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP"));
pixelShiftFrame->pack_start(*pixelShiftEqualBright);
+ pixelShiftEqualBrightChannel = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL"), multiImage));
+ pixelShiftEqualBrightChannel->setCheckBoxListener (this);
+ pixelShiftEqualBrightChannel->set_tooltip_text (M("TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP"));
+ pixelShiftFrame->pack_start(*pixelShiftEqualBrightChannel);
+
Gtk::HBox* hb3 = Gtk::manage (new Gtk::HBox ());
hb3->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_PIXELSHIFTMOTIONMETHOD") + ": ")), Gtk::PACK_SHRINK, 4);
pixelShiftMotionMethod = Gtk::manage (new MyComboBoxText ());
@@ -372,6 +377,8 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
pixelShiftSmooth->setValue (pp->raw.bayersensor.pixelShiftSmoothFactor);
pixelShiftLmmse->setValue (pp->raw.bayersensor.pixelShiftLmmse);
pixelShiftEqualBright->setValue (pp->raw.bayersensor.pixelShiftEqualBright);
+ pixelShiftEqualBrightChannel->set_sensitive (pp->raw.bayersensor.pixelShiftEqualBright);
+ pixelShiftEqualBrightChannel->setValue (pp->raw.bayersensor.pixelShiftEqualBrightChannel);
pixelShiftNonGreenCross->setValue (pp->raw.bayersensor.pixelShiftNonGreenCross);
ccSteps->setValue (pp->raw.bayersensor.ccSteps);
lmmseIterations->setValue (pp->raw.bayersensor.lmmse_iterations);
@@ -421,6 +428,7 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
pixelShiftSmooth->setEditedState ( pedited->raw.bayersensor.pixelShiftSmooth ? Edited : UnEdited);
pixelShiftLmmse->setEdited (pedited->raw.bayersensor.pixelShiftLmmse);
pixelShiftEqualBright->setEdited (pedited->raw.bayersensor.pixelShiftEqualBright);
+ pixelShiftEqualBrightChannel->setEdited (pedited->raw.bayersensor.pixelShiftEqualBrightChannel);
pixelShiftNonGreenCross->setEdited (pedited->raw.bayersensor.pixelShiftNonGreenCross);
lmmseIterations->setEditedState ( pedited->raw.bayersensor.lmmseIterations ? Edited : UnEdited);
pixelShiftEperIso->setEditedState ( pedited->raw.bayersensor.pixelShiftEperIso ? Edited : UnEdited);
@@ -524,6 +532,7 @@ void BayerProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pe
pp->raw.bayersensor.pixelShiftSmoothFactor = pixelShiftSmooth->getValue();
pp->raw.bayersensor.pixelShiftLmmse = pixelShiftLmmse->getLastActive ();
pp->raw.bayersensor.pixelShiftEqualBright = pixelShiftEqualBright->getLastActive ();
+ pp->raw.bayersensor.pixelShiftEqualBrightChannel = pixelShiftEqualBrightChannel->getLastActive ();
pp->raw.bayersensor.pixelShiftNonGreenCross = pixelShiftNonGreenCross->getLastActive ();
#ifdef PIXELSHIFTDEV
pp->raw.bayersensor.pixelShiftStddevFactorGreen = pixelShiftStddevFactorGreen->getValue();
@@ -575,6 +584,7 @@ void BayerProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pe
pedited->raw.bayersensor.pixelShiftSmooth = pixelShiftSmooth->getEditedState();
pedited->raw.bayersensor.pixelShiftLmmse = !pixelShiftLmmse->get_inconsistent();
pedited->raw.bayersensor.pixelShiftEqualBright = !pixelShiftEqualBright->get_inconsistent();
+ pedited->raw.bayersensor.pixelShiftEqualBrightChannel = !pixelShiftEqualBrightChannel->get_inconsistent();
pedited->raw.bayersensor.pixelShiftNonGreenCross = !pixelShiftNonGreenCross->get_inconsistent();
#ifdef PIXELSHIFTDEV
pedited->raw.bayersensor.pixelShiftStddevFactorGreen = pixelShiftStddevFactorGreen->getEditedState ();
@@ -839,9 +849,16 @@ void BayerProcess::checkBoxToggled (CheckBox* c, CheckValue newval)
listener->panelChanged (EvPixelShiftLmmse, pixelShiftLmmse->getValueAsStr ());
}
} else if (c == pixelShiftEqualBright) {
+ if (!batchMode) {
+ pixelShiftEqualBrightChannel->set_sensitive(newval != CheckValue::off);
+ }
if (listener) {
listener->panelChanged (EvPixelShiftEqualBright, pixelShiftEqualBright->getValueAsStr ());
}
+ } else if (c == pixelShiftEqualBrightChannel) {
+ if (listener) {
+ listener->panelChanged (EvPixelShiftEqualBrightChannel, pixelShiftEqualBrightChannel->getValueAsStr ());
+ }
} else if (c == pixelShiftNonGreenCross) {
if (listener) {
listener->panelChanged (EvPixelShiftNonGreenCross, pixelShiftNonGreenCross->getValueAsStr ());
diff --git a/rtgui/bayerprocess.h b/rtgui/bayerprocess.h
index 8f6e794d0..3d15802a5 100644
--- a/rtgui/bayerprocess.h
+++ b/rtgui/bayerprocess.h
@@ -51,6 +51,7 @@ protected:
CheckBox* pixelShiftMedian;
CheckBox* pixelShiftLmmse;
CheckBox* pixelShiftEqualBright;
+ CheckBox* pixelShiftEqualBrightChannel;
Adjuster* pixelShiftSmooth;
Adjuster* pixelShiftEperIso;
Adjuster* pixelShiftSigma;
diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc
index 35c1b83de..e63717f51 100644
--- a/rtgui/paramsedited.cc
+++ b/rtgui/paramsedited.cc
@@ -473,6 +473,7 @@ void ParamsEdited::set (bool v)
raw.bayersensor.pixelShiftExp0 = v;
raw.bayersensor.pixelShiftLmmse = v;
raw.bayersensor.pixelShiftEqualBright = v;
+ raw.bayersensor.pixelShiftEqualBrightChannel = v;
raw.bayersensor.pixelShiftNonGreenCross = v;
raw.bayersensor.pixelShiftNonGreenCross2 = v;
raw.bayersensor.pixelShiftNonGreenAmaze = v;
@@ -1074,6 +1075,7 @@ void ParamsEdited::initFrom (const std::vector
raw.bayersensor.pixelShiftExp0 = raw.bayersensor.pixelShiftExp0 && p.raw.bayersensor.pixelShiftExp0 == other.raw.bayersensor.pixelShiftExp0;
raw.bayersensor.pixelShiftLmmse = raw.bayersensor.pixelShiftLmmse && p.raw.bayersensor.pixelShiftLmmse == other.raw.bayersensor.pixelShiftLmmse;
raw.bayersensor.pixelShiftEqualBright = raw.bayersensor.pixelShiftEqualBright && p.raw.bayersensor.pixelShiftEqualBright == other.raw.bayersensor.pixelShiftEqualBright;
+ raw.bayersensor.pixelShiftEqualBrightChannel = raw.bayersensor.pixelShiftEqualBrightChannel && p.raw.bayersensor.pixelShiftEqualBrightChannel == other.raw.bayersensor.pixelShiftEqualBrightChannel;
raw.bayersensor.pixelShiftNonGreenCross = raw.bayersensor.pixelShiftNonGreenCross && p.raw.bayersensor.pixelShiftNonGreenCross == other.raw.bayersensor.pixelShiftNonGreenCross;
raw.bayersensor.pixelShiftNonGreenCross2 = raw.bayersensor.pixelShiftNonGreenCross2 && p.raw.bayersensor.pixelShiftNonGreenCross2 == other.raw.bayersensor.pixelShiftNonGreenCross2;
raw.bayersensor.pixelShiftNonGreenAmaze = raw.bayersensor.pixelShiftNonGreenAmaze && p.raw.bayersensor.pixelShiftNonGreenAmaze == other.raw.bayersensor.pixelShiftNonGreenAmaze;
@@ -2884,6 +2886,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
toEdit.raw.bayersensor.pixelShiftEqualBright = mods.raw.bayersensor.pixelShiftEqualBright;
}
+ if (raw.bayersensor.pixelShiftEqualBrightChannel) {
+ toEdit.raw.bayersensor.pixelShiftEqualBrightChannel = mods.raw.bayersensor.pixelShiftEqualBrightChannel;
+ }
+
if (raw.bayersensor.pixelShiftNonGreenCross) {
toEdit.raw.bayersensor.pixelShiftNonGreenCross = mods.raw.bayersensor.pixelShiftNonGreenCross;
}
@@ -3408,7 +3414,7 @@ bool RAWParamsEdited::BayerSensor::isUnchanged() const
return method && imageNum && dcbIterations && dcbEnhance && lmmseIterations/*&& allEnhance*/ && greenEq
&& pixelShiftMotion && pixelShiftMotionCorrection && pixelShiftMotionCorrectionMethod && pixelShiftStddevFactorGreen && pixelShiftStddevFactorRed && pixelShiftStddevFactorBlue && pixelShiftEperIso
&& pixelShiftNreadIso && pixelShiftPrnu && pixelShiftSigma && pixelShiftSum && pixelShiftRedBlueWeight && pixelShiftShowMotion && pixelShiftShowMotionMaskOnly
- && pixelShiftAutomatic && pixelShiftNonGreenHorizontal && pixelShiftNonGreenVertical && pixelShiftHoleFill && pixelShiftMedian && pixelShiftMedian3 && pixelShiftNonGreenCross && pixelShiftNonGreenCross2 && pixelShiftNonGreenAmaze && pixelShiftGreen && pixelShiftBlur && pixelShiftSmooth && pixelShiftExp0 && pixelShiftLmmse && pixelShiftEqualBright
+ && pixelShiftAutomatic && pixelShiftNonGreenHorizontal && pixelShiftNonGreenVertical && pixelShiftHoleFill && pixelShiftMedian && pixelShiftMedian3 && pixelShiftNonGreenCross && pixelShiftNonGreenCross2 && pixelShiftNonGreenAmaze && pixelShiftGreen && pixelShiftBlur && pixelShiftSmooth && pixelShiftExp0 && pixelShiftLmmse && pixelShiftEqualBright && pixelShiftEqualBrightChannel
&& linenoise && exBlack0 && exBlack1 && exBlack2 && exBlack3 && exTwoGreen;
}
diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h
index f3d6fd37c..022d54a91 100644
--- a/rtgui/paramsedited.h
+++ b/rtgui/paramsedited.h
@@ -795,6 +795,7 @@ public:
bool pixelShiftExp0;
bool pixelShiftLmmse;
bool pixelShiftEqualBright;
+ bool pixelShiftEqualBrightChannel;
bool pixelShiftNonGreenCross;
bool pixelShiftNonGreenCross2;
bool pixelShiftNonGreenAmaze;