Patch to make autoexposure of thumbs and preview image agree. The problem was that white balance was applied to raw data for preview image but not for thumbs. I sure hope all this improves with rtengine2.
This commit is contained in:
parent
4b361aebca
commit
186d7daf6e
@ -9488,7 +9488,7 @@ t4.set ();
|
|||||||
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;
|
||||||
@ -9505,11 +9505,11 @@ t4.set ();
|
|||||||
}
|
}
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
t5.set ();
|
t5.set ();
|
||||||
|
@ -890,7 +890,7 @@
|
|||||||
+ 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;
|
||||||
@ -907,11 +907,11 @@
|
|||||||
+ }
|
+ }
|
||||||
+ 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;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+t5.set ();
|
+t5.set ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user