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
ead3a2a3
Commit
ead3a2a3
authored
Jan 09, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swr: add noise_scale field to seperate it from the noise shaping scales
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
6908ded2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
dither.c
libswresample/dither.c
+2
-1
swresample_internal.h
libswresample/swresample_internal.h
+1
-0
No files found.
libswresample/dither.c
View file @
ead3a2a3
...
...
@@ -24,7 +24,7 @@
#include "noise_shaping_data.c"
void
swri_get_dither
(
SwrContext
*
s
,
void
*
dst
,
int
len
,
unsigned
seed
,
enum
AVSampleFormat
noise_fmt
)
{
double
scale
=
s
->
dither
.
n
s
_scale
;
double
scale
=
s
->
dither
.
n
oise
_scale
;
#define TMP_EXTRA 2
double
*
tmp
=
av_malloc
((
len
+
TMP_EXTRA
)
*
sizeof
(
double
));
int
i
;
...
...
@@ -95,6 +95,7 @@ int swri_dither_init(SwrContext *s, enum AVSampleFormat out_fmt, enum AVSampleFo
scale
*=
s
->
dither
.
scale
;
s
->
dither
.
ns_pos
=
0
;
s
->
dither
.
noise_scale
=
scale
;
s
->
dither
.
ns_scale
=
scale
;
s
->
dither
.
ns_scale_1
=
1
/
scale
;
memset
(
s
->
dither
.
ns_errors
,
0
,
sizeof
(
s
->
dither
.
ns_errors
));
...
...
libswresample/swresample_internal.h
View file @
ead3a2a3
...
...
@@ -54,6 +54,7 @@ struct DitherContext {
enum
SwrDitherType
method
;
int
dither_pos
;
float
scale
;
float
noise_scale
;
///< Noise scale
int
ns_taps
;
///< Noise shaping dither taps
float
ns_scale
;
///< Noise shaping dither scale
float
ns_scale_1
;
///< Noise shaping dither scale^-1
...
...
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