00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00030 #ifndef AVCODEC_MPEGAUDIOTAB_H
00031 #define AVCODEC_MPEGAUDIOTAB_H
00032 
00033 #include <stdint.h>
00034 #include "mpegaudio.h"
00035 
00036 #define SQRT2 1.41421356237309514547
00037 
00038 static const int costab32[30] = {
00039     FIX(0.54119610014619701222),
00040     FIX(1.3065629648763763537),
00041 
00042     FIX(0.50979557910415917998),
00043     FIX(2.5629154477415054814),
00044     FIX(0.89997622313641556513),
00045     FIX(0.60134488693504528634),
00046 
00047     FIX(0.5024192861881556782),
00048     FIX(5.1011486186891552563),
00049     FIX(0.78815462345125020249),
00050     FIX(0.64682178335999007679),
00051     FIX(0.56694403481635768927),
00052     FIX(1.0606776859903470633),
00053     FIX(1.7224470982383341955),
00054     FIX(0.52249861493968885462),
00055 
00056     FIX(10.19000812354803287),
00057     FIX(0.674808341455005678),
00058     FIX(1.1694399334328846596),
00059     FIX(0.53104259108978413284),
00060     FIX(2.0577810099534108446),
00061     FIX(0.58293496820613388554),
00062     FIX(0.83934964541552681272),
00063     FIX(0.50547095989754364798),
00064     FIX(3.4076084184687189804),
00065     FIX(0.62250412303566482475),
00066     FIX(0.97256823786196078263),
00067     FIX(0.51544730992262455249),
00068     FIX(1.4841646163141661852),
00069     FIX(0.5531038960344445421),
00070     FIX(0.74453627100229857749),
00071     FIX(0.5006029982351962726),
00072 };
00073 
00074 static const int bitinv32[32] = {
00075     0,  16,  8, 24,  4,  20,  12,  28,
00076     2,  18, 10, 26,  6,  22,  14,  30,
00077     1,  17,  9, 25,  5,  21,  13,  29,
00078     3,  19, 11, 27,  7,  23,  15,  31
00079 };
00080 
00081 
00082 static int16_t filter_bank[512];
00083 
00084 static int scale_factor_table[64];
00085 #ifdef USE_FLOATS
00086 static float scale_factor_inv_table[64];
00087 #else
00088 static int8_t scale_factor_shift[64];
00089 static unsigned short scale_factor_mult[64];
00090 #endif
00091 static unsigned char scale_diff_table[128];
00092 
00093 
00094 static unsigned short total_quant_bits[17];
00095 
00096 
00097 
00098 
00099 static const unsigned short quant_snr[17] = {
00100      70, 110, 160, 208,
00101     253, 316, 378, 439,
00102     499, 559, 620, 680,
00103     740, 800, 861, 920,
00104     980
00105 };
00106 
00107 
00108 
00109 static const float fixed_smr[SBLIMIT] =  {
00110     30, 17, 16, 10, 3, 12, 8, 2.5,
00111     5, 5, 6, 6, 5, 6, 10, 6,
00112     -4, -10, -21, -30, -42, -55, -68, -75,
00113     -75, -75, -75, -75, -91, -107, -110, -108
00114 };
00115 
00116 static const unsigned char nb_scale_factors[4] = { 3, 2, 1, 2 };
00117 
00118 #endif