aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3tab.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-04-19 15:05:32 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-04-19 15:05:32 +0000
commitbfeca7beb63bc297c8c59469a53e469d11ec4d23 (patch)
tree407aa9c0f23f3b28a08a5c77e5290c86e698bb21 /libavcodec/ac3tab.c
parentbe233a569165ad39a63ff2137763a123cd4f2562 (diff)
downloadffmpeg-bfeca7beb63bc297c8c59469a53e469d11ec4d23.tar.gz
Add channel layout support to the AC-3 decoder and AC-3 parser.
Originally committed as revision 18622 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3tab.c')
-rw-r--r--libavcodec/ac3tab.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavcodec/ac3tab.c b/libavcodec/ac3tab.c
index cb07ac6255..ba7b204b21 100644
--- a/libavcodec/ac3tab.c
+++ b/libavcodec/ac3tab.c
@@ -24,6 +24,7 @@
* tables taken directly from the AC-3 spec.
*/
+#include "avcodec.h"
#include "ac3tab.h"
/**
@@ -79,6 +80,20 @@ const uint8_t ff_ac3_channels_tab[8] = {
2, 1, 2, 3, 3, 4, 4, 5
};
+/**
+ * Maps audio coding mode (acmod) to channel layout mask.
+ */
+const uint16_t ff_ac3_channel_layout_tab[8] = {
+ CH_LAYOUT_STEREO,
+ CH_LAYOUT_MONO,
+ CH_LAYOUT_STEREO,
+ CH_LAYOUT_SURROUND,
+ CH_LAYOUT_2_1,
+ CH_LAYOUT_4POINT0,
+ CH_LAYOUT_2_2,
+ CH_LAYOUT_5POINT0
+};
+
#define COMMON_CHANNEL_MAP \
{ { 0, 1, }, { 0, 1, 2, } },\
{ { 0, }, { 0, 1, } },\