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
824ba897
Commit
824ba897
authored
Nov 11, 2015
by
Ganesh Ajjanagadde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/cos_tablegen: use M_PI instead of actual literal
Signed-off-by:
Ganesh Ajjanagadde
<
gajjanagadde@gmail.com
>
parent
94565f37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
cos_tablegen.c
libavcodec/cos_tablegen.c
+3
-1
No files found.
libavcodec/cos_tablegen.c
View file @
824ba897
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
#include <string.h>
#include <string.h>
#include <math.h>
#include <math.h>
#include "libavutil/mathematics.h"
#define BITS 16
#define BITS 16
#define FLOATFMT "%.18e"
#define FLOATFMT "%.18e"
#define FIXEDFMT "%6d"
#define FIXEDFMT "%6d"
...
@@ -61,7 +63,7 @@ int main(int argc, char *argv[])
...
@@ -61,7 +63,7 @@ int main(int argc, char *argv[])
printf
(
"#include
\"
libavcodec/%s
\"\n
"
,
do_sin
?
"rdft.h"
:
"fft.h"
);
printf
(
"#include
\"
libavcodec/%s
\"\n
"
,
do_sin
?
"rdft.h"
:
"fft.h"
);
for
(
i
=
4
;
i
<=
BITS
;
i
++
)
{
for
(
i
=
4
;
i
<=
BITS
;
i
++
)
{
int
m
=
1
<<
i
;
int
m
=
1
<<
i
;
double
freq
=
2
*
3
.
14159265358979323846
/
m
;
double
freq
=
2
*
M_PI
/
m
;
printf
(
"%s(%i) = {
\n
"
,
do_sin
?
"SINTABLE"
:
"COSTABLE"
,
m
);
printf
(
"%s(%i) = {
\n
"
,
do_sin
?
"SINTABLE"
:
"COSTABLE"
,
m
);
for
(
j
=
0
;
j
<
m
/
2
-
1
;
j
++
)
{
for
(
j
=
0
;
j
<
m
/
2
-
1
;
j
++
)
{
int
idx
=
j
>
m
/
4
?
m
/
2
-
j
:
j
;
int
idx
=
j
>
m
/
4
?
m
/
2
-
j
:
j
;
...
...
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