[FFmpeg-devel] [PATCHv2] fate: Use a oneoff test for the tremolo filter

Martin Storsjö martin at martin.st
Wed Dec 11 16:25:35 EET 2019


On Wed, 11 Dec 2019, James Almer wrote:

> On 12/11/2019 4:43 AM, Martin Storsjö wrote:
>> The tremolo filter uses floating point internally, and uses
>> multiplication factors derived from sin(fmod()), neither of
>> which is bitexact for use with framecrc.
>> 
>> This fixes running this test with mingw/x86_32 binaries when run
>> in wine on linux (unsure if the same issue is present when run
>> on actual windows).
>> 
>> In this case, a 1 ulp difference in the output from fmod() would
>> end up in an output from the filter that differs by 1 ulp, but
>> which makes the lrint() in swresample/audioconvert.c round in a
>> different direction.
>> 
>> ---
>> Updated with the existing reference file removed.
>> ---
>>  tests/fate/filter-audio.mak   |  5 ++++-
>>  tests/ref/fate/filter-tremolo | 26 --------------------------
>>  2 files changed, 4 insertions(+), 27 deletions(-)
>>  delete mode 100644 tests/ref/fate/filter-tremolo
>> 
>> diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
>> index fed2644ccf..b1dcb9787a 100644
>> --- a/tests/fate/filter-audio.mak
>> +++ b/tests/fate/filter-audio.mak
>> @@ -189,7 +189,10 @@ fate-filter-stereotools: CMD = framecrc -i $(SRC) -frames:a 20 -af stereotools=m
>>  FATE_AFILTER-$(call FILTERDEMDECENCMUX, TREMOLO, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-tremolo
>
> Needs to be FATE_AFILTER_SAMPLES now that it's using a reference sample
> rather than only the autogenerated asynth-44100-2.wav.

Ah, good catch - amended locally

>>  fate-filter-tremolo: tests/data/asynth-44100-2.wav
>>  fate-filter-tremolo: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
>> -fate-filter-tremolo: CMD = framecrc -i $(SRC) -frames:a 20 -af tremolo
>> +fate-filter-tremolo: CMD = ffmpeg -i $(SRC) -frames:a 20 -af tremolo -f wav -f s16le -
>> +fate-filter-tremolo: REF = $(SAMPLES)/filter/tremolo.pcm
>
> Created and uploaded it, so feel free to push this patch after you fix
> the above and confirm the ref sample is ok.

Thanks! Seems to work fine for me, so I'll push this one a bit later then.

// Martin


More information about the ffmpeg-devel mailing list