• Matthieu Moy's avatar
    temperature: properly deal with NaN coefficients · 89f0a8a9
    Matthieu Moy authored
    Before this patch, the call to mul2temp at the end of reoad_defaults()
    was returning
    
      TempK = 24999.647537
      tint = -nan
    
    The visible effect was that the tint slider was not properly colored
    (white to green instead of magenta to white to green).
    
    The expression computing CAM[k] was clearly wrong. Not only the
    assignment within the "then" branch of ?: was misleading, but the
    "else" branch was just a no-op: return 0.0f and throw it away.
    
    Fix the expression to make it what the initial author probably
    intended, i.e. an assignment of a conditional expression to CAM[k].
    With this patch, I get:
    
      TempK = 6244.398697
      tint = 1.002153
    
    and the slider is properly colored.
    89f0a8a9
Name
Last commit
Last update
..
CMakeLists.txt Loading commit data...
Permutohedral.h Loading commit data...
amaze_demosaic_RT.cc Loading commit data...
ashift.c Loading commit data...
ashift_lsd.c Loading commit data...
ashift_nmsimplex.c Loading commit data...
atrous.c Loading commit data...
basecurve.c Loading commit data...
bilat.c Loading commit data...
bilateral.cc Loading commit data...
bloom.c Loading commit data...
borders.c Loading commit data...
cacorrect.c Loading commit data...
channelmixer.c Loading commit data...
clahe.c Loading commit data...
clipping.c Loading commit data...
colisa.c Loading commit data...
colorbalance.c Loading commit data...
colorchecker.c Loading commit data...
colorcontrast.c Loading commit data...
colorcorrection.c Loading commit data...
colorin.c Loading commit data...
colorize.c Loading commit data...
colormapping.c Loading commit data...
colorout.c Loading commit data...
colorreconstruction.c Loading commit data...
colortransfer.c Loading commit data...
colorzones.c Loading commit data...
defringe.c Loading commit data...
demosaic.c Loading commit data...
denoiseprofile.c Loading commit data...
dither.c Loading commit data...
equalizer.c Loading commit data...
equalizer_eaw.h Loading commit data...
exposure.c Loading commit data...
finalscale.c Loading commit data...
flip.c Loading commit data...
gamma.c Loading commit data...
gaussian_elimination.h Loading commit data...
globaltonemap.c Loading commit data...
graduatednd.c Loading commit data...
grain.c Loading commit data...
hazeremoval.c Loading commit data...
highlights.c Loading commit data...
highpass.c Loading commit data...
hotpixels.c Loading commit data...
invert.c Loading commit data...
iop_api.h Loading commit data...
lens.c Loading commit data...
levels.c Loading commit data...
liquify.c Loading commit data...
lowlight.c Loading commit data...
lowpass.c Loading commit data...
monochrome.c Loading commit data...
nlmeans.c Loading commit data...
overexposed.c Loading commit data...
profile_gamma.c Loading commit data...
rawdenoise.c Loading commit data...
rawoverexposed.c Loading commit data...
rawprepare.c Loading commit data...
relight.c Loading commit data...
rotatepixels.c Loading commit data...
scalepixels.c Loading commit data...
shadhi.c Loading commit data...
sharpen.c Loading commit data...
soften.c Loading commit data...
splittoning.c Loading commit data...
spots.c Loading commit data...
svd.h Loading commit data...
temperature.c Loading commit data...
tonecurve.c Loading commit data...
tonemap.cc Loading commit data...
useless.c Loading commit data...
velvia.c Loading commit data...
vibrance.c Loading commit data...
vignette.c Loading commit data...
watermark.c Loading commit data...
zonesystem.c Loading commit data...