]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/mpeg4audio: add newer channel_coding mappings
authorJan Ekström <jeebjp@gmail.com>
Wed, 10 Jun 2020 21:07:15 +0000 (00:07 +0300)
committerJan Ekström <jeebjp@gmail.com>
Mon, 3 Aug 2020 21:17:56 +0000 (00:17 +0300)
Additionally, add comments regarding their definitions. Based on
ARIB STD-B32, which bases on 14496-3:2009 and 14496-3:2009/AMD4.

libavcodec/mpeg4audio.c
libavcodec/mpeg4audio.h

index 0d83fb8d259783abf482f9e3ad8451a002a8ad0f..77cf2fb61c7b756fab4c24d88781b88a6a61e94e 100644 (file)
@@ -64,8 +64,21 @@ const int avpriv_mpeg4audio_sample_rates[16] = {
     24000, 22050, 16000, 12000, 11025, 8000, 7350
 };
 
-const uint8_t ff_mpeg4audio_channels[8] = {
-    0, 1, 2, 3, 4, 5, 6, 8
+const uint8_t ff_mpeg4audio_channels[14] = {
+    0,
+    1, // mono (1/0)
+    2, // stereo (2/0)
+    3, // 3/0
+    4, // 3/1
+    5, // 3/2
+    6, // 3/2.1
+    8, // 5/2.1
+    0,
+    0,
+    0,
+    7, // 3/3.1
+    8, // 3/2/2.1
+    24 // 3/3/3 - 5/2/3 - 3/0/0.2
 };
 
 static inline int get_object_type(GetBitContext *gb)
index 4b390e0f429497aa35627318ed2495eb0995aa73..c4cdc1508ca6ce6029ee1c2ce71cff2aabe49b54 100644 (file)
@@ -46,7 +46,7 @@ typedef struct MPEG4AudioConfig {
 } MPEG4AudioConfig;
 
 extern av_export_avcodec const int avpriv_mpeg4audio_sample_rates[16];
-extern const uint8_t ff_mpeg4audio_channels[8];
+extern const uint8_t ff_mpeg4audio_channels[14];
 
 /**
  * Parse MPEG-4 systems extradata from a potentially unaligned GetBitContext to retrieve audio configuration.