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 08:33:57 -06:00
parent 269d4512f2
commit c292156e50
12 changed files with 349 additions and 263 deletions

View File

@@ -174,6 +174,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
@@ -182,9 +186,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)