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
feedc075
Commit
feedc075
authored
Sep 01, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3dec: actually use drc_scale private option
parent
63e4c8a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
ac3dec.c
libavcodec/ac3dec.c
+6
-1
options.c
libavcodec/options.c
+1
-1
No files found.
libavcodec/ac3dec.c
View file @
feedc075
...
...
@@ -176,6 +176,11 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
AC3DecodeContext
*
s
=
avctx
->
priv_data
;
s
->
avctx
=
avctx
;
#if FF_API_DRC_SCALE
if
(
avctx
->
drc_scale
)
s
->
drc_scale
=
avctx
->
drc_scale
;
#endif
ff_ac3_common_init
();
ac3_tables_init
();
ff_mdct_init
(
&
s
->
imdct_256
,
8
,
1
,
1
.
0
);
...
...
@@ -788,7 +793,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
do
{
if
(
get_bits1
(
gbc
))
{
s
->
dynamic_range
[
i
]
=
((
dynamic_range_tab
[
get_bits
(
gbc
,
8
)]
-
1
.
0
)
*
s
->
avctx
->
drc_scale
)
+
1
.
0
;
s
->
drc_scale
)
+
1
.
0
;
}
else
if
(
blk
==
0
)
{
s
->
dynamic_range
[
i
]
=
1
.
0
f
;
}
...
...
libavcodec/options.c
View file @
feedc075
...
...
@@ -447,7 +447,7 @@ static const AVOption options[]={
{
"request_channels"
,
"set desired number of audio channels"
,
OFFSET
(
request_channels
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
0
,
INT_MAX
,
A
|
D
},
#endif
#if FF_API_DRC_SCALE
{
"drc_scale"
,
"percentage of dynamic range compression to apply"
,
OFFSET
(
drc_scale
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
1
.
0
},
0
.
0
,
1
.
0
,
A
|
D
},
{
"drc_scale"
,
"percentage of dynamic range compression to apply"
,
OFFSET
(
drc_scale
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
0
.
0
},
0
.
0
,
1
.
0
,
A
|
D
},
#endif
#if FF_API_LAME_GLOBAL_OPTS
{
"reservoir"
,
"use bit reservoir"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
CODEC_FLAG2_BIT_RESERVOIR
},
INT_MIN
,
INT_MAX
,
A
|
E
,
"flags2"
},
...
...
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