summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-03-25 17:10:12 -0300
committerJames Almer <jamrial@gmail.com>2022-03-25 17:10:39 -0300
commit7602b4e4c219c681ec243a0c81bb8db12b070888 (patch)
tree06b4ba5cbd8d5b0fec7a400a199e5e7c2184008a
parent23cb87bb3c7ce71e67a86bb7a244619aec7b5bea (diff)
avutil/tests/channel_layout: also test ambisonic layouts in av_channel_layout_subset()
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavutil/tests/channel_layout.c6
-rw-r--r--tests/ref/fate/channel_layout4
2 files changed, 10 insertions, 0 deletions
diff --git a/libavutil/tests/channel_layout.c b/libavutil/tests/channel_layout.c
index 34f1197bfd..5516db0904 100644
--- a/libavutil/tests/channel_layout.c
+++ b/libavutil/tests/channel_layout.c
@@ -340,6 +340,12 @@ int main(void)
CHANNEL_LAYOUT_CHANNEL_FROM_INDEX(11);
printf("On \"ambisonic 2+stereo\" layout with 11: %21d\n", ret);
+ printf("\nTesting av_channel_layout_subset\n");
+ CHANNEL_LAYOUT_SUBSET(AV_CH_LAYOUT_STEREO);
+ printf("On \"ambisonic 2+stereo\" layout with AV_CH_LAYOUT_STEREO: 0x%"PRIx64"\n", mask);
+ CHANNEL_LAYOUT_SUBSET(AV_CH_LAYOUT_QUAD);
+ printf("On \"ambisonic 2+stereo\" layout with AV_CH_LAYOUT_QUAD: 0x%"PRIx64"\n", mask);
+
av_channel_layout_uninit(&layout);
av_bprint_finalize(&bp, NULL);
diff --git a/tests/ref/fate/channel_layout b/tests/ref/fate/channel_layout
index b1a4dcb1b1..19bcbce7d8 100644
--- a/tests/ref/fate/channel_layout
+++ b/tests/ref/fate/channel_layout
@@ -173,3 +173,7 @@ On "ambisonic 2+stereo" layout with 0: 1024
On "ambisonic 2+stereo" layout with 9: 0
On "ambisonic 2+stereo" layout with 10: 1
On "ambisonic 2+stereo" layout with 11: -1
+
+Testing av_channel_layout_subset
+On "ambisonic 2+stereo" layout with AV_CH_LAYOUT_STEREO: 0x3
+On "ambisonic 2+stereo" layout with AV_CH_LAYOUT_QUAD: 0x3