swresample/resample: increase precision for compensation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
6770a9d689
commit
351e625d60
@ -355,6 +355,10 @@ static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_r
|
|||||||
c->compensation_distance= 0;
|
c->compensation_distance= 0;
|
||||||
if(!av_reduce(&c->src_incr, &c->dst_incr, out_rate, in_rate * (int64_t)phase_count, INT32_MAX/2))
|
if(!av_reduce(&c->src_incr, &c->dst_incr, out_rate, in_rate * (int64_t)phase_count, INT32_MAX/2))
|
||||||
goto error;
|
goto error;
|
||||||
|
while (c->dst_incr < (1<<20) && c->src_incr < (1<<20)) {
|
||||||
|
c->dst_incr *= 2;
|
||||||
|
c->src_incr *= 2;
|
||||||
|
}
|
||||||
c->ideal_dst_incr = c->dst_incr;
|
c->ideal_dst_incr = c->dst_incr;
|
||||||
c->dst_incr_div = c->dst_incr / c->src_incr;
|
c->dst_incr_div = c->dst_incr / c->src_incr;
|
||||||
c->dst_incr_mod = c->dst_incr % c->src_incr;
|
c->dst_incr_mod = c->dst_incr % c->src_incr;
|
||||||
|
@ -366,16 +366,16 @@ fate-swr-resample_async-$(3)-$(1)-$(2): FUZZ = 0.1
|
|||||||
fate-swr-resample_async-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
|
fate-swr-resample_async-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
|
||||||
endef
|
endef
|
||||||
|
|
||||||
fate-swr-resample_async-fltp-44100-8000: CMP_TARGET = 4031.48
|
fate-swr-resample_async-fltp-44100-8000: CMP_TARGET = 4020.62
|
||||||
fate-swr-resample_async-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20310
|
fate-swr-resample_async-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20310
|
||||||
|
|
||||||
fate-swr-resample_async-fltp-8000-44100: CMP_TARGET = 11185.34
|
fate-swr-resample_async-fltp-8000-44100: CMP_TARGET = 11186.69
|
||||||
fate-swr-resample_async-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20344
|
fate-swr-resample_async-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20344
|
||||||
|
|
||||||
fate-swr-resample_async-s16p-44100-8000: CMP_TARGET = 4031.59
|
fate-swr-resample_async-s16p-44100-8000: CMP_TARGET = 4020.73
|
||||||
fate-swr-resample_async-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20310
|
fate-swr-resample_async-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20310
|
||||||
|
|
||||||
fate-swr-resample_async-s16p-8000-44100: CMP_TARGET = 11185.65
|
fate-swr-resample_async-s16p-8000-44100: CMP_TARGET = 11187.01
|
||||||
fate-swr-resample_async-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20344
|
fate-swr-resample_async-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20344
|
||||||
|
|
||||||
$(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)
|
$(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)
|
||||||
|
Loading…
Reference in New Issue
Block a user