Skip to content
Snippets Groups Projects
Commit da34e4e1 authored by Muhammad Faiz's avatar Muhammad Faiz
Browse files

swresample/soxr: fix invalid use of linear_interp


give very bad quality for soxr resampler.
linear_interp is intended for  using linear interpolation
between filter bank so quality will be better.

i guess this is misunderstood as 'do not use filter bank,
but directly interpolate linearly between samples'.

Reviewed-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: default avatarMuhammad Faiz <mfcc64@gmail.com>
parent 6e1902ba
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ static struct ResampleContext *create(struct ResampleContext *c, int out_rate, i
soxr_io_spec_t io_spec = soxr_io_spec(type, type);
soxr_quality_spec_t q_spec = soxr_quality_spec((int)((precision-2)/4), (SOXR_HI_PREC_CLOCK|SOXR_ROLLOFF_NONE)*!!cheby);
q_spec.precision = linear? 0 : precision;
q_spec.precision = precision;
#if !defined SOXR_VERSION /* Deprecated @ March 2013: */
q_spec.bw_pc = cutoff? FFMAX(FFMIN(cutoff,.995),.8)*100 : q_spec.bw_pc;
#else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment