Issue 2059: better demosaicing and ca autocorrect performance with extreme white balances. This patch also adds a missing colortemp parameter that DCP color correction needs (forgot in the dcp 1987 patch)

This commit is contained in:
torger
2013-11-20 19:59:14 +01:00
parent 43869ed883
commit a8d6f1a534
10 changed files with 91 additions and 42 deletions

View File

@@ -47,7 +47,7 @@ RawImage::~RawImage()
/* Similar to dcraw scale_colors for coeff. calculation, but without actual pixels scaling.
* need pixels in data[][] available
*/
void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblack_)
void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblack_, bool forceAutoWB)
{
unsigned row, col, x, y, c, sum[8];
@@ -60,7 +60,7 @@ void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblac
cblack_[c] = (float) this->get_cblack(c);
pre_mul_[c] = this->get_pre_mul(c);
}
if ( this->get_cam_mul(0) == -1 ) {
if ( this->get_cam_mul(0) == -1 || forceAutoWB) {
memset(dsum, 0, sizeof dsum);
for (row = 0; row < H; row += 8)
for (col = 0; col < W ; col += 8) {