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
931187e1
Commit
931187e1
authored
Aug 12, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3dec: export center & suroundmix levels
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c4fd1d34
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
ac3dec.c
libavcodec/ac3dec.c
+11
-0
ac3dec.h
libavcodec/ac3dec.h
+6
-0
No files found.
libavcodec/ac3dec.c
View file @
931187e1
...
@@ -1382,6 +1382,10 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
...
@@ -1382,6 +1382,10 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
avctx
->
channels
=
s
->
out_channels
;
avctx
->
channels
=
s
->
out_channels
;
avctx
->
channel_layout
=
s
->
channel_layout
;
avctx
->
channel_layout
=
s
->
channel_layout
;
s
->
loro_center_mix_level
=
gain_levels
[
center_levels
[
s
->
center_mix_level
]];
s
->
loro_surround_mix_level
=
gain_levels
[
surround_levels
[
s
->
surround_mix_level
]];
s
->
ltrt_center_mix_level
=
LEVEL_MINUS_3DB
;
s
->
ltrt_surround_mix_level
=
LEVEL_MINUS_3DB
;
/* set downmixing coefficients if needed */
/* set downmixing coefficients if needed */
if
(
s
->
channels
!=
s
->
out_channels
&&
!
((
s
->
output_mode
&
AC3_OUTPUT_LFEON
)
&&
if
(
s
->
channels
!=
s
->
out_channels
&&
!
((
s
->
output_mode
&
AC3_OUTPUT_LFEON
)
&&
s
->
fbw_channels
==
s
->
out_channels
))
{
s
->
fbw_channels
==
s
->
out_channels
))
{
...
@@ -1443,6 +1447,13 @@ static av_cold int ac3_decode_end(AVCodecContext *avctx)
...
@@ -1443,6 +1447,13 @@ static av_cold int ac3_decode_end(AVCodecContext *avctx)
#define PAR (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM)
#define PAR (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM)
static
const
AVOption
options
[]
=
{
static
const
AVOption
options
[]
=
{
{
"drc_scale"
,
"percentage of dynamic range compression to apply"
,
OFFSET
(
drc_scale
),
FF_OPT_TYPE_FLOAT
,
{
1
.
0
},
0
.
0
,
1
.
0
,
PAR
},
{
"drc_scale"
,
"percentage of dynamic range compression to apply"
,
OFFSET
(
drc_scale
),
FF_OPT_TYPE_FLOAT
,
{
1
.
0
},
0
.
0
,
1
.
0
,
PAR
},
{
"dmix_mode"
,
"Preferred Stereo Downmix Mode"
,
OFFSET
(
preferred_stereo_downmix
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
2
,
0
,
"dmix_mode"
},
{
"ltrt_cmixlev"
,
"Lt/Rt Center Mix Level"
,
OFFSET
(
ltrt_center_mix_level
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
.
0
},
-
1
.
0
,
2
.
0
,
0
},
{
"ltrt_surmixlev"
,
"Lt/Rt Surround Mix Level"
,
OFFSET
(
ltrt_surround_mix_level
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
.
0
},
-
1
.
0
,
2
.
0
,
0
},
{
"loro_cmixlev"
,
"Lo/Ro Center Mix Level"
,
OFFSET
(
loro_center_mix_level
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
.
0
},
-
1
.
0
,
2
.
0
,
0
},
{
"loro_surmixlev"
,
"Lo/Ro Surround Mix Level"
,
OFFSET
(
loro_surround_mix_level
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
.
0
},
-
1
.
0
,
2
.
0
,
0
},
{
NULL
},
{
NULL
},
};
};
...
...
libavcodec/ac3dec.h
View file @
931187e1
...
@@ -88,6 +88,12 @@ typedef struct {
...
@@ -88,6 +88,12 @@ typedef struct {
int
eac3
;
///< indicates if current frame is E-AC-3
int
eac3
;
///< indicates if current frame is E-AC-3
///@}
///@}
int
preferred_stereo_downmix
;
float
ltrt_center_mix_level
;
float
ltrt_surround_mix_level
;
float
loro_center_mix_level
;
float
loro_surround_mix_level
;
///@name Frame syntax parameters
///@name Frame syntax parameters
int
snr_offset_strategy
;
///< SNR offset strategy (snroffststr)
int
snr_offset_strategy
;
///< SNR offset strategy (snroffststr)
int
block_switch_syntax
;
///< block switch syntax enabled (blkswe)
int
block_switch_syntax
;
///< block switch syntax enabled (blkswe)
...
...
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