ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

void I_step_two ( real  fraction[2][SBLIMIT],
unsigned int  balloc[2 *SBLIMIT],
unsigned int  scale_index[2][SBLIMIT],
mpg123_handle *  fr 
)

Definition at line 58 of file layer1.c.

Referenced by do_layer1().

{
    int i,n;
    int smpb[2*SBLIMIT]; /* values: 0-65535 */
    int *sample;
    register unsigned int *ba;
    register unsigned int *sca = (unsigned int *) scale_index;

    if(fr->stereo == 2)
    {
        int jsbound = fr->jsbound;
        register real *f0 = fraction[0];
        register real *f1 = fraction[1];
        ba = balloc;
        for(sample=smpb,i=0;i<jsbound;i++)
        {
            if((n = *ba++)) *sample++ = getbits(fr, n+1);

            if((n = *ba++)) *sample++ = getbits(fr, n+1);
        }
        for(i=jsbound;i<SBLIMIT;i++) 
        if((n = *ba++))
        *sample++ = getbits(fr, n+1);

        ba = balloc;
        for(sample=smpb,i=0;i<jsbound;i++)
        {
            if((n=*ba++))
            *f0++ = REAL_MUL_SCALE_LAYER12(DOUBLE_TO_REAL_15( ((-1)<<n) + (*sample++) + 1), fr->muls[n+1][*sca++]);
            else *f0++ = DOUBLE_TO_REAL(0.0);

            if((n=*ba++))
            *f1++ = REAL_MUL_SCALE_LAYER12(DOUBLE_TO_REAL_15( ((-1)<<n) + (*sample++) + 1), fr->muls[n+1][*sca++]);
            else *f1++ = DOUBLE_TO_REAL(0.0);
        }
        for(i=jsbound;i<SBLIMIT;i++)
        {
            if((n=*ba++))
            {
                real samp = DOUBLE_TO_REAL_15( ((-1)<<n) + (*sample++) + 1);
                *f0++ = REAL_MUL_SCALE_LAYER12(samp, fr->muls[n+1][*sca++]);
                *f1++ = REAL_MUL_SCALE_LAYER12(samp, fr->muls[n+1][*sca++]);
            }
            else *f0++ = *f1++ = DOUBLE_TO_REAL(0.0);
        }
        for(i=fr->down_sample_sblimit;i<32;i++)
        fraction[0][i] = fraction[1][i] = 0.0;
    }
    else
    {
        register real *f0 = fraction[0];
        ba = balloc;
        for(sample=smpb,i=0;i<SBLIMIT;i++)
        if ((n = *ba++))
        *sample++ = getbits(fr, n+1);

        ba = balloc;
        for(sample=smpb,i=0;i<SBLIMIT;i++)
        {
            if((n=*ba++))
            *f0++ = REAL_MUL_SCALE_LAYER12(DOUBLE_TO_REAL_15( ((-1)<<n) + (*sample++) + 1), fr->muls[n+1][*sca++]);
            else *f0++ = DOUBLE_TO_REAL(0.0);
        }
        for(i=fr->down_sample_sblimit;i<32;i++)
        fraction[0][i] = DOUBLE_TO_REAL(0.0);
    }
}

Generated on Fri May 25 2012 05:58:53 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.