Patch by Emil to make autoexposure of thumbs and preview image agree
This commit is contained in:
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user