From e22da6b63704c85e7da71866db2837c7c73a144a Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Mon, 28 Sep 2009 15:35:13 +0000 Subject: AAC: Add channel layout support for channel configuration as defined in the specification Originally committed as revision 20067 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/aacdectab.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'libavcodec/aacdectab.h') diff --git a/libavcodec/aacdectab.h b/libavcodec/aacdectab.h index b6d80f20c1..f632ca20da 100644 --- a/libavcodec/aacdectab.h +++ b/libavcodec/aacdectab.h @@ -69,4 +69,27 @@ static const float * const tns_tmp2_map[4] = { }; // @} +static const int8_t tags_per_config[16] = { 0, 1, 1, 2, 3, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0 }; + +static const uint8_t aac_channel_layout_map[7][5][2] = { + { { TYPE_SCE, 0 }, }, + { { TYPE_CPE, 0 }, }, + { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, }, + { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_SCE, 1 }, }, + { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_CPE, 1 }, }, + { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_LFE, 0 }, { TYPE_CPE, 1 }, }, + { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_LFE, 0 }, { TYPE_CPE, 2 }, { TYPE_CPE, 1 }, }, +}; + +static const int64_t aac_channel_layout[8] = { + CH_LAYOUT_MONO, + CH_LAYOUT_STEREO, + CH_LAYOUT_SURROUND, + CH_LAYOUT_4POINT0, + CH_LAYOUT_5POINT0_BACK, + CH_LAYOUT_5POINT1_BACK, + CH_LAYOUT_7POINT1_WIDE, + 0, +}; + #endif /* AVCODEC_AACDECTAB_H */ -- cgit v1.2.1