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
fab0a8b2
Commit
fab0a8b2
authored
Oct 13, 2012
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libm: add fallbacks for various single-precision functions
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
c3e73100
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
0 deletions
+49
-0
configure
configure
+8
-0
aacps_tablegen.h
libavcodec/aacps_tablegen.h
+1
-0
libm.h
libavutil/libm.h
+40
-0
No files found.
configure
View file @
fab0a8b2
...
@@ -1125,20 +1125,28 @@ HAVE_LIST_PUB='
...
@@ -1125,20 +1125,28 @@ HAVE_LIST_PUB='
'
'
MATH_FUNCS
=
"
MATH_FUNCS
=
"
atanf
atan2f
cbrtf
cbrtf
cosf
exp2
exp2
exp2f
exp2f
expf
isinf
isinf
isnan
isnan
ldexpf
llrint
llrint
llrintf
llrintf
log2
log2
log2f
log2f
log10f
lrint
lrint
lrintf
lrintf
powf
rint
rint
round
round
roundf
roundf
sinf
trunc
trunc
truncf
truncf
"
"
...
...
libavcodec/aacps_tablegen.h
View file @
fab0a8b2
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "libavcodec/aacps_tables.h"
#include "libavcodec/aacps_tables.h"
#else
#else
#include "libavutil/common.h"
#include "libavutil/common.h"
#include "libavutil/libm.h"
#include "libavutil/mathematics.h"
#include "libavutil/mathematics.h"
#include "libavutil/mem.h"
#include "libavutil/mem.h"
#define NR_ALLPASS_BANDS20 30
#define NR_ALLPASS_BANDS20 30
...
...
libavutil/libm.h
View file @
fab0a8b2
...
@@ -29,6 +29,21 @@
...
@@ -29,6 +29,21 @@
#include "attributes.h"
#include "attributes.h"
#include "intfloat.h"
#include "intfloat.h"
#if !HAVE_ATANF
#undef atanf
#define atanf(x) ((float)atan(x))
#endif
#if !HAVE_ATAN2F
#undef atan2f
#define atan2f(y, x) ((float)atan2(y, x))
#endif
#if !HAVE_POWF
#undef powf
#define powf(x, y) ((float)pow(x, y))
#endif
#if !HAVE_CBRTF
#if !HAVE_CBRTF
static
av_always_inline
float
cbrtf
(
float
x
)
static
av_always_inline
float
cbrtf
(
float
x
)
{
{
...
@@ -36,6 +51,16 @@ static av_always_inline float cbrtf(float x)
...
@@ -36,6 +51,16 @@ static av_always_inline float cbrtf(float x)
}
}
#endif
#endif
#if !HAVE_COSF
#undef cosf
#define cosf(x) ((float)cos(x))
#endif
#if !HAVE_EXPF
#undef expf
#define expf(x) ((float)exp(x))
#endif
#if !HAVE_EXP2
#if !HAVE_EXP2
#undef exp2
#undef exp2
#define exp2(x) exp((x) * 0.693147180559945)
#define exp2(x) exp((x) * 0.693147180559945)
...
@@ -66,6 +91,11 @@ static av_always_inline av_const int isnan(float x)
...
@@ -66,6 +91,11 @@ static av_always_inline av_const int isnan(float x)
}
}
#endif
/* HAVE_ISNAN */
#endif
/* HAVE_ISNAN */
#if !HAVE_LDEXPF
#undef ldexpf
#define ldexpf(x, exp) ((float)ldexp(x, exp))
#endif
#if !HAVE_LLRINT
#if !HAVE_LLRINT
#undef llrint
#undef llrint
#define llrint(x) ((long long)rint(x))
#define llrint(x) ((long long)rint(x))
...
@@ -86,6 +116,16 @@ static av_always_inline av_const int isnan(float x)
...
@@ -86,6 +116,16 @@ static av_always_inline av_const int isnan(float x)
#define log2f(x) ((float)log2(x))
#define log2f(x) ((float)log2(x))
#endif
/* HAVE_LOG2F */
#endif
/* HAVE_LOG2F */
#if !HAVE_LOG10F
#undef log10f
#define log10f(x) ((float)log10(x))
#endif
#if !HAVE_SINF
#undef sinf
#define sinf(x) ((float)sin(x))
#endif
#if !HAVE_RINT
#if !HAVE_RINT
static
inline
double
rint
(
double
x
)
static
inline
double
rint
(
double
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