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
6c704d9c
Commit
6c704d9c
authored
Apr 11, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: support changing dither parameters for swr
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
be4cde22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
ffmpeg.c
ffmpeg.c
+6
-0
No files found.
ffmpeg.c
View file @
6c704d9c
...
...
@@ -276,6 +276,8 @@ typedef struct OutputStream {
AVFilterGraph
*
graph
;
int64_t
sws_flags
;
int64_t
swr_dither_method
;
double
swr_dither_scale
;
AVDictionary
*
opts
;
int
is_past_recording_time
;
int
stream_copy
;
...
...
@@ -1199,6 +1201,8 @@ static void do_audio_out(AVFormatContext *s, OutputStream *ost,
enc
->
channel_layout
,
enc
->
sample_fmt
,
enc
->
sample_rate
,
dec
->
channel_layout
,
dec
->
sample_fmt
,
dec
->
sample_rate
,
0
,
NULL
);
av_opt_set_int
(
ost
->
swr
,
"dither_method"
,
ost
->
swr_dither_method
,
0
);
av_opt_set_int
(
ost
->
swr
,
"dither_scale"
,
ost
->
swr_dither_scale
,
0
);
if
(
ost
->
audio_channels_mapped
)
swr_set_channel_mapping
(
ost
->
swr
,
ost
->
audio_channels_map
);
av_opt_set_double
(
ost
->
swr
,
"rmvol"
,
ost
->
rematrix_volume
,
0
);
...
...
@@ -3965,6 +3969,8 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
st
->
codec
->
flags
|=
CODEC_FLAG_GLOBAL_HEADER
;
av_opt_get_int
(
sws_opts
,
"sws_flags"
,
0
,
&
ost
->
sws_flags
);
av_opt_get_int
(
swr_opts
,
"dither_method"
,
0
,
&
ost
->
swr_dither_method
);
av_opt_get_double
(
swr_opts
,
"dither_scale"
,
0
,
&
ost
->
swr_dither_scale
);
ost
->
source_index
=
source_index
;
if
(
source_index
>=
0
)
{
...
...
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