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
cae851c7
Commit
cae851c7
authored
Nov 29, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/ac3enc: Use avpriv_float_dsp_alloc()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5bf4cd8e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
3 deletions
+6
-3
ac3enc.c
libavcodec/ac3enc.c
+1
-0
ac3enc.h
libavcodec/ac3enc.h
+1
-1
ac3enc_float.c
libavcodec/ac3enc_float.c
+3
-1
ac3enc_template.c
libavcodec/ac3enc_template.c
+1
-1
No files found.
libavcodec/ac3enc.c
View file @
cae851c7
...
...
@@ -2035,6 +2035,7 @@ av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
av_freep
(
&
s
->
qmant_buffer
);
av_freep
(
&
s
->
cpl_coord_exp_buffer
);
av_freep
(
&
s
->
cpl_coord_mant_buffer
);
av_freep
(
&
s
->
fdsp
);
for
(
blk
=
0
;
blk
<
s
->
num_blocks
;
blk
++
)
{
AC3Block
*
block
=
&
s
->
blocks
[
blk
];
av_freep
(
&
block
->
mdct_coef
);
...
...
libavcodec/ac3enc.h
View file @
cae851c7
...
...
@@ -165,7 +165,7 @@ typedef struct AC3EncodeContext {
AVCodecContext
*
avctx
;
///< parent AVCodecContext
PutBitContext
pb
;
///< bitstream writer context
AudioDSPContext
adsp
;
AVFloatDSPContext
fdsp
;
AVFloatDSPContext
*
fdsp
;
MECmpContext
mecc
;
AC3DSPContext
ac3dsp
;
///< AC-3 optimized functions
FFTContext
mdct
;
///< FFT context for MDCT calculation
...
...
libavcodec/ac3enc_float.c
View file @
cae851c7
...
...
@@ -139,7 +139,9 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
av_cold
int
ff_ac3_float_encode_init
(
AVCodecContext
*
avctx
)
{
AC3EncodeContext
*
s
=
avctx
->
priv_data
;
avpriv_float_dsp_init
(
&
s
->
fdsp
,
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
s
->
fdsp
=
avpriv_float_dsp_alloc
(
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
if
(
!
s
->
fdsp
)
return
AVERROR
(
ENOMEM
);
return
ff_ac3_encode_init
(
avctx
);
}
...
...
libavcodec/ac3enc_template.c
View file @
cae851c7
...
...
@@ -108,7 +108,7 @@ static void apply_mdct(AC3EncodeContext *s)
const
SampleType
*
input_samples
=
&
s
->
planar_samples
[
ch
][
blk
*
AC3_BLOCK_SIZE
];
#if CONFIG_AC3ENC_FLOAT
s
->
fdsp
.
vector_fmul
(
s
->
windowed_samples
,
input_samples
,
s
->
fdsp
->
vector_fmul
(
s
->
windowed_samples
,
input_samples
,
s
->
mdct_window
,
AC3_WINDOW_SIZE
);
#else
s
->
ac3dsp
.
apply_window_int16
(
s
->
windowed_samples
,
input_samples
,
...
...
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