Mercurial > libavcodec.hg
diff ac3tab.c @ 9512:ba5d9a97ab2f libavcodec
Add channel layout support to the AC-3 decoder and AC-3 parser.
author | jbr |
---|---|
date | Sun, 19 Apr 2009 15:05:32 +0000 |
parents | 7db61b0d21f9 |
children | 54b6170a608b |
line wrap: on
line diff
--- a/ac3tab.c Sun Apr 19 14:05:55 2009 +0000 +++ b/ac3tab.c Sun Apr 19 15:05:32 2009 +0000 @@ -24,6 +24,7 @@ * tables taken directly from the AC-3 spec. */ +#include "avcodec.h" #include "ac3tab.h" /** @@ -79,6 +80,20 @@ 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, } },\