home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Sound / LAME / src / encoder.h < prev    next >
C/C++ Source or Header  |  2000-07-21  |  2KB  |  81 lines

  1. #ifndef ENCODER_DOT_H
  2. #define ENCODER_DOT_H
  3. /***********************************************************************
  4. *
  5. *  encoder and decoder delays
  6. *
  7. ***********************************************************************/
  8. /* 
  9. layerIII enc->dec delay:  1056 (1057?)   (observed)
  10. layerII  enc->dec dealy:   480 (481?)    (observed)
  11.  
  12.  
  13. polyphase 256-16             (dec or enc)        = 240
  14. mdct      256+32  (9*32)     (dec or enc)        = 288
  15. total:    512+16
  16.  
  17. My guess is that delay of polyphase filterbank is actualy 240.5
  18. So total Encode+Decode delay = ENCDELAY + 528 + 1
  19. */
  20.  
  21.  
  22.  
  23. /* ENCDELAY  The encoder delay.  
  24.  
  25.    Minimum allowed is MDCTDELAY (see below)
  26.    
  27.    The first 96 samples will be attenuated, so using a value
  28.    less than 96 will result in corrupt data for the first 96-ENCDELAY
  29.    samples. 
  30.  
  31.    suggested: 576
  32.    set to 1160 to sync with FhG.
  33. */
  34. #define ENCDELAY 576
  35.  
  36.  
  37.  
  38.  
  39. /* delay of the MDCT used in mdct.c */
  40. /* original ISO routiens had a delay of 528!  Takehiro's routines: */
  41. #define MDCTDELAY 48  
  42. #define FFTOFFSET (224+MDCTDELAY)
  43.  
  44. /*
  45. Most decoders, including the one we use,  have a delay of 528 samples.  
  46. */
  47. #define DECDELAY 528
  48.  
  49.  
  50. /* number of subbands */
  51. #define         SBLIMIT                 32
  52.  
  53. /* parition bands bands */
  54. #define CBANDS          64
  55.  
  56. /* number of critical bands/scale factor bands where masking is computed*/
  57. #define SBPSY_l 21
  58. #define SBPSY_s 12
  59.  
  60. /* total number of scalefactor bands encoded */
  61. #define SBMAX_l 22
  62. #define SBMAX_s 13
  63.  
  64.  
  65.  
  66. /* FFT sizes */
  67. #define BLKSIZE         1024
  68. #define HBLKSIZE        513
  69. #define BLKSIZE_s 256
  70. #define HBLKSIZE_s 129
  71.  
  72.  
  73. /* #define switch_pe        1800 */
  74. #define NORM_TYPE       0
  75. #define START_TYPE      1
  76. #define SHORT_TYPE      2
  77. #define STOP_TYPE       3
  78.  
  79.  
  80. #endif
  81.