Commit 661dab87 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

update internal libraw to 0.15.1

BUGS: 319731
FIXED-IN: 3.3.0
parent 3765c70f
2013-05-25 Alex Tutubalin <lexa@lexa.ru>
* fixed wrong data maximum calculation for Panasonic files
* check for possible buffer overrun in exposure correction code
* LibRaw 0.15.1
2013-05-23 Alex Tutubalin <lexa@lexa.ru>
LibRaw 0.15-Release
......@@ -7,8 +12,9 @@
lossy-compressed DNG (LR 4.x, requires libjpeg 6+)
* Canon: G1 X, SX220 HS, EOS 5D Mark III, EOS 650D, EOS 1D-X,
100D (Rebel SL1), 700D (Rebel T5i), 6D, EOS M, G15, S110, SX50
* Casio: X-S1, HS30EXR, X1-Pro, EX-ZR100,EX-Z8
* Fujifilm: X-E1, X20, X100S, SL1000, HS50EXR, F800EXR, XF1
* Casio: EX-ZR100,EX-Z8
* Fujifilm: X-S1, HS30EXR, X1-Pro,X-E1, X20, X100S, SL1000, HS50EXR,
F800EXR, XF1
* Leica: D-LUX6 and V-LUX4
* Nikon: D4, D3200, D800, D800E, 1 J2, 1 V2, D600, 1 J3, 1 S1, Coolpix A,
Coolpix P330, Coolpix P7700, D7100
......
......@@ -25,7 +25,7 @@ it under the terms of the one of three licenses as you choose:
#define LIBRAW_MAJOR_VERSION 0
#define LIBRAW_MINOR_VERSION 15
#define LIBRAW_PATCH_VERSION 0
#define LIBRAW_PATCH_VERSION 1
#define LIBRAW_VERSION_TAIL Release
#define LIBRAW_SHLIB_CURRENT 9
......
......@@ -2336,14 +2336,15 @@ int LibRaw::subtract_black()
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define LIM(x,min,max) MAX(min,MIN(x,max))
#define CLIP(x) LIM(x,0,65535)
for(i=0; i< size*4; i++)
int dmax = 0;
for(i=0; i< size*4; i++)
{
int val = imgdata.image[0][i];
val -= cblk[i & 3];
imgdata.image[0][i] = CLIP(val);
if(C.data_maximum < val) C.data_maximum = val;
if(dmax < val) dmax = val;
}
C.data_maximum = dmax & 0xffff;
#undef MIN
#undef MAX
#undef LIM
......@@ -2359,9 +2360,10 @@ int LibRaw::subtract_black()
// only calculate channel maximum;
int idx;
ushort *p = (ushort*)imgdata.image;
C.data_maximum = 0;
int dmax = 0;
for(idx=0;idx<S.iheight*S.iwidth*4;idx++)
if(C.data_maximum < p[idx]) C.data_maximum = p[idx];
if(dmax < p[idx]) dmax = p[idx];
C.data_maximum = dmax;
}
return 0;
}
......@@ -2421,8 +2423,10 @@ void LibRaw::exp_bef(float shift, float smooth)
imgdata.image[i][3] = lut[imgdata.image[i][3]];
}
C.data_maximum = lut[C.data_maximum];
C.maximum = lut[C.maximum];
if(C.data_maximum <=TBLN)
C.data_maximum = lut[C.data_maximum];
if(C.maximum <= TBLN)
C.maximum = lut[C.maximum];
// no need to adjust the minumum, black is already subtracted
free(lut);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment