1 From d8f40eabb25953bff5d90017478dc59d586346d1 Mon Sep 17 00:00:00 2001
2 From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3 Date: Thu, 3 May 2018 15:44:14 +0200
4 Subject: [PATCH] Manage powf64 with glibc
6 powf64 is now included in latest version of glibc so rename powf64 into
9 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
11 Source/LibRawLite/dcraw/dcraw.c | 108 ++++++++++++++--------------
12 Source/LibRawLite/internal/dcraw_common.cpp | 108 ++++++++++++++--------------
13 2 files changed, 108 insertions(+), 108 deletions(-)
15 diff --git a/Source/LibRawLite/dcraw/dcraw.c b/Source/LibRawLite/dcraw/dcraw.c
16 index 6bf607d..3e52cec 100644
17 --- a/Source/LibRawLite/dcraw/dcraw.c
18 +++ b/Source/LibRawLite/dcraw/dcraw.c
19 @@ -6727,7 +6727,7 @@ static float powf_lim(float a, float b, float limup)
21 return (b>limup || b < -limup)?0.f:powf(a,b);
23 -static float powf64(float a, float b)
24 +static float powf_64(float a, float b)
26 return powf_lim(a,b,64.f);
28 @@ -6764,7 +6764,7 @@ static float _CanonConvert2EV(short in)
29 static float _CanonConvertAperture(short in)
31 if (in == (short)0xffe0) return 0.0f;
32 - else return powf64(2.0f, _CanonConvert2EV(in) / 2.0f);
33 + else return powf_64(2.0f, _CanonConvert2EV(in) / 2.0f);
36 void CLASS setCanonBodyFeatures (unsigned id)
37 @@ -7046,15 +7046,15 @@ void CLASS processNikonLensData (uchar *LensData, unsigned len)
38 imgdata.lens.nikon.NikonLensIDNumber = LensData[i];
39 imgdata.lens.nikon.NikonLensFStops = LensData[i + 1];
40 imgdata.lens.makernotes.LensFStops = (float)imgdata.lens.nikon.NikonLensFStops /12.0f;
41 - imgdata.lens.makernotes.MinFocal = 5.0f * powf64(2.0f, (float)LensData[i + 2] / 24.0f);
42 - imgdata.lens.makernotes.MaxFocal = 5.0f * powf64(2.0f, (float)LensData[i + 3] / 24.0f);
43 - imgdata.lens.makernotes.MaxAp4MinFocal = powf64(2.0f, (float)LensData[i + 4] / 24.0f);
44 - imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(2.0f, (float)LensData[i + 5] / 24.0f);
45 + imgdata.lens.makernotes.MinFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 2] / 24.0f);
46 + imgdata.lens.makernotes.MaxFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 3] / 24.0f);
47 + imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(2.0f, (float)LensData[i + 4] / 24.0f);
48 + imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(2.0f, (float)LensData[i + 5] / 24.0f);
49 imgdata.lens.nikon.NikonMCUVersion = LensData[i + 6];
52 - imgdata.lens.makernotes.CurFocal = 5.0f * powf64(2.0f, (float)LensData[i - 1] / 24.0f);
53 - imgdata.lens.nikon.NikonEffectiveMaxAp = powf64(2.0f, (float)LensData[i + 7] / 24.0f);
54 + imgdata.lens.makernotes.CurFocal = 5.0f * powf_64(2.0f, (float)LensData[i - 1] / 24.0f);
55 + imgdata.lens.nikon.NikonEffectiveMaxAp = powf_64(2.0f, (float)LensData[i + 7] / 24.0f);
57 imgdata.lens.makernotes.LensID =
58 (unsigned long long) LensData[i] << 56 |
59 @@ -7563,11 +7563,11 @@ void CLASS process_Sony_0x9050 (uchar * buf, unsigned id)
62 imgdata.lens.makernotes.MaxAp =
63 - my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
64 + my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
67 imgdata.lens.makernotes.MinAp =
68 - my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
69 + my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
72 if (imgdata.lens.makernotes.CameraMount != LIBRAW_MOUNT_FixedLens)
73 @@ -7577,7 +7577,7 @@ void CLASS process_Sony_0x9050 (uchar * buf, unsigned id)
74 lid = SonySubstitution[buf[0x3d]] << 8 |
75 SonySubstitution[buf[0x3c]];
76 imgdata.lens.makernotes.CurAp =
77 - powf64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);
78 + powf_64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);
80 if (buf[0x105] && (imgdata.lens.makernotes.LensMount != LIBRAW_MOUNT_Canon_EF))
81 imgdata.lens.makernotes.LensMount =
82 @@ -7957,7 +7957,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
85 fread(&cc, 1, 1, ifp);
86 - iso_speed = (int)(100.0 * powf64(2.0, (double)(cc) / 12.0 - 5.0));
87 + iso_speed = (int)(100.0 * powf_64(2.0, (double)(cc) / 12.0 - 5.0));
91 @@ -7989,7 +7989,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
95 - imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
96 + imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);
99 imgdata.lens.makernotes.LensID =
100 @@ -8009,10 +8009,10 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
101 fread(imgdata.lens.makernotes.Lens, len, 1, ifp);
104 - imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);
105 + imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
108 - imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);
109 + imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
112 imgdata.lens.makernotes.MinFocal = (float)get2();
113 @@ -8023,7 +8023,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
114 imgdata.lens.makernotes.MaxFocal = imgdata.lens.makernotes.MinFocal;
117 - imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() / 256.0f);
118 + imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
121 imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;
122 @@ -8121,13 +8121,13 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
123 if (table_buf[iLensData+9] &&
124 (fabs(imgdata.lens.makernotes.CurFocal) < 0.1f))
125 imgdata.lens.makernotes.CurFocal =
126 - 10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);
127 + 10*(table_buf[iLensData+9]>>2) * powf_64(4, (table_buf[iLensData+9] & 0x03)-2);
128 if (table_buf[iLensData+10] & 0xf0)
129 imgdata.lens.makernotes.MaxAp4CurFocal =
130 - powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);
131 + powf_64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);
132 if (table_buf[iLensData+10] & 0x0f)
133 imgdata.lens.makernotes.MinAp4CurFocal =
134 - powf64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
135 + powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
137 (imgdata.lens.makernotes.CamID != 0x12e6c) && // K-r
138 (imgdata.lens.makernotes.CamID != 0x12e76) && // K-5
139 @@ -8148,14 +8148,14 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
140 if ((table_buf[iLensData+14] > 1) &&
141 (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))
142 imgdata.lens.makernotes.MaxAp4CurFocal =
143 - powf64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
144 + powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
146 else if ((imgdata.lens.makernotes.CamID != 0x12e76) && // K-5
147 (table_buf[iLensData+15] > 1) &&
148 (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))
150 imgdata.lens.makernotes.MaxAp4CurFocal =
151 - powf64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
152 + powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
156 @@ -8321,7 +8321,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
157 lid = (((ushort)table_buf[2])<<8) |
158 ((ushort)table_buf[3]);
159 imgdata.lens.makernotes.CurAp =
160 - powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
161 + powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
165 @@ -8801,7 +8801,7 @@ void CLASS parse_makernote (int base, int uptag)
169 - imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
170 + imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);
173 imgdata.lens.makernotes.LensID =
174 @@ -8821,10 +8821,10 @@ void CLASS parse_makernote (int base, int uptag)
175 fread(imgdata.lens.makernotes.Lens, len, 1, ifp);
178 - imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);
179 + imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
182 - imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);
183 + imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
186 imgdata.lens.makernotes.MinFocal = (float)get2();
187 @@ -8835,7 +8835,7 @@ void CLASS parse_makernote (int base, int uptag)
188 imgdata.lens.makernotes.MaxFocal = imgdata.lens.makernotes.MinFocal;
191 - imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() / 256.0f);
192 + imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
195 imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;
196 @@ -8993,13 +8993,13 @@ void CLASS parse_makernote (int base, int uptag)
198 if (table_buf[iLensData+9] && (fabs(imgdata.lens.makernotes.CurFocal) < 0.1f))
199 imgdata.lens.makernotes.CurFocal =
200 - 10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);
201 + 10*(table_buf[iLensData+9]>>2) * powf_64(4, (table_buf[iLensData+9] & 0x03)-2);
202 if (table_buf[iLensData+10] & 0xf0)
203 imgdata.lens.makernotes.MaxAp4CurFocal =
204 - powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);
205 + powf_64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);
206 if (table_buf[iLensData+10] & 0x0f)
207 imgdata.lens.makernotes.MinAp4CurFocal =
208 - powf64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
209 + powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
211 (imgdata.lens.makernotes.CamID != 0x12e6c) && // K-r
212 (imgdata.lens.makernotes.CamID != 0x12e76) && // K-5
213 @@ -9020,14 +9020,14 @@ void CLASS parse_makernote (int base, int uptag)
214 if ((table_buf[iLensData+14] > 1) &&
215 (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))
216 imgdata.lens.makernotes.MaxAp4CurFocal =
217 - powf64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
218 + powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
220 else if ((imgdata.lens.makernotes.CamID != 0x12e76) && // K-5
221 (table_buf[iLensData+15] > 1) &&
222 (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))
224 imgdata.lens.makernotes.MaxAp4CurFocal =
225 - powf64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
226 + powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
230 @@ -9188,7 +9188,7 @@ void CLASS parse_makernote (int base, int uptag)
231 lid = (((ushort)table_buf[2])<<8) |
232 ((ushort)table_buf[3]);
233 imgdata.lens.makernotes.CurAp =
234 - powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
235 + powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
239 @@ -9273,15 +9273,15 @@ void CLASS parse_makernote (int base, int uptag)
243 - iso_speed = int(100.0 * powf64(2.0f,float(cc)/12.0-5.0));
244 + iso_speed = int(100.0 * powf_64(2.0f,float(cc)/12.0-5.0));
246 if (tag == 4 && len > 26 && len < 35) {
247 if ((i=(get4(),get2())) != 0x7fff && (!iso_speed || iso_speed == 65535))
248 - iso_speed = 50 * powf64(2.0, i/32.0 - 4);
249 + iso_speed = 50 * powf_64(2.0, i/32.0 - 4);
250 if ((i=(get2(),get2())) != 0x7fff && !aperture)
251 - aperture = powf64(2.0, i/64.0);
252 + aperture = powf_64(2.0, i/64.0);
253 if ((i=get2()) != 0xffff && !shutter)
254 - shutter = powf64(2.0, (short) i/-32.0);
255 + shutter = powf_64(2.0, (short) i/-32.0);
256 wbi = (get2(),get2());
257 shot_order = (get2(),get2());
259 @@ -9732,7 +9732,7 @@ void CLASS parse_exif (int base)
260 imgdata.lens.Lens[0] = 0;
263 - imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
264 + imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));
267 case 33434: shutter = getreal(type); break;
268 @@ -9745,10 +9745,10 @@ void CLASS parse_exif (int base)
270 case 36868: get_timestamp(0); break;
271 case 37377: if ((expo = -getreal(type)) < 128 && shutter == 0.)
272 - shutter = powf64(2.0, expo); break;
273 + shutter = powf_64(2.0, expo); break;
275 if (fabs(ape = getreal(type))<256.0)
276 - aperture = powf64(2.0, ape/2);
277 + aperture = powf_64(2.0, ape/2);
279 case 37385: flash_used = getreal(type); break;
280 case 37386: focal_len = getreal(type); break;
281 @@ -10361,7 +10361,7 @@ int CLASS parse_tiff_ifd (int base)
282 imgdata.lens.Lens[0] = 0;
285 - imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
286 + imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));
290 @@ -11130,22 +11130,22 @@ void CLASS parse_ciff (int offset, int length, int depth)
293 if (type == 0x1818) {
294 - shutter = powf64(2.0f, -int_to_float((get4(),get4())));
295 - aperture = powf64(2.0f, int_to_float(get4())/2);
296 + shutter = powf_64(2.0f, -int_to_float((get4(),get4())));
297 + aperture = powf_64(2.0f, int_to_float(get4())/2);
298 #ifdef LIBRAW_LIBRARY_BUILD
299 imgdata.lens.makernotes.CurAp = aperture;
302 if (type == 0x102a) {
303 // iso_speed = pow (2.0, (get4(),get2())/32.0 - 4) * 50;
304 - iso_speed = powf64(2.0f, ((get2(),get2()) + get2())/32.0f - 5.0f) * 100.0f;
305 + iso_speed = powf_64(2.0f, ((get2(),get2()) + get2())/32.0f - 5.0f) * 100.0f;
306 #ifdef LIBRAW_LIBRARY_BUILD
307 aperture = _CanonConvertAperture((get2(),get2()));
308 imgdata.lens.makernotes.CurAp = aperture;
310 - aperture = powf64(2.0, (get2(),(short)get2())/64.0);
311 + aperture = powf_64(2.0, (get2(),(short)get2())/64.0);
313 - shutter = powf64(2.0,-((short)get2())/32.0);
314 + shutter = powf_64(2.0,-((short)get2())/32.0);
315 wbi = (get2(),get2());
316 if (wbi > 17) wbi = 0;
317 fseek (ifp, 32, SEEK_CUR);
318 @@ -11349,8 +11349,8 @@ void CLASS parse_phase_one (int base)
319 setPhaseOneFeatures(unique_id);
322 - if (type == 4) imgdata.lens.makernotes.CurAp = powf64(2.0f, (int_to_float(data)/2.0f));
323 - else imgdata.lens.makernotes.CurAp = powf64(2.0f, (getreal(type)/2.0f));
324 + if (type == 4) imgdata.lens.makernotes.CurAp = powf_64(2.0f, (int_to_float(data)/2.0f));
325 + else imgdata.lens.makernotes.CurAp = powf_64(2.0f, (getreal(type)/2.0f));
328 if (type == 4) imgdata.lens.makernotes.CurFocal = int_to_float(data);
329 @@ -11364,16 +11364,16 @@ void CLASS parse_phase_one (int base)
333 - imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));
334 + imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, (int_to_float(data)/2.0f));
336 - imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
337 + imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, (getreal(type) / 2.0f));
342 - imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));
343 + imgdata.lens.makernotes.MinAp4CurFocal = powf_64(2.0f, (int_to_float(data)/2.0f));
345 - imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
346 + imgdata.lens.makernotes.MinAp4CurFocal = powf_64(2.0f, (getreal(type) / 2.0f));
350 @@ -13324,15 +13324,15 @@ void CLASS identify()
351 case 18: iso_speed = 320; break;
352 case 19: iso_speed = 400; break;
354 - shutter = powf64(2.0f, (((float)get4())/8.0f)) / 16000.0f;
355 + shutter = powf_64(2.0f, (((float)get4())/8.0f)) / 16000.0f;
356 FORC4 cam_mul[c ^ (c >> 1)] = get4();
357 fseek (ifp, 88, SEEK_SET);
358 - aperture = powf64(2.0f, ((float)get4())/16.0f);
359 + aperture = powf_64(2.0f, ((float)get4())/16.0f);
360 fseek (ifp, 112, SEEK_SET);
362 #ifdef LIBRAW_LIBRARY_BUILD
363 fseek (ifp, 104, SEEK_SET);
364 - imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, ((float)get4())/16.0f);
365 + imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, ((float)get4())/16.0f);
366 fseek (ifp, 124, SEEK_SET);
367 fread(imgdata.lens.makernotes.Lens, 32, 1, ifp);
368 imgdata.lens.makernotes.CameraMount = LIBRAW_MOUNT_Contax_N;
369 diff --git a/Source/LibRawLite/internal/dcraw_common.cpp b/Source/LibRawLite/internal/dcraw_common.cpp
370 index a936a93..0fc4d81 100644
371 --- a/Source/LibRawLite/internal/dcraw_common.cpp
372 +++ b/Source/LibRawLite/internal/dcraw_common.cpp
373 @@ -5543,7 +5543,7 @@ static float powf_lim(float a, float b, float limup)
375 return (b>limup || b < -limup)?0.f:powf(a,b);
377 -static float powf64(float a, float b)
378 +static float powf_64(float a, float b)
380 return powf_lim(a,b,64.f);
382 @@ -5580,7 +5580,7 @@ static float _CanonConvert2EV(short in)
383 static float _CanonConvertAperture(short in)
385 if (in == (short)0xffe0) return 0.0f;
386 - else return powf64(2.0f, _CanonConvert2EV(in) / 2.0f);
387 + else return powf_64(2.0f, _CanonConvert2EV(in) / 2.0f);
390 void CLASS setCanonBodyFeatures (unsigned id)
391 @@ -5862,15 +5862,15 @@ void CLASS processNikonLensData (uchar *LensData, unsigned len)
392 imgdata.lens.nikon.NikonLensIDNumber = LensData[i];
393 imgdata.lens.nikon.NikonLensFStops = LensData[i + 1];
394 imgdata.lens.makernotes.LensFStops = (float)imgdata.lens.nikon.NikonLensFStops /12.0f;
395 - imgdata.lens.makernotes.MinFocal = 5.0f * powf64(2.0f, (float)LensData[i + 2] / 24.0f);
396 - imgdata.lens.makernotes.MaxFocal = 5.0f * powf64(2.0f, (float)LensData[i + 3] / 24.0f);
397 - imgdata.lens.makernotes.MaxAp4MinFocal = powf64(2.0f, (float)LensData[i + 4] / 24.0f);
398 - imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(2.0f, (float)LensData[i + 5] / 24.0f);
399 + imgdata.lens.makernotes.MinFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 2] / 24.0f);
400 + imgdata.lens.makernotes.MaxFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 3] / 24.0f);
401 + imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(2.0f, (float)LensData[i + 4] / 24.0f);
402 + imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(2.0f, (float)LensData[i + 5] / 24.0f);
403 imgdata.lens.nikon.NikonMCUVersion = LensData[i + 6];
406 - imgdata.lens.makernotes.CurFocal = 5.0f * powf64(2.0f, (float)LensData[i - 1] / 24.0f);
407 - imgdata.lens.nikon.NikonEffectiveMaxAp = powf64(2.0f, (float)LensData[i + 7] / 24.0f);
408 + imgdata.lens.makernotes.CurFocal = 5.0f * powf_64(2.0f, (float)LensData[i - 1] / 24.0f);
409 + imgdata.lens.nikon.NikonEffectiveMaxAp = powf_64(2.0f, (float)LensData[i + 7] / 24.0f);
411 imgdata.lens.makernotes.LensID =
412 (unsigned long long) LensData[i] << 56 |
413 @@ -6379,11 +6379,11 @@ void CLASS process_Sony_0x9050 (uchar * buf, unsigned id)
416 imgdata.lens.makernotes.MaxAp =
417 - my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
418 + my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
421 imgdata.lens.makernotes.MinAp =
422 - my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
423 + my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
426 if (imgdata.lens.makernotes.CameraMount != LIBRAW_MOUNT_FixedLens)
427 @@ -6393,7 +6393,7 @@ void CLASS process_Sony_0x9050 (uchar * buf, unsigned id)
428 lid = SonySubstitution[buf[0x3d]] << 8 |
429 SonySubstitution[buf[0x3c]];
430 imgdata.lens.makernotes.CurAp =
431 - powf64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);
432 + powf_64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);
434 if (buf[0x105] && (imgdata.lens.makernotes.LensMount != LIBRAW_MOUNT_Canon_EF))
435 imgdata.lens.makernotes.LensMount =
436 @@ -6773,7 +6773,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
439 fread(&cc, 1, 1, ifp);
440 - iso_speed = (int)(100.0 * powf64(2.0, (double)(cc) / 12.0 - 5.0));
441 + iso_speed = (int)(100.0 * powf_64(2.0, (double)(cc) / 12.0 - 5.0));
445 @@ -6805,7 +6805,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
449 - imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
450 + imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);
453 imgdata.lens.makernotes.LensID =
454 @@ -6825,10 +6825,10 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
455 fread(imgdata.lens.makernotes.Lens, len, 1, ifp);
458 - imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);
459 + imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
462 - imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);
463 + imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
466 imgdata.lens.makernotes.MinFocal = (float)get2();
467 @@ -6839,7 +6839,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
468 imgdata.lens.makernotes.MaxFocal = imgdata.lens.makernotes.MinFocal;
471 - imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() / 256.0f);
472 + imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
475 imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;
476 @@ -6937,13 +6937,13 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
477 if (table_buf[iLensData+9] &&
478 (fabs(imgdata.lens.makernotes.CurFocal) < 0.1f))
479 imgdata.lens.makernotes.CurFocal =
480 - 10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);
481 + 10*(table_buf[iLensData+9]>>2) * powf_64(4, (table_buf[iLensData+9] & 0x03)-2);
482 if (table_buf[iLensData+10] & 0xf0)
483 imgdata.lens.makernotes.MaxAp4CurFocal =
484 - powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);
485 + powf_64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);
486 if (table_buf[iLensData+10] & 0x0f)
487 imgdata.lens.makernotes.MinAp4CurFocal =
488 - powf64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
489 + powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
491 (imgdata.lens.makernotes.CamID != 0x12e6c) && // K-r
492 (imgdata.lens.makernotes.CamID != 0x12e76) && // K-5
493 @@ -6964,14 +6964,14 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
494 if ((table_buf[iLensData+14] > 1) &&
495 (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))
496 imgdata.lens.makernotes.MaxAp4CurFocal =
497 - powf64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
498 + powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
500 else if ((imgdata.lens.makernotes.CamID != 0x12e76) && // K-5
501 (table_buf[iLensData+15] > 1) &&
502 (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))
504 imgdata.lens.makernotes.MaxAp4CurFocal =
505 - powf64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
506 + powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
510 @@ -7137,7 +7137,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
511 lid = (((ushort)table_buf[2])<<8) |
512 ((ushort)table_buf[3]);
513 imgdata.lens.makernotes.CurAp =
514 - powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
515 + powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
519 @@ -7617,7 +7617,7 @@ void CLASS parse_makernote (int base, int uptag)
523 - imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
524 + imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);
527 imgdata.lens.makernotes.LensID =
528 @@ -7637,10 +7637,10 @@ void CLASS parse_makernote (int base, int uptag)
529 fread(imgdata.lens.makernotes.Lens, len, 1, ifp);
532 - imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);
533 + imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
536 - imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);
537 + imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
540 imgdata.lens.makernotes.MinFocal = (float)get2();
541 @@ -7651,7 +7651,7 @@ void CLASS parse_makernote (int base, int uptag)
542 imgdata.lens.makernotes.MaxFocal = imgdata.lens.makernotes.MinFocal;
545 - imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() / 256.0f);
546 + imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
549 imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;
550 @@ -7809,13 +7809,13 @@ void CLASS parse_makernote (int base, int uptag)
552 if (table_buf[iLensData+9] && (fabs(imgdata.lens.makernotes.CurFocal) < 0.1f))
553 imgdata.lens.makernotes.CurFocal =
554 - 10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);
555 + 10*(table_buf[iLensData+9]>>2) * powf_64(4, (table_buf[iLensData+9] & 0x03)-2);
556 if (table_buf[iLensData+10] & 0xf0)
557 imgdata.lens.makernotes.MaxAp4CurFocal =
558 - powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);
559 + powf_64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);
560 if (table_buf[iLensData+10] & 0x0f)
561 imgdata.lens.makernotes.MinAp4CurFocal =
562 - powf64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
563 + powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
565 (imgdata.lens.makernotes.CamID != 0x12e6c) && // K-r
566 (imgdata.lens.makernotes.CamID != 0x12e76) && // K-5
567 @@ -7836,14 +7836,14 @@ void CLASS parse_makernote (int base, int uptag)
568 if ((table_buf[iLensData+14] > 1) &&
569 (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))
570 imgdata.lens.makernotes.MaxAp4CurFocal =
571 - powf64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
572 + powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
574 else if ((imgdata.lens.makernotes.CamID != 0x12e76) && // K-5
575 (table_buf[iLensData+15] > 1) &&
576 (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))
578 imgdata.lens.makernotes.MaxAp4CurFocal =
579 - powf64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
580 + powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
584 @@ -8004,7 +8004,7 @@ void CLASS parse_makernote (int base, int uptag)
585 lid = (((ushort)table_buf[2])<<8) |
586 ((ushort)table_buf[3]);
587 imgdata.lens.makernotes.CurAp =
588 - powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
589 + powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
593 @@ -8089,15 +8089,15 @@ void CLASS parse_makernote (int base, int uptag)
597 - iso_speed = int(100.0 * powf64(2.0f,float(cc)/12.0-5.0));
598 + iso_speed = int(100.0 * powf_64(2.0f,float(cc)/12.0-5.0));
600 if (tag == 4 && len > 26 && len < 35) {
601 if ((i=(get4(),get2())) != 0x7fff && (!iso_speed || iso_speed == 65535))
602 - iso_speed = 50 * powf64(2.0, i/32.0 - 4);
603 + iso_speed = 50 * powf_64(2.0, i/32.0 - 4);
604 if ((i=(get2(),get2())) != 0x7fff && !aperture)
605 - aperture = powf64(2.0, i/64.0);
606 + aperture = powf_64(2.0, i/64.0);
607 if ((i=get2()) != 0xffff && !shutter)
608 - shutter = powf64(2.0, (short) i/-32.0);
609 + shutter = powf_64(2.0, (short) i/-32.0);
610 wbi = (get2(),get2());
611 shot_order = (get2(),get2());
613 @@ -8548,7 +8548,7 @@ void CLASS parse_exif (int base)
614 imgdata.lens.Lens[0] = 0;
617 - imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
618 + imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));
621 case 33434: shutter = getreal(type); break;
622 @@ -8561,10 +8561,10 @@ void CLASS parse_exif (int base)
624 case 36868: get_timestamp(0); break;
625 case 37377: if ((expo = -getreal(type)) < 128 && shutter == 0.)
626 - shutter = powf64(2.0, expo); break;
627 + shutter = powf_64(2.0, expo); break;
629 if (fabs(ape = getreal(type))<256.0)
630 - aperture = powf64(2.0, ape/2);
631 + aperture = powf_64(2.0, ape/2);
633 case 37385: flash_used = getreal(type); break;
634 case 37386: focal_len = getreal(type); break;
635 @@ -9171,7 +9171,7 @@ int CLASS parse_tiff_ifd (int base)
636 imgdata.lens.Lens[0] = 0;
639 - imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
640 + imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));
644 @@ -9940,22 +9940,22 @@ void CLASS parse_ciff (int offset, int length, int depth)
647 if (type == 0x1818) {
648 - shutter = powf64(2.0f, -int_to_float((get4(),get4())));
649 - aperture = powf64(2.0f, int_to_float(get4())/2);
650 + shutter = powf_64(2.0f, -int_to_float((get4(),get4())));
651 + aperture = powf_64(2.0f, int_to_float(get4())/2);
652 #ifdef LIBRAW_LIBRARY_BUILD
653 imgdata.lens.makernotes.CurAp = aperture;
656 if (type == 0x102a) {
657 // iso_speed = pow (2.0, (get4(),get2())/32.0 - 4) * 50;
658 - iso_speed = powf64(2.0f, ((get2(),get2()) + get2())/32.0f - 5.0f) * 100.0f;
659 + iso_speed = powf_64(2.0f, ((get2(),get2()) + get2())/32.0f - 5.0f) * 100.0f;
660 #ifdef LIBRAW_LIBRARY_BUILD
661 aperture = _CanonConvertAperture((get2(),get2()));
662 imgdata.lens.makernotes.CurAp = aperture;
664 - aperture = powf64(2.0, (get2(),(short)get2())/64.0);
665 + aperture = powf_64(2.0, (get2(),(short)get2())/64.0);
667 - shutter = powf64(2.0,-((short)get2())/32.0);
668 + shutter = powf_64(2.0,-((short)get2())/32.0);
669 wbi = (get2(),get2());
670 if (wbi > 17) wbi = 0;
671 fseek (ifp, 32, SEEK_CUR);
672 @@ -10159,8 +10159,8 @@ void CLASS parse_phase_one (int base)
673 setPhaseOneFeatures(unique_id);
676 - if (type == 4) imgdata.lens.makernotes.CurAp = powf64(2.0f, (int_to_float(data)/2.0f));
677 - else imgdata.lens.makernotes.CurAp = powf64(2.0f, (getreal(type)/2.0f));
678 + if (type == 4) imgdata.lens.makernotes.CurAp = powf_64(2.0f, (int_to_float(data)/2.0f));
679 + else imgdata.lens.makernotes.CurAp = powf_64(2.0f, (getreal(type)/2.0f));
682 if (type == 4) imgdata.lens.makernotes.CurFocal = int_to_float(data);
683 @@ -10174,16 +10174,16 @@ void CLASS parse_phase_one (int base)
687 - imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));
688 + imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, (int_to_float(data)/2.0f));
690 - imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
691 + imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, (getreal(type) / 2.0f));
696 - imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));
697 + imgdata.lens.makernotes.MinAp4CurFocal = powf_64(2.0f, (int_to_float(data)/2.0f));
699 - imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
700 + imgdata.lens.makernotes.MinAp4CurFocal = powf_64(2.0f, (getreal(type) / 2.0f));
704 @@ -11996,15 +11996,15 @@ void CLASS identify()
705 case 18: iso_speed = 320; break;
706 case 19: iso_speed = 400; break;
708 - shutter = powf64(2.0f, (((float)get4())/8.0f)) / 16000.0f;
709 + shutter = powf_64(2.0f, (((float)get4())/8.0f)) / 16000.0f;
710 FORC4 cam_mul[c ^ (c >> 1)] = get4();
711 fseek (ifp, 88, SEEK_SET);
712 - aperture = powf64(2.0f, ((float)get4())/16.0f);
713 + aperture = powf_64(2.0f, ((float)get4())/16.0f);
714 fseek (ifp, 112, SEEK_SET);
716 #ifdef LIBRAW_LIBRARY_BUILD
717 fseek (ifp, 104, SEEK_SET);
718 - imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, ((float)get4())/16.0f);
719 + imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, ((float)get4())/16.0f);
720 fseek (ifp, 124, SEEK_SET);
721 fread(imgdata.lens.makernotes.Lens, 32, 1, ifp);
722 imgdata.lens.makernotes.CameraMount = LIBRAW_MOUNT_Contax_N;