home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Sound / LAME / Source / loop-pvt.h < prev    next >
C/C++ Source or Header  |  1999-06-03  |  6KB  |  177 lines

  1. /**********************************************************************
  2.  * ISO MPEG Audio Subgroup Software Simulation Group (1996)
  3.  * ISO 13818-3 MPEG-2 Audio Encoder - Lower Sampling Frequency Extension
  4.  *
  5.  * $Id: loop-pvt.h,v 1.1 1996/02/14 04:04:23 rowlands Exp $
  6.  *
  7.  * Private interface declarations for loop.c
  8.  *
  9.  * $Log: loop-pvt.h,v $
  10.  * Revision 1.1  1996/02/14 04:04:23  rowlands
  11.  * Initial revision
  12.  *
  13.  * Received from Mike Coleman
  14.  **********************************************************************/
  15.  
  16. #ifndef LOOP_PVT_H
  17. #define LOOP_PVT_H
  18.  
  19. /*
  20.   Revision History:
  21.  
  22.   Date        Programmer                Comment
  23.   ==========  ========================= ===============================
  24.   1995/10/01  mc@fivebats.com           created
  25.  
  26. */
  27.  
  28. void outer_loop( double xr[2][2][576],     /*vector of the magnitudees of the spectral values */
  29.                 int mean_bits,
  30.                 int VBRbits[2][2],
  31.                 int bit_rate,
  32.         int best_over[2],
  33.                 III_psy_xmin  *l3_xmin, /* the allowed distortion of the scalefactor */
  34.                 int l3_enc[2][2][576],    /* vector of quantized values ix(0..575) */
  35.         frame_params *fr_ps,
  36.                 III_scalefac_t *scalefac, /* scalefactors */
  37.                 int gr,
  38.                 int ch,
  39.         III_side_info_t *l3_side,
  40.         III_psy_ratio *ratio, 
  41.         double pe[2][2],
  42.         double ms_ratio[2]);
  43.  
  44. void outer_loop_old( double xr[2][2][576],     /*vector of the magnitudees of the spectral values */
  45.                 int mean_bits,
  46.                 III_psy_xmin  *l3_xmin, /* the allowed distortion of the scalefactor */
  47.                 int l3_enc[2][2][576],    /* vector of quantized values ix(0..575) */
  48.         frame_params *fr_ps,
  49.                 III_scalefac_t *scalefac, /* scalefactors */
  50.                 int gr,
  51.                 int ch,
  52.         III_side_info_t *l3_side,
  53.         III_psy_ratio *ratio, double pe[2][2]);
  54.  
  55.  
  56. int part2_length( III_scalefac_t *scalefac,
  57.           frame_params *fr_ps,
  58.           int gr,
  59.           int ch,
  60.           III_side_info_t *si );
  61.  
  62. int quantanf_init( double xr[576] );
  63.  
  64. int inner_loop( double xr[2][2][576], double xrpow[2][2][576],
  65.                 int l3_enc[2][2][576],
  66.                 int max_bits,
  67.                 gr_info *cod_info,
  68.                 int gr,
  69.                 int ch );
  70. void calc_xmin( double xr[2][2][576],
  71.                III_psy_ratio *ratio,
  72.                gr_info *cod_info,
  73.                III_psy_xmin *l3_xmin,
  74.                int gr,
  75.                int ch );
  76. double xr_max( double xr[576],
  77.                unsigned int begin,
  78.                unsigned int end );
  79.  
  80. void calc_scfsi( double  xr[576],
  81.                  III_side_info_t *l3_side,
  82.                  III_psy_xmin  *l3_xmin,
  83.                  int ch,
  84.                  int gr );
  85.  
  86. void gr_deco( gr_info *cod_info );
  87.  
  88.  
  89. int count_bit( int ix[576], unsigned int start, unsigned int end, unsigned int table);
  90. int bigv_bitcount( int ix[576], gr_info *cod_info );
  91. int choose_table( int max);
  92. void bigv_tab_select( int ix[576], gr_info *cod_info );
  93. void subdivide( gr_info *cod_info );
  94. int count1_bitcount( int ix[576], gr_info *cod_info );
  95. void  calc_runlen( int ix[576],
  96.                    gr_info *cod_info );
  97. int scale_bitcount( III_scalefac_t *scalefac,
  98.                     gr_info *cod_info,
  99.                     int gr,
  100.                     int ch );
  101. void calc_noise( double xr[576],
  102.                  int ix[576],
  103.                  gr_info *cod_info,
  104.                  double xfsf[4][CBLIMIT]);
  105. int calc_noise1( double xr[576],
  106.                  int ix[576],
  107.                  gr_info *cod_info,
  108.                  double xfsf[4][CBLIMIT], 
  109.          int distort[4][CBLIMIT],
  110.                  III_psy_xmin  *l3_xmin,
  111.          int gr, int ch, double noise);
  112.  
  113. void calc_noise2( double xr[2][576],
  114.                  int ix[2][576],
  115.                  gr_info *cod_info[2],
  116.                  double xfsf[2][4][CBLIMIT], 
  117.          int distort[2][4][CBLIMIT],
  118.                  III_psy_xmin  *l3_xmin,
  119.          int gr, int ch, int over[2], double noise[2]);
  120.  
  121.  
  122. int loop_break( III_scalefac_t *scalefac,
  123.                 gr_info *cod_info,
  124.                 int gr,
  125.                 int ch );
  126. void preemphasis( double xr[576],
  127.                   double xfsf[4][CBLIMIT],
  128.                   III_psy_xmin  *l3_xmin,
  129.                   int gr,
  130.                   int ch,
  131.           III_side_info_t *l3_side );
  132. int preemphasis2( double xr[576], double xrpow[576],
  133.                   III_psy_xmin  *l3_xmin,
  134.                   int gr,
  135.                   int ch,
  136.           III_side_info_t *l3_side,
  137.                   int distort[4][CBLIMIT] );
  138. int amp_scalefac_bands( double xr[576],
  139.                         double xfsf[4][CBLIMIT],
  140.                         III_psy_xmin  *l3_xmin,
  141.             III_side_info_t *l3_side,
  142.                         III_scalefac_t *scalefac,
  143.                         int gr,
  144.                         int ch,
  145.             int iteration);
  146. int amp_scalefac_bands2( double xr[576], double xrpow[576],
  147.                         III_psy_xmin  *l3_xmin,
  148.             III_side_info_t *l3_side,
  149.                         III_scalefac_t *scalefac,
  150.                         int gr,
  151.                         int ch,
  152.             int iteration,
  153.                         int distort[4][CBLIMIT]);
  154. void quantize( double xr[576],
  155.                int  ix[576],
  156.                gr_info *cod_info );
  157. void quantize_xrpow( double xr[576],
  158.                int  ix[576],
  159.                gr_info *cod_info );
  160. int ix_max( int ix[576],
  161.             unsigned int begin,
  162.             unsigned int end );
  163.  
  164.  
  165. int
  166. new_choose_table( int ix[576],
  167.           unsigned int begin,
  168.           unsigned int end, int * s );
  169.  
  170. /* New SS 20-12-96 */
  171. int bin_search_StepSize(int desired_rate, double start, int bot, int ix[576],
  172.            double xrs[576], double xrspow[576], gr_info * cod_info);
  173. int count_bits();
  174.  
  175.  
  176. #endif
  177.