Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
46df708b
Commit
46df708b
authored
12 years ago
by
Martin Storsjö
Browse files
Options
Downloads
Patches
Plain Diff
libm: Provide fallback definitions for isnan() and isinf()
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
ef882e46
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure
+4
-0
4 additions, 0 deletions
configure
libavutil/libm.h
+21
-0
21 additions, 0 deletions
libavutil/libm.h
with
25 additions
and
0 deletions
configure
+
4
−
0
View file @
46df708b
...
@@ -1093,6 +1093,8 @@ HAVE_LIST="
...
@@ -1093,6 +1093,8 @@ HAVE_LIST="
inet_aton
inet_aton
inline_asm
inline_asm
isatty
isatty
isinf
isnan
jack_port_get_latency_range
jack_port_get_latency_range
ldbrx
ldbrx
libdc1394_1
libdc1394_1
...
@@ -2922,6 +2924,8 @@ enabled vaapi && require vaapi va/va.h vaInitialize -lva
...
@@ -2922,6 +2924,8 @@ enabled vaapi && require vaapi va/va.h vaInitialize -lva
check_mathfunc cbrtf
check_mathfunc cbrtf
check_mathfunc exp2
check_mathfunc exp2
check_mathfunc exp2f
check_mathfunc exp2f
check_mathfunc isinf
check_mathfunc isnan
check_mathfunc llrint
check_mathfunc llrint
check_mathfunc llrintf
check_mathfunc llrintf
check_mathfunc log2
check_mathfunc log2
...
...
This diff is collapsed.
Click to expand it.
libavutil/libm.h
+
21
−
0
View file @
46df708b
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include
<math.h>
#include
<math.h>
#include
"config.h"
#include
"config.h"
#include
"attributes.h"
#include
"attributes.h"
#include
"intfloat.h"
#if !HAVE_CBRTF
#if !HAVE_CBRTF
static
av_always_inline
float
cbrtf
(
float
x
)
static
av_always_inline
float
cbrtf
(
float
x
)
...
@@ -45,6 +46,26 @@ 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))
#define exp2f(x) ((float)exp2(x))
#endif
/* HAVE_EXP2F */
#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
#if !HAVE_LLRINT
#undef llrint
#undef llrint
#define llrint(x) ((long long)rint(x))
#define llrint(x) ((long long)rint(x))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment