Patch by Emil to make autoexposure of thumbs and preview image agree

This commit is contained in:
ffsup2
2010-11-26 22:45:40 +01:00
parent 25dd0f003a
commit 7e1e46aee5
2 changed files with 6 additions and 6 deletions

View File

@@ -385,7 +385,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
tpp->aeHistogram = new unsigned int[65536 >> tpp->aeHistCompression];
memset(tpp->aeHistogram, 0, (65536 >> tpp->aeHistCompression) * sizeof(int));
int radd = 4;
int gadd = 2;
int gadd = 4;
int badd = 4;
if (!filter)
radd = gadd = badd = 1;
@@ -401,11 +401,11 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
}
for (int j = start; j < end; j++)
if (FISGREEN(filter,i,j))
tpp->aeHistogram[image[i * width + j][1] >> tpp->aeHistCompression] += gadd;
tpp->aeHistogram[CLIP((int)(tpp->camwbGreen*image[i* width+j][1]))>>tpp->aeHistCompression]+=gadd;
else if (FISRED(filter,i,j))
tpp->aeHistogram[image[i * width + j][0] >> tpp->aeHistCompression] += radd;
tpp->aeHistogram[CLIP((int)(tpp->camwbRed * image[i* width+j][0]))>>tpp->aeHistCompression]+=radd;
else if (FISBLUE(filter,i,j))
tpp->aeHistogram[image[i * width + j][2] >> tpp->aeHistCompression] += badd;
tpp->aeHistogram[CLIP((int)(tpp->camwbBlue *image[i* width+j][2]))>>tpp->aeHistCompression]+=badd;
}
// generate autoWB

View File

@@ -65,9 +65,9 @@ public:
Impl()
{
int threadCount=1;
int threadCount=2;
#ifdef _OPENMP
threadCount=omp_get_num_procs();
threadCount=int(omp_get_num_procs()*1.5);
#endif
threadPool_=new Glib::ThreadPool(threadCount,0);