]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/softfloat.c
avutil/avstring: Do not print NULL
[ffmpeg] / libavutil / softfloat.c
index 4fc6860e65b6b01cb5669bb208b34002d348a1db..28bea583e1f133f3cb4ce4cec2798a7415f2be43 100644 (file)
  */
 
 #include <inttypes.h>
-#include <stdio.h>
 #include "softfloat.h"
 #include "common.h"
 #include "log.h"
 
-#undef printf
-
-static const SoftFloat FLOAT_0_017776489257 = {0x1234, 12};
-static const SoftFloat FLOAT_1374_40625 = {0xabcd, 25};
-static const SoftFloat FLOAT_0_1249694824218 = {0xFFF, 15};
-
-
-static av_const double av_sf2double(SoftFloat v) {
-    v.exp -= ONE_BITS +1;
-    if(v.exp > 0) return (double)v.mant * (double)(1 << v.exp);
-    else          return (double)v.mant / (double)(1 << (-v.exp));
-}
-
 void av_sincos_sf(int a, int *s, int *c)
 {
     int idx, sign;
@@ -86,6 +72,14 @@ void av_sincos_sf(int a, int *s, int *c)
     *s = (int)(((int64_t)cv * st + (int64_t)sv * ct + 0x20000000) >> 30);
 }
 
+#ifdef TEST
+#include <stdio.h>
+
+static const SoftFloat FLOAT_0_017776489257 = {0x1234, 12};
+static const SoftFloat FLOAT_1374_40625 = {0xabcd, 25};
+static const SoftFloat FLOAT_0_1249694824218 = {0xFFF, 15};
+
+
 int main(void){
     SoftFloat one= av_int2sf(1, 0);
     SoftFloat sf1, sf2, sf3;
@@ -155,3 +149,4 @@ int main(void){
     return 0;
 
 }
+#endif