Ignore:
Timestamp:
10/02/06 20:41:38 (18 years ago)
Author:
r2d
Message:
  • mppenc can be compiled *but* doesn't work (segfault)
  • some variables are not initialized in the libs structs - TO BE FIXED
  • I have duplicated some (one ?) variables in the libs structs and the dup variables in libmpcenc are not used (and not initialized) - TO BE FIXED
File:
1 edited

Legend:

Unmodified
Added
Removed
  • mppenc/branches/r2d/src/mppenc.h

    r64 r65  
    2626#endif
    2727
     28#include "libmpcenc.h"
     29#include "libmpcpsy.h"
     30#include "datatypes.h"
     31#include "minimax.h"
     32
    2833#include "mppdec.h"
    29 #include "minimax.h"
    3034
    3135//#define IO_BUFFERING                          // activates IO-buffer (default: off)
     
    5357} wave_t;
    5458
    55 // analy_filter.c
    56 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 
    6159// 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
    8075
    8176void  FlushBitstream    ( FILE* fp, const Uint32_t* buffer, size_t words32bit );
     
    10196void   Generate_FFT_Tables ( const int, int*, float* );
    10297
    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
     99void   Init_Psychoakustik       ( PsyModel* );
     100SMRTyp Psychoakustisches_Modell ( PsyModel *, const int, const PCMDataTyp*, int* TransientL, int* TransientR );
    123101void   TransientenCalc          ( int* Transient, const int* TransientL, const int* TransientR );
    124 void   RaiseSMR                 ( const int, SMRTyp* );
     102void   RaiseSMR                 ( PsyModel*, const int, SMRTyp* );
    125103void   MS_LR_Entscheidung       ( const int, unsigned char* MS, SMRTyp*, SubbandFloatTyp* );
    126 
     104void   Init_Psychoakustiktabellen ( PsyModel* );
     105
     106void   Init_ANS   ( void );
     107void   NS_Analyse (PsyModel*, const int, const unsigned char* MS, const SMRTyp, const int* Transient );
     108
     109void   Analyse_Filter(const PCMDataTyp*, SubbandFloatTyp*, const int);
     110void   Analyse_Init ( float Left, float Right, SubbandFloatTyp* out, const int MaxBand );
     111void   Klemm ( void );
    127112
    128113// psy_tab.c
    129 extern int          MinValChoice;               // Flag for calculation of MinVal-values
    130 extern unsigned int EarModelFlag;               // Flag for threshold in quiet
    131 extern float        Ltq_offset;                 // Offset for threshold in quiet
    132 extern float        Ltq_max;                    // maximum level for threshold in quiet
    133114extern float        fftLtq   [512];             // threshold in quiet (FFT)
    134115extern float        partLtq  [PART_LONG];       // threshold in quiet (Partitions)
     
    137118extern float        MinVal   [PART_LONG];       // minimum quality that's adapted to the model, minval for long
    138119extern float        SPRD     [PART_LONG] [PART_LONG]; // tabulated spreading function
    139 extern float        TMN;                        // Offset for purely sinusoid components
    140 extern float        NMT;                        // Offset for purely noisy components
    141 extern float        TransDetect;                // minimum slewrate for transient detection
    142120extern float        O_MAX;
    143121extern float        O_MIN;
     
    153131extern const int    wh        [PART_LONG];      // w_high for long
    154132extern const int    wh_short  [PART_SHORT];     // w_high for short
    155 
    156 void   Init_Psychoakustiktabellen ( void );
    157133
    158134
Note: See TracChangeset for help on using the changeset viewer.