Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
46df708b
Commit
46df708b
authored
Jun 26, 2012
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libm: Provide fallback definitions for isnan() and isinf()
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
ef882e46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
configure
configure
+4
-0
libm.h
libavutil/libm.h
+21
-0
No files found.
configure
View file @
46df708b
...
...
@@ -1093,6 +1093,8 @@ HAVE_LIST="
inet_aton
inline_asm
isatty
isinf
isnan
jack_port_get_latency_range
ldbrx
libdc1394_1
...
...
@@ -2922,6 +2924,8 @@ enabled vaapi && require vaapi va/va.h vaInitialize -lva
check_mathfunc cbrtf
check_mathfunc exp2
check_mathfunc exp2f
check_mathfunc isinf
check_mathfunc isnan
check_mathfunc llrint
check_mathfunc llrintf
check_mathfunc log2
...
...
libavutil/libm.h
View file @
46df708b
...
...
@@ -27,6 +27,7 @@
#include <math.h>
#include "config.h"
#include "attributes.h"
#include "intfloat.h"
#if !HAVE_CBRTF
static
av_always_inline
float
cbrtf
(
float
x
)
...
...
@@ -45,6 +46,26 @@ static av_always_inline float cbrtf(float x)
#define exp2f(x) ((float)exp2(x))
#endif
/* HAVE_EXP2F */
#if !HAVE_ISINF
static
av_always_inline
av_const
int
isinf
(
float
x
)
{
uint32_t
v
=
av_float2int
(
x
);
if
((
v
&
0x7f800000
)
!=
0x7f800000
)
return
0
;
return
!
(
v
&
0x007fffff
);
}
#endif
/* HAVE_ISINF */
#if !HAVE_ISNAN
static
av_always_inline
av_const
int
isnan
(
float
x
)
{
uint32_t
v
=
av_float2int
(
x
);
if
((
v
&
0x7f800000
)
!=
0x7f800000
)
return
0
;
return
v
&
0x007fffff
;
}
#endif
/* HAVE_ISNAN */
#if !HAVE_LLRINT
#undef llrint
#define llrint(x) ((long long)rint(x))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment