Fixed a crash using Contrast by detail levels

see issue 798
This commit is contained in:
Oliver Duis
2011-06-26 11:12:31 +02:00
parent c39191ef29
commit 9b1d0910d5

View File

@@ -203,7 +203,7 @@ namespace rtengine {
void ImProcFunctions::idirpyr_eq_channel(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, const double * mult ) void ImProcFunctions::idirpyr_eq_channel(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, const double * mult )
{ {
float noisehi = 1.33*noise*mult[4]/pow(3,level), noiselo = 0.66*noise*mult[4]/pow(3,level); float noisehi = 1.33*noise*mult[4]/pow(3,level), noiselo = 0.66*noise*mult[4]/pow(3,level);
float * irangefn = new float [0x20000]; LUTf irangefn (0x20000);
for (int i=0; i<0x20000; i++) { for (int i=0; i<0x20000; i++) {
if (abs(i-0x10000)>noisehi || mult[level]<1.0) { if (abs(i-0x10000)>noisehi || mult[level]<1.0) {
@@ -228,8 +228,6 @@ namespace rtengine {
} }
} }
delete [] irangefn;
} }