diff mbox

[FFmpeg-devel,2/2] fate: add tests for pan audio filter

Message ID 1518683696-17786-2-git-send-email-t.rapp@noa-archive.com
State Accepted
Commit 56f77b0f678de74404ae3a64f6ba664ea4449348
Headers show

Commit Message

Tobias Rapp Feb. 15, 2018, 8:34 a.m. UTC
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
---
 tests/fate/filter-audio.mak       | 30 ++++++++++++++++++++++++++++++
 tests/ref/fate/filter-pan-mono1   | 26 ++++++++++++++++++++++++++
 tests/ref/fate/filter-pan-mono2   | 26 ++++++++++++++++++++++++++
 tests/ref/fate/filter-pan-stereo1 | 26 ++++++++++++++++++++++++++
 tests/ref/fate/filter-pan-stereo2 | 26 ++++++++++++++++++++++++++
 tests/ref/fate/filter-pan-stereo3 | 26 ++++++++++++++++++++++++++
 tests/ref/fate/filter-pan-stereo4 | 26 ++++++++++++++++++++++++++
 7 files changed, 186 insertions(+)
 create mode 100644 tests/ref/fate/filter-pan-mono1
 create mode 100644 tests/ref/fate/filter-pan-mono2
 create mode 100644 tests/ref/fate/filter-pan-stereo1
 create mode 100644 tests/ref/fate/filter-pan-stereo2
 create mode 100644 tests/ref/fate/filter-pan-stereo3
 create mode 100644 tests/ref/fate/filter-pan-stereo4

Comments

Nicolas George Feb. 15, 2018, 8:39 a.m. UTC | #1
Tobias Rapp (2018-02-15):
> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
> ---
>  tests/fate/filter-audio.mak       | 30 ++++++++++++++++++++++++++++++
>  tests/ref/fate/filter-pan-mono1   | 26 ++++++++++++++++++++++++++
>  tests/ref/fate/filter-pan-mono2   | 26 ++++++++++++++++++++++++++
>  tests/ref/fate/filter-pan-stereo1 | 26 ++++++++++++++++++++++++++
>  tests/ref/fate/filter-pan-stereo2 | 26 ++++++++++++++++++++++++++
>  tests/ref/fate/filter-pan-stereo3 | 26 ++++++++++++++++++++++++++
>  tests/ref/fate/filter-pan-stereo4 | 26 ++++++++++++++++++++++++++
>  7 files changed, 186 insertions(+)
>  create mode 100644 tests/ref/fate/filter-pan-mono1
>  create mode 100644 tests/ref/fate/filter-pan-mono2
>  create mode 100644 tests/ref/fate/filter-pan-stereo1
>  create mode 100644 tests/ref/fate/filter-pan-stereo2
>  create mode 100644 tests/ref/fate/filter-pan-stereo3
>  create mode 100644 tests/ref/fate/filter-pan-stereo4

I think the change in lswr is sane, but I do not know enough of that
code to be definite. Thanks for tracking down that ticket.

As for this patch, thanks for implementing it. It looks reasonable. But
I am not entirely sure lsws is bit-exact in this kind of situation.

Regards,
Tobias Rapp Feb. 15, 2018, 8:56 a.m. UTC | #2
On 15.02.2018 09:39, Nicolas George wrote:
> Tobias Rapp (2018-02-15):
>> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
>> ---
>>   tests/fate/filter-audio.mak       | 30 ++++++++++++++++++++++++++++++
>>   tests/ref/fate/filter-pan-mono1   | 26 ++++++++++++++++++++++++++
>>   tests/ref/fate/filter-pan-mono2   | 26 ++++++++++++++++++++++++++
>>   tests/ref/fate/filter-pan-stereo1 | 26 ++++++++++++++++++++++++++
>>   tests/ref/fate/filter-pan-stereo2 | 26 ++++++++++++++++++++++++++
>>   tests/ref/fate/filter-pan-stereo3 | 26 ++++++++++++++++++++++++++
>>   tests/ref/fate/filter-pan-stereo4 | 26 ++++++++++++++++++++++++++
>>   7 files changed, 186 insertions(+)
>>   create mode 100644 tests/ref/fate/filter-pan-mono1
>>   create mode 100644 tests/ref/fate/filter-pan-mono2
>>   create mode 100644 tests/ref/fate/filter-pan-stereo1
>>   create mode 100644 tests/ref/fate/filter-pan-stereo2
>>   create mode 100644 tests/ref/fate/filter-pan-stereo3
>>   create mode 100644 tests/ref/fate/filter-pan-stereo4
> 
> I think the change in lswr is sane, but I do not know enough of that
> code to be definite. Thanks for tracking down that ticket.
> 
> As for this patch, thanks for implementing it. It looks reasonable. But
> I am not entirely sure lsws is bit-exact in this kind of situation.

I have run the Fate tests on Linux 32/64bit and Mips/Qemu, but possibly 
the float channel coefficients could be fragile (especially of the 
stereo3 test). Do you have some idea on how to make them more reliable? 
Or shall we give it a try and remove problematic tests when they arise?

Regards,
Tobias
Nicolas George Feb. 15, 2018, 9:12 a.m. UTC | #3
Tobias Rapp (2018-02-15):
> I have run the Fate tests on Linux 32/64bit and Mips/Qemu, but possibly the
> float channel coefficients could be fragile (especially of the stereo3
> test). Do you have some idea on how to make them more reliable? Or shall we
> give it a try and remove problematic tests when they arise?

With that kind of varied testing, I think give it a try is a very valid
option. Thanks.

Regards,
Tobias Rapp Feb. 19, 2018, 7:47 a.m. UTC | #4
On 15.02.2018 10:12, Nicolas George wrote:
> Tobias Rapp (2018-02-15):
>> I have run the Fate tests on Linux 32/64bit and Mips/Qemu, but possibly the
>> float channel coefficients could be fragile (especially of the stereo3
>> test). Do you have some idea on how to make them more reliable? Or shall we
>> give it a try and remove problematic tests when they arise?
> 
> With that kind of varied testing, I think give it a try is a very valid
> option. Thanks.

Applied the patch and will keep an eye on FATE.

BTW: Is there a way to filter the status page on fate.ffmpeg.org to 
check for specific failing tests? Or just some way to auto-expand all 
the lists of failing tests so one can use Strg+F for finding?

Regards,
Tobias
Tobias Rapp Feb. 22, 2018, 8:53 a.m. UTC | #5
On 19.02.2018 08:47, Tobias Rapp wrote:
> On 15.02.2018 10:12, Nicolas George wrote:
>> Tobias Rapp (2018-02-15):
>>> I have run the Fate tests on Linux 32/64bit and Mips/Qemu, but 
>>> possibly the
>>> float channel coefficients could be fragile (especially of the stereo3
>>> test). Do you have some idea on how to make them more reliable? Or 
>>> shall we
>>> give it a try and remove problematic tests when they arise?
>>
>> With that kind of varied testing, I think give it a try is a very valid
>> option. Thanks.
> 
> Applied the patch and will keep an eye on FATE.
> 
> BTW: Is there a way to filter the status page on fate.ffmpeg.org to 
> check for specific failing tests? Or just some way to auto-expand all 
> the lists of failing tests so one can use Strg+F for finding?

As a reminder for my future self: Executing the following one-line 
snippet in the Web Console of the browser opens all failing tests:

$(".fa-caret-down").each(function() { try { $(this).click() } catch 
(err) { console.log(err.name) } });

Regards,
Tobias
diff mbox

Patch

diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index bd8b3d3..2a3ba19 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
@@ -128,6 +128,36 @@  fate-filter-firequalizer: CMP = oneoff
 fate-filter-firequalizer: CMP_UNIT = s16
 fate-filter-firequalizer: SIZE_TOLERANCE = 1058400 - 1097208
 
+FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-mono1
+fate-filter-pan-mono1: tests/data/asynth-44100-2.wav
+fate-filter-pan-mono1: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
+fate-filter-pan-mono1: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=mono|FC=FL"
+
+FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-mono2
+fate-filter-pan-mono2: tests/data/asynth-44100-2.wav
+fate-filter-pan-mono2: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
+fate-filter-pan-mono2: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=1C|c0=c0+c1"
+
+FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-stereo1
+fate-filter-pan-stereo1: tests/data/asynth-44100-3.wav
+fate-filter-pan-stereo1: SRC = $(TARGET_PATH)/tests/data/asynth-44100-3.wav
+fate-filter-pan-stereo1: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=2c|FL=FR|FR=FL"
+
+FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-stereo2
+fate-filter-pan-stereo2: tests/data/asynth-44100-3.wav
+fate-filter-pan-stereo2: SRC = $(TARGET_PATH)/tests/data/asynth-44100-3.wav
+fate-filter-pan-stereo2: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=stereo|c0=c0-c2|c1=c1-c2"
+
+FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-stereo3
+fate-filter-pan-stereo3: tests/data/asynth-44100-2.wav
+fate-filter-pan-stereo3: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
+fate-filter-pan-stereo3: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=FL+FR|FL<3*c0+2*c1|FR<2*c0+3*c1"
+
+FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-stereo4
+fate-filter-pan-stereo4: tests/data/asynth-44100-2.wav
+fate-filter-pan-stereo4: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
+fate-filter-pan-stereo4: CMD = framecrc -ss 3.14 -guess_layout_max 0 -i $(SRC) -frames:a 20 -filter:a "pan=4C|c0=c0-0.5*c1|c1=c1+0.5*c0|c2=0*c0|c3=0*c0"
+
 FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, SILENCEREMOVE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-silenceremove
 fate-filter-silenceremove: SRC = $(TARGET_SAMPLES)/audio-reference/divertimenti_2ch_96kHz_s24.wav
 fate-filter-silenceremove: CMD = framecrc -i $(SRC) -frames:a 30 -af silenceremove=0:0:0:-1:0:-90dB
diff --git a/tests/ref/fate/filter-pan-mono1 b/tests/ref/fate/filter-pan-mono1
new file mode 100644
index 0000000..3bd7c25
--- /dev/null
+++ b/tests/ref/fate/filter-pan-mono1
@@ -0,0 +1,26 @@ 
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: pcm_s16le
+#sample_rate 0: 44100
+#channel_layout 0: 4
+#channel_layout_name 0: mono
+0,          0,          0,     1024,     2048, 0x750f0a66
+0,       1024,       1024,     1024,     2048, 0x155cf063
+0,       2048,       2048,     1024,     2048, 0x1e43fc32
+0,       3072,       3072,     1024,     2048, 0x282ffc28
+0,       4096,       4096,     1024,     2048, 0x6d7bf000
+0,       5120,       5120,     1024,     2048, 0xc0b2f411
+0,       6144,       6144,     1024,     2048, 0xd711fb03
+0,       7168,       7168,     1024,     2048, 0x3164189c
+0,       8192,       8192,     1024,     2048, 0x8c69e827
+0,       9216,       9216,     1024,     2048, 0x562d0518
+0,      10240,      10240,     1024,     2048, 0x380aee27
+0,      11264,      11264,     1024,     2048, 0x990a03e4
+0,      12288,      12288,     1024,     2048, 0x68d7ef60
+0,      13312,      13312,     1024,     2048, 0xd13fef9e
+0,      14336,      14336,     1024,     2048, 0x009306e4
+0,      15360,      15360,     1024,     2048, 0x51850390
+0,      16384,      16384,     1024,     2048, 0xcd3ceeae
+0,      17408,      17408,     1024,     2048, 0x189ff277
+0,      18432,      18432,     1024,     2048, 0x4b98f68c
+0,      19456,      19456,     1024,     2048, 0x34eaf544
diff --git a/tests/ref/fate/filter-pan-mono2 b/tests/ref/fate/filter-pan-mono2
new file mode 100644
index 0000000..0867ca9
--- /dev/null
+++ b/tests/ref/fate/filter-pan-mono2
@@ -0,0 +1,26 @@ 
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: pcm_s16le
+#sample_rate 0: 44100
+#channel_layout 0: 0
+#channel_layout_name 0: 1 channels
+0,          0,          0,     1024,     2048, 0x6130fb80
+0,       1024,       1024,     1024,     2048, 0xd5ef0930
+0,       2048,       2048,     1024,     2048, 0x40bce3f6
+0,       3072,       3072,     1024,     2048, 0x72e5d193
+0,       4096,       4096,     1024,     2048, 0xb005073f
+0,       5120,       5120,     1024,     2048, 0xa323fdbe
+0,       6144,       6144,     1024,     2048, 0xe5cbfe1e
+0,       7168,       7168,     1024,     2048, 0x4b42fe79
+0,       8192,       8192,     1024,     2048, 0x384eedea
+0,       9216,       9216,     1024,     2048, 0xe5cdf825
+0,      10240,      10240,     1024,     2048, 0xc2970ec0
+0,      11264,      11264,     1024,     2048, 0xa85fe5e0
+0,      12288,      12288,     1024,     2048, 0xfd51f2de
+0,      13312,      13312,     1024,     2048, 0xa1aafe30
+0,      14336,      14336,     1024,     2048, 0x8770fea2
+0,      15360,      15360,     1024,     2048, 0x67c50d76
+0,      16384,      16384,     1024,     2048, 0x7772fbc8
+0,      17408,      17408,     1024,     2048, 0xc48eff54
+0,      18432,      18432,     1024,     2048, 0x2e14f359
+0,      19456,      19456,     1024,     2048, 0x2df70a60
diff --git a/tests/ref/fate/filter-pan-stereo1 b/tests/ref/fate/filter-pan-stereo1
new file mode 100644
index 0000000..3125d4e
--- /dev/null
+++ b/tests/ref/fate/filter-pan-stereo1
@@ -0,0 +1,26 @@ 
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: pcm_s16le
+#sample_rate 0: 44100
+#channel_layout 0: 3
+#channel_layout_name 0: stereo
+0,          0,          0,      682,     2728, 0xaf365458
+0,        682,        682,      682,     2728, 0xcd684898
+0,       1364,       1364,      682,     2728, 0x5d514ae5
+0,       2046,       2046,      682,     2728, 0x48cb4605
+0,       2728,       2728,      682,     2728, 0x76ac43ee
+0,       3410,       3410,      682,     2728, 0x088355fa
+0,       4092,       4092,      682,     2728, 0xf66f4efa
+0,       4774,       4774,      682,     2728, 0x7efc3b1a
+0,       5456,       5456,      682,     2728, 0x1c1745f3
+0,       6138,       6138,      682,     2728, 0x824d50fe
+0,       6820,       6820,      682,     2728, 0xb26c5b94
+0,       7502,       7502,      682,     2728, 0x02d5636d
+0,       8184,       8184,      682,     2728, 0x65e647de
+0,       8866,       8866,      682,     2728, 0x93374812
+0,       9548,       9548,      682,     2728, 0xa0d55153
+0,      10230,      10230,      682,     2728, 0x56cf392c
+0,      10912,      10912,      682,     2728, 0x554051c3
+0,      11594,      11594,      682,     2728, 0xbc3655ce
+0,      12276,      12276,      682,     2728, 0xb432529f
+0,      12958,      12958,      682,     2728, 0x64df52a7
diff --git a/tests/ref/fate/filter-pan-stereo2 b/tests/ref/fate/filter-pan-stereo2
new file mode 100644
index 0000000..7f96799
--- /dev/null
+++ b/tests/ref/fate/filter-pan-stereo2
@@ -0,0 +1,26 @@ 
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: pcm_s16le
+#sample_rate 0: 44100
+#channel_layout 0: 3
+#channel_layout_name 0: stereo
+0,          0,          0,      682,     2728, 0x35c15e81
+0,        682,        682,      682,     2728, 0x770f2e2d
+0,       1364,       1364,      682,     2728, 0x6f8d6d9f
+0,       2046,       2046,      682,     2728, 0x5b9e46f3
+0,       2728,       2728,      682,     2728, 0xda7e5fdc
+0,       3410,       3410,      682,     2728, 0x55e446f8
+0,       4092,       4092,      682,     2728, 0x4fcf4f8e
+0,       4774,       4774,      682,     2728, 0x86e757b2
+0,       5456,       5456,      682,     2728, 0x8d4256e9
+0,       6138,       6138,      682,     2728, 0xa28d4e58
+0,       6820,       6820,      682,     2728, 0xacaa5738
+0,       7502,       7502,      682,     2728, 0xd1fe580f
+0,       8184,       8184,      682,     2728, 0x09a05c0a
+0,       8866,       8866,      682,     2728, 0xcaf2555d
+0,       9548,       9548,      682,     2728, 0xcee159fc
+0,      10230,      10230,      682,     2728, 0xaa3444a5
+0,      10912,      10912,      682,     2728, 0x23b76512
+0,      11594,      11594,      682,     2728, 0xef2243dd
+0,      12276,      12276,      682,     2728, 0x36486118
+0,      12958,      12958,      682,     2728, 0xfd59626c
diff --git a/tests/ref/fate/filter-pan-stereo3 b/tests/ref/fate/filter-pan-stereo3
new file mode 100644
index 0000000..effe11c
--- /dev/null
+++ b/tests/ref/fate/filter-pan-stereo3
@@ -0,0 +1,26 @@ 
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: pcm_s16le
+#sample_rate 0: 44100
+#channel_layout 0: 3
+#channel_layout_name 0: stereo
+0,          0,          0,     1024,     4096, 0xa0d1fbb3
+0,       1024,       1024,     1024,     4096, 0x598a056c
+0,       2048,       2048,     1024,     4096, 0x741ded28
+0,       3072,       3072,     1024,     4096, 0xc651b0ec
+0,       4096,       4096,     1024,     4096, 0x1082057c
+0,       5120,       5120,     1024,     4096, 0x70f7f00d
+0,       6144,       6144,     1024,     4096, 0xaed7fc53
+0,       7168,       7168,     1024,     4096, 0x4250faae
+0,       8192,       8192,     1024,     4096, 0xf7fcf61a
+0,       9216,       9216,     1024,     4096, 0xb1350562
+0,      10240,      10240,     1024,     4096, 0x16adea0b
+0,      11264,      11264,     1024,     4096, 0x706fd834
+0,      12288,      12288,     1024,     4096, 0x5431dd24
+0,      13312,      13312,     1024,     4096, 0xfaedfb73
+0,      14336,      14336,     1024,     4096, 0xee3d07e2
+0,      15360,      15360,     1024,     4096, 0x2561eeb8
+0,      16384,      16384,     1024,     4096, 0x8f76fc05
+0,      17408,      17408,     1024,     4096, 0xef05f0a1
+0,      18432,      18432,     1024,     4096, 0x4e92f19a
+0,      19456,      19456,     1024,     4096, 0x81b6e0bc
diff --git a/tests/ref/fate/filter-pan-stereo4 b/tests/ref/fate/filter-pan-stereo4
new file mode 100644
index 0000000..87c70a7
--- /dev/null
+++ b/tests/ref/fate/filter-pan-stereo4
@@ -0,0 +1,26 @@ 
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: pcm_s16le
+#sample_rate 0: 44100
+#channel_layout 0: 0
+#channel_layout_name 0: 4 channels
+0,          0,          0,     1024,     8192, 0xdaadfc44
+0,       1024,       1024,     1024,     8192, 0xe6d9ec37
+0,       2048,       2048,     1024,     8192, 0x5edfea64
+0,       3072,       3072,     1024,     8192, 0x7f7be38c
+0,       4096,       4096,     1024,     8192, 0x3f60f5c9
+0,       5120,       5120,     1024,     8192, 0xcee4fe06
+0,       6144,       6144,     1024,     8192, 0xdb98fa3e
+0,       7168,       7168,     1024,     8192, 0x4cb30687
+0,       8192,       8192,     1024,     8192, 0x00f6ecab
+0,       9216,       9216,     1024,     8192, 0xa7b0e0db
+0,      10240,      10240,     1024,     8192, 0xc2dcf89c
+0,      11264,      11264,     1024,     8192, 0x30d6f2fe
+0,      12288,      12288,     1024,     8192, 0xf83ae182
+0,      13312,      13312,     1024,     8192, 0xeecd05d1
+0,      14336,      14336,     1024,     8192, 0xfd3b0559
+0,      15360,      15360,     1024,     8192, 0xcd69e3e6
+0,      16384,      16384,     1024,     8192, 0xdf80fc29
+0,      17408,      17408,     1024,     8192, 0x7e8bf52b
+0,      18432,      18432,     1024,     8192, 0xee07e5f7
+0,      19456,      19456,     1024,     8192, 0xc874f294