[FFmpeg-devel] [PATCH] swresample/swresample: do not reset tsf on swr_alloc_set_opts

Muhammad Faiz mfcc64 at gmail.com
Sat Mar 11 19:00:36 EET 2017


On Sat, Mar 11, 2017 at 8:41 PM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Fri, Mar 10, 2017 at 06:55:27AM +0700, Muhammad Faiz wrote:
>> so tsf option in aresample will have effect
>>
>> Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>
>
> breaks fate
>
> TEST    swr-resample-s32p-96000-44100
> stddev:    1.54 PSNR: 92.56 MAXDIFF:  116 bytes:  1152000/    20480
> stddev: |1.54 - 1.44| >= 0.1
> Test swr-resample-s32p-96000-44100 failed. Look at tests/data/fate/swr-resample-s32p-96000-44100.err for details.

The cause probably is that previously it used fltp internally.
I check it using this
./ffmpeg -loglevel debug -i tests/data/asynth-44100-1.wav -af
"aresample=48000:internal_sample_fmt=s32p,aformat=s32p,aresample=44100:internal_sample_fmt=s32p"
-f wav -acodec pcm_s16le -y /dev/null

before patch:
[Parsed_aresample_0 @ 0x296f5e0] [SWR @ 0x296fb80] Using fltp
internally between filters
[Parsed_aresample_0 @ 0x296f5e0] ch:1 chl:mono fmt:s16 r:44100Hz ->
ch:1 chl:mono fmt:s32p r:48000Hz
[Parsed_aresample_2 @ 0x2984f60] [SWR @ 0x2985960] Using fltp
internally between filters
[Parsed_aresample_2 @ 0x2984f60] ch:1 chl:mono fmt:s32p r:48000Hz ->
ch:1 chl:mono fmt:s16 r:44100Hz

after patch:
[Parsed_aresample_0 @ 0x3ccf5e0] [SWR @ 0x3ccfb80] Using s32p
internally between filters
[Parsed_aresample_0 @ 0x3ccf5e0] ch:1 chl:mono fmt:s16 r:44100Hz ->
ch:1 chl:mono fmt:s32p r:48000Hz
[Parsed_aresample_2 @ 0x3ce4f60] [SWR @ 0x3ce5960] Using s32p
internally between filters
[Parsed_aresample_2 @ 0x3ce4f60] ch:1 chl:mono fmt:s32p r:48000Hz ->
ch:1 chl:mono fmt:s16 r:44100Hz


I will post updated patch that modify fate

Thanks


More information about the ffmpeg-devel mailing list