Major bugfixes for CA correction. Added slider to allow manual override of CA correction parameters; if any manual correction slider is nonzero, manual settings are used regardless of whether CA autocorrection checkbox is enabled or not.

This commit is contained in:
Emil Martinec
2010-11-29 07:16:57 -06:00
parent b0e0e80a35
commit 9265ad4f30
12 changed files with 349 additions and 263 deletions

View File

@@ -175,6 +175,10 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h,
int rtmp=CurveFactory::igamma_srgb (img->data[ix++]);
int gtmp=CurveFactory::igamma_srgb (img->data[ix++]);
int btmp=CurveFactory::igamma_srgb (img->data[ix++]);
tpp->aeHistogram[rtmp>>tpp->aeHistCompression]++;
tpp->aeHistogram[gtmp>>tpp->aeHistCompression]+=2;
tpp->aeHistogram[btmp>>tpp->aeHistCompression]++;
if (rtmp<64000 && gtmp<64000 && btmp<64000) {
// autowb computation
@@ -183,9 +187,6 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h,
avg_b += btmp;
n++;
}
tpp->aeHistogram[rtmp>>tpp->aeHistCompression]++;
tpp->aeHistogram[gtmp>>tpp->aeHistCompression]++;
tpp->aeHistogram[btmp>>tpp->aeHistCompression]++;
}
if (n>0)