www.pudn.com > iMagic_2006_0428_v098r23.rar > constant.h


#ifndef _CONSTANT_H 
#define _CONSTANT_H 
 
 
#define TRUE 1 
#define FALSE 0 
 
////////////////////////////// 
// Wave Format 
////////////////////////////// 
#define WAV_ID_RIFF 0x46464952 // 52494646  "RIFF"  
#define WAV_ID_WAVE 0x45564157 // 57415645  "WAVE"  
#define WAV_ID_FMT  0x20746d66 // 666d7420  "fmt "  
#define WAV_ID_DATA 0x61746164 // 64617461  "data"  
#define WAV_ID_FACT 0x74636146 // FACT 
 
 
////////////////////////////// 
// AAC Constant Define 
////////////////////////////// 
#define M_PI         3.14159265358979323846 
#define MAX_CHANNELS    2 
#define FRAME_LEN       1024 
#define NSFB_LONG       52 
//#define BLOCK_LEN_LONG   1024 
#define MAX_SCFAC_BANDS (NSFB_LONG+1) 
 
#define REPEATER_LEN    5 
#define CODEBOOK_LEN    4 
#define REPEATER_MAX    31 
 
#define ID_SCE 0 
#define ID_CPE 1 
#define ID_CCE 2 
#define ID_LFE 3 
#define ID_DSE 4 
#define ID_PCE 5 
#define ID_FIL 6 
#define ID_END 7 
 
 
// MPEG ID's 
#define MPEG2 1 
#define MPEG4 0 
 
// Stream Format 
#define RAW_STREAM  0 
#define ADTS_STREAM 1 
 
// Container Format 
#define NO_CONTAINER  0 
#define MP4_CONTAINER 1 
 
// AAC object types 
#define AAC_MAIN 0 
#define AAC_LC   1 
#define AAC_SSR  2 
#define AAC_LTP  3 
 
// Filter Bank 
#define SINE_WINDOW 0 
#define KBD_WINDOW  1 
 
// Window Type 
#define ONLY_LONG_WINDOW  0 
#define LONG_SHORT_WINDOW 1 
#define ONLY_SHORT_WINDOW 2 
#define SHORT_LONG_WINDOW 3 
 
// power of two 
#define POW2_31 2147483648    //2^31 
#define POW2_30 1073741824    //2^30 
#define POW2_29 536870912     //2^29 
#define POW2_28 268435456     //2^28 
#define POW2_27 134217728     //2^27 
#define POW2_26 67108864 
#define POW2_25 33554432 
#define POW2_24 16777216      //2^23 
#define POW2_23 8388608       //2^23 
#define POW2_22 4194304       //2^22 
#define POW2_21 2097152 
#define POW2_20 1048576 
#define POW2_19 524288 
#define POW2_18 262144 
#define POW2_17 131072 
#define POW2_16 65536 
#define POW2_15 32768 
#define POW2_14 16384 
#define POW2_13 8192 
#define POW2_12 4096 
#define POW2_11 2048 
#define POW2_10 1024 
#define POW2_9  512 
 
#define iMAX32 0x7FFFFFFF 
#define iMIN32 0x80000000 
#define iMAX16 0x7FFF 
#define iMIN16 0x8000 
#define fMIN_VALUE 0 
 
// Macro Define 
#define MUL1616(x,y)    (int)( (short)x * (short)y ) 
#define MUL3216(x,y)    (int)( (((long long)(x)) * ((long long)(y))) >> 16 ) 
#define MUL3232(x,y)    (int)( (((long long)(x)) * ((long long)(y))) >> 32 ) 
#define ABS(A)          ((A) < 0 ? (-A) : (A)) 
 
 
 
#endif