merge with dev

This commit is contained in:
Desmis 2019-07-04 08:23:56 +02:00
commit 50e6aa12c7
5 changed files with 55 additions and 25 deletions

View File

@ -1290,6 +1290,11 @@ Camera constants:
"ranges": { "white": 16100 }
},
{ // Quality C
"make_model": "FUJIFILM X-A5",
"ranges": { "white": 16100 }
},
{ // Quality B
"make_model": "FUJIFILM X-A10",
"dcraw_matrix": [ 11540,-4999,-991,-2949,10963,2278,-382,1049,5605 ], // DNGv9.12 D65
@ -1305,6 +1310,11 @@ Camera constants:
"ranges": { "white": 16100 }
},
{ // Quality C
"make_model": [ "FUJIFILM X-T100" ],
"ranges": { "white": 16100 }
},
{ // Quality B
"make_model": "FUJIFILM X-E2S",
"dcraw_matrix": [ 11562,-5118,-961,-3022,11007,2311,-525,1569,6097 ], // DNG_v9.4 D65
@ -1327,7 +1337,7 @@ Camera constants:
},
{ // Quality C, only raw crop
"make_model": [ "FUJIFILM X-T3" ],
"make_model": [ "FUJIFILM X-T3", "FUJIFILM X-T30" ],
"raw_crop": [ 0, 5, 6252, 4176]
},
@ -1677,6 +1687,11 @@ Camera constants:
"ranges": { "white": 4040 } // nominal 4056
},
{ // Quality C
"make_model": [ "OLYMPUS E-PL9" ],
"ranges": { "white": 4080 } // nominal 4093
},
{ // Quality B, with long exposure noise reduction White Level gets WL-BL = around 256_12-bit levels less
"make_model": [ "OLYMPUS E-PL7", "OLYMPUS E-PL8" ],
"global_green_equilibration" : true,
@ -2364,6 +2379,11 @@ Camera constants:
"ranges": { "black": 512, "white": 16300 }
},
{ // Quality C, correction for frame width
"make_model": [ "Sony DSC-RX0", "Sony DSC-RX0M2" ],
"raw_crop": [ 0, 0, -8, 0 ] // 8 rightmost columns are garbage
},
{ // Quality B, correction for frame width, crop modes covered
"make_model": [ "Sony ILCE-7RM2", "Sony DSC-RX1RM2" ],
"dcraw_matrix": [ 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 ], // DNG_v9.1.1 D65
@ -2431,9 +2451,15 @@ Camera constants:
"ranges": { "black": 512, "white": 16300 }
},
{ // Quality C
"make_model": [ "Sony DSC-HX99" ],
"raw_crop": [ 0, 0, -8, 0 ] // 8 rightmost columns are garbage
},
{ // Quality C
"make_model": [ "Sony DSC-R1" ],
"raw_crop": [ 0, 0, 3924, 2608 ]
"raw_crop": [ 0, 0, 3924, 2608 ],
"ranges": { "white": 16368 }
},
{ // Quality A

View File

@ -37,8 +37,6 @@
#include "ciecam02.h"
#include "color.h"
#include "iccstore.h"
#undef CLIPD
#define CLIPD(a) ((a)>0.0f?((a)<1.0f?(a):1.0f):0.0f)
using namespace std;
@ -635,33 +633,37 @@ void CurveFactory::complexCurve (double ecomp, double black, double hlcompr, dou
//%%%%%%%%%%%%%%%%%%%%%%%%%%
// change to [0,1] range
shCurve.setClip(LUT_CLIP_ABOVE); // used LUT_CLIP_ABOVE, because the curve converges to 1.0 at the upper end and we don't want to exceed this value.
float val = 1.f / 65535.f;
float val2 = simplebasecurve (val, black, 0.015 * shcompr);
shCurve[0] = CLIPD(val2) / val;
if (black == 0.0) {
shCurve.makeConstant(1.f);
} else {
const float val = 1.f / 65535.f;
shCurve[0] = simplebasecurve(val, black, 0.015 * shcompr) / val;
}
// gamma correction
val = Color::gammatab_srgb[0] / 65535.f;
float val = Color::gammatab_srgb1[0];
// apply brightness curve
if (brightcurve) {
val = brightcurve->getVal (val); // TODO: getVal(double) is very slow! Optimize with a LUTf
val = brightcurve->getVal(val); // TODO: getVal(double) is very slow! Optimize with a LUTf
}
// store result in a temporary array
dcurve[0] = CLIPD(val);
dcurve[0] = LIM01<float>(val);
for (int i = 1; i < 0x10000; i++) {
float val = i / 65535.f;
float val2 = simplebasecurve (val, black, 0.015 * shcompr);
shCurve[i] = val2 / val;
if (black != 0.0) {
const float val = i / 65535.f;
shCurve[i] = simplebasecurve(val, black, 0.015 * shcompr) / val;
}
// gamma correction
val = Color::gammatab_srgb[i] / 65535.f;
float val = Color::gammatab_srgb1[i];
// apply brightness curve
if (brightcurve) {
val = CLIPD(brightcurve->getVal (val)); // TODO: getVal(double) is very slow! Optimize with a LUTf
val = LIM01<float>(brightcurve->getVal (val)); // TODO: getVal(double) is very slow! Optimize with a LUTf
}
// store result in a temporary array
@ -849,7 +851,7 @@ void CurveFactory::complexLCurve (double br, double contr, const std::vector<dou
val = brightcurve.getVal (val);
// store result in a temporary array
outCurve[i] = CLIPD(val);
outCurve[i] = LIM01<float>(val);
}
} else {

View File

@ -76,7 +76,7 @@ void shadowToneCurve(const LUTf &shtonecurve, float *rtemp, float *gtemp, float
//shadow tone curve
vfloat Yv = cr * rv + cg * gv + cb * bv;
vfloat tonefactorv = shtonecurve(Yv);
vfloat tonefactorv = shtonecurve[Yv];
STVF(rtemp[ti * tileSize + tj], rv * tonefactorv);
STVF(gtemp[ti * tileSize + tj], gv * tonefactorv);
STVF(btemp[ti * tileSize + tj], bv * tonefactorv);
@ -2474,7 +2474,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
}
highlightToneCurve(hltonecurve, rtemp, gtemp, btemp, istart, tH, jstart, tW, TS, exp_scale, comp, hlrange);
shadowToneCurve(shtonecurve, rtemp, gtemp, btemp, istart, tH, jstart, tW, TS);
if (params->toneCurve.black != 0.0) {
shadowToneCurve(shtonecurve, rtemp, gtemp, btemp, istart, tH, jstart, tW, TS);
}
if (dcpProf) {
dcpProf->step2ApplyTile (rtemp, gtemp, btemp, tW - jstart, tH - istart, TS, asIn);

View File

@ -28,7 +28,7 @@ using namespace rtengine::procparams;
BayerRAWExposure::BayerRAWExposure () : FoldableToolPanel(this, "bayerrawexposure", M("TP_EXPOS_BLACKPOINT_LABEL"), options.prevdemo != PD_Sidecar)
{
PexBlack1 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_1"), -2048, 2048, 0.1, 0)); //black level
PexBlack1 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_1"), -2048, 2048, 1.0, 0)); //black level
PexBlack1->setAdjusterListener (this);
if (PexBlack1->delay < options.adjusterMaxDelay) {
@ -36,7 +36,7 @@ BayerRAWExposure::BayerRAWExposure () : FoldableToolPanel(this, "bayerrawexposur
}
PexBlack1->show();
PexBlack2 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_2"), -2048, 2048, 0.1, 0)); //black level
PexBlack2 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_2"), -2048, 2048, 1.0, 0)); //black level
PexBlack2->setAdjusterListener (this);
if (PexBlack2->delay < options.adjusterMaxDelay) {
@ -44,7 +44,7 @@ BayerRAWExposure::BayerRAWExposure () : FoldableToolPanel(this, "bayerrawexposur
}
PexBlack2->show();
PexBlack3 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_3"), -2048, 2048, 0.1, 0)); //black level
PexBlack3 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_3"), -2048, 2048, 1.0, 0)); //black level
PexBlack3->setAdjusterListener (this);
if (PexBlack3->delay < options.adjusterMaxDelay) {
@ -52,7 +52,7 @@ BayerRAWExposure::BayerRAWExposure () : FoldableToolPanel(this, "bayerrawexposur
}
PexBlack3->show();
PexBlack0 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_0"), -2048, 2048, 0.1, 0)); //black level
PexBlack0 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_0"), -2048, 2048, 1.0, 0)); //black level
PexBlack0->setAdjusterListener (this);
if (PexBlack0->delay < options.adjusterMaxDelay) {

View File

@ -30,7 +30,7 @@ using namespace rtengine::procparams;
XTransRAWExposure::XTransRAWExposure () : FoldableToolPanel(this, "xtransrawexposure", M("TP_EXPOS_BLACKPOINT_LABEL"))
{
PexBlackRed = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_RED"), -2048, 2048, 0.1, 0)); //black level
PexBlackRed = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_RED"), -2048, 2048, 1.0, 0)); //black level
PexBlackRed->setAdjusterListener (this);
if (PexBlackRed->delay < options.adjusterMaxDelay) {
@ -38,7 +38,7 @@ XTransRAWExposure::XTransRAWExposure () : FoldableToolPanel(this, "xtransrawexpo
}
PexBlackRed->show();
PexBlackGreen = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_GREEN"), -2048, 2048, 0.1, 0)); //black level
PexBlackGreen = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_GREEN"), -2048, 2048, 1.0, 0)); //black level
PexBlackGreen->setAdjusterListener (this);
if (PexBlackGreen->delay < options.adjusterMaxDelay) {
@ -46,7 +46,7 @@ XTransRAWExposure::XTransRAWExposure () : FoldableToolPanel(this, "xtransrawexpo
}
PexBlackGreen->show();
PexBlackBlue = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_BLUE"), -2048, 2048, 0.1, 0)); //black level
PexBlackBlue = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_BLUE"), -2048, 2048, 1.0, 0)); //black level
PexBlackBlue->setAdjusterListener (this);
if (PexBlackBlue->delay < options.adjusterMaxDelay) {