aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-10-26 21:24:11 -0300
committerJames Almer <jamrial@gmail.com>2023-10-27 08:46:34 -0300
commita41c4b923dbc7f3f51aa79b5bbbe68fd01bacf00 (patch)
treee6205c70f675d88b8d9a9239d0aedee9fb0e4fc0
parent8d46cbce4f158b23505e3926bb7f20b209a536c0 (diff)
downloadffmpeg-a41c4b923dbc7f3f51aa79b5bbbe68fd01bacf00.tar.gz
avutil/channel_layout: add a 7.1.2 channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--doc/utils.texi2
-rw-r--r--libavutil/channel_layout.c1
-rw-r--r--libavutil/channel_layout.h2
-rw-r--r--tests/ref/fate/channel_layout1
4 files changed, 6 insertions, 0 deletions
diff --git a/doc/utils.texi b/doc/utils.texi
index bd71fb59c4..2456710dac 100644
--- a/doc/utils.texi
+++ b/doc/utils.texi
@@ -721,6 +721,8 @@ FL+FR+FC+BL+BR+BC+SL+SR
FL+FR+BL+BR+TFL+TFR+TBL+TBR
@item 5.1.4
FL+FR+FC+LFE+BL+BR+TFL+TFR+TBL+TBR
+@item 7.1.2
+FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR
@item hexadecagonal
FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR
@item downmix
diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c
index 621606cd59..568c81c46e 100644
--- a/libavutil/channel_layout.c
+++ b/libavutil/channel_layout.c
@@ -204,6 +204,7 @@ static const struct channel_layout_name channel_layout_map[] = {
{ "octagonal", AV_CHANNEL_LAYOUT_OCTAGONAL },
{ "cube", AV_CHANNEL_LAYOUT_CUBE },
{ "5.1.4", AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK },
+ { "7.1.2", AV_CHANNEL_LAYOUT_7POINT1POINT2 },
{ "hexadecagonal", AV_CHANNEL_LAYOUT_HEXADECAGONAL },
{ "downmix", AV_CHANNEL_LAYOUT_STEREO_DOWNMIX, },
{ "22.2", AV_CHANNEL_LAYOUT_22POINT2, },
diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h
index a235ab82f9..f2bbd0794e 100644
--- a/libavutil/channel_layout.h
+++ b/libavutil/channel_layout.h
@@ -236,6 +236,7 @@ enum AVChannelOrder {
#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
#define AV_CH_LAYOUT_CUBE (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
#define AV_CH_LAYOUT_5POINT1POINT4_BACK (AV_CH_LAYOUT_5POINT1POINT2_BACK|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
+#define AV_CH_LAYOUT_7POINT1POINT2 (AV_CH_LAYOUT_7POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
#define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
@@ -405,6 +406,7 @@ typedef struct AVChannelLayout {
#define AV_CHANNEL_LAYOUT_OCTAGONAL AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_OCTAGONAL)
#define AV_CHANNEL_LAYOUT_CUBE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_CUBE)
#define AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(10, AV_CH_LAYOUT_5POINT1POINT4_BACK)
+#define AV_CHANNEL_LAYOUT_7POINT1POINT2 AV_CHANNEL_LAYOUT_MASK(10, AV_CH_LAYOUT_7POINT1POINT2)
#define AV_CHANNEL_LAYOUT_HEXADECAGONAL AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_HEXADECAGONAL)
#define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO_DOWNMIX)
#define AV_CHANNEL_LAYOUT_22POINT2 AV_CHANNEL_LAYOUT_MASK(24, AV_CH_LAYOUT_22POINT2)
diff --git a/tests/ref/fate/channel_layout b/tests/ref/fate/channel_layout
index 194083fb71..b9fd448ea3 100644
--- a/tests/ref/fate/channel_layout
+++ b/tests/ref/fate/channel_layout
@@ -28,6 +28,7 @@ hexagonal FL+FR+FC+BL+BR+BC
octagonal FL+FR+FC+BL+BR+BC+SL+SR
cube FL+FR+BL+BR+TFL+TFR+TBL+TBR
5.1.4 FL+FR+FC+LFE+BL+BR+TFL+TFR+TBL+TBR
+7.1.2 FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR
hexadecagonal FL+FR+FC+BL+BR+BC+SL+SR+TFL+TFC+TFR+TBL+TBC+TBR+WL+WR
downmix DL+DR
22.2 FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL+SR+TC+TFL+TFC+TFR+TBL+TBC+TBR+LFE2+TSL+TSR+BFC+BFL+BFR