summaryrefslogtreecommitdiff
path: root/libswresample
diff options
context:
space:
mode:
authorAlexander Strasser <eclipse7@gmx.net>2012-12-25 23:14:09 +0100
committerAlexander Strasser <eclipse7@gmx.net>2013-01-04 16:47:57 +0100
commitac25b31ede03ef4f89175cb3c293ff6b5609e6c2 (patch)
treef6e60c471b2dcee274deecf1b6384bed9d87428e /libswresample
parenta08194b4c51ebc7024f50eed0f09aa74058e15bb (diff)
lswr: Improve default resampler's default parameters
After making some blind tests on a small collection of music samples for home usage. It turned out that the default cutoff was too low. The impact of filter_size was not clearly distinguishable (the results were on the edge) with the music samples but turned out to be clearly audible in some synthetic samples. Thanks to Daniel for helping out with the listening tests. Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/resample.c2
-rw-r--r--libswresample/swresample.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libswresample/resample.c b/libswresample/resample.c
index 60ba0e9bd0..6cd2b8cbcb 100644
--- a/libswresample/resample.c
+++ b/libswresample/resample.c
@@ -198,7 +198,7 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap
static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear,
double cutoff0, enum AVSampleFormat format, enum SwrFilterType filter_type, int kaiser_beta,
double precision, int cheby){
- double cutoff = cutoff0? cutoff0 : 0.8;
+ double cutoff = cutoff0? cutoff0 : 0.97;
double factor= FFMIN(out_rate * cutoff / in_rate, 1.0);
int phase_count= 1<<phase_shift;
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 2477847388..f01927f293 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -80,7 +80,7 @@ static const AVOption options[]={
{"triangular" , "select triangular dither" , 0 , AV_OPT_TYPE_CONST, {.i64=SWR_DITHER_TRIANGULAR }, INT_MIN, INT_MAX , PARAM, "dither_method"},
{"triangular_hp" , "select triangular dither with high pass" , 0 , AV_OPT_TYPE_CONST, {.i64=SWR_DITHER_TRIANGULAR_HIGHPASS }, INT_MIN, INT_MAX, PARAM, "dither_method"},
-{"filter_size" , "set swr resampling filter size", OFFSET(filter_size) , AV_OPT_TYPE_INT , {.i64=16 }, 0 , INT_MAX , PARAM },
+{"filter_size" , "set swr resampling filter size", OFFSET(filter_size) , AV_OPT_TYPE_INT , {.i64=32 }, 0 , INT_MAX , PARAM },
{"phase_shift" , "set swr resampling phase shift", OFFSET(phase_shift) , AV_OPT_TYPE_INT , {.i64=10 }, 0 , 30 , PARAM },
{"linear_interp" , "enable linear interpolation" , OFFSET(linear_interp) , AV_OPT_TYPE_INT , {.i64=0 }, 0 , 1 , PARAM },
{"cutoff" , "set cutoff frequency ratio" , OFFSET(cutoff) , AV_OPT_TYPE_DOUBLE,{.dbl=0. }, 0 , 1 , PARAM },