[FFmpeg-devel] [PATCH v2 04/10] fate/audio: Add tests for APTX (HD)

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Aug 31 15:42:52 EEST 2021


We have de- and encoders for APTX and APTX HD, yet not FATE tests.
This commit therefore adds a transcoding test to utilize them.

Furthermore, during creating these tests it turned out that
the duration is set incorrectly for APTX HD. This will be fixed
in a future commit.

(Thanks to Andriy Gelman for finding an issue in an earlier version
that used a 192kHz input sample which does not work reliably accross
platforms.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
The earlier version involved an implicit 192kHz->48kHz resampling
which is probably the reason why this test failed on PPC.

 tests/fate/audio.mak   | 14 ++++++++++++++
 tests/ref/fate/aptx    | 19 +++++++++++++++++++
 tests/ref/fate/aptx-hd | 16 ++++++++++++++++
 3 files changed, 49 insertions(+)
 create mode 100644 tests/ref/fate/aptx
 create mode 100644 tests/ref/fate/aptx-hd

diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak
index fd9905ca0a..a833b99d7b 100644
--- a/tests/fate/audio.mak
+++ b/tests/fate/audio.mak
@@ -1,3 +1,17 @@
+FATE_SAMPLES_AUDIO-$(call ALLYES, FILE_PROTOCOL WAV_DEMUXER PCM_S16LE_DECODER \
+                                  ARESAMPLE_FILTER APTX_ENCODER APTX_MUXER    \
+                                  APTX_DEMUXER APTX_DECODER PCM_S16LE_ENCODER \
+                                  FRAMECRC_MUXER PIPE_PROTOCOL)               \
+                     += fate-aptx
+fate-aptx: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav aptx "-af aresample -c aptx" "-af aresample -c:a pcm_s16le -t 0.25" "" "" "" "aptx -sample_rate 44100"
+
+FATE_SAMPLES_AUDIO-$(call ALLYES, FILE_PROTOCOL WAV_DEMUXER PCM_S16LE_DECODER \
+                                  ARESAMPLE_FILTER APTX_HD_ENCODER            \
+                                  APTX_HD_MUXER APTX_HD_DEMUXER APTX_HD_DECODER \
+                                  PCM_S32LE_ENCODER FRAMECRC_MUXER PIPE_PROTOCOL) \
+                     += fate-aptx-hd
+fate-aptx-hd: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav aptx_hd "-af aresample -c aptx_hd" "-af aresample -c:a pcm_s32le -t 0.25" "" "" "" "aptx_hd -sample_rate 44100"
+
 FATE_BINKAUDIO-$(call DEMDEC, BINK, BINKAUDIO_DCT) += fate-binkaudio-dct
 fate-binkaudio-dct: CMD = pcm -i $(TARGET_SAMPLES)/bink/binkaudio_dct.bik
 fate-binkaudio-dct: REF = $(SAMPLES)/bink/binkaudio_dct.pcm
diff --git a/tests/ref/fate/aptx b/tests/ref/fate/aptx
new file mode 100644
index 0000000000..22607e2b89
--- /dev/null
+++ b/tests/ref/fate/aptx
@@ -0,0 +1,19 @@
+b5d8a297c0e8d9854f19d9d3e8b82859 *tests/data/fate/aptx.aptx
+418950 tests/data/fate/aptx.aptx
+#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, 0xcbb4ceff
+0,       1024,       1024,     1024,     4096, 0xa66533e7
+0,       2048,       2048,     1024,     4096, 0x4f22ec39
+0,       3072,       3072,     1024,     4096, 0x45f117f9
+0,       4096,       4096,     1024,     4096, 0xad6c0b7a
+0,       5120,       5120,     1024,     4096, 0x611618fd
+0,       6144,       6144,     1024,     4096, 0x0ec02f2b
+0,       7168,       7168,     1024,     4096, 0x2cf9ae5c
+0,       8192,       8192,     1024,     4096, 0xfb008ac0
+0,       9216,       9216,     1024,     4096, 0x25068495
+0,      10240,      10240,      785,     3140, 0x5a260589
diff --git a/tests/ref/fate/aptx-hd b/tests/ref/fate/aptx-hd
new file mode 100644
index 0000000000..f0cd72ee90
--- /dev/null
+++ b/tests/ref/fate/aptx-hd
@@ -0,0 +1,16 @@
+48ecaa81ee5adaaa62ed3ff6574b6666 *tests/data/fate/aptx-hd.aptx_hd
+628425 tests/data/fate/aptx-hd.aptx_hd
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: pcm_s32le
+#sample_rate 0: 44100
+#channel_layout 0: 3
+#channel_layout_name 0: stereo
+0,          0,          0,     1024,     8192, 0xa99888c6
+0,       1536,       1536,     1024,     8192, 0xc3e03a3c
+0,       3072,       3072,     1024,     8192, 0x3f06e090
+0,       4608,       4608,     1024,     8192, 0x92fb18f3
+0,       6144,       6144,     1024,     8192, 0x3d5603a2
+0,       7680,       7680,     1024,     8192, 0xcc3d3101
+0,       9216,       9216,     1024,     8192, 0xbcc022ef
+0,      10752,      10752,      273,     2184, 0x9873af57
-- 
2.30.2



More information about the ffmpeg-devel mailing list