Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
27631796
Commit
27631796
authored
Jun 11, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3: Only initialize float_dsp for the float encoder variant
parent
f0ce9913
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
3 deletions
+9
-3
ac3enc.c
libavcodec/ac3enc.c
+0
-1
ac3enc.h
libavcodec/ac3enc.h
+1
-0
ac3enc_float.c
libavcodec/ac3enc_float.c
+7
-1
eac3enc.c
libavcodec/eac3enc.c
+1
-1
No files found.
libavcodec/ac3enc.c
View file @
27631796
...
...
@@ -2481,7 +2481,6 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
goto
init_fail
;
ff_dsputil_init
(
&
s
->
dsp
,
avctx
);
avpriv_float_dsp_init
(
&
s
->
fdsp
,
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
ff_ac3dsp_init
(
&
s
->
ac3dsp
,
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
dprint_options
(
s
);
...
...
libavcodec/ac3enc.h
View file @
27631796
...
...
@@ -266,6 +266,7 @@ typedef struct AC3EncodeContext {
extern
const
uint64_t
ff_ac3_channel_layouts
[
19
];
int
ff_ac3_encode_init
(
AVCodecContext
*
avctx
);
int
ff_ac3_float_encode_init
(
AVCodecContext
*
avctx
);
int
ff_ac3_encode_close
(
AVCodecContext
*
avctx
);
...
...
libavcodec/ac3enc_float.c
View file @
27631796
...
...
@@ -124,6 +124,12 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
return
FFMIN
(
coord
,
COEF_MAX
);
}
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
);
return
ff_ac3_encode_init
(
avctx
);
}
AVCodec
ff_ac3_encoder
=
{
.
name
=
"ac3"
,
...
...
@@ -131,7 +137,7 @@ AVCodec ff_ac3_encoder = {
.
type
=
AVMEDIA_TYPE_AUDIO
,
.
id
=
AV_CODEC_ID_AC3
,
.
priv_data_size
=
sizeof
(
AC3EncodeContext
),
.
init
=
ff_ac3_encode_init
,
.
init
=
ff_ac3_
float_
encode_init
,
.
encode2
=
ff_ac3_float_encode_frame
,
.
close
=
ff_ac3_encode_close
,
.
sample_fmts
=
(
const
enum
AVSampleFormat
[]){
AV_SAMPLE_FMT_FLTP
,
...
...
libavcodec/eac3enc.c
View file @
27631796
...
...
@@ -253,7 +253,7 @@ AVCodec ff_eac3_encoder = {
.
type
=
AVMEDIA_TYPE_AUDIO
,
.
id
=
AV_CODEC_ID_EAC3
,
.
priv_data_size
=
sizeof
(
AC3EncodeContext
),
.
init
=
ff_ac3_encode_init
,
.
init
=
ff_ac3_
float_
encode_init
,
.
encode2
=
ff_ac3_float_encode_frame
,
.
close
=
ff_ac3_encode_close
,
.
sample_fmts
=
(
const
enum
AVSampleFormat
[]){
AV_SAMPLE_FMT_FLTP
,
...
...
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