[libav-devel] [PATCH] channel_layout: Add a 16channel default layout

Luca Barbato lu_zero at gentoo.org
Fri Aug 21 09:02:04 CEST 2015


---

Now octagonal has a buddy!

 libavutil/channel_layout.c | 2 ++
 libavutil/channel_layout.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c
index 253c495..41340ec 100644
--- a/libavutil/channel_layout.c
+++ b/libavutil/channel_layout.c
@@ -97,6 +97,7 @@ static const struct {
     { "7.1(wide)",   8,  AV_CH_LAYOUT_7POINT1_WIDE },
     { "7.1(wide)",   8,  AV_CH_LAYOUT_7POINT1_WIDE_BACK },
     { "octagonal",   8,  AV_CH_LAYOUT_OCTAGONAL },
+    { "hexadecagonal", 16, AV_CH_LAYOUT_HEXADECAGONAL },
     { "downmix",     2,  AV_CH_LAYOUT_STEREO_DOWNMIX, },
     { 0 }
 };
@@ -193,6 +194,7 @@ uint64_t av_get_default_channel_layout(int nb_channels)
     case 6: return AV_CH_LAYOUT_5POINT1;
     case 7: return AV_CH_LAYOUT_6POINT1;
     case 8: return AV_CH_LAYOUT_7POINT1;
+    case 16: return AV_CH_LAYOUT_HEXADECAGONAL;
     default: return 0;
     }
 }
diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h
index 6a1f830..168b19a 100644
--- a/libavutil/channel_layout.h
+++ b/libavutil/channel_layout.h
@@ -100,6 +100,7 @@
 #define AV_CH_LAYOUT_7POINT1_WIDE      (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
 #define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
 #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_HEXADECAGONAL     (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_FRONT_CENTER)
 #define AV_CH_LAYOUT_STEREO_DOWNMIX    (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)

 enum AVMatrixEncoding {
--
2.5.0



More information about the libav-devel mailing list