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
946acacd
Commit
946acacd
authored
Aug 18, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swresample: move dither init up
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
f866f22c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
dither.c
libswresample/dither.c
+0
-9
swresample.c
libswresample/swresample.c
+11
-2
No files found.
libswresample/dither.c
View file @
946acacd
...
...
@@ -123,15 +123,6 @@ av_cold int swri_dither_init(SwrContext *s, enum AVSampleFormat out_fmt, enum AV
s
->
dither
.
method
=
SWR_DITHER_TRIANGULAR_HIGHPASS
;
}
av_assert0
(
!
s
->
preout
.
count
);
s
->
dither
.
noise
=
s
->
preout
;
s
->
dither
.
temp
=
s
->
preout
;
if
(
s
->
dither
.
method
>
SWR_DITHER_NS
)
{
s
->
dither
.
noise
.
bps
=
4
;
s
->
dither
.
noise
.
fmt
=
AV_SAMPLE_FMT_FLTP
;
s
->
dither
.
noise_scale
=
1
;
}
return
0
;
}
...
...
libswresample/swresample.c
View file @
946acacd
...
...
@@ -322,6 +322,9 @@ av_assert0(s->out.ch_count);
s
->
silence
=
s
->
in
;
s
->
drop_temp
=
s
->
out
;
if
((
ret
=
swri_dither_init
(
s
,
s
->
out_sample_fmt
,
s
->
int_sample_fmt
))
<
0
)
goto
fail
;
if
(
!
s
->
resample
&&
!
s
->
rematrix
&&
!
s
->
channel_map
&&
!
s
->
dither
.
method
){
s
->
full_convert
=
swri_audio_convert_alloc
(
s
->
out_sample_fmt
,
s
->
in_sample_fmt
,
s
->
in
.
ch_count
,
NULL
,
0
);
...
...
@@ -362,8 +365,14 @@ av_assert0(s->out.ch_count);
set_audiodata_fmt
(
&
s
->
in_buffer
,
s
->
int_sample_fmt
);
}
if
((
ret
=
swri_dither_init
(
s
,
s
->
out_sample_fmt
,
s
->
int_sample_fmt
))
<
0
)
goto
fail
;
av_assert0
(
!
s
->
preout
.
count
);
s
->
dither
.
noise
=
s
->
preout
;
s
->
dither
.
temp
=
s
->
preout
;
if
(
s
->
dither
.
method
>
SWR_DITHER_NS
)
{
s
->
dither
.
noise
.
bps
=
4
;
s
->
dither
.
noise
.
fmt
=
AV_SAMPLE_FMT_FLTP
;
s
->
dither
.
noise_scale
=
1
;
}
if
(
s
->
rematrix
||
s
->
dither
.
method
)
{
ret
=
swri_rematrix_init
(
s
);
...
...
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