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
93f959b6
Commit
93f959b6
authored
Nov 30, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/atrac3: Use avpriv_float_dsp_alloc()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
1aca990b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
atrac3.c
libavcodec/atrac3.c
+5
-4
No files found.
libavcodec/atrac3.c
View file @
93f959b6
...
...
@@ -109,7 +109,7 @@ typedef struct ATRAC3Context {
AtracGCContext
gainc_ctx
;
FFTContext
mdct_ctx
;
FmtConvertContext
fmt_conv
;
AVFloatDSPContext
fdsp
;
AVFloatDSPContext
*
fdsp
;
}
ATRAC3Context
;
static
DECLARE_ALIGNED
(
32
,
float
,
mdct_window
)[
MDCT_SIZE
];
...
...
@@ -142,7 +142,7 @@ static void imlt(ATRAC3Context *q, float *input, float *output, int odd_band)
q
->
mdct_ctx
.
imdct_calc
(
&
q
->
mdct_ctx
,
output
,
input
);
/* Perform windowing on the output. */
q
->
fdsp
.
vector_fmul
(
output
,
output
,
mdct_window
,
MDCT_SIZE
);
q
->
fdsp
->
vector_fmul
(
output
,
output
,
mdct_window
,
MDCT_SIZE
);
}
/*
...
...
@@ -192,6 +192,7 @@ static av_cold int atrac3_decode_close(AVCodecContext *avctx)
av_freep
(
&
q
->
units
);
av_freep
(
&
q
->
decoded_bytes_buffer
);
av_freep
(
&
q
->
fdsp
);
ff_mdct_end
(
&
q
->
mdct_ctx
);
...
...
@@ -915,11 +916,11 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
}
ff_atrac_init_gain_compensation
(
&
q
->
gainc_ctx
,
4
,
3
);
avpriv_float_dsp_init
(
&
q
->
fdsp
,
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
q
->
fdsp
=
avpriv_float_dsp_alloc
(
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
ff_fmt_convert_init
(
&
q
->
fmt_conv
,
avctx
);
q
->
units
=
av_mallocz_array
(
avctx
->
channels
,
sizeof
(
*
q
->
units
));
if
(
!
q
->
units
)
{
if
(
!
q
->
units
||
!
q
->
fdsp
)
{
atrac3_decode_close
(
avctx
);
return
AVERROR
(
ENOMEM
);
}
...
...
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