1 2 3 #define DFLT_LAY 2 /* default encoding layer is II */ 4 #define DFLT_MOD 'r' /* default mode is stereo front channels */ 5 #define DFLT_PSY 1 /* default psych model is 1 */ 6 #define DFLT_SFQ 44.1 /* default input sampling rate is 44.1 kHz, now 48kHz 28.6.93 SR */ 7 #define DFLT_BRT 192 /* default total output bitrate is 384 kbps */ 8 #define DFLT_EMP 'n' /* default de-emphasis is none */ 9 #define DFLT_EXT ".mp2" /* default output file extension */ 10 #define DFLT_EXT_EXT ".ext" /* default output file extension of extension bit stream*/ 11 #define DFLT_ML_EXT ".ml" /* default extension for MultiLingual file */ 12 #define DFLT_VERB 1 /* default level of verbosity */ 13 #define DFLT_NADB 2 /* default number of ancillary data bytes (for DVD !!!) */ 14 15 #define FILETYPE_ENCODE 'TEXT' 16 #define CREATOR_ENCODE 'MpgD' 17 18 #define TC_ALLOC 0.0 19 20 /* This is the smallest MNR a subband can have before it is counted 21 as 'noisy' by the logic which chooses the number of JS subbands */ 22 /* Now optionally in fr_ps */ 23 24 /*#define NOISY_MIN_MNR 0.0*/ 25 26 /* Psychacoustic Model 1 Definitions */ 27 28 #define CB_FRACTION 0.33 29 #define MAX_SNR 1000 30 #define NOISE 10 31 #define TONE 20 32 #define DBMIN -200.0 33 #define LAST -1 34 #define STOP -100 35 #define POWERNORM 90.3090 36 /*96.0*/ 37 /* Full amplitude, 32767, should correspond to 38 96 dB, 1992-11-06 Soren H. Nielsen */ 39 /* 90.3090 = 20 * log10(32768) to normalize */ 40 /* max output power to 96 dB per spec */ 41 42 /* Psychoacoustic Model 2 Definitions */ 43 44 #define LOGBLKSIZE 10 45 #define BLKSIZE 1024 46 #define HBLKSIZE 513 47 #define CBANDS 63 48 #define LXMIN 32.0 49 50 /*********************************************************************** 51 * 52 * Encoder Type Definitions 53 * 54 ***********************************************************************/ 55 56 /* Psychoacoustic Model 1 Type Definitions */ 57 58 typedef int IFFT2[FFT_SIZE/2]; 59 typedef int IFFT[FFT_SIZE]; 60 typedef double D9[9]; 61 typedef double D10[10]; 62 typedef double D640[640]; 63 typedef double D1408[1408]; 64 typedef double DFFT2[FFT_SIZE/2]; 65 typedef double DFFT[FFT_SIZE]; 66 typedef double DSBL[SBLIMIT]; 67 typedef double D2SBL[2][SBLIMIT]; 68 typedef double D5SBL[5][SBLIMIT]; 69 typedef double D7SBL[7][SBLIMIT]; /*added because of 7 channels, 8/10/93, SR*/ 70 typedef double D12SBL[12][SBLIMIT]; /*added because of 12 channels, 8/10/93, SR*/ 71 72 typedef struct { 73 int line; 74 double bark, hear, x; 75 } g_thres, *g_ptr; 76 77 typedef struct { 78 double x; 79 int type, next, map; 80 } mask, *mask_ptr; 81 82 /* Psychoacoustic Model 2 Type Definitions */ 83 84 typedef int ICB[CBANDS]; 85 typedef int IHBLK[HBLKSIZE]; 86 typedef FLOAT F32[32]; 87 typedef FLOAT F2_32[2][32]; 88 typedef FLOAT FCB[CBANDS]; 89 typedef FLOAT FCBCB[CBANDS][CBANDS]; 90 typedef FLOAT FBLK[BLKSIZE]; 91 typedef FLOAT FHBLK[HBLKSIZE]; 92 typedef FLOAT F2HBLK[2][HBLKSIZE]; 93 typedef FLOAT F22HBLK[2][2][HBLKSIZE]; 94 typedef double DCB[CBANDS]; 95 96 /*********************************************************************** 97 * 98 * Encoder Variable External Declarations 99 * 100 ***********************************************************************/ 101 102 #ifdef MS_DOS 103 /* extern unsigned _stklen = 16384; */ /* removed, 92-07-13 sr */ 104 #endif 105 106 /*********************************************************************** 107 * 108 * Encoder Function Prototype Declarations 109 * 110 ***********************************************************************/ 111 112 /* The following functions are in the file "musicin.c" */ 113