Browse code

Workaround for missing llrintf()

Originally committed as revision 22954 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård authored on 2010/04/24 01:28:10
Showing 3 changed files
... ...
@@ -1052,6 +1052,7 @@ HAVE_LIST="
1052 1052
     libdc1394_1
1053 1053
     libdc1394_2
1054 1054
     llrint
1055
+    llrintf
1055 1056
     local_aligned_16
1056 1057
     local_aligned_8
1057 1058
     log2
... ...
@@ -2585,6 +2586,7 @@ check_lib va/va.h vaInitialize -lva
2585 2585
 check_mathfunc exp2
2586 2586
 check_mathfunc exp2f
2587 2587
 check_mathfunc llrint
2588
+check_mathfunc llrintf
2588 2589
 check_mathfunc log2
2589 2590
 check_mathfunc log2f
2590 2591
 check_mathfunc lrint
... ...
@@ -26,6 +26,7 @@
26 26
  */
27 27
 
28 28
 #include "libavutil/avstring.h"
29
+#include "libavutil/libm.h"
29 30
 #include "avcodec.h"
30 31
 #include "audioconvert.h"
31 32
 
... ...
@@ -43,6 +43,11 @@
43 43
 #define llrint(x) ((long long)rint(x))
44 44
 #endif /* HAVE_LLRINT */
45 45
 
46
+#if !HAVE_LLRINTF
47
+#undef llrintf
48
+#define llrintf(x) ((long long)rint(x))
49
+#endif /* HAVE_LLRINT */
50
+
46 51
 #if !HAVE_LOG2
47 52
 #undef log2
48 53
 #define log2(x) (log(x) * 1.44269504088896340736)