ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Thu Oct 26 22:18:07 
2023 -0300| [35b06853d1ba7a871a47b241b1f9f6cc7b4b08d1] | committer: James Almer

avutil/channel_layout: add a 3.1.2 channel layout

Signed-off-by: James Almer <jamr...@gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35b06853d1ba7a871a47b241b1f9f6cc7b4b08d1
---

 doc/utils.texi                | 2 ++
 libavutil/channel_layout.c    | 1 +
 libavutil/channel_layout.h    | 2 ++
 tests/ref/fate/channel_layout | 1 +
 4 files changed, 6 insertions(+)

diff --git a/doc/utils.texi b/doc/utils.texi
index f0c4c51b28..940d5381e3 100644
--- a/doc/utils.texi
+++ b/doc/utils.texi
@@ -695,6 +695,8 @@ FL+FR+FC+LFE+SL+SR
 FL+FR+FC+BC+SL+SR
 @item 6.0(front)
 FL+FR+FLC+FRC+SL+SR
+@item 3.1.2
+FL+FR+FC+LFE+TFL+TFR
 @item hexagonal
 FL+FR+FC+BL+BR+BC
 @item 6.1
diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c
index 28fd46efa1..1a36736b7f 100644
--- a/libavutil/channel_layout.c
+++ b/libavutil/channel_layout.c
@@ -191,6 +191,7 @@ static const struct channel_layout_name 
channel_layout_map[] = {
     { "5.1(side)",      AV_CHANNEL_LAYOUT_5POINT1             },
     { "6.0",            AV_CHANNEL_LAYOUT_6POINT0             },
     { "6.0(front)",     AV_CHANNEL_LAYOUT_6POINT0_FRONT       },
+    { "3.1.2",          AV_CHANNEL_LAYOUT_3POINT1POINT2       },
     { "hexagonal",      AV_CHANNEL_LAYOUT_HEXAGONAL           },
     { "6.1",            AV_CHANNEL_LAYOUT_6POINT1             },
     { "6.1(back)",      AV_CHANNEL_LAYOUT_6POINT1_BACK        },
diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h
index d8c2aa089c..a1765225c9 100644
--- a/libavutil/channel_layout.h
+++ b/libavutil/channel_layout.h
@@ -224,6 +224,7 @@ enum AVChannelOrder {
 #define AV_CH_LAYOUT_6POINT0           (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER)
 #define AV_CH_LAYOUT_6POINT0_FRONT     
(AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
 #define AV_CH_LAYOUT_HEXAGONAL         
(AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER)
+#define AV_CH_LAYOUT_3POINT1POINT2     
(AV_CH_LAYOUT_3POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
 #define AV_CH_LAYOUT_6POINT1           (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER)
 #define AV_CH_LAYOUT_6POINT1_BACK      
(AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER)
 #define AV_CH_LAYOUT_6POINT1_FRONT     
(AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY)
@@ -394,6 +395,7 @@ typedef struct AVChannelLayout {
 #define AV_CHANNEL_LAYOUT_5POINT1_BACK      AV_CHANNEL_LAYOUT_MASK(6,  
AV_CH_LAYOUT_5POINT1_BACK)
 #define AV_CHANNEL_LAYOUT_6POINT0           AV_CHANNEL_LAYOUT_MASK(6,  
AV_CH_LAYOUT_6POINT0)
 #define AV_CHANNEL_LAYOUT_6POINT0_FRONT     AV_CHANNEL_LAYOUT_MASK(6,  
AV_CH_LAYOUT_6POINT0_FRONT)
+#define AV_CHANNEL_LAYOUT_3POINT1POINT2     AV_CHANNEL_LAYOUT_MASK(6,  
AV_CH_LAYOUT_3POINT1POINT2)
 #define AV_CHANNEL_LAYOUT_HEXAGONAL         AV_CHANNEL_LAYOUT_MASK(6,  
AV_CH_LAYOUT_HEXAGONAL)
 #define AV_CHANNEL_LAYOUT_6POINT1           AV_CHANNEL_LAYOUT_MASK(7,  
AV_CH_LAYOUT_6POINT1)
 #define AV_CHANNEL_LAYOUT_6POINT1_BACK      AV_CHANNEL_LAYOUT_MASK(7,  
AV_CH_LAYOUT_6POINT1_BACK)
diff --git a/tests/ref/fate/channel_layout b/tests/ref/fate/channel_layout
index 1276c1ffb8..ba01e7ae3f 100644
--- a/tests/ref/fate/channel_layout
+++ b/tests/ref/fate/channel_layout
@@ -15,6 +15,7 @@ quad(side)     FL+FR+SL+SR
 5.1(side)      FL+FR+FC+LFE+SL+SR
 6.0            FL+FR+FC+BC+SL+SR
 6.0(front)     FL+FR+FLC+FRC+SL+SR
+3.1.2          FL+FR+FC+LFE+TFL+TFR
 hexagonal      FL+FR+FC+BL+BR+BC
 6.1            FL+FR+FC+LFE+BC+SL+SR
 6.1(back)      FL+FR+FC+LFE+BL+BR+BC

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to