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
5ec81929
Commit
5ec81929
authored
Apr 13, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/fft-test: use av_malloc_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
eccec203
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
fft-test.c
libavcodec/fft-test.c
+5
-5
No files found.
libavcodec/fft-test.c
View file @
5ec81929
...
@@ -75,7 +75,7 @@ static void fft_ref_init(int nbits, int inverse)
...
@@ -75,7 +75,7 @@ static void fft_ref_init(int nbits, int inverse)
double
c1
,
s1
,
alpha
;
double
c1
,
s1
,
alpha
;
n
=
1
<<
nbits
;
n
=
1
<<
nbits
;
exptab
=
av_malloc
((
n
/
2
)
*
sizeof
(
*
exptab
));
exptab
=
av_malloc
_array
((
n
/
2
),
sizeof
(
*
exptab
));
for
(
i
=
0
;
i
<
(
n
/
2
);
i
++
)
{
for
(
i
=
0
;
i
<
(
n
/
2
);
i
++
)
{
alpha
=
2
*
M_PI
*
(
float
)
i
/
(
float
)
n
;
alpha
=
2
*
M_PI
*
(
float
)
i
/
(
float
)
n
;
...
@@ -304,10 +304,10 @@ int main(int argc, char **argv)
...
@@ -304,10 +304,10 @@ int main(int argc, char **argv)
}
}
fft_size
=
1
<<
fft_nbits
;
fft_size
=
1
<<
fft_nbits
;
tab
=
av_malloc
(
fft_size
*
sizeof
(
FFTComplex
));
tab
=
av_malloc
_array
(
fft_size
,
sizeof
(
FFTComplex
));
tab1
=
av_malloc
(
fft_size
*
sizeof
(
FFTComplex
));
tab1
=
av_malloc
_array
(
fft_size
,
sizeof
(
FFTComplex
));
tab_ref
=
av_malloc
(
fft_size
*
sizeof
(
FFTComplex
));
tab_ref
=
av_malloc
_array
(
fft_size
,
sizeof
(
FFTComplex
));
tab2
=
av_malloc
(
fft_size
*
sizeof
(
FFTSample
));
tab2
=
av_malloc
_array
(
fft_size
,
sizeof
(
FFTSample
));
switch
(
transform
)
{
switch
(
transform
)
{
case
TRANSFORM_MDCT
:
case
TRANSFORM_MDCT
:
...
...
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