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
d987a9e9
Commit
d987a9e9
authored
Jan 08, 2010
by
Alex Converse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fft-test: whitespace cosmetics
Originally committed as revision 21085 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
e8c6411c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
fft-test.c
libavcodec/fft-test.c
+10
-10
No files found.
libavcodec/fft-test.c
View file @
d987a9e9
...
...
@@ -53,7 +53,7 @@ static void fft_ref_init(int nbits, int inverse)
n
=
1
<<
nbits
;
exptab
=
av_malloc
((
n
/
2
)
*
sizeof
(
FFTComplex
));
for
(
i
=
0
;
i
<
(
n
/
2
);
i
++
)
{
for
(
i
=
0
;
i
<
(
n
/
2
);
i
++
)
{
alpha
=
2
*
M_PI
*
(
float
)
i
/
(
float
)
n
;
c1
=
cos
(
alpha
);
s1
=
sin
(
alpha
);
...
...
@@ -72,11 +72,11 @@ static void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits)
n
=
1
<<
nbits
;
n2
=
n
>>
1
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
{
tmp_re
=
0
;
tmp_im
=
0
;
q
=
tab
;
for
(
j
=
0
;
j
<
n
;
j
++
)
{
for
(
j
=
0
;
j
<
n
;
j
++
)
{
k
=
(
i
*
j
)
&
(
n
-
1
);
if
(
k
>=
n2
)
{
c
=
-
exptab
[
k
-
n2
].
re
;
...
...
@@ -99,9 +99,9 @@ static void imdct_ref(float *out, float *in, int nbits)
int
k
,
i
,
a
;
double
sum
,
f
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
{
sum
=
0
;
for
(
k
=
0
;
k
<
n
/
2
;
k
++
)
{
for
(
k
=
0
;
k
<
n
/
2
;
k
++
)
{
a
=
(
2
*
i
+
1
+
(
n
/
2
))
*
(
2
*
k
+
1
);
f
=
cos
(
M_PI
*
a
/
(
double
)(
2
*
n
));
sum
+=
f
*
in
[
k
];
...
...
@@ -118,9 +118,9 @@ static void mdct_ref(float *output, float *input, int nbits)
double
a
,
s
;
/* do it by hand */
for
(
k
=
0
;
k
<
n
/
2
;
k
++
)
{
for
(
k
=
0
;
k
<
n
/
2
;
k
++
)
{
s
=
0
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
{
a
=
(
2
*
M_PI
*
(
2
*
i
+
1
+
n
/
2
)
*
(
2
*
k
+
1
)
/
(
4
*
n
));
s
+=
input
[
i
]
*
cos
(
a
);
}
...
...
@@ -147,7 +147,7 @@ static void check_diff(float *tab1, float *tab2, int n, double scale)
double
max
=
0
;
double
error
=
0
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
{
double
e
=
fabsf
(
tab1
[
i
]
-
(
tab2
[
i
]
/
scale
));
if
(
e
>=
1e-3
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"ERROR %d: %f %f
\n
"
,
...
...
@@ -242,7 +242,7 @@ int main(int argc, char **argv)
/* generate random data */
for
(
i
=
0
;
i
<
fft_size
;
i
++
)
{
for
(
i
=
0
;
i
<
fft_size
;
i
++
)
{
tab1
[
i
].
re
=
frandom
(
&
prng
);
tab1
[
i
].
im
=
frandom
(
&
prng
);
}
...
...
@@ -282,7 +282,7 @@ int main(int argc, char **argv)
nb_its
=
1
;
for
(;;)
{
time_start
=
gettime
();
for
(
it
=
0
;
it
<
nb_its
;
it
++
)
{
for
(
it
=
0
;
it
<
nb_its
;
it
++
)
{
if
(
do_mdct
)
{
if
(
do_inverse
)
{
ff_imdct_calc
(
m
,
(
float
*
)
tab
,
(
float
*
)
tab1
);
...
...
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