summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4audio.c
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2020-06-11 00:07:15 +0300
committerJan Ekström <jeebjp@gmail.com>2020-08-04 00:17:56 +0300
commit79b057f1b7dd7ff05829089d2009c7172b13704b (patch)
tree3a2d602e07f226cb0aa693991a6d18b5905c669e /libavcodec/mpeg4audio.c
parentf5390a9f86d68ced52a39e00eca70d15d25accc7 (diff)
downloadffmpeg-79b057f1b7dd7ff05829089d2009c7172b13704b.tar.gz
avcodec/mpeg4audio: add newer channel_coding mappings
Additionally, add comments regarding their definitions. Based on ARIB STD-B32, which bases on 14496-3:2009 and 14496-3:2009/AMD4.
Diffstat (limited to 'libavcodec/mpeg4audio.c')
-rw-r--r--libavcodec/mpeg4audio.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c
index 0d83fb8d25..77cf2fb61c 100644
--- a/libavcodec/mpeg4audio.c
+++ b/libavcodec/mpeg4audio.c
@@ -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)