diff --git a/doc/ffmpeg-resampler.texi b/doc/ffmpeg-resampler.texi index 45e42f9255..92588131b3 100644 --- a/doc/ffmpeg-resampler.texi +++ b/doc/ffmpeg-resampler.texi @@ -121,7 +121,7 @@ case. @end table @item filter_size -For swr only, set resampling filter size, default value is 16. +For swr only, set resampling filter size, default value is 32. @item phase_shift For swr only, set resampling phase shift, default value is 10, must be included @@ -132,7 +132,7 @@ Use Linear Interpolation if set to 1, default value is 0. @item cutoff Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float -value between 0 and 1. Default value is 0.8 with swr, and 0.91 with soxr +value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr (which, with a sample-rate of 44100, preserves the entire audio band to 20kHz). @item precision 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<