diff mbox series

[FFmpeg-devel] tests/fate/filter-audio: convert atempo test to oneoff

Message ID 20240704190503.29148-1-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel] tests/fate/filter-audio: convert atempo test to oneoff | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch
yinshiyou/configure_loongarch64 warning Failed to apply patch

Commit Message

Anton Khirnov July 4, 2024, 7:04 p.m. UTC
Filter output is not bitexact.
---
Reference file at https://up.khirnov.net/7r.pcm, please put it in
filter-reference/atempo.pcm
---
 tests/fate/filter-audio.mak | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Martin Storsjö July 4, 2024, 8:33 p.m. UTC | #1
On Thu, 4 Jul 2024, Anton Khirnov wrote:

> Filter output is not bitexact.
> ---
> Reference file at https://up.khirnov.net/7r.pcm, please put it in
> filter-reference/atempo.pcm
> ---
> tests/fate/filter-audio.mak | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
> index cf6065b93f..a3f7aaddbf 100644
> --- a/tests/fate/filter-audio.mak
> +++ b/tests/fate/filter-audio.mak
> @@ -414,7 +414,9 @@ fate-filter-hdcd-s32p: REF = 0c5513e83eedaa10ab6fac9ddc173cf5
>
> FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, ATEMPO, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-atempo
> fate-filter-atempo: tests/data/asynth-44100-1.wav
> -fate-filter-atempo: CMD = framecrc -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -af "atempo=2.0" -ar 44100
> +fate-filter-atempo: CMD = pcm -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -af "atempo=2.0"
> +fate-filter-atempo: CMP = oneoff
> +fate-filter-atempo: REF = $(SAMPLES)/filter-reference/atempo.pcm
>
> FATE_AFILTER-yes += fate-filter-formats
> fate-filter-formats: libavfilter/tests/formats$(EXESUF)
> -- 
> 2.43.0

LGTM (once the reference file is in place), thanks, this seems to fix the 
issue for me (at least in one failing instance).

// Martin
James Almer July 4, 2024, 8:45 p.m. UTC | #2
On 7/4/2024 4:04 PM, Anton Khirnov wrote:
> Filter output is not bitexact.
> ---
> Reference file at https://up.khirnov.net/7r.pcm, please put it in
> filter-reference/atempo.pcm

How did you create it? x86_32 uses x87 floats which are a lot more 
precise than sse ones, for example, so it's best to create a ref file 
using such a build.

> ---
>   tests/fate/filter-audio.mak | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
> index cf6065b93f..a3f7aaddbf 100644
> --- a/tests/fate/filter-audio.mak
> +++ b/tests/fate/filter-audio.mak
> @@ -414,7 +414,9 @@ fate-filter-hdcd-s32p: REF = 0c5513e83eedaa10ab6fac9ddc173cf5
>   
>   FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, ATEMPO, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-atempo
>   fate-filter-atempo: tests/data/asynth-44100-1.wav
> -fate-filter-atempo: CMD = framecrc -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -af "atempo=2.0" -ar 44100
> +fate-filter-atempo: CMD = pcm -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -af "atempo=2.0"
> +fate-filter-atempo: CMP = oneoff
> +fate-filter-atempo: REF = $(SAMPLES)/filter-reference/atempo.pcm
>   
>   FATE_AFILTER-yes += fate-filter-formats
>   fate-filter-formats: libavfilter/tests/formats$(EXESUF)
Andreas Rheinhardt July 5, 2024, midnight UTC | #3
Anton Khirnov:
> Filter output is not bitexact.
> ---
> Reference file at https://up.khirnov.net/7r.pcm, please put it in
> filter-reference/atempo.pcm

Why is the test not shortened to avoid such a huge file?

> ---
>  tests/fate/filter-audio.mak | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
> index cf6065b93f..a3f7aaddbf 100644
> --- a/tests/fate/filter-audio.mak
> +++ b/tests/fate/filter-audio.mak
> @@ -414,7 +414,9 @@ fate-filter-hdcd-s32p: REF = 0c5513e83eedaa10ab6fac9ddc173cf5
>  
>  FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, ATEMPO, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-atempo
>  fate-filter-atempo: tests/data/asynth-44100-1.wav
> -fate-filter-atempo: CMD = framecrc -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -af "atempo=2.0" -ar 44100
> +fate-filter-atempo: CMD = pcm -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -af "atempo=2.0"
> +fate-filter-atempo: CMP = oneoff
> +fate-filter-atempo: REF = $(SAMPLES)/filter-reference/atempo.pcm
>  
>  FATE_AFILTER-yes += fate-filter-formats
>  fate-filter-formats: libavfilter/tests/formats$(EXESUF)
Anton Khirnov July 5, 2024, 5:38 a.m. UTC | #4
Quoting James Almer (2024-07-04 22:45:28)
> On 7/4/2024 4:04 PM, Anton Khirnov wrote:
> > Filter output is not bitexact.
> > ---
> > Reference file at https://up.khirnov.net/7r.pcm, please put it in
> > filter-reference/atempo.pcm
> 
> How did you create it? x86_32 uses x87 floats which are a lot more 
> precise than sse ones, for example, so it's best to create a ref file 
> using such a build.

Does it matter when the result is s16 anyway?
Anton Khirnov July 5, 2024, 5:40 a.m. UTC | #5
Quoting Andreas Rheinhardt (2024-07-05 02:00:35)
> Anton Khirnov:
> > Filter output is not bitexact.
> > ---
> > Reference file at https://up.khirnov.net/7r.pcm, please put it in
> > filter-reference/atempo.pcm
> 
> Why is the test not shortened to avoid such a huge file?

I do not consider 200kb 'huge'.
James Almer July 5, 2024, 4:04 p.m. UTC | #6
On 7/5/2024 2:38 AM, Anton Khirnov wrote:
> Quoting James Almer (2024-07-04 22:45:28)
>> On 7/4/2024 4:04 PM, Anton Khirnov wrote:
>>> Filter output is not bitexact.
>>> ---
>>> Reference file at https://up.khirnov.net/7r.pcm, please put it in
>>> filter-reference/atempo.pcm
>>
>> How did you create it? x86_32 uses x87 floats which are a lot more
>> precise than sse ones, for example, so it's best to create a ref file
>> using such a build.
> 
> Does it matter when the result is s16 anyway?

Eh, who knows. Just in case i generated it on x86_32 with -cpuflags 0, 
and uploaded it. Confirm it's fine on your end too, otherwise I'll 
replace it with your file.
Martin Storsjö July 5, 2024, 5:18 p.m. UTC | #7
On Fri, 5 Jul 2024, James Almer wrote:

> On 7/5/2024 2:38 AM, Anton Khirnov wrote:
>> Quoting James Almer (2024-07-04 22:45:28)
>>> On 7/4/2024 4:04 PM, Anton Khirnov wrote:
>>>> Filter output is not bitexact.
>>>> ---
>>>> Reference file at https://up.khirnov.net/7r.pcm, please put it in
>>>> filter-reference/atempo.pcm
>>> 
>>> How did you create it? x86_32 uses x87 floats which are a lot more
>>> precise than sse ones, for example, so it's best to create a ref file
>>> using such a build.
>> 
>> Does it matter when the result is s16 anyway?
>
> Eh, who knows. Just in case i generated it on x86_32 with -cpuflags 0, and 
> uploaded it. Confirm it's fine on your end too, otherwise I'll replace it 
> with your file.

The sample you uploaded seems to work fine for me, on aarch64 with clang, 
where the test was failing before.

FWIW, re x86_32 and x87 - some compilers default to SSE2 math even for 
x86_32 targets these days, so depending on how you build, you may still 
get similar behaviour as to x86_64.

// Martin
James Almer July 5, 2024, 5:37 p.m. UTC | #8
On 7/5/2024 2:18 PM, Martin Storsjö wrote:
> On Fri, 5 Jul 2024, James Almer wrote:
> 
>> On 7/5/2024 2:38 AM, Anton Khirnov wrote:
>>> Quoting James Almer (2024-07-04 22:45:28)
>>>> On 7/4/2024 4:04 PM, Anton Khirnov wrote:
>>>>> Filter output is not bitexact.
>>>>> ---
>>>>> Reference file at https://up.khirnov.net/7r.pcm, please put it in
>>>>> filter-reference/atempo.pcm
>>>>
>>>> How did you create it? x86_32 uses x87 floats which are a lot more
>>>> precise than sse ones, for example, so it's best to create a ref file
>>>> using such a build.
>>>
>>> Does it matter when the result is s16 anyway?
>>
>> Eh, who knows. Just in case i generated it on x86_32 with -cpuflags 0, 
>> and uploaded it. Confirm it's fine on your end too, otherwise I'll 
>> replace it with your file.
> 
> The sample you uploaded seems to work fine for me, on aarch64 with 
> clang, where the test was failing before.
> 
> FWIW, re x86_32 and x87 - some compilers default to SSE2 math even for 
> x86_32 targets these days, so depending on how you build, you may still 
> get similar behaviour as to x86_64.

I used gcc 14 and -march=i686 at configure time, so it should not have 
sse enabled.
Andreas Rheinhardt July 5, 2024, 6:46 p.m. UTC | #9
Anton Khirnov:
> Quoting Andreas Rheinhardt (2024-07-05 02:00:35)
>> Anton Khirnov:
>>> Filter output is not bitexact.
>>> ---
>>> Reference file at https://up.khirnov.net/7r.pcm, please put it in
>>> filter-reference/atempo.pcm
>>
>> Why is the test not shortened to avoid such a huge file?
> 
> I do not consider 200kb 'huge'.
> 

It is way more than necessary.

- Andreas
diff mbox series

Patch

diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index cf6065b93f..a3f7aaddbf 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
@@ -414,7 +414,9 @@  fate-filter-hdcd-s32p: REF = 0c5513e83eedaa10ab6fac9ddc173cf5
 
 FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, ATEMPO, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-atempo
 fate-filter-atempo: tests/data/asynth-44100-1.wav
-fate-filter-atempo: CMD = framecrc -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -af "atempo=2.0" -ar 44100
+fate-filter-atempo: CMD = pcm -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -af "atempo=2.0"
+fate-filter-atempo: CMP = oneoff
+fate-filter-atempo: REF = $(SAMPLES)/filter-reference/atempo.pcm
 
 FATE_AFILTER-yes += fate-filter-formats
 fate-filter-formats: libavfilter/tests/formats$(EXESUF)