DNG: honour the BaselineExposure tag
This commit is contained in:
parent
c63633a76d
commit
632c1362c8
@ -6463,6 +6463,9 @@ guess_cfa_pc:
|
||||
xyz[2] = 1 - xyz[0] - xyz[1];
|
||||
FORC3 xyz[c] /= d65_white[c];
|
||||
break;
|
||||
case 50730: /* BaselineExposure */
|
||||
if (dng_version) RT_baseline_exposure = getreal(type);
|
||||
break;
|
||||
case 50740: /* DNGPrivateData */
|
||||
if (dng_version) break;
|
||||
parse_minolta (j = get4()+base);
|
||||
|
@ -58,6 +58,7 @@ public:
|
||||
,RT_whitelevel_from_constant(ThreeValBool::X)
|
||||
,RT_blacklevel_from_constant(ThreeValBool::X)
|
||||
,RT_matrix_from_constant(ThreeValBool::X)
|
||||
,RT_baseline_exposure(0)
|
||||
,getbithuff(this,ifp,zero_after_ff)
|
||||
,nikbithuff(ifp)
|
||||
{
|
||||
@ -154,6 +155,7 @@ protected:
|
||||
ThreeValBool RT_blacklevel_from_constant;
|
||||
ThreeValBool RT_matrix_from_constant;
|
||||
std::string RT_software;
|
||||
double RT_baseline_exposure;
|
||||
|
||||
float cam_mul[4], pre_mul[4], cmatrix[3][4], rgb_cam[3][4];
|
||||
|
||||
|
@ -125,6 +125,8 @@ public:
|
||||
float** data; // holds pixel values, data[i][j] corresponds to the ith row and jth column
|
||||
unsigned prefilters; // original filters saved ( used for 4 color processing )
|
||||
unsigned int getFrameCount() const { return is_raw; }
|
||||
|
||||
double getBaselineExposure() const { return RT_baseline_exposure; }
|
||||
protected:
|
||||
Glib::ustring filename; // complete filename
|
||||
int rotate_deg; // 0,90,180,270 degree of rotation: info taken by dcraw from exif
|
||||
|
@ -716,6 +716,11 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima
|
||||
gm /= area;
|
||||
bm /= area;
|
||||
bool doHr = (hrp.hrenabled && hrp.method != "Color");
|
||||
const float expcomp = std::pow(2, ri->getBaselineExposure());
|
||||
rm *= expcomp;
|
||||
gm *= expcomp;
|
||||
bm *= expcomp;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel if(!d1x) // omp disabled for D1x to avoid race conditions (see Issue 1088 http://code.google.com/p/rawtherapee/issues/detail?id=1088)
|
||||
{
|
||||
|
@ -567,6 +567,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
|
||||
tpp->camwbBlue = tpp->blueMultiplier / pre_mul[2]; //ri->get_pre_mul(2);
|
||||
//tpp->defGain = 1.0 / min(ri->get_pre_mul(0), ri->get_pre_mul(1), ri->get_pre_mul(2));
|
||||
tpp->defGain = max (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]) / min (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]);
|
||||
tpp->defGain *= std::pow(2, ri->getBaselineExposure());
|
||||
|
||||
tpp->gammaCorrected = true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user