diff mbox series

[FFmpeg-devel,v2,4/4] tests/fate/filter-audio: add aloop test

Message ID 20241105071725.8348-1-cus@passwd.hu
State New
Headers show
Series None | expand

Commit Message

Marton Balint Nov. 5, 2024, 7:15 a.m. UTC
v2: use -filter_complex instead of -f lavfi to generate input

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 tests/fate/filter-audio.mak |  3 +++
 tests/ref/fate/filter-aloop | 45 +++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 tests/ref/fate/filter-aloop

Comments

Anton Khirnov Nov. 5, 2024, 9:20 a.m. UTC | #1
Quoting Marton Balint (2024-11-05 08:15:31)
> v2: use -filter_complex instead of -f lavfi to generate input
> 
> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
>  tests/fate/filter-audio.mak |  3 +++
>  tests/ref/fate/filter-aloop | 45 +++++++++++++++++++++++++++++++++++++
>  2 files changed, 48 insertions(+)
>  create mode 100644 tests/ref/fate/filter-aloop
> 
> diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
> index 84478740c7..343fa40e9d 100644
> --- a/tests/fate/filter-audio.mak
> +++ b/tests/fate/filter-audio.mak
> @@ -418,6 +418,9 @@ fate-filter-atempo: CMD = pcm -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -a
>  fate-filter-atempo: CMP = oneoff
>  fate-filter-atempo: REF = $(SAMPLES)/filter-reference/atempo.pcm
>  
> +fate-filter-aloop: CMD = framecrc -filter_complex "sine=r=48000:f=480:d=4,aloop=loop=4:start=48000:size=48000,asetnsamples=9600"
> +FATE_AFILTER-$(call ALLYES, SINE_FILTER ALOOP_FILTER ASETNSAMPLES_FILTER PCM_S16LE_ENCODER FRAMECRC_MUXER PIPE_PROTOCOL) += fate-filter-aloop

Looks ok
diff mbox series

Patch

diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index 84478740c7..343fa40e9d 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
@@ -418,6 +418,9 @@  fate-filter-atempo: CMD = pcm -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -a
 fate-filter-atempo: CMP = oneoff
 fate-filter-atempo: REF = $(SAMPLES)/filter-reference/atempo.pcm
 
+fate-filter-aloop: CMD = framecrc -filter_complex "sine=r=48000:f=480:d=4,aloop=loop=4:start=48000:size=48000,asetnsamples=9600"
+FATE_AFILTER-$(call ALLYES, SINE_FILTER ALOOP_FILTER ASETNSAMPLES_FILTER PCM_S16LE_ENCODER FRAMECRC_MUXER PIPE_PROTOCOL) += fate-filter-aloop
+
 fate-filter-crazychannels: tests/data/filtergraphs/crazychannels
 fate-filter-crazychannels: CMD = framecrc -auto_conversion_filters -/filter_complex $(TARGET_PATH)/tests/data/filtergraphs/crazychannels
 FATE_AFILTER-$(call FILTERFRAMECRC, ARESAMPLE SINE JOIN ATRIM CHANNELMAP CHANNELSPLIT) += fate-filter-crazychannels
diff --git a/tests/ref/fate/filter-aloop b/tests/ref/fate/filter-aloop
new file mode 100644
index 0000000000..d6286d8855
--- /dev/null
+++ b/tests/ref/fate/filter-aloop
@@ -0,0 +1,45 @@ 
+#tb 0: 1/48000
+#media_type 0: audio
+#codec_id 0: pcm_s16le
+#sample_rate 0: 48000
+#channel_layout_name 0: mono
+0,          0,          0,     9600,    19200, 0x1476501c
+0,       9600,       9600,     9600,    19200, 0x1476501c
+0,      19200,      19200,     9600,    19200, 0x1476501c
+0,      28800,      28800,     9600,    19200, 0x1476501c
+0,      38400,      38400,     9600,    19200, 0x1476501c
+0,      48000,      48000,     9600,    19200, 0x1476501c
+0,      57600,      57600,     9600,    19200, 0x1476501c
+0,      67200,      67200,     9600,    19200, 0x1476501c
+0,      76800,      76800,     9600,    19200, 0x1476501c
+0,      86400,      86400,     9600,    19200, 0x1476501c
+0,      96896,      96896,     9600,    19200, 0x1476501c
+0,     106496,     106496,     9600,    19200, 0x1476501c
+0,     116096,     116096,     9600,    19200, 0x1476501c
+0,     125696,     125696,     9600,    19200, 0x1476501c
+0,     135296,     135296,     9600,    19200, 0x1476501c
+0,     144896,     144896,     9600,    19200, 0x1476501c
+0,     154496,     154496,     9600,    19200, 0x1476501c
+0,     164096,     164096,     9600,    19200, 0x1476501c
+0,     173696,     173696,     9600,    19200, 0x1476501c
+0,     183296,     183296,     9600,    19200, 0x1476501c
+0,     192896,     192896,     9600,    19200, 0x1476501c
+0,     202496,     202496,     9600,    19200, 0x1476501c
+0,     212096,     212096,     9600,    19200, 0x1476501c
+0,     221696,     221696,     9600,    19200, 0x1476501c
+0,     231296,     231296,     9600,    19200, 0x1476501c
+0,     240896,     240896,     9600,    19200, 0x1476501c
+0,     250496,     250496,     9600,    19200, 0x1476501c
+0,     260096,     260096,     9600,    19200, 0x1476501c
+0,     269696,     269696,     9600,    19200, 0x1476501c
+0,     279296,     279296,     9600,    19200, 0x1476501c
+0,     288896,     288896,     9600,    19200, 0x1476501c
+0,     298496,     298496,     9600,    19200, 0x1476501c
+0,     308096,     308096,     9600,    19200, 0x1476501c
+0,     317696,     317696,     9600,    19200, 0x1476501c
+0,     327296,     327296,     9600,    19200, 0x1476501c
+0,     336896,     336896,     9600,    19200, 0x1476501c
+0,     346496,     346496,     9600,    19200, 0x1476501c
+0,     356096,     356096,     9600,    19200, 0x1476501c
+0,     365696,     365696,     9600,    19200, 0x1476501c
+0,     375296,     375296,     9600,    19200, 0x1476501c