Auto Levels completely wrong for monochrome raw files, sigma raw files and canon mraw/sraw files. Fixes #3863
This commit is contained in:
parent
8ae641952f
commit
14e3f0e88d
@ -4613,13 +4613,13 @@ void RawImageSource::getAutoExpHistogram (LUTu & histogram, int& histcompr)
|
||||
}
|
||||
} else if (ri->get_colors() == 1) {
|
||||
for (int j = start; j < end; j++) {
|
||||
tmphistogram[(int)(refwb_red * rawData[i][j])]++;
|
||||
tmphistogram[(int)(refwb[0] * rawData[i][j])]++;
|
||||
}
|
||||
} else {
|
||||
for (int j = start; j < end; j++) {
|
||||
tmphistogram[CLIP((int)(refwb_red * rawData[i][3 * j + 0]))]++;
|
||||
tmphistogram[CLIP((int)(refwb_green * rawData[i][3 * j + 1]))] += 2;
|
||||
tmphistogram[CLIP((int)(refwb_blue * rawData[i][3 * j + 2]))]++;
|
||||
tmphistogram[(int)(refwb[0] * rawData[i][3 * j + 0])]++;
|
||||
tmphistogram[(int)(refwb[1] * rawData[i][3 * j + 1])]++;
|
||||
tmphistogram[(int)(refwb[2] * rawData[i][3 * j + 2])]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user