static void filter(MpegAudioContext *s, int ch, short *samples, int incr)

{

    short *p, *q;

    int sum, offset, i, j, norm, n;

    short tmp[64];

    int tmp1[32];

    int *out;



    //    print_pow1(samples, 1152);



    offset = s->samples_offset[ch];

    out = &s->sb_samples[ch][0][0][0];

    for(j=0;j<36;j++) {

        /* 32 samples at once */

        for(i=0;i<32;i++) {

            s->samples_buf[ch][offset + (31 - i)] = samples[0];

            samples += incr;

        }



        /* filter */

        p = s->samples_buf[ch] + offset;

        q = filter_bank;

        /* maxsum = 23169 */

        for(i=0;i<64;i++) {

            sum = p[0*64] * q[0*64];

            sum += p[1*64] * q[1*64];

            sum += p[2*64] * q[2*64];

            sum += p[3*64] * q[3*64];

            sum += p[4*64] * q[4*64];

            sum += p[5*64] * q[5*64];

            sum += p[6*64] * q[6*64];

            sum += p[7*64] * q[7*64];

            tmp[i] = sum >> 14;

            p++;

            q++;

        }

        tmp1[0] = tmp[16];

        for( i=1; i<=16; i++ ) tmp1[i] = tmp[i+16]+tmp[16-i];

        for( i=17; i<=31; i++ ) tmp1[i] = tmp[i+16]-tmp[80-i];



        /* integer IDCT 32 with normalization. XXX: There may be some

           overflow left */

        norm = 0;

        for(i=0;i<32;i++) {

            norm |= abs(tmp1[i]);

        }

        n = av_log2(norm) - 12;

        if (n > 0) {

            for(i=0;i<32;i++) 

                tmp1[i] >>= n;

        } else {

            n = 0;

        }



        idct32(out, tmp1, s->sblimit, n);



        /* advance of 32 samples */

        offset -= 32;

        out += 32;

        /* handle the wrap around */

        if (offset < 0) {

            memmove(s->samples_buf[ch] + SAMPLES_BUF_SIZE - (512 - 32), 

                    s->samples_buf[ch], (512 - 32) * 2);

            offset = SAMPLES_BUF_SIZE - 512;

        }

    }

    s->samples_offset[ch] = offset;



    //    print_pow(s->sb_samples, 1152);

}

static void filter(MpegAudioContext *s, int ch, short *samples, int incr)

{

    short *p, *q;

    int sum, offset, i, j, norm, n;

    short tmp[64];

    int tmp1[32];

    int *out;



    



    offset = s->samples_offset[ch];

    out = &s->sb_samples[ch][0][0][0];

    for(j=0;j<36;j++) {

        

        for(i=0;i<32;i++) {

            s->samples_buf[ch][offset + (31 - i)] = samples[0];

            samples += incr;

        }



        

        p = s->samples_buf[ch] + offset;

        q = filter_bank;

        

        for(i=0;i<64;i++) {

            sum = p[0*64] * q[0*64];

            sum += p[1*64] * q[1*64];

            sum += p[2*64] * q[2*64];

            sum += p[3*64] * q[3*64];

            sum += p[4*64] * q[4*64];

            sum += p[5*64] * q[5*64];

            sum += p[6*64] * q[6*64];

            sum += p[7*64] * q[7*64];

            tmp[i] = sum >> 14;

            p++;

            q++;

        }

        tmp1[0] = tmp[16];

        for( i=1; i<=16; i++ ) tmp1[i] = tmp[i+16]+tmp[16-i];

        for( i=17; i<=31; i++ ) tmp1[i] = tmp[i+16]-tmp[80-i];



        



        norm = 0;

        for(i=0;i<32;i++) {

            norm |= abs(tmp1[i]);

        }

        n = av_log2(norm) - 12;

        if (n > 0) {

            for(i=0;i<32;i++) 

                tmp1[i] >>= n;

        } else {

            n = 0;

        }



        idct32(out, tmp1, s->sblimit, n);



        

        offset -= 32;

        out += 32;

        

        if (offset < 0) {

            memmove(s->samples_buf[ch] + SAMPLES_BUF_SIZE - (512 - 32), 

                    s->samples_buf[ch], (512 - 32) * 2);

            offset = SAMPLES_BUF_SIZE - 512;

        }

    }

    s->samples_offset[ch] = offset;



    

}

    int sum, offset, i, j, norm, n;     short tmp[64];             tmp[i] = sum >> 14;         tmp1[0] = tmp[16];         for( i=1; i<=16; i++ ) tmp1[i] = tmp[i+16]+tmp[16-i];         for( i=17; i<=31; i++ ) tmp1[i] = tmp[i+16]-tmp[80-i];         norm = 0;         for(i=0;i<32;i++) {             norm |= abs(tmp1[i]);         n = av_log2(norm) - 12;         if (n > 0) {             for(i=0;i<32;i++)                  tmp1[i] >>= n;         } else {             n = 0;         idct32(out, tmp1, s->sblimit, n);
static void FUNC_0(MpegAudioContext *VAR_0, int VAR_1, short *VAR_2, int VAR_3)

{

    short *VAR_4, *VAR_5;

    int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;

    short VAR_12[64];

    int VAR_13[32];

    int *VAR_14;



    



    VAR_7 = VAR_0->samples_offset[VAR_1];

    VAR_14 = &VAR_0->sb_samples[VAR_1][0][0][0];

    for(VAR_9=0;VAR_9<36;VAR_9++) {

        

        for(VAR_8=0;VAR_8<32;VAR_8++) {

            VAR_0->samples_buf[VAR_1][VAR_7 + (31 - VAR_8)] = VAR_2[0];

            VAR_2 += VAR_3;

        }



        

        VAR_4 = VAR_0->samples_buf[VAR_1] + VAR_7;

        VAR_5 = filter_bank;

        

        for(VAR_8=0;VAR_8<64;VAR_8++) {

            VAR_6 = VAR_4[0*64] * VAR_5[0*64];

            VAR_6 += VAR_4[1*64] * VAR_5[1*64];

            VAR_6 += VAR_4[2*64] * VAR_5[2*64];

            VAR_6 += VAR_4[3*64] * VAR_5[3*64];

            VAR_6 += VAR_4[4*64] * VAR_5[4*64];

            VAR_6 += VAR_4[5*64] * VAR_5[5*64];

            VAR_6 += VAR_4[6*64] * VAR_5[6*64];

            VAR_6 += VAR_4[7*64] * VAR_5[7*64];

            VAR_12[VAR_8] = VAR_6 >> 14;

            VAR_4++;

            VAR_5++;

        }

        VAR_13[0] = VAR_12[16];

        for( VAR_8=1; VAR_8<=16; VAR_8++ ) VAR_13[VAR_8] = VAR_12[VAR_8+16]+VAR_12[16-VAR_8];

        for( VAR_8=17; VAR_8<=31; VAR_8++ ) VAR_13[VAR_8] = VAR_12[VAR_8+16]-VAR_12[80-VAR_8];



        



        VAR_10 = 0;

        for(VAR_8=0;VAR_8<32;VAR_8++) {

            VAR_10 |= abs(VAR_13[VAR_8]);

        }

        VAR_11 = av_log2(VAR_10) - 12;

        if (VAR_11 > 0) {

            for(VAR_8=0;VAR_8<32;VAR_8++) 

                VAR_13[VAR_8] >>= VAR_11;

        } else {

            VAR_11 = 0;

        }



        idct32(VAR_14, VAR_13, VAR_0->sblimit, VAR_11);



        

        VAR_7 -= 32;

        VAR_14 += 32;

        

        if (VAR_7 < 0) {

            memmove(VAR_0->samples_buf[VAR_1] + SAMPLES_BUF_SIZE - (512 - 32), 

                    VAR_0->samples_buf[VAR_1], (512 - 32) * 2);

            VAR_7 = SAMPLES_BUF_SIZE - 512;

        }

    }

    VAR_0->samples_offset[VAR_1] = VAR_7;



    

}

static void FUNC_0(MpegAudioContext *VAR_0, int VAR_1, short *VAR_2, int VAR_3)
{ short *VAR_4, *VAR_5; int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11; short VAR_12[64]; int VAR_13[32]; int *VAR_14; VAR_7 = VAR_0->samples_offset[VAR_1]; VAR_14 = &VAR_0->sb_samples[VAR_1][0][0][0]; for(VAR_9=0;VAR_9<36;VAR_9++) { for(VAR_8=0;VAR_8<32;VAR_8++) { VAR_0->samples_buf[VAR_1][VAR_7 + (31 - VAR_8)] = VAR_2[0]; VAR_2 += VAR_3; } VAR_4 = VAR_0->samples_buf[VAR_1] + VAR_7; VAR_5 = filter_bank; for(VAR_8=0;VAR_8<64;VAR_8++) { VAR_6 = VAR_4[0*64] * VAR_5[0*64]; VAR_6 += VAR_4[1*64] * VAR_5[1*64]; VAR_6 += VAR_4[2*64] * VAR_5[2*64]; VAR_6 += VAR_4[3*64] * VAR_5[3*64]; VAR_6 += VAR_4[4*64] * VAR_5[4*64]; VAR_6 += VAR_4[5*64] * VAR_5[5*64]; VAR_6 += VAR_4[6*64] * VAR_5[6*64]; VAR_6 += VAR_4[7*64] * VAR_5[7*64]; VAR_12[VAR_8] = VAR_6 >> 14; VAR_4++; VAR_5++; } VAR_13[0] = VAR_12[16]; for( VAR_8=1; VAR_8<=16; VAR_8++ ) VAR_13[VAR_8] = VAR_12[VAR_8+16]+VAR_12[16-VAR_8]; for( VAR_8=17; VAR_8<=31; VAR_8++ ) VAR_13[VAR_8] = VAR_12[VAR_8+16]-VAR_12[80-VAR_8]; VAR_10 = 0; for(VAR_8=0;VAR_8<32;VAR_8++) { VAR_10 |= abs(VAR_13[VAR_8]); } VAR_11 = av_log2(VAR_10) - 12; if (VAR_11 > 0) { for(VAR_8=0;VAR_8<32;VAR_8++) VAR_13[VAR_8] >>= VAR_11; } else { VAR_11 = 0; } idct32(VAR_14, VAR_13, VAR_0->sblimit, VAR_11); VAR_7 -= 32; VAR_14 += 32; if (VAR_7 < 0) { memmove(VAR_0->samples_buf[VAR_1] + SAMPLES_BUF_SIZE - (512 - 32),
VAR_0->samples_buf[VAR_1], (512 - 32) * 2); VAR_7 = SAMPLES_BUF_SIZE - 512; } } VAR_0->samples_offset[VAR_1] = VAR_7; }