From ec517ad9f9d4676e56c5f2e0054b9bb7b9c175ec Mon Sep 17 00:00:00 2001 From: Tobias Rapp <t.rapp@noa-archive.com> Date: Thu, 19 Jul 2018 13:59:37 +0200 Subject: [PATCH] fate: add tests for audio channel up-/downmixing with pan filter Add tests for upmixing and downmixing with audio channel counts that have a corresponding default layout and also tests where there is no default layout. Update the existing "stereo4" test so it actually outputs stereo like the other stereo tests. Rename the previous "stereo4" test into "upmix1". Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com> --- tests/fate/filter-audio.mak | 22 +++++++++++++++- tests/ref/fate/filter-pan-downmix1 | 26 ++++++++++++++++++ tests/ref/fate/filter-pan-downmix2 | 26 ++++++++++++++++++ tests/ref/fate/filter-pan-stereo4 | 42 +++++++++++++++--------------- tests/ref/fate/filter-pan-upmix1 | 26 ++++++++++++++++++ tests/ref/fate/filter-pan-upmix2 | 26 ++++++++++++++++++ 6 files changed, 146 insertions(+), 22 deletions(-) create mode 100644 tests/ref/fate/filter-pan-downmix1 create mode 100644 tests/ref/fate/filter-pan-downmix2 create mode 100644 tests/ref/fate/filter-pan-upmix1 create mode 100644 tests/ref/fate/filter-pan-upmix2 diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 6125a37f353..473b8ae9a53 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -156,7 +156,27 @@ fate-filter-pan-stereo3: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter: 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-filter-pan-stereo4: CMD = framecrc -ss 3.14 -guess_layout_max 0 -i $(SRC) -frames:a 20 -filter:a "pan=2C|c0=c0-0.5*c1|c1=c1+0.5*c0" + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-upmix1 +fate-filter-pan-upmix1: tests/data/asynth-44100-2.wav +fate-filter-pan-upmix1: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-pan-upmix1: 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-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-upmix2 +fate-filter-pan-upmix2: tests/data/asynth-44100-4.wav +fate-filter-pan-upmix2: SRC = $(TARGET_PATH)/tests/data/asynth-44100-4.wav +fate-filter-pan-upmix2: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=9C|c0=c0-c1|c1=c2+c3|c2=c0+c1|c3=c2-c3|c4=c1-c0|c5=c3+c2|c6=c1+c0|c7=c3-c2|c8=c0-c3" + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-downmix1 +fate-filter-pan-downmix1: tests/data/asynth-44100-4.wav +fate-filter-pan-downmix1: SRC = $(TARGET_PATH)/tests/data/asynth-44100-4.wav +fate-filter-pan-downmix1: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=2c|FL<FL+0.5*FC+0.6*BL+0.6*SL|FR<FR+0.5*FC+0.6*BR+0.6*SR" + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-downmix2 +fate-filter-pan-downmix2: tests/data/asynth-44100-11.wav +fate-filter-pan-downmix2: SRC = $(TARGET_PATH)/tests/data/asynth-44100-11.wav +fate-filter-pan-downmix2: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=5C|c0=0.7*c0+0.7*c10|c1=c9|c2=c8|c3=c7|c4=c6" 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 diff --git a/tests/ref/fate/filter-pan-downmix1 b/tests/ref/fate/filter-pan-downmix1 new file mode 100644 index 00000000000..47d5044dac3 --- /dev/null +++ b/tests/ref/fate/filter-pan-downmix1 @@ -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, 512, 2048, 0xccb10170 +0, 512, 512, 512, 2048, 0xc51cf8e7 +0, 1024, 1024, 512, 2048, 0x959eef2d +0, 1536, 1536, 512, 2048, 0x559f0751 +0, 2048, 2048, 512, 2048, 0x4c4c08e1 +0, 2560, 2560, 512, 2048, 0x41c3fd6f +0, 3072, 3072, 512, 2048, 0x4c92f8d2 +0, 3584, 3584, 512, 2048, 0x9defee05 +0, 4096, 4096, 512, 2048, 0x2d33f4dc +0, 4608, 4608, 512, 2048, 0xd854eeca +0, 5120, 5120, 512, 2048, 0xdb55eaf7 +0, 5632, 5632, 512, 2048, 0x2bac060d +0, 6144, 6144, 512, 2048, 0x91beec0f +0, 6656, 6656, 512, 2048, 0x3262f0da +0, 7168, 7168, 512, 2048, 0xf00708a6 +0, 7680, 7680, 512, 2048, 0xc90cfa02 +0, 8192, 8192, 512, 2048, 0x09e9f413 +0, 8704, 8704, 512, 2048, 0xcd0d0c36 +0, 9216, 9216, 512, 2048, 0x6f6bff82 +0, 9728, 9728, 512, 2048, 0x18a40912 diff --git a/tests/ref/fate/filter-pan-downmix2 b/tests/ref/fate/filter-pan-downmix2 new file mode 100644 index 00000000000..8d3ee10812a --- /dev/null +++ b/tests/ref/fate/filter-pan-downmix2 @@ -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: 5 channels +0, 0, 0, 186, 1860, 0x2480a20e +0, 186, 186, 186, 1860, 0xde9e9c40 +0, 372, 372, 186, 1860, 0xc497b2a0 +0, 558, 558, 186, 1860, 0xe5a8a2d7 +0, 744, 744, 186, 1860, 0x01c09b6a +0, 930, 930, 186, 1860, 0xb26fae2f +0, 1116, 1116, 186, 1860, 0x1292a9ab +0, 1302, 1302, 186, 1860, 0xe7a79136 +0, 1488, 1488, 186, 1860, 0x57dc81a3 +0, 1674, 1674, 186, 1860, 0xc13b9a1b +0, 1860, 1860, 186, 1860, 0xdf7c9fd6 +0, 2046, 2046, 186, 1860, 0x4d769cff +0, 2232, 2232, 186, 1860, 0xb8b79977 +0, 2418, 2418, 186, 1860, 0xd287989f +0, 2604, 2604, 186, 1860, 0xc2a38f03 +0, 2790, 2790, 186, 1860, 0xd7149438 +0, 2976, 2976, 186, 1860, 0xc3719081 +0, 3162, 3162, 186, 1860, 0xb9fba1a3 +0, 3348, 3348, 186, 1860, 0xe92cb2de +0, 3534, 3534, 186, 1860, 0x9dd9b272 diff --git a/tests/ref/fate/filter-pan-stereo4 b/tests/ref/fate/filter-pan-stereo4 index 87c70a7f1fc..6d10ed62a8b 100644 --- a/tests/ref/fate/filter-pan-stereo4 +++ b/tests/ref/fate/filter-pan-stereo4 @@ -3,24 +3,24 @@ #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 +#channel_layout_name 0: 2 channels +0, 0, 0, 1024, 4096, 0x7bd6fc44 +0, 1024, 1024, 1024, 4096, 0xed38ec37 +0, 2048, 2048, 1024, 4096, 0x4696ea64 +0, 3072, 3072, 1024, 4096, 0xf2c8e38c +0, 4096, 4096, 1024, 4096, 0x9aa8f5c9 +0, 5120, 5120, 1024, 4096, 0xfb46fe06 +0, 6144, 6144, 1024, 4096, 0x6700fa3e +0, 7168, 7168, 1024, 4096, 0x235e0687 +0, 8192, 8192, 1024, 4096, 0x8b9aecab +0, 9216, 9216, 1024, 4096, 0x62f3e0db +0, 10240, 10240, 1024, 4096, 0xe59ef89c +0, 11264, 11264, 1024, 4096, 0x1a48f2fe +0, 12288, 12288, 1024, 4096, 0x9026e182 +0, 13312, 13312, 1024, 4096, 0xec4d05d1 +0, 14336, 14336, 1024, 4096, 0x7ee70559 +0, 15360, 15360, 1024, 4096, 0x807ae3e6 +0, 16384, 16384, 1024, 4096, 0xf0d2fc29 +0, 17408, 17408, 1024, 4096, 0xd9e7f52b +0, 18432, 18432, 1024, 4096, 0x0f1ce5f7 +0, 19456, 19456, 1024, 4096, 0x6b3cf294 diff --git a/tests/ref/fate/filter-pan-upmix1 b/tests/ref/fate/filter-pan-upmix1 new file mode 100644 index 00000000000..87c70a7f1fc --- /dev/null +++ b/tests/ref/fate/filter-pan-upmix1 @@ -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 diff --git a/tests/ref/fate/filter-pan-upmix2 b/tests/ref/fate/filter-pan-upmix2 new file mode 100644 index 00000000000..56db1c17e17 --- /dev/null +++ b/tests/ref/fate/filter-pan-upmix2 @@ -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: 9 channels +0, 0, 0, 512, 9216, 0xd561bb2b +0, 512, 512, 512, 9216, 0x591805f9 +0, 1024, 1024, 512, 9216, 0xd46fecd6 +0, 1536, 1536, 512, 9216, 0x1e1f176b +0, 2048, 2048, 512, 9216, 0xe383f1a6 +0, 2560, 2560, 512, 9216, 0xc628c661 +0, 3072, 3072, 512, 9216, 0x1ad09914 +0, 3584, 3584, 512, 9216, 0x798533cc +0, 4096, 4096, 512, 9216, 0x4913d581 +0, 4608, 4608, 512, 9216, 0x59f506b3 +0, 5120, 5120, 512, 9216, 0x8885fa28 +0, 5632, 5632, 512, 9216, 0x769ffa95 +0, 6144, 6144, 512, 9216, 0xc636cc46 +0, 6656, 6656, 512, 9216, 0x4740f34b +0, 7168, 7168, 512, 9216, 0x00d2de28 +0, 7680, 7680, 512, 9216, 0x704a07fc +0, 8192, 8192, 512, 9216, 0x54a4f682 +0, 8704, 8704, 512, 9216, 0xd6dac181 +0, 9216, 9216, 512, 9216, 0xfcd6fe28 +0, 9728, 9728, 512, 9216, 0x5c41cbdc -- GitLab