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
6f48c609
Commit
6f48c609
authored
Sep 10, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/twinvq: Use FF_ALLOC_ARRAY_OR_GOTO()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c4a0c64f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
twinvq.c
libavcodec/twinvq.c
+10
-10
No files found.
libavcodec/twinvq.c
View file @
6f48c609
...
...
@@ -546,24 +546,24 @@ static av_cold int init_mdct_win(TwinVQContext *tctx)
return
ret
;
}
FF_ALLOC_OR_GOTO
(
tctx
->
avctx
,
tctx
->
tmp_buf
,
mtab
->
size
*
sizeof
(
*
tctx
->
tmp_buf
),
alloc_fail
);
FF_ALLOC_
ARRAY_
OR_GOTO
(
tctx
->
avctx
,
tctx
->
tmp_buf
,
mtab
->
size
,
sizeof
(
*
tctx
->
tmp_buf
),
alloc_fail
);
FF_ALLOC_OR_GOTO
(
tctx
->
avctx
,
tctx
->
spectrum
,
2
*
mtab
->
size
*
channels
*
sizeof
(
*
tctx
->
spectrum
),
FF_ALLOC_
ARRAY_
OR_GOTO
(
tctx
->
avctx
,
tctx
->
spectrum
,
2
*
mtab
->
size
,
channels
*
sizeof
(
*
tctx
->
spectrum
),
alloc_fail
);
FF_ALLOC_OR_GOTO
(
tctx
->
avctx
,
tctx
->
curr_frame
,
2
*
mtab
->
size
*
channels
*
sizeof
(
*
tctx
->
curr_frame
),
FF_ALLOC_
ARRAY_
OR_GOTO
(
tctx
->
avctx
,
tctx
->
curr_frame
,
2
*
mtab
->
size
,
channels
*
sizeof
(
*
tctx
->
curr_frame
),
alloc_fail
);
FF_ALLOC_OR_GOTO
(
tctx
->
avctx
,
tctx
->
prev_frame
,
2
*
mtab
->
size
*
channels
*
sizeof
(
*
tctx
->
prev_frame
),
FF_ALLOC_
ARRAY_
OR_GOTO
(
tctx
->
avctx
,
tctx
->
prev_frame
,
2
*
mtab
->
size
,
channels
*
sizeof
(
*
tctx
->
prev_frame
),
alloc_fail
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
int
m
=
4
*
mtab
->
size
/
mtab
->
fmode
[
i
].
sub
;
double
freq
=
2
*
M_PI
/
m
;
FF_ALLOC_OR_GOTO
(
tctx
->
avctx
,
tctx
->
cos_tabs
[
i
],
(
m
/
4
)
*
sizeof
(
*
tctx
->
cos_tabs
[
i
]),
alloc_fail
);
FF_ALLOC_
ARRAY_
OR_GOTO
(
tctx
->
avctx
,
tctx
->
cos_tabs
[
i
],
(
m
/
4
)
,
sizeof
(
*
tctx
->
cos_tabs
[
i
]),
alloc_fail
);
for
(
j
=
0
;
j
<=
m
/
8
;
j
++
)
tctx
->
cos_tabs
[
i
][
j
]
=
cos
((
2
*
j
+
1
)
*
freq
);
...
...
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