channel_layout: Add a 16channel default layout
authorLuca Barbato <lu_zero@gentoo.org>
Fri, 21 Aug 2015 07:02:04 +0000 (09:02 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sun, 23 Aug 2015 19:44:38 +0000 (21:44 +0200)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavutil/channel_layout.c
libavutil/channel_layout.h

index 253c495..41340ec 100644 (file)
@@ -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;
     }
 }
index 6a1f830..5bd0c2c 100644 (file)
 #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_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)
 
 enum AVMatrixEncoding {