Re: [FFmpeg-devel] [FFmpeg-cvslog] tests/fate/filter-audio.mak: add test for atempo audio filter
On Wed, 3 Jul 2024, Rajiv Harlalka wrote:
ffmpeg | branch: master | Rajiv Harlalka <rajivharlalka009@gmail.com> | Thu Mar 21 13:53:29 2024 +0530| [fc446eea05b9bc7de9a3c6b56dae8255bb5c5b5d] | committer: Anton Khirnov
tests/fate/filter-audio.mak: add test for atempo audio filter
Signed-off-by: Rajiv Harlalka <rajivharlalka009@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fc446eea05b9bc7de9...
tests/fate/filter-audio.mak | 3 ++ tests/ref/fate/filter-atempo | 70 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+)
This test doesn't seem to be deterministic across various environments. I'm seeing errors on some build configurations on aarch64, riscv, i386 - see FATE. // Martin
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
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
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)
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
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.
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
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.
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)
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'. -- Anton Khirnov
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
participants (4)
-
Andreas Rheinhardt -
Anton Khirnov -
James Almer -
Martin Storsjö