www.pudn.com > mediator15src.zip > layer1.c


/*  
 * Mpeg Layer-1 audio decoder  
 * -------------------------- 
 * copyright (c) 1995 by Michael Hipp, All rights reserved. See also 'README' 
 * near unoptimzed ... 
 * 
 * may have a few bugs after last optimization ...  
 * 
 */ 
 
#include "mpg123.h" 
 
static void I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMIT],struct frame *fr) 
{ 
  unsigned int *ba=balloc; 
  unsigned int *sca = (unsigned int *) scale_index; 
 
  if(fr->stereo) { 
    int i; 
    int jsbound = fr->jsbound; 
    for (i=0;istereo) { 
    int jsbound = fr->jsbound; 
    register float *f0 = fraction[0]; 
    register float *f1 = fraction[1]; 
    ba = balloc; 
    for (sample=smpb,i=0;istereo; 
  unsigned int balloc[2*SBLIMIT]; 
  unsigned int scale_index[2][SBLIMIT]; 
  float fraction[2][SBLIMIT]; 
  unsigned char *samples = (unsigned char *)sampledata; 
  int samplepoint = 0; 
 
  init_getbits(framedata); 
 
  fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? (fr->mode_ext<<2)+4 : 32; 
 
  I_step_one(balloc,scale_index,fr); 
 
  for (i=0;i