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];
|
tpp->aeHistogram = new unsigned int[65536 >> tpp->aeHistCompression];
|
||||||
memset(tpp->aeHistogram, 0, (65536 >> tpp->aeHistCompression) * sizeof(int));
|
memset(tpp->aeHistogram, 0, (65536 >> tpp->aeHistCompression) * sizeof(int));
|
||||||
int radd = 4;
|
int radd = 4;
|
||||||
int gadd = 2;
|
int gadd = 4;
|
||||||
int badd = 4;
|
int badd = 4;
|
||||||
if (!filter)
|
if (!filter)
|
||||||
radd = gadd = badd = 1;
|
radd = gadd = badd = 1;
|
||||||
@@ -401,11 +401,11 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
|
|||||||
}
|
}
|
||||||
for (int j = start; j < end; j++)
|
for (int j = start; j < end; j++)
|
||||||
if (FISGREEN(filter,i,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))
|
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))
|
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
|
// generate autoWB
|
||||||
|
@@ -65,9 +65,9 @@ public:
|
|||||||
|
|
||||||
Impl()
|
Impl()
|
||||||
{
|
{
|
||||||
int threadCount=1;
|
int threadCount=2;
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
threadCount=omp_get_num_procs();
|
threadCount=int(omp_get_num_procs()*1.5);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
threadPool_=new Glib::ThreadPool(threadCount,0);
|
threadPool_=new Glib::ThreadPool(threadCount,0);
|
||||||
|
Reference in New Issue
Block a user