vorbis: Add official 6.1 and 7.1 channel mappings
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 14 Jan 2010 07:19:55 +0000 (08:19 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 14 Jan 2010 07:20:38 +0000 (08:20 +0100)
These are in the Vorbis spec since 2010-01-13. Fixes bug #606926.

ext/vorbis/vorbisdec.c
ext/vorbis/vorbisenc.c

index ce4bb934f66e850ea21e52fcc4ca011436a9fdb6..4249993c5533c3d36e5c854a96f0e74eb41bc74b 100644 (file)
@@ -606,19 +606,16 @@ vorbis_handle_identification_packet (GstVorbisDec * vd)
       pos = pos6;
       break;
     }
-      /* FIXME: for >6 channels the layout is not defined by the Vorbis
-       * spec. These are the gstreamer "defaults" for 7/8 channels and
-       * NONE layouts for more channels
-       */
+      /* 6.1 and 7.1 are in the Vorbis spec since 2010-01-13 */
     case 7:{
       static const GstAudioChannelPosition pos7[] = {
         GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
-        GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
-        GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
-        GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
         GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
-        GST_AUDIO_CHANNEL_POSITION_LFE,
+        GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
+        GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
+        GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
         GST_AUDIO_CHANNEL_POSITION_REAR_CENTER,
+        GST_AUDIO_CHANNEL_POSITION_LFE
       };
       pos = pos7;
       /* fallthrough */
@@ -626,13 +623,13 @@ vorbis_handle_identification_packet (GstVorbisDec * vd)
     case 8:{
       static const GstAudioChannelPosition pos8[] = {
         GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
-        GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
-        GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
-        GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
         GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
-        GST_AUDIO_CHANNEL_POSITION_LFE,
+        GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
         GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
         GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
+        GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
+        GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
+        GST_AUDIO_CHANNEL_POSITION_LFE
       };
 
       pos = pos8;
index da9da157ea3ef654801cab56368f226956993ded..4ad643c1165b1a387bba212cccebaec5743dc47a 100644 (file)
@@ -259,25 +259,23 @@ static const GstAudioChannelPosition vorbischannelpositions[][8] = {
         GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
         GST_AUDIO_CHANNEL_POSITION_LFE,
       },
-  {                             /* Not defined by spec, GStreamer default */
+  {                             /* 6.1 Surround, in Vorbis spec since 2010-01-13 */
         GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
-        GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
-        GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
-        GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
         GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
-        GST_AUDIO_CHANNEL_POSITION_LFE,
+        GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
+        GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
+        GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
         GST_AUDIO_CHANNEL_POSITION_REAR_CENTER,
-      },
-  {                             /* Not defined by spec, GStreamer default */
+      GST_AUDIO_CHANNEL_POSITION_LFE},
+  {                             /* 7.1 Surround, in Vorbis spec since 2010-01-13 */
         GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
-        GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
-        GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
-        GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
         GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
-        GST_AUDIO_CHANNEL_POSITION_LFE,
+        GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
         GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
         GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
-      },
+        GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
+        GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
+      GST_AUDIO_CHANNEL_POSITION_LFE},
 };
 
 static GstCaps *