Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
cae851c7
Commit
cae851c7
authored
10 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
avcodec/ac3enc: Use avpriv_float_dsp_alloc()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5bf4cd8e
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
libavcodec/ac3enc.c
+1
-0
1 addition, 0 deletions
libavcodec/ac3enc.c
libavcodec/ac3enc.h
+1
-1
1 addition, 1 deletion
libavcodec/ac3enc.h
libavcodec/ac3enc_float.c
+3
-1
3 additions, 1 deletion
libavcodec/ac3enc_float.c
libavcodec/ac3enc_template.c
+1
-1
1 addition, 1 deletion
libavcodec/ac3enc_template.c
with
6 additions
and
3 deletions
libavcodec/ac3enc.c
+
1
−
0
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
);
...
...
This diff is collapsed.
Click to expand it.
libavcodec/ac3enc.h
+
1
−
1
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
...
...
This diff is collapsed.
Click to expand it.
libavcodec/ac3enc_float.c
+
3
−
1
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
);
}
...
...
This diff is collapsed.
Click to expand it.
libavcodec/ac3enc_template.c
+
1
−
1
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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment