Changeset 65 for mppenc/branches/r2d/src/mppenc.h
- Timestamp:
- 10/02/06 20:41:38 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mppenc/branches/r2d/src/mppenc.h
r64 r65 26 26 #endif 27 27 28 #include "libmpcenc.h" 29 #include "libmpcpsy.h" 30 #include "datatypes.h" 31 #include "minimax.h" 32 28 33 #include "mppdec.h" 29 #include "minimax.h"30 34 31 35 //#define IO_BUFFERING // activates IO-buffer (default: off) … … 53 57 } wave_t; 54 58 55 // analy_filter.c56 void Analyse_Filter(const PCMDataTyp*, SubbandFloatTyp*, const int);57 void Analyse_Init ( float Left, float Right, SubbandFloatTyp* out, const int MaxBand );58 59 void Klemm ( void );60 61 59 // ans.c 62 extern unsigned int NS_Order; // global Flag for Noise Shaping 63 extern unsigned int NS_Order_L [32]; 64 extern unsigned int NS_Order_R [32]; // order of the Adaptive Noiseshaping (0: off, 1...5: on) 65 extern float FIR_L [32] [MAX_NS_ORDER]; 66 extern float FIR_R [32] [MAX_NS_ORDER]; // contains FIR-Filter for NoiseShaping 67 extern float ANSspec_L [MAX_ANS_LINES]; 68 extern float ANSspec_R [MAX_ANS_LINES]; // L/R-masking threshold for ANS 69 extern float ANSspec_M [MAX_ANS_LINES]; 70 extern float ANSspec_S [MAX_ANS_LINES]; // M/S-masking threshold for ANS 71 72 void Init_ANS ( void ); 73 void NS_Analyse ( const int, const unsigned char* MS, const SMRTyp, const int* Transient ); 74 75 76 extern Uint32_t Buffer [BUFFER_FULL]; // buffer for bitstream file (128 KB) 77 extern Uint32_t dword; // 32 bit-Word for Bitstream-I/O 78 extern unsigned int Zaehler; // position counter for processed bitstream word (32 bit) 79 extern UintMax_t BufferedBits; // counter for the number of written bits in the bitstream 60 // extern unsigned int NS_Order; // global Flag for Noise Shaping 61 // extern unsigned int NS_Order_L [32]; 62 // extern unsigned int NS_Order_R [32]; // order of the Adaptive Noiseshaping (0: off, 1...5: on) 63 // extern float FIR_L [32] [MAX_NS_ORDER]; 64 // extern float FIR_R [32] [MAX_NS_ORDER]; // contains FIR-Filter for NoiseShaping 65 // extern float ANSspec_L [MAX_ANS_LINES]; 66 // extern float ANSspec_R [MAX_ANS_LINES]; // L/R-masking threshold for ANS 67 // extern float ANSspec_M [MAX_ANS_LINES]; 68 // extern float ANSspec_S [MAX_ANS_LINES]; // M/S-masking threshold for ANS 69 70 71 // extern Uint32_t Buffer [BUFFER_FULL]; // buffer for bitstream file (128 KB) 72 // extern Uint32_t dword; // 32 bit-Word for Bitstream-I/O 73 // extern unsigned int Zaehler; // position counter for processed bitstream word (32 bit) 74 // extern UintMax_t BufferedBits; // counter for the number of written bits in the bitstream 80 75 81 76 void FlushBitstream ( FILE* fp, const Uint32_t* buffer, size_t words32bit ); … … 101 96 void Generate_FFT_Tables ( const int, int*, float* ); 102 97 103 104 // mppenc.c 105 extern float SNR_comp_L [32]; 106 extern float SNR_comp_R [32]; // SNR-compensation after SCF-combination and ANS-gain 107 extern unsigned int MS_Channelmode; // global flag for enhanced functionality 108 extern unsigned int Overflows; 109 extern float SampleFreq; 110 extern float Bandwidth; 111 extern float KBD1; 112 extern float KBD2; 113 114 // psy.c 115 extern unsigned int CVD_used; // global flag for ClearVoiceDetection (more switches for the psychoacoustic model) 116 extern float varLtq; // variable threshold in quiet 117 extern unsigned int tmpMask_used; // global flag for temporal masking 118 extern float ShortThr; // factor for calculation masking threshold with transients 119 extern float minSMR; // minimum SMR for all subbands 120 121 void Init_Psychoakustik ( void ); 122 SMRTyp Psychoakustisches_Modell ( const int, const PCMDataTyp*, int* TransientL, int* TransientR ); 98 // FIXME : put in lib header 99 void Init_Psychoakustik ( PsyModel* ); 100 SMRTyp Psychoakustisches_Modell ( PsyModel *, const int, const PCMDataTyp*, int* TransientL, int* TransientR ); 123 101 void TransientenCalc ( int* Transient, const int* TransientL, const int* TransientR ); 124 void RaiseSMR ( const int, SMRTyp* );102 void RaiseSMR ( PsyModel*, const int, SMRTyp* ); 125 103 void MS_LR_Entscheidung ( const int, unsigned char* MS, SMRTyp*, SubbandFloatTyp* ); 126 104 void Init_Psychoakustiktabellen ( PsyModel* ); 105 106 void Init_ANS ( void ); 107 void NS_Analyse (PsyModel*, const int, const unsigned char* MS, const SMRTyp, const int* Transient ); 108 109 void Analyse_Filter(const PCMDataTyp*, SubbandFloatTyp*, const int); 110 void Analyse_Init ( float Left, float Right, SubbandFloatTyp* out, const int MaxBand ); 111 void Klemm ( void ); 127 112 128 113 // psy_tab.c 129 extern int MinValChoice; // Flag for calculation of MinVal-values130 extern unsigned int EarModelFlag; // Flag for threshold in quiet131 extern float Ltq_offset; // Offset for threshold in quiet132 extern float Ltq_max; // maximum level for threshold in quiet133 114 extern float fftLtq [512]; // threshold in quiet (FFT) 134 115 extern float partLtq [PART_LONG]; // threshold in quiet (Partitions) … … 137 118 extern float MinVal [PART_LONG]; // minimum quality that's adapted to the model, minval for long 138 119 extern float SPRD [PART_LONG] [PART_LONG]; // tabulated spreading function 139 extern float TMN; // Offset for purely sinusoid components140 extern float NMT; // Offset for purely noisy components141 extern float TransDetect; // minimum slewrate for transient detection142 120 extern float O_MAX; 143 121 extern float O_MIN; … … 153 131 extern const int wh [PART_LONG]; // w_high for long 154 132 extern const int wh_short [PART_SHORT]; // w_high for short 155 156 void Init_Psychoakustiktabellen ( void );157 133 158 134
Note: See TracChangeset
for help on using the changeset viewer.