Changeset 60 for mppenc/branches/r2d/src/mppenc.h
- Timestamp:
- 09/28/06 18:15:21 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mppenc/branches/r2d/src/mppenc.h
r46 r60 36 36 #define X_MEM 1152 37 37 38 // ans.c39 #define MAX_NS_ORDER 6 // maximum order of the Adaptive Noise Shaping Filter (IIR)40 #define MAX_ANS_BANDS 1641 #define MAX_ANS_LINES (32 * MAX_ANS_BANDS) // maximum number of noiseshaped FFT-lines42 ///////// 16 * MAX_ANS_BANDS not sufficient? //////////////////43 #define MS2SPAT1 0.5f44 #define MS2SPAT2 0.25f45 #define MS2SPAT3 0.125f46 #define MS2SPAT4 0.0625f47 48 38 // bitstream.c 49 39 #define BUFFER_ALMOST_FULL 8192 50 40 #define BUFFER_FULL (BUFFER_ALMOST_FULL + 4352) // 34490 bit/frame 1320.3 kbps 51 41 52 // cvd.c53 #define MAX_CVD_LINE 300 // maximum FFT-Index for CVD54 #define CVD_UNPRED 0.040f // unpredictability (cw) for CVD-detected bins, e33 (04)55 #define MIN_ANALYZED_IDX 12 // maximum base-frequency = 44100/MIN_ANALYZED_IDX ^^^^^^56 #define MED_ANALYZED_IDX 50 // maximum base-frequency = 44100/MED_ANALYZED_IDX ^^^^^^57 #define MAX_ANALYZED_IDX 900 // minimum base-frequency = 44100/MAX_ANALYZED_IDX (816 for Amnesia)58 59 // mppenc.h60 #define CENTER 448 // offset for centering current data in Main-array61 #define BLOCK 1152 // blocksize62 #define ANABUFFER (BLOCK + CENTER) // size of PCM-data array for analysis63 64 // psy.c65 #define SHORTFFT_OFFSET 168 // fft-offset for short FFT's66 #define PREFAC_LONG 10 // preecho-factor for long partitions67 68 // psy_tab.h69 #define PART_LONG 57 // number of partitions for long70 #define PART_SHORT (PART_LONG / 3) // number of partitions for short71 #define MAX_SPL 20 // maximum assumed Sound Pressure Level72 73 42 // quant.h 74 43 #define SCFfac 0.832980664785f // = SCF[n-1]/SCF[n] 75 44 76 45 // wave_in.h 77 78 79 // fast but maybe more inaccurate, use if you need speed80 #if defined(__GNUC__) && !defined(__APPLE__)81 # define SIN(x) sinf ((float)(x))82 # define COS(x) cosf ((float)(x))83 # define ATAN2(x,y) atan2f ((float)(x), (float)(y))84 # define SQRT(x) sqrtf ((float)(x))85 # define LOG(x) logf ((float)(x))86 # define LOG10(x) log10f ((float)(x))87 # define POW(x,y) expf (logf(x) * (y))88 # define POW10(x) expf (M_LN10 * (x))89 # define FLOOR(x) floorf ((float)(x))90 # define IFLOOR(x) (int) floorf ((float)(x))91 # define FABS(x) fabsf ((float)(x))92 #else93 # define SIN(x) (float) sin (x)94 # define COS(x) (float) cos (x)95 # define ATAN2(x,y) (float) atan2 (x, y)96 # define SQRT(x) (float) sqrt (x)97 # define LOG(x) (float) log (x)98 # define LOG10(x) (float) log10 (x)99 # define POW(x,y) (float) pow (x,y)100 # define POW10(x) (float) pow (10., (x))101 # define FLOOR(x) (float) floor (x)102 # define IFLOOR(x) (int) floor (x)103 # define FABS(x) (float) fabs (x)104 #endif105 106 #define SQRTF(x) SQRT (x)107 #ifdef FAST_MATH108 # define TABSTEP 64109 # define COSF(x) my_cos ((float)(x))110 # define ATAN2F(x,y) my_atan2 ((float)(x), (float)(y))111 # define IFLOORF(x) my_ifloor ((float)(x))112 #else113 # undef TABSTEP114 # define COSF(x) COS (x)115 # define ATAN2F(x,y) ATAN2 (x,y)116 # define IFLOORF(x) IFLOOR (x)117 #endif118 119 typedef struct {120 float L [ANABUFFER];121 float R [ANABUFFER];122 float M [ANABUFFER];123 float S [ANABUFFER];124 } PCMDataTyp;125 126 typedef struct {127 float L [36];128 float R [36];129 } SubbandFloatTyp;130 46 131 47 typedef struct { … … 133 49 unsigned int R [36]; 134 50 } SubbandQuantTyp; 135 136 typedef struct {137 float L [32];138 float R [32];139 float M [32];140 float S [32];141 } SMRTyp;142 51 143 52 typedef struct { … … 207 116 void rdft ( const int, float*, int*, float* ); 208 117 void Generate_FFT_Tables ( const int, int*, float* ); 209 210 211 // fft_routines.c212 void Init_FFT ( void );213 void PowSpec256 ( const float*, float* );214 void PowSpec1024 ( const float*, float* );215 void PowSpec2048 ( const float*, float* );216 void PolarSpec1024 ( const float*, float*, float* );217 void Cepstrum2048 ( float* cep, const int );218 118 219 119
Note: See TracChangeset
for help on using the changeset viewer.