Mercurial > libavcodec.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
9511:c2dba7ed94dc | 9512:ba5d9a97ab2f |
---|---|
22 /** | 22 /** |
23 * @file libavcodec/ac3tab.c | 23 * @file libavcodec/ac3tab.c |
24 * tables taken directly from the AC-3 spec. | 24 * tables taken directly from the AC-3 spec. |
25 */ | 25 */ |
26 | 26 |
27 #include "avcodec.h" | |
27 #include "ac3tab.h" | 28 #include "ac3tab.h" |
28 | 29 |
29 /** | 30 /** |
30 * Possible frame sizes. | 31 * Possible frame sizes. |
31 * from ATSC A/52 Table 5.18 Frame Size Code Table. | 32 * from ATSC A/52 Table 5.18 Frame Size Code Table. |
75 * Maps audio coding mode (acmod) to number of full-bandwidth channels. | 76 * Maps audio coding mode (acmod) to number of full-bandwidth channels. |
76 * from ATSC A/52 Table 5.8 Audio Coding Mode | 77 * from ATSC A/52 Table 5.8 Audio Coding Mode |
77 */ | 78 */ |
78 const uint8_t ff_ac3_channels_tab[8] = { | 79 const uint8_t ff_ac3_channels_tab[8] = { |
79 2, 1, 2, 3, 3, 4, 4, 5 | 80 2, 1, 2, 3, 3, 4, 4, 5 |
81 }; | |
82 | |
83 /** | |
84 * Maps audio coding mode (acmod) to channel layout mask. | |
85 */ | |
86 const uint16_t ff_ac3_channel_layout_tab[8] = { | |
87 CH_LAYOUT_STEREO, | |
88 CH_LAYOUT_MONO, | |
89 CH_LAYOUT_STEREO, | |
90 CH_LAYOUT_SURROUND, | |
91 CH_LAYOUT_2_1, | |
92 CH_LAYOUT_4POINT0, | |
93 CH_LAYOUT_2_2, | |
94 CH_LAYOUT_5POINT0 | |
80 }; | 95 }; |
81 | 96 |
82 #define COMMON_CHANNEL_MAP \ | 97 #define COMMON_CHANNEL_MAP \ |
83 { { 0, 1, }, { 0, 1, 2, } },\ | 98 { { 0, 1, }, { 0, 1, 2, } },\ |
84 { { 0, }, { 0, 1, } },\ | 99 { { 0, }, { 0, 1, } },\ |