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
b8e5b1d7
Commit
b8e5b1d7
authored
Nov 25, 2015
by
Ganesh Ajjanagadde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/mdct_template: use lrint instead of floor hack
Signed-off-by:
Ganesh Ajjanagadde
<
gajjanagadde@gmail.com
>
parent
df679f12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
mdct_template.c
libavcodec/mdct_template.c
+3
-2
No files found.
libavcodec/mdct_template.c
View file @
b8e5b1d7
...
...
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include "libavutil/common.h"
#include "libavutil/libm.h"
#include "libavutil/mathematics.h"
#include "fft.h"
#include "fft-internal.h"
...
...
@@ -82,8 +83,8 @@ av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale)
for
(
i
=
0
;
i
<
n4
;
i
++
)
{
alpha
=
2
*
M_PI
*
(
i
+
theta
)
/
n
;
#if FFT_FIXED_32
s
->
tcos
[
i
*
tstep
]
=
(
FFTSample
)
floor
(
-
cos
(
alpha
)
*
2147483648
.
0
+
0
.
5
);
s
->
tsin
[
i
*
tstep
]
=
(
FFTSample
)
floor
(
-
sin
(
alpha
)
*
2147483648
.
0
+
0
.
5
);
s
->
tcos
[
i
*
tstep
]
=
lrint
(
-
cos
(
alpha
)
*
2147483648
.
0
);
s
->
tsin
[
i
*
tstep
]
=
lrint
(
-
sin
(
alpha
)
*
2147483648
.
0
);
#else
s
->
tcos
[
i
*
tstep
]
=
FIX15
(
-
cos
(
alpha
)
*
scale
);
s
->
tsin
[
i
*
tstep
]
=
FIX15
(
-
sin
(
alpha
)
*
scale
);
...
...
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