summarylogtreecommitdiffstats
path: root/ambiguous-powf64.patch
blob: 50e6f5b2ad93bd136141568edb16c7e9766b29e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
diff --color --unified --recursive --text '--exclude=.git' '--exclude=generated' '--exclude=build' '--exclude=_build' OpenRV.clean/src/pub/LibRaw/internal/dcraw_common.cpp OpenRV/src/pub/LibRaw/internal/dcraw_common.cpp
--- OpenRV.clean/src/pub/LibRaw/internal/dcraw_common.cpp	2023-08-31 22:22:34.043241476 -0700
+++ OpenRV/src/pub/LibRaw/internal/dcraw_common.cpp	2023-09-01 15:33:22.397604203 -0700
@@ -6837,11 +6837,11 @@
     {
       if (buf[0])
         imgdata.lens.makernotes.MaxAp4CurFocal =
-          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
+          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0f - 1.06f) / 2.0f)*10.0f) / 10.0f;
 
       if (buf[1])
         imgdata.lens.makernotes.MinAp4CurFocal =
-          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
+          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0f - 1.06f) / 2.0f)*10.0f) / 10.0f;
     }
 
   if (imgdata.lens.makernotes.CameraMount != LIBRAW_MOUNT_FixedLens)
@@ -7276,7 +7276,7 @@
           }
           break;
         case 0x1002:
-          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
+          imgdata.lens.makernotes.CurAp = powf64(2.0f, (float)(getreal(type)/2));
           break;
         case 0x20100201:
           imgdata.lens.makernotes.LensID =
@@ -8068,7 +8068,7 @@
           }
           break;
         case 0x1002:
-          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
+          imgdata.lens.makernotes.CurAp = powf64(2.0f, (float)(getreal(type)/2));
           break;
         case 0x20401112:
           imgdata.sizes.OlympusCropID = get2();
@@ -8535,7 +8535,7 @@
       {
         unsigned char cc;
         fread(&cc,1,1,ifp);
-        iso_speed = int(100.0 * powf64(2.0f,float(cc)/12.0-5.0));
+        iso_speed = int(100.0 * powf64(2.0f,float(cc)/12.0f-5.0f));
       }
     if (tag == 4 && len > 26 && len < 35) {
       if ((i=(get4(),get2())) != 0x7fff && (!iso_speed || iso_speed == 65535))
@@ -9264,7 +9264,7 @@
         imgdata.lens.Lens[0] = 0;
       break;
     case 0x9205:
-      imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
+      imgdata.lens.EXIF_MaxAp = powf64(2.0f, (float)(getreal(type) / 2.0f));
       break;
 #endif
       case 33434:  tiff_ifd[tiff_nifds-1].t_shutter =
@@ -10084,7 +10084,7 @@
         imgdata.lens.Lens[0] = 0;
       break;
     case 0x9205:
-				imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
+				imgdata.lens.EXIF_MaxAp = powf64(2.0f, (float)(getreal(type) / 2.0f));
       break;
 // IB end
 #endif
@@ -11270,7 +11270,7 @@
       break;
     case 0x0401:
       if (type == 4) imgdata.lens.makernotes.CurAp =  powf64(2.0f, (int_to_float(data)/2.0f));
-      else imgdata.lens.makernotes.CurAp = powf64(2.0f, (getreal(type)/2.0f));
+      else imgdata.lens.makernotes.CurAp = powf64(2.0f, (float)(getreal(type)/2.0f));
       break;
     case 0x0403:
       if (type == 4) imgdata.lens.makernotes.CurFocal =  int_to_float(data);
@@ -11286,14 +11286,14 @@
       if (type == 4) {
       	imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));
       } else {
-        imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
+        imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (float)(getreal(type) / 2.0f));
       }
       break;
     case 0x0415:
       if (type == 4) {
       	imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));
       } else {
-        imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
+        imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (float)(getreal(type) / 2.0f));
       }
       break;
     case 0x0416: