Libav 0.7.1
|
00001 /* 00002 * AAC decoder data 00003 * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org ) 00004 * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com ) 00005 * 00006 * This file is part of Libav. 00007 * 00008 * Libav is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * Libav is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with Libav; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 */ 00022 00030 #ifndef AVCODEC_AACDECTAB_H 00031 #define AVCODEC_AACDECTAB_H 00032 00033 #include "libavutil/audioconvert.h" 00034 #include "aac.h" 00035 00036 #include <stdint.h> 00037 00038 /* @name ltp_coef 00039 * Table of the LTP coefficients 00040 */ 00041 static const float ltp_coef[8] = { 00042 0.570829, 0.696616, 0.813004, 0.911304, 00043 0.984900, 1.067894, 1.194601, 1.369533, 00044 }; 00045 00046 /* @name tns_tmp2_map 00047 * Tables of the tmp2[] arrays of LPC coefficients used for TNS. 00048 * The suffix _M_N[] indicate the values of coef_compress and coef_res 00049 * respectively. 00050 * @{ 00051 */ 00052 static const float tns_tmp2_map_1_3[4] = { 00053 0.00000000, -0.43388373, 0.64278758, 0.34202015, 00054 }; 00055 00056 static const float tns_tmp2_map_0_3[8] = { 00057 0.00000000, -0.43388373, -0.78183150, -0.97492790, 00058 0.98480773, 0.86602539, 0.64278758, 0.34202015, 00059 }; 00060 00061 static const float tns_tmp2_map_1_4[8] = { 00062 0.00000000, -0.20791170, -0.40673664, -0.58778524, 00063 0.67369562, 0.52643216, 0.36124167, 0.18374951, 00064 }; 00065 00066 static const float tns_tmp2_map_0_4[16] = { 00067 0.00000000, -0.20791170, -0.40673664, -0.58778524, 00068 -0.74314481, -0.86602539, -0.95105654, -0.99452192, 00069 0.99573416, 0.96182561, 0.89516330, 0.79801720, 00070 0.67369562, 0.52643216, 0.36124167, 0.18374951, 00071 }; 00072 00073 static const float * const tns_tmp2_map[4] = { 00074 tns_tmp2_map_0_3, 00075 tns_tmp2_map_0_4, 00076 tns_tmp2_map_1_3, 00077 tns_tmp2_map_1_4 00078 }; 00079 // @} 00080 00081 static const int8_t tags_per_config[16] = { 0, 1, 1, 2, 3, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0 }; 00082 00083 static const uint8_t aac_channel_layout_map[7][5][2] = { 00084 { { TYPE_SCE, 0 }, }, 00085 { { TYPE_CPE, 0 }, }, 00086 { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, }, 00087 { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_SCE, 1 }, }, 00088 { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_CPE, 1 }, }, 00089 { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_LFE, 0 }, { TYPE_CPE, 1 }, }, 00090 { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_LFE, 0 }, { TYPE_CPE, 2 }, { TYPE_CPE, 1 }, }, 00091 }; 00092 00093 static const int64_t aac_channel_layout[8] = { 00094 AV_CH_LAYOUT_MONO, 00095 AV_CH_LAYOUT_STEREO, 00096 AV_CH_LAYOUT_SURROUND, 00097 AV_CH_LAYOUT_4POINT0, 00098 AV_CH_LAYOUT_5POINT0_BACK, 00099 AV_CH_LAYOUT_5POINT1_BACK, 00100 AV_CH_LAYOUT_7POINT1_WIDE, 00101 0, 00102 }; 00103 00104 #endif /* AVCODEC_AACDECTAB_H */