Clamped output values to a max of 65535.f after applying multipliers, to avoid trouble further down the processing pipeline.
This commit is contained in:
@@ -255,9 +255,10 @@ void RawImageSource::filmNegativeProcess(const procparams::FilmNegativeParams &p
|
||||
#endif
|
||||
for (int row = 0; row < H; row ++) {
|
||||
for (int col = 0; col < W; col++) {
|
||||
int c = FC(row, col); // three colors, 0=R, 1=G, 2=B
|
||||
// Apply the multipliers
|
||||
rawData[row][col] *= mults[c];
|
||||
int c = FC(row, col); // three colors, 0=R, 1=G, 2=B
|
||||
// Apply the multipliers, clamp max output value to 65535
|
||||
float out = rawData[row][col] * mults[c];
|
||||
rawData[row][col] = out > 65535.f ? 65535.f : out;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,9 +269,10 @@ void RawImageSource::filmNegativeProcess(const procparams::FilmNegativeParams &p
|
||||
#endif
|
||||
for (int row = 0; row < H; row ++) {
|
||||
for (int col = 0; col < W; col++) {
|
||||
int c = ri->XTRANSFC(row, col); // three colors, 0=R, 1=G, 2=B
|
||||
// Apply the multipliers
|
||||
rawData[row][col] *= mults[c];
|
||||
int c = ri->XTRANSFC(row, col); // three colors, 0=R, 1=G, 2=B
|
||||
// Apply the multipliers, clamp max output value to 65535
|
||||
float out = rawData[row][col] * mults[c];
|
||||
rawData[row][col] = out > 65535.f ? 65535.f : out;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user