Skip to content

Commit

Permalink
Fix segfault in denoise, fixes #5796
Browse files Browse the repository at this point in the history
  • Loading branch information
heckflosse committed Jun 12, 2020
1 parent 03c9ef0 commit 5239e61
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions rtengine/FTblockDN.cc
Original file line number Diff line number Diff line change
Expand Up @@ -955,13 +955,8 @@ BENCHFUN
labdn->b[i1][j1] = B_ < 65535.f ? gamcurve[B_] : Color::gammanf(B_ / 65535.f, gam) * 32768.f;

if (((i1 | j1) & 1) == 0) {
if (numTries == 1) {
noisevarlum[(i1 >> 1) * width2 + (j1 >> 1)] = useNoiseLCurve ? lumcalc[i >> 1][j >> 1] : noisevarL;
noisevarchrom[(i1 >> 1) * width2 + (j1 >> 1)] = useNoiseCCurve ? maxNoiseVarab * ccalc[i >> 1][j >> 1] : 1.f;
} else {
noisevarlum[(i1 >> 1) * width2 + (j1 >> 1)] = lumcalc[i >> 1][j >> 1];
noisevarchrom[(i1 >> 1) * width2 + (j1 >> 1)] = ccalc[i >> 1][j >> 1];
}
noisevarlum[(i1 >> 1) * width2 + (j1 >> 1)] = useNoiseLCurve ? lumcalc[i >> 1][j >> 1] : noisevarL;
noisevarchrom[(i1 >> 1) * width2 + (j1 >> 1)] = useNoiseCCurve ? maxNoiseVarab * ccalc[i >> 1][j >> 1] : 1.f;
}

//end chroma
Expand Down

0 comments on commit 5239e61

Please sign in to comment.